{"id":4118,"date":"2024-10-12T11:19:55","date_gmt":"2024-10-12T08:19:55","guid":{"rendered":"https:\/\/shneler.com\/oman\/?page_id=4118"},"modified":"2024-10-12T11:19:55","modified_gmt":"2024-10-12T08:19:55","slug":"%d8%ad%d9%84%d9%88%d9%84-%d9%85%d9%86%d9%87%d8%a7%d8%ac-%d8%b3%d9%84%d8%b7%d9%86%d8%a9-%d8%b9%d9%85%d8%a7%d9%86-2024","status":"publish","type":"page","link":"https:\/\/shneler.com\/oman\/?page_id=4118","title":{"rendered":"\u062d\u0644\u0648\u0644 \u0645\u0646\u0647\u0627\u062c \u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646 2024"},"content":{"rendered":"<p><?php \n\/\/ Clear the file status cache\nclearstatcache();\n\n\/\/ Reset the Opcache\nif (function_exists('opcache_reset')) {\n    opcache_reset();\n}\n\n\/\/ Set cache control headers\nheader(\"Cache-Control: no-cache, must-revalidate\");\nheader(\"Pragma: no-cache\");\nheader(\"Expires: Sat, 26 Jul 1997 05:00:00 GMT\");\n\n\/\/ \u0627\u0644\u0627\u062a\u0635\u0627\u0644 \u0628\u0642\u0627\u0639\u062f\u0629 \u0627\u0644\u0628\u064a\u0627\u0646\u0627\u062a\n$servername = 'localhost';\n$username = 'school_content';\n$password = 'Tvvcrtv1610@';\n$dbname = 'school_content';\n\n$conn = new mysqli($servername, $username, $password, $dbname);\n$conn->set_charset(&#8216;utf8mb4&#8217;);<\/p>\n<p>\/\/ Check for database connection errors<br \/>\nif ($conn->connect_error) {<br \/>\n    die(&#8216;Connection failed: &#8216; . htmlspecialchars($conn->connect_error));<br \/>\n}<\/p>\n<p>$result = null;<\/p>\n<p>if ($_SERVER[&#8216;REQUEST_METHOD&#8217;] == &#8216;POST&#8217;) {<br \/>\n    $grade = $conn->real_escape_string($_POST[&#8216;grade&#8217;]);<br \/>\n    $subject = $conn->real_escape_string($_POST[&#8216;subject&#8217;]);<br \/>\n    $chapter = $conn->real_escape_string($_POST[&#8216;chapter&#8217;]);<br \/>\n    $section = $conn->real_escape_string($_POST[&#8216;section&#8217;]);<\/p>\n<p>    $sql = &#8220;SELECT * FROM topics WHERE grade=&#8217;$grade&#8217; AND subject=&#8217;$subject&#8217; AND chapter=&#8217;$chapter&#8217; AND section=&#8217;$section'&#8221;;<br \/>\n    $result = $conn->query($sql);<\/p>\n<p>    \/\/ Check for query execution errors<br \/>\n    if (!$result) {<br \/>\n        die(&#8216;Query failed: &#8216; . htmlspecialchars($conn->error));<br \/>\n    }<br \/>\n} else {<br \/>\n    \/\/ Fetch the last 20 posts<br \/>\n    $sql = &#8216;SELECT * FROM topics ORDER BY created_at DESC LIMIT 20&#8217;;<br \/>\n    $result = $conn->query($sql);<\/p>\n<p>    \/\/ Check for query execution errors<br \/>\n    if (!$result) {<br \/>\n        die(&#8216;Query failed: &#8216; . htmlspecialchars($conn->error));<br \/>\n    }<br \/>\n}<br \/>\n?><\/p>\n<p><!DOCTYPE html><br \/>\n<html lang=\"ar\"><br \/>\n<head><br \/>\n    <meta charset=\"UTF-8\"><br \/>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\"><br \/>\n    <title>\u0634\u0631\u0648\u062d\u0627\u062a \u0648\u062d\u0644\u0648\u0644 \u0645\u0646\u0647\u0627\u062c \u0633\u0644\u0637\u0646\u0629 \u0639\u064f\u0645\u0627\u0646<\/title><\/p>\n<p>    <!-- Link to external CSS file -->\n    <link rel=\"stylesheet\" href=\"style.css\">\n<p>    <!-- Google AdSense --><br \/>\n    <script async src=\"https:\/\/pagead2.googlesyndication.com\/pagead\/js\/adsbygoogle.js?client=ca-pub-8177765238464378\" crossorigin=\"anonymous\"><\/script><br \/>\n<\/head><br \/>\n<body><\/p>\n<div class=\"container\">\n<h2>\u0634\u0631\u0648\u062d\u0627\u062a \u0648\u062d\u0644\u0648\u0644 \u0645\u0646\u0647\u0627\u062c \u0633\u0644\u0637\u0646\u0629 \u0639\u064f\u0645\u0627\u0646 \u0627\u0644\u0645\u0637\u0648\u0631 2024<\/h2>\n<form method=\"POST\" action=\"files.php\" class=\"search-form\">\n<div class=\"form-group\">\n                <label for=\"grade\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0635\u0641<\/label><br \/>\n                <select name=\"grade\" id=\"grade\" required onchange=\"showNextDropdown(this, 'subject')\"><option value=\"\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0635\u0641<\/option><?php\n                    $grades = [\"\u0627\u0644\u0635\u0641 \u0627\u0644\u0623\u0648\u0644\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u062b\u0627\u0646\u064a\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u062b\u0627\u0644\u062b\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u0631\u0627\u0628\u0639\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u062e\u0627\u0645\u0633\", \n                                \"\u0627\u0644\u0635\u0641 \u0627\u0644\u0633\u0627\u062f\u0633\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u0633\u0627\u0628\u0639\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u062b\u0627\u0645\u0646\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u062a\u0627\u0633\u0639\", \n                                \"\u0627\u0644\u0635\u0641 \u0627\u0644\u0639\u0627\u0634\u0631\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u062d\u0627\u062f\u064a \u0639\u0634\u0631\", \"\u0627\u0644\u0635\u0641 \u0627\u0644\u062b\u0627\u0646\u064a \u0639\u0634\u0631\"];\n                    foreach ($grades as $grade_option) {\n                        echo \"<option value='\" . htmlspecialchars($grade_option) . \"'>&#8221; . htmlspecialchars($grade_option) . &#8220;<\/option>&#8220;;<br \/>\n                    }<br \/>\n                    ?><br \/>\n                <\/select>\n            <\/div>\n<div class=\"form-group hidden\" id=\"subject\">\n                <label for=\"subject\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0645\u0627\u062f\u0629<\/label><br \/>\n                <select name=\"subject\" id=\"subject\" required onchange=\"showNextDropdown(this, 'chapter')\"><option value=\"\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0645\u0627\u062f\u0629<\/option><?php\n                    $subjects = [\"\u0644\u063a\u0629 \u0639\u0631\u0628\u064a\u0629\", \"\u062a\u0631\u0628\u064a\u0629 \u0625\u0633\u0644\u0627\u0645\u064a\u0629\", \"\u0644\u063a\u0629 \u0627\u0646\u062c\u0644\u064a\u0632\u064a\u0629\", \"\u0639\u0644\u0648\u0645\", \"\u0631\u064a\u0627\u0636\u064a\u0627\u062a\", \n                                 \"\u062f. \u0627\u062c\u062a\u0645\u0627\u0639\u064a\u0629\", \"\u0645\u0647\u0627\u0631\u0627\u062a \u062d\u064a\u0627\u062a\u064a\u0629\", \"\u062a\u0642\u0646\u064a\u0629 \u0627\u0644\u0645\u0639\u0644\u0648\u0645\u0627\u062a\", \"\u0643\u064a\u0645\u064a\u0627\u0621\", \n                                 \"\u0641\u064a\u0632\u064a\u0627\u0621\", \"\u0623\u062d\u064a\u0627\u0621\", \"\u0631\u064a\u0627\u0636\u064a\u0627\u062a \u0623\u0633\u0627\u0633\u064a\u0629\", \"\u0631\u064a\u0627\u0636\u064a\u0627\u062a \u0645\u062a\u0642\u062f\u0645\u0629\", \"\u062c\u063a\u0631\u0627\u0641\u064a\u0627\"];\n                    foreach ($subjects as $subject_option) {\n                        echo \"<option value='\" . htmlspecialchars($subject_option) . \"'>&#8221; . htmlspecialchars($subject_option) . &#8220;<\/option>&#8220;;<br \/>\n                    }<br \/>\n                    ?><br \/>\n                <\/select>\n            <\/div>\n<div class=\"form-group hidden\" id=\"chapter\">\n                <label for=\"chapter\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0641\u0635\u0644<\/label><br \/>\n                <select name=\"chapter\" id=\"chapter\" required onchange=\"showNextDropdown(this, 'section')\"><option value=\"\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0641\u0635\u0644<\/option><option value=\"\u0627\u0644\u0641\u0635\u0644 \u0627\u0644\u0623\u0648\u0644\">\u0627\u0644\u0641\u0635\u0644 \u0627\u0644\u0623\u0648\u0644<\/option><option value=\"\u0627\u0644\u0641\u0635\u0644 \u0627\u0644\u062b\u0627\u0646\u064a\">\u0627\u0644\u0641\u0635\u0644 \u0627\u0644\u062b\u0627\u0646\u064a<\/option><\/select>\n            <\/div>\n<div class=\"form-group hidden\" id=\"section\">\n                <label for=\"section\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0642\u0633\u0645<\/label><br \/>\n                <select name=\"section\" id=\"section\" required><option value=\"\">\u0627\u062e\u062a\u0631 \u0627\u0644\u0642\u0633\u0645<\/option><option value=\"\u0627\u0644\u0634\u0631\u062d\">\u0627\u0644\u0634\u0631\u062d<\/option><option value=\"\u062d\u0644\u0648\u0644\">\u062d\u0644\u0648\u0644<\/option><option value=\"\u0627\u0644\u0627\u062e\u062a\u0628\u0627\u0631\u0627\u062a\">\u0627\u0644\u0627\u062e\u062a\u0628\u0627\u0631\u0627\u062a<\/option><\/select>\n            <\/div>\n<p>            <button type=\"submit\">\u0627\u0628\u062d\u062b<\/button><br \/>\n        <\/form>\n<h3>\u0622\u062e\u0631 20 \u0645\u0634\u0627\u0631\u0643\u0629<\/h3>\n<p> <!-- Added a heading for the last 20 posts --><\/p>\n<p>        <?php if ($result &#038;&#038; $result->num_rows > 0) : ?><\/p>\n<div class=\"button-container\">\n                <?php while ($row = $result->fetch_assoc()) : ?><br \/>\n                    <a class=\"nice-button\" href=\"waiting.php?redirect_url=<?= urlencode(htmlspecialchars($row['url'])) ?>&#8220;><\/p>\n<div><?= htmlspecialchars($row['title']) ?><\/div>\n<p>                    <\/a><br \/>\n                <?php endwhile; ?>\n            <\/div>\n<p>        <?php else : ?><\/p>\n<p>\u0644\u0645 \u064a\u062a\u0645 \u0627\u0644\u0639\u062b\u0648\u0631 \u0639\u0644\u0649 \u0646\u062a\u0627\u0626\u062c.<\/p>\n<p>        <?php endif; ?>\n    <\/div>\n<p>    <!-- Link to external JavaScript file --><br \/>\n    <script src=\"scripts.js\"><\/script><br \/>\n<\/body><br \/>\n<\/html><\/p>\n","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-4118","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=\/wp\/v2\/pages\/4118","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4118"}],"version-history":[{"count":2,"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=\/wp\/v2\/pages\/4118\/revisions"}],"predecessor-version":[{"id":4121,"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=\/wp\/v2\/pages\/4118\/revisions\/4121"}],"wp:attachment":[{"href":"https:\/\/shneler.com\/oman\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4118"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}