{"id":6786,"date":"2025-02-14T16:46:12","date_gmt":"2025-02-14T16:46:12","guid":{"rendered":"https:\/\/thg-egypt.com\/?page_id=6786"},"modified":"2025-02-19T19:39:23","modified_gmt":"2025-02-19T19:39:23","slug":"tayseer-clinics","status":"publish","type":"page","link":"https:\/\/thg-egypt.com\/ar\/tayseer-clinics\/","title":{"rendered":"\u062c\u062f\u0648\u0644 \u0627\u0644\u0639\u064a\u0627\u062f\u0627\u062a \u0627\u0644\u062e\u0627\u0631\u062c\u064a\u0629 \u0644\u0645\u0633\u062a\u0634\u0641\u0649 \u0627\u0644\u062a\u064a\u0633\u064a\u0631 \u0627\u0644\u062f\u0648\u0644\u064a"},"content":{"rendered":"\n<!DOCTYPE html>\n<html lang=\"ar\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>\u062c\u062f\u0648\u0644 \u0627\u0644\u0639\u064a\u0627\u062f\u0627\u062a<\/title>\n    <script src=\"https:\/\/code.jquery.com\/jquery-3.6.0.min.js\"><\/script>\n    <script src=\"https:\/\/cdnjs.cloudflare.com\/ajax\/libs\/html2canvas\/1.4.1\/html2canvas.min.js\"><\/script>\n    <style>\n        body {\n            font-family: Arial, sans-serif;\n            text-align: center;\n            direction: rtl;\n            background-color: #f4f4f4;\n        }\n        .clinic-container {\n            max-width: 400px;\n            margin: auto;\n            background: white;\n            padding: 15px;\n            border-radius: 10px;\n            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);\n            margin-top: 30px;\n        }\n        select, button {\n            width: 90%;\n            padding: 10px;\n            margin: 8px 0;\n            font-size: 16px;\n            font-weight: bold;\n            text-align: center;\n            border-radius: 5px;\n        }\n        select {\n            display: block;\n            color: blue;\n            text-align: center;\n            border: 1px solid #ccc;\n        }\n        button {\n            background: #007BFF;\n            color: white;\n            border: none;\n            cursor: pointer;\n        }\n        button:hover {\n            background: #0056b3;\n        }\n        .clinic-table-container {\n            display: none;\n            max-width: 400px;\n            margin: auto;\n            margin-top: 20px;\n            background: white;\n            padding: 10px;\n            border-radius: 10px;\n            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);\n        }\n        table {\n            width: 100%;\n            border-collapse: collapse;\n        }\n        th, td {\n            border: 1px solid black;\n            padding: 10px;\n            font-size: 16px;\n            font-weight: bold;\n            text-align: center;\n        }\n        th {\n            background: #007BFF;\n            color: white;\n        }\n        td {\n            background: #f9f9f9;\n        }\n        #downloadBtn {\n            display: none;\n            width: 90%;\n            margin-top: 10px;\n            background: #28a745;\n        }\n        #downloadBtn:hover {\n            background: #218838;\n        }\n        .notice-container {\n            max-width: 400px;\n            margin: 20px auto;\n            padding: 15px;\n            background: #ffebcc;\n            color: #d35400;\n            font-weight: bold;\n            text-align: center;\n            border-radius: 10px;\n            box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);\n        }\n    <\/style>\n<\/head>\n<body>\n    <div class=\"clinic-container\">\n        <label for=\"specialty\">\u0627\u0644\u062a\u062e\u0635\u0635:<\/label>\n        <select id=\"specialty\">\n            <option value=\"\" disabled selected>&#8211; &#8211; &#8211; <\/option>\n        <\/select>\n        <label for=\"doctor\">\u0627\u0644\u0637\u0628\u064a\u0628:<\/label>\n        <select id=\"doctor\">\n            <option value=\"\" disabled selected>&#8211; &#8211; &#8211; <\/option>\n        <\/select>\n        <button onclick=\"filterTable()\">\u0639\u0631\u0636 \u0627\u0644\u062c\u062f\u0648\u0644<\/button>\n    <\/div>\n\n    <div id=\"tableContainer\" class=\"clinic-table-container\">\n        <table id=\"clinicTable\">\n            <thead>\n                <tr>\n                    <th>\u0627\u0644\u062a\u062e\u0635\u0635<\/th>\n                    <th>\u0627\u0644\u0637\u0628\u064a\u0628<\/th>\n                    <th>\u0627\u0644\u064a\u0648\u0645<\/th>\n                    <th>\u0627\u0644\u0633\u0627\u0639\u0629<\/th>\n                <\/tr>\n            <\/thead>\n            <tbody><\/tbody>\n        <\/table>\n        <button id=\"downloadBtn\" onclick=\"downloadTableAsImage()\">\ud83d\udcf7 \u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u062c\u062f\u0648\u0644 <\/button>\n    <\/div>\n\n    <div class=\"notice-container\">\n        \ud83d\udccc <b>\u062a\u0646\u0648\u064a\u0647 \u0647\u0627\u0645 \u0644\u0639\u0645\u0644\u0627\u0626\u0646\u0627 \u0627\u0644\u0643\u0631\u0627\u0645:<\/b><br>\n        \u062d\u0631\u0635\u064b\u0627 \u0639\u0644\u0649 \u062a\u0642\u062f\u064a\u0645 \u0623\u0641\u0636\u0644 \u062e\u062f\u0645\u0629 \u0637\u0628\u064a\u0629 \u0648\u062a\u062c\u0646\u0628 \u062a\u0623\u062e\u064a\u0631 \u0627\u0644\u062d\u062c\u0648\u0632\u0627\u062a\u060c \u064a\u064f\u0631\u062c\u0649 \u0627\u0644\u0627\u0644\u062a\u0632\u0627\u0645 \u0628\u0627\u0644\u0622\u062a\u064a \u0639\u0646\u062f \u0627\u0644\u062d\u062c\u0632 \u0641\u064a \u0627\u0644\u0639\u064a\u0627\u062f\u0627\u062a \u0627\u0644\u062e\u0627\u0631\u062c\u064a\u0629:<br>\n        \u2714 \u0644\u0644\u0628\u0627\u0644\u063a\u064a\u0646: \u0625\u062d\u0636\u0627\u0631 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0634\u062e\u0635\u064a\u0629.<br>\n        \u2714 \u0644\u0644\u0623\u0637\u0641\u0627\u0644: \u0625\u062d\u0636\u0627\u0631 \u0634\u0647\u0627\u062f\u0629 \u0627\u0644\u0645\u064a\u0644\u0627\u062f \u0627\u0644\u0645\u0631\u0641\u0642\u0629 \u0628\u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0642\u0648\u0645\u064a.<br>\n        <br>\n        \ud83d\udd39 \u0634\u0643\u0631\u064b\u0627 \u0644\u062a\u0641\u0647\u0645\u0643\u0645 \u0648\u062a\u0639\u0627\u0648\u0646\u0643\u0645. \ud83d\ude0a\n    <\/div>\n\n    <script>\n        let sheetId = \"1ZdvRGChxT1VedbjMrHlXu5EUm0sHPbR4Qe9ZRXv0Hwo\";\n        let apiKey = \"AIzaSyCTcAwam-z3leI4uFMG59tVIgCqwfhcx4M\";\n        let url = `https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/${sheetId}\/values\/A1:D?key=${apiKey}`;\n        let data = [];\n\n        fetch(url)\n            .then(response => response.json())\n            .then(result => {\n                data = result.values.slice(1);\n                let specialties = [...new Set(data.map(row => row[3]))];\n                specialties.forEach(specialty => {\n                    $(\"#specialty\").append(`<option value=\"${specialty}\">${specialty}<\/option>`);\n                });\n                updateDoctors();\n            });\n\n        function updateDoctors() {\n            let selectedSpecialty = $(\"#specialty\").val();\n            let doctors = [...new Set(data.filter(row => row[3] === selectedSpecialty).map(row => row[2]))];\n            $(\"#doctor\").empty().append(`<option value=\"\" disabled selected>\u0627\u062e\u062a\u0631 \u0627\u0644\u0637\u0628\u064a\u0628<\/option>`);\n            doctors.forEach(doctor => {\n                $(\"#doctor\").append(`<option value=\"${doctor}\">${doctor}<\/option>`);\n            });\n        }\n\n        $(\"#specialty\").change(updateDoctors);\n\n        function filterTable() {\n            let selectedSpecialty = $(\"#specialty\").val();\n            let selectedDoctor = $(\"#doctor\").val();\n            if (!selectedSpecialty || !selectedDoctor) {\n                alert(\"\u064a\u0631\u062c\u0649 \u0627\u062e\u062a\u064a\u0627\u0631 \u0627\u0644\u062a\u062e\u0635\u0635 \u0648\u0627\u0644\u0637\u0628\u064a\u0628!\");\n                return;\n            }\n            let filteredData = data.filter(row => row[3] === selectedSpecialty && row[2] === selectedDoctor);\n            $(\"#clinicTable tbody\").empty();\n            filteredData.forEach(row => {\n                $(\"#clinicTable tbody\").append(`<tr><td>${row[3]}<\/td><td>${row[2]}<\/td><td>${row[1]}<\/td><td>${row[0]}<\/td><\/tr>`);\n            });\n            $(\"#tableContainer\").fadeIn();\n            $(\"#downloadBtn\").fadeIn();\n        }\n\n        function downloadTableAsImage() {\n            html2canvas(document.querySelector(\"#tableContainer\")).then(canvas => {\n                let link = document.createElement(\"a\");\n                link.href = canvas.toDataURL(\"image\/png\");\n                link.download = \"clinic_schedule.png\";\n                link.click();\n            });\n        }\n    <\/script>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>\u062c\u062f\u0648\u0644 \u0627\u0644\u0639\u064a\u0627\u062f\u0627\u062a \u0627\u0644\u062a\u062e\u0635\u0635: &#8211; &#8211; &#8211; \u0627\u0644\u0637\u0628\u064a\u0628: &#8211; &#8211; &#8211; \u0639\u0631\u0636 \u0627\u0644\u062c\u062f\u0648\u0644 \u0627\u0644\u062a\u062e\u0635\u0635 \u0627\u0644\u0637\u0628\u064a\u0628 \u0627\u0644\u064a\u0648\u0645 \u0627\u0644\u0633\u0627\u0639\u0629 \ud83d\udcf7 \u062a\u062d\u0645\u064a\u0644 \u0627\u0644\u062c\u062f\u0648\u0644 \ud83d\udccc \u062a\u0646\u0648\u064a\u0647 \u0647\u0627\u0645 \u0644\u0639\u0645\u0644\u0627\u0626\u0646\u0627 \u0627\u0644\u0643\u0631\u0627\u0645: \u062d\u0631\u0635\u064b\u0627 \u0639\u0644\u0649 \u062a\u0642\u062f\u064a\u0645 \u0623\u0641\u0636\u0644 \u062e\u062f\u0645\u0629 \u0637\u0628\u064a\u0629 \u0648\u062a\u062c\u0646\u0628 \u062a\u0623\u062e\u064a\u0631 \u0627\u0644\u062d\u062c\u0648\u0632\u0627\u062a\u060c \u064a\u064f\u0631\u062c\u0649 \u0627\u0644\u0627\u0644\u062a\u0632\u0627\u0645 \u0628\u0627\u0644\u0622\u062a\u064a \u0639\u0646\u062f \u0627\u0644\u062d\u062c\u0632 \u0641\u064a \u0627\u0644\u0639\u064a\u0627\u062f\u0627\u062a \u0627\u0644\u062e\u0627\u0631\u062c\u064a\u0629: \u2714 \u0644\u0644\u0628\u0627\u0644\u063a\u064a\u0646: \u0625\u062d\u0636\u0627\u0631 \u0627\u0644\u0628\u0637\u0627\u0642\u0629 \u0627\u0644\u0634\u062e\u0635\u064a\u0629. \u2714 \u0644\u0644\u0623\u0637\u0641\u0627\u0644: \u0625\u062d\u0636\u0627\u0631 \u0634\u0647\u0627\u062f\u0629 \u0627\u0644\u0645\u064a\u0644\u0627\u062f \u0627\u0644\u0645\u0631\u0641\u0642\u0629 \u0628\u0627\u0644\u0631\u0642\u0645 \u0627\u0644\u0642\u0648\u0645\u064a. \ud83d\udd39&#8230;<\/p>","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-6786","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/pages\/6786","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/comments?post=6786"}],"version-history":[{"count":59,"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/pages\/6786\/revisions"}],"predecessor-version":[{"id":6856,"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/pages\/6786\/revisions\/6856"}],"wp:attachment":[{"href":"https:\/\/thg-egypt.com\/ar\/wp-json\/wp\/v2\/media?parent=6786"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}