























{"id":2820,"date":"2025-12-15T20:43:24","date_gmt":"2025-12-15T12:43:24","guid":{"rendered":"https:\/\/www.hkceea.com\/?page_id=2820"},"modified":"2025-12-15T21:18:03","modified_gmt":"2025-12-15T13:18:03","slug":"awards_query_2","status":"publish","type":"page","link":"https:\/\/www.hkceea.com\/?page_id=2820","title":{"rendered":"\u5f97\u734e\u67e5\u8a62"},"content":{"rendered":"\r\n<div class=\"query-code-container\">\r\n\r\n    <form id=\"query-award-form\" method=\"post\">\r\n        <input type=\"hidden\" name=\"awards_query_nonce\" value=\"f7ec20f29a\">\r\n        <input type=\"hidden\" name=\"belong_page_id\" value=\"0\">\r\n        <div class=\"form-group\">\r\n            <label for=\"query_name\">\u59d3\u540d:<\/label>\r\n            <input\r\n                type=\"text\"\r\n                name=\"query_name\"\r\n                id=\"query_name\"\r\n                placeholder=\"\u8acb\u8f38\u5165\u59d3\u540d\"\r\n                required\r\n                maxlength=\"50\"\r\n            \/>\r\n        <\/div>\r\n        <div class=\"form-group\">\r\n            <label for=\"query_school\">\u5b78\u6821:<\/label>\r\n            <input\r\n                type=\"text\"\r\n                name=\"query_school\"\r\n                id=\"query_school\"\r\n                placeholder=\"\u8acb\u8f38\u5165\u5b78\u6821\u540d\u7a31\"\r\n                required\r\n                maxlength=\"100\"\r\n            \/>\r\n        <\/div>\r\n                <div class=\"form-group\">\r\n    <label for=\"query_grade\">\u5e74\u7d1a:<\/label>\r\n    <select name=\"query_grade\" id=\"query_grade\" required>\r\n        <option value=\"\">\u8acb\u9078\u64c7\u5e74\u7d1a<\/option>\r\n        <option value=\"\u5c0f\u5b78\u4e00\u5e74\u7d1a\">\u5c0f\u5b78\u4e00\u5e74\u7d1a<\/option><option value=\"\u5c0f\u5b78\u4e8c\u5e74\u7d1a\">\u5c0f\u5b78\u4e8c\u5e74\u7d1a<\/option><option value=\"\u5c0f\u5b78\u4e09\u5e74\u7d1a\">\u5c0f\u5b78\u4e09\u5e74\u7d1a<\/option><option value=\"\u5c0f\u5b78\u56db\u5e74\u7d1a\">\u5c0f\u5b78\u56db\u5e74\u7d1a<\/option><option value=\"\u5c0f\u5b78\u4e94\u5e74\u7d1a\">\u5c0f\u5b78\u4e94\u5e74\u7d1a<\/option><option value=\"\u5c0f\u5b78\u516d\u5e74\u7d1a\">\u5c0f\u5b78\u516d\u5e74\u7d1a<\/option><option value=\"\u4e2d\u5b78\u4e00\u5e74\u7d1a\">\u4e2d\u5b78\u4e00\u5e74\u7d1a<\/option><option value=\"\u4e2d\u5b78\u4e8c\u5e74\u7d1a\">\u4e2d\u5b78\u4e8c\u5e74\u7d1a<\/option><option value=\"\u4e2d\u5b78\u4e09\u5e74\u7d1a\">\u4e2d\u5b78\u4e09\u5e74\u7d1a<\/option><option value=\"\u4e2d\u5b78\u56db\u5e74\u7d1a\">\u4e2d\u5b78\u56db\u5e74\u7d1a<\/option><option value=\"\u4e2d\u5b78\u4e94\u5e74\u7d1a\">\u4e2d\u5b78\u4e94\u5e74\u7d1a<\/option><option value=\"\u4e2d\u5b78\u516d\u5e74\u7d1a\">\u4e2d\u5b78\u516d\u5e74\u7d1a<\/option>    <\/select>\r\n<\/div>\r\n\r\n    <div class=\"form-submit-wrapper\">\r\n        <button type=\"submit\">\u67e5\u8a62<\/button>\r\n    <\/div>\r\n    <\/form>\r\n\r\n    <div id=\"query-result\" class=\"query-result\"><\/div>\r\n<\/div>\r\n\r\n<script>\r\njQuery(document).ready(function($) {\r\n    $('#query-award-form').on('submit', function(e) {\r\n        e.preventDefault();\r\n\r\n        const resultDiv = $('#query-result');\r\n\r\n        const name = $('#query_name').length ? $('#query_name').val().trim() : '';\r\n        const school = $('#query_school').length ? $('#query_school').val().trim() : '';\r\n        const grade = $('#query_grade').length ? $('#query_grade').val().trim() : '';\r\n        const admission_num = $('#query_admission_num').length ? $('#query_admission_num').val().trim() : '';\r\n        if (!name || !grade)  {\r\n            resultDiv.removeClass().addClass('query-result error')\r\n                     .text('\u8acb\u586b\u5beb\u6240\u6709\u6b04\u4f4d')\r\n                     .show();\r\n            return;\r\n        }\r\n\r\n        let formData = $(this).serialize();\r\n        formData += '&action=awards_query_by_info';\r\n\r\n        resultDiv.removeClass().addClass('query-result')\r\n                 .text('\u67e5\u8a62\u4e2d...')\r\n                 .show();\r\n\r\n        $.ajax({\r\n            url: sm_ajax_object.ajax_url,\r\n            method: 'POST',\r\n            data: formData,\r\n            success: function(res) {\r\n                if (res.success && Array.isArray(res.data?.data)) {\r\n                    const results = res.data.data;\r\n                    let html = '<h3>\u67e5\u8a62\u6210\u529f<\/h3>';\r\n                    html += '<div class=\"awards-records\">';\r\n\r\n                    results.forEach(function(item) {\r\n                        const name   = $('<div>').text(item.display_name).html();\r\n                        const school = $('<div>').text(item.school).html();\r\n                        const grade  = $('<div>').text(item.grade).html();\r\n                        const award  = $('<div>').text(item.award_display).html();\r\n                        const award_num = item.awards_search_num || '';\r\n                        const awards_status = parseInt(item.awards_status, 10); \/\/ \u8f49\u70ba\u6578\u5b57\r\n\r\n                        \/\/ \u2705 \u53ea\u6709 awards_status >= 2 \u624d\u986f\u793a\u4e0b\u8f09\u6309\u9215\r\n                        let downloadBtn = '';\r\n                        if (awards_status >= 2 && award_num) {\r\n                            downloadBtn = `<p>\r\n                                <a href=\"#\" class=\"download-certificate-btn button button-secondary\" \r\n                                data-award-num=\"${award_num}\"\r\n                                style=\"color: #d00; font-size: 24px; font-weight: bold;\">\r\n                                \u4e0b\u8f09\u8b49\u66f8                                <\/a>\r\n                            <\/p>`;\r\n                        }\r\n\r\n                        html += `\r\n                            <div class=\"award-record\">\r\n                                <p><strong>\u59d3\u540d:<\/strong> ${name}<\/p>\r\n                                <p><strong>\u5b78\u6821:<\/strong> ${school}<\/p>\r\n                                <p><strong>\u5e74\u7d1a:<\/strong> ${grade}<\/p>\r\n                                <p><strong>\u7372\u734e\u60c5\u6cc1:<\/strong> ${award}<\/p>\r\n                                ${downloadBtn}\r\n                            <\/div>\r\n                            <hr style=\"margin: 12px 0; border-color: #eee;\">\r\n                        `;\r\n                    });\r\n\r\n                    html += '<\/div>';\r\n                    resultDiv.removeClass().addClass('query-result success').html(html);\r\n                } else {\r\n                    const msg = res.data?.message || '\u672a\u627e\u5230\u76f8\u95dc\u8a18\u9304';\r\n                    resultDiv.removeClass().addClass('query-result error').text(msg);\r\n                }\r\n            },\r\n            error: function() {\r\n                resultDiv.removeClass().addClass('query-result error')\r\n                         .text('\u7db2\u7d61\u932f\u8aa4\uff0c\u8acb\u91cd\u8a66');\r\n            }\r\n        });\r\n    });\r\n\r\n        $(document).on('click', '.download-certificate-btn', function(e) {\r\n            e.preventDefault();\r\n            const awardNum = $(this).data('award-num');\r\n            if (!awardNum) return;\r\n\r\n            \/\/ \u76f4\u63a5\u62fc\u63a5\u67e5\u8be2\u53c2\u6570 URL\r\n            const downloadUrl = window.location.origin + '\/?download_cert=' + encodeURIComponent(awardNum);\r\n            window.open(downloadUrl, '_blank');\r\n        });\r\n});\r\n<\/script>\r\n\r\n<style>\r\n.form-submit-wrapper {\r\n    text-align: center;\r\n    margin-top: 20px;\r\n}\r\n.query-code-container .form-group {\r\n    margin-bottom: 15px;\r\n}\r\n.query-code-container label {\r\n    display: block;\r\n    margin-bottom: 5px;\r\n    font-weight: bold;\r\n}\r\n.query-code-container input,\r\n.query-code-container select {\r\n    width: 100%;\r\n    padding: 8px;\r\n    border: 1px solid #ccc;\r\n    border-radius: 4px;\r\n    box-sizing: border-box;\r\n}\r\n.query-code-container button {\r\n    padding: 10px 20px;\r\n    background-color: #db462b;\r\n    color: white;\r\n    border: none;\r\n    border-radius: 4px;\r\n    cursor: pointer;\r\n}\r\n.query-code-container button:hover {\r\n    background-color: #c7290dff;\r\n}\r\n.query-result {\r\n    margin-top: 20px;\r\n    padding: 10px;\r\n    border-radius: 4px;\r\n}\r\n.query-result.success {\r\n    background-color: #d4edda;\r\n    color: #155724;\r\n    border: 1px solid #c3e6cb;\r\n}\r\n.query-result.error {\r\n    background-color: #f8d7da;\r\n    color: #721c24;\r\n    border: 1px solid #f5c6cb;\r\n}\r\n<\/style>\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":{"_acf_changed":false,"footnotes":""},"class_list":["post-2820","page","type-page","status-publish","hentry"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.0 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>\u5f97\u734e\u67e5\u8a62 - \u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.hkceea.com\/?page_id=2820\" \/>\n<meta property=\"og:locale\" content=\"zh_HK\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u5f97\u734e\u67e5\u8a62 - \u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.hkceea.com\/?page_id=2820\" \/>\n<meta property=\"og:site_name\" content=\"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9\" \/>\n<meta property=\"article:modified_time\" content=\"2025-12-15T13:18:03+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u9810\u8a08\u95b1\u8b80\u6642\u9593\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 \u5206\u9418\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.hkceea.com\/?page_id=2820\",\"url\":\"https:\/\/www.hkceea.com\/?page_id=2820\",\"name\":\"\u5f97\u734e\u67e5\u8a62 - \u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9\",\"isPartOf\":{\"@id\":\"https:\/\/www.hkceea.com\/#website\"},\"datePublished\":\"2025-12-15T12:43:24+00:00\",\"dateModified\":\"2025-12-15T13:18:03+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.hkceea.com\/?page_id=2820#breadcrumb\"},\"inLanguage\":\"zh-HK\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.hkceea.com\/?page_id=2820\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.hkceea.com\/?page_id=2820#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.hkceea.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u5f97\u734e\u67e5\u8a62\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.hkceea.com\/#website\",\"url\":\"https:\/\/www.hkceea.com\/\",\"name\":\"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.hkceea.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.hkceea.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"zh-HK\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.hkceea.com\/#organization\",\"name\":\"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703\",\"url\":\"https:\/\/www.hkceea.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-HK\",\"@id\":\"https:\/\/www.hkceea.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.hkceea.com\/wp-content\/uploads\/2025\/10\/logo.png\",\"contentUrl\":\"https:\/\/www.hkceea.com\/wp-content\/uploads\/2025\/10\/logo.png\",\"width\":1116,\"height\":213,\"caption\":\"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703\"},\"image\":{\"@id\":\"https:\/\/www.hkceea.com\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"\u5f97\u734e\u67e5\u8a62 - \u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.hkceea.com\/?page_id=2820","og_locale":"zh_HK","og_type":"article","og_title":"\u5f97\u734e\u67e5\u8a62 - \u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9","og_url":"https:\/\/www.hkceea.com\/?page_id=2820","og_site_name":"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9","article_modified_time":"2025-12-15T13:18:03+00:00","twitter_card":"summary_large_image","twitter_misc":{"\u9810\u8a08\u95b1\u8b80\u6642\u9593":"1 \u5206\u9418"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.hkceea.com\/?page_id=2820","url":"https:\/\/www.hkceea.com\/?page_id=2820","name":"\u5f97\u734e\u67e5\u8a62 - \u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703-\u4e2d\u83ef\u300c\u82f1\u624d\u76c3\u300d\u5b98\u65b9\u7db2\u7ad9","isPartOf":{"@id":"https:\/\/www.hkceea.com\/#website"},"datePublished":"2025-12-15T12:43:24+00:00","dateModified":"2025-12-15T13:18:03+00:00","breadcrumb":{"@id":"https:\/\/www.hkceea.com\/?page_id=2820#breadcrumb"},"inLanguage":"zh-HK","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.hkceea.com\/?page_id=2820"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.hkceea.com\/?page_id=2820#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.hkceea.com\/"},{"@type":"ListItem","position":2,"name":"\u5f97\u734e\u67e5\u8a62"}]},{"@type":"WebSite","@id":"https:\/\/www.hkceea.com\/#website","url":"https:\/\/www.hkceea.com\/","name":"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703","description":"","publisher":{"@id":"https:\/\/www.hkceea.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.hkceea.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"zh-HK"},{"@type":"Organization","@id":"https:\/\/www.hkceea.com\/#organization","name":"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703","url":"https:\/\/www.hkceea.com\/","logo":{"@type":"ImageObject","inLanguage":"zh-HK","@id":"https:\/\/www.hkceea.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.hkceea.com\/wp-content\/uploads\/2025\/10\/logo.png","contentUrl":"https:\/\/www.hkceea.com\/wp-content\/uploads\/2025\/10\/logo.png","width":1116,"height":213,"caption":"\u4e2d\u83ef\u82f1\u624d\u6559\u80b2\u5354\u6703"},"image":{"@id":"https:\/\/www.hkceea.com\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.hkceea.com\/index.php?rest_route=\/wp\/v2\/pages\/2820","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.hkceea.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.hkceea.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.hkceea.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.hkceea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2820"}],"version-history":[{"count":2,"href":"https:\/\/www.hkceea.com\/index.php?rest_route=\/wp\/v2\/pages\/2820\/revisions"}],"predecessor-version":[{"id":2827,"href":"https:\/\/www.hkceea.com\/index.php?rest_route=\/wp\/v2\/pages\/2820\/revisions\/2827"}],"wp:attachment":[{"href":"https:\/\/www.hkceea.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2820"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}