From d5ebf432e79b3ea59bc239fa1538863573ea919f Mon Sep 17 00:00:00 2001 From: {{ouyangyanhuo} <{{ouyangyanhuo@vip.qq.com}}> Date: Thu, 15 Jul 2021 18:48:15 +0800 Subject: [PATCH] Version1.6 --- LICENSE | 402 +- Plugin.php | 236 + README.md | 57 +- TUi.php | 128 - backup.php => admin/backup.php | 9 +- category.php => admin/category.php | 4 - common-js.php => admin/common-js.php | 34 +- admin/common.php | 58 + copyright.php => admin/copyright.php | 12 +- admin/custom-fields-js.php | 44 + admin/custom-fields.php | 73 + admin/editor-js.php | 353 + admin/extending.php | 13 + admin/file-upload-js.php | 209 + admin/file-upload.php | 27 + footer.php => admin/footer.php | 0 admin/form-js.php | 26 + index.php => admin/index.php | 449 +- login.php => admin/login.php | 179 +- .../manage-categories.php | 6 +- .../manage-comments.php | 6 +- manage-medias.php => admin/manage-medias.php | 7 +- manage-pages.php => admin/manage-pages.php | 9 +- manage-posts.php => admin/manage-posts.php | 3 - manage-tags.php => admin/manage-tags.php | 8 +- manage-users.php => admin/manage-users.php | 6 +- media.php => admin/media.php | 11 +- admin/menu.php | 117 + .../options-discussion.php | 4 - .../options-general.php | 4 - .../options-permalink.php | 5 - .../options-plugin.php | 10 +- .../options-reading.php | 6 +- options-theme.php => admin/options-theme.php | 4 - admin/page-title.php | 8 + plugins.php => admin/plugins.php | 11 +- profile.php => admin/profile.php | 8 +- register.php => admin/register.php | 5 +- admin/table-js.php | 18 + theme-editor.php => admin/theme-editor.php | 8 +- themes.php => admin/themes.php | 7 +- upgrade.php => admin/upgrade.php | 6 +- user.php => admin/user.php | 5 +- welcome.php => admin/welcome.php | 7 +- admin/write-js.php | 276 + write-page.php => admin/write-page.php | 17 +- write-post.php => admin/write-post.php | 22 +- admin_js/Moxie.swf | Bin 0 -> 29910 bytes admin_js/diff.js | 1 + admin_js/html5shiv.js | 1 + admin_js/html5shiv.min.js | 5 + admin_js/hyperdown.js | 1 + admin_js/hyperdown.min.js | 34 + admin_js/jquery-ui.js | 16 + admin_js/jquery-ui.min.js | 154 + admin_js/jquery.js | 25 + admin_js/jquery.min.js | 173 + admin_js/moxie.js | 1 + admin_js/moxie.min.js | 198 + admin_js/pagedown-extra.js | 1 + admin_js/pagedown-extra.min.js | 22 + admin_js/pagedown.js | 1 + admin_js/pagedown.min.js | 74 + admin_js/plupload.js | 1 + admin_js/plupload.min.js | 31 + admin_js/respond.js | 7 + admin_js/respond.min.js | 9 + admin_js/timepicker.js | 4 + admin_js/tokeninput.js | 1 + admin_js/tokeninput.min.js | 17 + admin_js/typecho.js | 55 + admin_js/typecho.min.js | 31 + assets/css/login.css | 100 + assets/css/style.min.css | 6 + assets/css/style.scss | 20807 ++++++++++++++++ assets/css/vendor.bundle.base.css | 116 - {img => assets/images}/circle.png | Bin {img => assets/images}/circle.svg | 0 assets/images/favicon.png | Bin 0 -> 6349 bytes assets/images/logo-mini.svg | 41 + assets/images/logo.svg | 90 + assets/img/ajax-loader.gif | Bin 0 -> 847 bytes assets/img/editor.png | Bin 0 -> 2567 bytes assets/img/editor@2x.png | Bin 0 -> 6501 bytes assets/img/icons-2x-s481937020b.png | Bin 0 -> 4809 bytes assets/img/icons-s0c4f1c5ae6.png | Bin 0 -> 2039 bytes assets/img/noscreen.png | Bin 0 -> 1187 bytes assets/img/typecho-logo.svg | 10 + assets/js/hoverable-collapse.min.js | 1 + assets/js/misc.min.js | 13 + assets/js/off-canvas.min.js | 1 + assets/logo/typecho-logo-dark.png | Bin 0 -> 3591 bytes assets/logo/typecho-logo.png | Bin 0 -> 3776 bytes assets/skin/BlueSkyAndMountains.css | 53 + assets/skin/Green.css | 34 + assets/vendors/js/vendor.bundle.base.min.js | 385 + css/grid.css | 1 - css/normalize.css | 1 - css/style.css | 11 - header.php | 38 - menu.php | 47 - var/Widget/Menu.php | 350 + 102 files changed, 24819 insertions(+), 1066 deletions(-) create mode 100644 Plugin.php delete mode 100644 TUi.php rename backup.php => admin/backup.php (87%) rename category.php => admin/category.php (96%) rename common-js.php => admin/common-js.php (67%) create mode 100644 admin/common.php rename copyright.php => admin/copyright.php (99%) create mode 100644 admin/custom-fields-js.php create mode 100644 admin/custom-fields.php create mode 100644 admin/editor-js.php create mode 100644 admin/extending.php create mode 100644 admin/file-upload-js.php create mode 100644 admin/file-upload.php rename footer.php => admin/footer.php (100%) create mode 100644 admin/form-js.php rename index.php => admin/index.php (90%) rename login.php => admin/login.php (76%) rename manage-categories.php => admin/manage-categories.php (99%) rename manage-comments.php => admin/manage-comments.php (99%) rename manage-medias.php => admin/manage-medias.php (99%) rename manage-pages.php => admin/manage-pages.php (98%) rename manage-posts.php => admin/manage-posts.php (99%) rename manage-tags.php => admin/manage-tags.php (98%) rename manage-users.php => admin/manage-users.php (99%) rename media.php => admin/media.php (95%) create mode 100644 admin/menu.php rename options-discussion.php => admin/options-discussion.php (96%) rename options-general.php => admin/options-general.php (96%) rename options-permalink.php => admin/options-permalink.php (96%) rename options-plugin.php => admin/options-plugin.php (89%) rename options-reading.php => admin/options-reading.php (97%) rename options-theme.php => admin/options-theme.php (98%) create mode 100644 admin/page-title.php rename plugins.php => admin/plugins.php (98%) rename profile.php => admin/profile.php (98%) rename register.php => admin/register.php (99%) create mode 100644 admin/table-js.php rename theme-editor.php => admin/theme-editor.php (98%) rename themes.php => admin/themes.php (98%) rename upgrade.php => admin/upgrade.php (97%) rename user.php => admin/user.php (95%) rename welcome.php => admin/welcome.php (97%) create mode 100644 admin/write-js.php rename write-page.php => admin/write-page.php (92%) rename write-post.php => admin/write-post.php (95%) create mode 100644 admin_js/Moxie.swf create mode 100644 admin_js/diff.js create mode 100644 admin_js/html5shiv.js create mode 100644 admin_js/html5shiv.min.js create mode 100644 admin_js/hyperdown.js create mode 100644 admin_js/hyperdown.min.js create mode 100644 admin_js/jquery-ui.js create mode 100644 admin_js/jquery-ui.min.js create mode 100644 admin_js/jquery.js create mode 100644 admin_js/jquery.min.js create mode 100644 admin_js/moxie.js create mode 100644 admin_js/moxie.min.js create mode 100644 admin_js/pagedown-extra.js create mode 100644 admin_js/pagedown-extra.min.js create mode 100644 admin_js/pagedown.js create mode 100644 admin_js/pagedown.min.js create mode 100644 admin_js/plupload.js create mode 100644 admin_js/plupload.min.js create mode 100644 admin_js/respond.js create mode 100644 admin_js/respond.min.js create mode 100644 admin_js/timepicker.js create mode 100644 admin_js/tokeninput.js create mode 100644 admin_js/tokeninput.min.js create mode 100644 admin_js/typecho.js create mode 100644 admin_js/typecho.min.js create mode 100644 assets/css/login.css create mode 100644 assets/css/style.min.css create mode 100644 assets/css/style.scss delete mode 100644 assets/css/vendor.bundle.base.css rename {img => assets/images}/circle.png (100%) rename {img => assets/images}/circle.svg (100%) create mode 100644 assets/images/favicon.png create mode 100644 assets/images/logo-mini.svg create mode 100644 assets/images/logo.svg create mode 100644 assets/img/ajax-loader.gif create mode 100644 assets/img/editor.png create mode 100644 assets/img/editor@2x.png create mode 100644 assets/img/icons-2x-s481937020b.png create mode 100644 assets/img/icons-s0c4f1c5ae6.png create mode 100644 assets/img/noscreen.png create mode 100644 assets/img/typecho-logo.svg create mode 100644 assets/js/hoverable-collapse.min.js create mode 100644 assets/js/misc.min.js create mode 100644 assets/js/off-canvas.min.js create mode 100644 assets/logo/typecho-logo-dark.png create mode 100644 assets/logo/typecho-logo.png create mode 100644 assets/skin/BlueSkyAndMountains.css create mode 100644 assets/skin/Green.css create mode 100644 assets/vendors/js/vendor.bundle.base.min.js delete mode 100644 css/grid.css delete mode 100644 css/normalize.css delete mode 100644 css/style.css delete mode 100644 header.php delete mode 100644 menu.php create mode 100644 var/Widget/Menu.php diff --git a/LICENSE b/LICENSE index 261eeb9..29f81d8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,201 +1,201 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/Plugin.php b/Plugin.php new file mode 100644 index 0000000..d783321 --- /dev/null +++ b/Plugin.php @@ -0,0 +1,236 @@ +header_2000 = array('AdminMD_Plugin', 'renderHeader'); + Typecho_Plugin::factory('admin/footer.php')->end_2000 = array('AdminMD_Plugin', 'renderFooter'); + if(file_exists("var/Widget/Menu.php")){ + //挂载menu.php + rename("var/Widget/Menu.php", "var/Widget/Menu.php.bak"); + copy("usr/plugins/AdminMD/var/Widget/Menu.php", "var/Widget/Menu.php"); + } + + + $admin_files = self::readdir($plugin_path.'/admin/'); + self::setFileMap($admin_files); + + foreach ($admin_files as $tmp_file){ + $tmp_file_path = "usr/plugins/AdminMD/admin/".$tmp_file; + $target_file_path = "admin/".$tmp_file; + $target_file_bak = "admin/".$tmp_file.".bak"; + + if(file_exists($target_file_path)){ + //挂载 + rename($target_file_path, $target_file_bak); + copy($tmp_file_path, $target_file_path); + } + } + + } + + /** + * 禁用插件方法,如果禁用失败,直接抛出异常 + * + * @static + * @access public + * @return void + * @throws Typecho_Plugin_Exception + */ + public static function deactivate() + { + //还原Menu.php + if(file_exists("var/Widget/Menu.php.bak")){ + unlink("var/Widget/Menu.php"); + rename("var/Widget/Menu.php.bak", "var/Widget/Menu.php"); + } + $plugin_path = dirname(__FILE__); + + $admin_files = self::readdir($plugin_path.'/admin/'); + + foreach ($admin_files as $tmp_file){ + $target_file_path = "admin/".$tmp_file; + $target_file_bak = "admin/".$tmp_file.".bak"; + + if(file_exists($target_file_bak)){ + unlink($target_file_path); + rename($target_file_bak, $target_file_path); + } + } + } + + /** + * 获取插件配置面板 + * + * @access public + * @param Typecho_Widget_Helper_Form $form 配置面板 + * @return void + */ + public static function config(Typecho_Widget_Helper_Form $form) + { + + ?> + + pluginUrl . '/AdminMD/'; + $zz1 = '
小橙汁 倾力运作 运行版本 %s (%s)', $options->software, $prefixVersion); ?>
-小橙汁 倾力运作 运行版本 %s (%s)', $options->software, $prefixVersion); ?>
+render(); ?> | +render(); ?> | +||
+ + + | ++ + + | ++ + + | ++ + | +
+ + + | ++ + + | ++ + + | ++ + | +
日期 | -文章标题 | -
---|
日期 | -昵称及评论内容 | -
---|
日期 | +文章标题 | +
---|
日期 | +昵称及评论内容 | +
---|
");a=a.replace(/\n/g,"
");return a.match(/^\s*$/)?"":"
"+a+"
"};l.prototype.parseFootnote=function(a,c){c=this.footnotes.indexOf(c[1]);0<=c&&(a=a.slice(0),a[0]=a[0].replace(/^\[\^((?:[^\]]|\]|\[)+?)\]:/,""),this.footnotes[c]=a);return""};l.prototype.parseDefinition= +function(){return""};l.prototype.parseHtml=function(a,c){a=a.map(function(b){return function(e){return b.parseInline(e,null!=b.specialWhiteList[c]?b.specialWhiteList[c]:"")}}(this));return a.join("\n")};l.prototype.cleanUrl=function(a){var c;(c=a.match(/^\s*((http|https|ftp|mailto):[x80-xff_a-z0-9-\.\/%#!@\?\+=~\|,&\(\)]+)/i))&&c[1];return(c=a.match(/^\s*([x80-xff_a-z0-9-\.\/%#!@\?\+=~\|,&]+)/i))?c[1]:"#"};l.prototype.escapeBracket=function(a){return x(["\\[","\\]","\\(","\\)"],["[","]","(",")"], +a)};l.prototype.startBlock=function(a,c,b){null==b&&(b=null);this.pos+=1;this.current=a;this.blocks.push([a,c,c,b]);return this};l.prototype.endBlock=function(){this.current="normal";return this};l.prototype.isBlock=function(a,c){null==c&&(c=null);return this.current===a&&(null===c?!0:this.blocks[this.pos][3]===c)};l.prototype.getBlock=function(){return null!=this.blocks[this.pos]?this.blocks[this.pos]:null};l.prototype.setBlock=function(a,c){null==a&&(a=null);null==c&&(c=null);null!==a&&(this.blocks[this.pos][2]= +a);null!==c&&(this.blocks[this.pos][3]=c);return this};l.prototype.backBlock=function(a,c,b){null==b&&(b=null);if(0>this.pos)return this.startBlock(c,0,b);var e=this.blocks[this.pos][2];this.blocks[this.pos][2]=e-a;a=[c,e-a+1,e,b];this.blocks[this.pos][1]<=this.blocks[this.pos][2]?(this.pos+=1,this.blocks.push(a)):this.blocks[this.pos]=a;this.current=c;return this};l.prototype.combineBlock=function(){if(1>this.pos)return this;var a=this.blocks[this.pos-1].slice(0);var c=this.blocks[this.pos].slice(0); +a[2]=c[2];this.blocks[this.pos-1]=a;this.current=a[0];this.blocks=this.blocks.slice(0,-1);--this.pos;return this};return l}();"undefined"!==typeof module&&null!==module?module.exports=D:"undefined"!==typeof window&&null!==window&&(window.HyperDown=D)}).call(this); diff --git a/admin_js/jquery-ui.js b/admin_js/jquery-ui.js new file mode 100644 index 0000000..e24a205 --- /dev/null +++ b/admin_js/jquery-ui.js @@ -0,0 +1,16 @@ +/* jQuery UI - v1.10.3 - 2013-10-16 +* http://jqueryui.com +* Includes: jquery.ui.core.js, jquery.ui.widget.js, jquery.ui.mouse.js, jquery.ui.datepicker.js, jquery.ui.slider.js, jquery.ui.effect.js, jquery.ui.effect-highlight.js +* Copyright 2013 jQuery Foundation and other contributors; Licensed MIT */ +(function(b,f){var a=0,e=/^ui-id-\d+$/;b.ui=b.ui||{};b.extend(b.ui,{version:"1.10.3",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});b.fn.extend({focus:(function(g){return function(h,i){return typeof h==="number"?this.each(function(){var j=this;setTimeout(function(){b(j).focus();if(i){i.call(j)}},h)}):g.apply(this,arguments)}})(b.fn.focus),scrollParent:function(){var g;if((b.ui.ie&&(/(static|relative)/).test(this.css("position")))||(/absolute/).test(this.css("position"))){g=this.parents().filter(function(){return(/(relative|absolute|fixed)/).test(b.css(this,"position"))&&(/(auto|scroll)/).test(b.css(this,"overflow")+b.css(this,"overflow-y")+b.css(this,"overflow-x"))}).eq(0)}else{g=this.parents().filter(function(){return(/(auto|scroll)/).test(b.css(this,"overflow")+b.css(this,"overflow-y")+b.css(this,"overflow-x"))}).eq(0)}return(/fixed/).test(this.css("position"))||!g.length?b(document):g},zIndex:function(j){if(j!==f){return this.css("zIndex",j)}if(this.length){var h=b(this[0]),g,i;while(h.length&&h[0]!==document){g=h.css("position");if(g==="absolute"||g==="relative"||g==="fixed"){i=parseInt(h.css("zIndex"),10);if(!isNaN(i)&&i!==0){return i}}h=h.parent()}}return 0},uniqueId:function(){return this.each(function(){if(!this.id){this.id="ui-id-"+(++a)}})},removeUniqueId:function(){return this.each(function(){if(e.test(this.id)){b(this).removeAttr("id")}})}});function d(i,g){var k,j,h,l=i.nodeName.toLowerCase();if("area"===l){k=i.parentNode;j=k.name;if(!i.href||!j||k.nodeName.toLowerCase()!=="map"){return false}h=b("img[usemap=#"+j+"]")[0];return !!h&&c(h)}return(/input|select|textarea|button|object/.test(l)?!i.disabled:"a"===l?i.href||g:g)&&c(i)}function c(g){return b.expr.filters.visible(g)&&!b(g).parents().addBack().filter(function(){return b.css(this,"visibility")==="hidden"}).length}b.extend(b.expr[":"],{data:b.expr.createPseudo?b.expr.createPseudo(function(g){return function(h){return !!b.data(h,g)}}):function(j,h,g){return !!b.data(j,g[3])},focusable:function(g){return d(g,!isNaN(b.attr(g,"tabindex")))},tabbable:function(i){var g=b.attr(i,"tabindex"),h=isNaN(g);return(h||g>=0)&&d(i,!h)}});if(!b("").outerWidth(1).jquery){b.each(["Width","Height"],function(j,g){var h=g==="Width"?["Left","Right"]:["Top","Bottom"],k=g.toLowerCase(),m={innerWidth:b.fn.innerWidth,innerHeight:b.fn.innerHeight,outerWidth:b.fn.outerWidth,outerHeight:b.fn.outerHeight};function l(o,n,i,p){b.each(h,function(){n-=parseFloat(b.css(o,"padding"+this))||0;if(i){n-=parseFloat(b.css(o,"border"+this+"Width"))||0}if(p){n-=parseFloat(b.css(o,"margin"+this))||0}});return n}b.fn["inner"+g]=function(i){if(i===f){return m["inner"+g].call(this)}return this.each(function(){b(this).css(k,l(this,i)+"px")})};b.fn["outer"+g]=function(i,n){if(typeof i!=="number"){return m["outer"+g].call(this,i)}return this.each(function(){b(this).css(k,l(this,i,true,n)+"px")})}})}if(!b.fn.addBack){b.fn.addBack=function(g){return this.add(g==null?this.prevObject:this.prevObject.filter(g))}}if(b("").data("a-b","a").removeData("a-b").data("a-b")){b.fn.removeData=(function(g){return function(h){if(arguments.length){return g.call(this,b.camelCase(h))}else{return g.call(this)}}})(b.fn.removeData)}b.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());b.support.selectstart="onselectstart" in document.createElement("div");b.fn.extend({disableSelection:function(){return this.bind((b.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(g){g.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}});b.extend(b.ui,{plugin:{add:function(h,j,l){var g,k=b.ui[h].prototype;for(g in l){k.plugins[g]=k.plugins[g]||[];k.plugins[g].push([j,l[g]])}},call:function(g,j,h){var k,l=g.plugins[j];if(!l||!g.element[0].parentNode||g.element[0].parentNode.nodeType===11){return}for(k=0;k"+this._get(X,"weekHeader")+" | ":"");for(aj=0;aj<7;aj++){N=(aj+I)%7;P+="=5?" class='ui-datepicker-week-end'":"")+">"+u[N]+" | "}M+=P+""+this._get(X,"calculateWeek")(Z)+" | ");for(aj=0;aj<7;aj++){ag=(aa?aa.apply((X.input?X.input[0]:null),[Z]):[true,""]);L=(Z.getMonth()!==h);w=(L&&!D)||!ag[0]||(n&&Z"+(L&&!q?" ":(w?""+Z.getDate()+"":""+Z.getDate()+""))+" | ";Z.setDate(Z.getDate()+1);Z=this._daylightSavingAdjust(Z)}M+=ac+""}h++;if(h>11){h=0;U++}M+="
---|
")[0],d,o=r.each;e.style.cssText="background-color:rgba(1,1,1,.5)";p.rgba=e.style.backgroundColor.indexOf("rgba")>-1;o(m,function(s,t){t.cache="_"+s;t.props.alpha={idx:3,type:"percent",def:1}});function l(t,v,u){var s=q[v.type]||{};if(t==null){return(u||!v.def)?null:v.def}t=s.floor?~~t:parseFloat(t);if(isNaN(t)){return v.def}if(s.mod){return(t+s.mod)%s.mod}return 0>t?0:s.max
")[0],v=k.each;u.style.cssText="background-color:rgba(1,1,1,.5)";p.rgba=-1