{"id":1428,"date":"2024-06-23T19:20:28","date_gmt":"2024-06-23T16:20:28","guid":{"rendered":"https:\/\/doaasohiel.com\/ar\/?page_id=1428"},"modified":"2024-06-24T17:29:40","modified_gmt":"2024-06-24T14:29:40","slug":"%d8%a3%d8%ad%d8%b3%d8%a8-%d9%88%d8%b2%d9%86%d9%83-%d8%a7%d9%84%d9%85%d8%ab%d8%a7%d9%84%d9%8a","status":"publish","type":"page","link":"https:\/\/doaasohiel.com\/ar\/%d8%a3%d8%ad%d8%b3%d8%a8-%d9%88%d8%b2%d9%86%d9%83-%d8%a7%d9%84%d9%85%d8%ab%d8%a7%d9%84%d9%8a\/","title":{"rendered":"\u0623\u062d\u0633\u0628 \u0648\u0632\u0646\u0643 \u0627\u0644\u0645\u062b\u0627\u0644\u064a"},"content":{"rendered":"    <div class=\"bmi-calculator-container\">\n        <h2>\u0627\u062d\u0633\u0628 \u0648\u0632\u0646\u0643 \u0645\u0639 \u062f\/ \u062f\u0639\u0627\u0621 \u0633\u0647\u064a\u0644<\/h2>\n        \n        <div>\n            <label for=\"height\">\u0627\u0644\u0637\u0648\u0644 (\u0633\u0645):<\/label>\n            <input type=\"number\" id=\"height\" placeholder=\"\u0627\u062f\u062e\u0644 \u0627\u0644\u0637\u0648\u0644 \u0628\u0627\u0644\u0633\u0646\u062a\u064a\u0645\u062a\u0631\">\n        <\/div>\n        \n        <div>\n            <label for=\"weight\">\u0627\u0644\u0648\u0632\u0646 (\u0643\u062c\u0645):<\/label>\n            <input type=\"number\" id=\"weight\" placeholder=\"\u0627\u062f\u062e\u0644 \u0627\u0644\u0648\u0632\u0646 \u0628\u0627\u0644\u0643\u064a\u0644\u0648\u063a\u0631\u0627\u0645\">\n        <\/div>\n        \n        <button onclick=\"calculateBMI()\">\u0627\u062d\u0633\u0628<\/button>\n        \n        <div id=\"result\"><\/div>\n    <\/div>\n\n\n    <script>\n        function calculateBMI() {\n            var height = parseFloat(document.getElementById('height').value);\n            var weight = parseFloat(document.getElementById('weight').value);\n            \n            if (isNaN(height) || isNaN(weight) || height <= 0 || weight <= 0) {\n                document.getElementById('result').innerHTML = '\u0627\u0644\u0631\u062c\u0627\u0621 \u0625\u062f\u062e\u0627\u0644 \u0642\u064a\u0645 \u0635\u062d\u064a\u062d\u0629 \u0644\u0644\u0637\u0648\u0644 \u0648\u0627\u0644\u0648\u0632\u0646.';\n                return;\n            }\n            \n            var bmi = weight \/ ((height \/ 100) * (height \/ 100));\n            var bmiCategory = '';\n            \n            if (bmi < 18.5) {\n                bmiCategory = '\u0646\u0642\u0635 \u0641\u064a \u0627\u0644\u0648\u0632\u0646';\n            } else if (bmi >= 18.5 && bmi < 25) {\n                bmiCategory = '\u0648\u0632\u0646 \u0637\u0628\u064a\u0639\u064a';\n            } else if (bmi >= 25 && bmi < 30) {\n                bmiCategory = '\u0632\u064a\u0627\u062f\u0629 \u0637\u0641\u064a\u0641\u0629 \u0641\u064a \u0627\u0644\u0648\u0632\u0646';\n            } else {\n                bmiCategory = '\u0632\u064a\u0627\u062f\u0629 \u0645\u0644\u062d\u0648\u0638\u0629 \u0641\u064a \u0627\u0644\u0648\u0632\u0646';\n            }\n            \n            var idealWeight = 24.9 * ((height \/ 100) * (height \/ 100));\n            var weightToReduce = (weight - idealWeight).toFixed(2);\n            \n            var resultMessage = '\u0645\u0624\u0634\u0631 \u0643\u062a\u0644\u0629 \u0627\u0644\u062c\u0633\u0645: ' + bmi.toFixed(2) + '<br>' +\n                                '\u0627\u0644\u062a\u0635\u0646\u064a\u0641: ' + bmiCategory + '<br>';\n            \n            if (weightToReduce > 0) {\n                resultMessage += '\u064a\u062c\u0628 \u0639\u0644\u064a\u0643 \u062e\u0633\u0627\u0631\u0629 ' + weightToReduce + ' \u0643\u062c\u0645 \u0644\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0648\u0632\u0646 \u0627\u0644\u0645\u062b\u0627\u0644\u064a.';\n            } else if (weightToReduce < 0) {\n                resultMessage += '\u064a\u062c\u0628 \u0639\u0644\u064a\u0643 \u0632\u064a\u0627\u062f\u0629 ' + Math.abs(weightToReduce) + ' \u0643\u062c\u0645 \u0644\u0644\u0648\u0635\u0648\u0644 \u0625\u0644\u0649 \u0627\u0644\u0648\u0632\u0646 \u0627\u0644\u0645\u062b\u0627\u0644\u064a.';\n            } else {\n                resultMessage += '\u0623\u0646\u062a \u0639\u0644\u0649 \u0627\u0644\u0648\u0632\u0646 \u0627\u0644\u0645\u062b\u0627\u0644\u064a.';\n            }\n            \n            document.getElementById('result').innerHTML = resultMessage;\n        }\n    <\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":3,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"nf_dc_page":"","footnotes":""},"class_list":["post-1428","page","type-page","status-publish","hentry"],"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"admin","author_link":"https:\/\/doaasohiel.com\/ar\/author\/admin-2\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":null,"_links":{"self":[{"href":"https:\/\/doaasohiel.com\/ar\/wp-json\/wp\/v2\/pages\/1428","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/doaasohiel.com\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/doaasohiel.com\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/doaasohiel.com\/ar\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/doaasohiel.com\/ar\/wp-json\/wp\/v2\/comments?post=1428"}],"version-history":[{"count":0,"href":"https:\/\/doaasohiel.com\/ar\/wp-json\/wp\/v2\/pages\/1428\/revisions"}],"wp:attachment":[{"href":"https:\/\/doaasohiel.com\/ar\/wp-json\/wp\/v2\/media?parent=1428"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}