From 71ce5eaca09a111ddff5fccdcc93d17ce387b4d6 Mon Sep 17 00:00:00 2001 From: lightless Date: Tue, 8 Dec 2015 18:56:28 +0800 Subject: [PATCH] first commit --- .../admin.hack123.pw/.user.ini" | 1 + .../admin.hack123.pw/index.php" | 1 + .../kirie.hack123.pw/.htaccess" | 7 + .../kirie.hack123.pw/.user.ini" | 1 + .../kirie.hack123.pw/admin/category.php" | 23 + .../kirie.hack123.pw/admin/common-js.php" | 105 + .../kirie.hack123.pw/admin/common.php" | 59 + .../kirie.hack123.pw/admin/copyright.php" | 13 + .../kirie.hack123.pw/admin/css/grid.css" | 1 + .../kirie.hack123.pw/admin/css/normalize.css" | 1 + .../kirie.hack123.pw/admin/css/style.css" | 1 + .../admin/custom-fields-js.php" | 44 + .../kirie.hack123.pw/admin/custom-fields.php" | 73 + .../kirie.hack123.pw/admin/editor-js.php" | 330 + .../kirie.hack123.pw/admin/extending.php" | 13 + .../admin/file-upload-js.php" | 208 + .../kirie.hack123.pw/admin/file-upload.php" | 30 + .../kirie.hack123.pw/admin/footer.php" | 6 + .../kirie.hack123.pw/admin/form-js.php" | 26 + .../kirie.hack123.pw/admin/header.php" | 31 + .../admin/img/ajax-loader.gif" | Bin 0 -> 847 bytes .../kirie.hack123.pw/admin/img/editor.png" | Bin 0 -> 2567 bytes .../kirie.hack123.pw/admin/img/editor@2x.png" | Bin 0 -> 6501 bytes .../admin/img/icons-2x-s481937020b.png" | Bin 0 -> 4809 bytes .../admin/img/icons-s0c4f1c5ae6.png" | Bin 0 -> 2039 bytes .../kirie.hack123.pw/admin/img/noscreen.png" | Bin 0 -> 1187 bytes .../admin/img/typecho-logo.svg" | 10 + .../kirie.hack123.pw/admin/index.php" | 159 + .../kirie.hack123.pw/admin/js/Moxie.swf" | Bin 0 -> 28902 bytes .../kirie.hack123.pw/admin/js/diff.js" | 1 + .../kirie.hack123.pw/admin/js/html5shiv.js" | 1 + .../kirie.hack123.pw/admin/js/jquery-ui.js" | 16 + .../kirie.hack123.pw/admin/js/jquery.js" | 25 + .../kirie.hack123.pw/admin/js/moxie.js" | 1 + .../kirie.hack123.pw/admin/js/pagedown.js" | 1 + .../kirie.hack123.pw/admin/js/plupload.js" | 1 + .../kirie.hack123.pw/admin/js/respond.js" | 7 + .../kirie.hack123.pw/admin/js/stmd.js" | 1 + .../kirie.hack123.pw/admin/js/timepicker.js" | 4 + .../kirie.hack123.pw/admin/js/tokeninput.js" | 1 + .../kirie.hack123.pw/admin/js/typecho.js" | 55 + .../kirie.hack123.pw/admin/login.php" | 54 + .../admin/manage-categories.php" | 154 + .../admin/manage-comments.php" | 373 + .../kirie.hack123.pw/admin/manage-medias.php" | 122 + .../kirie.hack123.pw/admin/manage-pages.php" | 131 + .../kirie.hack123.pw/admin/manage-posts.php" | 152 + .../kirie.hack123.pw/admin/manage-tags.php" | 91 + .../kirie.hack123.pw/admin/manage-users.php" | 118 + .../kirie.hack123.pw/admin/media.php" | 194 + .../kirie.hack123.pw/admin/menu.php" | 15 + .../admin/options-discussion.php" | 23 + .../admin/options-general.php" | 23 + .../admin/options-permalink.php" | 24 + .../admin/options-plugin.php" | 23 + .../admin/options-reading.php" | 37 + .../kirie.hack123.pw/admin/options-theme.php" | 32 + .../kirie.hack123.pw/admin/page-title.php" | 8 + .../kirie.hack123.pw/admin/plugins.php" | 127 + .../kirie.hack123.pw/admin/profile.php" | 58 + .../kirie.hack123.pw/admin/register.php" | 50 + .../kirie.hack123.pw/admin/table-js.php" | 18 + .../kirie.hack123.pw/admin/theme-editor.php" | 62 + .../kirie.hack123.pw/admin/themes.php" | 69 + .../kirie.hack123.pw/admin/upgrade.php" | 41 + .../kirie.hack123.pw/admin/user.php" | 23 + .../kirie.hack123.pw/admin/welcome.php" | 36 + .../kirie.hack123.pw/admin/write-js.php" | 260 + .../kirie.hack123.pw/admin/write-page.php" | 151 + .../kirie.hack123.pw/admin/write-post.php" | 180 + .../kirie.hack123.pw/config.inc.php" | 64 + .../kirie.hack123.pw/index.php" | 26 + .../kirie.hack123.pw/install.php" | 666 ++ .../kirie.hack123.pw/install/Mysql.php" | 175 + .../kirie.hack123.pw/install/Mysql.sql" | 152 + .../kirie.hack123.pw/install/Pgsql.php" | 26 + .../kirie.hack123.pw/install/Pgsql.sql" | 130 + .../kirie.hack123.pw/install/SQLite.php" | 7 + .../kirie.hack123.pw/install/SQLite.sql" | 87 + .../usr/plugins/HelloWorld/Plugin.php" | 70 + .../usr/themes/default/404.php" | 16 + .../usr/themes/default/archive.php" | 36 + .../usr/themes/default/comments.php" | 49 + .../usr/themes/default/footer.php" | 14 + .../usr/themes/default/functions.php" | 26 + .../usr/themes/default/grid.css" | 1 + .../usr/themes/default/header.php" | 70 + .../usr/themes/default/img/icon-search.png" | Bin 0 -> 303 bytes .../themes/default/img/icon-search@2x.png" | Bin 0 -> 437 bytes .../usr/themes/default/index.php" | 35 + .../usr/themes/default/page.php" | 15 + .../usr/themes/default/post.php" | 27 + .../usr/themes/default/screenshot.png" | Bin 0 -> 12880 bytes .../usr/themes/default/sidebar.php" | 59 + .../usr/themes/default/style.css" | 1 + .../var/CommonMark/DocParser.php" | 599 ++ .../var/CommonMark/Element/BlockElement.php" | 478 ++ .../var/CommonMark/Element/InlineCreator.php" | 125 + .../var/CommonMark/Element/InlineElement.php" | 114 + .../Element/InlineElementInterface.php" | 56 + .../var/CommonMark/HtmlRenderer.php" | 261 + .../var/CommonMark/InlineParser.php" | 831 +++ .../var/CommonMark/Reference/Reference.php" | 92 + .../CommonMark/Reference/ReferenceMap.php" | 66 + .../var/CommonMark/Util/ArrayCollection.php" | 225 + .../var/CommonMark/Util/RegexHelper.php" | 252 + .../kirie.hack123.pw/var/Helper.php" | 442 ++ .../kirie.hack123.pw/var/IXR/Base64.php" | 43 + .../kirie.hack123.pw/var/IXR/Client.php" | 279 + .../var/IXR/ClientMulticall.php" | 35 + .../kirie.hack123.pw/var/IXR/Date.php" | 55 + .../kirie.hack123.pw/var/IXR/Error.php" | 76 + .../kirie.hack123.pw/var/IXR/Exception.php" | 17 + .../var/IXR/IntrospectionServer.php" | 158 + .../kirie.hack123.pw/var/IXR/Message.php" | 167 + .../kirie.hack123.pw/var/IXR/Request.php" | 43 + .../kirie.hack123.pw/var/IXR/Server.php" | 328 + .../kirie.hack123.pw/var/IXR/Value.php" | 119 + .../kirie.hack123.pw/var/Json.php" | 545 ++ .../kirie.hack123.pw/var/Markdown.php" | 62 + .../kirie.hack123.pw/var/PasswordHash.php" | 257 + .../kirie.hack123.pw/var/Typecho/AutoP.php" | 195 + .../kirie.hack123.pw/var/Typecho/Common.php" | 1433 ++++ .../kirie.hack123.pw/var/Typecho/Config.php" | 198 + .../kirie.hack123.pw/var/Typecho/Cookie.php" | 124 + .../kirie.hack123.pw/var/Typecho/Date.php" | 123 + .../kirie.hack123.pw/var/Typecho/Db.php" | 407 ++ .../var/Typecho/Db/Adapter.php" | 104 + .../var/Typecho/Db/Adapter/Exception.php" | 17 + .../var/Typecho/Db/Adapter/Mysql.php" | 171 + .../var/Typecho/Db/Adapter/Pdo.php" | 173 + .../var/Typecho/Db/Adapter/Pdo/Mysql.php" | 90 + .../var/Typecho/Db/Adapter/Pdo/Pgsql.php" | 94 + .../var/Typecho/Db/Adapter/Pdo/SQLite.php" | 106 + .../var/Typecho/Db/Adapter/Pgsql.php" | 184 + .../var/Typecho/Db/Adapter/SQLite.php" | 166 + .../var/Typecho/Db/Exception.php" | 17 + .../var/Typecho/Db/Query.php" | 520 ++ .../var/Typecho/Db/Query/Exception.php" | 17 + .../var/Typecho/Exception.php" | 24 + .../kirie.hack123.pw/var/Typecho/Feed.php" | 411 ++ .../var/Typecho/Http/Client.php" | 58 + .../var/Typecho/Http/Client/Adapter.php" | 425 ++ .../var/Typecho/Http/Client/Adapter/Curl.php" | 121 + .../Typecho/Http/Client/Adapter/Socket.php" | 154 + .../var/Typecho/Http/Client/Exception.php" | 17 + .../kirie.hack123.pw/var/Typecho/I18n.php" | 200 + .../var/Typecho/I18n/GetText.php" | 393 ++ .../var/Typecho/I18n/GetTextMulti.php" | 105 + .../kirie.hack123.pw/var/Typecho/Plugin.php" | 495 ++ .../var/Typecho/Plugin/Exception.php" | 17 + .../var/Typecho/Plugin/Interface.php" | 58 + .../kirie.hack123.pw/var/Typecho/Request.php" | 848 +++ .../var/Typecho/Response.php" | 299 + .../kirie.hack123.pw/var/Typecho/Router.php" | 209 + .../var/Typecho/Router/Exception.php" | 17 + .../var/Typecho/Router/Parser.php" | 118 + .../var/Typecho/Validate.php" | 320 + .../kirie.hack123.pw/var/Typecho/Widget.php" | 420 ++ .../var/Typecho/Widget/Exception.php" | 17 + .../var/Typecho/Widget/Helper/Empty.php" | 57 + .../var/Typecho/Widget/Helper/Form.php" | 273 + .../Typecho/Widget/Helper/Form/Element.php" | 322 + .../Widget/Helper/Form/Element/Checkbox.php" | 81 + .../Widget/Helper/Form/Element/Fake.php" | 84 + .../Widget/Helper/Form/Element/Hidden.php" | 62 + .../Widget/Helper/Form/Element/Password.php" | 52 + .../Widget/Helper/Form/Element/Radio.php" | 79 + .../Widget/Helper/Form/Element/Select.php" | 72 + .../Widget/Helper/Form/Element/Submit.php" | 52 + .../Widget/Helper/Form/Element/Text.php" | 53 + .../Widget/Helper/Form/Element/Textarea.php" | 52 + .../var/Typecho/Widget/Helper/Layout.php" | 352 + .../Typecho/Widget/Helper/PageNavigator.php" | 131 + .../Widget/Helper/PageNavigator/Box.php" | 120 + .../Widget/Helper/PageNavigator/Classic.php" | 67 + .../kirie.hack123.pw/var/Upgrade.php" | 1207 ++++ .../kirie.hack123.pw/var/Widget/Abstract.php" | 119 + .../var/Widget/Abstract/Comments.php" | 459 ++ .../var/Widget/Abstract/Contents.php" | 968 +++ .../var/Widget/Abstract/Metas.php" | 300 + .../var/Widget/Abstract/Options.php" | 95 + .../var/Widget/Abstract/Users.php" | 247 + .../kirie.hack123.pw/var/Widget/Ajax.php" | 162 + .../kirie.hack123.pw/var/Widget/Archive.php" | 2090 ++++++ .../var/Widget/Comments/Admin.php" | 147 + .../var/Widget/Comments/Archive.php" | 519 ++ .../var/Widget/Comments/Edit.php" | 372 + .../var/Widget/Comments/Ping.php" | 162 + .../var/Widget/Comments/Recent.php" | 63 + .../var/Widget/Contents/Attachment/Admin.php" | 125 + .../var/Widget/Contents/Attachment/Edit.php" | 330 + .../Widget/Contents/Attachment/Related.php" | 57 + .../Contents/Attachment/Unattached.php" | 43 + .../var/Widget/Contents/Page/Admin.php" | 52 + .../var/Widget/Contents/Page/Edit.php" | 262 + .../var/Widget/Contents/Page/List.php" | 45 + .../var/Widget/Contents/Post/Admin.php" | 151 + .../var/Widget/Contents/Post/Date.php" | 102 + .../var/Widget/Contents/Post/Edit.php" | 917 +++ .../var/Widget/Contents/Post/Recent.php" | 40 + .../var/Widget/Contents/Related.php" | 62 + .../var/Widget/Contents/Related/Author.php" | 46 + .../kirie.hack123.pw/var/Widget/Do.php" | 88 + .../var/Widget/ExceptionHandle.php" | 30 + .../kirie.hack123.pw/var/Widget/Feedback.php" | 339 + .../kirie.hack123.pw/var/Widget/Init.php" | 79 + .../var/Widget/Interface/Do.php" | 20 + .../kirie.hack123.pw/var/Widget/Login.php" | 84 + .../kirie.hack123.pw/var/Widget/Logout.php" | 36 + .../kirie.hack123.pw/var/Widget/Menu.php" | 343 + .../var/Widget/Metas/Category/Admin.php" | 95 + .../var/Widget/Metas/Category/Edit.php" | 492 ++ .../var/Widget/Metas/Category/List.php" | 415 ++ .../var/Widget/Metas/Tag/Admin.php" | 56 + .../var/Widget/Metas/Tag/Cloud.php" | 61 + .../var/Widget/Metas/Tag/Edit.php" | 366 + .../kirie.hack123.pw/var/Widget/Notice.php" | 71 + .../kirie.hack123.pw/var/Widget/Options.php" | 571 ++ .../var/Widget/Options/Discussion.php" | 248 + .../var/Widget/Options/General.php" | 266 + .../var/Widget/Options/Permalink.php" | 342 + .../var/Widget/Options/Reading.php" | 219 + .../var/Widget/Plugins/Config.php" | 116 + .../var/Widget/Plugins/Edit.php" | 297 + .../var/Widget/Plugins/List.php" | 116 + .../kirie.hack123.pw/var/Widget/Register.php" | 88 + .../kirie.hack123.pw/var/Widget/Security.php" | 135 + .../kirie.hack123.pw/var/Widget/Service.php" | 162 + .../kirie.hack123.pw/var/Widget/Stat.php" | 367 + .../var/Widget/Themes/Config.php" | 84 + .../var/Widget/Themes/Edit.php" | 179 + .../var/Widget/Themes/Files.php" | 136 + .../var/Widget/Themes/List.php" | 88 + .../kirie.hack123.pw/var/Widget/Upgrade.php" | 125 + .../kirie.hack123.pw/var/Widget/Upload.php" | 432 ++ .../kirie.hack123.pw/var/Widget/User.php" | 275 + .../var/Widget/Users/Admin.php" | 115 + .../var/Widget/Users/Author.php" | 37 + .../var/Widget/Users/Edit.php" | 311 + .../var/Widget/Users/Profile.php" | 424 ++ .../kirie.hack123.pw/var/Widget/XmlRpc.php" | 2326 +++++++ .../kirieblog.sql" | 250 + .../mc.hack123.pw/.user.ini" | 1 + .../mc.hack123.pw/assets/css/magister.css" | 368 + .../mc.hack123.pw/assets/images/body1.jpg" | Bin 0 -> 65281 bytes .../mc.hack123.pw/assets/images/body2.jpg" | Bin 0 -> 44439 bytes .../mc.hack123.pw/assets/images/body3.jpg" | Bin 0 -> 69387 bytes .../mc.hack123.pw/assets/images/body4.jpg" | Bin 0 -> 129487 bytes .../mc.hack123.pw/assets/images/body5.JPG" | Bin 0 -> 48639 bytes .../assets/images/gt_favicon.png" | Bin 0 -> 370 bytes .../mc.hack123.pw/assets/js/magister.js" | 26 + .../assets/js/modernizr.custom.72241.js" | 4 + .../mc.hack123.pw/assets/screenshots/1.jpg" | Bin 0 -> 17366 bytes .../mc.hack123.pw/assets/screenshots/2.jpg" | Bin 0 -> 15109 bytes .../mc.hack123.pw/assets/screenshots/3.jpg" | Bin 0 -> 15409 bytes .../mc.hack123.pw/assets/screenshots/4.jpg" | Bin 0 -> 11728 bytes .../mc.hack123.pw/bbs/404.html" | 1 + .../mc.hack123.pw/bbs/index.php" | 85 + .../mc.hack123.pw/bbs/messagehahaha.txt" | Bin 0 -> 1860234 bytes .../mc.hack123.pw/bbs/style.css" | 83 + .../mc.hack123.pw/index.html" | 180 + .../mc4dm1n.hack123.pw/.flaggg.php.swp" | 1 + .../mc4dm1n.hack123.pw/.user.ini" | 1 + .../mc4dm1n.hack123.pw/config/common.php" | 41 + .../mc4dm1n.hack123.pw/config/config.inc.php" | 39 + .../mc4dm1n.hack123.pw/debug.php" | 38 + .../mc4dm1n.hack123.pw/footer.php" | 9 + .../mc4dm1n.hack123.pw/header.php" | 16 + .../mc4dm1n.hack123.pw/index.php" | 76 + .../mc4dm1n.hack123.pw/index2.php" | 122 + .../mc4dm1n.hack123.pw/js/common.js" | 3 + .../mc4dm1n.hack123.pw/main.php" | 122 + .../mc4dm1n.hack123.pw/manager-user.php" | 1 + .../mc4dm1n.hack123.pw/pay.php" | 66 + .../mc4dm1n.hack123.pw/pia0o0o.png" | Bin 0 -> 66514 bytes .../mcblog.hack123.pw/.htaccess" | 7 + .../mcblog.hack123.pw/.user.ini" | 1 + .../mcblog.hack123.pw/admin/category.php" | 23 + .../mcblog.hack123.pw/admin/common-js.php" | 105 + .../mcblog.hack123.pw/admin/common.php" | 59 + .../mcblog.hack123.pw/admin/copyright.php" | 13 + .../mcblog.hack123.pw/admin/css/grid.css" | 1 + .../admin/css/normalize.css" | 1 + .../mcblog.hack123.pw/admin/css/style.css" | 1 + .../admin/custom-fields-js.php" | 44 + .../admin/custom-fields.php" | 73 + .../mcblog.hack123.pw/admin/editor-js.php" | 330 + .../mcblog.hack123.pw/admin/extending.php" | 13 + .../admin/file-upload-js.php" | 208 + .../mcblog.hack123.pw/admin/file-upload.php" | 30 + .../mcblog.hack123.pw/admin/footer.php" | 6 + .../mcblog.hack123.pw/admin/form-js.php" | 26 + .../mcblog.hack123.pw/admin/header.php" | 31 + .../admin/img/ajax-loader.gif" | Bin 0 -> 847 bytes .../mcblog.hack123.pw/admin/img/editor.png" | Bin 0 -> 2567 bytes .../admin/img/editor@2x.png" | Bin 0 -> 6501 bytes .../admin/img/icons-2x-s481937020b.png" | Bin 0 -> 4809 bytes .../admin/img/icons-s0c4f1c5ae6.png" | Bin 0 -> 2039 bytes .../mcblog.hack123.pw/admin/img/noscreen.png" | Bin 0 -> 1187 bytes .../admin/img/typecho-logo.svg" | 10 + .../mcblog.hack123.pw/admin/index.php" | 159 + .../mcblog.hack123.pw/admin/js/Moxie.swf" | Bin 0 -> 28902 bytes .../mcblog.hack123.pw/admin/js/diff.js" | 1 + .../mcblog.hack123.pw/admin/js/html5shiv.js" | 1 + .../mcblog.hack123.pw/admin/js/jquery-ui.js" | 16 + .../mcblog.hack123.pw/admin/js/jquery.js" | 25 + .../mcblog.hack123.pw/admin/js/moxie.js" | 1 + .../mcblog.hack123.pw/admin/js/pagedown.js" | 1 + .../mcblog.hack123.pw/admin/js/plupload.js" | 1 + .../mcblog.hack123.pw/admin/js/respond.js" | 7 + .../mcblog.hack123.pw/admin/js/stmd.js" | 1 + .../mcblog.hack123.pw/admin/js/timepicker.js" | 4 + .../mcblog.hack123.pw/admin/js/tokeninput.js" | 1 + .../mcblog.hack123.pw/admin/js/typecho.js" | 55 + .../mcblog.hack123.pw/admin/login.php" | 54 + .../admin/manage-categories.php" | 154 + .../admin/manage-comments.php" | 373 + .../admin/manage-medias.php" | 122 + .../mcblog.hack123.pw/admin/manage-pages.php" | 131 + .../mcblog.hack123.pw/admin/manage-posts.php" | 152 + .../mcblog.hack123.pw/admin/manage-tags.php" | 91 + .../mcblog.hack123.pw/admin/manage-users.php" | 118 + .../mcblog.hack123.pw/admin/media.php" | 194 + .../mcblog.hack123.pw/admin/menu.php" | 15 + .../admin/options-discussion.php" | 23 + .../admin/options-general.php" | 23 + .../admin/options-permalink.php" | 24 + .../admin/options-plugin.php" | 23 + .../admin/options-reading.php" | 37 + .../admin/options-theme.php" | 32 + .../mcblog.hack123.pw/admin/page-title.php" | 8 + .../mcblog.hack123.pw/admin/plugins.php" | 127 + .../mcblog.hack123.pw/admin/profile.php" | 58 + .../mcblog.hack123.pw/admin/register.php" | 50 + .../mcblog.hack123.pw/admin/table-js.php" | 18 + .../mcblog.hack123.pw/admin/theme-editor.php" | 62 + .../mcblog.hack123.pw/admin/themes.php" | 69 + .../mcblog.hack123.pw/admin/upgrade.php" | 41 + .../mcblog.hack123.pw/admin/user.php" | 23 + .../mcblog.hack123.pw/admin/welcome.php" | 36 + .../mcblog.hack123.pw/admin/write-js.php" | 260 + .../mcblog.hack123.pw/admin/write-page.php" | 151 + .../mcblog.hack123.pw/admin/write-post.php" | 180 + .../mcblog.hack123.pw/config.inc.php" | 64 + .../mcblog.hack123.pw/index.php" | 26 + .../mcblog.hack123.pw/install.php" | 666 ++ .../mcblog.hack123.pw/install/Mysql.php" | 175 + .../mcblog.hack123.pw/install/Mysql.sql" | 152 + .../mcblog.hack123.pw/install/Pgsql.php" | 26 + .../mcblog.hack123.pw/install/Pgsql.sql" | 130 + .../mcblog.hack123.pw/install/SQLite.php" | 7 + .../mcblog.hack123.pw/install/SQLite.sql" | 87 + .../usr/plugins/HelloWorld/Plugin.php" | 70 + .../usr/themes/default/404.php" | 16 + .../usr/themes/default/archive.php" | 36 + .../usr/themes/default/comments.php" | 49 + .../usr/themes/default/footer.php" | 14 + .../usr/themes/default/functions.php" | 26 + .../usr/themes/default/grid.css" | 1 + .../usr/themes/default/header.php" | 70 + .../usr/themes/default/img/icon-search.png" | Bin 0 -> 303 bytes .../themes/default/img/icon-search@2x.png" | Bin 0 -> 437 bytes .../usr/themes/default/index.php" | 35 + .../usr/themes/default/page.php" | 15 + .../usr/themes/default/post.php" | 27 + .../usr/themes/default/screenshot.png" | Bin 0 -> 12880 bytes .../usr/themes/default/sidebar.php" | 59 + .../usr/themes/default/style.css" | 1 + .../var/CommonMark/DocParser.php" | 599 ++ .../var/CommonMark/Element/BlockElement.php" | 478 ++ .../var/CommonMark/Element/InlineCreator.php" | 125 + .../var/CommonMark/Element/InlineElement.php" | 114 + .../Element/InlineElementInterface.php" | 56 + .../var/CommonMark/HtmlRenderer.php" | 261 + .../var/CommonMark/InlineParser.php" | 831 +++ .../var/CommonMark/Reference/Reference.php" | 92 + .../CommonMark/Reference/ReferenceMap.php" | 66 + .../var/CommonMark/Util/ArrayCollection.php" | 225 + .../var/CommonMark/Util/RegexHelper.php" | 252 + .../mcblog.hack123.pw/var/Helper.php" | 442 ++ .../mcblog.hack123.pw/var/IXR/Base64.php" | 43 + .../mcblog.hack123.pw/var/IXR/Client.php" | 279 + .../var/IXR/ClientMulticall.php" | 35 + .../mcblog.hack123.pw/var/IXR/Date.php" | 55 + .../mcblog.hack123.pw/var/IXR/Error.php" | 76 + .../mcblog.hack123.pw/var/IXR/Exception.php" | 17 + .../var/IXR/IntrospectionServer.php" | 158 + .../mcblog.hack123.pw/var/IXR/Message.php" | 167 + .../mcblog.hack123.pw/var/IXR/Request.php" | 43 + .../mcblog.hack123.pw/var/IXR/Server.php" | 328 + .../mcblog.hack123.pw/var/IXR/Value.php" | 119 + .../mcblog.hack123.pw/var/Json.php" | 545 ++ .../mcblog.hack123.pw/var/Markdown.php" | 62 + .../mcblog.hack123.pw/var/PasswordHash.php" | 257 + .../mcblog.hack123.pw/var/Typecho/AutoP.php" | 195 + .../mcblog.hack123.pw/var/Typecho/Common.php" | 1433 ++++ .../mcblog.hack123.pw/var/Typecho/Config.php" | 198 + .../mcblog.hack123.pw/var/Typecho/Cookie.php" | 124 + .../mcblog.hack123.pw/var/Typecho/Date.php" | 123 + .../mcblog.hack123.pw/var/Typecho/Db.php" | 407 ++ .../var/Typecho/Db/Adapter.php" | 104 + .../var/Typecho/Db/Adapter/Exception.php" | 17 + .../var/Typecho/Db/Adapter/Mysql.php" | 171 + .../var/Typecho/Db/Adapter/Pdo.php" | 173 + .../var/Typecho/Db/Adapter/Pdo/Mysql.php" | 90 + .../var/Typecho/Db/Adapter/Pdo/Pgsql.php" | 94 + .../var/Typecho/Db/Adapter/Pdo/SQLite.php" | 106 + .../var/Typecho/Db/Adapter/Pgsql.php" | 184 + .../var/Typecho/Db/Adapter/SQLite.php" | 166 + .../var/Typecho/Db/Exception.php" | 17 + .../var/Typecho/Db/Query.php" | 520 ++ .../var/Typecho/Db/Query/Exception.php" | 17 + .../var/Typecho/Exception.php" | 24 + .../mcblog.hack123.pw/var/Typecho/Feed.php" | 411 ++ .../var/Typecho/Http/Client.php" | 58 + .../var/Typecho/Http/Client/Adapter.php" | 425 ++ .../var/Typecho/Http/Client/Adapter/Curl.php" | 121 + .../Typecho/Http/Client/Adapter/Socket.php" | 154 + .../var/Typecho/Http/Client/Exception.php" | 17 + .../mcblog.hack123.pw/var/Typecho/I18n.php" | 200 + .../var/Typecho/I18n/GetText.php" | 393 ++ .../var/Typecho/I18n/GetTextMulti.php" | 105 + .../mcblog.hack123.pw/var/Typecho/Plugin.php" | 495 ++ .../var/Typecho/Plugin/Exception.php" | 17 + .../var/Typecho/Plugin/Interface.php" | 58 + .../var/Typecho/Request.php" | 848 +++ .../var/Typecho/Response.php" | 299 + .../mcblog.hack123.pw/var/Typecho/Router.php" | 209 + .../var/Typecho/Router/Exception.php" | 17 + .../var/Typecho/Router/Parser.php" | 118 + .../var/Typecho/Validate.php" | 320 + .../mcblog.hack123.pw/var/Typecho/Widget.php" | 420 ++ .../var/Typecho/Widget/Exception.php" | 17 + .../var/Typecho/Widget/Helper/Empty.php" | 57 + .../var/Typecho/Widget/Helper/Form.php" | 273 + .../Typecho/Widget/Helper/Form/Element.php" | 322 + .../Widget/Helper/Form/Element/Checkbox.php" | 81 + .../Widget/Helper/Form/Element/Fake.php" | 84 + .../Widget/Helper/Form/Element/Hidden.php" | 62 + .../Widget/Helper/Form/Element/Password.php" | 52 + .../Widget/Helper/Form/Element/Radio.php" | 79 + .../Widget/Helper/Form/Element/Select.php" | 72 + .../Widget/Helper/Form/Element/Submit.php" | 52 + .../Widget/Helper/Form/Element/Text.php" | 53 + .../Widget/Helper/Form/Element/Textarea.php" | 52 + .../var/Typecho/Widget/Helper/Layout.php" | 352 + .../Typecho/Widget/Helper/PageNavigator.php" | 131 + .../Widget/Helper/PageNavigator/Box.php" | 120 + .../Widget/Helper/PageNavigator/Classic.php" | 67 + .../mcblog.hack123.pw/var/Upgrade.php" | 1207 ++++ .../var/Widget/Abstract.php" | 119 + .../var/Widget/Abstract/Comments.php" | 459 ++ .../var/Widget/Abstract/Contents.php" | 968 +++ .../var/Widget/Abstract/Metas.php" | 300 + .../var/Widget/Abstract/Options.php" | 95 + .../var/Widget/Abstract/Users.php" | 247 + .../mcblog.hack123.pw/var/Widget/Ajax.php" | 162 + .../mcblog.hack123.pw/var/Widget/Archive.php" | 2090 ++++++ .../var/Widget/Comments/Admin.php" | 147 + .../var/Widget/Comments/Archive.php" | 519 ++ .../var/Widget/Comments/Edit.php" | 372 + .../var/Widget/Comments/Ping.php" | 162 + .../var/Widget/Comments/Recent.php" | 63 + .../var/Widget/Contents/Attachment/Admin.php" | 125 + .../var/Widget/Contents/Attachment/Edit.php" | 330 + .../Widget/Contents/Attachment/Related.php" | 57 + .../Contents/Attachment/Unattached.php" | 43 + .../var/Widget/Contents/Page/Admin.php" | 52 + .../var/Widget/Contents/Page/Edit.php" | 262 + .../var/Widget/Contents/Page/List.php" | 45 + .../var/Widget/Contents/Post/Admin.php" | 151 + .../var/Widget/Contents/Post/Date.php" | 102 + .../var/Widget/Contents/Post/Edit.php" | 917 +++ .../var/Widget/Contents/Post/Recent.php" | 40 + .../var/Widget/Contents/Related.php" | 62 + .../var/Widget/Contents/Related/Author.php" | 46 + .../mcblog.hack123.pw/var/Widget/Do.php" | 88 + .../var/Widget/ExceptionHandle.php" | 30 + .../var/Widget/Feedback.php" | 339 + .../mcblog.hack123.pw/var/Widget/Init.php" | 79 + .../var/Widget/Interface/Do.php" | 20 + .../mcblog.hack123.pw/var/Widget/Login.php" | 84 + .../mcblog.hack123.pw/var/Widget/Logout.php" | 36 + .../mcblog.hack123.pw/var/Widget/Menu.php" | 343 + .../var/Widget/Metas/Category/Admin.php" | 95 + .../var/Widget/Metas/Category/Edit.php" | 492 ++ .../var/Widget/Metas/Category/List.php" | 415 ++ .../var/Widget/Metas/Tag/Admin.php" | 56 + .../var/Widget/Metas/Tag/Cloud.php" | 61 + .../var/Widget/Metas/Tag/Edit.php" | 366 + .../mcblog.hack123.pw/var/Widget/Notice.php" | 71 + .../mcblog.hack123.pw/var/Widget/Options.php" | 571 ++ .../var/Widget/Options/Discussion.php" | 248 + .../var/Widget/Options/General.php" | 266 + .../var/Widget/Options/Permalink.php" | 342 + .../var/Widget/Options/Reading.php" | 219 + .../var/Widget/Plugins/Config.php" | 116 + .../var/Widget/Plugins/Edit.php" | 297 + .../var/Widget/Plugins/List.php" | 116 + .../var/Widget/Register.php" | 88 + .../var/Widget/Security.php" | 135 + .../mcblog.hack123.pw/var/Widget/Service.php" | 162 + .../mcblog.hack123.pw/var/Widget/Stat.php" | 367 + .../var/Widget/Themes/Config.php" | 84 + .../var/Widget/Themes/Edit.php" | 179 + .../var/Widget/Themes/Files.php" | 136 + .../var/Widget/Themes/List.php" | 88 + .../mcblog.hack123.pw/var/Widget/Upgrade.php" | 125 + .../mcblog.hack123.pw/var/Widget/Upload.php" | 432 ++ .../mcblog.hack123.pw/var/Widget/User.php" | 275 + .../var/Widget/Users/Admin.php" | 115 + .../var/Widget/Users/Author.php" | 37 + .../var/Widget/Users/Edit.php" | 311 + .../var/Widget/Users/Profile.php" | 424 ++ .../mcblog.hack123.pw/var/Widget/XmlRpc.php" | 2326 +++++++ .../mcblog.sql" | 250 + .../mcshop.sql" | 167 + .../readme.txt" | 4 + .../shop.hack123.pw/.user.ini" | 1 + .../shop.hack123.pw/404.html" | 1 + .../shop.hack123.pw/ajax-cart.php" | 79 + .../shop.hack123.pw/buycart.php" | 4 + .../shop.hack123.pw/clearcart.php" | 13 + .../shop.hack123.pw/config/common.php" | 29 + .../shop.hack123.pw/config/config.inc.php" | 39 + .../config/mcshoplalalalalacaibudao.sql" | 92 + .../shop.hack123.pw/fix-num.php" | 117 + .../shop.hack123.pw/footer.php" | 9 + .../shop.hack123.pw/header.php" | 16 + .../shop.hack123.pw/index.php" | 149 + .../shop.hack123.pw/js/cart.js" | 17 + .../shop.hack123.pw/js/common.js" | 43 + .../shop.hack123.pw/login.php" | 74 + .../shop.hack123.pw/logout.php" | 11 + .../shop.hack123.pw/mycart.php" | 98 + .../shop.hack123.pw/pay.php" | 70 + .../shop.hack123.pw/register.php" | 113 + .../shop.hack123.pw/shop.sql.bak" | 45 + WhatIsThis/index.html | 1 + WhatIsThis/readme.txt | 2 + ...t-is-this.1d9bb46782a411bdb72ac82590539826 | Bin 0 -> 131088 bytes .../css/bootstrap-responsive.css | 1109 +++ .../css/bootstrap-responsive.min.css | 9 + .../css/bootstrap.css | 6167 +++++++++++++++++ .../css/bootstrap.min.css | 9 + .../download.php | 33 + .../92169de79037c2de72f5088bf1e8310a/flag.php | 5 + .../flagflagflaggogogo.php | 101 + .../img/glyphicons-halflings-white.png | Bin 0 -> 8777 bytes .../img/glyphicons-halflings.png | Bin 0 -> 12799 bytes .../index.php | 64 + .../js/bootstrap.js | 2280 ++++++ .../js/bootstrap.min.js | 6 + .../js/jquery-2.1.4.min.js | 4 + .../novel/SAO.7z | Bin 0 -> 2605650 bytes .../novel/SAO01.txt | 3123 +++++++++ .../novel/SAO02.txt | 3193 +++++++++ .../novel/SAO03.txt | 2883 ++++++++ .../novel/backup.zip | Bin 0 -> 4439 bytes .../92169de79037c2de72f5088bf1e8310a/view.php | 57 + ...0\351\217\202\345\233\250\343\200\202.txt" | 496 ++ fuckphp/readme.txt | 4 + .../index.php | 16 + .../8270537b1512009f6cc7834e3fd0087c/main.php | 90 + server is done/readme.txt | 2 + .../fuckme.a8a933dc732d06e2f45f953c7b0a4204" | Bin 0 -> 10231185 bytes .../index.html" | 1 + .../readme.txt" | 9 + .../boring.ca9c342905fa022d0377bf6a2886b01d" | Bin 0 -> 677045 bytes .../index.html" | 1 + .../readme.txt" | 3 + .../index.html" | 1 + .../misc50.28c1c3807a6e3ff9da28b5774dc6fbb0" | Bin 0 -> 91053 bytes .../readme.txt" | 1 + 575 files changed, 105308 insertions(+) create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/.user.ini" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.htaccess" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.user.ini" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/category.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/copyright.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/grid.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/normalize.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/style.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/editor-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/extending.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/footer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/form-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/header.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/ajax-loader.gif" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/editor.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/editor@2x.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/icons-2x-s481937020b.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/icons-s0c4f1c5ae6.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/noscreen.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/typecho-logo.svg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/Moxie.swf" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/diff.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/html5shiv.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/jquery-ui.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/jquery.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/moxie.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/pagedown.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/plupload.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/respond.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/stmd.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/timepicker.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/tokeninput.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/typecho.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/login.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-categories.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-comments.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-medias.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-pages.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-posts.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-tags.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-users.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/media.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/menu.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-discussion.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-general.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-permalink.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-plugin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-reading.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-theme.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/page-title.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/plugins.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/profile.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/register.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/table-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/theme-editor.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/themes.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/upgrade.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/user.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/welcome.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-page.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-post.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/config.inc.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/plugins/HelloWorld/Plugin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/404.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/archive.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/comments.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/footer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/functions.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/grid.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/header.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/img/icon-search.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/img/icon-search@2x.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/page.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/post.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/screenshot.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/sidebar.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/style.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/DocParser.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/BlockElement.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineCreator.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElement.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/HtmlRenderer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/InlineParser.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/Reference.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/ArrayCollection.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/RegexHelper.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Helper.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Base64.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Client.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/ClientMulticall.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Date.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Error.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/IntrospectionServer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Message.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Request.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Server.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Value.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Json.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Markdown.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/PasswordHash.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/AutoP.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Common.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Config.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Cookie.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Date.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Mysql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Query.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Query/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Feed.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetText.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetTextMulti.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin/Interface.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Request.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Response.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router/Parser.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Validate.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Empty.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Layout.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Upgrade.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Comments.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Contents.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Metas.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Options.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Users.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Ajax.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Archive.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Archive.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Ping.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Recent.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Related.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Date.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Recent.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related/Author.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Do.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/ExceptionHandle.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Feedback.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Init.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Interface/Do.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Login.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Logout.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Menu.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Cloud.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Notice.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Discussion.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/General.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Permalink.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Reading.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Config.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Register.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Security.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Service.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Stat.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Config.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Files.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upgrade.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upload.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/User.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Author.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Profile.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/XmlRpc.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirieblog.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/.user.ini" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/css/magister.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/images/body1.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/images/body2.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/images/body3.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/images/body4.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/images/body5.JPG" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/images/gt_favicon.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/js/magister.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/js/modernizr.custom.72241.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/screenshots/1.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/screenshots/2.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/screenshots/3.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/assets/screenshots/4.jpg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/bbs/404.html" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/bbs/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/bbs/messagehahaha.txt" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/bbs/style.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc.hack123.pw/index.html" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.flaggg.php.swp" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.user.ini" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/common.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/config.inc.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/debug.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/footer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/header.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index2.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/js/common.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/main.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/manager-user.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/pay.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/pia0o0o.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.htaccess" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.user.ini" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/category.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/copyright.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/grid.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/normalize.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/style.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/editor-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/extending.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/footer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/form-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/header.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/ajax-loader.gif" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/editor.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/editor@2x.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/icons-2x-s481937020b.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/icons-s0c4f1c5ae6.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/noscreen.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/typecho-logo.svg" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/Moxie.swf" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/diff.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/html5shiv.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/jquery-ui.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/jquery.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/moxie.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/pagedown.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/plupload.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/respond.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/stmd.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/timepicker.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/tokeninput.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/typecho.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/login.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-categories.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-comments.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-medias.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-pages.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-posts.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-tags.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-users.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/media.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/menu.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-discussion.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-general.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-permalink.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-plugin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-reading.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-theme.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/page-title.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/plugins.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/profile.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/register.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/table-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/theme-editor.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/themes.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/upgrade.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/user.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/welcome.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-js.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-page.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-post.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/config.inc.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/plugins/HelloWorld/Plugin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/404.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/archive.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/comments.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/footer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/functions.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/grid.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/header.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/img/icon-search.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/img/icon-search@2x.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/page.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/post.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/screenshot.png" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/sidebar.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/style.css" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/DocParser.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/BlockElement.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineCreator.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElement.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/HtmlRenderer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/InlineParser.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/Reference.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/ArrayCollection.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/RegexHelper.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Helper.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Base64.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Client.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/ClientMulticall.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Date.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Error.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/IntrospectionServer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Message.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Request.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Server.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Value.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Json.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Markdown.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/PasswordHash.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/AutoP.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Common.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Config.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Cookie.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Date.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Mysql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Query.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Query/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Feed.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetText.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetTextMulti.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin/Interface.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Request.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Response.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router/Parser.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Validate.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Exception.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Empty.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Layout.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Upgrade.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Comments.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Contents.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Metas.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Options.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Users.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Ajax.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Archive.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Archive.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Ping.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Recent.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Related.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Date.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Recent.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related/Author.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Do.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/ExceptionHandle.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Feedback.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Init.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Interface/Do.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Login.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Logout.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Menu.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Cloud.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Notice.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Discussion.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/General.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Permalink.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Reading.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Config.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Register.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Security.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Service.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Stat.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Config.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Files.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/List.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upgrade.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upload.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/User.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Admin.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Author.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Edit.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Profile.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/XmlRpc.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcshop.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/readme.txt" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/.user.ini" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/404.html" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/ajax-cart.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/buycart.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/clearcart.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/common.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/config.inc.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/mcshoplalalalalacaibudao.sql" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/fix-num.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/footer.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/header.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/index.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/cart.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/common.js" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/login.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/logout.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/mycart.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/pay.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/register.php" create mode 100644 "MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/shop.sql.bak" create mode 100644 WhatIsThis/index.html create mode 100644 WhatIsThis/readme.txt create mode 100644 WhatIsThis/what-is-this.1d9bb46782a411bdb72ac82590539826 create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.css create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.min.css create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.css create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.min.css create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/download.php create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/flag.php create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/flagflagflaggogogo.php create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/img/glyphicons-halflings-white.png create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/img/glyphicons-halflings.png create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/index.php create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/js/bootstrap.js create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/js/bootstrap.min.js create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/js/jquery-2.1.4.min.js create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/novel/SAO.7z create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/novel/SAO01.txt create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/novel/SAO02.txt create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/novel/SAO03.txt create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/novel/backup.zip create mode 100644 fuckphp/92169de79037c2de72f5088bf1e8310a/view.php create mode 100644 "fuckphp/92169de79037c2de72f5088bf1e8310a/\351\217\202\346\235\277\347\274\223 \351\217\202\345\233\250\346\271\260\351\217\202\345\233\250\343\200\202.txt" create mode 100644 fuckphp/readme.txt create mode 100644 server is done/8270537b1512009f6cc7834e3fd0087c/index.php create mode 100644 server is done/8270537b1512009f6cc7834e3fd0087c/main.php create mode 100644 server is done/readme.txt create mode 100644 "\345\207\272\351\242\230\344\272\272\347\234\237\346\227\240\350\201\212/fuckme.a8a933dc732d06e2f45f953c7b0a4204" create mode 100644 "\345\207\272\351\242\230\344\272\272\347\234\237\346\227\240\350\201\212/index.html" create mode 100644 "\345\207\272\351\242\230\344\272\272\347\234\237\346\227\240\350\201\212/readme.txt" create mode 100644 "\346\227\240\350\201\212\347\232\204\351\242\230\357\274\210\345\207\272\351\242\230\344\272\272\347\234\237\346\227\240\350\201\212\357\274\211/boring.ca9c342905fa022d0377bf6a2886b01d" create mode 100644 "\346\227\240\350\201\212\347\232\204\351\242\230\357\274\210\345\207\272\351\242\230\344\272\272\347\234\237\346\227\240\350\201\212\357\274\211/index.html" create mode 100644 "\346\227\240\350\201\212\347\232\204\351\242\230\357\274\210\345\207\272\351\242\230\344\272\272\347\234\237\346\227\240\350\201\212\357\274\211/readme.txt" create mode 100644 "\351\200\201\345\210\206\350\246\201\344\270\215\350\246\201\357\274\210\350\220\214\346\226\260\347\202\271\346\210\221\357\274\211/index.html" create mode 100644 "\351\200\201\345\210\206\350\246\201\344\270\215\350\246\201\357\274\210\350\220\214\346\226\260\347\202\271\346\210\221\357\274\211/misc50.28c1c3807a6e3ff9da28b5774dc6fbb0" create mode 100644 "\351\200\201\345\210\206\350\246\201\344\270\215\350\246\201\357\274\210\350\220\214\346\226\260\347\202\271\346\210\221\357\274\211/readme.txt" diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/.user.ini" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/.user.ini" new file mode 100644 index 0000000..cda4d2e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/.user.ini" @@ -0,0 +1 @@ +open_basedir=/home/wwwroot/admin.hack123.pw:/tmp/:/proc/ diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/index.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/index.php" new file mode 100644 index 0000000..a4f4f94 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/admin.hack123.pw/index.php" @@ -0,0 +1 @@ +you are not admin. diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.htaccess" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.htaccess" new file mode 100644 index 0000000..bd95319 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.htaccess" @@ -0,0 +1,7 @@ + +RewriteEngine On +RewriteBase / +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ /index.php/$1 [L] + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.user.ini" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.user.ini" new file mode 100644 index 0000000..6787ff6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/.user.ini" @@ -0,0 +1 @@ +open_basedir=/home/wwwroot/kirie.hack123.pw:/tmp/:/proc/ diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/category.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/category.php" new file mode 100644 index 0000000..97de61d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/category.php" @@ -0,0 +1,23 @@ + + +
+
+ +
+
+ form()->render(); ?> +
+
+
+
+ + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common-js.php" new file mode 100644 index 0000000..e652930 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common-js.php" @@ -0,0 +1,105 @@ + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common.php" new file mode 100644 index 0000000..e3a6702 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/common.php" @@ -0,0 +1,59 @@ +begin(); + +Typecho_Widget::widget('Widget_Options')->to($options); +Typecho_Widget::widget('Widget_User')->to($user); +Typecho_Widget::widget('Widget_Security')->to($security); +Typecho_Widget::widget('Widget_Menu')->to($menu); + +/** 鍒濆鍖栦笂涓嬫枃 */ +$request = $options->request; +$response = $options->response; + +/** 妫娴嬫槸鍚︽槸绗竴娆$櫥褰 */ +$currentMenu = $menu->getCurrentMenu(); +list($prefixVersion, $suffixVersion) = explode('/', $options->version); +$params = parse_url($currentMenu[2]); +$adminFile = basename($params['path']); + +if (!$user->logged && !Typecho_Cookie::get('__typecho_first_run') && !empty($currentMenu)) { + + if ('welcome.php' != $adminFile) { + $response->redirect(Typecho_Common::url('welcome.php', $options->adminUrl)); + } else { + Typecho_Cookie::set('__typecho_first_run', 1); + } + +} else { + + /** 妫娴嬬増鏈槸鍚﹀崌绾 */ + if ($user->pass('administrator', true) && !empty($currentMenu)) { + $mustUpgrade = (!defined('Typecho_Common::VERSION') || version_compare(str_replace('/', '.', Typecho_Common::VERSION), + str_replace('/', '.', $options->version), '>')); + + if ($mustUpgrade && 'upgrade.php' != $adminFile) { + $response->redirect(Typecho_Common::url('upgrade.php', $options->adminUrl)); + } else if (!$mustUpgrade && 'upgrade.php' == $adminFile) { + $response->redirect($options->adminUrl); + } else if (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) { + $response->redirect($options->adminUrl); + } + } + +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/copyright.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/copyright.php" new file mode 100644 index 0000000..b17e928 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/copyright.php" @@ -0,0 +1,13 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/grid.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/grid.css" new file mode 100644 index 0000000..16183b3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/grid.css" @@ -0,0 +1 @@ +.container,.row [class*="col-"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}.container{margin-left:auto;margin-right:auto;padding-left:10px;padding-right:10px;}.row{margin-right:-10px;margin-left:-10px;}.row [class*="col-"]{float:left;min-height:1px;padding-right:10px;padding-left:10px;}.row [class*="-push-"],.row [class*="-pull-"]{position:relative;}.col-mb-1{width:8.33333%;}.col-mb-2{width:16.66667%;}.col-mb-3{width:25%;}.col-mb-4{width:33.33333%;}.col-mb-5{width:41.66667%;}.col-mb-6{width:50%;}.col-mb-7{width:58.33333%;}.col-mb-8{width:66.66667%;}.col-mb-9{width:75%;}.col-mb-10{width:83.33333%;}.col-mb-11{width:91.66667%;}.col-mb-12{width:100%;}@media(min-width:768px){.container{max-width:728px;}.col-tb-1{width:8.33333%;}.col-tb-2{width:16.66667%;}.col-tb-3{width:25%;}.col-tb-4{width:33.33333%;}.col-tb-5{width:41.66667%;}.col-tb-6{width:50%;}.col-tb-7{width:58.33333%;}.col-tb-8{width:66.66667%;}.col-tb-9{width:75%;}.col-tb-10{width:83.33333%;}.col-tb-11{width:91.66667%;}.col-tb-12{width:100%;}.col-tb-offset-0{margin-left:0;}.col-tb-offset-1{margin-left:8.33333%;}.col-tb-offset-2{margin-left:16.66667%;}.col-tb-offset-3{margin-left:25%;}.col-tb-offset-4{margin-left:33.33333%;}.col-tb-offset-5{margin-left:41.66667%;}.col-tb-offset-6{margin-left:50%;}.col-tb-offset-7{margin-left:58.33333%;}.col-tb-offset-8{margin-left:66.66667%;}.col-tb-offset-9{margin-left:75%;}.col-tb-offset-10{margin-left:83.33333%;}.col-tb-offset-11{margin-left:91.66667%;}.col-tb-offset-12{margin-left:100%;}.col-tb-pull-0{right:0;}.col-tb-pull-1{right:8.33333%;}.col-tb-pull-2{right:16.66667%;}.col-tb-pull-3{right:25%;}.col-tb-pull-4{right:33.33333%;}.col-tb-pull-5{right:41.66667%;}.col-tb-pull-6{right:50%;}.col-tb-pull-7{right:58.33333%;}.col-tb-pull-8{right:66.66667%;}.col-tb-pull-9{right:75%;}.col-tb-pull-10{right:83.33333%;}.col-tb-pull-11{right:91.66667%;}.col-tb-pull-12{right:100%;}.col-tb-push-0{left:0;}.col-tb-push-1{left:8.33333%;}.col-tb-push-2{left:16.66667%;}.col-tb-push-3{left:25%;}.col-tb-push-4{left:33.33333%;}.col-tb-push-5{left:41.66667%;}.col-tb-push-6{left:50%;}.col-tb-push-7{left:58.33333%;}.col-tb-push-8{left:66.66667%;}.col-tb-push-9{left:75%;}.col-tb-push-10{left:83.33333%;}.col-tb-push-11{left:91.66667%;}.col-tb-push-12{left:100%;}}@media(min-width:992px){.container{max-width:952px;}.col-1{width:8.33333%;}.col-2{width:16.66667%;}.col-3{width:25%;}.col-4{width:33.33333%;}.col-5{width:41.66667%;}.col-6{width:50%;}.col-7{width:58.33333%;}.col-8{width:66.66667%;}.col-9{width:75%;}.col-10{width:83.33333%;}.col-11{width:91.66667%;}.col-12{width:100%;}.col-offset-0{margin-left:0;}.col-offset-1{margin-left:8.33333%;}.col-offset-2{margin-left:16.66667%;}.col-offset-3{margin-left:25%;}.col-offset-4{margin-left:33.33333%;}.col-offset-5{margin-left:41.66667%;}.col-offset-6{margin-left:50%;}.col-offset-7{margin-left:58.33333%;}.col-offset-8{margin-left:66.66667%;}.col-offset-9{margin-left:75%;}.col-offset-10{margin-left:83.33333%;}.col-offset-11{margin-left:91.66667%;}.col-offset-12{margin-left:100%;}.col-pull-0{right:0;}.col-pull-1{right:8.33333%;}.col-pull-2{right:16.66667%;}.col-pull-3{right:25%;}.col-pull-4{right:33.33333%;}.col-pull-5{right:41.66667%;}.col-pull-6{right:50%;}.col-pull-7{right:58.33333%;}.col-pull-8{right:66.66667%;}.col-pull-9{right:75%;}.col-pull-10{right:83.33333%;}.col-pull-11{right:91.66667%;}.col-pull-12{right:100%;}.col-push-0{left:0;}.col-push-1{left:8.33333%;}.col-push-2{left:16.66667%;}.col-push-3{left:25%;}.col-push-4{left:33.33333%;}.col-push-5{left:41.66667%;}.col-push-6{left:50%;}.col-push-7{left:58.33333%;}.col-push-8{left:66.66667%;}.col-push-9{left:75%;}.col-push-10{left:83.33333%;}.col-push-11{left:91.66667%;}.col-push-12{left:100%;}}@media(min-width:1200px){.container{max-width:1160px;}.col-wd-1{width:8.33333%;}.col-wd-2{width:16.66667%;}.col-wd-3{width:25%;}.col-wd-4{width:33.33333%;}.col-wd-5{width:41.66667%;}.col-wd-6{width:50%;}.col-wd-7{width:58.33333%;}.col-wd-8{width:66.66667%;}.col-wd-9{width:75%;}.col-wd-10{width:83.33333%;}.col-wd-11{width:91.66667%;}.col-wd-12{width:100%;}.col-wd-offset-0{margin-left:0;}.col-wd-offset-1{margin-left:8.33333%;}.col-wd-offset-2{margin-left:16.66667%;}.col-wd-offset-3{margin-left:25%;}.col-wd-offset-4{margin-left:33.33333%;}.col-wd-offset-5{margin-left:41.66667%;}.col-wd-offset-6{margin-left:50%;}.col-wd-offset-7{margin-left:58.33333%;}.col-wd-offset-8{margin-left:66.66667%;}.col-wd-offset-9{margin-left:75%;}.col-wd-offset-10{margin-left:83.33333%;}.col-wd-offset-11{margin-left:91.66667%;}.col-wd-offset-12{margin-left:100%;}.col-wd-pull-0{right:0;}.col-wd-pull-1{right:8.33333%;}.col-wd-pull-2{right:16.66667%;}.col-wd-pull-3{right:25%;}.col-wd-pull-4{right:33.33333%;}.col-wd-pull-5{right:41.66667%;}.col-wd-pull-6{right:50%;}.col-wd-pull-7{right:58.33333%;}.col-wd-pull-8{right:66.66667%;}.col-wd-pull-9{right:75%;}.col-wd-pull-10{right:83.33333%;}.col-wd-pull-11{right:91.66667%;}.col-wd-pull-12{right:100%;}.col-wd-push-0{left:0;}.col-wd-push-1{left:8.33333%;}.col-wd-push-2{left:16.66667%;}.col-wd-push-3{left:25%;}.col-wd-push-4{left:33.33333%;}.col-wd-push-5{left:41.66667%;}.col-wd-push-6{left:50%;}.col-wd-push-7{left:58.33333%;}.col-wd-push-8{left:66.66667%;}.col-wd-push-9{left:75%;}.col-wd-push-10{left:83.33333%;}.col-wd-push-11{left:91.66667%;}.col-wd-push-12{left:100%;}}@media(max-width:767px){.kit-hidden-mb{display:none;}}@media(max-width:991px){.kit-hidden-tb{display:none;}}@media(max-width:1199px){.kit-hidden{display:none;}}.clearfix,.row{zoom:1;}.clearfix:before,.row:before,.clearfix:after,.row:after{content:" ";display:table;}.clearfix:after,.row:after{clear:both;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/normalize.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/normalize.css" new file mode 100644 index 0000000..c377607 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/normalize.css" @@ -0,0 +1 @@ +/*!normalize.css v2.1.3 | MIT License | git.io/normalize */ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden],template{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a{background:transparent;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/style.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/style.css" new file mode 100644 index 0000000..7c9a118 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/css/style.css" @@ -0,0 +1 @@ +@charset "UTF-8";html{height:100%;}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background:#F6F6F3;color:#444;font-size:87.5%;line-height:1.5;}a{color:#467B96;text-decoration:none;}a:hover{color:#499BC3;text-decoration:underline;}code,pre,.mono{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;}.p{margin:1em 0;}.body-100{height:100%;}a.balloon-button{display:inline-block;padding:0 6px;min-width:12px;height:18px;line-height:18px;background:#D8E7EE;font-size:.85714em;text-align:center;text-decoration:none;zoom:1;-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px;}a.button:hover,a.balloon-button:hover{background-color:#A5CADC;color:#FFF;text-decoration:none;}input[type=text],input[type=password],input[type=email],textarea{background:#FFF;border:1px solid #D9D9D6;padding:7px;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}textarea{resize:vertical;line-height:1.5;}input[type="radio"],input[type="checkbox"]{margin-right:3px;}input.text-s,textarea.text-s{padding:5px;}input.text-l,textarea.text-l{padding:10px;font-size:1.14286em;}.w-10{width:10%;}.w-20{width:20%;}.w-30{width:30%;}.w-40{width:40%;}.w-50{width:50%;}.w-60{width:60%;}.w-70{width:70%;}.w-80{width:80%;}.w-90{width:90%;}.w-100{width:100%;}select{border:1px solid #CCC;height:28px;}.btn,#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{border:none;background-color:#E9E9E6;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;padding:0 12px;height:32px;color:#666;vertical-align:middle;zoom:1;}.btn:hover,#ui-datepicker-div .ui-datepicker-current:hover,#ui-datepicker-div .ui-datepicker-close:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#dbdbd6;}.btn:active,#ui-datepicker-div .ui-datepicker-current:active,#ui-datepicker-div .ui-datepicker-close:active,.btn.active,#ui-datepicker-div .active.ui-datepicker-current,#ui-datepicker-div .active.ui-datepicker-close{background-color:#d6d6d0;}.btn:disabled,#ui-datepicker-div .ui-datepicker-current:disabled,#ui-datepicker-div .ui-datepicker-close:disabled{background-color:#f7f7f6;cursor:default;}.btn:disabled,#ui-datepicker-div .ui-datepicker-current:disabled,#ui-datepicker-div .ui-datepicker-close:disabled{color:#999;}.btn-xs,#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{padding:0 10px;height:25px;font-size:13px;}.btn-s{height:28px;}.btn-l{height:40px;font-size:1.14286em;font-weight:bold;}.primary{border:none;background-color:#467B96;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;color:#FFF;}.primary:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#3c6a81;}.primary:active,.primary.active{background-color:#39647a;}.primary:disabled{background-color:#508cab;cursor:default;}.btn-group{display:inline-block;}.btn-warn{border:none;background-color:#B94A48;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;color:#FFF;}.btn-warn:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#a4403f;}.btn-warn:active,.btn-warn.active{background-color:#9c3e3c;}.btn-warn:disabled{background-color:#c1605e;cursor:default;}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active,.btn-link.active{background-color:transparent;}.btn-drop{position:relative;}.dropdown-toggle{padding-right:8px;}.dropdown-menu{list-style:none;position:absolute;z-index:2;left:0;margin:0;padding:0;border:1px solid #D9D9D6;background:#FFF;text-align:left;min-width:108px;display:none;}.dropdown-menu li{white-space:nowrap;}.dropdown-menu li.multiline{padding:5px 12px 12px;}.dropdown-menu a{display:block;padding:5px 12px;color:#666;}.dropdown-menu a:hover{background:#F6F6F3;text-decoration:none!important;}.message{padding:8px 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.message a{font-weight:bold;text-decoration:underline;}.error{background:#FBE3E4;color:#8A1F11;}.error a{color:#8A1F11;}.notice{background:#FFF6BF;color:#8A6D3B;}.notice a{color:#8A6D3B;}.success{background:#E6EFC2;color:#264409;}.success a{color:#264409;}.balloon{display:inline-block;padding:0 4px;min-width:10px;height:14px;line-height:14px;background:#B9B9B6;vertical-align:text-top;text-align:center;font-size:12px;color:#FFF;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}.typecho-pager{list-style:none;float:right;margin:0;padding:0;line-height:1;text-align:center;zoom:1;}.typecho-pager li{display:inline-block;margin:0 3px;height:28px;line-height:28px;}.typecho-pager a{display:block;padding:0 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.typecho-pager a:hover{text-decoration:none;background:#E9E9E6;}.typecho-pager li.current a{background:#E9E9E6;color:#444;}.typecho-head-nav{padding:0 10px;background:#292D33;}.typecho-head-nav a{color:#BBB;}.typecho-head-nav a:hover,.typecho-head-nav a:focus{color:#FFF;text-decoration:none;}#typecho-nav-list{float:left;}#typecho-nav-list ul{list-style:none;margin:0;padding:0;}#typecho-nav-list ul:first-child{border-left:1px solid #383D45;}#typecho-nav-list .root{position:relative;float:left;}#typecho-nav-list .parent a{display:block;float:left;padding:0 20px;border-right:1px solid #383D45;height:36px;line-height:36px;color:#BBB;}#typecho-nav-list .parent a:hover,#typecho-nav-list .focus .parent a,#typecho-nav-list .root:hover .parent a{background:#202328;color:#FFF;text-decoration:none;}#typecho-nav-list .focus .parent a{font-weight:bold;}#typecho-nav-list .child{position:absolute;top:36px;display:none;margin:0;min-width:160px;max-width:240px;background:#202328;z-index:250;}#typecho-nav-list .root:hover .child{display:block;}#typecho-nav-list .child li a{color:#BBB;display:block;padding:0 20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:36px;line-height:36px;}#typecho-nav-list .child li a:hover,#typecho-nav-list .child li a:focus{background:#292D33;color:#FFF;}#typecho-nav-list .child li.focus a{color:#6DA1BB;font-weight:bold;}.typecho-head-nav .operate{float:right;}.typecho-head-nav .operate a{display:inline-block;margin-left:-1px;padding:0 20px;border:1px solid #383D45;border-width:0 1px;line-height:36px;color:#BBB;}.typecho-head-nav .operate a:hover{background-color:#202328;color:#FFF;}.typecho-foot{padding:4em 0 3em;color:#999;line-height:1.8;text-align:center;}.typecho-foot .copyright p{margin:10px 0 0;}.typecho-foot .resource{color:#CCC;}.typecho-foot .resource a{margin:0 3px;color:#999;}.browsehappy{border:none;text-align:center;}.popup{display:none;position:absolute;top:0;left:0;margin:0;padding:8px 0;border:none;width:100%;z-index:10;text-align:center;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.popup ul{list-style:none;margin:0;padding:0;text-align:center;}.popup ul li{display:inline-block;margin-right:10px;}.loading{padding-left:20px!important;background:transparent url(../img/ajax-loader.gif) no-repeat left center;}.typecho-option{list-style:none;margin:1em 0;padding:0;}.typecho-option-submit li{border-bottom:none;}.typecho-option label.typecho-label{display:block;margin-bottom:.5em;font-weight:bold;}.typecho-option label.required:after{content:" *";color:#B94A48;}.typecho-option span{margin-right:15px;}.typecho-option .description{margin:.5em 0 0;color:#999;font-size:.92857em;}.front-archive{padding-left:1.5em;}.profile-avatar{border:1px dashed #D9D9D6;max-width:100%;}.typecho-install{padding-bottom:2em;}.typecho-install-patch{margin-bottom:2em;padding:2em 0;background-color:#292D33;color:#FFF;text-align:center;}.typecho-install-patch ol{list-style:none;margin:3em 0 1em;padding:0;color:#999;}.typecho-install-patch li{display:inline-block;margin:0 .8em;}.typecho-install-patch span{display:inline-block;margin-right:5px;width:20px;height:20px;line-height:20px;border:2px solid #999;text-align:center;border-radius:2em;}.typecho-install-patch li.current{color:#FFF;font-weight:bold;}.typecho-install-patch li.current span{border-color:#FFF;}.typecho-install .typecho-install-body input{width:100%;}.typecho-install-body .typecho-option li{margin:1em 0;}#typecho-welcome{margin:1em 0;padding:1em 2em;background-color:#E9E9E6;}.welcome-board{color:#999;font-size:1.15em;}.welcome-board em{color:#444;font-size:2em;font-style:normal;font-family:Georgia,serif;}#start-link{margin-bottom:25px;padding:0 0 35px;border-bottom:1px solid #ECECEC;}#start-link li{float:left;margin-right:1.5em;}#start-link .balloon{margin-top:2px;}.latest-link li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.latest-link span{display:inline-block;margin-right:4px;padding-right:8px;border-right:1px solid #ECECEC;width:37px;text-align:right;color:#999;}.update-check{font-size:14px;}.typecho-login-wrap{display:table;margin:0 auto;height:100%;}.typecho-login{display:table-cell;padding:30px 0 100px;width:280px;text-align:center;vertical-align:middle;}.typecho-login h1{margin:0 0 1em;}.typecho-login .more-link{margin-top:2em;color:#CCC;}.typecho-login .more-link a{margin:0 3px;}.typecho-page-title h2{margin:25px 0 10px;font-size:1.28571em;}.typecho-page-title h2 a{margin-left:10px;padding:3px 8px;background:#E9E9E6;font-size:.8em;border-radius:2px;}.typecho-page-title h2 a:hover{text-decoration:none;}.typecho-dashboard ul{list-style:none;padding:0;}.typecho-dashboard li{margin-bottom:5px;}.typecho-option-tabs{list-style:none;margin:1em 0 0;padding:0;font-size:13px;text-align:center;}.typecho-option-tabs.fix-tabs{margin-bottom:1em;}.typecho-option-tabs a{display:block;margin-right:-1px;border:1px solid #D9D9D6;padding:0 15px;height:26px;line-height:26px;color:#666;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}.typecho-option-tabs a:hover{background-color:#E9E9E6;color:#666;text-decoration:none;}.typecho-option-tabs li{float:left;}.typecho-option-tabs li:first-child a{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px;border-radius:2px 0 0 2px;}.typecho-option-tabs li:last-child a{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0;border-radius:0 2px 2px 0;}.typecho-option-tabs.right{float:right;}.typecho-option-tabs li.current a,.typecho-option-tabs li.active a{background-color:#E9E9E6;}.typecho-list-operate{margin:1em 0;}.typecho-list-operate input,.typecho-list-operate button,.typecho-list-operate select{vertical-align:bottom;}.typecho-list-operate input[type="checkbox"]{vertical-align:text-top;}.typecho-list-operate .operate{float:left;}.typecho-list-operate .search{float:right;}.typecho-list-operate span.operate-delete,a.operate-delete,.typecho-list-operate span.operate-button-delete,a.operate-button-delete{color:#B94A48;}a.operate-edit{color:#070;}a.operate-reply{color:#545c30;}.typecho-list-operate a:hover{text-decoration:none;}.typecho-list-table-title{margin:1em 0;color:#999;text-align:center;}.typecho-table-wrap{padding:30px;background:#FFF;}.typecho-list-table{width:100%;}.typecho-list-table.deactivate{color:#999;}.typecho-list-table .right{text-align:right;}.typecho-list-table th{padding:0 10px 10px;border-bottom:2px solid #F0F0EC;text-align:left;}.typecho-list-table td{padding:10px;border-top:1px solid #F0F0EC;word-break:break-all;}.typecho-list-table .status{margin-left:5px;color:#999;font-size:.92857em;font-style:normal;}.typecho-list-table tbody tr:hover td{background-color:#F6F6F3;}.typecho-list-table tbody tr.checked td{background-color:#FFF9E8;}.warning{color:#B94A48;}.typecho-list-table tr td .hidden-by-mouse{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;}.typecho-list-table tr:hover td .hidden-by-mouse{filter:progid:DXImageTransform.Microsoft.Alpha(enabled=false);opacity:1;}.comment-reply-content{position:relative;margin:1em 0;padding:0 1em;border:1px solid transparent;background-color:#F0F0EC;}.comment-reply-content:after{position:absolute;right:1em;border:8px solid #F0F0EC;border-color:#F0F0EC #F0F0EC transparent transparent;content:" ";}.comment-meta span,.comment-date{font-size:.92857em;color:#999;}.comment-action a,.comment-action span{margin-right:4px;}.comment-edit label{display:block;}#typecho-respond{padding:10px;display:none;}.typecho-theme-list img{margin:1em 0;max-width:100%;max-height:240px;}.typecho-theme-list cite{font-style:normal;color:#999;}.typecho-theme-list tbody tr.current td{background-color:#FFF9E8;}.typecho-page-main .typecho-option input.text{width:100%;}.typecho-page-main .typecho-option input.num{width:40px;}.typecho-page-main .typecho-option textarea{width:100%;height:100px;}.typecho-page-main .typecho-option .multiline{display:block;margin:.3em 0;}.typecho-page-main .typecho-option .multiline.hidden{display:none;}.typecho-select-theme{height:25px;line-height:25px;margin:15px 0;}.typecho-select-theme h5{color:#E47E00;font-weight:bold;float:left;font-size:14px;width:120px;margin-right:10px;}.typecho-select-theme select{width:150px;}.typecho-edit-theme ul{list-style:none;margin:0;padding:0;}.typecho-edit-theme li{padding:3px 10px;}.typecho-edit-theme .current{background-color:#E6E6E3;}.typecho-edit-theme .current a{color:#444;}.typecho-edit-theme textarea{font-size:.92857em;line-height:1.2;height:500px;}.typecho-post-area .edit-draft-notice{color:#999;font-size:.92857em;}.typecho-post-area .edit-draft-notice a{color:#B94A48;}.typecho-post-area .typecho-label{display:block;margin:1em 0 -0.5em;font-weight:bold;}.typecho-post-area #auto-save-message{display:block;margin-top:.5em;color:#999;font-size:.92857em;}.typecho-post-area .submit .right button{margin-left:5px;}.typecho-post-area .right{float:right;padding-left:24px;}.typecho-post-area .left{float:left;}.typecho-post-area .out-date{border:1px solid #D3DBB3;padding:3px;background:#fff;}.typecho-post-area input.title{font-size:1.17em;font-weight:bold;}.typecho-post-area .url-slug{margin-top:-0.5em;color:#AAA;font-size:.92857em;word-break:break-word;}.typecho-post-area #slug{padding:2px;border:none;background:#FFFBCC;color:#666;}.typecho-post-area #text{resize:none;}#advance-panel{display:none;}#custom-field{margin:1em 0;padding:10px 15px;background:#FFF;}#custom-field.fold table,#custom-field.fold .description{display:none;}#custom-field .description{margin-top:10px;text-align:right;}#custom-field .description button{float:left;}#custom-field p.description{text-align:left;}#custom-field .typecho-label{margin:0;}#custom-field .typecho-label a{display:block;color:#444;}#custom-field .typecho-label a:hover{color:#467B96;text-decoration:none;}#custom-field table{margin-top:10px;}#custom-field td{padding:10px 5px;font-size:.92857em;border-bottom:1px solid #F0F0EC;vertical-align:top;}#custom-field td label{font-size:1em;font-weight:normal;}#custom-field select{height:27px;}.typecho-post-area .is-draft{background:#FFF1A8;}.typecho-post-option .description{margin-top:-0.5em;color:#999;font-size:.92857em;}.category-option ul{list-style:none;border:1px solid #D9D9D6;padding:6px 12px;max-height:240px;overflow:auto;background-color:#FFF;border-radius:2px;}.category-option li{margin:3px 0;}.visibility-option ul,.allow-option ul{list-style:none;padding:0;}.typecho-page-main ul.tag-list{list-style:none;margin:0;padding:20px;background-color:#FFF;}.typecho-page-main ul.tag-list li{display:inline-block;margin:0 0 5px 0;padding:5px 5px 5px 10px;cursor:pointer;}.typecho-page-main ul.tag-list li:hover{background-color:#E9E9E6;}.typecho-page-main ul.tag-list li input{display:none;}.typecho-page-main ul.tag-list li.checked{background-color:#FFFBCC;}.typecho-page-main ul.tag-list li.size-5{font-size:1em;}.typecho-page-main ul.tag-list li.size-10{font-size:1.2em;}.typecho-page-main ul.tag-list li.size-20{font-size:1.4em;}.typecho-page-main ul.tag-list li.size-30{font-size:1.6em;}.typecho-page-main ul.tag-list li.size-0{font-size:1.8em;}.typecho-page-main .tag-edit-link{visibility:hidden;}.typecho-page-main li:hover .tag-edit-link{visibility:visible;}.typecho-attachment-photo{border:1px solid #E6E6E3;max-width:100%;}#upload-panel{border:1px dashed #D9D9D6;background-color:#FFF;color:#999;font-size:.92857em;}#upload-panel.drag{background-color:#FFFBCC;}.upload-area{padding:15px;text-align:center;}#file-list{list-style:none;margin:0 10px;padding:0;max-height:450px;overflow:auto;word-break:break-all;}#file-list li,#file-list .insert{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}#file-list li{padding:8px 0;border-top:1px dashed #D9D9D6;}#file-list .insert{display:block;max-width:100%;}#file-list .file{margin-left:5px;}#file-list .info{text-transform:uppercase;}#btn-fullscreen-upload{visibility:hidden;}.edit-media button{margin-right:6px;}.resize{display:block;margin:2px auto 0;padding:2px 0;border:1px solid #D9D9D6;border-width:1px 0;width:60px;cursor:row-resize;}.resize i{display:block;height:1px;background-color:#D9D9D6;}.tDnD_whileDrag{background-color:#FFFBCC;}.i-edit,.i-delete,.i-exlink,.mime-office,.mime-text,.mime-image,.mime-html,.mime-archive,.mime-application,.mime-audio,.mime-script,.mime-video,.mime-unknow,.i-upload,.i-upload-active{display:inline-block;vertical-align:text-bottom;text-indent:-9999em;background-image:url('../img/icons-s0c4f1c5ae6.png');background-repeat:no-repeat;}.i-edit:hover,.i-delete:hover,.i-exlink:hover,.mime-office:hover,.mime-text:hover,.mime-image:hover,.mime-html:hover,.mime-archive:hover,.mime-application:hover,.mime-audio:hover,.mime-script:hover,.mime-video:hover,.mime-unknow:hover,.i-upload:hover,.i-upload-active:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=75);opacity:.75;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-edit,.i-delete,.i-exlink,.mime-office,.mime-text,.mime-image,.mime-html,.mime-archive,.mime-application,.mime-audio,.mime-script,.mime-video,.mime-unknow,.i-upload,.i-upload-active{-moz-background-size:auto 256px;-o-background-size:auto 256px;-webkit-background-size:auto 256px;background-size:auto 256px;background-image:url('../img/icons-2x-s481937020b.png');}}.i-edit,.i-delete,.i-exlink,.mime-office,.mime-text,.mime-image,.mime-html,.mime-archive,.mime-application,.mime-audio,.mime-script,.mime-video,.mime-unknow{width:16px;height:16px;}.i-upload,.i-upload-active{width:24px;height:24px;}.i-edit{background-position:0 -16px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-edit{background-position:0 -16px;}}.i-delete{background-position:0 0;}.i-upload{background-position:0 -72px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-upload{background-position:0 -72px;}}.i-upload-active{background-position:0 -48px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-upload-active{background-position:0 -48px;}}.i-caret-up,.i-caret-down,.i-caret-left,.i-caret-right{display:inline-block;border-style:solid;border-color:transparent transparent #BBB transparent;border-width:3px 4px 5px;}.i-caret-down{border-color:#BBB transparent transparent transparent;border-width:5px 4px 3px;}.i-caret-left{border-color:transparent #BBB transparent transparent;border-width:4px 5px 4px 3px;}.i-caret-right{border-color:transparent transparent transparent #BBB;border-width:4px 3px 4px 5px;}.i-exlink{background-position:0 -32px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-exlink{background-position:0 -32px;}}.mime-office{background-position:0 -176px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-office{background-position:0 -176px;}}.mime-text{background-position:0 -208px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-text{background-position:0 -208px;}}.mime-image{background-position:0 -160px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-image{background-position:0 -160px;}}.mime-html{background-position:0 -144px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-html{background-position:0 -144px;}}.mime-archive{background-position:0 -112px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-archive{background-position:0 -112px;}}.mime-application{background-position:0 -96px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-application{background-position:0 -96px;}}.mime-audio{background-position:0 -128px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-audio{background-position:0 -128px;}}.mime-script{background-position:0 -192px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-script{background-position:0 -192px;}}.mime-video{background-position:0 -240px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-video{background-position:0 -240px;}}.mime-unknow{background-position:0 -224px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-unknow{background-position:0 -224px;}}.i-logo,.i-logo-s{width:169px;height:40px;display:inline-block;background:url("../img/typecho-logo.svg") no-repeat;text-indent:-9999em;-moz-background-size:auto 40px;-o-background-size:auto 40px;-webkit-background-size:auto 40px;background-size:auto 40px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=15);opacity:.15;}.i-logo:hover,.i-logo-s:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=20);opacity:.2;}.i-logo-s{width:26px;height:26px;-moz-background-size:auto 26px;-o-background-size:auto 26px;-webkit-background-size:auto 26px;background-size:auto 26px;}.editor{margin-bottom:-0.5em;}.wmd-button-row{list-style:none;margin:0;padding:0;height:26px;line-height:1;}.wmd-button-row li{display:inline-block;margin-right:4px;padding:3px;cursor:pointer;vertical-align:middle;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.wmd-button-row li:hover{background-color:#E9E9E6;}.wmd-button-row li.wmd-spacer{height:20px;margin:0 10px 0 6px;padding:0;width:1px;background:#E9E9E6;cursor:default;}#wmd-button-row span{display:block;width:20px;height:20px;background:transparent url(../img/editor.png) no-repeat;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#wmd-button-row span{background-image:url(../img/editor@2x.png);-moz-background-size:320px auto;-o-background-size:320px auto;-webkit-background-size:320px auto;background-size:320px auto;}}.wmd-edittab{float:right;margin-top:3px;font-size:.92857em;}.wmd-edittab a{display:inline-block;padding:0 8px;margin-left:5px;height:20px;line-height:20px;}.wmd-edittab a:hover{text-decoration:none;}.wmd-edittab a.active{background:#E9E9E6;color:#999;}.wmd-hidetab{display:none;}.wmd-visualhide{visibility:hidden;}.wmd-prompt-background{background-color:#000;}.wmd-prompt-dialog{position:fixed;z-index:1001;top:50%;left:50%;margin-top:-95px;margin-left:-200px;padding:20px;width:360px;background:#F6F6F3;}.wmd-prompt-dialog p{margin:0 0 5px;}.wmd-prompt-dialog form{margin-top:10px;}.wmd-prompt-dialog input[type="text"]{margin-bottom:10px;width:100%;}.wmd-prompt-dialog button{margin-right:10px;}#wmd-preview{background:#FFF;margin:1em 0;padding:0 15px;word-wrap:break-word;overflow:auto;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}#wmd-preview img{max-width:100%;}#wmd-preview code,#wmd-preview pre{padding:2px 4px;background:#F3F3F0;font-size:.92857em;}#wmd-preview code{color:#C13;}#wmd-preview pre{padding:1em;}#wmd-preview pre code{padding:0;color:#444;}#wmd-preview blockquote{margin:1em 1.5em;padding-left:1.5em;border-left:4px solid #E9E9E6;color:#777;}#wmd-preview hr{margin:2em auto;width:100px;border:1px solid #E9E9E6;border-width:2px 0 0 0;}#wmd-preview .summary:after{display:block;margin:2em 0;background:#FFF9E8;color:#ce9900;font-size:.85714em;text-align:center;content:"- more -";}@keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}@-moz-keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}@-webkit-keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}@-o-keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}.fullscreen #wmd-button-bar,.fullscreen #text,.fullscreen #wmd-preview,.fullscreen .submit{position:absolute;top:0;width:50%;background:#FFF;z-index:999;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.fullscreen #wmd-button-bar{left:0;padding:13px 20px;border-bottom:1px solid #F3F3F0;z-index:1000;}.fullscreen #text{top:53px;left:0;padding:20px;border:none;outline:none;}.fullscreen #wmd-preview{top:53px;right:0;margin:0;padding:5px 20px;border:none;border-left:1px solid #F3F3F0;background:#F6F6F3;overflow:auto;}.fullscreen #wmd-preview code,.fullscreen #wmd-preview pre{background:#F0F0EC;}.fullscreen .submit{right:0;margin:0;padding:10px 20px;border-bottom:1px solid #F3F3F0;}.fullscreen #upload-panel{-webkit-box-shadow:0 4px 16px rgba(0,0,0,0.225);box-shadow:0 4px 16px rgba(0,0,0,0.225);border-style:solid;}.fullscreen #tab-files{position:absolute;top:52px;right:-1px;width:280px;z-index:1001;animation:fullscreen-upload .5s;-moz-animation:fullscreen-upload .5s;-webkit-animation:fullscreen-upload .5s;-o-animation:fullscreen-upload .5s;}.fullscreen .wmd-edittab,.fullscreen .typecho-post-option,.fullscreen .title,.fullscreen .url-slug,.fullscreen .typecho-page-title,.fullscreen .typecho-head-nav,.fullscreen .message{display:none;}.fullscreen .wmd-hidetab{display:block;}.fullscreen .wmd-visualhide,.fullscreen #btn-fullscreen-upload{visibility:visible;}#ui-datepicker-div{display:none;margin-top:-1px;padding:10px;border:1px solid #D9D9D6;background:#FFF;}.ui-timepicker-div .ui-widget-header{margin-bottom:8px;}.ui-timepicker-div dl{text-align:left;}.ui-timepicker-div dl dt{float:left;clear:left;}.ui-timepicker-div dl dd{margin:0 0 10px 40%;}.ui-tpicker-grid-label{background:none;border:none;margin:0;padding:0;}#ui-datepicker-div .ui-datepicker-header{margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #EEE;}#ui-datepicker-div .ui-datepicker-prev{float:left;cursor:pointer;}#ui-datepicker-div .ui-datepicker-next{float:right;cursor:pointer;}#ui-datepicker-div .ui-datepicker-title{font-weight:bold;text-align:center;}#ui-datepicker-div .ui-datepicker-calendar th{line-height:24px;}#ui-datepicker-div .ui-datepicker-calendar a{display:block;width:30px;background-color:#F3F3F0;line-height:24px;text-align:center;}#ui-datepicker-div .ui-datepicker-calendar a:hover{background-color:#E9E9E6;text-decoration:none;}#ui-datepicker-div .ui-datepicker-today a{background-color:#E9E9E6;color:#444;}#ui-datepicker-div .ui-datepicker-current-day a{background-color:#467B96!important;color:#FFF;}#ui-datepicker-div .ui-timepicker-div{margin-top:20px;border-top:1px solid #EEE;}#ui-datepicker-div .ui-slider{position:relative;margin-top:18px;border:1px solid #E9E9E6;background-color:#F6F6F3;height:4px;}#ui-datepicker-div .ui-slider .ui-slider-handle{position:absolute;top:-7px;margin-left:-5px;z-index:2;width:10px;height:16px;background-color:#467B96;}#ui-datepicker-div .ui-datepicker-buttonpane{padding-top:10px;border-top:1px solid #EEE;}#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{float:left;}#ui-datepicker-div .ui-datepicker-close{float:right;}.ui-effects-transfer{border:2px dotted #ccc;}ul.token-input-list{list-style:none;margin:0;padding:0 4px;min-height:32px;border:1px solid #D9D9D6;cursor:text;z-index:999;background-color:#FFF;clear:left;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}ul.token-input-list li{margin:4px 0;}ul.token-input-list li input{padding:0;border:0;width:100%;-webkit-appearance:caret;}li.token-input-token{padding:0 6px;height:27px;line-height:27px;background-color:#F3F3F0;cursor:default;font-size:.92857em;text-align:right;white-space:nowrap;}li.token-input-token p{float:left;display:inline;margin:0;}li.token-input-token span{color:#BBB;font-weight:bold;cursor:pointer;}li.token-input-selected-token{background-color:#E9E9E6;}li.token-input-input-token{padding:0 4px;}div.token-input-dropdown{position:absolute;background-color:#FFF;overflow:hidden;border:1px solid #D9D9D6;border-top-width:0;cursor:default;z-index:1;font-size:.92857em;}div.token-input-dropdown p{margin:0;padding:5px 10px;color:#777;font-weight:bold;}div.token-input-dropdown ul{list-style:none;margin:0;padding:0;}div.token-input-dropdown ul li{padding:4px 10px;background-color:#FFF;}div.token-input-dropdown ul li.token-input-dropdown-item{background-color:#FFF;}div.token-input-dropdown ul li em{font-style:normal;}div.token-input-dropdown ul li.token-input-selected-dropdown-item{background-color:#467B96;color:#FFF;}.hidden{display:none;}.sr-only{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.sr-only.focusable:active,.sr-only.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto;}.invisible{visibility:hidden;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields-js.php" new file mode 100644 index 0000000..b1011f7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields-js.php" @@ -0,0 +1,44 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields.php" new file mode 100644 index 0000000..6fd85b2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/custom-fields.php" @@ -0,0 +1,73 @@ + +getFieldItems() : $page->getFieldItems(); +$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaultFieldItems(); +?> +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
render(); ?>render(); ?>
+ + + + + + + + + + +
+ + + + + + + + + + +
+
+ + 甯姪鏂囨。'); ?> +
+
diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/editor-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/editor-js.php" new file mode 100644 index 0000000..949305c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/editor-js.php" @@ -0,0 +1,330 @@ + +markdown): ?> + + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/extending.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/extending.php" new file mode 100644 index 0000000..be228ef --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/extending.php" @@ -0,0 +1,13 @@ +get('panel'); +$panelTable = unserialize($options->panelTable); + +if (!isset($panelTable['file']) || !in_array(urlencode($panel), $panelTable['file'])) { + throw new Typecho_Plugin_Exception(_t('椤甸潰涓嶅瓨鍦'), 404); +} + +list ($pluginName, $file) = explode('/', trim($panel, '/'), 2); + +require_once $options->pluginDir($pluginName) . '/' . $panel; diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload-js.php" new file mode 100644 index 0000000..133dde3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload-js.php" @@ -0,0 +1,208 @@ + +have()) { + $fileParentContent = $post; +} else if (isset($page) && $page instanceof Typecho_Widget && $page->have()) { + $fileParentContent = $page; +} + +$phpMaxFilesize = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0; + +if (preg_match("/^([0-9]+)([a-z]{1,2})$/i", $phpMaxFilesize, $matches)) { + $phpMaxFilesize = strtolower($matches[1] . $matches[2] . (1 == strlen($matches[2]) ? 'b' : '')); +} +?> + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload.php" new file mode 100644 index 0000000..d276094 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/file-upload.php" @@ -0,0 +1,30 @@ + + +cid : $page->cid; + + if ($cid) { + Typecho_Widget::widget('Widget_Contents_Attachment_Related', 'parentId=' . $cid)->to($attachment); + } else { + Typecho_Widget::widget('Widget_Contents_Attachment_Unattached')->to($attachment); + } +} +?> + +
+
鎴栬 %s閫夋嫨鏂囦欢涓婁紶%s', '', ''); ?>
+ +
+ diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/footer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/footer.php" new file mode 100644 index 0000000..57c0084 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/footer.php" @@ -0,0 +1,6 @@ + + + +end(); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/form-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/form-js.php" new file mode 100644 index 0000000..7c52d69 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/form-js.php" @@ -0,0 +1,26 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/header.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/header.php" new file mode 100644 index 0000000..50e3c6e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/header.php" @@ -0,0 +1,31 @@ +adminStaticUrl('css')) . '"> + + +'; + +/** 娉ㄥ唽涓涓垵濮嬪寲鎻掍欢 */ +$header = Typecho_Plugin::factory('admin/header.php')->header($header); + +?> + + + + + + + <?php _e('%s - %s - Powered by Typecho', $menu->title, $options->title); ?> + + + + > + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/ajax-loader.gif" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/ajax-loader.gif" new file mode 100644 index 0000000000000000000000000000000000000000..32666dadf1075fc052665dbe0924c7c5f08e8009 GIT binary patch literal 847 zcmZ?wbhEHb6krfw_`<;O^XK=OGiQGL_GRtbwWm&G!$-o+*pwO3+Id7?fNRFabOTwzP zGenL}lrnAjz;?5vA-b2vhAFc(V4^@PV`uB4zBQUU4W3ay7O5nC*yS;4fdgv-pu5*<>|Hn(-{gjt4u>v0=H?uP};XReTu;fv2}|U_B&<^oL6>a z;I;`cH(Wp`0?>!bpC@SC67kUDIuanlsk@}z@V#*(mzDEr zL+>pfElm&EJoIL$+}v2nz#*{j;u+Q(S=@S!;Vuq$_#zn=8F+Atwdxr3IbGrE%NFo@ z_Le8q-n5*VrA8&2H%616ryHxKL6Bf=P?*AGD00+cMYFRU+Zyp>+1*WZ7!{qKB-k@F zZfDvzLD{v*qRJ^Sq9J*A?xHeoA*F>1FAptFXiRA14Ru>4S#(E|Z)w46&ChB78?agf z@*6PrRygpu8VVdbDUlm1aeSwQN6&?}8yf5aT`VR{3ePokB$l};CVDVL1kd1T%r#xI zl`+Z1V+$L@s-1~RI$V9K4F$$x$w!nosQ=)7qr`4vW*(rX6`|jt(bKDf)zWyVr5-?! zaV&E%VK}tun4^;CM2-!!7AA1m<+ZYU8mM$g^vZdgZ{qdPVL#ZZThgr6)a)uHBCzDJ t?!|-^9SH}RehL_Na!72L?$FQYY@WfPZ^)9y8l&0Wqo&AU4N9J1002N?5e5JN literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/editor.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/editor.png" new file mode 100644 index 0000000000000000000000000000000000000000..aeee188c6a30fcbfb54d2f0e846712e10d4873c8 GIT binary patch literal 2567 zcmZ{mc{J4f8^_0tVQiPtj4jKI$Pz9(xwaUZ(M+KcvQ$VY5z$y8nK6_ZgzUReA-UtK z$d4>hs6-)431vvBEJ>E`{nYoIIZo&NK7V}9^Sqw-^Zq>FInN)%qT22i6P6Q(!C+z( zGVve`#zz3LDGC8@+;CbZ3>V>8PU62gAH$zYY2N;3_s?a150Vz0u^U`0cpWhAw=;j4L2?zwC7!v=+ zf73%L^a|Ab%j2g%RDuFt%&YRmkl?ozdXzT?RE117$K?Bla$tks(+=9&!}#C`1V2Ag zKoErz5*85^6Z=D40xh`(gO!q&mXVd)Dle~~sHB9$ z$GyD0eNLP_>3ho0-~V*rnV_KH;IlMZNN8x-xroTf^XH>3MAPXECOaYVa&pR*^vtZB zy!?W~;*zp!*KbsDYW}IcbGNSk-v1h#np;{Qw0Asw)Yui zOul``oq0d|aqjcN;?nZBmG7%-8$a%4uH1pa1VkxB3x{yGxxDXZ(?~LpnkgE-r-X+v zBQYfdXPo`{D%gVE6LuC76;k4VpsT_OH*Z;{9y%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|$J zelS1=9johXtb!)XFNdowT8tbak}Z{XiqN7`q-aksT8@-ORBA-fxJhQH5p25s#>Ua{ zE6&o^*Og0Jaa6HX=2~-b43eg3Yd$ZHru1vHsB@~eV|6&;BNJ7vU{AHAM%6smi2gHq)$ literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/editor@2x.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/editor@2x.png" new file mode 100644 index 0000000000000000000000000000000000000000..b361ff6ec629a3b80309bac6e218dde04f54d950 GIT binary patch literal 6501 zcmZ|Ubx@T}+W_$Ua1L(j^E8Qqm-z1r5vt0v*qCIP003aiy_8Z102IW-zb6#(@a;~2 ze+mGkY;scKnx50UnSLJ#J1>6<7@c}XBi=!wEC|{V6HW2(FqVtQot{jzcL#tm2L1w` zmsO<%L*)UYIdjwhEYFO^Q(S3?MZqi|Ns_CrPGeoTf?HTf7}zc^@sbb>S@7rj!{s4V z?eJ$*xQT1_I5T%D*I^d&R7g zC?@W9jm>Y8?U*#_9+Z1rFX&IF@9w;65D-_1CqipHEgM(80^H_1$sXtnB<}>>*Usju zEP5R1Pr-~UTL(VWncgr%%Mobz49mrIshNBin0*Oy14(W zw41jPd}kW)h3ZQvYD;EMi~XwdpZz@r;g>NLezN_xTJK91jhH%&^X)r(OYR_qLNXjL zc(Ls5WLDf-97Zo_#cs0`fs^}*Pcc|f=cmK(xkI$>@}3Tt%$_nl1L&_w4_XjKH~Z5t z>-eNCkqy#sz=okepf^?QT->)_?C!25%Wqy_(ekcP66hj8z$3`9%K0$+SEv;w0Qs?w zeaq=I3%-(+nV@r!!!NY#&gnnC4jq{`owi2Xsmi0Y(wS#nFE$dIeQxtzV>COjKwcRJ znb(ay$~t;6n5EM*5%C!0W4^2q^@i*C9hB`wgVZ&C58O8I;WC*r@y}*u*oLRlov5Gh zX54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n*t2(4lICRZ9Qc`s#agxnG8gZ?Is z5b$-FiyvU*`3|4s1$hwsO%$@5oFgd+16{Bh2g9bjsUEl9tf&C>hngzYuxFwF1@+DA A=l}o! literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/icons-s0c4f1c5ae6.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/icons-s0c4f1c5ae6.png" new file mode 100644 index 0000000000000000000000000000000000000000..b82a6daa93ed669120f333ef5e5d735bb7a394ef GIT binary patch literal 2039 zcmciDc~Dc=9>DQLkg$udpeS{PqJUZpb$kW z0xFA@&0r)@B?x6{g_I={Hh}=LL}F+KLRsq>N8paNRl|8iq03bk7PPQuaL8SozI}*-0x*}z-Te&^f3%{us&N6c28HMsr zMfb>@j^rALcY}jogQEt)#6Ad_XG-Lml4J(9konsNp)q_Y=?#=Lu#FET4?xL$C}ltf z7Ty8-t`8RT21b(M!$^ZLGXKAk&HqOB;THZUgD}cx;4yu0GJo43oczxyJUE5_xj{JP zGgdg7EjiDYl4~2AhalfVkQoTsVhaOF%t2Cek(4}S?0+zjvSHj76!{h^HWw9}w~c|4 zO}4qYxzT8}jEs!z>})!ne)Chgxw(0tcl)2a^M5S=e^C_*#bh#Bm~ZMa=z4o}eSJL} zg<@mSY7b^ZqO;g*LFtwv!ycwNXy|h}{@QN$gFnB2PsA4vD56>-2)?pFX zAGNL#QaY#RrHUSo)>cOovK+p$&%tq6qi!oUp0uuY=8{xSK}BOPNL|ZFRolSSY>%;{ zrw=|jCIy1Db8_+U@(U+KQxj9u9#&S>FdLd)wYGJ3j|rycM9Y%34cYNv{<2M;R5x~T z`-kU+;-%H~P3ayTt^NTMuy{a)QMuceCHlWEdoC2u6wbieNA1E<&Nt+d5m zy3HRDy7;7VS&i^3D=`%Ffo^={sx|mBDtpWsI1Ikc`xS@#vFZI|XRFm|Hn|WuiOR zj@CZ7lbD9}#%feT4F#7r%7ch|%kA1=_JoHHi{4H zaBq&gRH_0U8IDT&G*wC|#30|wUHvAHjL;`AJPOl5R<`;@&yr~!8`diDiDT~T$4;bx z-4E(LErPy-0w?z+#$~yXLZ~*4>xr$iWV6_QRreUUX77Ph7DSvr87dH!|NNJaDtq{z zFv~G1PSl_^zS4KBvyR!<7JT%#w%s04UgK!xJ@#MxF#8kfl=u28BS3qAtxtZ{?h4*$h|eVO>c;a+F-qT? zX*>Lm2=fvZi-_@P>|9Avl8G1h$B79L@a1DY=3jS@97q<5gz9DXpnzSR!%xaX={R4| z5BHZ@a_c!ujPg~~OXzZs|3c-xh{_qEK8UHK8iH7K4}MkU?m?Jk`5V1BIW}UcW)abF09TR#hBOz4O2xfjN=_fXucWfr6}>sj z5qx__{EPQY3e$(cY71Dpy=!j#L11?u#&FDk4B7Tui-Wnk1*ZA&P7k?{yp@d%i#Yl5 ztMFd$>aZK9Bg2eQ>{n|c|)BY_}y(b`%)|rEcN`3`O z6c9C$XK!2p3liO4vjP}W9ksU>t{f;SD?{%fOK2NdR(`~F27kzKlA|1kLs_L89yIJC znvPj64i%KzXfS!r=0?KH8yC;kuuGMPaaz2(tG@D!xM*NYTL>yZhb#UWD-o4`@w7v} zr_dw*1bsHK@cAW$J4Fd5Gx#|J0U4pSSsR8?GJawIe#EEw%un~;Q-6VEsSx2oY63jl zQu`ZQd1tQ1$*?KdzM8>m&X7@X2=48HM}!*}k29!&x)W9A6${_L7+RSRlDrg*JTttI z9N!ZKkt_uy7%V@F2e(d+cKmte+|edR?De@kz09WdlFE3!l=JVf`SR@&7NsJ)3HX(B VV7G*;*uVAr#vq*$RW`V5{|1TZ21Eb= literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/noscreen.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/img/noscreen.png" new file mode 100644 index 0000000000000000000000000000000000000000..67b7a6a84c202ba91d92b14539635f84459031dd GIT binary patch literal 1187 zcmeAS@N?(olHy`uVBq!ia0y~yV4MJCKjdHrk{2_C^?;OdfKQ0)%$YOSu3a;4-n^?< zFF$$m@ZiDy+qZ99ym-;em(T9szjN!>jnk)3?%A{Z*s&vz7V)>afXL_FRxyr!6 zqV4J87*Y}U_U7rl+Xey-7az{9`u%_Zwy=y@3GM}3UMQu$yIZPM!66?K6m`;GONx<2 zfC-3N7#NX|q5}ge;t+5^LLd!rgrp5<1eLUjA7VPeuhk*p@XxV<;n5v_CdL#|PJ0d( z0cH+`{R$2-9Kq*`4b;ls|Gq3Xe{t@qU8?iMf5%j_B%j&k^WHzY%=o(h&0fx@{8@{( zz2+57xn(zJ{Tp8;HJjh}9h*8n@2)95Q~GN0o~YV)vnSW2{_Q^QrFqrg+U3YxhPtVj z;=WvQ$qkq0^7!$t#_?V+Ls7?<_)jH%lMG*mymD3h{p)1llO7x6=L-8AdiFT@&D_$K zu{36lTGsAc0S?#BKbPiHIr(rN$LfwF-}delPS{+3|Ip*tO3z=-z0LMt)l_^!sEXC| z)8~_1xh-FJ-dktRB3S*n=CO^l({JyBt}8Rwnx_lCe0MkONco(ycNMo21aF?c61_3b z|4Z4{g}amf7wp^U@Je{cy{t7REgF+{F^f((w)yW_>08<7gSQ6hR~7BG?Pi*pHz!|Z z!eYL@Pha(v%&tHC)w(4+X`St<+`Xc+rcW>1T&%QuUQB+z^t<`_1_GD&pPIjT?{0Tn zE(g;ITYhYRwyr|DiF5rU&xPt$yKfb|uW@b;nO=7z>dDOBeVlQh*h;u>gy9Gmt2M=d(N)8>zsVD_Hx$g!-q@4wI;}U`{njas3dE%Cx=?^2mJmGT5-BG@8)fVgR zJ#0bCx0;m8@vqcP-SFzZ_PyLsdaq83cHArYU$bmZlFtO2w?$<+cI7`OJki-V_gQS* zbgc + + typecho-logo + Created with Sketch (http://www.bohemiancoding.com/sketch) + + + + + + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/index.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/index.php" new file mode 100644 index 0000000..1ee87fc --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/index.php" @@ -0,0 +1,159 @@ + +
+
+ +
+
+

%s 绡囨枃绔, 骞舵湁 %s 鏉″叧浜庝綘鐨勮瘎璁哄湪 %s 涓垎绫讳腑.', + $stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?> +

+ + + + +
+

+ → + +

+
+ +
+ + + + + + +
+
+
+ + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/Moxie.swf" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/Moxie.swf" new file mode 100644 index 0000000000000000000000000000000000000000..6493572bdf005ad7765d58f79f2ef65660fba931 GIT binary patch literal 28902 zcmV(}K+wNKS5pe+%K!j)+SI&xd{agDKYnNK+}zxxOIo0m0$MbJV1R-f-~y#>pcNXV zEdpAarAbpwo0_C7KA-1#07Y>Z7u>aM?&7|0xbNDu0`B|1@4NQ*K68^aMSMP=&+qm9 z{_(Axxie>G&di)S+swUjxgy?GltF71rI;y|1;Z3Y`S+k_n4%mSYYt7DU+FGg-WF+( zPebXjG2uj_W7@=t%a$#hux$Sc(OApGNmHjzome(`;^fKW(PDgjMSH@xe0+O+?=go< z0+qpdAlBNEXpOd)QrYK^b|wxRGbTl~IglaR(HV{4XIC}H4zCOUfvw_2TR?N z;PTP~O3VBE%hqNSYTVpE(ZjQr>7(8g0@1dK9kFP0X8>~wft2i=-GxYWbowK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!$@BGR0+ZxE3QNqe4%{8`ezQA8#t?VCj8+@yW8hM5xF2~FA|XpllEc}xhQGhCL;eMX)h5|YVD_>6_c>*N|v;j3JImW zT}Uly-yx))w3mq~#uP2_5Y%tBK$JTLqTdBl5@e0R@gse&04+>eEv^NV`m$V-e^0cJ=FbMrg`w>6)8q5XC zyoJiJl}flx$Y9dmPPy-(ydI@o9uqR0v>zu5PY5|GX+J4sebU}39#S|Sn6C(#Ga*!flKq9vlfL|o=Ap|cO z9($><4-5N&od0C>h0JsQlSk#9DRX~!&}etiOzrd?*{n7(o4q`n{pW0UhmznP zqXq|23G0JZnI-Vt25mZr#;g_5wG{INM-PDgcPq3?`FnWMEAy{tPEi4hU5Tq4^M+yKuaHyN>xqdKy^&r|FLF0Qb~GJ0B1P zV+1pcU>spS;Gm!QY3{kcl7W7ySu=RA2kV(OKt}}mQuHx5UHd*MejecX4YX;bE>0h` z0-Q5*WwyRxe(`k`dX}T|hBBR^(M!qD_l8OvNMjqgssSK3uXR%K=lCftagZANJk`+B zE==M*hHYs-eTveTd+9Iopf1-u({g|+BO)(j-@Hg6ru{>Rjo!dJyFT$T#$@Xt84i=v9Xo6=Z-(rw(fY)$MmoWOMwl3*f z2JlHZZV~ce@w)MX-+i0B?vwS27jeIOk(WaE{SPo?7SBlEgBt{Z36~ z1;4MnX8>aE)Y|XTR6oPd@SYfR7wMf9m*B8pf(N}4SoMiRSb`(|EzfezPHTzfnEEK! zJ+~OSbF^dJ`+zT=iC%!`p-|12{DpLL{%~y^ETo5#aw&Q+4_yAge*4R-1Ct>1{{SIf F8yMhWOBnzF literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/diff.js" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/diff.js" new file mode 100644 index 0000000..e028122 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/diff.js" @@ -0,0 +1 @@ +function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1000;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}var DIFF_DELETE=-1;var DIFF_INSERT=1;var DIFF_EQUAL=0;diff_match_patch.Diff;diff_match_patch.prototype.diff_main=function(b,a,d,f){if(typeof f=="undefined"){if(this.Diff_Timeout<=0){f=Number.MAX_VALUE}else{f=(new Date).getTime()+this.Diff_Timeout*1000}}var i=f;if(b==null||a==null){throw new Error("Null input. (diff_main)")}if(b==a){if(b){return[[DIFF_EQUAL,b]]}return[]}if(typeof d=="undefined"){d=true}var j=d;var e=this.diff_commonPrefix(b,a);var h=b.substring(0,e);b=b.substring(e);a=a.substring(e);e=this.diff_commonSuffix(b,a);var c=b.substring(b.length-e);b=b.substring(0,b.length-e);a=a.substring(0,a.length-e);var g=this.diff_compute_(b,a,j,i);if(h){g.unshift([DIFF_EQUAL,h])}if(c){g.push([DIFF_EQUAL,c])}this.diff_cleanupMerge(g);return g};diff_match_patch.prototype.diff_compute_=function(c,b,q,p){var j;if(!c){return[[DIFF_INSERT,b]]}if(!b){return[[DIFF_DELETE,c]]}var m=c.length>b.length?c:b;var d=c.length>b.length?b:c;var f=m.indexOf(d);if(f!=-1){j=[[DIFF_INSERT,m.substring(0,f)],[DIFF_EQUAL,d],[DIFF_INSERT,m.substring(f+d.length)]];if(c.length>b.length){j[0][0]=j[2][0]=DIFF_DELETE}return j}if(d.length==1){return[[DIFF_DELETE,c],[DIFF_INSERT,b]]}var a=this.diff_halfMatch_(c,b);if(a){var l=a[0];var h=a[1];var o=a[2];var n=a[3];var e=a[4];var k=this.diff_main(l,o,q,p);var g=this.diff_main(h,n,q,p);return k.concat([[DIFF_EQUAL,e]],g)}if(q&&c.length>100&&b.length>100){return this.diff_lineMode_(c,b,p)}return this.diff_bisect_(c,b,p)};diff_match_patch.prototype.diff_lineMode_=function(d,c,n){var k=this.diff_linesToChars_(d,c);d=k.chars1;c=k.chars2;var e=k.lineArray;var g=this.diff_main(d,c,false,n);this.diff_charsToLines_(g,e);this.diff_cleanupSemantic(g);g.push([DIFF_EQUAL,""]);var b=0;var m=0;var l=0;var i="";var h="";while(b=1&&l>=1){g.splice(b-m-l,m+l);b=b-m-l;var k=this.diff_main(i,h,false,n);for(var f=k.length-1;f>=0;f--){g.splice(b,0,k[f])}b=b+k.length}l=0;m=0;i="";h="";break}b++}g.pop();return g};diff_match_patch.prototype.diff_bisect_=function(n,l,A){var v=n.length;var g=l.length;var h=Math.ceil((v+g)/2);var r=h;var o=2*h;var e=new Array(o);var b=new Array(o);for(var m=0;mA){break}for(var k=-z+s;k<=z-p;k+=2){var q=r+k;var y;if(k==-z||(k!=z&&e[q-1]v){p+=2}else{if(f>g){s+=2}else{if(i){var a=r+B-k;if(a>=0&&a=w){return this.diff_bisectSplit_(n,l,y,f,A)}}}}}}for(var j=-z+u;j<=z-t;j+=2){var a=r+j;var w;if(j==-z||(j!=z&&b[a-1]v){t+=2}else{if(c>g){u+=2}else{if(!i){var q=r+B-j;if(q>=0&&q=w){return this.diff_bisectSplit_(n,l,y,f,A)}}}}}}}return[[DIFF_DELETE,n],[DIFF_INSERT,l]]};diff_match_patch.prototype.diff_bisectSplit_=function(d,c,i,h,k){var f=d.substring(0,i);var b=c.substring(0,h);var e=d.substring(i);var a=c.substring(h);var g=this.diff_main(f,b,false,k);var j=this.diff_main(e,a,false,k);return g.concat(j)};diff_match_patch.prototype.diff_linesToChars_=function(g,e){var d=[];var a={};d[0]="";function f(m){var k="";var i=0;var l=-1;var j=d.length;while(le){b=b.substring(g-e)}else{if(gb.length?c:b;var d=c.length>b.length?b:c;if(j.length<4||d.length*2=v.length){return[s,q,y,x,z]}else{return null}}var g=k(j,d,Math.ceil(j.length/4));var f=k(j,d,Math.ceil(j.length/2));var a;if(!g&&!f){return null}else{if(!f){a=g}else{if(!g){a=f}else{a=g[4].length>f[4].length?g:f}}}var i,h,m,l;if(c.length>b.length){i=a[0];h=a[1];m=a[2];l=a[3]}else{m=a[0];l=a[1];i=a[2];h=a[3]}var e=a[4];return[i,h,m,l,e]};diff_match_patch.prototype.diff_cleanupSemantic=function(m){var n=false;var l=[];var e=0;var f=null;var a=0;var k=0;var j=0;var i=0;var h=0;while(a0?l[e-1]:-1;k=0;j=0;i=0;h=0;f=null;n=true}}a++}if(n){this.diff_cleanupMerge(m)}this.diff_cleanupSemanticLossless(m);a=1;while(a=c){if(d>=g.length/2||d>=b.length/2){m.splice(a,0,[DIFF_EQUAL,b.substring(0,d)]);m[a-1][1]=g.substring(0,g.length-d);m[a+1][1]=b.substring(d);a++}}else{if(c>=g.length/2||c>=b.length/2){m.splice(a,0,[DIFF_EQUAL,g.substring(0,c)]);m[a-1][0]=DIFF_INSERT;m[a-1][1]=b.substring(0,b.length-c);m[a+1][0]=DIFF_DELETE;m[a+1][1]=g.substring(c);a++}}a++}a++}};diff_match_patch.prototype.diff_cleanupSemanticLossless=function(i){function c(r,y){if(!r||!y){return 6}var t=r.charAt(r.length-1);var s=y.charAt(0);var x=t.match(diff_match_patch.nonAlphaNumericRegex_);var w=s.match(diff_match_patch.nonAlphaNumericRegex_);var o=x&&t.match(diff_match_patch.whitespaceRegex_);var n=w&&s.match(diff_match_patch.whitespaceRegex_);var q=o&&t.match(diff_match_patch.linebreakRegex_);var p=n&&s.match(diff_match_patch.linebreakRegex_);var v=q&&r.match(diff_match_patch.blanklineEndRegex_);var u=p&&y.match(diff_match_patch.blanklineStartRegex_);if(v||u){return 5}else{if(q||p){return 4}else{if(x&&!o&&n){return 3}else{if(o||n){return 2}else{if(x||w){return 1}}}}}return 0}var a=1;while(a=e){e=d;g=m;h=l;f=k}}if(i[a-1][1]!=g){if(g){i[a-1][1]=g}else{i.splice(a-1,1);a--}i[a][1]=h;if(f){i[a+1][1]=f}else{i.splice(a+1,1);a--}}}a++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/;diff_match_patch.prototype.diff_cleanupEfficiency=function(g){var i=false;var f=[];var c=0;var d=null;var a=0;var h=false;var j=false;var b=false;var e=false;while(a0?f[c-1]:-1;b=e=false}i=true}}a++}if(i){this.diff_cleanupMerge(g)}};diff_match_patch.prototype.diff_cleanupMerge=function(h){h.push([DIFF_EQUAL,""]);var g=0;var f=0;var e=0;var c="";var b="";var a;while(g1){if(f!==0&&e!==0){a=this.diff_commonPrefix(b,c);if(a!==0){if((g-f-e)>0&&h[g-f-e-1][0]==DIFF_EQUAL){h[g-f-e-1][1]+=b.substring(0,a)}else{h.splice(0,0,[DIFF_EQUAL,b.substring(0,a)]);g++}b=b.substring(a);c=c.substring(a)}a=this.diff_commonSuffix(b,c);if(a!==0){h[g][1]=b.substring(b.length-a)+h[g][1];b=b.substring(0,b.length-a);c=c.substring(0,c.length-a)}}if(f===0){h.splice(g-e,f+e,[DIFF_INSERT,b])}else{if(e===0){h.splice(g-f,f+e,[DIFF_DELETE,c])}else{h.splice(g-f-e,f+e,[DIFF_DELETE,c],[DIFF_INSERT,b])}}g=g-f-e+(f?1:0)+(e?1:0)+1}else{if(g!==0&&h[g-1][0]==DIFF_EQUAL){h[g-1][1]+=h[g][1];h.splice(g,1)}else{g++}}e=0;f=0;c="";b="";break}}if(h[h.length-1][1]===""){h.pop()}var d=false;g=1;while(gf){break}e=d;c=b}if(g.length!=a&&g[a][0]===DIFF_DELETE){return c}return c+(f-e)};diff_match_patch.prototype.diff_prettyHtml=function(f){var d=[];var h=/&/g;var c=//g;var g=/\n/g;for(var i=0;i");switch(e){case DIFF_INSERT:d[i]=''+j+"";break;case DIFF_DELETE:d[i]=''+j+"";break;case DIFF_EQUAL:d[i]=""+j+"";break}}return d.join("")};diff_match_patch.prototype.diff_text1=function(c){var b=[];for(var a=0;athis.Match_MaxBits){throw new Error("Pattern too long for this browser.")}var m=this.match_alphabet_(t);var a=this;function b(y,d){var s=y/t.length;var j=Math.abs(i-d);if(!a.Match_Distance){return j?1:s}return s+(j/a.Match_Distance)}var o=this.Match_Threshold;var c=l.indexOf(t,i);if(c!=-1){o=Math.min(b(0,c),o);c=l.lastIndexOf(t,i+t.length);if(c!=-1){o=Math.min(b(0,c),o)}}var v=1<<(t.length-1);c=-1;var f,k;var g=t.length+l.length;var h;for(var u=0;u=e;q--){var w=m[l.charAt(q-1)];if(u===0){p[q]=((p[q+1]<<1)|1)&w}else{p[q]=(((p[q+1]<<1)|1)&w)|(((h[q+1]|h[q])<<1)|1)|h[q+1]}if(p[q]&v){var r=b(u,q-1);if(r<=o){o=r;c=q-1;if(c>i){e=Math.max(1,2*i-c)}else{break}}}}if(b(u+1,i)>o){break}h=p}return c};diff_match_patch.prototype.match_alphabet_=function(c){var b={};for(var a=0;a2){this.diff_cleanupSemantic(k);this.diff_cleanupEfficiency(k)}}else{if(o&&typeof o=="object"&&typeof c=="undefined"&&typeof p=="undefined"){k=(o);d=this.diff_text1(k)}else{if(typeof o=="string"&&c&&typeof c=="object"&&typeof p=="undefined"){d=(o);k=(c)}else{if(typeof o=="string"&&typeof c=="string"&&p&&typeof p=="object"){d=(o);k=(p)}else{throw new Error("Unknown call format to patch_make.")}}}}if(k.length===0){return[]}var b=[];var e=new diff_match_patch.patch_obj();var h=0;var j=0;var i=0;var g=d;var m=d;for(var n=0;n=2*this.Patch_Margin){if(h){this.patch_addContext_(e,g);b.push(e);e=new diff_match_patch.patch_obj();h=0;g=m;j=i}}}break}if(f!==DIFF_INSERT){j+=l.length}if(f!==DIFF_DELETE){i+=l.length}}if(h){this.patch_addContext_(e,g);b.push(e)}return b};diff_match_patch.prototype.patch_deepCopy=function(c){var d=[];for(var b=0;bthis.Match_MaxBits){f=this.match_main(p,e.substring(0,this.Match_MaxBits),b);if(f!=-1){k=this.match_main(p,e.substring(e.length-this.Match_MaxBits),b+e.length-this.Match_MaxBits);if(k==-1||f>=k){f=-1}}}else{f=this.match_main(p,e,b)}if(f==-1){g[n]=false;o-=a[n].length2-a[n].length1}else{g[n]=true;o=f-b;var d;if(k==-1){d=p.substring(f,f+e.length)}else{d=p.substring(f,k+this.Match_MaxBits)}if(e==d){p=p.substring(0,f)+this.diff_text2(a[n].diffs)+p.substring(f+e.length)}else{var i=this.diff_main(e,d,false);if(e.length>this.Match_MaxBits&&this.diff_levenshtein(i)/e.length>this.Patch_DeleteThreshold){g[n]=false}else{this.diff_cleanupSemanticLossless(i);var j=0;var h;for(var m=0;mf[0][1].length){var e=c-f[0][1].length;f[0][1]=b.substring(f[0][1].length)+f[0][1];g.start1-=e;g.start2-=e;g.length1+=e;g.length2+=e}}g=d[d.length-1];f=g.diffs;if(f.length==0||f[f.length-1][0]!=DIFF_EQUAL){f.push([DIFF_EQUAL,b]);g.length1+=c;g.length2+=c}else{if(c>f[f.length-1][1].length){var e=c-f[f.length-1][1].length;f[f.length-1][1]+=b.substring(0,e);g.length1+=e;g.length2+=e}}return b};diff_match_patch.prototype.patch_splitMax=function(a){var i=this.Match_MaxBits;for(var l=0;l2*i){e.length1+=k.length;c+=k.length;j=false;e.diffs.push([h,k]);f.diffs.shift()}else{k=k.substring(0,i-e.length1-this.Patch_Margin);e.length1+=k.length;c+=k.length;if(h===DIFF_EQUAL){e.length2+=k.length;b+=k.length}else{j=false}e.diffs.push([h,k]);if(k==f.diffs[0][1]){f.diffs.shift()}else{f.diffs[0][1]=f.diffs[0][1].substring(k.length)}}}}g=this.diff_text2(e.diffs);g=g.substring(g.length-this.Patch_Margin);var d=this.diff_text1(f.diffs).substring(0,this.Patch_Margin);if(d!==""){e.length1+=d.length;e.length2+=d.length;if(e.diffs.length!==0&&e.diffs[e.diffs.length-1][0]===DIFF_EQUAL){e.diffs[e.diffs.length-1][1]+=d}else{e.diffs.push([DIFF_EQUAL,d])}}if(!j){a.splice(++l,0,e)}}}};diff_match_patch.prototype.patch_toText=function(b){var c=[];for(var a=0;a";q=("hidden" in t);e=t.childNodes.length==1||(function(){(m.createElement)("a");var v=m.createDocumentFragment();return(typeof v.cloneNode=="undefined"||typeof v.createDocumentFragment=="undefined"||typeof v.createElement=="undefined")}())}catch(u){q=true;e=true}}());function f(t,v){var w=t.createElement("p"),u=t.getElementsByTagName("head")[0]||t.documentElement;w.innerHTML="x";return u.insertBefore(w.lastChild,u.firstChild)}function l(){var t=j.elements;return typeof t=="string"?t.split(" "):t}function p(t){var u=o[t[i]];if(!u){u={};a++;t[i]=a;o[a]=u}return u}function n(w,t,v){if(!t){t=m}if(e){return t.createElement(w)}if(!v){v=p(t)}var u;if(v.cache[w]){u=v.cache[w].cloneNode()}else{if(c.test(w)){u=(v.cache[w]=v.createElem(w)).cloneNode()}else{u=v.createElem(w)}}return u.canHaveChildren&&!h.test(w)?v.frag.appendChild(u):u}function r(v,x){if(!v){v=m}if(e){return v.createDocumentFragment()}x=x||p(v);var y=x.frag.cloneNode(),w=0,u=l(),t=u.length;for(;w=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;k0){return true}j[g]=1;i=(j[g]>0);j[g]=0;return i}})})(jQuery);(function(b,e){var a=0,d=Array.prototype.slice,c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)};b.widget=function(f,g,n){var k,l,i,m,h={},j=f.split(".")[0];f=f.split(".")[1];k=j+"-"+f;if(!n){n=g;g=b.Widget}b.expr[":"][k.toLowerCase()]=function(o){return !!b.data(o,k)};b[j]=b[j]||{};l=b[j][f];i=b[j][f]=function(o,p){if(!this._createWidget){return new i(o,p)}if(arguments.length){this._createWidget(o,p)}};b.extend(i,l,{version:n.version,_proto:b.extend({},n),_childConstructors:[]});m=new g();m.options=b.widget.extend({},m.options);b.each(n,function(p,o){if(!b.isFunction(o)){h[p]=o;return}h[p]=(function(){var q=function(){return g.prototype[p].apply(this,arguments)},r=function(s){return g.prototype[p].apply(this,s)};return function(){var u=this._super,s=this._superApply,t;this._super=q;this._superApply=r;t=o.apply(this,arguments);this._super=u;this._superApply=s;return t}})()});i.prototype=b.widget.extend(m,{widgetEventPrefix:l?m.widgetEventPrefix:f},h,{constructor:i,namespace:j,widgetName:f,widgetFullName:k});if(l){b.each(l._childConstructors,function(p,q){var o=q.prototype;b.widget(o.namespace+"."+o.widgetName,i,q._proto)});delete l._childConstructors}else{g._childConstructors.push(i)}b.widget.bridge(f,i)};b.widget.extend=function(k){var g=d.call(arguments,1),j=0,f=g.length,h,i;for(;j",options:{disabled:false,create:null},_createWidget:function(f,g){g=b(g||this.defaultElement||this)[0];this.element=b(g);this.uuid=a++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=b.widget.extend({},this.options,this._getCreateOptions(),f);this.bindings=b();this.hoverable=b();this.focusable=b();if(g!==this){b.data(g,this.widgetFullName,this);this._on(true,this.element,{remove:function(h){if(h.target===g){this.destroy()}}});this.document=b(g.style?g.ownerDocument:g.document||g);this.window=b(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:b.noop,_getCreateEventData:b.noop,_create:b.noop,_init:b.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(b.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:b.noop,widget:function(){return this.element},option:function(j,k){var f=j,l,h,g;if(arguments.length===0){return b.widget.extend({},this.options)}if(typeof j==="string"){f={};l=j.split(".");j=l.shift();if(l.length){h=f[j]=b.widget.extend({},this.options[j]);for(g=0;g=this.options.distance)},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(e,g){e.extend(e.ui,{datepicker:{version:"1.10.3"}});var f="datepicker",c;function b(){this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};e.extend(this._defaults,this.regional[""]);this.dpDiv=d(e("
"))}e.extend(b.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(h){a(this._defaults,h||{});return this},_attachDatepicker:function(k,h){var l,j,i;l=k.nodeName.toLowerCase();j=(l==="div"||l==="span");if(!k.id){this.uuid+=1;k.id="dp"+this.uuid}i=this._newInst(e(k),j);i.settings=e.extend({},h||{});if(l==="input"){this._connectDatepicker(k,i)}else{if(j){this._inlineDatepicker(k,i)}}},_newInst:function(i,h){var j=i[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:j,input:i,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:h,dpDiv:(!h?this.dpDiv:d(e("
")))}},_connectDatepicker:function(j,i){var h=e(j);i.append=e([]);i.trigger=e([]);if(h.hasClass(this.markerClassName)){return}this._attachments(h,i);h.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp);this._autoSize(i);e.data(j,f,i);if(i.settings.disabled){this._disableDatepicker(j)}},_attachments:function(j,m){var i,l,h,n=this._get(m,"appendText"),k=this._get(m,"isRTL");if(m.append){m.append.remove()}if(n){m.append=e(""+n+"");j[k?"before":"after"](m.append)}j.unbind("focus",this._showDatepicker);if(m.trigger){m.trigger.remove()}i=this._get(m,"showOn");if(i==="focus"||i==="both"){j.focus(this._showDatepicker)}if(i==="button"||i==="both"){l=this._get(m,"buttonText");h=this._get(m,"buttonImage");m.trigger=e(this._get(m,"buttonImageOnly")?e("").addClass(this._triggerClass).attr({src:h,alt:l,title:l}):e("").addClass(this._triggerClass).html(!h?l:e("").attr({src:h,alt:l,title:l})));j[k?"before":"after"](m.trigger);m.trigger.click(function(){if(e.datepicker._datepickerShowing&&e.datepicker._lastInput===j[0]){e.datepicker._hideDatepicker()}else{if(e.datepicker._datepickerShowing&&e.datepicker._lastInput!==j[0]){e.datepicker._hideDatepicker();e.datepicker._showDatepicker(j[0])}else{e.datepicker._showDatepicker(j[0])}}return false})}},_autoSize:function(o){if(this._get(o,"autoSize")&&!o.inline){var l,j,k,n,m=new Date(2009,12-1,20),h=this._get(o,"dateFormat");if(h.match(/[DM]/)){l=function(i){j=0;k=0;for(n=0;nj){j=i[n].length;k=n}}return k};m.setMonth(l(this._get(o,(h.match(/MM/)?"monthNames":"monthNamesShort"))));m.setDate(l(this._get(o,(h.match(/DD/)?"dayNames":"dayNamesShort")))+20-m.getDay())}o.input.attr("size",this._formatDate(o,m).length)}},_inlineDatepicker:function(i,h){var j=e(i);if(j.hasClass(this.markerClassName)){return}j.addClass(this.markerClassName).append(h.dpDiv);e.data(i,f,h);this._setDate(h,this._getDefaultDate(h),true);this._updateDatepicker(h);this._updateAlternate(h);if(h.settings.disabled){this._disableDatepicker(i)}h.dpDiv.css("display","block")},_dialogDatepicker:function(o,i,m,j,n){var h,r,l,q,p,k=this._dialogInst;if(!k){this.uuid+=1;h="dp"+this.uuid;this._dialogInput=e("");this._dialogInput.keydown(this._doKeyDown);e("body").append(this._dialogInput);k=this._dialogInst=this._newInst(this._dialogInput,false);k.settings={};e.data(this._dialogInput[0],f,k)}a(k.settings,j||{});i=(i&&i.constructor===Date?this._formatDate(k,i):i);this._dialogInput.val(i);this._pos=(n?(n.length?n:[n.pageX,n.pageY]):null);if(!this._pos){r=document.documentElement.clientWidth;l=document.documentElement.clientHeight;q=document.documentElement.scrollLeft||document.body.scrollLeft;p=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(r/2)-100+q,(l/2)-150+p]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");k.settings.onSelect=m;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if(e.blockUI){e.blockUI(this.dpDiv)}e.data(this._dialogInput[0],f,k);return this},_destroyDatepicker:function(j){var k,h=e(j),i=e.data(j,f);if(!h.hasClass(this.markerClassName)){return}k=j.nodeName.toLowerCase();e.removeData(j,f);if(k==="input"){i.append.remove();i.trigger.remove();h.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(k==="div"||k==="span"){h.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(k){var l,j,h=e(k),i=e.data(k,f);if(!h.hasClass(this.markerClassName)){return}l=k.nodeName.toLowerCase();if(l==="input"){k.disabled=false;i.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(l==="div"||l==="span"){j=h.children("."+this._inlineClass);j.children().removeClass("ui-state-disabled");j.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}}this._disabledInputs=e.map(this._disabledInputs,function(m){return(m===k?null:m)})},_disableDatepicker:function(k){var l,j,h=e(k),i=e.data(k,f);if(!h.hasClass(this.markerClassName)){return}l=k.nodeName.toLowerCase();if(l==="input"){k.disabled=true;i.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(l==="div"||l==="span"){j=h.children("."+this._inlineClass);j.children().addClass("ui-state-disabled");j.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}}this._disabledInputs=e.map(this._disabledInputs,function(m){return(m===k?null:m)});this._disabledInputs[this._disabledInputs.length]=k},_isDisabledDatepicker:function(j){if(!j){return false}for(var h=0;h-1)}},_doKeyUp:function(j){var h,k=e.datepicker._getInst(j.target);if(k.input.val()!==k.lastVal){try{h=e.datepicker.parseDate(e.datepicker._get(k,"dateFormat"),(k.input?k.input.val():null),e.datepicker._getFormatConfig(k));if(h){e.datepicker._setDateFromField(k);e.datepicker._updateAlternate(k);e.datepicker._updateDatepicker(k)}}catch(i){}}return true},_showDatepicker:function(i){i=i.target||i;if(i.nodeName.toLowerCase()!=="input"){i=e("input",i.parentNode)[0]}if(e.datepicker._isDisabledDatepicker(i)||e.datepicker._lastInput===i){return}var k,o,j,m,n,h,l;k=e.datepicker._getInst(i);if(e.datepicker._curInst&&e.datepicker._curInst!==k){e.datepicker._curInst.dpDiv.stop(true,true);if(k&&e.datepicker._datepickerShowing){e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])}}o=e.datepicker._get(k,"beforeShow");j=o?o.apply(i,[i,k]):{};if(j===false){return}a(k.settings,j);k.lastVal=null;e.datepicker._lastInput=i;e.datepicker._setDateFromField(k);if(e.datepicker._inDialog){i.value=""}if(!e.datepicker._pos){e.datepicker._pos=e.datepicker._findPos(i);e.datepicker._pos[1]+=i.offsetHeight}m=false;e(i).parents().each(function(){m|=e(this).css("position")==="fixed";return !m});n={left:e.datepicker._pos[0],top:e.datepicker._pos[1]};e.datepicker._pos=null;k.dpDiv.empty();k.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});e.datepicker._updateDatepicker(k);n=e.datepicker._checkOffset(k,n,m);k.dpDiv.css({position:(e.datepicker._inDialog&&e.blockUI?"static":(m?"fixed":"absolute")),display:"none",left:n.left+"px",top:n.top+"px"});if(!k.inline){h=e.datepicker._get(k,"showAnim");l=e.datepicker._get(k,"duration");k.dpDiv.zIndex(e(i).zIndex()+1);e.datepicker._datepickerShowing=true;if(e.effects&&e.effects.effect[h]){k.dpDiv.show(h,e.datepicker._get(k,"showOptions"),l)}else{k.dpDiv[h||"show"](h?l:null)}if(e.datepicker._shouldFocusInput(k)){k.input.focus()}e.datepicker._curInst=k}},_updateDatepicker:function(j){this.maxRows=4;c=j;j.dpDiv.empty().append(this._generateHTML(j));this._attachHandlers(j);j.dpDiv.find("."+this._dayOverClass+" a").mouseover();var l,h=this._getNumberOfMonths(j),k=h[1],i=17;j.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(k>1){j.dpDiv.addClass("ui-datepicker-multi-"+k).css("width",(i*k)+"em")}j.dpDiv[(h[0]!==1||h[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");j.dpDiv[(this._get(j,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(j===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(j)){j.input.focus()}if(j.yearshtml){l=j.yearshtml;setTimeout(function(){if(l===j.yearshtml&&j.yearshtml){j.dpDiv.find("select.ui-datepicker-year:first").replaceWith(j.yearshtml)}l=j.yearshtml=null},0)}},_shouldFocusInput:function(h){return h.input&&h.input.is(":visible")&&!h.input.is(":disabled")&&!h.input.is(":focus")},_checkOffset:function(m,k,j){var l=m.dpDiv.outerWidth(),p=m.dpDiv.outerHeight(),o=m.input?m.input.outerWidth():0,h=m.input?m.input.outerHeight():0,n=document.documentElement.clientWidth+(j?0:e(document).scrollLeft()),i=document.documentElement.clientHeight+(j?0:e(document).scrollTop());k.left-=(this._get(m,"isRTL")?(l-o):0);k.left-=(j&&k.left===m.input.offset().left)?e(document).scrollLeft():0;k.top-=(j&&k.top===(m.input.offset().top+h))?e(document).scrollTop():0;k.left-=Math.min(k.left,(k.left+l>n&&n>l)?Math.abs(k.left+l-n):0);k.top-=Math.min(k.top,(k.top+p>i&&i>p)?Math.abs(p+h):0);return k},_findPos:function(k){var h,j=this._getInst(k),i=this._get(j,"isRTL");while(k&&(k.type==="hidden"||k.nodeType!==1||e.expr.filters.hidden(k))){k=k[i?"previousSibling":"nextSibling"]}h=e(k).offset();return[h.left,h.top]},_hideDatepicker:function(j){var i,m,l,h,k=this._curInst;if(!k||(j&&k!==e.data(j,f))){return}if(this._datepickerShowing){i=this._get(k,"showAnim");m=this._get(k,"duration");l=function(){e.datepicker._tidyDialog(k)};if(e.effects&&(e.effects.effect[i]||e.effects[i])){k.dpDiv.hide(i,e.datepicker._get(k,"showOptions"),m,l)}else{k.dpDiv[(i==="slideDown"?"slideUp":(i==="fadeIn"?"fadeOut":"hide"))]((i?m:null),l)}if(!i){l()}this._datepickerShowing=false;h=this._get(k,"onClose");if(h){h.apply((k.input?k.input[0]:null),[(k.input?k.input.val():""),k])}this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(e.blockUI){e.unblockUI();e("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(h){h.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(i){if(!e.datepicker._curInst){return}var h=e(i.target),j=e.datepicker._getInst(h[0]);if(((h[0].id!==e.datepicker._mainDivId&&h.parents("#"+e.datepicker._mainDivId).length===0&&!h.hasClass(e.datepicker.markerClassName)&&!h.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&!(e.datepicker._inDialog&&e.blockUI)))||(h.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==j)){e.datepicker._hideDatepicker()}},_adjustDate:function(l,k,j){var i=e(l),h=this._getInst(i[0]);if(this._isDisabledDatepicker(i[0])){return}this._adjustInstDate(h,k+(j==="M"?this._get(h,"showCurrentAtPos"):0),j);this._updateDatepicker(h)},_gotoToday:function(k){var h,j=e(k),i=this._getInst(j[0]);if(this._get(i,"gotoCurrent")&&i.currentDay){i.selectedDay=i.currentDay;i.drawMonth=i.selectedMonth=i.currentMonth;i.drawYear=i.selectedYear=i.currentYear}else{h=new Date();i.selectedDay=h.getDate();i.drawMonth=i.selectedMonth=h.getMonth();i.drawYear=i.selectedYear=h.getFullYear()}this._notifyChange(i);this._adjustDate(j)},_selectMonthYear:function(l,h,k){var j=e(l),i=this._getInst(j[0]);i["selected"+(k==="M"?"Month":"Year")]=i["draw"+(k==="M"?"Month":"Year")]=parseInt(h.options[h.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(j)},_selectDay:function(m,k,h,l){var i,j=e(m);if(e(l).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0])){return}i=this._getInst(j[0]);i.selectedDay=i.currentDay=e("a",l).html();i.selectedMonth=i.currentMonth=k;i.selectedYear=i.currentYear=h;this._selectDate(m,this._formatDate(i,i.currentDay,i.currentMonth,i.currentYear))},_clearDate:function(i){var h=e(i);this._selectDate(h,"")},_selectDate:function(l,h){var i,k=e(l),j=this._getInst(k[0]);h=(h!=null?h:this._formatDate(j));if(j.input){j.input.val(h)}this._updateAlternate(j);i=this._get(j,"onSelect");if(i){i.apply((j.input?j.input[0]:null),[h,j])}else{if(j.input){j.input.trigger("change")}}if(j.inline){this._updateDatepicker(j)}else{this._hideDatepicker();this._lastInput=j.input[0];if(typeof(j.input[0])!=="object"){j.input.focus()}this._lastInput=null}},_updateAlternate:function(l){var k,j,h,i=this._get(l,"altField");if(i){k=this._get(l,"altFormat")||this._get(l,"dateFormat");j=this._getDate(l);h=this.formatDate(k,j,this._getFormatConfig(l));e(i).each(function(){e(this).val(h)})}},noWeekends:function(i){var h=i.getDay();return[(h>0&&h<6),""]},iso8601Week:function(h){var i,j=new Date(h.getTime());j.setDate(j.getDate()+4-(j.getDay()||7));i=j.getTime();j.setMonth(0);j.setDate(1);return Math.floor(Math.round((i-j)/86400000)/7)+1},parseDate:function(x,s,z){if(x==null||s==null){throw"Invalid arguments"}s=(typeof s==="object"?s.toString():s+"");if(s===""){return null}var k,u,i,y=0,n=(z?z.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(typeof n!=="string"?n:new Date().getFullYear()%100+parseInt(n,10)),q=(z?z.dayNamesShort:null)||this._defaults.dayNamesShort,B=(z?z.dayNames:null)||this._defaults.dayNames,h=(z?z.monthNamesShort:null)||this._defaults.monthNamesShort,l=(z?z.monthNames:null)||this._defaults.monthNames,m=-1,C=-1,w=-1,p=-1,v=false,A,r=function(E){var F=(k+1-1){C=1;w=p;do{u=this._getDaysInMonth(m,C-1);if(w<=u){break}C++;w-=u}while(true)}A=this._daylightSavingAdjust(new Date(m,C-1,w));if(A.getFullYear()!==m||A.getMonth()+1!==C||A.getDate()!==w){throw"Invalid date"}return A},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(q,k,l){if(!k){return""}var s,t=(l?l.dayNamesShort:null)||this._defaults.dayNamesShort,i=(l?l.dayNames:null)||this._defaults.dayNames,o=(l?l.monthNamesShort:null)||this._defaults.monthNamesShort,m=(l?l.monthNames:null)||this._defaults.monthNames,r=function(u){var v=(s+112?h.getHours()+2:0);return h},_setDate:function(n,k,m){var h=!k,j=n.selectedMonth,l=n.selectedYear,i=this._restrictMinMax(n,this._determineDate(n,k,new Date()));n.selectedDay=n.currentDay=i.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=i.getMonth();n.drawYear=n.selectedYear=n.currentYear=i.getFullYear();if((j!==n.selectedMonth||l!==n.selectedYear)&&!m){this._notifyChange(n)}this._adjustInstDate(n);if(n.input){n.input.val(h?"":this._formatDate(n))}},_getDate:function(i){var h=(!i.currentYear||(i.input&&i.input.val()==="")?null:this._daylightSavingAdjust(new Date(i.currentYear,i.currentMonth,i.currentDay)));return h},_attachHandlers:function(i){var h=this._get(i,"stepMonths"),j="#"+i.id.replace(/\\\\/g,"\\");i.dpDiv.find("[data-handler]").map(function(){var k={prev:function(){e.datepicker._adjustDate(j,-h,"M")},next:function(){e.datepicker._adjustDate(j,+h,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(j)},selectDay:function(){e.datepicker._selectDay(j,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){e.datepicker._selectMonthYear(j,this,"M");return false},selectYear:function(){e.datepicker._selectMonthYear(j,this,"Y");return false}};e(this).bind(this.getAttribute("data-event"),k[this.getAttribute("data-handler")])})},_generateHTML:function(X){var A,z,S,K,l,ab,V,O,ae,I,ai,s,u,t,i,aa,q,D,ad,Q,aj,C,H,r,m,T,M,P,N,p,F,v,W,Z,k,ac,ag,L,w,Y=new Date(),B=this._daylightSavingAdjust(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate())),af=this._get(X,"isRTL"),ah=this._get(X,"showButtonPanel"),R=this._get(X,"hideIfNoPrevNext"),G=this._get(X,"navigationAsDateFormat"),x=this._getNumberOfMonths(X),o=this._get(X,"showCurrentAtPos"),J=this._get(X,"stepMonths"),E=(x[0]!==1||x[1]!==1),j=this._daylightSavingAdjust((!X.currentDay?new Date(9999,9,9):new Date(X.currentYear,X.currentMonth,X.currentDay))),n=this._getMinMaxDate(X,"min"),y=this._getMinMaxDate(X,"max"),h=X.drawMonth-o,U=X.drawYear;if(h<0){h+=12;U--}if(y){A=this._daylightSavingAdjust(new Date(y.getFullYear(),y.getMonth()-(x[0]*x[1])+1,y.getDate()));A=(n&&AA){h--;if(h<0){h=11;U--}}}X.drawMonth=h;X.drawYear=U;z=this._get(X,"prevText");z=(!G?z:this.formatDate(z,this._daylightSavingAdjust(new Date(U,h-J,1)),this._getFormatConfig(X)));S=(this._canAdjustMonth(X,-1,U,h)?"
"+z+"":(R?"":""+z+""));K=this._get(X,"nextText");K=(!G?K:this.formatDate(K,this._daylightSavingAdjust(new Date(U,h+J,1)),this._getFormatConfig(X)));l=(this._canAdjustMonth(X,+1,U,h)?""+K+"":(R?"":""+K+""));ab=this._get(X,"currentText");V=(this._get(X,"gotoCurrent")&&X.currentDay?j:B);ab=(!G?ab:this.formatDate(ab,V,this._getFormatConfig(X)));O=(!X.inline?"":"");ae=(ah)?"
"+(af?O:"")+(this._isInRange(X,V)?"":"")+(af?"":O)+"
":"";I=parseInt(this._get(X,"firstDay"),10);I=(isNaN(I)?0:I);ai=this._get(X,"showWeek");s=this._get(X,"dayNames");u=this._get(X,"dayNamesMin");t=this._get(X,"monthNames");i=this._get(X,"monthNamesShort");aa=this._get(X,"beforeShowDay");q=this._get(X,"showOtherMonths");D=this._get(X,"selectOtherMonths");ad=this._getDefaultDate(X);Q="";aj;for(C=0;C1){switch(r){case 0:M+=" ui-datepicker-group-first";T=" ui-corner-"+(af?"right":"left");break;case x[1]-1:M+=" ui-datepicker-group-last";T=" ui-corner-"+(af?"left":"right");break;default:M+=" ui-datepicker-group-middle";T="";break}}M+="'>"}M+="
"+(/all|left/.test(T)&&C===0?(af?l:S):"")+(/all|right/.test(T)&&C===0?(af?S:l):"")+this._generateMonthYearHeader(X,h,U,n,y,C>0||r>0,t,i)+"
";P=(ai?"":"");for(aj=0;aj<7;aj++){N=(aj+I)%7;P+="=5?" class='ui-datepicker-week-end'":"")+">"+u[N]+""}M+=P+"";p=this._getDaysInMonth(U,h);if(U===X.selectedYear&&h===X.selectedMonth){X.selectedDay=Math.min(X.selectedDay,p)}F=(this._getFirstDayOfMonth(U,h)-I+7)%7;v=Math.ceil((F+p)/7);W=(E?this.maxRows>v?this.maxRows:v:v);this.maxRows=W;Z=this._daylightSavingAdjust(new Date(U,h,1-F));for(k=0;k";ac=(!ai?"":"");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&&Zy);ac+="";Z.setDate(Z.getDate()+1);Z=this._daylightSavingAdjust(Z)}M+=ac+""}h++;if(h>11){h=0;U++}M+="
"+this._get(X,"weekHeader")+"
"+this._get(X,"calculateWeek")(Z)+""+(L&&!q?" ":(w?""+Z.getDate()+"":""+Z.getDate()+""))+"
"+(E?""+((x[0]>0&&r===x[1]-1)?"
":""):"");H+=M}Q+=H}Q+=ae;X._keyEvent=false;return Q},_generateMonthYearHeader:function(l,j,t,n,r,u,p,h){var y,i,z,w,m,v,s,o,k=this._get(l,"changeMonth"),A=this._get(l,"changeYear"),B=this._get(l,"showMonthAfterYear"),q="
",x="";if(u||!k){x+=""+p[j]+""}else{y=(n&&n.getFullYear()===t);i=(r&&r.getFullYear()===t);x+=""}if(!B){q+=x+(u||!(k&&A)?" ":"")}if(!l.yearshtml){l.yearshtml="";if(u||!A){q+=""+t+""}else{w=this._get(l,"yearRange").split(":");m=new Date().getFullYear();v=function(D){var C=(D.match(/c[+\-].*/)?t+parseInt(D.substring(1),10):(D.match(/[+\-].*/)?m+parseInt(D,10):parseInt(D,10)));return(isNaN(C)?m:C)};s=v(w[0]);o=Math.max(s,v(w[1]||""));s=(n?Math.max(s,n.getFullYear()):s);o=(r?Math.min(o,r.getFullYear()):o);l.yearshtml+="";q+=l.yearshtml;l.yearshtml=null}}q+=this._get(l,"yearSuffix");if(B){q+=(u||!(k&&A)?" ":"")+x}q+="
";return q},_adjustInstDate:function(k,n,m){var j=k.drawYear+(m==="Y"?n:0),l=k.drawMonth+(m==="M"?n:0),h=Math.min(k.selectedDay,this._getDaysInMonth(j,l))+(m==="D"?n:0),i=this._restrictMinMax(k,this._daylightSavingAdjust(new Date(j,l,h)));k.selectedDay=i.getDate();k.drawMonth=k.selectedMonth=i.getMonth();k.drawYear=k.selectedYear=i.getFullYear();if(m==="M"||m==="Y"){this._notifyChange(k)}},_restrictMinMax:function(k,i){var j=this._getMinMaxDate(k,"min"),l=this._getMinMaxDate(k,"max"),h=(j&&il?l:h)},_notifyChange:function(i){var h=this._get(i,"onChangeMonthYear");if(h){h.apply((i.input?i.input[0]:null),[i.selectedYear,i.selectedMonth+1,i])}},_getNumberOfMonths:function(i){var h=this._get(i,"numberOfMonths");return(h==null?[1,1]:(typeof h==="number"?[1,h]:h))},_getMinMaxDate:function(i,h){return this._determineDate(i,this._get(i,h+"Date"),null)},_getDaysInMonth:function(h,i){return 32-this._daylightSavingAdjust(new Date(h,i,32)).getDate()},_getFirstDayOfMonth:function(h,i){return new Date(h,i,1).getDay()},_canAdjustMonth:function(k,m,j,l){var h=this._getNumberOfMonths(k),i=this._daylightSavingAdjust(new Date(j,l+(m<0?m:h[0]*h[1]),1));if(m<0){i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth()))}return this._isInRange(k,i)},_isInRange:function(l,j){var i,o,k=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),p=null,m=null,n=this._get(l,"yearRange");if(n){i=n.split(":");o=new Date().getFullYear();p=parseInt(i[0],10);m=parseInt(i[1],10);if(i[0].match(/[+\-].*/)){p+=o}if(i[1].match(/[+\-].*/)){m+=o}}return((!k||j.getTime()>=k.getTime())&&(!h||j.getTime()<=h.getTime())&&(!p||j.getFullYear()>=p)&&(!m||j.getFullYear()<=m))},_getFormatConfig:function(h){var i=this._get(h,"shortYearCutoff");i=(typeof i!=="string"?i:new Date().getFullYear()%100+parseInt(i,10));return{shortYearCutoff:i,dayNamesShort:this._get(h,"dayNamesShort"),dayNames:this._get(h,"dayNames"),monthNamesShort:this._get(h,"monthNamesShort"),monthNames:this._get(h,"monthNames")}},_formatDate:function(k,h,l,j){if(!h){k.currentDay=k.selectedDay;k.currentMonth=k.selectedMonth;k.currentYear=k.selectedYear}var i=(h?(typeof h==="object"?h:this._daylightSavingAdjust(new Date(j,l,h))):this._daylightSavingAdjust(new Date(k.currentYear,k.currentMonth,k.currentDay)));return this.formatDate(this._get(k,"dateFormat"),i,this._getFormatConfig(k))}});function d(i){var h="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return i.delegate(h,"mouseout",function(){e(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){e(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){e(this).removeClass("ui-datepicker-next-hover")}}).delegate(h,"mouseover",function(){if(!e.datepicker._isDisabledDatepicker(c.inline?i.parent()[0]:c.input[0])){e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");e(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){e(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){e(this).addClass("ui-datepicker-next-hover")}}})}function a(j,i){e.extend(j,i);for(var h in i){if(i[h]==null){j[h]=i[h]}}return j}e.fn.datepicker=function(i){if(!this.length){return this}if(!e.datepicker.initialized){e(document).mousedown(e.datepicker._checkExternalClick);e.datepicker.initialized=true}if(e("#"+e.datepicker._mainDivId).length===0){e("body").append(e.datepicker.dpDiv)}var h=Array.prototype.slice.call(arguments,1);if(typeof i==="string"&&(i==="isDisabled"||i==="getDate"||i==="widget")){return e.datepicker["_"+i+"Datepicker"].apply(e.datepicker,[this[0]].concat(h))}if(i==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return e.datepicker["_"+i+"Datepicker"].apply(e.datepicker,[this[0]].concat(h))}return this.each(function(){typeof i==="string"?e.datepicker["_"+i+"Datepicker"].apply(e.datepicker,[this].concat(h)):e.datepicker._attachDatepicker(this,i)})};e.datepicker=new b();e.datepicker.initialized=false;e.datepicker.uuid=new Date().getTime();e.datepicker.version="1.10.3"})(jQuery);(function(b,c){var a=5;b.widget("ui.slider",b.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=false},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var g,d,e=this.options,j=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),h="",f=[];d=(e.values&&e.values.length)||1;if(j.length>d){j.slice(d).remove();j=j.slice(0,d)}for(g=j.length;g").appendTo(this.element);e="ui-slider-range ui-widget-header ui-corner-all"}else{this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""})}this.range.addClass(e+((d.range==="min"||d.range==="max")?" ui-slider-range-"+d.range:""))}else{this.range=b([])}},_setupEvents:function(){var d=this.handles.add(this.range).filter("a");this._off(d);this._on(d,this._handleEvents);this._hoverable(d);this._focusable(d)},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(f){var j,m,e,h,l,n,i,d,k=this,g=this.options;if(g.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();j={x:f.pageX,y:f.pageY};m=this._normValueFromMouse(j);e=this._valueMax()-this._valueMin()+1;this.handles.each(function(o){var p=Math.abs(m-k.values(o));if((e>p)||(e===p&&(o===k._lastChangedValue||k.values(o)===g.min))){e=p;h=b(this);l=o}});n=this._start(f,l);if(n===false){return false}this._mouseSliding=true;this._handleIndex=l;h.addClass("ui-state-active").focus();i=h.offset();d=!b(f.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=d?{left:0,top:0}:{left:f.pageX-i.left-(h.width()/2),top:f.pageY-i.top-(h.height()/2)-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(f,l,m)}this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(f){var d={x:f.pageX,y:f.pageY},e=this._normValueFromMouse(d);this._slide(f,this._handleIndex,e);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,h,g,f,i;if(this.orientation==="horizontal"){d=this.elementSize.width;h=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;h=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}g=(h/d);if(g>1){g=1}if(g<0){g=0}if(this.orientation==="vertical"){g=1-g}f=this._valueMax()-this._valueMin();i=this._valueMin()+g*f;return this._trimAlignValue(i)},_start:function(f,e){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}return this._trigger("start",f,d)},_slide:function(h,g,f){var d,e,i;if(this.options.values&&this.options.values.length){d=this.values(g?0:1);if((this.options.values.length===2&&this.options.range===true)&&((g===0&&f>d)||(g===1&&f1){this.options.values[e]=this._trimAlignValue(h);this._refreshValue();this._change(null,e);return}if(arguments.length){if(b.isArray(arguments[0])){g=this.options.values;d=arguments[0];for(f=0;f=this._valueMax()){return this._valueMax()}var d=(this.options.step>0)?this.options.step:1,f=(g-this._valueMin())%d,e=g-f;if(Math.abs(f)*2>=d){e+=(f>0)?d:(-d)}return parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var i,h,l,j,m,g=this.options.range,f=this.options,k=this,e=(!this._animateOff)?f.animate:false,d={};if(this.options.values&&this.options.values.length){this.handles.each(function(n){h=(k.values(n)-k._valueMin())/(k._valueMax()-k._valueMin())*100;d[k.orientation==="horizontal"?"left":"bottom"]=h+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(k.options.range===true){if(k.orientation==="horizontal"){if(n===0){k.range.stop(1,1)[e?"animate":"css"]({left:h+"%"},f.animate)}if(n===1){k.range[e?"animate":"css"]({width:(h-i)+"%"},{queue:false,duration:f.animate})}}else{if(n===0){k.range.stop(1,1)[e?"animate":"css"]({bottom:(h)+"%"},f.animate)}if(n===1){k.range[e?"animate":"css"]({height:(h-i)+"%"},{queue:false,duration:f.animate})}}}i=h})}else{l=this.value();j=this._valueMin();m=this._valueMax();h=(m!==j)?(l-j)/(m-j)*100:0;d[this.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);if(g==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[e?"animate":"css"]({width:h+"%"},f.animate)}if(g==="max"&&this.orientation==="horizontal"){this.range[e?"animate":"css"]({width:(100-h)+"%"},{queue:false,duration:f.animate})}if(g==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[e?"animate":"css"]({height:h+"%"},f.animate)}if(g==="max"&&this.orientation==="vertical"){this.range[e?"animate":"css"]({height:(100-h)+"%"},{queue:false,duration:f.animate})}}},_handleEvents:{keydown:function(h){var i,f,e,g,d=b(h.target).data("ui-slider-handle-index");switch(h.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:h.preventDefault();if(!this._keySliding){this._keySliding=true;b(h.target).addClass("ui-state-active");i=this._start(h,d);if(i===false){return}}break}g=this.options.step;if(this.options.values&&this.options.values.length){f=e=this.values(d)}else{f=e=this.value()}switch(h.keyCode){case b.ui.keyCode.HOME:e=this._valueMin();break;case b.ui.keyCode.END:e=this._valueMax();break;case b.ui.keyCode.PAGE_UP:e=this._trimAlignValue(f+((this._valueMax()-this._valueMin())/a));break;case b.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(f-((this._valueMax()-this._valueMin())/a));break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(f===this._valueMax()){return}e=this._trimAlignValue(f+g);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(f===this._valueMin()){return}e=this._trimAlignValue(f-g);break}this._slide(h,d,e)},click:function(d){d.preventDefault()},keyup:function(e){var d=b(e.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(e,d);this._change(e,d);b(e.target).removeClass("ui-state-active")}}}})}(jQuery));(function(a,c){var b="ui-effects-";a.effects={effect:{}}; +/* + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +(function(r,g){var n="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",k=/^([\-+])=\s*(\d+\.?\d*)/,j=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(s){return[s[1],s[2],s[3],s[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(s){return[s[1]*2.55,s[2]*2.55,s[3]*2.55,s[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(s){return[s[1],s[2]/100,s[3]/100,s[4]]}}],h=r.Color=function(t,u,s,v){return new r.Color.fn.parse(t,u,s,v)},m={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},q={"byte":{floor:true,max:255},percent:{max:1},degrees:{mod:360,floor:true}},p=h.support={},e=r("

")[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.maxE.mod/2){B+=E.mod}else{if(B-A>E.mod/2){B-=E.mod}}}s[C]=l((A-B)*z+B,F)}});return this[v](s)},blend:function(v){if(this._rgba[3]===1){return this}var u=this._rgba.slice(),t=u.pop(),s=h(v)._rgba;return h(r.map(u,function(w,x){return(1-t)*s[x]+t*w}))},toRgbaString:function(){var t="rgba(",s=r.map(this._rgba,function(u,w){return u==null?(w>2?1:0):u});if(s[3]===1){s.pop();t="rgb("}return t+s.join()+")"},toHslaString:function(){var t="hsla(",s=r.map(this.hsla(),function(u,w){if(u==null){u=w>2?1:0}if(w&&w<3){u=Math.round(u*100)+"%"}return u});if(s[3]===1){s.pop();t="hsl("}return t+s.join()+")"},toHexString:function(s){var t=this._rgba.slice(),u=t.pop();if(s){t.push(~~(u*255))}return"#"+r.map(t,function(w){w=(w||0).toString(16);return w.length===1?"0"+w:w}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});h.fn.parse.prototype=h.fn;function f(u,t,s){s=(s+1)%1;if(s*6<1){return u+(t-u)*s*6}if(s*2<1){return t}if(s*3<2){return u+(t-u)*((2/3)-s)*6}return u}m.hsla.to=function(v){if(v[0]==null||v[1]==null||v[2]==null){return[null,null,null,v[3]]}var t=v[0]/255,y=v[1]/255,z=v[2]/255,B=v[3],A=Math.max(t,y,z),w=Math.min(t,y,z),C=A-w,D=A+w,u=D*0.5,x,E;if(w===A){x=0}else{if(t===A){x=(60*(y-z)/C)+360}else{if(y===A){x=(60*(z-t)/C)+120}else{x=(60*(t-y)/C)+240}}}if(C===0){E=0}else{if(u<=0.5){E=C/D}else{E=C/(2-D)}}return[Math.round(x)%360,E,u,B==null?1:B]};m.hsla.from=function(x){if(x[0]==null||x[1]==null||x[2]==null){return[null,null,null,x[3]]}var w=x[0]/360,v=x[1],u=x[2],t=x[3],y=u<=0.5?u*(1+v):u+v-u*v,z=2*u-y;return[Math.round(f(z,y,w+(1/3))*255),Math.round(f(z,y,w)*255),Math.round(f(z,y,w-(1/3))*255),t]};o(m,function(t,v){var u=v.props,s=v.cache,x=v.to,w=v.from;h.fn[t]=function(C){if(x&&!this[s]){this[s]=x(this._rgba)}if(C===g){return this[s].slice()}var z,B=r.type(C),y=(B==="array"||B==="object")?C:arguments,A=this[s].slice();o(u,function(D,F){var E=y[B==="object"?D:F.idx];if(E==null){E=A[F.idx]}A[F.idx]=l(E,F)});if(w){z=h(w(A));z[s]=A;return z}else{return h(A)}};o(u,function(y,z){if(h.fn[y]){return}h.fn[y]=function(D){var F=r.type(D),C=(y==="alpha"?(this._hsla?"hsla":"rgba"):t),B=this[C](),E=B[z.idx],A;if(F==="undefined"){return E}if(F==="function"){D=D.call(this,E);F=r.type(D)}if(D==null&&z.empty){return this}if(F==="string"){A=k.exec(D);if(A){D=E+parseFloat(A[2])*(A[1]==="+"?1:-1)}}B[z.idx]=D;return this[C](B)}})});h.hook=function(t){var s=t.split(" ");o(s,function(u,v){r.cssHooks[v]={set:function(z,A){var x,y,w="";if(A!=="transparent"&&(r.type(A)!=="string"||(x=i(A)))){A=h(x||A);if(!p.rgba&&A._rgba[3]!==1){y=v==="backgroundColor"?z.parentNode:z;while((w===""||w==="transparent")&&y&&y.style){try{w=r.css(y,"backgroundColor");y=y.parentNode}catch(B){}}A=A.blend(w&&w!=="transparent"?w:"_default")}A=A.toRgbaString()}try{z.style[v]=A}catch(B){}}};r.fx.step[v]=function(w){if(!w.colorInit){w.start=h(w.elem,v);w.end=h(w.end);w.colorInit=true}r.cssHooks[v].set(w.elem,w.start.transition(w.end,w.pos))}})};h.hook(n);r.cssHooks.borderColor={expand:function(t){var s={};o(["Top","Right","Bottom","Left"],function(v,u){s["border"+u+"Color"]=t});return s}};d=r.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(h,i){a.fx.step[i]=function(j){if(j.end!=="none"&&!j.setAttr||j.pos===1&&!j.setAttr){jQuery.style(j.elem,i,j.end);j.setAttr=true}}});function g(l){var i,h,j=l.ownerDocument.defaultView?l.ownerDocument.defaultView.getComputedStyle(l,null):l.currentStyle,k={};if(j&&j.length&&j[0]&&j[j[0]]){h=j.length;while(h--){i=j[h];if(typeof j[i]==="string"){k[a.camelCase(i)]=j[i]}}}else{for(i in j){if(typeof j[i]==="string"){k[i]=j[i]}}}return k}function d(h,j){var l={},i,k;for(i in j){k=j[i];if(h[i]!==k){if(!f[i]){if(a.fx.step[i]||!isNaN(parseFloat(k))){l[i]=k}}}}return l}if(!a.fn.addBack){a.fn.addBack=function(h){return this.add(h==null?this.prevObject:this.prevObject.filter(h))}}a.effects.animateClass=function(h,i,l,k){var j=a.speed(i,l,k);return this.queue(function(){var o=a(this),m=o.attr("class")||"",n,p=j.children?o.find("*").addBack():o;p=p.map(function(){var q=a(this);return{el:q,start:g(this)}});n=function(){a.each(e,function(q,r){if(h[r]){o[r+"Class"](h[r])}})};n();p=p.map(function(){this.end=g(this.el[0]);this.diff=d(this.start,this.end);return this});o.attr("class",m);p=p.map(function(){var s=this,q=a.Deferred(),r=a.extend({},j,{queue:false,complete:function(){q.resolve(s)}});this.el.animate(this.diff,r);return q.promise()});a.when.apply(a,p.get()).done(function(){n();a.each(arguments,function(){var q=this.el;a.each(this.diff,function(r){q.css(r,"")})});j.complete.call(o[0])})})};a.fn.extend({addClass:(function(h){return function(j,i,l,k){return i?a.effects.animateClass.call(this,{add:j},i,l,k):h.apply(this,arguments)}})(a.fn.addClass),removeClass:(function(h){return function(j,i,l,k){return arguments.length>1?a.effects.animateClass.call(this,{remove:j},i,l,k):h.apply(this,arguments)}})(a.fn.removeClass),toggleClass:(function(h){return function(k,j,i,m,l){if(typeof j==="boolean"||j===c){if(!i){return h.apply(this,arguments)}else{return a.effects.animateClass.call(this,(j?{add:k}:{remove:k}),i,m,l)}}else{return a.effects.animateClass.call(this,{toggle:k},j,i,m)}}})(a.fn.toggleClass),switchClass:function(h,j,i,l,k){return a.effects.animateClass.call(this,{add:j,remove:h},i,l,k)}})})();(function(){a.extend(a.effects,{version:"1.10.3",save:function(g,h){for(var f=0;f").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f={width:g.width(),height:g.height()},j=document.activeElement;try{j.id}catch(i){j=document.body}g.wrap(k);if(g[0]===j||a.contains(g[0],j)){a(j).focus()}k=g.parent();if(g.css("position")==="static"){k.css({position:"relative"});g.css({position:"relative"})}else{a.extend(h,{position:g.css("position"),zIndex:g.css("z-index")});a.each(["top","left","bottom","right"],function(l,m){h[m]=g.css(m);if(isNaN(parseInt(h[m],10))){h[m]="auto"}});g.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}g.css(f);return k.css(h).show()},removeWrapper:function(f){var g=document.activeElement;if(f.parent().is(".ui-effects-wrapper")){f.parent().replaceWith(f);if(f[0]===g||a.contains(f[0],g)){a(g).focus()}}return f},setTransition:function(g,i,f,h){h=h||{};a.each(i,function(k,j){var l=g.cssUnit(j);if(l[0]>0){h[j]=l[0]*f+l[1]}});return h}});function d(g,f,h,i){if(a.isPlainObject(g)){f=g;g=g.effect}g={effect:g};if(f==null){f={}}if(a.isFunction(f)){i=f;h=null;f={}}if(typeof f==="number"||a.fx.speeds[f]){i=h;h=f;f={}}if(a.isFunction(h)){i=h;h=null}if(f){a.extend(g,f)}h=h||f.duration;g.duration=a.fx.off?0:typeof h==="number"?h:h in a.fx.speeds?a.fx.speeds[h]:a.fx.speeds._default;g.complete=i||f.complete;return g}function e(f){if(!f||typeof f==="number"||a.fx.speeds[f]){return true}if(typeof f==="string"&&!a.effects.effect[f]){return true}if(a.isFunction(f)){return true}if(typeof f==="object"&&!f.effect){return true}return false}a.fn.extend({effect:function(){var h=d.apply(this,arguments),j=h.mode,f=h.queue,g=a.effects.effect[h.effect];if(a.fx.off||!g){if(j){return this[j](h.duration,h.complete)}else{return this.each(function(){if(h.complete){h.complete.call(this)}})}}function i(m){var n=a(this),l=h.complete,o=h.mode;function k(){if(a.isFunction(l)){l.call(n[0])}if(a.isFunction(m)){m()}}if(n.is(":hidden")?o==="hide":o==="show"){n[o]();k()}else{g.call(n[0],h,k)}}return f===false?this.each(i):this.queue(f||"fx",i)},show:(function(f){return function(h){if(e(h)){return f.apply(this,arguments)}else{var g=d.apply(this,arguments);g.mode="show";return this.effect.call(this,g)}}})(a.fn.show),hide:(function(f){return function(h){if(e(h)){return f.apply(this,arguments)}else{var g=d.apply(this,arguments);g.mode="hide";return this.effect.call(this,g)}}})(a.fn.hide),toggle:(function(f){return function(h){if(e(h)||typeof h==="boolean"){return f.apply(this,arguments)}else{var g=d.apply(this,arguments);g.mode="toggle";return this.effect.call(this,g)}}})(a.fn.toggle),cssUnit:function(f){var g=this.css(f),h=[];a.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}})})();(function(){var d={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(f,e){d[e]=function(g){return Math.pow(g,f+2)}});a.extend(d,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(g){var e,f=4;while(g<((e=Math.pow(2,--f))-1)/11){}return 1/Math.pow(4,3-f)-7.5625*Math.pow((e*3-2)/22-g,2)}});a.each(d,function(f,e){a.easing["easeIn"+f]=e;a.easing["easeOut"+f]=function(g){return 1-e(1-g)};a.easing["easeInOut"+f]=function(g){return g<0.5?e(g*2)/2:1-e(g*-2+2)/2}})})()})(jQuery);(function(a,b){a.effects.effect.highlight=function(h,c){var e=a(this),d=["backgroundImage","backgroundColor","opacity"],g=a.effects.setMode(e,h.mode||"show"),f={backgroundColor:e.css("backgroundColor")};if(g==="hide"){f.opacity=0}a.effects.save(e,d);e.show().css({backgroundImage:"none",backgroundColor:h.color||"#ffff99"}).animate(f,{queue:false,duration:h.duration,easing:h.easing,complete:function(){if(g==="hide"){e.hide()}a.effects.restore(e,d);c()}})}})(jQuery); \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/jquery.js" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/jquery.js" new file mode 100644 index 0000000..80ff812 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/js/jquery.js" @@ -0,0 +1,25 @@ +/* + * jQuery JavaScript Library v2.1.1-rc2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-21T20:27Z + */ +(function(b,a){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=b.document?a(b,true):function(c){if(!c.document){throw new Error("jQuery requires a window with a document")}return a(c)}}else{a(b)}}(typeof window!=="undefined"?window:this,function(window,noGlobal){var arr=[];var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var support={};var document=window.document,version="2.1.1-rc2",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return num!=null?(num<0?this[num+this.length]:this[num]):slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret},each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j=0},isPlainObject:function(obj){if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i0&&(length-1) in obj}var Sizzle= +/* + * Sizzle CSS Selector Engine v1.10.19 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-18 + */ +(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+-(new Date()),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},strundefined=typeof undefined,MAX_NEGATIVE=1<<31,hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){var i=0,len=this.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)};try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;results=results||[];if(!selector||typeof selector!=="string"){return results}if((nodeType=context.nodeType)!==1&&nodeType!==9){return[]}if(documentIsHTML&&!seed){if((match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else{if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else{if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}}}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=expando;newContext=context;newSelector=nodeType===9&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if((old=context.getAttribute("id"))){nid=old.replace(rescape,"\\$&")}else{context.setAttribute("id",nid)}nid="[id='"+nid+"'] ";i=groups.length;while(i--){groups[i]=nid+toSelector(groups[i])}newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",")}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(!old){context.removeAttribute("id")}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return(cache[key+" "]=value)}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return !!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=attrs.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while((cur=cur.nextSibling)){if(cur===b){return -1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!==strundefined&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,doc=node?node.ownerDocument||node:preferredDoc,parent=doc.defaultView;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=doc.documentElement;documentIsHTML=!isXML(doc);if(parent&&parent!==parent.top){if(parent.addEventListener){parent.addEventListener("unload",function(){setDocument()},false)}else{if(parent.attachEvent){parent.attachEvent("onunload",function(){setDocument()})}}}support.attributes=assert(function(div){div.className="i";return !div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return !div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(doc.getElementsByClassName)&&assert(function(div){div.innerHTML="

";div.firstChild.className="i";return div.getElementsByClassName("i").length===2});support.getById=assert(function(div){docElem.appendChild(div).id=expando;return !doc.getElementsByName||!doc.getElementsByName(expando).length});if(support.getById){Expr.find.ID=function(id,context){if(typeof context.getElementById!==strundefined&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}};Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find.ID;Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find.TAG=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!==strundefined){return context.getElementsByTagName(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find.CLASS=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!==strundefined&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(doc.querySelectorAll))){assert(function(div){div.innerHTML="";if(div.querySelectorAll("[msallowclip^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if((support.matchesSelector=rnative.test((matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return -1}if(b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):0}else{if(aup===bup){return siblingCheck(a,b)}}cur=a;while((cur=cur.parentNode)){ap.unshift(cur)}cur=b;while((cur=cur.parentNode)){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return doc};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node)}}else{if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else{if(nodeType===3||nodeType===4){return elem.nodeValue}}}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd")}else{if(match[3]){Sizzle.error(match[0])}}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr.CHILD.test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else{if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!==strundefined&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return !!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=cache[0]===dirruns&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns){diff=cache[1]}else{while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){(node[expando]||(node[expando]={}))[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||(diff%first===0&&diff/first>=0)}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf.call(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);return !results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected)},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return !Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){return(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];for(;i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context!==document&&context}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;while((matcher=elementMatchers[j++])){if(matcher(elem,context,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if((elem=!matcher&&elem)){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize((selector=compiled.selector||selector));results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else{if(compiled){context=context.parentNode}}selector=selector.slice(tokens.shift().value.length)}i=matchExpr.needsContext.test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break}if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=(/^<(\w+)\s*\/?>(?:<\/\1>|)$/);var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return !!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>=0)!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return !!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector){return this}if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else{if(!context||context.jquery){return(context||rootjQuery).find(selector)}else{return this.constructor(context).find(selector)}}}else{if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else{if(jQuery.isFunction(selector)){return typeof rootjQuery.ready!=="undefined"?rootjQuery.ready(selector):selector(jQuery)}}}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.extend({dir:function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched},sibling:function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched}});jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.unique(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnotwhite=(/\S+/g);var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?(optionsCache[options]||createOptions(options)):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex-1){list.splice(index,1);if(firing){if(index<=firingLength){firingLength--}if(index<=firingIndex){firingIndex--}}}})}return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)},empty:function(){list=[];firingLength=0;return this},disable:function(){list=stack=memory=undefined;return this},disabled:function(){return !list},lock:function(){stack=undefined;if(!memory){self.disable()}return this},locked:function(){return !stack},fireWith:function(context,args){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];if(firing){stack.push(args)}else{fire(args)}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return !!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify)}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)}})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock)}deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||(subordinate&&jQuery.isFunction(subordinate.promise))?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values)}else{if(!(--remaining)){deferred.resolveWith(contexts,values)}}}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i0){return}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");jQuery(document).off("ready")}}});function completed(){document.removeEventListener("DOMContentLoaded",completed,false);window.removeEventListener("load",completed,false);jQuery.ready()}jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"){setTimeout(jQuery.ready)}else{document.addEventListener("DOMContentLoaded",completed,false);window.addEventListener("load",completed,false)}}return readyList.promise(obj)};jQuery.ready.promise();var access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){jQuery.access(elems,fn,i,key[i],true,emptyGet,raw)}}else{if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i1,null,true)},removeData:function(key){return this.each(function(){data_user.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=data_priv.get(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=data_priv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return data_priv.get(elem,key)||data_priv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.lengthx";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin" in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.hasData(elem)&&data_priv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;data_priv.remove(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(data_priv.get(cur,"events")||{})[event.type]&&data_priv.get(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&jQuery.acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&jQuery.acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(data_priv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click")){for(;cur!==this;cur=cur.parentNode||this){if(cur.disabled!==true||event.type!=="click"){matches=[];for(i=0;i=0:jQuery.find(sel,this,null,[cur]).length}if(matches[sel]){matches.push(handleObj)}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches})}}}}if(delegateCount]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*\s*$/g,wrapMap={option:[1,""],thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute("type")}return elem}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone},buildFragment:function(elems,context,scripts,selection){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i")+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}}fragment.textContent="";i=0;while((elem=nodes[i++])){if(selection&&jQuery.inArray(elem,selection)!==-1){continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment},cleanData:function(elems){var data,elem,type,key,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(jQuery.acceptData(elem)){key=elem[data_priv.expando];if(key&&(data=data_priv.cache[key])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}if(data_priv.cache[key]){delete data_priv.cache[key]}}}delete data_user.cache[elem[data_user.expando]]}}});jQuery.fn.extend({text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},remove:function(selector,keepData){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem=elems[i])!=null;i++){if(!keepData&&elem.nodeType===1){jQuery.cleanData(getAll(elem))}if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem)){setGlobalEval(getAll(elem,"script"))}elem.parentNode.removeChild(elem)}}return this},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1>");try{for(;i1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return this.each(function(index){var self=set.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}self.domManip(args,callback)})}if(l){fragment=jQuery.buildFragment(args,this[0].ownerDocument,false,this);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i")).appendTo(doc.documentElement);doc=iframe[0].contentDocument;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach()}elemdisplay[nodeName]=display}return display}var rmargin=(/^margin/);var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){return elem.ownerDocument.defaultView.getComputedStyle(elem,null)};function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name]}if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}(function(){var pixelPositionVal,boxSizingReliableVal,docElem=document.documentElement,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute";container.appendChild(div);function computePixelPositionAndBoxSizingReliable(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";div.innerHTML="";docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal=divStyle.top!=="1%";boxSizingReliableVal=divStyle.width==="4px";docElem.removeChild(container)}if(window.getComputedStyle){jQuery.extend(support,{pixelPosition:function(){computePixelPositionAndBoxSizingReliable();return pixelPositionVal},boxSizingReliable:function(){if(boxSizingReliableVal==null){computePixelPositionAndBoxSizingReliable()}return boxSizingReliableVal},reliableMarginRight:function(){var ret,marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0";marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";docElem.appendChild(container);ret=!parseFloat(window.getComputedStyle(marginDiv,null).marginRight);docElem.removeChild(container);return ret}})}})();jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];function vendorPropName(style,name){if(name in style){return name}var capName=name[0].toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style){return name}}return origName}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles)}if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null){val=elem.style[name]}if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0}return(val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles))+"px"}function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHidden(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,"");return !result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else{if(tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do{scale=scale||".5";start=start/scale;jQuery.style(tween.elem,prop,start+unit)}while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}if(parts){start=tween.start=+start||+target||0;tween.unit=unit;tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]}return tween}]};function createFxNow(){setTimeout(function(){fxNow=undefined});return(fxNow=jQuery.now())}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;for(;index1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute===strundefined){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name)}else{if(hooks&&"set" in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}else{elem.setAttribute(name,value+"");return value}}}else{if(hooks&&"get" in hooks&&(ret=hooks.get(elem,name))!==null){return ret}else{ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret}}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name)){elem[propName]=false}elem.removeAttribute(name)}}},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val}return value}}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle;if(!isXML){handle=attrHandle[name];attrHandle[name]=ret;ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){return hooks&&"set" in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem[name]=value)}else{return hooks&&"get" in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]}},propHooks:{tabIndex:{get:function(elem){return elem.hasAttribute("tabindex")||rfocusable.test(elem.nodeName)||elem.href?elem.tabIndex:-1}}}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null}}}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=typeof value==="string"&&value,i=0,len=this.length;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))})}if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i=0){cur=cur.replace(" "+clazz+" "," ")}}finalValue=value?jQuery.trim(cur):"";if(elem.className!==finalValue){elem.className=finalValue}}}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)})}return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else{if(type===strundefined||type==="boolean"){if(this.className){data_priv.set(this,"__className__",this.className)}this.className=this.className||value===false?"":data_priv.get(this,"__className__")||""}}})},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i=0){return true}}return false}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get" in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret}ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=""}else{if(typeof val==="number"){val+=""}else{if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""})}}}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set" in hooks)||hooks.set(this,val,"value")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i=0)){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0)}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now();var rquery=(/\?/);jQuery.parseJSON=function(data){return JSON.parse(data+"")};jQuery.parseXML=function(data){var xml,tmp;if(!data||typeof data!=="string"){return null}try{tmp=new DOMParser();xml=tmp.parseFromString(data,"text/xml")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data)}return xml};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func)){while((dataType=dataTypes[i++])){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else{if(seekingTransport){return !(selected=dataTypeOrTransport)}}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0] in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else{if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else{if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}}break}}}}if(conv!==true){if(conv&&s["throws"]){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}}}}}return{state:"success",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,parts,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(!state){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(state<2){for(code in map){statusCode[code]=[statusCode[code],map[code]]}}else{jqXHR.always(map[jqXHR.status])}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))))}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return jqXHR}fireGlobals=s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=(s.url+=(rquery.test(cacheURL)?"&":"?")+s.data);delete s.data}if(s.cache===false){s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++}}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){return jqXHR.abort()}strAbort="abort";for(i in {success:1,error:1,complete:1}){jqXHR[i](s[i])}transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2){done(-1,e)}else{throw e}}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(state===2){return}state=2;if(timeoutTimer){clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else{if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}});jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))})}if(this[0]){wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes)}}).end()}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0};jQuery.expr.filters.visible=function(elem){return !jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add)}})}else{if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():(value==null?"":value);s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined){traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional}if(jQuery.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest()}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();if(window.ActiveXObject){jQuery(window).on("unload",function(){for(var key in xhrCallbacks){xhrCallbacks[key]()}})}support.cors=!!xhrSupported&&("withCredentials" in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){delete xhrCallbacks[id];callback=xhr.onload=xhr.onerror=null;if(type==="abort"){xhr.abort()}else{if(type==="error"){complete(xhr.status,xhr.statusText)}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,typeof xhr.responseText==="string"?{text:xhr.responseText}:undefined,xhr.getAllResponseHeaders())}}}}};xhr.onload=callback();xhr.onerror=callback("error");callback=xhrCallbacks[id]=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery(" + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-categories.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-categories.php" new file mode 100644 index 0000000..8124eac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-categories.php" @@ -0,0 +1,154 @@ +to($categories); +?> + +
+
+ +
+ +
+ +
+
+
+ +
+ + +
+
+ +
+ +
+ + + + + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + + + + + + + + + + + + + + + +
name(); ?> + + + + children) > 0): ?> + children)); ?> + + + + slug(); ?> + defaultCategory == $categories->mid): ?> + + + + + count(); ?>
+
+
+ +
+
+
+
+ + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-comments.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-comments.php" new file mode 100644 index 0000000..9dfeb46 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-comments.php" @@ -0,0 +1,373 @@ +get('__typecho_all_comments') || 'on' == Typecho_Cookie::get('__typecho_all_comments')); +?> +
+
+ +
+
+ + +
+
+
+ +
+ + + get('status')): ?> + + +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + + + + + + + + + + + + + +
+ + +
+ type): ?> + gravatar(40); ?> + + type): ?> + + +
+
+
+ author(true); ?> + mail): ?> +
mail(); ?> + + ip): ?> +
ip(); ?> + +
+
+
dateWord(); ?> 浜 title(); ?>
+
+ content(); ?> +
+
+ status): ?> + + + + + + status): ?> + + + + + + status): ?> + + + + + + + + status && 'comment' == $comments->type): ?> + + + + +
+
+
+ + cid)): ?> + + +
+ +
+
+
+ +
+ + + get('status')): ?> + + +
+
+ have()): ?> +
    + pageNav(); ?> +
+ +
+
+
+
+
+
+ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-medias.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-medias.php" new file mode 100644 index 0000000..1c08f79 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-medias.php" @@ -0,0 +1,122 @@ + + +to($attachments); ?> +
+
+ +
+
+ +
+
+
+ +
+ + + +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + attachment->mime); ?> + + + + + + + + + + + + + + + +
commentsNum(); ?> + + title(); ?> + + author(); ?> + parentPost->cid): ?> + parentPost->title(); ?> + + + + dateWord(); ?>
+
+
+ +
+
+
+ +
+ + +
+ +
+ have()): ?> +
    + pageNav(); ?> +
+ +
+
+ +
+
+
+
+ + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-pages.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-pages.php" new file mode 100644 index 0000000..423770f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-pages.php" @@ -0,0 +1,131 @@ + +
+
+ +
+
+
+
+
+ +
+ + +
+
+ + +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + to($pages); ?> + have()): ?> + next()): ?> + + + + + + + + + + + + + + + +
commentsNum(); ?> + title(); ?> + hasSaved || 'page_draft' == $pages->type) { + echo '' . _t('鑽夌ǹ') . ''; + } else if ('hidden' == $pages->status) { + echo '' . _t('闅愯棌') . ''; + } + ?> + type): ?> + + + slug(); ?>author(); ?> + hasSaved): ?> + + modified); ?> + word()); ?> + + + dateWord(); ?> + +
+
+
+
+
+
+
+ + + +status) || 'publish' == $request->get('status')): ?> + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-posts.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-posts.php" new file mode 100644 index 0000000..c8f2f4a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-posts.php" @@ -0,0 +1,152 @@ + +
+
+ +
+
+
+
+
+ +
+ + +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + to($posts); ?> + have()): ?> + next()): ?> + + + + + + + + + + + + + + + +
commentsNum(); ?> + title(); ?> + hasSaved || 'post_draft' == $posts->type) { + echo '' . _t('鑽夌ǹ') . ''; + } else if ('hidden' == $posts->status) { + echo '' . _t('闅愯棌') . ''; + } else if ('waiting' == $posts->status) { + echo '' . _t('寰呭鏍') . ''; + } else if ('private' == $posts->status) { + echo '' . _t('绉佸瘑') . ''; + } else if ($posts->password) { + echo '' . _t('瀵嗙爜淇濇姢') . ''; + } + ?> + type): ?> + + + author(); ?>categories; $length = count($categories); ?> + $val): ?> + adminUrl('manage-posts.php?category=' . $val['mid'] + . (isset($request->uid) ? '&uid=' . $request->uid : '') + . (isset($request->status) ? '&status=' . $request->status : '')); + echo '">' . $val['name'] . '' . ($key < $length - 1 ? ', ' : ''); ?> + + + hasSaved): ?> + + modified); ?> + word()); ?> + + + dateWord(); ?> + +
+
+
+ +
+
+
+ +
+ + +
+
+ + have()): ?> +
    + pageNav(); ?> +
+ +
+
+
+
+
+
+ + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-tags.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-tags.php" new file mode 100644 index 0000000..b0f6ffd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-tags.php" @@ -0,0 +1,91 @@ +to($tags); +?> + +
+
+ +
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
    + have()): ?> + next()): ?> +
  • + + name(); ?> + +
  • + + +
    + +
+ +
+ +
+
+ form()->render(); ?> +
+
+
+
+ + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-users.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-users.php" new file mode 100644 index 0000000..5bfe7bf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/manage-users.php" @@ -0,0 +1,118 @@ + +
+
+ +
+
+
+
+
+ +
+ + +
+
+ +
+
+ +
+
+ + + + + + + + + + + + + + + + + + + + + to($users); ?> + next()): ?> + + + + + + + + + + +
postsNum(); ?>name(); ?> + + screenName(); ?>mail): ?>mail(); ?>group) { + case 'administrator': + _e('绠$悊鍛'); + break; + case 'editor': + _e('缂栬緫'); + break; + case 'contributor': + _e('璐$尞鑰'); + break; + case 'subscriber': + _e('鍏虫敞鑰'); + break; + case 'visitor': + _e('璁块棶鑰'); + break; + default: + break; + } ?>
+
+
+ +
+
+
+ +
+ + +
+
+ have()): ?> +
    + pageNav(); ?> +
+ +
+
+
+
+
+
+ + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/media.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/media.php" new file mode 100644 index 0000000..34b6de8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/media.php" @@ -0,0 +1,194 @@ +to($attachment); +?> + +
+
+ +
+
+ attachment->isImage): ?> +

<?php $attachment->attachment->name(); ?>

+ + +

+ attachment->mime); ?> + + attachment->name(); ?> + attachment->size / 1024)); ?> Kb +

+ +

+ +

+ +
+
鎴栬 %s閫夋嫨鏂囦欢涓婁紶%s', '', ''); ?>
+
    +
    +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/menu.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/menu.php" new file mode 100644 index 0000000..88376da --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/menu.php" @@ -0,0 +1,15 @@ + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-discussion.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-discussion.php" new file mode 100644 index 0000000..5468985 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-discussion.php" @@ -0,0 +1,23 @@ + + +
    +
    + +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-general.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-general.php" new file mode 100644 index 0000000..062018a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-general.php" @@ -0,0 +1,23 @@ + + +
    +
    + +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-permalink.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-permalink.php" new file mode 100644 index 0000000..b715d6d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-permalink.php" @@ -0,0 +1,24 @@ + + +
    +
    + +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-plugin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-plugin.php" new file mode 100644 index 0000000..f74c249 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-plugin.php" @@ -0,0 +1,23 @@ + + +
    +
    + +
    +
    + config()->render(); ?> +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-reading.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-reading.php" new file mode 100644 index 0000000..6c871bd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-reading.php" @@ -0,0 +1,37 @@ + + +
    +
    + +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-theme.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-theme.php" new file mode 100644 index 0000000..d5fdb46 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/options-theme.php" @@ -0,0 +1,32 @@ + + +
    +
    + +
    +
    +
      +
    • + +
    • + +
    • +
    +
    +
    + config()->render(); ?> +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/page-title.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/page-title.php" new file mode 100644 index 0000000..af25b8d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/page-title.php" @@ -0,0 +1,8 @@ + +
    +

    title; ?>addLink)) { + echo "addLink}\">" . _t("鏂板") . ""; + } + ?>

    +
    diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/plugins.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/plugins.php" new file mode 100644 index 0000000..e77d203 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/plugins.php" @@ -0,0 +1,127 @@ + +
    +
    + +
    +
    + to($activatedPlugins); ?> + have() || !empty($activatedPlugins->activatedPlugins)): ?> +

    +
    + + + + + + + + + + + + + + + + + + + next()): ?> + + + + + + + + + + activatedPlugins)): ?> + activatedPlugins as $key => $val): ?> + + + + + + + + + +
    title(); ?> + dependence): ?> + <?php _e('%s 鏃犳硶鍦ㄦ鐗堟湰鐨則ypecho涓嬫甯稿伐浣', $activatedPlugins->title); ?> + + description(); ?>version(); ?>homepage) ? $activatedPlugins->author : '' . $activatedPlugins->author . ''; ?> + activate || $activatedPlugins->deactivate || $activatedPlugins->config || $activatedPlugins->personalConfig): ?> + config): ?> + + • + + + + + +
    +
    + + + to($deactivatedPlugins); ?> + have() || !$activatedPlugins->have()): ?> +

    +
    + + + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + + + + + + + + + + + + + + +
    title(); ?>description(); ?>version(); ?>homepage) ? $deactivatedPlugins->author : '' . $deactivatedPlugins->author . ''; ?> + +
    +
    + + +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/profile.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/profile.php" new file mode 100644 index 0000000..d65eb03 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/profile.php" @@ -0,0 +1,58 @@ + + +
    +
    + +
    +
    +

    mail, 220, 'X', 'mm', $request->isSecure()) . '" alt="' . $user->screenName . '" />'; ?>

    +

    screenName(); ?>

    +

    name(); ?>

    +

    %s 绡囨棩蹇, 骞舵湁 %s 鏉″叧浜庝綘鐨勮瘎璁哄湪 %s 涓垎绫讳腑.', + $stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>

    +

    logged > 0) { + _e('鏈鍚庣櫥褰: %s', Typecho_I18n::dateWord($user->logged + $options->timezone, $options->gmtTime + $options->timezone)); + } + ?>

    +
    + +
    +
    +

    + profileForm()->render(); ?> +
    + + pass('contributor', true)): ?> +
    +
    +

    + optionsForm()->render(); ?> +
    + + +
    + +
    +

    + personalFormList(); ?> + passwordForm()->render(); ?> +
    +
    +
    +
    +
    + +bottom(); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/register.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/register.php" new file mode 100644 index 0000000..5c8a11c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/register.php" @@ -0,0 +1,50 @@ +hasLogin() || !$options->allowRegister) { + $response->redirect($options->siteUrl); +} +$rememberName = htmlspecialchars(Typecho_Cookie::get('__typecho_remember_name')); +$rememberMail = htmlspecialchars(Typecho_Cookie::get('__typecho_remember_mail')); +Typecho_Cookie::delete('__typecho_remember_name'); +Typecho_Cookie::delete('__typecho_remember_mail'); + +$bodyClass = 'body-100'; + +include 'header.php'; +?> + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/table-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/table-js.php" new file mode 100644 index 0000000..13ac1c3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/table-js.php" @@ -0,0 +1,18 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/theme-editor.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/theme-editor.php" new file mode 100644 index 0000000..a042d00 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/theme-editor.php" @@ -0,0 +1,62 @@ +to($files); +?> + +
    +
    + +
    + + +
    +
    +
    + + +

    + currentIsWriteable()): ?> + + + + + + +

    +
    +
    +
      +
    • 妯℃澘鏂囦欢
    • + next()): ?> + current): ?> class="current"> + file(); ?> + +
    +
    +
    +
    +
    + +bottom($files); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/themes.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/themes.php" new file mode 100644 index 0000000..a2d0a00 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/themes.php" @@ -0,0 +1,69 @@ + + +
    +
    + +
    +
    +
      +
    • + +
    • + + +
    • + +
    + +
    + + + + + + + + + + + + + to($themes); ?> + next()): ?> + + + + + + +
    鎴浘璇︽儏
    <?php $themes->name(); ?> +

    title ? $themes->title() : $themes->name(); ?>

    + + author): ?>: homepage): ?>author(); ?>homepage): ?>    + version): ?>: version() ?> + +

    description); ?>

    + theme != $themes->name): ?> +

    + +   + + +

    + +
    +
    +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/upgrade.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/upgrade.php" new file mode 100644 index 0000000..718d47a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/upgrade.php" @@ -0,0 +1,41 @@ + + +
    +
    + +
    +
    +
    +
    +

    +
      +
    • +
    • %s 鍗囩骇鍒 %s', $options->version, Typecho_Common::VERSION); ?>
    • +
    • +
    +

    +
    +
    +
    +
    +
    +
    + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/user.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/user.php" new file mode 100644 index 0000000..f6cb957 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/user.php" @@ -0,0 +1,23 @@ + + +
    +
    + +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/welcome.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/welcome.php" new file mode 100644 index 0000000..6c26136 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/welcome.php" @@ -0,0 +1,36 @@ + + +
    +
    + +
    +
    +
    +
    +

    title); ?>

    +
      +
    1. + pass('contributor', true)): ?> +
    2. +
    3. + +
    4. + +
    +

    +
    +
    +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-js.php" new file mode 100644 index 0000000..958635f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-js.php" @@ -0,0 +1,260 @@ + +write(); ?> +to($tags); ?> + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-page.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-page.php" new file mode 100644 index 0000000..2b50bf2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-page.php" @@ -0,0 +1,151 @@ +to($page); +?> +
    +
    + +
    +
    +
    + draft && $page->draft['cid'] != $page->cid): ?> + draft['modified']); ?> + 鍒犻櫎瀹', $pageModifyDate->word(), + $security->getIndex('/action/contents-page-edit?do=deleteDraft&cid=' . $page->cid)); ?> + + +

    + + +

    + routingTable['page']['url'], $options->index); + list ($scheme, $permalink) = explode(':', $permalink, 2); + $permalink = ltrim($permalink, '/'); + $permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink); + if ($page->have()) { + $permalink = str_replace('{cid}', $page->cid, $permalink); + } + $input = ''; + ?> +

    + + +

    +

    + + +

    + + +

    + + + + + markdown && (!$page->have() || $page->isMarkdown)): ?> + + + +

    + + content($page); ?> +
    + +
    +
    +
    +
    + +trigger($plugged)->richEditor($page); +if (!$plugged) { + include 'editor-js.php'; +} + +include 'file-upload-js.php'; +include 'custom-fields-js.php'; +Typecho_Plugin::factory('admin/write-page.php')->bottom($page); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-post.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-post.php" new file mode 100644 index 0000000..d8ad69f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/admin/write-post.php" @@ -0,0 +1,180 @@ +to($post); +?> +
    +
    + +
    +
    +
    + draft && $post->draft['cid'] != $post->cid): ?> + draft['modified']); ?> + 鍒犻櫎瀹', $postModifyDate->word(), + $security->getIndex('/action/contents-post-edit?do=deleteDraft&cid=' . $post->cid)); ?> + + +

    + + +

    + routingTable['post']['url'], $options->index); + list ($scheme, $permalink) = explode(':', $permalink, 2); + $permalink = ltrim($permalink, '/'); + $permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink); + if ($post->have()) { + $permalink = str_replace(array( + '{cid}', '{category}', '{year}', '{month}', '{day}' + ), array( + $post->cid, $post->category, $post->year, $post->month, $post->day + ), $permalink); + } + $input = ''; + ?> +

    + + +

    +

    + + +

    + + + +

    + + + + + markdown && (!$post->have() || $post->isMarkdown)): ?> + + + +

    + + content($post); ?> +
    + + +
    +
    +
    +
    + +trigger($plugged)->richEditor($post); +if (!$plugged) { + include 'editor-js.php'; +} + +include 'file-upload-js.php'; +include 'custom-fields-js.php'; +Typecho_Plugin::factory('admin/write-post.php')->bottom($post); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/config.inc.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/config.inc.php" new file mode 100644 index 0000000..ea25b31 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/config.inc.php" @@ -0,0 +1,64 @@ +addServer(array ( + 'host' => 'localhost', + 'user' => 'kirieblog', + 'password' => 'kirie123***', + 'charset' => 'utf8', + 'port' => '3306', + 'database' => 'kirieblog', +), Typecho_Db::READ | Typecho_Db::WRITE); +Typecho_Db::set($db); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/index.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/index.php" new file mode 100644 index 0000000..79efa8b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/index.php" @@ -0,0 +1,26 @@ +begin(); + +/** 寮濮嬭矾鐢卞垎鍙 */ +Typecho_Router::dispatch(); + +/** 娉ㄥ唽涓涓粨鏉熸彃浠 */ +Typecho_Plugin::factory('index.php')->end(); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install.php" new file mode 100644 index 0000000..ce361a3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install.php" @@ -0,0 +1,666 @@ +generator = 'Typecho ' . Typecho_Common::VERSION; +list($soft, $currentVersion) = explode(' ', $options->generator); + +$options->software = $soft; +$options->version = $currentVersion; + +list($prefixVersion, $suffixVersion) = explode('/', $currentVersion); + +/** 鑾峰彇璇█ */ +$lang = _r('lang', Typecho_Cookie::get('__typecho_lang')); +$langs = Widget_Options_General::getLangs(); + +if (empty($lang) && count($langs) > 1) { + foreach ($langs as $lang) { + if ('zh_CN' != $lang) { + break; + } + } +} + +if (empty($lang)) { + $lang = 'zh_CN'; +} + +if ('zh_CN' != $lang) { + $dir = defined('__TYPECHO_LANG_DIR__') ? __TYPECHO_LANG_DIR__ : __TYPECHO_ROOT_DIR__ . '/usr/langs'; + Typecho_I18n::setLang($dir . '/' . $lang . '.mo'); +} + +Typecho_Cookie::set('__typecho_lang', $lang); + +?> + + + + <?php _e('Typecho 瀹夎绋嬪簭'); ?> + + + + + +
    +

    Typecho

    +
      + class="current">1 + class="current">2 + class="current">3 + class="current">4 +
    +
    +
    +
    +
    +
    + + +

    +
    +
    +

    +
    +
    + +

    +
    +
    +

    +
    +
    + + addServer($config, Typecho_Db::READ | Typecho_Db::WRITE); + Typecho_Db::set($db); + ?> +

    +
    +
    + + + + + :
    + : + + +
    + + + +
    +

    :

    +
      + getTokenUrl($loginUrl); + } else { + $loginUrl = _u() . '/admin/index.php'; + } + ?> +
    • +
    • +
    +
    + +

    +
    + + + +

    +
    +
    +

    +
    +
    + + addServer($config, Typecho_Db::READ | Typecho_Db::WRITE); + + /** 鍒濆鍖栨暟鎹簱缁撴瀯 */ + $scripts = file_get_contents ('./install/' . $type . '.sql'); + $scripts = str_replace('typecho_', $config['prefix'], $scripts); + + if (isset($config['charset'])) { + $scripts = str_replace('%charset%', $config['charset'], $scripts); + } + + $scripts = explode(';', $scripts); + foreach ($scripts as $script) { + $script = trim($script); + if ($script) { + $installDb->query($script, Typecho_Db::WRITE); + } + } + + /** 鍏ㄥ眬鍙橀噺 */ + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'theme', 'user' => 0, 'value' => 'default'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'theme:default', 'user' => 0, 'value' => 'a:2:{s:7:"logoUrl";N;s:12:"sidebarBlock";a:5:{i:0;s:15:"ShowRecentPosts";i:1;s:18:"ShowRecentComments";i:2;s:12:"ShowCategory";i:3;s:11:"ShowArchive";i:4;s:9:"ShowOther";}}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'timezone', 'user' => 0, 'value' => _t('28800')))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'lang', 'user' => 0, 'value' => $lang))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'charset', 'user' => 0, 'value' => _t('UTF-8')))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'contentType', 'user' => 0, 'value' => 'text/html'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'gzip', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'generator', 'user' => 0, 'value' => $options->generator))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'title', 'user' => 0, 'value' => 'Hello World'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'description', 'user' => 0, 'value' => 'Just So So ...'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'keywords', 'user' => 0, 'value' => 'typecho,php,blog'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'rewrite', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'frontPage', 'user' => 0, 'value' => 'recent'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'frontArchive', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsRequireMail', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsWhitelist', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsRequireURL', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsRequireModeration', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'plugins', 'user' => 0, 'value' => 'a:0:{}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentDateFormat', 'user' => 0, 'value' => 'F jS, Y \a\t h:i a'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'siteUrl', 'user' => 0, 'value' => $config['siteUrl']))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultCategory', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'allowRegister', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultAllowComment', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultAllowPing', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultAllowFeed', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'pageSize', 'user' => 0, 'value' => 5))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'postsListSize', 'user' => 0, 'value' => 10))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsListSize', 'user' => 0, 'value' => 10))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsHTMLTagAllowed', 'user' => 0, 'value' => NULL))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'postDateFormat', 'user' => 0, 'value' => 'Y-m-d'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'feedFullText', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'editorSize', 'user' => 0, 'value' => 350))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'autoSave', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'markdown', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsMaxNestingLevels', 'user' => 0, 'value' => 5))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPostTimeout', 'user' => 0, 'value' => 24 * 3600 * 30))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsUrlNofollow', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsShowUrl', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsMarkdown', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPageBreak', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsThreaded', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPageSize', 'user' => 0, 'value' => 20))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPageDisplay', 'user' => 0, 'value' => 'last'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsOrder', 'user' => 0, 'value' => 'ASC'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsCheckReferer', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAutoClose', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPostIntervalEnable', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPostInterval', 'user' => 0, 'value' => 60))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsShowCommentOnly', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAvatar', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAvatarRating', 'user' => 0, 'value' => 'G'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAntiSpam', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'routingTable', 'user' => 0, 'value' => 'a:25:{s:5:"index";a:3:{s:3:"url";s:1:"/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:7:"archive";a:3:{s:3:"url";s:6:"/blog/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:2:"do";a:3:{s:3:"url";s:22:"/action/[action:alpha]";s:6:"widget";s:9:"Widget_Do";s:6:"action";s:6:"action";}s:4:"post";a:3:{s:3:"url";s:24:"/archives/[cid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:10:"attachment";a:3:{s:3:"url";s:26:"/attachment/[cid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:8:"category";a:3:{s:3:"url";s:17:"/category/[slug]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:3:"tag";a:3:{s:3:"url";s:12:"/tag/[slug]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:6:"author";a:3:{s:3:"url";s:22:"/author/[uid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:6:"search";a:3:{s:3:"url";s:19:"/search/[keywords]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:10:"index_page";a:3:{s:3:"url";s:21:"/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"archive_page";a:3:{s:3:"url";s:26:"/blog/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:13:"category_page";a:3:{s:3:"url";s:32:"/category/[slug]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:8:"tag_page";a:3:{s:3:"url";s:27:"/tag/[slug]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"author_page";a:3:{s:3:"url";s:37:"/author/[uid:digital]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"search_page";a:3:{s:3:"url";s:34:"/search/[keywords]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"archive_year";a:3:{s:3:"url";s:18:"/[year:digital:4]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:13:"archive_month";a:3:{s:3:"url";s:36:"/[year:digital:4]/[month:digital:2]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"archive_day";a:3:{s:3:"url";s:52:"/[year:digital:4]/[month:digital:2]/[day:digital:2]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:17:"archive_year_page";a:3:{s:3:"url";s:38:"/[year:digital:4]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:18:"archive_month_page";a:3:{s:3:"url";s:56:"/[year:digital:4]/[month:digital:2]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:16:"archive_day_page";a:3:{s:3:"url";s:72:"/[year:digital:4]/[month:digital:2]/[day:digital:2]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"comment_page";a:3:{s:3:"url";s:53:"[permalink:string]/comment-page-[commentPage:digital]";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:4:"feed";a:3:{s:3:"url";s:20:"/feed[feed:string:0]";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:4:"feed";}s:8:"feedback";a:3:{s:3:"url";s:31:"[permalink:string]/[type:alpha]";s:6:"widget";s:15:"Widget_Feedback";s:6:"action";s:6:"action";}s:4:"page";a:3:{s:3:"url";s:12:"/[slug].html";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'actionTable', 'user' => 0, 'value' => 'a:0:{}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'panelTable', 'user' => 0, 'value' => 'a:0:{}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'attachmentTypes', 'user' => 0, 'value' => '@image@'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'secret', 'user' => 0, 'value' => Typecho_Common::randString(32, true)))); + + /** 鍒濆鍒嗙被 */ + $installDb->query($installDb->insert('table.metas')->rows(array('name' => _t('榛樿鍒嗙被'), 'slug' => 'default', 'type' => 'category', 'description' => _t('鍙槸涓涓粯璁ゅ垎绫'), + 'count' => 1, 'order' => 1))); + + /** 鍒濆鍏崇郴 */ + $installDb->query($installDb->insert('table.relationships')->rows(array('cid' => 1, 'mid' => 1))); + + /** 鍒濆鍐呭 */ + $installDb->query($installDb->insert('table.contents')->rows(array('title' => _t('娆㈣繋浣跨敤 Typecho'), 'slug' => 'start', 'created' => Typecho_Date::gmtTime(), 'modified' => Typecho_Date::gmtTime(), + 'text' => '' . _t('濡傛灉鎮ㄧ湅鍒拌繖绡囨枃绔,琛ㄧず鎮ㄧ殑 blog 宸茬粡瀹夎鎴愬姛.'), 'authorId' => 1, 'type' => 'post', 'status' => 'publish', 'commentsNum' => 1, 'allowComment' => 1, + 'allowPing' => 1, 'allowFeed' => 1, 'parent' => 0))); + + $installDb->query($installDb->insert('table.contents')->rows(array('title' => _t('鍏充簬'), 'slug' => 'start-page', 'created' => Typecho_Date::gmtTime(), 'modified' => Typecho_Date::gmtTime(), + 'text' => '' . _t('鏈〉闈㈢敱 Typecho 鍒涘缓, 杩欏彧鏄釜娴嬭瘯椤甸潰.'), 'authorId' => 1, 'order' => 0, 'type' => 'page', 'status' => 'publish', 'commentsNum' => 0, 'allowComment' => 1, + 'allowPing' => 1, 'allowFeed' => 1, 'parent' => 0))); + + /** 鍒濆璇勮 */ + $installDb->query($installDb->insert('table.comments')->rows(array('cid' => 1, 'created' => Typecho_Date::gmtTime(), 'author' => 'Typecho', 'ownerId' => 1, 'url' => 'http://typecho.org', + 'ip' => '127.0.0.1', 'agent' => $options->generator, 'text' => '娆㈣繋鍔犲叆 Typecho 澶у鏃', 'type' => 'comment', 'status' => 'approved', 'parent' => 0))); + + /** 鍒濆鐢ㄦ埛 */ + $password = empty($config['userPassword']) ? substr(uniqid(), 7) : $config['userPassword']; + $hasher = new PasswordHash(8, true); + + $installDb->query($installDb->insert('table.users')->rows(array('name' => $config['userName'], 'password' => $hasher->HashPassword($password), 'mail' => $config['userMail'], + 'url' => 'http://www.typecho.org', 'screenName' => $config['userName'], 'group' => 'administrator', 'created' => Typecho_Date::gmtTime()))); + + unset($_SESSION['typecho']); + header('Location: ./install.php?finish&user=' . urlencode($config['userName']) + . '&password=' . urlencode($password)); + } catch (Typecho_Db_Exception $e) { + $success = false; + $code = $e->getCode(); +?> +

    +
    +
    +query("DROP TABLE IF EXISTS `{$table}`"); + } elseif($type == 'Pgsql') { + $installDb->query("DROP TABLE {$table}"); + } elseif($type == 'SQLite') { + $installDb->query("DROP TABLE {$table}"); + } + } + echo '

    ' . _t('宸茬粡鍒犻櫎瀹屽師鏈夋暟鎹') . '

    '; + } elseif (_r('goahead')) { + //浣跨敤鍘熸湁鏁版嵁 + //浣嗘槸瑕佹洿鏂扮敤鎴风綉绔 + $installDb->query($installDb->update('table.options')->rows(array('value' => $config['siteUrl']))->where('name = ?', 'siteUrl')); + unset($_SESSION['typecho']); + header('Location: ./install.php?finish&use_old'); + exit; + } else { + echo '

    ' . _t('瀹夎绋嬪簭妫鏌ュ埌鍘熸湁鏁版嵁琛ㄥ凡缁忓瓨鍦.') + . '

    ' . ' ' + . _t('鎴栬') . '

    '; + } + } else { + echo '

    ' . _t('瀹夎绋嬪簭鎹曟崏鍒颁互涓嬮敊璇: "%s". 绋嬪簭琚粓姝, 璇锋鏌ユ偍鐨勯厤缃俊鎭.',$e->getMessage()) . '

    '; + } + ?> +
    +
    + + + + +
    +

    +
    +

    + ' . _t('娌℃湁妫娴嬪埌鎮ㄦ墜鍔ㄥ垱寤虹殑閰嶇疆鏂囦欢, 璇锋鏌ュ悗鍐嶆鍒涘缓') . '

    '; + $success = false; + } else { + if (NULL == _r('userUrl')) { + $success = false; + echo '

    ' . _t('璇峰~鍐欐偍鐨勭綉绔欏湴鍧') . '

    '; + } else if (NULL == _r('userName')) { + $success = false; + echo '

    ' . _t('璇峰~鍐欐偍鐨勭敤鎴峰悕') . '

    '; + } else if (NULL == _r('userMail')) { + $success = false; + echo '

    ' . _t('璇峰~鍐欐偍鐨勯偖绠卞湴鍧') . '

    '; + } else if (32 < strlen(_r('userName'))) { + $success = false; + echo '

    ' . _t('鐢ㄦ埛鍚嶉暱搴﹁秴杩囬檺鍒, 璇蜂笉瑕佽秴杩 32 涓瓧绗') . '

    '; + } else if (200 < strlen(_r('userMail'))) { + $success = false; + echo '

    ' . _t('閭闀垮害瓒呰繃闄愬埗, 璇蜂笉瑕佽秴杩 200 涓瓧绗') . '

    '; + } + } + + $_dbConfig = _rFrom('dbHost', 'dbUser', 'dbPassword', 'dbCharset', 'dbPort', 'dbDatabase', 'dbFile', 'dbDsn'); + + $_dbConfig = array_filter($_dbConfig); + $dbConfig = array(); + foreach ($_dbConfig as $key => $val) { + $dbConfig[strtolower (substr($key, 2))] = $val; + } + + // 鍦ㄧ壒娈婃湇鍔″櫒涓婄殑鐗规畩瀹夎杩囩▼澶勭悊 + if (_r('config')) { + $replace = array_keys($dbConfig); + foreach ($replace as &$key) { + $key = '{' . $key . '}'; + } + + if (!empty($_dbConfig['dbDsn'])) { + $dbConfig['dsn'] = str_replace($replace, array_values($dbConfig), $dbConfig['dsn']); + } + $config = str_replace($replace, array_values($dbConfig), _r('config')); + } + + if (!isset($config) && $success && !_r('created')) { + $installDb = new Typecho_Db($adapter, _r('dbPrefix')); + $installDb->addServer($dbConfig, Typecho_Db::READ | Typecho_Db::WRITE); + + + /** 妫娴嬫暟鎹簱閰嶇疆 */ + try { + $installDb->query('SELECT 1=1'); + } catch (Typecho_Db_Adapter_Exception $e) { + $success = false; + echo '

    ' + . _t('瀵逛笉璧凤紝鏃犳硶杩炴帴鏁版嵁搴擄紝璇峰厛妫鏌ユ暟鎹簱閰嶇疆鍐嶇户缁繘琛屽畨瑁') . '

    '; + } catch (Typecho_Db_Exception $e) { + $success = false; + echo '

    ' + . _t('瀹夎绋嬪簭鎹曟崏鍒颁互涓嬮敊璇: " %s ". 绋嬪簭琚粓姝, 璇锋鏌ユ偍鐨勯厤缃俊鎭.',$e->getMessage()) . '

    '; + } + } + + if($success) { + Typecho_Cookie::set('__typecho_config', base64_encode(serialize(array_merge(array( + 'prefix' => _r('dbPrefix'), + 'userName' => _r('userName'), + 'userPassword' => _r('userPassword'), + 'userMail' => _r('userMail'), + 'adapter' => $adapter, + 'siteUrl' => _r('userUrl') + ), $dbConfig)))); + + if (_r('created')) { + header('Location: ./install.php?start'); + exit; + } + + /** 鍒濆鍖栭厤缃枃浠 */ + $lines = array_slice(file(__FILE__), 0, 52); + $lines[] = " +/** 瀹氫箟鏁版嵁搴撳弬鏁 */ +\$db = new Typecho_Db('{$adapter}', '" . _r('dbPrefix') . "'); +\$db->addServer(" . (empty($config) ? var_export($dbConfig, true) : $config) . ", Typecho_Db::READ | Typecho_Db::WRITE); +Typecho_Db::set(\$db); +"; + $contents = implode('', $lines); + if (!Typecho_Common::isAppEngine()) { + @file_put_contents('./config.inc.php', $contents); + } + + // 鍒涘缓涓涓敤浜庢爣璇嗙殑涓存椂鏂囦欢 + $_SESSION['typecho'] = 1; + + if (!file_exists('./config.inc.php')) { + ?> +

    config.inc.php 鏂囦欢'); ?>
    +config.inc.php 鏂囦欢, 骞跺鍒跺涓嬩唬鐮佽嚦鍏朵腑'); ?>

    +

    +

    + +
      +
    • + + +

      +
    • + +
    • + + +

      +
    • +
    + + + +

    +
      +
    • + + +

      +
    • +
    • + + +

      +
    • +
    • + + +

      +
    • +
    • + + +

      +
    • +
    +
    + +

    +
    + +
    +

    +
    +

    +

    +

    +

    GPL 鍗忚鍙戝竷, 鎴戜滑鍏佽鐢ㄦ埛鍦 GPL 鍗忚璁稿彲鐨勮寖鍥村唴浣跨敤, 鎷疯礉, 淇敼鍜屽垎鍙戞绋嬪簭.'); ?> +

    +

    + +

    +
    +

    + + + 1): ?> + + +

    +
    + + +
    +
    +
    +
    + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.php" new file mode 100644 index 0000000..dac6899 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.php" @@ -0,0 +1,175 @@ + + + + + +

    + + + + + + + + + + + + + +
  • + + +
  • + + + + + +
  • + + +
  • + + + + +
  • + + +

    +
  • + + + + + + +
  • + + +

    +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • +
  • + + +
  • + + + +

    + +
  • + + +

    /cloudsql/typecho-gae:typecho'); ?>

    +
  • + +
  • + + +

    :/cloudsql/typecho-gae:typecho'); ?>

    +
  • + + +
  • + + +
  • +
  • + + +
  • +
  • + + +

    +
  • + + + + + + + + + + +
  • + + +

    +
  • +
  • + + +

    +
  • +
  • + + +

    +
  • +
  • + + +
  • +
  • + + +

    +
  • + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.sql" new file mode 100644 index 0000000..78f2ad6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Mysql.sql" @@ -0,0 +1,152 @@ +-- phpMyAdmin SQL Dump +-- version 2.11.5 +-- http://www.phpmyadmin.net +-- +-- 涓绘満: localhost +-- 鐢熸垚鏃ユ湡: 2008 骞 07 鏈 06 鏃 18:00 +-- 鏈嶅姟鍣ㄧ増鏈: 5.0.51 +-- PHP 鐗堟湰: 5.2.5 + +-- +-- 鏁版嵁搴: `typecho` +-- + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_comments` +-- + +CREATE TABLE `typecho_comments` ( + `coid` int(10) unsigned NOT NULL auto_increment, + `cid` int(10) unsigned default '0', + `created` int(10) unsigned default '0', + `author` varchar(200) default NULL, + `authorId` int(10) unsigned default '0', + `ownerId` int(10) unsigned default '0', + `mail` varchar(200) default NULL, + `url` varchar(200) default NULL, + `ip` varchar(64) default NULL, + `agent` varchar(200) default NULL, + `text` text, + `type` varchar(16) default 'comment', + `status` varchar(16) default 'approved', + `parent` int(10) unsigned default '0', + PRIMARY KEY (`coid`), + KEY `cid` (`cid`), + KEY `created` (`created`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_contents` +-- + +CREATE TABLE `typecho_contents` ( + `cid` int(10) unsigned NOT NULL auto_increment, + `title` varchar(200) default NULL, + `slug` varchar(200) default NULL, + `created` int(10) unsigned default '0', + `modified` int(10) unsigned default '0', + `text` text, + `order` int(10) unsigned default '0', + `authorId` int(10) unsigned default '0', + `template` varchar(32) default NULL, + `type` varchar(16) default 'post', + `status` varchar(16) default 'publish', + `password` varchar(32) default NULL, + `commentsNum` int(10) unsigned default '0', + `allowComment` char(1) default '0', + `allowPing` char(1) default '0', + `allowFeed` char(1) default '0', + `parent` int(10) unsigned default '0', + PRIMARY KEY (`cid`), + UNIQUE KEY `slug` (`slug`), + KEY `created` (`created`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_fields` +-- + +CREATE TABLE `typecho_fields` ( + `cid` int(10) unsigned NOT NULL, + `name` varchar(200) NOT NULL, + `type` varchar(8) default 'str', + `str_value` text, + `int_value` int(10) default '0', + `float_value` float default '0', + PRIMARY KEY (`cid`,`name`), + KEY `int_value` (`int_value`), + KEY `float_value` (`float_value`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_metas` +-- + +CREATE TABLE `typecho_metas` ( + `mid` int(10) unsigned NOT NULL auto_increment, + `name` varchar(200) default NULL, + `slug` varchar(200) default NULL, + `type` varchar(32) NOT NULL, + `description` varchar(200) default NULL, + `count` int(10) unsigned default '0', + `order` int(10) unsigned default '0', + `parent` int(10) unsigned default '0', + PRIMARY KEY (`mid`), + KEY `slug` (`slug`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_options` +-- + +CREATE TABLE `typecho_options` ( + `name` varchar(32) NOT NULL, + `user` int(10) unsigned NOT NULL default '0', + `value` text, + PRIMARY KEY (`name`,`user`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_relationships` +-- + +CREATE TABLE `typecho_relationships` ( + `cid` int(10) unsigned NOT NULL, + `mid` int(10) unsigned NOT NULL, + PRIMARY KEY (`cid`,`mid`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_users` +-- + +CREATE TABLE `typecho_users` ( + `uid` int(10) unsigned NOT NULL auto_increment, + `name` varchar(32) default NULL, + `password` varchar(64) default NULL, + `mail` varchar(200) default NULL, + `url` varchar(200) default NULL, + `screenName` varchar(32) default NULL, + `created` int(10) unsigned default '0', + `activated` int(10) unsigned default '0', + `logged` int(10) unsigned default '0', + `group` varchar(16) default 'visitor', + `authCode` varchar(64) default NULL, + PRIMARY KEY (`uid`), + UNIQUE KEY `name` (`name`), + UNIQUE KEY `mail` (`mail`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.php" new file mode 100644 index 0000000..b6fc203 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.php" @@ -0,0 +1,26 @@ + +
  • + + +

    +
  • +
  • + + +

    +
  • +
  • + + +

    +
  • +
  • + + +
  • +
  • + + +

    +
  • + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.sql" new file mode 100644 index 0000000..d612bd6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/Pgsql.sql" @@ -0,0 +1,130 @@ +-- +-- Table structure for table "typecho_comments" +-- +CREATE SEQUENCE "typecho_comments_seq"; + +CREATE TABLE "typecho_comments" ( "coid" INT NOT NULL DEFAULT nextval('typecho_comments_seq'), + "cid" INT NULL DEFAULT '0', + "created" INT NULL DEFAULT '0', + "author" VARCHAR(200) NULL DEFAULT NULL, + "authorId" INT NULL DEFAULT '0', + "ownerId" INT NULL DEFAULT '0', + "mail" VARCHAR(200) NULL DEFAULT NULL, + "url" VARCHAR(200) NULL DEFAULT NULL, + "ip" VARCHAR(64) NULL DEFAULT NULL, + "agent" VARCHAR(200) NULL DEFAULT NULL, + "text" TEXT NULL DEFAULT NULL, + "type" VARCHAR(16) NULL DEFAULT 'comment', + "status" VARCHAR(16) NULL DEFAULT 'approved', + "parent" INT NULL DEFAULT '0', + PRIMARY KEY ("coid") +); + +CREATE INDEX "typecho_comments_cid" ON "typecho_comments" ("cid"); +CREATE INDEX "typecho_comments_created" ON "typecho_comments" ("created"); + + +-- +-- Table structure for table "typecho_contents" +-- + +CREATE SEQUENCE "typecho_contents_seq"; + +CREATE TABLE "typecho_contents" ( "cid" INT NOT NULL DEFAULT nextval('typecho_contents_seq'), + "title" VARCHAR(200) NULL DEFAULT NULL, + "slug" VARCHAR(200) NULL DEFAULT NULL, + "created" INT NULL DEFAULT '0', + "modified" INT NULL DEFAULT '0', + "text" TEXT NULL DEFAULT NULL, + "order" INT NULL DEFAULT '0', + "authorId" INT NULL DEFAULT '0', + "template" VARCHAR(32) NULL DEFAULT NULL, + "type" VARCHAR(16) NULL DEFAULT 'post', + "status" VARCHAR(16) NULL DEFAULT 'publish', + "password" VARCHAR(32) NULL DEFAULT NULL, + "commentsNum" INT NULL DEFAULT '0', + "allowComment" CHAR(1) NULL DEFAULT '0', + "allowPing" CHAR(1) NULL DEFAULT '0', + "allowFeed" CHAR(1) NULL DEFAULT '0', + "parent" INT NULL DEFAULT '0', + PRIMARY KEY ("cid"), + UNIQUE ("slug") +); + +CREATE INDEX "typecho_contents_created" ON "typecho_contents" ("created"); + +-- +-- Table structure for table "typecho_fields" +-- + +CREATE TABLE "typecho_fields" ("cid" INT NOT NULL, + "name" VARCHAR(200) NOT NULL, + "type" VARCHAR(8) NULL DEFAULT 'str', + "str_value" TEXT NULL DEFAULT NULL, + "int_value" INT NULL DEFAULT '0', + "float_value" REAL NULL DEFAULT '0', + PRIMARY KEY ("cid","name") +); + +CREATE INDEX "typecho_fields_int_value" ON "typecho_fields" ("int_value"); +CREATE INDEX "typecho_fields_float_value" ON "typecho_fields" ("float_value"); + +-- +-- Table structure for table "typecho_metas" +-- + +CREATE SEQUENCE "typecho_metas_seq"; + +CREATE TABLE "typecho_metas" ( "mid" INT NOT NULL DEFAULT nextval('typecho_metas_seq'), + "name" VARCHAR(200) NULL DEFAULT NULL, + "slug" VARCHAR(200) NULL DEFAULT NULL, + "type" VARCHAR(16) NOT NULL DEFAULT '', + "description" VARCHAR(200) NULL DEFAULT NULL, + "count" INT NULL DEFAULT '0', + "order" INT NULL DEFAULT '0', + "parent" INT NULL DEFAULT '0', + PRIMARY KEY ("mid") +); + +CREATE INDEX "typecho_metas_slug" ON "typecho_metas" ("slug"); + + +-- +-- Table structure for table "typecho_options" +-- + +CREATE TABLE "typecho_options" ( "name" VARCHAR(32) NOT NULL DEFAULT '', + "user" INT NOT NULL DEFAULT '0', + "value" TEXT NULL DEFAULT NULL, + PRIMARY KEY ("name","user") +); + +-- +-- Table structure for table "typecho_relationships" +-- + +CREATE TABLE "typecho_relationships" ( "cid" INT NOT NULL DEFAULT '0', + "mid" INT NOT NULL DEFAULT '0', + PRIMARY KEY ("cid","mid") +); + +-- +-- Table structure for table "typecho_users" +-- +CREATE SEQUENCE "typecho_users_seq"; + +CREATE TABLE "typecho_users" ( "uid" INT NOT NULL DEFAULT nextval('typecho_users_seq') , + "name" VARCHAR(32) NULL DEFAULT NULL, + "password" VARCHAR(64) NULL DEFAULT NULL, + "mail" VARCHAR(200) NULL DEFAULT NULL, + "url" VARCHAR(200) NULL DEFAULT NULL, + "screenName" VARCHAR(32) NULL DEFAULT NULL, + "created" INT NULL DEFAULT '0', + "activated" INT NULL DEFAULT '0', + "logged" INT NULL DEFAULT '0', + "group" VARCHAR(16) NULL DEFAULT 'visitor', + "authCode" VARCHAR(64) NULL DEFAULT NULL, + PRIMARY KEY ("uid"), + UNIQUE ("name"), + UNIQUE ("mail") +); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.php" new file mode 100644 index 0000000..ec0fa66 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.php" @@ -0,0 +1,7 @@ + + +
  • + + +

    +
  • diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.sql" new file mode 100644 index 0000000..80d53d6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/install/SQLite.sql" @@ -0,0 +1,87 @@ +CREATE TABLE typecho_comments ( "coid" INTEGER NOT NULL PRIMARY KEY, +"cid" int(10) default '0' , +"created" int(10) default '0' , +"author" varchar(200) default NULL , +"authorId" int(10) default '0' , +"ownerId" int(10) default '0' , +"mail" varchar(200) default NULL , +"url" varchar(200) default NULL , +"ip" varchar(64) default NULL , +"agent" varchar(200) default NULL , +"text" text , +"type" varchar(16) default 'comment' , +"status" varchar(16) default 'approved' , +"parent" int(10) default '0' ); + +CREATE INDEX typecho_comments_cid ON typecho_comments ("cid"); +CREATE INDEX typecho_comments_created ON typecho_comments ("created"); + +CREATE TABLE typecho_contents ( "cid" INTEGER NOT NULL PRIMARY KEY, +"title" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"created" int(10) default '0' , +"modified" int(10) default '0' , +"text" text , +"order" int(10) default '0' , +"authorId" int(10) default '0' , +"template" varchar(32) default NULL , +"type" varchar(16) default 'post' , +"status" varchar(16) default 'publish' , +"password" varchar(32) default NULL , +"commentsNum" int(10) default '0' , +"allowComment" char(1) default '0' , +"allowPing" char(1) default '0' , +"allowFeed" char(1) default '0' , +"parent" int(10) default '0' ); + +CREATE UNIQUE INDEX typecho_contents_slug ON typecho_contents ("slug"); +CREATE INDEX typecho_contents_created ON typecho_contents ("created"); + +CREATE TABLE "typecho_fields" ("cid" INTEGER NOT NULL, + "name" varchar(200) NOT NULL, + "type" varchar(8) default 'str', + "str_value" text, + "int_value" int(10) default '0', + "float_value" real default '0' +); + +CREATE UNIQUE INDEX typecho_fields_cid_name ON typecho_fields ("cid", "name"); +CREATE INDEX typecho_fields_int_value ON typecho_fields ("int_value"); +CREATE INDEX typecho_fields_float_value ON typecho_fields ("float_value"); + +CREATE TABLE typecho_metas ( "mid" INTEGER NOT NULL PRIMARY KEY, +"name" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"type" varchar(32) NOT NULL , +"description" varchar(200) default NULL , +"count" int(10) default '0' , +"order" int(10) default '0' , +"parent" int(10) default '0'); + +CREATE INDEX typecho_metas_slug ON typecho_metas ("slug"); + +CREATE TABLE typecho_options ( "name" varchar(32) NOT NULL , +"user" int(10) NOT NULL default '0' , +"value" text ); + +CREATE UNIQUE INDEX typecho_options_name_user ON typecho_options ("name", "user"); + +CREATE TABLE typecho_relationships ( "cid" int(10) NOT NULL , +"mid" int(10) NOT NULL ); + +CREATE UNIQUE INDEX typecho_relationships_cid_mid ON typecho_relationships ("cid", "mid"); + +CREATE TABLE typecho_users ( "uid" INTEGER NOT NULL PRIMARY KEY, +"name" varchar(32) default NULL , +"password" varchar(64) default NULL , +"mail" varchar(200) default NULL , +"url" varchar(200) default NULL , +"screenName" varchar(32) default NULL , +"created" int(10) default '0' , +"activated" int(10) default '0' , +"logged" int(10) default '0' , +"group" varchar(16) default 'visitor' , +"authCode" varchar(64) default NULL); + +CREATE UNIQUE INDEX typecho_users_name ON typecho_users ("name"); +CREATE UNIQUE INDEX typecho_users_mail ON typecho_users ("mail"); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/plugins/HelloWorld/Plugin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/plugins/HelloWorld/Plugin.php" new file mode 100644 index 0000000..6425858 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/plugins/HelloWorld/Plugin.php" @@ -0,0 +1,70 @@ +navBar = array('HelloWorld_Plugin', 'render'); + } + + /** + * 绂佺敤鎻掍欢鏂规硶,濡傛灉绂佺敤澶辫触,鐩存帴鎶涘嚭寮傚父 + * + * @static + * @access public + * @return void + * @throws Typecho_Plugin_Exception + */ + public static function deactivate(){} + + /** + * 鑾峰彇鎻掍欢閰嶇疆闈㈡澘 + * + * @access public + * @param Typecho_Widget_Helper_Form $form 閰嶇疆闈㈡澘 + * @return void + */ + public static function config(Typecho_Widget_Helper_Form $form) + { + /** 鍒嗙被鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('word', NULL, 'Hello World', _t('璇寸偣浠涔')); + $form->addInput($name); + } + + /** + * 涓汉鐢ㄦ埛鐨勯厤缃潰鏉 + * + * @access public + * @param Typecho_Widget_Helper_Form $form + * @return void + */ + public static function personalConfig(Typecho_Widget_Helper_Form $form){} + + /** + * 鎻掍欢瀹炵幇鏂规硶 + * + * @access public + * @return void + */ + public static function render() + { + echo '' + . htmlspecialchars(Typecho_Widget::widget('Widget_Options')->plugin('HelloWorld')->word) + . ''; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/404.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/404.php" new file mode 100644 index 0000000..6a2a210 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/404.php" @@ -0,0 +1,16 @@ + +need('header.php'); ?> + +
    + +
    +

    404 -

    +

    +
    +

    +

    +
    +
    + +
    + need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/archive.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/archive.php" new file mode 100644 index 0000000..cc5f991 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/archive.php" @@ -0,0 +1,36 @@ + +need('header.php'); ?> + +
    +

    archiveTitle(array( + 'category' => _t('鍒嗙被 %s 涓嬬殑鏂囩珷'), + 'search' => _t('鍖呭惈鍏抽敭瀛 %s 鐨勬枃绔'), + 'tag' => _t('鏍囩 %s 涓嬬殑鏂囩珷'), + 'author' => _t('%s 鍙戝竷鐨勬枃绔') + ), '', ''); ?>

    + have()): ?> + next()): ?> + + + +
    +

    +
    + + + pageNav('« 鍓嶄竴椤', '鍚庝竴椤 »'); ?> +
    + + need('sidebar.php'); ?> + need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/comments.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/comments.php" new file mode 100644 index 0000000..709d0b9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/comments.php" @@ -0,0 +1,49 @@ + +
    + comments()->to($comments); ?> + have()): ?> +

    commentsNum(_t('鏆傛棤璇勮'), _t('浠呮湁涓鏉¤瘎璁'), _t('宸叉湁 %d 鏉¤瘎璁')); ?>

    + + listComments(); ?> + + pageNav('« 鍓嶄竴椤', '鍚庝竴椤 »'); ?> + + + + allow('comment')): ?> +
    +
    + cancelReply(); ?> +
    + +

    +
    + user->hasLogin()): ?> +

    user->screenName(); ?>. »

    + +

    + + +

    +

    + + options->commentsRequireMail): ?> required /> +

    +

    + + options->commentsRequireURL): ?> required /> +

    + +

    + + +

    +

    + +

    +
    +
    + +

    + +
    diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/footer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/footer.php" new file mode 100644 index 0000000..347cd19 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/footer.php" @@ -0,0 +1,14 @@ + + + + + + + + +footer(); ?> + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/functions.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/functions.php" new file mode 100644 index 0000000..77b4855 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/functions.php" @@ -0,0 +1,26 @@ +addInput($logoUrl); + + $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', + array('ShowRecentPosts' => _t('鏄剧ず鏈鏂版枃绔'), + 'ShowRecentComments' => _t('鏄剧ず鏈杩戝洖澶'), + 'ShowCategory' => _t('鏄剧ず鍒嗙被'), + 'ShowArchive' => _t('鏄剧ず褰掓。'), + 'ShowOther' => _t('鏄剧ず鍏跺畠鏉傞」')), + array('ShowRecentPosts', 'ShowRecentComments', 'ShowCategory', 'ShowArchive', 'ShowOther'), _t('渚ц竟鏍忔樉绀')); + + $form->addInput($sidebarBlock->multiMode()); +} + + +/* +function themeFields($layout) { + $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('绔欑偣LOGO鍦板潃'), _t('鍦ㄨ繖閲屽~鍏ヤ竴涓浘鐗嘦RL鍦板潃, 浠ュ湪缃戠珯鏍囬鍓嶅姞涓婁竴涓狶OGO')); + $layout->addItem($logoUrl); +} +*/ + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/grid.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/grid.css" new file mode 100644 index 0000000..16183b3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/grid.css" @@ -0,0 +1 @@ +.container,.row [class*="col-"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}.container{margin-left:auto;margin-right:auto;padding-left:10px;padding-right:10px;}.row{margin-right:-10px;margin-left:-10px;}.row [class*="col-"]{float:left;min-height:1px;padding-right:10px;padding-left:10px;}.row [class*="-push-"],.row [class*="-pull-"]{position:relative;}.col-mb-1{width:8.33333%;}.col-mb-2{width:16.66667%;}.col-mb-3{width:25%;}.col-mb-4{width:33.33333%;}.col-mb-5{width:41.66667%;}.col-mb-6{width:50%;}.col-mb-7{width:58.33333%;}.col-mb-8{width:66.66667%;}.col-mb-9{width:75%;}.col-mb-10{width:83.33333%;}.col-mb-11{width:91.66667%;}.col-mb-12{width:100%;}@media(min-width:768px){.container{max-width:728px;}.col-tb-1{width:8.33333%;}.col-tb-2{width:16.66667%;}.col-tb-3{width:25%;}.col-tb-4{width:33.33333%;}.col-tb-5{width:41.66667%;}.col-tb-6{width:50%;}.col-tb-7{width:58.33333%;}.col-tb-8{width:66.66667%;}.col-tb-9{width:75%;}.col-tb-10{width:83.33333%;}.col-tb-11{width:91.66667%;}.col-tb-12{width:100%;}.col-tb-offset-0{margin-left:0;}.col-tb-offset-1{margin-left:8.33333%;}.col-tb-offset-2{margin-left:16.66667%;}.col-tb-offset-3{margin-left:25%;}.col-tb-offset-4{margin-left:33.33333%;}.col-tb-offset-5{margin-left:41.66667%;}.col-tb-offset-6{margin-left:50%;}.col-tb-offset-7{margin-left:58.33333%;}.col-tb-offset-8{margin-left:66.66667%;}.col-tb-offset-9{margin-left:75%;}.col-tb-offset-10{margin-left:83.33333%;}.col-tb-offset-11{margin-left:91.66667%;}.col-tb-offset-12{margin-left:100%;}.col-tb-pull-0{right:0;}.col-tb-pull-1{right:8.33333%;}.col-tb-pull-2{right:16.66667%;}.col-tb-pull-3{right:25%;}.col-tb-pull-4{right:33.33333%;}.col-tb-pull-5{right:41.66667%;}.col-tb-pull-6{right:50%;}.col-tb-pull-7{right:58.33333%;}.col-tb-pull-8{right:66.66667%;}.col-tb-pull-9{right:75%;}.col-tb-pull-10{right:83.33333%;}.col-tb-pull-11{right:91.66667%;}.col-tb-pull-12{right:100%;}.col-tb-push-0{left:0;}.col-tb-push-1{left:8.33333%;}.col-tb-push-2{left:16.66667%;}.col-tb-push-3{left:25%;}.col-tb-push-4{left:33.33333%;}.col-tb-push-5{left:41.66667%;}.col-tb-push-6{left:50%;}.col-tb-push-7{left:58.33333%;}.col-tb-push-8{left:66.66667%;}.col-tb-push-9{left:75%;}.col-tb-push-10{left:83.33333%;}.col-tb-push-11{left:91.66667%;}.col-tb-push-12{left:100%;}}@media(min-width:992px){.container{max-width:952px;}.col-1{width:8.33333%;}.col-2{width:16.66667%;}.col-3{width:25%;}.col-4{width:33.33333%;}.col-5{width:41.66667%;}.col-6{width:50%;}.col-7{width:58.33333%;}.col-8{width:66.66667%;}.col-9{width:75%;}.col-10{width:83.33333%;}.col-11{width:91.66667%;}.col-12{width:100%;}.col-offset-0{margin-left:0;}.col-offset-1{margin-left:8.33333%;}.col-offset-2{margin-left:16.66667%;}.col-offset-3{margin-left:25%;}.col-offset-4{margin-left:33.33333%;}.col-offset-5{margin-left:41.66667%;}.col-offset-6{margin-left:50%;}.col-offset-7{margin-left:58.33333%;}.col-offset-8{margin-left:66.66667%;}.col-offset-9{margin-left:75%;}.col-offset-10{margin-left:83.33333%;}.col-offset-11{margin-left:91.66667%;}.col-offset-12{margin-left:100%;}.col-pull-0{right:0;}.col-pull-1{right:8.33333%;}.col-pull-2{right:16.66667%;}.col-pull-3{right:25%;}.col-pull-4{right:33.33333%;}.col-pull-5{right:41.66667%;}.col-pull-6{right:50%;}.col-pull-7{right:58.33333%;}.col-pull-8{right:66.66667%;}.col-pull-9{right:75%;}.col-pull-10{right:83.33333%;}.col-pull-11{right:91.66667%;}.col-pull-12{right:100%;}.col-push-0{left:0;}.col-push-1{left:8.33333%;}.col-push-2{left:16.66667%;}.col-push-3{left:25%;}.col-push-4{left:33.33333%;}.col-push-5{left:41.66667%;}.col-push-6{left:50%;}.col-push-7{left:58.33333%;}.col-push-8{left:66.66667%;}.col-push-9{left:75%;}.col-push-10{left:83.33333%;}.col-push-11{left:91.66667%;}.col-push-12{left:100%;}}@media(min-width:1200px){.container{max-width:1160px;}.col-wd-1{width:8.33333%;}.col-wd-2{width:16.66667%;}.col-wd-3{width:25%;}.col-wd-4{width:33.33333%;}.col-wd-5{width:41.66667%;}.col-wd-6{width:50%;}.col-wd-7{width:58.33333%;}.col-wd-8{width:66.66667%;}.col-wd-9{width:75%;}.col-wd-10{width:83.33333%;}.col-wd-11{width:91.66667%;}.col-wd-12{width:100%;}.col-wd-offset-0{margin-left:0;}.col-wd-offset-1{margin-left:8.33333%;}.col-wd-offset-2{margin-left:16.66667%;}.col-wd-offset-3{margin-left:25%;}.col-wd-offset-4{margin-left:33.33333%;}.col-wd-offset-5{margin-left:41.66667%;}.col-wd-offset-6{margin-left:50%;}.col-wd-offset-7{margin-left:58.33333%;}.col-wd-offset-8{margin-left:66.66667%;}.col-wd-offset-9{margin-left:75%;}.col-wd-offset-10{margin-left:83.33333%;}.col-wd-offset-11{margin-left:91.66667%;}.col-wd-offset-12{margin-left:100%;}.col-wd-pull-0{right:0;}.col-wd-pull-1{right:8.33333%;}.col-wd-pull-2{right:16.66667%;}.col-wd-pull-3{right:25%;}.col-wd-pull-4{right:33.33333%;}.col-wd-pull-5{right:41.66667%;}.col-wd-pull-6{right:50%;}.col-wd-pull-7{right:58.33333%;}.col-wd-pull-8{right:66.66667%;}.col-wd-pull-9{right:75%;}.col-wd-pull-10{right:83.33333%;}.col-wd-pull-11{right:91.66667%;}.col-wd-pull-12{right:100%;}.col-wd-push-0{left:0;}.col-wd-push-1{left:8.33333%;}.col-wd-push-2{left:16.66667%;}.col-wd-push-3{left:25%;}.col-wd-push-4{left:33.33333%;}.col-wd-push-5{left:41.66667%;}.col-wd-push-6{left:50%;}.col-wd-push-7{left:58.33333%;}.col-wd-push-8{left:66.66667%;}.col-wd-push-9{left:75%;}.col-wd-push-10{left:83.33333%;}.col-wd-push-11{left:91.66667%;}.col-wd-push-12{left:100%;}}@media(max-width:767px){.kit-hidden-mb{display:none;}}@media(max-width:991px){.kit-hidden-tb{display:none;}}@media(max-width:1199px){.kit-hidden{display:none;}}.clearfix,.row{zoom:1;}.clearfix:before,.row:before,.clearfix:after,.row:after{content:" ";display:table;}.clearfix:after,.row:after{clear:both;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/header.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/header.php" new file mode 100644 index 0000000..efabbed --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/header.php" @@ -0,0 +1,70 @@ + + + + + + + + + <?php $this->archiveTitle(array( + 'category' => _t('鍒嗙被 %s 涓嬬殑鏂囩珷'), + 'search' => _t('鍖呭惈鍏抽敭瀛 %s 鐨勬枃绔'), + 'tag' => _t('鏍囩 %s 涓嬬殑鏂囩珷'), + 'author' => _t('%s 鍙戝竷鐨勬枃绔') + ), '', ' - '); ?><?php $this->options->title(); ?> + + + + + + + + + + header(); ?> + + + + + +
    +
    +
    + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/img/icon-search.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/img/icon-search.png" new file mode 100644 index 0000000000000000000000000000000000000000..6ab06195ca72227d297ec6b7f79f1e31dcaed4fb GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaA1qS$pxB}_W&`<{lhlGTLsZ*zx zm6c7IGNr%2fAZwX)2C0LHfZomss*!lUA7_BxxCJI5;v*&fDT@pTRix)7dt zK(lbh>J2M2O*h=^ded_z%rWKNfh)`O;?0fv<9i#=G>304(aC%^Z|TY#$KOO7aqQ*Z S^5P`WdInEdKbLh*2~7aulY$xm literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/img/icon-search@2x.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/img/icon-search@2x.png" new file mode 100644 index 0000000000000000000000000000000000000000..243b408eb8e74ef0b5cfa51d701f833137ce95da GIT binary patch literal 437 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-r0X`wFK-$5gnPbQW5ud%0;0j z1p(KI9$R`?0?&H=`>&sTd|{y4gxVD^5B{!bKm3k0;?w+FQ@OA9C$D#z$0BlT&(dyR zg~^j6GbTmKB&_{-Wz&m)pMNcTH09H(nVk{5oZ4-dB%d<0^gL<(x7(F}O|#6yCsNeftUg5~p~U6Y49mOQIS<`ccr0*7{n0PM uhea`*>)d$R7O|~4E?|1_rN_QCvHA;2G_#_w-}VK1n8DN4&t;ucLK6Tneed('header.php'); + ?> + +
    + next()): ?> + + + + pageNav('« 鍓嶄竴椤', '鍚庝竴椤 »'); ?> +
    + +need('sidebar.php'); ?> +need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/page.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/page.php" new file mode 100644 index 0000000..8f1cd6f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/page.php" @@ -0,0 +1,15 @@ + +need('header.php'); ?> + +
    + + need('comments.php'); ?> +
    + +need('sidebar.php'); ?> +need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/post.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/post.php" new file mode 100644 index 0000000..3732c9f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/post.php" @@ -0,0 +1,27 @@ + +need('header.php'); ?> + +
    +
    +

    title() ?>

    + +
    + content(); ?> +
    +

    tags(', ', true, 'none'); ?>

    +
    + + need('comments.php'); ?> + +
      +
    • 涓婁竴绡: thePrev('%s','娌℃湁浜'); ?>
    • +
    • 涓嬩竴绡: theNext('%s','娌℃湁浜'); ?>
    • +
    +
    + +need('sidebar.php'); ?> +need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/screenshot.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/screenshot.png" new file mode 100644 index 0000000000000000000000000000000000000000..8aa2987ed676476537bc6578c64d4ef74871e24d GIT binary patch literal 12880 zcmV-WGOx{vP)&$qSKrKHVceZ0=k=uTj*pp=tK zalDx5QQ1|)%m6VjN zt*sRoAEu(EO*}a+EGNau&Lbfmfoomv=H(k8EuEpI#l674#>PB4IYBcmF+ESYt)9-# z*XQ8g*456%xUDouRg8;@VNps>JuT3^tIpNejdf#OYJ0}Lwf67s`|RE4<=)N3#qH+Z z@9*~a@b*wrRMf}0S4lk}D>$^ayojK>`1bH08Xex%#bI`elAf-Nla~MZ_nDcQGcz;r z`2U)$x#s2Xyvx@A{`dLu=hoilf0U}9l7wbvX3oXD|M>3S*Us17-n_lF&(6l&=I~Nv zc6@+^eT|w*Sa8kO=C!`Yac5qyyUBBWiF`tL zp}5VYtEz>BhNYX6zO=2apOS4{Nql;GSXW$xgN>A%rKYa8&DP$IlAh=J|88t;#ns)! z#l5Vwyq1%Ty}rlS&BeRL&9=9#&ff6H*5-$NbiU2#x4piFi;CpVxQUFEt*xb%f^fCQ z)@Oi{wyULbgrl>@+`qQ7W?^96?)PwWbk*kgucMrlo1NkC`<9J}t*y1ozQ4uU@3yb4 zrJ$Uwr>~u(t=8V~rKPNmqs)|~&4+<}wYACS==7VLl$Dd7_eP@C001uwNkld0yz@uI~Cco)Ygl4RT0^N)bb;H#4my^CeZd0K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CcEr_am`r+Y|oQbZhiyC8HxkB3BF}M1(|y zM2HB92#F985)p#`dWejW2(Lg$gou!ckVqZ@P!z063?72MJ|Pjh`fB^m!*_EncXSOJ zQ%#LO(R#Mct2e$TArX%Kw(Yl{K!;SPlV3PCW|-PP*!5qhPkr;3*CQmt@q4#Ux3x9& z&Kc}&&aR8|27?0r?belV5?_;$2!FVB{d#TPA1{BYIS5VX4fl5pp=bZ~^lA5N5)$Fg zH@ANKEiw5YwL2~+9{a{`KlNpm|J1*p?o_`XArWL+|MYaB4C&At5;Y2$Oj_8bSBS3; z;%|VE2$4D@BE;c#hjDls0)vO-dLV9MWgWs*32w+u#?yH?j#F}~$)X$}UCW-JjKYf~ zB4op!P3zZ8z|$Pag9jjcc4qF0_8=dxS=h3M1?x8Rx2z6%a@YJmesc^5-M%}-U6TVZ zl86wL^#1CMt<|FZ(C#Q;?@mx3I#Fm=d>pchtHy%upy}<86rWLhF#f-I8U`EW4L@ZkBCEFJ2=P}WB6(atYO$D46 zEF>c2{eAGxZzgtaqHf}?iQedWXU(UdzyDU@Ci0%>^?A7;ydMRtc0wp-<8DSCp22#z ufb#xLcqdv!-8X^og&*t`{=Ms~Mfm@jV;;DoOx@oA0000 + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/style.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/style.css" new file mode 100644 index 0000000..2faa800 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/usr/themes/default/style.css" @@ -0,0 +1 @@ +body{background-color:#FFF;color:#444;font-family:"Droid Serif",Georgia,"Times New Roman",STHeiti,serif;font-size:87.5%;}a{color:#3354AA;text-decoration:none;}a:hover,a:active{color:#444;}pre,code{background:#F3F3F0;font-family:Menlo,Monaco,Consolas,"Lucida Console","Courier New",monospace;font-size:.92857em;}code{padding:2px 4px;color:#B94A48;}pre{padding:0;border:1px solid #ccc;overflow:auto;max-height:400px;}pre code{padding:3px;color:#444;}blockquote{margin:1em 1.5em;padding-left:1.5em;border-left:4px solid #F3F3F0;}h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}input[type="text"],input[type="email"],input[type="url"],input[type="password"],textarea{padding:5px;border:1px solid #E9E9E9;width:100%;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}textarea{resize:vertical;}.post-meta a,.post-content a,.widget a,.comment-content a{border-bottom:1px solid #EEE;}.post-meta a:hover,.post-content a:hover,.widget a:hover,.comment-content a:hover{border-bottom-color:transparent;}.browsehappy{padding:8px 0;background:#FBE3E4;color:#8A1F11;text-align:center;}.browsehappy a{color:#8A1F11;text-decoration:underline;font-weight:bold;}#header{padding-top:35px;border-bottom:1px solid #EEE;}#logo{color:#333;font-size:2.5em;}.description{margin:.5em 0 0;color:#999;font-style:italic;}#nav-menu{margin:25px 0 0;padding:0;}#nav-menu a{display:block;margin-right:-1px;padding:0 20px;border:1px solid #EEE;border-bottom:none;height:32px;line-height:32px;color:#444;float:left;}#nav-menu a:hover,#nav-menu .current{background:#F6F6F6;}#search{position:relative;margin-top:15px;}#search input{padding-right:30px;}#search button{position:absolute;right:4px;top:2px;border:none;padding:0;width:24px;height:24px;background:transparent url(img/icon-search.png) no-repeat center center;direction:ltr;text-indent:-9999em;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#search button{background-image:url(img/icon-search@2x.png);-webkit-background-size:24px 24px;-moz-background-size:24px 24px;-o-background-size:24px 24px;background-size:24px 24px;}}.post{padding:15px 0 20px;border-bottom:1px solid #EEE;}.post-title{margin:.83em 0;font-size:1.4em;}.post-meta{margin-top:-0.5em;padding:0;color:#999;font-size:.92857em;}.post-meta li{display:inline-block;margin:0 8px 0 0;padding-left:12px;border-left:1px solid #EEE;}.post-meta li:first-child{margin-left:0;padding-left:0;border:none;}.post-content{line-height:1.5;}.post .tags{clear:both;}.post-near{list-style:none;margin:30px 0;padding:0;color:#999;}.post-near li{margin:10px 0;}.archive-title{margin:1em 0 -1em;padding-top:20px;color:#999;font-size:1em;}.more{text-align:center;}.more a{border:none;}.protected .text{width:50%;}.page-navigator{list-style:none;margin:25px 0;padding:0;text-align:center;}.page-navigator li{display:inline-block;margin:0 4px;}.page-navigator a{display:inline-block;padding:0 10px;height:30px;line-height:30px;}.page-navigator a:hover{background:#EEE;text-decoration:none;}.page-navigator .current a{color:#444;background:#EEE;}#comments{padding-top:15px;}.comment-list,.comment-list ol{list-style:none;margin:0;padding:0;}.comment-list li{padding:14px;margin-top:10px;border:1px solid #EEE;}.comment-list li.comment-level-odd{background:#F6F6F3;}.comment-list li.comment-level-even{background:#FFF;}.comment-list li.comment-by-author{background:#FFF9E8;}.comment-list li .comment-reply{text-align:right;font-size:.92857em;}.comment-meta a{color:#999;font-size:.92857em;}.comment-author{display:block;margin-bottom:3px;color:#444;}.comment-author .avatar{float:left;margin-right:10px;}.comment-author cite{font-weight:bold;font-style:normal;}.comment-list .respond{margin-top:15px;border-top:1px solid #EEE;}.respond .cancel-comment-reply{float:right;margin-top:15px;font-size:.92857em;}#comment-form label{display:block;margin-bottom:.5em;font-weight:bold;}#comment-form .required:after{content:" *";color:#C00;}#secondary{padding-top:15px;word-wrap:break-word;}.widget{margin-bottom:30px;}.widget-list{list-style:none;padding:0;}.widget-list li{margin:5px 0;line-height:1.5;}.widget-list li ul{margin-left:15px;}#footer{padding:3em 0;line-height:1.5;text-align:center;color:#999;}.error-page{margin-top:100px;margin-bottom:100px;}.post-content,.comment-content{line-height:1.5;word-wrap:break-word;}.post-content h2,.comment-content h2{font-size:1.28571em;}.post-content img,.comment-content img,.post-content video,.comment-content video{max-width:100%;}.post-content a img,.comment-content a img{background:#FFF;position:relative;bottom:-4px;}.post-content hr,.comment-content hr{margin:2em auto;width:100px;border:1px solid #E9E9E9;border-width:2px 0 0 0;}.aligncenter,div.aligncenter{display:block;margin-left:auto;margin-right:auto;}.alignleft{float:left;}.alignright{float:right;}img.alignleft{margin:0 15px 0 0;}img.alignright{margin:0 0 0 15px;}@media(max-width:767px){body{font-size:81.25%;}#nav-menu a{float:none;display:inline-block;margin:0 -2px;}}@media(max-width:768px){#header,.post-title,.post-meta{text-align:center;}}@media(min-width:1200px){.container{max-width:952px;}}.hidden{display:none!important;visibility:hidden;}.sr-only{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.sr-only.focusable:active,.sr-only.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto;}.invisible{visibility:hidden;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/DocParser.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/DocParser.php" new file mode 100644 index 0000000..1f494ac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/DocParser.php" @@ -0,0 +1,599 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Parses Markdown into an AST + */ +class CommonMark_DocParser +{ + const CODE_INDENT = 4; + + /** + * @var BlockElement + */ + protected $tip; + + /** + * @var BlockElement + */ + protected $doc; + + /** + * @var InlineParser + */ + protected $inlineParser; + + /** + * @var ReferenceMap + */ + protected $refMap; + + /** + * Convert tabs to spaces on each line using a 4-space tab stop + * @param string $string + * + * @return string + */ + protected static function detabLine($string) + { + if (strpos($string, "\t") === false) { + return $string; + } + + // Split into different parts + $parts = explode("\t", $string); + // Add each part to the resulting line + // The first one is done here; others are prefixed + // with the necessary spaces inside the loop below + $line = $parts[0]; + unset($parts[0]); + + foreach ($parts as $part) { + // Calculate number of spaces; insert them followed by the non-tab contents + $amount = 4 - Typecho_Common::strLen($line, 'UTF-8') % 4; + $line .= str_repeat(' ', $amount) . $part; + } + + return $line; + } + + /** + * Break out of all containing lists, resetting the tip of the + * document to the parent of the highest list, and finalizing + * all the lists. (This is used to implement the "two blank lines + * break of of all lists" feature.) + * + * @param BlockElement $block + * @param int $lineNumber + */ + protected function breakOutOfLists(CommonMark_Element_BlockElement $block, $lineNumber) + { + $b = $block; + $lastList = null; + do { + if ($b->getType() === CommonMark_Element_BlockElement::TYPE_LIST) { + $lastList = $b; + } + + $b = $b->getParent(); + } while ($b); + + if ($lastList) { + while ($block != $lastList) { + $this->finalize($block, $lineNumber); + $block = $block->getParent(); + } + $this->finalize($lastList, $lineNumber); + $this->tip = $lastList->getParent(); + } + } + + /** + * @param string $ln + * @param int $offset + * + * @throws \RuntimeException + */ + protected function addLine($ln, $offset) + { + $s = substr($ln, $offset); + if ($s === false) { + $s = ''; + } + + if (!$this->tip->getIsOpen()) { + throw new RuntimeException(sprintf('Attempted to add line (%s) to closed container.', $ln)); + } + + $this->tip->getStrings()->add($s); + } + + /** + * @param string $tag + * @param int $lineNumber + * @param int $offset + * + * @return BlockElement + */ + protected function addChild($tag, $lineNumber, $offset) + { + while (!$this->tip->canContain($tag)) { + $this->finalize($this->tip, $lineNumber); + } + + $columnNumber = $offset + 1; // offset 0 = column 1 + $newBlock = new CommonMark_Element_BlockElement($tag, $lineNumber, $columnNumber); + $this->tip->getChildren()->add($newBlock); + $newBlock->setParent($this->tip); + $this->tip = $newBlock; + + return $newBlock; + } + + /** + * @param string $ln + * @param int $offset + * + * @return array|null + */ + protected function parseListMarker($ln, $offset) + { + $rest = substr($ln, $offset); + $data = array(); + + if (preg_match(CommonMark_Util_RegexHelper::getInstance()->getHRuleRegex(), $rest)) { + return null; + } + + if ($matches = CommonMark_Util_RegexHelper::matchAll('/^[*+-]( +|$)/', $rest)) { + $spacesAfterMarker = strlen($matches[1]); + $data['type'] = CommonMark_Element_BlockElement::LIST_TYPE_UNORDERED; + $data['delimiter'] = null; + $data['bullet_char'] = $matches[0][0]; + } elseif ($matches = CommonMark_Util_RegexHelper::matchAll('/^(\d+)([.)])( +|$)/', $rest)) { + $spacesAfterMarker = strlen($matches[3]); + $data['type'] = CommonMark_Element_BlockElement::LIST_TYPE_ORDERED; + $data['start'] = intval($matches[1]); + $data['delimiter'] = $matches[2]; + $data['bullet_char'] = null; + } else { + return null; + } + + $blankItem = strlen($matches[0]) === strlen($rest); + if ($spacesAfterMarker >= 5 || + $spacesAfterMarker < 1 || + $blankItem + ) { + $data['padding'] = strlen($matches[0]) - $spacesAfterMarker + 1; + } else { + $data['padding'] = strlen($matches[0]); + } + + return $data; + } + + /** + * @param array $listData + * @param array $itemData + * + * @return bool + */ + protected function listsMatch($listData, $itemData) + { + return ($listData['type'] === $itemData['type'] && + $listData['delimiter'] === $itemData['delimiter'] && + $listData['bullet_char'] === $itemData['bullet_char']); + } + + /** + * @param DocParser $self + * @param mixed $oldTip + * @param mixed $lastMatchedContainer + * @param mixed $lineNumber + * @param bool $closeUnmatchedBlocksAlreadyDone + */ + protected function closeUnmatchedBlocks(CommonMark_DocParser $self, $oldTip, $lastMatchedContainer, $lineNumber, &$closeUnmatchedBlocksAlreadyDone) + { + // finalize any blocks not matched + while (!$closeUnmatchedBlocksAlreadyDone && $oldTip != $lastMatchedContainer && $oldTip !== null) { + $self->finalize($oldTip, $lineNumber); + $oldTip = $oldTip->getParent(); + } + $closeUnmatchedBlocksAlreadyDone = true; + } + + /** + * @param string $ln + * @param int $lineNumber + */ + protected function incorporateLine($ln, $lineNumber) + { + $allMatched = true; + $offset = 0; + $blank = false; + $container = $this->doc; + $oldTip = $this->tip; + + // Convert tabs to spaces: + $ln = self::detabLine($ln); + + // For each containing block, try to parse the associated line start. + // Bail out on failure: container will point to the last matching block. + // Set all_matched to false if not all containers match. + while ($container->hasChildren()) { + /** @var BlockElement $lastChild */ + $lastChild = $container->getChildren()->last(); + if (!$lastChild->getIsOpen()) { + break; + } + + $container = $lastChild; + + $match = CommonMark_Util_RegexHelper::matchAt('/[^ ]/', $ln, $offset); + if ($match === null) { + $firstNonSpace = strlen($ln); + $blank = true; + } else { + $firstNonSpace = $match; + $blank = false; + } + + $indent = $firstNonSpace - $offset; + + switch ($container->getType()) { + case CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE: + $matched = $indent <= 3 && isset($ln[$firstNonSpace]) && $ln[$firstNonSpace] === '>'; + if ($matched) { + $offset = $firstNonSpace + 1; + if (isset($ln[$offset]) && $ln[$offset] === ' ') { + $offset++; + } + } else { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_LIST_ITEM: + $listData = $container->getExtra('list_data'); + $increment = $listData['marker_offset'] + $listData['padding']; + if ($indent >= $increment) { + $offset += $increment; + } elseif ($blank) { + $offset = $firstNonSpace; + } else { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_INDENTED_CODE: + if ($indent >= self::CODE_INDENT) { + $offset += self::CODE_INDENT; + } elseif ($blank) { + $offset = $firstNonSpace; + } else { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_ATX_HEADER: + case CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER: + case CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE: + // a header can never contain > 1 line, so fail to match: + $allMatched = false; + break; + + case CommonMark_Element_BlockElement::TYPE_FENCED_CODE: + // skip optional spaces of fence offset + $i = $container->getExtra('fence_offset'); + while ($i > 0 && $ln[$offset] === ' ') { + $offset++; + $i--; + } + break; + + case CommonMark_Element_BlockElement::TYPE_HTML_BLOCK: + if ($blank) { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_PARAGRAPH: + if ($blank) { + $container->setIsLastLineBlank(true); + $allMatched = false; + } + break; + + default: + // Nothing + } + + if (!$allMatched) { + $container = $container->getParent(); // back up to the last matching block + break; + } + } + + $lastMatchedContainer = $container; + + // This function is used to finalize and close any unmatched + // blocks. We aren't ready to do this now, because we might + // have a lazy paragraph continuation, in which case we don't + // want to close unmatched blocks. So we store this closure for + // use later, when we have more information. + $closeUnmatchedBlocksAlreadyDone = false; + + // Check to see if we've hit 2nd blank line; if so break out of list: + if ($blank && $container->getIsLastLineBlank()) { + $this->breakOutOfLists($container, $lineNumber); + } + + // Unless last matched container is a code block, try new container starts, + // adding children to the last matched container: + while ($container->getType() != CommonMark_Element_BlockElement::TYPE_FENCED_CODE && + $container->getType() != CommonMark_Element_BlockElement::TYPE_INDENTED_CODE && + $container->getType() != CommonMark_Element_BlockElement::TYPE_HTML_BLOCK && + // this is a little performance optimization + CommonMark_Util_RegexHelper::matchAt('/^[ #`~*+_=<>0-9-]/', $ln, $offset) !== null + ) { + $match = CommonMark_Util_RegexHelper::matchAt('/[^ ]/', $ln, $offset); + if ($match === null) { + $firstNonSpace = strlen($ln); + $blank = true; + } else { + $firstNonSpace = $match; + $blank = false; + } + + $indent = $firstNonSpace - $offset; + + if ($indent >= self::CODE_INDENT) { + // indented code + if ($this->tip->getType() != CommonMark_Element_BlockElement::TYPE_PARAGRAPH && !$blank) { + $offset += self::CODE_INDENT; + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_INDENTED_CODE, $lineNumber, $offset); + } else { // ident > 4 in a lazy paragraph continuation + break; + } + } elseif (!$blank && $ln[$firstNonSpace] === '>') { + // blockquote + $offset = $firstNonSpace + 1; + // optional following space + if (isset($ln[$offset]) && $ln[$offset] === ' ') { + $offset++; + } + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE, $lineNumber, $offset); + } elseif ($match = CommonMark_Util_RegexHelper::matchAll('/^#{1,6}(?: +|$)/', $ln, $firstNonSpace)) { + // ATX header + $offset = $firstNonSpace + strlen($match[0]); + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_ATX_HEADER, $lineNumber, $firstNonSpace); + $container->setExtra('level', strlen(trim($match[0]))); // number of #s + // remove trailing ###s + $container->getStrings()->add( + preg_replace( + '/(?:(\\\\#) *#*| *#+) *$/', + '$1', + substr($ln, $offset) + ) + ); + break; + } elseif ($match = CommonMark_Util_RegexHelper::matchAll('/^`{3,}(?!.*`)|^~{3,}(?!.*~)/', $ln, $firstNonSpace)) { + // fenced code block + $fenceLength = strlen($match[0]); + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_FENCED_CODE, $lineNumber, $firstNonSpace); + $container->setExtra('fence_length', $fenceLength); + $container->setExtra('fence_char', $match[0][0]); + $container->setExtra('fence_offset', $firstNonSpace - $offset); + $offset = $firstNonSpace + $fenceLength; + break; + } elseif (CommonMark_Util_RegexHelper::matchAt( + CommonMark_Util_RegexHelper::getInstance()->getHtmlBlockOpenRegex(), + $ln, + $firstNonSpace + ) !== null + ) { + // html block + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_HTML_BLOCK, $lineNumber, $firstNonSpace); + // note, we don't adjust offset because the tag is part of the text + break; + } elseif ($container->getType() === CommonMark_Element_BlockElement::TYPE_PARAGRAPH && + $container->getStrings()->count() === 1 && + ($match = CommonMark_Util_RegexHelper::matchAll('/^(?:=+|-+) *$/', $ln, $firstNonSpace)) + ) { + // setext header line + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container->setType(CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER); + $container->setExtra('level', $match[0][0] === '=' ? 1 : 2); + $offset = strlen($ln); + } elseif (CommonMark_Util_RegexHelper::matchAt(CommonMark_Util_RegexHelper::getInstance()->getHRuleRegex(), $ln, $firstNonSpace) !== null) { + // hrule + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE, $lineNumber, $firstNonSpace); + $offset = strlen($ln) - 1; + break; + } elseif (($data = $this->parseListMarker($ln, $firstNonSpace))) { + // list item + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $data['marker_offset'] = $indent; + $offset = $firstNonSpace + $data['padding']; + + // add the list if needed + if ($container->getType() !== CommonMark_Element_BlockElement::TYPE_LIST || + !($this->listsMatch($container->getExtra('list_data'), $data)) + ) { + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_LIST, $lineNumber, $firstNonSpace); + $container->setExtra('list_data', $data); + } + + // add the list item + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_LIST_ITEM, $lineNumber, $firstNonSpace); + $container->setExtra('list_data', ($data)); + } else { + break; + } + + if ($container->acceptsLines()) { + // if it's a line container, it can't contain other containers + break; + } + } + + // What remains at the offset is a text line. Add the text to the appropriate container. + + $match = CommonMark_Util_RegexHelper::matchAt('/[^ ]/', $ln, $offset); + if ($match === null) { + $firstNonSpace = strlen($ln); + $blank = true; + } else { + $firstNonSpace = $match; + $blank = false; + } + + $indent = $firstNonSpace - $offset; + + // First check for a lazy paragraph continuation: + if ($this->tip !== $lastMatchedContainer && + !$blank && + $this->tip->getType() == CommonMark_Element_BlockElement::TYPE_PARAGRAPH && + $this->tip->getStrings()->count() > 0 + ) { + // lazy paragraph continuation + $this->lastLineBlank = false; // TODO: really? (see line 1152) + $this->addLine($ln, $offset); + } else { // not a lazy continuation + //finalize any blocks not matched + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + + // Block quote lines are never blank as they start with > + // and we don't count blanks in fenced code for purposes of tight/loose + // lists or breaking out of lists. We also don't set last_line_blank + // on an empty list item. + $container->setIsLastLineBlank( + $blank && + !( + $container->getType() == CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE || + $container->getType() == CommonMark_Element_BlockElement::TYPE_FENCED_CODE || + ($container->getType() == CommonMark_Element_BlockElement::TYPE_LIST_ITEM && + $container->getChildren()->count() === 0 && + $container->getStartLine() == $lineNumber + ) + ) + ); + + $cont = $container; + while ($cont->getParent()) { + $cont->getParent()->setIsLastLineBlank(false); + $cont = $cont->getParent(); + } + + switch ($container->getType()) { + case CommonMark_Element_BlockElement::TYPE_INDENTED_CODE: + case CommonMark_Element_BlockElement::TYPE_HTML_BLOCK: + $this->addLine($ln, $offset); + break; + + case CommonMark_Element_BlockElement::TYPE_FENCED_CODE: + // check for closing code fence + $test = ($indent <= 3 && + isset($ln[$firstNonSpace]) && + $ln[$firstNonSpace] == $container->getExtra('fence_char') && + $match = CommonMark_Util_RegexHelper::matchAll('/^(?:`{3,}|~{3,})(?= *$)/', $ln, $firstNonSpace) + ); + if ($test && strlen($match[0]) >= $container->getExtra('fence_length')) { + // don't add closing fence to container; instead, close it: + $this->finalize($container, $lineNumber); + } else { + $this->addLine($ln, $offset); + } + break; + + case CommonMark_Element_BlockElement::TYPE_ATX_HEADER: + case CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER: + case CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE: + // nothing to do; we already added the contents. + break; + + default: + if ($container->acceptsLines()) { + $this->addLine($ln, $firstNonSpace); + } elseif ($blank) { + // do nothing + } elseif ($container->getType() != CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE && $container->getType( + ) != CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER + ) { + // create paragraph container for line + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_PARAGRAPH, $lineNumber, $firstNonSpace); + $this->addLine($ln, $firstNonSpace); + } else { + // TODO: throw exception? + } + } + } + } + + /** + * @param BlockElement $block + * @param int $lineNumber + */ + public function finalize(CommonMark_Element_BlockElement $block, $lineNumber) + { + $block->finalize($lineNumber, $this->inlineParser, $this->refMap); + + $this->tip = $block->getParent(); // typo on 1310? + } + + /** + * The main parsing function. Returns a parsed document AST. + * @param string $input + * + * @return BlockElement + * + * @api + */ + public function parse($input) + { + $this->doc = new CommonMark_Element_BlockElement(CommonMark_Element_BlockElement::TYPE_DOCUMENT, 1, 1); + $this->tip = $this->doc; + + $this->inlineParser = new CommonMark_InlineParser(); + $this->refMap = new CommonMark_Reference_ReferenceMap(); + + // Remove any /n which appears at the very end of the string + if (substr($input, -1) == "\n") { + $input = substr($input, 0, -1); + } + + $lines = preg_split('/\r\n|\n|\r/', $input); + $len = count($lines); + for ($i = 0; $i < $len; $i++) { + $this->incorporateLine($lines[$i], $i + 1); + } + + while ($this->tip) { + $this->finalize($this->tip, $len - 1); + } + + $this->doc->processInlines($this->inlineParser, $this->refMap); + + return $this->doc; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/BlockElement.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/BlockElement.php" new file mode 100644 index 0000000..f69d898 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/BlockElement.php" @@ -0,0 +1,478 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Block-level element + */ +class CommonMark_Element_BlockElement +{ + const TYPE_ATX_HEADER = 'ATXHeader'; + const TYPE_BLOCK_QUOTE = 'BlockQuote'; + const TYPE_DOCUMENT = 'Document'; + const TYPE_FENCED_CODE = 'FencedCode'; + const TYPE_HORIZONTAL_RULE = 'HorizontalRule'; + const TYPE_HTML_BLOCK = 'HtmlBlock'; + const TYPE_INDENTED_CODE = 'IndentedCode'; + const TYPE_LIST = 'List'; + const TYPE_LIST_ITEM = 'ListItem'; + const TYPE_PARAGRAPH = 'Paragraph'; + const TYPE_REFERENCE_DEF = 'ReferenceDef'; + const TYPE_SETEXT_HEADER = 'SetextHeader'; + + const LIST_TYPE_ORDERED = 'Outline'; + const LIST_TYPE_UNORDERED = 'Bullet'; + + /** + * @var string + */ + protected $type; + + /** + * @var bool + */ + protected $open = true; + + /** + * @var bool + */ + protected $lastLineBlank = false; + + /** + * @var int + */ + protected $startLine; + + /** + * @var int + */ + protected $startColumn; + + /** + * @var int + */ + protected $endLine; + + /** + * @var ArrayCollection|BlockELement[] + */ + protected $children; + + /** + * @var BlockElement|null + */ + protected $parent = null; + + /** + * This is formed by concatenating strings, in finalize: + * @var string + */ + protected $stringContent = ''; + + /** + * @var string[] + */ + protected $strings; + + /** + * @var ArrayCollection|InlineElementInterface[] + */ + protected $inlineContent; + + /** + * Extra data storage + * @var array + */ + protected $extras = array(); + + /** + * Constrcutor + * + * @param string $type Block type (see TYPE_ constants) + * @param int $startLine Line where the block element starts + * @param int $startColumn Column where the block element starts + */ + public function __construct($type, $startLine, $startColumn) + { + $this->type = $type; + $this->startLine = $startLine; + $this->startColumn = $startColumn; + $this->endLine = $startLine; + + $this->children = new CommonMark_Util_ArrayCollection(); + $this->strings = new CommonMark_Util_ArrayCollection(); + $this->inlineContent = new CommonMark_Util_ArrayCollection(); + } + + /** + * Returns true if parent block can contain child block + * + * @param mixed $childType The type of child block to add (see TYPE_ constants) + * + * @return bool + */ + public function canContain($childType) + { + $parentType = $this->type; + + return ($parentType == self::TYPE_DOCUMENT || + $parentType == self::TYPE_BLOCK_QUOTE || + $parentType == self::TYPE_LIST_ITEM || + ($parentType == self::TYPE_LIST && $childType == self::TYPE_LIST_ITEM)); + } + + /** + * Returns true if block type can accept lines of text + * + * @return bool + */ + public function acceptsLines() + { + return ($this->type == self::TYPE_PARAGRAPH || + $this->type == self::TYPE_INDENTED_CODE || + $this->type == self::TYPE_FENCED_CODE); + } + + /** + * Whether the block ends with a blank line + * + * @return bool + */ + public function endsWithBlankLine() + { + if ($this->lastLineBlank) { + return true; + } + + if (($this->type == self::TYPE_LIST || $this->type == self::TYPE_LIST_ITEM) && $this->hasChildren()) { + return $this->getChildren()->last()->endsWithBlankLine(); + } + + return false; + } + + /** + * @return ArrayCollection|BlockElement[] + */ + public function getChildren() + { + return $this->children; + } + + /** + * @return bool + */ + public function hasChildren() + { + return !$this->children->isEmpty(); + } + + /** + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * @param mixed $type + * + * @return $this + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * @return BlockElement|null + */ + public function getParent() + { + return $this->parent ? $this->parent : null; + } + + /** + * Whether the block is open for modifications + * + * @return bool + */ + public function getIsOpen() + { + return $this->open; + } + + /** + * @return ArrayCollection|string[] + */ + public function getStrings() + { + return $this->strings; + } + + /** + * @param BlockElement $parent + * + * @return $this + */ + public function setParent(CommonMark_Element_BlockElement $parent) + { + $this->parent = $parent; + + return $this; + } + + /** + * @return bool + */ + public function getIsLastLineBlank() + { + return $this->lastLineBlank; + } + + /** + * @param bool $value + * + * @return $this + */ + public function setIsLastLineBlank($value) + { + $this->lastLineBlank = $value; + + return $this; + } + + /** + * @param bool $value + * + * @return $this + */ + public function setIsOpen($value) + { + $this->open = $value; + + return $this; + } + + /** + * @return int + */ + public function getStartLine() + { + return $this->startLine; + } + + /** + * @param int $lineNumber + * + * @return $this + */ + public function setEndLine($lineNumber) + { + $this->endLine = $lineNumber; + + return $this; + } + + /** + * @return ArrayCollection|InlineElementInterface[] + */ + public function getInlineContent() + { + return $this->inlineContent; + } + + /** + * @param string $key + * + * @return mixed|null + */ + public function getExtra($key) + { + return isset($this->extras[$key]) ? $this->extras[$key] : null; + } + + /** + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function setExtra($key, $value) + { + $this->extras[$key] = $value; + + return $this; + } + + /** + * @return string + */ + public function getStringContent() + { + return $this->stringContent; + } + + /** + * Returns true if string contains only space characters + * + * @return bool + */ + private function isStringContentBlank() + { + return preg_match('/^\s*$/', $this->stringContent) == 1; + } + + /** + * Finalize the block; mark it closed for modification + * + * @param int $lineNumber + * @param InlineParser $inlineParser + * @param ReferenceMap $refMap + */ + public function finalize($lineNumber, CommonMark_InlineParser $inlineParser, CommonMark_Reference_ReferenceMap $refMap) + { + if (!$this->open) { + return; + } + + $this->open = false; + if ($lineNumber > $this->startLine) { + $this->endLine = $lineNumber - 1; + } else { + $this->endLine = $lineNumber; + } + + switch ($this->getType()) { + case self::TYPE_PARAGRAPH: + $this->stringContent = preg_replace( + '/^ */m', + '', + implode("\n", $this->strings->toArray()) + ); + + // Try parsing the beginning as link reference definitions: + while ($this->stringContent[0] === '[' && + ($pos = $inlineParser->parseReference($this->stringContent, $refMap)) + ) { + $this->stringContent = substr($this->stringContent, $pos); + if ($this->isStringContentBlank()) { //RegexHelper::getInstance()->isBlank($this->stringContent)) { + $this->type = self::TYPE_REFERENCE_DEF; + break; + } + } + break; + + case self::TYPE_ATX_HEADER: + case self::TYPE_SETEXT_HEADER: + case self::TYPE_HTML_BLOCK: + $this->stringContent = implode("\n", $this->strings->toArray()); + break; + + case self::TYPE_INDENTED_CODE: + $reversed = array_reverse($this->strings->toArray(), true); + foreach ($reversed as $index => $line) { + if ($line == '' || $line === "\n" || preg_match('/^(\n *)$/', $line)) { + unset($reversed[$index]); + } else { + break; + } + } + $fixed = array_reverse($reversed); + $tmp = implode("\n", $fixed); + if (substr($tmp, -1) !== "\n") { + $tmp .= "\n"; + } + + $this->stringContent = $tmp; + break; + + case self::TYPE_FENCED_CODE: + // first line becomes info string + $this->setExtra('info', CommonMark_Util_RegexHelper::unescape(trim($this->strings->first()))); + if ($this->strings->count() == 1) { + $this->stringContent = ''; + } else { + $this->stringContent = implode("\n", $this->strings->slice(1)) . "\n"; + } + break; + + case self::TYPE_LIST: + $this->setExtra('tight', true); // tight by default + + $numItems = $this->children->count(); + $i = 0; + while ($i < $numItems) { + /** @var BlockElement $item */ + $item = $this->children->get($i); + // check for non-final list item ending with blank line: + $lastItem = $i == $numItems - 1; + if ($item->endsWithBlankLine() && !$lastItem) { + $this->setExtra('tight', false); + break; + } + + // Recurse into children of list item, to see if there are + // spaces between any of them: + $numSubItems = $item->getChildren()->count(); + $j = 0; + while ($j < $numSubItems) { + $subItem = $item->getChildren()->get($j); + $lastSubItem = $j == $numSubItems - 1; + if ($subItem->endsWithBlankLine() && !($lastItem && $lastSubItem)) { + $this->setExtra('tight', false); + break; + } + + $j++; + } + + $i++; + } + + break; + + default: + break; + } + } + + /** + * @param InlineParser $inlineParser + * @param ReferenceMap $refMap + */ + public function processInlines(CommonMark_InlineParser $inlineParser, CommonMark_Reference_ReferenceMap $refMap) + { + switch ($this->getType()) { + case self::TYPE_PARAGRAPH: + case self::TYPE_SETEXT_HEADER: + case self::TYPE_ATX_HEADER: + $this->inlineContent = $inlineParser->parse(trim($this->stringContent), $refMap); + $this->stringContent = ''; + break; + default: + break; + } + + if ($this->hasChildren()) { + foreach ($this->getChildren() as $child) { + $child->processInlines($inlineParser, $refMap); + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineCreator.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineCreator.php" new file mode 100644 index 0000000..34361d8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineCreator.php" @@ -0,0 +1,125 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Provides static methods to simplify and standardize the creation of inline elements + */ +class CommonMark_Element_InlineCreator +{ + /** + * @param string $code + * + * @return InlineElement + */ + public static function createCode($code) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_CODE, array('c' => $code)); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createEmph($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_EMPH, array('c' => $contents)); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createEntity($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_ENTITY, array('c' => $contents)); + } + + /** + * @return InlineElement + */ + public static function createHardbreak() + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_HARDBREAK); + } + + /** + * @param string $html + * + * @return InlineElement + */ + public static function createHtml($html) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_HTML, array('c' => $html)); + } + + /** + * @param string $destination + * @param string|ArrayCollection|null $label + * @param string|null $title + * + * @return InlineElement + */ + public static function createLink($destination, $label = null, $title = null) + { + $attr = array('destination' => $destination); + + if (is_string($label)) { + $attr['label'] = array(self::createString($label)); + } elseif (is_object($label) && $label instanceof CommonMark_Util_ArrayCollection) { + $attr['label'] = $label->toArray(); + } elseif (empty($label)) { + $attr['label'] = array(self::createString($destination)); + } else { + $attr['label'] = $label; + } + + if ($title) { + $attr['title'] = $title; + } + + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_LINK, $attr); + } + + /** + * @return InlineElement + */ + public static function createSoftbreak() + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_SOFTBREAK); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createString($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_STRING, array('c' => $contents)); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createStrong($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_STRONG, array('c' => $contents)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElement.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElement.php" new file mode 100644 index 0000000..f6931ba --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElement.php" @@ -0,0 +1,114 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Inline element + */ +class CommonMark_Element_InlineElement implements CommonMark_Element_InlineElementInterface +{ + const TYPE_CODE = 'Code'; + const TYPE_EMPH = 'Emph'; + const TYPE_ENTITY = 'Entity'; + const TYPE_HARDBREAK = 'Hardbreak'; + const TYPE_HTML = 'Html'; + const TYPE_IMAGE = 'Image'; + const TYPE_LINK = 'Link'; + const TYPE_SOFTBREAK = 'Softbreak'; + const TYPE_STRING = 'Str'; + const TYPE_STRONG = 'Strong'; + + /** + * @var mixed + */ + protected $type; + + /** + * @var array + */ + protected $attributes; + + /** + * @param mixed $type + * @param array $attributes + */ + public function __construct($type, array $attributes = array()) + { + $this->type = $type; + $this->attributes = $attributes; + } + + /** + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * @param string $type + * + * @return $this + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * @return mixed|null + */ + public function getContents() + { + return $this->getAttribute('c'); + } + + /** + * @param mixed $contents + * + * @return $this + */ + public function setContents($contents) + { + $this->setAttribute('c', $contents); + + return $this; + } + + /** + * @param string $attrName + * + * @return mixed|null + */ + public function getAttribute($attrName) + { + return isset($this->attributes[$attrName]) ? $this->attributes[$attrName] : null; + } + + /** + * @param string $attrName + * @param mixed $value + * + * @return $this + */ + public function setAttribute($attrName, $value) + { + $this->attributes[$attrName] = $value; + + return $this; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" new file mode 100644 index 0000000..98bed54 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" @@ -0,0 +1,56 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +interface CommonMark_Element_InlineElementInterface +{ + /** + * @return $string + */ + public function getType(); + + /** + * @param string $type + * + * @return $this + */ + public function setType($type); + + /** + * @return mixed + */ + public function getContents(); + + /** + * @param mixed $contents + * + * @return $this + */ + public function setContents($contents); + + /** + * @param string $attrName + * + * @return mixed + */ + public function getAttribute($attrName); + + /** + * @param string $attrName + * @param mixed $value + * + * @return $this + */ + public function setAttribute($attrName, $value); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/HtmlRenderer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/HtmlRenderer.php" new file mode 100644 index 0000000..b3bcbb9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/HtmlRenderer.php" @@ -0,0 +1,261 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Renders a parsed AST to HTML + */ +class CommonMark_HtmlRenderer +{ + protected $blockSeparator = "\n"; + protected $innerSeparator = "\n"; + protected $softBreak = "\n"; + + /** + * @param string $string + * @param bool $preserveEntities + * + * @return string + * + * @todo: Can we use simple find/replace instead? + */ + protected function escape($string, $preserveEntities = false) + { + if ($preserveEntities) { + $string = preg_replace('/[&](?![#](x[a-f0-9]{1,8}|[0-9]{1,8});|[a-z][a-z0-9]{1,31};)/i', '&', $string); + } else { + $string = preg_replace('/[&]/', '&', $string); + } + + $string = preg_replace('/[<]/', '<', $string); + $string = preg_replace('/[>]/', '>', $string); + $string = preg_replace('/["]/', '"', $string); + + return $string; + } + + /** + * Helper function to produce content in a pair of HTML tags. + * + * @param string $tag + * @param array $attribs + * @param string|null $contents + * @param bool $selfClosing + * + * @return string + */ + protected function inTags($tag, $attribs = array(), $contents = null, $selfClosing = false) + { + $result = '<' . $tag; + + foreach ($attribs as $key => $value) { + $result .= ' ' . $key . '="' . $value . '"'; + + } + + if ($contents) { + $result .= '>' . $contents . ''; + } elseif ($selfClosing) { + $result .= ' />'; + } else { + $result .= '>'; + } + + return $result; + } + + /** + * @param InlineElementInterface $inline + * + * @return mixed|string + * + * @throws \InvalidArgumentException + */ + public function renderInline(CommonMark_Element_InlineElementInterface $inline) + { + $attrs = array(); + switch ($inline->getType()) { + case CommonMark_Element_InlineElement::TYPE_STRING: + return $this->escape($inline->getContents()); + case CommonMark_Element_InlineElement::TYPE_SOFTBREAK: + return $this->softBreak; + case CommonMark_Element_InlineElement::TYPE_HARDBREAK: + return $this->inTags('br', array(), '', true) . "\n"; + case CommonMark_Element_InlineElement::TYPE_EMPH: + return $this->inTags('em', array(), $this->renderInlines($inline->getContents())); + case CommonMark_Element_InlineElement::TYPE_STRONG: + return $this->inTags('strong', array(), $this->renderInlines($inline->getContents())); + case CommonMark_Element_InlineElement::TYPE_HTML: + return $inline->getContents(); + case CommonMark_Element_InlineElement::TYPE_ENTITY: + return $inline->getContents(); + case CommonMark_Element_InlineElement::TYPE_LINK: + $attrs['href'] = $this->escape($inline->getAttribute('destination'), true); + if ($title = $inline->getAttribute('title')) { + $attrs['title'] = $this->escape($title, true); + } + + return $this->inTags('a', $attrs, $this->renderInlines($inline->getAttribute('label'))); + case CommonMark_Element_InlineElement::TYPE_IMAGE: + $attrs['src'] = $this->escape($inline->getAttribute('destination'), true); + $attrs['alt'] = $this->escape($this->renderInlines($inline->getAttribute('label'))); + if ($title = $inline->getAttribute('title')) { + $attrs['title'] = $this->escape($title, true); + } + + return $this->inTags('img', $attrs, '', true); + case CommonMark_Element_InlineElement::TYPE_CODE: + return $this->inTags('code', array(), $this->escape($inline->getContents())); + default: + throw new InvalidArgumentException('Unknown inline type: ' . $inline->getType()); + } + } + + /** + * @param InlineElement[] $inlines + * + * @return string + */ + public function renderInlines($inlines) + { + $result = array(); + foreach ($inlines as $inline) { + $result[] = $this->renderInline($inline); + } + + return implode('', $result); + } + + /** + * @param BlockElement $block + * @param bool $inTightList + * + * @return string + * + * @throws \RuntimeException + */ + public function renderBlock(CommonMark_Element_BlockElement $block, $inTightList = false) + { + switch ($block->getType()) { + case CommonMark_Element_BlockElement::TYPE_DOCUMENT: + $wholeDoc = $this->renderBlocks($block->getChildren()); + + return $wholeDoc === '' ? '' : $wholeDoc . "\n"; + case CommonMark_Element_BlockElement::TYPE_PARAGRAPH: + if ($inTightList) { + return $this->renderInlines($block->getInlineContent()); + } else { + return $this->inTags('p', array(), $this->renderInlines($block->getInlineContent())); + } + break; + case CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE: + $filling = $this->renderBlocks($block->getChildren()); + if ($filling === '') { + return $this->inTags('blockquote', array(), $this->innerSeparator); + } else { + return $this->inTags( + 'blockquote', + array(), + $this->innerSeparator . $filling . $this->innerSeparator + ); + } + case CommonMark_Element_BlockElement::TYPE_LIST_ITEM: + return trim($this->inTags('li', array(), $this->renderBlocks($block->getChildren(), $inTightList))); + case CommonMark_Element_BlockElement::TYPE_LIST: + $listData = $block->getExtra('list_data'); + $start = isset($listData['start']) ? $listData['start'] : null; + + $tag = $listData['type'] == CommonMark_Element_BlockElement::LIST_TYPE_UNORDERED ? 'ul' : 'ol'; + $attr = (!$start || $start == 1) ? + array() : array('start' => (string)$start); + + return $this->inTags( + $tag, + $attr, + $this->innerSeparator . $this->renderBlocks( + $block->getChildren(), + $block->getExtra('tight') + ) . $this->innerSeparator + ); + case CommonMark_Element_BlockElement::TYPE_ATX_HEADER: + case CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER: + $tag = 'h' . $block->getExtra('level'); + + return $this->inTags($tag, array(), $this->renderInlines($block->getInlineContent())); + + case CommonMark_Element_BlockElement::TYPE_INDENTED_CODE: + return $this->inTags( + 'pre', + array(), + $this->inTags('code', array(), $this->escape($block->getStringContent())) + ); + + case CommonMark_Element_BlockElement::TYPE_FENCED_CODE: + $infoWords = preg_split('/ +/', $block->getExtra('info')); + $attr = count($infoWords) === 0 || strlen( + $infoWords[0] + ) === 0 ? array() : array('class' => 'language-' . $this->escape($infoWords[0], true)); + return $this->inTags( + 'pre', + array(), + $this->inTags('code', $attr, $this->escape($block->getStringContent())) + ); + + case CommonMark_Element_BlockElement::TYPE_HTML_BLOCK: + return $block->getStringContent(); + + case CommonMark_Element_BlockElement::TYPE_REFERENCE_DEF: + return ''; + + case CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE: + return $this->inTags('hr', array(), '', true); + + default: + throw new RuntimeException('Unknown block type: ' . $block->getType()); + } + } + + /** + * @param BlockElement[] $blocks + * @param bool $inTightList + * + * @return string + */ + public function renderBlocks($blocks, $inTightList = false) + { + $result = array(); + foreach ($blocks as $block) { + if ($block->getType() !== 'ReferenceDef') { + $result[] = $this->renderBlock($block, $inTightList); + } + } + + return implode($this->blockSeparator, $result); + } + + /** + * @param BlockElement $block + * @param bool $inTightList + * + * @return string + * + * @api + */ + public function render(CommonMark_Element_BlockElement $block, $inTightList = false) + { + return $this->renderBlock($block, $inTightList); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/InlineParser.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/InlineParser.php" new file mode 100644 index 0000000..f461ef5 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/InlineParser.php" @@ -0,0 +1,831 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Parses inline elements + */ +class CommonMark_InlineParser +{ + /** + * @var string + */ + protected $subject; + + /** + * @var int + */ + protected $labelNestLevel = 0; // Used by parseLinkLabel method + + /** + * @var int + */ + protected $pos = 0; + + /** + * @var ReferenceMap + */ + protected $refmap; + + /** + * @var RegexHelper + */ + protected $regexHelper; + + /** + * Constrcutor + */ + public function __construct() + { + $this->refmap = new CommonMark_Reference_ReferenceMap(); + } + + /** + * If re matches at current position in the subject, advance + * position in subject and return the match; otherwise return null + * @param string $re + * + * @return string|null The match (if found); null otherwise + */ + protected function match($re) + { + $matches = array(); + $subject = substr($this->subject, $this->pos); + if (!preg_match($re, $subject, $matches, PREG_OFFSET_CAPTURE)) { + return null; + } + + // [0][0] contains the matched text + // [0][1] contains the index of that match + $this->pos += $matches[0][1] + strlen($matches[0][0]); + + return $matches[0][0]; + } + + /** + * Returns the character at the current subject position, or null if + * there are no more characters + * + * @return string|null + */ + protected function peek() + { + $ch = substr($this->subject, $this->pos, 1); + return false !== $ch && strlen($ch) > 0 ? $ch : null; + } + + /** + * Parse zero or more space characters, including at most one newline + * + * @return int + */ + protected function spnl() + { + $this->match('/^ *(?:\n *)?/'); + + return 1; + } + + // All of the parsers below try to match something at the current position + // in the subject. If they succeed in matching anything, they + // push an inline element onto the 'inlines' list. They return the + // number of characters parsed (possibly 0). + + /** + * Attempt to parse backticks, adding either a backtick code span or a + * literal sequence of backticks to the 'inlines' list. + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int Number of characters parsed + */ + protected function parseBackticks(CommonMark_Util_ArrayCollection $inlines) + { + $startpos = $this->pos; + $ticks = $this->match('/^`+/'); + if (!$ticks) { + return 0; + } + + $afterOpenTicks = $this->pos; + $foundCode = false; + $match = null; + while (!$foundCode && ($match = $this->match('/`+/m'))) { + if ($match == $ticks) { + $c = substr($this->subject, $afterOpenTicks, $this->pos - $afterOpenTicks - strlen($ticks)); + $c = preg_replace('/[ \n]+/', ' ', $c); + $inlines->add(CommonMark_Element_InlineCreator::createCode(trim($c))); + + return ($this->pos - $startpos); + } + } + + // If we go here, we didn't match a closing backtick sequence + $inlines->add(CommonMark_Element_InlineCreator::createString($ticks)); + $this->pos = $afterOpenTicks; + + return ($this->pos - $startpos); + } + + /** + * Parse a backslash-escaped special character, adding either the escaped + * character, a hard line break (if the backslash is followed by a newline), + * or a literal backslash to the 'inlines' list. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseEscaped(CommonMark_Util_ArrayCollection $inlines) + { + $subject = $this->subject; + $pos = $this->pos; + if ($subject[$pos] === '\\') { + if (isset($subject[$pos + 1]) && $subject[$pos + 1] === "\n") { + $inlines->add(CommonMark_Element_InlineCreator::createHardbreak()); + $this->pos = $this->pos + 2; + + return 2; + } elseif (isset($subject[$pos + 1]) && preg_match( + '/' . CommonMark_Util_RegexHelper::REGEX_ESCAPABLE . '/', + $subject[$pos + 1] + ) + ) { + $inlines->add(CommonMark_Element_InlineCreator::createString($subject[$pos + 1])); + $this->pos = $this->pos + 2; + + return 2; + } else { + $this->pos++; + $inlines->add(CommonMark_Element_InlineCreator::createString('\\')); + + return 1; + } + } else { + return 0; + } + } + + /** + * Attempt to parse an autolink (URL or email in pointy brackets) + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseAutolink(CommonMark_Util_ArrayCollection $inlines) + { + $emailRegex = '/^<([a-zA-Z0-9.!#$%&\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/'; + $otherLinkRegex = '/^<(?:coap|doi|javascript|aaa|aaas|about|acap|cap|cid|crid|data|dav|dict|dns|file|ftp|geo|go|gopher|h323|http|https|iax|icap|im|imap|info|ipp|iris|iris.beep|iris.xpc|iris.xpcs|iris.lwz|ldap|mailto|mid|msrp|msrps|mtqp|mupdate|news|nfs|ni|nih|nntp|opaquelocktoken|pop|pres|rtsp|service|session|shttp|sieve|sip|sips|sms|snmp|soap.beep|soap.beeps|tag|tel|telnet|tftp|thismessage|tn3270|tip|tv|urn|vemmi|ws|wss|xcon|xcon-userid|xmlrpc.beep|xmlrpc.beeps|xmpp|z39.50r|z39.50s|adiumxtra|afp|afs|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|chrome|chrome-extension|com-eventbrite-attendee|content|cvs|dlna-playsingle|dlna-playcontainer|dtn|dvb|ed2k|facetime|feed|finger|fish|gg|git|gizmoproject|gtalk|hcp|icon|ipn|irc|irc6|ircs|itms|jar|jms|keyparc|lastfm|ldaps|magnet|maps|market|message|mms|ms-help|msnim|mumble|mvn|notes|oid|palm|paparazzi|platform|proxy|psyc|query|res|resource|rmi|rsync|rtmp|secondlife|sftp|sgn|skype|smb|soldat|spotify|ssh|steam|svn|teamspeak|things|udp|unreal|ut2004|ventrilo|view-source|webcal|wtai|wyciwyg|xfire|xri|ymsgr):[^<>\x00-\x20]*>/i'; + + if ($m = $this->match($emailRegex)) { + $email = substr($m, 1, -1); + $inlines->add(CommonMark_Element_InlineCreator::createLink('mailto:' . $email, $email)); + + return strlen($m); + } elseif ($m = $this->match($otherLinkRegex)) { + $dest = substr($m, 1, -1); + $inlines->add(CommonMark_Element_InlineCreator::createLink($dest, $dest)); + + return strlen($m); + } else { + return 0; + } + } + + /** + * Attempt to parse a raw HTML tag + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseHtmlTag(CommonMark_Util_ArrayCollection $inlines) + { + if ($m = $this->match(CommonMark_Util_RegexHelper::getInstance()->getHtmlTagRegex())) { + $inlines->add(CommonMark_Element_InlineCreator::createHtml($m)); + + return strlen($m); + } else { + return 0; + } + } + + /** + * Scan a sequence of characters == c, and return information about + * the number of delimiters and whether they are positioned such that + * they can open and/or close emphasis or strong emphasis. A utility + * function for strong/emph parsing. + * + * @param string $char + * + * @return array + */ + protected function scanDelims($char) + { + $numDelims = 0; + $startPos = $this->pos; + + $charBefore = $this->pos === 0 ? "\n" : $this->subject[$this->pos - 1]; + + while ($this->peek() === $char) { + $numDelims++; + $this->pos++; + } + + $peek = $this->peek(); + $charAfter = $peek ? $peek : "\n"; + + $canOpen = $numDelims > 0 && $numDelims <= 3 && !preg_match('/\s/', $charAfter); + $canClose = $numDelims > 0 && $numDelims <= 3 && !preg_match('/\s/', $charBefore); + if ($char === '_') { + $canOpen = $canOpen && !preg_match('/[a-z0-9]/i', $charBefore); + $canClose = $canClose && !preg_match('/[a-z0-9]/i', $charAfter); + } + + $this->pos = $startPos; + + return compact('numDelims', 'canOpen', 'canClose'); + } + + /** + * @param ArrayCollection $inlines + * + * @return int + */ + protected function parseEmphasis(CommonMark_Util_ArrayCollection $inlines) + { + $startPos = $this->pos; + $firstClose = 0; + $nxt = $this->peek(); + if ($nxt == '*' || $nxt == '_') { + $c = $nxt; + } else { + return 0; + } + + // Get opening delimiters + $res = $this->scanDelims($c); + $numDelims = $res['numDelims']; + $this->pos += $numDelims; + + // We provisionally add a literal string. If we match appropriate + // closing delimiters, we'll change this to Strong or Emph. + $inlines->add(CommonMark_Element_InlineCreator::createString(substr($this->subject, $this->pos - $numDelims, $numDelims))); + // Record the position of this opening delimiter: + $delimPos = $inlines->count() - 1; + + if (!$res['canOpen'] || $numDelims === 0) { + return 0; + } + + $firstCloseDelims = 0; + switch ($numDelims) { + case 1: // we started with * or _ + while (true) { + $res = $this->scanDelims($c); + if ($res['numDelims'] >= 1 && $res['canClose']) { + $this->pos += 1; + // Convert the inline at delimpos, currently a string with the delim, + // into an Emph whose contents are the succeeding inlines + $inlines->get($delimPos)->setType(CommonMark_Element_InlineElement::TYPE_EMPH); + $inlines->get($delimPos)->setContents($inlines->slice($delimPos + 1)); + $inlines->splice($delimPos + 1); + break; + } else { + if ($this->parseInline($inlines) === 0) { + break; + } + } + } + + return ($this->pos - $startPos); + + case 2: // We started with ** or __ + while (true) { + $res = $this->scanDelims($c); + if ($res['numDelims'] >= 2 && $res['canClose']) { + $this->pos += 2; + $inlines->get($delimPos)->setType(CommonMark_Element_InlineElement::TYPE_STRONG); + $inlines->get($delimPos)->setContents($inlines->slice($delimPos + 1)); + $inlines->splice($delimPos + 1); + break; + } else { + if ($this->parseInline($inlines) === 0) { + break; + } + } + } + + return ($this->pos - $startPos); + + case 3: // We started with *** or ___ + while (true) { + $res = $this->scanDelims($c); + if ($res['numDelims'] >= 1 && $res['numDelims'] <= 3 && $res['canClose'] && $res['numDelims'] != $firstCloseDelims) { + if ($firstCloseDelims === 1 && $numDelims > 2) { + $res['numDelims'] = 2; + } elseif ($firstCloseDelims === 2) { + $res['numDelims'] = 1; + } elseif ($res['numDelims'] === 3) { + // If we opened with ***, then we interpret *** as ** followed by * + // giving us + $res['numDelims'] = 1; + } + + $this->pos += $res['numDelims']; + + if ($firstClose > 0) { // if we've already passed the first closer: + $targetInline = $inlines->get($delimPos); + if ($firstCloseDelims === 1) { + $targetInline->setType(CommonMark_Element_InlineElement::TYPE_STRONG); + $targetInline->setContents( + array( + CommonMark_Element_InlineCreator::createEmph( + $inlines->slice($delimPos + 1, $firstClose - $delimPos - 1) + ) + ) + ); + } else { + $targetInline->setType(CommonMark_Element_InlineElement::TYPE_EMPH); + $targetInline->setContents( + array( + CommonMark_Element_InlineCreator::createStrong( + $inlines->slice($delimPos + 1, $firstClose - $delimPos - 1) + ) + ) + ); + } + + $targetInline->setContents($targetInline->getContents() + $inlines->slice($firstClose + 1)); + $inlines->splice($delimPos + 1); + break; + } else { + // this is the first closer; for now, add literal string; + // we'll change this when he hit the second closer + $str = substr($this->subject, $this->pos - $res['numDelims'], $this->pos); + $inlines->add(CommonMark_Element_InlineCreator::createString($str)); + $firstClose = $inlines->count() - 1; + $firstCloseDelims = $res['numDelims']; + } + } else { + // Parse another inline element, til we hit the end + if ($this->parseInline($inlines) === 0) { + break; + } + } + } + + return ($this->pos - $startPos); + } + + return 0; + } + + /** + * Attempt to parse link title (sans quotes) + * + * @return null|string The string, or null if no match + */ + protected function parseLinkTitle() + { + if ($title = $this->match(CommonMark_Util_RegexHelper::getInstance()->getLinkTitleRegex())) { + // Chop off quotes from title and unescape + return CommonMark_Util_RegexHelper::unescape(substr($title, 1, strlen($title) - 2)); + } else { + return null; + } + } + + /** + * Attempt to parse link destination + * + * @return null|string The string, or null if no match + */ + protected function parseLinkDestination() + { + if ($res = $this->match(CommonMark_Util_RegexHelper::getInstance()->getLinkDestinationBracesRegex())) { + // Chop off surrounding <..>: + return CommonMark_Util_RegexHelper::unescape(substr($res, 1, strlen($res) - 2)); + } else { + $res = $this->match(CommonMark_Util_RegexHelper::getInstance()->getLinkDestinationRegex()); + if ($res !== null) { + return CommonMark_Util_RegexHelper::unescape($res); + } else { + return null; + } + } + } + + /** + * @return int + */ + protected function parseLinkLabel() + { + if ($this->peek() != '[') { + return 0; + } + + $startPos = $this->pos; + $nestLevel = 0; + if ($this->labelNestLevel > 0) { + // If we've already checked to the end of this subject + // for a label, even with a different starting [, we + // know we won't find one here and we can just return. + // This avoids lots of backtracking. + // Note: nest level 1 would be: [foo [bar] + // nest level 2 would be: [foo [bar [baz] + $this->labelNestLevel--; + + return 0; + } + + $this->pos++; // Advance past [ + while (($c = $this->peek()) !== null && ($c != ']' || $nestLevel > 0)) { + switch ($c) { + case '`': + $this->parseBackticks(new CommonMark_Util_ArrayCollection()); + break; + case '<': + $this->parseAutolink(new CommonMark_Util_ArrayCollection()) || $this->parseHtmlTag( + new CommonMark_Util_ArrayCollection() + ) || $this->parseString(new CommonMark_Util_ArrayCollection()); // TODO: Does PHP support this use of "||"? + break; + case '[': // nested [] + $nestLevel++; + $this->pos++; + break; + case ']': //nested [] + $nestLevel--; + $this->pos++; + break; + case '\\': + $this->parseEscaped(new CommonMark_Util_ArrayCollection()); + break; + default: + $this->parseString(new CommonMark_Util_ArrayCollection()); + } + } + + if ($c === ']') { + $this->labelNestLevel = 0; + $this->pos++; // advance past ] + + return $this->pos - $startPos; + } else { + if ($c === null) { + $this->labelNestLevel = $nestLevel; + } + + $this->pos = $startPos; + + return 0; + } + } + + /** + * Parse raw link label, including surrounding [], and return + * inline contents. + * + * @param string $s + * + * @return ArrayCollection|InlineElementInterface[] Inline contents + */ + private function parseRawLabel($s) + { + // note: parse without a refmap; we don't want links to resolve + // in nested brackets! + $parser = new self(); + $substring = substr($s, 1, strlen($s) - 2); + + return $parser->parse($substring, new CommonMark_Reference_ReferenceMap()); + } + + /** + * Attempt to parse a link. If successful, add the link to inlines. + * @param ArrayCollection $inlines + * + * @return int + */ + protected function parseLink(CommonMark_Util_ArrayCollection $inlines) + { + $startPos = $this->pos; + $n = $this->parseLinkLabel(); + if ($n === 0) { + return 0; + } + + $rawLabel = substr($this->subject, $startPos, $n); + + // if we got this far, we've parsed a label. + // Try to parse an explicit link: [label](url "title") + if ($this->peek() == '(') { + $this->pos++; + if ($this->spnl() && + (($dest = $this->parseLinkDestination()) !== null) && + $this->spnl() + ) { + // make sure there's a space before the title: + if (preg_match('/^\\s/', $this->subject[$this->pos - 1])) { + $title = $this->parseLinkTitle(); + $title = $title ? $title : ''; + } else { + $title = null; + } + + if ($this->spnl() && $this->match('/^\\)/')) { + $inlines->add(CommonMark_Element_InlineCreator::createLink($dest, $this->parseRawLabel($rawLabel), $title)); + + return $this->pos - $startPos; + } + } + + $this->pos = $startPos; + + return 0; + } + + // If we're here, it wasn't an explicit link. Try to parse a reference link. + // first, see if there's another label + $savePos = $this->pos; + $this->spnl(); + $beforeLabel = $this->pos; + $n = $this->parseLinkLabel(); + if ($n == 2) { + // empty second label + $refLabel = $rawLabel; + } elseif ($n > 0) { + $refLabel = substr($this->subject, $beforeLabel, $n); + } else { + $this->pos = $savePos; + $refLabel = $rawLabel; + } + + // Lookup rawLabel in refmap + if ($link = $this->refmap->getReference($refLabel)) { + $inlines->add( + CommonMark_Element_InlineCreator::createLink($link->getDestination(), $this->parseRawLabel($rawLabel), $link->getTitle()) + ); + + return $this->pos - $startPos; + } + + // Nothing worked, rewind: + $this->pos = $startPos; + + return 0; + } + + /** + * Attempt to parse an entity, adding to inlines if successful + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseEntity(CommonMark_Util_ArrayCollection $inlines) + { + if ($m = $this->match('/^&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});/i')) { + $inlines->add(CommonMark_Element_InlineCreator::createEntity($m)); + + return strlen($m); + } + + return 0; + } + + /** + * Parse a run of ordinary characters, or a single character with + * a special meaning in markdown, as a plain string, adding to inlines. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseString(CommonMark_Util_ArrayCollection $inlines) + { + if ($m = $this->match(CommonMark_Util_RegexHelper::getInstance()->getMainRegex())) { + $inlines->add(CommonMark_Element_InlineCreator::createString($m)); + + return strlen($m); + } + + return 0; + } + + /** + * Parse a newline. If it was preceded by two spaces, return a hard + * line break; otherwise a soft line break. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseNewline(CommonMark_Util_ArrayCollection $inlines) + { + if ($this->peek() == "\n") { + $this->pos++; + $last = $inlines->last(); + if ($last && $last->getType() == CommonMark_Element_InlineElement::TYPE_STRING && substr($last->getContents(), -2) == ' ') { + $last->setContents(rtrim($last->getContents(), ' ')); + $inlines->add(CommonMark_Element_InlineCreator::createHardbreak()); + } else { + if ($last && $last->getType() == CommonMark_Element_InlineElement::TYPE_STRING && substr( + $last->getContents(), + -1 + ) == ' ' + ) { + $last->setContents(substr($last->getContents(), 0, -1)); + } + $inlines->add(CommonMark_Element_InlineCreator::createSoftbreak()); + } + + return 1; + } + + return 0; + } + + /** + * @param ArrayCollection $inlines + * + * @return int + * + * @throws \RuntimeException + */ + protected function parseImage(CommonMark_Util_ArrayCollection $inlines) + { + if ($this->match('/^!/')) { + $n = $this->parseLink($inlines); + if ($n === 0) { + $inlines->add(CommonMark_Element_InlineCreator::createString('!')); + + return 1; + } + + /** @var InlineElementInterface $last */ + $last = $inlines->last(); + + if ($last && $last->getType() == CommonMark_Element_InlineElement::TYPE_LINK) { + $last->setType(CommonMark_Element_InlineElement::TYPE_IMAGE); + + return $n + 1; + } else { + // This shouldn't happen + throw new RuntimeException('Unknown error occurred while attempting to parse an image'); + } + } else { + return 0; + } + } + + /** + * Parse the next inline element in subject, advancing subject position + * and adding the result to 'inlines'. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseInline(CommonMark_Util_ArrayCollection $inlines) + { + $c = $this->peek(); + $res = null; + + switch ($c) { + case "\n": + $res = $this->parseNewline($inlines); + break; + case '\\': + $res = $this->parseEscaped($inlines); + break; + case '`': + $res = $this->parseBackticks($inlines); + break; + case '*': + case '_': + $res = $this->parseEmphasis($inlines); + break; + case '[': + $res = $this->parseLink($inlines); + break; + case '!': + $res = $this->parseImage($inlines); + break; + case '<': + $res = $this->parseAutolink($inlines); + $res = $res ? $res : $this->parseHtmlTag($inlines); + break; + case '&': + $res = $this->parseEntity($inlines); + break; + default: + // Nothing + } + + return $res ? $res : $this->parseString($inlines); + } + + /** + * Parse s as a list of inlines, using refmap to resolve references. + * + * @param string $s + * @param ReferenceMap $refMap + * + * @return ArrayCollection|InlineElementInterface[] + */ + protected function parseInlines($s, CommonMark_Reference_ReferenceMap $refMap) + { + $this->subject = $s; + $this->pos = 0; + $this->refmap = $refMap; + $inlines = new CommonMark_Util_ArrayCollection(); + while ($this->parseInline($inlines)) { + ; + } + + return $inlines; + } + + /** + * @param string $s + * @param ReferenceMap $refMap + * + * @return ArrayCollection|Element\InlineElementInterface[] + */ + public function parse($s, CommonMark_Reference_ReferenceMap $refMap) + { + return $this->parseInlines($s, $refMap); + } + + /** + * Attempt to parse a link reference, modifying refmap. + * @param string $s + * @param ReferenceMap $refMap + * + * @return int + */ + public function parseReference($s, CommonMark_Reference_ReferenceMap $refMap) + { + $this->subject = $s; + $this->pos = 0; + $startPos = $this->pos; + + // label: + $matchChars = $this->parseLinkLabel(); + if ($matchChars === 0) { + return 0; + } else { + $label = substr($this->subject, 0, $matchChars); + } + + // colon: + if ($this->peek() === ':') { + $this->pos++; + } else { + $this->pos = $startPos; + + return 0; + } + + // link url + $this->spnl(); + + $destination = $this->parseLinkDestination(); + if ($destination === null || strlen($destination) === 0) { + $this->pos = $startPos; + + return 0; + } + + $beforeTitle = $this->pos; + $this->spnl(); + $title = $this->parseLinkTitle(); + if ($title === null) { + $title = ''; + // rewind before spaces + $this->pos = $beforeTitle; + } + + // make sure we're at line end: + if ($this->match('/^ *(?:\n|$)/') === null) { + $this->pos = $startPos; + + return 0; + } + + if (!$refMap->contains($label)) { + $refMap->addReference(new CommonMark_Reference_Reference($label, $destination, $title)); + } + + return $this->pos - $startPos; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/Reference.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/Reference.php" new file mode 100644 index 0000000..40ab748 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/Reference.php" @@ -0,0 +1,92 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Link reference + */ +class CommonMark_Reference_Reference +{ + /** + * @var string + */ + protected $label; + + /** + * @var string + */ + protected $destination; + + /** + * @var string + */ + protected $title; + + /** + * Constructor + * + * @param string $label + * @param string $destination + * @param string $title + */ + public function __construct($label, $destination, $title) + { + $this->label = self::normalizeReference($label); + $this->destination = $destination; + $this->title = $title; + } + + /** + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->destination; + } + + /** + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Normalize reference label + * + * This enables case-insensitive label matching + * + * @param string $string + * + * @return string + */ + public static function normalizeReference($string) + { + // Collapse internal whitespace to single space and remove + // leading/trailing whitespace + $string = preg_replace('/\s+/', '', trim($string)); + + return Typecho_Common::strToUpper($string, 'UTF-8'); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" new file mode 100644 index 0000000..c6b23c5 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" @@ -0,0 +1,66 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * A collection of references, indexed by label + */ +class CommonMark_Reference_ReferenceMap +{ + /** + * @var Reference[] + */ + protected $references = array(); + + /** + * @param Reference $reference + * + * @return $this + */ + public function addReference(CommonMark_Reference_Reference $reference) + { + $key = CommonMark_Reference_Reference::normalizeReference($reference->getLabel()); + $this->references[$key] = $reference; + + return $this; + } + + /** + * @param string $label + * + * @return bool + */ + public function contains($label) + { + $label = CommonMark_Reference_Reference::normalizeReference($label); + + return isset($this->references[$label]); + } + + /** + * @param string $label + * + * @return Reference|null + */ + public function getReference($label) + { + $label = CommonMark_Reference_Reference::normalizeReference($label); + + if (isset($this->references[$label])) { + return $this->references[$label]; + } else { + return null; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/ArrayCollection.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/ArrayCollection.php" new file mode 100644 index 0000000..68dbc73 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/ArrayCollection.php" @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Array collection + * + * Provides a wrapper around a standard PHP array. + */ +class CommonMark_Util_ArrayCollection implements IteratorAggregate, Countable, ArrayAccess +{ + /** + * @var array + */ + private $elements; + + /** + * Constructor + * @param array $elements + */ + public function __construct(array $elements = array()) + { + $this->elements = $elements; + } + + /** + * @return mixed + */ + public function first() + { + return reset($this->elements); + } + + /** + * @return mixed + */ + public function last() + { + return end($this->elements); + } + + /** + * Retrieve an external iterator + * + * @return \Traversable + */ + public function getIterator() + { + return new ArrayIterator($this->elements); + } + + /** + * @param mixed $element + * + * @return bool + */ + public function add($element) + { + $this->elements[] = $element; + + return true; + } + + /** + * @param mixed $key + * @param mixed $value + */ + public function set($key, $value) + { + $this->elements[$key] = $value; + } + + /** + * @param mixed $key + * + * @return mixed|null + */ + public function get($key) + { + return isset($this->elements[$key]) ? $this->elements[$key] : null; + } + + /** + * @param mixed $key + * + * @return mixed|null + */ + public function remove($key) + { + if (!isset($this->elements[$key]) && !array_key_exists($key, $this->elements)) { + return null; + } + + $removed = $this->elements[$key]; + unset($this->elements[$key]); + + return $removed; + } + + /** + * @return bool + */ + public function isEmpty() + { + return empty($this->elements); + } + + /** + * @param mixed $key + * + * @return bool + */ + public function containsKey($key) + { + return isset($this->elements[$key]) || array_key_exists($key, $this->elements); + } + + /** + * Count elements of an object + * + * @return int The count as an integer. + */ + public function count() + { + return count($this->elements); + } + + /** + * Whether an offset exists + * + * @param mixed $offset An offset to check for. + * + * @return boolean true on success or false on failure. + */ + public function offsetExists($offset) + { + return $this->containsKey($offset); + } + + /** + * Offset to retrieve + * @param mixed $offset The offset to retrieve. + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * Offset to set + * @param mixed $offset The offset to assign the value to. + * @param mixed $value The value to set. + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (!isset($offset)) { + $this->add($value); + } else { + $this->set($offset, $value); + } + } + + /** + * Offset to unset + * @param mixed $offset The offset to unset. + * + * @return void + */ + public function offsetUnset($offset) + { + $this->remove($offset); + } + + /** + * Returns a subset of the array + * @param int $offset + * @param int|null $length + * + * @return array + */ + public function slice($offset, $length = null) + { + return array_slice($this->elements, $offset, $length, true); + } + + /** + * Remove a subset of the array + * + * The removed part will be returned + * + * @param int $offset + * @param int|null $length + * @param array $replacement + * + * @return array The removed subset + */ + public function splice($offset, $length = null, $replacement = array()) + { + if ($length === null) { + $length = count($this->elements); + } + + return array_splice($this->elements, $offset, $length, $replacement); + } + + /** + * @return array + */ + public function toArray() + { + return $this->elements; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/RegexHelper.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/RegexHelper.php" new file mode 100644 index 0000000..6621eca --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/CommonMark/Util/RegexHelper.php" @@ -0,0 +1,252 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Provides regular expressions and utilties for parsing Markdown + * + * Singletons are generally bad, but it allows us to build the regexes once (and only once). + */ +class CommonMark_Util_RegexHelper +{ + const ESCAPABLE = 0; + const ESCAPED_CHAR = 1; + const IN_DOUBLE_QUOTES = 2; + const IN_SINGLE_QUOTES = 3; + const IN_PARENS = 4; + const REG_CHAR = 5; + const IN_PARENS_NOSP = 6; + const TAGNAME = 7; + const BLOCKTAGNAME = 8; + const ATTRIBUTENAME = 9; + const UNQUOTEDVALUE = 10; + const SINGLEQUOTEDVALUE = 11; + const DOUBLEQUOTEDVALUE = 12; + const ATTRIBUTEVALUE = 13; + const ATTRIBUTEVALUESPEC = 14; + const ATTRIBUTE = 15; + const OPENTAG = 16; + const CLOSETAG = 17; + const OPENBLOCKTAG = 18; + const CLOSEBLOCKTAG = 19; + const HTMLCOMMENT = 20; + const PROCESSINGINSTRUCTION = 21; + const DECLARATION = 22; + const CDATA = 23; + const HTMLTAG = 24; + const HTMLBLOCKOPEN = 25; + const LINK_TITLE = 26; + + const REGEX_ESCAPABLE = '[!"#$%&\'()*+,.\/:;<=>?@[\\\\\]^_`{|}~-]'; + + protected $regex = array(); + + static protected $instance; + + /** + * Constructor + */ + protected function __construct() + { + $this->buildRegexPatterns(); + } + + /** + * @return RegexHelper + */ + public static function getInstance() + { + if (self::$instance === null) { + self::$instance = new CommonMark_Util_RegexHelper(); + } + + return self::$instance; + } + + /** + * Builds the regular expressions required to parse Markdown + * + * We could hard-code them all as pre-built constants, but that would be more difficult to manage. + */ + protected function buildRegexPatterns() + { + $regex = array(); + $regex[self::ESCAPABLE] = self::REGEX_ESCAPABLE; + $regex[self::ESCAPED_CHAR] = '\\\\' . $regex[self::ESCAPABLE]; + $regex[self::IN_DOUBLE_QUOTES] = '"(' . $regex[self::ESCAPED_CHAR] . '|[^"\x00])*"'; + $regex[self::IN_SINGLE_QUOTES] = '\'(' . $regex[self::ESCAPED_CHAR] . '|[^\'\x00])*\''; + $regex[self::IN_PARENS] = '\\((' . $regex[self::ESCAPED_CHAR] . '|[^)\x00])*\\)'; + $regex[self::REG_CHAR] = '[^\\\\()\x00-\x20]'; + $regex[self::IN_PARENS_NOSP] = '\((' . $regex[self::REG_CHAR] . '|' . $regex[self::ESCAPED_CHAR] . ')*\)'; + $regex[self::TAGNAME] = '[A-Za-z][A-Za-z0-9]*'; + $regex[self::BLOCKTAGNAME] = '(?:article|header|aside|hgroup|iframe|blockquote|hr|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)'; + $regex[self::ATTRIBUTENAME] = '[a-zA-Z_:][a-zA-Z0-9:._-]*'; + $regex[self::UNQUOTEDVALUE] = '[^"\'=<>`\x00-\x20]+'; + $regex[self::SINGLEQUOTEDVALUE] = '\'[^\']*\''; + $regex[self::DOUBLEQUOTEDVALUE] = '"[^"]*"'; + $regex[self::ATTRIBUTEVALUE] = '(?:' . $regex[self::UNQUOTEDVALUE] . '|' . $regex[self::SINGLEQUOTEDVALUE] . '|' . $regex[self::DOUBLEQUOTEDVALUE] . ')'; + $regex[self::ATTRIBUTEVALUESPEC] = '(?:' . '\s*=' . '\s*' . $regex[self::ATTRIBUTEVALUE] . ')'; + $regex[self::ATTRIBUTE] = '(?:' . '\s+' . $regex[self::ATTRIBUTENAME] . $regex[self::ATTRIBUTEVALUESPEC] . '?)'; + $regex[self::OPENTAG] = '<' . $regex[self::TAGNAME] . $regex[self::ATTRIBUTE] . '*' . '\s*\/?>'; + $regex[self::CLOSETAG] = '<\/' . $regex[self::TAGNAME] . '\s*[>]'; + $regex[self::OPENBLOCKTAG] = '<' . $regex[self::BLOCKTAGNAME] . $regex[self::ATTRIBUTE] . '*' . '\s*\/?>'; + $regex[self::CLOSEBLOCKTAG] = '<\/' . $regex[self::BLOCKTAGNAME] . '\s*[>]'; + $regex[self::HTMLCOMMENT] = ''; + $regex[self::PROCESSINGINSTRUCTION] = '[<][?].*?[?][>]'; + $regex[self::DECLARATION] = ']*>'; + $regex[self::CDATA] = '])*\]\]>'; + $regex[self::HTMLTAG] = '(?:' . $regex[self::OPENTAG] . '|' . $regex[self::CLOSETAG] . '|' . $regex[self::HTMLCOMMENT] . '|' . + $regex[self::PROCESSINGINSTRUCTION] . '|' . $regex[self::DECLARATION] . '|' . $regex[self::CDATA] . ')'; + $regex[self::HTMLBLOCKOPEN] = '<(?:' . $regex[self::BLOCKTAGNAME] . '[\s\/>]' . '|' . + '\/' . $regex[self::BLOCKTAGNAME] . '[\s>]' . '|' . '[?!])'; + $regex[self::LINK_TITLE] = '^(?:"(' . $regex[self::ESCAPED_CHAR] . '|[^"\x00])*"' . + '|' . '\'(' . $regex[self::ESCAPED_CHAR] . '|[^\'\x00])*\'' . + '|' . '\((' . $regex[self::ESCAPED_CHAR] . '|[^)\x00])*\))'; + + $this->regex = $regex; + } + + /** + * Returns a partial regex + * + * It'll need to be wrapped with /.../ before use + * @param int $const + * + * @return string + */ + public function getPartialRegex($const) + { + return $this->regex[$const]; + } + + /** + * @return string + */ + public function getHtmlTagRegex() + { + return '/^' . $this->regex[self::HTMLTAG] . '/i'; + } + + /** + * @return string + */ + public function getHtmlBlockOpenRegex() + { + return '/^' . $this->regex[self::HTMLBLOCKOPEN] . '/i'; + } + + /** + * @return string + */ + public function getLinkTitleRegex() + { + return '/' . $this->regex[self::LINK_TITLE] . '/'; + } + + /** + * @return string + */ + public function getLinkDestinationRegex() + { + return '/^' . '(?:' . $this->regex[self::REG_CHAR] . '+|' . $this->regex[self::ESCAPED_CHAR] . '|' . $this->regex[self::IN_PARENS_NOSP] . ')*' . '/'; + } + + /** + * @return string + */ + public function getLinkDestinationBracesRegex() + { + return '/^(?:' . '[<](?:[^<>\\n\\\\\\x00]' . '|' . $this->regex[self::ESCAPED_CHAR] . '|' . '\\\\)*[>]' . ')/'; + } + + /** + * @return string + */ + public function getHRuleRegex() + { + return '/^(?:(?:\* *){3,}|(?:_ *){3,}|(?:- *){3,}) *$/'; + } + + /** + * Matches a character with a special meaning in markdown, + * or a string of non-special characters. + * + * @return string + */ + public function getMainRegex() + { + return '/^(?:[\n`\[\]\\\\!<&*_]|[^\n`\[\]\\\\!<&*_]+)/m'; + } + + /** + * Attempt to match a regex in string s at offset offset + * @param string $regex + * @param string $string + * @param int $offset + * + * @return int|null Index of match, or null + */ + public static function matchAt($regex, $string, $offset) + { + $matches = array(); + $string = substr($string, $offset); + if (!preg_match($regex, $string, $matches, PREG_OFFSET_CAPTURE)) { + return null; + } + + return $offset + $matches[0][1]; + } + + /** + * Functional wrapper around preg_match_all + * + * @param string $pattern + * @param string $subject + * @param int $offset + * + * @return array|null + */ + public static function matchAll($pattern, $subject, $offset = 0) + { + $matches = array(); + $subject = substr($subject, $offset); + preg_match_all($pattern, $subject, $matches, PREG_PATTERN_ORDER); + + $fullMatches = reset($matches); + if (empty($fullMatches)) { + return null; + } + + if (count($fullMatches) == 1) { + foreach ($matches as &$match) { + $match = reset($match); + } + } + + return !empty($matches) ? $matches : null; + } + + /** + * Replace backslash escapes with literal characters + * @param string $string + * + * @return string + */ + public static function unescape($string) + { + $allEscapedChar = '/\\\\(' . self::REGEX_ESCAPABLE . ')/'; + + return preg_replace($allEscapedChar, '$1', $string); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Helper.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Helper.php" new file mode 100644 index 0000000..d1079bc --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Helper.php" @@ -0,0 +1,442 @@ +query($db->update('table.options') + ->rows(array('value' => serialize(Typecho_Plugin::export()))) + ->where('name = ?', 'plugins')); + } catch (Typecho_Plugin_Exception $e) { + //nothing to do + } + + $db->query($db->delete('table.options')->where('name = ?', 'plugin:' . $pluginName)); + } + + /** + * 瀵煎叆璇█椤 + * + * @access public + * @param string $domain + * @return void + */ + public static function lang($domain) + { + $currentLang = Typecho_I18n::getLang(); + if ($currentLang) { + $currentLang = basename($currentLang); + $fileName = dirname(__FILE__) . '/' . $domain . '/lang/' . $currentLang; + if (file_exists($fileName)) { + Typecho_I18n::addLang($fileName); + } + } + } + + /** + * 澧炲姞璺敱 + * + * @access public + * @param string $name 璺敱鍚嶇О + * @param string $url 璺敱璺緞 + * @param string $widget 缁勪欢鍚嶇О + * @param string $action 缁勪欢鍔ㄤ綔 + * @param string $after 鍦ㄦ煇涓矾鐢卞悗闈 + * @return integer + */ + public static function addRoute($name, $url, $widget, $action = NULL, $after = NULL) + { + $routingTable = self::options()->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pos = 0; + foreach ($routingTable as $key => $val) { + $pos ++; + + if ($key == $after) { + break; + } + } + + $pre = array_slice($routingTable, 0, $pos); + $next = array_slice($routingTable, $pos); + + $routingTable = array_merge($pre, array($name => array( + 'url' => $url, + 'widget' => $widget, + 'action' => $action + )), $next); + self::options()->routingTable = $routingTable; + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => serialize($routingTable)) + , $db->sql()->where('name = ?', 'routingTable')); + } + + /** + * 绉婚櫎璺敱 + * + * @access public + * @param string $name 璺敱鍚嶇О + * @return integer + */ + public static function removeRoute($name) + { + $routingTable = self::options()->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + unset($routingTable[$name]); + self::options()->routingTable = $routingTable; + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => serialize($routingTable)) + , $db->sql()->where('name = ?', 'routingTable')); + } + + /** + * 澧炲姞action鎵╁睍 + * + * @access public + * @param string $actionName 闇瑕佹墿灞曠殑action鍚嶇О + * @param string $widgetName 闇瑕佹墿灞曠殑widget鍚嶇О + * @return integer + */ + public static function addAction($actionName, $widgetName) + { + $actionTable = unserialize(self::options()->actionTable); + $actionTable = empty($actionTable) ? array() : $actionTable; + $actionTable[$actionName] = $widgetName; + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->actionTable = serialize($actionTable))) + , $db->sql()->where('name = ?', 'actionTable')); + } + + /** + * 鍒犻櫎action鎵╁睍 + * + * @access public + * @param string $actionName + * @return Typecho_Widget + */ + public static function removeAction($actionName) + { + $actionTable = unserialize(self::options()->actionTable); + $actionTable = empty($actionTable) ? array() : $actionTable; + + if (isset($actionTable[$actionName])) { + unset($actionTable[$actionName]); + reset($actionTable); + } + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->actionTable = serialize($actionTable))) + , $db->sql()->where('name = ?', 'actionTable')); + } + + /** + * 澧炲姞涓涓彍鍗 + * + * @access public + * @param string $menuName 鑿滃崟鍚 + * @return integer + */ + public static function addMenu($menuName) + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['parent'] = empty($panelTable['parent']) ? array() : $panelTable['parent']; + $panelTable['parent'][] = $menuName; + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + + end($panelTable['parent']); + return key($panelTable['parent']) + 10; + } + + /** + * 绉婚櫎涓涓彍鍗 + * + * @access public + * @param string $menuName 鑿滃崟鍚 + * @return integer + */ + public static function removeMenu($menuName) + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['parent'] = empty($panelTable['parent']) ? array() : $panelTable['parent']; + + if (false !== ($index = array_search($menuName, $panelTable['parent']))) { + unset($panelTable['parent'][$index]); + } + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + + return $index + 10; + } + + /** + * 澧炲姞涓涓潰鏉 + * + * @access public + * @param integer $index 鑿滃崟绱㈠紩 + * @param string $fileName 鏂囦欢鍚嶇О + * @param string $title 闈㈡澘鏍囬 + * @param string $subTitle 闈㈡澘鍓爣棰 + * @param string $level 杩涘叆鏉冮檺 + * @param boolean $hidden 鏄惁闅愯棌 + * @param string $addLink 鏂板椤圭洰閾炬帴, 浼氭樉绀哄湪椤甸潰鏍囬涔嬪悗 + * @return integer + */ + public static function addPanel($index, $fileName, $title, $subTitle, $level, $hidden = false, $addLink = '') + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['child'] = empty($panelTable['child']) ? array() : $panelTable['child']; + $panelTable['child'][$index] = empty($panelTable['child'][$index]) ? array() : $panelTable['child'][$index]; + $fileName = urlencode(trim($fileName, '/')); + $panelTable['child'][$index][] = array($title, $subTitle, 'extending.php?panel=' . $fileName, $level, $hidden, $addLink); + + $panelTable['file'] = empty($panelTable['file']) ? array() : $panelTable['file']; + $panelTable['file'][] = $fileName; + $panelTable['file'] = array_unique($panelTable['file']); + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + + end($panelTable['child'][$index]); + return key($panelTable['child'][$index]); + } + + /** + * 绉婚櫎涓涓潰鏉 + * + * @access public + * @param integer $index 鑿滃崟绱㈠紩 + * @param string $fileName 鏂囦欢鍚嶇О + * @return integer + */ + public static function removePanel($index, $fileName) + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['child'] = empty($panelTable['child']) ? array() : $panelTable['child']; + $panelTable['child'][$index] = empty($panelTable['child'][$index]) ? array() : $panelTable['child'][$index]; + $panelTable['file'] = empty($panelTable['file']) ? array() : $panelTable['file']; + $fileName = urlencode(trim($fileName, '/')); + + if (false !== ($key = array_search($fileName, $panelTable['file']))) { + unset($panelTable['file'][$key]); + } + + $return = 0; + foreach ($panelTable['child'][$index] as $key => $val) { + if ($val[2] == 'extending.php?panel=' . $fileName) { + unset($panelTable['child'][$index][$key]); + $return = $key; + } + } + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + return $return; + } + + /** + * 鑾峰彇闈㈡澘url + * + * @access public + * @param string $fileName + * @return string + */ + public static function url($fileName) + { + return Typecho_Common::url('extending.php?panel=' . (trim($fileName, '/')), self::options()->adminUrl); + } + + /** + * 鎵嬪姩閰嶇疆鎻掍欢鍙橀噺 + * + * @access public + * @static + * @param mixed $pluginName 鎻掍欢鍚嶇О + * @param array $settings 鍙橀噺閿煎 + * @param bool $isPersonal. (default: false) 鏄惁涓虹浜哄彉閲 + * @return void + */ + public static function configPlugin($pluginName, array $settings, $isPersonal = false) + { + if (empty($settings)) { + return; + } + + Widget_Plugins_Edit::configPlugin($pluginName, $settings, $isPersonal); + } + + /** + * 璇勮鍥炲鎸夐挳 + * + * @access public + * @param string $theId 璇勮鍏冪礌id + * @param integer $coid 璇勮id + * @param string $word 鎸夐挳鏂囧瓧 + * @param string $formId 琛ㄥ崟id + * @param integer $style 鏍峰紡绫诲瀷 + * @return void + */ + public static function replyLink($theId, $coid, $word = 'Reply', $formId = 'respond', $style = 2) + { + if (self::options()->commentsThreaded) { + echo '' . $word . ''; + } + } + + /** + * 璇勮鍙栨秷鎸夐挳 + * + * @access public + * @param string $word 鎸夐挳鏂囧瓧 + * @param string $formId 琛ㄥ崟id + * @return void + */ + public static function cancleCommentReplyLink($word = 'Cancle', $formId = 'respond') + { + if (self::options()->commentsThreaded) { + echo '' . $word . ''; + } + } + + /** + * 璇勮鍥炲js鑴氭湰 + * + * @access public + * @return void + */ + public static function threadedCommentsScript() + { + if (self::options()->commentsThreaded) { + echo +<< +var typechoAddCommentReply = function (cid, coid, cfid, style) { + var _ce = document.getElementById(cid), _cp = _ce.parentNode; + var _cf = document.getElementById(cfid); + + var _pi = document.getElementById('comment-parent'); + if (null == _pi) { + _pi = document.createElement('input'); + _pi.setAttribute('type', 'hidden'); + _pi.setAttribute('name', 'parent'); + _pi.setAttribute('id', 'comment-parent'); + + var _form = 'form' == _cf.tagName ? _cf : _cf.getElementsByTagName('form')[0]; + + _form.appendChild(_pi); + } + _pi.setAttribute('value', coid); + + if (null == document.getElementById('comment-form-place-holder')) { + var _cfh = document.createElement('div'); + _cfh.setAttribute('id', 'comment-form-place-holder'); + _cf.parentNode.insertBefore(_cfh, _cf); + } + + 1 == style ? (null == _ce.nextSibling ? _cp.appendChild(_cf) + : _cp.insertBefore(_cf, _ce.nextSibling)) : _ce.appendChild(_cf); + + return false; +}; + +var typechoCancleCommentReply = function (cfid) { + var _cf = document.getElementById(cfid), + _cfh = document.getElementById('comment-form-place-holder'); + + var _pi = document.getElementById('comment-parent'); + if (null != _pi) { + _pi.parentNode.removeChild(_pi); + } + + if (null == _cfh) { + return true; + } + + _cfh.parentNode.insertBefore(_cf, _cfh); + return false; +}; + +EOF; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Base64.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Base64.php" new file mode 100644 index 0000000..0afe16e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Base64.php" @@ -0,0 +1,43 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR Base64缂栫爜 + * + * @package IXR + */ +class IXR_Base64 +{ + /** + * 缂栫爜鏁版嵁 + * + * @var string + */ + private $data; + + /** + * 鍒濆鍖栨暟鎹 + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } + + /** + * 鑾峰彇XML鏁版嵁 + * + * @return string + */ + public function getXml() + { + return '' . base64_encode($this->data) . ''; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Client.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Client.php" new file mode 100644 index 0000000..30098b4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Client.php" @@ -0,0 +1,279 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR瀹㈡埛绔 + * reload by typecho team(http://www.typecho.org) + * + * @package IXR + */ +class IXR_Client +{ + /** 榛樿瀹㈡埛绔 */ + const DEFAULT_USERAGENT = 'The Incutio XML-RPC PHP Library(Reload By Typecho)'; + + /** + * 鏈嶅姟绔湴鍧 + * + * @access private + * @var string + */ + private $server; + + /** + * 绔彛鍚嶇О + * + * @access private + * @var integer + */ + private $port; + + /** + * 璺緞鍚嶇О + * + * @access private + * @var string + */ + private $path; + + /** + * 鍦板潃 + * + * @access private + * @var string + */ + private $url; + + /** + * 瀹㈡埛绔 + * + * @access private + * @var string + */ + private $useragent; + + /** + * 鍥炴墽缁撴瀯浣 + * + * @access private + * @var string + */ + private $response; + + /** + * 娑堟伅浣 + * + * @access private + * @var string + */ + private $message = false; + + /** + * 璋冭瘯寮鍏 + * + * @access private + * @var boolean + */ + private $debug = false; + + /** + * 璇锋眰鍓嶇紑 + * + * @access private + * @var string + */ + private $prefix = NULL; + + // Storage place for an error message + private $error = false; + + /** + * 瀹㈡埛绔瀯閫犲嚱鏁 + * + * @access public + * @param string $server 鏈嶅姟绔湴鍧 + * @param string $path 璺緞鍚嶇О + * @param integer $port 绔彛鍚嶇О + * @param string $useragent 瀹㈡埛绔 + * @return void + */ + public function __construct($server, $path = false, $port = 80, $useragent = self::DEFAULT_USERAGENT, $prefix = NULL) + { + if (!$path) { + $this->url = $server; + + // Assume we have been given a Url instead + $bits = parse_url($server); + $this->server = $bits['host']; + $this->port = isset($bits['port']) ? $bits['port'] : 80; + $this->path = isset($bits['path']) ? $bits['path'] : '/'; + + // Make absolutely sure we have a path + if (isset($bits['query'])) { + $this->path .= '?' . $bits['query']; + } + } else { + /** Typecho_Common */ + require_once 'Typecho/Common.php'; + + $this->url = Typecho_Common::buildUrl(array( + 'scheme' => 'http', + 'host' => $server, + 'path' => $path, + 'port' => $port + )); + + $this->server = $server; + $this->path = $path; + $this->port = $port; + } + + $this->prefix = $prefix; + $this->useragent = $useragent; + } + + /** + * 璁剧疆璋冭瘯妯″紡 + * + * @access public + * @return void + */ + public function __setDebug() + { + $this->debug = true; + } + + /** + * 鎵ц璇锋眰 + * + * @access public + * @return void + */ + public function __rpcCall() + { + $args = func_get_args(); + $method = array_shift($args); + $request = new IXR_Request($method, $args); + $xml = $request->getXml(); + + $client = Typecho_Http_Client::get(); + if (!$client) { + $this->error = new IXR_Error(-32300, 'transport error - could not open socket'); + return false; + } + + $client->setHeader('Content-Type', 'text/xml') + ->setHeader('User-Agent', $this->useragent) + ->setData($xml) + ->send($this->url); + + $contents = $client->getResponseBody(); + + if ($this->debug) { + echo '
    '.htmlspecialchars($contents)."\n
    \n\n"; + } + + // Now parse what we've got back + $this->message = new IXR_Message($contents); + if (!$this->message->parse()) { + // XML error + $this->error = new IXR_Error(-32700, 'parse error. not well formed'); + return false; + } + + // Is the message a fault? + if ($this->message->messageType == 'fault') { + $this->error = new IXR_Error($this->message->faultCode, $this->message->faultString); + return false; + } + + // Message must be OK + return true; + } + + /** + * 澧炲姞鍓嶇紑 + * + * $rpc->metaWeblog->newPost(); + * + * + * @access public + * @param string $prefix 鍓嶇紑 + * @return void + */ + public function __get($prefix) + { + return new IXR_Client($this->server, $this->path, $this->port, $this->useragent, $this->prefix . $prefix . '.'); + } + + /** + * 澧炲姞榄旀湳鐗规 + * by 70 + * + * @access public + * @return mixed + */ + public function __call($method, $args) + { + array_unshift($args, $this->prefix . $method); + $return = call_user_func_array(array($this, '__rpcCall'), $args); + + if ($return) { + return $this->__getResponse(); + } else { + require_once 'IXR/Exception.php'; + throw new IXR_Exception($this->__getErrorMessage(), $this->__getErrorCode()); + } + } + + /** + * 鑾峰緱杩斿洖鍊 + * + * @access public + * @return void + */ + public function __getResponse() + { + // methodResponses can only have one param - return that + return $this->message->params[0]; + } + + /** + * 鏄惁涓洪敊璇 + * + * @access public + * @return void + */ + public function __isError() + { + return (is_object($this->error)); + } + + /** + * 鑾峰彇閿欒浠g爜 + * + * @access public + * @return void + */ + public function __getErrorCode() + { + return $this->error->code; + } + + /** + * 鑾峰彇閿欒娑堟伅 + * + * @access public + * @return void + */ + public function __getErrorMessage() + { + return $this->error->message; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/ClientMulticall.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/ClientMulticall.php" new file mode 100644 index 0000000..6433bdb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/ClientMulticall.php" @@ -0,0 +1,35 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR瀹㈡埛绔 + * + * @package IXR + */ +class IXR_ClientMulticall extends IXR_Client { + var $calls = array(); + function IXR_ClientMulticall($server, $path = false, $port = 80) { + parent::IXR_Client($server, $path, $port); + $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)'; + } + function addCall() { + $args = func_get_args(); + $methodName = array_shift($args); + $struct = array( + 'methodName' => $methodName, + 'params' => $args + ); + $this->calls[] = $struct; + } + function query() { + // Prepare multicall, then call the parent::query() method + return parent::query('system.multicall', $this->calls); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Date.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Date.php" new file mode 100644 index 0000000..048caae --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Date.php" @@ -0,0 +1,55 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鏃ユ湡 + * + * @package IXR + */ +class IXR_Date { + var $year; + var $month; + var $day; + var $hour; + var $minute; + var $second; + function IXR_Date($time) { + // $time can be a PHP timestamp or an ISO one + if (is_numeric($time)) { + $this->parseTimestamp($time); + } else { + $this->parseIso($time); + } + } + function parseTimestamp($timestamp) { + $this->year = date('Y', $timestamp); + $this->month = date('m', $timestamp); + $this->day = date('d', $timestamp); + $this->hour = date('H', $timestamp); + $this->minute = date('i', $timestamp); + $this->second = date('s', $timestamp); + } + function parseIso($iso) { + $this->year = substr($iso, 0, 4); + $this->month = substr($iso, 4, 2); + $this->day = substr($iso, 6, 2); + $this->hour = substr($iso, 9, 2); + $this->minute = substr($iso, 12, 2); + $this->second = substr($iso, 15, 2); + } + function getIso() { + return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second; + } + function getXml() { + return ''.$this->getIso().''; + } + function getTimestamp() { + return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Error.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Error.php" new file mode 100644 index 0000000..cfc7aaa --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Error.php" @@ -0,0 +1,76 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR閿欒 + * + * @package IXR + */ +class IXR_Error +{ + /** + * 閿欒浠g爜 + * + * @access public + * @var integer + */ + public $code; + + /** + * 閿欒娑堟伅 + * + * @access public + * @var string + */ + public $message; + + /** + * 鏋勯犲嚱鏁 + * + * @access public + * @param integer $code 閿欒浠g爜 + * @param string $message 閿欒娑堟伅 + * @return void + */ + public function __construct($code, $message) + { + $this->code = $code; + $this->message = $message; + } + + /** + * 鑾峰彇xml + * + * @access public + * @return string + */ + public function getXml() + { + $xml = << + + + + + faultCode + {$this->code} + + + faultString + {$this->message} + + + + + + +EOD; + return $xml; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Exception.php" new file mode 100644 index 0000000..682c42a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Exception.php" @@ -0,0 +1,17 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR寮傚父绫 + * + * @package IXR + */ +class IXR_Exception extends Exception +{} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/IntrospectionServer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/IntrospectionServer.php" new file mode 100644 index 0000000..664302c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/IntrospectionServer.php" @@ -0,0 +1,158 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鏈嶅姟鍣 + * + * @package IXR + */ +class IXR_IntrospectionServer extends IXR_Server { + var $signatures; + var $help; + function IXR_IntrospectionServer() { + $this->setCallbacks(); + $this->setCapabilities(); + $this->capabilities['introspection'] = array( + 'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html', + 'specVersion' => 1 + ); + $this->addCallback( + 'system.methodSignature', + 'this:methodSignature', + array('array', 'string'), + 'Returns an array describing the return type and required parameters of a method' + ); + $this->addCallback( + 'system.getCapabilities', + 'this:getCapabilities', + array('struct'), + 'Returns a struct describing the XML-RPC specifications supported by this server' + ); + $this->addCallback( + 'system.listMethods', + 'this:listMethods', + array('array'), + 'Returns an array of available methods on this server' + ); + $this->addCallback( + 'system.methodHelp', + 'this:methodHelp', + array('string', 'string'), + 'Returns a documentation string for the specified method' + ); + } + function addCallback($method, $callback, $args, $help) { + $this->callbacks[$method] = $callback; + $this->signatures[$method] = $args; + $this->help[$method] = $help; + } + function call($methodname, $args) { + // Make sure it's in an array + if ($args && !is_array($args)) { + $args = array($args); + } + // Over-rides default call method, adds signature check + if (!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.'); + } + $method = $this->callbacks[$methodname]; + $signature = $this->signatures[$methodname]; + $returnType = array_shift($signature); + // Check the number of arguments + if (count($args) != count($signature)) { + // print 'Num of args: '.count($args).' Num in signature: '.count($signature); + return new IXR_Error(-32602, 'server error. wrong number of method parameters'); + } + // Check the argument types + $ok = true; + $argsbackup = $args; + for ($i = 0, $j = count($args); $i < $j; $i++) { + $arg = array_shift($args); + $type = array_shift($signature); + switch ($type) { + case 'int': + case 'i4': + if (is_array($arg) || !is_int($arg)) { + $ok = false; + } + break; + case 'base64': + case 'string': + if (!is_string($arg)) { + $ok = false; + } + break; + case 'boolean': + if ($arg !== false && $arg !== true) { + $ok = false; + } + break; + case 'float': + case 'double': + if (!is_float($arg)) { + $ok = false; + } + break; + case 'date': + case 'dateTime.iso8601': + if (!is_a($arg, 'IXR_Date')) { + $ok = false; + } + break; + } + if (!$ok) { + return new IXR_Error(-32602, 'server error. invalid method parameters'); + } + } + // It passed the test - run the "real" method call + return parent::call($methodname, $argsbackup); + } + function methodSignature($method) { + if (!$this->hasMethod($method)) { + return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.'); + } + // We should be returning an array of types + $types = $this->signatures[$method]; + $return = array(); + foreach ($types as $type) { + switch ($type) { + case 'string': + $return[] = 'string'; + break; + case 'int': + case 'i4': + $return[] = 42; + break; + case 'double': + $return[] = 3.1415; + break; + case 'dateTime.iso8601': + $return[] = new IXR_Date(time()); + break; + case 'boolean': + $return[] = true; + break; + case 'base64': + $return[] = new IXR_Base64('base64'); + break; + case 'array': + $return[] = array('array'); + break; + case 'struct': + $return[] = array('struct' => 'struct'); + break; + } + } + return $return; + } + function methodHelp($method) { + return $this->help[$method]; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Message.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Message.php" new file mode 100644 index 0000000..78cb703 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Message.php" @@ -0,0 +1,167 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR娑堟伅 + * + * @package IXR + */ +class IXR_Message { + var $message; + var $messageType; // methodCall / methodResponse / fault + var $faultCode; + var $faultString; + var $methodName; + var $params; + // Current variable stacks + var $_arraystructs = array(); // The stack used to keep track of the current array/struct + var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array + var $_currentStructName = array(); // A stack as well + var $_param; + var $_value; + var $_currentTag; + var $_currentTagContents; + // The XML parser + var $_parser; + function IXR_Message ($message) { + $this->message = $message; + } + function parse() { + // first remove the XML declaration + $this->message = preg_replace('/<\?xml(.*)?\?'.'>/', '', $this->message); + if (trim($this->message) == '') { + return false; + } + $this->_parser = xml_parser_create(); + // Set XML parser to take the case of tags in to account + xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false); + // Set XML parser callback functions + xml_set_object($this->_parser, $this); + xml_set_element_handler($this->_parser, 'tag_open', 'tag_close'); + xml_set_character_data_handler($this->_parser, 'cdata'); + if (!xml_parse($this->_parser, $this->message)) { + /* die(sprintf('XML error: %s at line %d', + xml_error_string(xml_get_error_code($this->_parser)), + xml_get_current_line_number($this->_parser))); */ + return false; + } + xml_parser_free($this->_parser); + // Grab the error messages, if any + if ($this->messageType == 'fault') { + $this->faultCode = $this->params[0]['faultCode']; + $this->faultString = $this->params[0]['faultString']; + } + return true; + } + function tag_open($parser, $tag, $attr) { + $this->currentTag = $tag; + switch($tag) { + case 'methodCall': + case 'methodResponse': + case 'fault': + $this->messageType = $tag; + break; + /* Deal with stacks of arrays and structs */ + case 'data': // data is to all intents and puposes more interesting than array + $this->_arraystructstypes[] = 'array'; + $this->_arraystructs[] = array(); + break; + case 'struct': + $this->_arraystructstypes[] = 'struct'; + $this->_arraystructs[] = array(); + break; + } + } + function cdata($parser, $cdata) { + $this->_currentTagContents .= $cdata; + } + function tag_close($parser, $tag) { + $valueFlag = false; + switch($tag) { + case 'int': + case 'i4': + $value = (int)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'double': + $value = (double)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'string': + $value = (string)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'dateTime.iso8601': + $value = new IXR_Date(trim($this->_currentTagContents)); + // $value = $iso->getTimestamp(); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'value': + // "If no type is indicated, the type is string." + if (trim($this->_currentTagContents) != '') { + $value = (string)$this->_currentTagContents; + $this->_currentTagContents = ''; + $valueFlag = true; + } + break; + case 'boolean': + $value = (boolean)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'base64': + $value = base64_decode($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + /* Deal with stacks of arrays and structs */ + case 'data': + case 'struct': + $value = array_pop($this->_arraystructs); + array_pop($this->_arraystructstypes); + $valueFlag = true; + break; + case 'member': + array_pop($this->_currentStructName); + break; + case 'name': + $this->_currentStructName[] = trim($this->_currentTagContents); + $this->_currentTagContents = ''; + break; + case 'methodName': + $this->methodName = trim($this->_currentTagContents); + $this->_currentTagContents = ''; + break; + } + if ($valueFlag) { + /* + if (!is_array($value) && !is_object($value)) { + $value = trim($value); + } + */ + if (count($this->_arraystructs) > 0) { + // Add value to struct or array + if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') { + // Add to struct + $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value; + } else { + // Add to array + $this->_arraystructs[count($this->_arraystructs)-1][] = $value; + } + } else { + // Just add as a paramater + $this->params[] = $value; + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Request.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Request.php" new file mode 100644 index 0000000..ef2df6c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Request.php" @@ -0,0 +1,43 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR璇锋眰浣 + * + * @package IXR + */ +class IXR_Request { + var $method; + var $args; + var $xml; + function IXR_Request($method, $args) { + $this->method = $method; + $this->args = $args; + $this->xml = << + +{$this->method} + + +EOD; + foreach ($this->args as $arg) { + $this->xml .= ''; + $v = new IXR_Value($arg); + $this->xml .= $v->getXml(); + $this->xml .= "\n"; + } + $this->xml .= ''; + } + function getLength() { + return strlen($this->xml); + } + function getXml() { + return $this->xml; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Server.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Server.php" new file mode 100644 index 0000000..b3d47a2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Server.php" @@ -0,0 +1,328 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鏈嶅姟鍣 + * + * @package IXR + */ +class IXR_Server +{ + /** + * 杈撳叆鍙傛暟 + * + * @access private + * @var array + */ + private $data; + + /** + * 鍥炶皟鍑芥暟 + * + * @access private + * @var array + */ + private $callbacks = array(); + + /** + * 娑堟伅浣 + * + * @access private + * @var IXR_Message + */ + private $message; + + /** + * 榛樿鍙傛暟 + * + * @access private + * @var array + */ + private $capabilities; + + /** + * 鏋勯犲嚱鏁 + * + * @access public + * @param mixed $callbacks 鍥炶皟鍑芥暟 + * @param mixed $data 杈撳叆鍙傛暟 + * @return void + */ + public function __construct($callbacks = false, $data = false) + { + $this->setCapabilities(); + if ($callbacks) { + $this->callbacks = $callbacks; + } + $this->setCallbacks(); + $this->serve($data); + } + + /** + * 鍛煎彨鍐呴儴鏂规硶 + * + * @access private + * @param string $methodname 鏂规硶鍚 + * @param mixed $args 鍙傛暟 + * @return mixed + */ + private function call($methodname, $args) + { + // hook + if (0 !== strpos($methodname, 'hook.') && $this->hasMethod('hook.beforeCall')) { + $this->call('hook.beforeCall', array($methodname)); + } + + if (!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method '.$methodname.' does not exist.'); + } + $method = $this->callbacks[$methodname]; + + // Are we dealing with a function or a method? + if (is_string($method) && substr($method, 0, 5) == 'this:') { + // It's a class method - check it exists + $method = substr($method, 5); + if (!method_exists($this, $method)) { + return new IXR_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.'); + } + // Call the method + $result = $this->$method($args); + } else { + if (is_array($method)) { + list($object, $func) = $method; + if (!is_callable($method)) { + return new IXR_Error(-32601, 'server error. requested class method "'.$object . '.' . $func.'" does not exist.'); + } + + $result = call_user_func_array(array($object, $func), $args); + } elseif (!function_exists($method)) { + // It's a function - does it exist? + return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.'); + } else { + // Call the function + $result = $method($args); + } + } + + // hook + if (0 !== strpos($methodname, 'hook.') && $this->hasMethod('hook.afterCall')) { + $this->call('hook.afterCall', array($methodname)); + } + + return $result; + } + + /** + * 鎶涘嚭閿欒 + * + * @access private + * @param integer $error 閿欒浠g爜 + * @param string $message 閿欒娑堟伅 + * @return void + */ + private function error($error, $message = false) + { + // Accepts either an error object or an error code and message + if ($message && !is_object($error)) { + $error = new IXR_Error($error, $message); + } + $this->output($error->getXml()); + } + + /** + * 杈撳嚭xml + * + * @access private + * @param string $xml 杈撳嚭xml + * @return 杈撳嚭xml + */ + private function output($xml) + { + $xml = ''."\n".$xml; + $length = strlen($xml); + header('Connection: close'); + header('Content-Length: '.$length); + header('Content-Type: text/xml'); + header('Date: '.date('r')); + echo $xml; + exit; + } + + /** + * 鏄惁瀛樺湪鏂规硶 + * + * @access private + * @param string $method 鏂规硶鍚 + * @return mixed + */ + private function hasMethod($method) + { + return in_array($method, array_keys($this->callbacks)); + } + + /** + * 璁剧疆榛樿鍙傛暟 + * + * @access public + * @return void + */ + private function setCapabilities() + { + // Initialises capabilities array + $this->capabilities = array( + 'xmlrpc' => array( + 'specUrl' => 'http://www.xmlrpc.com/spec', + 'specVersion' => 1 + ), + 'faults_interop' => array( + 'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php', + 'specVersion' => 20010516 + ), + 'system.multicall' => array( + 'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208', + 'specVersion' => 1 + ), + ); + } + + /** + * 璁剧疆榛樿鏂规硶 + * + * @access private + * @return void + */ + private function setCallbacks() + { + $this->callbacks['system.getCapabilities'] = 'this:getCapabilities'; + $this->callbacks['system.listMethods'] = 'this:listMethods'; + $this->callbacks['system.multicall'] = 'this:multiCall'; + } + + /** + * 鏈嶅姟鍏ュ彛 + * + * @access private + * @param mixed $data 杈撳叆鍙傛暟 + * @return void + */ + private function serve($data = false) + { + if (!isset($GLOBALS['HTTP_RAW_POST_DATA'])) { + $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input"); + } + if (isset($GLOBALS['HTTP_RAW_POST_DATA'])) { + $GLOBALS['HTTP_RAW_POST_DATA'] = trim($GLOBALS['HTTP_RAW_POST_DATA']); + } + + if (!$data) { + global $HTTP_RAW_POST_DATA; + if (!$HTTP_RAW_POST_DATA) { + die('XML-RPC server accepts POST requests only.'); + } + $data = $HTTP_RAW_POST_DATA; + } + $this->message = new IXR_Message($data); + if (!$this->message->parse()) { + $this->error(-32700, 'parse error. not well formed'); + } + if ($this->message->messageType != 'methodCall') { + $this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall'); + } + + if (0 === strpos($this->message->methodName, 'hook.')) { + die('THIS METHOD MUST BE CALLED INSIDE.'); + } + + $result = $this->call($this->message->methodName, $this->message->params); + // Is the result an error? + if (is_a($result, 'IXR_Error')) { + $this->error($result); + } + // Encode the result + $r = new IXR_Value($result); + $resultxml = $r->getXml(); + // Create the XML + $xml = << + + + + $resultxml + + + + + +EOD; + // hook + if ($this->hasMethod('hook.beforeOutput')) { + $this->call('hook.beforeOutput', array()); + } + + // Send it + $this->output($xml); + } + + /** + * 鑾峰彇榛樿鍙傛暟 + * + * @access public + * @param mixed $args 杈撳叆鍙傛暟 + * @return array + */ + public function getCapabilities($args) + { + return $this->capabilities; + } + + /** + * 鍒楀嚭鎵鏈夋柟娉 + * + * @access public + * @param mixed $args 杈撳叆鍙傛暟 + * @return mixed + */ + public function listMethods($args) + { + // Returns a list of methods - uses array_reverse to ensure user defined + // methods are listed before server defined methods + return array_reverse(array_keys($this->callbacks)); + } + + /** + * 涓娆″鐞嗗涓姹 + * + * @access public + * @param void $methodcalls + * @return array + */ + public function multiCall($methodcalls) + { + // See http://www.xmlrpc.com/discuss/msgReader$1208 + $return = array(); + foreach ($methodcalls as $call) { + $method = $call['methodName']; + $params = $call['params']; + if ($method == 'system.multicall') { + $result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden'); + } else { + $result = $this->call($method, $params); + } + if (is_a($result, 'IXR_Error')) { + $return[] = array( + 'faultCode' => $result->code, + 'faultString' => $result->message + ); + } else { + $return[] = array($result); + } + } + return $return; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Value.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Value.php" new file mode 100644 index 0000000..4e8424d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/IXR/Value.php" @@ -0,0 +1,119 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鍊 + * + * @package IXR + */ +class IXR_Value { + var $data; + var $type; + function IXR_Value ($data, $type = false) { + $this->data = $data; + if (!$type) { + $type = $this->calculateType(); + } + $this->type = $type; + if ($type == 'struct') { + /* Turn all the values in the array in to new IXR_Value objects */ + foreach ($this->data as $key => $value) { + $this->data[$key] = new IXR_Value($value); + } + } + if ($type == 'array') { + for ($i = 0, $j = count($this->data); $i < $j; $i++) { + $this->data[$i] = new IXR_Value($this->data[$i]); + } + } + } + function calculateType() { + if ($this->data === true || $this->data === false) { + return 'boolean'; + } + if (is_integer($this->data)) { + return 'int'; + } + if (is_double($this->data)) { + return 'double'; + } + // Deal with IXR object types base64 and date + if (is_object($this->data) && is_a($this->data, 'IXR_Date')) { + return 'date'; + } + if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) { + return 'base64'; + } + // If it is a normal PHP object convert it in to a struct + if (is_object($this->data)) { + + $this->data = get_object_vars($this->data); + return 'struct'; + } + if (!is_array($this->data)) { + return 'string'; + } + /* We have an array - is it an array or a struct ? */ + if ($this->isStruct($this->data)) { + return 'struct'; + } else { + return 'array'; + } + } + function getXml() { + /* Return XML for this value */ + switch ($this->type) { + case 'boolean': + return ''.(($this->data) ? '1' : '0').''; + break; + case 'int': + return ''.$this->data.''; + break; + case 'double': + return ''.$this->data.''; + break; + case 'string': + return ''.htmlspecialchars($this->data).''; + break; + case 'array': + $return = ''."\n"; + foreach ($this->data as $item) { + $return .= ' '.$item->getXml()."\n"; + } + $return .= ''; + return $return; + break; + case 'struct': + $return = ''."\n"; + foreach ($this->data as $name => $value) { + $return .= " $name"; + $return .= $value->getXml()."\n"; + } + $return .= ''; + return $return; + break; + case 'date': + case 'base64': + return $this->data->getXml(); + break; + } + return false; + } + function isStruct($array) { + /* Nasty function to check if an array is a struct or not */ + $expected = 0; + foreach ($array as $key => $value) { + if ((string)$key != (string)$expected) { + return true; + } + $expected++; + } + return false; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Json.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Json.php" new file mode 100644 index 0000000..7a602a4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Json.php" @@ -0,0 +1,545 @@ +> 6) & 0x1F)) + . chr(0x80 | ($bytes & 0x3F)); + + case (0xFFFF & $bytes) == $bytes: + return chr(0xE0 | (($bytes >> 12) & 0x0F)) + . chr(0x80 | (($bytes >> 6) & 0x3F)) + . chr(0x80 | ($bytes & 0x3F)); + } + return ''; + } + + /** + * 灏唘tf8杞崲涓簎tf16 + * + * @access private + * @param string $utf8 utf8瀛楃涓 + * @return string + */ + private static function utf82utf16($utf8) + { + if (function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch (strlen($utf8)) { + case 1: + return $utf8; + + case 2: + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + case 3: + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + return ''; + } + + /** + * 鍒ゆ柇閿欒 + * + * @access private + * @param mixed $data 閿欒瀵硅薄 + * @param string $code 閿欒浠g爜 + * @return boolean + */ + private static function _is_error($data, $code = null) + { + if (is_object($data) && (get_class($data) == 'services_json_error' || + is_subclass_of($data, 'services_json_error'))) { + return true; + } + + return false; + } + + /** + * 娓呴櫎鐗规畩鏍煎紡 + * + * @access private + * @param string $str 寰呭鐞嗗瓧绗︿覆 + * @return string + */ + private static function _reduce_string($str) + { + $str = preg_replace(array( + '#^\s*//(.+)$#m', + '#^\s*/\*(.+)\*/#Us', + '#/\*(.+)\*/\s*$#Us' + ), '', $str); + return trim($str); + } + + /** + * 灏嗗璞¤浆鎹负json涓 + * + * @access public + * @param mixed $var 闇瑕佽浆鎹㈢殑瀵硅薄 + * @return string + */ + public static function _encode($var) + { + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + $ascii = ''; + $strlen_var = strlen($var); + + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2})); + $c += 2; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + + return '"'.$ascii.'"'; + + case 'array': + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + $properties = array_map(array('Typecho_Json', '_name_value'), + array_keys($var), + array_values($var)); + + foreach ($properties as $property) { + if (self::_is_error($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + // treat it like a regular array + $elements = array_map(array('Typecho_Json', '_encode'), $var); + + foreach ($elements as $element) { + if (self::_is_error($element)) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = get_object_vars($var); + + $properties = array_map(array('Typecho_Json', '_name_value'), + array_keys($vars), + array_values($vars)); + + foreach ($properties as $property) { + if (self::_is_error($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return false; + } + } + + /** + * 瑙g爜json瀛楃涓 + * + * @access public + * @param string $str 瑙g爜瀛楃涓 + * @return mixed + */ + public static function _decode($str) + { + $str = self::_reduce_string($str); + + switch (strtolower($str)) { + case 'true': + return true; + + case 'false': + return false; + + case 'null': + return null; + + default: + $m = array(); + + if (is_numeric($str)) { + return ((float)$str == (integer)$str) + ? (integer)$str + : (float)$str; + + } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { + $delim = substr($str, 0, 1); + $chrs = substr($str, 1, -1); + $utf8 = ''; + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c < $strlen_chrs; ++$c) { + + $substr_chrs_c_2 = substr($chrs, $c, 2); + $ord_chrs_c = ord($chrs{$c}); + + switch (true) { + case $substr_chrs_c_2 == '\b': + $utf8 .= chr(0x08); + ++$c; + break; + case $substr_chrs_c_2 == '\t': + $utf8 .= chr(0x09); + ++$c; + break; + case $substr_chrs_c_2 == '\n': + $utf8 .= chr(0x0A); + ++$c; + break; + case $substr_chrs_c_2 == '\f': + $utf8 .= chr(0x0C); + ++$c; + break; + case $substr_chrs_c_2 == '\r': + $utf8 .= chr(0x0D); + ++$c; + break; + + case $substr_chrs_c_2 == '\\"': + case $substr_chrs_c_2 == '\\\'': + case $substr_chrs_c_2 == '\\\\': + case $substr_chrs_c_2 == '\\/': + if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || + ($delim == "'" && $substr_chrs_c_2 != '\\"')) { + $utf8 .= $chrs{++$c}; + } + break; + + case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)): + $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2))) + . chr(hexdec(substr($chrs, ($c + 4), 2))); + $utf8 .= self::utf162utf8($utf16); + $c += 5; + break; + + case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): + $utf8 .= $chrs{$c}; + break; + + case ($ord_chrs_c & 0xE0) == 0xC0: + $utf8 .= substr($chrs, $c, 2); + ++$c; + break; + + case ($ord_chrs_c & 0xF0) == 0xE0: + $utf8 .= substr($chrs, $c, 3); + $c += 2; + break; + + case ($ord_chrs_c & 0xF8) == 0xF0: + $utf8 .= substr($chrs, $c, 4); + $c += 3; + break; + + case ($ord_chrs_c & 0xFC) == 0xF8: + $utf8 .= substr($chrs, $c, 5); + $c += 4; + break; + + case ($ord_chrs_c & 0xFE) == 0xFC: + $utf8 .= substr($chrs, $c, 6); + $c += 5; + break; + + } + + } + + return $utf8; + + } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { + if ($str {0} == '[') { + $stk = array(self::SERVICES_JSON_IN_ARR); + $arr = array(); + } else { + $stk = array(self::SERVICES_JSON_IN_OBJ); + $obj = new stdClass(); + } + + array_push($stk, array('what' => self::SERVICES_JSON_SLICE, + 'where' => 0, + 'delim' => false)); + + $chrs = substr($str, 1, -1); + $chrs = self::_reduce_string($chrs); + + if ($chrs == '') { + if (reset($stk) == self::SERVICES_JSON_IN_ARR) { + return $arr; + + } else { + return $obj; + + } + } + + $strlen_chrs = strlen($chrs); + for ($c = 0; $c <= $strlen_chrs; ++$c) { + + $top = end($stk); + $substr_chrs_c_2 = substr($chrs, $c, 2); + + if (($c == $strlen_chrs) || (($chrs {$c} == ',') && ($top['what'] == self::SERVICES_JSON_SLICE))) { + $slice = substr($chrs, $top['where'], ($c - $top['where'])); + array_push($stk, array('what' => self::SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false)); + + if (reset($stk) == self::SERVICES_JSON_IN_ARR) { + array_push($arr, self::_decode($slice)); + + } elseif (reset($stk) == self::SERVICES_JSON_IN_OBJ) { + $parts = array(); + + if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + $key = self::_decode($parts[1]); + $val = self::_decode($parts[2]); + $obj->$key = $val; + } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + $key = $parts[1]; + $val = self::_decode($parts[2]); + $obj->$key = $val; + } + + } + + } elseif ((($chrs {$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != self::SERVICES_JSON_IN_STR)) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + + } elseif (($chrs {$c} == $top['delim']) && + ($top['what'] == self::SERVICES_JSON_IN_STR) && + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { + array_pop($stk); + + } elseif (($chrs {$c} == '[') && + in_array($top['what'], array(self::SERVICES_JSON_SLICE, self::SERVICES_JSON_IN_ARR, self::SERVICES_JSON_IN_OBJ))) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); + } elseif (($chrs {$c} == ']') && ($top['what'] == self::SERVICES_JSON_IN_ARR)) { + array_pop($stk); + } elseif (($chrs {$c} == '{') && + in_array($top['what'], array(self::SERVICES_JSON_SLICE, self::SERVICES_JSON_IN_ARR, self::SERVICES_JSON_IN_OBJ))) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); + } elseif (($chrs {$c} == '}') && ($top['what'] == self::SERVICES_JSON_IN_OBJ)) { + array_pop($stk); + } elseif (($substr_chrs_c_2 == '/*') && + in_array($top['what'], array(self::SERVICES_JSON_SLICE, self::SERVICES_JSON_IN_ARR, self::SERVICES_JSON_IN_OBJ))) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); + $c++; + } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == self::SERVICES_JSON_IN_CMT)) { + array_pop($stk); + $c++; + for ($i = $top['where']; $i <= $c; ++$i) + $chrs = substr_replace($chrs, ' ', $i, 1); + } + + } + + if (reset($stk) == self::SERVICES_JSON_IN_ARR) { + return $arr; + + } elseif (reset($stk) == self::SERVICES_JSON_IN_OBJ) { + return $obj; + + } + + } + } + } + + /** + * 瀵归厤瀵瑰肩紪鐮 + * + * @access public + * @param string $name 鍚嶇О + * @param mixed $value 鍊 + * @return string + */ + public static function _name_value($name, $value) + { + $encoded_value = self::_encode($value); + + if (self::_is_error($encoded_value)) { + return $encoded_value; + } + + return self::_encode(strval($name)) . ':' . $encoded_value; + } + + /** + * 瀵瑰彉閲忚繘琛宩son缂栫爜 + * + * @access public + * @param mixed $var 闇瑕佸鐞嗙殑瀵硅薄 + * @return string + */ + public static function encode($var) + { + if (function_exists('json_encode')) { + /** from php 5.1 */ + return json_encode($var); + } else { + return self::_encode($var); + } + } + + /** + * 瀵瑰瓧绗︿覆杩涜json瑙g爜 + * + * @access public + * @param string $var 闇瑕佽В鐮佺殑瀛楃涓 + * @param boolean $assoc 鏄惁寮哄埗瑙i噴涓烘暟缁 + * @return mixed + */ + public static function decode($var, $assoc = false) + { + if (function_exists('json_decode')) { + /** from php 5.1 */ + return json_decode($var, $assoc); + } else { + $result = self::_decode($var); + } + + if ($assoc && is_object($result)) { + return (array) $result; + } else if (!$assoc && is_array($result)) { + return (object) $result; + } + + return $result; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Markdown.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Markdown.php" new file mode 100644 index 0000000..c1d6d1d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Markdown.php" @@ -0,0 +1,62 @@ +getType() == CommonMark_Element_InlineElement::TYPE_SOFTBREAK) { + $inline->setType(CommonMark_Element_InlineElement::TYPE_HARDBREAK); + } + + return parent::renderInline($inline); + } +} + +/** + * Markdown瑙f瀽 + * + * @package Markdown + * @copyright Copyright (c) 2014 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Markdown +{ + /** + * convert + * + * @param string $text + * @return string + */ + public static function convert($text) + { + static $docParser, $renderer; + + if (empty($docParser)) { + $docParser = new CommonMark_DocParser(); + } + + + if (empty($renderer)) { + $renderer = new HtmlRendererExtra(); + } + + $doc = $docParser->parse($text); + return $renderer->render($doc); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/PasswordHash.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/PasswordHash.php" new file mode 100644 index 0000000..bf6e214 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/PasswordHash.php" @@ -0,0 +1,257 @@ + in 2004-2006 and placed in +# the public domain. +# +# There's absolutely no warranty. +# +# Please be sure to update the Version line if you edit this file in any way. +# It is suggested that you leave the main version number intact, but indicate +# your project name (after the slash) and add your own revision information. +# +# Please do not change the "private" password hashing method implemented in +# here, thereby making your hashes incompatible. However, if you must, please +# change the hash type identifier (the "$P$") to something different. +# +# Obviously, since this code is in the public domain, the above are not +# requirements (there can be none), but merely suggestions. +# + +/** + * Portable PHP password hashing framework. + * + * @package phpass + * @version 0.2 / genuine. + * @link http://www.openwall.com/phpass/ + * @since 2.5 + */ +class PasswordHash { + var $itoa64; + var $iteration_count_log2; + var $portable_hashes; + var $random_state; + + function PasswordHash($iteration_count_log2, $portable_hashes) + { + $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + + if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) + $iteration_count_log2 = 8; + $this->iteration_count_log2 = $iteration_count_log2; + + $this->portable_hashes = $portable_hashes; + + $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compability reasons + } + + function get_random_bytes($count) + { + $output = ''; + if ( @is_readable('/dev/urandom') && + ($fh = @fopen('/dev/urandom', 'rb'))) { + $output = fread($fh, $count); + fclose($fh); + } + + if (strlen($output) < $count) { + $output = ''; + for ($i = 0; $i < $count; $i += 16) { + $this->random_state = + md5(microtime() . $this->random_state); + $output .= + pack('H*', md5($this->random_state)); + } + $output = substr($output, 0, $count); + } + + return $output; + } + + function encode64($input, $count) + { + $output = ''; + $i = 0; + do { + $value = ord($input[$i++]); + $output .= $this->itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($input[$i]) << 8; + $output .= $this->itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($input[$i]) << 16; + $output .= $this->itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $this->itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return $output; + } + + function gensalt_private($input) + { + $output = '$P$'; + $output .= $this->itoa64[min($this->iteration_count_log2 + + ((PHP_VERSION >= '5') ? 5 : 3), 30)]; + $output .= $this->encode64($input, 6); + + return $output; + } + + function crypt_private($password, $setting) + { + $output = '*0'; + if (substr($setting, 0, 2) == $output) + $output = '*1'; + + if (substr($setting, 0, 3) != '$P$') + return $output; + + $count_log2 = strpos($this->itoa64, $setting[3]); + if ($count_log2 < 7 || $count_log2 > 30) + return $output; + + $count = 1 << $count_log2; + + $salt = substr($setting, 4, 8); + if (strlen($salt) != 8) + return $output; + +# We're kind of forced to use MD5 here since it's the only +# cryptographic primitive available in all versions of PHP +# currently in use. To implement our own low-level crypto +# in PHP would result in much worse performance and +# consequently in lower iteration counts and hashes that are +# quicker to crack (by non-PHP code). + if (PHP_VERSION >= '5') { + $hash = md5($salt . $password, TRUE); + do { + $hash = md5($hash . $password, TRUE); + } while (--$count); + } else { + $hash = pack('H*', md5($salt . $password)); + do { + $hash = pack('H*', md5($hash . $password)); + } while (--$count); + } + + $output = substr($setting, 0, 12); + $output .= $this->encode64($hash, 16); + + return $output; + } + + function gensalt_extended($input) + { + $count_log2 = min($this->iteration_count_log2 + 8, 24); +# This should be odd to not reveal weak DES keys, and the +# maximum valid value is (2**24 - 1) which is odd anyway. + $count = (1 << $count_log2) - 1; + + $output = '_'; + $output .= $this->itoa64[$count & 0x3f]; + $output .= $this->itoa64[($count >> 6) & 0x3f]; + $output .= $this->itoa64[($count >> 12) & 0x3f]; + $output .= $this->itoa64[($count >> 18) & 0x3f]; + + $output .= $this->encode64($input, 3); + + return $output; + } + + function gensalt_blowfish($input) + { +# This one needs to use a different order of characters and a +# different encoding scheme from the one in encode64() above. +# We care because the last character in our encoded string will +# only represent 2 bits. While two known implementations of +# bcrypt will happily accept and correct a salt string which +# has the 4 unused bits set to non-zero, we do not want to take +# chances and we also do not want to waste an additional byte +# of entropy. + $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + $output = '$2a$'; + $output .= chr(ord('0') + $this->iteration_count_log2 / 10); + $output .= chr(ord('0') + $this->iteration_count_log2 % 10); + $output .= '$'; + + $i = 0; + do { + $c1 = ord($input[$i++]); + $output .= $itoa64[$c1 >> 2]; + $c1 = ($c1 & 0x03) << 4; + if ($i >= 16) { + $output .= $itoa64[$c1]; + break; + } + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 4; + $output .= $itoa64[$c1]; + $c1 = ($c2 & 0x0f) << 2; + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 6; + $output .= $itoa64[$c1]; + $output .= $itoa64[$c2 & 0x3f]; + } while (1); + + return $output; + } + + function HashPassword($password) + { + $random = ''; + + if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { + $random = $this->get_random_bytes(16); + $hash = + crypt($password, $this->gensalt_blowfish($random)); + if (strlen($hash) == 60) + return $hash; + } + + if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { + if (strlen($random) < 3) + $random = $this->get_random_bytes(3); + $hash = + crypt($password, $this->gensalt_extended($random)); + if (strlen($hash) == 20) + return $hash; + } + + if (strlen($random) < 6) + $random = $this->get_random_bytes(6); + $hash = + $this->crypt_private($password, + $this->gensalt_private($random)); + if (strlen($hash) == 34) + return $hash; + +# Returning '*' on error is safe here, but would _not_ be safe +# in a crypt(3)-like function used _both_ for generating new +# hashes and for validating passwords against existing hashes. + return '*'; + } + + function CheckPassword($password, $stored_hash) + { + $hash = $this->crypt_private($password, $stored_hash); + if ($hash[0] == '*') + $hash = crypt($password, $stored_hash); + + return $hash == $stored_hash; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/AutoP.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/AutoP.php" new file mode 100644 index 0000000..ac7e643 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/AutoP.php" @@ -0,0 +1,195 @@ + + * @license GNU General Public License 2.0 + */ +class AutoP +{ + // 浣滀负娈佃惤鐨勬爣绛 + const BLOCK = 'p|pre|div|blockquote|form|ul|ol|dd|table|ins|h1|h2|h3|h4|h5|h6'; + + /** + * 鍞竴id + * + * @access private + * @var integer + */ + private $_uniqueId = 0; + + /** + * 瀛樺偍鐨勬钀 + * + * @access private + * @var array + */ + private $_blocks = array(); + + /** + * 鐢熸垚鍞竴鐨刬d, 涓轰簡閫熷害鑰冭檻鏈澶氭敮鎸1涓囦釜tag鐨勫鐞 + * + * @access private + * @return string + */ + private function makeUniqueId() + { + return ':' . str_pad($this->_uniqueId ++, 4, '0', STR_PAD_LEFT); + } + + /** + * 鐢ㄦ钀芥柟娉曞鐞嗘崲琛 + * + * @access private + * @param string $text + * @return string + */ + private function cutByBlock($text) + { + $space = "( |銆)"; + $text = preg_replace("/{$space}*\n{$space}*/is", "\n", $text); + $text = preg_replace("/\s*\s*/is", "

    ", $text); + $text = preg_replace("/\n{2,}/", "

    ", $text); + $text = nl2br($text); + $text = preg_replace("/(

    )?\s*\s*(<\/p>)?/is", "", $text); + $text = preg_replace("/

    {$space}*<\/p>/is", '', $text); + $text = preg_replace("/\s*

    \s*$/is", '', $text); + $text = preg_replace("/^\s*<\/p>\s*/is", '', $text); + return $text; + } + + /** + * 淇娈佃惤寮澶村拰缁撳熬 + * + * @access private + * @param string $text + * @return string + */ + private function fixPragraph($text) + { + $text = trim($text); + if (!preg_match("/^<(" . self::BLOCK . ")(\s|>)/i", $text)) { + $text = '

    ' . $text; + } + + if (!preg_match("/<\/(" . self::BLOCK . ")>$/i", $text)) { + $text = $text . '

    '; + } + + return $text; + } + + /** + * 鏇挎崲娈佃惤鐨勫洖璋冨嚱鏁 + * + * @access public + * @param array $matches 鍖归厤鍊 + * @return string + */ + public function replaceBlockCallback($matches) + { + $tagMatch = '|' . $matches[1] . '|'; + $text = $matches[4]; + + switch (true) { + /** 鐢╞r澶勭悊鎹㈣ */ + case false !== strpos('|li|dd|dt|td|p|a|span|code|cite|strong|sup|sub|small|del|u|i|b|ins|h1|h2|h3|h4|h5|h6|', $tagMatch): + $text = nl2br(trim($text)); + break; + /** 鐢ㄦ钀藉鐞嗘崲琛 */ + case false !== strpos('|div|blockquote|form|', $tagMatch): + $text = $this->cutByBlock($text); + if (false !== strpos($text, '

    ')) { + $text = $this->fixPragraph($text); + } + break; + default: + break; + } + + /** 娌℃湁娈佃惤鑳藉姏鐨勬爣绛 */ + if (false !== strpos('|a|span|code|cite|strong|sup|sub|small|del|u|i|b|', $tagMatch)) { + $key = ''; + } else { + $key = ''; + } + + $this->_blocks[$key] = "<{$matches[1]}{$matches[3]}>{$text}"; + return $key; + } + + /** + * 鑷姩鍒嗘 + * + * @param string $text + * @static + * @access private + * @return string + */ + public function parse($text) + { + /** 閲嶇疆璁℃暟鍣 */ + $this->_uniqueId = 0; + $this->_blocks = array(); + + /** 灏嗗凡鏈夌殑娈佃惤鍚庨潰鐨勬崲琛屽鐞嗘帀 */ + $text = preg_replace(array("/<\/p>\s+\s*/is"), array("

    "), trim($text)); + + /** 灏嗘墍鏈夐潪鑷棴鍚堟爣绛捐В鏋愪负鍞竴鐨勫瓧绗︿覆 */ + $foundTagCount = 0; + $textLength = strlen($text); + $uniqueIdList = array(); + + if (preg_match_all("/<\/\s*([a-z0-9]+)>/is", $text, $matches, PREG_OFFSET_CAPTURE)) { + foreach ($matches[0] as $key => $match) { + $tag = $matches[1][$key][0]; + + $leftOffset = $match[1] - $textLength; + $posSingle = strrpos($text, '<' . $tag . '>', $leftOffset); + $posFix = strrpos($text, '<' . $tag . ' ', $leftOffset); + $pos = false; + + switch (true) { + case (false !== $posSingle && false !== $posFix): + $pos = max($posSingle, $posFix); + break; + case false === $posSingle && false !== $posFix: + $pos = $posFix; + break; + case false !== $posSingle && false === $posFix: + $pos = $posSingle; + break; + default: + break; + } + + if (false !== $pos) { + $uniqueId = $this->makeUniqueId(); + $uniqueIdList[$uniqueId] = $tag; + $tagLength = strlen($tag); + + $text = substr_replace($text, $uniqueId, $pos + 1 + $tagLength, 0); + $text = substr_replace($text, $uniqueId, $match[1] + 7 + $foundTagCount * 10 + $tagLength, 0); // 7 = 5 + 2 + $foundTagCount ++; + } + } + } + + foreach ($uniqueIdList as $uniqueId => $tag) { + $text = preg_replace_callback("/<({$tag})({$uniqueId})([^>]*)>(.*)<\/\\1\\2>/is", + array($this, 'replaceBlockCallback'), $text, 1); + } + + $text = $this->cutByBlock($text); + $blocks = array_reverse($this->_blocks); + + foreach ($blocks as $blockKey => $blockValue) { + $text = str_replace($blockKey, $blockValue, $text); + } + + return $this->fixPragraph($text); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Common.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Common.php" new file mode 100644 index 0000000..53a7b6c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Common.php" @@ -0,0 +1,1433 @@ + $val) { + if (in_array($key, self::$_allowableAttributes[$tag])) { + $parsedAttrs[] = " {$key}" . (empty($val) ? '' : "={$val}"); + } + } + + return '<' . $tag . implode('', $parsedAttrs) . '>'; + } + + /** + * 瑙f瀽灞炴 + * + * @access public + * @param string $attrs 灞炴у瓧绗︿覆 + * @return array + */ + public static function __parseAttrs($attrs) + { + $attrs = trim($attrs); + $len = strlen($attrs); + $pos = -1; + $result = array(); + $quote = ''; + $key = ''; + $value = ''; + + for ($i = 0; $i < $len; $i ++) { + if ('=' != $attrs[$i] && !ctype_space($attrs[$i]) && -1 == $pos) { + $key .= $attrs[$i]; + + /** 鏈鍚庝竴涓 */ + if ($i == $len - 1) { + if ('' != ($key = trim($key))) { + $result[$key] = ''; + $key = ''; + $value = ''; + } + } + + } else if (ctype_space($attrs[$i]) && -1 == $pos) { + $pos = -2; + } else if ('=' == $attrs[$i] && 0 > $pos) { + $pos = 0; + } else if (('"' == $attrs[$i] || "'" == $attrs[$i]) && 0 == $pos) { + $quote = $attrs[$i]; + $value .= $attrs[$i]; + $pos = 1; + } else if ($quote != $attrs[$i] && 1 == $pos) { + $value .= $attrs[$i]; + } else if ($quote == $attrs[$i] && 1 == $pos) { + $pos = -1; + $value .= $attrs[$i]; + $result[trim($key)] = $value; + $key = ''; + $value = ''; + } else if ('=' != $attrs[$i] && !ctype_space($attrs[$i]) && -2 == $pos) { + if ('' != ($key = trim($key))) { + $result[$key] = ''; + } + + $key = ''; + $value = ''; + $pos = -1; + $key .= $attrs[$i]; + } + } + + return $result; + } + + /** + * 鑷姩杞藉叆绫 + * + * @param $className + */ + public static function __autoLoad($className) + { + @include_once str_replace(array('\\', '_'), '/', $className) . '.php'; + } + + /** + * 绋嬪簭鍒濆鍖栨柟娉 + * + * @access public + * @return void + */ + public static function init() + { + /** 璁剧疆鑷姩杞藉叆鍑芥暟 */ + if (function_exists('spl_autoload_register')) { + spl_autoload_register(array('Typecho_Common', '__autoLoad')); + } else { + function __autoLoad($className) { + Typecho_Common::__autoLoad($className); + } + } + + /** 鍏煎php6 */ + if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { + $_GET = self::stripslashesDeep($_GET); + $_POST = self::stripslashesDeep($_POST); + $_COOKIE = self::stripslashesDeep($_COOKIE); + + reset($_GET); + reset($_POST); + reset($_COOKIE); + } + + /** 璁剧疆寮傚父鎴幏鍑芥暟 */ + set_exception_handler(array('Typecho_Common', 'exceptionHandle')); + } + + /** + * 寮傚父鎴幏鍑芥暟 + * + * @access public + * @param Exception $exception 鎴幏鐨勫紓甯 + * @return void + */ + public static function exceptionHandle(Exception $exception) + { + @ob_end_clean(); + + if (defined('__TYPECHO_DEBUG__')) { + echo '

    ' . $exception->getMessage() . '

    '; + echo nl2br($exception->__toString()); + } else { + if (404 == $exception->getCode() && !empty(self::$exceptionHandle)) { + $handleClass = self::$exceptionHandle; + new $handleClass($exception); + } else { + self::error($exception); + } + } + + exit; + } + + /** + * 杈撳嚭閿欒椤甸潰 + * + * @access public + * @param mixed $exception 閿欒淇℃伅 + * @return void + */ + public static function error($exception) + { + $isException = is_object($exception); + $message = ''; + + if ($isException) { + $code = $exception->getCode(); + $message = $exception->getMessage(); + } else { + $code = $exception; + } + + $charset = self::$charset; + + if ($isException && $exception instanceof Typecho_Db_Exception) { + $code = 500; + @error_log($message); + + //瑕嗙洊鍘熷閿欒淇℃伅 + $message = 'Database Server Error'; + + if ($exception instanceof Typecho_Db_Adapter_Exception) { + $code = 503; + $message = 'Error establishing a database connection'; + } else if ($exception instanceof Typecho_Db_Query_Exception) { + $message = 'Database Query Error'; + } + } else { + switch ($code) { + case 500: + $message = 'Server Error'; + break; + + case 404: + $message = 'Page Not Found'; + break; + + default: + $code = 'Error'; + break; + } + } + + + /** 璁剧疆http code */ + if (is_numeric($code) && $code > 200) { + Typecho_Response::setStatus($code); + } + + $message = nl2br($message); + + if (defined('__TYPECHO_EXCEPTION_FILE__')) { + require_once __TYPECHO_EXCEPTION_FILE__; + } else { + echo +<< + + + + {$code} + + + +
    + {$message} +
    + + +EOF; + } + + exit; + } + + /** + * 鍒ゆ柇绫绘槸鍚﹁兘琚姞杞 + * 姝ゅ嚱鏁颁細閬嶅巻鎵鏈夌殑include鐩綍, 鎵浠ヤ細鏈変竴瀹氱殑鎬ц兘娑堣, 浣嗘槸涓嶄細寰堝ぇ + * 鍙槸鎴戜滑渚濈劧寤鸿浣犲湪蹇呴』妫娴嬩竴涓被鑳藉惁琚姞杞芥椂浣跨敤瀹, 瀹冮氬父琛ㄧ幇涓轰互涓嬩袱绉嶆儏鍐 + * 1. 褰撻渶瑕佽鍔犺浇鐨勭被涓嶅瓨鍦ㄦ椂, 绯荤粺涓嶄細鍋滄杩愯 (濡傛灉浣犱笉鍒ゆ柇, 绯荤粺浼氬洜鎶涘嚭涓ラ噸閿欒鑰屽仠姝) + * 2. 浣犻渶瑕佺煡閬撳摢浜涚被鏃犳硶琚姞杞, 浠ユ彁绀轰娇鐢ㄨ + * 闄や簡浠ヤ笂鎯呭喌, 浣犳棤闇鍏虫敞閭d簺绫绘棤娉曡鍔犺浇, 鍥犱负褰撳畠浠笉瀛樺湪鏃剁郴缁熶細鑷姩鍋滄骞舵姤閿 + * + * @access public + * @param string $className 绫诲悕 + * @param string $path 鎸囧畾鐨勮矾寰勫悕绉 + * @return boolean + */ + public static function isAvailableClass($className, $path = NULL) + { + /** 鑾峰彇鎵鏈塱nclude鐩綍 */ + //澧炲姞瀹夊叏鐩綍妫娴 fix issue 106 + $dirs = array_map('realpath', array_filter(explode(PATH_SEPARATOR, get_include_path()), + array('Typecho_Common', '__safePath'))); + + $file = str_replace('_', '/', $className) . '.php'; + + if (!empty($path)) { + $path = realpath($path); + if (in_array($path, $dirs)) { + $dirs = array($path); + } else { + return false; + } + } + + foreach ($dirs as $dir) { + if (!empty($dir)) { + if (file_exists($dir . '/' . $file)) { + return true; + } + } + } + + return false; + } + + /** + * 妫娴嬫槸鍚﹀湪app engine涓婅繍琛岋紝灞忚斀鏌愪簺鍔熻兘 + * + * @static + * @access public + * @return boolean + */ + public static function isAppEngine() + { + return !empty($_SERVER['HTTP_APPNAME']) // SAE + || !!getenv('HTTP_BAE_ENV_APPID') // BAE + || !!getenv('HTTP_BAE_LOGID') // BAE 3.0 + || (ini_get('acl.app_id') && class_exists('Alibaba')) // ACE + || (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'],'Google App Engine') !== false) // GAE + ; + } + + /** + * 閫掑綊鍘绘帀鏁扮粍鍙嶆枩绾 + * + * @access public + * @param mixed $value + * @return mixed + */ + public static function stripslashesDeep($value) + { + return is_array($value) ? array_map(array('Typecho_Common', 'stripslashesDeep'), $value) : stripslashes($value); + } + + /** + * 鎶藉彇澶氱淮鏁扮粍鐨勬煇涓厓绱,缁勬垚涓涓柊鏁扮粍,浣胯繖涓暟缁勫彉鎴愪竴涓墎骞虫暟缁 + * 浣跨敤鏂规硶: + * + * 2, 'banana' => 3), array('apple' => 10, 'banana' => 12)); + * $banana = Typecho_Common::arrayFlatten($fruit, 'banana'); + * print_r($banana); + * //outputs: array(0 => 3, 1 => 12); + * ?> + * + * + * @access public + * @param array $value 琚鐞嗙殑鏁扮粍 + * @param string $key 闇瑕佹娊鍙栫殑閿 + * @return array + */ + public static function arrayFlatten(array $value, $key) + { + $result = array(); + + if ($value) { + foreach ($value as $inval) { + if (is_array($inval) && isset($inval[$key])) { + $result[] = $inval[$key]; + } else { + break; + } + } + } + + return $result; + } + + /** + * 鏍规嵁parse_url鐨勭粨鏋滈噸鏂扮粍鍚坲rl + * + * @access public + * @param array $params 瑙f瀽鍚庣殑鍙傛暟 + * @return string + */ + public static function buildUrl($params) + { + return (isset($params['scheme']) ? $params['scheme'] . '://' : NULL) + . (isset($params['user']) ? $params['user'] . (isset($params['pass']) ? ':' . $params['pass'] : NULL) . '@' : NULL) + . (isset($params['host']) ? $params['host'] : NULL) + . (isset($params['port']) ? ':' . $params['port'] : NULL) + . (isset($params['path']) ? $params['path'] : NULL) + . (isset($params['query']) ? '?' . $params['query'] : NULL) + . (isset($params['fragment']) ? '#' . $params['fragment'] : NULL); + } + + /** + * 鏍规嵁count鏁扮洰鏉ヨ緭鍑哄瓧绗 + * + * echo splitByCount(20, 10, 20, 30, 40, 50); + * + * + * @access public + * @param int $count + * @return string + */ + public static function splitByCount($count) + { + $sizes = func_get_args(); + array_shift($sizes); + + foreach ($sizes as $size) { + if ($count < $size) { + return $size; + } + } + + return 0; + } + + /** + * 鑷棴鍚坔tml淇鍑芥暟 + * 浣跨敤鏂规硶: + * + * $input = '杩欐槸涓娈佃鎴柇鐨刪tml鏂囨湰 + * + * @access public + * @param string $string 闇瑕佷慨澶嶅鐞嗙殑瀛楃涓 + * @return string + */ + public static function fixHtml($string) + { + //鍏抽棴鑷棴鍚堟爣绛 + $startPos = strrpos($string, "<"); + + if (false == $startPos) { + return $string; + } + + $trimString = substr($string, $startPos); + + if (false === strpos($trimString, ">")) { + $string = substr($string, 0, $startPos); + } + + //闈炶嚜闂悎html鏍囩鍒楄〃 + preg_match_all("/<([_0-9a-zA-Z-\:]+)\s*([^>]*)>/is", $string, $startTags); + preg_match_all("/<\/([_0-9a-zA-Z-\:]+)>/is", $string, $closeTags); + + if (!empty($startTags[1]) && is_array($startTags[1])) { + krsort($startTags[1]); + $closeTagsIsArray = is_array($closeTags[1]); + foreach ($startTags[1] as $key => $tag) { + $attrLength = strlen($startTags[2][$key]); + if ($attrLength > 0 && "/" == trim($startTags[2][$key][$attrLength - 1])) { + continue; + } + if (!empty($closeTags[1]) && $closeTagsIsArray) { + if (false !== ($index = array_search($tag, $closeTags[1]))) { + unset($closeTags[1][$index]); + continue; + } + } + $string .= ""; + } + } + + return preg_replace("/\\s*\<\/p\>/is", '

    ', $string); + } + + /** + * 鍘绘帀瀛楃涓蹭腑鐨刪tml鏍囩 + * 浣跨敤鏂规硶: + * + * $input = '
    hello'; + * $output = Typecho_Common::stripTags($input, ); + * echo $output; + * //display: 'hello' + * + * + * @access public + * @param string $html 闇瑕佸鐞嗙殑瀛楃涓 + * @param string $allowableTags 闇瑕佸拷鐣ョ殑html鏍囩 + * @return string + */ + public static function stripTags($html, $allowableTags = NULL) + { + $normalizeTags = ''; + $allowableAttributes = array(); + + if (!empty($allowableTags) && preg_match_all("/\<([_a-z0-9-]+)([^>]*)\>/is", $allowableTags, $tags)) { + $normalizeTags = '<' . implode('><', array_map('strtolower', $tags[1])) . '>'; + $attributes = array_map('trim', $tags[2]); + foreach ($attributes as $key => $val) { + $allowableAttributes[strtolower($tags[1][$key])] = + array_map('strtolower', array_keys(self::__parseAttrs($val))); + } + } + + self::$_allowableAttributes = $allowableAttributes; + $html = strip_tags($html, $normalizeTags); + $html = preg_replace_callback("/<([_a-z0-9-]+)(\s+[^>]+)?>/is", + array('Typecho_Common', '__filterAttrs'), $html); + + return $html; + } + + /** + * 杩囨护鐢ㄤ簬鎼滅储鐨勫瓧绗︿覆 + * + * @access public + * @param string $query 鎼滅储瀛楃涓 + * @return string + */ + public static function filterSearchQuery($query) + { + return str_replace('-', ' ', self::slugName($query)); + } + + /** + * 灏唘rl涓殑闈炴硶瀛楃涓 + * + * @param string $url 闇瑕佽繃婊ょ殑url + * @return string + */ + public static function safeUrl($url) + { + //~ 閽堝location鐨剎ss杩囨护, 鍥犱负鍏剁壒娈婃ф棤娉曚娇鐢╮emoveXSS鍑芥暟 + //~ fix issue 66 + $params = parse_url(str_replace(array("\r", "\n", "\t", ' '), '', $url)); + + /** 绂佹闈炴硶鐨勫崗璁烦杞 */ + if (isset($params['scheme'])) { + if (!in_array($params['scheme'], array('http', 'https'))) { + return '/'; + } + } + + /** 杩囨护瑙f瀽涓 */ + $params = array_map(array('Typecho_Common', '__removeUrlXss'), $params); + return self::buildUrl($params); + } + + /** + * 澶勭悊XSS璺ㄧ珯鏀诲嚮鐨勮繃婊ゅ嚱鏁 + * + * @author kallahar@kallahar.com + * @link http://kallahar.com/smallprojects/php_xss_filter_function.php + * @access public + * @param string $val 闇瑕佸鐞嗙殑瀛楃涓 + * @return string + */ + public static function removeXSS($val) + { + // remove all non-printable characters. CR(0a) and LF(0b) and TAB(9) are allowed + // this prevents some character re-spacing such as + // note that you have to handle splits with \n, \r, and \t later since they *are* allowed in some inputs + $val = preg_replace('/([\x00-\x08]|[\x0b-\x0c]|[\x0e-\x19])/', '', $val); + + // straight replacements, the user should never need these since they're normal characters + // this prevents like + $search = 'abcdefghijklmnopqrstuvwxyz'; + $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $search .= '1234567890!@#$%^&*()'; + $search .= '~`";:?+/={}[]-_|\'\\'; + + for ($i = 0; $i < strlen($search); $i++) { + // ;? matches the ;, which is optional + // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars + + // @ @ search for the hex values + $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ; + // @ @ 0{0,7} matches '0' zero to seven times + $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ; + } + + // now the only remaining whitespace attacks are \t, \n, and \r + $ra1 = Array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base'); + $ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload'); + $ra = array_merge($ra1, $ra2); + + $found = true; // keep replacing as long as the previous round replaced something + while ($found == true) { + $val_before = $val; + for ($i = 0; $i < sizeof($ra); $i++) { + $pattern = '/'; + for ($j = 0; $j < strlen($ra[$i]); $j++) { + if ($j > 0) { + $pattern .= '('; + $pattern .= '(&#[xX]0{0,8}([9ab]);)'; + $pattern .= '|'; + $pattern .= '|(�{0,8}([9|10|13]);)'; + $pattern .= ')*'; + } + $pattern .= $ra[$i][$j]; + } + $pattern .= '/i'; + $replacement = substr($ra[$i], 0, 2).''.substr($ra[$i], 2); // add in <> to nerf the tag + $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags + + if ($val_before == $val) { + // no replacements were made, so exit the loop + $found = false; + } + } + } + + return $val; + } + + /** + * 瀹藉瓧绗︿覆鎴瓧鍑芥暟 + * + * @access public + * @param string $str 闇瑕佹埅鍙栫殑瀛楃涓 + * @param integer $start 寮濮嬫埅鍙栫殑浣嶇疆 + * @param integer $length 闇瑕佹埅鍙栫殑闀垮害 + * @param string $trim 鎴彇鍚庣殑鎴柇鏍囩ず绗 + * @return string + */ + public static function subStr($str, $start, $length, $trim = "...") + { + if (!strlen($str)) { + return ''; + } + + $iLength = self::strLen($str) - $start; + $tLength = $length < $iLength ? ($length - self::strLen($trim)) : $length; + + if (__TYPECHO_MB_SUPPORTED__) { + $str = mb_substr($str, $start, $tLength, self::$charset); + } else { + if ('UTF-8' == strtoupper(self::$charset)) { + if (preg_match_all("/./u", $str, $matches)) { + $str = implode('', array_slice($matches[0], $start, $tLength)); + } + } else { + $str = substr($str, $start, $tLength); + } + } + + return $length < $iLength ? ($str . $trim) : $str; + } + + /** + * 鑾峰彇瀹藉瓧绗︿覆闀垮害鍑芥暟 + * + * @access public + * @param string $str 闇瑕佽幏鍙栭暱搴︾殑瀛楃涓 + * @return integer + */ + public static function strLen($str) + { + if (__TYPECHO_MB_SUPPORTED__) { + return mb_strlen($str, self::$charset); + } else { + return 'UTF-8' == strtoupper(self::$charset) + ? strlen(utf8_decode($str)) : strlen($str); + } + } + + /** + * 鑾峰彇澶у啓瀛楃涓 + * + * @param string $str + * @access public + * @return string + */ + public static function strToUpper($str) + { + if (__TYPECHO_MB_SUPPORTED__) { + return mb_strtoupper($str, self::$charset); + } else { + return 'UTF-8' == strtoupper(self::$charset) + ? preg_replace_callback("/[a-z]+/u", array('Typecho_Common', '__strToUpper'), $str) : strtoupper($str); + } + } + + /** + * 妫鏌ユ槸鍚︿负鍚堟硶鐨勭紪鐮佹暟鎹 + * + * @param string|array $str + * @return boolean + */ + public static function checkStrEncoding($str) + { + if (is_array($str)) { + return array_map(array('Typecho_Common', 'checkStrEncoding'), $str); + } + + if (__TYPECHO_MB_SUPPORTED__) { + return mb_check_encoding($str, self::$charset); + } else { + // just support utf-8 + return preg_match('//u', $str); + } + } + + /** + * 鐢熸垚缂╃暐鍚 + * + * @access public + * @param string $str 闇瑕佺敓鎴愮缉鐣ュ悕鐨勫瓧绗︿覆 + * @param string $default 榛樿鐨勭缉鐣ュ悕 + * @param integer $maxLength 缂╃暐鍚嶆渶澶ч暱搴 + * @return string + */ + public static function slugName($str, $default = NULL, $maxLength = 128) + { + $str = trim($str); + + if (!strlen($str)) { + return $default; + } + + if (__TYPECHO_MB_SUPPORTED__) { + mb_regex_encoding(self::$charset); + mb_ereg_search_init($str, "[\w" . preg_quote('_-') . "]+"); + $result = mb_ereg_search(); + $return = ''; + + if ($result) { + $regs = mb_ereg_search_getregs(); + $pos = 0; + do { + $return .= ($pos > 0 ? '-' : '') . $regs[0]; + $pos ++; + } while ($regs = mb_ereg_search_regs()); + } + + $str = $return; + } else if ('UTF-8' == strtoupper(self::$charset)) { + if (preg_match_all("/[\w" . preg_quote('_-') . "]+/u", $str, $matches)) { + $str = implode('-', $matches[0]); + } + } else { + $str = str_replace(array("'", ":", "\\", "/", '"'), "", $str); + $str = str_replace(array("+", ",", ' ', '锛', ' ', ".", "?", "=", "&", "!", "<", ">", "(", ")", "[", "]", "{", "}"), "-", $str); + } + + $str = trim($str, '-_'); + $str = !strlen($str) ? $default : $str; + return substr($str, 0, $maxLength); + } + + /** + * 鐢熸垚闅忔満瀛楃涓 + * + * @access public + * @param integer $length 瀛楃涓查暱搴 + * @param boolean $specialChars 鏄惁鏈夌壒娈婂瓧绗 + * @return string + */ + public static function randString($length, $specialChars = false) + { + $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + if ($specialChars) { + $chars .= '!@#$%^&*()'; + } + + $result = ''; + $max = strlen($chars) - 1; + for ($i = 0; $i < $length; $i++) { + $result .= $chars[rand(0, $max)]; + } + return $result; + } + + /** + * 瀵瑰瓧绗︿覆杩涜hash鍔犲瘑 + * + * @access public + * @param string $string 闇瑕乭ash鐨勫瓧绗︿覆 + * @param string $salt 鎵扮爜 + * @return string + */ + public static function hash($string, $salt = NULL) + { + /** 鐢熸垚闅忔満瀛楃涓 */ + $salt = empty($salt) ? self::randString(9) : $salt; + $length = strlen($string); + $hash = ''; + $last = ord($string[$length - 1]); + $pos = 0; + + /** 鍒ゆ柇鎵扮爜闀垮害 */ + if (strlen($salt) != 9) { + /** 濡傛灉涓嶆槸9鐩存帴杩斿洖 */ + return; + } + + while ($pos < $length) { + $asc = ord($string[$pos]); + $last = ($last * ord($salt[($last % $asc) % 9]) + $asc) % 95 + 32; + $hash .= chr($last); + $pos ++; + } + + return '$T$' . $salt . md5($hash); + } + + /** + * 鍒ゆ柇hash鍊兼槸鍚︾浉绛 + * + * @access public + * @param string $from 婧愬瓧绗︿覆 + * @param string $to 鐩爣瀛楃涓 + * @return boolean + */ + public static function hashValidate($from, $to) + { + if ('$T$' == substr($to, 0, 3)) { + $salt = substr($to, 3, 9); + return self::hash($from, $salt) === $to; + } else { + return md5($from) === $to; + } + } + + /** + * 灏嗚矾寰勮浆鍖栦负閾炬帴 + * + * @access public + * @param string $path 璺緞 + * @param string $prefix 鍓嶇紑 + * @return string + */ + public static function url($path, $prefix) + { + $path = (0 === strpos($path, './')) ? substr($path, 2) : $path; + return rtrim($prefix, '/') . '/' . str_replace('//', '/', ltrim($path, '/')); + } + + /** + * 鑾峰彇gravatar澶村儚鍦板潃 + * + * @param string $mail + * @param int $size + * @param string $rating + * @param string $default + * @param bool $isSecure + * @return string + */ + public static function gravatarUrl($mail, $size, $rating, $default, $isSecure = false) + { + $url = $isSecure ? 'https://secure.gravatar.com' : 'http://www.gravatar.com'; + $url .= '/avatar/'; + + if (!empty($mail)) { + $url .= md5(strtolower(trim($mail))); + } + + $url .= '?s=' . $size; + $url .= '&r=' . $rating; + $url .= '&d=' . $default; + + return $url; + } + + /** + * 缁檍avascript璧嬪煎姞鍏ユ壈鐮佽璁 + * + * @param string $value + * @return string + */ + public static function shuffleScriptVar($value) + { + $length = strlen($value); + $max = 3; + $offset = 0; + $result = array(); + $cut = array(); + + while ($length > 0) { + $len = rand(0, min($max, $length)); + $rand = "'" . self::randString(rand(1, $max)) . "'"; + + if ($len > 0) { + $val = "'" . substr($value, $offset, $len) . "'"; + $result[] = rand(0, 1) ? "//{$rand}\n{$val}" : "{$val}//{$rand}\n"; + } else { + if (rand(0, 1)) { + $result[] = rand(0, 1) ? "''///*{$rand}*/{$rand}\n" : "/* {$rand}//{$rand} */''"; + } else { + $result[] = rand(0, 1) ? "//{$rand}\n{$rand}" : "{$rand}//{$rand}\n"; + $cut[] = array($offset, strlen($rand) - 2 + $offset); + } + } + + $offset += $len; + $length -= $len; + } + + $name = '_' . self::randString(rand(3, 7)); + $cutName = '_' . self::randString(rand(3, 7)); + $var = implode('+', $result); + $cutVar = Json::encode($cut); + return "(function () { + var {$name} = {$var}, {$cutName} = {$cutVar}; + + for (var i = 0; i < {$cutName}.length; i ++) { + {$name} = {$name}.substring(0, {$cutName}[i][0]) + {$name}.substring({$cutName}[i][1]); + } + + return {$name}; +})();"; + } + + /** + * 杩囨护瀛楁鍚 + * + * @access private + * @param mixed $result + * @return array + */ + public static function filterSQLite2ColumnName($result) + { + /** 濡傛灉缁撴灉涓虹┖,鐩存帴杩斿洖 */ + if (empty($result)) { + return $result; + } + + $tResult = array(); + + /** 閬嶅巻鏁扮粍 */ + foreach ($result as $key => $val) { + /** 鎸夌偣鍒嗛殧 */ + if (false !== ($pos = strpos($key, '.'))) { + $key = substr($key, $pos + 1); + } + + $tResult[trim($key, '"')] = $val; + } + + return $tResult; + } + + /** + * 澶勭悊sqlite2鐨刣istinct count + * + * @param $sql + * @return string + */ + public static function filterSQLite2CountQuery($sql) + { + if (preg_match("/SELECT\s+COUNT\(DISTINCT\s+([^\)]+)\)\s+(AS\s+[^\s]+)?\s*FROM\s+(.+)/is", $sql, $matches)) { + return 'SELECT COUNT(' . $matches[1] . ') ' . $matches[2] . ' FROM SELECT DISTINCT ' + . $matches[1] . ' FROM ' . $matches[3]; + } + + return $sql; + } + + /** + * 鑾峰彇鍥剧墖 + * + * @access public + * @param string $fileName 鏂囦欢鍚 + * @return string + */ + public static function mimeContentType($fileName) + { + //鏀逛负骞跺垪鍒ゆ柇 + if (function_exists('mime_content_type')) { + return mime_content_type($fileName); + } + + if (function_exists('finfo_open')) { + $fInfo = @finfo_open(FILEINFO_MIME_TYPE); + + if (false !== $fInfo) { + $mimeType = finfo_file($fInfo, $fileName); + finfo_close($fInfo); + return $mimeType; + } + } + + $mimeTypes = array( + 'ez' => 'application/andrew-inset', + 'csm' => 'application/cu-seeme', + 'cu' => 'application/cu-seeme', + 'tsp' => 'application/dsptype', + 'spl' => 'application/x-futuresplash', + 'hta' => 'application/hta', + 'cpt' => 'image/x-corelphotopaint', + 'hqx' => 'application/mac-binhex40', + 'nb' => 'application/mathematica', + 'mdb' => 'application/msaccess', + 'doc' => 'application/msword', + 'dot' => 'application/msword', + 'bin' => 'application/octet-stream', + 'oda' => 'application/oda', + 'ogg' => 'application/ogg', + 'prf' => 'application/pics-rules', + 'key' => 'application/pgp-keys', + 'pdf' => 'application/pdf', + 'pgp' => 'application/pgp-signature', + 'ps' => 'application/postscript', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'rss' => 'application/rss+xml', + 'rtf' => 'text/rtf', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'wp5' => 'application/wordperfect5.1', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'cdy' => 'application/vnd.cinderella', + 'mif' => 'application/x-mif', + 'xls' => 'application/vnd.ms-excel', + 'xlb' => 'application/vnd.ms-excel', + 'cat' => 'application/vnd.ms-pki.seccat', + 'stl' => 'application/vnd.ms-pki.stl', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pps' => 'application/vnd.ms-powerpoint', + 'pot' => 'application/vnd.ms-powerpoint', + 'sdc' => 'application/vnd.stardivision.calc', + 'sda' => 'application/vnd.stardivision.draw', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdp' => 'application/vnd.stardivision.impress', + 'smf' => 'application/vnd.stardivision.math', + 'sdw' => 'application/vnd.stardivision.writer', + 'vor' => 'application/vnd.stardivision.writer', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'sxc' => 'application/vnd.sun.xml.calc', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'sxd' => 'application/vnd.sun.xml.draw', + 'std' => 'application/vnd.sun.xml.draw.template', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'sis' => 'application/vnd.symbian.install', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wk' => 'application/x-123', + 'dmg' => 'application/x-apple-diskimage', + 'bcpio' => 'application/x-bcpio', + 'torrent' => 'application/x-bittorrent', + 'cdf' => 'application/x-cdf', + 'vcd' => 'application/x-cdlink', + 'pgn' => 'application/x-chess-pgn', + 'cpio' => 'application/x-cpio', + 'csh' => 'text/x-csh', + 'deb' => 'application/x-debian-package', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'wad' => 'application/x-doom', + 'dms' => 'application/x-dms', + 'dvi' => 'application/x-dvi', + 'pfa' => 'application/x-font', + 'pfb' => 'application/x-font', + 'gsf' => 'application/x-font', + 'pcf' => 'application/x-font', + 'pcf.Z' => 'application/x-font', + 'gnumeric' => 'application/x-gnumeric', + 'sgf' => 'application/x-go-sgf', + 'gcf' => 'application/x-graphing-calculator', + 'gtar' => 'application/x-gtar', + 'tgz' => 'application/x-gtar', + 'taz' => 'application/x-gtar', + 'gz' => 'application/x-gtar', + 'hdf' => 'application/x-hdf', + 'phtml' => 'application/x-httpd-php', + 'pht' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'php3' => 'application/x-httpd-php3', + 'php3p' => 'application/x-httpd-php3-preprocessed', + 'php4' => 'application/x-httpd-php4', + 'ica' => 'application/x-ica', + 'ins' => 'application/x-internet-signup', + 'isp' => 'application/x-internet-signup', + 'iii' => 'application/x-iphone', + 'jar' => 'application/x-java-archive', + 'jnlp' => 'application/x-java-jnlp-file', + 'ser' => 'application/x-java-serialized-object', + 'class' => 'application/x-java-vm', + 'js' => 'application/x-javascript', + 'chrt' => 'application/x-kchart', + 'kil' => 'application/x-killustrator', + 'kpr' => 'application/x-kpresenter', + 'kpt' => 'application/x-kpresenter', + 'skp' => 'application/x-koan', + 'skd' => 'application/x-koan', + 'skt' => 'application/x-koan', + 'skm' => 'application/x-koan', + 'ksp' => 'application/x-kspread', + 'kwd' => 'application/x-kword', + 'kwt' => 'application/x-kword', + 'latex' => 'application/x-latex', + 'lha' => 'application/x-lha', + 'lzh' => 'application/x-lzh', + 'lzx' => 'application/x-lzx', + 'frm' => 'application/x-maker', + 'maker' => 'application/x-maker', + 'frame' => 'application/x-maker', + 'fm' => 'application/x-maker', + 'fb' => 'application/x-maker', + 'book' => 'application/x-maker', + 'fbdoc' => 'application/x-maker', + 'wmz' => 'application/x-ms-wmz', + 'wmd' => 'application/x-ms-wmd', + 'com' => 'application/x-msdos-program', + 'exe' => 'application/x-msdos-program', + 'bat' => 'application/x-msdos-program', + 'dll' => 'application/x-msdos-program', + 'msi' => 'application/x-msi', + 'nc' => 'application/x-netcdf', + 'pac' => 'application/x-ns-proxy-autoconfig', + 'nwc' => 'application/x-nwc', + 'o' => 'application/x-object', + 'oza' => 'application/x-oz-application', + 'pl' => 'application/x-perl', + 'pm' => 'application/x-perl', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'crl' => 'application/x-pkcs7-crl', + 'qtl' => 'application/x-quicktimeplayer', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'shar' => 'application/x-shar', + 'swf' => 'application/x-shockwave-flash', + 'swfl' => 'application/x-shockwave-flash', + 'sh' => 'text/x-sh', + 'sit' => 'application/x-stuffit', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'tar' => 'application/x-tar', + 'tcl' => 'text/x-tcl', + 'tex' => 'text/x-tex', + 'gf' => 'application/x-tex-gf', + 'pk' => 'application/x-tex-pk', + 'texinfo' => 'application/x-texinfo', + 'texi' => 'application/x-texinfo', + '~' => 'application/x-trash', + '%' => 'application/x-trash', + 'bak' => 'application/x-trash', + 'old' => 'application/x-trash', + 'sik' => 'application/x-trash', + 't' => 'application/x-troff', + 'tr' => 'application/x-troff', + 'roff' => 'application/x-troff', + 'man' => 'application/x-troff-man', + 'me' => 'application/x-troff-me', + 'ms' => 'application/x-troff-ms', + 'ustar' => 'application/x-ustar', + 'src' => 'application/x-wais-source', + 'wz' => 'application/x-wingz', + 'crt' => 'application/x-x509-ca-cert', + 'fig' => 'application/x-xfig', + 'au' => 'audio/basic', + 'snd' => 'audio/basic', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'kar' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mpega' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'm3u' => 'audio/x-mpegurl', + 'sid' => 'audio/prs.sid', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'gsm' => 'audio/x-gsm', + 'wma' => 'audio/x-ms-wma', + 'wax' => 'audio/x-ms-wax', + 'ra' => 'audio/x-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'ram' => 'audio/x-pn-realaudio', + 'pls' => 'audio/x-scpls', + 'sd2' => 'audio/x-sd2', + 'wav' => 'audio/x-wav', + 'pdb' => 'chemical/x-pdb', + 'xyz' => 'chemical/x-xyz', + 'bmp' => 'image/x-ms-bmp', + 'gif' => 'image/gif', + 'ief' => 'image/ief', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'pcx' => 'image/pcx', + 'png' => 'image/png', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'wbmp' => 'image/vnd.wap.wbmp', + 'ras' => 'image/x-cmu-raster', + 'cdr' => 'image/x-coreldraw', + 'pat' => 'image/x-coreldrawpattern', + 'cdt' => 'image/x-coreldrawtemplate', + 'djvu' => 'image/x-djvu', + 'djv' => 'image/x-djvu', + 'ico' => 'image/x-icon', + 'art' => 'image/x-jg', + 'jng' => 'image/x-jng', + 'psd' => 'image/x-photoshop', + 'pnm' => 'image/x-portable-anymap', + 'pbm' => 'image/x-portable-bitmap', + 'pgm' => 'image/x-portable-graymap', + 'ppm' => 'image/x-portable-pixmap', + 'rgb' => 'image/x-rgb', + 'xbm' => 'image/x-xbitmap', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'igs' => 'model/iges', + 'iges' => 'model/iges', + 'msh' => 'model/mesh', + 'mesh' => 'model/mesh', + 'silo' => 'model/mesh', + 'wrl' => 'x-world/x-vrml', + 'vrml' => 'x-world/x-vrml', + 'csv' => 'text/comma-separated-values', + 'css' => 'text/css', + '323' => 'text/h323', + 'htm' => 'text/html', + 'html' => 'text/html', + 'uls' => 'text/iuls', + 'mml' => 'text/mathml', + 'asc' => 'text/plain', + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'diff' => 'text/plain', + 'rtx' => 'text/richtext', + 'sct' => 'text/scriptlet', + 'wsc' => 'text/scriptlet', + 'tm' => 'text/texmacs', + 'ts' => 'text/texmacs', + 'tsv' => 'text/tab-separated-values', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'wml' => 'text/vnd.wap.wml', + 'wmls' => 'text/vnd.wap.wmlscript', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'h++' => 'text/x-c++hdr', + 'hpp' => 'text/x-c++hdr', + 'hxx' => 'text/x-c++hdr', + 'hh' => 'text/x-c++hdr', + 'c++' => 'text/x-c++src', + 'cpp' => 'text/x-c++src', + 'cxx' => 'text/x-c++src', + 'cc' => 'text/x-c++src', + 'h' => 'text/x-chdr', + 'c' => 'text/x-csrc', + 'java' => 'text/x-java', + 'moc' => 'text/x-moc', + 'p' => 'text/x-pascal', + 'pas' => 'text/x-pascal', + '***' => 'text/x-pcs-***', + 'shtml' => 'text/x-server-parsed-html', + 'etx' => 'text/x-setext', + 'tk' => 'text/x-tcl', + 'ltx' => 'text/x-tex', + 'sty' => 'text/x-tex', + 'cls' => 'text/x-tex', + 'vcs' => 'text/x-vcalendar', + 'vcf' => 'text/x-vcard', + 'dl' => 'video/dl', + 'fli' => 'video/fli', + 'gl' => 'video/gl', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'mxu' => 'video/vnd.mpegurl', + 'dif' => 'video/x-dv', + 'dv' => 'video/x-dv', + 'lsf' => 'video/x-la-asf', + 'lsx' => 'video/x-la-asf', + 'mng' => 'video/x-mng', + 'asf' => 'video/x-ms-asf', + 'asx' => 'video/x-ms-asf', + 'wm' => 'video/x-ms-wm', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wvx' => 'video/x-ms-wvx', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'ice' => 'x-conference/x-cooltalk', + 'vrm' => 'x-world/x-vrml', + 'rar' => 'application/x-rar-compressed', + 'cab' => 'application/vnd.ms-cab-compressed' + ); + + $part = explode('.', $fileName); + $size = count($part); + + if ($size > 1) { + $ext = $part[$size - 1]; + if (isset($mimeTypes[$ext])) { + return $mimeTypes[$ext]; + } + } + + return 'application/octet-stream'; + } + + /** + * 瀵绘壘鍖归厤鐨刴ime鍥炬爣 + * + * @access public + * @param string $mime mime绫诲瀷 + * @return string + */ + public static function mimeIconType($mime) + { + $parts = explode('/', $mime); + + if (count($parts) < 2) { + return 'unknown'; + } + + list ($type, $stream) = $parts; + + if (in_array($type, array('image', 'video', 'audio', 'text', 'application'))) { + switch (true) { + case in_array($stream, array('msword', 'msaccess', 'ms-powerpoint', 'ms-powerpoint')): + case 0 === strpos($stream, 'vnd.'): + return 'office'; + case false !== strpos($stream, 'html') || false !== strpos($stream, 'xml') || false !== strpos($stream, 'wml'): + return 'html'; + case false !== strpos($stream, 'compressed') || false !== strpos($stream, 'zip') || + in_array($stream, array('application/x-gtar', 'application/x-tar')): + return 'archive'; + case 'text' == $type && 0 === strpos($stream, 'x-'): + return 'script'; + default: + return $type; + } + } else { + return 'unknown'; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Config.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Config.php" new file mode 100644 index 0000000..0e58fc7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Config.php" @@ -0,0 +1,198 @@ +setDefault($config); + } + + /** + * 宸ュ巶妯″紡瀹炰緥鍖栦竴涓綋鍓嶉厤缃 + * + * @access public + * @param array $config 閰嶇疆鍒楄〃 + * @return Typecho_Config + */ + public static function factory($config = array()) + { + return new Typecho_Config($config); + } + + /** + * 璁剧疆榛樿鐨勯厤缃 + * + * @access public + * @param mixed $config 閰嶇疆淇℃伅 + * @param boolean $replace 鏄惁鏇挎崲宸茬粡瀛樺湪鐨勪俊鎭 + * @return void + */ + public function setDefault($config, $replace = false) + { + if (empty($config)) { + return; + } + + /** 鍒濆鍖栧弬鏁 */ + if (is_string($config)) { + parse_str($config, $params); + } else { + $params = $config; + } + + /** 璁剧疆榛樿鍙傛暟 */ + foreach ($params as $name => $value) { + if ($replace || !array_key_exists($name, $this->_currentConfig)) { + $this->_currentConfig[$name] = $value; + } + } + } + + /** + * 閲嶈鎸囬拡 + * + * @access public + * @return void + */ + public function rewind() + { + reset($this->_currentConfig); + } + + /** + * 杩斿洖褰撳墠鍊 + * + * @access public + * @return mixed + */ + public function current() + { + return current($this->_currentConfig); + } + + /** + * 鎸囬拡鍚庣Щ涓浣 + * + * @access public + * @return void + */ + public function next() + { + next($this->_currentConfig); + } + + /** + * 鑾峰彇褰撳墠鎸囬拡 + * + * @access public + * @return mixed + */ + public function key() + { + return key($this->_currentConfig); + } + + /** + * 楠岃瘉褰撳墠鍊兼槸鍚﹀埌杈炬渶鍚 + * + * @access public + * @return boolean + */ + public function valid() + { + return false !== $this->current(); + } + + /** + * 榄旀湳鍑芥暟鑾峰彇涓涓厤缃 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @return mixed + */ + public function __get($name) + { + return isset($this->_currentConfig[$name]) ? $this->_currentConfig[$name] : NULL; + } + + /** + * 榄旀湳鍑芥暟璁剧疆涓涓厤缃 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @param mixed $value 閰嶇疆鍊 + * @return void + */ + public function __set($name, $value) + { + $this->_currentConfig[$name] = $value; + } + + /** + * 鐩存帴杈撳嚭榛樿閰嶇疆鍊 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @param array $args 鍙傛暟 + * @return void + */ + public function __call($name, $args) + { + echo $this->_currentConfig[$name]; + } + + /** + * 鍒ゆ柇褰撳墠閰嶇疆鍊兼槸鍚﹀瓨鍦 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @return boolean + */ + public function __isSet($name) + { + return isset($this->_currentConfig[$name]); + } + + /** + * 榄旀湳鏂规硶,鎵撳嵃褰撳墠閰嶇疆鏁扮粍 + * + * @access public + * @return string + */ + public function __toString() + { + return serialize($this->_currentConfig); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Cookie.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Cookie.php" new file mode 100644 index 0000000..8c5e59e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Cookie.php" @@ -0,0 +1,124 @@ +timeStamp = $gmtTime + (self::$timezoneOffset - self::$serverTimezoneOffset); + } + + /** + * 璁剧疆褰撳墠鏈熸湜鐨勬椂鍖哄亸绉 + * + * @access public + * @param integer $offset + * @return void + */ + public static function setTimezoneOffset($offset) + { + self::$timezoneOffset = $offset; + self::$serverTimezoneOffset = idate('Z'); + } + + /** + * 鑾峰彇鏍煎紡鍖栨椂闂 + * + * @access public + * @param string $format 鏃堕棿鏍煎紡 + * @return string + */ + public function format($format) + { + return date($format, $this->timeStamp); + } + + /** + * 鑾峰彇鍥介檯鍖栧亸绉绘椂闂 + * + * @access public + * @return string + */ + public function word() + { + return Typecho_I18n::dateWord($this->timeStamp, self::gmtTime() + (self::$timezoneOffset - self::$serverTimezoneOffset)); + } + + /** + * 鑾峰彇鍗曢」鏁版嵁 + * + * @access public + * @param string $name 鍚嶇О + * @return integer + */ + public function __get($name) + { + switch ($name) { + case 'year': + return date('Y', $this->timeStamp); + case 'month': + return date('m', $this->timeStamp); + case 'day': + return date('d', $this->timeStamp); + default: + return; + } + } + + /** + * 鑾峰彇GMT鏃堕棿 + * + * @access public + * @return integer + */ + public static function gmtTime() + { + return self::$gmtTimeStamp ? self::$gmtTimeStamp : (self::$gmtTimeStamp = @gmmktime()); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db.php" new file mode 100644 index 0000000..df6ab5e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db.php" @@ -0,0 +1,407 @@ +_adapterName = $adapterName; + + /** 鏁版嵁搴撻傞厤鍣 */ + $adapterName = 'Typecho_Db_Adapter_' . $adapterName; + + if (!call_user_func(array($adapterName, 'isAvailable'))) { + throw new Typecho_Db_Exception("Adapter {$adapterName} is not available"); + } + + $this->_prefix = $prefix; + + /** 鍒濆鍖栧唴閮ㄥ彉閲 */ + $this->_pool = array(); + $this->_connectedPool = array(); + $this->_config = array(); + + //瀹炰緥鍖栭傞厤鍣ㄥ璞 + $this->_adapter = new $adapterName(); + } + + /** + * 鑾峰彇閫傞厤鍣ㄥ悕绉 + * + * @access public + * @return string + */ + public function getAdapterName() + { + return $this->_adapterName; + } + + /** + * 鑾峰彇琛ㄥ墠缂 + * + * @access public + * @return string + */ + public function getPrefix() + { + return $this->_prefix; + } + + /** + * getConfig + * + * @access public + * @return void + */ + public function getConfig() + { + return $this->_config; + } + + /** + * 鑾峰彇SQL璇嶆硶鏋勫缓鍣ㄥ疄渚嬪寲瀵硅薄 + * + * @return Typecho_Db_Query + */ + public function sql() + { + return new Typecho_Db_Query($this->_adapter, $this->_prefix); + } + + /** + * 涓哄鏁版嵁搴撴彁渚涙敮鎸 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳疄渚 + * @param integer $op 鏁版嵁搴撴搷浣 + * @return void + */ + public function addServer($config, $op) + { + $this->_config[] = Typecho_Config::factory($config); + $key = count($this->_config) - 1; + + /** 灏嗚繛鎺ユ斁鍏ユ睜涓 */ + switch ($op) { + case self::READ: + case self::WRITE: + $this->_pool[$op][] = $key; + break; + default: + $this->_pool[self::READ][] = $key; + $this->_pool[self::WRITE][] = $key; + break; + } + } + + /** + * 璁剧疆榛樿鏁版嵁搴撳璞 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @return void + */ + public static function set(Typecho_Db $db) + { + self::$_instance = $db; + } + + /** + * 鑾峰彇鏁版嵁搴撳疄渚嬪寲瀵硅薄 + * 鐢ㄩ潤鎬佸彉閲忓瓨鍌ㄥ疄渚嬪寲鐨勬暟鎹簱瀵硅薄,鍙互淇濊瘉鏁版嵁杩炴帴浠呰繘琛屼竴娆 + * + * @return Typecho_Db + * @throws Typecho_Db_Exception + */ + public static function get() + { + if (empty(self::$_instance)) { + /** Typecho_Db_Exception */ + throw new Typecho_Db_Exception('Missing Database Object'); + } + + return self::$_instance; + } + + /** + * 閫夋嫨鏌ヨ瀛楁 + * + * @access public + * @param mixed $field 鏌ヨ瀛楁 + * @return Typecho_Db_Query + */ + public function select() + { + $args = func_get_args(); + return call_user_func_array(array($this->sql(), 'select'), $args ? $args : array('*')); + } + + /** + * 鏇存柊璁板綍鎿嶄綔(UPDATE) + * + * @param string $table 闇瑕佹洿鏂拌褰曠殑琛 + * @return Typecho_Db_Query + */ + public function update($table) + { + return $this->sql()->update($table); + } + + /** + * 鍒犻櫎璁板綍鎿嶄綔(DELETE) + * + * @param string $table 闇瑕佸垹闄よ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function delete($table) + { + return $this->sql()->delete($table); + } + + /** + * 鎻掑叆璁板綍鎿嶄綔(INSERT) + * + * @param string $table 闇瑕佹彃鍏ヨ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function insert($table) + { + return $this->sql()->insert($table); + } + + /** + * 鎵ц鏌ヨ璇彞 + * + * @param mixed $query 鏌ヨ璇彞鎴栬呮煡璇㈠璞 + * @param boolean $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鎿嶄綔鍔ㄤ綔 + * @return mixed + */ + public function query($query, $op = self::READ, $action = self::SELECT) + { + /** 鍦ㄩ傞厤鍣ㄤ腑鎵ц鏌ヨ */ + if ($query instanceof Typecho_Db_Query) { + $action = $query->getAttribute('action'); + $op = (self::UPDATE == $action || self::DELETE == $action + || self::INSERT == $action) ? self::WRITE : self::READ; + } else if (!is_string($query)) { + /** 濡傛灉query涓嶆槸瀵硅薄涔熶笉鏄瓧绗︿覆,閭d箞灏嗗叾鍒ゆ柇涓烘煡璇㈣祫婧愬彞鏌,鐩存帴杩斿洖 */ + return $query; + } + + /** 閫夋嫨杩炴帴姹 */ + if (!isset($this->_connectedPool[$op])) { + if (empty($this->_pool[$op])) { + /** Typecho_Db_Exception */ + throw new Typecho_Db_Exception('Missing Database Connection'); + } + + //鑾峰彇鐩稿簲璇绘垨鍐欐湇鍔″櫒杩炴帴姹犱腑鐨勪竴涓 + $selectConnection = rand(0, count($this->_pool[$op]) - 1); + //鑾峰彇闅忔満鑾峰緱鐨勮繛鎺ユ睜閰嶇疆 + $selectConnectionConfig = $this->_config[$this->_pool[$op][$selectConnection]]; + $selectConnectionHandle = $this->_adapter->connect($selectConnectionConfig); + $this->_connectedPool[$op] = &$selectConnectionHandle; + + } + $handle = $this->_connectedPool[$op]; + + /** 鎻愪氦鏌ヨ */ + $resource = $this->_adapter->query($query, $handle, $op, $action); + + if ($action) { + //鏍规嵁鏌ヨ鍔ㄤ綔杩斿洖鐩稿簲璧勬簮 + switch ($action) { + case self::UPDATE: + case self::DELETE: + return $this->_adapter->affectedRows($resource, $handle); + case self::INSERT: + return $this->_adapter->lastInsertId($resource, $handle); + case self::SELECT: + default: + return $resource; + } + } else { + //濡傛灉鐩存帴鎵ц鏌ヨ璇彞鍒欒繑鍥炶祫婧 + return $resource; + } + } + + /** + * 涓娆″彇鍑烘墍鏈夎 + * + * @param mixed $query 鏌ヨ瀵硅薄 + * @param array $filter 琛岃繃婊ゅ櫒鍑芥暟,灏嗘煡璇㈢殑姣忎竴琛屼綔涓虹涓涓弬鏁颁紶鍏ユ寚瀹氱殑杩囨护鍣ㄤ腑 + * @return array + */ + public function fetchAll($query, array $filter = NULL) + { + //鎵ц鏌ヨ + $resource = $this->query($query, self::READ); + $result = array(); + + /** 鍙栧嚭杩囨护鍣 */ + if (!empty($filter)) { + list($object, $method) = $filter; + } + + //鍙栧嚭姣忎竴琛 + while ($rows = $this->_adapter->fetch($resource)) { + //鍒ゆ柇鏄惁鏈夎繃婊ゅ櫒 + $result[] = $filter ? call_user_func(array(&$object, $method), $rows) : $rows; + } + + return $result; + } + + /** + * 涓娆″彇鍑轰竴琛 + * + * @param mixed $query 鏌ヨ瀵硅薄 + * @param array $filter 琛岃繃婊ゅ櫒鍑芥暟,灏嗘煡璇㈢殑姣忎竴琛屼綔涓虹涓涓弬鏁颁紶鍏ユ寚瀹氱殑杩囨护鍣ㄤ腑 + * @return stdClass + */ + public function fetchRow($query, array $filter = NULL) + { + $resource = $this->query($query, self::READ); + + /** 鍙栧嚭杩囨护鍣 */ + if ($filter) { + list($object, $method) = $filter; + } + + return ($rows = $this->_adapter->fetch($resource)) ? + ($filter ? $object->$method($rows) : $rows) : + array(); + } + + /** + * 涓娆″彇鍑轰竴涓璞 + * + * @param mixed $query 鏌ヨ瀵硅薄 + * @param array $filter 琛岃繃婊ゅ櫒鍑芥暟,灏嗘煡璇㈢殑姣忎竴琛屼綔涓虹涓涓弬鏁颁紶鍏ユ寚瀹氱殑杩囨护鍣ㄤ腑 + * @return array + */ + public function fetchObject($query, array $filter = NULL) + { + $resource = $this->query($query, self::READ); + + /** 鍙栧嚭杩囨护鍣 */ + if ($filter) { + list($object, $method) = $filter; + } + + return ($rows = $this->_adapter->fetchObject($resource)) ? + ($filter ? $object->$method($rows) : $rows) : + new stdClass(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter.php" new file mode 100644 index 0000000..63170c8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter.php" @@ -0,0 +1,104 @@ +_dbLink = @mysql_connect($config->host . (empty($config->port) ? '' : ':' . $config->port), + $config->user, $config->password, true)) { + if (@mysql_select_db($config->database, $this->_dbLink)) { + if ($config->charset) { + mysql_query("SET NAMES '{$config->charset}'", $this->_dbLink); + } + return $this->_dbLink; + } + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception(@mysql_error($this->_dbLink)); + } + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query 鏁版嵁搴撴煡璇QL瀛楃涓 + * @param mixed $handle 杩炴帴瀵硅薄 + * @param integer $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鏁版嵁搴撳姩浣 + * @throws Typecho_Db_Exception + * @return resource + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + if ($resource = @mysql_query($query instanceof Typecho_Db_Query ? $query->__toString() : $query, $handle)) { + return $resource; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Query_Exception(@mysql_error($this->_dbLink), mysql_errno($this->_dbLink)); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return mysql_fetch_assoc($resource); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return mysql_fetch_object($resource); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . str_replace(array('\'', '\\'), array('\'\'', '\\\\'), $string) . '\''; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '`' . $string . '`'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return mysql_affected_rows($handle); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + return mysql_insert_id($handle); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" new file mode 100644 index 0000000..c19eff7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" @@ -0,0 +1,173 @@ +_object = $this->init($config); + $this->_object->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + return $this->_object; + } catch (PDOException $e) { + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception($e->getMessage()); + } + } + + /** + * 鍒濆鍖栨暟鎹簱 + * + * @param Typecho_Config $config 鏁版嵁搴撻厤缃 + * @abstract + * @access public + * @return PDO + */ + abstract public function init(Typecho_Config $config); + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query 鏁版嵁搴撴煡璇QL瀛楃涓 + * @param mixed $handle 杩炴帴瀵硅薄 + * @param integer $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鏁版嵁搴撳姩浣 + * @throws Typecho_Db_Exception + * @return resource + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + try { + $isQueryObject = $query instanceof Typecho_Db_Query; + $this->_lastTable = $isQueryObject ? $query->getAttribute('table') : NULL; + $resource = $handle->prepare($isQueryObject ? $query->__toString() : $query); + $resource->execute(); + } catch (PDOException $e) { + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Query_Exception($e->getMessage(), $e->getCode()); + } + + return $resource; + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return $resource->fetch(PDO::FETCH_ASSOC); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return $resource->fetchObject(); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return $this->_object->quote($string); + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string){} + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql){} + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return $resource->rowCount(); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + return $handle->lastInsertId(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" new file mode 100644 index 0000000..cf8269d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" @@ -0,0 +1,90 @@ +dsn) ? $config->dsn : + "mysql:dbname={$config->database};host={$config->host};port={$config->port}", $config->user, $config->password); + $pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); + $pdo->exec("SET NAMES '{$config->charset}'"); + return $pdo; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '`' . $string . '`'; + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . str_replace(array('\'', '\\'), array('\'\'', '\\\\'), $string) . '\''; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" new file mode 100644 index 0000000..90ca1c8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" @@ -0,0 +1,94 @@ +database};host={$config->host};port={$config->port}", $config->user, $config->password); + $pdo->exec("SET NAMES '{$config->charset}'"); + return $pdo; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + /** 鏌ョ湅鏄惁瀛樺湪搴忓垪,鍙兘闇瑕佹洿涓ユ牸鐨勬鏌 */ + if ($handle->query('SELECT oid FROM pg_class WHERE relname = ' . $this->quoteValue($this->_lastTable . '_seq'))->fetchAll()) { + return $handle->lastInsertId($this->_lastTable . '_seq'); + } + + return 0; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" new file mode 100644 index 0000000..b1f5c70 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" @@ -0,0 +1,106 @@ +file}"); + $this->_isSQLite2 = version_compare($pdo->getAttribute(PDO::ATTR_SERVER_VERSION), '3.0.0', '<'); + return $pdo; + } + + /** + * @param resource $resource + * @return array + */ + public function fetch($resource) + { + return Typecho_Common::filterSQLite2ColumnName(parent::fetch($resource)); + } + + /** + * @param resource $resource + * @return object + */ + public function fetchObject($resource) + { + return (object) $this->fetch($resource); + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + $query = 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + + if ($this->_isSQLite2) { + $query = Typecho_Common::filterSQLite2CountQuery($query); + } + + return $query; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" new file mode 100644 index 0000000..e711f4d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" @@ -0,0 +1,184 @@ +_dbLink = @pg_connect("host={$config->host} port={$config->port} dbname={$config->database} user={$config->user} password={$config->password}")) { + if ($config->charset) { + pg_query($this->_dbLink, "SET NAMES '{$config->charset}'"); + } + return $this->_dbLink; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception(@pg_last_error($this->_dbLink)); + } + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query 鏁版嵁搴撴煡璇QL瀛楃涓 + * @param mixed $handle 杩炴帴瀵硅薄 + * @param integer $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鏁版嵁搴撳姩浣 + * @throws Typecho_Db_Exception + * @return resource + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + $isQueryObject = $query instanceof Typecho_Db_Query; + $this->_lastTable = $isQueryObject ? $query->getAttribute('table') : NULL; + if ($resource = @pg_query($handle, $isQueryObject ? $query->__toString() : $query)) { + return $resource; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Query_Exception(@pg_last_error($this->_dbLink), + pg_result_error_field(pg_get_result($this->_dbLink), PGSQL_DIAG_SQLSTATE)); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return pg_fetch_assoc($resource); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return pg_fetch_object($resource); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . pg_escape_string($string) . '\''; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return pg_affected_rows($resource); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + /** 鏌ョ湅鏄惁瀛樺湪搴忓垪,鍙兘闇瑕佹洿涓ユ牸鐨勬鏌 */ + if (pg_fetch_assoc(pg_query($handle, 'SELECT oid FROM pg_class WHERE relname = ' . $this->quoteValue($this->_lastTable . '_seq')))) { + return pg_fetch_result(pg_query($handle, 'SELECT CURRVAL(' . $this->quoteValue($this->_lastTable . '_seq') . ')'), 0, 0); + } + + return 0; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" new file mode 100644 index 0000000..5378191 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" @@ -0,0 +1,166 @@ +_dbHandle = sqlite_open($config->file, 0666, $error)) { + return $this->_dbHandle; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception($error); + } + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query + * @param mixed $handle + * @param int $op + * @param null $action + * @return resource|SQLiteResult + * @throws Typecho_Db_Query_Exception + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + if ($resource = @sqlite_query($query instanceof Typecho_Db_Query ? $query->__toString() : $query, $handle)) { + return $resource; + } + + /** 鏁版嵁搴撳紓甯 */ + $errorCode = sqlite_last_error($this->_dbHandle); + throw new Typecho_Db_Query_Exception(sqlite_error_string($errorCode), $errorCode); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return Typecho_Common::filterSQLite2ColumnName(sqlite_fetch_array($resource, SQLITE_ASSOC)); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return (object) $this->fetch($resource); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . str_replace('\'', '\'\'', $string) . '\''; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return Typecho_Common::filterSQLite2CountQuery('SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return sqlite_changes($handle); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + return sqlite_last_insert_rowid($handle); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Exception.php" new file mode 100644 index 0000000..460c70c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Exception.php" @@ -0,0 +1,17 @@ +select('posts', 'post_id, post_title') + * ->where('post_id = %d', 1) + * ->limit(1); + * echo $query; + * 鎵撳嵃鐨勭粨鏋滃皢鏄 + * SELECT post_id, post_title FROM posts WHERE 1=1 AND post_id = 1 LIMIT 1 + * + * + * @package Db + */ +class Typecho_Db_Query +{ + /** 鏁版嵁搴撳叧閿瓧 */ + const KEYWORDS = '*PRIMARY|AND|OR|LIKE|BINARY|BY|DISTINCT|AS|IN|IS|NULL'; + + /** + * 榛樿瀛楁 + * + * @var array + * @access private + */ + private static $_default = array( + 'action' => NULL, + 'table' => NULL, + 'fields' => '*', + 'join' => array(), + 'where' => NULL, + 'limit' => NULL, + 'offset' => NULL, + 'order' => NULL, + 'group' => NULL, + 'having' => NULL, + 'rows' => array(), + ); + + /** + * 鏁版嵁搴撻傞厤鍣 + * + * @var Typecho_Db_Adapter + */ + private $_adapter; + + /** + * 鏌ヨ璇彞棰勭粨鏋,鐢辨暟缁勬瀯鎴,鏂逛究缁勫悎涓篠QL鏌ヨ瀛楃涓 + * + * @var array + */ + private $_sqlPreBuild; + + /** + * 鍓嶇紑 + * + * @access private + * @var string + */ + private $_prefix; + + /** + * 鏋勯犲嚱鏁,寮曠敤鏁版嵁搴撻傞厤鍣ㄤ綔涓哄唴閮ㄦ暟鎹 + * + * @param Typecho_Db_Adapter $adapter 鏁版嵁搴撻傞厤鍣 + * @param string $prefix 鍓嶇紑 + * @return void + */ + public function __construct(Typecho_Db_Adapter $adapter, $prefix) + { + $this->_adapter = &$adapter; + $this->_prefix = $prefix; + + $this->_sqlPreBuild = self::$_default; + } + + /** + * 杩囨护琛ㄥ墠缂,琛ㄥ墠缂鐢眛able.鏋勬垚 + * + * @param string $string 闇瑕佽В鏋愮殑瀛楃涓 + * @return string + */ + private function filterPrefix($string) + { + return (0 === strpos($string, 'table.')) ? substr_replace($string, $this->_prefix, 0, 6) : $string; + } + + /** + * 杩囨护鏁扮粍閿 + * + * @access private + * @param string $str 寰呭鐞嗗瓧娈靛 + * @return string + */ + private function filterColumn($str) + { + $str = $str . ' 0'; + $length = strlen($str); + $lastIsAlnum = false; + $result = ''; + $word = ''; + $split = ''; + $quotes = 0; + + for ($i = 0; $i < $length; $i ++) { + $cha = $str[$i]; + + if (ctype_alnum($cha) || false !== strpos('_*', $cha)) { + if (!$lastIsAlnum) { + if ($quotes > 0 && !ctype_digit($word) && '.' != $split + && false === strpos(self::KEYWORDS, strtoupper($word))) { + $word = $this->_adapter->quoteColumn($word); + } else if ('.' == $split && 'table' == $word) { + $word = $this->_prefix; + $split = ''; + } + + $result .= $word . $split; + $word = ''; + $quotes = 0; + } + + $word .= $cha; + $lastIsAlnum = true; + } else { + + if ($lastIsAlnum) { + + if (0 == $quotes) { + if (false !== strpos(' ,)=<>.+-*/', $cha)) { + $quotes = 1; + } else if ('(' == $cha) { + $quotes = -1; + } + } + + $split = ''; + } + + $split .= $cha; + $lastIsAlnum = false; + } + + } + + return $result; + } + + /** + * 浠庡弬鏁颁腑鍚堟垚鏌ヨ瀛楁 + * + * @access private + * @param array $parameters + * @return string + */ + private function getColumnFromParameters(array $parameters) + { + $fields = array(); + + foreach ($parameters as $value) { + if (is_array($value)) { + foreach ($value as $key => $val) { + $fields[] = $key . ' AS ' . $val; + } + } else { + $fields[] = $value; + } + } + + return $this->filterColumn(implode(' , ', $fields)); + } + + /** + * 杞箟鍙傛暟 + * + * @param array $values + * @access protected + * @return array + */ + protected function quoteValues(array $values) + { + foreach ($values as &$value) { + if (is_array($value)) { + $value = '(' . implode(',', array_map(array($this->_adapter, 'quoteValue'), $value)) . ')'; + } else { + $value = $this->_adapter->quoteValue($value); + } + } + + return $values; + } + + /** + * set default params + * + * @param array $default + */ + public static function setDefault(array $default) + { + self::$_default = array_merge(self::$_default, $default); + } + + /** + * 鑾峰彇鏌ヨ瀛椾覆灞炴у + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return string + */ + public function getAttribute($attributeName) + { + return isset($this->_sqlPreBuild[$attributeName]) ? $this->_sqlPreBuild[$attributeName] : NULL; + } + + /** + * 娓呴櫎鏌ヨ瀛椾覆灞炴у + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return Typecho_Db_Query + */ + public function cleanAttribute($attributeName) + { + if (isset($this->_sqlPreBuild[$attributeName])) { + $this->_sqlPreBuild[$attributeName] = self::$_default[$attributeName]; + } + return $this; + } + + /** + * 杩炴帴琛 + * + * @param string $table 闇瑕佽繛鎺ョ殑琛 + * @param string $condition 杩炴帴鏉′欢 + * @param string $op 杩炴帴鏂规硶(LEFT, RIGHT, INNER) + * @return Typecho_Db_Query + */ + public function join($table, $condition, $op = Typecho_Db::INNER_JOIN) + { + $this->_sqlPreBuild['join'][] = array($this->filterPrefix($table), $this->filterColumn($condition), $op); + return $this; + } + + /** + * AND鏉′欢鏌ヨ璇彞 + * + * @param string $condition 鏌ヨ鏉′欢 + * @param mixed $param 鏉′欢鍊 + * @return Typecho_Db_Query + */ + public function where() + { + $condition = func_get_arg(0); + $condition = str_replace('?', "%s", $this->filterColumn($condition)); + $operator = empty($this->_sqlPreBuild['where']) ? ' WHERE ' : ' AND'; + + if (func_num_args() <= 1) { + $this->_sqlPreBuild['where'] .= $operator . ' (' . $condition . ')'; + } else { + $args = func_get_args(); + array_shift($args); + $this->_sqlPreBuild['where'] .= $operator . ' (' . vsprintf($condition, $this->quoteValues($args)) . ')'; + } + + return $this; + } + + /** + * OR鏉′欢鏌ヨ璇彞 + * + * @param string $condition 鏌ヨ鏉′欢 + * @param mixed $param 鏉′欢鍊 + * @return Typecho_Db_Query + */ + public function orWhere() + { + $condition = func_get_arg(0); + $condition = str_replace('?', "%s", $this->filterColumn($condition)); + $operator = empty($this->_sqlPreBuild['where']) ? ' WHERE ' : ' OR'; + + if (func_num_args() <= 1) { + $this->_sqlPreBuild['where'] .= $operator . ' (' . $condition . ')'; + } else { + $args = func_get_args(); + array_shift($args); + $this->_sqlPreBuild['where'] .= $operator . ' (' . vsprintf($condition, $this->quoteValues($args)) . ')'; + } + + return $this; + } + + /** + * 鏌ヨ琛屾暟闄愬埗 + * + * @param integer $limit 闇瑕佹煡璇㈢殑琛屾暟 + * @return Typecho_Db_Query + */ + public function limit($limit) + { + $this->_sqlPreBuild['limit'] = intval($limit); + return $this; + } + + /** + * 鏌ヨ琛屾暟鍋忕Щ閲 + * + * @param integer $offset 闇瑕佸亸绉荤殑琛屾暟 + * @return Typecho_Db_Query + */ + public function offset($offset) + { + $this->_sqlPreBuild['offset'] = intval($offset); + return $this; + } + + /** + * 鍒嗛〉鏌ヨ + * + * @param integer $page 椤垫暟 + * @param integer $pageSize 姣忛〉琛屾暟 + * @return Typecho_Db_Query + */ + public function page($page, $pageSize) + { + $pageSize = intval($pageSize); + $this->_sqlPreBuild['limit'] = $pageSize; + $this->_sqlPreBuild['offset'] = (max(intval($page), 1) - 1) * $pageSize; + return $this; + } + + /** + * 鎸囧畾闇瑕佸啓鍏ョ殑鏍忕洰鍙婂叾鍊 + * + * @param array $rows + * @return Typecho_Db_Query + */ + public function rows(array $rows) + { + foreach ($rows as $key => $row) { + $this->_sqlPreBuild['rows'][$this->filterColumn($key)] = is_null($row) ? 'NULL' : $this->_adapter->quoteValue($row); + } + return $this; + } + + /** + * 鎸囧畾闇瑕佸啓鍏ユ爮鐩強鍏跺 + * 鍗曡涓斾笉浼氳浆涔夊紩鍙 + * + * @param string $key 鏍忕洰鍚嶇О + * @param mixed $value 鎸囧畾鐨勫 + * @param bool $escape 鏄惁杞箟 + * @return Typecho_Db_Query + */ + public function expression($key, $value, $escape = true) + { + $this->_sqlPreBuild['rows'][$this->filterColumn($key)] = $escape ? $this->filterColumn($value) : $value; + return $this; + } + + /** + * 鎺掑簭椤哄簭(ORDER BY) + * + * @param string $orderby 鎺掑簭鐨勭储寮 + * @param string $sort 鎺掑簭鐨勬柟寮(ASC, DESC) + * @return Typecho_Db_Query + */ + public function order($orderby, $sort = Typecho_Db::SORT_ASC) + { + $this->_sqlPreBuild['order'] = ' ORDER BY ' . $this->filterColumn($orderby) . (empty($sort) ? NULL : ' ' . $sort); + return $this; + } + + /** + * 闆嗗悎鑱氶泦(GROUP BY) + * + * @param string $key 鑱氶泦鐨勯敭鍊 + * @return Typecho_Db_Query + */ + public function group($key) + { + $this->_sqlPreBuild['group'] = ' GROUP BY ' . $this->filterColumn($key); + return $this; + } + + /** + * HAVING (HAVING) + * + * @return Typecho_Db_Query + */ + public function having() + { + $condition = func_get_arg(0); + $condition = str_replace('?', "%s", $this->filterColumn($condition)); + $operator = empty($this->_sqlPreBuild['having']) ? ' HAVING ' : ' AND'; + + if (func_num_args() <= 1) { + $this->_sqlPreBuild['having'] .= $operator . ' (' . $condition . ')'; + } else { + $args = func_get_args(); + array_shift($args); + $this->_sqlPreBuild['having'] .= $operator . ' (' . vsprintf($condition, $this->quoteValues($args)) . ')'; + } + + return $this; + } + + /** + * 閫夋嫨鏌ヨ瀛楁 + * + * @access public + * @param mixed $field 鏌ヨ瀛楁 + * @return Typecho_Db_Query + */ + public function select($field = '*') + { + $this->_sqlPreBuild['action'] = Typecho_Db::SELECT; + $args = func_get_args(); + + $this->_sqlPreBuild['fields'] = $this->getColumnFromParameters($args); + return $this; + } + + /** + * 鏌ヨ璁板綍鎿嶄綔(SELECT) + * + * @param string $table 鏌ヨ鐨勮〃 + * @return Typecho_Db_Query + */ + public function from($table) + { + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鏇存柊璁板綍鎿嶄綔(UPDATE) + * + * @param string $table 闇瑕佹洿鏂拌褰曠殑琛 + * @return Typecho_Db_Query + */ + public function update($table) + { + $this->_sqlPreBuild['action'] = Typecho_Db::UPDATE; + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鍒犻櫎璁板綍鎿嶄綔(DELETE) + * + * @param string $table 闇瑕佸垹闄よ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function delete($table) + { + $this->_sqlPreBuild['action'] = Typecho_Db::DELETE; + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鎻掑叆璁板綍鎿嶄綔(INSERT) + * + * @param string $table 闇瑕佹彃鍏ヨ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function insert($table) + { + $this->_sqlPreBuild['action'] = Typecho_Db::INSERT; + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鏋勯犳渶缁堟煡璇㈣鍙 + * + * @return string + */ + public function __toString() + { + switch ($this->_sqlPreBuild['action']) { + case Typecho_Db::SELECT: + return $this->_adapter->parseSelect($this->_sqlPreBuild); + case Typecho_Db::INSERT: + return 'INSERT INTO ' + . $this->_sqlPreBuild['table'] + . '(' . implode(' , ', array_keys($this->_sqlPreBuild['rows'])) . ')' + . ' VALUES ' + . '(' . implode(' , ', array_values($this->_sqlPreBuild['rows'])) . ')' + . $this->_sqlPreBuild['limit']; + case Typecho_Db::DELETE: + return 'DELETE FROM ' + . $this->_sqlPreBuild['table'] + . $this->_sqlPreBuild['where']; + case Typecho_Db::UPDATE: + $columns = array(); + if (isset($this->_sqlPreBuild['rows'])) { + foreach ($this->_sqlPreBuild['rows'] as $key => $val) { + $columns[] = "$key = $val"; + } + } + + return 'UPDATE ' + . $this->_sqlPreBuild['table'] + . ' SET ' . implode(' , ', $columns) + . $this->_sqlPreBuild['where']; + default: + return NULL; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Query/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Query/Exception.php" new file mode 100644 index 0000000..4546021 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Db/Query/Exception.php" @@ -0,0 +1,17 @@ +message = $message; + $this->code = $code; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Feed.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Feed.php" new file mode 100644 index 0000000..42d0701 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Feed.php" @@ -0,0 +1,411 @@ + + * @category typecho + * @package Feed + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Feed.php 219 2008-05-27 09:06:15Z magike.net $ + */ + +/** + * Typecho_Feed + * + * @author qining + * @category typecho + * @package Feed + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Typecho_Feed +{ + /** 瀹氫箟RSS 1.0绫诲瀷 */ + const RSS1 = 'RSS 1.0'; + + /** 瀹氫箟RSS 2.0绫诲瀷 */ + const RSS2 = 'RSS 2.0'; + + /** 瀹氫箟ATOM 1.0绫诲瀷 */ + const ATOM1 = 'ATOM 1.0'; + + /** 瀹氫箟RSS鏃堕棿鏍煎紡 */ + const DATE_RFC822 = 'r'; + + /** 瀹氫箟ATOM鏃堕棿鏍煎紡 */ + const DATE_W3CDTF = 'c'; + + /** 瀹氫箟琛岀粨鏉熺 */ + const EOL = "\n"; + + /** + * feed鐘舵 + * + * @access private + * @var string + */ + private $_type; + + /** + * 瀛楃闆嗙紪鐮 + * + * @access private + * @var string + */ + private $_charset; + + /** + * 璇█鐘舵 + * + * @access private + * @var string + */ + private $_lang; + + /** + * 鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedUrl; + + /** + * 鍩烘湰鍦板潃 + * + * @access private + * @var unknown + */ + private $_baseUrl; + + /** + * 鑱氬悎鏍囬 + * + * @access private + * @var string + */ + private $_title; + + /** + * 鑱氬悎鍓爣棰 + * + * @access private + * @var string + */ + private $_subTitle; + + /** + * 鐗堟湰淇℃伅 + * + * @access private + * @var string + */ + private $_version; + + /** + * 鎵鏈夌殑items + * + * @access private + * @var array + */ + private $_items = array(); + + /** + * 鍒涘缓Feed瀵硅薄 + * + * @access public + * @return void + */ + public function __construct($version, $type = self::RSS2, $charset = 'UTF-8', $lang = 'en') + { + $this->_version = $version; + $this->_type = $type; + $this->_charset = $charset; + $this->_lang = $lang; + } + + /** + * 璁剧疆鏍囬 + * + * @access public + * @param string $title 鏍囬 + * @return void + */ + public function setTitle($title) + { + $this->_title = $title; + } + + /** + * 璁剧疆鍓爣棰 + * + * @access public + * @param string $subTitle 鍓爣棰 + * @return void + */ + public function setSubTitle($subTitle) + { + $this->_subTitle = $subTitle; + } + + /** + * 璁剧疆鑱氬悎鍦板潃 + * + * @access public + * @param string $feedUrl 鑱氬悎鍦板潃 + * @return void + */ + public function setFeedUrl($feedUrl) + { + $this->_feedUrl = $feedUrl; + } + + /** + * 璁剧疆涓婚〉 + * + * @access public + * @param string $baseUrl 涓婚〉鍦板潃 + * @return void + */ + public function setBaseUrl($baseUrl) + { + $this->_baseUrl = $baseUrl; + } + + /** + * 鑾峰彇Feed鏃堕棿鏍煎紡 + * + * @access public + * @param integer $stamp 鏃堕棿鎴 + * @return string + */ + public function dateFormat($stamp) + { + if (self::RSS2 == $this->_type) { + return date(self::DATE_RFC822, $stamp); + } else if (self::RSS1 == $this->_type || self::ATOM1 == $this->_type) { + return date(self::DATE_W3CDTF, $stamp); + } + } + + /** + * $item鐨勬牸寮忎负 + * + * array ( + * 'title' => 'xxx', + * 'content' => 'xxx', + * 'excerpt' => 'xxx', + * 'date' => 'xxx', + * 'link' => 'xxx', + * 'author' => 'xxx', + * 'comments' => 'xxx', + * 'commentsUrl'=> 'xxx', + * 'commentsFeedUrl' => 'xxx', + * ) + * + * + * @access public + * @param array $item + * @return unknown + */ + public function addItem(array $item) + { + $this->_items[] = $item; + } + + /** + * 杈撳嚭瀛楃涓 + * + * @access public + * @return string + */ + public function __toString() + { + $result = '_charset . '"?>' . self::EOL; + + if (self::RSS1 == $this->_type) { + $result .= '' . self::EOL; + + $content = ''; + $links = array(); + $lastUpdate = 0; + + foreach ($this->_items as $item) { + $content .= '' . self::EOL; + $content .= '' . htmlspecialchars($item['title']) . '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= '' . strip_tags($item['content']) . '' . self::EOL; + if (!empty($item['suffix'])) { + $content .= $item['suffix']; + } + $content .= '' . self::EOL; + + $links[] = $item['link']; + + if ($item['date'] > $lastUpdate) { + $lastUpdate = $item['date']; + } + } + + $result .= ' +' . htmlspecialchars($this->_title) . ' +' . $this->_baseUrl . ' +' . htmlspecialchars($this->_subTitle) . ' + +' . self::EOL; + + foreach ($links as $link) { + $result .= '' . self::EOL; + } + + $result .= ' + +' . self::EOL; + + $result .= $content . ''; + + } else if (self::RSS2 == $this->_type) { + $result .= ' +' . self::EOL; + + $content = ''; + $lastUpdate = 0; + + foreach ($this->_items as $item) { + $content .= '' . self::EOL; + $content .= '' . htmlspecialchars($item['title']) . '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= '' . htmlspecialchars($item['author']->screenName) . '' . self::EOL; + + if (!empty($item['category']) && is_array($item['category'])) { + foreach ($item['category'] as $category) { + $content .= '' . self::EOL; + } + } + + if (!empty($item['excerpt'])) { + $content .= '' . self::EOL; + } + + if (!empty($item['content'])) { + $content .= '' . self::EOL; + } + + if (isset($item['comments']) && strlen($item['comments']) > 0) { + $content .= '' . $item['comments'] . '' . self::EOL; + } + + $content .= '' . $item['link'] . '#comments' . self::EOL; + if (!empty($item['commentsFeedUrl'])) { + $content .= '' . $item['commentsFeedUrl'] . '' . self::EOL; + } + + if (!empty($item['suffix'])) { + $content .= $item['suffix']; + } + + $content .= '' . self::EOL; + + if ($item['date'] > $lastUpdate) { + $lastUpdate = $item['date']; + } + } + + $result .= '' . htmlspecialchars($this->_title) . ' +' . $this->_baseUrl . ' + +' . $this->_lang . ' +' . htmlspecialchars($this->_subTitle) . ' +' . $this->dateFormat($lastUpdate) . ' +' . $this->dateFormat($lastUpdate) . '' . self::EOL; + + $result .= $content . ' +'; + + } else if (self::ATOM1 == $this->_type) { + $result .= '' . self::EOL; + + $content = ''; + $lastUpdate = 0; + + foreach ($this->_items as $item) { + $content .= '' . self::EOL; + $content .= '<![CDATA[' . $item['title'] . ']]>' . self::EOL; + $content .= '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= ' + ' . $item['author']->screenName . ' + ' . $item['author']->url . ' +' . self::EOL; + + if (!empty($item['category']) && is_array($item['category'])) { + foreach ($item['category'] as $category) { + $content .= '' . self::EOL; + } + } + + if (!empty($item['excerpt'])) { + $content .= '' . self::EOL; + } + + if (!empty($item['content'])) { + $content .= '' . self::EOL; + } + + if (isset($item['comments']) && strlen($item['comments']) > 0) { + $content .= '' . self::EOL; + + if (!empty($item['commentsFeedUrl'])) { + $content .= '' . self::EOL; + } + } + + if (!empty($item['suffix'])) { + $content .= $item['suffix']; + } + + $content .= '' . self::EOL; + + if ($item['date'] > $lastUpdate) { + $lastUpdate = $item['date']; + } + } + + $result .= '' . htmlspecialchars($this->_title) . ' +' . htmlspecialchars($this->_subTitle) . ' +' . $this->dateFormat($lastUpdate) . ' +Typecho + +' . $this->_feedUrl . ' + +'; + $result .= $content . ''; + } + + return $result; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client.php" new file mode 100644 index 0000000..4d4a7cf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client.php" @@ -0,0 +1,58 @@ +method = $method; + return $this; + } + + /** + * 璁剧疆鎸囧畾鐨凜OOKIE鍊 + * + * @access public + * @param string $key 鎸囧畾鐨勫弬鏁 + * @param mixed $value 璁剧疆鐨勫 + * @return Typecho_Http_Client_Adapter + */ + public function setCookie($key, $value) + { + $this->cookies[$key] = $value; + return $this; + } + + /** + * 璁剧疆浼犻掑弬鏁 + * + * @access public + * @param mixed $query 浼犻掑弬鏁 + * @return Typecho_Http_Client_Adapter + */ + public function setQuery($query) + { + $query = is_array($query) ? http_build_query($query) : $query; + $this->query = empty($this->query) ? $query : $this->query . '&' . $query; + return $this; + } + + /** + * 璁剧疆闇瑕丳OST鐨勬暟鎹 + * + * @access public + * @param array $data 闇瑕丳OST鐨勬暟鎹 + * @return Typecho_Http_Client_Adapter + */ + public function setData($data) + { + $this->data = $data; + $this->setMethod(Typecho_Http_Client::METHOD_POST); + return $this; + } + + /** + * 璁剧疆闇瑕丳OST鐨勬枃浠 + * + * @access public + * @param array $files 闇瑕丳OST鐨勬枃浠 + * @return Typecho_Http_Client_Adapter + */ + public function setFiles(array $files) + { + $this->files = empty($this->files) ? $files : array_merge($this->files, $files); + $this->setMethod(Typecho_Http_Client::METHOD_POST); + return $this; + } + + /** + * 璁剧疆瓒呮椂鏃堕棿 + * + * @access public + * @param integer $timeout 瓒呮椂鏃堕棿 + * @return Typecho_Http_Client_Adapter + */ + public function setTimeout($timeout) + { + $this->timeout = $timeout; + return $this; + } + + /** + * 璁剧疆http鍗忚 + * + * @access public + * @param string $rfc http鍗忚 + * @return Typecho_Http_Client_Adapter + */ + public function setRfc($rfc) + { + $this->rfc = $rfc; + return $this; + } + + /** + * 璁剧疆ip鍦板潃 + * + * @access public + * @param string $ip ip鍦板潃 + * @return Typecho_Http_Client_Adapter + */ + public function setIp($ip) + { + $this->ip = $ip; + return $this; + } + + /** + * 璁剧疆澶翠俊鎭弬鏁 + * + * @access public + * @param string $key 鍙傛暟鍚嶇О + * @param string $value 鍙傛暟鍊 + * @return Typecho_Http_Client_Adapter + */ + public function setHeader($key, $value) + { + $key = str_replace(' ', '-', ucwords(str_replace('-', ' ', $key))); + $this->headers[$key] = $value; + return $this; + } + + /** + * 鍙戦佽姹 + * + * @access public + * @param string $url 璇锋眰鍦板潃 + * @param string $rfc 璇锋眰鍗忚 + * @return string + */ + public function send($url) + { + $params = parse_url($url); + + if (!empty($params['host'])) { + $this->host = $params['host']; + } else { + throw new Typecho_Http_Client_Exception('Unknown Host', 500); + } + + if (!empty($params['path'])) { + $this->path = $params['path']; + } + + $query = empty($params['query']) ? '' : $params['query']; + + if (!empty($this->query)) { + $query = empty($query) ? $this->query : '&' . $this->query; + } + + if (!empty($query)) { + $this->path .= '?' . $query; + $params['query'] = $query; + } + + $this->scheme = $params['scheme']; + $this->port = ('https' == $params['scheme']) ? 443 : 80; + $url = Typecho_Common::buildUrl($params); + + if (!empty($params['port'])) { + $this->port = $params['port']; + } + + /** 鏁寸悊cookie */ + if (!empty($this->cookies)) { + $this->setHeader('Cookie', str_replace('&', '; ', http_build_query($this->cookies))); + } + + $response = $this->httpSend($url); + + if (!$response) { + return; + } + + str_replace("\r", '', $response); + $rows = explode("\n", $response); + + $foundStatus = false; + $foundInfo = false; + $lines = array(); + + foreach ($rows as $key => $line) { + if (!$foundStatus) { + if (0 === strpos($line, "HTTP/")) { + if ('' == trim($rows[$key + 1])) { + continue; + } else { + $status = explode(' ', str_replace(' ', ' ', $line)); + $this->responseStatus = intval($status[1]); + $foundStatus = true; + } + } + } else { + if (!$foundInfo) { + if ('' != trim($line)) { + $status = explode(':', $line); + $name = strtolower(array_shift($status)); + $data = implode(':', $status); + $this->responseHeader[trim($name)] = trim($data); + } else { + $foundInfo = true; + } + } else { + $lines[] = $line; + } + } + } + + $this->responseBody = implode("\n", $lines); + return $this->responseBody; + } + + /** + * 鑾峰彇鍥炴墽鐨勫ご閮ㄤ俊鎭 + * + * @access public + * @param string $key 澶翠俊鎭悕绉 + * @return string + */ + public function getResponseHeader($key) + { + $key = strtolower($key); + return isset($this->responseHeader[$key]) ? $this->responseHeader[$key] : NULL; + } + + /** + * 鑾峰彇鍥炴墽浠g爜 + * + * @access public + * @return integer + */ + public function getResponseStatus() + { + return $this->responseStatus; + } + + /** + * 鑾峰彇鍥炴墽韬綋 + * + * @access public + * @return string + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * 闇瑕佸疄鐜扮殑璇锋眰鏂规硶 + * + * @access public + * @param string $url 璇锋眰鍦板潃 + * @return string + */ + abstract public function httpSend($url); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" new file mode 100644 index 0000000..a700915 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" @@ -0,0 +1,121 @@ +ip) { + $url = $this->scheme . '://' . $this->ip . $this->path; + $this->headers['Rfc'] = $this->method . ' ' . $this->path . ' ' . $this->rfc; + $this->headers['Host'] = $this->host; + } + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_PORT, $this->port); + curl_setopt($ch, CURLOPT_HEADER, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); + curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); + + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + + /** 璁剧疆HTTP鐗堟湰 */ + switch ($this->rfc) { + case 'HTTP/1.0': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); + break; + case 'HTTP/1.1': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + break; + default: + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_NONE); + break; + } + + /** 璁剧疆header淇℃伅 */ + if (!empty($this->headers)) { + if (isset($this->headers['User-Agent'])) { + curl_setopt($ch, CURLOPT_USERAGENT, $this->headers['User-Agent']); + unset($this->headers['User-Agent']); + } + + $headers = array(); + + if (isset($this->headers['Rfc'])) { + $headers[] = $this->headers['Rfc']; + unset($this->headers['Rfc']); + } + + foreach ($this->headers as $key => $val) { + $headers[] = $key . ': ' . $val; + } + + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + } + + /** POST妯″紡 */ + if (Typecho_Http_Client::METHOD_POST == $this->method) { + if (!isset($this->headers['content-type'])) { + curl_setopt($ch, CURLOPT_POST, true); + } + + if (!empty($this->data)) { + curl_setopt($ch, CURLOPT_POSTFIELDS, is_array($this->data) ? http_build_query($this->data) : $this->data); + } + + if (!empty($this->files)) { + foreach ($this->files as $key => &$file) { + $file = '@' . $file; + } + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->files); + } + } + + $response = curl_exec($ch); + if (false === $response) { + throw new Typecho_Http_Client_Exception(curl_error($ch), 500); + } + + curl_close($ch); + return $response; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" new file mode 100644 index 0000000..267c220 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" @@ -0,0 +1,154 @@ +method . ' ' . $this->path . ' ' . $this->rfc . $eol; + $request .= 'Host: ' . $this->host . $eol; + $request .= 'Accept: */*' . $eol; + $request .= 'Cache-Control: no-cache' . $eol; + $request .= 'Connection: Close' . $eol; + + /** 璁剧疆header淇℃伅 */ + if (!empty($this->headers)) { + foreach ($this->headers as $key => $val) { + $request .= $key . ': ' . $val . $eol; + } + } + + /** 鍙戦丳OST淇℃伅 */ + if (Typecho_Http_Client::METHOD_POST == $this->method) { + if (empty($this->files)) { + $content = is_array($this->data) ? http_build_query($this->data) : $this->data; + $request .= 'Content-Length: ' . strlen($content) . $eol; + + if (!isset($this->headers['content-type'])) { + $request .= 'Content-Type: application/x-www-form-urlencoded' . $eol; + } + + $request .= $eol; + $request .= $content; + } else { + $boundary = '---------------------------' . substr(md5(uniqid()), 0, 16); + $content = $eol . $boundary; + + if (!empty($this->data)) { + foreach ($this->data as $key => $val) { + $content .= $eol . 'Content-Disposition: form-data; name="' . $key . '"' . $eol . $eol; + $content .= $val . $eol; + $content .= $boundary; + } + } + + foreach ($this->files as $key => $file) { + $content .= $eol . 'Content-Disposition: form-data; name="' . $key . '"; filename="' . $file . '"' . $eol; + $content .= 'Content-Type: ' . mime_content_type($file) . $eol . $eol; + $content .= file_get_contents($file) . $eol; + $content .= $boundary; + } + + $content .= '--' . $eol; + $request .= 'Content-Length: ' . strlen($content) . $eol; + $request .= 'Content-Type: multipart/form-data; boundary=' . $boundary; + $request .= $eol; + $request .= $content; + } + } else { + $request .= $eol; + } + + /** 鎵撳紑杩炴帴 */ + $socket = @fsockopen($this->ip ? $this->ip : $this->host, $this->port, $errno, $errstr, $this->timeout); + if (false === $socket) { + throw new Typecho_Http_Client_Exception($errno . ':' . $errstr, 500); + } + + /** 鍙戦佹暟鎹 */ + fwrite($socket, $request); + stream_set_timeout($socket, $this->timeout); + $response = ''; + + //facebook code + while (!feof($socket)) { + $buf = fgets($socket, 4096); + + if (false === $buf || '' === $buf) { + $info = stream_get_meta_data($socket); + + //瓒呮椂鍒ゆ柇 + if ($info['timed_out']) { + throw new Typecho_Http_Client_Exception(__CLASS__ . ': timeout reading from ' . $this->host . ':' . $this->port, 500); + } else { + throw new Typecho_Http_Client_Exception(__CLASS__ . ': could not read from ' . $this->host . ':' . $this->port, 500); + } + } else if (strlen($buf) < 4096) { + $info = stream_get_meta_data($socket); + + if ($info['timed_out']) { + throw new Typecho_Http_Client_Exception(__CLASS__ . ': timeout reading from ' . $this->host . ':' . $this->port, 500); + } + } + + $response .= $buf; + } + + fclose($socket); + return $response; + } + + /** + * 鑾峰彇鍥炴墽韬綋 + * + * @access public + * @return string + */ + public function getResponseBody() + { + /** 鏀寔chunked缂栫爜 */ + if ('chunked' == $this->getResponseHeader('Transfer-Encoding')) { + $parts = explode("\r\n", $this->reponseBody, 2); + $counter = hexdec($parts[0]); + $this->reponseBody = substr($parts[1], 0, $counter); + } + + return $this->reponseBody; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Exception.php" new file mode 100644 index 0000000..f79b63a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Http/Client/Exception.php" @@ -0,0 +1,17 @@ +translate($string) : $string; + } + + /** + * 閽堝澶嶆暟褰㈠紡鐨勭炕璇戝嚱鏁 + * + * @param string $single 鍗曟暟褰㈠紡鐨勭炕璇 + * @param string $plural 澶嶆暟褰㈠紡鐨勭炕璇 + * @param integer $number 鏁板瓧 + * @return string + */ + public static function ngettext($single, $plural, $number) + { + self::init(); + return self::$_lang ? self::$_loaded->ngettext($single, $plural, $number) : ($number > 1 ? $plural : $single); + } + + /** + * 璇嶄箟鍖栨椂闂 + * + * @access public + * @param string $from 璧峰鏃堕棿 + * @param string $now 缁堟鏃堕棿 + * @return string + */ + public static function dateWord($from, $now) + { + $between = $now - $from; + + /** 濡傛灉鏄竴澶 */ + if ($between >= 0 && $between < 86400 && date('d', $from) == date('d', $now)) { + /** 濡傛灉鏄竴灏忔椂 */ + if ($between < 3600) { + /** 濡傛灉鏄竴鍒嗛挓 */ + if ($between < 60) { + if (0 == $between) { + return _t('鍒氬垰'); + } else { + return str_replace('%d', $between, _n('涓绉掑墠', '%d绉掑墠', $between)); + } + } + + $min = floor($between / 60); + return str_replace('%d', $min, _n('涓鍒嗛挓鍓', '%d鍒嗛挓鍓', $min)); + } + + $hour = floor($between / 3600); + return str_replace('%d', $hour, _n('涓灏忔椂鍓', '%d灏忔椂鍓', $hour)); + } + + /** 濡傛灉鏄槰澶 */ + if ($between > 0 && $between < 172800 + && (date('z', $from) + 1 == date('z', $now) // 鍦ㄥ悓涓骞寸殑鎯呭喌 + || date('z', $from) + 1 == date('L') + 365 + date('z', $now))) { // 璺ㄥ勾鐨勬儏鍐 + return _t('鏄ㄥぉ %s', date('H:i', $from)); + } + + /** 濡傛灉鏄竴涓槦鏈 */ + if ($between > 0 && $between < 604800) { + $day = floor($between / 86400); + return str_replace('%d', $day, _n('涓澶╁墠', '%d澶╁墠', $day)); + } + + /** 濡傛灉鏄 */ + if (date('Y', $from) == date('Y', $now)) { + return date(_t('n鏈坖鏃'), $from); + } + + return date(_t('Y骞磎鏈坉鏃'), $from); + } + + /** + * 璁剧疆璇█椤 + * + * @access public + * @param string $lang 閰嶇疆淇℃伅 + * @return void + */ + public static function setLang($lang) + { + self::$_lang = $lang; + } + + /** + * 澧炲姞璇█椤 + * + * @access public + * @param string $lang 璇█鍚嶇О + * @return void + */ + public static function addLang($lang) + { + self::$_loaded->addFile($lang); + } + + /** + * 鑾峰彇璇█椤 + * + * @access public + * @return void + */ + public static function getLang() + { + return self::$_lang; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetText.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetText.php" new file mode 100644 index 0000000..2b45503 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetText.php" @@ -0,0 +1,393 @@ +. + Copyright (c) 2005 Nico Kaiser + + This file is part of PHP-gettext. + + PHP-gettext is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHP-gettext is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + */ + +/** + * Provides a simple gettext replacement that works independently from + * the system's gettext abilities. + * It can read MO files and use them for translating strings. + * The files are passed to gettext_reader as a Stream (see streams.php) + * + * This version has the ability to cache all strings and translations to + * speed up the string lookup. + * While the cache is enabled by default, it can be switched off with the + * second parameter in the constructor (e.g. whenusing very large MO files + * that you don't want to keep in memory) + */ + +//reload by 70 (typecho group) +/** + * This file is part of PHP-gettext + * + * @author Danilo Segan , Nico Kaiser + * @category typecho + * @package I18n + */ +class Typecho_I18n_GetText +{ + //public: + public $error = 0; // public variable that holds error code (0 if no error) + + //private: + private $BYTEORDER = 0; // 0: low endian, 1: big endian + private $STREAM = NULL; + private $short_circuit = false; + private $enable_cache = false; + private $originals = NULL; // offset of original table + private $translations = NULL; // offset of translation table + private $pluralheader = NULL; // cache header field for plural forms + private $total = 0; // total string count + private $table_originals = NULL; // table for original strings (offsets) + private $table_translations = NULL; // table for translated strings (offsets) + private $cache_translations = NULL; // original -> translation mapping + + + /* Methods */ + /** + * Constructor + * + * @param string $file file name + * @param boolean enable_cache Enable or disable caching of strings (default on) + */ + public function __construct($file, $enable_cache = true) + { + // If there isn't a StreamReader, turn on short circuit mode. + if (!file_exists($file)) { + $this->short_circuit = true; + return; + } + + // Caching can be turned off + $this->enable_cache = $enable_cache; + $this->STREAM = @fopen($file, 'rb'); + + $unpacked = unpack('c', $this->read(4)); + $magic = array_shift($unpacked); + + if (-34 == $magic) { + $this->BYTEORDER = 0; + } elseif (-107 == $magic) { + $this->BYTEORDER = 1; + } else { + $this->error = 1; // not MO file + return false; + } + + // FIXME: Do we care about revision? We should. + $revision = $this->readint(); + + $this->total = $this->readint(); + $this->originals = $this->readint(); + $this->translations = $this->readint(); + } + + /** + * read + * + * @param mixed $count + * @access private + * @return void + */ + private function read($count) + { + $count = abs($count); + + if ($count > 0) { + return fread($this->STREAM, $count); + } + + return NULL; + } + + /** + * Reads a 32bit Integer from the Stream + * + * @access private + * @return Integer from the Stream + */ + private function readint() + { + $end = unpack($this->BYTEORDER == 0 ? 'V' : 'N', $this->read(4)); + return array_shift($end); + } + + /** + * Reads an array of Integers from the Stream + * + * @param int count How many elements should be read + * @return Array of Integers + */ + private function readintarray($count) + { + return unpack(($this->BYTEORDER == 0 ? 'V' : 'N') . $count, $this->read(4 * $count)); + } + + /** + * Loads the translation tables from the MO file into the cache + * If caching is enabled, also loads all strings into a cache + * to speed up translation lookups + * + * @access private + */ + private function load_tables() + { + if (is_array($this->cache_translations) && + is_array($this->table_originals) && + is_array($this->table_translations)) + return; + + /* get original and translations tables */ + fseek($this->STREAM, $this->originals); + $this->table_originals = $this->readintarray($this->total * 2); + fseek($this->STREAM, $this->translations); + $this->table_translations = $this->readintarray($this->total * 2); + + if ($this->enable_cache) { + $this->cache_translations = array ('' => NULL); + /* read all strings in the cache */ + for ($i = 0; $i < $this->total; $i++) { + if ($this->table_originals[$i * 2 + 1] > 0) { + fseek($this->STREAM, $this->table_originals[$i * 2 + 2]); + $original = fread($this->STREAM, $this->table_originals[$i * 2 + 1]); + fseek($this->STREAM, $this->table_translations[$i * 2 + 2]); + $translation = fread($this->STREAM, $this->table_translations[$i * 2 + 1]); + $this->cache_translations[$original] = $translation; + } + } + } + } + + /** + * Returns a string from the "originals" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + private function get_original_string($num) + { + $length = $this->table_originals[$num * 2 + 1]; + $offset = $this->table_originals[$num * 2 + 2]; + if (! $length) + return ''; + fseek($this->STREAM, $offset); + $data = fread($this->STREAM, $length); + return (string)$data; + } + + /** + * Returns a string from the "translations" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + private function get_translation_string($num) + { + $length = $this->table_translations[$num * 2 + 1]; + $offset = $this->table_translations[$num * 2 + 2]; + if (! $length) + return ''; + fseek($this->STREAM, $offset); + $data = fread($this->STREAM, $length); + return (string)$data; + } + + /** + * Binary search for string + * + * @access private + * @param string string + * @param int start (internally used in recursive function) + * @param int end (internally used in recursive function) + * @return int string number (offset in originals table) + */ + private function find_string($string, $start = -1, $end = -1) + { + if (($start == -1) or ($end == -1)) { + // find_string is called with only one parameter, set start end end + $start = 0; + $end = $this->total; + } + if (abs($start - $end) <= 1) { + // We're done, now we either found the string, or it doesn't exist + $txt = $this->get_original_string($start); + if ($string == $txt) + return $start; + else + return -1; + } else if ($start > $end) { + // start > end -> turn around and start over + return $this->find_string($string, $end, $start); + } else { + // Divide table in two parts + $half = (int)(($start + $end) / 2); + $cmp = strcmp($string, $this->get_original_string($half)); + if ($cmp == 0) + // string is exactly in the middle => return it + return $half; + else if ($cmp < 0) + // The string is in the upper half + return $this->find_string($string, $start, $half); + else + // The string is in the lower half + return $this->find_string($string, $half, $end); + } + } + + /** + * Translates a string + * + * @access public + * @param string string to be translated + * @param integer $num found string number + * @return string translated string (or original, if not found) + */ + public function translate($string, &$num) + { + if ($this->short_circuit) + return $string; + $this->load_tables(); + + if ($this->enable_cache) { + // Caching enabled, get translated string from cache + if (array_key_exists($string, $this->cache_translations)) + return $this->cache_translations[$string]; + else + return $string; + } else { + // Caching not enabled, try to find string + $num = $this->find_string($string); + if ($num == -1) + return $string; + else + return $this->get_translation_string($num); + } + } + + /** + * Get possible plural forms from MO header + * + * @access private + * @return string plural form header + */ + private function get_plural_forms() + { + // lets assume message number 0 is header + // this is true, right? + $this->load_tables(); + + // cache header field for plural forms + if (! is_string($this->pluralheader)) { + if ($this->enable_cache) { + $header = $this->cache_translations[""]; + } else { + $header = $this->get_translation_string(0); + } + if (preg_match("/plural\-forms: ([^\n]*)\n/i", $header, $regs)) + $expr = $regs[1]; + else + $expr = "nplurals=2; plural=n == 1 ? 0 : 1;"; + $this->pluralheader = $expr; + } + return $this->pluralheader; + } + + /** + * Detects which plural form to take + * + * @access private + * @param n count + * @return int array index of the right plural form + */ + private function select_string($n) + { + $string = $this->get_plural_forms(); + $string = str_replace('nplurals',"\$total",$string); + $string = str_replace("n",$n,$string); + $string = str_replace('plural',"\$plural",$string); + + $total = 0; + $plural = 0; + + eval("$string"); + if ($plural >= $total) $plural = $total - 1; + return $plural; + } + + /** + * Plural version of gettext + * + * @access public + * @param string single + * @param string plural + * @param string number + * @param integer $num found string number + * @return translated plural form + */ + public function ngettext($single, $plural, $number, &$num) + { + if ($this->short_circuit) { + if ($number != 1) + return $plural; + else + return $single; + } + + // find out the appropriate form + $select = $this->select_string($number); + + // this should contains all strings separated by NULLs + $key = $single.chr(0).$plural; + + + if ($this->enable_cache) { + if (! array_key_exists($key, $this->cache_translations)) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->cache_translations[$key]; + $list = explode(chr(0), $result); + return $list[$select]; + } + } else { + $num = $this->find_string($key); + if ($num == -1) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->get_translation_string($num); + $list = explode(chr(0), $result); + return $list[$select]; + } + } + } + + /** + * 鍏抽棴鏂囦欢鍙ユ焺 + * + * @access public + * @return void + */ + public function __destruct() + { + fclose($this->STREAM); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetTextMulti.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetTextMulti.php" new file mode 100644 index 0000000..0f246c5 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/I18n/GetTextMulti.php" @@ -0,0 +1,105 @@ +addFile($fileName); + } + + /** + * 澧炲姞涓涓瑷鏂囦欢 + * + * @access public + * @param string $fileName 璇█鏂囦欢鍚 + * @return void + */ + public function addFile($fileName) + { + $this->_handles[] = new Typecho_I18n_GetText($fileName, true); + } + + /** + * Translates a string + * + * @access public + * @param string string to be translated + * @return string translated string (or original, if not found) + */ + public function translate($string) + { + foreach ($this->_handles as $handle) { + $string = $handle->translate($string, $count); + if (-1 != $count) { + break; + } + } + + return $string; + } + + /** + * Plural version of gettext + * + * @access public + * @param string single + * @param string plural + * @param string number + * @return translated plural form + */ + public function ngettext($single, $plural, $number) + { + foreach ($this->_handles as $handle) { + $string = $handle->ngettext($single, $plural, $number, $count); + if (-1 != $count) { + break; + } + } + + return $string; + } + + /** + * 鍏抽棴鎵鏈夊彞鏌 + * + * @access public + * @return void + */ + public function __destruct() + { + foreach ($this->_handles as $handle) { + /** 鏄剧ず鐨勯噴鏀惧唴瀛 */ + unset($handle); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin.php" new file mode 100644 index 0000000..bf06feb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin.php" @@ -0,0 +1,495 @@ +_handle = $handle; + } + + /** + * 鎻掍欢handle姣斿 + * + * @access private + * @param array $pluginHandles + * @param array $otherPluginHandles + * @return void + */ + private static function pluginHandlesDiff(array $pluginHandles, array $otherPluginHandles) + { + foreach ($otherPluginHandles as $handle) { + while (false !== ($index = array_search($handle, $pluginHandles))) { + unset($pluginHandles[$index]); + } + } + + return $pluginHandles; + } + + /** + * 鎻掍欢鍒濆鍖 + * + * @access public + * @param array $plugins 鎻掍欢鍒楄〃 + * @param mixed $callback 鑾峰彇鎻掍欢绯荤粺鍙橀噺鐨勪唬鐞嗗嚱鏁 + * @return void + */ + public static function init(array $plugins) + { + $plugins['activated'] = array_key_exists('activated', $plugins) ? $plugins['activated'] : array(); + $plugins['handles'] = array_key_exists('handles', $plugins) ? $plugins['handles'] : array(); + + /** 鍒濆鍖栧彉閲 */ + self::$_plugins = $plugins; + } + + /** + * 鑾峰彇瀹炰緥鍖栨彃浠跺璞 + * + * @access public + * @return Typecho_Plugin + */ + public static function factory($handle) + { + return isset(self::$_instances[$handle]) ? self::$_instances[$handle] : + (self::$_instances[$handle] = new Typecho_Plugin($handle)); + } + + /** + * 鍚敤鎻掍欢 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @return void + */ + public static function activate($pluginName) + { + self::$_plugins['activated'][$pluginName] = self::$_tmp; + self::$_tmp = array(); + } + + /** + * 绂佺敤鎻掍欢 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @return void + */ + public static function deactivate($pluginName) + { + /** 鍘绘帀鎵鏈夌浉鍏冲洖璋冨嚱鏁 */ + if (isset(self::$_plugins['activated'][$pluginName]['handles']) && is_array(self::$_plugins['activated'][$pluginName]['handles'])) { + foreach (self::$_plugins['activated'][$pluginName]['handles'] as $handle => $handles) { + self::$_plugins['handles'][$handle] = self::pluginHandlesDiff( + empty(self::$_plugins['handles'][$handle]) ? array() : self::$_plugins['handles'][$handle], + empty($handles) ? array() : $handles); + if (empty(self::$_plugins['handles'][$handle])) { + unset(self::$_plugins['handles'][$handle]); + } + } + } + + /** 绂佺敤褰撳墠鎻掍欢 */ + unset(self::$_plugins['activated'][$pluginName]); + } + + /** + * 瀵煎嚭褰撳墠鎻掍欢璁剧疆 + * + * @access public + * @return array + */ + public static function export() + { + return self::$_plugins; + } + + /** + * 鑾峰彇鎻掍欢鏂囦欢鐨勫ご淇℃伅 + * + * @access public + * @param string $pluginFile 鎻掍欢鏂囦欢璺緞 + * @return array + */ + public static function parseInfo($pluginFile) + { + $tokens = token_get_all(file_get_contents($pluginFile)); + $isDoc = false; + $isFunction = false; + $isClass = false; + $isInClass = false; + $isInFunction = false; + $isDefined = false; + $current = NULL; + + /** 鍒濆淇℃伅 */ + $info = array( + 'description' => '', + 'title' => '', + 'author' => '', + 'homepage' => '', + 'version' => '', + 'dependence' => '', + 'activate' => false, + 'deactivate' => false, + 'config' => false, + 'personalConfig' => false + ); + + $map = array( + 'package' => 'title', + 'author' => 'author', + 'link' => 'homepage', + 'dependence'=> 'dependence', + 'version' => 'version' + ); + + foreach ($tokens as $token) { + /** 鑾峰彇doc comment */ + if (!$isDoc && is_array($token) && T_DOC_COMMENT == $token[0]) { + + /** 鍒嗚璇诲彇 */ + $described = false; + $lines = preg_split("(\r|\n)", $token[1]); + foreach ($lines as $line) { + $line = trim($line); + if (!empty($line) && '*' == $line[0]) { + $line = trim(substr($line, 1)); + if (!$described && !empty($line) && '@' == $line[0]) { + $described = true; + } + + if (!$described && !empty($line)) { + $info['description'] .= $line . "\n"; + } else if ($described && !empty($line) && '@' == $line[0]) { + $info['description'] = trim($info['description']); + $line = trim(substr($line, 1)); + $args = explode(' ', $line); + $key = array_shift($args); + + if (isset($map[$key])) { + $info[$map[$key]] = trim(implode(' ', $args)); + } + } + } + } + + $isDoc = true; + } + + if (is_array($token)) { + switch ($token[0]) { + case T_FUNCTION: + $isFunction = true; + break; + case T_IMPLEMENTS: + $isClass = true; + break; + case T_WHITESPACE: + case T_COMMENT: + case T_DOC_COMMENT: + break; + case T_STRING: + $string = strtolower($token[1]); + switch ($string) { + case 'typecho_plugin_interface': + $isInClass = $isClass; + break; + case 'activate': + case 'deactivate': + case 'config': + case 'personalconfig': + if ($isFunction) { + $current = ('personalconfig' == $string ? 'personalConfig' : $string); + } + break; + default: + if (!empty($current) && $isInFunction && $isInClass) { + $info[$current] = true; + } + break; + } + break; + default: + if (!empty($current) && $isInFunction && $isInClass) { + $info[$current] = true; + } + break; + } + } else { + $token = strtolower($token); + switch ($token) { + case '{': + if ($isDefined) { + $isInFunction = true; + } + break; + case '(': + if ($isFunction && !$isDefined) { + $isDefined = true; + } + break; + case '}': + case ';': + $isDefined = false; + $isFunction = false; + $isInFunction = false; + $current = NULL; + break; + default: + if (!empty($current) && $isInFunction && $isInClass) { + $info[$current] = true; + } + break; + } + } + } + + return $info; + } + + /** + * 鑾峰彇鎻掍欢璺緞鍜岀被鍚 + * 杩斿洖鍊间负涓涓暟缁 + * 绗竴椤逛负鎻掍欢璺緞,绗簩椤逛负绫诲悕 + * + * @access public + * @param string $pluginName 鎻掍欢鍚 + * @param string $path 鎻掍欢鐩綍 + * @return array + */ + public static function portal($pluginName, $path) + { + switch (true) { + case file_exists($pluginFileName = $path . '/' . $pluginName . '/Plugin.php'): + $className = $pluginName . '_Plugin'; + break; + case file_exists($pluginFileName = $path . '/' . $pluginName . '.php'): + $className = $pluginName; + break; + default: + throw new Typecho_Plugin_Exception('Missing Plugin ' . $pluginName, 404); + } + + return array($pluginFileName, $className); + } + + /** + * 鐗堟湰渚濊禆鎬ф娴 + * + * @access public + * @param string $version 绋嬪簭鐗堟湰 + * @param string $versionRange 渚濊禆鐨勭増鏈鍒 + * @return boolean + */ + public static function checkDependence($version, $versionRange) + { + //濡傛灉娌℃湁妫娴嬭鍒,鐩存帴鎺犺繃 + if (empty($versionRange)) { + return true; + } + + $items = array_map('trim', explode('-', $versionRange)); + if (count($items) < 2) { + $items[1] = $items[0]; + } + + list ($minVersion, $maxVersion) = $items; + + //瀵*鍜?鐨勬敮鎸,4涓9鏄渶澶х増鏈 + $minVersion = str_replace(array('*', '?'), array('9999', '9'), $minVersion); + $maxVersion = str_replace(array('*', '?'), array('9999', '9'), $maxVersion); + + if (version_compare($version, $minVersion, '>=') && version_compare($version, $maxVersion, '<=')) { + return true; + } + + return false; + } + + /** + * 鎻掍欢璋冪敤鍚庣殑瑙﹀彂鍣 + * + * @access public + * @param boolean $signal 瑙﹀彂鍣 + * @return Typecho_Plugin + */ + public function trigger(&$signal) + { + $signal = false; + $this->_signal = &$signal; + return $this; + } + + /** + * 鍒ゆ柇鎻掍欢鏄惁瀛樺湪 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @return void + */ + public function exists($pluginName) { + return array_search($pluginName, self::$_plugins['activated']); + } + + /** + * 璁剧疆鍥炶皟鍑芥暟 + * + * @access public + * @param string $component 褰撳墠缁勪欢 + * @param mixed $value 鍥炶皟鍑芥暟 + * @return void + */ + public function __set($component, $value) + { + $weight = 0; + + if (strpos($component, '_') > 0) { + $parts = explode('_', $component, 2); + list($component, $weight) = $parts; + $weight = intval($weight) - 10; + } + + $component = $this->_handle . ':' . $component; + + if (!isset(self::$_plugins['handles'][$component])) { + self::$_plugins['handles'][$component] = array(); + } + + if (!isset(self::$_tmp['handles'][$component])) { + self::$_tmp['handles'][$component] = array(); + } + + foreach (self::$_plugins['handles'][$component] as $key => $val) { + $key = floatval($key); + + if ($weight > $key) { + break; + } else if ($weight == $key) { + $weight += 0.001; + } + } + + self::$_plugins['handles'][$component][strval($weight)] = $value; + self::$_tmp['handles'][$component][] = $value; + + ksort(self::$_plugins['handles'][$component], SORT_NUMERIC); + } + + /** + * 閫氳繃榄旀湳鍑芥暟璁剧疆褰撳墠缁勪欢浣嶇疆 + * + * @access public + * @param string $component 褰撳墠缁勪欢 + * @return Typecho_Plugin + */ + public function __get($component) + { + $this->_component = $component; + return $this; + } + + /** + * 鍥炶皟澶勭悊鍑芥暟 + * + * @access public + * @param string $component 褰撳墠缁勪欢 + * @param string $args 鍙傛暟 + * @return mixed + */ + public function __call($component, $args) + { + $component = $this->_handle . ':' . $component; + $last = count($args); + $args[$last] = $last > 0 ? $args[0] : false; + + if (isset(self::$_plugins['handles'][$component])) { + $args[$last] = NULL; + $this->_signal = true; + foreach (self::$_plugins['handles'][$component] as $callback) { + $args[$last] = call_user_func_array($callback, $args); + } + } + + return $args[$last]; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin/Exception.php" new file mode 100644 index 0000000..617c75e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Plugin/Exception.php" @@ -0,0 +1,17 @@ + 'intval', + 'integer' => 'intval', + 'search' => array('Typecho_Common', 'filterSearchQuery'), + 'xss' => array('Typecho_Common', 'removeXSS'), + 'url' => array('Typecho_Common', 'safeUrl'), + 'slug' => array('Typecho_Common', 'slugName') + ); + + /** + * 鑾峰彇鍗曚緥鍙ユ焺 + * + * @access public + * @return Typecho_Request + */ + public static function getInstance() + { + if (NULL === self::$_instance) { + self::$_instance = new Typecho_Request(); + } + + return self::$_instance; + } + + /** + * 搴旂敤杩囨护鍣 + * + * @access private + * @param mixed $value + * @return mixed + */ + private function _applyFilter($value) + { + if ($this->_filter) { + foreach ($this->_filter as $filter) { + $value = is_array($value) ? array_map($filter, $value) : + call_user_func($filter, $value); + } + + $this->_filter = array(); + } + + return $value; + } + + /** + * 妫鏌p鍦板潃鏄惁鍚堟硶 + * + * @param string $ip ip鍦板潃 + * @return boolean + */ + private function _checkIp($ip) + { + if (__TYPECHO_FILTER_SUPPORTED__) { + return false !== (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) + || filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); + } + + return preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $ip) + || preg_match("/^[0-9a-f:]+$/i", $ip); + } + + /** + * 妫鏌a鏄惁鍚堟硶 + * + * @param $agent ua瀛楃涓 + * @return boolean + */ + private function _checkAgent($agent) + { + return preg_match("/^[_a-z0-9- ,:;=#@\.\(\)\/\+\*\?]+$/i", $agent); + } + + /** + * 鍒濆鍖栧彉閲 + */ + public function __construct() + { + if (false === self::$_httpParams) { + self::$_httpParams = array_filter(array_merge($_POST, $_GET), + array('Typecho_Common', 'checkStrEncoding')); + } + } + + /** + * 鑾峰彇url鍓嶇紑 + * + * @access public + * @return string + */ + public static function getUrlPrefix() + { + if (empty(self::$_urlPrefix)) { + self::$_urlPrefix = (self::isSecure() ? 'https' : 'http') + . '://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']) + . (in_array($_SERVER['SERVER_PORT'], array(80, 443)) ? '' : ':' . $_SERVER['SERVER_PORT']); + } + + return self::$_urlPrefix; + } + + /** + * 鍒ゆ柇鏄惁涓篽ttps + * + * @access public + * @return boolean + */ + public static function isSecure() + { + return (!empty($_SERVER['HTTPS']) && 'off' != strtolower($_SERVER['HTTPS'])) + || (!empty($_SERVER['SERVER_PORT']) && 443 == $_SERVER['SERVER_PORT']) + || (defined('__TYPECHO_SECURE__') && __TYPECHO_SECURE__); + } + + /** + * 璁剧疆杩囨护鍣 + * + * @access public + * @return Typecho_Request + */ + public function filter() + { + $filters = func_get_args(); + + foreach ($filters as $filter) { + $this->_filter[] = is_string($filter) && isset(self::$_supportFilters[$filter]) + ? self::$_supportFilters[$filter] : $filter; + } + + return $this; + } + + /** + * 鑾峰彇瀹為檯浼犻掑弬鏁(magic) + * + * @access public + * @param string $key 鎸囧畾鍙傛暟 + * @return mixed + */ + public function __get($key) + { + return $this->get($key); + } + + /** + * 鍒ゆ柇鍙傛暟鏄惁瀛樺湪 + * + * @access public + * @param string $key 鎸囧畾鍙傛暟 + * @return boolean + */ + public function __isset($key) + { + return isset(self::$_httpParams[$key]) + || isset($this->_params[$key]); + } + + /** + * 鑾峰彇瀹為檯浼犻掑弬鏁 + * + * @access public + * @param string $key 鎸囧畾鍙傛暟 + * @param mixed $default 榛樿鍙傛暟 (default: NULL) + * @return mixed + */ + public function get($key, $default = NULL) + { + switch (true) { + case isset($this->_params[$key]): + $value = $this->_params[$key]; + break; + case isset(self::$_httpParams[$key]): + $value = self::$_httpParams[$key]; + break; + default: + $value = $default; + break; + } + + $value = !is_array($value) && strlen($value) > 0 ? $value : $default; + return $this->_applyFilter($value); + } + + /** + * 鑾峰彇涓涓暟缁 + * + * @param $key + * @return array + */ + public function getArray($key) + { + $result = isset($this->_params[$key]) ? $this->_params[$key] : + (isset(self::$_httpParams[$key]) ? self::$_httpParams[$key] : array()); + + $result = is_array($result) ? $result + : (strlen($result) > 0 ? array($result) : array()); + return $this->_applyFilter($result); + } + + /** + * 浠庡弬鏁板垪琛ㄦ寚瀹氱殑鍊间腑鑾峰彇http浼犻掑弬鏁 + * + * @access public + * @param mixed $params 鎸囧畾鐨勫弬鏁 + * @return array + */ + public function from($params) + { + $result = array(); + $args = is_array($params) ? $params : func_get_args(); + + foreach ($args as $arg) { + $result[$arg] = $this->get($arg); + } + + return $result; + } + + /** + * 璁剧疆http浼犻掑弬鏁 + * + * @access public + * @param string $name 鎸囧畾鐨勫弬鏁 + * @param mixed $value 鍙傛暟鍊 + * @return void + */ + public function setParam($name, $value) + { + if (Typecho_Common::checkStrEncoding($value)) { + $this->_params[$name] = $value; + } + } + + /** + * 璁剧疆澶氫釜鍙傛暟 + * + * @access public + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function setParams($params) + { + //澶勭悊瀛楃涓 + if (!is_array($params)) { + parse_str($params, $out); + $params = $out; + } + + $this->_params = array_merge($this->_params, + array_filter($params, array('Typecho_Common', 'checkStrEncoding'))); + } + + /** + * getRequestRoot + * + * @access public + * @return string + */ + public function getRequestRoot() + { + if (NULL === $this->_requestRoot) { + $root = rtrim(self::getUrlPrefix() . $this->getBaseUrl(), '/') . '/'; + + $pos = strrpos($root, '.php/'); + if ($pos) { + $root = dirname(substr($root, 0, $pos)); + } + + $this->_requestRoot = rtrim($root, '/'); + } + + return $this->_requestRoot; + } + + /** + * 鑾峰彇褰撳墠璇锋眰url + * + * @access public + * @return string + */ + public function getRequestUrl() + { + return self::getUrlPrefix() . $this->getRequestUri(); + } + + /** + * 鑾峰彇璇锋眰鍦板潃 + * + * @access public + * @return string + */ + public function getRequestUri() + { + if (!empty($this->_requestUri)) { + return $this->_requestUri; + } + + //澶勭悊requestUri + $requestUri = '/'; + + if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { // check this first so IIS will catch + $requestUri = $_SERVER['HTTP_X_REWRITE_URL']; + } elseif ( + // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem) + isset($_SERVER['IIS_WasUrlRewritten']) + && $_SERVER['IIS_WasUrlRewritten'] == '1' + && isset($_SERVER['UNENCODED_URL']) + && $_SERVER['UNENCODED_URL'] != '' + ) { + $requestUri = $_SERVER['UNENCODED_URL']; + } elseif (isset($_SERVER['REQUEST_URI'])) { + $requestUri = $_SERVER['REQUEST_URI']; + if (isset($_SERVER['HTTP_HOST']) && strstr($requestUri, $_SERVER['HTTP_HOST'])) { + $parts = @parse_url($requestUri); + + if (false !== $parts) { + $requestUri = (empty($parts['path']) ? '' : $parts['path']) + . ((empty($parts['query'])) ? '' : '?' . $parts['query']); + } + } + } elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0, PHP as CGI + $requestUri = $_SERVER['ORIG_PATH_INFO']; + if (!empty($_SERVER['QUERY_STRING'])) { + $requestUri .= '?' . $_SERVER['QUERY_STRING']; + } + } + + return $this->_requestUri = $requestUri; + } + + /** + * getBaseUrl + * + * @access public + * @return string + */ + public function getBaseUrl() + { + if (NULL !== $this->_baseUrl) { + return $this->_baseUrl; + } + + //澶勭悊baseUrl + $filename = (isset($_SERVER['SCRIPT_FILENAME'])) ? basename($_SERVER['SCRIPT_FILENAME']) : ''; + + if (isset($_SERVER['SCRIPT_NAME']) && basename($_SERVER['SCRIPT_NAME']) === $filename) { + $baseUrl = $_SERVER['SCRIPT_NAME']; + } elseif (isset($_SERVER['PHP_SELF']) && basename($_SERVER['PHP_SELF']) === $filename) { + $baseUrl = $_SERVER['PHP_SELF']; + } elseif (isset($_SERVER['ORIG_SCRIPT_NAME']) && basename($_SERVER['ORIG_SCRIPT_NAME']) === $filename) { + $baseUrl = $_SERVER['ORIG_SCRIPT_NAME']; // 1and1 shared hosting compatibility + } else { + // Backtrack up the script_filename to find the portion matching + // php_self + $path = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''; + $file = isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : ''; + $segs = explode('/', trim($file, '/')); + $segs = array_reverse($segs); + $index = 0; + $last = count($segs); + $baseUrl = ''; + do { + $seg = $segs[$index]; + $baseUrl = '/' . $seg . $baseUrl; + ++$index; + } while (($last > $index) && (false !== ($pos = strpos($path, $baseUrl))) && (0 != $pos)); + } + + // Does the baseUrl have anything in common with the request_uri? + $finalBaseUrl = NULL; + $requestUri = $this->getRequestUri(); + + if (0 === strpos($requestUri, $baseUrl)) { + // full $baseUrl matches + $finalBaseUrl = $baseUrl; + } else if (0 === strpos($requestUri, dirname($baseUrl))) { + // directory portion of $baseUrl matches + $finalBaseUrl = rtrim(dirname($baseUrl), '/'); + } else if (!strpos($requestUri, basename($baseUrl))) { + // no match whatsoever; set it blank + $finalBaseUrl = ''; + } else if ((strlen($requestUri) >= strlen($baseUrl)) + && ((false !== ($pos = strpos($requestUri, $baseUrl))) && ($pos !== 0))) + { + // If using mod_rewrite or ISAPI_Rewrite strip the script filename + // out of baseUrl. $pos !== 0 makes sure it is not matching a value + // from PATH_INFO or QUERY_STRING + $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); + } + + return ($this->_baseUrl = (NULL === $finalBaseUrl) ? rtrim($baseUrl, '/') : $finalBaseUrl); + } + + /** + * 鏍规嵁褰撳墠uri鏋勯犳寚瀹氬弬鏁扮殑uri + * + * @access public + * @param mixed $parameter 鎸囧畾鐨勫弬鏁 + * @return string + */ + public function makeUriByRequest($parameter = NULL) + { + /** 鍒濆鍖栧湴鍧 */ + $requestUri = $this->getRequestUrl(); + $parts = parse_url($requestUri); + + /** 鍒濆鍖栧弬鏁 */ + if (is_string($parameter)) { + parse_str($parameter, $args); + } else if (is_array($parameter)) { + $args = $parameter; + } else { + return $requestUri; + } + + /** 鏋勯爍uery */ + if (isset($parts['query'])) { + parse_str($parts['query'], $currentArgs); + $args = array_merge($currentArgs, $args); + } + $parts['query'] = http_build_query($args); + + /** 杩斿洖鍦板潃 */ + return Typecho_Common::buildUrl($parts); + } + + /** + * 鑾峰彇褰撳墠pathinfo + * + * @access public + * @param string $inputEncoding 杈撳叆缂栫爜 + * @param string $outputEncoding 杈撳嚭缂栫爜 + * @return string + */ + public function getPathInfo($inputEncoding = NULL, $outputEncoding = NULL) + { + /** 缂撳瓨淇℃伅 */ + if (NULL !== $this->_pathInfo) { + return $this->_pathInfo; + } + + //鍙傝僙end Framework瀵筽ahtinfo鐨勫鐞, 鏇村ソ鐨勫吋瀹规 + $pathInfo = NULL; + + //澶勭悊requestUri + $requestUri = $this->getRequestUri(); + $finalBaseUrl = $this->getBaseUrl(); + + // Remove the query string from REQUEST_URI + if ($pos = strpos($requestUri, '?')) { + $requestUri = substr($requestUri, 0, $pos); + } + + if ((NULL !== $finalBaseUrl) + && (false === ($pathInfo = substr($requestUri, strlen($finalBaseUrl))))) + { + // If substr() returns false then PATH_INFO is set to an empty string + $pathInfo = '/'; + } elseif (NULL === $finalBaseUrl) { + $pathInfo = $requestUri; + } + + if (!empty($pathInfo)) { + //閽堝iis鐨剈tf8缂栫爜鍋氬己鍒惰浆鎹 + //鍙傝僪ttp://docs.moodle.org/ja/%E5%A4%9A%E8%A8%80%E8%AA%9E%E5%AF%BE%E5%BF%9C%EF%BC%9A%E3%82%B5%E3%83%BC%E3%83%90%E3%81%AE%E8%A8%AD%E5%AE%9A + if (!empty($inputEncoding) && !empty($outputEncoding) && + (stripos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false + || stripos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false)) { + if (function_exists('mb_convert_encoding')) { + $pathInfo = mb_convert_encoding($pathInfo, $outputEncoding, $inputEncoding); + } else if (function_exists('iconv')) { + $pathInfo = iconv($pathInfoEncoding, $outputEncoding, $pathInfo); + } + } + } else { + $pathInfo = '/'; + } + + // fix issue 456 + return ($this->_pathInfo = '/' . ltrim(urldecode($pathInfo), '/')); + } + + /** + * 璁剧疆鏈嶅姟绔弬鏁 + * + * @access public + * @param string $name 鍙傛暟鍚嶇О + * @param mixed $value 鍙傛暟鍊 + * @return void + */ + public function setServer($name, $value = NULL) + { + if (NULL == $value) { + if (isset($_SERVER[$name])) { + $value = $_SERVER[$name]; + } else if (isset($_ENV[$name])) { + $value = $_ENV[$name]; + } + } + + $this->_server[$name] = $value; + } + + /** + * 鑾峰彇鐜鍙橀噺 + * + * @access public + * @param string $name 鑾峰彇鐜鍙橀噺鍚 + * @return string + */ + public function getServer($name) + { + if (!isset($this->_server[$name])) { + $this->setServer($name); + } + + return $this->_server[$name]; + } + + /** + * 璁剧疆ip鍦板潃 + * + * @access public + * @param string $ip + */ + public function setIp($ip = NULL) + { + if (!empty($ip)) { + $this->_ip = $ip; + } else { + switch (true) { + case defined('__TYPECHO_IP_SOURCE__') && NULL !== $this->getServer(__TYPECHO_IP_SOURCE__): + list($this->_ip) = array_map('trim', explode(',', $this->getServer(__TYPECHO_IP_SOURCE__))); + break; + case NULL !== $this->getServer('REMOTE_ADDR'): + $this->_ip = $this->getServer('REMOTE_ADDR'); + break; + case NULL !== $this->getServer('HTTP_CLIENT_IP'): + $this->_ip = $this->getServer('HTTP_CLIENT_IP'); + break; + default: + break; + } + } + + if (empty($this->_ip) || !self::_checkIp($this->_ip)) { + $this->_ip = 'unknown'; + } + } + + /** + * 鑾峰彇ip鍦板潃 + * + * @access public + * @return string + */ + public function getIp() + { + if (NULL === $this->_ip) { + $this->setIp(); + } + + return $this->_ip; + } + + /** + * 璁剧疆瀹㈡埛绔 + * + * @access public + * @param string $agent 瀹㈡埛绔瓧绗︿覆 + * @return void + */ + public function setAgent($agent = NULL) + { + $agent = (NULL === $agent) ? $this->getServer('HTTP_USER_AGENT') : $agent; + $this->_agent = self::_checkAgent($agent) ? $agent : ''; + } + + /** + * 鑾峰彇瀹㈡埛绔 + * + * @access public + * @return string + */ + public function getAgent() + { + if (NULL === $this->_agent) { + $this->setAgent(); + } + + return $this->_agent; + } + + /** + * 璁剧疆鏉ユ簮椤 + * + * @access public + * @param string $referer 瀹㈡埛绔瓧绗︿覆 + * @return void + */ + public function setReferer($referer = NULL) + { + $this->_referer = (NULL === $referer) ? $this->getServer('HTTP_REFERER') : $referer; + } + + /** + * 鑾峰彇瀹㈡埛绔 + * + * @access public + * @return string + */ + public function getReferer() + { + if (NULL === $this->_referer) { + $this->setReferer(); + } + + return $this->_referer; + } + + /** + * 鍒ゆ柇鏄惁涓篻et鏂规硶 + * + * @access public + * @return boolean + */ + public function isGet() + { + return 'GET' == $this->getServer('REQUEST_METHOD'); + } + + /** + * 鍒ゆ柇鏄惁涓簆ost鏂规硶 + * + * @access public + * @return boolean + */ + public function isPost() + { + return 'POST' == $this->getServer('REQUEST_METHOD'); + } + + /** + * 鍒ゆ柇鏄惁涓簆ut鏂规硶 + * + * @access public + * @return boolean + */ + public function isPut() + { + return 'PUT' == $this->getServer('REQUEST_METHOD'); + } + + /** + * 鍒ゆ柇鏄惁涓篴jax + * + * @access public + * @return boolean + */ + public function isAjax() + { + return 'XMLHttpRequest' == $this->getServer('HTTP_X_REQUESTED_WITH'); + } + + /** + * 鍒ゆ柇鏄惁涓篺lash + * + * @access public + * @return boolean + */ + public function isFlash() + { + return 'Shockwave Flash' == $this->getServer('USER_AGENT'); + } + + /** + * isMobile + * + * @static + * @access public + * @return boolean + */ + public function isMobile() + { + $userAgent = $this->getAgent(); + return preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$userAgent) || preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($userAgent,0,4)); + } + + /** + * 鍒ゆ柇杈撳叆鏄惁婊¤冻瑕佹眰 + * + * @access public + * @param mixed $query 鏉′欢 + * @return boolean + */ + public function is($query) + { + $validated = false; + + /** 瑙f瀽涓 */ + if (is_string($query)) { + parse_str($query, $params); + } else if (is_array($query)) { + $params = $query; + } + + /** 楠岃瘉涓 */ + if ($params) { + $validated = true; + foreach ($params as $key => $val) { + $validated = empty($val) ? $this->__isset($key) : ($val == $this->get($key)); + + if (!$validated) { + break; + } + } + } + + return $validated; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Response.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Response.php" new file mode 100644 index 0000000..d84ec61 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Response.php" @@ -0,0 +1,299 @@ + 'Continue', + 101 => 'Switching Protocols', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported' + ); + + /** + * 瀛楃缂栫爜 + * + * @var mixed + * @access private + */ + private $_charset; + + //榛樿鐨勫瓧绗︾紪鐮 + const CHARSET = 'UTF-8'; + + /** + * 鍗曚緥鍙ユ焺 + * + * @access private + * @var Typecho_Response + */ + private static $_instance = null; + + /** + * 鑾峰彇鍗曚緥鍙ユ焺 + * + * @access public + * @return Typecho_Response + */ + public static function getInstance() + { + if (null === self::$_instance) { + self::$_instance = new Typecho_Response(); + } + + return self::$_instance; + } + + /** + * 瑙f瀽ajax鍥炴墽鐨勫唴閮ㄥ嚱鏁 + * + * @access private + * @param mixed $message 鏍煎紡鍖栨暟鎹 + * @return string + */ + private function _parseXml($message) + { + /** 瀵逛簬鏁扮粍鍨嬪垯缁х画閫掑綊 */ + if (is_array($message)) { + $result = ''; + + foreach ($message as $key => $val) { + $tagName = is_int($key) ? 'item' : $key; + $result .= '<' . $tagName . '>' . $this->_parseXml($val) . ''; + } + + return $result; + } else { + return preg_match("/^[^<>]+$/is", $message) ? $message : ''; + } + } + + /** + * 璁剧疆榛樿鍥炴墽缂栫爜 + * + * @access public + * @param string $charset 瀛楃闆 + * @return void + */ + public function setCharset($charset = null) + { + $this->_charset = empty($charset) ? self::CHARSET : $charset; + } + + /** + * 鑾峰彇瀛楃闆 + * + * @access public + * @return string + */ + public function getCharset() + { + if (empty($this->_charset)) { + $this->setCharset(); + } + + return $this->_charset; + } + + /** + * 鍦╤ttp澶撮儴璇锋眰涓0鏄庣被鍨嬪拰瀛楃闆 + * + * @access public + * @param string $contentType 鏂囨。绫诲瀷 + * @return void + */ + public function setContentType($contentType = 'text/html') + { + header('Content-Type: ' . $contentType . '; charset=' . $this->getCharset(), true); + } + + /** + * 璁剧疆http澶 + * + * @access public + * @param string $name 鍚嶇О + * @param string $value 瀵瑰簲鍊 + * @return void + */ + public function setHeader($name, $value) + { + header($name . ': ' . $value, true); + } + + /** + * 璁剧疆HTTP鐘舵 + * + * @access public + * @param integer $code http浠g爜 + * @return void + */ + public static function setStatus($code) + { + if (isset(self::$_httpCode[$code])) { + header((isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1') . ' ' . $code . ' ' . self::$_httpCode[$code], true, $code); + } + } + + /** + * 鎶涘嚭ajax鐨勫洖鎵т俊鎭 + * + * @access public + * @param string $message 娑堟伅浣 + * @return void + */ + public function throwXml($message) + { + /** 璁剧疆http澶翠俊鎭 */ + $this->setContentType('text/xml'); + + /** 鏋勫缓娑堟伅浣 */ + echo 'getCharset() . '"?>', + '', + $this->_parseXml($message), + ''; + + /** 缁堟鍚庣画杈撳嚭 */ + exit; + } + + /** + * 鎶涘嚭json鍥炴墽淇℃伅 + * + * @access public + * @param string $message 娑堟伅浣 + * @return void + */ + public function throwJson($message) + { + /** 璁剧疆http澶翠俊鎭 */ + $this->setContentType('application/json'); + + echo Json::encode($message); + + /** 缁堟鍚庣画杈撳嚭 */ + exit; + } + + /** + * 閲嶅畾鍚戝嚱鏁 + * + * @access public + * @param string $location 閲嶅畾鍚戣矾寰 + * @param boolean $isPermanently 鏄惁涓烘案涔呴噸瀹氬悜 + * @return void + */ + public function redirect($location, $isPermanently = false) + { + /** Typecho_Common */ + $location = Typecho_Common::safeUrl($location); + + if ($isPermanently) { + header('Location: ' . $location, false, 301); + exit; + } else { + header('Location: ' . $location, false, 302); + exit; + } + } + + /** + * 杩斿洖鏉ヨ矾 + * + * @access public + * @param string $suffix 闄勫姞鍦板潃 + * @param string $default 榛樿鏉ヨ矾 + */ + public function goBack($suffix = NULL, $default = NULL) + { + //鑾峰彇鏉ユ簮 + $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; + + //鍒ゆ柇鏉ユ簮 + if (!empty($referer)) { + // ~ fix Issue 38 + if (!empty($suffix)) { + $parts = parse_url($referer); + $myParts = parse_url($suffix); + + if (isset($myParts['fragment'])) { + $parts['fragment'] = $myParts['fragment']; + } + + if (isset($myParts['query'])) { + $args = array(); + if (isset($parts['query'])) { + parse_str($parts['query'], $args); + } + + parse_str($myParts['query'], $currentArgs); + $args = array_merge($args, $currentArgs); + $parts['query'] = http_build_query($args); + } + + $referer = Typecho_Common::buildUrl($parts); + } + + $this->redirect($referer, false); + } else if (!empty($default)) { + $this->redirect($default); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router.php" new file mode 100644 index 0000000..483ee82 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router.php" @@ -0,0 +1,209 @@ + $route) { + if (preg_match($route['regx'], $pathInfo, $matches)) { + self::$current = $key; + + try { + /** 杞藉叆鍙傛暟 */ + $params = NULL; + + if (!empty($route['params'])) { + unset($matches[0]); + $params = array_combine($route['params'], $matches); + } + + $widget = Typecho_Widget::widget($route['widget'], $parameter, $params); + + return $widget; + + } catch (Exception $e) { + if (404 == $e->getCode()) { + Typecho_Widget::destory($route['widget']); + continue; + } + + throw $e; + } + } + } + + return false; + } + + /** + * 璁剧疆鍏ㄨ矾寰 + * + * @access public + * @param string $pathInfo + * @return void + */ + public static function setPathInfo($pathInfo = '/') + { + self::$_pathInfo = $pathInfo; + } + + /** + * 鑾峰彇鍏ㄨ矾寰 + * + * @access public + * @return string + */ + public static function getPathInfo() + { + if (NULL === self::$_pathInfo) { + self::setPathInfo(); + } + + return self::$_pathInfo; + } + + /** + * 璺敱鍒嗗彂鍑芥暟 + * + * @param string $path 鐩殑鏂囦欢鎵鍦ㄧ洰褰 + * @return void + * @throws Typecho_Route_Exception + */ + public static function dispatch() + { + /** 鑾峰彇PATHINFO */ + $pathInfo = self::getPathInfo(); + + foreach (self::$_routingTable as $key => $route) { + if (preg_match($route['regx'], $pathInfo, $matches)) { + self::$current = $key; + + try { + /** 杞藉叆鍙傛暟 */ + $params = NULL; + + if (!empty($route['params'])) { + unset($matches[0]); + $params = array_combine($route['params'], $matches); + } + + $widget = Typecho_Widget::widget($route['widget'], NULL, $params); + + if (isset($route['action'])) { + $widget->{$route['action']}(); + } + + return; + + } catch (Exception $e) { + if (404 == $e->getCode()) { + Typecho_Widget::destory($route['widget']); + continue; + } + + throw $e; + } + } + } + + /** 杞藉叆璺敱寮傚父鏀寔 */ + throw new Typecho_Router_Exception("Path '{$pathInfo}' not found", 404); + } + + /** + * 璺敱鍙嶈В鏋愬嚱鏁 + * + * @param string $name 璺敱閰嶇疆琛ㄥ悕绉 + * @param string $value 璺敱濉厖鍊 + * @param string $prefix 鏈缁堝悎鎴愯矾寰勭殑鍓嶇紑 + * @return string + */ + public static function url($name, array $value = NULL, $prefix = NULL) + { + $route = self::$_routingTable[$name]; + + //浜ゆ崲鏁扮粍閿 + $pattern = array(); + foreach ($route['params'] as $row) { + $pattern[$row] = isset($value[$row]) ? $value[$row] : '{' . $row . '}'; + } + + return Typecho_Common::url(vsprintf($route['format'], $pattern), $prefix); + } + + /** + * 璁剧疆璺敱鍣ㄩ粯璁ら厤缃 + * + * @access public + * @param mixed $routes 閰嶇疆淇℃伅 + * @return void + */ + public static function setRoutes($routes) + { + if (isset($routes[0])) { + self::$_routingTable = $routes[0]; + } else { + /** 瑙f瀽璺敱閰嶇疆 */ + $parser = new Typecho_Router_Parser($routes); + self::$_routingTable = $parser->parse(); + } + } + + /** + * 鑾峰彇璺敱淇℃伅 + * + * @param string $routeName 璺敱鍚嶇О + * @static + * @access public + * @return void + */ + public static function get($routeName) + { + return isset(self::$_routingTable[$routeName]) ? self::$_routingTable[$routeName] : NULL; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router/Exception.php" new file mode 100644 index 0000000..ebd76ad --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Router/Exception.php" @@ -0,0 +1,17 @@ +_routingTable = $routingTable; + + $this->_defaultRegx = array( + 'string' => '(.%s)', + 'char' => '([^/]%s)', + 'digital'=> '([0-9]%s)', + 'alpha' => '([_0-9a-zA-Z-]%s)', + 'alphaslash' => '([_0-9a-zA-Z-/]%s)', + 'split' => '((?:[^/]+/)%s[^/]+)', + ); + } + + /** + * 灞閮ㄥ尮閰嶅苟鏇挎崲姝e垯瀛楃涓 + * + * @access public + * @param array $matches 鍖归厤閮ㄥ垎 + * @return string + */ + public function _match(array $matches) + { + $params = explode(' ', $matches[1]); + $paramsNum = count($params); + $this->_params[] = $params[0]; + + if (1 == $paramsNum) { + return sprintf($this->_defaultRegx['char'], '+'); + } else if (2 == $paramsNum) { + return sprintf($this->_defaultRegx[$params[1]], '+'); + } else if (3 == $paramsNum) { + return sprintf($this->_defaultRegx[$params[1]], $params[2] > 0 ? '{' . $params[2] . '}' : '*'); + } else if (4 == $paramsNum) { + return sprintf($this->_defaultRegx[$params[1]], '{' . $params[2] . ',' . $params[3] . '}'); + } + } + + /** + * 瑙f瀽璺敱琛 + * + * @access public + * @return array + */ + public function parse() + { + $result = array(); + + foreach ($this->_routingTable as $key => $route) { + $this->_params = array(); + $route['regx'] = preg_replace_callback("/%([^%]+)%/", array($this, '_match'), + preg_quote(str_replace(array('[', ']', ':'), array('%', '%', ' '), $route['url']))); + + /** 澶勭悊鏂滅嚎 */ + $route['regx'] = rtrim($route['regx'], '/'); + $route['regx'] = '|^' . $route['regx'] . '[/]?$|'; + + $route['format'] = preg_replace("/\[([^\]]+)\]/", "%s", $route['url']); + $route['params'] = $this->_params; + + $result[$key] = $route; + } + + return $result; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Validate.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Validate.php" new file mode 100644 index 0000000..e8620ff --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Validate.php" @@ -0,0 +1,320 @@ + + * $test = "hello"; + * $Validation = new TypechoValidation(); + * $Validation->form($test, array("alpha" => "涓嶆槸瀛楃"); + * var_dump($Validation->getErrorMsg()); + *
    + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Validation.php 106 2008-04-11 02:23:54Z magike.net $ + */ + +/** + * 楠岃瘉绫 + * + * @package Validate + */ +class Typecho_Validate +{ + /** + * 鍐呴儴鏁版嵁 + * + * @access private + * @var array + */ + private $_data; + + /** + * 褰撳墠楠岃瘉鎸囬拡 + * + * @access private + * @var string + */ + private $_key; + + /** + * 楠岃瘉瑙勫垯鏁扮粍 + * + * @access private + * @var array + */ + private $_rules = array(); + + /** + * 涓柇妯″紡,涓鏃﹀嚭鐜伴獙璇侀敊璇嵆鎶涘嚭鑰屼笉鍐嶇户缁墽琛 + * + * @access private + * @var boolean + */ + private $_break = false; + + /** + * 澧炲姞楠岃瘉瑙勫垯 + * + * @access public + * @param string $key 鏁板奸敭鍊 + * @param string $rule 瑙勫垯鍚嶇О + * @param string $message 閿欒瀛楃涓 + * @return Typecho_Validation + */ + public function addRule($key, $rule, $message) + { + if (func_num_args() <= 3) { + $this->_rules[$key][] = array($rule, $message); + } else { + $params = func_get_args(); + $params = array_splice($params, 3); + $this->_rules[$key][] = array_merge(array($rule, $message), $params); + } + + return $this; + } + + /** + * 璁剧疆涓轰腑鏂ā寮 + * + * @access public + * @return void + */ + public function setBreak() + { + $this->_break = true; + } + + /** + * Run the Validator + * This function does all the work. + * + * @access public + * @param array $data 闇瑕侀獙璇佺殑鏁版嵁 + * @param array $rules 楠岃瘉鏁版嵁閬靛惊鐨勮鍒 + * @return array + * @throws Typecho_Validate_Exception + */ + public function run(array $data, $rules = NULL) + { + $result = array(); + $this->_data = $data; + $rules = empty($rules) ? $this->_rules : $rules; + + // Cycle through the rules and test for errors + foreach ($rules as $key => $rules) { + $this->_key = $key; + $data[$key] = (is_array($data[$key]) ? 0 == count($data[$key]) + : 0 == strlen($data[$key])) ? NULL : $data[$key]; + + foreach ($rules as $params) { + $method = $params[0]; + + if ('required' != $method && 'confirm' != $method && 0 == strlen($data[$key])) { + continue; + } + + $message = $params[1]; + $params[1] = $data[$key]; + $params = array_slice($params, 1); + + if (!call_user_func_array(is_array($method) ? $method : array($this, $method), $params)) { + $result[$key] = $message; + break; + } + } + + /** 寮鍚腑鏂 */ + if ($this->_break && $result) { + break; + } + } + + return $result; + } + + /** + * 鏈灏忛暱搴 + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @param integer $length 鏈灏忛暱搴 + * @return boolean + */ + public static function minLength($str, $length) + { + return (Typecho_Common::strLen($str) >= $length); + } + + /** + * 楠岃瘉杈撳叆鏄惁涓鑷 + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @param string $key 闇瑕佷竴鑷存ф鏌ョ殑閿 + * @return boolean + */ + public function confirm($str, $key) + { + return !empty($this->_data[$key]) ? ($str == $this->_data[$key]) : empty($str); + } + + /** + * 鏄惁涓虹┖ + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @return boolean + */ + public function required($str) + { + return !empty($this->_data[$this->_key]); + } + + /** + * 鏋氫妇绫诲瀷鍒ゆ柇 + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @param array $params 鏋氫妇鍊 + * @return unknown + */ + public static function enum($str, array $params) + { + $keys = array_flip($params); + return isset($keys[$str]); + } + + /** + * Max Length + * + * @param $str + * @param $length + * @return bool + */ + public static function maxLength($str, $length) + { + return (Typecho_Common::strLen($str) < $length); + } + + /** + * Valid Email + * + * @access public + * @param string + * @return boolean + */ + public static function email($str) + { + return preg_match("/^[_a-z0-9-\.]+@([-a-z0-9]+\.)+[a-z]{2,}$/i", $str); + } + + /** + * 楠岃瘉鏄惁涓虹綉鍧 + * + * @access public + * @param string $str + * @return boolean + */ + public static function url($str) + { + $parts = @parse_url($str); + if (!$parts) { + return false; + } + + return isset($parts['scheme']) && + in_array($parts['scheme'], array('http', 'https', 'ftp')) && + !preg_match('/(\(|\)|\\\|"|<|>|[\x00-\x08]|[\x0b-\x0c]|[\x0e-\x19])/', $str); + } + + /** + * Alpha + * + * @access public + * @param string + * @return boolean + */ + public static function alpha($str) + { + return preg_match("/^([a-z])+$/i", $str) ? true : false; + } + + /** + * Alpha-numeric + * + * @access public + * @param string + * @return boolean + */ + public static function alphaNumeric($str) + { + return preg_match("/^([a-z0-9])+$/i", $str); + } + + /** + * Alpha-numeric with underscores and dashes + * + * @access public + * @param string + * @return boolean + */ + public static function alphaDash($str) + { + return preg_match("/^([_a-z0-9-])+$/i", $str) ? true : false; + } + + /** + * 瀵箈ss瀛楃涓茬殑妫娴 + * + * @access public + * @param string $str + * @return boolean + */ + public static function xssCheck($str) + { + $search = 'abcdefghijklmnopqrstuvwxyz'; + $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $search .= '1234567890!@#$%^&*()'; + $search .= '~`";:?+/={}[]-_|\'\\'; + + for ($i = 0; $i < strlen($search); $i++) { + // ;? matches the ;, which is optional + // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars + + // @ @ search for the hex values + $str = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $str); // with a ; + // @ @ 0{0,7} matches '0' zero to seven times + $str = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $str); // with a ; + } + + return !preg_match('/(\(|\)|\\\|"|<|>|[\x00-\x08]|[\x0b-\x0c]|[\x0e-\x19]|' . "\r|\n|\t" . ')/', $str); + } + + /** + * Numeric + * + * @access public + * @param integer + * @return boolean + */ + public static function isFloat($str) + { + return preg_match("/^[0-9\.]+$/", $str); + } + + /** + * Is Numeric + * + * @access public + * @param string + * @return boolean + */ + public static function isInteger($str) + { + return is_numeric($str); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget.php" new file mode 100644 index 0000000..9f45cdb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget.php" @@ -0,0 +1,420 @@ +request = $request; + $this->response = $response; + $this->parameter = new Typecho_Config(); + + if (!empty($params)) { + $this->parameter->setDefault($params); + } + } + + /** + * 瑙f瀽鍥炶皟 + * + * @param array $matches + * @access protected + * @return string + */ + protected function __parseCallback($matches) + { + return $this->{$matches[1]}; + } + + /** + * execute function. + * + * @access public + * @return void + */ + public function execute(){} + + /** + * post浜嬩欢瑙﹀彂 + * + * @param boolean $condition 瑙﹀彂鏉′欢 + * @return mixed + */ + public function on($condition) + { + if ($condition) { + return $this; + } else { + return new Typecho_Widget_Helper_Empty(); + } + } + + /** + * 鑾峰彇瀵硅薄鎻掍欢鍙ユ焺 + * + * @access public + * @param string $handle 鍙ユ焺 + * @return Typecho_Plugin + */ + public function pluginHandle($handle = NULL) + { + return Typecho_Plugin::factory(empty($handle) ? get_class($this) : $handle); + } + + /** + * widget鍒悕 + * + * @param string $widgetClass + * @param string $aliasClass + * @static + * @access public + * @return void + */ + public static function alias($widgetClass, $aliasClass) + { + self::$_widgetAlias[$widgetClass] = $aliasClass; + } + + /** + * 宸ュ巶鏂规硶,灏嗙被闈欐佸寲鏀剧疆鍒板垪琛ㄤ腑 + * + * @access public + * @param string $alias 缁勪欢鍒悕 + * @param mixed $params 浼犻掔殑鍙傛暟 + * @param mixed $request 鍓嶇鍙傛暟 + * @param boolean $enableResponse 鏄惁鍏佽http鍥炴墽 + * @return object + * @throws Typecho_Exception + */ + public static function widget($alias, $params = NULL, $request = NULL, $enableResponse = true) + { + $parts = explode('@', $alias); + $className = $parts[0]; + $alias = empty($parts[1]) ? $className : $parts[1]; + + if (isset(self::$_widgetAlias[$className])) { + $className = self::$_widgetAlias[$className]; + } + + if (!isset(self::$_widgetPool[$alias])) { + /** 濡傛灉绫讳笉瀛樺湪 */ + if (!class_exists($className)) { + throw new Typecho_Widget_Exception($className); + } + + /** 鍒濆鍖杛equest */ + if (!empty($request)) { + $requestObject = new Typecho_Request(); + $requestObject->setParams($request); + } else { + $requestObject = Typecho_Request::getInstance(); + } + + /** 鍒濆鍖杛esponse */ + $responseObject = $enableResponse ? Typecho_Response::getInstance() + : Typecho_Widget_Helper_Empty::getInstance(); + + /** 鍒濆鍖栫粍浠 */ + $widget = new $className($requestObject, $responseObject, $params); + + $widget->execute(); + self::$_widgetPool[$alias] = $widget; + } + + return self::$_widgetPool[$alias]; + } + + /** + * 閲婃斁缁勪欢 + * + * @access public + * @param string $alias 缁勪欢鍚嶇О + * @return void + */ + public static function destory($alias) + { + if (isset(self::$_widgetPool[$alias])) { + unset(self::$_widgetPool[$alias]); + } + } + + /** + * 灏嗙被鏈韩璧嬪 + * + * @param string $variable 鍙橀噺鍚 + * @return void + */ + public function to(&$variable) + { + return $variable = $this; + } + + /** + * 鏍煎紡鍖栬В鏋愬爢鏍堝唴鐨勬墍鏈夋暟鎹 + * + * @param string $format 鏁版嵁鏍煎紡 + * @return void + */ + public function parse($format) + { + while ($this->next()) { + echo preg_replace_callback("/\{([_a-z0-9]+)\}/i", + array($this, '__parseCallback'), $format); + } + } + + /** + * 灏嗘瘡涓琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @param array $value 姣忎竴琛岀殑鍊 + * @return array + */ + public function push(array $value) + { + //灏嗚鏁版嵁鎸夐『搴忕疆浣 + $this->row = $value; + $this->length ++; + + $this->stack[] = $value; + return $value; + } + + /** + * 鏍规嵁浣欐暟杈撳嚭 + * + * @access public + * @param string $param 闇瑕佽緭鍑虹殑鍊 + * @return void + */ + public function alt() + { + $args = func_get_args(); + $num = func_num_args(); + $split = $this->sequence % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 杈撳嚭椤哄簭鍊 + * + * @access public + * @return void + */ + public function sequence() + { + echo $this->sequence; + } + + /** + * 杈撳嚭鏁版嵁闀垮害 + * + * @access public + * @return void + */ + public function length() + { + echo $this->length; + } + + /** + * 杩斿洖鍫嗘爤鏄惁涓虹┖ + * + * @return boolean + */ + public function have() + { + return !empty($this->stack); + } + + /** + * 杩斿洖鍫嗘爤姣忎竴琛岀殑鍊 + * + * @return array + */ + public function next() + { + if ($this->stack) { + $this->row = @$this->stack[key($this->stack)]; + next($this->stack); + $this->sequence ++; + } + + if (!$this->row) { + reset($this->stack); + if ($this->stack) { + $this->row = $this->stack[key($this->stack)]; + } + + $this->sequence = 0; + return false; + } + + return $this->row; + } + + /** + * 榄旀湳鍑芥暟,鐢ㄤ簬鎸傛帴鍏跺畠鍑芥暟 + * + * @access public + * @param string $name 鍑芥暟鍚 + * @param array $args 鍑芥暟鍙傛暟 + * @return void + */ + public function __call($name, $args) + { + echo $this->{$name}; + } + + /** + * 榄旀湳鍑芥暟,鐢ㄤ簬鑾峰彇鍐呴儴鍙橀噺 + * + * @access public + * @param string $name 鍙橀噺鍚 + * @return mixed + */ + public function __get($name) + { + if (array_key_exists($name, $this->row)) { + return $this->row[$name]; + } else { + $method = '___' . $name; + + if (method_exists($this, $method)) { + return $this->$method(); + } else { + $return = $this->pluginHandle()->trigger($plugged)->{$method}($this); + if ($plugged) { + return $return; + } + } + } + + return NULL; + } + + /** + * 璁惧畾鍫嗘爤姣忎竴琛岀殑鍊 + * + * @param string $name 鍊煎搴旂殑閿 + * @param mixed $value 鐩稿簲鐨勫 + * @return void + */ + public function __set($name, $value) + { + $this->row[$name] = $value; + } + + /** + * 楠岃瘉鍫嗘爤鍊兼槸鍚﹀瓨鍦 + * + * @access public + * @param string $name + * @return boolean + */ + public function __isSet($name) + { + return isset($this->row[$name]); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Exception.php" new file mode 100644 index 0000000..d3587c9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Exception.php" @@ -0,0 +1,17 @@ +setClose(false); + + /** 璁剧疆琛ㄥ崟灞炴 */ + $this->setAction($action); + $this->setMethod($method); + $this->setEncodeType($enctype); + } + + /** + * 璁剧疆琛ㄥ崟缂栫爜鏂规 + * + * @access public + * @param string $enctype 缂栫爜鏂规硶 + * @return Typecho_Widget_Helper_Form + */ + public function setEncodeType($enctype) + { + $this->setAttribute('enctype', $enctype); + return $this; + } + + /** + * 澧炲姞杈撳叆鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Form_Abstract $input 杈撳叆鍏冪礌 + * @return Typecho_Widget_Helper_Form + */ + public function addInput(Typecho_Widget_Helper_Form_Element $input) + { + $this->_inputs[$input->name] = $input; + $this->addItem($input); + return $this; + } + + /** + * 澧炲姞鍏冪礌(閲嶈浇) + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 琛ㄥ崟鍏冪礌 + * @return Typecho_Widget_Helper_Layout + */ + public function addItem(Typecho_Widget_Helper_Layout $item) + { + if ($item instanceof Typecho_Widget_Helper_Form_Submit) { + $this->addItem($item); + } else { + parent::addItem($item); + } + + return $this; + } + + /** + * 鑾峰彇杈撳叆椤 + * + * @access public + * @param string $name 杈撳叆椤瑰悕绉 + * @return mixed + */ + public function getInput($name) + { + return $this->_inputs[$name]; + } + + /** + * 鑾峰彇鎵鏈夎緭鍏ラ」鐨勬彁浜ゅ + * + * @access public + * @return array + */ + public function getAllRequest() + { + $result = array(); + $source = (self::POST_METHOD == $this->getAttribute('method')) ? $_POST : $_GET; + + foreach ($this->_inputs as $name => $input) { + $result[$name] = isset($source[$name]) ? $source[$name] : NULL; + } + return $result; + } + + /** + * 璁剧疆琛ㄥ崟鎻愪氦鏂规硶 + * + * @access public + * @param string $method 琛ㄥ崟鎻愪氦鏂规硶 + * @return Typecho_Widget_Helper_Form + */ + public function setMethod($method) + { + $this->setAttribute('method', $method); + return $this; + } + + /** + * 璁剧疆琛ㄥ崟鎻愪氦鐩殑 + * + * @access public + * @param string $action 琛ㄥ崟鎻愪氦鐩殑 + * @return Typecho_Widget_Helper_Form + */ + public function setAction($action) + { + $this->setAttribute('action', $action); + return $this; + } + + /** + * 鑾峰彇姝よ〃鍗曠殑鎵鏈夎緭鍏ラ」鍥烘湁鍊 + * + * @access public + * @return array + */ + public function getValues() + { + $values = array(); + + foreach ($this->_inputs as $name => $input) { + $values[$name] = $input->value; + } + return $values; + } + + /** + * 鑾峰彇姝よ〃鍗曠殑鎵鏈夎緭鍏ラ」 + * + * @access public + * @return array + */ + public function getInputs() + { + return $this->_inputs; + } + + /** + * 鑾峰彇鎻愪氦鏁版嵁婧 + * + * @access public + * @param array $params 鏁版嵁鍙傛暟闆 + * @return array + */ + public function getParams(array $params) + { + $result = array(); + $source = (self::POST_METHOD == $this->getAttribute('method')) ? $_POST : $_GET; + + foreach ($params as $param) { + $result[$param] = isset($source[$param]) ? $source[$param] : NULL; + } + + return $result; + } + + /** + * 楠岃瘉琛ㄥ崟 + * + * @access public + * @return void + */ + public function validate() + { + $validator = new Typecho_Validate(); + $rules = array(); + + foreach ($this->_inputs as $name => $input) { + $rules[$name] = $input->rules; + } + + $id = md5(implode('"', array_keys($this->_inputs))); + + /** 琛ㄥ崟鍊 */ + $formData = $this->getParams(array_keys($rules)); + $error = $validator->run($formData, $rules); + + if ($error) { + /** 鍒╃敤session璁板綍閿欒 */ + $_SESSION['__typecho_form_message_' . $id] = $error; + + /** 鍒╃敤session璁板綍琛ㄥ崟鍊 */ + $_SESSION['__typecho_form_record_' . $id] = $formData; + } + + return $error; + } + + /** + * 鏄剧ず琛ㄥ崟 + * + * @access public + * @return void + */ + public function render() + { + $id = md5(implode('"', array_keys($this->_inputs))); + + /** 鎭㈠琛ㄥ崟鍊 */ + if (isset($_SESSION['__typecho_form_record_' . $id])) { + $record = $_SESSION['__typecho_form_record_' . $id]; + $message = $_SESSION['__typecho_form_message_' . $id]; + foreach ($this->_inputs as $name => $input) { + $input->value(isset($record[$name]) ? $record[$name] : $input->value); + + /** 鏄剧ず閿欒娑堟伅 */ + if (isset($message[$name])) { + $input->message($message[$name]); + } + } + + unset($_SESSION['__typecho_form_record_' . $id]); + } + + parent::render(); + unset($_SESSION['__typecho_form_message_' . $id]); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" new file mode 100644 index 0000000..f4807e8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" @@ -0,0 +1,322 @@ + 'typecho-option', 'id' => 'typecho-option-item-' . $name . '-' . self::$uniqueId)); + $this->name = $name; + self::$uniqueId ++; + + /** 杩愯鑷畾涔夊垵濮嬪嚱鏁 */ + $this->init(); + + /** 鍒濆鍖栬〃鍗曟爣棰 */ + if (NULL !== $label) { + $this->label($label); + } + + /** 鍒濆鍖栬〃鍗曢」 */ + $this->input = $this->input($name, $options); + + /** 鍒濆鍖栬〃鍗曞 */ + if (NULL !== $value) { + $this->value($value); + } + + /** 鍒濆鍖栬〃鍗曟弿杩 */ + if (NULL !== $description) { + $this->description($description); + } + } + + /** + * filterValue + * + * @param mixed $value + * @access protected + * @return string + */ + protected function filterValue($value) + { + if (preg_match_all('/[_0-9a-z-]+/i', $value, $matches)) { + return implode('-', $matches[0]); + } + + return ''; + } + + /** + * 鑷畾涔夊垵濮嬪嚱鏁 + * + * @access public + * @return void + */ + public function init(){} + + /** + * 鍒涘缓琛ㄥ崟鏍囬 + * + * @access public + * @param string $value 鏍囬瀛楃涓 + * @return Typecho_Widget_Helper_Form_Element + */ + public function label($value) + { + /** 鍒涘缓鏍囬鍏冪礌 */ + if (empty($this->label)) { + $this->label = new Typecho_Widget_Helper_Layout('label', array('class' => 'typecho-label')); + $this->container($this->label); + } + + $this->label->html($value); + return $this; + } + + /** + * 鍦ㄥ鍣ㄩ噷澧炲姞鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 琛ㄥ崟鍏冪礌 + * @return $this + */ + public function container(Typecho_Widget_Helper_Layout $item) + { + /** 鍒涘缓琛ㄥ崟瀹瑰櫒 */ + if (empty($this->container)) { + $this->container = new Typecho_Widget_Helper_Layout('li'); + $this->addItem($this->container); + } + + $this->container->addItem($item); + return $this; + } + + /** + * 璁剧疆鎻愮ず淇℃伅 + * + * @access public + * @param string $message 鎻愮ず淇℃伅 + * @return Typecho_Widget_Helper_Form_Element + */ + public function message($message) + { + if (empty($this->message)) { + $this->message = new Typecho_Widget_Helper_Layout('p', array('class' => 'message error')); + $this->container($this->message); + } + + $this->message->html($message); + return $this; + } + + /** + * 璁剧疆鎻忚堪淇℃伅 + * + * @access public + * @param string $description 鎻忚堪淇℃伅 + * @return Typecho_Widget_Helper_Form_Element + */ + public function description($description) + { + /** 鍒涘缓鎻忚堪鍏冪礌 */ + if (empty($this->description)) { + $this->description = new Typecho_Widget_Helper_Layout('p', array('class' => 'description')); + $this->container($this->description); + } + + $this->description->html($description); + return $this; + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access public + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return Typecho_Widget_Helper_Form_Element + */ + public function value($value) + { + $this->value = $value; + $this->_value($value); + return $this; + } + + /** + * 澶氳杈撳嚭妯″紡 + * + * @access public + * @return Typecho_Widget_Helper_Layout + */ + public function multiline() + { + $item = new Typecho_Widget_Helper_Layout('span'); + $this->multiline[] = $item; + return $item; + } + + /** + * 澶氳杈撳嚭妯″紡 + * + * @access public + * @return Typecho_Widget_Helper_Form_Element + */ + public function multiMode() + { + foreach ($this->multiline as $item) { + $item->setAttribute('class', 'multiline'); + } + return $this; + } + + /** + * 鍒濆鍖栧綋鍓嶈緭鍏ラ」 + * + * @access public + * @param Typecho_Widget_Helper_Layout $container 瀹瑰櫒瀵硅薄 + * @param string $name 琛ㄥ崟鍏冪礌鍚嶇О + * @param array $options 閫夋嫨椤 + * @return Typecho_Widget_Helper_Form_Element + */ + abstract public function input($name = NULL, array $options = NULL); + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + abstract protected function _value($value); + + /** + * 澧炲姞楠岃瘉鍣 + * + * @access public + * @return Typecho_Widget_Helper_Form_Element + */ + public function addRule($name) + { + $this->rules[] = func_get_args(); + return $this; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" new file mode 100644 index 0000000..8ae5265 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" @@ -0,0 +1,81 @@ + $label) { + $this->_options[$value] = new Typecho_Widget_Helper_Layout('input'); + $item = $this->multiline(); + $id = $this->name . '-' . $this->filterValue($value); + $this->inputs[] = $this->_options[$value]; + + $item->addItem($this->_options[$value]->setAttribute('name', $this->name . '[]') + ->setAttribute('type', 'checkbox') + ->setAttribute('value', $value) + ->setAttribute('id', $id)); + + $labelItem = new Typecho_Widget_Helper_Layout('label'); + $item->addItem($labelItem->setAttribute('for', $id)->html($label)); + $this->container($item); + } + + return current($this->_options); + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + $values = is_array($value) ? $value : array($value); + + foreach ($this->_options as $option) { + $option->removeAttribute('checked'); + } + + foreach ($values as $value) { + if (isset($this->_options[$value])) { + $this->_options[$value]->setAttribute('checked', 'true'); + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" new file mode 100644 index 0000000..248d935 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" @@ -0,0 +1,84 @@ +name = $name; + self::$uniqueId ++; + + /** 杩愯鑷畾涔夊垵濮嬪嚱鏁 */ + $this->init(); + + /** 鍒濆鍖栬〃鍗曢」 */ + $this->input = $this->input($name, $options); + + /** 鍒濆鍖栬〃鍗曞 */ + if (NULL !== $value) { + $this->value($value); + } + } + + /** + * 鑷畾涔夊垵濮嬪嚱鏁 + * + * @access public + * @return void + */ + public function init() + {} + + /** + * 鍒濆鍖栧綋鍓嶈緭鍏ラ」 + * + * @access public + * @param string $name 琛ㄥ崟鍏冪礌鍚嶇О + * @param array $options 閫夋嫨椤 + * @return Typecho_Widget_Helper_Layout + */ + public function input($name = NULL, array $options = NULL) + { + $input = new Typecho_Widget_Helper_Layout('input'); + $this->inputs[] = $input; + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', $value); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" new file mode 100644 index 0000000..c3c9214 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" @@ -0,0 +1,62 @@ +setAttribute('style', 'display:none'); + } + + /** + * 鍒濆鍖栧綋鍓嶈緭鍏ラ」 + * + * @access public + * @param string $name 琛ㄥ崟鍏冪礌鍚嶇О + * @param array $options 閫夋嫨椤 + * @return Typecho_Widget_Helper_Layout + */ + public function input($name = NULL, array $options = NULL) + { + $input = new Typecho_Widget_Helper_Layout('input', array('name' => $name, 'type' => 'hidden')); + $this->container($input); + $this->inputs[] = $input; + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" new file mode 100644 index 0000000..347a540 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" @@ -0,0 +1,52 @@ + $name . '-0-' . self::$uniqueId, + 'name' => $name, 'type' => 'password', 'class' => 'password')); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->container($input); + $this->inputs[] = $input; + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" new file mode 100644 index 0000000..c487b79 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" @@ -0,0 +1,79 @@ + $label) { + $this->_options[$value] = new Typecho_Widget_Helper_Layout('input'); + $item = $this->multiline(); + $id = $this->name . '-' . $this->filterValue($value); + $this->inputs[] = $this->_options[$value]; + + $item->addItem($this->_options[$value]->setAttribute('name', $this->name) + ->setAttribute('type', 'radio') + ->setAttribute('value', $value) + ->setAttribute('id', $id)); + + $labelItem = new Typecho_Widget_Helper_Layout('label'); + $item->addItem($labelItem->setAttribute('for', $id)->html($label)); + $this->container($item); + } + + return current($this->_options); + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + foreach ($this->_options as $option) { + $option->removeAttribute('checked'); + } + + if (isset($this->_options[$value])) { + $this->value = $value; + $this->_options[$value]->setAttribute('checked', 'true'); + $this->input = $this->_options[$value]; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" new file mode 100644 index 0000000..e589990 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" @@ -0,0 +1,72 @@ +container($input->setAttribute('name', $name) + ->setAttribute('id', $name . '-0-' . self::$uniqueId)); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->inputs[] = $input; + + foreach ($options as $value => $label) { + $this->_options[$value] = new Typecho_Widget_Helper_Layout('option'); + $input->addItem($this->_options[$value]->setAttribute('value', $value)->html($label)); + } + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + foreach ($this->_options as $option) { + $option->removeAttribute('selected'); + } + + if (isset($this->_options[$value])) { + $this->_options[$value]->setAttribute('selected', 'true'); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" new file mode 100644 index 0000000..1272f7c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" @@ -0,0 +1,52 @@ +setAttribute('class', 'typecho-option typecho-option-submit'); + $input = new Typecho_Widget_Helper_Layout('button', array('type' => 'submit')); + $this->container($input); + $this->inputs[] = $input; + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + $this->input->html($value); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" new file mode 100644 index 0000000..78d1939 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" @@ -0,0 +1,53 @@ + $name . '-0-' . self::$uniqueId, + 'name' => $name, 'type' => 'text', 'class' => 'text')); + $this->container($input); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->inputs[] = $input; + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param mixed $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" new file mode 100644 index 0000000..ec5adac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" @@ -0,0 +1,52 @@ + $name . '-0-' . self::$uniqueId, 'name' => $name)); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->container($input->setClose(false)); + $this->inputs[] = $input; + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->html(htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Layout.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Layout.php" new file mode 100644 index 0000000..b90c081 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/Layout.php" @@ -0,0 +1,352 @@ +setTagName($tagName); + + if (!empty($attributes)) { + foreach ($attributes as $attributeName => $attributeValue) { + $this->setAttribute($attributeName, $attributeValue); + } + } + } + + /** + * 澧炲姞鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 鍏冪礌 + * @return Typecho_Widget_Helper_Layout + */ + public function addItem(Typecho_Widget_Helper_Layout $item) + { + $item->setParent($this); + $this->_items[] = $item; + return $this; + } + + /** + * 鍒犻櫎鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 鍏冪礌 + * @return Typecho_Widget_Helper_Layout + */ + public function removeItem(Typecho_Widget_Helper_Layout $item) + { + unset($this->_items[array_search($item, $this->_items)]); + return $this; + } + + /** + * getItems + * + * @access public + * @return array + */ + public function getItems() + { + return $this->_items; + } + + /** + * 璁剧疆鍐呴儴鏁版嵁 + * + * @access public + * @param mixed $html 鍐呴儴鏁版嵁 + * @return unknown + */ + public function html($html = false) + { + if (false === $html) { + if (empty($this->_html)) { + foreach ($this->_items as $item) { + $item->render(); + } + } else { + echo $this->_html; + } + } else { + $this->_html = $html; + return $this; + } + } + + /** + * 璁剧疆鏍囩鍚 + * + * @access public + * @param string $tagName 鏍囩鍚 + * @return void + */ + public function setTagName($tagName) + { + $this->_tagName = $tagName; + } + + /** + * getTagName + * + * @param mixed $tagName + * @access public + * @return void + */ + public function getTagName($tagName) + {} + + /** + * 璁剧疆琛ㄥ崟灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @param string $attributeValue 灞炴у + * @return Typecho_Widget_Helper_Layout + */ + public function setAttribute($attributeName, $attributeValue) + { + $this->_attributes[$attributeName] = $attributeValue; + return $this; + } + + /** + * 绉婚櫎鏌愪釜灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return Typecho_Widget_Helper_Layout + */ + public function removeAttribute($attributeName) + { + if (isset($this->_attributes[$attributeName])) { + unset($this->_attributes[$attributeName]); + } + + return $this; + } + + /** + * 鑾峰彇灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕 + * @return string + */ + public function getAttribute($attributeName) + { + return isset($this->_attributes[$attributeName]) ? $this->_attributes[$attributeName] : NULL; + } + + /** + * 璁剧疆鏄惁鑷棴鍚 + * + * @access public + * @param boolean $close 鏄惁鑷棴鍚 + * @return Typecho_Widget_Helper_Layout + */ + public function setClose($close) + { + $this->_forceClose = $close; + return $this; + } + + /** + * 璁剧疆鐖惰妭鐐 + * + * @access public + * @param Typecho_Widget_Helper_Layout $parent 鐖惰妭鐐 + * @return Typecho_Widget_Helper_Layout + */ + public function setParent(Typecho_Widget_Helper_Layout $parent) + { + $this->_parent = $parent; + return $this; + } + + /** + * 鑾峰彇鐖惰妭鐐 + * + * @access public + * @return Typecho_Widget_Helper_Layout + */ + public function getParent() + { + return $this->_parent; + } + + /** + * 澧炲姞鍒版煇甯冨眬鍏冪礌闆嗗悎涓 + * + * @access public + * @param Typecho_Widget_Helper_Layout $parent 甯冨眬瀵硅薄 + * @return Typecho_Widget_Helper_Layout + */ + public function appendTo(Typecho_Widget_Helper_Layout $parent) + { + $parent->addItem($this); + return $this; + } + + /** + * 寮濮嬫爣绛 + * + * @access public + * @return void + */ + public function start() + { + /** 杈撳嚭鏍囩 */ + echo $this->_tagName ? "<{$this->_tagName}" : NULL; + + /** 杈撳嚭灞炴 */ + foreach ($this->_attributes as $attributeName => $attributeValue) { + echo " {$attributeName}=\"{$attributeValue}\""; + } + + /** 鏀寔鑷棴鍚 */ + if (!$this->_close && $this->_tagName) { + echo ">\n"; + } + } + + /** + * 缁撴潫鏍囩 + * + * @access public + * @return void + */ + public function end() + { + if ($this->_tagName) { + echo $this->_close ? " />\n" : "_tagName}>\n"; + } + } + + /** + * 璁剧疆灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @param string $attributeValue 灞炴у + * @return void + */ + public function __set($name, $value) + { + $this->_attributes[$name] = $value; + } + + /** + * 鑾峰彇灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return void + */ + public function __get($name) + { + return isset($this->_attributes[$name]) ? $this->_attributes[$name] : NULL; + } + + /** + * 杈撳嚭鎵鏈夊厓绱 + * + * @access public + * @return void + */ + public function render() + { + if (empty($this->_items) && empty($this->_html)) { + $this->_close = true; + } + + if (NULL !== $this->_forceClose) { + $this->_close = $this->_forceClose; + } + + $this->start(); + $this->html(); + $this->end(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" new file mode 100644 index 0000000..12d5b96 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" @@ -0,0 +1,131 @@ +_total = $total; + $this->_totalPage = ceil($total / $pageSize); + $this->_currentPage = $currentPage; + $this->_pageSize = $pageSize; + $this->_pageTemplate = $pageTemplate; + + if (($currentPage > $this->_totalPage || $currentPage < 1) && $total > 0) { + throw new Typecho_Widget_Exception('Page Not Exists', 404); + } + } + + /** + * 璁剧疆椤甸潰鍗犱綅绗 + * + * @access protected + * @param string $holder 椤甸潰鍗犱綅绗 + * @return void + */ + public function setPageHolder($holder) + { + $this->_pageHolder = array('{' . $holder . '}', + str_replace(array('{', '}'), array('%7B', '%7D'), $holder)); + } + + /** + * 璁剧疆閿氱偣 + * + * @access public + * @param string $anchor 閿氱偣 + * @return void + */ + public function setAnchor($anchor) + { + $this->_anchor = '#' . $anchor; + } + + /** + * 杈撳嚭鏂规硶 + * + * @access public + * @return void + */ + public function render() + { + throw new Typecho_Widget_Exception(get_class($this) . ':' . __METHOD__, 500); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" new file mode 100644 index 0000000..57b9df4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" @@ -0,0 +1,120 @@ +_total < 1) { + return; + } + + $default = array( + 'itemTag' => 'li', + 'textTag' => 'span', + 'currentClass' => 'current', + 'prevClass' => 'prev', + 'nextClass' => 'next' + ); + + $template = array_merge($default, $template); + extract($template); + + // 瀹氫箟item + $itemBegin = empty($itemTag) ? '' : ('<' . $itemTag . '>'); + $itemCurrentBegin = empty($itemTag) ? '' : ('<' . $itemTag + . (empty($currentClass) ? '' : ' class="' . $currentClass . '"') . '>'); + $itemPrevBegin = empty($itemTag) ? '' : ('<' . $itemTag + . (empty($prevClass) ? '' : ' class="' . $prevClass . '"') . '>'); + $itemNextBegin = empty($itemTag) ? '' : ('<' . $itemTag + . (empty($nextClass) ? '' : ' class="' . $nextClass . '"') . '>'); + $itemEnd = empty($itemTag) ? '' : (''); + $textBegin = empty($textTag) ? '' : ('<' . $textTag . '>'); + $textEnd = empty($textTag) ? '' : (''); + $linkBegin = ''; + $linkCurrentBegin = empty($itemTag) ? ('') + : $linkBegin; + $linkPrevBegin = empty($itemTag) ? ('') + : $linkBegin; + $linkNextBegin = empty($itemTag) ? ('') + : $linkBegin; + $linkEnd = ''; + + $from = max(1, $this->_currentPage - $splitPage); + $to = min($this->_totalPage, $this->_currentPage + $splitPage); + + //杈撳嚭涓婁竴椤 + if ($this->_currentPage > 1) { + echo $itemPrevBegin . sprintf($linkPrevBegin, + str_replace($this->_pageHolder, $this->_currentPage - 1, $this->_pageTemplate) . $this->_anchor) + . $prevWord . $linkEnd . $itemEnd; + } + + //杈撳嚭绗竴椤 + if ($from > 1) { + echo $itemBegin . sprintf($linkBegin, str_replace($this->_pageHolder, 1, $this->_pageTemplate) . $this->_anchor) + . '1' . $linkEnd . $itemEnd; + + if ($from > 2) { + //杈撳嚭鐪佺暐鍙 + echo $itemBegin . $textBegin . $splitWord . $textEnd . $itemEnd; + } + } + + //杈撳嚭涓棿椤 + for ($i = $from; $i <= $to; $i ++) { + $current = ($i == $this->_currentPage); + + echo ($current ? $itemCurrentBegin : $itemBegin) . sprintf(($current ? $linkCurrentBegin : $linkBegin), + str_replace($this->_pageHolder, $i, $this->_pageTemplate) . $this->_anchor) + . $i . $linkEnd . $itemEnd; + } + + //杈撳嚭鏈鍚庨〉 + if ($to < $this->_totalPage) { + if ($to < $this->_totalPage - 1) { + echo $itemBegin . $textBegin . $splitWord . $textEnd . $itemEnd; + } + + echo $itemBegin . sprintf($linkBegin, str_replace($this->_pageHolder, $this->_totalPage, $this->_pageTemplate) . $this->_anchor) + . $this->_totalPage . $linkEnd . $itemEnd; + } + + //杈撳嚭涓嬩竴椤 + if ($this->_currentPage < $this->_totalPage) { + echo $itemNextBegin . sprintf($linkNextBegin, + str_replace($this->_pageHolder, $this->_currentPage + 1, $this->_pageTemplate) . $this->_anchor) + . $nextWord . $linkEnd . $itemEnd; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" new file mode 100644 index 0000000..d90bba0 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" @@ -0,0 +1,67 @@ +prev($prevWord); + $this->next($nextWord); + } + + /** + * 杈撳嚭涓婁竴椤 + * + * @access public + * @param string $prevWord 涓婁竴椤垫枃瀛 + * @return void + */ + public function prev($prevWord = 'PREV') + { + //杈撳嚭涓婁竴椤 + if ($this->_total > 0 && $this->_currentPage > 1) { + echo ''; + } + } + + /** + * 杈撳嚭涓嬩竴椤 + * + * @access public + * @param string $prevWord 涓嬩竴椤垫枃瀛 + * @return void + */ + public function next($nextWord = 'NEXT') + { + //杈撳嚭涓嬩竴椤 + if ($this->_total > 0 && $this->_currentPage < $this->_totalPage) { + echo ''; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Upgrade.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Upgrade.php" new file mode 100644 index 0000000..79614bb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Upgrade.php" @@ -0,0 +1,1207 @@ +query($db->select('coid', 'text')->from('table.comments') + ->order('coid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $text = nl2br($row['text']); + + $db->query($db->update('table.comments') + ->rows(array('text' => $text)) + ->where('coid = ?', $row['coid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + + /** 杞崲鍐呭 */ + $i = 1; + + while (true) { + $result = $db->query($db->select('cid', 'text')->from('table.contents') + ->order('cid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $text = preg_replace( + array("/\s*

    /is", "/\s*<\/p>\s*/is", "/\s*\s*/is", + "/\s*<(div|blockquote|pre|table|ol|ul)>/is", "/<\/(div|blockquote|pre|table|ol|ul)>\s*/is"), + array('', "\n\n", "\n", "\n\n<\\1>", "\n\n"), + $row['text']); + + $db->query($db->update('table.contents') + ->rows(array('text' => $text)) + ->where('cid = ?', $row['cid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + } + + /** + * 鍗囩骇鑷9.1.14 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_4r9_1_14($db, $options) + { + if (is_writeable(__TYPECHO_ROOT_DIR__ . '/config.inc.php')) { + $handle = fopen(__TYPECHO_ROOT_DIR__ . '/config.inc.php', 'ab'); + fwrite($handle, ' +/** 鍒濆鍖栨椂鍖 */ +Typecho_Date::setTimezoneOffset($options->timezone); +'); + fclose($handle); + } else { + throw new Typecho_Exception(_t('config.inc.php 鏂囦欢鏃犳硶鍐欏叆, 璇峰皢瀹冪殑鏉冮檺璁剧疆涓哄彲鍐')); + } + } + + /** + * 鍗囩骇鑷9.2.3 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_5r9_2_3($db, $options) + { + /** 杞崲璇勮 */ + $i = 1; + + while (true) { + $result = $db->query($db->select('coid', 'text')->from('table.comments') + ->order('coid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $text = preg_replace("/\s*\s*/i", "\n", $row['text']); + + $db->query($db->update('table.comments') + ->rows(array('text' => $text)) + ->where('coid = ?', $row['coid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + } + + /** + * 鍗囩骇鑷9.2.18 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_5r9_2_18($db, $options) + { + /** 鍗囩骇缂栬緫鍣ㄦ帴鍙 */ + $db->query($db->update('table.options') + ->rows(array('value' => 350)) + ->where('name = ?', 'editorSize')); + } + + /** + * 鍗囩骇鑷9.2.25 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_5r9_2_25($db, $options) + { + /** 鍗囩骇缂栬緫鍣ㄦ帴鍙 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'useRichEditor', 'user' => 0, 'value' => 1))); + } + + /** + * 鍗囩骇鑷9.4.3 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_6r9_4_3($db, $options) + { + /** 淇敼鏁版嵁搴撳瓧娈 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + //鍒犻櫎鑰佹暟鎹 + try { + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query('ALTER TABLE `' . $prefix . 'users` DROP `meta`', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'users" DROP COLUMN "meta"', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'users_' . $uuid . ' ( "uid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(32) default NULL , + "password" varchar(64) default NULL , + "mail" varchar(200) default NULL , + "url" varchar(200) default NULL , + "screenName" varchar(32) default NULL , + "created" int(10) default \'0\' , + "activated" int(10) default \'0\' , + "logged" int(10) default \'0\' , + "group" varchar(16) default \'visitor\' , + "authCode" varchar(64) default NULL)', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'users_' . $uuid . ' ("uid", "name", "password", "mail", "url" + , "screenName", "created", "activated", "logged", "group", "authCode") SELECT "uid", "name", "password", "mail", "url" + , "screenName", "created", "activated", "logged", "group", "authCode" FROM ' . $prefix . 'users', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'users', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'users ( "uid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(32) default NULL , + "password" varchar(64) default NULL , + "mail" varchar(200) default NULL , + "url" varchar(200) default NULL , + "screenName" varchar(32) default NULL , + "created" int(10) default \'0\' , + "activated" int(10) default \'0\' , + "logged" int(10) default \'0\' , + "group" varchar(16) default \'visitor\' , + "authCode" varchar(64) default NULL)', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'users SELECT * FROM ' . $prefix . 'users_' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'users_' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'users_name ON ' . $prefix . 'users ("name")', Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'users_mail ON ' . $prefix . 'users ("mail")', Typecho_Db::WRITE); + + break; + + default: + break; + } + } catch (Typecho_Db_Exception $e) { + //do nothing + } + + //灏唖lug瀛楁闀垮害澧炲姞鍒200 + try { + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query("ALTER TABLE `" . $prefix . "contents` MODIFY COLUMN `slug` varchar(200)", Typecho_Db::WRITE); + $db->query("ALTER TABLE `" . $prefix . "metas` MODIFY COLUMN `slug` varchar(200)", Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'contents" ALTER COLUMN "slug" TYPE varchar(200)', Typecho_Db::WRITE); + $db->query('ALTER TABLE "' . $prefix . 'metas" ALTER COLUMN "slug" TYPE varchar(200)', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'contents' . $uuid . ' ( "cid" INTEGER NOT NULL PRIMARY KEY, + "title" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "created" int(10) default \'0\' , + "modified" int(10) default \'0\' , + "text" text , + "order" int(10) default \'0\' , + "authorId" int(10) default \'0\' , + "template" varchar(32) default NULL , + "type" varchar(16) default \'post\' , + "status" varchar(16) default \'publish\' , + "password" varchar(32) default NULL , + "commentsNum" int(10) default \'0\' , + "allowComment" char(1) default \'0\' , + "allowPing" char(1) default \'0\' , + "allowFeed" char(1) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents' . $uuid . ' SELECT * FROM ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'contents ( "cid" INTEGER NOT NULL PRIMARY KEY, + "title" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "created" int(10) default \'0\' , + "modified" int(10) default \'0\' , + "text" text , + "order" int(10) default \'0\' , + "authorId" int(10) default \'0\' , + "template" varchar(32) default NULL , + "type" varchar(16) default \'post\' , + "status" varchar(16) default \'publish\' , + "password" varchar(32) default NULL , + "commentsNum" int(10) default \'0\' , + "allowComment" char(1) default \'0\' , + "allowPing" char(1) default \'0\' , + "allowFeed" char(1) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents SELECT * FROM ' . $prefix . 'contents' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'contents_slug ON ' . $prefix . 'contents ("slug")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'contents_created ON ' . $prefix . 'contents ("created")', Typecho_Db::WRITE); + + $db->query('CREATE TABLE ' . $prefix . 'metas' . $uuid . ' ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas' . $uuid . ' SELECT * FROM ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'metas ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas SELECT * FROM ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'metas_slug ON ' . $prefix . 'metas ("slug")', Typecho_Db::WRITE); + + break; + + default: + break; + } + } catch (Typecho_Db_Exception $e) { + //do nothing + } + } + + /** + * 鍗囩骇鑷9.4.21 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_6r9_4_21($db, $options) + { + //鍒涘缓涓婁紶鐩綍 + $uploadDir = Typecho_Common::url(Widget_Upload::UPLOAD_PATH, __TYPECHO_ROOT_DIR__); + if (is_dir($uploadDir)) { + if (!is_writeable($uploadDir)) { + if (!@chmod($uploadDir, 0644)) { + throw new Typecho_Widget_Exception(_t('涓婁紶鐩綍鏃犳硶鍐欏叆, 璇锋墜鍔ㄥ皢瀹夎鐩綍涓嬬殑 %s 鐩綍鐨勬潈闄愯缃负鍙啓鐒跺悗缁х画鍗囩骇', Widget_Upload::UPLOAD_PATH)); + } + } + } else { + if (!@mkdir($uploadDir, 0644)) { + throw new Typecho_Widget_Exception(_t('涓婁紶鐩綍鏃犳硶鍒涘缓, 璇锋墜鍔ㄥ垱寤哄畨瑁呯洰褰曚笅鐨 %s 鐩綍, 骞跺皢瀹冪殑鏉冮檺璁剧疆涓哄彲鍐欑劧鍚庣户缁崌绾', Widget_Upload::UPLOAD_PATH)); + } + } + + /** 澧炲姞鑷畾涔変富椤 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'customHomePage', 'user' => 0, 'value' => 0))); + + /** 澧炲姞鏂囦欢涓婁紶鏁e垪鍑芥暟 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'uploadHandle', 'user' => 0, 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:12:"uploadHandle";}'))); + + /** 澧炲姞鏂囦欢鍒犻櫎鍑芥暟 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'deleteHandle', 'user' => 0, 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:12:"deleteHandle";}'))); + + /** 澧炲姞鏂囦欢灞曠幇鏁e垪鍑芥暟 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'attachmentHandle', 'user' => 0, 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:16:"attachmentHandle";}'))); + + /** 澧炲姞鏂囦欢鎵╁睍鍚 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'attachmentTypes', 'user' => 0, 'value' => '*.jpg;*.gif;*.png;*.zip;*.tar.gz'))); + + /** 澧炲姞璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pre = array_slice($routingTable, 0, 2); + $next = array_slice($routingTable, 2); + + $routingTable = array_merge($pre, array('attachment' => + array ( + 'url' => '/attachment/[cid:digital]/', + 'widget' => 'Widget_Archive', + 'action' => 'render', + )), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.6.1 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_6r9_6_1($db, $options) + { + /** 鍘绘帀鎵瑙佸嵆鎵寰楃紪杈戝櫒 */ + $db->query($db->delete('table.options') + ->where('name = ?', 'useRichEditor')); + + /** 淇鑷姩淇濆瓨鍊 */ + $db->query($db->update('table.options') + ->rows(array('value' => 0)) + ->where('name = ?', 'autoSave')); + + /** 澧炲姞鍫嗘ゼ妤煎眰鏁扮洰闄愬埗 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsMaxNestingLevels', 'user' => 0, 'value' => 5))); + } + + /** + * 鍗囩骇鑷9.6.16 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_6_16($db, $options) + { + /** 澧炲姞闄勪欢handle */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'modifyHandle', 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:12:"modifyHandle";}'))); + + /** 澧炲姞闄勪欢handle */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'attachmentDataHandle', 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:20:"attachmentDataHandle";}'))); + + /** 杞崲闄勪欢 */ + $i = 1; + + while (true) { + $result = $db->query($db->select('cid', 'text')->from('table.contents') + ->where('type = ?', 'attachment') + ->order('cid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $attachment = unserialize($row['text']); + $attachment['modifyHandle'] = array('Widget_Upload', 'modifyHandle'); + $attachment['attachmentDataHandle'] = array('Widget_Upload', 'attachmentDataHandle'); + + $db->query($db->update('table.contents') + ->rows(array('text' => serialize($attachment))) + ->where('cid = ?', $row['cid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + } + + /** + * 鍗囩骇鑷9.6.16.1 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_6_16_1($db, $options) + { + //淇敼action璺敱 + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $routingTable['do'] = array ( + 'url' => '/action/[action:alpha]', + 'widget' => 'Widget_Do', + 'action' => 'action' + ); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + + //骞叉帀鍨冨溇鏁版嵁 + $db->query($db->update('table.options') + ->rows(array('value' => 'a:0:{}')) + ->where('name = ?', 'actionTable')); + } + + /** + * 鍗囩骇鑷9.7.2 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_7_2($db, $options) + { + /** 澧炲姞榛樿鍐呭鏍煎紡 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'contentType', 'user' => 0, 'value' => 'text/html'))); + + /** 澧炲姞gzip寮鍏 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'gzip', 'user' => 0, 'value' => 0))); + + + if(is_writeable(__TYPECHO_ROOT_DIR__ . '/config.inc.php')) { + + $contents = file_get_contents(__TYPECHO_ROOT_DIR__ . '/config.inc.php'); + $contents = preg_replace("/Typecho_Common::init([^;]+);/is", "Typecho_Common::init(array( + 'autoLoad' => true, + 'exception' => 'Widget_ExceptionHandle', + 'gpc' => true +));", $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Widget::widget([^;]+);/is", '', $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Router::setRoutes([^;]+);/is", '', $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Plugin::init([^;]+);/is", '', $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Date::setTimezoneOffset([^;]+);/is", '', $contents); + file_put_contents(__TYPECHO_ROOT_DIR__ . '/config.inc.php', $contents); + + } else { + /** 鍗囩骇鎻愮ず */ + return _t('寤鸿鎮ㄥ湪鍗囩骇鍒 Typecho 0.7/9.7.2 浠ュ悗鐨勭増鏈悗, 绔嬪埢鎵ц浠ヤ笅浼樺寲姝ラ'); + } + } + + /** + * 鍗囩骇鑷9.9.2 + * 淇敼contents琛ㄧ殑text瀛楁绫诲瀷涓簂ongtext(浠呴檺mysql, pgsql鍜宻qlite閮芥槸涓嶉檺鍒堕暱搴︾殑) + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_2($db, $options) + { + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + if (false !== strpos($adapterName, 'Mysql')) { + $db->query("ALTER TABLE `{$prefix}contents` CHANGE `text` `text` LONGTEXT NULL DEFAULT NULL COMMENT '鍐呭鏂囧瓧'", Typecho_Db::WRITE); + } + } + + /** + * 鍗囩骇鑷9.9.15 + * 浼樺寲璺敱琛ㄧ粨鏋 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_15($db, $options) + { + /** 澧炲姞璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $do = $routingTable['do']; + unset($routingTable['do']); + + $pre = array_slice($routingTable, 0, 1); + $next = array_slice($routingTable, 1); + + $routingTable = array_merge($pre, array('do' => $do), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.9.22 + * 姝ゅ崌绾х敤浜庝慨澶嶄粠0.6鍗囩骇鏃舵崯鍧忕殑璺敱琛 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_22($db, $options) + { + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $routingTable['do'] = array ( + 'url' => '/action/[action:alpha]', + 'widget' => 'Widget_Do', + 'action' => 'action' + ); + + $do = $routingTable['do']; + unset($routingTable['do']); + + $pre = array_slice($routingTable, 0, 1); + $next = array_slice($routingTable, 1); + + $routingTable = array_merge($pre, array('do' => $do), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.9.27 + * 澧炲姞鎸変綔鑰呭綊妗 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_27($db, $options) + { + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pre = array_slice($routingTable, 0, 6); + $next = array_slice($routingTable, 6); + $next_pre = array_slice($next, 0, 5); + $next_next = array_slice($next, 5); + + $author = array ( + 'url' => '/author/[uid:digital]/', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $author_page = array ( + 'url' => '/author/[uid:digital]/[page:digital]/', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $routingTable = array_merge($pre, array('author' => $author), $next_pre, + array('author_page' => $author_page), $next_next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.10.16 + * 澧炲姞璇勮鍒嗛〉 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_10_16($db, $options) + { + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pre = array_slice($routingTable, 0, 20); + $next = array_slice($routingTable, 20); + + $commentPage = array ( + 'url' => '[permalink:string]/[commentType:alpha]-page-[commentPage:digital]', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $routingTable = array_merge($pre, array('comment_page' => $commentPage), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.10.16 + * 澧炲姞璇勮鍒嗛〉 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_10_20($db, $options) + { + /** 淇敼鏁版嵁搴撳瓧娈 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query('ALTER TABLE `' . $prefix . 'contents` ADD `parent` INT(10) UNSIGNED NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'contents" ADD COLUMN "parent" INT NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'contents_tmp ( "cid" INTEGER NOT NULL PRIMARY KEY, +"title" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"created" int(10) default \'0\' , +"modified" int(10) default \'0\' , +"text" text , +"order" int(10) default \'0\' , +"authorId" int(10) default \'0\' , +"template" varchar(32) default NULL , +"type" varchar(16) default \'post\' , +"status" varchar(16) default \'publish\' , +"password" varchar(32) default NULL , +"commentsNum" int(10) default \'0\' , +"allowComment" char(1) default \'0\' , +"allowPing" char(1) default \'0\' , +"allowFeed" char(1) default \'0\' , +"parent" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents_tmp ("cid", "title", "slug", "created", "modified" + , "text", "order", "authorId", "template", "type", "status", "password", "commentsNum", "allowComment", + "allowPing", "allowFeed", "parent") SELECT "cid", "title", "slug", "created", "modified" + , "text", "order", "authorId", "template", "type", "status", "password", "commentsNum", "allowComment", + "allowPing", "allowFeed", "parent" FROM ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'contents ( "cid" INTEGER NOT NULL PRIMARY KEY, +"title" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"created" int(10) default \'0\' , +"modified" int(10) default \'0\' , +"text" text , +"order" int(10) default \'0\' , +"authorId" int(10) default \'0\' , +"template" varchar(32) default NULL , +"type" varchar(16) default \'post\' , +"status" varchar(16) default \'publish\' , +"password" varchar(32) default NULL , +"commentsNum" int(10) default \'0\' , +"allowComment" char(1) default \'0\' , +"allowPing" char(1) default \'0\' , +"allowFeed" char(1) default \'0\' , +"parent" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents SELECT * FROM ' . $prefix . 'contents_tmp', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents_tmp', Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'contents_slug ON ' . $prefix . 'contents ("slug")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'contents_created ON ' . $prefix . 'contents ("created")', Typecho_Db::WRITE); + + break; + + default: + break; + } + + $db->query($db->update('table.contents')->expression('parent', 'order') + ->where('type = ?', 'attachment')); + + $db->query($db->update('table.contents')->rows(array('order' => 0)) + ->where('type = ?', 'attachment')); + } + + /** + * 鍗囩骇鑷9.10.31 + * 淇闄勪欢 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_10_31($db, $options) + { + $db->query($db->update('table.contents')->rows(array('status' => 'publish')) + ->where('type = ?', 'attachment')); + } + + /** + * 鍗囩骇鑷9.11.25 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r9_11_25($db, $options) + { + /** 澧炲姞鑻ュ共閫夐」 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPageBreak', 'user' => 0, 'value' => 0))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsThreaded', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPageSize', 'user' => 0, 'value' => 20))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPageDisplay', 'user' => 0, 'value' => 'last'))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsOrder', 'user' => 0, 'value' => 'ASC'))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsCheckReferer', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAutoClose', 'user' => 0, 'value' => 0))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPostIntervalEnable', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPostInterval', 'user' => 0, 'value' => 60))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsShowCommentOnly', 'user' => 0, 'value' => 0))); + + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + if (isset($routingTable['comment_page'])) { + $routingTable['comment_page'] = array ( + 'url' => '[permalink:string]/comment-page-[commentPage:digital]', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + } else { + $pre = array_slice($routingTable, 0, 20); + $next = array_slice($routingTable, 20); + + $commentPage = array ( + 'url' => '[permalink:string]/comment-page-[commentPage:digital]', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $routingTable = array_merge($pre, array('comment_page' => $commentPage), $next); + } + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.12.11 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r9_12_11($db, $options) + { + /** 鍒犻櫎鏃犵敤閫夐」 */ + $db->query($db->delete('table.options') + ->where('name = ? OR name = ? OR name = ? OR name = ? OR name = ? OR name = ? OR name = ?', 'customHomePage', 'uploadHandle', + 'deleteHandle', 'modifyHandle', 'attachmentHandle', 'attachmentDataHandle', 'gzip')); + + // 澧炲姞鑷畾涔夐椤 + $db->query($db->insert('table.options') + ->rows(array('name' => 'frontPage', 'user' => 0, 'value' => 'recent'))); + } + + /** + * 鍗囩骇鑷10.2.27 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r10_2_27($db, $options) + { + /** 澧炲姞鑻ュ共閫夐」 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAvatar', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAvatarRating', 'user' => 0, 'value' => 'G'))); + + //鏇存柊鎵╁睍 + if (NULL != $options->attachmentTypes) { + $attachmentTypes = array_map('trim', explode(';', $options->attachmentTypes)); + $attachmentTypesResult = array(); + + foreach ($attachmentTypes as $type) { + $type = trim($type, '*.'); + if (!empty($type)) { + $attachmentTypesResult[] = $type; + } + } + + if (!empty($attachmentTypesResult)) { + $db->query($db->update('table.options') + ->rows(array('value' => implode(',', $attachmentTypesResult))) + ->where('name = ?', 'attachmentTypes')); + } + } + } + + /** + * 鍗囩骇鑷10.3.8 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r10_3_8($db, $options) + { + /** 鍒犻櫎鏃犵敤閫夐」 */ + $db->query($db->delete('table.options') + ->where('name = ?', 'commentsAvatarSize')); + } + + /** + * 鍗囩骇鑷10.5.17 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r10_5_17($db, $options) + { + Typecho_Widget::widget('Widget_Themes_Edit', NULL, 'change=' . $options->theme, false)->action(); + } + + + /** + * 鍗囩骇鑷13.10.18 + * + * @param mixed $db + * @param mixed $options + * @static + * @access public + * @return void + */ + public static function v0_9r13_10_18($db, $options) + { + // 澧炲姞markdown + $db->query($db->insert('table.options') + ->rows(array('name' => 'markdown', 'user' => 0, 'value' => 0))); + + // 鏇存柊鍘熸潵琚悶涔辩殑鑽夌ǹ + $db->query($db->update('table.contents') + ->rows(array( + 'type' => 'post_draft', + 'status' => 'publish' + )) + ->where('type = ? AND status = ?', 'post', 'draft')); + + $db->query($db->update('table.contents') + ->rows(array( + 'type' => 'page_draft', + 'status' => 'publish' + )) + ->where('type = ? AND status = ?', 'page', 'draft')); + } + + /** + * v0_9r13_11_17 + * + * @param mixed $db + * @param mixed $options + * @static + * @access public + * @return void + */ + public static function v0_9r13_11_17($db, $options) + { + Helper::addRoute('archive', '/blog/', 'Widget_Archive', 'render', 'index'); + Helper::addRoute('archive_page', '/blog/[page:digital]/', 'Widget_Archive', 'render', 'index_page'); + $db->query($db->insert('table.options') + ->rows(array('name' => 'frontArchive', 'user' => 0, 'value' => 0))); + } + + /** + * v0_9r13_11_24 + * + * @param mixed $db + * @param mixed $options + * @static + * @access public + * @return void + */ + public static function v0_9r13_11_24($db, $options) + { + /* 澧炲姞鏁版嵁琛 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $config = $db->getConfig(); + $db->query("CREATE TABLE `{$prefix}fields` ( + `cid` int(10) unsigned NOT NULL, + `name` varchar(200) NOT NULL, + `type` varchar(8) default 'str', + `str_value` text, + `int_value` int(10) default '0', + `float_value` float default '0', + PRIMARY KEY (`cid`,`name`), + KEY `int_value` (`int_value`), + KEY `float_value` (`float_value`) +) ENGINE=MyISAM DEFAULT CHARSET=" . $config[0]->charset, Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('CREATE TABLE "' . $prefix . 'fields" ("cid" INT NOT NULL, + "name" VARCHAR(200) NOT NULL, + "type" VARCHAR(8) NULL DEFAULT \'str\', + "str_value" TEXT NULL DEFAULT NULL, + "int_value" INT NULL DEFAULT \'0\', + "float_value" REAL NULL DEFAULT \'0\', + PRIMARY KEY ("cid","name") +)', Typecho_Db::WRITE); + $db->query('CREATE INDEX "' . $prefix . 'fields_int_value" ON "' . $prefix . 'fields" ("int_value")', Typecho_Db::WRITE); + $db->query('CREATE INDEX "' . $prefix . 'fields_float_value" ON "' . $prefix . 'fields" ("float_value")', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $db->query('CREATE TABLE "' . $prefix . 'fields" ("cid" INTEGER NOT NULL, + "name" varchar(200) NOT NULL, + "type" varchar(8) default \'str\', + "str_value" text, + "int_value" int(10) default \'0\', + "float_value" real default \'0\' +)', Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'fields_cid_name ON ' . $prefix . 'fields ("cid", "name")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'fields_int_value ON ' . $prefix . 'fields ("int_value")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'fields_float_value ON ' . $prefix . 'fields ("float_value")', Typecho_Db::WRITE); + + break; + + default: + break; + } + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsMarkdown', 'user' => 0, 'value' => 0))); + } + + /** + * v0_9r13_11_24 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r13_12_6($db, $options) + { + $frontArchive = $db->fetchRow($db->select()->from('table.options')->where('name = ?', 'frontArchive')); + if (empty($frontArchive)) { + $db->query($db->insert('table.options') + ->rows(array('name' => 'frontArchive', 'user' => 0, 'value' => 0))); + } + } + + /** + * v0_9r13_12_20 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r13_12_20($db, $options) + { + $commentsWhitelist = $db->fetchRow($db->select()->from('table.options')->where('name = ?', 'commentsWhitelist')); + if (empty($commentsWhitelist)) { + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsWhitelist', 'user' => 0, 'value' => 0))); + } + } + + /** + * v0_9r14_2_24 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r14_2_24($db, $options) + { + /** 淇敼鏁版嵁搴撳瓧娈 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query('ALTER TABLE `' . $prefix . 'metas` ADD `parent` INT(10) UNSIGNED NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'metas" ADD COLUMN "parent" INT NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'metas' . $uuid . ' ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' , + "parent" int(10) default \'0\')', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas' . $uuid . ' ("mid", "name", "slug", "type", "description", "count", "order") + SELECT "mid", "name", "slug", "type", "description", "count", "order" FROM ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'metas ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' , + "parent" int(10) default \'0\')', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas SELECT * FROM ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'metas_slug ON ' . $prefix . 'metas ("slug")', Typecho_Db::WRITE); + + break; + + default: + break; + } + } + + /** + * v0_9r14_3_14 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r14_3_14($db, $options) + { + $db->query($db->insert('table.options') + ->rows(array('name' => 'secret', 'user' => 0, 'value' => Typecho_Common::randString(32, true)))); + } + + /** + * v1_0r14_9_2 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v1_0r14_9_2($db, $options) + { + $db->query($db->insert('table.options') + ->rows(array('name' => 'lang', 'user' => 0, 'value' => 'zh_CN'))); + } + + /** + * v1_0r14_10_10 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v1_0r14_10_10($db, $options) + { + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAntiSpam', 'user' => 0, 'value' => 1))); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract.php" new file mode 100644 index 0000000..103387e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract.php" @@ -0,0 +1,119 @@ +db = Typecho_Db::get(); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->options = $this->widget('Widget_Options'); + $this->user = $this->widget('Widget_User'); + $this->security = $this->widget('Widget_Security'); + } + + /** + * 鏌ヨ鏂规硶 + * + * @access public + * @return Typecho_Db_Query + */ + abstract public function select(); + + /** + * 鑾峰緱鎵鏈夎褰曟暟 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + abstract public function size(Typecho_Db_Query $condition); + + /** + * 澧炲姞璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @return integer + */ + abstract public function insert(array $rows); + + /** + * 鏇存柊璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + abstract public function update(array $rows, Typecho_Db_Query $condition); + + /** + * 鍒犻櫎璁板綍鏂规硶 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + abstract public function delete(Typecho_Db_Query $condition); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Comments.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Comments.php" new file mode 100644 index 0000000..e98b697 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Comments.php" @@ -0,0 +1,459 @@ +db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.cid = ?', $this->cid) + ->limit(1), array($this->widget('Widget_Abstract_Contents'), 'filter')); + } + + /** + * 鑾峰彇褰撳墠璇勮鏍囬 + * + * @access protected + * @return string + */ + protected function ___title() + { + return $this->parentContent['title']; + } + + /** + * 鑾峰彇褰撳墠璇勮閾炬帴 + * + * @access protected + * @return string + */ + protected function ___permalink() + { + + if ($this->options->commentsPageBreak && 'approved' == $this->status) { + + $coid = $this->coid; + $parent = $this->parent; + + while ($parent > 0 && $this->options->commentsThreaded) { + $parentRows = $this->db->fetchRow($this->db->select('parent')->from('table.comments') + ->where('coid = ? AND status = ?', $parent, 'approved')->limit(1)); + + if (!empty($parentRows)) { + $coid = $parent; + $parent = $parentRows['parent']; + } else { + break; + } + } + + $select = $this->db->select('coid', 'parent') + ->from('table.comments')->where('cid = ? AND status = ?', $this->parentContent['cid'], 'approved') + ->where('coid ' . ('DESC' == $this->options->commentsOrder ? '>=' : '<=') . ' ?', $coid) + ->order('coid', Typecho_Db::SORT_ASC); + + if ($this->options->commentsShowCommentOnly) { + $select->where('type = ?', 'comment'); + } + + $comments = $this->db->fetchAll($select); + + $commentsMap = array(); + $total = 0; + + foreach ($comments as $comment) { + $commentsMap[$comment['coid']] = $comment['parent']; + + if (0 == $comment['parent'] || !isset($commentsMap[$comment['parent']])) { + $total ++; + } + } + + $currentPage = ceil($total / $this->options->commentsPageSize); + + $pageRow = array('permalink' => $this->parentContent['pathinfo'], 'commentPage' => $currentPage); + return Typecho_Router::url('comment_page', + $pageRow, $this->options->index) . '#' . $this->theId; + } + + return $this->parentContent['permalink'] . '#' . $this->theId; + } + + /** + * 鑾峰彇褰撳墠璇勮鍐呭 + * + * @access protected + * @return string + */ + protected function ___content() + { + $text = $this->parentContent['hidden'] ? _t('鍐呭琚殣钘') : $this->text; + + $text = $this->pluginHandle(__CLASS__)->trigger($plugged)->content($text, $this); + if (!$plugged) { + $text = $this->options->commentsMarkdown ? $this->markdown($text) + : $this->autoP($text); + } + + $text = $this->pluginHandle(__CLASS__)->contentEx($text, $this); + return Typecho_Common::stripTags($text, '


    ' . $this->options->commentsHTMLTagAllowed); + } + + /** + * 杈撳嚭璇嶄箟鍖栨棩鏈 + * + * @access protected + * @return string + */ + protected function ___dateWord() + { + return $this->date->word(); + } + + /** + * 閿氱偣id + * + * @access protected + * @return string + */ + protected function ___theId() + { + return $this->type . '-' . $this->coid; + } + + /** + * 鑾峰彇鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select('table.comments.coid', 'table.comments.cid', 'table.comments.author', 'table.comments.mail', 'table.comments.url', 'table.comments.ip', + 'table.comments.authorId', 'table.comments.ownerId', 'table.comments.agent', 'table.comments.text', 'table.comments.type', 'table.comments.status', 'table.comments.parent', 'table.comments.created') + ->from('table.comments'); + } + + /** + * 澧炲姞璇勮 + * + * @access public + * @param array $comment 璇勮缁撴瀯鏁扮粍 + * @return integer + */ + public function insert(array $comment) + { + /** 鏋勫缓鎻掑叆缁撴瀯 */ + $insertStruct = array( + 'cid' => $comment['cid'], + 'created' => empty($comment['created']) ? $this->options->gmtTime : $comment['created'], + 'author' => empty($comment['author']) ? NULL : $comment['author'], + 'authorId' => empty($comment['authorId']) ? 0 : $comment['authorId'], + 'ownerId' => empty($comment['ownerId']) ? 0 : $comment['ownerId'], + 'mail' => empty($comment['mail']) ? NULL : $comment['mail'], + 'url' => empty($comment['url']) ? NULL : $comment['url'], + 'ip' => empty($comment['ip']) ? $this->request->getIp() : $comment['ip'], + 'agent' => empty($comment['agent']) ? $_SERVER["HTTP_USER_AGENT"] : $comment['agent'], + 'text' => empty($comment['text']) ? NULL : $comment['text'], + 'type' => empty($comment['type']) ? 'comment' : $comment['type'], + 'status' => empty($comment['status']) ? 'approved' : $comment['status'], + 'parent' => empty($comment['parent']) ? 0 : $comment['parent'], + ); + + if (!empty($comment['coid'])) { + $insertStruct['coid'] = $comment['coid']; + } + + /** 棣栧厛鎻掑叆閮ㄥ垎鏁版嵁 */ + $insertId = $this->db->query($this->db->insert('table.comments')->rows($insertStruct)); + + /** 鏇存柊璇勮鏁 */ + $num = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num'))->from('table.comments') + ->where('status = ? AND cid = ?', 'approved', $comment['cid']))->num; + + $this->db->query($this->db->update('table.contents')->rows(array('commentsNum' => $num)) + ->where('cid = ?', $comment['cid'])); + + return $insertId; + } + + /** + * 鏇存柊璇勮 + * + * @access public + * @param array $comment 璇勮缁撴瀯鏁扮粍 + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function update(array $comment, Typecho_Db_Query $condition) + { + /** 鑾峰彇鍐呭涓婚敭 */ + $updateCondition = clone $condition; + $updateComment = $this->db->fetchObject($condition->select('cid')->from('table.comments')->limit(1)); + + if ($updateComment) { + $cid = $updateComment->cid; + } else { + return false; + } + + /** 鏋勫缓鎻掑叆缁撴瀯 */ + $preUpdateStruct = array( + 'author' => empty($comment['author']) ? NULL : $comment['author'], + 'mail' => empty($comment['mail']) ? NULL : $comment['mail'], + 'url' => empty($comment['url']) ? NULL : $comment['url'], + 'text' => empty($comment['text']) ? NULL : $comment['text'], + 'status' => empty($comment['status']) ? 'approved' : $comment['status'], + ); + + $updateStruct = array(); + foreach ($comment as $key => $val) { + if ((array_key_exists($key, $preUpdateStruct))) { + $updateStruct[$key] = $preUpdateStruct[$key]; + } + } + + /** 鏇存柊鍒涘缓鏃堕棿 */ + if (!empty($comment['created'])) { + $updateStruct['created'] = $comment['created']; + } + + /** 鏇存柊璇勮鏁版嵁 */ + $updateRows = $this->db->query($updateCondition->update('table.comments')->rows($updateStruct)); + + /** 鏇存柊璇勮鏁 */ + $num = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num'))->from('table.comments') + ->where('status = ? AND cid = ?', 'approved', $cid))->num; + + $this->db->query($this->db->update('table.contents')->rows(array('commentsNum' => $num)) + ->where('cid = ?', $cid)); + + return $updateRows; + } + + /** + * 鍒犻櫎鏁版嵁 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + /** 鑾峰彇鍐呭涓婚敭 */ + $deleteCondition = clone $condition; + $deleteComment = $this->db->fetchObject($condition->select('cid')->from('table.comments')->limit(1)); + + if ($deleteComment) { + $cid = $deleteComment->cid; + } else { + return false; + } + + /** 鍒犻櫎璇勮鏁版嵁 */ + $deleteRows = $this->db->query($deleteCondition->delete('table.comments')); + + /** 鏇存柊璇勮鏁 */ + $num = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num'))->from('table.comments') + ->where('status = ? AND cid = ?', 'approved', $cid))->num; + + $this->db->query($this->db->update('table.contents')->rows(array('commentsNum' => $num)) + ->where('cid = ?', $cid)); + + return $deleteRows; + } + + /** + * 璇勮鏄惁鍙互琚慨鏀 + * + * @access public + * @param Typecho_Db_Query $condition 鏉′欢 + * @return mixed + */ + public function commentIsWriteable(Typecho_Db_Query $condition = NULL) + { + if (empty($condition)) { + if ($this->have() && ($this->user->pass('editor', true) || $this->ownerId == $this->user->uid)) { + return true; + } + } else { + $post = $this->db->fetchRow($condition->select('ownerId')->from('table.comments')->limit(1)); + + if ($post && ($this->user->pass('editor', true) || $post['ownerId'] == $this->user->uid)) { + return true; + } + } + + return false; + } + + /** + * 鎸夌収鏉′欢璁$畻璇勮鏁伴噺 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(coid)' => 'num'))->from('table.comments'))->num; + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + */ + public function filter(array $value) + { + $value['date'] = new Typecho_Date($value['created']); + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 杈撳嚭鏂囩珷鍙戝竷鏃ユ湡 + * + * @access public + * @param string $format 鏃ユ湡鏍煎紡 + * @return void + */ + public function date($format = NULL) + { + echo $this->date->format(empty($format) ? $this->options->commentDateFormat : $format); + } + + /** + * 杈撳嚭浣滆呯浉鍏 + * + * @access public + * @param boolean $autoLink 鏄惁鑷姩鍔犱笂閾炬帴 + * @param boolean $noFollow 鏄惁鍔犱笂nofollow鏍囩 + * @return void + */ + public function author($autoLink = NULL, $noFollow = NULL) + { + $autoLink = (NULL === $autoLink) ? $this->options->commentsShowUrl : $autoLink; + $noFollow = (NULL === $noFollow) ? $this->options->commentsUrlNofollow : $noFollow; + + if ($this->url && $autoLink) { + echo '' , $this->author , ''; + } else { + echo $this->author; + } + } + + /** + * 璋冪敤gravatar杈撳嚭鐢ㄦ埛澶村儚 + * + * @access public + * @param integer $size 澶村儚灏哄 + * @param string $default 榛樿杈撳嚭澶村儚 + * @return void + */ + public function gravatar($size = 32, $default = NULL) + { + if ($this->options->commentsAvatar && 'comment' == $this->type) { + $rating = $this->options->commentsAvatarRating; + + $this->pluginHandle(__CLASS__)->trigger($plugged)->gravatar($size, $rating, $default, $this); + if (!$plugged) { + $url = Typecho_Common::gravatarUrl($this->mail, $size, $rating, $default, $this->request->isSecure()); + echo '' .
+                $this->author . ''; + } + } + } + + /** + * 杈撳嚭璇勮鎽樿 + * + * @access public + * @param integer $length 鎽樿鎴彇闀垮害 + * @param string $trim 鎽樿鍚庣紑 + * @return void + */ + public function excerpt($length = 100, $trim = '...') + { + echo Typecho_Common::subStr(strip_tags($this->content), 0, $length, $trim); + } + + /** + * autoP + * + * @param mixed $text + * @access public + * @return void + */ + public function autoP($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->autoP($text); + + if (!$parsed) { + static $parser; + + if (empty($parser)) { + $parser = new AutoP(); + } + + $html = $parser->parse($text); + } + + return $html; + } + + /** + * markdown + * + * @param mixed $text + * @access public + * @return void + */ + public function markdown($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->markdown($text); + + if (!$parsed) { + $html = Markdown::convert($text); + } + + return $html; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Contents.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Contents.php" new file mode 100644 index 0000000..08e2412 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Contents.php" @@ -0,0 +1,968 @@ +db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $this->cid) + ->where('table.metas.type = ?', 'tag'), array($this->widget('Widget_Abstract_Metas'), 'filter')); + } + + /** + * 鏂囩珷浣滆 + * + * @access protected + * @return Typecho_Config + */ + protected function ___author() + { + return $this->widget('Widget_Users_Author@' . $this->cid, array('uid' => $this->authorId)); + } + + /** + * 鑾峰彇璇嶄箟鍖栨棩鏈 + * + * @access protected + * @return string + */ + protected function ___dateWord() + { + return $this->date->word(); + } + + /** + * 鑾峰彇鐖秈d + * + * @access protected + * @return string + */ + protected function ___parentId() + { + return $this->row['parent']; + } + + /** + * 瀵规枃绔犵殑绠鐭函鏂囨湰鎻忚堪 + * + * @access protected + * @return string + */ + protected function ___description() + { + $plainTxt = str_replace("\n", '', trim(strip_tags($this->excerpt))); + $plainTxt = $plainTxt ? $plainTxt : $this->title; + return Typecho_Common::subStr($plainTxt, 0, 100, '...'); + } + + /** + * ___fields + * + * @access protected + * @return Typecho_Config + */ + protected function ___fields() + { + $fields = array(); + $rows = $this->db->fetchAll($this->db->select()->from('table.fields') + ->where('cid = ?', $this->cid)); + + foreach ($rows as $row) { + $fields[$row['name']] = $row[$row['type'] . '_value']; + } + + return new Typecho_Config($fields); + } + + /** + * 鑾峰彇鏂囩珷鍐呭鎽樿 + * + * @access protected + * @return string + */ + protected function ___excerpt() + { + if ($this->hidden) { + return $this->text; + } + + $content = $this->pluginHandle(__CLASS__)->trigger($plugged)->excerpt($this->text, $this); + if (!$plugged) { + $content = $this->isMarkdown ? $this->markdown($content) + : $this->autoP($content); + } + + $contents = explode('', $content); + list($excerpt) = $contents; + + return Typecho_Common::fixHtml($this->pluginHandle(__CLASS__)->excerptEx($excerpt, $this)); + } + + /** + * 鑾峰彇鏂囩珷鍐呭 + * + * @access protected + * @return string + */ + protected function ___content() + { + if ($this->hidden) { + return $this->text; + } + + $content = $this->pluginHandle(__CLASS__)->trigger($plugged)->content($this->text, $this); + + if (!$plugged) { + $content = $this->isMarkdown ? $this->markdown($content) + : $this->autoP($content); + } + + return $this->pluginHandle(__CLASS__)->contentEx($content, $this); + } + + /** + * 杈撳嚭鏂囩珷鐨勭涓琛屼綔涓烘憳瑕 + * + * @return string + */ + protected function ___summary() + { + $content = $this->content; + $parts = preg_split("/(<\/\s*(?:p|blockquote|q|pre|table)\s*>)/i", $content, 2, PREG_SPLIT_DELIM_CAPTURE); + if (!empty($parts)) { + $content = $parts[0] . $parts[1]; + } + + return $content; + } + + /** + * 閿氱偣id + * + * @access protected + * @return string + */ + protected function ___theId() + { + return $this->type . '-' . $this->cid; + } + + /** + * 鍥炲妗唅d + * + * @access protected + * @return string + */ + protected function ___respondId() + { + return 'respond-' . $this->theId; + } + + /** + * 璇勮鍦板潃 + * + * @access protected + * @return string + */ + protected function ___commentUrl() + { + /** 鐢熸垚鍙嶉鍦板潃 */ + /** 璇勮 */ + return Typecho_Router::url('feedback', + array('type' => 'comment', 'permalink' => $this->pathinfo), $this->options->index); + } + + /** + * trackback鍦板潃 + * + * @access protected + * @return string + */ + protected function ___trackbackUrl() + { + return Typecho_Router::url('feedback', + array('type' => 'trackback', 'permalink' => $this->pathinfo), $this->options->index); + } + + /** + * 鍥炲鍦板潃 + * + * @access protected + * @return string + */ + protected function ___responseUrl() + { + return $this->permalink . '#' . $this->respondId; + } + + /** + * 鑾峰彇椤甸潰鍋忕Щ + * + * @access protected + * @param string $column 瀛楁鍚 + * @param integer $offset 鍋忕Щ鍊 + * @param string $type 绫诲瀷 + * @param string $status 鐘舵佸 + * @param integer $authorId 浣滆 + * @param integer $pageSize 鍒嗛〉鍊 + * @return integer + */ + protected function getPageOffset($column, $offset, $type, $status = NULL, $authorId = 0, $pageSize = 20) + { + $select = $this->db->select(array('COUNT(table.contents.cid)' => 'num'))->from('table.contents') + ->where("table.contents.{$column} > {$offset}") + ->where("table.contents.type = ?", $type); + + if (!empty($status)) { + $select->where("table.contents.status = ?", $status); + } + + if ($authorId > 0) { + $select->where('table.contents.authorId = ?', $authorId); + } + + $count = $this->db->fetchObject($select)->num + 1; + return ceil($count / $pageSize); + } + + /** + * 鑾峰彇鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select('table.contents.cid', 'table.contents.title', 'table.contents.slug', 'table.contents.created', 'table.contents.authorId', + 'table.contents.modified', 'table.contents.type', 'table.contents.status', 'table.contents.text', 'table.contents.commentsNum', 'table.contents.order', + 'table.contents.template', 'table.contents.password', 'table.contents.allowComment', 'table.contents.allowPing', 'table.contents.allowFeed', + 'table.contents.parent')->from('table.contents'); + } + + /** + * 鎻掑叆鍐呭 + * + * @access public + * @param array $content 鍐呭鏁扮粍 + * @return integer + */ + public function insert(array $content) + { + /** 鏋勫缓鎻掑叆缁撴瀯 */ + $insertStruct = array( + 'title' => empty($content['title']) ? NULL : htmlspecialchars($content['title']), + 'created' => empty($content['created']) ? $this->options->gmtTime : $content['created'], + 'modified' => $this->options->gmtTime, + 'text' => empty($content['text']) ? NULL : $content['text'], + 'order' => empty($content['order']) ? 0 : intval($content['order']), + 'authorId' => isset($content['authorId']) ? $content['authorId'] : $this->user->uid, + 'template' => empty($content['template']) ? NULL : $content['template'], + 'type' => empty($content['type']) ? 'post' : $content['type'], + 'status' => empty($content['status']) ? 'publish' : $content['status'], + 'password' => empty($content['password']) ? NULL : $content['password'], + 'commentsNum' => empty($content['commentsNum']) ? 0 : $content['commentsNum'], + 'allowComment' => !empty($content['allowComment']) && 1 == $content['allowComment'] ? 1 : 0, + 'allowPing' => !empty($content['allowPing']) && 1 == $content['allowPing'] ? 1 : 0, + 'allowFeed' => !empty($content['allowFeed']) && 1 == $content['allowFeed'] ? 1 : 0, + 'parent' => empty($content['parent']) ? 0 : intval($content['parent']) + ); + + if (!empty($content['cid'])) { + $insertStruct['cid'] = $content['cid']; + } + + /** 棣栧厛鎻掑叆閮ㄥ垎鏁版嵁 */ + $insertId = $this->db->query($this->db->insert('table.contents')->rows($insertStruct)); + + /** 鏇存柊缂╃暐鍚 */ + if ($insertId > 0) { + $this->applySlug(empty($content['slug']) ? NULL : $content['slug'], $insertId); + } + + return $insertId; + } + + /** + * 鏇存柊鍐呭 + * + * @access public + * @param array $content 鍐呭鏁扮粍 + * @param Typecho_Db_Query $condition 鏇存柊鏉′欢 + * @return integer + */ + public function update(array $content, Typecho_Db_Query $condition) + { + /** 棣栧厛楠岃瘉鍐欏叆鏉冮檺 */ + if (!$this->isWriteable(clone $condition)) { + return false; + } + + /** 鏋勫缓鏇存柊缁撴瀯 */ + $preUpdateStruct = array( + 'title' => empty($content['title']) ? NULL : htmlspecialchars($content['title']), + 'order' => empty($content['order']) ? 0 : intval($content['order']), + 'text' => empty($content['text']) ? NULL : $content['text'], + 'template' => empty($content['template']) ? NULL : $content['template'], + 'type' => empty($content['type']) ? 'post' : $content['type'], + 'status' => empty($content['status']) ? 'publish' : $content['status'], + 'password' => empty($content['password']) ? NULL : $content['password'], + 'allowComment' => !empty($content['allowComment']) && 1 == $content['allowComment'] ? 1 : 0, + 'allowPing' => !empty($content['allowPing']) && 1 == $content['allowPing'] ? 1 : 0, + 'allowFeed' => !empty($content['allowFeed']) && 1 == $content['allowFeed'] ? 1 : 0, + 'parent' => empty($content['parent']) ? 0 : intval($content['parent']) + ); + + $updateStruct = array(); + foreach ($content as $key => $val) { + if (array_key_exists($key, $preUpdateStruct)) { + $updateStruct[$key] = $preUpdateStruct[$key]; + } + } + + /** 鏇存柊鍒涘缓鏃堕棿 */ + if (!empty($content['created'])) { + $updateStruct['created'] = $content['created']; + } + + $updateStruct['modified'] = $this->options->gmtTime; + + /** 棣栧厛鎻掑叆閮ㄥ垎鏁版嵁 */ + $updateCondition = clone $condition; + $updateRows = $this->db->query($condition->update('table.contents')->rows($updateStruct)); + + /** 鏇存柊缂╃暐鍚 */ + if ($updateRows > 0 && isset($content['slug'])) { + $this->applySlug(empty($content['slug']) ? NULL : $content['slug'], $updateCondition); + } + + return $updateRows; + } + + /** + * 鍒犻櫎鍐呭 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.contents')); + } + + /** + * 涓哄唴瀹瑰簲鐢ㄧ缉鐣ュ悕 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @param mixed $cid 鍐呭id + * @return string + */ + public function applySlug($slug, $cid) + { + if ($cid instanceof Typecho_Db_Query) { + $cid = $this->db->fetchObject($cid->select('cid') + ->from('table.contents')->limit(1))->cid; + } + + /** 鐢熸垚涓涓潪绌虹殑缂╃暐鍚 */ + $slug = Typecho_Common::slugName($slug, $cid); + $result = $slug; + + /** 瀵硅崏绋跨殑slug鍋氱壒娈婂鐞 */ + $draft = $this->db->fetchObject($this->db->select('type', 'parent') + ->from('table.contents')->where('cid = ?', $cid)); + + if ('_draft' == substr($draft->type, -6) && $draft->parent) { + $result = '@' . $result; + } + + + /** 鍒ゆ柇鏄惁鍦ㄦ暟鎹簱涓凡缁忓瓨鍦 */ + $count = 1; + while ($this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents')->where('slug = ? AND cid <> ?', $result, $cid))->num > 0) { + $result = $slug . '-' . $count; + $count ++; + } + + $this->db->query($this->db->update('table.contents')->rows(array('slug' => $result)) + ->where('cid = ?', $cid)); + + return $result; + } + + /** + * 鍒犻櫎鑷畾涔夊瓧娈 + * + * @param integer $cid + * @access public + * @return integer + */ + public function deleteFields($cid) + { + return $this->db->query($this->db->delete('table.fields') + ->where('cid = ?', $cid)); + } + + /** + * 妫鏌ュ瓧娈靛悕鏄惁绗﹀悎瑕佹眰 + * + * @param string $name + * @access public + * @return boolean + */ + public function checkFieldName($name) + { + return preg_match("/^[_a-z][_a-z0-9]*$/i", $name); + } + + /** + * 淇濆瓨鑷畾涔夊瓧娈 + * + * @param array $fields + * @param mixed $cid + * @access public + * @return void + */ + public function applyFields(array $fields, $cid) + { + $exists = array_flip(Typecho_Common::arrayFlatten($this->db->fetchAll($this->db->select('name') + ->from('table.fields')->where('cid = ?', $cid)), 'name')); + + foreach ($fields as $name => $value) { + $type = 'str'; + + if (is_array($value) && 2 == count($value)) { + $type = $value[0]; + $value = $value[1]; + } else if (strpos($name, ':') > 0) { + list ($type, $name) = explode(':', $name, 2); + } + + if (!$this->checkFieldName($name)) { + continue; + } + + $isFieldReadOnly = $this->pluginHandle(__CLASS__)->trigger($plugged)->isFieldReadOnly($name); + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (isset($exists[$name])) { + unset($exists[$name]); + } + + $this->setField($name, $type, $value, $cid); + } + + foreach ($exists as $name => $value) { + $this->db->query($this->db->delete('table.fields') + ->where('cid = ? AND name = ?', $cid, $name)); + } + } + + /** + * 璁剧疆鍗曚釜瀛楁 + * + * @param string $name + * @param string $type + * @param string $value + * @param integer $cid + * @access public + * @return integer + */ + public function setField($name, $type, $value, $cid) + { + if (empty($name) || !$this->checkFieldName($name) + || !in_array($type, array('str', 'int', 'float'))) { + return false; + } + + $exist = $this->db->fetchRow($this->db->select('cid')->from('table.fields') + ->where('cid = ? AND name = ?', $cid, $name)); + + if (empty($exist)) { + return $this->db->query($this->db->insert('table.fields') + ->rows(array( + 'cid' => $cid, + 'name' => $name, + 'type' => $type, + 'str_value' => 'str' == $type ? $value : NULL, + 'int_value' => 'int' == $type ? intval($value) : 0, + 'float_value' => 'float' == $type ? floatval($value) : 0 + ))); + } else { + return $this->db->query($this->db->update('table.fields') + ->rows(array( + 'type' => $type, + 'str_value' => 'str' == $type ? $value : NULL, + 'int_value' => 'int' == $type ? intval($value) : 0, + 'float_value' => 'float' == $type ? floatval($value) : 0 + )) + ->where('cid = ? AND name = ?', $cid, $name)); + } + } + + /** + * 鑷涓涓暣褰㈠瓧娈 + * + * @param string $name + * @param integer $value + * @param integer $cid + * @access public + * @return integer + */ + public function incrIntField($name, $value, $cid) + { + if (!$this->checkFieldName($name)) { + return false; + } + + $exist = $this->db->fetchRow($this->db->select('type')->from('table.fields') + ->where('cid = ? AND name = ?', $cid, $name)); + $value = intval($value); + + if (empty($exist)) { + return $this->db->query($this->db->insert('table.fields') + ->rows(array( + 'cid' => $cid, + 'name' => $name, + 'type' => 'int', + 'str_value' => NULL, + 'int_value' => $value, + 'float_value' => 0 + ))); + } else { + $struct = array( + 'str_value' => NULL, + 'float_value' => NULL + ); + + if ('int' != $exist['type']) { + $struct['type'] = 'int'; + } + + return $this->db->query($this->db->update('table.fields') + ->rows($struct) + ->expression('int_value', 'int_value ' . ($value >= 0 ? '+' : '') . $value) + ->where('cid = ? AND name = ?', $cid, $name)); + } + } + + /** + * 鍐呭鏄惁鍙互琚慨鏀 + * + * @access public + * @param Typecho_Db_Query $condition 鏉′欢 + * @return mixed + */ + public function isWriteable(Typecho_Db_Query $condition) + { + $post = $this->db->fetchRow($condition->select('authorId')->from('table.contents')->limit(1)); + return $post && ($this->user->pass('editor', true) || $post['authorId'] == $this->user->uid); + } + + /** + * 鎸夌収鏉′欢璁$畻鍐呭鏁伴噺 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition + ->select(array('COUNT(DISTINCT table.contents.cid)' => 'num')) + ->from('table.contents') + ->cleanAttribute('group'))->num; + } + + /** + * 鑾峰彇褰撳墠鎵鏈夎嚜瀹氫箟妯℃澘 + * + * @access public + * @return array + */ + public function getTemplates() + { + $files = glob($this->options->themeFile($this->options->theme, '*.php')); + $result = array(); + + foreach ($files as $file) { + $info = Typecho_Plugin::parseInfo($file); + $file = basename($file); + + if ('index.php' != $file && 'custom' == $info['title']) { + $result[$file] = $info['description']; + } + } + + return $result; + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + * @throws Typecho_Widget_Exception + */ + public function filter(array $value) + { + /** 鍙栧嚭鎵鏈夊垎绫 */ + $value['categories'] = $this->db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $value['cid']) + ->where('table.metas.type = ?', 'category') + ->order('table.metas.order', Typecho_Db::SORT_ASC), array($this->widget('Widget_Metas_Category_List'), 'filter')); + $value['category'] = NULL; + $value['directory'] = array(); + + /** 鍙栧嚭绗竴涓垎绫讳綔涓簊lug鏉′欢 */ + if (!empty($value['categories'])) { + $value['category'] = $value['categories'][0]['slug']; + + $value['directory'] = $this->widget('Widget_Metas_Category_List')->getAllParents($value['categories'][0]['mid']); + $value['directory'][] = $value['category']; + } + + $value['date'] = new Typecho_Date($value['created']); + + /** 鐢熸垚鏃ユ湡 */ + $value['year'] = $value['date']->year; + $value['month'] = $value['date']->month; + $value['day'] = $value['date']->day; + + /** 鐢熸垚璁块棶鏉冮檺 */ + $value['hidden'] = false; + + /** 鑾峰彇璺敱绫诲瀷骞跺垽鏂绫诲瀷鍦ㄨ矾鐢辫〃涓槸鍚﹀瓨鍦 */ + $type = $value['type']; + $routeExists = (NULL != Typecho_Router::get($type)); + + $tmpSlug = $value['slug']; + $tmpCategory = $value['category']; + $tmpDirectory = $value['directory']; + $value['slug'] = urlencode($value['slug']); + $value['category'] = urlencode($value['category']); + $value['directory'] = implode('/', array_map('urlencode', $value['directory'])); + + /** 鐢熸垚闈欐佽矾寰 */ + $value['pathinfo'] = $routeExists ? Typecho_Router::url($type, $value) : '#'; + + /** 鐢熸垚闈欐侀摼鎺 */ + $value['permalink'] = Typecho_Common::url($value['pathinfo'], $this->options->index); + + /** 澶勭悊闄勪欢 */ + if ('attachment' == $type) { + $content = @unserialize($value['text']); + + //澧炲姞鏁版嵁淇℃伅 + $value['attachment'] = new Typecho_Config($content); + $value['attachment']->isImage = in_array($content['type'], array('jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp')); + $value['attachment']->url = Widget_Upload::attachmentHandle($value); + + if ($value['attachment']->isImage) { + $value['text'] = '' .
+                $value['title'] . ''; + } else { + $value['text'] = '' . $value['title'] . ''; + } + } + + /** 澶勭悊Markdown **/ + $value['isMarkdown'] = (0 === strpos($value['text'], '')); + if ($value['isMarkdown']) { + $value['text'] = substr($value['text'], 15); + } + + /** 鐢熸垚鑱氬悎閾炬帴 */ + /** RSS 2.0 */ + $value['feedUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedUrl) : '#'; + + /** RSS 1.0 */ + $value['feedRssUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedRssUrl) : '#'; + + /** ATOM 1.0 */ + $value['feedAtomUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedAtomUrl) : '#'; + + $value['slug'] = $tmpSlug; + $value['category'] = $tmpCategory; + $value['directory'] = $tmpDirectory; + + /** 澶勭悊瀵嗙爜淇濇姢娴佺▼ */ + if (!empty($value['password']) && + $value['password'] !== Typecho_Cookie::get('protectPassword') && + $value['authorId'] != $this->user->uid && + !$this->user->pass('editor', true)) { + $value['hidden'] = true; + + /** 鎶涘嚭閿欒 */ + if ($this->request->isPost() && isset($this->request->protectPassword)) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧,鎮ㄨ緭鍏ョ殑瀵嗙爜閿欒'), 403); + } + } + + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + + /** 濡傛灉璁块棶鏉冮檺琚姝 */ + if ($value['hidden']) { + $value['text'] = '

    ' . + '

    ' . _t('璇疯緭鍏ュ瘑鐮佽闂') . '

    ' . + '

    +

    ' . + '
    '; + + $value['title'] = _t('姝ゅ唴瀹硅瀵嗙爜淇濇姢'); + $value['tags'] = array(); + $value['commentsNum'] = 0; + } + + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 杈撳嚭鏂囩珷鍙戝竷鏃ユ湡 + * + * @access public + * @param string $format 鏃ユ湡鏍煎紡 + */ + public function date($format = NULL) + { + echo $this->date->format(empty($format) ? $this->options->postDateFormat : $format); + } + + /** + * 杈撳嚭鏂囩珷鍐呭 + * + * @access public + * @param mixed $more 鏂囩珷鎴彇鍚庣紑 + */ + public function content($more = false) + { + echo false !== $more && false !== strpos($this->text, '') ? + $this->excerpt . "

    permalink}\" title=\"{$this->title}\">{$more}

    " : $this->content; + } + + /** + * 杈撳嚭鏂囩珷鎽樿 + * + * @access public + * @param integer $length 鎽樿鎴彇闀垮害 + * @param string $trim 鎽樿鍚庣紑 + */ + public function excerpt($length = 100, $trim = '...') + { + echo Typecho_Common::subStr(strip_tags($this->excerpt), 0, $length, $trim); + } + + /** + * 杈撳嚭鏍囬 + * + * @access public + * @param integer $length 鏍囬鎴彇闀垮害 + * @param string $trim 鎴彇鍚庣紑 + */ + public function title($length = 0, $trim = '...') + { + $title = $this->pluginHandle()->trigger($plugged)->title($this->title, $this); + if (!$plugged) { + echo $length > 0 ? Typecho_Common::subStr($this->title, 0, $length, $trim) : $this->title; + } else { + echo $title; + } + } + + /** + * 杈撳嚭鏂囩珷璇勮鏁 + * + * @access public + */ + public function commentsNum() + { + $args = func_get_args(); + if (!$args) { + $args[] = '%d'; + } + + $num = intval($this->commentsNum); + + echo sprintf(isset($args[$num]) ? $args[$num] : array_pop($args), $num); + } + + /** + * 鑾峰彇鏂囩珷鏉冮檺 + * + * @access public + */ + public function allow() + { + $permissions = func_get_args(); + $allow = true; + + foreach ($permissions as $permission) { + $permission = strtolower($permission); + + if ('edit' == $permission) { + $allow &= ($this->user->pass('editor', true) || $this->authorId == $this->user->uid); + } else { + /** 瀵硅嚜鍔ㄥ叧闂弽棣堝姛鑳界殑鏀寔 */ + if (('ping' == $permission || 'comment' == $permission) && $this->options->commentsPostTimeout > 0 && + $this->options->commentsAutoClose) { + if ($this->options->gmtTime - $this->created > $this->options->commentsPostTimeout) { + return false; + } + } + + $allow &= ($this->row['allow' . ucfirst($permission)] == 1) and !$this->hidden; + } + } + + return $allow; + } + + /** + * 杈撳嚭鏂囩珷鍒嗙被 + * + * @access public + * @param string $split 澶氫釜鍒嗙被涔嬮棿鍒嗛殧绗 + * @param boolean $link 鏄惁杈撳嚭閾炬帴 + * @param string $default 濡傛灉娌℃湁鍒欒緭鍑 + * @return void + */ + public function category($split = ',', $link = true, $default = NULL) + { + $categories = $this->categories; + if ($categories) { + $result = array(); + + foreach ($categories as $category) { + $result[] = $link ? '' + . $category['name'] . '' : $category['name']; + } + + echo implode($split, $result); + } else { + echo $default; + } + } + + /** + * 杈撳嚭鏂囩珷鏍囩 + * + * @access public + * @param string $split 澶氫釜鏍囩涔嬮棿鍒嗛殧绗 + * @param boolean $link 鏄惁杈撳嚭閾炬帴 + * @param string $default 濡傛灉娌℃湁鍒欒緭鍑 + * @return void + */ + public function tags($split = ',', $link = true, $default = NULL) + { + /** 鍙栧嚭tags */ + if ($this->tags) { + $result = array(); + foreach ($this->tags as $tag) { + $result[] = $link ? '' + . $tag['name'] . '' : $tag['name']; + } + + echo implode($split, $result); + } else { + echo $default; + } + } + + /** + * 杈撳嚭褰撳墠浣滆 + * + * @access public + * @param string $item 闇瑕佽緭鍑虹殑椤圭洰 + * @return void + */ + public function author($item = 'screenName') + { + echo $this->author->{$item}; + } + + /** + * autoP + * + * @param mixed $text + * @access public + * @return void + */ + public function autoP($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->autoP($text); + + if (!$parsed) { + static $parser; + + if (empty($parser)) { + $parser = new AutoP(); + } + + $html = $parser->parse($text); + } + + return $html; + } + + /** + * markdown + * + * @param mixed $text + * @access public + * @return void + */ + public function markdown($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->markdown($text); + + if (!$parsed) { + $html = Markdown::convert($text); + } + + return $html; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Metas.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Metas.php" new file mode 100644 index 0000000..08a9256 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Metas.php" @@ -0,0 +1,300 @@ +type . '-' . $this->mid; + } + + /** + * 鑾峰彇鍘熷鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select()->from('table.metas'); + } + + /** + * 鎻掑叆涓鏉¤褰 + * + * @access public + * @param array $options 璁板綍鎻掑叆鍊 + * @return integer + */ + public function insert(array $options) + { + return $this->db->query($this->db->insert('table.metas')->rows($options)); + } + + /** + * 鏇存柊璁板綍 + * + * @access public + * @param array $options 璁板綍鏇存柊鍊 + * @param Typecho_Db_Query $condition 鏇存柊鏉′欢 + * @return integer + */ + public function update(array $options, Typecho_Db_Query $condition) + { + return $this->db->query($condition->update('table.metas')->rows($options)); + } + + /** + * 鍒犻櫎璁板綍 + * + * @access public + * @param Typecho_Db_Query $condition 鍒犻櫎鏉′欢 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.metas')); + } + + /** + * 鑾峰彇璁板綍鎬绘暟 + * + * @access public + * @param Typecho_Db_Query $condition 璁$畻鏉′欢 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(mid)' => 'num'))->from('table.metas'))->num; + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + */ + public function filter(array $value) + { + //鐢熸垚闈欐侀摼鎺 + $type = $value['type']; + $routeExists = (NULL != Typecho_Router::get($type)); + $tmpSlug = $value['slug']; + $value['slug'] = urlencode($value['slug']); + + $value['permalink'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->index) : '#'; + + /** 鐢熸垚鑱氬悎閾炬帴 */ + /** RSS 2.0 */ + $value['feedUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedUrl) : '#'; + + /** RSS 1.0 */ + $value['feedRssUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedRssUrl) : '#'; + + /** ATOM 1.0 */ + $value['feedAtomUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedAtomUrl) : '#'; + + $value['slug'] = $tmpSlug; + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 鑾峰彇鏈澶ф帓搴 + * + * @param mixed $type + * @param int $parent + * @access public + * @return integer + */ + public function getMaxOrder($type, $parent = 0) + { + return $this->db->fetchObject($this->db->select(array('MAX(order)' => 'maxOrder')) + ->from('table.metas') + ->where('type = ? AND parent = ?', 'category', $parent))->maxOrder; + } + + /** + * 瀵规暟鎹寜鐓ort瀛楁鎺掑簭 + * + * @access public + * @param array $metas + * @param string $type + * @return void + */ + public function sort(array $metas, $type) + { + foreach ($metas as $sort => $mid) { + $this->update(array('order' => $sort + 1), + $this->db->sql()->where('mid = ?', $mid)->where('type = ?', $type)); + } + } + + /** + * 鍚堝苟鏁版嵁 + * + * @access public + * @param integer $mid 鏁版嵁涓婚敭 + * @param string $type 鏁版嵁绫诲瀷 + * @param array $metas 闇瑕佸悎骞剁殑鏁版嵁闆 + * @return void + */ + public function merge($mid, $type, array $metas) + { + $contents = Typecho_Common::arrayFlatten($this->db->fetchAll($this->select('cid') + ->from('table.relationships') + ->where('mid = ?', $mid)), 'cid'); + + foreach ($metas as $meta) { + if ($mid != $meta) { + $existsContents = Typecho_Common::arrayFlatten($this->db->fetchAll($this->db + ->select('cid')->from('table.relationships') + ->where('mid = ?', $meta)), 'cid'); + + $where = $this->db->sql()->where('mid = ? AND type = ?', $meta, $type); + $this->delete($where); + $diffContents = array_diff($existsContents, $contents); + $this->db->query($this->db->delete('table.relationships')->where('mid = ?', $meta)); + + foreach ($diffContents as $content) { + $this->db->query($this->db->insert('table.relationships') + ->rows(array('mid' => $mid, 'cid' => $content))); + $contents[] = $content; + } + + $this->update(array('parent' => $mid), $this->db->sql()->where('parent = ?', $meta)); + unset($existsContents); + } + } + + $num = $this->db->fetchObject($this->db + ->select(array('COUNT(mid)' => 'num'))->from('table.relationships') + ->where('table.relationships.mid = ?', $mid))->num; + + $this->update(array('count' => $num), $this->db->sql()->where('mid = ?', $mid)); + } + + /** + * 鏍规嵁tag鑾峰彇ID + * + * @access public + * @param mixed $inputTags 鏍囩鍚 + * @return array + */ + public function scanTags($inputTags) + { + $tags = is_array($inputTags) ? $inputTags : array($inputTags); + $result = array(); + + foreach ($tags as $tag) { + if (empty($tag)) { + continue; + } + + $row = $this->db->fetchRow($this->select() + ->where('type = ?', 'tag') + ->where('name = ?', $tag)->limit(1)); + + if ($row) { + $result[] = $row['mid']; + } else { + $slug = Typecho_Common::slugName($tag); + + if ($slug) { + $result[] = $this->insert(array( + 'name' => $tag, + 'slug' => $slug, + 'type' => 'tag', + 'count' => 0, + 'order' => 0, + )); + } + } + } + + return is_array($inputTags) ? $result : current($result); + } + + /** + * 娓呯悊娌℃湁浠讳綍鍐呭鐨勬爣绛 + * + * @access public + * @return void + */ + public function clearTags() + { + // 鍙栧嚭count涓0鐨勬爣绛 + $tags = Typecho_Common::arrayFlatten($this->db->fetchAll($this->db->select('mid') + ->from('table.metas')->where('type = ? AND count = ?', 'tags', 0)), 'mid'); + + foreach ($tags as $tag) { + // 纭鏄惁宸茬粡娌℃湁鍏宠仈浜 + $content = $this->db->fetchRow($this->db->select('cid') + ->from('table.relationships')->where('mid = ?', $tag) + ->limit(1)); + + if (empty($content)) { + $this->db->query($this->db->delete('table.metas') + ->where('mid = ?', $tag)); + } + } + } + + /** + * 鏍规嵁鍐呭鐨勬寚瀹氱被鍒拰鐘舵佹洿鏂扮浉鍏砿eta鐨勮鏁颁俊鎭 + * + * @access public + * @param int $mid meta id + * @param string $type 绫诲埆 + * @param string $status 鐘舵 + * @return void + */ + public function refreshCountByTypeAndStatus($mid, $type, $status = 'publish') + { + $num = $this->db->fetchObject($this->db->select(array('COUNT(table.contents.cid)' => 'num'))->from('table.contents') + ->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid = ?', $mid) + ->where('table.contents.type = ?', $type) + ->where('table.contents.status = ?', $status))->num; + + $this->db->query($this->db->update('table.metas')->rows(array('count' => $num)) + ->where('mid = ?', $mid)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Options.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Options.php" new file mode 100644 index 0000000..1b8a799 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Options.php" @@ -0,0 +1,95 @@ +db->select()->from('table.options'); + } + + /** + * 鎻掑叆涓鏉¤褰 + * + * @access public + * @param array $options 璁板綍鎻掑叆鍊 + * @return integer + */ + public function insert(array $options) + { + return $this->db->query($this->db->insert('table.options')->rows($options)); + } + + /** + * 鏇存柊璁板綍 + * + * @access public + * @param array $options 璁板綍鏇存柊鍊 + * @param Typecho_Db_Query $condition 鏇存柊鏉′欢 + * @return integer + */ + public function update(array $options, Typecho_Db_Query $condition) + { + return $this->db->query($condition->update('table.options')->rows($options)); + } + + /** + * 鍒犻櫎璁板綍 + * + * @access public + * @param Typecho_Db_Query $condition 鍒犻櫎鏉′欢 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.options')); + } + + /** + * 鑾峰彇璁板綍鎬绘暟 + * + * @access public + * @param Typecho_Db_Query $condition 璁$畻鏉′欢 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(name)' => 'num'))->from('table.options'))->num; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Users.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Users.php" new file mode 100644 index 0000000..464c834 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Abstract/Users.php" @@ -0,0 +1,247 @@ +db->fetchAll($this->db->select() + ->from('table.options')->where('user = ?', $this->uid)); + $options = array(); + foreach ($rows as $row) { + $options[$row['name']] = $row['value']; + } + + return new Typecho_Config($options); + } + + /** + * 鍒ゆ柇鐢ㄦ埛鍚嶇О鏄惁瀛樺湪 + * + * @access public + * @param string $name 鐢ㄦ埛鍚嶇О + * @return boolean + */ + public function nameExists($name) + { + $select = $this->db->select() + ->from('table.users') + ->where('name = ?', $name) + ->limit(1); + + if ($this->request->uid) { + $select->where('uid <> ?', $this->request->uid); + } + + $user = $this->db->fetchRow($select); + return $user ? false : true; + } + + /** + * 鍒ゆ柇鐢靛瓙閭欢鏄惁瀛樺湪 + * + * @access public + * @param string $mail 鐢靛瓙閭欢 + * @return boolean + */ + public function mailExists($mail) + { + $select = $this->db->select() + ->from('table.users') + ->where('mail = ?', $mail) + ->limit(1); + + if ($this->request->uid) { + $select->where('uid <> ?', $this->request->uid); + } + + $user = $this->db->fetchRow($select); + return $user ? false : true; + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏄电О鏄惁瀛樺湪 + * + * @access public + * @param string $screenName 鏄电О + * @return boolean + */ + public function screenNameExists($screenName) + { + $select = $this->db->select() + ->from('table.users') + ->where('screenName = ?', $screenName) + ->limit(1); + + if ($this->request->uid) { + $select->where('uid <> ?', $this->request->uid); + } + + $user = $this->db->fetchRow($select); + return $user ? false : true; + } + + /** + * 鑾峰彇椤甸潰鍋忕Щ + * + * @access protected + * @param string $column 瀛楁鍚 + * @param integer $offset 鍋忕Щ鍊 + * @param string $group 鐢ㄦ埛缁 + * @param integer $pageSize 鍒嗛〉鍊 + * @return integer + */ + protected function getPageOffset($column, $offset, $group = NULL, $pageSize = 20) + { + $select = $this->db->select(array('COUNT(uid)' => 'num'))->from('table.users') + ->where("table.users.{$column} > {$offset}"); + + if (!empty($group)) { + $select->where('table.users.group = ?', $group); + } + + $count = $this->db->fetchObject($select)->num + 1; + return ceil($count / $pageSize); + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + */ + public function filter(array $value) + { + //鐢熸垚闈欐侀摼鎺 + $routeExists = (NULL != Typecho_Router::get('author')); + + $value['permalink'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->index) : '#'; + + /** 鐢熸垚鑱氬悎閾炬帴 */ + /** RSS 2.0 */ + $value['feedUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedUrl) : '#'; + + /** RSS 1.0 */ + $value['feedRssUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedRssUrl) : '#'; + + /** ATOM 1.0 */ + $value['feedAtomUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedAtomUrl) : '#'; + + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 鏌ヨ鏂规硶 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select()->from('table.users'); + } + + /** + * 鑾峰緱鎵鏈夎褰曟暟 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(uid)' => 'num'))->from('table.users'))->num; + } + + /** + * 澧炲姞璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @return integer + */ + public function insert(array $rows) + { + return $this->db->query($this->db->insert('table.users')->rows($rows)); + } + + /** + * 鏇存柊璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function update(array $rows, Typecho_Db_Query $condition) + { + return $this->db->query($condition->update('table.users')->rows($rows)); + } + + /** + * 鍒犻櫎璁板綍鏂规硶 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.users')); + } + + /** + * 璋冪敤gravatar杈撳嚭鐢ㄦ埛澶村儚 + * + * @access public + * @param integer $size 澶村儚灏哄 + * @param string $rating 澶村儚璇勭骇 + * @param string $default 榛樿杈撳嚭澶村儚 + * @param string $class 榛樿css class + * @return void + */ + public function gravatar($size = 40, $rating = 'X', $default = NULL, $class = NULL) + { + $url = Typecho_Common::gravatarUrl($this->mail, $size, $rating, $default, $this->request->isSecure()); + echo ''; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Ajax.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Ajax.php" new file mode 100644 index 0000000..4775c61 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Ajax.php" @@ -0,0 +1,162 @@ +options->generator == $this->request->getAgent()) { + echo 'OK'; + } + } + + /** + * 鑾峰彇鏈鏂扮増鏈 + * + * @throws Typecho_Widget_Exception + */ + public function checkVersion() + { + $this->user->pass('editor'); + $client = Typecho_Http_Client::get(); + if ($client) { + $client->setHeader('User-Agent', $this->options->generator) + ->setTimeout(10) + ->send('https://github.com/typecho/typecho/releases.atom'); + + /** 鍖归厤鍐呭浣 */ + $response = $client->getResponseBody(); + preg_match_all("/]+href=\"([^>]*)\"\s*\/>/is", $response, $matches); + $result = array('available' => 0); + + list($soft, $version) = explode(' ', $this->options->generator); + $current = explode('/', $version); + + if ($matches) { + foreach ($matches[0] as $key => $val) { + $title = trim($matches[1][$key]); + if (preg_match("/v([0-9\.]+)\-([0-9\.]+)\-release$/is", $title, $out)) { + if (version_compare($out[1], $current[0], '>=') + && version_compare($out[2], $current[1], '>')) { + $result = array( + 'available' => 1, + 'latest' => $out[1] . '-' . $out[2], + 'current' => $current[0] . '-' . $current[1], + 'link' => 'https://github.com' . $matches[1][$key] + ); + break; + } + } + } + } + + $this->response->throwJson($result); + return; + } + + throw new Typecho_Widget_Exception(_t('绂佹璁块棶'), 403); + } + + /** + * 杩滅▼璇锋眰浠g悊 + * + * @throws Typecho_Widget_Exception + */ + public function feed() + { + $this->user->pass('subscriber'); + $client = Typecho_Http_Client::get(); + if ($client) { + $client->setHeader('User-Agent', $this->options->generator) + ->setTimeout(10) + ->send('http://typecho.org/feed/'); + + /** 鍖归厤鍐呭浣 */ + $response = $client->getResponseBody(); + preg_match_all("/\s*([^>]*)<\/title>\s*<link>([^>]*)<\/link>\s*<guid>[^>]*<\/guid>\s*<pubDate>([^>]*)<\/pubDate>/is", $response, $matches); + + $data = array(); + + if ($matches) { + foreach ($matches[0] as $key => $val) { + $data[] = array( + 'title' => $matches[1][$key], + 'link' => $matches[2][$key], + 'date' => date('n.j', strtotime($matches[3][$key])) + ); + + if ($key > 8) { + break; + } + } + } + + $this->response->throwJson($data); + return; + } + + throw new Typecho_Widget_Exception(_t('绂佹璁块棶'), 403); + } + + /** + * 鑷畾涔夌紪杈戝櫒澶у皬 + * + * @access public + * @return void + */ + public function editorResize() + { + $this->user->pass('contributor'); + if ($this->db->fetchObject($this->db->select(array('COUNT(*)' => 'num')) + ->from('table.options')->where('name = ? AND user = ?', 'editorSize', $this->user->uid))->num > 0) { + $this->widget('Widget_Abstract_Options') + ->update(array('value' => $this->request->size), $this->db->sql()->where('name = ? AND user = ?', 'editorSize', $this->user->uid)); + } else { + $this->widget('Widget_Abstract_Options')->insert(array( + 'name' => 'editorSize', + 'value' => $this->request->size, + 'user' => $this->user->uid + )); + } + } + + /** + * 寮傛璇锋眰鍏ュ彛 + * + * @access public + * @return void + */ + public function action() + { + if (!$this->request->isAjax()) { + $this->response->goBack(); + } + + $this->on($this->request->is('do=remoteCallback'))->remoteCallback(); + $this->on($this->request->is('do=feed'))->feed(); + $this->on($this->request->is('do=checkVersion'))->checkVersion(); + $this->on($this->request->is('do=editorResize'))->editorResize(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Archive.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Archive.php" new file mode 100644 index 0000000..8fe5d1d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Archive.php" @@ -0,0 +1,2090 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Posts.php 200 2008-05-21 06:33:20Z magike.net $ + */ + +/** + * 鍐呭鐨勬枃绔犲熀绫 + * 瀹氫箟鐨刢ss绫 + * p.more:闃呰鍏ㄦ枃閾炬帴鎵灞炴钀 + * + * @package Widget + */ +class Widget_Archive extends Widget_Abstract_Contents +{ + /** + * 璋冪敤鐨勯鏍兼枃浠 + * + * @access private + * @var string + */ + private $_themeFile; + + /** + * 椋庢牸鐩綍 + * + * @access private + * @var string + */ + private $_themeDir; + + /** + * 鍒嗛〉璁$畻瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 鏍囪鏄惁涓轰粠澶栭儴璋冪敤 + * + * @access private + * @var boolean + */ + private $_invokeFromOutside = false; + + /** + * 鏄惁鐢辫仛鍚堣皟鐢 + * + * @access private + * @var boolean + */ + private $_invokeByFeed = false; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鐢熸垚鍒嗛〉鐨勫唴瀹 + * + * @access private + * @var array + */ + private $_pageRow = array(); + + /** + * 鑱氬悎鍣ㄥ璞 + * + * @access private + * @var Typecho_Feed + */ + private $_feed; + + /** + * RSS 2.0鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedUrl; + + /** + * RSS 1.0鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedRssUrl; + + /** + * ATOM 鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedAtomUrl; + + /** + * 鏈〉鍏抽敭瀛 + * + * @access private + * @var string + */ + private $_keywords; + + /** + * 鏈〉鎻忚堪 + * + * @access private + * @var string + */ + private $_description; + + /** + * 鑱氬悎绫诲瀷 + * + * @access private + * @var string + */ + private $_feedType; + + /** + * 鑱氬悎绫诲瀷 + * + * @access private + * @var string + */ + private $_feedContentType; + + /** + * 褰撳墠feed鍦板潃 + * + * @access private + * @var string + */ + private $_currentFeedUrl; + + /** + * 褰掓。鏍囬 + * + * @access private + * @var string + */ + private $_archiveTitle = NULL; + + /** + * 褰掓。绫诲瀷 + * + * @access private + * @var string + */ + private $_archiveType = 'index'; + + /** + * 鏄惁涓哄崟涓褰掓。 + * + * @access private + * @var string + */ + private $_archiveSingle = false; + + /** + * 鏄惁涓鸿嚜瀹氫箟棣栭〉, 涓昏涓轰簡鏍囪鑷畾涔夐椤电殑鎯呭喌 + * + * (default value: false) + * + * @var boolean + * @access private + */ + private $_makeSinglePageAsFrontPage = false; + + /** + * 褰掓。缂╃暐鍚 + * + * @access private + * @var string + */ + private $_archiveSlug; + + /** + * 璁剧疆鍒嗛〉瀵硅薄 + * + * @access private + * @var Typecho_Widget_Helper_PageNavigator + */ + private $_pageNav; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @param mixed $request + * @param mixed $response + * @param mixed $params + * @throws Typecho_Widget_Exception + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + $this->parameter->setDefault(array( + 'pageSize' => $this->options->pageSize, + 'type' => NULL, + 'checkPermalink' => true + )); + + /** 鐢ㄤ簬鍒ゆ柇鏄矾鐢辫皟鐢ㄨ繕鏄閮ㄨ皟鐢 */ + if (NULL == $this->parameter->type) { + $this->parameter->type = Typecho_Router::$current; + } else { + $this->_invokeFromOutside = true; + } + + /** 鐢ㄤ簬鍒ゆ柇鏄惁涓篺eed璋冪敤 */ + if ($this->parameter->isFeed) { + $this->_invokeByFeed = true; + } + + /** 鍒濆鍖栫毊鑲よ矾寰 */ + $this->_themeDir = rtrim($this->options->themeFile($this->options->theme), '/') . '/'; + + /** 澶勭悊feed妯″紡 **/ + if ('feed' == $this->parameter->type) { + + $this->_currentFeedUrl = ''; + + /** 鍒ゆ柇鑱氬悎绫诲瀷 */ + switch (true) { + case 0 === strpos($this->request->feed, '/rss/') || '/rss' == $this->request->feed: + /** 濡傛灉鏄疪SS1鏍囧噯 */ + $this->request->feed = substr($this->request->feed, 4); + $this->_feedType = Typecho_Feed::RSS1; + $this->_currentFeedUrl = $this->options->feedRssUrl; + $this->_feedContentType = 'application/rdf+xml'; + break; + case 0 === strpos($this->request->feed, '/atom/') || '/atom' == $this->request->feed: + /** 濡傛灉鏄疉TOM鏍囧噯 */ + $this->request->feed = substr($this->request->feed, 5); + $this->_feedType = Typecho_Feed::ATOM1; + $this->_currentFeedUrl = $this->options->feedAtomUrl; + $this->_feedContentType = 'application/atom+xml'; + break; + default: + $this->_feedType = Typecho_Feed::RSS2; + $this->_currentFeedUrl = $this->options->feedUrl; + $this->_feedContentType = 'application/rss+xml'; + break; + } + + $feedQuery = $this->request->feed; + //$this->parameter->type = Typecho_Router::$current; + //$this->request->setParams($params); + + if ('/comments/' == $feedQuery || '/comments' == $feedQuery) { + /** 涓撲负feed浣跨敤鐨刪ack */ + $this->parameter->type = 'comments'; + } else { + $matched = Typecho_Router::match($this->request->feed, 'pageSize=10&isFeed=1'); + if ($matched && $matched instanceof Widget_Archive) { + $this->import($matched); + } else { + throw new Typecho_Widget_Exception(_t('鑱氬悎椤典笉瀛樺湪'), 404); + } + } + + /** 鍒濆鍖栬仛鍚堝櫒 */ + $this->setFeed(new Typecho_Feed(Typecho_Common::VERSION, $this->_feedType, $this->options->charset, _t('zh-CN'))); + + /** 榛樿杈撳嚭10鍒欐枃绔 **/ + $this->parameter->pageSize = 10; + } + } + + /** + * 璇勮鍦板潃 + * + * @access protected + * @return string + */ + protected function ___commentUrl() + { + /** 鐢熸垚鍙嶉鍦板潃 */ + /** 璇勮 */ + $commentUrl = parent::___commentUrl(); + + //涓嶄緷璧杍s鐨勭埗绾ц瘎璁 + $reply = $this->request->filter('int')->replyTo; + if ($reply && $this->is('single')) { + $commentUrl .= '?parent=' . $reply; + } + + return $this->options->commentsAntiSpam ? $commentUrl : $this->security->getTokenUrl($commentUrl); + } + + /** + * 璁剧疆鍒嗛〉瀵硅薄 + * @param array $pageRow + * @return void + */ + public function setPageRow($pageRow) + { + $this->_pageRow = $pageRow; + } + + /** + * @param string $archiveSlug the $_archiveSlug to set + */ + public function setArchiveSlug($archiveSlug) + { + $this->_archiveSlug = $archiveSlug; + } + + /** + * @param string $archiveSingle the $_archiveSingle to set + */ + public function setArchiveSingle($archiveSingle) + { + $this->_archiveSingle = $archiveSingle; + } + + /** + * @param $_archiveType the $_archiveType to set + */ + public function setArchiveType($archiveType) + { + $this->_archiveType = $archiveType; + } + + /** + * @param $_archiveTitle the $_archiveTitle to set + */ + public function setArchiveTitle($archiveTitle) + { + $this->_archiveTitle = $archiveTitle; + } + + /** + * 澧炲姞鏍囬 + * @param string $archiveTitle 鏍囬 + * @return void + */ + public function addArchiveTitle($archiveTitle) + { + $current = $this->getArchiveTitle(); + $current[] = $archiveTitle; + $this->setArchiveTitle($current); + } + + /** + * @param $_feedType the $_feedType to set + */ + public function setFeedType($feedType) + { + $this->_feedType = $feedType; + } + + /** + * @param $_description the $_description to set + */ + public function setDescription($description) + { + $this->_description = $description; + } + + /** + * @param $_keywords the $_keywords to set + */ + public function setKeywords($keywords) + { + $this->_keywords = $keywords; + } + + /** + * @param $_feedAtomUrl the $_feedAtomUrl to set + */ + public function setFeedAtomUrl($feedAtomUrl) + { + $this->_feedAtomUrl = $feedAtomUrl; + } + + /** + * @param $_feedRssUrl the $_feedRssUrl to set + */ + public function setFeedRssUrl($feedRssUrl) + { + $this->_feedRssUrl = $feedRssUrl; + } + + /** + * @param $_feedUrl the $_feedUrl to set + */ + public function setFeedUrl($feedUrl) + { + $this->_feedUrl = $feedUrl; + } + + /** + * @param $_feed the $_feed to set + */ + public function setFeed($feed) + { + $this->_feed = $feed; + } + + /** + * @param $_countSql the $_countSql to set + */ + public function setCountSql($countSql) + { + $this->_countSql = $countSql; + } + + /** + * @param $_total the $_total to set + */ + public function setTotal($total) + { + $this->_total = $total; + } + + /** + * @param $_themeFile the $_themeFile to set + */ + public function setThemeFile($themeFile) + { + $this->_themeFile = $themeFile; + } + + /** + * @param $_themeDir the $_themeDir to set + */ + public function setThemeDir($themeDir) + { + $this->_themeDir = $themeDir; + } + + /** + * 鑾峰彇鍒嗛〉瀵硅薄 + * @return array + */ + public function getPageRow() + { + return $this->_pageRow; + } + + /** + * @return the $_archiveSlug + */ + public function getArchiveSlug() + { + return $this->_archiveSlug; + } + + /** + * @return the $_archiveSingle + */ + public function getArchiveSingle() + { + return $this->_archiveSingle; + } + + /** + * @return the $_archiveType + */ + public function getArchiveType() + { + return $this->_archiveType; + } + + /** + * @return the $_archiveTitle + */ + public function getArchiveTitle() + { + return $this->_archiveTitle; + } + + /** + * @return the $_feedType + */ + public function getFeedType() + { + return $this->_feedType; + } + + /** + * @return the $_description + */ + public function getDescription() + { + return $this->_description; + } + + /** + * @return the $_keywords + */ + public function getKeywords() + { + return $this->_keywords; + } + + /** + * @return the $_feedAtomUrl + */ + public function getFeedAtomUrl() + { + return $this->_feedAtomUrl; + } + + /** + * @return the $_feedRssUrl + */ + public function getFeedRssUrl() + { + return $this->_feedRssUrl; + } + + /** + * @return the $_feedUrl + */ + public function getFeedUrl() + { + return $this->_feedUrl; + } + + /** + * @return the $_feed + */ + public function getFeed() + { + return $this->_feed; + } + + /** + * @return the $_countSql + */ + public function getCountSql() + { + return $this->_countSql; + } + + /** + * @return the $_total + */ + public function getTotal() + { + if (false === $this->_total) { + $this->_total = $this->size($this->_countSql); + } + + return $this->_total; + } + + /** + * @return the $_currentPage + */ + public function getCurrentPage() + { + return $this->_currentPage; + } + + /** + * 鑾峰彇椤垫暟 + * + * @return integer + */ + public function getTotalPage() + { + return ceil($this->getTotal() / $this->parameter->pageSize); + } + + /** + * @return the $_themeFile + */ + public function getThemeFile() + { + return $this->_themeFile; + } + + /** + * @return the $_themeDir + */ + public function getThemeDir() + { + return $this->_themeDir; + } + + /** + * 妫鏌ラ摼鎺ユ槸鍚︽纭 + * + * @access private + * @return void + */ + private function checkPermalink() + { + $type = $this->parameter->type; + + if (in_array($type, array('index', 'comment_page', 404)) + || $this->_makeSinglePageAsFrontPage // 鑷畾涔夐椤典笉澶勭悊 + || !$this->parameter->checkPermalink) { // 寮哄埗鍏抽棴 + return; + } + + if ($this->_archiveSingle) { + $permalink = $this->permalink; + } else { + $value = array_merge($this->_pageRow, array( + 'page' => $this->_currentPage + )); + + $path = Typecho_Router::url($type, $value); + $permalink = Typecho_Common::url($path, $this->options->index); + } + + $requestUrl = $this->request->getRequestUrl(); + + $src = parse_url($permalink); + $target = parse_url($requestUrl); + + if ($src['host'] != $target['host'] || urldecode($src['path']) != urldecode($target['path'])) { + $this->response->redirect($permalink, true); + } + } + + /** + * 瀵煎叆瀵硅薄 + * + * @access private + * @param Widget_Archive $widget 闇瑕佸鍏ョ殑瀵硅薄 + * @return void + */ + private function import(Widget_Archive $widget) + { + $currentProperties = get_object_vars($this); + + foreach ($currentProperties as $name => $value) { + if (false !== strpos('|request|response|parameter|_feed|_feedType|_currentFeedUrl|', '|' . $name . '|')) { + continue; + } + + if (isset($widget->{$name})) { + $this->{$name} = $widget->{$name}; + } else { + $method = ucfirst(trim($name, '_')); + $setMethod = 'set' . $method; + $getMethod = 'get' . $method; + + if (method_exists($this, $setMethod) + && method_exists($widget, $getMethod)) { + $this->{$setMethod}($widget->{$getMethod}()); + } + } + } + } + + /** + * 澶勭悊index + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function indexHandle(Typecho_Db_Query $select, &$hasPushed) + { + $select->where('table.contents.type = ?', 'post'); + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->indexHandle($this, $select); + } + + /** + * 404椤甸潰澶勭悊 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function error404Handle(Typecho_Db_Query $select, &$hasPushed) + { + /** 璁剧疆header */ + $this->response->setStatus(404); + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('椤甸潰娌℃壘鍒'); + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'archive'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 404; + + /** 璁剧疆褰掓。妯℃澘 */ + $this->_themeFile = '404.php'; + + /** 璁剧疆鍗曚竴褰掓。绫诲瀷 */ + $this->_archiveSingle = false; + + $hasPushed = true; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->error404Handle($this, $select); + } + + /** + * 鐙珛椤靛鐞 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function singleHandle(Typecho_Db_Query $select, &$hasPushed) + { + if ('comment_page' == $this->parameter->type) { + $params = array(); + $matched = Typecho_Router::match($this->request->permalink); + + if ($matched && $matched instanceof Widget_Archive && $matched->is('single')) { + $this->import($matched); + $hasPushed = true; + return; + } + } + + /** 灏嗚繖涓や釜璁剧疆鎻愬墠鏄负浜嗕繚璇佸湪璋冪敤query鐨刾lugin鏃跺彲浠ュ湪鎻掍欢涓娇鐢╥s鍒ゆ柇鍒濇褰掓。绫诲瀷 */ + /** 濡傛灉闇瑕佹洿缁嗗垽鏂紝鍒欏彲浠ヤ娇鐢╯ingleHandle鏉ュ疄鐜 */ + $this->_archiveSingle = true; + + /** 榛樿褰掓。绫诲瀷 */ + $this->_archiveType = 'single'; + + /** 鍖归厤绫诲瀷 */ + + if ('single' != $this->parameter->type) { + $select->where('table.contents.type = ?', $this->parameter->type); + } + + /** 濡傛灉鏄崟绡囨枃绔犳垨鐙珛椤甸潰 */ + if (isset($this->request->cid)) { + $select->where('table.contents.cid = ?', $this->request->filter('int')->cid); + } + + /** 鍖归厤缂╃暐鍚 */ + if (isset($this->request->slug)) { + $select->where('table.contents.slug = ?', $this->request->slug); + } + + /** 鍖归厤鏃堕棿 */ + if (isset($this->request->year)) { + $year = $this->request->filter('int')->year; + + $fromMonth = 1; + $toMonth = 12; + + $fromDay = 1; + $toDay = 31; + + if (isset($this->request->month)) { + $fromMonth = $this->request->filter('int')->month; + $toMonth = $fromMonth; + + $fromDay = 1; + $toDay = date('t', mktime(0, 0, 0, $toMonth, 1, $year)); + + if (isset($this->request->day)) { + $fromDay = $this->request->filter('int')->day; + $toDay = $fromDay; + } + } + + /** 鑾峰彇璧峰GMT鏃堕棿鐨剈nix鏃堕棿鎴 */ + $from = mktime(0, 0, 0, $fromMonth, $fromDay, $year) - $this->options->timezone + $this->options->serverTimezone; + $to = mktime(23, 59, 59, $toMonth, $toDay, $year) - $this->options->timezone + $this->options->serverTimezone; + $select->where('table.contents.created > ? AND table.contents.created < ?', $from, $to); + } + + /** 淇濆瓨瀵嗙爜鑷砪ookie */ + if ($this->request->isPost() && isset($this->request->protectPassword)) { + $this->security->protect(); + Typecho_Cookie::set('protectPassword', $this->request->protectPassword, 0); + } + + /** 鍖归厤绫诲瀷 */ + $select->limit(1); + $this->query($select); + + if (!$this->have() + || (isset($this->request->category) && $this->category != $this->request->category) + || (isset($this->request->directory) && $this->request->directory != implode('/', $this->directory))) { + if (!$this->_invokeFromOutside) { + /** 瀵规病鏈夌储寮曟儏鍐典笅鐨勫垽鏂 */ + throw new Typecho_Widget_Exception(_t('璇锋眰鐨勫湴鍧涓嶅瓨鍦'), 404); + } else { + $hasPushed = true; + return; + } + } + + /** 璁剧疆妯℃澘 */ + if ($this->template) { + /** 搴旂敤鑷畾涔夋ā鏉 */ + $this->_themeFile = $this->template; + } + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + + //瀵硅嚜瀹氫箟棣栭〉浣跨敤鍏ㄥ眬鍙橀噺 + if (!$this->_makeSinglePageAsFrontPage) { + $this->_feedUrl = $this->feedUrl; + + /** RSS 1.0 */ + $this->_feedRssUrl = $this->feedRssUrl; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $this->feedAtomUrl; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $this->title; + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = implode(',', Typecho_Common::arrayFlatten($this->tags, 'name')); + + /** 璁剧疆鎻忚堪 */ + $this->_description = $this->description; + } + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = $this->type; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = ('post' == $this->type || 'attachment' == $this->type) ? $this->cid : $this->slug; + + /** 璁剧疆403澶 */ + if ($this->hidden) { + $this->response->setStatus(403); + } + + $hasPushed = true; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->singleHandle($this, $select); + } + + /** + * 澶勭悊鍒嗙被 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function categoryHandle(Typecho_Db_Query $select, &$hasPushed) + { + /** 濡傛灉鏄垎绫 */ + $categorySelect = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->limit(1); + + if (isset($this->request->mid)) { + $categorySelect->where('mid = ?', $this->request->filter('int')->mid); + } + + if (isset($this->request->slug)) { + $categorySelect->where('slug = ?', $this->request->slug); + } + + if (isset($this->request->directory)) { + $directory = explode('/', $this->request->directory); + $categorySelect->where('slug = ?', $directory[count($directory) - 1]); + } + + $category = $this->db->fetchRow($categorySelect); + if (empty($category)) { + throw new Typecho_Widget_Exception(_t('鍒嗙被涓嶅瓨鍦'), 404); + } + + $categoryListWidget = $this->widget('Widget_Metas_Category_List', 'current=' . $category['mid']); + $category = $categoryListWidget->filter($category); + + if (isset($directory) && ($this->request->directory != implode('/', $category['directory']))) { + throw new Typecho_Widget_Exception(_t('鐖剁骇鍒嗙被涓嶅瓨鍦'), 404); + } + + $children = $categoryListWidget->getAllChildren($category['mid']); + $children[] = $category['mid']; + + /** fix sql92 by 70 */ + $select->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid IN ?', $children) + ->where('table.contents.type = ?', 'post') + ->group('table.contents.cid'); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = array_merge($category, array( + 'slug' => urlencode($category['slug']), + 'directory' => implode('/', array_map('urlencode', $category['directory'])) + )); + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $category['name']; + + /** 璁剧疆鎻忚堪 */ + $this->_description = $category['description']; + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = $category['feedUrl']; + + /** RSS 1.0 */ + $this->_feedRssUrl = $category['feedRssUrl']; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $category['feedAtomUrl']; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $category['name']; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'category'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = $category['slug']; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->categoryHandle($this, $select); + } + + /** + * 澶勭悊鏍囩 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function tagHandle(Typecho_Db_Query $select, &$hasPushed) + { + $tagSelect = $this->db->select()->from('table.metas') + ->where('type = ?', 'tag')->limit(1); + + if (isset($this->request->mid)) { + $tagSelect->where('mid = ?', $this->request->filter('int')->mid); + } + + if (isset($this->request->slug)) { + $tagSelect->where('slug = ?', $this->request->slug); + } + + /** 濡傛灉鏄爣绛 */ + $tag = $this->db->fetchRow($tagSelect, + array($this->widget('Widget_Abstract_Metas'), 'filter')); + + if (!$tag) { + throw new Typecho_Widget_Exception(_t('鏍囩涓嶅瓨鍦'), 404); + } + + /** fix sql92 by 70 */ + $select->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid = ?', $tag['mid']) + ->where('table.contents.type = ?', 'post'); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = array_merge($tag, array( + 'slug' => urlencode($tag['slug']) + )); + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $tag['name']; + + /** 璁剧疆鎻忚堪 */ + $this->_description = $tag['description']; + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = $tag['feedUrl']; + + /** RSS 1.0 */ + $this->_feedRssUrl = $tag['feedRssUrl']; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $tag['feedAtomUrl']; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $tag['name']; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'tag'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = $tag['slug']; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->tagHandle($this, $select); + } + + /** + * 澶勭悊浣滆 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function authorHandle(Typecho_Db_Query $select, &$hasPushed) + { + $uid = $this->request->filter('int')->uid; + + $author = $this->db->fetchRow($this->db->select()->from('table.users') + ->where('uid = ?', $uid), + array($this->widget('Widget_Abstract_Users'), 'filter')); + + if (!$author) { + throw new Typecho_Widget_Exception(_t('浣滆呬笉瀛樺湪'), 404); + } + + $select->where('table.contents.authorId = ?', $uid) + ->where('table.contents.type = ?', 'post'); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = $author; + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $author['screenName']; + + /** 璁剧疆鎻忚堪 */ + $this->_description = $author['screenName']; + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = $author['feedUrl']; + + /** RSS 1.0 */ + $this->_feedRssUrl = $author['feedRssUrl']; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $author['feedAtomUrl']; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $author['screenName']; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'author'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = $author['uid']; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->authorHandle($this, $select); + } + + /** + * 澶勭悊鏃ユ湡 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function dateHandle(Typecho_Db_Query $select, &$hasPushed) + { + /** 濡傛灉鏄寜鏃ユ湡褰掓。 */ + $year = $this->request->filter('int')->year; + $month = $this->request->filter('int')->month; + $day = $this->request->filter('int')->day; + + if (!empty($year) && !empty($month) && !empty($day)) { + + /** 濡傛灉鎸夋棩褰掓。 */ + $from = mktime(0, 0, 0, $month, $day, $year); + $to = mktime(23, 59, 59, $month, $day, $year); + + /** 褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 'day'; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('%d骞%d鏈%d鏃', $year, $month, $day); + } else if (!empty($year) && !empty($month)) { + + /** 濡傛灉鎸夋湀褰掓。 */ + $from = mktime(0, 0, 0, $month, 1, $year); + $to = mktime(23, 59, 59, $month, date('t', $from), $year); + + /** 褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 'month'; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('%d骞%d鏈', $year, $month); + } else if (!empty($year)) { + + /** 濡傛灉鎸夊勾褰掓。 */ + $from = mktime(0, 0, 0, 1, 1, $year); + $to = mktime(23, 59, 59, 12, 31, $year); + + /** 褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 'year'; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('%d骞', $year); + } + + $select->where('table.contents.created >= ?', $from - $this->options->timezone + $this->options->serverTimezone) + ->where('table.contents.created <= ?', $to - $this->options->timezone + $this->options->serverTimezone) + ->where('table.contents.type = ?', 'post'); + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'date'; + + /** 璁剧疆澶撮儴feed */ + $value = array('year' => $year, 'month' => str_pad($month, 2, '0', STR_PAD_LEFT), 'day' => str_pad($day, 2, '0', STR_PAD_LEFT)); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = $value; + + /** 鑾峰彇褰撳墠璺敱,杩囨护鎺夌炕椤垫儏鍐 */ + $currentRoute = str_replace('_page', '', $this->parameter->type); + + /** RSS 2.0 */ + $this->_feedUrl = Typecho_Router::url($currentRoute, $value, $this->options->feedUrl); + + /** RSS 1.0 */ + $this->_feedRssUrl = Typecho_Router::url($currentRoute, $value, $this->options->feedRssUrl); + + /** ATOM 1.0 */ + $this->_feedAtomUrl = Typecho_Router::url($currentRoute, $value, $this->options->feedAtomUrl); + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->dateHandle($this, $select); + } + + /** + * 澶勭悊鎼滅储 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function searchHandle(Typecho_Db_Query $select, &$hasPushed) + { + /** 澧炲姞鑷畾涔夋悳绱㈠紩鎿庢帴鍙 */ + //~ fix issue 40 + $keywords = $this->request->filter('url', 'search')->keywords; + $this->pluginHandle()->trigger($hasPushed)->search($keywords, $this); + + if (!$hasPushed) { + $searchQuery = '%' . str_replace(' ', '%', $keywords) . '%'; + + /** 鎼滅储鏃犳硶杩涘叆闅愮椤逛繚鎶ゅ綊妗 */ + $select->where('table.contents.password IS NULL') + ->where('table.contents.title LIKE ? OR table.contents.text LIKE ?', $searchQuery, $searchQuery) + ->where('table.contents.type = ?', 'post'); + } + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $keywords; + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = array('keywords' => urlencode($keywords)); + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = Typecho_Router::url('search', array('keywords' => $keywords), $this->options->feedUrl); + + /** RSS 1.0 */ + $this->_feedRssUrl = Typecho_Router::url('search', array('keywords' => $keywords), $this->options->feedAtomUrl); + + /** ATOM 1.0 */ + $this->_feedAtomUrl = Typecho_Router::url('search', array('keywords' => $keywords), $this->options->feedAtomUrl); + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $keywords; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'search'; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->searchHandle($this, $select); + } + + /** + * 閲嶈浇select + * + * @access public + * @return void + */ + public function select() + { + if ($this->_feed) { + // 瀵筬eed杈撳嚭鍔犲叆闄愬埗鏉′欢 + return parent::select()->where('table.contents.allowFeed = ?', 1) + ->where('table.contents.password IS NULL'); + } else { + return parent::select(); + } + } + + /** + * 鎻愪氦鏌ヨ + * + * @access public + * @param mixed $select 鏌ヨ瀵硅薄 + * @return void + */ + public function query($select) + { + $this->pluginHandle()->trigger($queryPlugged)->query($this, $select); + if (!$queryPlugged) { + $this->db->fetchAll($select, array($this, 'push')); + } + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 閬垮厤閲嶅鍙栨暟鎹 */ + if ($this->have()) { + return; + } + + $handles = array( + 'index' => 'indexHandle', + 'index_page' => 'indexHandle', + 'archive' => 'error404Handle', + 'archive_page' => 'error404Handle', + 404 => 'error404Handle', + 'single' => 'singleHandle', + 'page' => 'singleHandle', + 'post' => 'singleHandle', + 'attachment' => 'singleHandle', + 'comment_page' => 'singleHandle', + 'category' => 'categoryHandle', + 'category_page' => 'categoryHandle', + 'tag' => 'tagHandle', + 'tag_page' => 'tagHandle', + 'author' => 'authorHandle', + 'author_page' => 'authorHandle', + 'archive_year' => 'dateHandle', + 'archive_year_page' => 'dateHandle', + 'archive_month' => 'dateHandle', + 'archive_month_page' => 'dateHandle', + 'archive_day' => 'dateHandle', + 'archive_day_page' => 'dateHandle', + 'search' => 'searchHandle', + 'search_page' => 'searchHandle' + ); + + /** 澶勭悊鎼滅储缁撴灉璺宠浆 */ + if (isset($this->request->s)) { + $filterKeywords = $this->request->filter('search')->s; + + /** 璺宠浆鍒版悳绱㈤〉 */ + if (NULL != $filterKeywords) { + $this->response->redirect(Typecho_Router::url('search', + array('keywords' => urlencode($filterKeywords)), $this->options->index)); + } + } + + /** 鑷畾涔夐椤靛姛鑳 */ + $frontPage = $this->options->frontPage; + if (!$this->_invokeByFeed && ('index' == $this->parameter->type || 'index_page' == $this->parameter->type)) { + //鏄剧ず鏌愪釜椤甸潰 + if (0 === strpos($frontPage, 'page:')) { + // 瀵规煇浜涘彉閲忓仛hack + $this->request->setParam('cid', intval(substr($frontPage, 5))); + $this->parameter->type = 'page'; + $this->_makeSinglePageAsFrontPage = true; + } else if (0 === strpos($frontPage, 'file:')) { + // 鏄剧ず鏌愪釜鏂囦欢 + $this->setThemeFile(substr($frontPage, 5)); + return; + } + } + + if ('recent' != $frontPage && $this->options->frontArchive) { + $handles['archive'] = 'indexHandle'; + $handles['archive_page'] = 'indexHandle'; + $this->_archiveType = 'front'; + } + + /** 鍒濆鍖栧垎椤靛彉閲 */ + $this->_currentPage = isset($this->request->page) ? $this->request->page : 1; + $hasPushed = false; + + /** select鍒濆鍖 */ + $select = $this->pluginHandle()->trigger($selectPlugged)->select($this); + + /** 瀹氭椂鍙戝竷鍔熻兘 */ + if (!$selectPlugged) { + if ('post' == $this->parameter->type || 'page' == $this->parameter->type) { + if ($this->user->hasLogin()) { + $select = $this->select()->where('table.contents.status = ? OR table.contents.status = ? OR + (table.contents.status = ? AND table.contents.authorId = ?)', + 'publish', 'hidden', 'private', $this->user->uid); + } else { + $select = $this->select()->where('table.contents.status = ? OR table.contents.status = ?', + 'publish', 'hidden'); + } + } else { + if ($this->user->hasLogin()) { + $select = $this->select()->where('table.contents.status = ? OR + (table.contents.status = ? AND table.contents.authorId = ?)', 'publish', 'private', $this->user->uid); + } else { + $select = $this->select()->where('table.contents.status = ?', 'publish'); + } + } + $select->where('table.contents.created < ?', $this->options->gmtTime); + } + + /** handle鍒濆鍖 */ + $this->pluginHandle()->handleInit($this, $select); + + /** 鍒濆鍖栧叾瀹冨彉閲 */ + $this->_feedUrl = $this->options->feedUrl; + $this->_feedRssUrl = $this->options->feedRssUrl; + $this->_feedAtomUrl = $this->options->feedAtomUrl; + $this->_keywords = $this->options->keywords; + $this->_description = $this->options->description; + + if (isset($handles[$this->parameter->type])) { + $handle = $handles[$this->parameter->type]; + $this->{$handle}($select, $hasPushed); + } else { + $hasPushed = $this->pluginHandle()->handle($this->parameter->type, $this, $select); + } + + /** 鍒濆鍖栫毊鑲ゅ嚱鏁 */ + $functionsFile = $this->_themeDir . 'functions.php'; + if (!$this->_invokeFromOutside && file_exists($functionsFile)) { + require_once $functionsFile; + if (function_exists('themeInit')) { + themeInit($this); + } + } + + /** 濡傛灉宸茬粡鎻愬墠鍘嬪叆鍒欑洿鎺ヨ繑鍥 */ + if ($hasPushed) { + return; + } + + /** 浠呰緭鍑烘枃绔 */ + $this->_countSql = clone $select; + + $select->order('table.contents.created', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + $this->query($select); + } + + /** + * 杈撳嚭鏂囩珷鍐呭 + * + * @access public + * @param string $more 鏂囩珷鎴彇鍚庣紑 + * @return void + */ + public function content($more = NULL) + { + parent::content($this->is('single') ? false : $more); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @param string $prev 涓婁竴椤垫枃瀛 + * @param string $next 涓嬩竴椤垫枃瀛 + * @param int $splitPage 鍒嗗壊鑼冨洿 + * @param string $splitWord 鍒嗗壊瀛楃 + * @param string $template 灞曠幇閰嶇疆淇℃伅 + * @return void + */ + public function pageNav($prev = '«', $next = '»', $splitPage = 3, $splitWord = '...', $template = '') + { + if ($this->have()) { + $hasNav = false; + $default = array( + 'wrapTag' => 'ol', + 'wrapClass' => 'page-navigator' + ); + + if (is_string($template)) { + parse_str($template, $config); + } else { + $config = $template; + } + + $template = array_merge($default, $config); + + $total = $this->getTotal(); + $this->pluginHandle()->trigger($hasNav)->pageNav($this->_currentPage, $total, + $this->parameter->pageSize, $prev, $next, $splitPage, $splitWord); + + if (!$hasNav && $total > $this->parameter->pageSize) { + $query = Typecho_Router::url($this->parameter->type . + (false === strpos($this->parameter->type, '_page') ? '_page' : NULL), + $this->_pageRow, $this->options->index); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box($total, + $this->_currentPage, $this->parameter->pageSize, $query); + + echo '<' . $template['wrapTag'] . (empty($template['wrapClass']) + ? '' : ' class="' . $template['wrapClass'] . '"') . '>'; + $nav->render($prev, $next, $splitPage, $splitWord, $template); + echo '</' . $template['wrapTag'] . '>'; + } + } + } + + /** + * 鍓嶄竴椤 + * + * @access public + * @param string $word 閾炬帴鏍囬 + * @param string $page 椤甸潰閾炬帴 + * @return void + */ + public function pageLink($word = '« Previous Entries', $page = 'prev') + { + if ($this->have()) { + if (empty($this->_pageNav)) { + $query = Typecho_Router::url($this->parameter->type . + (false === strpos($this->parameter->type, '_page') ? '_page' : NULL), + $this->_pageRow, $this->options->index); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $this->_pageNav = new Typecho_Widget_Helper_PageNavigator_Classic($this->getTotal(), + $this->_currentPage, $this->parameter->pageSize, $query); + } + + $this->_pageNav->{$page}($word); + } + } + + /** + * 鑾峰彇璇勮褰掓。瀵硅薄 + * + * @access public + * @return Widget_Abstract_Comments + */ + public function comments() + { + $parameter = array( + 'parentId' => $this->hidden ? 0 : $this->cid, + 'parentContent' => $this->row, + 'respondId' => $this->respondId, + 'commentPage' => $this->request->filter('int')->commentPage, + 'allowComment' => $this->allow('comment') + ); + + return $this->widget('Widget_Comments_Archive', $parameter); + } + + /** + * 鑾峰彇鍥炲搷褰掓。瀵硅薄 + * + * @access public + * @return Widget_Comments_Ping + */ + public function pings() + { + return $this->widget('Widget_Comments_Ping', array( + 'parentId' => $this->hidden ? 0 : $this->cid, + 'parentContent' => $this->row, + 'allowPing' => $this->allow('ping') + )); + } + + /** + * 鑾峰彇闄勪欢瀵硅薄 + * + * @access public + * @param integer $limit 鏈澶т釜鏁 + * @param integer $offset 閲嶆柊 + * @return Widget_Contents_Attachment_Related + */ + public function attachments($limit = 0, $offset = 0) + { + return $this->widget('Widget_Contents_Attachment_Related@' . $this->cid . '-' . uniqid(), array( + 'parentId' => $this->cid, + 'limit' => $limit, + 'offset' => $offset + )); + } + + /** + * 鏄剧ず涓嬩竴涓唴瀹圭殑鏍囬閾炬帴 + * + * @access public + * @param string $format 鏍煎紡 + * @param string $default 濡傛灉娌℃湁涓嬩竴绡,鏄剧ず鐨勯粯璁ゆ枃瀛 + * @param array $custom 瀹氬埗鍖栨牱寮 + * @return void + */ + public function theNext($format = '%s', $default = NULL, $custom = array()) + { + $content = $this->db->fetchRow($this->select()->where('table.contents.created > ? AND table.contents.created < ?', + $this->created, $this->options->gmtTime) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.type = ?', $this->type) + ->where('table.contents.password IS NULL') + ->order('table.contents.created', Typecho_Db::SORT_ASC) + ->limit(1)); + + if ($content) { + $content = $this->filter($content); + $default = array( + 'title' => NULL, + 'tagClass' => NULL + ); + $custom = array_merge($default, $custom); + extract($custom); + + $linkText = empty($title) ? $content['title'] : $title; + $linkClass = empty($tagClass) ? '' : 'class="' . $tagClass . '" '; + $link = '<a ' . $linkClass . 'href="' . $content['permalink'] . '" title="' . $content['title'] . '">' . $linkText . '</a>'; + + printf($format, $link); + } else { + echo $default; + } + } + + /** + * 鏄剧ず涓婁竴涓唴瀹圭殑鏍囬閾炬帴 + * + * @access public + * @param string $format 鏍煎紡 + * @param string $default 濡傛灉娌℃湁涓婁竴绡,鏄剧ず鐨勯粯璁ゆ枃瀛 + * @param array $custom 瀹氬埗鍖栨牱寮 + * @return void + */ + public function thePrev($format = '%s', $default = NULL, $custom = array()) + { + $content = $this->db->fetchRow($this->select()->where('table.contents.created < ?', $this->created) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.type = ?', $this->type) + ->where('table.contents.password IS NULL') + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit(1)); + + if ($content) { + $content = $this->filter($content); + $default = array( + 'title' => NULL, + 'tagClass' => NULL + ); + $custom = array_merge($default, $custom); + extract($custom); + + $linkText = empty($title) ? $content['title'] : $title; + $linkClass = empty($tagClass) ? '' : 'class="' . $tagClass . '" '; + $link = '<a ' . $linkClass . 'href="' . $content['permalink'] . '" title="' . $content['title'] . '">' . $linkText . '</a>'; + + printf($format, $link); + } else { + echo $default; + } + } + + /** + * 鑾峰彇鍏宠仈鍐呭缁勪欢 + * + * @access public + * @param integer $limit 杈撳嚭鏁伴噺 + * @param string $type 鍏宠仈绫诲瀷 + * @return Typecho_Widget + */ + public function related($limit = 5, $type = NULL) + { + $type = strtolower($type); + + switch ($type) { + case 'author': + /** 濡傛灉璁块棶鏉冮檺琚缃负绂佹,鍒檛ag浼氳缃负绌 */ + return $this->widget('Widget_Contents_Related_Author', + array('cid' => $this->cid, 'type' => $this->type, 'author' => $this->author->uid, 'limit' => $limit)); + default: + /** 濡傛灉璁块棶鏉冮檺琚缃负绂佹,鍒檛ag浼氳缃负绌 */ + return $this->widget('Widget_Contents_Related', + array('cid' => $this->cid, 'type' => $this->type, 'tags' => $this->tags, 'limit' => $limit)); + } + } + + /** + * 杈撳嚭澶撮儴鍏冩暟鎹 + * + * @access public + * @param string $rule 瑙勫垯 + * @return void + */ + public function header($rule = NULL) + { + $rules = array(); + $allows = array( + 'description' => htmlspecialchars($this->_description), + 'keywords' => htmlspecialchars($this->_keywords), + 'generator' => $this->options->generator, + 'template' => $this->options->theme, + 'pingback' => $this->options->xmlRpcUrl, + 'xmlrpc' => $this->options->xmlRpcUrl . '?rsd', + 'wlw' => $this->options->xmlRpcUrl . '?wlw', + 'rss2' => $this->_feedUrl, + 'rss1' => $this->_feedRssUrl, + 'commentReply' => 1, + 'antiSpam' => 1, + 'atom' => $this->_feedAtomUrl + ); + + /** 澶撮儴鏄惁杈撳嚭鑱氬悎 */ + $allowFeed = !$this->is('single') || $this->allow('feed') || $this->_makeSinglePageAsFrontPage; + + if (!empty($rule)) { + parse_str($rule, $rules); + $allows = array_merge($allows, $rules); + } + + $allows = $this->pluginHandle()->headerOptions($allows, $this); + + $header = ''; + if (!empty($allows['description'])) { + $header .= '<meta name="description" content="' . $allows['description'] . '" />' . "\n"; + } + + if (!empty($allows['keywords'])) { + $header .= '<meta name="keywords" content="' . $allows['keywords'] . '" />' . "\n"; + } + + if (!empty($allows['generator'])) { + $header .= '<meta name="generator" content="' . $allows['generator'] . '" />' . "\n"; + } + + if (!empty($allows['template'])) { + $header .= '<meta name="template" content="' . $allows['template'] . '" />' . "\n"; + } + + if (!empty($allows['pingback'])) { + $header .= '<link rel="pingback" href="' . $allows['pingback'] . '" />' . "\n"; + } + + if (!empty($allows['xmlrpc'])) { + $header .= '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . $allows['xmlrpc'] . '" />' . "\n"; + } + + if (!empty($allows['wlw'])) { + $header .= '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' . $allows['wlw'] . '" />' . "\n"; + } + + if (!empty($allows['rss2']) && $allowFeed) { + $header .= '<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="' . $allows['rss2'] . '" />' . "\n"; + } + + if (!empty($allows['rss1']) && $allowFeed) { + $header .= '<link rel="alternate" type="application/rdf+xml" title="RSS 1.0" href="' . $allows['rss1'] . '" />' . "\n"; + } + + if (!empty($allows['atom']) && $allowFeed) { + $header .= '<link rel="alternate" type="application/atom+xml" title="ATOM 1.0" href="' . $allows['atom'] . '" />' . "\n"; + } + + if ($this->options->commentsThreaded && $this->is('single')) { + if ('' != $allows['commentReply']) { + if (1 == $allows['commentReply']) { + $header .= "<script type=\"text/javascript\"> +(function () { + window.TypechoComment = { + dom : function (id) { + return document.getElementById(id); + }, + + create : function (tag, attr) { + var el = document.createElement(tag); + + for (var key in attr) { + el.setAttribute(key, attr[key]); + } + + return el; + }, + + reply : function (cid, coid) { + var comment = this.dom(cid), parent = comment.parentNode, + response = this.dom('" . $this->respondId . "'), input = this.dom('comment-parent'), + form = 'form' == response.tagName ? response : response.getElementsByTagName('form')[0], + textarea = response.getElementsByTagName('textarea')[0]; + + if (null == input) { + input = this.create('input', { + 'type' : 'hidden', + 'name' : 'parent', + 'id' : 'comment-parent' + }); + + form.appendChild(input); + } + + input.setAttribute('value', coid); + + if (null == this.dom('comment-form-place-holder')) { + var holder = this.create('div', { + 'id' : 'comment-form-place-holder' + }); + + response.parentNode.insertBefore(holder, response); + } + + comment.appendChild(response); + this.dom('cancel-comment-reply-link').style.display = ''; + + if (null != textarea && 'text' == textarea.name) { + textarea.focus(); + } + + return false; + }, + + cancelReply : function () { + var response = this.dom('{$this->respondId}'), + holder = this.dom('comment-form-place-holder'), input = this.dom('comment-parent'); + + if (null != input) { + input.parentNode.removeChild(input); + } + + if (null == holder) { + return true; + } + + this.dom('cancel-comment-reply-link').style.display = 'none'; + holder.parentNode.insertBefore(response, holder); + return false; + } + }; +})(); +</script> +"; + } else { + $header .= '<script src="' . $allows['commentReply'] . '" type="text/javascript"></script>'; + } + } + } + + /** 鍙嶅瀮鍦捐缃 */ + if ($this->options->commentsAntiSpam && $this->is('single')) { + if ('' != $allows['antiSpam']) { + if (1 == $allows['antiSpam']) { + $header .= "<script type=\"text/javascript\"> +(function () { + var event = document.addEventListener ? { + add: 'addEventListener', + focus: 'focus', + load: 'DOMContentLoaded' + } : { + add: 'attachEvent', + focus: 'onfocus', + load: 'onload' + }; + + document[event.add](event.load, function () { + var r = document.getElementById('{$this->respondId}'); + + if (null != r) { + var forms = r.getElementsByTagName('form'); + if (forms.length > 0) { + var f = forms[0], textarea = f.getElementsByTagName('textarea')[0], added = false; + + if (null != textarea && 'text' == textarea.name) { + textarea[event.add](event.focus, function () { + if (!added) { + var input = document.createElement('input'); + input.type = 'hidden'; + input.name = '_'; + input.value = " . Typecho_Common::shuffleScriptVar( + $this->security->getToken($this->request->getRequestUrl())) . " + + f.appendChild(input); + added = true; + } + }); + } + } + } + }); +})(); +</script>"; + } else { + $header .= '<script src="' . $allows['antiSpam'] . '" type="text/javascript"></script>'; + } + } + } + + /** 鎻掍欢鏀寔 */ + $this->pluginHandle()->header($header, $this); + + /** 杈撳嚭header */ + echo $header; + } + + /** + * 鏀寔椤佃剼鑷畾涔 + * + * @access public + * @return void + */ + public function footer() + { + $this->pluginHandle()->footer($this); + } + + /** + * 杈撳嚭cookie璁板繂鍒悕 + * + * @access public + * @param string $cookieName 宸茬粡璁板繂鐨刢ookie鍚嶇О + * @param boolean $return 鏄惁杩斿洖 + * @return string + */ + public function remember($cookieName, $return = false) + { + $cookieName = strtolower($cookieName); + if (!in_array($cookieName, array('author', 'mail', 'url'))) { + return ''; + } + + $value = Typecho_Cookie::get('__typecho_remember_' . $cookieName); + if ($return) { + return $value; + } else { + echo htmlspecialchars($value); + } + } + + /** + * 杈撳嚭褰掓。鏍囬 + * + * @param mixed $defines + * @param string $before + * @param string $end + * @access public + * @return void + */ + public function archiveTitle($defines = NULL, $before = ' » ', $end = '') + { + if ($this->_archiveTitle) { + $define = '%s'; + if (is_array($defines) && !empty($defines[$this->_archiveType])) { + $define = $defines[$this->_archiveType]; + } + + echo $before . sprintf($define, $this->_archiveTitle) . $end; + } + } + + /** + * 杈撳嚭鍏抽敭瀛 + * + * @access public + */ + public function keywords($split = ',', $default = '') + { + echo empty($this->_keywords) ? $default : str_replace(',', $split, htmlspecialchars($this->_keywords)); + } + + /** + * 鍒ゆ柇褰掓。绫诲瀷鍜屽悕绉 + * + * @access public + * @param string $archiveType 褰掓。绫诲瀷 + * @param string $archiveSlug 褰掓。鍚嶇О + * @return boolean + */ + public function is($archiveType, $archiveSlug = NULL) + { + return ($archiveType == $this->_archiveType || + (($this->_archiveSingle ? 'single' : 'archive') == $archiveType && 'index' != $this->_archiveType) || + ('index' == $archiveType && $this->_makeSinglePageAsFrontPage)) + && (empty($archiveSlug) ? true : $archiveSlug == $this->_archiveSlug); + } + + /** + * 鑾峰彇涓婚鏂囦欢 + * + * @access public + * @param string $fileName 涓婚鏂囦欢 + * @return void + */ + public function need($fileName) + { + require $this->_themeDir . $fileName; + } + + /** + * 杈撳嚭瑙嗗浘 + * + * @access public + * @return void + */ + public function render() + { + /** 澶勭悊闈欐侀摼鎺ヨ烦杞 */ + $this->checkPermalink(); + + /** 娣诲姞Pingback */ + $this->response->setHeader('X-Pingback', $this->options->xmlRpcUrl); + $validated = false; + + //~ 鑷畾涔夋ā鏉 + if (!empty($this->_themeFile)) { + if (file_exists($this->_themeDir . $this->_themeFile)) { + $validated = true; + } + } + + if (!$validated && !empty($this->_archiveType)) { + + //~ 棣栧厛鎵惧叿浣撹矾寰, 姣斿 category/default.php + if (!$validated && !empty($this->_archiveSlug)) { + $themeFile = $this->_archiveType . '/' . $this->_archiveSlug . '.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + + //~ 鐒跺悗鎵惧綊妗g被鍨嬭矾寰, 姣斿 category.php + if (!$validated) { + $themeFile = $this->_archiveType . '.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + + //閽堝attachment鐨刪ook + if (!$validated && 'attachment' == $this->_archiveType) { + if (file_exists($this->_themeDir . 'page.php')) { + $this->_themeFile = 'page.php'; + $validated = true; + } else if (file_exists($this->_themeDir . 'post.php')) { + $this->_themeFile = 'post.php'; + $validated = true; + } + } + + //~ 鏈鍚庢壘褰掓。璺緞, 姣斿 archive.php 鎴栬 single.php + if (!$validated && 'index' != $this->_archiveType && 'front' != $this->_archiveType) { + $themeFile = $this->_archiveSingle ? 'single.php' : 'archive.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + + if (!$validated) { + $themeFile = 'index.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + } + + /** 鏂囦欢涓嶅瓨鍦 */ + if (!$validated) { + Typecho_Common::error(500); + } + + /** 鎸傛帴鎻掍欢 */ + $this->pluginHandle()->beforeRender($this); + + /** 杈撳嚭妯℃澘 */ + require_once $this->_themeDir . $this->_themeFile; + + /** 鎸傛帴鎻掍欢 */ + $this->pluginHandle()->afterRender($this); + } + + /** + * 杈撳嚭feed + * + * @access public + * @return void + */ + public function feed() + { + $this->_feed->setSubTitle($this->_description); + $this->_feed->setFeedUrl($this->_currentFeedUrl); + + $this->_feed->setBaseUrl(('/' == $this->request->feed || 0 == strlen($this->request->feed) + || '/comments' == $this->request->feed || '/comments/' == $this->request->feed) ? + $this->options->siteUrl : Typecho_Common::url($this->request->feed, $this->options->index)); + $this->_feed->setFeedUrl($this->request->makeUriByRequest()); + + if ($this->is('single') || 'comments' == $this->parameter->type) { + $this->_feed->setTitle(_t('%s 鐨勮瘎璁', + $this->options->title . ($this->_archiveTitle ? ' - ' . $this->_archiveTitle : NULL))); + + if ('comments' == $this->parameter->type) { + $comments = $this->widget('Widget_Comments_Recent', 'pageSize=10'); + } else { + $comments = $this->widget('Widget_Comments_Recent', 'pageSize=10&parentId=' . $this->cid); + } + + while ($comments->next()) { + $suffix = $this->pluginHandle()->trigger($plugged)->commentFeedItem($this->_feedType, $comments); + if (!$plugged) { + $suffix = NULL; + } + + $this->_feed->addItem(array( + 'title' => $comments->author, + 'content' => $comments->content, + 'date' => $comments->created, + 'link' => $comments->permalink, + 'author' => (object) array( + 'screenName' => $comments->author, + 'url' => $comments->url, + 'mail' => $comments->mail + ), + 'excerpt' => strip_tags($comments->content), + 'suffix' => $suffix + )); + } + } else { + $this->_feed->setTitle($this->options->title . ($this->_archiveTitle ? ' - ' . $this->_archiveTitle : NULL)); + + while ($this->next()) { + $suffix = $this->pluginHandle()->trigger($plugged)->feedItem($this->_feedType, $this); + if (!$plugged) { + $suffix = NULL; + } + + $feedUrl = ''; + if (Typecho_Feed::RSS2 == $this->_feedType) { + $feedUrl = $this->feedUrl; + } else if (Typecho_Feed::RSS1 == $this->_feedType) { + $feedUrl = $this->feedRssUrl; + } else if (Typecho_Feed::ATOM1 == $this->_feedType) { + $feedUrl = $this->feedAtomUrl; + } + + $this->_feed->addItem(array( + 'title' => $this->title, + 'content' => $this->options->feedFullText ? $this->content : (false !== strpos($this->text, '<!--more-->') ? + $this->excerpt . "<p class=\"more\"><a href=\"{$this->permalink}\" title=\"{$this->title}\">[...]</a></p>" : $this->content), + 'date' => $this->created, + 'link' => $this->permalink, + 'author' => $this->author, + 'excerpt' => $this->description, + 'comments' => $this->commentsNum, + 'commentsFeedUrl' => $feedUrl, + 'suffix' => $suffix + )); + } + } + + $this->response->setContentType($this->_feedContentType); + echo $this->_feed->__toString(); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Admin.php" new file mode 100644 index 0000000..776ff8c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Admin.php" @@ -0,0 +1,147 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍚庡彴璇勮杈撳嚭缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Admin extends Widget_Abstract_Comments +{ + /** + * 鍒嗛〉璁$畻瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 鑾峰彇褰撳墠鍐呭缁撴瀯 + * + * @access protected + * @return array + */ + protected function ___parentContent() + { + $cid = isset($this->request->cid) ? $this->request->filter('int')->cid : $this->cid; + return $this->db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.cid = ?', $cid) + ->limit(1), array($this->widget('Widget_Abstract_Contents'), 'filter')); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + $content = $this->parentContent; + + if ($content) { + return _t('%s鐨勮瘎璁', $content['title']); + } + + throw new Typecho_Widget_Exception(_t('鍐呭涓嶅瓨鍦'), 404); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select(); + $this->parameter->setDefault('pageSize=20'); + $this->_currentPage = $this->request->get('page', 1); + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->filter('search')->keywords)) { + $select->where('table.comments.text LIKE ?', '%' . $keywords . '%'); + } + + /** 濡傛灉鍏锋湁璐$尞鑰呬互涓婃潈闄,鍙互鏌ョ湅鎵鏈夎瘎璁,鍙嶄箣鍙兘鏌ョ湅鑷繁鐨勮瘎璁 */ + if (!$this->user->pass('editor', true)) { + $select->where('table.comments.ownerId = ?', $this->user->uid); + } else if (!isset($this->request->cid)) { + if ('on' == $this->request->__typecho_all_comments) { + Typecho_Cookie::set('__typecho_all_comments', 'on'); + } else { + if ('off' == $this->request->__typecho_all_comments) { + Typecho_Cookie::set('__typecho_all_comments', 'off'); + } + + if ('on' != Typecho_Cookie::get('__typecho_all_comments')) { + $select->where('table.comments.ownerId = ?', $this->user->uid); + } + } + } + + if (in_array($this->request->status, array('approved', 'waiting', 'spam'))) { + $select->where('table.comments.status = ?', $this->request->status); + } else if ('hold' == $this->request->status) { + $select->where('table.comments.status <> ?', 'approved'); + } else { + $select->where('table.comments.status = ?', 'approved'); + } + + //澧炲姞鎸夋枃绔犲綊妗e姛鑳 + if (isset($this->request->cid)) { + $select->where('table.comments.cid = ?', $this->request->filter('int')->cid); + } + + $this->_countSql = clone $select; + + $select->order('table.comments.coid', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}'); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render(_t('«'), _t('»')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Archive.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Archive.php" new file mode 100644 index 0000000..5f0c810 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Archive.php" @@ -0,0 +1,519 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 璇勮褰掓。 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 璇勮褰掓。缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Archive extends Widget_Abstract_Comments +{ + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 瀛愮埗绾ц瘎璁哄叧绯 + * + * @access private + * @var array + */ + private $_threadedComments = array(); + + /** + * 澶氱骇璇勮鍥炶皟鍑芥暟 + * + * @access private + * @var mixed + */ + private $_customThreadedCommentsCallback = false; + + /** + * _singleCommentOptions + * + * @var mixed + * @access private + */ + private $_singleCommentOptions = NULL; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault('parentId=0&commentPage=0&commentsNum=0&allowComment=1'); + + /** 鍒濆鍖栧洖璋冨嚱鏁 */ + if (function_exists('threadedComments')) { + $this->_customThreadedCommentsCallback = true; + } + } + + /** + * 璇勮鍥炶皟鍑芥暟 + * + * @access private + * @return void + */ + private function threadedCommentsCallback() + { + $singleCommentOptions = $this->_singleCommentOptions; + if ($this->_customThreadedCommentsCallback) { + return threadedComments($this, $singleCommentOptions); + } + + $commentClass = ''; + if ($this->authorId) { + if ($this->authorId == $this->ownerId) { + $commentClass .= ' comment-by-author'; + } else { + $commentClass .= ' comment-by-user'; + } + } + + $commentLevelClass = $this->levels > 0 ? ' comment-child' : ' comment-parent'; +?> +<li itemscope itemtype="http://schema.org/UserComments" id="<?php $this->theId(); ?>" class="comment-body<?php + if ($this->levels > 0) { + echo ' comment-child'; + $this->levelsAlt(' comment-level-odd', ' comment-level-even'); + } else { + echo ' comment-parent'; + } + $this->alt(' comment-odd', ' comment-even'); + echo $commentClass; +?>"> + <div class="comment-author" itemprop="creator" itemscope itemtype="http://schema.org/Person"> + <span itemprop="image"><?php $this->gravatar($singleCommentOptions->avatarSize, $singleCommentOptions->defaultAvatar); ?></span> + <cite class="fn" itemprop="name"><?php $singleCommentOptions->beforeAuthor(); + $this->author(); + $singleCommentOptions->afterAuthor(); ?></cite> + </div> + <div class="comment-meta"> + <a href="<?php $this->permalink(); ?>"><time itemprop="commentTime" datetime="<?php $this->date('c'); ?>"><?php $singleCommentOptions->beforeDate(); + $this->date($singleCommentOptions->dateFormat); + $singleCommentOptions->afterDate(); ?></time></a> + <?php if ('waiting' == $this->status) { ?> + <em class="comment-awaiting-moderation"><?php $singleCommentOptions->commentStatus(); ?></em> + <?php } ?> + </div> + <div class="comment-content" itemprop="commentText"> + <?php $this->content(); ?> + </div> + <div class="comment-reply"> + <?php $this->reply($singleCommentOptions->replyWord); ?> + </div> + <?php if ($this->children) { ?> + <div class="comment-children" itemprop="discusses"> + <?php $this->threadedComments(); ?> + </div> + <?php } ?> +</li> +<?php + } + + /** + * 鑾峰彇褰撳墠璇勮閾炬帴 + * + * @access protected + * @return string + */ + protected function ___permalink() + { + + if ($this->options->commentsPageBreak) { + $pageRow = array('permalink' => $this->parentContent['pathinfo'], 'commentPage' => $this->_currentPage); + return Typecho_Router::url('comment_page', + $pageRow, $this->options->index) . '#' . $this->theId; + } + + return $this->parentContent['permalink'] . '#' . $this->theId; + } + + /** + * 瀛愯瘎璁 + * + * @access protected + * @return array + */ + protected function ___children() + { + return $this->options->commentsThreaded && !$this->isTopLevel && isset($this->_threadedComments[$this->coid]) + ? $this->_threadedComments[$this->coid] : array(); + } + + /** + * 鏄惁鍒拌揪椤跺眰 + * + * @access protected + * @return boolean + */ + protected function ___isTopLevel() + { + return $this->levels > $this->options->commentsMaxNestingLevels - 2; + } + + /** + * 閲嶈浇鍐呭鑾峰彇 + * + * @access protected + * @return void + */ + protected function ___parentContent() + { + return $this->parameter->parentContent; + } + + /** + * 杈撳嚭鏂囩珷璇勮鏁 + * + * @access public + * @param string $string 璇勮鏁版牸寮忓寲鏁版嵁 + * @return void + */ + public function num() + { + $args = func_get_args(); + if (!$args) { + $args[] = '%d'; + } + + $num = intval($this->_total); + + echo sprintf(isset($args[$num]) ? $args[$num] : array_pop($args), $num); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + if (!$this->parameter->parentId) { + return; + } + + $commentsAuthor = Typecho_Cookie::get('__typecho_remember_author'); + $commentsMail = Typecho_Cookie::get('__typecho_remember_mail'); + $select = $this->select()->where('table.comments.cid = ?', $this->parameter->parentId) + ->where('table.comments.status = ? OR (table.comments.author = ? AND table.comments.mail = ? AND table.comments.status = ?)', 'approved', $commentsAuthor, $commentsMail, 'waiting'); + $threadedSelect = NULL; + + if ($this->options->commentsShowCommentOnly) { + $select->where('table.comments.type = ?', 'comment'); + } + + $select->order('table.comments.coid', 'ASC'); + $this->db->fetchAll($select, array($this, 'push')); + + /** 闇瑕佽緭鍑虹殑璇勮鍒楄〃 */ + $outputComments = array(); + + /** 濡傛灉寮鍚瘎璁哄洖澶 */ + if ($this->options->commentsThreaded) { + + foreach ($this->stack as $coid => &$comment) { + + /** 鍙栧嚭鐖惰妭鐐 */ + $parent = $comment['parent']; + + /** 濡傛灉瀛樺湪鐖惰妭鐐 */ + if (0 != $parent && isset($this->stack[$parent])) { + + /** 濡傛灉褰撳墠鑺傜偣娣卞害澶т簬鏈澶ф繁搴, 鍒欏皢鍏舵寕鎺ュ湪鐖惰妭鐐逛笂 */ + if ($comment['levels'] >= $this->options->commentsMaxNestingLevels) { + $comment['levels'] = $this->stack[$parent]['levels']; + $parent = $this->stack[$parent]['parent']; // 涓婁笂灞傝妭鐐 + $comment['parent'] = $parent; + } + + /** 璁$畻瀛愯妭鐐归『搴 */ + $comment['order'] = isset($this->_threadedComments[$parent]) + ? count($this->_threadedComments[$parent]) + 1 : 1; + + /** 濡傛灉鏄瓙鑺傜偣 */ + $this->_threadedComments[$parent][$coid] = $comment; + } else { + $outputComments[$coid] = $comment; + } + + } + + $this->stack = $outputComments; + } + + /** 璇勮鎺掑簭 */ + if ('DESC' == $this->options->commentsOrder) { + $this->stack = array_reverse($this->stack, true); + $this->_threadedComments = array_map('array_reverse', $this->_threadedComments); + } + + /** 璇勮鎬绘暟 */ + $this->_total = count($this->stack); + + /** 瀵硅瘎璁鸿繘琛屽垎椤 */ + if ($this->options->commentsPageBreak) { + if ('last' == $this->options->commentsPageDisplay && !$this->parameter->commentPage) { + $this->_currentPage = ceil($this->_total / $this->options->commentsPageSize); + } else { + $this->_currentPage = $this->parameter->commentPage ? $this->parameter->commentPage : 1; + } + + /** 鎴彇璇勮 */ + $this->stack = array_slice($this->stack, + ($this->_currentPage - 1) * $this->options->commentsPageSize, $this->options->commentsPageSize); + + /** 璇勮缃綅 */ + $this->row = current($this->stack); + $this->length = count($this->stack); + } + + reset($this->stack); + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + + /** 璁$畻娣卞害 */ + if (0 != $value['parent'] && isset($this->stack[$value['parent']]['levels'])) { + $value['levels'] = $this->stack[$value['parent']]['levels'] + 1; + } else { + $value['levels'] = 0; + } + + /** 閲嶈浇push鍑芥暟,浣跨敤coid浣滀负鏁扮粍閿,渚夸簬绱㈠紩 */ + $this->stack[$value['coid']] = $value; + $this->length ++; + + return $value; + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @param string $prev 涓婁竴椤垫枃瀛 + * @param string $next 涓嬩竴椤垫枃瀛 + * @param int $splitPage 鍒嗗壊鑼冨洿 + * @param string $splitWord 鍒嗗壊瀛楃 + * @param string $template 灞曠幇閰嶇疆淇℃伅 + * @return void + */ + public function pageNav($prev = '«', $next = '»', $splitPage = 3, $splitWord = '...', $template = '') + { + if ($this->options->commentsPageBreak && $this->_total > $this->options->commentsPageSize) { + $default = array( + 'wrapTag' => 'ol', + 'wrapClass' => 'page-navigator' + ); + + if (is_string($template)) { + parse_str($template, $config); + } else { + $config = $template; + } + + $template = array_merge($default, $config); + + $pageRow = $this->parameter->parentContent; + $pageRow['permalink'] = $pageRow['pathinfo']; + + $query = Typecho_Router::url('comment_page', $pageRow, $this->options->index); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box($this->_total, + $this->_currentPage, $this->options->commentsPageSize, $query); + $nav->setPageHolder('commentPage'); + $nav->setAnchor('comments'); + + echo '<' . $template['wrapTag'] . (empty($template['wrapClass']) + ? '' : ' class="' . $template['wrapClass'] . '"') . '>'; + $nav->render($prev, $next, $splitPage, $splitWord, $template); + echo '</' . $template['wrapTag'] . '>'; + } + } + + /** + * 閫掑綊杈撳嚭璇勮 + * + * @access protected + * @return void + */ + public function threadedComments() + { + $children = $this->children; + if ($children) { + //缂撳瓨鍙橀噺渚夸簬杩樺師 + $tmp = $this->row; + $this->sequence ++; + + //鍦ㄥ瓙璇勮涔嬪墠杈撳嚭 + echo $this->_singleCommentOptions->before; + + foreach ($children as $child) { + $this->row = $child; + $this->threadedCommentsCallback(); + $this->row = $tmp; + } + + //鍦ㄥ瓙璇勮涔嬪悗杈撳嚭 + echo $this->_singleCommentOptions->after; + + $this->sequence --; + } + } + + /** + * 鍒楀嚭璇勮 + * + * @access private + * @param mixed $singleCommentOptions 鍗曚釜璇勮鑷畾涔夐夐」 + * @return void + */ + public function listComments($singleCommentOptions = NULL) + { + //鍒濆鍖栦竴浜涘彉閲 + $this->_singleCommentOptions = Typecho_Config::factory($singleCommentOptions); + $this->_singleCommentOptions->setDefault(array( + 'before' => '<ol class="comment-list">', + 'after' => '</ol>', + 'beforeAuthor' => '', + 'afterAuthor' => '', + 'beforeDate' => '', + 'afterDate' => '', + 'dateFormat' => $this->options->commentDateFormat, + 'replyWord' => _t('鍥炲'), + 'commentStatus' => _t('鎮ㄧ殑璇勮姝g瓑寰呭鏍革紒'), + 'avatarSize' => 32, + 'defaultAvatar' => NULL + )); + $this->pluginHandle()->trigger($plugged)->listComments($this->_singleCommentOptions, $this); + + if (!$plugged) { + if ($this->have()) { + echo $this->_singleCommentOptions->before; + + while ($this->next()) { + $this->threadedCommentsCallback(); + } + + echo $this->_singleCommentOptions->after; + } + } + } + + /** + * 閲嶈浇alt鍑芥暟,浠ラ傚簲澶氱骇璇勮 + * + * @access public + * @return void + */ + public function alt() + { + $args = func_get_args(); + $num = func_num_args(); + + $sequence = $this->levels <= 0 ? $this->sequence : $this->order; + + $split = $sequence % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 鏍规嵁娣卞害浣欐暟杈撳嚭 + * + * @access public + * @param string $param 闇瑕佽緭鍑虹殑鍊 + * @return void + */ + public function levelsAlt() + { + $args = func_get_args(); + $num = func_num_args(); + $split = $this->levels % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 璇勮鍥炲閾炬帴 + * + * @access public + * @param string $word 鍥炲閾炬帴鏂囧瓧 + * @return void + */ + public function reply($word = '') + { + if ($this->options->commentsThreaded && !$this->isTopLevel && $this->parameter->allowComment) { + $word = empty($word) ? _t('鍥炲') : $word; + $this->pluginHandle()->trigger($plugged)->reply($word, $this); + + if (!$plugged) { + echo '<a href="' . substr($this->permalink, 0, - strlen($this->theId) - 1) . '?replyTo=' . $this->coid . + '#' . $this->parameter->respondId . '" rel="nofollow" onclick="return TypechoComment.reply(\'' . + $this->theId . '\', ' . $this->coid . ');">' . $word . '</a>'; + } + } + } + + /** + * 鍙栨秷璇勮鍥炲閾炬帴 + * + * @access public + * @param string $word 鍙栨秷鍥炲閾炬帴鏂囧瓧 + * @return void + */ + public function cancelReply($word = '') + { + if ($this->options->commentsThreaded) { + $word = empty($word) ? _t('鍙栨秷鍥炲') : $word; + $this->pluginHandle()->trigger($plugged)->cancelReply($word, $this); + + if (!$plugged) { + $replyId = $this->request->filter('int')->replyTo; + echo '<a id="cancel-comment-reply-link" href="' . $this->parameter->parentContent['permalink'] . '#' . $this->parameter->respondId . + '" rel="nofollow"' . ($replyId ? '' : ' style="display:none"') . ' onclick="return TypechoComment.cancelReply();">' . $word . '</a>'; + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Edit.php" new file mode 100644 index 0000000..39eeedf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Edit.php" @@ -0,0 +1,372 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 璇勮缂栬緫缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Edit extends Widget_Abstract_Comments implements Widget_Interface_Do +{ + /** + * 鏍囪璇勮鐘舵 + * + * @access private + * @param integer $coid 璇勮涓婚敭 + * @param string $status 鐘舵 + * @return boolean + */ + private function mark($coid, $status) + { + $comment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($comment && $this->commentIsWriteable()) { + /** 澧炲姞璇勮缂栬緫鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->mark($comment, $this, $status); + + /** 涓嶅繀鏇存柊鐨勬儏鍐 */ + if ($status == $comment['status']) { + return false; + } + + /** 鏇存柊璇勮 */ + $this->db->query($this->db->update('table.comments') + ->rows(array('status' => $status))->where('coid = ?', $coid)); + + /** 鏇存柊鐩稿叧鍐呭鐨勮瘎璁烘暟 */ + if ('approved' == $comment['status'] && 'approved' != $status) { + $this->db->query($this->db->update('table.contents') + ->expression('commentsNum', 'commentsNum - 1')->where('cid = ? AND commentsNum > 0', $comment['cid'])); + } else if ('approved' != $comment['status'] && 'approved' == $status) { + $this->db->query($this->db->update('table.contents') + ->expression('commentsNum', 'commentsNum + 1')->where('cid = ?', $comment['cid'])); + } + + return true; + } + + return false; + } + + /** + * 鏍囪涓哄緟瀹℃牳 + * + * @access public + * @return void + */ + public function waitingComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $updateRows = 0; + + foreach ($comments as $comment) { + if ($this->mark($comment, 'waiting')) { + $updateRows ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($updateRows > 0 ? _t('璇勮宸茬粡琚爣璁颁负寰呭鏍') : _t('娌℃湁璇勮琚爣璁颁负寰呭鏍'), + $updateRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鏍囪涓哄瀮鍦 + * + * @access public + * @return void + */ + public function spamComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $updateRows = 0; + + foreach ($comments as $comment) { + if ($this->mark($comment, 'spam')) { + $updateRows ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($updateRows > 0 ? _t('璇勮宸茬粡琚爣璁颁负鍨冨溇') : _t('娌℃湁璇勮琚爣璁颁负鍨冨溇'), + $updateRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鏍囪涓哄睍鐜 + * + * @access public + * @return void + */ + public function approvedComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $updateRows = 0; + + foreach ($comments as $comment) { + if ($this->mark($comment, 'approved')) { + $updateRows ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($updateRows > 0 ? _t('璇勮宸茬粡琚氳繃') : _t('娌℃湁璇勮琚氳繃'), + $updateRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鍒犻櫎璇勮 + * + * @access public + * @return void + */ + public function deleteComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $deleteRows = 0; + + foreach ($comments as $coid) { + $comment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($comment && $this->commentIsWriteable()) { + $this->pluginHandle()->delete($comment, $this); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments')->where('coid = ?', $coid)); + + /** 鏇存柊鐩稿叧鍐呭鐨勮瘎璁烘暟 */ + if ('approved' == $comment['status']) { + $this->db->query($this->db->update('table.contents') + ->expression('commentsNum', 'commentsNum - 1')->where('cid = ?', $comment['cid'])); + } + + $this->pluginHandle()->finishDelete($comment, $this); + + $deleteRows ++; + } + } + + if ($this->request->isAjax()) { + + if ($deleteRows > 0) { + $this->response->throwJson(array( + 'success' => 1, + 'message' => _t('鍒犻櫎璇勮鎴愬姛') + )); + } else { + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('鍒犻櫎璇勮澶辫触') + )); + } + + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteRows > 0 ? _t('璇勮宸茬粡琚垹闄') : _t('娌℃湁璇勮琚垹闄'), + $deleteRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + } + + /** + * 鍒犻櫎鎵鏈夊瀮鍦捐瘎璁 + * + * @access public + * @return string + */ + public function deleteSpamComment() + { + $deleteQuery = $this->db->delete('table.comments')->where('status = ?', 'spam'); + if (!$this->request->__typecho_all_comments || !$this->user->pass('editor', true)) { + $deleteQuery->where('ownerId = ?', $this->user->uid); + } + + if (isset($this->request->cid)) { + $deleteQuery->where('cid = ?', $this->request->cid); + } + + $deleteRows = $this->db->query($deleteQuery); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteRows > 0 ? + _t('鎵鏈夊瀮鍦捐瘎璁哄凡缁忚鍒犻櫎') : _t('娌℃湁鍨冨溇璇勮琚垹闄'), + $deleteRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鑾峰彇鍙紪杈戠殑璇勮 + * + * @access public + * @return void + */ + public function getComment() + { + $coid = $this->request->filter('int')->coid; + $comment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($comment && $this->commentIsWriteable()) { + + $this->response->throwJson(array( + 'success' => 1, + 'comment' => $comment + )); + + } else { + + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('鑾峰彇璇勮澶辫触') + )); + + } + } + + /** + * 缂栬緫璇勮 + * + * @access public + * @return void + */ + public function editComment() + { + $coid = $this->request->filter('int')->coid; + $commentSelect = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($commentSelect && $this->commentIsWriteable()) { + + $comment['text'] = $this->request->text; + $comment['author'] = $this->request->filter('strip_tags', 'trim', 'xss')->author; + $comment['mail'] = $this->request->filter('strip_tags', 'trim', 'xss')->mail; + $comment['url'] = $this->request->filter('url')->url; + + /** 璇勮鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->edit($comment, $this); + + /** 鏇存柊璇勮 */ + $this->update($comment, $this->db->sql()->where('coid = ?', $coid)); + + $updatedComment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + $updatedComment['content'] = $this->content; + + /** 璇勮鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->finishEdit($this); + + $this->response->throwJson(array( + 'success' => 1, + 'comment' => $updatedComment + )); + } + + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('淇瘎璁哄け璐') + )); + } + + /** + * 鍥炲璇勮 + * + * @access public + * @return void + */ + public function replyComment() + { + $coid = $this->request->filter('int')->coid; + $commentSelect = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($commentSelect && $this->commentIsWriteable()) { + + $comment = array( + 'cid' => $commentSelect['cid'], + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'ownerId' => $commentSelect['ownerId'], + 'authorId' => $this->user->uid, + 'type' => 'comment', + 'author' => $this->user->screenName, + 'mail' => $this->user->mail, + 'url' => $this->user->url, + 'parent' => $coid, + 'text' => $this->request->text, + 'status' => 'approved' + ); + + /** 璇勮鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->comment($comment, $this); + + /** 鍥炲璇勮 */ + $commentId = $this->insert($comment); + + $insertComment = $this->db->fetchRow($this->select() + ->where('coid = ?', $commentId)->limit(1), array($this, 'push')); + $insertComment['content'] = $this->content; + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishComment($this); + + $this->response->throwJson(array( + 'success' => 1, + 'comment' => $insertComment + )); + } + + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('鍥炲璇勮澶辫触') + )); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('contributor'); + $this->security->protect(); + $this->on($this->request->is('do=waiting'))->waitingComment(); + $this->on($this->request->is('do=spam'))->spamComment(); + $this->on($this->request->is('do=approved'))->approvedComment(); + $this->on($this->request->is('do=delete'))->deleteComment(); + $this->on($this->request->is('do=delete-spam'))->deleteSpamComment(); + $this->on($this->request->is('do=get&coid'))->getComment(); + $this->on($this->request->is('do=edit&coid'))->editComment(); + $this->on($this->request->is('do=reply&coid'))->replyComment(); + + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Ping.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Ping.php" new file mode 100644 index 0000000..1dd1c2f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Ping.php" @@ -0,0 +1,162 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍥炲搷褰掓。 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍥炲搷褰掓。缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Ping extends Widget_Abstract_Comments +{ + /** + * _customSinglePingCallback + * + * @var boolean + * @access private + */ + private $_customSinglePingCallback = false; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault('parentId=0'); + + /** 鍒濆鍖栧洖璋冨嚱鏁 */ + if (function_exists('singlePing')) { + $this->_customSinglePingCallback = true; + } + } + + /** + * 閲嶈浇鍐呭鑾峰彇 + * + * @access protected + * @return void + */ + protected function ___parentContent() + { + return $this->parameter->parentContent; + } + + /** + * 鍥炲搷鍥炶皟鍑芥暟 + * + * @access private + * @param string $singlePingOptions 鍗曚釜鍥炲搷鑷畾涔夐夐」 + * @return void + */ + private function singlePingCallback($singlePingOptions) + { + if ($this->_customSinglePingCallback) { + return singlePing($this, $singlePingOptions); + } + +?> +<li id="<?php $this->theId(); ?>" class="ping-body"> + <div class="ping-title"> + <cite class="fn"><?php + $singlePingOptions->beforeTitle(); + $this->author(true); + $singlePingOptions->afterTitle(); + ?></cite> + </div> + <div class="ping-meta"> + <a href="<?php $this->permalink(); ?>"><?php $singlePingOptions->beforeDate(); + $this->date($singlePingOptions->dateFormat); + $singlePingOptions->afterDate(); ?></a> + </div> + <?php $this->content(); ?> +</li> +<?php + } + + /** + * 杈撳嚭鏂囩珷鍥炲搷鏁 + * + * @access public + * @param string $string 璇勮鏁版牸寮忓寲鏁版嵁 + * @return void + */ + public function num() + { + $args = func_get_args(); + if (!$args) { + $args[] = '%d'; + } + + echo sprintf(isset($args[$this->length]) ? $args[$this->length] : array_pop($this->length), $this->length); + } + + /** + * execute + * + * @access public + * @return void + */ + public function execute() + { + if (!$this->parameter->parentId) { + return; + } + + $select = $this->select()->where('table.comments.status = ?', 'approved') + ->where('table.comments.cid = ?', $this->parameter->parentId) + ->where('table.comments.type <> ?', 'comment') + ->order('table.comments.coid', 'ASC'); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 鍒楀嚭鍥炲搷 + * + * @access private + * @param mixed $singlePingOptions 鍗曚釜鍥炲搷鑷畾涔夐夐」 + * @return void + */ + public function listPings($singlePingOptions = NULL) + { + if ($this->have()) { + //鍒濆鍖栦竴浜涘彉閲 + $parsedSinglePingOptions = Typecho_Config::factory($singlePingOptions); + $parsedSinglePingOptions->setDefault(array( + 'before' => '<ol class="ping-list">', + 'after' => '</ol>', + 'beforeTitle' => '', + 'afterTitle' => '', + 'beforeDate' => '', + 'afterDate' => '', + 'dateFormat' => $this->options->commentDateFormat + )); + + echo $parsedSinglePingOptions->before; + + while ($this->next()) { + $this->singlePingCallback($parsedSinglePingOptions); + } + + echo $parsedSinglePingOptions->after; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Recent.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Recent.php" new file mode 100644 index 0000000..56ce4ce --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Comments/Recent.php" @@ -0,0 +1,63 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏈杩戣瘎璁虹粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Recent extends Widget_Abstract_Comments +{ + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault(array('pageSize' => $this->options->commentsListSize, 'parentId' => 0, 'ignoreAuthor' => false)); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select()->limit($this->parameter->pageSize) + ->where('table.comments.status = ?', 'approved') + ->order('table.comments.coid', Typecho_Db::SORT_DESC); + + if ($this->parameter->parentId) { + $select->where('cid = ?', $this->parameter->parentId); + } + + if ($this->options->commentsShowCommentOnly) { + $select->where('type = ?', 'comment'); + } + + /** 蹇界暐浣滆呰瘎璁 */ + if ($this->parameter->ignoreAuthor) { + $select->where('ownerId <> authorId'); + } + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Admin.php" new file mode 100644 index 0000000..e1e57f9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Admin.php" @@ -0,0 +1,125 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囦欢绠$悊鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囦欢绠$悊鍒楄〃缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Admin extends Widget_Abstract_Contents +{ + /** + * 鐢ㄤ簬璁$畻鏁板肩殑璇彞瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 鍒嗛〉澶у皬 + * + * @access private + * @var integer + */ + private $pageSize; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鎵灞炴枃绔 + * + * @access protected + * @return Typecho_Config + */ + protected function ___parentPost() + { + return new Typecho_Config($this->db->fetchRow( + $this->select()->where('table.contents.cid = ?', $this->parentId) + ->limit(1))); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('pageSize=20'); + $this->_currentPage = $this->request->get('page', 1); + + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ?', 'attachment'); + + /** 濡傛灉鍏锋湁缂栬緫浠ヤ笂鏉冮檺,鍙互鏌ョ湅鎵鏈夋枃浠,鍙嶄箣鍙兘鏌ョ湅鑷繁鐨勬枃浠 */ + if (!$this->user->pass('editor', true)) { + $select->where('table.contents.authorId = ?', $this->user->uid); + } + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->filter('search')->keywords)) { + $args = array(); + $keywordsList = explode(' ', $keywords); + $args[] = implode(' OR ', array_fill(0, count($keywordsList), 'table.contents.title LIKE ?')); + + foreach ($keywordsList as $keyword) { + $args[] = '%' . $keyword . '%'; + } + + call_user_func_array(array($select, 'where'), $args); + } + + /** 缁欒绠楁暟鐩璞¤祴鍊,鍏嬮殕瀵硅薄 */ + $this->_countSql = clone $select; + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}'); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render('«', '»'); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Edit.php" new file mode 100644 index 0000000..c001970 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Edit.php" @@ -0,0 +1,330 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鏂囩珷 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鏂囩珷缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Edit extends Widget_Contents_Post_Edit implements Widget_Interface_Do +{ + /** + * 鑾峰彇椤甸潰鍋忕Щ鐨刄RL Query + * + * @access protected + * @param integer $cid 鏂囦欢id + * @param string $status 鐘舵 + * @return string + */ + protected function getPageOffsetQuery($cid, $status = NULL) + { + return 'page=' . $this->getPageOffset('cid', $cid, 'attachment', $status, + $this->user->pass('editor', true) ? 0 : $this->user->uid); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 蹇呴』涓鸿础鐚呬互涓婃潈闄 */ + $this->user->pass('contributor'); + + /** 鑾峰彇鏂囩珷鍐呭 */ + if ((isset($this->request->cid) && 'delete' != $this->request->do + && 'insert' != $this->request->do) || 'update' == $this->request->do) { + $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->limit(1), array($this, 'push')); + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('鏂囦欢涓嶅瓨鍦'), 404); + } else if ($this->have() && !$this->allow('edit')) { + throw new Typecho_Widget_Exception(_t('娌℃湁缂栬緫鏉冮檺'), 403); + } + } + } + + /** + * 鍒ゆ柇鏂囦欢鍚嶈浆鎹㈠埌缂╃暐鍚嶅悗鏄惁鍚堟硶 + * + * @access public + * @param string $name 鏂囦欢鍚 + * @return boolean + */ + public function nameToSlug($name) + { + if (empty($this->request->slug)) { + $slug = Typecho_Common::slugName($name); + if (empty($slug) || !$this->slugExists($name)) { + return false; + } + } + + return true; + } + + /** + * 鍒ゆ柇鏂囦欢缂╃暐鍚嶆槸鍚﹀瓨鍦 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @return boolean + */ + public function slugExists($slug) + { + $select = $this->db->select() + ->from('table.contents') + ->where('type = ?', 'attachment') + ->where('slug = ?', Typecho_Common::slugName($slug)) + ->limit(1); + + if ($this->request->cid) { + $select->where('cid <> ?', $this->request->cid); + } + + $attachment = $this->db->fetchRow($select); + return $attachment ? false : true; + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @return Typecho_Widget_Helper_Form_Element + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/contents-attachment-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鏂囦欢鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, $this->title, _t('鏍囬 *')); + $form->addInput($name); + + /** 鏂囦欢缂╃暐鍚 */ + $slug = new Typecho_Widget_Helper_Form_Element_Text('slug', NULL, $this->slug, _t('缂╃暐鍚'), + _t('鏂囦欢缂╃暐鍚嶇敤浜庡垱寤哄弸濂界殑閾炬帴褰㈠紡,寤鸿浣跨敤瀛楁瘝,鏁板瓧,涓嬪垝绾垮拰妯潬.')); + $form->addInput($slug); + + /** 鏂囦欢鎻忚堪 */ + $description = new Typecho_Widget_Helper_Form_Element_Textarea('description', NULL, $this->attachment->description, + _t('鎻忚堪'), _t('姝ゆ枃瀛楃敤浜庢弿杩版枃浠,鍦ㄦ湁鐨勪富棰樹腑瀹冧細琚樉绀.')); + $form->addInput($description); + + /** 鍒嗙被鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'update'); + $form->addInput($do); + + /** 鍒嗙被涓婚敭 */ + $cid = new Typecho_Widget_Helper_Form_Element_Hidden('cid', NULL, $this->cid); + $form->addInput($cid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('鎻愪氦淇敼')); + $submit->input->setAttribute('class', 'btn primary'); + $delete = new Typecho_Widget_Helper_Layout('a', array( + 'href' => $this->security->getIndex('/action/contents-attachment-edit?do=delete&cid=' . $this->cid), + 'class' => 'operate-delete', + 'lang' => _t('浣犵‘璁ゅ垹闄ゆ枃浠 %s 鍚?', $this->attachment->name) + )); + $submit->container($delete->html(_t('鍒犻櫎鏂囦欢'))); + $form->addItem($submit); + + $name->addRule('required', _t('蹇呴』濉啓鏂囦欢鏍囬')); + $name->addRule(array($this, 'nameToSlug'), _t('鏂囦欢鏍囬鏃犳硶琚浆鎹负缂╃暐鍚')); + $slug->addRule(array($this, 'slugExists'), _t('缂╃暐鍚嶅凡缁忓瓨鍦')); + + return $form; + } + + /** + * 鏇存柊鏂囦欢 + * + * @access public + * @return void + */ + public function updateAttachment() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $input = $this->request->from('name', 'slug', 'description'); + $input['slug'] = Typecho_Common::slugName(empty($input['slug']) ? $input['name'] : $input['slug']); + + $attachment['title'] = $input['name']; + $attachment['slug'] = $input['slug']; + + $content = unserialize($this->attachment->__toString()); + $content['description'] = $input['description']; + + $attachment['text'] = serialize($content); + $cid = $this->request->filter('int')->cid; + + /** 鏇存柊鏁版嵁 */ + $updateRows = $this->update($attachment, $this->db->sql()->where('cid = ?', $cid)); + + if ($updateRows > 0) { + + $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $cid) + ->limit(1), array($this, 'push')); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set('publish' == $this->status ? + _t('鏂囦欢 <a href="%s">%s</a> 宸茬粡琚洿鏂', $this->permalink, $this->title) : + _t('鏈綊妗f枃浠 %s 宸茬粡琚洿鏂', $this->title), 'success'); + + } + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-medias.php?' . + $this->getPageOffsetQuery($cid, $this->status), $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鏂囩珷 + * + * @access public + * @return void + */ + public function deleteAttachment() + { + $posts = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($posts as $post) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($post, $this); + + $condition = $this->db->sql()->where('cid = ?', $post); + $row = $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $post) + ->limit(1), array($this, 'push')); + + if ($this->isWriteable($condition) && $this->delete($condition)) { + /** 鍒犻櫎鏂囦欢 */ + Widget_Upload::deleteHandle($row); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $post)); + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($post, $this); + + $deleteCount ++; + } + + unset($condition); + } + + if ($this->request->isAjax()) { + $this->response->throwJson($deleteCount > 0 ? array('code' => 200, 'message' => _t('鏂囦欢宸茬粡琚垹闄')) + : array('code' => 500, 'message' => _t('娌℃湁鏂囦欢琚垹闄'))); + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏂囦欢宸茬粡琚垹闄') : _t('娌℃湁鏂囦欢琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->redirect(Typecho_Common::url('manage-medias.php', $this->options->adminUrl)); + } + } + + /** + * clearAttachment + * + * @access public + * @return void + */ + public function clearAttachment() + { + $page = 1; + $deleteCount = 0; + + do { + $posts = Typecho_Common::arrayFlatten($this->db->fetchAll($this->select('cid') + ->from('table.contents') + ->where('type = ? AND parent = ?', 'attachment', 0) + ->page($page, 100)), 'cid'); + $page ++; + + foreach ($posts as $post) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($post, $this); + + $condition = $this->db->sql()->where('cid = ?', $post); + $row = $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $post) + ->limit(1), array($this, 'push')); + + if ($this->isWriteable($condition) && $this->delete($condition)) { + /** 鍒犻櫎鏂囦欢 */ + Widget_Upload::deleteHandle($row); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $post)); + + $status = $this->status; + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($post, $this); + + $deleteCount ++; + } + + unset($condition); + } + } while (count($posts) == 100); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏈綊妗f枃浠跺凡缁忚娓呯悊') : _t('娌℃湁鏈綊妗f枃浠惰娓呯悊'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->redirect(Typecho_Common::url('manage-medias.php', $this->options->adminUrl)); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=delete'))->deleteAttachment(); + $this->on($this->request->is('do=update'))->updateAttachment(); + $this->on($this->request->is('do=clear'))->clearAttachment(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Related.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Related.php" new file mode 100644 index 0000000..61f84b7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Related.php" @@ -0,0 +1,57 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囩珷鐩稿叧鏂囦欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囩珷鐩稿叧鏂囦欢缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Related extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('parentId=0&limit=0'); + + //濡傛灉娌℃湁cid鍊 + if (!$this->parameter->parentId) { + return; + } + + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ?', 'attachment'); + + //order瀛楁鍦ㄦ枃浠堕噷浠h〃鎵灞炴枃绔 + $select->where('table.contents.parent = ?', $this->parameter->parentId); + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_ASC); + + if ($this->parameter->limit > 0) { + $select->limit($this->parameter->limit); + } + + if ($this->parameter->offset > 0) { + $select->offset($this->parameter->offset); + } + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" new file mode 100644 index 0000000..768bb43 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" @@ -0,0 +1,43 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 娌℃湁鍏宠仈鐨勬枃浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 娌℃湁鍏宠仈鐨勬枃浠剁粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Unattached extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ? AND + (table.contents.parent = 0 OR table.contents.parent IS NULL)', 'attachment'); + + /** 鍔犱笂瀵圭敤鎴风殑鍒ゆ柇 */ + $this->where('table.contents.authorId = ?', $this->user->uid); + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_DESC); + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Admin.php" new file mode 100644 index 0000000..e65abfc --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Admin.php" @@ -0,0 +1,52 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐙珛椤甸潰绠$悊鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐙珛椤甸潰绠$悊鍒楄〃缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Page_Admin extends Widget_Contents_Post_Admin +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 杩囨护鐘舵 */ + $select = $this->select()->where('table.contents.type = ? OR (table.contents.type = ? AND table.contents.parent = ?)', 'page', 'page_draft', 0); + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->keywords)) { + $args = array(); + $keywordsList = explode(' ', $keywords); + $args[] = implode(' OR ', array_fill(0, count($keywordsList), 'table.contents.title LIKE ?')); + + foreach ($keywordsList as $keyword) { + $args[] = '%' . Typecho_Common::filterSearchQuery($keyword) . '%'; + } + + call_user_func_array(array($select, 'where'), $args); + } + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.order', Typecho_Db::SORT_ASC); + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Edit.php" new file mode 100644 index 0000000..9b03d2a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/Edit.php" @@ -0,0 +1,262 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫椤甸潰 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫椤甸潰缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Widget_Interface_Do +{ + /** + * 鑷畾涔夊瓧娈电殑hook鍚嶇О + * + * @var string + * @access protected + */ + protected $themeCustomFieldsHook = 'themePageFields'; + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 蹇呴』涓虹紪杈戜互涓婃潈闄 */ + $this->user->pass('editor'); + + /** 鑾峰彇鏂囩珷鍐呭 */ + if (!empty($this->request->cid) && 'delete' != $this->request->do + && 'sort' != $this->request->do) { + $this->db->fetchRow($this->select() + ->where('table.contents.type = ? OR table.contents.type = ?', 'page', 'page_draft') + ->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->limit(1), array($this, 'push')); + + if ('page_draft' == $this->status && $this->parent) { + $this->response->redirect(Typecho_Common::url('write-page.php?cid=' . $this->parent, $this->options->adminUrl)); + } + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('椤甸潰涓嶅瓨鍦'), 404); + } else if ($this->have() && !$this->allow('edit')) { + throw new Typecho_Widget_Exception(_t('娌℃湁缂栬緫鏉冮檺'), 403); + } + } + } + + /** + * 鍙戝竷鏂囩珷 + * + * @access public + * @return void + */ + public function writePage() + { + $contents = $this->request->from('text', 'template', 'allowComment', + 'allowPing', 'allowFeed', 'slug', 'order', 'visibility'); + + $contents['title'] = $this->request->get('title', _t('鏈懡鍚嶉〉闈')); + $contents['created'] = $this->getCreated(); + $contents['visibility'] = ('hidden' == $contents['visibility'] ? 'hidden' : 'publish'); + + if ($this->request->markdown && $this->options->markdown) { + $contents['text'] = '<!--markdown-->' . $contents['text']; + } + + $contents = $this->pluginHandle()->write($contents, $this); + + if ($this->request->is('do=publish')) { + /** 閲嶆柊鍙戝竷宸茬粡瀛樺湪鐨勬枃绔 */ + $contents['type'] = 'page'; + $this->publish($contents); + + // 瀹屾垚鍙戝竷鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishPublish($contents, $this); + + /** 鍙戦乸ing */ + $this->widget('Widget_Service')->sendPing($this->cid); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('椤甸潰 "<a href="%s">%s</a>" 宸茬粡鍙戝竷', $this->permalink, $this->title), 'success'); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 椤甸潰璺宠浆 */ + $this->response->redirect(Typecho_Common::url('manage-pages.php?', $this->options->adminUrl)); + } else { + /** 淇濆瓨鏂囩珷 */ + $contents['type'] = 'page_draft'; + $this->save($contents); + + // 瀹屾垚鍙戝竷鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishSave($contents, $this); + + if ($this->request->isAjax()) { + $created = new Typecho_Date($this->options->gmtTime); + $this->response->throwJson(array( + 'success' => 1, + 'time' => $created->format('H:i:s A'), + 'cid' => $this->cid + )); + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鑽夌ǹ "%s" 宸茬粡琚繚瀛', $this->title), 'success'); + + /** 杩斿洖鍘熼〉闈 */ + $this->response->redirect(Typecho_Common::url('write-page.php?cid=' . $this->cid, $this->options->adminUrl)); + } + } + } + + /** + * 鍒犻櫎椤甸潰 + * + * @access public + * @return void + */ + public function deletePage() + { + $pages = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($pages as $page) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($page, $this); + + if ($this->delete($this->db->sql()->where('cid = ?', $page))) { + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $page)); + + /** 瑙i櫎闄勪欢鍏宠仈 */ + $this->unAttach($page); + + /** 瑙i櫎棣栭〉鍏宠仈 */ + if ($this->options->frontPage == 'page:' . $page) { + $this->db->query($this->db->update('table.options') + ->rows(array('value' => 'recent')) + ->where('name = ?', 'frontPage')); + } + + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $page, 'page_draft') + ->limit(1)); + + /** 鍒犻櫎鑷畾涔夊瓧娈 */ + $this->deleteFields($page); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + } + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($page, $this); + + $deleteCount ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('椤甸潰宸茬粡琚垹闄') : _t('娌℃湁椤甸潰琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鍒犻櫎椤甸潰鎵灞炶崏绋 + * + * @access public + * @return void + */ + public function deletePageDraft() + { + $pages = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($pages as $page) { + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $page, 'page_draft') + ->limit(1)); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + $deleteCount ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鑽夌ǹ宸茬粡琚垹闄') : _t('娌℃湁鑽夌ǹ琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 椤甸潰鎺掑簭 + * + * @access public + * @return void + */ + public function sortPage() + { + $pages = $this->request->filter('int')->getArray('cid'); + + if ($pages) { + foreach ($pages as $sort => $cid) { + $this->db->query($this->db->update('table.contents')->rows(array('order' => $sort + 1)) + ->where('cid = ?', $cid)); + } + } + + if (!$this->request->isAjax()) { + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } else { + $this->response->throwJson(array('success' => 1, 'message' => _t('椤甸潰鎺掑簭宸茬粡瀹屾垚'))); + } + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=publish') || $this->request->is('do=save'))->writePage(); + $this->on($this->request->is('do=delete'))->deletePage(); + $this->on($this->request->is('do=deleteDraft'))->deletePageDraft(); + $this->on($this->request->is('do=sort'))->sortPage(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/List.php" new file mode 100644 index 0000000..92580f2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Page/List.php" @@ -0,0 +1,45 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐙珛椤甸潰鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐙珛椤甸潰鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Page_List extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select()->where('table.contents.type = ?', 'page') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->order('table.contents.order', Typecho_Db::SORT_ASC); + + //鍘绘帀鑷畾涔夐椤 + $frontPage = explode(':', $this->options->frontPage); + if (2 == count($frontPage) && 'page' == $frontPage[0]) { + $select->where('table.contents.cid <> ?', $frontPage[1]); + } + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Admin.php" new file mode 100644 index 0000000..ae6a141 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Admin.php" @@ -0,0 +1,151 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囩珷绠$悊鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囩珷绠$悊鍒楄〃缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Post_Admin extends Widget_Abstract_Contents +{ + /** + * 鐢ㄤ簬璁$畻鏁板肩殑璇彞瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 褰撳墠鏂囩珷鐨勮崏绋 + * + * @access protected + * @return array + */ + protected function ___hasSaved() + { + $savedPost = $this->db->fetchRow($this->db->select('cid', 'modified') + ->from('table.contents') + ->where('table.contents.parent = ? AND (table.contents.type = ? OR table.contents.type = ?)', + $this->cid, 'post_draft', 'page_draft') + ->limit(1)); + + if ($savedPost) { + $this->modified = $savedPost['modified']; + return true; + } + + return false; + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + if (isset($this->request->uid)) { + return _t('%s鐨勬枃绔', $this->db->fetchObject($this->db->select('screenName')->from('table.users') + ->where('uid = ?', $this->request->filter('int')->uid))->screenName); + } + + throw new Typecho_Widget_Exception(_t('鐢ㄦ埛涓嶅瓨鍦'), 404); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('pageSize=20'); + $this->_currentPage = $this->request->get('page', 1); + + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ? OR (table.contents.type = ? AND table.contents.parent = ?)', 'post', 'post_draft', 0); + + /** 杩囨护鍒嗙被 */ + if (NULL != ($category = $this->request->category)) { + $select->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid = ?', $category); + } + + /** 濡傛灉鍏锋湁缂栬緫浠ヤ笂鏉冮檺,鍙互鏌ョ湅鎵鏈夋枃绔,鍙嶄箣鍙兘鏌ョ湅鑷繁鐨勬枃绔 */ + if (!$this->user->pass('editor', true)) { + $select->where('table.contents.authorId = ?', $this->user->uid); + } else if (isset($this->request->uid)) { + $select->where('table.contents.authorId = ?', $this->request->filter('int')->uid); + } + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->filter('search')->keywords)) { + $args = array(); + $keywordsList = explode(' ', $keywords); + $args[] = implode(' OR ', array_fill(0, count($keywordsList), 'table.contents.title LIKE ?')); + + foreach ($keywordsList as $keyword) { + $args[] = '%' . $keyword . '%'; + } + + call_user_func_array(array($select, 'where'), $args); + } + + /** 缁欒绠楁暟鐩璞¤祴鍊,鍏嬮殕瀵硅薄 */ + $this->_countSql = clone $select; + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}'); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render('«', '»'); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Date.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Date.php" new file mode 100644 index 0000000..e3de4fb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Date.php" @@ -0,0 +1,102 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鎸夋棩鏈熷綊妗e垪琛ㄧ粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎸夋棩鏈熷綊妗e垪琛ㄧ粍浠 + * + * @fixme 浜ょ粰缂撳瓨 + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Contents_Post_Date extends Typecho_Widget +{ + /** + * 鍏ㄥ眬閫夐」 + * + * @access protected + * @var Widget_Options + */ + protected $options; + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->options = $this->widget('Widget_Options'); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function execute() + { + /** 璁剧疆鍙傛暟榛樿鍊 */ + $this->parameter->setDefault('format=Y-m&type=month&limit=0'); + + $resource = $this->db->query($this->db->select('created')->from('table.contents') + ->where('type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->order('table.contents.created', Typecho_Db::SORT_DESC)); + + $offset = $this->options->timezone - $this->options->serverTimezone; + $result = array(); + while ($post = $this->db->fetchRow($resource)) { + $timeStamp = $post['created'] + $offset; + $date = date($this->parameter->format, $timeStamp); + + if (isset($result[$date])) { + $result[$date]['count'] ++; + } else { + $result[$date]['year'] = date('Y', $timeStamp); + $result[$date]['month'] = date('m', $timeStamp); + $result[$date]['day'] = date('d', $timeStamp); + $result[$date]['date'] = $date; + $result[$date]['count'] = 1; + } + } + + if ($this->parameter->limit > 0) { + $result = array_slice($result, 0, $this->parameter->limit); + } + + foreach ($result as $row) { + $row['permalink'] = Typecho_Router::url('archive_' . $this->parameter->type, $row, $this->widget('Widget_Options')->index); + $this->push($row); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Edit.php" new file mode 100644 index 0000000..54107db --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Edit.php" @@ -0,0 +1,917 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鏂囩珷 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鏂囩珷缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widget_Interface_Do +{ + /** + * 鑷畾涔夊瓧娈电殑hook鍚嶇О + * + * @var string + * @access protected + */ + protected $themeCustomFieldsHook = 'themePostFields'; + + /** + * 灏唗ags鍙栧嚭 + * + * @access protected + * @return array + */ + protected function ___tags() + { + if ($this->have()) { + return $this->db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $this->cid) + ->where('table.metas.type = ?', 'tag'), array($this->widget('Widget_Abstract_Metas'), 'filter')); + } + + return array(); + } + + /** + * 鑾峰彇褰撳墠鏃堕棿 + * + * @access protected + * @return Typecho_Date + */ + protected function ___date() + { + return new Typecho_Date($this->options->gmtTime); + } + + /** + * 褰撳墠鏂囩珷鐨勮崏绋 + * + * @access protected + * @return array + */ + protected function ___draft() + { + if ($this->have()) { + if ('post_draft' == $this->type) { + return $this->row; + } else { + return $this->db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.parent = ? AND (table.contents.type = ? OR table.contents.type = ?)', + $this->cid, 'post_draft', 'page_draft') + ->limit(1), array($this->widget('Widget_Abstract_Contents'), 'filter')); + } + } + + return NULL; + } + + /** + * getFields + * + * @access protected + * @return void + */ + protected function getFields() + { + $fields = array(); + $fieldNames = $this->request->getArray('fieldNames'); + + if (!empty($fieldNames)) { + $data = array( + 'fieldNames' => $this->request->getArray('fieldNames'), + 'fieldTypes' => $this->request->getArray('fieldTypes'), + 'fieldValues' => $this->request->getArray('fieldValues') + ); + foreach ($data['fieldNames'] as $key => $val) { + if (empty($val)) { + continue; + } + + $fields[$val] = array($data['fieldTypes'][$key], $data['fieldValues'][$key]); + } + } + + $customFields = $this->request->getArray('fields'); + if (!empty($customFields)) { + $fields = array_merge($fields, $customFields); + } + + return $fields; + } + + /** + * 鏍规嵁鎻愪氦鍊艰幏鍙朿reated瀛楁鍊 + * + * @access protected + * @return integer + */ + protected function getCreated() + { + $created = $this->options->gmtTime; + if (!empty($this->request->created)) { + $created = $this->request->created; + } else if (!empty($this->request->date)) { + $created = strtotime($this->request->date) - $this->options->timezone + $this->options->serverTimezone; + } else if (!empty($this->request->year) && !empty($this->request->month) && !empty($this->request->day)) { + $second = intval($this->request->get('sec', date('s'))); + $min = intval($this->request->get('min', date('i'))); + $hour = intval($this->request->get('hour', date('H'))); + + $year = intval($this->request->year); + $month = intval($this->request->month); + $day = intval($this->request->day); + + $created = mktime($hour, $min, $second, $month, $day, $year) - $this->options->timezone + $this->options->serverTimezone; + } else if ($this->request->is('cid')) { + //濡傛灉鏄慨鏀规枃绔 + $created = $this->created; + } + + return $created; + } + + /** + * 鍚屾闄勪欢 + * + * @access protected + * @param integer $cid 鍐呭id + * @return void + */ + protected function attach($cid) + { + $attachments = $this->request->getArray('attachment'); + if (!empty($attachments)) { + foreach ($attachments as $key => $attachment) { + $this->db->query($this->db->update('table.contents')->rows(array('parent' => $cid, 'status' => 'publish', + 'order' => $key + 1))->where('cid = ? AND type = ?', $attachment, 'attachment')); + } + } + } + + /** + * 鍙栨秷闄勪欢鍏宠仈 + * + * @access protected + * @param integer $cid 鍐呭id + * @return void + */ + protected function unAttach($cid) + { + $this->db->query($this->db->update('table.contents')->rows(array('parent' => 0, 'status' => 'publish')) + ->where('parent = ? AND type = ?', $cid, 'attachment')); + } + + /** + * 鑾峰彇椤甸潰鍋忕Щ鐨刄RL Query + * + * @access protected + * @param integer $created 鍒涘缓鏃堕棿 + * @param string $status 鐘舵 + * @return string + */ + protected function getPageOffsetQuery($created, $status = NULL) + { + return 'page=' . $this->getPageOffset('created', $created, 'post', $status, + 'on' == $this->request->__typecho_all_posts ? 0 : $this->user->uid); + } + + /** + * 鍒犻櫎鑽夌ǹ + * + * @access protected + * @param integer $cid 鑽夌ǹid + * @return void + */ + protected function deleteDraft($cid) + { + $this->delete($this->db->sql()->where('cid = ?', $cid)); + + /** 鍒犻櫎鑽夌ǹ鍒嗙被 */ + $this->setCategories($cid, array(), false, false); + + /** 鍒犻櫎鏍囩 */ + $this->setTags($cid, NULL, false, false); + } + + /** + * 鍙戝竷鍐呭 + * + * @access protected + * @param array $contents 鍐呭缁撴瀯 + * @return void + */ + protected function publish(array $contents) + { + /** 鍙戝竷鍐呭, 妫鏌ユ槸鍚﹀叿鏈夌洿鎺ュ彂甯冪殑鏉冮檺 */ + if ($this->user->pass('editor', true)) { + if (empty($contents['visibility'])) { + $contents['status'] = 'publish'; + } else if ('password' == $contents['visibility'] || !in_array($contents['visibility'], array('private', 'waiting', 'publish', 'hidden'))) { + if (empty($contents['password']) || 'password' != $contents['visibility']) { + $contents['password'] = ''; + } + $contents['status'] = 'publish'; + } else { + $contents['status'] = $contents['visibility']; + $contents['password'] = ''; + } + } else { + $contents['status'] = 'waiting'; + $contents['password'] = ''; + } + + /** 鐪熷疄鐨勫唴瀹筰d */ + $realId = 0; + + /** 鏄惁鏄粠鑽夌ǹ鐘舵佸彂甯 */ + $isDraftToPublish = ('post_draft' == $this->type); + + $isBeforePublish = ('publish' == $this->status); + $isAfterPublish = ('publish' == $contents['status']); + + /** 閲嶆柊鍙戝竷鐜版湁鍐呭 */ + if ($this->have()) { + + /** 濡傛灉瀹冩湰韬笉鏄崏绋, 闇瑕佸垹闄ゅ叾鑽夌ǹ */ + if (!$isDraftToPublish && $this->draft) { + $this->deleteDraft($this->draft['cid']); + $this->deleteFields($this->draft['cid']); + } + + /** 鐩存帴灏嗚崏绋跨姸鎬佹洿鏀 */ + if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->cid))) { + $realId = $this->cid; + } + + } else { + /** 鍙戝竷涓涓柊鍐呭 */ + $realId = $this->insert($contents); + } + + if ($realId > 0) { + /** 鎻掑叆鍒嗙被 */ + if (array_key_exists('category', $contents)) { + $this->setCategories($realId, !empty($contents['category']) && is_array($contents['category']) ? + $contents['category'] : array($this->options->defaultCategory), !$isDraftToPublish && $isBeforePublish, $isAfterPublish); + } + + /** 鎻掑叆鏍囩 */ + if (array_key_exists('tags', $contents)) { + $this->setTags($realId, $contents['tags'], !$isDraftToPublish && $isBeforePublish, $isAfterPublish); + } + + /** 鍚屾闄勪欢 */ + $this->attach($realId); + + /** 淇濆瓨鑷畾涔夊瓧娈 */ + $this->applyFields($this->getFields(), $realId); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $realId)->limit(1), array($this, 'push')); + } + } + + /** + * 淇濆瓨鍐呭 + * + * @access protected + * @param array $contents 鍐呭缁撴瀯 + * @return void + */ + protected function save(array $contents) + { + /** 鍙戝竷鍐呭, 妫鏌ユ槸鍚﹀叿鏈夌洿鎺ュ彂甯冪殑鏉冮檺 */ + if ($this->user->pass('editor', true)) { + if (empty($contents['visibility'])) { + $contents['status'] = 'publish'; + } else if ('password' == $contents['visibility'] || !in_array($contents['visibility'], array('private', 'waiting', 'publish', 'hidden'))) { + if (empty($contents['password']) || 'password' != $contents['visibility']) { + $contents['password'] = ''; + } + $contents['status'] = 'publish'; + } else { + $contents['status'] = $contents['visibility']; + $contents['password'] = ''; + } + } else { + $contents['status'] = 'waiting'; + $contents['password'] = ''; + } + + /** 鐪熷疄鐨勫唴瀹筰d */ + $realId = 0; + + /** 濡傛灉鑽夌ǹ宸茬粡瀛樺湪 */ + if ($this->draft) { + + /** 鐩存帴灏嗚崏绋跨姸鎬佹洿鏀 */ + if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->draft['cid']))) { + $realId = $this->draft['cid']; + } + + } else { + if ($this->have()) { + $contents['parent'] = $this->cid; + } + + /** 鍙戝竷涓涓柊鍐呭 */ + $realId = $this->insert($contents); + + if (!$this->have()) { + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $realId)->limit(1), array($this, 'push')); + } + } + + if ($realId > 0) { + //$this->db->fetchRow($this->select()->where('table.contents.cid = ?', $realId)->limit(1), array($this, 'push')); + + /** 鎻掑叆鍒嗙被 */ + if (array_key_exists('category', $contents)) { + $this->setCategories($realId, !empty($contents['category']) && is_array($contents['category']) ? + $contents['category'] : array($this->options->defaultCategory), false, false); + } + + /** 鎻掑叆鏍囩 */ + if (array_key_exists('tags', $contents)) { + $this->setTags($realId, $contents['tags'], false, false); + } + + /** 鍚屾闄勪欢 */ + $this->attach($this->cid); + + /** 淇濆瓨鑷畾涔夊瓧娈 */ + $this->applyFields($this->getFields(), $realId); + } + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 蹇呴』涓鸿础鐚呬互涓婃潈闄 */ + $this->user->pass('contributor'); + + /** 鑾峰彇鏂囩珷鍐呭 */ + if (!empty($this->request->cid) && 'delete' != $this->request->do) { + $this->db->fetchRow($this->select() + ->where('table.contents.type = ? OR table.contents.type = ?', 'post', 'post_draft') + ->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->limit(1), array($this, 'push')); + + if ('post_draft' == $this->type && $this->parent) { + $this->response->redirect(Typecho_Common::url('write-post.php?cid=' . $this->parent, $this->options->adminUrl)); + } + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('鏂囩珷涓嶅瓨鍦'), 404); + } else if ($this->have() && !$this->allow('edit')) { + throw new Typecho_Widget_Exception(_t('娌℃湁缂栬緫鏉冮檺'), 403); + } + } + } + + /** + * 杩囨护鍫嗘爤 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function filter(array $value) + { + if ('post' == $value['type'] || 'page' == $value['type']) { + $draft = $this->db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.parent = ? AND table.contents.type = ?', + $value['cid'], $value['type'] . '_draft') + ->limit(1)); + + if (!empty($draft)) { + $draft['slug'] = ltrim($draft['slug'], '@'); + $draft['type'] = $value['type']; + + $draft = parent::filter($draft); + + $draft['tags'] = $this->db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $draft['cid']) + ->where('table.metas.type = ?', 'tag'), array($this->widget('Widget_Abstract_Metas'), 'filter')); + $draft['cid'] = $value['cid']; + + return $draft; + } + } + + return parent::filter($value); + } + + /** + * 杈撳嚭鏂囩珷鍙戝竷鏃ユ湡 + * + * @access public + * @param string $format 鏃ユ湡鏍煎紡 + * @return void + */ + public function date($format = NULL) + { + if (isset($this->created)) { + parent::date($format); + } else { + echo date($format, $this->options->gmtTime + $this->options->timezone - $this->options->serverTimezone); + } + } + + /** + * 鑾峰彇鏂囩珷鏉冮檺 + * + * @access public + * @param string $permission 鏉冮檺 + * @return unknown + */ + public function allow() + { + $permissions = func_get_args(); + $allow = true; + + foreach ($permissions as $permission) { + $permission = strtolower($permission); + + if ('edit' == $permission) { + $allow &= ($this->user->pass('editor', true) || $this->authorId == $this->user->uid); + } else { + $permission = 'allow' . ucfirst(strtolower($permission)); + $optionPermission = 'default' . ucfirst($permission); + $allow &= (isset($this->{$permission}) ? $this->{$permission} : $this->options->{$optionPermission}); + } + } + + return $allow; + } + + /** + * 鑾峰彇缃戦〉鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('缂栬緫 %s', $this->title); + } + + /** + * getDefaultFieldItems + * + * @access public + * @return array + */ + public function getDefaultFieldItems() + { + $defaultFields = array(); + $configFile = $this->options->themeFile($this->options->theme, 'functions.php'); + $layout = new Typecho_Widget_Helper_Layout(); + $fields = new Typecho_Config(); + + if ($this->have()) { + $fields = $this->fields; + } + + $this->pluginHandle()->getDefaultFieldItems($layout); + + if (file_exists($configFile)) { + require_once $configFile; + + if (function_exists('themeFields')) { + themeFields($layout); + } + + if (function_exists($this->themeCustomFieldsHook)) { + call_user_func($this->themeCustomFieldsHook, $layout); + } + } + + $items = $layout->getItems(); + foreach ($items as $item) { + if ($item instanceof Typecho_Widget_Helper_Form_Element) { + $name = $item->input->getAttribute('name'); + + $isFieldReadOnly = $this->pluginHandle('Widget_Abstract_Contents') + ->trigger($plugged)->isFieldReadOnly($name); + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (preg_match("/^fields\[(.+)\]$/", $name, $matches)) { + $name = $matches[1]; + } else { + foreach ($item->inputs as $input) { + $input->setAttribute('name', 'fields[' . $name . ']'); + } + } + + $item->value($fields->{$name}); + + $elements = $item->container->getItems(); + array_shift($elements); + $div = new Typecho_Widget_Helper_Layout('div'); + + foreach ($elements as $el) { + $div->addItem($el); + } + + $defaultFields[$name] = array($item->label, $div); + } + } + + return $defaultFields; + } + + /** + * getFieldItems + * + * @access public + * @return void + */ + public function getFieldItems() + { + $fields = array(); + + if ($this->have()) { + $defaultFields = $this->getDefaultFieldItems(); + $rows = $this->db->fetchAll($this->db->select()->from('table.fields') + ->where('cid = ?', $this->cid)); + + foreach ($rows as $row) { + $isFieldReadOnly = $this->pluginHandle('Widget_Abstract_Contents') + ->trigger($plugged)->isFieldReadOnly($row['name']); + + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (!isset($defaultFields[$row['name']])) { + $fields[] = $row; + } + } + } + + return $fields; + } + + /** + * 璁剧疆鍐呭鏍囩 + * + * @access public + * @param integer $cid + * @param string $tags + * @param boolean $count 鏄惁鍙備笌璁℃暟 + * @return string + */ + public function setTags($cid, $tags, $beforeCount = true, $afterCount = true) + { + $tags = str_replace('锛', ',', $tags); + $tags = array_unique(array_map('trim', explode(',', $tags))); + $tags = array_filter($tags, array('Typecho_Validate', 'xssCheck')); + + /** 鍙栧嚭宸叉湁tag */ + $existTags = Typecho_Common::arrayFlatten($this->db->fetchAll( + $this->db->select('table.metas.mid') + ->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $cid) + ->where('table.metas.type = ?', 'tag')), 'mid'); + + /** 鍒犻櫎宸叉湁tag */ + if ($existTags) { + foreach ($existTags as $tag) { + if (0 == strlen($tag)) { + continue; + } + + $this->db->query($this->db->delete('table.relationships') + ->where('cid = ?', $cid) + ->where('mid = ?', $tag)); + + if ($beforeCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count - 1') + ->where('mid = ?', $tag)); + } + } + } + + /** 鍙栧嚭鎻掑叆tag */ + $insertTags = $this->widget('Widget_Abstract_Metas')->scanTags($tags); + + /** 鎻掑叆tag */ + if ($insertTags) { + foreach ($insertTags as $tag) { + if (0 == strlen($tag)) { + continue; + } + + $this->db->query($this->db->insert('table.relationships') + ->rows(array( + 'mid' => $tag, + 'cid' => $cid + ))); + + if ($afterCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count + 1') + ->where('mid = ?', $tag)); + } + } + } + } + + /** + * 璁剧疆鍒嗙被 + * + * @access public + * @param integer $cid 鍐呭id + * @param array $categories 鍒嗙被id鐨勯泦鍚堟暟缁 + * @param boolean $count 鏄惁鍙備笌璁℃暟 + * @return integer + */ + public function setCategories($cid, array $categories, $beforeCount = true, $afterCount = true) + { + $categories = array_unique(array_map('trim', $categories)); + + /** 鍙栧嚭宸叉湁category */ + $existCategories = Typecho_Common::arrayFlatten($this->db->fetchAll( + $this->db->select('table.metas.mid') + ->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $cid) + ->where('table.metas.type = ?', 'category')), 'mid'); + + /** 鍒犻櫎宸叉湁category */ + if ($existCategories) { + foreach ($existCategories as $category) { + $this->db->query($this->db->delete('table.relationships') + ->where('cid = ?', $cid) + ->where('mid = ?', $category)); + + if ($beforeCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count - 1') + ->where('mid = ?', $category)); + } + } + } + + /** 鎻掑叆category */ + if ($categories) { + foreach ($categories as $category) { + /** 濡傛灉鍒嗙被涓嶅瓨鍦 */ + if (!$this->db->fetchRow($this->db->select('mid') + ->from('table.metas') + ->where('mid = ?', $category) + ->limit(1))) { + continue; + } + + $this->db->query($this->db->insert('table.relationships') + ->rows(array( + 'mid' => $category, + 'cid' => $cid + ))); + + if ($afterCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count + 1') + ->where('mid = ?', $category)); + } + } + } + } + + /** + * 鍙戝竷鏂囩珷 + * + * @access public + * @return void + */ + public function writePost() + { + $contents = $this->request->from('password', 'allowComment', + 'allowPing', 'allowFeed', 'slug', 'tags', 'text', 'visibility'); + + $contents['category'] = $this->request->getArray('category'); + $contents['title'] = $this->request->get('title', _t('鏈懡鍚嶆枃妗')); + $contents['created'] = $this->getCreated(); + + if ($this->request->markdown && $this->options->markdown) { + $contents['text'] = '<!--markdown-->' . $contents['text']; + } + + $contents = $this->pluginHandle()->write($contents, $this); + + if ($this->request->is('do=publish')) { + /** 閲嶆柊鍙戝竷宸茬粡瀛樺湪鐨勬枃绔 */ + $contents['type'] = 'post'; + $this->publish($contents); + + // 瀹屾垚鍙戝竷鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishPublish($contents, $this); + + /** 鍙戦乸ing */ + $trackback = array_unique(preg_split("/(\r|\n|\r\n)/", trim($this->request->trackback))); + $this->widget('Widget_Service')->sendPing($this->cid, $trackback); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set('post' == $this->type ? + _t('鏂囩珷 "<a href="%s">%s</a>" 宸茬粡鍙戝竷', $this->permalink, $this->title) : + _t('鏂囩珷 "%s" 绛夊緟瀹℃牳', $this->title), 'success'); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鑾峰彇椤甸潰鍋忕Щ */ + $pageQuery = $this->getPageOffsetQuery($this->created); + + /** 椤甸潰璺宠浆 */ + $this->response->redirect(Typecho_Common::url('manage-posts.php?' . $pageQuery, $this->options->adminUrl)); + } else { + /** 淇濆瓨鏂囩珷 */ + $contents['type'] = 'post_draft'; + $this->save($contents); + + // 瀹屾垚淇濆瓨鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishSave($contents, $this); + + if ($this->request->isAjax()) { + $created = new Typecho_Date($this->options->gmtTime); + $this->response->throwJson(array( + 'success' => 1, + 'time' => $created->format('H:i:s A'), + 'cid' => $this->cid + )); + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鑽夌ǹ "%s" 宸茬粡琚繚瀛', $this->title), 'success'); + + /** 杩斿洖鍘熼〉闈 */ + $this->response->redirect(Typecho_Common::url('write-post.php?cid=' . $this->cid, $this->options->adminUrl)); + } + } + } + + /** + * 鍒犻櫎鏂囩珷 + * + * @access public + * @return void + */ + public function deletePost() + { + $posts = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($posts as $post) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($post, $this); + + $condition = $this->db->sql()->where('cid = ?', $post); + $postObject = $this->db->fetchObject($this->db->select('status', 'type') + ->from('table.contents')->where('cid = ? AND type = ?', $post, 'post')); + + if ($this->isWriteable($condition) && + $postObject && + $this->delete($condition)) { + + /** 鍒犻櫎鍒嗙被 */ + $this->setCategories($post, array(), 'publish' == $postObject->status + && 'post' == $postObject->type); + + /** 鍒犻櫎鏍囩 */ + $this->setTags($post, NULL, 'publish' == $postObject->status + && 'post' == $postObject->type); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $post)); + + /** 瑙i櫎闄勪欢鍏宠仈 */ + $this->unAttach($post); + + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $post, 'post_draft') + ->limit(1)); + + /** 鍒犻櫎鑷畾涔夊瓧娈 */ + $this->deleteFields($post); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + } + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($post, $this); + + $deleteCount ++; + } + + unset($condition); + } + + // 娓呯悊鏍囩 + if ($deleteCount > 0) { + $this->widget('Widget_Abstract_Metas')->clearTags(); + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏂囩珷宸茬粡琚垹闄') : _t('娌℃湁鏂囩珷琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鍒犻櫎鏂囩珷鎵灞炶崏绋 + * + * @access public + * @return void + */ + public function deletePostDraft() + { + $posts = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($posts as $post) { + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $post, 'post_draft') + ->limit(1)); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + $deleteCount ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鑽夌ǹ宸茬粡琚垹闄') : _t('娌℃湁鑽夌ǹ琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 杈撳嚭Markdown棰勮 + * + * @access public + * @return void + */ + public function preview() + { + $this->response->throwJson($this->markdown($this->request->text)); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=publish') || $this->request->is('do=save'))->writePost(); + $this->on($this->request->is('do=delete'))->deletePost(); + $this->on($this->request->is('do=deleteDraft'))->deletePostDraft(); + $this->on($this->request->is('do=preview'))->preview(); + + $this->response->redirect($this->options->adminUrl); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Recent.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Recent.php" new file mode 100644 index 0000000..5645acf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Post/Recent.php" @@ -0,0 +1,40 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏈鏂版枃绔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏈鏂拌瘎璁虹粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Post_Recent extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault(array('pageSize' => $this->options->postsListSize)); + + $this->db->fetchAll($this->select() + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->where('table.contents.type = ?', 'post') + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit($this->parameter->pageSize), array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related.php" new file mode 100644 index 0000000..15edbdd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related.php" @@ -0,0 +1,62 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐩稿叧鍐呭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐩稿叧鍐呭缁勪欢(鏍规嵁鏍囩鍏宠仈) + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Related extends Widget_Abstract_Contents +{ + /** + * 鑾峰彇鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select('DISTINCT table.contents.cid', 'table.contents.title', 'table.contents.slug', 'table.contents.created', 'table.contents.authorId', + 'table.contents.modified', 'table.contents.type', 'table.contents.status', 'table.contents.text', 'table.contents.commentsNum', 'table.contents.order', + 'table.contents.template', 'table.contents.password', 'table.contents.allowComment', 'table.contents.allowPing', 'table.contents.allowFeed') + ->from('table.contents'); + } + + /** + * 鎵ц鍑芥暟,鍒濆鍖栨暟鎹 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('limit=5'); + + if ($this->parameter->tags) { + $tagsGroup = implode(',', Typecho_Common::arrayFlatten($this->parameter->tags, 'mid')); + $this->db->fetchAll($this->select() + ->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid IN (' . $tagsGroup . ')') + ->where('table.contents.cid <> ?', $this->parameter->cid) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.password IS NULL') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->where('table.contents.type = ?', $this->parameter->type) + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit($this->parameter->limit), array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related/Author.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related/Author.php" new file mode 100644 index 0000000..a1f571d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Contents/Related/Author.php" @@ -0,0 +1,46 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐩稿叧鍐呭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐩稿叧鍐呭缁勪欢(鏍规嵁浣滆呭叧鑱) + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Related_Author extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟,鍒濆鍖栨暟鎹 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('limit=5'); + + if ($this->parameter->author) { + $this->db->fetchAll($this->select() + ->where('table.contents.authorId = ?', $this->parameter->author) + ->where('table.contents.cid <> ?', $this->parameter->cid) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.password IS NULL') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->where('table.contents.type = ?', $this->parameter->type) + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit($this->parameter->limit), array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Do.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Do.php" new file mode 100644 index 0000000..445c3e0 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Do.php" @@ -0,0 +1,88 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎵ц妯″潡 + * + * @package Widget + */ +class Widget_Do extends Typecho_Widget +{ + /** + * 璺敱鏄犲皠 + * + * @access private + * @var array + */ + private $_map = array( + 'ajax' => 'Widget_Ajax', + 'login' => 'Widget_Login', + 'logout' => 'Widget_Logout', + 'register' => 'Widget_Register', + 'upgrade' => 'Widget_Upgrade', + 'upload' => 'Widget_Upload', + 'service' => 'Widget_Service', + 'xmlrpc' => 'Widget_XmlRpc', + 'comments-edit' => 'Widget_Comments_Edit', + 'contents-page-edit' => 'Widget_Contents_Page_Edit', + 'contents-post-edit' => 'Widget_Contents_Post_Edit', + 'contents-attachment-edit' => 'Widget_Contents_Attachment_Edit', + 'metas-category-edit' => 'Widget_Metas_Category_Edit', + 'metas-tag-edit' => 'Widget_Metas_Tag_Edit', + 'options-discussion' => 'Widget_Options_Discussion', + 'options-general' => 'Widget_Options_General', + 'options-permalink' => 'Widget_Options_Permalink', + 'options-reading' => 'Widget_Options_Reading', + 'plugins-edit' => 'Widget_Plugins_Edit', + 'themes-edit' => 'Widget_Themes_Edit', + 'users-edit' => 'Widget_Users_Edit', + 'users-profile' => 'Widget_Users_Profile' + ); + + /** + * 鍏ュ彛鍑芥暟,鍒濆鍖栬矾鐢卞櫒 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function execute() + { + /** 楠岃瘉璺敱鍦板潃 **/ + $action = $this->request->action; + + //鍏煎鑰佺増鏈 + if (empty($action)) { + $widget = trim($this->request->widget, '/'); + $objectName = 'Widget_' . str_replace('/', '_', $widget); + + if (Typecho_Common::isAvailableClass($objectName)) { + $widgetName = $objectName; + } + } else { + /** 鍒ゆ柇鏄惁涓簆lugin */ + $actionTable = array_merge($this->_map, unserialize($this->widget('Widget_Options')->actionTable)); + + if (isset($actionTable[$action])) { + $widgetName = $actionTable[$action]; + } + } + + if (isset($widgetName) && class_exists($widgetName)) { + $reflectionWidget = new ReflectionClass($widgetName); + if ($reflectionWidget->implementsInterface('Widget_Interface_Do')) { + $this->widget($widgetName)->action(); + return; + } + } + + throw new Typecho_Widget_Exception(_t('璇锋眰鐨勫湴鍧涓嶅瓨鍦'), 404); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/ExceptionHandle.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/ExceptionHandle.php" new file mode 100644 index 0000000..d2f2fc8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/ExceptionHandle.php" @@ -0,0 +1,30 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 寮傚父澶勭悊缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_ExceptionHandle extends Widget_Archive +{ + /** + * 閲嶈浇鏋勯犲嚱鏁 + */ + public function __construct() + { + $this->widget('Widget_Archive@404', 'type=404')->render(); + exit; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Feedback.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Feedback.php" new file mode 100644 index 0000000..a0c2c9b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Feedback.php" @@ -0,0 +1,339 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍙嶉鎻愪氦 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍙嶉鎻愪氦缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Feedback extends Widget_Abstract_Comments implements Widget_Interface_Do +{ + /** + * 鍐呭瀵硅薄 + * + * @access private + * @var Widget_Archive + */ + private $_content; + + /** + * 璇勮澶勭悊鍑芥暟 + * + * @throws Typecho_Widget_Exception + * @throws Exception + * @throws Typecho_Exception + */ + private function comment() + { + // 浣跨敤瀹夊叏妯″潡淇濇姢 + $this->security->protect(); + + $comment = array( + 'cid' => $this->_content->cid, + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'ownerId' => $this->_content->author->uid, + 'type' => 'comment', + 'status' => !$this->_content->allow('edit') && $this->options->commentsRequireModeration ? 'waiting' : 'approved' + ); + + /** 鍒ゆ柇鐖惰妭鐐 */ + if ($parentId = $this->request->filter('int')->get('parent')) { + if ($this->options->commentsThreaded && ($parent = $this->db->fetchRow($this->db->select('coid', 'cid')->from('table.comments') + ->where('coid = ?', $parentId))) && $this->_content->cid == $parent['cid']) { + $comment['parent'] = $parentId; + } else { + throw new Typecho_Widget_Exception(_t('鐖剁骇璇勮涓嶅瓨鍦')); + } + } + + //妫楠屾牸寮 + $validator = new Typecho_Validate(); + $validator->addRule('author', 'required', _t('蹇呴』濉啓鐢ㄦ埛鍚')); + $validator->addRule('author', 'xssCheck', _t('璇蜂笉瑕佸湪鐢ㄦ埛鍚嶄腑浣跨敤鐗规畩瀛楃')); + $validator->addRule('author', array($this, 'requireUserLogin'), _t('鎮ㄦ墍浣跨敤鐨勭敤鎴峰悕宸茬粡琚敞鍐,璇风櫥褰曞悗鍐嶆鎻愪氦')); + $validator->addRule('author', 'maxLength', _t('鐢ㄦ埛鍚嶆渶澶氬寘鍚200涓瓧绗'), 200); + + if ($this->options->commentsRequireMail && !$this->user->hasLogin()) { + $validator->addRule('mail', 'required', _t('蹇呴』濉啓鐢靛瓙閭鍦板潃')); + } + + $validator->addRule('mail', 'email', _t('閭鍦板潃涓嶅悎娉')); + $validator->addRule('mail', 'maxLength', _t('鐢靛瓙閭鏈澶氬寘鍚200涓瓧绗'), 200); + + if ($this->options->commentsRequireUrl && !$this->user->hasLogin()) { + $validator->addRule('url', 'required', _t('蹇呴』濉啓涓汉涓婚〉')); + } + $validator->addRule('url', 'url', _t('涓汉涓婚〉鍦板潃鏍煎紡閿欒')); + $validator->addRule('url', 'maxLength', _t('涓汉涓婚〉鍦板潃鏈澶氬寘鍚200涓瓧绗'), 200); + + $validator->addRule('text', 'required', _t('蹇呴』濉啓璇勮鍐呭')); + + $comment['text'] = $this->request->text; + + /** 瀵逛竴鑸尶鍚嶈闂,灏嗙敤鎴锋暟鎹繚瀛樹竴涓湀 */ + if (!$this->user->hasLogin()) { + /** Anti-XSS */ + $comment['author'] = $this->request->filter('trim')->author; + $comment['mail'] = $this->request->filter('trim')->mail; + $comment['url'] = $this->request->filter('trim')->url; + + /** 淇鐢ㄦ埛鎻愪氦鐨剈rl */ + if (!empty($comment['url'])) { + $urlParams = parse_url($comment['url']); + if (!isset($urlParams['scheme'])) { + $comment['url'] = 'http://' . $comment['url']; + } + } + + $expire = $this->options->gmtTime + $this->options->timezone + 30*24*3600; + Typecho_Cookie::set('__typecho_remember_author', $comment['author'], $expire); + Typecho_Cookie::set('__typecho_remember_mail', $comment['mail'], $expire); + Typecho_Cookie::set('__typecho_remember_url', $comment['url'], $expire); + } else { + $comment['author'] = $this->user->screenName; + $comment['mail'] = $this->user->mail; + $comment['url'] = $this->user->url; + + /** 璁板綍鐧诲綍鐢ㄦ埛鐨刬d */ + $comment['authorId'] = $this->user->uid; + } + + /** 璇勮鑰呬箣鍓嶉』鏈夎瘎璁洪氳繃浜嗗鏍 */ + if (!$this->options->commentsRequireModeration && $this->options->commentsWhitelist) { + if ($commentApprovedNum = $this->size($this->select()->where('author = ? AND mail = ? AND status = ?', $comment['author'], $comment['mail'], 'approved'))) { + $comment['status'] = 'approved'; + } else { + $comment['status'] = 'waiting'; + } + } + + if ($error = $validator->run($comment)) { + /** 璁板綍鏂囧瓧 */ + Typecho_Cookie::set('__typecho_remember_text', $comment['text']); + throw new Typecho_Widget_Exception(implode("\n", $error)); + } + + /** 鐢熸垚杩囨护鍣 */ + try { + $comment = $this->pluginHandle()->comment($comment, $this->_content); + } catch (Typecho_Exception $e) { + Typecho_Cookie::set('__typecho_remember_text', $comment['text']); + throw $e; + } + + /** 娣诲姞璇勮 */ + $commentId = $this->insert($comment); + Typecho_Cookie::delete('__typecho_remember_text'); + $this->db->fetchRow($this->select()->where('coid = ?', $commentId) + ->limit(1), array($this, 'push')); + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishComment($this); + + $this->response->goBack('#' . $this->theId); + } + + /** + * 寮曠敤澶勭悊鍑芥暟 + * + * @access private + * @return void + */ + private function trackback() + { + /** 濡傛灉涓嶆槸POST鏂规硶 */ + if (!$this->request->isPost() || $this->request->getReferer()) { + $this->response->redirect($this->_content->permalink); + } + + /** 濡傛灉搴撲腑宸茬粡瀛樺湪褰撳墠ip涓簊pam鐨則rackback鍒欑洿鎺ユ嫆缁 */ + if ($this->size($this->select() + ->where('status = ? AND ip = ?', 'spam', $this->request->getIp())) > 0) { + /** 浣跨敤404鍛婅瘔鏈哄櫒浜 */ + throw new Typecho_Widget_Exception(_t('鎵句笉鍒板唴瀹'), 404); + } + + $trackback = array( + 'cid' => $this->_content->cid, + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'ownerId' => $this->_content->author->uid, + 'type' => 'trackback', + 'status' => $this->options->commentsRequireModeration ? 'waiting' : 'approved' + ); + + $trackback['author'] = $this->request->filter('trim')->blog_name; + $trackback['url'] = $this->request->filter('trim')->url; + $trackback['text'] = $this->request->excerpt; + + //妫楠屾牸寮 + $validator = new Typecho_Validate(); + $validator->addRule('url', 'required', 'We require all Trackbacks to provide an url.') + ->addRule('url', 'url', 'Your url is not valid.') + ->addRule('url', 'maxLength', 'Your url is not valid.', 200) + ->addRule('text', 'required', 'We require all Trackbacks to provide an excerption.') + ->addRule('author', 'required', 'We require all Trackbacks to provide an blog name.') + ->addRule('author', 'xssCheck', 'Your blog name is not valid.') + ->addRule('author', 'maxLength', 'Your blog name is not valid.', 200); + + $validator->setBreak(); + if ($error = $validator->run($trackback)) { + $message = array('success' => 1, 'message' => current($error)); + $this->response->throwXml($message); + } + + /** 鎴彇闀垮害 */ + $trackback['text'] = Typecho_Common::subStr($trackback['text'], 0, 100, '[...]'); + + /** 濡傛灉搴撲腑宸茬粡瀛樺湪閲嶅url鍒欑洿鎺ユ嫆缁 */ + if ($this->size($this->select() + ->where('cid = ? AND url = ? AND type <> ?', $this->_content->cid, $trackback['url'], 'comment')) > 0) { + /** 浣跨敤403鍛婅瘔鏈哄櫒浜 */ + throw new Typecho_Widget_Exception(_t('绂佹閲嶅鎻愪氦'), 403); + } + + /** 鐢熸垚杩囨护鍣 */ + $trackback = $this->pluginHandle()->trackback($trackback, $this->_content); + + /** 娣诲姞寮曠敤 */ + $trackbackId = $this->insert($trackback); + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishTrackback($this); + + /** 杩斿洖姝g‘ */ + $this->response->throwXml(array('success' => 0, 'message' => 'Trackback has registered.')); + } + + /** + * 杩囨护璇勮鍐呭 + * + * @access public + * @param string $text 璇勮鍐呭 + * @return string + */ + public function filterText($text) + { + $text = str_replace("\r", '', trim($text)); + $text = preg_replace("/\n{2,}/", "\n\n", $text); + + return Typecho_Common::removeXSS(Typecho_Common::stripTags( + $text, $this->options->commentsHTMLTagAllowed)); + } + + /** + * 瀵瑰凡娉ㄥ唽鐢ㄦ埛鐨勪繚鎶ゆф娴 + * + * @access public + * @param string $userName 鐢ㄦ埛鍚 + * @return void + */ + public function requireUserLogin($userName) + { + if ($this->user->hasLogin() && $this->user->screenName != $userName) { + /** 褰撳墠鐢ㄦ埛鍚嶄笌鎻愪氦鑰呬笉鍖归厤 */ + return false; + } else if (!$this->user->hasLogin() && $this->db->fetchRow($this->db->select('uid') + ->from('table.users')->where('screenName = ? OR name = ?', $userName, $userName)->limit(1))) { + /** 姝ょ敤鎴峰悕宸茬粡琚敞鍐 */ + return false; + } + + return true; + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function action() + { + /** 鍥炶皟鏂规硶 */ + $callback = $this->request->type; + $this->_content = Typecho_Router::match($this->request->permalink); + + /** 鍒ゆ柇鍐呭鏄惁瀛樺湪 */ + if (false !== $this->_content && $this->_content instanceof Widget_Archive && + $this->_content->have() && $this->_content->is('single') && + in_array($callback, array('comment', 'trackback'))) { + + /** 濡傛灉鏂囩珷涓嶅厑璁稿弽棣 */ + if ('comment' == $callback) { + /** 璇勮鍏抽棴 */ + if (!$this->_content->allow('comment')) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧,姝ゅ唴瀹圭殑鍙嶉琚姝.'), 403); + } + + /** 妫鏌ユ潵婧 */ + if ($this->options->commentsCheckReferer && 'false' != $this->parameter->checkReferer) { + $referer = $this->request->getReferer(); + + if (empty($referer)) { + throw new Typecho_Widget_Exception(_t('璇勮鏉ユ簮椤甸敊璇.'), 403); + } + + $refererPart = parse_url($referer); + $currentPart = parse_url($this->_content->permalink); + + if ($refererPart['host'] != $currentPart['host'] || + 0 !== strpos($refererPart['path'], $currentPart['path'])) { + + //鑷畾涔夐椤垫敮鎸 + if ('page:' . $this->_content->cid == $this->options->frontPage) { + $currentPart = parse_url(rtrim($this->options->siteUrl, '/') . '/'); + + if ($refererPart['host'] != $currentPart['host'] || + 0 !== strpos($refererPart['path'], $currentPart['path'])) { + throw new Typecho_Widget_Exception(_t('璇勮鏉ユ簮椤甸敊璇.'), 403); + } + } else { + throw new Typecho_Widget_Exception(_t('璇勮鏉ユ簮椤甸敊璇.'), 403); + } + } + } + + /** 妫鏌p璇勮闂撮殧 */ + if (!$this->user->pass('editor', true) && $this->_content->authorId != $this->user->uid && + $this->options->commentsPostIntervalEnable) { + $latestComment = $this->db->fetchRow($this->db->select('created')->from('table.comments') + ->where('cid = ?', $this->_content->cid) + ->order('created', Typecho_Db::SORT_DESC) + ->limit(1)); + + if ($latestComment && ($this->options->gmtTime - $latestComment['created'] > 0 && + $this->options->gmtTime - $latestComment['created'] < $this->options->commentsPostInterval)) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧, 鎮ㄧ殑鍙戣█杩囦簬棰戠箒, 璇风◢渚啀娆″彂甯.'), 403); + } + } + } + + /** 濡傛灉鏂囩珷涓嶅厑璁稿紩鐢 */ + if ('trackback' == $callback && !$this->_content->allow('ping')) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧,姝ゅ唴瀹圭殑寮曠敤琚姝.'), 403); + } + + /** 璋冪敤鍑芥暟 */ + $this->$callback(); + } else { + throw new Typecho_Widget_Exception(_t('鎵句笉鍒板唴瀹'), 404); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Init.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Init.php" new file mode 100644 index 0000000..8409dce --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Init.php" @@ -0,0 +1,79 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍒濆鍖栨ā鍧 + * + * @package Widget + */ +class Widget_Init extends Typecho_Widget +{ + /** + * 鍏ュ彛鍑芥暟,鍒濆鍖栬矾鐢卞櫒 + * + * @access public + * @return void + */ + public function execute() + { + /** 瀵瑰彉閲忚祴鍊 */ + $options = $this->widget('Widget_Options'); + + /** 璇█鍖呭垵濮嬪寲 */ + if ($options->lang && $options->lang != 'zh_CN') { + $dir = defined('__TYPECHO_LANG_DIR__') ? __TYPECHO_LANG_DIR__ : __TYPECHO_ROOT_DIR__ . '/usr/langs'; + Typecho_I18n::setLang($dir . '/' . $options->lang . '.mo'); + } + + /** cookie鍒濆鍖 */ + Typecho_Cookie::setPrefix($options->rootUrl); + + /** 鍒濆鍖朿harset */ + Typecho_Common::$charset = $options->charset; + + /** 鍒濆鍖杄xception */ + Typecho_Common::$exceptionHandle = 'Widget_ExceptionHandle'; + + /** 璁剧疆璺緞 */ + if (defined('__TYPECHO_PATHINFO_ENCODING__')) { + $pathInfo = $this->request->getPathInfo(__TYPECHO_PATHINFO_ENCODING__, $options->charset); + } else { + $pathInfo = $this->request->getPathInfo(); + } + + Typecho_Router::setPathInfo($pathInfo); + + /** 鍒濆鍖栬矾鐢卞櫒 */ + Typecho_Router::setRoutes($options->routingTable); + + /** 鍒濆鍖栨彃浠 */ + Typecho_Plugin::init($options->plugins); + + /** 鍒濆鍖栧洖鎵 */ + $this->response->setCharset($options->charset); + $this->response->setContentType($options->contentType); + + /** 榛樿鏃跺尯 */ + if (function_exists("ini_get") && !ini_get("date.timezone") && function_exists("date_default_timezone_set")) { + @date_default_timezone_set('UTC'); + } + + /** 鍒濆鍖栨椂鍖 */ + Typecho_Date::setTimezoneOffset($options->timezone); + + /** 寮濮嬩細璇, 鍑忓皬璐熻浇鍙拡瀵瑰悗鍙版墦寮session鏀寔 */ + if ($this->widget('Widget_User')->hasLogin()) { + @session_start(); + } + + /** 鐩戝惉缂撳啿鍖 */ + ob_start(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Interface/Do.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Interface/Do.php" new file mode 100644 index 0000000..355caf8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Interface/Do.php" @@ -0,0 +1,20 @@ +<?php +/** + * 鍙互琚玏idget_Do璋冪敤鐨勬帴鍙 + * + * @package Widget + * @version $id$ + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @author qining <magike.net@gmail.com> + * @license GNU General Public License 2.0 + */ +interface Widget_Interface_Do +{ + /** + * 鎺ュ彛闇瑕佸疄鐜扮殑鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action(); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Login.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Login.php" new file mode 100644 index 0000000..597a559 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Login.php" @@ -0,0 +1,84 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐧诲綍鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐧诲綍缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Login extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + // protect + $this->security->protect(); + + /** 濡傛灉宸茬粡鐧诲綍 */ + if ($this->user->hasLogin()) { + /** 鐩存帴杩斿洖 */ + $this->response->redirect($this->options->index); + } + + /** 鍒濆鍖栭獙璇佺被 */ + $validator = new Typecho_Validate(); + $validator->addRule('name', 'required', _t('璇疯緭鍏ョ敤鎴峰悕')); + $validator->addRule('password', 'required', _t('璇疯緭鍏ュ瘑鐮')); + + /** 鎴幏楠岃瘉寮傚父 */ + if ($error = $validator->run($this->request->from('name', 'password'))) { + Typecho_Cookie::set('__typecho_remember_name', $this->request->name); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($error); + $this->response->goBack(); + } + + /** 寮濮嬮獙璇佺敤鎴 **/ + $valid = $this->user->login($this->request->name, $this->request->password, + false, 1 == $this->request->remember ? $this->options->gmtTime + $this->options->timezone + 30*24*3600 : 0); + + /** 姣斿瀵嗙爜 */ + if (!$valid) { + /** 闃叉绌蜂妇,浼戠湢3绉 */ + sleep(3); + + $this->pluginHandle()->loginFail($this->user, $this->request->name, + $this->request->password, 1 == $this->request->remember); + + Typecho_Cookie::set('__typecho_remember_name', $this->request->name); + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛鍚嶆垨瀵嗙爜鏃犳晥'), 'error'); + $this->response->goBack('?referer=' . urlencode($this->request->referer)); + } + + $this->pluginHandle()->loginSucceed($this->user, $this->request->name, + $this->request->password, 1 == $this->request->remember); + + /** 璺宠浆楠岃瘉鍚庡湴鍧 */ + if (NULL != $this->request->referer) { + $this->response->redirect($this->request->referer); + } else if (!$this->user->pass('contributor', true)) { + /** 涓嶅厑璁告櫘閫氱敤鎴风洿鎺ヨ烦杞悗鍙 */ + $this->response->redirect($this->options->profileUrl); + } else { + $this->response->redirect($this->options->adminUrl); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Logout.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Logout.php" new file mode 100644 index 0000000..a1b7d86 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Logout.php" @@ -0,0 +1,36 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐧诲嚭鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐧诲嚭缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Logout extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + $this->user->logout(); + $this->pluginHandle()->logout(); + $this->response->goBack(NULL, $this->options->index); + @session_destroy(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Menu.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Menu.php" new file mode 100644 index 0000000..3f8f629 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Menu.php" @@ -0,0 +1,343 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍚庡彴鑿滃崟鏄剧ず + * + * @package Widget + */ +class Widget_Menu extends Typecho_Widget +{ + /** + * 鐖惰彍鍗曞垪琛 + * + * @access private + * @var array + */ + private $_menu = array(); + + /** + * 褰撳墠鐖惰彍鍗 + * + * @access private + * @var integer + */ + private $_currentParent = 1; + + /** + * 褰撳墠瀛愯彍鍗 + * + * @access private + * @var integer + */ + private $_currentChild = 0; + + /** + * 褰撳墠椤甸潰 + * + * @access private + * @var string + */ + private $_currentUrl; + + /** + * 鍏ㄥ眬閫夐」 + * + * @access protected + * @var Widget_Options + */ + protected $options; + + /** + * 鐢ㄦ埛瀵硅薄 + * + * @access protected + * @var Widget_User + */ + protected $user; + + /** + * 褰撳墠鑿滃崟鏍囬 + * @var string + */ + public $title; + + /** + * 褰撳墠澧炲姞椤圭洰閾炬帴 + * @var string + */ + public $addLink; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->options = $this->widget('Widget_Options'); + $this->user = $this->widget('Widget_User'); + } + + /** + * 鎵ц鍑芥暟,鍒濆鍖栬彍鍗 + * + * @access public + * @return void + */ + public function execute() + { + $parentNodes = array(NULL, _t('鎺у埗鍙'), _t('鎾板啓'), _t('绠$悊'), _t('璁剧疆')); + + $childNodes = array( + array( + array(_t('鐧诲綍'), _t('鐧诲綍鍒%s', $this->options->title), 'login.php', 'visitor'), + array(_t('娉ㄥ唽'), _t('娉ㄥ唽鍒%s', $this->options->title), 'register.php', 'visitor') + ), + array( + array(_t('姒傝'), _t('缃戠珯姒傝'), 'index.php', 'subscriber'), + array(_t('涓汉璁剧疆'), _t('涓汉璁剧疆'), 'profile.php', 'subscriber'), + array(_t('鎻掍欢'), _t('鎻掍欢绠$悊'), 'plugins.php', 'administrator'), + array(array('Widget_Plugins_Config', 'getMenuTitle'), array('Widget_Plugins_Config', 'getMenuTitle'), 'options-plugin.php?config=', 'administrator', true), + array(_t('澶栬'), _t('缃戠珯澶栬'), 'themes.php', 'administrator'), + array(array('Widget_Themes_Files', 'getMenuTitle'), array('Widget_Themes_Files', 'getMenuTitle'), 'theme-editor.php', 'administrator', true), + array(_t('璁剧疆澶栬'), _t('璁剧疆澶栬'), 'options-theme.php', 'administrator', true), + array(_t('鍗囩骇'), _t('鍗囩骇绋嬪簭'), 'upgrade.php', 'administrator', true), + array(_t('娆㈣繋'), _t('娆㈣繋浣跨敤'), 'welcome.php', 'subscriber', true) + ), + array( + array(_t('鎾板啓鏂囩珷'), _t('鎾板啓鏂版枃绔'), 'write-post.php', 'contributor'), + array(array('Widget_Contents_Post_Edit', 'getMenuTitle'), array('Widget_Contents_Post_Edit', 'getMenuTitle'), 'write-post.php?cid=', 'contributor', true), + array(_t('鍒涘缓椤甸潰'), _t('鍒涘缓鏂伴〉闈'), 'write-page.php', 'editor'), + array(array('Widget_Contents_Page_Edit', 'getMenuTitle'), array('Widget_Contents_Page_Edit', 'getMenuTitle'), 'write-page.php?cid=', 'editor', true), + ), + array( + array(_t('鏂囩珷'), _t('绠$悊鏂囩珷'), 'manage-posts.php', 'contributor', false, 'write-post.php'), + array(array('Widget_Contents_Post_Admin', 'getMenuTitle'), array('Widget_Contents_Post_Admin', 'getMenuTitle'), 'manage-posts.php?uid=', 'contributor', true), + array(_t('鐙珛椤甸潰'), _t('绠$悊鐙珛椤甸潰'), 'manage-pages.php', 'editor', false, 'write-page.php'), + array(_t('璇勮'), _t('绠$悊璇勮'), 'manage-comments.php', 'contributor'), + array(array('Widget_Comments_Admin', 'getMenuTitle'), array('Widget_Comments_Admin', 'getMenuTitle'), 'manage-comments.php?cid=', 'contributor', true), + array(_t('鍒嗙被'), _t('绠$悊鍒嗙被'), 'manage-categories.php', 'editor', false, 'category.php'), + array(_t('鏂板鍒嗙被'), _t('鏂板鍒嗙被'), 'category.php', 'editor', true), + array(array('Widget_Metas_Category_Admin', 'getMenuTitle'), array('Widget_Metas_Category_Admin', 'getMenuTitle'), 'manage-categories.php?parent=', 'editor', true, array('Widget_Metas_Category_Admin', 'getAddLink')), + array(array('Widget_Metas_Category_Edit', 'getMenuTitle'), array('Widget_Metas_Category_Edit', 'getMenuTitle'), 'category.php?mid=', 'editor', true), + array(array('Widget_Metas_Category_Edit', 'getMenuTitle'), array('Widget_Metas_Category_Edit', 'getMenuTitle'), 'category.php?parent=', 'editor', true), + array(_t('鏍囩'), _t('绠$悊鏍囩'), 'manage-tags.php', 'editor'), + array(array('Widget_Metas_Tag_Admin', 'getMenuTitle'), array('Widget_Metas_Tag_Admin', 'getMenuTitle'), 'manage-tags.php?mid=', 'editor', true), + array(_t('鏂囦欢'), _t('绠$悊鏂囦欢'), 'manage-medias.php', 'editor'), + array(array('Widget_Contents_Attachment_Edit', 'getMenuTitle'), array('Widget_Contents_Attachment_Edit', 'getMenuTitle'), 'media.php?cid=', 'contributor', true), + array(_t('鐢ㄦ埛'), _t('绠$悊鐢ㄦ埛'), 'manage-users.php', 'administrator', false, 'user.php'), + array(_t('鏂板鐢ㄦ埛'), _t('鏂板鐢ㄦ埛'), 'user.php', 'administrator', true), + array(array('Widget_Users_Edit', 'getMenuTitle'), array('Widget_Users_Edit', 'getMenuTitle'), 'user.php?uid=', 'administrator', true), + ), + array( + array(_t('鍩烘湰'), _t('鍩烘湰璁剧疆'), 'options-general.php', 'administrator'), + array(_t('璇勮'), _t('璇勮璁剧疆'), 'options-discussion.php', 'administrator'), + array(_t('闃呰'), _t('闃呰璁剧疆'), 'options-reading.php', 'administrator'), + array(_t('姘镐箙閾炬帴'), _t('姘镐箙閾炬帴璁剧疆'), 'options-permalink.php', 'administrator'), + )); + + /** 鑾峰彇鎵╁睍鑿滃崟 */ + $panelTable = unserialize($this->options->panelTable); + $extendingParentMenu = empty($panelTable['parent']) ? array() : $panelTable['parent']; + $extendingChildMenu = empty($panelTable['child']) ? array() : $panelTable['child']; + $currentUrl = $this->request->makeUriByRequest(); + $adminUrl = $this->options->adminUrl; + $menu = array(); + $defaultChildeNode = array(NULL, NULL, NULL, 'administrator', false, NULL); + + $currentUrlParts = parse_url($currentUrl); + $currentUrlParams = array(); + if (!empty($currentUrlParts['query'])) { + parse_str($currentUrlParts['query'], $currentUrlParams); + } + + if ('/' == $currentUrlParts['path'][strlen($currentUrlParts['path']) - 1]) { + $currentUrlParts['path'] .= 'index.php'; + } + + foreach ($extendingParentMenu as $key => $val) { + $parentNodes[10 + $key] = $val; + } + + foreach ($extendingChildMenu as $key => $val) { + $childNodes[$key] = array_merge(isset($childNodes[$key]) ? $childNodes[$key] : array(), $val); + } + + foreach ($parentNodes as $key => $parentNode) { + // this is a simple struct than before + $children = array(); + $showedChildrenCount = 0; + $firstUrl = NULL; + + foreach ($childNodes[$key] as $inKey => $childNode) { + // magic merge + $childNode += $defaultChildeNode; + list ($name, $title, $url, $access, $hidden, $addLink) = $childNode; + + // 淇濆瓨鏈鍘熷鐨刪idden淇℃伅 + $orgHidden = $hidden; + + // parse url + $url = Typecho_Common::url($url, $adminUrl); + + // compare url + $urlParts = parse_url($url); + $urlParams = array(); + if (!empty($urlParts['query'])) { + parse_str($urlParts['query'], $urlParams); + } + + $validate = true; + if ($urlParts['path'] != $currentUrlParts['path']) { + $validate = false; + } else { + foreach ($urlParams as $paramName => $paramValue) { + if (!isset($currentUrlParams[$paramName])) { + $validate = false; + break; + } + } + } + + if ($validate + && basename($urlParts['path']) == 'extending.php' + && !empty($currentUrlParams['panel']) && !empty($urlParams['panel']) + && $urlParams['panel'] != $currentUrlParams['panel']){ + $validate = false; + } + + if ($hidden && $validate) { + $hidden = false; + } + + if (!$hidden && !$this->user->pass($access, true)) { + $hidden = true; + } + + if (!$hidden) { + $showedChildrenCount ++; + + if (empty($firstUrl)) { + $firstUrl = $url; + } + + if (is_array($name)) { + list($widget, $method) = $name; + $name = Typecho_Widget::widget($widget)->$method(); + } + + if (is_array($title)) { + list($widget, $method) = $title; + $title = Typecho_Widget::widget($widget)->$method(); + } + + if (is_array($addLink)) { + list($widget, $method) = $addLink; + $addLink = Typecho_Widget::widget($widget)->$method(); + } + } + + if ($validate) { + if ('visitor' != $access) { + $this->user->pass($access); + } + + $this->_currentParent = $key; + $this->_currentChild = $inKey; + $this->title = $title; + $this->addLink = $addLink ? Typecho_Common::url($addLink, $adminUrl) : NULL; + } + + $children[$inKey] = array( + $name, + $title, + $url, + $access, + $hidden, + $addLink, + $orgHidden + ); + } + + $menu[$key] = array($parentNode, $showedChildrenCount > 0, $firstUrl,$children); + } + + $this->_menu = $menu; + $this->_currentUrl = $currentUrl; + } + + /** + * 鑾峰彇褰撳墠鑿滃崟 + * + * @access public + * @return array + */ + public function getCurrentMenu() + { + return $this->_currentParent > 0 ? $this->_menu[$this->_currentParent][3][$this->_currentChild] : NULL; + } + + /** + * 杈撳嚭鐖剁骇鑿滃崟 + * + * @access public + * @return string + */ + public function output($class = 'focus', $childClass = 'focus') + { + foreach ($this->_menu as $key => $node) { + if (!$node[1] || !$key) { + continue; + } + + echo "<ul class=\"root" . ($key == $this->_currentParent ? ' ' . $class : NULL) + . "\"><li class=\"parent\"><a href=\"{$node[2]}\">{$node[0]}</a></dt>" + . "</li><ul class=\"child\">"; + + $last = 0; + foreach ($node[3] as $inKey => $inNode) { + if (!$inNode[4]) { + $last = $inKey; + } + } + + foreach ($node[3] as $inKey => $inNode) { + if ($inNode[4]) { + continue; + } + + $classes = array(); + if ($key == $this->_currentParent && $inKey == $this->_currentChild) { + $classes[] = $childClass; + } else if ($inNode[6]) { + continue; + } + + if ($inKey == $last) { + $classes[] = 'last'; + } + + echo "<li" . (!empty($classes) ? ' class="' . implode(' ', $classes) . '"' : NULL) . + "><a href=\"" . ($key == $this->_currentParent && $inKey == $this->_currentChild ? $this->_currentUrl : $inNode[2]) . "\">{$inNode[0]}</a></li>"; + } + + echo "</ul></ul>"; + } + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Admin.php" new file mode 100644 index 0000000..e5795b6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Admin.php" @@ -0,0 +1,95 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Widget_Metas_Category_Admin + * + * @uses Widget_Metas_Category_List + * @copyright Copyright (c) 2012 Typecho Team. (http://typecho.org) + * @author Joyqi <magike.net@gmail.com> + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Category_Admin extends Widget_Metas_Category_List +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->db->select('mid')->from('table.metas')->where('type = ?', 'category'); + $select->where('parent = ?', $this->request->parent ? $this->request->parent : 0); + + $this->stack = $this->getCategories(Typecho_Common::arrayFlatten( + $this->db->fetchAll($select->order('table.metas.order', Typecho_Db::SORT_ASC)), 'mid')); + } + + /** + * 鍚戜笂鐨勮繑鍥為摼鎺 + * + * @access public + * @return void + */ + public function backLink() + { + if (isset($this->request->parent)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->parent)); + + if (!empty($category)) { + $parent = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $category['parent'])); + + if ($parent) { + echo '<a href="' . Typecho_Common::url('manage-categories.php?parent=' . $parent['mid'], $this->options->adminUrl) . '">'; + } else { + echo '<a href="' . Typecho_Common::url('manage-categories.php', $this->options->adminUrl) . '">'; + } + + echo '« '; + _e('杩斿洖鐖剁骇鍒嗙被'); + echo '</a>'; + } + } + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + if (isset($this->request->parent)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->parent)); + + if (!empty($category)) { + return _t('绠$悊 %s 鐨勫瓙鍒嗙被', $category['name']); + } + } else { + return; + } + + throw new Typecho_Widget_Exception(_t('鍒嗙被涓嶅瓨鍦'), 404); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getAddLink() + { + if (isset($this->request->parent)) { + return 'category.php?parent=' . $this->request->filter('int')->parent; + } else { + return 'category.php'; + } + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Edit.php" new file mode 100644 index 0000000..6ff55b3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/Edit.php" @@ -0,0 +1,492 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鍒嗙被 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鍒嗙被缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Category_Edit extends Widget_Abstract_Metas implements Widget_Interface_Do +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 缂栬緫浠ヤ笂鏉冮檺 */ + $this->user->pass('editor'); + } + + /** + * 鍒ゆ柇鍒嗙被鏄惁瀛樺湪 + * + * @access public + * @param integer $mid 鍒嗙被涓婚敭 + * @return boolean + */ + public function categoryExists($mid) + { + $category = $this->db->fetchRow($this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->where('mid = ?', $mid)->limit(1)); + + return $category ? true : false; + } + + /** + * 鍒ゆ柇鍒嗙被鍚嶇О鏄惁瀛樺湪 + * + * @access public + * @param string $name 鍒嗙被鍚嶇О + * @return boolean + */ + public function nameExists($name) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->where('name = ?', $name) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->mid); + } + + $category = $this->db->fetchRow($select); + return $category ? false : true; + } + + /** + * 鍒ゆ柇鍒嗙被鍚嶈浆鎹㈠埌缂╃暐鍚嶅悗鏄惁鍚堟硶 + * + * @access public + * @param string $name 鍒嗙被鍚 + * @return boolean + */ + public function nameToSlug($name) + { + if (empty($this->request->slug)) { + $slug = Typecho_Common::slugName($name); + if (empty($slug) || !$this->slugExists($name)) { + return false; + } + } + + return true; + } + + /** + * 鍒ゆ柇鍒嗙被缂╃暐鍚嶆槸鍚﹀瓨鍦 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @return boolean + */ + public function slugExists($slug) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->where('slug = ?', Typecho_Common::slugName($slug)) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->mid); + } + + $category = $this->db->fetchRow($select); + return $category ? false : true; + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @param string $action 琛ㄥ崟鍔ㄤ綔 + * @return Typecho_Widget_Helper_Form_Element + */ + public function form($action = NULL) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/metas-category-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鍒嗙被鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('鍒嗙被鍚嶇О *')); + $form->addInput($name); + + /** 鍒嗙被缂╃暐鍚 */ + $slug = new Typecho_Widget_Helper_Form_Element_Text('slug', NULL, NULL, _t('鍒嗙被缂╃暐鍚'), + _t('鍒嗙被缂╃暐鍚嶇敤浜庡垱寤哄弸濂界殑閾炬帴褰㈠紡, 寤鸿浣跨敤瀛楁瘝, 鏁板瓧, 涓嬪垝绾垮拰妯潬.')); + $form->addInput($slug); + + /** 鐖剁骇鍒嗙被 */ + $options = array(0 => _t('涓嶉夋嫨')); + $parents = $this->widget('Widget_Metas_Category_List@options', + (isset($this->request->mid) ? 'ignore=' . $this->request->mid : '')); + + while ($parents->next()) { + $options[$parents->mid] = str_repeat('    ', $parents->levels) . $parents->name; + } + + $parent = new Typecho_Widget_Helper_Form_Element_Select('parent', $options, $this->request->parent, _t('鐖剁骇鍒嗙被'), + _t('姝ゅ垎绫诲皢褰掓。鍦ㄦ偍閫夋嫨鐨勭埗绾у垎绫讳笅.')); + $form->addInput($parent); + + /** 鍒嗙被鎻忚堪 */ + $description = new Typecho_Widget_Helper_Form_Element_Textarea('description', NULL, NULL, + _t('鍒嗙被鎻忚堪'), _t('姝ゆ枃瀛楃敤浜庢弿杩板垎绫, 鍦ㄦ湁鐨勪富棰樹腑瀹冧細琚樉绀.')); + $form->addInput($description); + + /** 鍒嗙被鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do'); + $form->addInput($do); + + /** 鍒嗙被涓婚敭 */ + $mid = new Typecho_Widget_Helper_Form_Element_Hidden('mid'); + $form->addInput($mid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + if (isset($this->request->mid) && 'insert' != $action) { + /** 鏇存柊妯″紡 */ + $meta = $this->db->fetchRow($this->select() + ->where('mid = ?', $this->request->mid) + ->where('type = ?', 'category')->limit(1)); + + if (!$meta) { + $this->response->redirect(Typecho_Common::url('manage-categories.php', $this->options->adminUrl)); + } + + $name->value($meta['name']); + $slug->value($meta['slug']); + $parent->value($meta['parent']); + $description->value($meta['description']); + $do->value('update'); + $mid->value($meta['mid']); + $submit->value(_t('缂栬緫鍒嗙被')); + $_action = 'update'; + } else { + $do->value('insert'); + $submit->value(_t('澧炲姞鍒嗙被')); + $_action = 'insert'; + } + + if (empty($action)) { + $action = $_action; + } + + /** 缁欒〃鍗曞鍔犺鍒 */ + if ('insert' == $action || 'update' == $action) { + $name->addRule('required', _t('蹇呴』濉啓鍒嗙被鍚嶇О')); + $name->addRule(array($this, 'nameExists'), _t('鍒嗙被鍚嶇О宸茬粡瀛樺湪')); + $name->addRule(array($this, 'nameToSlug'), _t('鍒嗙被鍚嶇О鏃犳硶琚浆鎹负缂╃暐鍚')); + $name->addRule('xssCheck', _t('璇蜂笉瑕佸湪鍒嗙被鍚嶇О涓娇鐢ㄧ壒娈婂瓧绗')); + $slug->addRule(array($this, 'slugExists'), _t('缂╃暐鍚嶅凡缁忓瓨鍦')); + $slug->addRule('xssCheck', _t('璇蜂笉瑕佸湪缂╃暐鍚嶄腑浣跨敤鐗规畩瀛楃')); + } + + if ('update' == $action) { + $mid->addRule('required', _t('鍒嗙被涓婚敭涓嶅瓨鍦')); + $mid->addRule(array($this, 'categoryExists'), _t('鍒嗙被涓嶅瓨鍦')); + } + + return $form; + } + + /** + * 澧炲姞鍒嗙被 + * + * @access public + * @return void + */ + public function insertCategory() + { + if ($this->form('insert')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $category = $this->request->from('name', 'slug', 'description', 'parent'); + + $category['slug'] = Typecho_Common::slugName(empty($category['slug']) ? $category['name'] : $category['slug']); + $category['type'] = 'category'; + $category['order'] = $this->getMaxOrder('category', $category['parent']) + 1; + + /** 鎻掑叆鏁版嵁 */ + $category['mid'] = $this->insert($category); + $this->push($category); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鍒嗙被 <a href="%s">%s</a> 宸茬粡琚鍔', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php' + . ($category['parent'] ? '?parent=' . $category['parent'] : ''), $this->options->adminUrl)); + } + + /** + * 鏇存柊鍒嗙被 + * + * @access public + * @return void + */ + public function updateCategory() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $category = $this->request->from('name', 'slug', 'description', 'parent'); + $category['mid'] = $this->request->mid; + $category['slug'] = Typecho_Common::slugName(empty($category['slug']) ? $category['name'] : $category['slug']); + $category['type'] = 'category'; + $current = $this->db->fetchRow($this->select()->where('mid = ?', $category['mid'])); + + if ($current['parent'] != $category['parent']) { + $parent = $this->db->fetchRow($this->select()->where('mid = ?', $category['parent'])); + + if ($parent['mid'] == $category['mid']) { + $category['order'] = $parent['order']; + $this->update(array( + 'parent' => $current['parent'], + 'order' => $current['order'] + ), $this->db->sql()->where('mid = ?', $parent['mid'])); + } else { + $category['order'] = $this->getMaxOrder('category', $category['parent']) + 1; + } + } + + /** 鏇存柊鏁版嵁 */ + $this->update($category, $this->db->sql()->where('mid = ?', $this->request->filter('int')->mid)); + $this->push($category); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鍒嗙被 <a href="%s">%s</a> 宸茬粡琚洿鏂', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php' + . ($category['parent'] ? '?parent=' . $category['parent'] : ''), $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鍒嗙被 + * + * @access public + * @return void + */ + public function deleteCategory() + { + $categories = $this->request->filter('int')->getArray('mid'); + $deleteCount = 0; + + foreach ($categories as $category) { + $parent = $this->db->fetchObject($this->select()->where('mid = ?', $category))->parent; + + if ($this->delete($this->db->sql()->where('mid = ?', $category))) { + $this->db->query($this->db->delete('table.relationships')->where('mid = ?', $category)); + $this->update(array('parent' => $parent), $this->db->sql()->where('parent = ?', $category)); + $deleteCount ++; + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鍒嗙被宸茬粡鍒犻櫎') : _t('娌℃湁鍒嗙被琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鍚堝苟鍒嗙被 + * + * @access public + * @return void + */ + public function mergeCategory() + { + /** 楠岃瘉鏁版嵁 */ + $validator = new Typecho_Validate(); + $validator->addRule('merge', 'required', _t('鍒嗙被涓婚敭涓嶅瓨鍦')); + $validator->addRule('merge', array($this, 'categoryExists'), _t('璇烽夋嫨闇瑕佸悎骞剁殑鍒嗙被')); + + if ($error = $validator->run($this->request->from('merge'))) { + $this->widget('Widget_Notice')->set($error, 'error'); + $this->response->goBack(); + } + + $merge = $this->request->merge; + $categories = $this->request->filter('int')->getArray('mid'); + + if ($categories) { + $this->merge($merge, 'category', $categories); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鍒嗙被宸茬粡鍚堝苟'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鍒嗙被'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鍒嗙被鎺掑簭 + * + * @access public + * @return void + */ + public function sortCategory() + { + $categories = $this->request->filter('int')->getArray('mid'); + if ($categories) { + $this->sort($categories, 'category'); + } + + if (!$this->request->isAjax()) { + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php', $this->options->adminUrl)); + } else { + $this->response->throwJson(array('success' => 1, 'message' => _t('鍒嗙被鎺掑簭宸茬粡瀹屾垚'))); + } + } + + /** + * 鍒锋柊鍒嗙被 + * + * @access public + * @return void + */ + public function refreshCategory() + { + $categories = $this->request->filter('int')->getArray('mid'); + if ($categories) { + foreach ($categories as $category) { + $this->refreshCountByTypeAndStatus($category, 'post', 'publish'); + } + + $this->widget('Widget_Notice')->set(_t('鍒嗙被鍒锋柊宸茬粡瀹屾垚'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鍒嗙被'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 璁剧疆榛樿鍒嗙被 + * + * @access public + * @return void + */ + public function defaultCategory() + { + /** 楠岃瘉鏁版嵁 */ + $validator = new Typecho_Validate(); + $validator->addRule('mid', 'required', _t('鍒嗙被涓婚敭涓嶅瓨鍦')); + $validator->addRule('mid', array($this, 'categoryExists'), _t('鍒嗙被涓嶅瓨鍦')); + + if ($error = $validator->run($this->request->from('mid'))) { + $this->widget('Widget_Notice')->set($error, 'error'); + } else { + + $this->db->query($this->db->update('table.options') + ->rows(array('value' => $this->request->mid)) + ->where('name = ?', 'defaultCategory')); + + $this->db->fetchRow($this->select()->where('mid = ?', $this->request->mid) + ->where('type = ?', 'category')->limit(1), array($this, 'push')); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('<a href="%s">%s</a> 宸茬粡琚涓洪粯璁ゅ垎绫', + $this->permalink, $this->name), 'success'); + } + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php', $this->options->adminUrl)); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @return string + * @throws Typecho_Widget_Exception + */ + public function getMenuTitle() + { + if (isset($this->request->mid)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->mid)); + + if (!empty($category)) { + return _t('缂栬緫鍒嗙被 %s', $category['name']); + } + + } if (isset($this->request->parent)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->parent)); + + if (!empty($category)) { + return _t('鏂板 %s 鐨勫瓙鍒嗙被', $category['name']); + } + + } else { + return; + } + + throw new Typecho_Widget_Exception(_t('鍒嗙被涓嶅瓨鍦'), 404); + } + + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=insert'))->insertCategory(); + $this->on($this->request->is('do=update'))->updateCategory(); + $this->on($this->request->is('do=delete'))->deleteCategory(); + $this->on($this->request->is('do=merge'))->mergeCategory(); + $this->on($this->request->is('do=sort'))->sortCategory(); + $this->on($this->request->is('do=refresh'))->refreshCategory(); + $this->on($this->request->is('do=default'))->defaultCategory(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/List.php" new file mode 100644 index 0000000..cf85926 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Category/List.php" @@ -0,0 +1,415 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍒嗙被杈撳嚭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍒嗙被杈撳嚭缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Category_List extends Widget_Abstract_Metas +{ + /** + * 澶氱骇鍒嗙被鍥炶皟鍑芥暟 + * + * @var boolean + * @access private + */ + private $_customTreeViewCategoriesCallback = false; + + /** + * 鏍戠姸鍒嗙被缁撴瀯 + * + * @var array + * @access private + */ + private $_treeViewCategories = array(); + + /** + * _categoryOptions + * + * @var mixed + * @access private + */ + private $_categoryOptions = NULL; + + /** + * 椤跺眰鍒嗙被 + * + * @var array + * @access private + */ + private $_top = array(); + + /** + * 鎵鏈夊垎绫诲搱甯岃〃 + * + * @var array + * @access private + */ + private $_map = array(); + + /** + * 椤哄簭娴 + * + * @var array + * @access private + */ + private $_orders = array(); + + /** + * 鎵鏈夊瓙鑺傜偣鍒楄〃 + * + * @var array + * @access private + */ + private $_children = array(); + + /** + * 鎵鏈夌埗鑺傜偣鍒楄〃 + * + * @var array + * @access private + */ + private $_parents = array(); + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault('ignore=0¤t='); + + /** 鍒濆鍖栧洖璋冨嚱鏁 */ + if (function_exists('treeViewCategories')) { + $this->_customTreeViewCategoriesCallback = true; + } + + $select = $this->select()->where('type = ?', 'category'); + if ($this->parameter->ignore) { + $select->where('mid <> ?', $this->parameter->ignore); + } + + $categories = $this->db->fetchAll($select->order('table.metas.order', Typecho_Db::SORT_ASC)); + foreach ($categories as $category) { + $category['levels'] = 0; + $this->_map[$category['mid']] = $category; + } + + // 璇诲彇鏁版嵁 + foreach ($this->_map as $mid => $category) { + $parent = $category['parent']; + + if (0 != $parent && isset($this->_map[$parent])) { + $this->_treeViewCategories[$parent][] = $mid; + } else { + $this->_top[] = $mid; + } + } + + // 棰勫鐞嗘繁搴 + $this->levelWalkCallback($this->_top); + $this->_map = array_map(array($this, 'filter'), $this->_map); + } + + /** + * 鍒楀嚭鍒嗙被鍥炶皟 + * + * @access private + */ + private function treeViewCategoriesCallback() + { + $categoryOptions = $this->_categoryOptions; + if ($this->_customTreeViewCategoriesCallback) { + return treeViewCategories($this, $categoryOptions); + } + + $classes = array(); + + if ($categoryOptions->itemClass) { + $classes[] = $categoryOptions->itemClass; + } + + $classes[] = 'category-level-' . $this->levels; + + echo '<' . $categoryOptions->itemTag . ' class="' + . implode(' ', $classes); + + if ($this->levels > 0) { + echo ' category-child'; + $this->levelsAlt(' category-level-odd', ' category-level-even'); + } else { + echo ' category-parent'; + } + + if ($this->mid == $this->parameter->current) { + echo ' category-active'; + } else if (isset($this->_children[$this->mid]) && in_array($this->parameter->current, $this->_children[$this->mid])) { + echo ' category-parent-active'; + } + + echo '"><a href="' . $this->permalink . '">' . $this->name . '</a>'; + + if ($categoryOptions->showCount) { + printf($categoryOptions->countTemplate, intval($this->count)); + } + + if ($categoryOptions->showFeed) { + printf($categoryOptions->feedTemplate, $this->feedUrl); + } + + if ($this->children) { + $this->treeViewCategories(); + } + + echo '</li>'; + } + + /** + * 棰勫鐞嗗垎绫昏凯浠 + * + * @param array $categories + * @param array $parents + * @access private + */ + private function levelWalkCallback(array $categories, $parents = array()) + { + foreach ($parents as $parent) { + if (!isset($this->_children[$parent])) { + $this->_children[$parent] = array(); + } + + $this->_children[$parent] = array_merge($this->_children[$parent], $categories); + } + + foreach ($categories as $mid) { + $this->_orders[] = $mid; + $parent = $this->_map[$mid]['parent']; + + if (0 != $parent && isset($this->_map[$parent])) { + $levels = $this->_map[$parent]['levels'] + 1; + $this->_map[$mid]['levels'] = $levels; + } + + $this->_parents[$mid] = $parents; + + if (!empty($this->_treeViewCategories[$mid])) { + $new = $parents; + $new[] = $mid; + $this->levelWalkCallback($this->_treeViewCategories[$mid], $new); + } + } + } + + /** + * 瀛愯瘎璁 + * + * @access protected + * @return array + */ + protected function ___children() + { + return isset($this->_treeViewCategories[$this->mid]) ? + $this->getCategories($this->_treeViewCategories[$this->mid]) : array(); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->stack = $this->getCategories($this->_orders); + } + + /** + * treeViewCategories + * + * @access public + * @return void + */ + public function treeViewCategories() + { + $children = $this->children; + if ($children) { + //缂撳瓨鍙橀噺渚夸簬杩樺師 + $tmp = $this->row; + $this->sequence ++; + + //鍦ㄥ瓙璇勮涔嬪墠杈撳嚭 + echo '<' . $this->_categoryOptions->wrapTag . (empty($this->_categoryOptions->wrapClass) + ? '' : ' class="' . $this->_categoryOptions->wrapClass . '"') . '>'; + + foreach ($children as $child) { + $this->row = $child; + $this->treeViewCategoriesCallback(); + $this->row = $tmp; + } + + //鍦ㄥ瓙璇勮涔嬪悗杈撳嚭 + echo '</' . $this->_categoryOptions->wrapTag . '>'; + + $this->sequence --; + } + } + + /** + * treeViewCategories + * + * @param $categoryOptions 杈撳嚭閫夐」 + * @access public + * @return void + */ + public function listCategories($categoryOptions = NULL) + { + //鍒濆鍖栦竴浜涘彉閲 + $this->_categoryOptions = Typecho_Config::factory($categoryOptions); + $this->_categoryOptions->setDefault(array( + 'wrapTag' => 'ul', + 'wrapClass' => '', + 'itemTag' => 'li', + 'itemClass' => '', + 'showCount' => false, + 'showFeed' => false, + 'countTemplate' => '(%d)', + 'feedTemplate' => '<a href="%s">RSS</a>' + )); + + // 鎻掍欢鎻掍欢鎺ュ彛 + $this->pluginHandle()->trigger($plugged)->listCategories($this->_categoryOptions, $this); + + if (!$plugged) { + $this->stack = $this->getCategories($this->_top); + + if ($this->have()) { + echo '<' . $this->_categoryOptions->wrapTag . (empty($this->_categoryOptions->wrapClass) + ? '' : ' class="' . $this->_categoryOptions->wrapClass . '"') . '>'; + while ($this->next()) { + $this->treeViewCategoriesCallback(); + } + echo '</' . $this->_categoryOptions->wrapTag . '>'; + } + + $this->stack = $this->_map; + } + } + + /** + * 鏍规嵁娣卞害浣欐暟杈撳嚭 + * + * @access public + * @return void + */ + public function levelsAlt() + { + $args = func_get_args(); + $num = func_num_args(); + $split = $this->levels % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function filter(array $value) + { + $value['directory'] = $this->getAllParents($value['mid']); + $value['directory'][] = $value['slug']; + + $tmpCategoryTree = $value['directory']; + $value['directory'] = implode('/', array_map('urlencode', $value['directory'])); + + $value = parent::filter($value); + $value['directory'] = $tmpCategoryTree; + + return $value; + } + + /** + * 鑾峰彇鏌愪釜鍒嗙被涓嬬殑鎵鏈夊瓙鑺傜偣 + * + * @param mixed $mid + * @access public + * @return array + */ + public function getAllChildren($mid) + { + return isset($this->_children[$mid]) ? $this->_children[$mid] : array(); + } + + /** + * 鑾峰彇鏌愪釜鍒嗙被鎵鏈夌埗绾ц妭鐐 + * + * @param mixed $mid + * @access public + * @return array + */ + public function getAllParents($mid) + { + $parents = array(); + + if (isset($this->_parents[$mid])) { + foreach ($this->_parents[$mid] as $parent) { + $parents[] = $this->_map[$parent]['slug']; + } + } + + return $parents; + } + + /** + * 鑾峰彇鍗曚釜鍒嗙被 + * + * @param integer $mid + * @access public + * @return mixed + */ + public function getCategory($mid) + { + return isset($this->_map[$mid]) ? $this->_map[$mid] : NULL; + } + + /** + * 鑾峰彇澶氫釜鍒嗙被 + * + * @param mixed $mids + * @access public + * @return array + */ + public function getCategories($mids) + { + $result = array(); + + if (!empty($mids)) { + foreach ($mids as $mid) { + $result[] = $this->_map[$mid]; + } + } + + return $result; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Admin.php" new file mode 100644 index 0000000..9c7fcb8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Admin.php" @@ -0,0 +1,56 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏍囩浜 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏍囩浜戠粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Tag_Admin extends Widget_Metas_Tag_Cloud +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select()->where('type = ?', 'tag')->order('mid', Typecho_Db::SORT_DESC); + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + if (isset($this->request->mid)) { + $tag = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'tag', $this->request->mid)); + + if (!empty($tag)) { + return _t('缂栬緫鏍囩 %s', $tag['name']); + } + } else { + return; + } + + throw new Typecho_Widget_Exception(_t('鏍囩涓嶅瓨鍦'), 404); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Cloud.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Cloud.php" new file mode 100644 index 0000000..92de350 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Cloud.php" @@ -0,0 +1,61 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏍囩浜 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏍囩浜戠粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Tag_Cloud extends Widget_Abstract_Metas +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault(array('sort' => 'count', 'ignoreZeroCount' => false, 'desc' => true, 'limit' => 0)); + $select = $this->select()->where('type = ?', 'tag')->order($this->parameter->sort, + $this->parameter->desc ? Typecho_Db::SORT_DESC : Typecho_Db::SORT_ASC); + + /** 蹇界暐闆舵暟閲 */ + if ($this->parameter->ignoreZeroCount) { + $select->where('count > 0'); + } + + /** 鎬绘暟闄愬埗 */ + if ($this->parameter->limit) { + $select->limit($this->parameter->limit); + } + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 鎸夊垎鍓叉暟杈撳嚭瀛楃涓 + * + * @access public + * @param string $param 闇瑕佽緭鍑虹殑鍊 + * @return void + */ + public function split() + { + $args = func_get_args(); + array_unshift($args, $this->count); + echo call_user_func_array(array('Typecho_Common', 'splitByCount'), $args); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Edit.php" new file mode 100644 index 0000000..ec0f908 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Metas/Tag/Edit.php" @@ -0,0 +1,366 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏍囩缂栬緫 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏍囩缂栬緫缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Tag_Edit extends Widget_Abstract_Metas implements Widget_Interface_Do +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 缂栬緫浠ヤ笂鏉冮檺 */ + $this->user->pass('editor'); + } + + /** + * 鍒ゆ柇鏍囩鏄惁瀛樺湪 + * + * @access public + * @param integer $mid 鏍囩涓婚敭 + * @return boolean + */ + public function tagExists($mid) + { + $tag = $this->db->fetchRow($this->db->select() + ->from('table.metas') + ->where('type = ?', 'tag') + ->where('mid = ?', $mid)->limit(1)); + + return $tag ? true : false; + } + + /** + * 鍒ゆ柇鏍囩鍚嶇О鏄惁瀛樺湪 + * + * @access public + * @param string $name 鏍囩鍚嶇О + * @return boolean + */ + public function nameExists($name) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'tag') + ->where('name = ?', $name) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->filter('int')->mid); + } + + $tag = $this->db->fetchRow($select); + return $tag ? false : true; + } + + /** + * 鍒ゆ柇鏍囩鍚嶈浆鎹㈠埌缂╃暐鍚嶅悗鏄惁鍚堟硶 + * + * @access public + * @param string $name 鏍囩鍚 + * @return boolean + */ + public function nameToSlug($name) + { + if (empty($this->request->slug)) { + $slug = Typecho_Common::slugName($name); + if (empty($slug) || !$this->slugExists($name)) { + return false; + } + } + + return true; + } + + /** + * 鍒ゆ柇鏍囩缂╃暐鍚嶆槸鍚﹀瓨鍦 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @return boolean + */ + public function slugExists($slug) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'tag') + ->where('slug = ?', Typecho_Common::slugName($slug)) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->mid); + } + + $tag = $this->db->fetchRow($select); + return $tag ? false : true; + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @param string $action 琛ㄥ崟鍔ㄤ綔 + * @return Typecho_Widget_Helper_Form + */ + public function form($action = NULL) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/metas-tag-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鏍囩鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, + _t('鏍囩鍚嶇О *'), _t('杩欐槸鏍囩鍦ㄧ珯鐐逛腑鏄剧ず鐨勫悕绉.鍙互浣跨敤涓枃,濡 "鍦扮悆".')); + $form->addInput($name); + + /** 鏍囩缂╃暐鍚 */ + $slug = new Typecho_Widget_Helper_Form_Element_Text('slug', NULL, NULL, + _t('鏍囩缂╃暐鍚'), _t('鏍囩缂╃暐鍚嶇敤浜庡垱寤哄弸濂界殑閾炬帴褰㈠紡, 濡傛灉鐣欑┖鍒欓粯璁や娇鐢ㄦ爣绛惧悕绉.')); + $form->addInput($slug); + + /** 鏍囩鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do'); + $form->addInput($do); + + /** 鏍囩涓婚敭 */ + $mid = new Typecho_Widget_Helper_Form_Element_Hidden('mid'); + $form->addInput($mid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + if (isset($this->request->mid) && 'insert' != $action) { + /** 鏇存柊妯″紡 */ + $meta = $this->db->fetchRow($this->select() + ->where('mid = ?', $this->request->mid) + ->where('type = ?', 'tag')->limit(1)); + + if (!$meta) { + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + $name->value($meta['name']); + $slug->value($meta['slug']); + $do->value('update'); + $mid->value($meta['mid']); + $submit->value(_t('缂栬緫鏍囩')); + $_action = 'update'; + } else { + $do->value('insert'); + $submit->value(_t('澧炲姞鏍囩')); + $_action = 'insert'; + } + + if (empty($action)) { + $action = $_action; + } + + /** 缁欒〃鍗曞鍔犺鍒 */ + if ('insert' == $action || 'update' == $action) { + $name->addRule('required', _t('蹇呴』濉啓鏍囩鍚嶇О')); + $name->addRule(array($this, 'nameExists'), _t('鏍囩鍚嶇О宸茬粡瀛樺湪')); + $name->addRule(array($this, 'nameToSlug'), _t('鏍囩鍚嶇О鏃犳硶琚浆鎹负缂╃暐鍚')); + $name->addRule('xssCheck', _t('璇蜂笉瑕佹爣绛惧悕绉颁腑浣跨敤鐗规畩瀛楃')); + $slug->addRule(array($this, 'slugExists'), _t('缂╃暐鍚嶅凡缁忓瓨鍦')); + $slug->addRule('xssCheck', _t('璇蜂笉瑕佸湪缂╃暐鍚嶄腑浣跨敤鐗规畩瀛楃')); + } + + if ('update' == $action) { + $mid->addRule('required', _t('鏍囩涓婚敭涓嶅瓨鍦')); + $mid->addRule(array($this, 'tagExists'), _t('鏍囩涓嶅瓨鍦')); + } + + return $form; + } + + /** + * 鎻掑叆鏍囩 + * + * @access public + * @return void + */ + public function insertTag() + { + if ($this->form('insert')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $tag = $this->request->from('name', 'slug'); + $tag['type'] = 'tag'; + $tag['slug'] = Typecho_Common::slugName(empty($tag['slug']) ? $tag['name'] : $tag['slug']); + + /** 鎻掑叆鏁版嵁 */ + $tag['mid'] = $this->insert($tag); + $this->push($tag); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鏍囩 <a href="%s">%s</a> 宸茬粡琚鍔', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鏇存柊鏍囩 + * + * @access public + * @return void + */ + public function updateTag() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $tag = $this->request->from('name', 'slug', 'mid'); + $tag['type'] = 'tag'; + $tag['slug'] = Typecho_Common::slugName(empty($tag['slug']) ? $tag['name'] : $tag['slug']); + + /** 鏇存柊鏁版嵁 */ + $this->update($tag, $this->db->sql()->where('mid = ?', $this->request->filter('int')->mid)); + $this->push($tag); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鏍囩 <a href="%s">%s</a> 宸茬粡琚洿鏂', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鏍囩 + * + * @access public + * @return void + */ + public function deleteTag() + { + $tags = $this->request->filter('int')->getArray('mid'); + $deleteCount = 0; + + if ($tags && is_array($tags)) { + foreach ($tags as $tag) { + if ($this->delete($this->db->sql()->where('mid = ?', $tag))) { + $this->db->query($this->db->delete('table.relationships')->where('mid = ?', $tag)); + $deleteCount ++; + } + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏍囩宸茬粡鍒犻櫎') : _t('娌℃湁鏍囩琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鍚堝苟鏍囩 + * + * @access public + * @return void + */ + public function mergeTag() + { + if (empty($this->request->merge)) { + $this->widget('Widget_Notice')->set(_t('璇峰~鍐欓渶瑕佸悎骞跺埌鐨勬爣绛'), 'notice'); + $this->response->goBack(); + } + + $merge = $this->scanTags($this->request->merge); + if (empty($merge)) { + $this->widget('Widget_Notice')->set(_t('鍚堝苟鍒扮殑鏍囩鍚嶄笉鍚堟硶'), 'error'); + $this->response->goBack(); + } + + $tags = $this->request->filter('int')->getArray('mid'); + + if ($tags) { + $this->merge($merge, 'tag', $tags); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鏍囩宸茬粡鍚堝苟'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鏍囩'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鍒锋柊鏍囩 + * + * @access public + * @return void + */ + public function refreshTag() + { + $tags = $this->request->filter('int')->getArray('mid'); + if ($tags) { + foreach ($tags as $tag) { + $this->refreshCountByTypeAndStatus($tag, 'post', 'publish'); + } + + // 鑷姩娓呯悊鏍囩 + $this->clearTags(); + + $this->widget('Widget_Notice')->set(_t('鏍囩鍒锋柊宸茬粡瀹屾垚'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鏍囩'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鍏ュ彛鍑芥暟,缁戝畾浜嬩欢 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=insert'))->insertTag(); + $this->on($this->request->is('do=update'))->updateTag(); + $this->on($this->request->is('do=delete'))->deleteTag(); + $this->on($this->request->is('do=merge'))->mergeTag(); + $this->on($this->request->is('do=refresh'))->refreshTag(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Notice.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Notice.php" new file mode 100644 index 0000000..40edf6d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Notice.php" @@ -0,0 +1,71 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Widget.php 48 2008-03-16 02:51:40Z magike.net $ + */ + +/** + * 鎻愮ず妗嗙粍浠 + * + * @package Widget + */ +class Widget_Notice extends Typecho_Widget +{ + /** + * 鎻愮ず楂樹寒 + * + * @access public + * @var string + */ + public $highlight; + + /** + * 楂樹寒鐩稿叧鍏冪礌 + * + * @access public + * @param string $theId 闇瑕侀珮浜厓绱犵殑id + * @return void + */ + public function highlight($theId) + { + $this->highlight = $theId; + Typecho_Cookie::set('__typecho_notice_highlight', $theId, + $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); + } + + /** + * 鑾峰彇楂樹寒鐨刬d + * + * @access public + * @return integer + */ + public function getHighlightId() + { + return preg_match("/[0-9]+/", $this->highlight, $matches) ? $matches[0] : 0; + } + + /** + * 璁惧畾鍫嗘爤姣忎竴琛岀殑鍊 + * + * @param string $value 鍊煎搴旂殑閿 + * @param string $type 鎻愮ず绫诲瀷 + * @param string $typeFix 鍏煎鑰佹彃浠 + * @return array + */ + public function set($value, $type = 'notice', $typeFix = 'notice') + { + $notice = is_array($value) ? array_values($value) : array($value); + if (empty($type) && $typeFix) { + $type = $typeFix; + } + + Typecho_Cookie::set('__typecho_notice', Json::encode($notice), + $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); + Typecho_Cookie::set('__typecho_notice_type', $type, + $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options.php" new file mode 100644 index 0000000..e673cf2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options.php" @@ -0,0 +1,571 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍏ㄥ眬閫夐」 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍏ㄥ眬閫夐」缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options extends Typecho_Widget +{ + /** + * 缂撳瓨鐨勬彃浠堕厤缃 + * + * @access private + * @var array + */ + private $_pluginConfig = array(); + + /** + * 缂撳瓨鐨勪釜浜烘彃浠堕厤缃 + * + * @access private + * @var array + */ + private $_personalPluginConfig = array(); + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + } + + /** + * RSS2.0 + * + * @access protected + * @return string + */ + protected function ___feedUrl() + { + return Typecho_Router::url('feed', array('feed' => '/'), $this->index); + } + + /** + * RSS1.0 + * + * @access protected + * @return string + */ + protected function ___feedRssUrl() + { + return Typecho_Router::url('feed', array('feed' => '/rss/'), $this->index); + } + + /** + * ATOM1.O + * + * @access protected + * @return string + */ + protected function ___feedAtomUrl() + { + return Typecho_Router::url('feed', array('feed' => '/atom/'), $this->index); + } + + /** + * 璇勮RSS2.0鑱氬悎 + * + * @access protected + * @return string + */ + protected function ___commentsFeedUrl() + { + return Typecho_Router::url('feed', array('feed' => '/comments/'), $this->index); + } + + /** + * 璇勮RSS1.0鑱氬悎 + * + * @access protected + * @return string + */ + protected function ___commentsFeedRssUrl() + { + return Typecho_Router::url('feed', array('feed' => '/rss/comments/'), $this->index); + } + + /** + * 璇勮ATOM1.0鑱氬悎 + * + * @access protected + * @return string + */ + protected function ___commentsFeedAtomUrl() + { + return Typecho_Router::url('feed', array('feed' => '/atom/comments/'), $this->index); + } + + /** + * xmlrpc api鍦板潃 + * + * @access protected + * @return string + */ + protected function ___xmlRpcUrl() + { + return Typecho_Router::url('do', array('action' => 'xmlrpc'), $this->index); + } + + /** + * 鑾峰彇瑙f瀽璺緞鍓嶇紑 + * + * @access protected + * @return string + */ + protected function ___index() + { + return ($this->rewrite || (defined('__TYPECHO_REWRITE__') && __TYPECHO_REWRITE__)) + ? $this->rootUrl : Typecho_Common::url('index.php', $this->rootUrl); + } + + /** + * 鑾峰彇妯℃澘璺緞 + * + * @access protected + * @return string + */ + protected function ___themeUrl() + { + return defined('__TYPECHO_THEME_URL__') ? __TYPECHO_THEME_URL__ : + Typecho_Common::url(__TYPECHO_THEME_DIR__ . '/' . $this->theme, $this->siteUrl); + } + + /** + * 鑾峰彇鎻掍欢璺緞 + * + * @access protected + * @return string + */ + protected function ___pluginUrl() + { + return defined('__TYPECHO_PLUGIN_URL__') ? __TYPECHO_PLUGIN_URL__ : + Typecho_Common::url(__TYPECHO_PLUGIN_DIR__, $this->siteUrl); + } + + /** + * 鑾峰彇鍚庡彴璺緞 + * + * @access protected + * @return string + */ + protected function ___adminUrl() + { + return Typecho_Common::url(defined('__TYPECHO_ADMIN_DIR__') ? + __TYPECHO_ADMIN_DIR__ : '/admin/', $this->rootUrl); + } + + /** + * 鑾峰彇鐧诲綍鍦板潃 + * + * @access protected + * @return string + */ + protected function ___loginUrl() + { + return Typecho_Common::url('login.php', $this->adminUrl); + } + + /** + * 鑾峰彇鐧诲綍鎻愪氦鍦板潃 + * + * @access protected + * @return string + */ + protected function ___loginAction() + { + return $this->widget('Widget_Security')->getTokenUrl( + Typecho_Router::url('do', array('action' => 'login', 'widget' => 'Login'), + Typecho_Common::url('index.php', $this->rootUrl))); + } + + /** + * 鑾峰彇娉ㄥ唽鍦板潃 + * + * @access protected + * @return string + */ + protected function ___registerUrl() + { + return Typecho_Common::url('register.php', $this->adminUrl); + } + + /** + * 鑾峰彇鐧诲綍鎻愪氦鍦板潃 + * + * @access protected + * @return string + */ + protected function ___registerAction() + { + return $this->widget('Widget_Security')->getTokenUrl( + Typecho_Router::url('do', array('action' => 'register', 'widget' => 'Register'), $this->index)); + } + + /** + * 鑾峰彇涓汉妗f鍦板潃 + * + * @access protected + * @return string + */ + protected function ___profileUrl() + { + return Typecho_Common::url('profile.php', $this->adminUrl); + } + + /** + * 鑾峰彇鐧诲嚭鍦板潃 + * + * @access protected + * @return string + */ + protected function ___logoutUrl() + { + return Typecho_Common::url('/action/logout', $this->index); + } + + /** + * 鑾峰彇绯荤粺鏃跺尯 + * + * @access protected + * @return integer + */ + protected function ___serverTimezone() + { + return Typecho_Date::$serverTimezoneOffset; + } + + /** + * 鑾峰彇鏍兼灄灏兼不鏍囧噯鏃堕棿 + * + * @access protected + * @return integer + */ + protected function ___gmtTime() + { + return Typecho_Date::gmtTime(); + } + + /** + * 鑾峰彇鏍煎紡 + * + * @access protected + * @return string + */ + protected function ___contentType() + { + return isset($this->contentType) ? $this->contentType : 'text/html'; + } + + /** + * 杞欢鍚嶇О + * + * @access protected + * @return string + */ + protected function ___software() + { + list($software, $version) = explode(' ', $this->generator); + return $software; + } + + /** + * 杞欢鐗堟湰 + * + * @access protected + * @return string + */ + protected function ___version() + { + list($software, $version) = explode(' ', $this->generator); + return $version; + } + + /** + * 鍏佽涓婁紶鐨勬枃浠剁被鍨 + * + * @access protected + * @return string + */ + protected function ___allowedAttachmentTypes() + { + $attachmentTypesResult = array(); + + if (NULL != $this->attachmentTypes) { + $attachmentTypes = str_replace( + array('@image@', '@media@', '@doc@'), + array('gif,jpg,jpeg,png,tiff,bmp', 'mp3,wmv,wma,rmvb,rm,avi,flv', + 'txt,doc,docx,xls,xlsx,ppt,pptx,zip,rar,pdf'), $this->attachmentTypes); + + $attachmentTypesResult = array_unique(array_map('trim', explode(',', $attachmentTypes))); + } + + return $attachmentTypesResult; + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->db->fetchAll($this->db->select()->from('table.options') + ->where('user = 0'), array($this, 'push')); + + /** 鏀寔鐨偆鍙橀噺閲嶈浇 */ + if (!empty($this->row['theme:' . $this->row['theme']])) { + $themeOptions = NULL; + + /** 瑙f瀽鍙橀噺 */ + if ($themeOptions = unserialize($this->row['theme:' . $this->row['theme']])) { + /** 瑕嗙洊鍙橀噺 */ + $this->row = array_merge($this->row, $themeOptions); + } + } + + $this->stack[] = &$this->row; + + /** 鍒濆鍖栫珯鐐逛俊鎭 */ + if (defined('__TYPECHO_SITE_URL__')) { + $this->siteUrl = __TYPECHO_SITE_URL__; + } + + $this->originalSiteUrl = $this->siteUrl; + $this->siteUrl = Typecho_Common::url(NULL, $this->siteUrl); + $this->plugins = unserialize($this->plugins); + + /** 鍔ㄦ佸垽鏂毊鑲ょ洰褰 */ + $this->theme = is_dir($this->themeFile($this->theme)) ? $this->theme : 'default'; + + /** 鍔ㄦ佽幏鍙栨牴鐩綍 */ + $this->rootUrl = $this->request->getRequestRoot(); + if (defined('__TYPECHO_ADMIN__')) { + $adminDir = '/' . trim(defined('__TYPECHO_ADMIN_DIR__') ? __TYPECHO_ADMIN_DIR__ : '/admin/', '/'); + $this->rootUrl = substr($this->rootUrl, 0, - strlen($adminDir)); + } + + /** 澧炲姞瀵筍SL杩炴帴鐨勬敮鎸 */ + if ($this->request->isSecure() && 0 === strpos($this->siteUrl, 'http://')) { + $this->siteUrl = substr_replace($this->siteUrl, 'https', 0, 4); + } + + /** 鑷姩鍒濆鍖栬矾鐢辫〃 */ + $this->routingTable = unserialize($this->routingTable); + if (!isset($this->routingTable[0])) { + /** 瑙f瀽璺敱骞剁紦瀛 */ + $parser = new Typecho_Router_Parser($this->routingTable); + $parsedRoutingTable = $parser->parse(); + $this->routingTable = array_merge(array($parsedRoutingTable), $this->routingTable); + $this->db->query($this->db->update('table.options')->rows(array('value' => serialize($this->routingTable))) + ->where('name = ?', 'routingTable')); + } + } + + /** + * 閲嶈浇鐖剁被push鍑芥暟,灏嗘墍鏈夊彉閲忓煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + //灏嗚鏁版嵁鎸夐『搴忕疆浣 + $this->row[$value['name']] = $value['value']; + return $value; + } + + /** + * 杈撳嚭缃戠珯璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function siteUrl($path = NULL) + { + echo Typecho_Common::url($path, $this->siteUrl); + } + + /** + * 杈撳嚭瑙f瀽鍦板潃 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function index($path = NULL) + { + echo Typecho_Common::url($path, $this->index); + } + + /** + * 杈撳嚭妯℃澘璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @param string $theme 妯$増鍚嶇О + * @return void + */ + public function themeUrl($path = NULL, $theme = NULL) + { + if (empty($theme)) { + echo Typecho_Common::url($path, $this->themeUrl); + } + + $url = defined('__TYPECHO_THEME_URL__') ? __TYPECHO_THEME_URL__ : + Typecho_Common::url(__TYPECHO_THEME_DIR__ . '/' . $theme, $this->siteUrl); + + return Typecho_Common::url($path, $url); + } + + /** + * 杈撳嚭鎻掍欢璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function pluginUrl($path = NULL) + { + echo Typecho_Common::url($path, $this->pluginUrl); + } + + /** + * 鑾峰彇鐨偆鏂囦欢 + * + * @param string $theme + * @param string $file + * @return string + */ + public function themeFile($theme, $file = '') + { + return __TYPECHO_ROOT_DIR__ . __TYPECHO_THEME_DIR__ . '/' . trim($theme, './') . '/' . trim($file, './'); + } + + /** + * 鑾峰彇鎻掍欢鐩綍 + * + * @param $plugin + * @return string + */ + public function pluginDir($plugin) + { + return __TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__; + } + + /** + * 杈撳嚭鍚庡彴璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function adminUrl($path = NULL) + { + echo Typecho_Common::url($path, $this->adminUrl); + } + + /** + * 鑾峰彇鎴栬緭鍑哄悗鍙伴潤鎬佹枃浠惰矾寰 + * + * @param string $type + * @param string $file + * @return void|string + */ + public function adminStaticUrl($type, $file = NULL) + { + $url = Typecho_Common::url($type, $this->adminUrl); + + if (empty($file)) { + return $url; + } + + echo Typecho_Common::url($file, $url); + } + + /** + * 缂栫爜杈撳嚭鍏佽鍑虹幇鍦ㄨ瘎璁轰腑鐨刪tml鏍囩 + * + * @access public + * @return void + */ + public function commentsHTMLTagAllowed() + { + echo htmlspecialchars($this->commentsHTMLTagAllowed); + } + + /** + * 鑾峰彇鎻掍欢绯荤粺鍙傛暟 + * + * @param mixed $pluginName 鎻掍欢鍚嶇О + * @return mixed + * @throws Typecho_Plugin_Exception + */ + public function plugin($pluginName) + { + if (!isset($this->_pluginConfig[$pluginName])) { + if (!empty($this->row['plugin:' . $pluginName]) + && false !== ($options = unserialize($this->row['plugin:' . $pluginName]))) { + $this->_pluginConfig[$pluginName] = new Typecho_Config($options); + } else { + throw new Typecho_Plugin_Exception(_t('鎻掍欢%s鐨勯厤缃俊鎭病鏈夋壘鍒', $pluginName), 500); + } + } + + return $this->_pluginConfig[$pluginName]; + } + + /** + * 鑾峰彇涓汉鎻掍欢绯荤粺鍙傛暟 + * + * @param mixed $pluginName 鎻掍欢鍚嶇О + * @return mixed + * @throws Typecho_Plugin_Exception + */ + public function personalPlugin($pluginName) + { + if (!isset($this->_personalPluginConfig[$pluginName])) { + if (!empty($this->row['_plugin:' . $pluginName]) + && false !== ($options = unserialize($this->row['_plugin:' . $pluginName]))) { + $this->_personalPluginConfig[$pluginName] = new Typecho_Config($options); + } else { + throw new Typecho_Plugin_Exception(_t('鎻掍欢%s鐨勯厤缃俊鎭病鏈夋壘鍒', $pluginName), 500); + } + } + + return $this->_personalPluginConfig[$pluginName]; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Discussion.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Discussion.php" new file mode 100644 index 0000000..893c71b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Discussion.php" @@ -0,0 +1,248 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 璇勮璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 璇勮璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_Discussion extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/options-discussion'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 璇勮鏃ユ湡鏍煎紡 */ + $commentDateFormat = new Typecho_Widget_Helper_Form_Element_Text('commentDateFormat', NULL, $this->options->commentDateFormat, + _t('璇勮鏃ユ湡鏍煎紡'), _t('杩欐槸涓涓粯璁ょ殑鏍煎紡,褰撲綘鍦ㄦā鏉夸腑璋冪敤鏄剧ず璇勮鏃ユ湡鏂规硶鏃, 濡傛灉娌℃湁鎸囧畾鏃ユ湡鏍煎紡, 灏嗘寜鐓ф鏍煎紡杈撳嚭.') . '<br />' + . _t('鍏蜂綋鍐欐硶璇峰弬鑰 <a href="http://www.php.net/manual/zh/function.date.php">PHP 鏃ユ湡鏍煎紡鍐欐硶</a>.')); + $commentDateFormat->input->setAttribute('class', 'w-40 mono'); + $form->addInput($commentDateFormat); + + /** 璇勮鍒楄〃鏁扮洰 */ + $commentsListSize = new Typecho_Widget_Helper_Form_Element_Text('commentsListSize', NULL, $this->options->commentsListSize, + _t('璇勮鍒楄〃鏁扮洰'), _t('姝ゆ暟鐩敤浜庢寚瀹氭樉绀哄湪渚ц竟鏍忎腑鐨勮瘎璁哄垪琛ㄦ暟鐩.')); + $commentsListSize->input->setAttribute('class', 'w-20'); + $form->addInput($commentsListSize->addRule('isInteger', _t('璇峰~鍏ヤ竴涓暟瀛'))); + + $commentsShowOptions = array( + 'commentsShowCommentOnly' => _t('浠呮樉绀鸿瘎璁, 涓嶆樉绀 Pingback 鍜 Trackback'), + 'commentsMarkdown' => _t('鍦ㄨ瘎璁轰腑浣跨敤Markdown璇硶'), + 'commentsShowUrl' => _t('璇勮鑰呭悕绉版樉绀烘椂鑷姩鍔犱笂鍏朵釜浜轰富椤甸摼鎺'), + 'commentsUrlNofollow' => _t('瀵硅瘎璁鸿呬釜浜轰富椤甸摼鎺ヤ娇鐢 <a href="http://en.wikipedia.org/wiki/Nofollow">nofollow 灞炴</a>'), + 'commentsAvatar' => _t('鍚敤 <a href="http://gravatar.com">Gravatar</a> 澶村儚鏈嶅姟, 鏈楂樻樉绀鸿瘎绾т负 %s 鐨勫ご鍍', + '</label><select id="commentsShow-commentsAvatarRating" name="commentsAvatarRating"> + <option value="G"' . ('G' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>G - 鏅</option> + <option value="PG"' . ('PG' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>PG - 13宀佷互涓</option> + <option value="R"' . ('R' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>R - 17宀佷互涓婃垚浜</option> + <option value="X"' . ('X' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>X - 闄愬埗绾</option></select> + <label for="commentsShow-commentsAvatarRating">'), + 'commentsPageBreak' => _t('鍚敤鍒嗛〉, 骞朵笖姣忛〉鏄剧ず %s 绡囪瘎璁, 鍦ㄥ垪鍑烘椂灏 %s 浣滀负榛樿鏄剧ず', + '</label><input type="text" value="' . $this->options->commentsPageSize + . '" class="text num text-s" id="commentsShow-commentsPageSize" name="commentsPageSize" /><label for="commentsShow-commentsPageSize">', + '</label><select id="commentsShow-commentsPageDisplay" name="commentsPageDisplay"> + <option value="first"' . ('first' == $this->options->commentsPageDisplay ? ' selected="true"' : '') . '>' . _t('绗竴椤') . '</option> + <option value="last"' . ('last' == $this->options->commentsPageDisplay ? ' selected="true"' : '') . '>' . _t('鏈鍚庝竴椤') . '</option></select>' + . '<label for="commentsShow-commentsPageDisplay">'), + 'commentsThreaded' => _t('鍚敤璇勮鍥炲, 浠 %s 灞備綔涓烘瘡涓瘎璁烘渶澶氱殑鍥炲灞傛暟', + '</label><input name="commentsMaxNestingLevels" type="text" class="text num text-s" value="' . $this->options->commentsMaxNestingLevels . '" id="commentsShow-commentsMaxNestingLevels" /> + <label for="commentsShow-commentsMaxNestingLevels">') . '</label></span><span class="multiline">' + . _t('灏 %s 鐨勮瘎璁烘樉绀哄湪鍓嶉潰', '<select id="commentsShow-commentsOrder" name="commentsOrder"> + <option value="DESC"' . ('DESC' == $this->options->commentsOrder ? ' selected="true"' : '') . '>' . _t('杈冩柊鐨') . '</option> + <option value="ASC"' . ('ASC' == $this->options->commentsOrder ? ' selected="true"' : '') . '>' . _t('杈冩棫鐨') . '</option></select><label for="commentsShow-commentsOrder">') + ); + + $commentsShowOptionsValue = array(); + if ($this->options->commentsShowCommentOnly) { + $commentsShowOptionsValue[] = 'commentsShowCommentOnly'; + } + + if ($this->options->commentsMarkdown) { + $commentsShowOptionsValue[] = 'commentsMarkdown'; + } + + if ($this->options->commentsShowUrl) { + $commentsShowOptionsValue[] = 'commentsShowUrl'; + } + + if ($this->options->commentsUrlNofollow) { + $commentsShowOptionsValue[] = 'commentsUrlNofollow'; + } + + if ($this->options->commentsAvatar) { + $commentsShowOptionsValue[] = 'commentsAvatar'; + } + + if ($this->options->commentsPageBreak) { + $commentsShowOptionsValue[] = 'commentsPageBreak'; + } + + if ($this->options->commentsThreaded) { + $commentsShowOptionsValue[] = 'commentsThreaded'; + } + + $commentsShow = new Typecho_Widget_Helper_Form_Element_Checkbox('commentsShow', $commentsShowOptions, + $commentsShowOptionsValue, _t('璇勮鏄剧ず')); + $form->addInput($commentsShow->multiMode()); + + /** 璇勮鎻愪氦 */ + $commentsPostOptions = array( + 'commentsRequireModeration' => _t('鎵鏈夎瘎璁哄繀椤荤粡杩囧鏍'), + 'commentsWhitelist' => _t('璇勮鑰呬箣鍓嶉』鏈夎瘎璁洪氳繃浜嗗鏍'), + 'commentsRequireMail' => _t('蹇呴』濉啓閭'), + 'commentsRequireURL' => _t('蹇呴』濉啓缃戝潃'), + 'commentsCheckReferer' => _t('妫鏌ヨ瘎璁烘潵婧愰〉 URL 鏄惁涓庢枃绔犻摼鎺ヤ竴鑷'), + 'commentsAntiSpam' => _t('寮鍚弽鍨冨溇淇濇姢'), + 'commentsAutoClose' => _t('鍦ㄦ枃绔犲彂甯 %s 澶╀互鍚庤嚜鍔ㄥ叧闂瘎璁', + '</label><input name="commentsPostTimeout" type="text" class="text num text-s" value="' . intval($this->options->commentsPostTimeout / (24 * 3600)) . '" id="commentsPost-commentsPostTimeout" /> + <label for="commentsPost-commentsPostTimeout">'), + 'commentsPostIntervalEnable' => _t('鍚屼竴 IP 鍙戝竷璇勮鐨勬椂闂撮棿闅旈檺鍒朵负 %s 鍒嗛挓', + '</label><input name="commentsPostInterval" type="text" class="text num text-s" value="' . round($this->options->commentsPostInterval / (60), 1) . '" id="commentsPost-commentsPostInterval" /> + <label for="commentsPost-commentsPostInterval">') + ); + + $commentsPostOptionsValue = array(); + if ($this->options->commentsRequireModeration) { + $commentsPostOptionsValue[] = 'commentsRequireModeration'; + } + + if ($this->options->commentsWhitelist) { + $commentsPostOptionsValue[] = 'commentsWhitelist'; + } + + if ($this->options->commentsRequireMail) { + $commentsPostOptionsValue[] = 'commentsRequireMail'; + } + + if ($this->options->commentsRequireURL) { + $commentsPostOptionsValue[] = 'commentsRequireURL'; + } + + if ($this->options->commentsCheckReferer) { + $commentsPostOptionsValue[] = 'commentsCheckReferer'; + } + + if ($this->options->commentsAntiSpam) { + $commentsPostOptionsValue[] = 'commentsAntiSpam'; + } + + if ($this->options->commentsAutoClose) { + $commentsPostOptionsValue[] = 'commentsAutoClose'; + } + + if ($this->options->commentsPostIntervalEnable) { + $commentsPostOptionsValue[] = 'commentsPostIntervalEnable'; + } + + $commentsPost = new Typecho_Widget_Helper_Form_Element_Checkbox('commentsPost', $commentsPostOptions, + $commentsPostOptionsValue, _t('璇勮鎻愪氦')); + $form->addInput($commentsPost->multiMode()); + + /** 鍏佽浣跨敤鐨凥TML鏍囩鍜屽睘鎬 */ + $commentsHTMLTagAllowed = new Typecho_Widget_Helper_Form_Element_Textarea('commentsHTMLTagAllowed', NULL, + $this->options->commentsHTMLTagAllowed, + _t('鍏佽浣跨敤鐨凥TML鏍囩鍜屽睘鎬'), _t('榛樿鐨勭敤鎴疯瘎璁轰笉鍏佽濉啓浠讳綍鐨凥TML鏍囩, 浣犲彲浠ュ湪杩欓噷濉啓鍏佽浣跨敤鐨凥TML鏍囩.') . '<br />' + . _t('姣斿: %s', ': <code><a href=""> <img src=""> <blockquote></code>')); + $commentsHTMLTagAllowed->input->setAttribute('class', 'mono'); + $form->addInput($commentsHTMLTagAllowed); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateDiscussionSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + $this->response->goBack(); + } + + $settings = $this->request->from('commentDateFormat', 'commentsListSize', 'commentsPageSize', 'commentsPageDisplay', 'commentsAvatar', + 'commentsOrder', 'commentsMaxNestingLevels', 'commentsUrlNofollow', 'commentsPostTimeout', 'commentsUniqueIpInterval', 'commentsWhitelist', 'commentsRequireMail', 'commentsAvatarRating', + 'commentsPostTimeout', 'commentsPostInterval', 'commentsRequireModeration', 'commentsRequireURL', 'commentsHTMLTagAllowed', 'commentsStopWords', 'commentsIpBlackList'); + $settings['commentsShow'] = $this->request->getArray('commentsShow'); + $settings['commentsPost'] = $this->request->getArray('commentsPost'); + + $settings['commentsShowCommentOnly'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsShowCommentOnly'); + $settings['commentsMarkdown'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsMarkdown'); + $settings['commentsShowUrl'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsShowUrl'); + $settings['commentsUrlNofollow'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsUrlNofollow'); + $settings['commentsAvatar'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsAvatar'); + $settings['commentsPageBreak'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsPageBreak'); + $settings['commentsThreaded'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsThreaded'); + + $settings['commentsPageSize'] = intval($settings['commentsPageSize']); + $settings['commentsMaxNestingLevels'] = min(7, max(2, intval($settings['commentsMaxNestingLevels']))); + $settings['commentsPageDisplay'] = ('first' == $settings['commentsPageDisplay']) ? 'first' : 'last'; + $settings['commentsOrder'] = ('DESC' == $settings['commentsOrder']) ? 'DESC' : 'ASC'; + $settings['commentsAvatarRating'] = in_array($settings['commentsAvatarRating'], array('G', 'PG', 'R', 'X')) + ? $settings['commentsAvatarRating'] : 'G'; + + $settings['commentsRequireModeration'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsRequireModeration'); + $settings['commentsWhitelist'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsWhitelist'); + $settings['commentsRequireMail'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsRequireMail'); + $settings['commentsRequireURL'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsRequireURL'); + $settings['commentsCheckReferer'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsCheckReferer'); + $settings['commentsAntiSpam'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsAntiSpam'); + $settings['commentsAutoClose'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsAutoClose'); + $settings['commentsPostIntervalEnable'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsPostIntervalEnable'); + + $settings['commentsPostTimeout'] = intval($settings['commentsPostTimeout']) * 24 * 3600; + $settings['commentsPostInterval'] = round($settings['commentsPostInterval'], 1) * 60; + + unset($settings['commentsShow']); + unset($settings['commentsPost']); + + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updateDiscussionSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/General.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/General.php" new file mode 100644 index 0000000..c59bca6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/General.php" @@ -0,0 +1,266 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍩烘湰璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍩烘湰璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_General extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鑾峰彇璇█鍒楄〃 + * + * @access private + * @return array + */ + public static function getLangs() + { + $dir = defined('__TYPECHO_LANG_DIR__') ? __TYPECHO_LANG_DIR__ : __TYPECHO_ROOT_DIR__ . '/usr/langs'; + $files = glob($dir . '/*.mo'); + $langs = array('zh_CN' => '绠浣撲腑鏂'); + + if (!empty($files)) { + foreach ($files as $file) { + $getText = new Typecho_I18n_GetText($file); + list ($name) = explode('.', basename($file)); + $title = $getText->translate('lang', $count); + $langs[$name] = $count > -1 ? $title : $name; + } + + ksort($langs); + } + + return $langs; + } + + /** + * 妫鏌ユ槸鍚﹀湪璇█鍒楄〃涓 + * + * @param mixed $lang + * @access public + * @return bool + */ + public function checkLang($lang) + { + $langs = self::getLangs(); + return isset($langs[$lang]); + } + + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/options-general'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 绔欑偣鍚嶇О */ + $title = new Typecho_Widget_Helper_Form_Element_Text('title', NULL, $this->options->title, _t('绔欑偣鍚嶇О'), _t('绔欑偣鐨勫悕绉板皢鏄剧ず鍦ㄧ綉椤电殑鏍囬澶.')); + $title->input->setAttribute('class', 'w-100'); + $form->addInput($title->addRule('required', _t('璇峰~鍐欑珯鐐瑰悕绉')) + ->addRule('xssCheck', _t('璇蜂笉瑕佸湪绔欑偣鍚嶇О涓娇鐢ㄧ壒娈婂瓧绗'))); + + /** 绔欑偣鍦板潃 */ + if (!defined('__TYPECHO_SITE_URL__')) { + $siteUrl = new Typecho_Widget_Helper_Form_Element_Text('siteUrl', NULL, $this->options->originalSiteUrl, _t('绔欑偣鍦板潃'), _t('绔欑偣鍦板潃涓昏鐢ㄤ簬鐢熸垚鍐呭鐨勬案涔呴摼鎺.') . ($this->options->originalSiteUrl == $this->options->rootUrl ? + '' : '</p><p class="message notice mono">' . _t('褰撳墠鍦板潃 <strong>%s</strong> 涓庝笂杩拌瀹氬间笉涓鑷', + $this->options->rootUrl))); + $siteUrl->input->setAttribute('class', 'w-100 mono'); + $form->addInput($siteUrl->addRule('required', _t('璇峰~鍐欑珯鐐瑰湴鍧')) + ->addRule('url', _t('璇峰~鍐欎竴涓悎娉曠殑URL鍦板潃'))); + } + + /** 绔欑偣鎻忚堪 */ + $description = new Typecho_Widget_Helper_Form_Element_Text('description', NULL, $this->options->description, _t('绔欑偣鎻忚堪'), _t('绔欑偣鎻忚堪灏嗘樉绀哄湪缃戦〉浠g爜鐨勫ご閮.')); + $form->addInput($description->addRule('xssCheck', _t('璇蜂笉瑕佸湪绔欑偣鎻忚堪涓娇鐢ㄧ壒娈婂瓧绗'))); + + /** 鍏抽敭璇 */ + $keywords = new Typecho_Widget_Helper_Form_Element_Text('keywords', NULL, $this->options->keywords, _t('鍏抽敭璇'), _t('璇蜂互鍗婅閫楀彿 "," 鍒嗗壊澶氫釜鍏抽敭瀛.')); + $form->addInput($keywords->addRule('xssCheck', _t('璇蜂笉瑕佸湪鍏抽敭璇嶄腑浣跨敤鐗规畩瀛楃'))); + + /** 娉ㄥ唽 */ + $allowRegister = new Typecho_Widget_Helper_Form_Element_Radio('allowRegister', array('0' => _t('涓嶅厑璁'), '1' => _t('鍏佽')), $this->options->allowRegister, _t('鏄惁鍏佽娉ㄥ唽'), + _t('鍏佽璁块棶鑰呮敞鍐屽埌浣犵殑缃戠珯, 榛樿鐨勬敞鍐岀敤鎴蜂笉浜湁浠讳綍鍐欏叆鏉冮檺.')); + $form->addInput($allowRegister); + + /** 璇█椤 */ + // hack 璇█鎵弿 + _t('lang'); + + $langs = self::getLangs(); + + if (count($langs) > 1) { + $lang = new Typecho_Widget_Helper_Form_Element_Select('lang', $langs, $this->options->lang, _t('璇█')); + $form->addInput($lang->addRule(array($this, 'checkLang'), _t('鎵閫夋嫨鐨勮瑷鍖呬笉瀛樺湪'))); + } + + /** 鏃跺尯 */ + $timezoneList = array( + "0" => _t('鏍兼灄濞佹不(瀛愬崍绾)鏍囧噯鏃堕棿 (GMT)'), + "3600" => _t('涓鏍囧噯鏃堕棿 闃垮鏂壒涓,鑽峰叞,娉曞浗 (GMT +1)'), + "7200" => _t('涓滄鏍囧噯鏃堕棿 甯冨姞鍕掓柉鐗,濉炴郸璺柉,甯岃厞 (GMT +2)'), + "10800" => _t('鑾柉绉戞椂闂 浼婃媺鍏,鍩冨淇勬瘮浜,椹揪鍔犳柉鍔 (GMT +3)'), + "14400" => _t('绗瘮鍒╂柉鏃堕棿 闃挎浖,姣涢噷濉斿凹浜,鐣欏凹姹矝 (GMT +4)'), + "18000" => _t('鏂板痉閲屾椂闂 宸村熀鏂潶,椹皵浠eか (GMT +5)'), + "21600" => _t('绉戜鸡鍧℃椂闂 瀛熷姞鎷 (GMT +6)'), + "25200" => _t('鏇艰胺闆呭姞杈 鏌煍瀵,鑻忛棬绛旇厞,鑰佹対 (GMT +7)'), + "28800" => _t('鍖椾含鏃堕棿 棣欐腐,鏂板姞鍧,瓒婂崡 (GMT +8)'), + "32400" => _t('涓滀含骞冲¥鏃堕棿 瑗夸紛閲屽畨,鎽╅箍鍔犵兢宀 (GMT +9)'), + "36000" => _t('鎮夊凹鍏冲矝鏃堕棿 濉旀柉椹凹浜氬矝,鏂板嚑鍐呬簹 (GMT +10)'), + "39600" => _t('鎵缃楅棬缇ゅ矝 搴撻〉宀 (GMT +11)'), + "43200" => _t('鎯犵伒椤挎椂闂 鏂拌タ鍏,鏂愭祹缇ゅ矝 (GMT +12)'), + "-3600" => _t('浣涘痉灏旂兢宀 浜氶熷皵缇ゅ矝,钁″睘鍑犲唴浜 (GMT -1)'), + "-7200" => _t('澶цタ娲嬩腑閮ㄦ椂闂 鏍奸櫟鍏 (GMT -2)'), + "-10800" => _t('甯冨疁璇烘柉鑹惧埄鏂 涔屾媺鍦,娉曞睘鍦簹閭 (GMT -3)'), + "-14400" => _t('鏅哄埄宸磋タ 濮斿唴鐟炴媺,鐜诲埄缁翠簹 (GMT -4)'), + "-18000" => _t('绾界害娓ュお鍗 鍙ゅ反,鍝ヤ鸡姣斾簹,鐗欎拱鍔 (GMT -5)'), + "-21600" => _t('澧ㄨタ鍝ュ煄鏃堕棿 娲兘鎷夋柉,鍗卞湴椹媺,鍝ユ柉杈鹃粠鍔 (GMT -6)'), + "-25200" => _t('缇庡浗涓逛經鏃堕棿 (GMT -7)'), + "-28800" => _t('缇庡浗鏃ч噾灞辨椂闂 (GMT -8)'), + "-32400" => _t('闃挎媺鏂姞鏃堕棿 (GMT -9)'), + "-36000" => _t('澶忓▉澶风兢宀 (GMT -10)'), + "-39600" => _t('涓滆惃鎽╀簹缇ゅ矝 (GMT -11)'), + "-43200" => _t('鑹惧凹濞佹墭鍏嬪矝 (GMT -12)') + ); + + $timezone = new Typecho_Widget_Helper_Form_Element_Select('timezone', $timezoneList, $this->options->timezone, _t('鏃跺尯')); + $form->addInput($timezone); + + /** 鎵╁睍鍚 */ + $attachmentTypesOptionsResult = (NULL != trim($this->options->attachmentTypes)) ? + array_map('trim', explode(',', $this->options->attachmentTypes)) : array(); + $attachmentTypesOptionsValue = array(); + + if (in_array('@image@', $attachmentTypesOptionsResult)) { + $attachmentTypesOptionsValue[] = '@image@'; + } + + if (in_array('@media@', $attachmentTypesOptionsResult)) { + $attachmentTypesOptionsValue[] = '@media@'; + } + + if (in_array('@doc@', $attachmentTypesOptionsResult)) { + $attachmentTypesOptionsValue[] = '@doc@'; + } + + $attachmentTypesOther = array_diff($attachmentTypesOptionsResult, $attachmentTypesOptionsValue); + $attachmentTypesOtherValue = ''; + if (!empty($attachmentTypesOther)) { + $attachmentTypesOptionsValue[] = '@other@'; + $attachmentTypesOtherValue = implode(',', $attachmentTypesOther); + } + + $attachmentTypesOptions = array( + '@image@' => _t('鍥剧墖鏂囦欢') . ' <code>(gif jpg jpeg png tiff bmp)</code>', + '@media@' => _t('澶氬獟浣撴枃浠') . ' <code>(mp3 wmv wma rmvb rm avi flv)</code>', + '@doc@' => _t('甯哥敤妗f鏂囦欢') . ' <code>(txt doc docx xls xlsx ppt pptx zip rar pdf)</code>', + '@other@' => _t('鍏朵粬鏍煎紡 %s', ' <input type="text" class="w-50 text-s mono" name="attachmentTypesOther" value="' . htmlspecialchars($attachmentTypesOtherValue) . '" />'), + ); + + $attachmentTypes = new Typecho_Widget_Helper_Form_Element_Checkbox('attachmentTypes', $attachmentTypesOptions, + $attachmentTypesOptionsValue, _t('鍏佽涓婁紶鐨勬枃浠剁被鍨'), _t('鐢ㄩ楀彿 "," 灏嗗悗缂鍚嶉殧寮, 渚嬪: %s', '<code>cpp, h, mak</code>')); + $form->addInput($attachmentTypes->multiMode()); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 杩囨护鎺夊彲鎵ц鐨勫悗缂鍚 + * + * @param string $ext + * @return boolean + */ + public function removeShell($ext) + { + return !preg_match("/^(php|php4|php5|sh|asp|jsp|rb|py|pl|dll|exe|bat)$/i", $ext); + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateGeneralSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + $this->response->goBack(); + } + + $settings = $this->request->from('title','description', 'keywords', 'allowRegister', 'lang', 'timezone'); + $settings['attachmentTypes'] = $this->request->getArray('attachmentTypes'); + + if (!defined('__TYPECHO_SITE_URL__')) { + $settings['siteUrl'] = rtrim($this->request->siteUrl, '/'); + } + + $attachmentTypes = array(); + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@image@')) { + $attachmentTypes[] = '@image@'; + } + + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@media@')) { + $attachmentTypes[] = '@media@'; + } + + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@doc@')) { + $attachmentTypes[] = '@doc@'; + } + + $attachmentTypesOther = $this->request->filter('trim', 'strtolower')->attachmentTypesOther; + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@other@') && !empty($attachmentTypesOther)) { + $types = implode(',', array_filter(array_map('trim', + explode(',', $attachmentTypesOther)), array($this, 'removeShell'))); + + if (!empty($types)) { + $attachmentTypes[] = $types; + } + } + + $settings['attachmentTypes'] = implode(',', $attachmentTypes); + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updateGeneralSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Permalink.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Permalink.php" new file mode 100644 index 0000000..41d3bf3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Permalink.php" @@ -0,0 +1,342 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍩烘湰璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍩烘湰璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_Permalink extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 缂栫爜鑷畾涔夌殑璺緞 + * + * @access private + * @param string $rule 寰呯紪鐮佺殑璺緞 + * @return string + */ + protected function encodeRule($rule) + { + return str_replace(array('{cid}', '{slug}', '{category}', '{directory}', '{year}', '{month}', '{day}', '{mid}'), + array('[cid:digital]', '[slug]', '[category]', '[directory:split:0]', + '[year:digital:4]', '[month:digital:2]', '[day:digital:2]', '[mid:digital]'), $rule); + } + + /** + * 瑙f瀽鑷畾涔夌殑璺緞 + * + * @access private + * @param string $rule 寰呰В鐮佺殑璺緞 + * @return string + */ + protected function decodeRule($rule) + { + return preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $rule); + } + + /** + * 妫楠岃鍒欐槸鍚﹀啿绐 + * + * @access public + * @param string $value 璺敱瑙勫垯 + * @return boolean + */ + public function checkRule($value) + { + if ('custom' != $value) { + return true; + } + + $routingTable = $this->options->routingTable; + $currentTable = array('custom' => array('url' => $this->encodeRule($this->request->customPattern))); + $parser = new Typecho_Router_Parser($currentTable); + $currentTable = $parser->parse(); + $regx = $currentTable['custom']['regx']; + + foreach ($routingTable as $key => $val) { + if ('post' != $key && 'page' != $key) { + $pathInfo = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $val['url']); + $pathInfo = str_replace(array('{cid}', '{slug}', '{category}', '{year}', '{month}', '{day}', '{', '}'), + array('123', 'hello', 'default', '2008', '08', '08', '', ''), $pathInfo); + + if (preg_match($regx, $pathInfo)) { + return false; + } + } + } + + return true; + } + + /** + * 妫鏌agePattern閲屾槸鍚﹀惈鏈夊繀瑕佸弬鏁 + * + * @param mixed $value + * @access public + * @return void + */ + public function checkPagePattern($value) + { + return strpos($value, '{slug}') !== false || strpos($value, '{cid}') !== false; + } + + /** + * 妫鏌ategoryPattern閲屾槸鍚﹀惈鏈夊繀瑕佸弬鏁 + * + * @param mixed $value + * @access public + * @return void + */ + public function checkCategoryPattern($value) + { + return strpos($value, '{slug}') !== false || strpos($value, '{mid}') !== false || strpos($value, '{directory}') !== false; + } + + /** + * 妫娴嬫槸鍚﹀彲浠ewrite + * + * @access public + * @param string $value 鏄惁鎵撳紑rewrite + * @return void + */ + public function checkRewrite($value) + { + if ($value) { + $this->user->pass('administrator'); + + /** 棣栧厛鐩存帴璇锋眰杩滅▼鍦板潃楠岃瘉 */ + $client = Typecho_Http_Client::get(); + $hasWrote = false; + + if (!file_exists(__TYPECHO_ROOT_DIR__ . '/.htaccess') + && !Typecho_Common::isAppEngine()) { + if (is_writeable(__TYPECHO_ROOT_DIR__)) { + $parsed = parse_url($this->options->siteUrl); + $basePath = empty($parsed['path']) ? '/' : $parsed['path']; + $basePath = rtrim($basePath, '/') . '/'; + + $hasWrote = file_put_contents(__TYPECHO_ROOT_DIR__ . '/.htaccess', "<IfModule mod_rewrite.c> +RewriteEngine On +RewriteBase {$basePath} +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ {$basePath}index.php/$1 [L] +</IfModule>"); + } + } + + try { + if ($client) { + /** 鍙戦佷竴涓猺ewrite鍦板潃璇锋眰 */ + $client->setData(array('do' => 'remoteCallback')) + ->setHeader('User-Agent', $this->options->generator) + ->send(Typecho_Common::url('/action/ajax', $this->options->siteUrl)); + + if (200 == $client->getResponseStatus() && 'OK' == $client->getResponseBody()) { + return true; + } + } + + if (false !== $hasWrote) { + @unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + + //澧炲己鍏煎鎬,浣跨敤wordpress鐨剅edirect寮弐ewrite瑙勫垯,铏界劧鏁堢巼鏈夌偣鍦颁笅,浣嗘槸瀵筬astcgi妯″紡鍏煎鎬ц緝濂 + $hasWrote = file_put_contents(__TYPECHO_ROOT_DIR__ . '/.htaccess', "<IfModule mod_rewrite.c> +RewriteEngine On +RewriteBase {$basePath} +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . {$basePath}index.php [L] +</IfModule>"); + + //鍐嶆杩涜楠岃瘉 + $client = Typecho_Http_Client::get(); + + if ($client) { + /** 鍙戦佷竴涓猺ewrite鍦板潃璇锋眰 */ + $client->setData(array('do' => 'remoteCallback')) + ->setHeader('User-Agent', $this->options->generator) + ->send(Typecho_Common::url('/action/ajax', $this->options->siteUrl)); + + if (200 == $client->getResponseStatus() && 'OK' == $client->getResponseBody()) { + return true; + } + } + + unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + } + } catch (Typecho_Http_Client_Exception $e) { + if (false !== $hasWrote) { + @unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + } + return false; + } + + return false; + } else if (file_exists(__TYPECHO_ROOT_DIR__ . '/.htaccess')) { + @unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + } + + return true; + } + + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getRootUrl('index.php/action/options-permalink'), + Typecho_Widget_Helper_Form::POST_METHOD); + + if (!defined('__TYPECHO_REWRITE__')) { + /** 鏄惁浣跨敤鍦板潃閲嶅啓鍔熻兘 */ + $rewrite = new Typecho_Widget_Helper_Form_Element_Radio('rewrite', array('0' => _t('涓嶅惎鐢'), '1' => _t('鍚敤')), + $this->options->rewrite, _t('鏄惁浣跨敤鍦板潃閲嶅啓鍔熻兘'), _t('鍦板潃閲嶅啓鍗 rewrite 鍔熻兘鏄煇浜涙湇鍔″櫒杞欢鎻愪緵鐨勪紭鍖栧唴閮ㄨ繛鎺ョ殑鍔熻兘.') . '<br />' + . _t('鎵撳紑姝ゅ姛鑳藉彲浠ヨ浣犵殑閾炬帴鐪嬩笂鍘诲畬鍏ㄦ槸闈欐佸湴鍧.')); + + // disable rewrite check when rewrite opened + if (!$this->options->rewrite && !$this->request->is('enableRewriteAnyway=1')) { + $errorStr = _t('閲嶅啓鍔熻兘妫娴嬪け璐, 璇锋鏌ヤ綘鐨勬湇鍔″櫒璁剧疆'); + + /** 濡傛灉鏄痑pache鏈嶅姟鍣, 鍙兘瀛樺湪鏃犳硶鍐欏叆.htaccess鏂囦欢鐨勭幇璞 */ + if (((isset($_SERVER['SERVER_SOFTWARE']) && false !== strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache')) + || function_exists('apache_get_version')) && !file_exists(__TYPECHO_ROOT_DIR__ . '/.htaccess') + && !is_writeable(__TYPECHO_ROOT_DIR__)) { + $errorStr .= '<br /><strong>' . _t('鎴戜滑妫娴嬪埌浣犱娇鐢ㄤ簡apache鏈嶅姟鍣, 浣嗘槸绋嬪簭鏃犳硶鍦ㄦ牴鐩綍鍒涘缓.htaccess鏂囦欢, 杩欏彲鑳芥槸浜х敓杩欎釜閿欒鐨勫師鍥.') + . _t('璇疯皟鏁翠綘鐨勭洰褰曟潈闄, 鎴栬呮墜鍔ㄥ垱寤轰竴涓.htaccess鏂囦欢.') . '</strong>'; + } + + $errorStr .= '<br /><input type="checkbox" name="enableRewriteAnyway" id="enableRewriteAnyway" value="1" />' + . ' <label for="enableRewriteAnyway">' . _t('濡傛灉浣犱粛鐒舵兂鍚敤姝ゅ姛鑳, 璇峰嬀閫夎繖閲') . '</label>'; + $rewrite->addRule(array($this, 'checkRewrite'), $errorStr); + } + + $form->addInput($rewrite); + } + + $patterns = array('/archives/[cid:digital]/' => _t('榛樿椋庢牸') . ' <code>/archives/{cid}/</code>', + '/archives/[slug].html' => _t('wordpress椋庢牸') . ' <code>/archives/{slug}.html</code>', + '/[year:digital:4]/[month:digital:2]/[day:digital:2]/[slug].html' => _t('鎸夋棩鏈熷綊妗') . ' <code>/archives/{year}/{month}/{day}/{slug}.html</code>', + '/[category]/[slug].html' => _t('鎸夊垎绫诲綊妗') . ' <code>/{category}/{slug}.html</code>'); + + /** 鑷畾涔夋枃绔犺矾寰 */ + $postPatternValue = $this->options->routingTable['post']['url']; + + /** 澧炲姞涓у寲璺緞 */ + $customPatternValue = NULL; + if (isset($this->request->__typecho_form_item_postPattern)) { + $customPatternValue = $this->request->__typecho_form_item_postPattern; + Typecho_Cookie::delete('__typecho_form_item_postPattern'); + } else if (!isset($patterns[$postPatternValue])) { + $customPatternValue = $this->decodeRule($postPatternValue); + } + $patterns['custom'] = _t('涓у寲瀹氫箟') . ' <input type="text" class="w-50 text-s mono" name="customPattern" value="' . $customPatternValue . '" />'; + + $postPattern = new Typecho_Widget_Helper_Form_Element_Radio('postPattern', $patterns, + $postPatternValue, _t('鑷畾涔夋枃绔犺矾寰'), _t('鍙敤鍙傛暟: <code>{cid}</code> 鏃ュ織 ID, <code>{slug}</code> 鏃ュ織缂╃暐鍚, <code>{category}</code> 鍒嗙被, <code>{directory}</code> 澶氱骇鍒嗙被, <code>{year}</code> 骞, <code>{month}</code> 鏈, <code>{day}</code> 鏃') + . '<br />' . _t('閫夋嫨涓绉嶅悎閫傜殑鏂囩珷闈欐佽矾寰勯鏍, 浣垮緱浣犵殑缃戠珯閾炬帴鏇村姞鍙嬪ソ.') + . '<br />' . _t('涓鏃︿綘閫夋嫨浜嗘煇绉嶉摼鎺ラ鏍艰涓嶈杞绘槗淇敼瀹.')); + if ($customPatternValue) { + $postPattern->value('custom'); + } + $form->addInput($postPattern->multiMode()); + + /** 鐙珛椤甸潰鍚庣紑鍚 */ + $pagePattern = new Typecho_Widget_Helper_Form_Element_Text('pagePattern', NULL, $this->decodeRule($this->options->routingTable['page']['url']), _t('鐙珛椤甸潰璺緞'), _t('鍙敤鍙傛暟: <code>{cid}</code> 椤甸潰 ID, <code>{slug}</code> 椤甸潰缂╃暐鍚') + . '<br />' . _t('璇峰湪璺緞涓嚦灏戝寘鍚笂杩扮殑涓椤瑰弬鏁.')); + $pagePattern->input->setAttribute('class', 'mono w-60'); + $form->addInput($pagePattern->addRule(array($this, 'checkPagePattern'), _t('鐙珛椤甸潰璺緞涓病鏈夊寘鍚 {cid} 鎴栬 {slug} '))); + + /** 鍒嗙被椤甸潰 */ + $categoryPattern = new Typecho_Widget_Helper_Form_Element_Text('categoryPattern', NULL, $this->decodeRule($this->options->routingTable['category']['url']), _t('鍒嗙被璺緞'), _t('鍙敤鍙傛暟: <code>{mid}</code> 鍒嗙被 ID, <code>{slug}</code> 鍒嗙被缂╃暐鍚, <code>{directory}</code> 澶氱骇鍒嗙被') + . '<br />' . _t('璇峰湪璺緞涓嚦灏戝寘鍚笂杩扮殑涓椤瑰弬鏁.')); + $categoryPattern->input->setAttribute('class', 'mono w-60'); + $form->addInput($categoryPattern->addRule(array($this, 'checkCategoryPattern'), _t('鍒嗙被璺緞涓病鏈夊寘鍚 {mid} 鎴栬 {slug} '))); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updatePermalinkSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + Typecho_Cookie::set('__typecho_form_item_postPattern', $this->request->customPattern); + $this->response->goBack(); + } + + $patternValid = $this->checkRule($this->request->postPattern); + + /** 瑙f瀽url pattern */ + if ('custom' == $this->request->postPattern) { + $this->request->postPattern = '/' . ltrim($this->encodeRule($this->request->customPattern), '/'); + } + + $settings = defined('__TYPECHO_REWRITE__') ? array() : $this->request->from('rewrite'); + if (isset($this->request->postPattern) && isset($this->request->pagePattern)) { + $routingTable = $this->options->routingTable; + $routingTable['post']['url'] = $this->request->postPattern; + $routingTable['page']['url'] = '/' . ltrim($this->encodeRule($this->request->pagePattern), '/'); + $routingTable['category']['url'] = '/' . ltrim($this->encodeRule($this->request->categoryPattern), '/'); + $routingTable['category_page']['url'] = rtrim($routingTable['category']['url'], '/') . '/[page:digital]/'; + + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $settings['routingTable'] = serialize($routingTable); + } + + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + if ($patternValid) { + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t("鑷畾涔夐摼鎺ヤ笌鐜版湁瑙勫垯瀛樺湪鍐茬獊! 瀹冨彲鑳藉奖鍝嶈В鏋愭晥鐜, 寤鸿浣犻噸鏂板垎閰嶄竴涓鍒."), 'notice'); + } + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updatePermalinkSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Reading.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Reading.php" new file mode 100644 index 0000000..589422c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Options/Reading.php" @@ -0,0 +1,219 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囩珷闃呰璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囩珷闃呰璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_Reading extends Widget_Options_Permalink +{ + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/options-reading'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鏂囩珷鏃ユ湡鏍煎紡 */ + $postDateFormat = new Typecho_Widget_Helper_Form_Element_Text('postDateFormat', NULL, $this->options->postDateFormat, + _t('鏂囩珷鏃ユ湡鏍煎紡'), _t('姝ゆ牸寮忕敤浜庢寚瀹氭樉绀哄湪鏂囩珷褰掓。涓殑鏃ユ湡榛樿鏄剧ず鏍煎紡.') . '<br />' + . _t('鍦ㄦ煇浜涗富棰樹腑杩欎釜鏍煎紡鍙兘涓嶄細鐢熸晥, 鍥犱负涓婚浣滆呭彲浠ヨ嚜瀹氫箟鏃ユ湡鏍煎紡.') . '<br />' + . _t('璇峰弬鑰 <a href="http://www.php.net/manual/zh/function.date.php">PHP 鏃ユ湡鏍煎紡鍐欐硶</a>.')); + $postDateFormat->input->setAttribute('class', 'w-40 mono'); + $form->addInput($postDateFormat->addRule('xssCheck', _t('璇蜂笉瑕佸湪鏃ユ湡鏍煎紡涓娇鐢ㄧ壒娈婂瓧绗'))); + + //棣栭〉鏄剧ず + $frontPageParts = explode(':', $this->options->frontPage); + $frontPageType = $frontPageParts[0]; + $frontPageValue = count($frontPageParts) > 1 ? $frontPageParts[1] : ''; + + $frontPageOptions = array( + 'recent' => _t('鏄剧ず鏈鏂板彂甯冪殑鏂囩珷') + ); + + $frontPattern = '</label></span><span class="multiline front-archive%class%">' + . '<input type="checkbox" id="frontArchive" name="frontArchive" value="1"' + . ($this->options->frontArchive && 'recent' != $frontPageType ? ' checked' : '') .' /> +<label for="frontArchive">' . _t('鍚屾椂灏嗘枃绔犲垪琛ㄩ〉璺緞鏇存敼涓 %s', + '<input type="text" name="archivePattern" class="w-20 mono" value="' + . htmlspecialchars($this->decodeRule($this->options->routingTable['archive']['url'])) . '" />') + . '</label>'; + + // 椤甸潰鍒楄〃 + $pages = $this->db->fetchAll($this->db->select('cid', 'title') + ->from('table.contents')->where('type = ?', 'page') + ->where('status = ?', 'publish')->where('created < ?', $this->options->gmtTime)); + + if (!empty($pages)) { + $pagesSelect = '<select name="frontPagePage" id="frontPage-frontPagePage">'; + foreach ($pages as $page) { + $selected = ''; + if ('page' == $frontPageType && $page['cid'] == $frontPageValue) { + $selected = ' selected="true"'; + } + + $pagesSelect .= '<option value="' . $page['cid'] . '"' . $selected + . '>' . $page['title'] . '</option>'; + } + $pagesSelect .= '</select>'; + $frontPageOptions['page'] = _t('浣跨敤 %s 椤甸潰浣滀负棣栭〉', '</label>' . $pagesSelect . '<label for="frontPage-frontPagePage">'); + $selectedFrontPageType = 'page'; + } + + // 鑷畾涔夋枃浠跺垪琛 + $files = glob($this->options->themeFile($this->options->theme, '*.php')); + $filesSelect = ''; + + foreach ($files as $file) { + $info = Typecho_Plugin::parseInfo($file); + $file = basename($file); + + if ('index.php' != $file && 'index' == $info['title']) { + $selected = ''; + if ('file' == $frontPageType && $file == $frontPageValue) { + $selected = ' selected="true"'; + } + + $filesSelect .= '<option value="' . $file . '"' . $selected + . '>' . $file . '</option>'; + } + } + + if (!empty($filesSelect)) { + $frontPageOptions['file'] = _t('鐩存帴璋冪敤 %s 妯℃澘鏂囦欢', + '</label><select name="frontPageFile" id="frontPage-frontPageFile">' + . $filesSelect . '</select><label for="frontPage-frontPageFile">'); + $selectedFrontPageType = 'file'; + } + + if (isset($frontPageOptions[$frontPageType]) && 'recent' != $frontPageType && isset($selectedFrontPageType)) { + $selectedFrontPageType = $frontPageType; + $frontPattern = str_replace('%class%', '', $frontPattern); + } + + if (isset($selectedFrontPageType)) { + $frontPattern = str_replace('%class%', ' hidden', $frontPattern); + $frontPageOptions[$selectedFrontPageType] .= $frontPattern; + } + + $frontPage = new Typecho_Widget_Helper_Form_Element_Radio('frontPage', $frontPageOptions, + $frontPageType, _t('绔欑偣棣栭〉')); + $form->addInput($frontPage->multiMode()); + + /** 鏂囩珷鍒楄〃鏁扮洰 */ + $postsListSize = new Typecho_Widget_Helper_Form_Element_Text('postsListSize', NULL, $this->options->postsListSize, + _t('鏂囩珷鍒楄〃鏁扮洰'), _t('姝ゆ暟鐩敤浜庢寚瀹氭樉绀哄湪渚ц竟鏍忎腑鐨勬枃绔犲垪琛ㄦ暟鐩.')); + $postsListSize->input->setAttribute('class', 'w-20'); + $form->addInput($postsListSize->addRule('isInteger', _t('璇峰~鍏ヤ竴涓暟瀛'))); + + /** 姣忛〉鏂囩珷鏁扮洰 */ + $pageSize = new Typecho_Widget_Helper_Form_Element_Text('pageSize', NULL, $this->options->pageSize, + _t('姣忛〉鏂囩珷鏁扮洰'), _t('姝ゆ暟鐩敤浜庢寚瀹氭枃绔犲綊妗h緭鍑烘椂姣忛〉鏄剧ず鐨勬枃绔犳暟鐩.')); + $pageSize->input->setAttribute('class', 'w-20'); + $form->addInput($pageSize->addRule('isInteger', _t('璇峰~鍏ヤ竴涓暟瀛'))); + + /** FEED鍏ㄦ枃杈撳嚭 */ + $feedFullText = new Typecho_Widget_Helper_Form_Element_Radio('feedFullText', array('0' => _t('浠呰緭鍑烘憳瑕'), '1' => _t('鍏ㄦ枃杈撳嚭')), + $this->options->feedFullText, _t('鑱氬悎鍏ㄦ枃杈撳嚭'), _t('濡傛灉浣犱笉甯屾湜鍦ㄨ仛鍚堜腑杈撳嚭鏂囩珷鍏ㄦ枃,璇蜂娇鐢ㄤ粎杈撳嚭鎽樿閫夐」.') . '<br />' + . _t('鎽樿鐨勬枃瀛楀彇鍐充簬浣犲湪鏂囩珷涓娇鐢ㄥ垎闅旂鐨勪綅缃.')); + $form->addInput($feedFullText); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateReadingSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + $this->response->goBack(); + } + + $settings = $this->request->from('postDateFormat', 'frontPage', 'frontArchive', 'pageSize', 'postsListSize', 'feedFullText'); + + if ('page' == $settings['frontPage'] && isset($this->request->frontPagePage) && + $this->db->fetchRow($this->db->select('cid') + ->from('table.contents')->where('type = ?', 'page') + ->where('status = ?', 'publish')->where('created < ?', $this->options->gmtTime) + ->where('cid = ?', $pageId = intval($this->request->frontPagePage)))) { + + $settings['frontPage'] = 'page:' . $pageId; + + } else if ('file' == $settings['frontPage'] && isset($this->request->frontPageFile) && + file_exists(__TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_THEME_DIR__ . '/' . $this->options->theme . '/' . + ($file = trim($this->request->frontPageFile, " ./\\")))) { + + $settings['frontPage'] = 'file:' . $file; + + } else { + $settings['frontPage'] = 'recent'; + } + + if ('recent' != $settings['frontPage']) { + $settings['frontArchive'] = empty($settings['frontArchive']) ? 0 : 1; + if ($settings['frontArchive']) { + $routingTable = $this->options->routingTable; + $routingTable['archive']['url'] = '/' . ltrim($this->encodeRule($this->request->archivePattern), '/'); + $routingTable['archive_page']['url'] = rtrim($routingTable['archive']['url'], '/') . '/page/[page:digital]/'; + + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $settings['routingTable'] = serialize($routingTable); + } + } else { + $settings['frontArchive'] = 0; + } + + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updateReadingSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Config.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Config.php" new file mode 100644 index 0000000..ffbe2d2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Config.php" @@ -0,0 +1,116 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎻掍欢閰嶇疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Plugins_Config extends Widget_Abstract_Options +{ + /** + * 鎻掍欢鏂囦欢璺緞 + * + * @access private + * @var string + */ + private $_pluginFileName; + + /** + * 鎻掍欢绫 + * + * @access private + * @var string + */ + private $_className; + + /** + * 鑾峰彇鎻掍欢淇℃伅 + * + * @access public + * @var array + */ + public $info; + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + */ + public function execute() + { + $this->user->pass('administrator'); + $config = $this->request->filter('slug')->config; + if (empty($config)) { + throw new Typecho_Widget_Exception(_t('鎻掍欢涓嶅瓨鍦'), 404); + } + + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($this->_pluginFileName, $this->_className) = Typecho_Plugin::portal($config, + $this->options->pluginDir($config)); + $this->info = Typecho_Plugin::parseInfo($this->_pluginFileName); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('璁剧疆鎻掍欢 %s', $this->info['title']); + } + + /** + * 閰嶇疆鎻掍欢 + * + * @access public + * @return Typecho_Widget_Helper_Form + * @throws Typecho_Widget_Exception + */ + public function config() + { + /** 鑾峰彇鎻掍欢鍚嶇О */ + $pluginName = $this->request->filter('slug')->config; + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (!$this->info['config'] || !isset($activatedPlugins[$pluginName])) { + throw new Typecho_Widget_Exception(_t('鏃犳硶閰嶇疆鎻掍欢'), 500); + } + + /** 杞藉叆鎻掍欢 */ + require_once $this->_pluginFileName; + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/plugins-edit?config=' . $pluginName), + Typecho_Widget_Helper_Form::POST_METHOD); + call_user_func(array($this->_className, 'config'), $form); + + $options = $this->options->plugin($pluginName); + + if (!empty($options)) { + foreach ($options as $key => $val) { + $form->getInput($key)->value($val); + } + } + + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + return $form; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Edit.php" new file mode 100644 index 0000000..45a5a98 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/Edit.php" @@ -0,0 +1,297 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鎻掍欢绠$悊 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎻掍欢绠$悊缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Plugins_Edit extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鎵嬪姩閰嶇疆鎻掍欢鍙橀噺 + * + * @param $pluginName 鎻掍欢鍚嶇О + * @param array $settings 鍙橀噺閿煎 + * @param bool $isPersonal 鏄惁涓虹浜哄彉閲 + */ + public static function configPlugin($pluginName, array $settings, $isPersonal = false) + { + $db = Typecho_Db::get(); + $pluginName = ($isPersonal ? '_' : '') . 'plugin:' . $pluginName; + + $select = $db->select()->from('table.options') + ->where('name = ?', $pluginName); + + $options = $db->fetchAll($select); + + if (empty($settings)) { + if (!empty($options)) { + $db->query($db->delete('table.options')->where('name = ?', $pluginName)); + } + } else { + if (empty($options)) { + $db->query($db->insert('table.options') + ->rows(array( + 'name' => $pluginName, + 'value' => serialize($settings), + 'user' => 0 + ))); + } else { + foreach ($options as $option) { + $value = unserialize($option['value']); + $value = array_merge($value, $settings); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($value))) + ->where('name = ?', $pluginName) + ->where('user = ?', $option['user'])); + } + } + } + } + + /** + * 鍚敤鎻掍欢 + * + * @param $pluginName + * @throws Typecho_Widget_Exception + */ + public function activate($pluginName) + { + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($pluginName, $this->options->pluginDir($pluginName)); + $info = Typecho_Plugin::parseInfo($pluginFileName); + + /** 妫娴嬩緷璧栦俊鎭 */ + list ($version, $build) = explode('/', Typecho_Common::VERSION); + if (Typecho_Plugin::checkDependence($build, $info['dependence'])) { + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + + /** 杞藉叆鎻掍欢 */ + require_once $pluginFileName; + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (isset($activatedPlugins[$pluginName]) || !class_exists($className) + || !method_exists($className, 'activate')) { + throw new Typecho_Widget_Exception(_t('鏃犳硶鍚敤鎻掍欢'), 500); + } + + try { + $result = call_user_func(array($className, 'activate')); + Typecho_Plugin::activate($pluginName); + $this->update(array('value' => serialize(Typecho_Plugin::export())), + $this->db->sql()->where('name = ?', 'plugins')); + } catch (Typecho_Plugin_Exception $e) { + /** 鎴幏寮傚父 */ + $this->widget('Widget_Notice')->set($e->getMessage(), 'error'); + $this->response->goBack(); + } + + $form = new Typecho_Widget_Helper_Form(); + call_user_func(array($className, 'config'), $form); + + $personalForm = new Typecho_Widget_Helper_Form(); + call_user_func(array($className, 'personalConfig'), $personalForm); + + $options = $form->getValues(); + $personalOptions = $personalForm->getValues(); + + if ($options && !$this->configHandle($pluginName, $options, true)) { + self::configPlugin($pluginName, $options); + } + + if ($personalOptions && !$this->personalConfigHandle($className, $personalOptions)) { + self::configPlugin($pluginName, $personalOptions, true); + } + + } else { + + $result = _t('<a href="%s">%s</a> 鏃犳硶鍦ㄦ鐗堟湰鐨則ypecho涓嬫甯稿伐浣', $info['link'], $info['title']); + + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('plugin-' . $pluginName); + + if (isset($result) && is_string($result)) { + $this->widget('Widget_Notice')->set($result, 'notice'); + } else { + $this->widget('Widget_Notice')->set(_t('鎻掍欢宸茬粡琚惎鐢'), 'success'); + } + $this->response->goBack(); + } + + /** + * 绂佺敤鎻掍欢 + * + * @param $pluginName + * @throws Typecho_Widget_Exception + * @throws Exception + * @throws Typecho_Plugin_Exception + */ + public function deactivate($pluginName) + { + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + $pluginFileExist = true; + + try { + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($pluginName, $this->options->pluginDir($pluginName)); + } catch (Typecho_Plugin_Exception $e) { + $pluginFileExist = false; + + if (!isset($activatedPlugins[$pluginName])) { + throw $e; + } + } + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (!isset($activatedPlugins[$pluginName])) { + throw new Typecho_Widget_Exception(_t('鏃犳硶绂佺敤鎻掍欢'), 500); + } + + if ($pluginFileExist) { + + /** 杞藉叆鎻掍欢 */ + require_once $pluginFileName; + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (!isset($activatedPlugins[$pluginName]) || !class_exists($className) + || !method_exists($className, 'deactivate')) { + throw new Typecho_Widget_Exception(_t('鏃犳硶绂佺敤鎻掍欢'), 500); + } + + try { + $result = call_user_func(array($className, 'deactivate')); + } catch (Typecho_Plugin_Exception $e) { + /** 鎴幏寮傚父 */ + $this->widget('Widget_Notice')->set($e->getMessage(), 'error'); + $this->response->goBack(); + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('plugin-' . $pluginName); + } + + Typecho_Plugin::deactivate($pluginName); + $this->update(array('value' => serialize(Typecho_Plugin::export())), + $this->db->sql()->where('name = ?', 'plugins')); + + $this->delete($this->db->sql()->where('name = ?', 'plugin:' . $pluginName)); + $this->delete($this->db->sql()->where('name = ?', '_plugin:' . $pluginName)); + + if (isset($result) && is_string($result)) { + $this->widget('Widget_Notice')->set($result, 'notice'); + } else { + $this->widget('Widget_Notice')->set(_t('鎻掍欢宸茬粡琚鐢'), 'success'); + } + $this->response->goBack(); + } + + /** + * 閰嶇疆鎻掍欢 + * + * @param $pluginName + * @access public + * @return void + */ + public function config($pluginName) + { + $form = $this->widget('Widget_Plugins_Config')->config(); + + /** 楠岃瘉琛ㄥ崟 */ + if ($form->validate()) { + $this->response->goBack(); + } + + $settings = $form->getAllRequest(); + + if (!$this->configHandle($pluginName, $settings, false)) { + self::configPlugin($pluginName, $settings); + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('plugin-' . $pluginName); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t("鎻掍欢璁剧疆宸茬粡淇濆瓨"), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('plugins.php', $this->options->adminUrl)); + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗛厤缃俊鎭 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @param array $settings 閰嶇疆鍊 + * @param boolean $isInit 鏄惁涓哄垵濮嬪寲 + * @return boolean + */ + public function configHandle($pluginName, array $settings, $isInit) + { + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($pluginName, $this->options->pluginDir($pluginName)); + + if (method_exists($className, 'configHandle')) { + call_user_func(array($className, 'configHandle'), $settings, $isInit); + return true; + } + + return false; + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗚嚜瀹氫箟閰嶇疆淇℃伅 + * + * @access public + * @param string $className 绫诲悕 + * @param array $settings 閰嶇疆鍊 + * @return boolean + */ + public function personalConfigHandle($className, array $settings) + { + if (method_exists($className, 'personalConfigHandle')) { + call_user_func(array($className, 'personalConfigHandle'), $settings, true); + return true; + } + + return false; + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->is('activate'))->activate($this->request->filter('slug')->activate); + $this->on($this->request->is('deactivate'))->deactivate($this->request->filter('slug')->deactivate); + $this->on($this->request->is('config'))->config($this->request->filter('slug')->config); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/List.php" new file mode 100644 index 0000000..d57f803 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Plugins/List.php" @@ -0,0 +1,116 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎻掍欢鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Plugins_List extends Typecho_Widget +{ + /** + * 宸插惎鐢ㄦ彃浠 + * + * @access public + * @var array + */ + public $activatedPlugins = array(); + + /** + * @return array + */ + protected function getPlugins() + { + return glob(__TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__ . '/*'); + } + + /** + * @param string $plugin + * @param string $index + * @return array|null + */ + protected function getPlugin($plugin, $index) + { + if (is_dir($plugin)) { + /** 鑾峰彇鎻掍欢鍚嶇О */ + $pluginName = basename($plugin); + + /** 鑾峰彇鎻掍欢涓绘枃浠 */ + $pluginFileName = $plugin . '/Plugin.php'; + } else if (file_exists($plugin) && 'index.php' != basename($plugin)) { + $pluginFileName = $plugin; + $part = explode('.', basename($plugin)); + if (2 == count($part) && 'php' == $part[1]) { + $pluginName = $part[0]; + } else { + return NULL; + } + } else { + return NULL; + } + + return array($pluginName, $pluginFileName); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 鍒楀嚭鎻掍欢鐩綍 */ + $pluginDirs = $this->getPlugins(); + $this->parameter->setDefault(array('activated' => NULL)); + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $this->activatedPlugins = $plugins['activated']; + + if (!empty($pluginDirs)) { + foreach ($pluginDirs as $key => $pluginDir) { + $parts = $this->getPlugin($pluginDir, $key); + if (empty($parts)) { + continue; + } + + list ($pluginName, $pluginFileName) = $parts; + + if (file_exists($pluginFileName)) { + $info = Typecho_Plugin::parseInfo($pluginFileName); + $info['name'] = $pluginName; + + list ($version, $build) = explode('/', Typecho_Common::VERSION); + $info['dependence'] = Typecho_Plugin::checkDependence($build, $info['dependence']); + + /** 榛樿鍗虫彃鍗崇敤 */ + $info['activated'] = true; + + if ($info['activate'] || $info['deactivate'] || $info['config'] || $info['personalConfig']) { + $info['activated'] = isset($this->activatedPlugins[$pluginName]); + + if (isset($this->activatedPlugins[$pluginName])) { + unset($this->activatedPlugins[$pluginName]); + } + } + + if ($info['activated'] == $this->parameter->activated) { + $this->push($info); + } + } + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Register.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Register.php" new file mode 100644 index 0000000..057afa2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Register.php" @@ -0,0 +1,88 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 娉ㄥ唽缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Register extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + // protect + $this->security->protect(); + + /** 濡傛灉宸茬粡鐧诲綍 */ + if ($this->user->hasLogin() || !$this->options->allowRegister) { + /** 鐩存帴杩斿洖 */ + $this->response->redirect($this->options->index); + } + + /** 鍒濆鍖栭獙璇佺被 */ + $validator = new Typecho_Validate(); + $validator->addRule('name', 'required', _t('蹇呴』濉啓鐢ㄦ埛鍚嶇О')); + $validator->addRule('name', 'minLength', _t('鐢ㄦ埛鍚嶈嚦灏戝寘鍚2涓瓧绗'), 2); + $validator->addRule('name', 'maxLength', _t('鐢ㄦ埛鍚嶆渶澶氬寘鍚32涓瓧绗'), 32); + $validator->addRule('name', 'xssCheck', _t('璇蜂笉瑕佸湪鐢ㄦ埛鍚嶄腑浣跨敤鐗规畩瀛楃')); + $validator->addRule('name', array($this, 'nameExists'), _t('鐢ㄦ埛鍚嶅凡缁忓瓨鍦')); + $validator->addRule('mail', 'required', _t('蹇呴』濉啓鐢靛瓙閭')); + $validator->addRule('mail', array($this, 'mailExists'), _t('鐢靛瓙閭鍦板潃宸茬粡瀛樺湪')); + $validator->addRule('mail', 'email', _t('鐢靛瓙閭鏍煎紡閿欒')); + $validator->addRule('mail', 'maxLength', _t('鐢靛瓙閭鏈澶氬寘鍚200涓瓧绗'), 200); + + /** 濡傛灉璇锋眰涓湁password */ + if (array_key_exists('password', $_REQUEST)) { + $validator->addRule('password', 'required', _t('蹇呴』濉啓瀵嗙爜')); + $validator->addRule('password', 'minLength', _t('涓轰簡淇濊瘉璐︽埛瀹夊叏, 璇疯緭鍏ヨ嚦灏戝叚浣嶇殑瀵嗙爜'), 6); + $validator->addRule('password', 'maxLength', _t('涓轰簡渚夸簬璁板繂, 瀵嗙爜闀垮害璇蜂笉瑕佽秴杩囧崄鍏綅'), 18); + $validator->addRule('confirm', 'confirm', _t('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓鑷'), 'password'); + } + + /** 鎴幏楠岃瘉寮傚父 */ + if ($error = $validator->run($this->request->from('name', 'password', 'mail', 'confirm'))) { + Typecho_Cookie::set('__typecho_remember_name', $this->request->name); + Typecho_Cookie::set('__typecho_remember_mail', $this->request->mail); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($error); + $this->response->goBack(); + } + + $hasher = new PasswordHash(8, true); + $generatedPassword = Typecho_Common::randString(7); + + $dataStruct = array( + 'name' => $this->request->name, + 'mail' => $this->request->mail, + 'screenName'=> $this->request->name, + 'password' => $hasher->HashPassword($generatedPassword), + 'created' => $this->options->gmtTime, + 'group' => 'subscriber' + ); + + $dataStruct = $this->pluginHandle()->register($dataStruct); + + $insertId = $this->insert($dataStruct); + $this->db->fetchRow($this->select()->where('uid = ?', $insertId) + ->limit(1), array($this, 'push')); + + $this->pluginHandle()->finishRegister($this); + + $this->user->login($this->request->name, $generatedPassword); + + Typecho_Cookie::delete('__typecho_first_run'); + Typecho_Cookie::delete('__typecho_remember_name'); + Typecho_Cookie::delete('__typecho_remember_mail'); + + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛 <strong>%s</strong> 宸茬粡鎴愬姛娉ㄥ唽, 瀵嗙爜涓 <strong>%s</strong>', $this->screenName, $generatedPassword), 'success'); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Security.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Security.php" new file mode 100644 index 0000000..e1562e8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Security.php" @@ -0,0 +1,135 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * 瀹夊叏閫夐」缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2014 Typecho team (http://typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Security extends Typecho_Widget +{ + /** + * @var string + */ + private $_token; + + /** + * @var Widget_Options + */ + private $_options; + + /** + * 鍒濆鍖栧嚱鏁 + * + */ + public function execute() + { + $this->_options = $this->widget('Widget_Options'); + $user = $this->widget('Widget_User'); + + $this->_token = $this->_options->secret; + if ($user->hasLogin()) { + $this->_token .= '&' . $user->authCode . '&' . $user->uid; + } + } + + /** + * 鑾峰彇token + * + * @param string $suffix 鍚庣紑 + * @return string + */ + public function getToken($suffix) + { + return md5($this->_token . '&' . $suffix); + } + + /** + * 鐢熸垚甯oken鐨勮矾寰 + * + * @param $path + * @return string + */ + public function getTokenUrl($path) + { + $parts = parse_url($path); + $params = array(); + + if (!empty($parts['query'])) { + parse_str($parts['query'], $params); + } + + $params['_'] = $this->getToken($this->request->getRequestUrl()); + $parts['query'] = http_build_query($params); + + return Typecho_Common::buildUrl($parts); + } + + /** + * 淇濇姢鎻愪氦鏁版嵁 + * + */ + public function protect() + { + if ($this->request->get('_') != $this->getToken($this->request->getReferer())) { + $this->response->goBack(); + } + } + + /** + * 鑾峰彇瀹夊叏鐨勫悗鍙拌矾寰 + * + * @param string $path + * @return string + */ + public function getAdminUrl($path) + { + return Typecho_Common::url($this->getTokenUrl($path), $this->_options->adminUrl); + } + + /** + * 鑾峰彇瀹夊叏鐨勮矾鐢辫矾寰 + * + * @param $path + * @return string + */ + public function getIndex($path) + { + return Typecho_Common::url($this->getTokenUrl($path), $this->_options->index); + } + + /** + * 鑾峰彇缁濆璺敱璺緞 + * + * @param $path + * @return string + */ + public function getRootUrl($path) + { + return Typecho_Common::url($this->getTokenUrl($path), $this->_options->rootUrl); + } + + /** + * 杈撳嚭鍚庡彴瀹夊叏璺緞 + * + * @param $path + */ + public function adminUrl($path) + { + echo $this->getAdminUrl($path); + } + + /** + * 杈撳嚭瀹夊叏鐨勮矾鐢辫矾寰 + * + * @param $path + */ + public function index($path) + { + echo $this->getIndex($path); + } +} + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Service.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Service.php" new file mode 100644 index 0000000..ff291ac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Service.php" @@ -0,0 +1,162 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 閫氱敤寮傛鏈嶅姟 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 閫氱敤寮傛鏈嶅姟缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Service extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鍙戦乸ingback瀹炵幇 + * + * @access public + * @return void + */ + public function sendPingHandle() + { + /** 楠岃瘉鏉冮檺 */ + $this->user->pass('contributor'); + + /** 蹇界暐瓒呮椂 */ + ignore_user_abort(true); + + /** 鑾峰彇post */ + $post = $this->widget('Widget_Archive', "type=post", "cid={$this->request->cid}"); + + if ($post->have() && preg_match_all("|<a[^>]*href=[\"'](.*?)[\"'][^>]*>(.*?)</a>|", $post->text, $matches)) { + $links = array_unique($matches[1]); + $permalinkPart = parse_url($post->permalink); + + /** 鍙戦乸ingback */ + foreach ($links as $url) { + $urlPart = parse_url($url); + + if (isset($urlPart['scheme'])) { + if ('http' != $urlPart['scheme'] || 'https' != $urlPart['scheme']) { + continue; + } + } else { + $urlPart['scheme'] = 'http'; + $url = Typecho_Common::buildUrl($urlPart); + } + + if ($permalinkPart['host'] == $urlPart['host'] && $permalinkPart['path'] == $urlPart['path']) { + continue; + } + + $spider = Typecho_Http_Client::get(); + + if ($spider) { + $spider->setTimeout(10) + ->send($url); + + if (!($xmlrpcUrl = $spider->getResponseHeader('x-pingback'))) { + if (preg_match("/<link[^>]*rel=[\"']pingback[\"'][^>]*href=[\"']([^\"']+)[\"'][^>]*>/i", + $spider->getResponseBody(), $out)) { + $xmlrpcUrl = $out[1]; + } + } + + if (!empty($xmlrpcUrl)) { + try { + $xmlrpc = new IXR_Client($xmlrpcUrl); + $xmlrpc->pingback->ping($post->permalink, $url); + unset($xmlrpc); + } catch (Exception $e) { + continue; + } + } + } + + unset($spider); + } + } + + /** 鍙戦乼rackback */ + if ($post->have() && !empty($this->request->trackback)) { + $links = $this->request->trackback; + foreach ($links as $url) { + + $client = Typecho_Http_Client::get(); + + if ($client) { + try { + $client->setTimeout(5) + ->setData(array( + 'blog_name' => $this->options->title . ' » ' . $post->title, + 'url' => $post->permalink, + 'excerpt' => $post->excerpt + )) + ->send($url); + + unset($client); + } catch (Typecho_Http_Client_Exception $e) { + continue; + } + } + + } + } + } + + /** + * 鍙戦乸ingback + * <code> + * $this->sendPingbacks(365); + * </code> + * + * @access public + * @param integer $cid 鍐呭id + * @param array $trackback trackback鐨剈rl + * @return void + */ + public function sendPing($cid, array $trackback = NULL) + { + $this->user->pass('contributor'); + + if ($client = Typecho_Http_Client::get()) { + try { + + $input = array('do' => 'ping', 'cid' => $cid); + if (!empty($trackback)) { + $input['trackback'] = $trackback; + } + + $client->setCookie('__typecho_uid', Typecho_Cookie::get('__typecho_uid')) + ->setCookie('__typecho_authCode', Typecho_Cookie::get('__typecho_authCode')) + ->setHeader('User-Agent', $this->options->generator) + ->setTimeout(3) + ->setData($input) + ->setIp('127.0.0.1') + ->send(Typecho_Common::url('/action/service', $this->options->index)); + + } catch (Typecho_Http_Client_Exception $e) { + return; + } + } + } + + /** + * 寮傛璇锋眰鍏ュ彛 + * + * @access public + * @return void + */ + public function action() + { + $this->on($this->request->is('do=ping'))->sendPingHandle(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Stat.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Stat.php" new file mode 100644 index 0000000..de3cc50 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Stat.php" @@ -0,0 +1,367 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍏ㄥ眬缁熻 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍏ㄥ眬缁熻缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Stat extends Typecho_Widget +{ + /** + * 鐢ㄦ埛瀵硅薄 + * + * @access protected + * @var Widget_User + */ + protected $user; + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->user = $this->widget('Widget_User'); + } + + /** + * 鑾峰彇宸插彂甯冪殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___publishedPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish'))->num; + } + + /** + * 鑾峰彇寰呭鏍哥殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___waitingPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'waiting'))->num; + } + + /** + * 鑾峰彇鑽夌ǹ鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___draftPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'draft'))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛宸插彂甯冪殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___myPublishedPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.authorId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛寰呭鏍告枃绔犳暟鐩 + * + * @access protected + * @return integer + */ + protected function ___myWaitingPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'waiting') + ->where('table.contents.authorId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鑽夌ǹ鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___myDraftPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'draft') + ->where('table.contents.authorId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛宸插彂甯冪殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___currentPublishedPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.authorId = ?', $this->request->filter('int')->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛寰呭鏍告枃绔犳暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentWaitingPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'waiting') + ->where('table.contents.authorId = ?', $this->request->filter('int')->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鑽夌ǹ鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___currentDraftPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'draft') + ->where('table.contents.authorId = ?', $this->request->filter('int')->uid))->num; + } + + /** + * 鑾峰彇宸插彂甯冮〉闈㈡暟鐩 + * + * @access protected + * @return integer + */ + protected function ___publishedPagesNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'page') + ->where('table.contents.status = ?', 'publish'))->num; + } + + /** + * 鑾峰彇鑽夌ǹ椤甸潰鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___draftPagesNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'page') + ->where('table.contents.status = ?', 'draft'))->num; + } + + /** + * 鑾峰彇褰撳墠鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___publishedCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'approved'))->num; + } + + /** + * 鑾峰彇褰撳墠寰呭鏍哥殑璇勮鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___waitingCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'waiting'))->num; + } + + /** + * 鑾峰彇褰撳墠鍨冨溇璇勮鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___spamCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'spam'))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___myPublishedCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'approved') + ->where('table.comments.ownerId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___myWaitingCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'waiting') + ->where('table.comments.ownerId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___mySpamCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'spam') + ->where('table.comments.ownerId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentPublishedCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'approved') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentWaitingCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'waiting') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentSpamCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'spam') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇鍒嗙被鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___categoriesNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(mid)' => 'num')) + ->from('table.metas') + ->where('table.metas.type = ?', 'category'))->num; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Config.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Config.php" new file mode 100644 index 0000000..00f9761 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Config.php" @@ -0,0 +1,84 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐨偆閰嶇疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_Config extends Widget_Abstract_Options +{ + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function execute() + { + $this->user->pass('administrator'); + + if (!self::isExists()) { + throw new Typecho_Widget_Exception(_t('澶栬閰嶇疆鍔熻兘涓嶅瓨鍦'), 404); + } + } + + /** + * 閰嶇疆鍔熻兘鏄惁瀛樺湪 + * + * @access public + * @return boolean + */ + public static function isExists() + { + $options = Typecho_Widget::widget('Widget_Options'); + $configFile = $options->themeFile($options->theme, 'functions.php'); + + if (file_exists($configFile)) { + require_once $configFile; + + if (function_exists('themeConfig')) { + return true; + } + } + + return false; + } + + /** + * 閰嶇疆澶栬 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function config() + { + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/themes-edit?config'), + Typecho_Widget_Helper_Form::POST_METHOD); + themeConfig($form); + $inputs = $form->getInputs(); + + if (!empty($inputs)) { + foreach ($inputs as $key => $val) { + $form->getInput($key)->value($this->options->{$key}); + } + } + + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + return $form; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Edit.php" new file mode 100644 index 0000000..17c1164 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Edit.php" @@ -0,0 +1,179 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫椋庢牸 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫椋庢牸缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_Edit extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鏇存崲澶栬 + * + * @access public + * @param string $theme 澶栬鍚嶇О + * @return void + * @throws Typecho_Widget_Exception + */ + public function changeTheme($theme) + { + $theme = trim($theme, './'); + if (is_dir($this->options->themeFile($theme))) { + /** 鍒犻櫎鍘熷瑙傝缃俊鎭 */ + $this->delete($this->db->sql()->where('name = ?', 'theme:' . $this->options->theme)); + + $this->update(array('value' => $theme), $this->db->sql()->where('name = ?', 'theme')); + + /** 瑙i櫎棣栭〉鍏宠仈 */ + if (0 === strpos($this->options->frontPage, 'file:')) { + $this->update(array('value' => 'recent'), $this->db->sql()->where('name = ?', 'frontPage')); + } + + $configFile = $this->options->themeFile($theme, 'functions.php'); + + if (file_exists($configFile)) { + require_once $configFile; + + if (function_exists('themeConfig')) { + $form = new Typecho_Widget_Helper_Form(); + themeConfig($form); + $options = $form->getValues(); + + if ($options && !$this->configHandle($options, true)) { + $this->insert(array( + 'name' => 'theme:' . $theme, + 'value' => serialize($options), + 'user' => 0 + )); + } + } + } + + $this->widget('Widget_Notice')->highlight('theme-' . $theme); + $this->widget('Widget_Notice')->set(_t("澶栬宸茬粡鏀瑰彉"), 'success'); + $this->response->goBack(); + } else { + throw new Typecho_Widget_Exception(_t('鎮ㄩ夋嫨鐨勯鏍间笉瀛樺湪')); + } + } + + /** + * 缂栬緫澶栬鏂囦欢 + * + * @access public + * @param string $theme 澶栬鍚嶇О + * @param string $file 鏂囦欢鍚 + * @return void + * @throws Typecho_Widget_Exception + */ + public function editThemeFile($theme, $file) + { + $path = $this->options->themeFile($theme, $file); + + if (file_exists($path) && is_writeable($path) && !Typecho_Common::isAppEngine() + && (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__)) { + $handle = fopen($path, 'wb'); + if ($handle && fwrite($handle, $this->request->content)) { + fclose($handle); + $this->widget('Widget_Notice')->set(_t("鏂囦欢 %s 鐨勬洿鏀瑰凡缁忎繚瀛", $file), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t("鏂囦欢 %s 鏃犳硶琚啓鍏", $file), 'error'); + } + $this->response->goBack(); + } else { + throw new Typecho_Widget_Exception(_t('鎮ㄧ紪杈戠殑鏂囦欢涓嶅瓨鍦')); + } + } + + /** + * 閰嶇疆澶栬 + * + * @access public + * @param string $theme 澶栬鍚 + * @return void + */ + public function config($theme) + { + // 宸茬粡杞藉叆浜嗗瑙傚嚱鏁 + $form = $this->widget('Widget_Themes_Config')->config(); + + /** 楠岃瘉琛ㄥ崟 */ + if ($form->validate()) { + $this->response->goBack(); + } + + $settings = $form->getAllRequest(); + + if (!$this->configHandle($settings, false)) { + if ($this->options->__get('theme:' . $theme)) { + $this->update(array('value' => serialize($settings)), + $this->db->sql()->where('name = ?', 'theme:' . $theme)); + } else { + $this->insert(array( + 'name' => 'theme:' . $theme, + 'value' => serialize($settings), + 'user' => 0 + )); + } + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('theme-' . $theme); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t("澶栬璁剧疆宸茬粡淇濆瓨"), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('options-theme.php', $this->options->adminUrl)); + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗛厤缃俊鎭 + * + * @access public + * @param array $settings 閰嶇疆鍊 + * @param boolean $isInit 鏄惁涓哄垵濮嬪寲 + * @return boolean + */ + public function configHandle(array $settings, $isInit) + { + if (function_exists('themeConfigHandle')) { + themeConfigHandle($settings, $isInit); + return true; + } + + return false; + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + /** 闇瑕佺鐞嗗憳鏉冮檺 */ + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->is('change'))->changeTheme($this->request->filter('slug')->change); + $this->on($this->request->is('edit&theme')) + ->editThemeFile($this->request->filter('slug')->theme, $this->request->edit); + $this->on($this->request->is('config'))->config($this->options->theme); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Files.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Files.php" new file mode 100644 index 0000000..99db3b4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/Files.php" @@ -0,0 +1,136 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 椋庢牸鏂囦欢鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 椋庢牸鏂囦欢鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_Files extends Typecho_Widget +{ + /** + * 褰撳墠椋庢牸 + * + * @access private + * @var string + */ + private $_currentTheme; + + /** + * 褰撳墠鏂囦欢 + * + * @access private + * @var string + */ + private $_currentFile; + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function execute() + { + /** 绠$悊鍛樻潈闄 */ + $this->widget('Widget_User')->pass('administrator'); + $this->_currentTheme = $this->request->filter('slug')->get('theme', $this->widget('Widget_Options')->theme); + + if (preg_match("/^([_0-9a-z-\.\ ])+$/i", $this->_currentTheme) + && is_dir($dir = $this->widget('Widget_Options')->themeFile($this->_currentTheme)) + && (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__)) { + $files = glob($dir . '/*.{php,PHP,js,JS,css,CSS,vbs,VBS}', GLOB_BRACE); + $this->_currentFile = $this->request->get('file', 'index.php'); + + if (preg_match("/^([_0-9a-z-\.\ ])+$/i", $this->_currentFile) + && file_exists($dir . '/' . $this->_currentFile)) { + foreach ($files as $file) { + if (file_exists($file)) { + $file = basename($file); + $this->push(array( + 'file' => $file, + 'theme' => $this->_currentTheme, + 'current' => ($file == $this->_currentFile) + )); + } + } + + return; + } + } + + throw new Typecho_Widget_Exception('椋庢牸鏂囦欢涓嶅瓨鍦', 404); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('缂栬緫鏂囦欢 %s', $this->_currentFile); + } + + /** + * 鑾峰彇鏂囦欢鍐呭 + * + * @access public + * @return string + */ + public function currentContent() + { + return htmlspecialchars(file_get_contents($this->widget('Widget_Options') + ->themeFile($this->_currentTheme, $this->_currentFile))); + } + + /** + * 鑾峰彇鏂囦欢鏄惁鍙 + * + * @access public + * @return string + */ + public function currentIsWriteable() + { + return is_writeable($this->widget('Widget_Options') + ->themeFile($this->_currentTheme, $this->_currentFile)) && !Typecho_Common::isAppEngine() + && (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__); + } + + /** + * 鑾峰彇褰撳墠鏂囦欢 + * + * @access public + * @return string + */ + public function currentFile() + { + return $this->_currentFile; + } + + /** + * 鑾峰彇褰撳墠椋庢牸 + * + * @access public + * @return string + */ + public function currentTheme() + { + return $this->_currentTheme; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/List.php" new file mode 100644 index 0000000..e826b03 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Themes/List.php" @@ -0,0 +1,88 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 椋庢牸鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 椋庢牸鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_List extends Typecho_Widget +{ + /** + * @return array + */ + protected function getThemes() + { + return glob(__TYPECHO_ROOT_DIR__ . __TYPECHO_THEME_DIR__ . '/*'); + } + + /** + * get theme + * + * @param string $theme + * @param mixed $index + * @return string + */ + protected function getTheme($theme, $index) + { + return basename($theme); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $themes = $this->getThemes(); + + if ($themes) { + $options = $this->widget('Widget_Options'); + $siteUrl = $options->siteUrl; + $adminUrl = $options->adminUrl; + $activated = 0; + $result = array(); + + foreach ($themes as $key => $theme) { + $themeFile = $theme . '/index.php'; + if (file_exists($themeFile)) { + $info = Typecho_Plugin::parseInfo($themeFile); + $info['name'] = $this->getTheme($theme, $key); + + if ($info['activated'] = ($options->theme == $info['name'])) { + $activated = $key; + } + + $screen = glob($theme . '/screen*.{jpg,png,gif,bmp,jpeg,JPG,PNG,GIF,BMG,JPEG}', GLOB_BRACE); + if ($screen) { + $info['screen'] = $options->themeUrl(basename(current($screen)), $info['name']); + } else { + $info['screen'] = Typecho_Common::url('noscreen.png', $options->adminStaticUrl('img')); + } + + $result[$key] = $info; + } + } + + $clone = $result[$activated]; + unset($result[$activated]); + array_unshift($result, $clone); + array_filter($result, array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upgrade.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upgrade.php" new file mode 100644 index 0000000..5373863 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upgrade.php" @@ -0,0 +1,125 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍗囩骇鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍗囩骇缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Upgrade extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 褰撳墠鍐呴儴鐗堟湰鍙 + * + * @access private + * @var string + */ + private $_currentVersion; + + /** + * 瀵瑰崌绾у寘鎸夌増鏈繘琛屾帓搴 + * + * @access public + * @param string $a a鐗堟湰 + * @param string $b b鐗堟湰 + * @return integer + */ + public function sortPackage($a, $b) + { + list ($ver, $rev) = explode('r', $a); + $a = str_replace('_', '.', $rev); + + list ($ver, $rev) = explode('r', $b); + $b = str_replace('_', '.', $rev); + + return version_compare($a, $b, '>') ? 1 : -1; + } + + /** + * 杩囨护浣庣増鏈殑鍗囩骇鍖 + * + * @access public + * @param string $version 鐗堟湰鍙 + * @return boolean + */ + public function filterPackage($version) + { + list ($ver, $rev) = explode('r', $version); + $rev = str_replace('_', '.', $rev); + return version_compare($rev, $this->_currentVersion, '>'); + } + + /** + * 鎵ц鍗囩骇绋嬪簭 + * + * @access public + * @return void + */ + public function upgrade() + { + list($prefix, $this->_currentVersion) = explode('/', $this->options->generator); + $packages = get_class_methods('Upgrade'); + $packages = array_filter($packages, array($this, 'filterPackage')); + usort($packages, array($this, 'sortPackage')); + + $message = array(); + + foreach ($packages as $package) { + $options = $this->widget('Widget_Options@' . $package); + + /** 鎵ц鍗囩骇鑴氭湰 */ + try { + $result = call_user_func(array('Upgrade', $package), $this->db, $options); + if (!empty($result)) { + $message[] = $result; + } + } catch (Typecho_Exception $e) { + $this->widget('Widget_Notice')->set($e->getMessage(), 'error'); + $this->response->goBack(); + return; + } + + list ($ver, $rev) = explode('r', $package); + $ver = substr(str_replace('_', '.', $ver), 1); + $rev = str_replace('_', '.', $rev); + + /** 鏇存柊鐗堟湰鍙 */ + $this->update(array('value' => 'Typecho ' . $ver . '/' . $rev), + $this->db->sql()->where('name = ?', 'generator')); + + $this->destory('Widget_Options@' . $package); + } + + /** 鏇存柊鐗堟湰鍙 */ + $this->update(array('value' => 'Typecho ' . Typecho_Common::VERSION), + $this->db->sql()->where('name = ?', 'generator')); + + $this->widget('Widget_Notice')->set(empty($message) ? _t("鍗囩骇宸茬粡瀹屾垚") : $message, + empty($message) ? 'success' : 'notice'); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->upgrade(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upload.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upload.php" new file mode 100644 index 0000000..2927dca --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Upload.php" @@ -0,0 +1,432 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 涓婁紶鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 涓婁紶缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface_Do +{ + //涓婁紶鏂囦欢鐩綍 + const UPLOAD_DIR = '/usr/uploads'; + + /** + * 鍒涘缓涓婁紶璺緞 + * + * @access private + * @param string $path 璺緞 + * @return boolean + */ + private static function makeUploadDir($path) + { + $path = preg_replace("/\\\+/", '/', $path); + $current = rtrim($path, '/'); + $last = $current; + + while (!is_dir($current) && false !== strpos($path, '/')) { + $last = $current; + $current = dirname($current); + } + + if ($last == $current) { + return true; + } + + if (!@mkdir($last)) { + return false; + } + + $stat = @stat($last); + $perms = $stat['mode'] & 0007777; + @chmod($last, $perms); + + return self::makeUploadDir($path); + } + + /** + * 鑾峰彇瀹夊叏鐨勬枃浠跺悕 + * + * @param string $name + * @static + * @access private + * @return string + */ + private static function getSafeName(&$name) + { + $name = str_replace(array('"', '<', '>'), '', $name); + $name = str_replace('\\', '/', $name); + $name = false === strpos($name, '/') ? ('a' . $name) : str_replace('/', '/a', $name); + $info = pathinfo($name); + $name = substr($info['basename'], 1); + + return isset($info['extension']) ? $info['extension'] : ''; + } + + /** + * 涓婁紶鏂囦欢澶勭悊鍑芥暟,濡傛灉闇瑕佸疄鐜拌嚜宸辩殑鏂囦欢鍝堝笇鎴栬呯壒娈婄殑鏂囦欢绯荤粺,璇峰湪options琛ㄩ噷鎶妘ploadHandle鏀规垚鑷繁鐨勫嚱鏁 + * + * @access public + * @param array $file 涓婁紶鐨勬枃浠 + * @return mixed + */ + public static function uploadHandle($file) + { + if (empty($file['name'])) { + return false; + } + + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasUploaded)->uploadHandle($file); + if ($hasUploaded) { + return $result; + } + + $ext = self::getSafeName($file['name']); + + if (!self::checkFileType($ext) || Typecho_Common::isAppEngine()) { + return false; + } + + $options = Typecho_Widget::widget('Widget_Options'); + $date = new Typecho_Date($options->gmtTime); + $path = Typecho_Common::url(defined('__TYPECHO_UPLOAD_DIR__') ? __TYPECHO_UPLOAD_DIR__ : self::UPLOAD_DIR, + defined('__TYPECHO_UPLOAD_ROOT_DIR__') ? __TYPECHO_UPLOAD_ROOT_DIR__ : __TYPECHO_ROOT_DIR__) + . '/' . $date->year . '/' . $date->month; + + //鍒涘缓涓婁紶鐩綍 + if (!is_dir($path)) { + if (!self::makeUploadDir($path)) { + return false; + } + } + + //鑾峰彇鏂囦欢鍚 + $fileName = sprintf('%u', crc32(uniqid())) . '.' . $ext; + $path = $path . '/' . $fileName; + + if (isset($file['tmp_name'])) { + + //绉诲姩涓婁紶鏂囦欢 + if (!@move_uploaded_file($file['tmp_name'], $path)) { + return false; + } + } else if (isset($file['bytes'])) { + + //鐩存帴鍐欏叆鏂囦欢 + if (!file_put_contents($path, $file['bytes'])) { + return false; + } + } else { + return false; + } + + if (!isset($file['size'])) { + $file['size'] = filesize($path); + } + + //杩斿洖鐩稿瀛樺偍璺緞 + return array( + 'name' => $file['name'], + 'path' => (defined('__TYPECHO_UPLOAD_DIR__') ? __TYPECHO_UPLOAD_DIR__ : self::UPLOAD_DIR) + . '/' . $date->year . '/' . $date->month . '/' . $fileName, + 'size' => $file['size'], + 'type' => $ext, + 'mime' => Typecho_Common::mimeContentType($path) + ); + } + + /** + * 淇敼鏂囦欢澶勭悊鍑芥暟,濡傛灉闇瑕佸疄鐜拌嚜宸辩殑鏂囦欢鍝堝笇鎴栬呯壒娈婄殑鏂囦欢绯荤粺,璇峰湪options琛ㄩ噷鎶妋odifyHandle鏀规垚鑷繁鐨勫嚱鏁 + * + * @access public + * @param array $content 鑰佹枃浠 + * @param array $file 鏂颁笂浼犵殑鏂囦欢 + * @return mixed + */ + public static function modifyHandle($content, $file) + { + if (empty($file['name'])) { + return false; + } + + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasModified)->modifyHandle($content, $file); + if ($hasModified) { + return $result; + } + + $ext = self::getSafeName($file['name']); + + if ($content['attachment']->type != $ext || Typecho_Common::isAppEngine()) { + return false; + } + + $path = Typecho_Common::url($content['attachment']->path, + defined('__TYPECHO_UPLOAD_ROOT_DIR__') ? __TYPECHO_UPLOAD_ROOT_DIR__ : __TYPECHO_ROOT_DIR__); + $dir = dirname($path); + + //鍒涘缓涓婁紶鐩綍 + if (!is_dir($dir)) { + if (!self::makeUploadDir($dir)) { + return false; + } + } + + if (isset($file['tmp_name'])) { + + @unlink($path); + + //绉诲姩涓婁紶鏂囦欢 + if (!@move_uploaded_file($file['tmp_name'], $path)) { + return false; + } + } else if (isset($file['bytes'])) { + + @unlink($path); + + //鐩存帴鍐欏叆鏂囦欢 + if (!file_put_contents($path, $file['bytes'])) { + return false; + } + } else { + return false; + } + + if (!isset($file['size'])) { + $file['size'] = filesize($path); + } + + //杩斿洖鐩稿瀛樺偍璺緞 + return array( + 'name' => $content['attachment']->name, + 'path' => $content['attachment']->path, + 'size' => $file['size'], + 'type' => $content['attachment']->type, + 'mime' => $content['attachment']->mime + ); + } + + /** + * 鍒犻櫎鏂囦欢 + * + * @access public + * @param array $content 鏂囦欢鐩稿叧淇℃伅 + * @return string + */ + public static function deleteHandle(array $content) + { + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasDeleted)->deleteHandle($content); + if ($hasDeleted) { + return $result; + } + + return !Typecho_Common::isAppEngine() + && @unlink(__TYPECHO_ROOT_DIR__ . '/' . $content['attachment']->path); + } + + /** + * 鑾峰彇瀹為檯鏂囦欢缁濆璁块棶璺緞 + * + * @access public + * @param array $content 鏂囦欢鐩稿叧淇℃伅 + * @return string + */ + public static function attachmentHandle(array $content) + { + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasPlugged)->attachmentHandle($content); + if ($hasPlugged) { + return $result; + } + + $options = Typecho_Widget::widget('Widget_Options'); + return Typecho_Common::url($content['attachment']->path, + defined('__TYPECHO_UPLOAD_URL__') ? __TYPECHO_UPLOAD_URL__ : $options->siteUrl); + } + + /** + * 鑾峰彇瀹為檯鏂囦欢鏁版嵁 + * + * @access public + * @param array $content + * @return string + */ + public static function attachmentDataHandle(array $content) + { + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasPlugged)->attachmentDataHandle($content); + if ($hasPlugged) { + return $result; + } + + return file_get_contents(Typecho_Common::url($content['attachment']->path, + defined('__TYPECHO_UPLOAD_ROOT_DIR__') ? __TYPECHO_UPLOAD_ROOT_DIR__ : __TYPECHO_ROOT_DIR__)); + } + + /** + * 妫鏌ユ枃浠跺悕 + * + * @access private + * @param string $ext 鎵╁睍鍚 + * @return boolean + */ + public static function checkFileType($ext) + { + $options = Typecho_Widget::widget('Widget_Options'); + return in_array($ext, $options->allowedAttachmentTypes); + } + + /** + * 鎵ц鍗囩骇绋嬪簭 + * + * @access public + * @return void + */ + public function upload() + { + if (!empty($_FILES)) { + $file = array_pop($_FILES); + if (0 == $file['error'] && is_uploaded_file($file['tmp_name'])) { + // xhr鐨剆end鏃犳硶鏀寔utf8 + if ($this->request->isAjax()) { + $file['name'] = urldecode($file['name']); + } + $result = self::uploadHandle($file); + + if (false !== $result) { + $this->pluginHandle()->beforeUpload($result); + + $struct = array( + 'title' => $result['name'], + 'slug' => $result['name'], + 'type' => 'attachment', + 'status' => 'publish', + 'text' => serialize($result), + 'allowComment' => 1, + 'allowPing' => 0, + 'allowFeed' => 1 + ); + + if (isset($this->request->cid)) { + $cid = $this->request->filter('int')->cid; + + if ($this->isWriteable($this->db->sql()->where('cid = ?', $cid))) { + $struct['parent'] = $cid; + } + } + + $insertId = $this->insert($struct); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $insertId) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + /** 澧炲姞鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->upload($this); + + $this->response->throwJson(array($this->attachment->url, array( + 'cid' => $insertId, + 'title' => $this->attachment->name, + 'type' => $this->attachment->type, + 'size' => $this->attachment->size, + 'bytes' => number_format(ceil($this->attachment->size / 1024)) . ' Kb', + 'isImage' => $this->attachment->isImage, + 'url' => $this->attachment->url, + 'permalink' => $this->permalink + ))); + + } + } + } + + $this->response->throwJson(false); + } + + /** + * 鎵ц鍗囩骇绋嬪簭 + * + * @access public + * @return void + */ + public function modify() + { + if (!empty($_FILES)) { + $file = array_pop($_FILES); + if (0 == $file['error'] && is_uploaded_file($file['tmp_name'])) { + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + if (!$this->have()) { + $this->response->setStatus(404); + exit; + } + + if (!$this->allow('edit')) { + $this->response->setStatus(403); + exit; + } + + // xhr鐨剆end鏃犳硶鏀寔utf8 + if ($this->request->isAjax()) { + $file['name'] = urldecode($file['name']); + } + + $result = self::modifyHandle($this->row, $file); + + if (false !== $result) { + $this->pluginHandle()->beforeModify($result); + + $this->update(array( + 'text' => serialize($result) + ), $this->db->sql()->where('cid = ?', $this->cid)); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $this->cid) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + /** 澧炲姞鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->modify($this); + + $this->response->throwJson(array($this->attachment->url, array( + 'cid' => $this->cid, + 'title' => $this->attachment->name, + 'type' => $this->attachment->type, + 'size' => $this->attachment->size, + 'bytes' => number_format(ceil($this->attachment->size / 1024)) . ' Kb', + 'isImage' => $this->attachment->isImage, + 'url' => $this->attachment->url, + 'permalink' => $this->permalink + ))); + } + } + } + + $this->response->throwJson(false); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + if ($this->user->pass('contributor', true) && $this->request->isPost()) { + $this->security->protect(); + if ($this->request->is('do=modify&cid')) { + $this->modify(); + } else { + $this->upload(); + } + } else { + $this->response->setStatus(403); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/User.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/User.php" new file mode 100644 index 0000000..941c5ee --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/User.php" @@ -0,0 +1,275 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * 褰撳墠鐧诲綍鐢ㄦ埛 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_User extends Typecho_Widget +{ + /** + * 鐢ㄦ埛 + * + * @access private + * @var array + */ + private $_user; + + /** + * 鏄惁宸茬粡鐧诲綍 + * + * @access private + * @var boolean + */ + private $_hasLogin = NULL; + + /** + * 鍏ㄥ眬閫夐」 + * + * @access protected + * @var Widget_Options + */ + protected $options; + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鐢ㄦ埛缁 + * + * @access public + * @var array + */ + public $groups = array( + 'administrator' => 0, + 'editor' => 1, + 'contributor' => 2, + 'subscriber' => 3, + 'visitor' => 4 + ); + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + $this->options = $this->widget('Widget_Options'); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + if ($this->hasLogin()) { + $rows = $this->db->fetchAll($this->db->select() + ->from('table.options')->where('user = ?', $this->_user['uid'])); + + $this->push($this->_user); + + foreach ($rows as $row) { + $this->options->__set($row['name'], $row['value']); + } + + //鏇存柊鏈鍚庢椿鍔ㄦ椂闂 + $this->db->query($this->db + ->update('table.users') + ->rows(array('activated' => $this->options->gmtTime)) + ->where('uid = ?', $this->_user['uid'])); + } + } + + /** + * 浠ョ敤鎴峰悕鍜屽瘑鐮佺櫥褰 + * + * @access public + * @param string $name 鐢ㄦ埛鍚 + * @param string $password 瀵嗙爜 + * @param boolean $temporarily 鏄惁涓轰复鏃剁櫥褰 + * @param integer $expire 杩囨湡鏃堕棿 + * @return boolean + */ + public function login($name, $password, $temporarily = false, $expire = 0) + { + //鎻掍欢鎺ュ彛 + $result = $this->pluginHandle()->trigger($loginPluggable)->login($name, $password, $temporarily, $expire); + if ($loginPluggable) { + return $result; + } + + /** 寮濮嬮獙璇佺敤鎴 **/ + $user = $this->db->fetchRow($this->db->select() + ->from('table.users') + ->where((strpos($name, '@') ? 'mail' : 'name') . ' = ?', $name) + ->limit(1)); + + if (empty($user)) { + return false; + } + + $hashValidate = $this->pluginHandle()->trigger($hashPluggable)->hashValidate($password, $user['password']); + if (!$hashPluggable) { + if ('$P$' == substr($user['password'], 0, 3)) { + $hasher = new PasswordHash(8, true); + $hashValidate = $hasher->CheckPassword($password, $user['password']); + } else { + $hashValidate = Typecho_Common::hashValidate($password, $user['password']); + } + } + + if ($user && $hashValidate) { + + if (!$temporarily) { + $authCode = function_exists('openssl_random_pseudo_bytes') ? + bin2hex(openssl_random_pseudo_bytes(16)) : sha1(Typecho_Common::randString(20)); + $user['authCode'] = $authCode; + + Typecho_Cookie::set('__typecho_uid', $user['uid'], $expire); + Typecho_Cookie::set('__typecho_authCode', Typecho_Common::hash($authCode), $expire); + + //鏇存柊鏈鍚庣櫥褰曟椂闂翠互鍙婇獙璇佺爜 + $this->db->query($this->db + ->update('table.users') + ->expression('logged', 'activated') + ->rows(array('authCode' => $authCode)) + ->where('uid = ?', $user['uid'])); + } + + /** 鍘嬪叆鏁版嵁 */ + $this->push($user); + $this->_hasLogin = true; + $this->pluginHandle()->loginSucceed($this, $name, $password, $temporarily, $expire); + + return true; + } + + $this->pluginHandle()->loginFail($this, $name, $password, $temporarily, $expire); + return false; + } + + /** + * 鍙渶瑕佹彁渚泆id鍗冲彲鐧诲綍鐨勬柟娉, 澶氱敤浜庢彃浠剁瓑鐗规畩鍦哄悎 + * + * @access public + * @param integer $uid 鐢ㄦ埛id + * @return boolean + */ + public function simpleLogin($uid) + { + $user = $this->db->fetchRow($this->db->select() + ->from('table.users') + ->where('uid = ?', $uid) + ->limit(1)); + + if (empty($user)) { + return false; + } + + $this->push($user); + $this->_hasLogin = true; + + return true; + } + + /** + * 鐢ㄦ埛鐧诲嚭鍑芥暟 + * + * @access public + * @return void + */ + public function logout() + { + $this->pluginHandle()->trigger($logoutPluggable)->logout(); + if ($logoutPluggable) { + return; + } + + Typecho_Cookie::delete('__typecho_uid'); + Typecho_Cookie::delete('__typecho_authCode'); + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏄惁宸茬粡鐧诲綍 + * + * @access public + * @return boolean + */ + public function hasLogin() + { + if (NULL !== $this->_hasLogin) { + return $this->_hasLogin; + } else { + $cookieUid = Typecho_Cookie::get('__typecho_uid'); + if (NULL !== $cookieUid) { + /** 楠岃瘉鐧婚檰 */ + $user = $this->db->fetchRow($this->db->select()->from('table.users') + ->where('uid = ?', intval($cookieUid)) + ->limit(1)); + + $cookieAuthCode = Typecho_Cookie::get('__typecho_authCode'); + if ($user && Typecho_Common::hashValidate($user['authCode'], $cookieAuthCode)) { + $this->_user = $user; + return ($this->_hasLogin = true); + } + + $this->logout(); + } + + return ($this->_hasLogin = false); + } + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏉冮檺 + * + * @access public + * @param string $group 鐢ㄦ埛缁 + * @param boolean $return 鏄惁涓鸿繑鍥炴ā寮 + * @return boolean + * @throws Typecho_Widget_Exception + */ + public function pass($group, $return = false) + { + if ($this->hasLogin()) { + if (array_key_exists($group, $this->groups) && $this->groups[$this->group] <= $this->groups[$group]) { + return true; + } + } else { + if ($return) { + return false; + } else { + //闃叉寰幆閲嶅畾鍚 + $this->response->redirect($this->options->loginUrl . + (0 === strpos($this->request->getReferer(), $this->options->loginUrl) ? '' : + '?referer=' . urlencode($this->request->makeUriByRequest())), false); + } + } + + if ($return) { + return false; + } else { + throw new Typecho_Widget_Exception(_t('绂佹璁块棶'), 403); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Admin.php" new file mode 100644 index 0000000..6f6a432 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Admin.php" @@ -0,0 +1,115 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍚庡彴鎴愬憳鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Admin extends Widget_Abstract_Users +{ + /** + * 鍒嗛〉璁$畻瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 浠呬粎杈撳嚭鍩熷悕鍜岃矾寰 + * + * @access protected + * @return string + */ + protected function ___domainPath() + { + $parts = parse_url($this->url); + return $parts['host'] . (isset($parts['path']) ? $parts['path'] : NULL); + } + + /** + * 鍙戝竷鏂囩珷鏁 + * + * @access protected + * @return integer + */ + protected function ___postsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.authorId = ?', $this->uid))->num; + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('pageSize=20'); + $select = $this->select(); + $this->_currentPage = $this->request->get('page', 1); + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->keywords)) { + $select->where('name LIKE ? OR screenName LIKE ?', + '%' . Typecho_Common::filterSearchQuery($keywords) . '%', + '%' . Typecho_Common::filterSearchQuery($keywords) . '%'); + } + + $this->_countSql = clone $select; + + $select->order('table.users.uid', Typecho_Db::SORT_ASC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}');; + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render('«', '»'); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Author.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Author.php" new file mode 100644 index 0000000..e8e8fb4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Author.php" @@ -0,0 +1,37 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐩稿叧鍐呭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐩稿叧鍐呭缁勪欢(鏍规嵁鏍囩鍏宠仈) + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Author extends Widget_Abstract_Users +{ + /** + * 鎵ц鍑芥暟,鍒濆鍖栨暟鎹 + * + * @access public + * @return void + */ + public function execute() + { + if ($this->parameter->uid) { + $this->db->fetchRow($this->select() + ->where('uid = ?', $this->parameter->uid), array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Edit.php" new file mode 100644 index 0000000..6f4d371 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Edit.php" @@ -0,0 +1,311 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鐢ㄦ埛 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鐢ㄦ埛缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Edit extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鑾峰彇椤甸潰鍋忕Щ鐨刄RL Query + * + * @access protected + * @param integer $uid 鐢ㄦ埛id + * @return string + */ + protected function getPageOffsetQuery($uid) + { + return 'page=' . $this->getPageOffset('uid', $uid); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 绠$悊鍛樹互涓婃潈闄 */ + $this->user->pass('administrator'); + + /** 鏇存柊妯″紡 */ + if (($this->request->uid && 'delete' != $this->request->do) || 'update' == $this->request->do) { + $this->db->fetchRow($this->select() + ->where('uid = ?', $this->request->uid)->limit(1), array($this, 'push')); + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('鐢ㄦ埛涓嶅瓨鍦'), 404); + } + } + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('缂栬緫鐢ㄦ埛 %s', $this->name); + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏄惁瀛樺湪 + * + * @access public + * @param integer $uid 鐢ㄦ埛涓婚敭 + * @return boolean + */ + public function userExists($uid) + { + $user = $this->db->fetchRow($this->db->select() + ->from('table.users') + ->where('uid = ?', $uid)->limit(1)); + + return !empty($user); + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @param string $action 琛ㄥ崟鍔ㄤ綔 + * @return Typecho_Widget_Helper_Form + */ + public function form($action = NULL) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鐢ㄦ埛鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('鐢ㄦ埛鍚 *'), _t('姝ょ敤鎴峰悕灏嗕綔涓虹敤鎴风櫥褰曟椂鎵鐢ㄧ殑鍚嶇О.') + . '<br />' . _t('璇蜂笉瑕佷笌绯荤粺涓幇鏈夌殑鐢ㄦ埛鍚嶉噸澶.')); + $form->addInput($name); + + /** 鐢靛瓙閭鍦板潃 */ + $mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('鐢靛瓙閭鍦板潃 *'), _t('鐢靛瓙閭鍦板潃灏嗕綔涓烘鐢ㄦ埛鐨勪富瑕佽仈绯绘柟寮.') + . '<br />' . _t('璇蜂笉瑕佷笌绯荤粺涓幇鏈夌殑鐢靛瓙閭鍦板潃閲嶅.')); + $form->addInput($mail); + + /** 鐢ㄦ埛鏄电О */ + $screenName = new Typecho_Widget_Helper_Form_Element_Text('screenName', NULL, NULL, _t('鐢ㄦ埛鏄电О'), _t('鐢ㄦ埛鏄电О鍙互涓庣敤鎴峰悕涓嶅悓, 鐢ㄤ簬鍓嶅彴鏄剧ず.') + . '<br />' . _t('濡傛灉浣犲皢姝ら」鐣欑┖, 灏嗛粯璁や娇鐢ㄧ敤鎴峰悕.')); + $form->addInput($screenName); + + /** 鐢ㄦ埛瀵嗙爜 */ + $password = new Typecho_Widget_Helper_Form_Element_Password('password', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜'), _t('涓烘鐢ㄦ埛鍒嗛厤涓涓瘑鐮.') + . '<br />' . _t('寤鸿浣跨敤鐗规畩瀛楃涓庡瓧姣嶃佹暟瀛楃殑娣风紪鏍峰紡,浠ュ鍔犵郴缁熷畨鍏ㄦ.')); + $password->input->setAttribute('class', 'w-60'); + $form->addInput($password); + + /** 鐢ㄦ埛瀵嗙爜纭 */ + $confirm = new Typecho_Widget_Helper_Form_Element_Password('confirm', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜纭'), _t('璇风‘璁や綘鐨勫瘑鐮, 涓庝笂闈㈣緭鍏ョ殑瀵嗙爜淇濇寔涓鑷.')); + $confirm->input->setAttribute('class', 'w-60'); + $form->addInput($confirm); + + /** 涓汉涓婚〉鍦板潃 */ + $url = new Typecho_Widget_Helper_Form_Element_Text('url', NULL, NULL, _t('涓汉涓婚〉鍦板潃'), _t('姝ょ敤鎴风殑涓汉涓婚〉鍦板潃, 璇风敤 <code>http://</code> 寮澶.')); + $form->addInput($url); + + /** 鐢ㄦ埛缁 */ + $group = new Typecho_Widget_Helper_Form_Element_Select('group', array('subscriber' => _t('鍏虫敞鑰'), + 'contributor' => _t('璐$尞鑰'), 'editor' => _t('缂栬緫'), 'administrator' => _t('绠$悊鍛')), + NULL, _t('鐢ㄦ埛缁'), _t('涓嶅悓鐨勭敤鎴风粍鎷ユ湁涓嶅悓鐨勬潈闄.') + . '<br />' . _t('鍏蜂綋鐨勬潈闄愬垎閰嶈〃璇<a href="http://docs.typecho.org/develop/acl">鍙傝冭繖閲</a>.')); + $form->addInput($group); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do'); + $form->addInput($do); + + /** 鐢ㄦ埛涓婚敭 */ + $uid = new Typecho_Widget_Helper_Form_Element_Hidden('uid'); + $form->addInput($uid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + if (NULL != $this->request->uid) { + $submit->value(_t('缂栬緫鐢ㄦ埛')); + $name->value($this->name); + $screenName->value($this->screenName); + $url->value($this->url); + $mail->value($this->mail); + $group->value($this->group); + $do->value('update'); + $uid->value($this->uid); + $_action = 'update'; + } else { + $submit->value(_t('澧炲姞鐢ㄦ埛')); + $do->value('insert'); + $_action = 'insert'; + } + + if (empty($action)) { + $action = $_action; + } + + /** 缁欒〃鍗曞鍔犺鍒 */ + if ('insert' == $action || 'update' == $action) { + $screenName->addRule(array($this, 'screenNameExists'), _t('鏄电О宸茬粡瀛樺湪')); + $screenName->addRule('xssCheck', _t('璇蜂笉瑕佸湪鏄电О涓娇鐢ㄧ壒娈婂瓧绗')); + $url->addRule('url', _t('涓汉涓婚〉鍦板潃鏍煎紡閿欒')); + $mail->addRule('required', _t('蹇呴』濉啓鐢靛瓙閭')); + $mail->addRule(array($this, 'mailExists'), _t('鐢靛瓙閭鍦板潃宸茬粡瀛樺湪')); + $mail->addRule('email', _t('鐢靛瓙閭鏍煎紡閿欒')); + $password->addRule('minLength', _t('涓轰簡淇濊瘉璐︽埛瀹夊叏, 璇疯緭鍏ヨ嚦灏戝叚浣嶇殑瀵嗙爜'), 6); + $confirm->addRule('confirm', _t('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓鑷'), 'password'); + } + + if ('insert' == $action) { + $name->addRule('required', _t('蹇呴』濉啓鐢ㄦ埛鍚嶇О')); + $name->addRule('xssCheck', _t('璇蜂笉瑕佸湪鐢ㄦ埛鍚嶄腑浣跨敤鐗规畩瀛楃')); + $name->addRule(array($this, 'nameExists'), _t('鐢ㄦ埛鍚嶅凡缁忓瓨鍦')); + $password->label(_t('鐢ㄦ埛瀵嗙爜 *')); + $confirm->label(_t('鐢ㄦ埛瀵嗙爜纭 *')); + $password->addRule('required', _t('蹇呴』濉啓瀵嗙爜')); + } + + if ('update' == $action) { + $name->input->setAttribute('disabled', 'disabled'); + $uid->addRule('required', _t('鐢ㄦ埛涓婚敭涓嶅瓨鍦')); + $uid->addRule(array($this, 'userExists'), _t('鐢ㄦ埛涓嶅瓨鍦')); + } + + return $form; + } + + /** + * 澧炲姞鐢ㄦ埛 + * + * @access public + * @return void + */ + public function insertUser() + { + if ($this->form('insert')->validate()) { + $this->response->goBack(); + } + + $hasher = new PasswordHash(8, true); + + /** 鍙栧嚭鏁版嵁 */ + $user = $this->request->from('name', 'mail', 'screenName', 'password', 'url', 'group'); + $user['screenName'] = empty($user['screenName']) ? $user['name'] : $user['screenName']; + $user['password'] = $hasher->HashPassword($user['password']); + $user['created'] = $this->options->gmtTime; + + /** 鎻掑叆鏁版嵁 */ + $user['uid'] = $this->insert($user); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $user['uid']); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛 %s 宸茬粡琚鍔', $user['screenName']), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-users.php', $this->options->adminUrl)); + } + + /** + * 鏇存柊鐢ㄦ埛 + * + * @access public + * @return void + */ + public function updateUser() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $user = $this->request->from('mail', 'screenName', 'password', 'url', 'group'); + $user['screenName'] = empty($user['screenName']) ? $user['name'] : $user['screenName']; + if (empty($user['password'])) { + unset($user['password']); + } else { + $hasher = new PasswordHash(8, true); + $user['password'] = $hasher->HashPassword($user['password']); + } + + /** 鏇存柊鏁版嵁 */ + $this->update($user, $this->db->sql()->where('uid = ?', $this->request->uid)); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $this->request->uid); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛 %s 宸茬粡琚洿鏂', $user['screenName']), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-users.php?' . + $this->getPageOffsetQuery($this->request->uid), $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鐢ㄦ埛 + * + * @access public + * @return void + */ + public function deleteUser() + { + $users = $this->request->filter('int')->getArray('uid'); + $masterUserId = $this->db->fetchObject($this->db->select(array('MIN(uid)' => 'num'))->from('table.users'))->num; + $deleteCount = 0; + + foreach ($users as $user) { + if ($masterUserId == $user || $user == $this->user->id) { + continue; + } + + if ($this->delete($this->db->sql()->where('uid = ?', $user))) { + $deleteCount ++; + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鐢ㄦ埛宸茬粡鍒犻櫎') : _t('娌℃湁鐢ㄦ埛琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-users.php', $this->options->adminUrl)); + } + + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->is('do=insert'))->insertUser(); + $this->on($this->request->is('do=update'))->updateUser(); + $this->on($this->request->is('do=delete'))->deleteUser(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Profile.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Profile.php" new file mode 100644 index 0000000..f27e66d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/Users/Profile.php" @@ -0,0 +1,424 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鐢ㄦ埛 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鐢ㄦ埛缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface_Do +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 娉ㄥ唽鐢ㄦ埛浠ヤ笂鏉冮檺 */ + $this->user->pass('subscriber'); + $this->request->setParam('uid', $this->user->uid); + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function profileForm() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鐢ㄦ埛鏄电О */ + $screenName = new Typecho_Widget_Helper_Form_Element_Text('screenName', NULL, NULL, _t('鏄电О'), _t('鐢ㄦ埛鏄电О鍙互涓庣敤鎴峰悕涓嶅悓, 鐢ㄤ簬鍓嶅彴鏄剧ず.') + . '<br />' . _t('濡傛灉浣犲皢姝ら」鐣欑┖, 灏嗛粯璁や娇鐢ㄧ敤鎴峰悕.')); + $form->addInput($screenName); + + /** 涓汉涓婚〉鍦板潃 */ + $url = new Typecho_Widget_Helper_Form_Element_Text('url', NULL, NULL, _t('涓汉涓婚〉鍦板潃'), _t('姝ょ敤鎴风殑涓汉涓婚〉鍦板潃, 璇风敤 <code>http://</code> 寮澶.')); + $form->addInput($url); + + /** 鐢靛瓙閭鍦板潃 */ + $mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('鐢靛瓙閭鍦板潃 *'), _t('鐢靛瓙閭鍦板潃灏嗕綔涓烘鐢ㄦ埛鐨勪富瑕佽仈绯绘柟寮.') + . '<br />' . _t('璇蜂笉瑕佷笌绯荤粺涓幇鏈夌殑鐢靛瓙閭鍦板潃閲嶅.')); + $form->addInput($mail); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'profile'); + $form->addInput($do); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('鏇存柊鎴戠殑妗f')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + $screenName->value($this->user->screenName); + $url->value($this->user->url); + $mail->value($this->user->mail); + + /** 缁欒〃鍗曞鍔犺鍒 */ + $screenName->addRule(array($this, 'screenNameExists'), _t('鏄电О宸茬粡瀛樺湪')); + $screenName->addRule('xssCheck', _t('璇蜂笉瑕佸湪鏄电О涓娇鐢ㄧ壒娈婂瓧绗')); + $url->addRule('url', _t('涓汉涓婚〉鍦板潃鏍煎紡閿欒')); + $mail->addRule('required', _t('蹇呴』濉啓鐢靛瓙閭')); + $mail->addRule(array($this, 'mailExists'), _t('鐢靛瓙閭鍦板潃宸茬粡瀛樺湪')); + $mail->addRule('email', _t('鐢靛瓙閭鏍煎紡閿欒')); + + return $form; + } + + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function optionsForm() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鎾板啓璁剧疆 */ + $markdown = new Typecho_Widget_Helper_Form_Element_Radio('markdown', + array('0' => _t('鍏抽棴'), '1' => _t('鎵撳紑')), + $this->options->markdown, _t('浣跨敤 Markdown 璇硶缂栬緫鍜岃В鏋愬唴瀹'), + _t('浣跨敤 <a href="http://daringfireball.net/projects/markdown/">Markdown</a> 璇硶鑳藉浣挎偍鐨勬挵鍐欒繃绋嬫洿鍔犵畝渚跨洿瑙.') + . '<br />' . _t('姝ゅ姛鑳藉紑鍚笉浼氬奖鍝嶄互鍓嶆病鏈変娇鐢 Markdown 璇硶缂栬緫鐨勫唴瀹.')); + $form->addInput($markdown); + + /** 鑷姩淇濆瓨 */ + $autoSave = new Typecho_Widget_Helper_Form_Element_Radio('autoSave', + array('0' => _t('鍏抽棴'), '1' => _t('鎵撳紑')), + $this->options->autoSave, _t('鑷姩淇濆瓨'), _t('鑷姩淇濆瓨鍔熻兘鍙互鏇村ソ鍦颁繚鎶や綘鐨勬枃绔犱笉浼氫涪澶.')); + $form->addInput($autoSave); + + /** 榛樿鍏佽 */ + $allow = array(); + if ($this->options->defaultAllowComment) { + $allow[] = 'comment'; + } + + if ($this->options->defaultAllowPing) { + $allow[] = 'ping'; + } + + if ($this->options->defaultAllowFeed) { + $allow[] = 'feed'; + } + + $defaultAllow = new Typecho_Widget_Helper_Form_Element_Checkbox('defaultAllow', + array('comment' => _t('鍙互琚瘎璁'), 'ping' => _t('鍙互琚紩鐢'), 'feed' => _t('鍑虹幇鍦ㄨ仛鍚堜腑')), + $allow, _t('榛樿鍏佽'), _t('璁剧疆浣犵粡甯镐娇鐢ㄧ殑榛樿鍏佽鏉冮檺')); + $form->addInput($defaultAllow); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'options'); + $form->addInput($do); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 杈撳嚭鑷畾涔夎缃夐」 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @param string $className 绫诲悕绉 + * @param string $pluginFileName 鎻掍欢鏂囦欢鍚 + * @param string $group 鐢ㄦ埛缁 + * @return Typecho_Widget_Helper_Form + */ + public function personalForm($pluginName, $className, $pluginFileName, &$group) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + $form->setAttribute('name', $pluginName); + $form->setAttribute('id', $pluginName); + + require_once $pluginFileName; + $group = call_user_func(array($className, 'personalConfig'), $form); + $group = $group ? $group : 'subscriber'; + + $options = $this->options->personalPlugin($pluginName); + + if (!empty($options)) { + foreach ($options as $key => $val) { + $form->getInput($key)->value($val); + } + } + + $form->addItem(new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'personal')); + $form->addItem(new Typecho_Widget_Helper_Form_Element_Hidden('plugin', NULL, $pluginName)); + $form->addItem(new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('淇濆瓨璁剧疆'))); + return $form; + } + + /** + * 鑷畾涔夎缃垪琛 + * + * @access public + * @return void + */ + public function personalFormList() + { + $this->widget('Widget_Plugins_List@personalPlugins', 'activated=1')->to($plugins); + while ($plugins->next()) { + if ($plugins->personalConfig) { + echo '<h3>' . $plugins->title . '</h3>'; + list($pluginFileName, $className) = Typecho_Plugin::portal($plugins->name, + $this->options->pluginDir($plugins->name)); + + $form = $this->personalForm($plugins->name, $className, $pluginFileName, $group); + if ($this->user->pass($group, true)) { + $form->render(); + } + } + } + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function passwordForm() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鐢ㄦ埛瀵嗙爜 */ + $password = new Typecho_Widget_Helper_Form_Element_Password('password', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜'), _t('涓烘鐢ㄦ埛鍒嗛厤涓涓瘑鐮.') + . '<br />' . _t('寤鸿浣跨敤鐗规畩瀛楃涓庡瓧姣嶃佹暟瀛楃殑娣风紪鏍峰紡,浠ュ鍔犵郴缁熷畨鍏ㄦ.')); + $password->input->setAttribute('class', 'w-60'); + $form->addInput($password); + + /** 鐢ㄦ埛瀵嗙爜纭 */ + $confirm = new Typecho_Widget_Helper_Form_Element_Password('confirm', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜纭'), _t('璇风‘璁や綘鐨勫瘑鐮, 涓庝笂闈㈣緭鍏ョ殑瀵嗙爜淇濇寔涓鑷.')); + $confirm->input->setAttribute('class', 'w-60'); + $form->addInput($confirm); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'password'); + $form->addInput($do); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('鏇存柊瀵嗙爜')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + $password->addRule('required', _t('蹇呴』濉啓瀵嗙爜')); + $password->addRule('minLength', _t('涓轰簡淇濊瘉璐︽埛瀹夊叏, 璇疯緭鍏ヨ嚦灏戝叚浣嶇殑瀵嗙爜'), 6); + $confirm->addRule('confirm', _t('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓鑷'), 'password'); + + return $form; + } + + /** + * 鏇存柊鐢ㄦ埛 + * + * @access public + * @return void + */ + public function updateProfile() + { + if ($this->profileForm()->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $user = $this->request->from('mail', 'screenName', 'url'); + $user['screenName'] = empty($user['screenName']) ? $user['name'] : $user['screenName']; + + /** 鏇存柊鏁版嵁 */ + $this->update($user, $this->db->sql()->where('uid = ?', $this->user->uid)); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $this->user->uid); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鎮ㄧ殑妗f宸茬粡鏇存柊'), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateOptions() + { + $settings['autoSave'] = $this->request->autoSave ? 1 : 0; + $settings['markdown'] = $this->request->markdown ? 1 : 0; + $defaultAllow = $this->request->getArray('defaultAllow'); + + $settings['defaultAllowComment'] = in_array('comment', $defaultAllow) ? 1 : 0; + $settings['defaultAllowPing'] = in_array('ping', $defaultAllow) ? 1 : 0; + $settings['defaultAllowFeed'] = in_array('feed', $defaultAllow) ? 1 : 0; + + foreach ($settings as $name => $value) { + if ($this->db->fetchObject($this->db->select(array('COUNT(*)' => 'num')) + ->from('table.options')->where('name = ? AND user = ?', $name, $this->user->uid))->num > 0) { + $this->widget('Widget_Abstract_Options') + ->update(array('value' => $value), $this->db->sql()->where('name = ? AND user = ?', $name, $this->user->uid)); + } else { + $this->widget('Widget_Abstract_Options')->insert(array( + 'name' => $name, + 'value' => $value, + 'user' => $this->user->uid + )); + } + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 鏇存柊瀵嗙爜 + * + * @access public + * @return void + */ + public function updatePassword() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->passwordForm()->validate()) { + $this->response->goBack(); + } + + $hasher = new PasswordHash(8, true); + $password = $hasher->HashPassword($this->request->password); + + /** 鏇存柊鏁版嵁 */ + $this->update(array('password' => $password), + $this->db->sql()->where('uid = ?', $this->user->uid)); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $this->user->uid); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('瀵嗙爜宸茬粡鎴愬姛淇敼'), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鏇存柊涓汉璁剧疆 + * + * @access public + * @return void + */ + public function updatePersonal() + { + /** 鑾峰彇鎻掍欢鍚嶇О */ + $pluginName = $this->request->plugin; + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($this->request->plugin, + __TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__); + $info = Typecho_Plugin::parseInfo($pluginFileName); + + if (!$info['personalConfig'] || !isset($activatedPlugins[$pluginName])) { + throw new Typecho_Widget_Exception(_t('鏃犳硶閰嶇疆鎻掍欢'), 500); + } + + $form = $this->personalForm($pluginName, $className, $pluginFileName, $group); + $this->user->pass($group); + + /** 楠岃瘉琛ㄥ崟 */ + if ($form->validate()) { + $this->response->goBack(); + } + + $settings = $form->getAllRequest(); + unset($settings['do'], $settings['plugin']); + $name = '_plugin:' . $pluginName; + + if (!$this->personalConfigHandle($className, $settings)) { + if ($this->db->fetchObject($this->db->select(array('COUNT(*)' => 'num')) + ->from('table.options')->where('name = ? AND user = ?', $name, $this->user->uid))->num > 0) { + $this->widget('Widget_Abstract_Options') + ->update(array('value' => serialize($settings)), $this->db->sql()->where('name = ? AND user = ?', $name, $this->user->uid)); + } else { + $this->widget('Widget_Abstract_Options')->insert(array( + 'name' => $name, + 'value' => serialize($settings), + 'user' => $this->user->uid + )); + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t("%s 璁剧疆宸茬粡淇濆瓨", $info['title']), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('profile.php', $this->options->adminUrl)); + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗚嚜瀹氫箟閰嶇疆淇℃伅 + * + * @access public + * @param string $className 绫诲悕 + * @param array $settings 閰嶇疆鍊 + * @return boolean + */ + public function personalConfigHandle($className, array $settings) + { + if (method_exists($className, 'personalConfigHandle')) { + call_user_func(array($className, 'personalConfigHandle'), $settings, false); + return true; + } + + return false; + } + + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=profile'))->updateProfile(); + $this->on($this->request->is('do=options'))->updateOptions(); + $this->on($this->request->is('do=password'))->updatePassword(); + $this->on($this->request->is('do=personal&plugin'))->updatePersonal(); + $this->response->redirect($this->options->siteUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/XmlRpc.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/XmlRpc.php" new file mode 100644 index 0000000..3a2525b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirie.hack123.pw/var/Widget/XmlRpc.php" @@ -0,0 +1,2326 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * XmlRpc鎺ュ彛 + * + * @author blankyao + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_XmlRpc extends Widget_Abstract_Contents implements Widget_Interface_Do +{ + /** + * 褰撳墠閿欒 + * + * @access private + * @var IXR_Error + */ + private $error; + + /** + * wordpress椋庢牸鐨勭郴缁熼夐」 + * + * @access private + * @var array + */ + private $_wpOptions; + + /** + * 宸茬粡浣跨敤杩囩殑缁勪欢鍒楄〃 + * + * @access private + * @var array + */ + private $_usedWidgetNameList = array(); + + /** + * 鑾峰彇鎵╁睍瀛楁 + * + * @access private + * @param Widget_Abstract_Contents $content + * @return array + */ + private function getPostExtended(Widget_Abstract_Contents $content) + { + //鏍规嵁瀹㈡埛绔樉绀烘潵鍒ゆ柇鏄惁鏄剧ずhtml浠g爜 + $agent = $this->request->getAgent(); + $text = ''; + + switch (true) { + case false !== strpos($agent, 'wp-iphone'): // wordpress iphone瀹㈡埛绔 + case false !== strpos($agent, 'wp-blackberry'): // 榛戣帗 + case false !== strpos($agent, 'wp-andriod'): // andriod + case false !== strpos($agent, 'plain-text'): // 杩欐槸棰勭暀缁欑涓夋柟寮鍙戣呯殑鎺ュ彛, 鐢ㄤ簬寮鸿璋冪敤闈炴墍瑙佸嵆鎵寰楁暟鎹 + $text = $content->text; + break; + default: + $text = $content->content; + break; + } + + $post = explode('<!--more-->', $text, 2); + return array(Typecho_Common::fixHtml($post[0]), isset($post[1]) ? Typecho_Common::fixHtml($post[1]) : NULL); + } + + /** + * 灏唗ypecho鐨勭姸鎬佺被鍨嬭浆鎹负wordperss鐨勯鏍 + * + * @access private + * @param string $status typecho鐨勭姸鎬 + * @param string $type 鍐呭绫诲瀷 + * @return string + */ + private function typechoToWordpressStatus($status, $type = 'post') + { + if ('post' == $type) { + /** 鏂囩珷鐘舵 */ + switch ($status) { + case 'waiting': + return 'pending'; + case 'publish': + case 'draft': + case 'private': + return $status; + default: + return 'publish'; + } + } else if ('page' == $type) { + switch ($status) { + case 'publish': + case 'draft': + case 'private': + return $status; + default: + return 'publish'; + } + } else if ('comment' == $type) { + switch ($status) { + case 'publish': + case 'approved': + return 'approve'; + case 'waiting': + return 'hold'; + case 'spam': + return $status; + default: + return 'approve'; + } + } + + return ''; + } + + /** + * 灏唚ordpress鐨勭姸鎬佺被鍨嬭浆鎹负typecho鐨勯鏍 + * + * @access private + * @param string $status wordpress鐨勭姸鎬 + * @param string $type 鍐呭绫诲瀷 + * @return string + */ + private function wordpressToTypechoStatus($status, $type = 'post') + { + if ('post' == $type) { + /** 鏂囩珷鐘舵 */ + switch ($status) { + case 'pending': + return 'waiting'; + case 'publish': + case 'draft': + case 'private': + case 'waiting': + return $status; + default: + return 'publish'; + } + } else if ('page' == $type) { + switch ($status) { + case 'publish': + case 'draft': + case 'private': + return $status; + default: + return 'publish'; + } + } else if ('comment' == $type) { + switch ($status) { + case 'approve': + case 'publish': + case 'approved': + return 'approved'; + case 'hold': + case 'waiting': + return 'waiting'; + case 'spam': + return $status; + default: + return 'approved'; + } + } + + return ''; + } + + /** + * 浠g悊宸ュ巶鏂规硶,灏嗙被闈欐佸寲鏀剧疆鍒板垪琛ㄤ腑 + * + * @access public + * @param string $alias 缁勪欢鍒悕 + * @param mixed $params 浼犻掔殑鍙傛暟 + * @param mixed $request 鍓嶇鍙傛暟 + * @param boolean $enableResponse 鏄惁鍏佽http鍥炴墽 + * @return object + * @throws Typecho_Exception + */ + private function singletonWidget($alias, $params = NULL, $request = NULL, $enableResponse = true) + { + $this->_usedWidgetNameList[] = $alias; + return Typecho_Widget::widget($alias, $params, $request, $enableResponse); + } + + /** + * 濡傛灉杩欓噷娌℃湁閲嶈浇, 姣忔閮戒細琚粯璁ゆ墽琛 + * + * @access public + * @param boolen $run 鏄惁鎵ц + * @return void + */ + public function execute($run = false) + { + if ($run) { + parent::execute(); + } + + $this->_wpOptions = array( + // Read only options + 'software_name' => array( + 'desc' => _t( '杞欢鍚嶇О' ), + 'readonly' => true, + 'value' => $this->options->software + ), + 'software_version' => array( + 'desc' => _t( '杞欢鐗堟湰' ), + 'readonly' => true, + 'value' => $this->options->version + ), + 'blog_url' => array( + 'desc' => _t( '鍗氬鍦板潃' ), + 'readonly' => true, + 'option' => 'siteUrl' + ), + 'home_url' => array( + 'desc' => _t( '鍗氬棣栭〉鍦板潃' ), + 'readonly' => true, + 'option' => 'siteUrl' + ), + 'login_url' => array( + 'desc' => _t( '鐧诲綍鍦板潃' ), + 'readonly' => true, + 'value' => $this->options->siteUrl.'admin/login.php' + ), + 'admin_url' => array( + 'desc' => _t( '绠$悊鍖哄煙鐨勫湴鍧' ), + 'readonly' => true, + 'value' => $this->options->siteUrl.'admin/' + ), + + 'post_thumbnail' => array( + 'desc' => _t( '鏂囩珷缂╃暐鍥' ), + 'readonly' => true, + 'value' => false + ), + + // Updatable options + 'time_zone' => array( + 'desc' => _t( '鏃跺尯' ), + 'readonly' => false, + 'option' => 'timezone' + ), + 'blog_title' => array( + 'desc' => _t( '鍗氬鏍囬' ), + 'readonly' => false, + 'option' => 'title' + ), + 'blog_tagline' => array( + 'desc' => _t( '鍗氬鍏抽敭瀛' ), + 'readonly' => false, + 'option' => 'description' + ), + 'date_format' => array( + 'desc' => _t( '鏃ユ湡鏍煎紡' ), + 'readonly' => false, + 'option' => 'postDateFormat' + ), + 'time_format' => array( + 'desc' => _t( '鏃堕棿鏍煎紡' ), + 'readonly' => false, + 'option' => 'postDateFormat' + ), + 'users_can_register' => array( + 'desc' => _t( '鏄惁鍏佽娉ㄥ唽' ), + 'readonly' => false, + 'option' => 'allowRegister' + ) + ); + } + + /** + * 妫鏌ユ潈闄 + * + * @access public + * @return void + */ + public function checkAccess($name, $password, $level = 'contributor') + { + if ($this->user->login($name, $password, true)) { + /** 楠岃瘉鏉冮檺 */ + if ($this->user->pass($level, true)) { + return true; + } else { + $this->error = new IXR_Error(403, _t('鏉冮檺涓嶈冻')); + return false; + } + } else { + $this->error = new IXR_Error(403, _t('鏃犳硶鐧婚檰, 瀵嗙爜閿欒')); + return false; + } + } + + /** about wp xmlrpc api, you can see http://codex.wordpress.org/XML-RPC*/ + + /** + * 鑾峰彇pageId鎸囧畾鐨刾age + * + * @param int $blogId + * @param int $pageId + * @param string $userName + * @param string $password + * @access public + * @return struct $pageStruct + */ + public function wpGetPage($blogId, $pageId, $userName, $password) + { + /** 妫鏌ユ潈闄 */ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + /** 鑾峰彇椤甸潰 */ + try { + /** 鐢变簬Widget_Contents_Page_Edit鏄粠request涓幏鍙栧弬鏁, 鍥犳鎴戜滑闇瑕佸己琛岃缃甪lush涓涓媟equest */ + /** widget鏂规硶鐨勭涓変釜鍙傛暟鍙互鎸囧畾寮鸿杞崲浼犲叆姝idget鐨剅equest鍙傛暟 */ + /** 姝ょ粍浠朵細杩涜澶嶆潅鐨勬潈闄愭娴 */ + $page = $this->singletonWidget('Widget_Contents_Page_Edit', NULL, "cid={$pageId}"); + } catch (Typecho_Widget_Exception $e) { + /** 鎴幏鍙兘浼氭姏鍑虹殑寮傚父(鍙傝 Widget_Contents_Page_Edit 鐨 execute 鏂规硶) */ + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($page); + + $pageStruct = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $page->created), + 'userid' => $page->authorId, + 'page_id' => $page->cid, + 'page_status' => $this->typechoToWordpressStatus($page->status, 'page'), + 'description' => $excerpt, + 'title' => $page->title, + 'link' => $page->permalink, + 'permaLink' => $page->permalink, + 'categories' => $page->categories, + 'excerpt' => $page->description, + 'text_more' => $more, + 'mt_allow_comments' => intval($page->allowComment), + 'mt_allow_pings' => intval($page->allowPing), + 'wp_slug' => $page->slug, + 'wp_password' => $page->password, + 'wp_author' => $page->author->name, + 'wp_page_parent_id' => '0', + 'wp_page_parent_title' => '', + 'wp_page_order' => $page->order, //meta鏄弿杩板瓧娈, 鍦╬age鏃惰〃绀洪『搴 + 'wp_author_id' => $page->authorId, + 'wp_author_display_name' => $page->author->screenName, + 'date_created_gmt' => new IXR_Date($page->created), + 'custom_fields' => array(), + 'wp_page_template' => $page->template + ); + + return $pageStruct; + } + + /** + * 鑾峰彇鎵鏈夌殑page + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return array(contains $pageStruct) + */ + public function wpGetPages($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + /** 杩囨护type涓簆age鐨刢ontents */ + /** 鍚屾牱闇瑕乫lush涓涓, 闇瑕佸彇鍑烘墍鏈塻tatus鐨勯〉闈 */ + $pages = $this->singletonWidget('Widget_Contents_Page_Admin', NULL, 'status=all'); + + /** 鍒濆鍖栬杩斿洖鐨勬暟鎹粨鏋 */ + $pageStructs = array(); + + while ($pages->next()) { + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($pages); + $pageStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $pages->created), + 'userid' => $pages->authorId, + 'page_id' => intval($pages->cid), + /** todo:姝ゅ鏈夌枒闂 */ + 'page_status' => $this->typechoToWordpressStatus($pages->status, 'page'), + 'description' => $excerpt, + 'title' => $pages->title, + 'link' => $pages->permalink, + 'permaLink' => $pages->permalink, + 'categories' => $pages->categories, + 'excerpt' => $pages->description, + 'text_more' => $more, + 'mt_allow_comments' => intval($pages->allowComment), + 'mt_allow_pings' => intval($pages->allowPing), + 'wp_slug' => $pages->slug, + 'wp_password' => $pages->password, + 'wp_author' => $pages->author->name, + 'wp_page_parent_id' => 0, + 'wp_page_parent_title' => '', + 'wp_page_order' => intval($pages->order), //meta鏄弿杩板瓧娈, 鍦╬age鏃惰〃绀洪『搴 + 'wp_author_id' => $pages->authorId, + 'wp_author_display_name' => $pages->author->screenName, + 'date_created_gmt' => new IXR_Date($pages->created), + 'custom_fields' => array(), + 'wp_page_template' => $pages->template + ); + } + + return $pageStructs; + } + + /** + * 鎾板啓涓涓柊page + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return void + */ + public function wpNewPage($blogId, $userName, $password, $content, $publish) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + $content['post_type'] = 'page'; + $this->mwNewPost($blogId, $userName, $password, $content, $publish); + } + + /** + * 鍒犻櫎pageId鎸囧畾鐨刾age + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $pageId + * @access public + * @return bool + */ + public function wpDeletePage($blogId, $userName, $password, $pageId) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + /** 鍒犻櫎椤甸潰 */ + try { + /** 姝ょ粍浠朵細杩涜澶嶆潅鐨勬潈闄愭娴 */ + $this->singletonWidget('Widget_Contents_Page_Edit', NULL, "cid={$pageId}", false)->deletePage(); + } catch (Typecho_Widget_Exception $e) { + /** 鎴幏鍙兘浼氭姏鍑虹殑寮傚父(鍙傝 Widget_Contents_Page_Edit 鐨 execute 鏂规硶) */ + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + return true; + } + + /** + * 缂栬緫pageId鎸囧畾鐨刾age + * + * @param int $blogId + * @param int $pageId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return bool + */ + public function wpEditPage($blogId, $pageId, $userName, $password, $content, $publish) + { + $content['type'] = 'page'; + $this->mwEditPost($blogId, $pageId, $userName, $password, $content, $publish); + } + + + /** + * 缂栬緫postId鎸囧畾鐨刾ost + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postId + * @param struct $content + * @access public + * @return bool + */ + public function wpEditPost($blogId, $userName, $password, $postId, $content) + { + + $post = $this->singletonWidget('Widget_Archive', 'type=single', 'cid=' . $postId, false); + if ($post->type == 'attachment') { + $attachment['title'] = $content['post_title']; + $attachment['slug'] = $content['post_excerpt']; + + $text = unserialize($post->text); + $text['description'] = $content['description']; + + $attachment['text'] = serialize($text); + + /** 鏇存柊鏁版嵁 */ + $updateRows = $this->update($attachment, $this->db->sql()->where('cid = ?', $postId)); + return true; + } + return $this->mwEditPost($blogId, $postId, $userName, $password, $content); + } + + /** + * 鑾峰彇page鍒楄〃锛屾病鏈墂pGetPages鑾峰緱鐨勮缁 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return array + */ + public function wpGetPageList($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return ($this->error); + } + $pages = $this->singletonWidget('Widget_Contents_Page_Admin', NULL, 'status=all'); + /**鍒濆鍖*/ + $pageStructs = array(); + + while ($pages->next()) { + $pageStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $pages->created), + 'date_created_gmt' => new IXR_Date($this->options->timezone + $pages->created), + 'page_id' => $pages->cid, + 'page_title' => $pages->title, + 'page_parent_id' => '0', + ); + } + + return $pageStructs; + } + + /** + * 鑾峰緱涓涓敱blog鎵鏈変綔鑰呯殑淇℃伅缁勬垚鐨勬暟缁 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return struct + */ + public function wpGetAuthors($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return ($this->error); + } + + /** 鏋勫缓鏌ヨ*/ + $select = $this->db->select('table.users.uid', 'table.users.name', 'table.users.screenName')->from('table.users'); + $authors = $this->db->fetchAll($select); + + $authorStructs = array(); + foreach ($authors as $author) { + $authorStructs[] = array( + 'user_id' => $author['uid'], + 'user_login' => $author['name'], + 'display_name' => $author['screenName'] + ); + } + + return $authorStructs; + } + + /** + * 娣诲姞涓涓柊鐨勫垎绫 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param struct $category + * @access public + * @return void + */ + public function wpNewCategory($blogId, $userName, $password, $category) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + /** 寮濮嬫帴鍙楁暟鎹 */ + $input['name'] = $category['name']; + $input['slug'] = Typecho_Common::slugName(empty($category['slug']) ? $category['name'] : $category['slug']); + $input['parent'] = isset($category['parent_id']) ? $category['parent_id'] : + (isset($category['parent']) ? $category['parent'] : 0); + $input['description'] = isset($category['description']) ? $category['description'] : $category['name']; + $input['do'] = 'insert'; + + /** 璋冪敤宸叉湁缁勪欢 */ + try { + /** 鎻掑叆 */ + $categoryWidget = $this->singletonWidget('Widget_Metas_Category_Edit', NULL, $input, false); + $categoryWidget->action(); + return $categoryWidget->mid; + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + return new IXR_Error(403, _t('鏃犳硶娣诲姞鍒嗙被')); + } + + /** + * 鑾峰彇鐢辩粰瀹氱殑string寮澶寸殑閾炬帴缁勬垚鐨勬暟缁 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param string $category + * @param int $max_results + * @access public + * @return array + */ + public function wpSuggestCategories($blogId, $userName, $password, $category, $max_results) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + $meta = $this->singletonWidget('Widget_Abstract_Metas'); + + /** 鏋勯犲嚭鏌ヨ璇彞骞朵笖鏌ヨ*/ + $key = Typecho_Common::filterSearchQuery($category); + $key = '%' . $key . '%'; + $select = $meta->select()->where('table.metas.type = ? AND (table.metas.name LIKE ? OR slug LIKE ?)', 'category', $key, $key); + + /** 涓嶈category push鍒癱ontents鐨勫鍣ㄤ腑 */ + $categories = $this->db->fetchAll($select); + + /** 鍒濆鍖朿ategorise鏁扮粍*/ + $categoryStructs = array(); + foreach ($categories as $category) { + $categoryStructs[] = array( + 'category_id' => $category['mid'], + 'category_name' => $category['name'], + ); + } + + return $categoryStructs; + } + + /** + * 鑾峰彇鐢ㄦ埛 + * + * @access public + * @param string $userName 鐢ㄦ埛鍚 + * @param string $password 瀵嗙爜 + * @return array + */ + public function wpGetUsersBlogs($userName, $password) + { + + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array(); + $struct[] = array( + 'isAdmin' => $this->user->pass('administrator', true), + 'url' => $this->options->siteUrl, + 'blogid' => '1', + 'blogName' => $this->options->title, + 'xmlrpc' => $this->options->xmlRpcUrl + ); + return $struct; + } + + /** + * 鑾峰彇鐢ㄦ埛 + * + * @access public + * @param string $userName 鐢ㄦ埛鍚 + * @param string $password 瀵嗙爜 + * @return array + */ + public function wpGetProfile($blogId, $userName, $password) + { + + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array( + 'user_id' => $this->user->uid, + 'username' => $this->user->name, + 'first_name' => '', + 'last_name' => '', + 'registered' => new IXR_Date($this->options->timezone + $this->user->created), + 'bio' => '', + 'email' => $this->user->mail, + 'nickname' => $this->user->screenName, + 'url' => $this->user->url, + 'display_name' => $this->user->screenName, + 'roles' => $this->user->group + ); + return $struct; + } + + /** + * 鑾峰彇鏍囩鍒楄〃 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetTags($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array(); + $tags = $this->singletonWidget('Widget_Metas_Tag_Cloud'); + + while ($tags->next()) { + $struct[] = array( + 'tag_id' => $tags->mid, + 'name' => $tags->name, + 'count' => $tags->count, + 'slug' => $tags->slug, + 'html_url' => $tags->permalink, + 'rss_url' => $tags->feedUrl + ); + } + + return $struct; + } + + /** + * 鍒犻櫎鍒嗙被 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $categoryId + * @return array + */ + public function wpDeleteCategory($blogId, $userName, $password, $categoryId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + try { + $this->singletonWidget('Widget_Metas_Category_Edit', NULL, 'do=delete&mid=' . intval($categoryId), false); + return true; + } catch (Typecho_Exception $e) { + return false; + } + } + + /** + * 鑾峰彇璇勮鏁扮洰 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $postId + * @return array + */ + public function wpGetCommentCount($blogId, $userName, $password, $postId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $stat = $this->singletonWidget('Widget_Stat', NULL, 'cid=' . intval($postId), false); + + return array( + 'approved' => $stat->currentPublishedCommentsNum, + 'awaiting_moderation' => $stat->currentWaitingCommentsNum, + 'spam' => $stat->currentSpamCommentsNum, + 'total_comments' => $stat->currentCommentsNum + ); + } + + + /** + * 鑾峰彇鏂囩珷绫诲瀷鍒楄〃 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPostFormats($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + return array( + 'standard' => _t('鏍囧噯') + ); + } + + /** + * 鑾峰彇鏂囩珷鐘舵佸垪琛 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPostStatusList($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + return array( + 'draft' => _t('鑽夌ǹ'), + 'pending' => _t('寰呭鏍'), + 'publish' => _t('宸插彂甯') + ); + } + + /** + * 鑾峰彇椤甸潰鐘舵佸垪琛 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPageStatusList($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + return array( + 'draft' => _t('鑽夌ǹ'), + 'publish' => _t('宸插彂甯') + ); + } + + + + /** + * 鑾峰彇璇勮鐘舵佸垪琛 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetCommentStatusList($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + return array( + 'hold' => _t('寰呭鏍'), + 'approve' => _t('鏄剧ず'), + 'spam' => _t('鍨冨溇') + ); + } + + /** + * 鑾峰彇椤甸潰妯℃澘 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPageTemplates($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + $templates = array_flip($this->getTemplates()); + $templates['Default'] = ''; + + return $templates; + } + + /** + * 鑾峰彇绯荤粺閫夐」 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param array $options + * @return array + */ + public function wpGetOptions($blogId, $userName, $password, $options = array()) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'administrator')) { + return $this->error; + } + + $struct = array(); + if (empty($options)) { + $options = array_keys($this->_wpOptions); + } + + foreach ($options as $option) { + if (isset($this->_wpOptions[$option])) { + $struct[$option] = $this->_wpOptions[$option]; + if (isset($struct[$option]['option'])) { + $struct[$option]['value'] = $this->options->{$struct[$option]['option']}; + unset($struct[$option]['option']); + } + } + } + + return $struct; + } + + /** + * 璁剧疆绯荤粺閫夐」 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param array $options + * @return array + */ + public function wpSetOptions($blogId, $userName, $password, $options = array()) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'administrator')) { + return $this->error; + } + + $struct = array(); + foreach ($options as $option => $value) { + if (isset($this->_wpOptions[$option])) { + $struct[$option] = $this->_wpOptions[$option]; + if (isset($struct[$option]['option'])) { + $struct[$option]['value'] = $this->options->{$struct[$option]['option']}; + unset($struct[$option]['option']); + } + + if (!$this->_wpOptions[$option]['readonly'] && isset($this->_wpOptions[$option]['option'])) { + if ($this->db->query($this->db->update('table.options') + ->rows(array('value' => $value)) + ->where('name = ?', $this->_wpOptions[$option]['option'])) > 0) { + $struct[$option]['value'] = $value; + } + } + } + } + + return $struct; + } + + /** + * 鑾峰彇璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $commentId + * @return array + */ + public function wpGetComment($blogId, $userName, $password, $commentId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $comment = $this->singletonWidget('Widget_Comments_Edit', NULL, 'do=get&coid=' . intval($commentId), false); + + if (!$comment->have()) { + return new IXR_Error(404, _t('璇勮涓嶅瓨鍦')); + } + + if (!$comment->commentIsWriteable()) { + return new IXR_Error(403, _t('娌℃湁鑾峰彇璇勮鐨勬潈闄')); + } + + return array( + 'date_created_gmt' => new IXR_Date($this->options->timezone + $comment->created), + 'user_id' => $comment->authorId, + 'comment_id' => $comment->coid, + 'parent' => $comment->parent, + 'status' => $this->typechoToWordpressStatus($comment->status, 'comment'), + 'content' => $comment->text, + 'link' => $comment->permalink, + 'post_id' => $comment->cid, + 'post_title' => $comment->title, + 'author' => $comment->author, + 'author_url' => $comment->url, + 'author_email' => $comment->mail, + 'author_ip' => $comment->ip, + 'type' => $comment->type + ); + } + + /** + * 鑾峰彇璇勮鍒楄〃 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param array $struct + * @return array + */ + public function wpGetComments($blogId, $userName, $password, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $input = array(); + if (!empty($struct['status'])) { + $input['status'] = 'hold' == $input['status'] ? $input['status'] : + $this->wordpressToTypechoStatus($struct['status']); + } else { + $input['__typecho_all_comments'] = 'on'; + } + + if (!empty($struct['post_id'])) { + $input['cid'] = $struct['post_id']; + } + + $pageSize = 10; + if (!empty($struct['number'])) { + $pageSize = abs(intval($struct['number'])); + } + + if (!empty($struct['offset'])) { + $offset = abs(intval($struct['offset'])); + $input['page'] = ceil($offset / $pageSize); + } + + $comments = $this->singletonWidget('Widget_Comments_Admin', 'pageSize=' . $pageSize, $input, false); + $commentsStruct = array(); + + while ($comments->next()) { + $commentsStruct[] = array( + 'date_created_gmt' => new IXR_Date($this->options->timezone + $comments->created), + 'user_id' => $comments->authorId, + 'comment_id' => $comments->coid, + 'parent' => $comments->parent, + 'status' => $this->typechoToWordpressStatus($comments->status, 'comment'), + 'content' => $comments->text, + 'link' => $comments->permalink, + 'post_id' => $comments->cid, + 'post_title' => $comments->title, + 'author' => $comments->author, + 'author_url' => $comments->url, + 'author_email' => $comments->mail, + 'author_ip' => $comments->ip, + 'type' => $comments->type + ); + } + + return $commentsStruct; + } + + /** + * 鑾峰彇璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $commentId + * @return boolean + */ + public function wpDeleteComment($blogId, $userName, $password, $commentId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $commentId = abs(intval($commentId)); + $commentWidget = $this->singletonWidget('Widget_Abstract_Comments'); + $where = $this->db->sql()->where('coid = ?', $commentId); + + if (!$commentWidget->commentIsWriteable($where)) { + return new IXR_Error(403, _t('鏃犳硶缂栬緫姝よ瘎璁')); + } + + return intval($this->singletonWidget('Widget_Abstract_Comments')->delete($where)) > 0; + } + + /** + * 缂栬緫璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $commentId + * @param array $struct + * @return boolean + */ + public function wpEditComment($blogId, $userName, $password, $commentId, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $commentId = abs(intval($commentId)); + $commentWidget = $this->singletonWidget('Widget_Abstract_Comments'); + $where = $this->db->sql()->where('coid = ?', $commentId); + + if (!$commentWidget->commentIsWriteable($where)) { + return new IXR_Error(403, _t('鏃犳硶缂栬緫姝よ瘎璁')); + } + + $input = array(); + + if (isset($struct['date_created_gmt'])) { + $input['created'] = $struct['date_created_gmt']->getTimestamp() - $this->options->timezone + $this->options->serverTimezone; + } + + if (isset($struct['status'])) { + $input['status'] = $this->wordpressToTypechoStatus($struct['status'], 'comment'); + } + + if (isset($struct['content'])) { + $input['text'] = $struct['content']; + } + + if (isset($struct['author'])) { + $input['author'] = $struct['author']; + } + + if (isset($struct['author_url'])) { + $input['url'] = $struct['author_url']; + } + + if (isset($struct['author_email'])) { + $input['mail'] = $struct['author_email']; + } + + $result = $commentWidget->update((array) $input, $where); + + if (!$result) { + return new IXR_Error(404, _t('璇勮涓嶅瓨鍦')); + } + + return true; + } + + /** + * 鏇存柊璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param mixed $path + * @param array $struct + * @return int + */ + public function wpNewComment($blogId, $userName, $password, $path, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + if (is_numeric($path)) { + $post = $this->singletonWidget('Widget_Archive', 'type=single', 'cid=' . $path, false); + } else { + /** 妫鏌ョ洰鏍囧湴鍧鏄惁姝g‘*/ + $pathInfo = Typecho_Common::url(substr($path, strlen($this->options->index)), '/'); + $post = Typecho_Router::match($pathInfo); + } + + /** 杩欐牱鍙互寰楀埌cid鎴栬卻lug*/ + if (!isset($post) || !($post instanceof Widget_Archive) || !$post->have() || !$post->is('single')) { + return new IXR_Error(404, _t('杩欎釜鐩爣鍦板潃涓嶅瓨鍦')); + } + + $input = array(); + $input['permalink'] = $post->pathinfo; + $input['type'] = 'comment'; + + if (isset($struct['comment_author'])) { + $input['author'] = $struct['author']; + } + + if (isset($struct['comment_author_email'])) { + $input['mail'] = $struct['author_email']; + } + + if (isset($struct['comment_author_url'])) { + $input['url'] = $struct['author_url']; + } + + if (isset($struct['comment_parent'])) { + $input['parent'] = $struct['comment_parent']; + } + + if (isset($struct['content'])) { + $input['text'] = $struct['content']; + } + + try { + $commentWidget = $this->singletonWidget('Widget_Feedback', 'checkReferer=false', $input, false); + $commentWidget->action(); + return intval($commentWidget->coid); + } catch (Typecho_Exception $e) { + return new IXR_Error(500, $e->getMessage()); + } + + return new IXR_Error(403, _t('鏃犳硶娣诲姞璇勮')); + } + + + + /** + * 鑾峰彇濯掍綋鏂囦欢 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param struct $struct + * @return boolean + */ + public function wpGetMediaLibrary($blogId, $userName, $password, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + + $input = array(); + + if (!empty($struct['parent_id'])) { + $input['parent'] = $struct['parent_id']; + } + + if (!empty($struct['mime_type'])) { + $input['mime'] = $struct['mime_type']; + } + + $pageSize = 10; + if (!empty($struct['number'])) { + $pageSize = abs(intval($struct['number'])); + } + + if (!empty($struct['offset'])) { + $input['page'] = abs(intval($struct['offset'])) + 1; + } + + $attachments = $this->singletonWidget('Widget_Contents_Attachment_Admin', 'pageSize=' . $pageSize, $input, false); + $attachmentsStruct = array(); + + while ($attachments->next()) { + $attachmentsStruct[] = array( + 'attachment_id' => $attachments->cid, + 'date_created_gmt' => new IXR_Date($this->options->timezone + $attachments->created), + 'parent' => $attachments->parent, + 'link' => $attachments->attachment->url, + 'title' => $attachments->title, + 'caption' => $attachments->slug, + 'description' => $attachments->attachment->description, + 'metadata' => array( + 'file' => $attachments->attachment->path, + 'size' => $attachments->attachment->size, + ), + 'thumbnail' => $attachments->attachment->url, + + ); + } + return $attachmentsStruct; + } + + /** + * 鑾峰彇濯掍綋鏂囦欢 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param int $attachmentId + * @return boolean + */ + public function wpGetMediaItem($blogId, $userName, $password, $attachmentId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + + $attachment = $this->singletonWidget('Widget_Contents_Attachment_Edit', NULL, "cid={$attachmentId}"); + $struct = array( + 'attachment_id' => $attachment->cid, + 'date_created_gmt' => new IXR_Date($this->options->timezone + $attachment->created), + 'parent' => $attachment->parent, + 'link' => $attachment->attachment->url, + 'title' => $attachment->title, + 'caption' => $attachment->slug, + 'description' => $attachment->attachment->description, + 'metadata' => array( + 'file' => $attachment->attachment->path, + 'size' => $attachment->attachment->size, + ), + 'thumbnail' => $attachment->attachment->url, + + ); + return $struct; + } + + + + /**about MetaWeblog API, you can see http://www.xmlrpc.com/metaWeblogApi*/ + /** + * MetaWeblog API + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return int + */ + public function mwNewPost($blogId, $userName, $password, $content, $publish) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + /** 鍙栧緱content鍐呭 */ + $input = array(); + $type = isset($content['post_type']) && 'page' == $content['post_type'] ? 'page' : 'post'; + + $input['title'] = trim($content['title']) == NULL ? _t('鏈懡鍚嶆枃妗') : $content['title']; + + if (isset($content['slug'])) { + $input['slug'] = $content['slug']; + } else if (isset($content['wp_slug'])) { + //fix issue 338, wlw鍙彂閫佽繖涓 + $input['slug'] = $content['wp_slug']; + } + + $input['text'] = !empty($content['mt_text_more']) ? $content['description'] + . "\n<!--more-->\n" . $content['mt_text_more'] : $content['description']; + $input['text'] = $this->pluginHandle()->textFilter($input['text'], $this); + + $input['password'] = isset($content["wp_password"]) ? $content["wp_password"] : NULL; + $input['order'] = isset($content["wp_page_order"]) ? $content["wp_page_order"] : NULL; + + $input['tags'] = isset($content['mt_keywords']) ? $content['mt_keywords'] : NULL; + $input['category'] = array(); + + if (isset($content['postId'])) { + $input['cid'] = $content['postId']; + } + + if ('page' == $type && isset($content['wp_page_template'])) { + $input['template'] = $content['wp_page_template']; + } + + if (isset($content['dateCreated'])) { + /** 瑙e喅瀹㈡埛绔笌鏈嶅姟鍣ㄧ鏃堕棿鍋忕Щ */ + $input['created'] = $content['dateCreated']->getTimestamp() - $this->options->timezone + $this->options->serverTimezone; + } + + if (!empty($content['categories']) && is_array($content['categories'])) { + foreach ($content['categories'] as $category) { + if (!$this->db->fetchRow($this->db->select('mid') + ->from('table.metas')->where('type = ? AND name = ?', 'category', $category))) { + $result = $this->wpNewCategory($blogId, $userName, $password, array('name' => $category)); + if (true !== $result) { + return $result; + } + } + + $input['category'][] = $this->db->fetchObject($this->db->select('mid') + ->from('table.metas')->where('type = ? AND name = ?', 'category', $category) + ->limit(1))->mid; + } + } + + $input['allowComment'] = (isset($content['mt_allow_comments']) && (1 == $content['mt_allow_comments'] + || 'open' == $content['mt_allow_comments'])) ? 1 : ((isset($content['mt_allow_comments']) && (0 == $content['mt_allow_comments'] + || 'closed' == $content['mt_allow_comments'])) ? 0 : $this->options->defaultAllowComment); + + $input['allowPing'] = (isset($content['mt_allow_pings']) && (1 == $content['mt_allow_pings'] + || 'open' == $content['mt_allow_pings'])) ? 1 : ((isset($content['mt_allow_pings']) && (0 == $content['mt_allow_pings'] + || 'closed' == $content['mt_allow_pings'])) ? 0 : $this->options->defaultAllowPing); + + $input['allowFeed'] = $this->options->defaultAllowFeed; + $input['do'] = $publish ? 'publish' : 'save'; + + /** 璋冩暣鐘舵 */ + if (isset($content["{$type}_status"])) { + $status = $this->wordpressToTypechoStatus($content["{$type}_status"], $type); + + if ('publish' == $status || 'waiting' == $status || 'private' == $status) { + $input['do'] = 'publish'; + + if ('private' == $status) { + $input['private'] = 1; + } + } else { + $input['do'] = 'save'; + } + } + + /** 瀵规湭褰掓。闄勪欢杩涜褰掓。 */ + $unattached = $this->db->fetchAll($this->select()->where('table.contents.type = ? AND + (table.contents.parent = 0 OR table.contents.parent IS NULL)', 'attachment'), array($this, 'filter')); + + if (!empty($unattached)) { + foreach ($unattached as $attach) { + if (false !== strpos($input['text'], $attach['attachment']->url)) { + if (!isset($input['attachment'])) { + $input['attachment'] = array(); + } + + $input['attachment'][] = $attach['cid']; + } + } + } + + /** 璋冪敤宸叉湁缁勪欢 */ + try { + /** 鎻掑叆 */ + if ('page' == $type) { + $this->singletonWidget('Widget_Contents_Page_Edit', NULL, $input, false)->action(); + } else { + $this->singletonWidget('Widget_Contents_Post_Edit', NULL, $input, false)->action(); + } + + return $this->singletonWidget('Widget_Notice')->getHighlightId(); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + } + + /** + * 缂栬緫post + * + * @param int $postId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return int + */ + public function mwEditPost($postId, $userName, $password, $content, $publish = true) + { + $content['postId'] = $postId; + return $this->mwNewPost(1, $userName, $password, $content, $publish); + } + + /** + * 鑾峰彇鎸囧畾id鐨刾ost + * + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function mwGetPost($postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($post); + /** 鍙渶瑕佸垎绫荤殑name*/ + $categories = Typecho_Common::arrayFlatten($post->categories, 'name'); + $tags = Typecho_Common::arrayFlatten($post->tags, 'name'); + + $postStruct = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $post->created), + 'userid' => $post->authorId, + 'postid' => $post->cid, + 'description' => $excerpt, + 'title' => $post->title, + 'link' => $post->permalink, + 'permaLink' => $post->permalink, + 'categories' => $categories, + 'mt_excerpt' => $post->description, + 'mt_text_more' => $more, + 'mt_allow_comments' => intval($post->allowComment), + 'mt_allow_pings' => intval($post->allowPing), + 'mt_keywords' => implode(', ', $tags), + 'wp_slug' => $post->slug, + 'wp_password' => $post->password, + 'wp_author' => $post->author->name, + 'wp_author_id' => $post->authorId, + 'wp_author_display_name' => $post->author->screenName, + 'date_created_gmt' => new IXR_Date($post->created), + 'post_status' => $this->typechoToWordpressStatus($post->status, 'post'), + 'custom_fields' => array(), + 'sticky' => 0 + ); + + return $postStruct; + } + + /** + * 鑾峰彇鍓$postsNum涓猵ost + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postsNum + * @access public + * @return postStructs + */ + public function mwGetRecentPosts($blogId, $userName, $password, $postsNum) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $posts = $this->singletonWidget('Widget_Contents_Post_Admin', "pageSize={$postsNum}", 'status=all'); + + $postStructs = array(); + /** 濡傛灉杩欎釜post瀛樺湪鍒欒緭鍑猴紝鍚﹀垯杈撳嚭閿欒 */ + while ($posts->next()) { + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($posts); + + /** 鍙渶瑕佸垎绫荤殑name*/ + /** 鍙互鐢╢latten鍑芥暟澶勭悊 */ + $categories = Typecho_Common::arrayFlatten($posts->categories, 'name'); + $tags = Typecho_Common::arrayFlatten($posts->tags, 'name'); + + $postStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $posts->created), + 'userid' => $posts->authorId, + 'postid' => $posts->cid, + 'description' => $excerpt, + 'title' => $posts->title, + 'link' => $posts->permalink, + 'permaLink' => $posts->permalink, + 'categories' => $categories, + 'mt_excerpt' => $posts->description, + 'mt_text_more' => $more, + 'wp_more_text' => $more, + 'mt_allow_comments' => intval($posts->allowComment), + 'mt_allow_pings' => intval($posts->allowPing), + 'mt_keywords' => implode(', ', $tags), + 'wp_slug' => $posts->slug, + 'wp_password' => $posts->password, + 'wp_author' => $posts->author->name, + 'wp_author_id' => $posts->authorId, + 'wp_author_display_name' => $posts->author->screenName, + 'date_created_gmt' => new IXR_Date($posts->created), + 'post_status' => $this->typechoToWordpressStatus($posts->status, 'post'), + 'custom_fields' => array(), + 'wp_post_format' => 'standard', + 'date_modified' => new IXR_Date($this->options->timezone + $posts->modified), + 'date_modified_gmt' => new IXR_Date($posts->modified), + 'wp_post_thumbnail' => '', + 'sticky' => 0 + ); + } + + return $postStructs; + } + + /** + * 鑾峰彇鎵鏈夌殑鍒嗙被 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return categoryStructs + */ + public function mwGetCategories($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + $categories = $this->singletonWidget('Widget_Metas_Category_List'); + + /** 鍒濆鍖朿ategory鏁扮粍*/ + $categoryStructs = array(); + while ($categories->next()) { + $categoryStructs[] = array( + 'categoryId' => $categories->mid, + 'parentId' => $categories->parent, + 'categoryName' => $categories->name, + 'categoryDescription' => $categories->description, + 'description' => $categories->name, + 'htmlUrl' => $categories->permalink, + 'rssUrl' => $categories->feedUrl, + ); + } + + return $categoryStructs; + } + + /** + * mwNewMediaObject + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param mixed $data + * @access public + * @return void + */ + public function mwNewMediaObject($blogId, $userName, $password, $data) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $result = Widget_Upload::uploadHandle($data); + + if (false === $result) { + return IXR_Error(500, _t('涓婁紶澶辫触')); + } else { + + $insertId = $this->insert(array( + 'title' => $result['name'], + 'slug' => $result['name'], + 'type' => 'attachment', + 'status' => 'publish', + 'text' => serialize($result), + 'allowComment' => 1, + 'allowPing' => 0, + 'allowFeed' => 1 + )); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $insertId) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + /** 澧炲姞鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->upload($this); + + return array( + 'file' => $this->attachment->name, + 'url' => $this->attachment->url + ); + } + } + + /** + * 鑾峰彇 $postNum涓猵ost title + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postNum + * @access public + * @return postTitleStructs + */ + public function mtGetRecentPostTitles($blogId, $userName, $password, $postsNum) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + /** 璇诲彇鏁版嵁*/ + $posts = $this->singletonWidget('Widget_Contents_Post_Admin', "pageSize=$postsNum", 'status=all'); + + /**鍒濆鍖*/ + $postTitleStructs = array(); + while ($posts->next()) { + $postTitleStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $posts->created), + 'userid' => $posts->authorId, + 'postid' => $posts->cid, + 'title' => $posts->title, + 'date_created_gmt' => new IXR_Date($this->options->timezone + $posts->created) + ); + } + + return $postTitleStructs; + } + + /** + * 鑾峰彇鍒嗙被鍒楄〃 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return categories + */ + public function mtGetCategoryList($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + $categories = $this->singletonWidget('Widget_Metas_Category_List'); + + /** 鍒濆鍖朿ategorise鏁扮粍*/ + $categoryStructs = array(); + while ($categories->next()) { + $categoryStructs[] = array( + 'categoryId' => $categories->mid, + 'categoryName' => $categories->name, + ); + } + return $categoryStructs; + } + + /** + * 鑾峰彇鎸囧畾post鐨勫垎绫 + * + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function mtGetPostCategories($postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + /** 鏍煎紡鍖朿ategories*/ + $categories = array(); + foreach ($post->categories as $category) { + $categories[] = array( + 'categoryName' => $category['name'], + 'categoryId' => $category['mid'], + 'isPrimary' => true + ); + } + return $categories; + } + + /** + * 淇敼post鐨勫垎绫 + * + * @param int $postId + * @param string $userName + * @param string $password + * @param string $categories + * @access public + * @return bool + */ + public function mtSetPostCategories($postId, $userName, $password, $categories) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + $post->setCategories($postId, Typecho_Common::arrayFlatten($categories, 'categoryId'), + 'publish' == $post->status); + return true; + } + + /** + * 鍙戝竷(閲嶅缓)鏁版嵁 + * + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return bool + */ + public function mtPublishPost($postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + /** 杩囨护id涓$postId鐨刾ost */ + $select = $this->select()->where('table.contents.cid = ? AND table.contents.type = ?', $postId, 'post')->limit(1); + + /** 鎻愪氦鏌ヨ */ + $post = $this->$db->fetchRow($select, array($this, 'push')); + if ($this->authorId != $this->user->uid && !$this->checkAccess($userName, $password, 'administrator')) { + return new IXR_Error(403, '鏉冮檺涓嶈冻.'); + } + + /** 鏆傛椂鍙仛鎴愬彂甯*/ + $content = array(); + $this->update($content, $this->db->sql()->where('table.contents.cid = ?', $postId)); + + + } + + /** + * 鍙栧緱褰撳墠鐢ㄦ埛鐨勬墍鏈塨log + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function bloggerGetUsersBlogs($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array(); + $struct[] = array( + 'isAdmin' => $this->user->pass('administrator', true), + 'url' => $this->options->siteUrl, + 'blogid' => '1', + 'blogName' => $this->options->title, + 'xmlrpc' => $this->options->xmlRpcUrl + ); + + return $struct; + } + + /** + * 杩斿洖褰撳墠鐢ㄦ埛鐨勪俊鎭 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function bloggerGetUserInfo($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array( + 'nickname' => $this->user->screenName, + 'userid' => $this->user->uid, + 'url' => $this->user->url, + 'email' => $this->user->mail, + 'lastname' => '', + 'firstname' => '' + ); + + return $struct; + } + + /** + * 鑾峰彇褰撳墠浣滆呯殑涓涓寚瀹歩d鐨刾ost鐨勮缁嗕俊鎭 + * + * @param int $blogId + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function bloggerGetPost($blogId, $postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + $categories = Typecho_Common::arrayFlatten($post->categories, 'name'); + + $content = '<title>' . $post->title . ''; + $content .= '' . implode(',', $categories) . ''; + $content .= stripslashes($post->text); + + $struct = array( + 'userid' => $post->authorId, + 'dateCreated' => new IXR_Date($this->options->timezone + $post->created), + 'content' => $content, + 'postid' => $post->cid + ); + return $struct; + } + + /** + * bloggerDeletePost + * 鍒犻櫎鏂囩珷 + * @param mixed $blogId + * @param mixed $userName + * @param mixed $password + * @param mixed $publish + * @access public + * @return bool + */ + public function bloggerDeletePost($blogId, $postId, $userName, $password, $publish) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + try { + $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}", false)->deletePost(); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + } + + /** + * 鑾峰彇褰撳墠浣滆呭墠postsNum涓猵ost + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postsNum + * @access public + * @return void + */ + public function bloggerGetRecentPosts($blogId, $userName, $password, $postsNum) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + //todo:闄愬埗鏁伴噺 + $posts = $this->singletonWidget('Widget_Contents_Post_Admin', "pageSize=$postsNum", 'status=all'); + + $postStructs = array(); + while ($posts->next()) { + $categories = Typecho_Common::arrayFlatten($posts->categories, 'name'); + + $content = '' . $posts->title . ''; + $content .= '' . implode(',', $categories) . ''; + $content .= stripslashes($posts->text); + + $struct = array( + 'userid' => $posts->authorId, + 'dateCreated' => new IXR_Date($this->options->timezone + $posts->created), + 'content' => $content, + 'postid' => $posts->cid, + ); + $postStructs[] = $struct; + } + if (NULL == $postStructs) { + return new IXR_Error('404', '娌℃湁浠讳綍鏂囩珷'); + } + return $postStructs; + } + + /** + * bloggerGetTemplate + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param mixed $template + * @access public + * @return void + */ + public function bloggerGetTemplate($blogId, $userName, $password, $template) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + /** todo:鏆傛椂鍏堣繑鍥瀟rue*/ + return true; + } + + /** + * bloggerSetTemplate + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param mixed $content + * @param mixed $template + * @access public + * @return void + */ + public function bloggerSetTemplate($blogId, $userName, $password, $content, $template) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + /** todo:鏆傛椂鍏堣繑鍥瀟rue*/ + return true; + } + + /** + * pingbackPing + * + * @param string $source + * @param string $target + * @access public + * @return void + */ + public function pingbackPing($source, $target) + { + /** 妫鏌ユ簮鍦板潃鏄惁瀛樺湪*/ + if (!($http = Typecho_Http_Client::get())) { + return new IXR_Error(16, _t('婧愬湴鍧鏈嶅姟鍣ㄩ敊璇')); + } + + try { + + $http->setTimeout(5)->send($source); + $response = $http->getResponseBody(); + + if (200 == $http->getResponseStatus()) { + + if (!$http->getResponseHeader('x-pingback')) { + preg_match_all("/]*rel=[\"']([^\"']*)[\"'][^>]*href=[\"']([^\"']*)[\"'][^>]*>/i", $response, $out); + if (!isset($out[1]['pingback'])) { + return new IXR_Error(50, _t('婧愬湴鍧涓嶆敮鎸丳ingBack')); + } + } + + } else { + return new IXR_Error(16, _t('婧愬湴鍧鏈嶅姟鍣ㄩ敊璇')); + } + + } catch (Exception $e) { + return new IXR_Error(16, _t('婧愬湴鍧鏈嶅姟鍣ㄩ敊璇')); + } + + /** 妫鏌ョ洰鏍囧湴鍧鏄惁姝g‘*/ + $pathInfo = Typecho_Common::url(substr($target, strlen($this->options->index)), '/'); + $post = Typecho_Router::match($pathInfo); + + /** 杩欐牱鍙互寰楀埌cid鎴栬卻lug*/ + if (!($post instanceof Widget_Archive) || !$post->have() || !$post->is('single')) { + return new IXR_Error(33, _t('杩欎釜鐩爣鍦板潃涓嶅瓨鍦')); + } + + if ($post) { + /** 妫鏌ユ槸鍚﹀彲浠ing*/ + if ($post->allowPing) { + + /** 鐜板湪鍙互ping浜嗭紝浣嗘槸杩樺緱妫鏌ヤ笅杩欎釜pingback鏄惁宸茬粡瀛樺湪浜*/ + $pingNum = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments')->where('table.comments.cid = ? AND table.comments.url = ? AND table.comments.type <> ?', + $post->cid, $source, 'comment'))->num; + + if ($pingNum <= 0) { + + /** 鐜板湪寮濮嬫彃鍏ヤ互鍙婇偖浠舵彁绀轰簡 $response灏辨槸绗竴琛岃姹傛椂杩斿洖鐨勬暟缁*/ + preg_match("/\([^<]*?)\<\/title\\>/is", $response, $matchTitle); + $finalTitle = Typecho_Common::removeXSS(trim(strip_tags($matchTitle[1]))); + + /** 骞叉帀html tag锛屽彧鐣欎笅*/ + $text = Typecho_Common::stripTags($response, ''); + + /** 姝ゅ灏$target quote,鐣欑潃鍚庨潰鐢*/ + $pregLink = preg_quote($target); + + /** 鎵惧嚭鍚湁target閾炬帴鐨勬渶闀跨殑涓琛屼綔涓$finalText*/ + $finalText = ''; + $lines = explode("\n", $text); + + foreach ($lines as $line) { + $line = trim($line); + if (NULL != $line) { + if (preg_match("|]*href=[\"']{$pregLink}[\"'][^>]*>(.*?)|",$line)) { + if (strlen($line) > strlen($finalText)) { + /** 涔熻骞叉帀锛*/ + $finalText = Typecho_Common::stripTags($line); + } + } + } + } + + /** 鎴彇涓娈靛瓧*/ + if (NULL == trim($finalText)) { + return new IXR_Error('17', _t('婧愬湴鍧涓笉鍖呮嫭鐩爣鍦板潃')); + } + + $finalText = '[...]' . Typecho_Common::subStr($finalText, 0, 200, '') . '[...]'; + + $pingback = array( + 'cid' => $post->cid, + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'author' => $finalTitle, + 'url' => Typecho_Common::safeUrl($source), + 'text' => $finalText, + 'ownerId' => $post->author->uid, + 'type' => 'pingback', + 'status' => $this->options->commentsRequireModeration ? 'waiting' : 'approved' + ); + + /** 鍔犲叆plugin */ + $pingback = $this->pluginHandle()->pingback($pingback, $post); + + /** 鎵ц鎻掑叆*/ + $insertId = $this->singletonWidget('Widget_Abstract_Comments')->insert($pingback); + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishPingback($this); + + return $insertId; + + /** todo:鍙戦侀偖浠舵彁绀*/ + } else { + return new IXR_Error(48, _t('PingBack宸茬粡瀛樺湪')); + } + } else { + return IXR_Error(49, _t('鐩爣鍦板潃绂佹Ping')); + } + } else { + return new IXR_Error(33, _t('杩欎釜鐩爣鍦板潃涓嶅瓨鍦')); + } + } + + /** + * 鍥炴敹鍙橀噺 + * + * @access public + * @param string $methodName 鏂规硶 + * @return void + */ + public function hookAfterCall($methodName) + { + if (!empty($this->_usedWidgetNameList)) { + foreach ($this->_usedWidgetNameList as $key => $widgetName) { + $this->destory($widgetName); + unset($this->_usedWidgetNameList[$key]); + } + } + } + + /** + * 鍏ュ彛鎵ц鏂规硶 + * + * @access public + * @return void + */ + public function action() + { + if (isset($this->request->rsd)) { + echo +<< + + + Typecho + http://www.typecho.org/ + {$this->options->siteUrl} + + + + + + + + +EOF; + } else if (isset($this->request->wlw)) { + echo +<< + + + Yes + Yes + Yes + Yes + Yes + + Yes + Yes + Yes + Yes + Yes + Yes + + Yes + Yes + Yes + Yes + Yes + Yes + + Yes + + Yes + No + Yes + True + No + + + +EOF; + } else { + + + + /** 鐩存帴鎶婂垵濮嬪寲鏀惧埌杩欓噷 */ + new IXR_Server(array( + /** WordPress API */ + 'wp.getPage' => array($this, 'wpGetPage'), + 'wp.getPages' => array($this, 'wpGetPages'), + 'wp.newPage' => array($this, 'wpNewPage'), + 'wp.deletePage' => array($this, 'wpDeletePage'), + 'wp.editPage' => array($this, 'wpEditPage'), + 'wp.getPageList' => array($this, 'wpGetPageList'), + 'wp.getAuthors' => array($this, 'wpGetAuthors'), + 'wp.getCategories' => array($this, 'mwGetCategories'), + 'wp.newCategory' => array($this, 'wpNewCategory'), + 'wp.suggestCategories' => array($this, 'wpSuggestCategories'), + 'wp.uploadFile' => array($this, 'mwNewMediaObject'), + + /** New Wordpress API since 2.9.2 */ + 'wp.getUsersBlogs' => array($this, 'wpGetUsersBlogs'), + 'wp.getTags' => array($this, 'wpGetTags'), + 'wp.deleteCategory' => array($this, 'wpDeleteCategory'), + 'wp.getCommentCount' => array($this, 'wpGetCommentCount'), + 'wp.getPostStatusList' => array($this, 'wpGetPostStatusList'), + 'wp.getPageStatusList' => array($this, 'wpGetPageStatusList'), + 'wp.getPageTemplates' => array($this, 'wpGetPageTemplates'), + 'wp.getOptions' => array($this, 'wpGetOptions'), + 'wp.setOptions' => array($this, 'wpSetOptions'), + 'wp.getComment' => array($this, 'wpGetComment'), + 'wp.getComments' => array($this, 'wpGetComments'), + 'wp.deleteComment' => array($this, 'wpDeleteComment'), + 'wp.editComment' => array($this, 'wpEditComment'), + 'wp.newComment' => array($this, 'wpNewComment'), + 'wp.getCommentStatusList' => array($this, 'wpGetCommentStatusList'), + + /** New Wordpress API after 2.9.2 */ + 'wp.getProfile' => array($this, 'wpGetProfile'), + 'wp.getPostFormats' => array($this, 'wpGetPostFormats'), + 'wp.getMediaLibrary' => array($this, 'wpGetMediaLibrary'), + 'wp.getMediaItem' => array($this, 'wpGetMediaItem'), + 'wp.editPost' => array($this, 'wpEditPost'), + + /** Blogger API */ + 'blogger.getUsersBlogs' => array($this, 'bloggerGetUsersBlogs'), + 'blogger.getUserInfo' => array($this, 'bloggerGetUserInfo'), + 'blogger.getPost' => array($this, 'bloggerGetPost'), + 'blogger.getRecentPosts' => array($this, 'bloggerGetRecentPosts'), + 'blogger.getTemplate' => array($this, 'bloggerGetTemplate'), + 'blogger.setTemplate' => array($this, 'bloggerSetTemplate'), + 'blogger.deletePost' => array($this, 'bloggerDeletePost'), + + /** MetaWeblog API (with MT extensions to structs) */ + 'metaWeblog.newPost' => array($this, 'mwNewPost'), + 'metaWeblog.editPost' => array($this, 'mwEditPost'), + 'metaWeblog.getPost' => array($this, 'mwGetPost'), + 'metaWeblog.getRecentPosts' => array($this, 'mwGetRecentPosts'), + 'metaWeblog.getCategories' => array($this, 'mwGetCategories'), + 'metaWeblog.newMediaObject' => array($this, 'mwNewMediaObject'), + + /** MetaWeblog API aliases for Blogger API */ + 'metaWeblog.deletePost' => array($this, 'bloggerDeletePost'), + 'metaWeblog.getTemplate' => array($this, 'bloggerGetTemplate'), + 'metaWeblog.setTemplate' => array($this, 'bloggerSetTemplate'), + 'metaWeblog.getUsersBlogs' => array($this, 'bloggerGetUsersBlogs'), + + /** MovableType API */ + 'mt.getCategoryList' => array($this, 'mtGetCategoryList'), + 'mt.getRecentPostTitles' => array($this, 'mtGetRecentPostTitles'), + 'mt.getPostCategories' => array($this, 'mtGetPostCategories'), + 'mt.setPostCategories' => array($this, 'mtSetPostCategories'), + 'mt.publishPost' => array($this, 'mtPublishPost'), + + /** PingBack */ + 'pingback.ping' => array($this,'pingbackPing'), + 'pingback.extensions.getPingbacks' => array($this,'pingbackExtensionsGetPingbacks'), + + /** hook after */ + 'hook.afterCall' => array($this, 'hookAfterCall'), + )); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirieblog.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirieblog.sql" new file mode 100644 index 0000000..3a79713 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/kirieblog.sql" @@ -0,0 +1,250 @@ +-- MySQL dump 10.13 Distrib 5.5.46, for Linux (x86_64) +-- +-- Host: localhost Database: kirieblog +-- ------------------------------------------------------ +-- Server version 5.5.46-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `kirieblog_comments` +-- + +DROP TABLE IF EXISTS `kirieblog_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `kirieblog_comments` ( + `coid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cid` int(10) unsigned DEFAULT '0', + `created` int(10) unsigned DEFAULT '0', + `author` varchar(200) DEFAULT NULL, + `authorId` int(10) unsigned DEFAULT '0', + `ownerId` int(10) unsigned DEFAULT '0', + `mail` varchar(200) DEFAULT NULL, + `url` varchar(200) DEFAULT NULL, + `ip` varchar(64) DEFAULT NULL, + `agent` varchar(200) DEFAULT NULL, + `text` text, + `type` varchar(16) DEFAULT 'comment', + `status` varchar(16) DEFAULT 'approved', + `parent` int(10) unsigned DEFAULT '0', + PRIMARY KEY (`coid`), + KEY `cid` (`cid`), + KEY `created` (`created`) +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `kirieblog_comments` +-- + +LOCK TABLES `kirieblog_comments` WRITE; +/*!40000 ALTER TABLE `kirieblog_comments` DISABLE KEYS */; +INSERT INTO `kirieblog_comments` VALUES (2,4,1449309724,'sa',0,1,'asd@ds.cof',NULL,'140.207.196.5','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36','','comment','approved',0),(3,2,1449309749,'sa',0,1,'asd@ds.cof',NULL,'140.207.196.5','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36','','comment','approved',0),(4,2,1449310801,'qwe',0,1,'qwe@qwe.com',NULL,'140.207.196.3','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.73 Safari/537.36','qwe','comment','approved',3),(5,14,1449383989,'sa',0,1,'asd@ds.cof',NULL,'140.207.196.6','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36','','comment','approved',0),(6,14,1449384207,'sdf',0,1,'sdf@sdf.cn','http://www.baidu.com','202.118.236.189','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36','\"\' + + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.flaggg.php.swp" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.flaggg.php.swp" new file mode 100644 index 0000000..459532a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.flaggg.php.swp" @@ -0,0 +1 @@ + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.user.ini" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.user.ini" new file mode 100644 index 0000000..6203b2b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/.user.ini" @@ -0,0 +1 @@ +open_basedir=/home/wwwroot/mc4dm1n.hack123.pw:/tmp/:/proc/ diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/common.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/common.php" new file mode 100644 index 0000000..b0f6019 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/common.php" @@ -0,0 +1,41 @@ +query($sql); + return $result->num_rows; +} + +function Hex2String($hex){ + $string=''; + for ($i=0; $i < strlen($hex)-1; $i+=2){ + $string .= chr(hexdec($hex[$i].$hex[$i+1])); + } + return $string; +} + +// 璁剧疆iv鍜屽瘑閽 +$cbc_iv = 'o23@J2m,'; +$cbc_pass = '1u8#%ash'; \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/config.inc.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/config.inc.php" new file mode 100644 index 0000000..813c4da --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/config/config.inc.php" @@ -0,0 +1,39 @@ +set_charset("utf8mb4"); + date_default_timezone_set('Asia/Shanghai'); + + function SqlGuard($input, $db) { + if (get_magic_quotes_gpc()) { + $input = stripcslashes($input); + } + $input = strip_tags($input); + $input = $db->real_escape_string(trim($input)); + return $input; + } diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/debug.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/debug.php" new file mode 100644 index 0000000..3c8610a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/debug.php" @@ -0,0 +1,38 @@ + + + +query($sql); +if (!$result) { + exit; +} else { + echo 'got!'; +} + +?> + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/footer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/footer.php" new file mode 100644 index 0000000..bb4583f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/footer.php" @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/header.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/header.php" new file mode 100644 index 0000000..951ff2c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/header.php" @@ -0,0 +1,16 @@ + + + + + + + + + + + HDUISA MC 绠$悊涓績 + + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index.php" new file mode 100644 index 0000000..0b203a0 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index.php" @@ -0,0 +1,76 @@ + + +
    +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    + query($sql); + if ($result->num_rows != 1) { + echo ''; + exit; + } else { + // check XFF + + // 楠岃瘉閫氳繃鍒欒繘鍏ヤ簩娆¢獙璇 + $_SESSION['auth1'] = true; + $_SESSION['username'] = $username; + $_SESSION['code'] = CreateRandomString(6); + header('Location: index2.php'); + } + + ?> +
    +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index2.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index2.php" new file mode 100644 index 0000000..e87731e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/index2.php" @@ -0,0 +1,122 @@ +'; +echo ''; +?> + +
    +
    +
    +
    +
    + +
    +
    + +
    + + /> + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    + alert("鐭俊楠岃瘉鐮侀敊璇紒");document.reload(true);'; + exit; + } + + // check idcard + if ($_SESSION['username'] == 'kirie') { + $realidcard = '3798'; + } else if ($_SESSION['username'] == 'mcshop_sale') { + $realidcard = '3889'; + } else { + $realidcard = 'xxxxx123123'; + } + if ($idcard != $realidcard) { + echo ''; + exit; + } + + $_SESSION['auth2'] = true; + + $username = $_SESSION['username']; + $sql = "SELECT * FROM mcshop_admin WHERE username = '$username'"; + $result = $dbConn->query($sql); + $admin_info = $result->fetch_assoc(); + + $cookieArray = array(); + $cookieArray['username'] = $username; + $cookieArray['level'] = $admin_info['level']; + + $cookieJson = json_encode($cookieArray); + + // print_r($cookieJson); + + $encCookie = mcrypt_encrypt(MCRYPT_BLOWFISH, $cbc_pass, $cookieJson, MCRYPT_MODE_CBC, $cbc_iv); + $encCookie = base64_encode($encCookie); + //echo $encCookie; + setcookie('ht',$encCookie, time()+36000); + header('Location: main.php'); + + ?> +
    +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/js/common.js" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/js/common.js" new file mode 100644 index 0000000..c7a609b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/js/common.js" @@ -0,0 +1,3 @@ +$(document).ready(function () { + +}); \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/main.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/main.php" new file mode 100644 index 0000000..93a7990 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/main.php" @@ -0,0 +1,122 @@ + + +'.$arrayJson[29]; +if ($arrayJson[29] == '0') { + $currentLevel = 0; +} else if ($arrayJson[29] == '1') { + $currentLevel = 1; +} else if ($arrayJson[29] == '2') { + $currentLevel = 2; +} else { + $currentLevel = 2; +} + +// $currentLevel = 0; +// echo 'current level:'.$currentLevel; + +switch ($currentLevel) { + case '2': + echo <<< EOF +
    +EOF; + + break; + case '1': + echo <<< EOF +
    +
    +
    +
    +

    + Hello, 鍟嗗煄绠$悊鍛! +

    +

    + 鎮ㄥ彲浠ョ鐞嗙敤鎴蜂俊鎭紝骞朵笖涓虹敤鎴峰厖鍊笺 +

    +

    + 绠$悊鐢ㄦ埛淇℃伅 + 鍏呭 +

    +
    +
    +
    +
    +EOF; + + break; + case '0': + echo <<< EOF +
    +
    +
    +
    +

    + Hello, 瓒呯骇绠$悊鍛! +

    +

    + 鎮ㄥ彲浠ヤ氦涓猣lag銆傘傘傘 + +

    +

    + + + + +

    +
    +
    +
    +
    +EOF; + break; + default: + header('Location: 404.html'); + exit; + break; +} + +?> + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/manager-user.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/manager-user.php" new file mode 100644 index 0000000..6cac717 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/manager-user.php" @@ -0,0 +1 @@ +Nothing Here. \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/pay.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/pay.php" new file mode 100644 index 0000000..518cc04 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/pay.php" @@ -0,0 +1,66 @@ + + +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    +
    +
    +
    + query($sql); + if ($result->num_rows != 1) { + echo '浣犱技涓嶄技鍌伙紵'; + exit; + } + + // 鍏呴挶 + $sql = "UPDATE mcshop_user SET bank = bank + '$rmb' WHERE username='$username'"; + $result = $dbConn->query($sql); + echo '鍏呭兼垚鍔!'; + exit; + + ?> +
    +
    + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/pia0o0o.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mc4dm1n.hack123.pw/pia0o0o.png" new file mode 100644 index 0000000000000000000000000000000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Ac z60`nqcJlj`hFXE?ibk9=yG$1!s_TsMie;PU&qU4W4%nxKBaN4aSknLdwU__CK+Ka z!5jzBCvNdv5oq3w>9))9Cq{Q+CBpjwH}AifZLm{sx2K~N96a>uC`S7T#fNr@O-;#M zw_j}-#a@1-Mc_(99~U?82ur+%THiy9_^pf}zZjld9EA47j5#*%N1l3_q7{HWmic*xK zr6fMvl%k)V;ssXR8ZE#+)kG;uQHqwDR`4A=zbI-;)I5ugwgESRJs+9wn#G5K+fJXN z6s0IdizNUg1tQCbTFZ3_8ahE;GBYfLuaJwHz@D$&ub-diUxZ)$DK#ldQHoO3HmyuM zc7723T$5NV&vwd{Xqn=5gMvI)8`($P99QcdKSq7Y=8WsuHQbp}{_1P-zopr0IoGeDF6Tf literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.htaccess" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.htaccess" new file mode 100644 index 0000000..bd95319 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.htaccess" @@ -0,0 +1,7 @@ + +RewriteEngine On +RewriteBase / +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ /index.php/$1 [L] + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.user.ini" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.user.ini" new file mode 100644 index 0000000..385e7d4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/.user.ini" @@ -0,0 +1 @@ +open_basedir=/home/wwwroot/mcblog.hack123.pw:/tmp/:/proc/ diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/category.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/category.php" new file mode 100644 index 0000000..97de61d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/category.php" @@ -0,0 +1,23 @@ + + +
    +
    + +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common-js.php" new file mode 100644 index 0000000..e652930 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common-js.php" @@ -0,0 +1,105 @@ + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common.php" new file mode 100644 index 0000000..e3a6702 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/common.php" @@ -0,0 +1,59 @@ +begin(); + +Typecho_Widget::widget('Widget_Options')->to($options); +Typecho_Widget::widget('Widget_User')->to($user); +Typecho_Widget::widget('Widget_Security')->to($security); +Typecho_Widget::widget('Widget_Menu')->to($menu); + +/** 鍒濆鍖栦笂涓嬫枃 */ +$request = $options->request; +$response = $options->response; + +/** 妫娴嬫槸鍚︽槸绗竴娆$櫥褰 */ +$currentMenu = $menu->getCurrentMenu(); +list($prefixVersion, $suffixVersion) = explode('/', $options->version); +$params = parse_url($currentMenu[2]); +$adminFile = basename($params['path']); + +if (!$user->logged && !Typecho_Cookie::get('__typecho_first_run') && !empty($currentMenu)) { + + if ('welcome.php' != $adminFile) { + $response->redirect(Typecho_Common::url('welcome.php', $options->adminUrl)); + } else { + Typecho_Cookie::set('__typecho_first_run', 1); + } + +} else { + + /** 妫娴嬬増鏈槸鍚﹀崌绾 */ + if ($user->pass('administrator', true) && !empty($currentMenu)) { + $mustUpgrade = (!defined('Typecho_Common::VERSION') || version_compare(str_replace('/', '.', Typecho_Common::VERSION), + str_replace('/', '.', $options->version), '>')); + + if ($mustUpgrade && 'upgrade.php' != $adminFile) { + $response->redirect(Typecho_Common::url('upgrade.php', $options->adminUrl)); + } else if (!$mustUpgrade && 'upgrade.php' == $adminFile) { + $response->redirect($options->adminUrl); + } else if (!$mustUpgrade && 'welcome.php' == $adminFile && $user->logged) { + $response->redirect($options->adminUrl); + } + } + +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/copyright.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/copyright.php" new file mode 100644 index 0000000..b17e928 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/copyright.php" @@ -0,0 +1,13 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/grid.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/grid.css" new file mode 100644 index 0000000..16183b3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/grid.css" @@ -0,0 +1 @@ +.container,.row [class*="col-"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}.container{margin-left:auto;margin-right:auto;padding-left:10px;padding-right:10px;}.row{margin-right:-10px;margin-left:-10px;}.row [class*="col-"]{float:left;min-height:1px;padding-right:10px;padding-left:10px;}.row [class*="-push-"],.row [class*="-pull-"]{position:relative;}.col-mb-1{width:8.33333%;}.col-mb-2{width:16.66667%;}.col-mb-3{width:25%;}.col-mb-4{width:33.33333%;}.col-mb-5{width:41.66667%;}.col-mb-6{width:50%;}.col-mb-7{width:58.33333%;}.col-mb-8{width:66.66667%;}.col-mb-9{width:75%;}.col-mb-10{width:83.33333%;}.col-mb-11{width:91.66667%;}.col-mb-12{width:100%;}@media(min-width:768px){.container{max-width:728px;}.col-tb-1{width:8.33333%;}.col-tb-2{width:16.66667%;}.col-tb-3{width:25%;}.col-tb-4{width:33.33333%;}.col-tb-5{width:41.66667%;}.col-tb-6{width:50%;}.col-tb-7{width:58.33333%;}.col-tb-8{width:66.66667%;}.col-tb-9{width:75%;}.col-tb-10{width:83.33333%;}.col-tb-11{width:91.66667%;}.col-tb-12{width:100%;}.col-tb-offset-0{margin-left:0;}.col-tb-offset-1{margin-left:8.33333%;}.col-tb-offset-2{margin-left:16.66667%;}.col-tb-offset-3{margin-left:25%;}.col-tb-offset-4{margin-left:33.33333%;}.col-tb-offset-5{margin-left:41.66667%;}.col-tb-offset-6{margin-left:50%;}.col-tb-offset-7{margin-left:58.33333%;}.col-tb-offset-8{margin-left:66.66667%;}.col-tb-offset-9{margin-left:75%;}.col-tb-offset-10{margin-left:83.33333%;}.col-tb-offset-11{margin-left:91.66667%;}.col-tb-offset-12{margin-left:100%;}.col-tb-pull-0{right:0;}.col-tb-pull-1{right:8.33333%;}.col-tb-pull-2{right:16.66667%;}.col-tb-pull-3{right:25%;}.col-tb-pull-4{right:33.33333%;}.col-tb-pull-5{right:41.66667%;}.col-tb-pull-6{right:50%;}.col-tb-pull-7{right:58.33333%;}.col-tb-pull-8{right:66.66667%;}.col-tb-pull-9{right:75%;}.col-tb-pull-10{right:83.33333%;}.col-tb-pull-11{right:91.66667%;}.col-tb-pull-12{right:100%;}.col-tb-push-0{left:0;}.col-tb-push-1{left:8.33333%;}.col-tb-push-2{left:16.66667%;}.col-tb-push-3{left:25%;}.col-tb-push-4{left:33.33333%;}.col-tb-push-5{left:41.66667%;}.col-tb-push-6{left:50%;}.col-tb-push-7{left:58.33333%;}.col-tb-push-8{left:66.66667%;}.col-tb-push-9{left:75%;}.col-tb-push-10{left:83.33333%;}.col-tb-push-11{left:91.66667%;}.col-tb-push-12{left:100%;}}@media(min-width:992px){.container{max-width:952px;}.col-1{width:8.33333%;}.col-2{width:16.66667%;}.col-3{width:25%;}.col-4{width:33.33333%;}.col-5{width:41.66667%;}.col-6{width:50%;}.col-7{width:58.33333%;}.col-8{width:66.66667%;}.col-9{width:75%;}.col-10{width:83.33333%;}.col-11{width:91.66667%;}.col-12{width:100%;}.col-offset-0{margin-left:0;}.col-offset-1{margin-left:8.33333%;}.col-offset-2{margin-left:16.66667%;}.col-offset-3{margin-left:25%;}.col-offset-4{margin-left:33.33333%;}.col-offset-5{margin-left:41.66667%;}.col-offset-6{margin-left:50%;}.col-offset-7{margin-left:58.33333%;}.col-offset-8{margin-left:66.66667%;}.col-offset-9{margin-left:75%;}.col-offset-10{margin-left:83.33333%;}.col-offset-11{margin-left:91.66667%;}.col-offset-12{margin-left:100%;}.col-pull-0{right:0;}.col-pull-1{right:8.33333%;}.col-pull-2{right:16.66667%;}.col-pull-3{right:25%;}.col-pull-4{right:33.33333%;}.col-pull-5{right:41.66667%;}.col-pull-6{right:50%;}.col-pull-7{right:58.33333%;}.col-pull-8{right:66.66667%;}.col-pull-9{right:75%;}.col-pull-10{right:83.33333%;}.col-pull-11{right:91.66667%;}.col-pull-12{right:100%;}.col-push-0{left:0;}.col-push-1{left:8.33333%;}.col-push-2{left:16.66667%;}.col-push-3{left:25%;}.col-push-4{left:33.33333%;}.col-push-5{left:41.66667%;}.col-push-6{left:50%;}.col-push-7{left:58.33333%;}.col-push-8{left:66.66667%;}.col-push-9{left:75%;}.col-push-10{left:83.33333%;}.col-push-11{left:91.66667%;}.col-push-12{left:100%;}}@media(min-width:1200px){.container{max-width:1160px;}.col-wd-1{width:8.33333%;}.col-wd-2{width:16.66667%;}.col-wd-3{width:25%;}.col-wd-4{width:33.33333%;}.col-wd-5{width:41.66667%;}.col-wd-6{width:50%;}.col-wd-7{width:58.33333%;}.col-wd-8{width:66.66667%;}.col-wd-9{width:75%;}.col-wd-10{width:83.33333%;}.col-wd-11{width:91.66667%;}.col-wd-12{width:100%;}.col-wd-offset-0{margin-left:0;}.col-wd-offset-1{margin-left:8.33333%;}.col-wd-offset-2{margin-left:16.66667%;}.col-wd-offset-3{margin-left:25%;}.col-wd-offset-4{margin-left:33.33333%;}.col-wd-offset-5{margin-left:41.66667%;}.col-wd-offset-6{margin-left:50%;}.col-wd-offset-7{margin-left:58.33333%;}.col-wd-offset-8{margin-left:66.66667%;}.col-wd-offset-9{margin-left:75%;}.col-wd-offset-10{margin-left:83.33333%;}.col-wd-offset-11{margin-left:91.66667%;}.col-wd-offset-12{margin-left:100%;}.col-wd-pull-0{right:0;}.col-wd-pull-1{right:8.33333%;}.col-wd-pull-2{right:16.66667%;}.col-wd-pull-3{right:25%;}.col-wd-pull-4{right:33.33333%;}.col-wd-pull-5{right:41.66667%;}.col-wd-pull-6{right:50%;}.col-wd-pull-7{right:58.33333%;}.col-wd-pull-8{right:66.66667%;}.col-wd-pull-9{right:75%;}.col-wd-pull-10{right:83.33333%;}.col-wd-pull-11{right:91.66667%;}.col-wd-pull-12{right:100%;}.col-wd-push-0{left:0;}.col-wd-push-1{left:8.33333%;}.col-wd-push-2{left:16.66667%;}.col-wd-push-3{left:25%;}.col-wd-push-4{left:33.33333%;}.col-wd-push-5{left:41.66667%;}.col-wd-push-6{left:50%;}.col-wd-push-7{left:58.33333%;}.col-wd-push-8{left:66.66667%;}.col-wd-push-9{left:75%;}.col-wd-push-10{left:83.33333%;}.col-wd-push-11{left:91.66667%;}.col-wd-push-12{left:100%;}}@media(max-width:767px){.kit-hidden-mb{display:none;}}@media(max-width:991px){.kit-hidden-tb{display:none;}}@media(max-width:1199px){.kit-hidden{display:none;}}.clearfix,.row{zoom:1;}.clearfix:before,.row:before,.clearfix:after,.row:after{content:" ";display:table;}.clearfix:after,.row:after{clear:both;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/normalize.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/normalize.css" new file mode 100644 index 0000000..c377607 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/normalize.css" @@ -0,0 +1 @@ +/*!normalize.css v2.1.3 | MIT License | git.io/normalize */ article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block;}audio,canvas,video{display:inline-block;}audio:not([controls]){display:none;height:0;}[hidden],template{display:none;}html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;}body{margin:0;}a{background:transparent;}a:focus{outline:thin dotted;}a:active,a:hover{outline:0;}h1{font-size:2em;margin:.67em 0;}abbr[title]{border-bottom:1px dotted;}b,strong{font-weight:bold;}dfn{font-style:italic;}hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0;}mark{background:#ff0;color:#000;}code,kbd,pre,samp{font-family:monospace,serif;font-size:1em;}pre{white-space:pre-wrap;}q{quotes:"\201C" "\201D" "\2018" "\2019";}small{font-size:80%;}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline;}sup{top:-0.5em;}sub{bottom:-0.25em;}img{border:0;}svg:not(:root){overflow:hidden;}figure{margin:0;}fieldset{border:1px solid #c0c0c0;margin:0 2px;padding:.35em .625em .75em;}legend{border:0;padding:0;}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;}button,input{line-height:normal;}button,select{text-transform:none;}button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}button[disabled],html input[disabled]{cursor:default;}input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0;}input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;}input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none;}button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0;}textarea{overflow:auto;vertical-align:top;}table{border-collapse:collapse;border-spacing:0;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/style.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/style.css" new file mode 100644 index 0000000..7c9a118 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/css/style.css" @@ -0,0 +1 @@ +@charset "UTF-8";html{height:100%;}body{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;background:#F6F6F3;color:#444;font-size:87.5%;line-height:1.5;}a{color:#467B96;text-decoration:none;}a:hover{color:#499BC3;text-decoration:underline;}code,pre,.mono{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;}.p{margin:1em 0;}.body-100{height:100%;}a.balloon-button{display:inline-block;padding:0 6px;min-width:12px;height:18px;line-height:18px;background:#D8E7EE;font-size:.85714em;text-align:center;text-decoration:none;zoom:1;-moz-border-radius:30px;-webkit-border-radius:30px;border-radius:30px;}a.button:hover,a.balloon-button:hover{background-color:#A5CADC;color:#FFF;text-decoration:none;}input[type=text],input[type=password],input[type=email],textarea{background:#FFF;border:1px solid #D9D9D6;padding:7px;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}textarea{resize:vertical;line-height:1.5;}input[type="radio"],input[type="checkbox"]{margin-right:3px;}input.text-s,textarea.text-s{padding:5px;}input.text-l,textarea.text-l{padding:10px;font-size:1.14286em;}.w-10{width:10%;}.w-20{width:20%;}.w-30{width:30%;}.w-40{width:40%;}.w-50{width:50%;}.w-60{width:60%;}.w-70{width:70%;}.w-80{width:80%;}.w-90{width:90%;}.w-100{width:100%;}select{border:1px solid #CCC;height:28px;}.btn,#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{border:none;background-color:#E9E9E6;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;display:inline-block;padding:0 12px;height:32px;color:#666;vertical-align:middle;zoom:1;}.btn:hover,#ui-datepicker-div .ui-datepicker-current:hover,#ui-datepicker-div .ui-datepicker-close:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#dbdbd6;}.btn:active,#ui-datepicker-div .ui-datepicker-current:active,#ui-datepicker-div .ui-datepicker-close:active,.btn.active,#ui-datepicker-div .active.ui-datepicker-current,#ui-datepicker-div .active.ui-datepicker-close{background-color:#d6d6d0;}.btn:disabled,#ui-datepicker-div .ui-datepicker-current:disabled,#ui-datepicker-div .ui-datepicker-close:disabled{background-color:#f7f7f6;cursor:default;}.btn:disabled,#ui-datepicker-div .ui-datepicker-current:disabled,#ui-datepicker-div .ui-datepicker-close:disabled{color:#999;}.btn-xs,#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{padding:0 10px;height:25px;font-size:13px;}.btn-s{height:28px;}.btn-l{height:40px;font-size:1.14286em;font-weight:bold;}.primary{border:none;background-color:#467B96;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;color:#FFF;}.primary:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#3c6a81;}.primary:active,.primary.active{background-color:#39647a;}.primary:disabled{background-color:#508cab;cursor:default;}.btn-group{display:inline-block;}.btn-warn{border:none;background-color:#B94A48;cursor:pointer;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;color:#FFF;}.btn-warn:hover{-moz-transition-duration:.4s;-o-transition-duration:.4s;-webkit-transition-duration:.4s;transition-duration:.4s;background-color:#a4403f;}.btn-warn:active,.btn-warn.active{background-color:#9c3e3c;}.btn-warn:disabled{background-color:#c1605e;cursor:default;}.btn-link,.btn-link:hover,.btn-link:focus,.btn-link:active,.btn-link.active{background-color:transparent;}.btn-drop{position:relative;}.dropdown-toggle{padding-right:8px;}.dropdown-menu{list-style:none;position:absolute;z-index:2;left:0;margin:0;padding:0;border:1px solid #D9D9D6;background:#FFF;text-align:left;min-width:108px;display:none;}.dropdown-menu li{white-space:nowrap;}.dropdown-menu li.multiline{padding:5px 12px 12px;}.dropdown-menu a{display:block;padding:5px 12px;color:#666;}.dropdown-menu a:hover{background:#F6F6F3;text-decoration:none!important;}.message{padding:8px 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.message a{font-weight:bold;text-decoration:underline;}.error{background:#FBE3E4;color:#8A1F11;}.error a{color:#8A1F11;}.notice{background:#FFF6BF;color:#8A6D3B;}.notice a{color:#8A6D3B;}.success{background:#E6EFC2;color:#264409;}.success a{color:#264409;}.balloon{display:inline-block;padding:0 4px;min-width:10px;height:14px;line-height:14px;background:#B9B9B6;vertical-align:text-top;text-align:center;font-size:12px;color:#FFF;-moz-border-radius:20px;-webkit-border-radius:20px;border-radius:20px;}.typecho-pager{list-style:none;float:right;margin:0;padding:0;line-height:1;text-align:center;zoom:1;}.typecho-pager li{display:inline-block;margin:0 3px;height:28px;line-height:28px;}.typecho-pager a{display:block;padding:0 10px;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.typecho-pager a:hover{text-decoration:none;background:#E9E9E6;}.typecho-pager li.current a{background:#E9E9E6;color:#444;}.typecho-head-nav{padding:0 10px;background:#292D33;}.typecho-head-nav a{color:#BBB;}.typecho-head-nav a:hover,.typecho-head-nav a:focus{color:#FFF;text-decoration:none;}#typecho-nav-list{float:left;}#typecho-nav-list ul{list-style:none;margin:0;padding:0;}#typecho-nav-list ul:first-child{border-left:1px solid #383D45;}#typecho-nav-list .root{position:relative;float:left;}#typecho-nav-list .parent a{display:block;float:left;padding:0 20px;border-right:1px solid #383D45;height:36px;line-height:36px;color:#BBB;}#typecho-nav-list .parent a:hover,#typecho-nav-list .focus .parent a,#typecho-nav-list .root:hover .parent a{background:#202328;color:#FFF;text-decoration:none;}#typecho-nav-list .focus .parent a{font-weight:bold;}#typecho-nav-list .child{position:absolute;top:36px;display:none;margin:0;min-width:160px;max-width:240px;background:#202328;z-index:250;}#typecho-nav-list .root:hover .child{display:block;}#typecho-nav-list .child li a{color:#BBB;display:block;padding:0 20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;height:36px;line-height:36px;}#typecho-nav-list .child li a:hover,#typecho-nav-list .child li a:focus{background:#292D33;color:#FFF;}#typecho-nav-list .child li.focus a{color:#6DA1BB;font-weight:bold;}.typecho-head-nav .operate{float:right;}.typecho-head-nav .operate a{display:inline-block;margin-left:-1px;padding:0 20px;border:1px solid #383D45;border-width:0 1px;line-height:36px;color:#BBB;}.typecho-head-nav .operate a:hover{background-color:#202328;color:#FFF;}.typecho-foot{padding:4em 0 3em;color:#999;line-height:1.8;text-align:center;}.typecho-foot .copyright p{margin:10px 0 0;}.typecho-foot .resource{color:#CCC;}.typecho-foot .resource a{margin:0 3px;color:#999;}.browsehappy{border:none;text-align:center;}.popup{display:none;position:absolute;top:0;left:0;margin:0;padding:8px 0;border:none;width:100%;z-index:10;text-align:center;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.popup ul{list-style:none;margin:0;padding:0;text-align:center;}.popup ul li{display:inline-block;margin-right:10px;}.loading{padding-left:20px!important;background:transparent url(../img/ajax-loader.gif) no-repeat left center;}.typecho-option{list-style:none;margin:1em 0;padding:0;}.typecho-option-submit li{border-bottom:none;}.typecho-option label.typecho-label{display:block;margin-bottom:.5em;font-weight:bold;}.typecho-option label.required:after{content:" *";color:#B94A48;}.typecho-option span{margin-right:15px;}.typecho-option .description{margin:.5em 0 0;color:#999;font-size:.92857em;}.front-archive{padding-left:1.5em;}.profile-avatar{border:1px dashed #D9D9D6;max-width:100%;}.typecho-install{padding-bottom:2em;}.typecho-install-patch{margin-bottom:2em;padding:2em 0;background-color:#292D33;color:#FFF;text-align:center;}.typecho-install-patch ol{list-style:none;margin:3em 0 1em;padding:0;color:#999;}.typecho-install-patch li{display:inline-block;margin:0 .8em;}.typecho-install-patch span{display:inline-block;margin-right:5px;width:20px;height:20px;line-height:20px;border:2px solid #999;text-align:center;border-radius:2em;}.typecho-install-patch li.current{color:#FFF;font-weight:bold;}.typecho-install-patch li.current span{border-color:#FFF;}.typecho-install .typecho-install-body input{width:100%;}.typecho-install-body .typecho-option li{margin:1em 0;}#typecho-welcome{margin:1em 0;padding:1em 2em;background-color:#E9E9E6;}.welcome-board{color:#999;font-size:1.15em;}.welcome-board em{color:#444;font-size:2em;font-style:normal;font-family:Georgia,serif;}#start-link{margin-bottom:25px;padding:0 0 35px;border-bottom:1px solid #ECECEC;}#start-link li{float:left;margin-right:1.5em;}#start-link .balloon{margin-top:2px;}.latest-link li{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}.latest-link span{display:inline-block;margin-right:4px;padding-right:8px;border-right:1px solid #ECECEC;width:37px;text-align:right;color:#999;}.update-check{font-size:14px;}.typecho-login-wrap{display:table;margin:0 auto;height:100%;}.typecho-login{display:table-cell;padding:30px 0 100px;width:280px;text-align:center;vertical-align:middle;}.typecho-login h1{margin:0 0 1em;}.typecho-login .more-link{margin-top:2em;color:#CCC;}.typecho-login .more-link a{margin:0 3px;}.typecho-page-title h2{margin:25px 0 10px;font-size:1.28571em;}.typecho-page-title h2 a{margin-left:10px;padding:3px 8px;background:#E9E9E6;font-size:.8em;border-radius:2px;}.typecho-page-title h2 a:hover{text-decoration:none;}.typecho-dashboard ul{list-style:none;padding:0;}.typecho-dashboard li{margin-bottom:5px;}.typecho-option-tabs{list-style:none;margin:1em 0 0;padding:0;font-size:13px;text-align:center;}.typecho-option-tabs.fix-tabs{margin-bottom:1em;}.typecho-option-tabs a{display:block;margin-right:-1px;border:1px solid #D9D9D6;padding:0 15px;height:26px;line-height:26px;color:#666;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;}.typecho-option-tabs a:hover{background-color:#E9E9E6;color:#666;text-decoration:none;}.typecho-option-tabs li{float:left;}.typecho-option-tabs li:first-child a{-moz-border-radius:2px 0 0 2px;-webkit-border-radius:2px;border-radius:2px 0 0 2px;}.typecho-option-tabs li:last-child a{-moz-border-radius:0 2px 2px 0;-webkit-border-radius:0;border-radius:0 2px 2px 0;}.typecho-option-tabs.right{float:right;}.typecho-option-tabs li.current a,.typecho-option-tabs li.active a{background-color:#E9E9E6;}.typecho-list-operate{margin:1em 0;}.typecho-list-operate input,.typecho-list-operate button,.typecho-list-operate select{vertical-align:bottom;}.typecho-list-operate input[type="checkbox"]{vertical-align:text-top;}.typecho-list-operate .operate{float:left;}.typecho-list-operate .search{float:right;}.typecho-list-operate span.operate-delete,a.operate-delete,.typecho-list-operate span.operate-button-delete,a.operate-button-delete{color:#B94A48;}a.operate-edit{color:#070;}a.operate-reply{color:#545c30;}.typecho-list-operate a:hover{text-decoration:none;}.typecho-list-table-title{margin:1em 0;color:#999;text-align:center;}.typecho-table-wrap{padding:30px;background:#FFF;}.typecho-list-table{width:100%;}.typecho-list-table.deactivate{color:#999;}.typecho-list-table .right{text-align:right;}.typecho-list-table th{padding:0 10px 10px;border-bottom:2px solid #F0F0EC;text-align:left;}.typecho-list-table td{padding:10px;border-top:1px solid #F0F0EC;word-break:break-all;}.typecho-list-table .status{margin-left:5px;color:#999;font-size:.92857em;font-style:normal;}.typecho-list-table tbody tr:hover td{background-color:#F6F6F3;}.typecho-list-table tbody tr.checked td{background-color:#FFF9E8;}.warning{color:#B94A48;}.typecho-list-table tr td .hidden-by-mouse{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=0);opacity:0;}.typecho-list-table tr:hover td .hidden-by-mouse{filter:progid:DXImageTransform.Microsoft.Alpha(enabled=false);opacity:1;}.comment-reply-content{position:relative;margin:1em 0;padding:0 1em;border:1px solid transparent;background-color:#F0F0EC;}.comment-reply-content:after{position:absolute;right:1em;border:8px solid #F0F0EC;border-color:#F0F0EC #F0F0EC transparent transparent;content:" ";}.comment-meta span,.comment-date{font-size:.92857em;color:#999;}.comment-action a,.comment-action span{margin-right:4px;}.comment-edit label{display:block;}#typecho-respond{padding:10px;display:none;}.typecho-theme-list img{margin:1em 0;max-width:100%;max-height:240px;}.typecho-theme-list cite{font-style:normal;color:#999;}.typecho-theme-list tbody tr.current td{background-color:#FFF9E8;}.typecho-page-main .typecho-option input.text{width:100%;}.typecho-page-main .typecho-option input.num{width:40px;}.typecho-page-main .typecho-option textarea{width:100%;height:100px;}.typecho-page-main .typecho-option .multiline{display:block;margin:.3em 0;}.typecho-page-main .typecho-option .multiline.hidden{display:none;}.typecho-select-theme{height:25px;line-height:25px;margin:15px 0;}.typecho-select-theme h5{color:#E47E00;font-weight:bold;float:left;font-size:14px;width:120px;margin-right:10px;}.typecho-select-theme select{width:150px;}.typecho-edit-theme ul{list-style:none;margin:0;padding:0;}.typecho-edit-theme li{padding:3px 10px;}.typecho-edit-theme .current{background-color:#E6E6E3;}.typecho-edit-theme .current a{color:#444;}.typecho-edit-theme textarea{font-size:.92857em;line-height:1.2;height:500px;}.typecho-post-area .edit-draft-notice{color:#999;font-size:.92857em;}.typecho-post-area .edit-draft-notice a{color:#B94A48;}.typecho-post-area .typecho-label{display:block;margin:1em 0 -0.5em;font-weight:bold;}.typecho-post-area #auto-save-message{display:block;margin-top:.5em;color:#999;font-size:.92857em;}.typecho-post-area .submit .right button{margin-left:5px;}.typecho-post-area .right{float:right;padding-left:24px;}.typecho-post-area .left{float:left;}.typecho-post-area .out-date{border:1px solid #D3DBB3;padding:3px;background:#fff;}.typecho-post-area input.title{font-size:1.17em;font-weight:bold;}.typecho-post-area .url-slug{margin-top:-0.5em;color:#AAA;font-size:.92857em;word-break:break-word;}.typecho-post-area #slug{padding:2px;border:none;background:#FFFBCC;color:#666;}.typecho-post-area #text{resize:none;}#advance-panel{display:none;}#custom-field{margin:1em 0;padding:10px 15px;background:#FFF;}#custom-field.fold table,#custom-field.fold .description{display:none;}#custom-field .description{margin-top:10px;text-align:right;}#custom-field .description button{float:left;}#custom-field p.description{text-align:left;}#custom-field .typecho-label{margin:0;}#custom-field .typecho-label a{display:block;color:#444;}#custom-field .typecho-label a:hover{color:#467B96;text-decoration:none;}#custom-field table{margin-top:10px;}#custom-field td{padding:10px 5px;font-size:.92857em;border-bottom:1px solid #F0F0EC;vertical-align:top;}#custom-field td label{font-size:1em;font-weight:normal;}#custom-field select{height:27px;}.typecho-post-area .is-draft{background:#FFF1A8;}.typecho-post-option .description{margin-top:-0.5em;color:#999;font-size:.92857em;}.category-option ul{list-style:none;border:1px solid #D9D9D6;padding:6px 12px;max-height:240px;overflow:auto;background-color:#FFF;border-radius:2px;}.category-option li{margin:3px 0;}.visibility-option ul,.allow-option ul{list-style:none;padding:0;}.typecho-page-main ul.tag-list{list-style:none;margin:0;padding:20px;background-color:#FFF;}.typecho-page-main ul.tag-list li{display:inline-block;margin:0 0 5px 0;padding:5px 5px 5px 10px;cursor:pointer;}.typecho-page-main ul.tag-list li:hover{background-color:#E9E9E6;}.typecho-page-main ul.tag-list li input{display:none;}.typecho-page-main ul.tag-list li.checked{background-color:#FFFBCC;}.typecho-page-main ul.tag-list li.size-5{font-size:1em;}.typecho-page-main ul.tag-list li.size-10{font-size:1.2em;}.typecho-page-main ul.tag-list li.size-20{font-size:1.4em;}.typecho-page-main ul.tag-list li.size-30{font-size:1.6em;}.typecho-page-main ul.tag-list li.size-0{font-size:1.8em;}.typecho-page-main .tag-edit-link{visibility:hidden;}.typecho-page-main li:hover .tag-edit-link{visibility:visible;}.typecho-attachment-photo{border:1px solid #E6E6E3;max-width:100%;}#upload-panel{border:1px dashed #D9D9D6;background-color:#FFF;color:#999;font-size:.92857em;}#upload-panel.drag{background-color:#FFFBCC;}.upload-area{padding:15px;text-align:center;}#file-list{list-style:none;margin:0 10px;padding:0;max-height:450px;overflow:auto;word-break:break-all;}#file-list li,#file-list .insert{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;}#file-list li{padding:8px 0;border-top:1px dashed #D9D9D6;}#file-list .insert{display:block;max-width:100%;}#file-list .file{margin-left:5px;}#file-list .info{text-transform:uppercase;}#btn-fullscreen-upload{visibility:hidden;}.edit-media button{margin-right:6px;}.resize{display:block;margin:2px auto 0;padding:2px 0;border:1px solid #D9D9D6;border-width:1px 0;width:60px;cursor:row-resize;}.resize i{display:block;height:1px;background-color:#D9D9D6;}.tDnD_whileDrag{background-color:#FFFBCC;}.i-edit,.i-delete,.i-exlink,.mime-office,.mime-text,.mime-image,.mime-html,.mime-archive,.mime-application,.mime-audio,.mime-script,.mime-video,.mime-unknow,.i-upload,.i-upload-active{display:inline-block;vertical-align:text-bottom;text-indent:-9999em;background-image:url('../img/icons-s0c4f1c5ae6.png');background-repeat:no-repeat;}.i-edit:hover,.i-delete:hover,.i-exlink:hover,.mime-office:hover,.mime-text:hover,.mime-image:hover,.mime-html:hover,.mime-archive:hover,.mime-application:hover,.mime-audio:hover,.mime-script:hover,.mime-video:hover,.mime-unknow:hover,.i-upload:hover,.i-upload-active:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=75);opacity:.75;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-edit,.i-delete,.i-exlink,.mime-office,.mime-text,.mime-image,.mime-html,.mime-archive,.mime-application,.mime-audio,.mime-script,.mime-video,.mime-unknow,.i-upload,.i-upload-active{-moz-background-size:auto 256px;-o-background-size:auto 256px;-webkit-background-size:auto 256px;background-size:auto 256px;background-image:url('../img/icons-2x-s481937020b.png');}}.i-edit,.i-delete,.i-exlink,.mime-office,.mime-text,.mime-image,.mime-html,.mime-archive,.mime-application,.mime-audio,.mime-script,.mime-video,.mime-unknow{width:16px;height:16px;}.i-upload,.i-upload-active{width:24px;height:24px;}.i-edit{background-position:0 -16px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-edit{background-position:0 -16px;}}.i-delete{background-position:0 0;}.i-upload{background-position:0 -72px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-upload{background-position:0 -72px;}}.i-upload-active{background-position:0 -48px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-upload-active{background-position:0 -48px;}}.i-caret-up,.i-caret-down,.i-caret-left,.i-caret-right{display:inline-block;border-style:solid;border-color:transparent transparent #BBB transparent;border-width:3px 4px 5px;}.i-caret-down{border-color:#BBB transparent transparent transparent;border-width:5px 4px 3px;}.i-caret-left{border-color:transparent #BBB transparent transparent;border-width:4px 5px 4px 3px;}.i-caret-right{border-color:transparent transparent transparent #BBB;border-width:4px 3px 4px 5px;}.i-exlink{background-position:0 -32px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.i-exlink{background-position:0 -32px;}}.mime-office{background-position:0 -176px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-office{background-position:0 -176px;}}.mime-text{background-position:0 -208px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-text{background-position:0 -208px;}}.mime-image{background-position:0 -160px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-image{background-position:0 -160px;}}.mime-html{background-position:0 -144px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-html{background-position:0 -144px;}}.mime-archive{background-position:0 -112px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-archive{background-position:0 -112px;}}.mime-application{background-position:0 -96px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-application{background-position:0 -96px;}}.mime-audio{background-position:0 -128px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-audio{background-position:0 -128px;}}.mime-script{background-position:0 -192px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-script{background-position:0 -192px;}}.mime-video{background-position:0 -240px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-video{background-position:0 -240px;}}.mime-unknow{background-position:0 -224px;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){.mime-unknow{background-position:0 -224px;}}.i-logo,.i-logo-s{width:169px;height:40px;display:inline-block;background:url("../img/typecho-logo.svg") no-repeat;text-indent:-9999em;-moz-background-size:auto 40px;-o-background-size:auto 40px;-webkit-background-size:auto 40px;background-size:auto 40px;filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=15);opacity:.15;}.i-logo:hover,.i-logo-s:hover{filter:progid:DXImageTransform.Microsoft.Alpha(Opacity=20);opacity:.2;}.i-logo-s{width:26px;height:26px;-moz-background-size:auto 26px;-o-background-size:auto 26px;-webkit-background-size:auto 26px;background-size:auto 26px;}.editor{margin-bottom:-0.5em;}.wmd-button-row{list-style:none;margin:0;padding:0;height:26px;line-height:1;}.wmd-button-row li{display:inline-block;margin-right:4px;padding:3px;cursor:pointer;vertical-align:middle;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}.wmd-button-row li:hover{background-color:#E9E9E6;}.wmd-button-row li.wmd-spacer{height:20px;margin:0 10px 0 6px;padding:0;width:1px;background:#E9E9E6;cursor:default;}#wmd-button-row span{display:block;width:20px;height:20px;background:transparent url(../img/editor.png) no-repeat;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#wmd-button-row span{background-image:url(../img/editor@2x.png);-moz-background-size:320px auto;-o-background-size:320px auto;-webkit-background-size:320px auto;background-size:320px auto;}}.wmd-edittab{float:right;margin-top:3px;font-size:.92857em;}.wmd-edittab a{display:inline-block;padding:0 8px;margin-left:5px;height:20px;line-height:20px;}.wmd-edittab a:hover{text-decoration:none;}.wmd-edittab a.active{background:#E9E9E6;color:#999;}.wmd-hidetab{display:none;}.wmd-visualhide{visibility:hidden;}.wmd-prompt-background{background-color:#000;}.wmd-prompt-dialog{position:fixed;z-index:1001;top:50%;left:50%;margin-top:-95px;margin-left:-200px;padding:20px;width:360px;background:#F6F6F3;}.wmd-prompt-dialog p{margin:0 0 5px;}.wmd-prompt-dialog form{margin-top:10px;}.wmd-prompt-dialog input[type="text"]{margin-bottom:10px;width:100%;}.wmd-prompt-dialog button{margin-right:10px;}#wmd-preview{background:#FFF;margin:1em 0;padding:0 15px;word-wrap:break-word;overflow:auto;-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px;}#wmd-preview img{max-width:100%;}#wmd-preview code,#wmd-preview pre{padding:2px 4px;background:#F3F3F0;font-size:.92857em;}#wmd-preview code{color:#C13;}#wmd-preview pre{padding:1em;}#wmd-preview pre code{padding:0;color:#444;}#wmd-preview blockquote{margin:1em 1.5em;padding-left:1.5em;border-left:4px solid #E9E9E6;color:#777;}#wmd-preview hr{margin:2em auto;width:100px;border:1px solid #E9E9E6;border-width:2px 0 0 0;}#wmd-preview .summary:after{display:block;margin:2em 0;background:#FFF9E8;color:#ce9900;font-size:.85714em;text-align:center;content:"- more -";}@keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}@-moz-keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}@-webkit-keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}@-o-keyframes fullscreen-upload{0%{right:-280px;}100%{right:-1px;}}.fullscreen #wmd-button-bar,.fullscreen #text,.fullscreen #wmd-preview,.fullscreen .submit{position:absolute;top:0;width:50%;background:#FFF;z-index:999;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box;-moz-border-radius:0;-webkit-border-radius:0;border-radius:0;}.fullscreen #wmd-button-bar{left:0;padding:13px 20px;border-bottom:1px solid #F3F3F0;z-index:1000;}.fullscreen #text{top:53px;left:0;padding:20px;border:none;outline:none;}.fullscreen #wmd-preview{top:53px;right:0;margin:0;padding:5px 20px;border:none;border-left:1px solid #F3F3F0;background:#F6F6F3;overflow:auto;}.fullscreen #wmd-preview code,.fullscreen #wmd-preview pre{background:#F0F0EC;}.fullscreen .submit{right:0;margin:0;padding:10px 20px;border-bottom:1px solid #F3F3F0;}.fullscreen #upload-panel{-webkit-box-shadow:0 4px 16px rgba(0,0,0,0.225);box-shadow:0 4px 16px rgba(0,0,0,0.225);border-style:solid;}.fullscreen #tab-files{position:absolute;top:52px;right:-1px;width:280px;z-index:1001;animation:fullscreen-upload .5s;-moz-animation:fullscreen-upload .5s;-webkit-animation:fullscreen-upload .5s;-o-animation:fullscreen-upload .5s;}.fullscreen .wmd-edittab,.fullscreen .typecho-post-option,.fullscreen .title,.fullscreen .url-slug,.fullscreen .typecho-page-title,.fullscreen .typecho-head-nav,.fullscreen .message{display:none;}.fullscreen .wmd-hidetab{display:block;}.fullscreen .wmd-visualhide,.fullscreen #btn-fullscreen-upload{visibility:visible;}#ui-datepicker-div{display:none;margin-top:-1px;padding:10px;border:1px solid #D9D9D6;background:#FFF;}.ui-timepicker-div .ui-widget-header{margin-bottom:8px;}.ui-timepicker-div dl{text-align:left;}.ui-timepicker-div dl dt{float:left;clear:left;}.ui-timepicker-div dl dd{margin:0 0 10px 40%;}.ui-tpicker-grid-label{background:none;border:none;margin:0;padding:0;}#ui-datepicker-div .ui-datepicker-header{margin-bottom:10px;padding-bottom:10px;border-bottom:1px solid #EEE;}#ui-datepicker-div .ui-datepicker-prev{float:left;cursor:pointer;}#ui-datepicker-div .ui-datepicker-next{float:right;cursor:pointer;}#ui-datepicker-div .ui-datepicker-title{font-weight:bold;text-align:center;}#ui-datepicker-div .ui-datepicker-calendar th{line-height:24px;}#ui-datepicker-div .ui-datepicker-calendar a{display:block;width:30px;background-color:#F3F3F0;line-height:24px;text-align:center;}#ui-datepicker-div .ui-datepicker-calendar a:hover{background-color:#E9E9E6;text-decoration:none;}#ui-datepicker-div .ui-datepicker-today a{background-color:#E9E9E6;color:#444;}#ui-datepicker-div .ui-datepicker-current-day a{background-color:#467B96!important;color:#FFF;}#ui-datepicker-div .ui-timepicker-div{margin-top:20px;border-top:1px solid #EEE;}#ui-datepicker-div .ui-slider{position:relative;margin-top:18px;border:1px solid #E9E9E6;background-color:#F6F6F3;height:4px;}#ui-datepicker-div .ui-slider .ui-slider-handle{position:absolute;top:-7px;margin-left:-5px;z-index:2;width:10px;height:16px;background-color:#467B96;}#ui-datepicker-div .ui-datepicker-buttonpane{padding-top:10px;border-top:1px solid #EEE;}#ui-datepicker-div .ui-datepicker-current,#ui-datepicker-div .ui-datepicker-close{float:left;}#ui-datepicker-div .ui-datepicker-close{float:right;}.ui-effects-transfer{border:2px dotted #ccc;}ul.token-input-list{list-style:none;margin:0;padding:0 4px;min-height:32px;border:1px solid #D9D9D6;cursor:text;z-index:999;background-color:#FFF;clear:left;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}ul.token-input-list li{margin:4px 0;}ul.token-input-list li input{padding:0;border:0;width:100%;-webkit-appearance:caret;}li.token-input-token{padding:0 6px;height:27px;line-height:27px;background-color:#F3F3F0;cursor:default;font-size:.92857em;text-align:right;white-space:nowrap;}li.token-input-token p{float:left;display:inline;margin:0;}li.token-input-token span{color:#BBB;font-weight:bold;cursor:pointer;}li.token-input-selected-token{background-color:#E9E9E6;}li.token-input-input-token{padding:0 4px;}div.token-input-dropdown{position:absolute;background-color:#FFF;overflow:hidden;border:1px solid #D9D9D6;border-top-width:0;cursor:default;z-index:1;font-size:.92857em;}div.token-input-dropdown p{margin:0;padding:5px 10px;color:#777;font-weight:bold;}div.token-input-dropdown ul{list-style:none;margin:0;padding:0;}div.token-input-dropdown ul li{padding:4px 10px;background-color:#FFF;}div.token-input-dropdown ul li.token-input-dropdown-item{background-color:#FFF;}div.token-input-dropdown ul li em{font-style:normal;}div.token-input-dropdown ul li.token-input-selected-dropdown-item{background-color:#467B96;color:#FFF;}.hidden{display:none;}.sr-only{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.sr-only.focusable:active,.sr-only.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto;}.invisible{visibility:hidden;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields-js.php" new file mode 100644 index 0000000..b1011f7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields-js.php" @@ -0,0 +1,44 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields.php" new file mode 100644 index 0000000..6fd85b2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/custom-fields.php" @@ -0,0 +1,73 @@ + +getFieldItems() : $page->getFieldItems(); +$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $page->getDefaultFieldItems(); +?> +
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    render(); ?>render(); ?>
    + + + + + + + + + + +
    + + + + + + + + + + +
    +
    + + 甯姪鏂囨。'); ?> +
    +
    diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/editor-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/editor-js.php" new file mode 100644 index 0000000..949305c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/editor-js.php" @@ -0,0 +1,330 @@ + +markdown): ?> + + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/extending.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/extending.php" new file mode 100644 index 0000000..be228ef --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/extending.php" @@ -0,0 +1,13 @@ +get('panel'); +$panelTable = unserialize($options->panelTable); + +if (!isset($panelTable['file']) || !in_array(urlencode($panel), $panelTable['file'])) { + throw new Typecho_Plugin_Exception(_t('椤甸潰涓嶅瓨鍦'), 404); +} + +list ($pluginName, $file) = explode('/', trim($panel, '/'), 2); + +require_once $options->pluginDir($pluginName) . '/' . $panel; diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload-js.php" new file mode 100644 index 0000000..133dde3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload-js.php" @@ -0,0 +1,208 @@ + +have()) { + $fileParentContent = $post; +} else if (isset($page) && $page instanceof Typecho_Widget && $page->have()) { + $fileParentContent = $page; +} + +$phpMaxFilesize = function_exists('ini_get') ? trim(ini_get('upload_max_filesize')) : 0; + +if (preg_match("/^([0-9]+)([a-z]{1,2})$/i", $phpMaxFilesize, $matches)) { + $phpMaxFilesize = strtolower($matches[1] . $matches[2] . (1 == strlen($matches[2]) ? 'b' : '')); +} +?> + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload.php" new file mode 100644 index 0000000..d276094 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/file-upload.php" @@ -0,0 +1,30 @@ + + +cid : $page->cid; + + if ($cid) { + Typecho_Widget::widget('Widget_Contents_Attachment_Related', 'parentId=' . $cid)->to($attachment); + } else { + Typecho_Widget::widget('Widget_Contents_Attachment_Unattached')->to($attachment); + } +} +?> + +
    +
    鎴栬 %s閫夋嫨鏂囦欢涓婁紶%s', '', ''); ?>
    +
      + next()): ?> +
    • + title(); ?> +
      + attachment->size / 1024)); ?> Kb + + +
      +
    • + +
    +
    + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/footer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/footer.php" new file mode 100644 index 0000000..57c0084 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/footer.php" @@ -0,0 +1,6 @@ + + + +end(); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/form-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/form-js.php" new file mode 100644 index 0000000..7c52d69 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/form-js.php" @@ -0,0 +1,26 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/header.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/header.php" new file mode 100644 index 0000000..50e3c6e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/header.php" @@ -0,0 +1,31 @@ +adminStaticUrl('css')) . '"> + + +'; + +/** 娉ㄥ唽涓涓垵濮嬪寲鎻掍欢 */ +$header = Typecho_Plugin::factory('admin/header.php')->header($header); + +?> + + + + + + + <?php _e('%s - %s - Powered by Typecho', $menu->title, $options->title); ?> + + + + > + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/ajax-loader.gif" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/ajax-loader.gif" new file mode 100644 index 0000000000000000000000000000000000000000..32666dadf1075fc052665dbe0924c7c5f08e8009 GIT binary patch literal 847 zcmZ?wbhEHb6krfw_`<;O^XK=OGiQGL_GRtbwWm&G!$-o+*pwO3+Id7?fNRFabOTwzP zGenL}lrnAjz;?5vA-b2vhAFc(V4^@PV`uB4zBQUU4W3ay7O5nC*yS;4fdgv-pu5*<>|Hn(-{gjt4u>v0=H?uP};XReTu;fv2}|U_B&<^oL6>a z;I;`cH(Wp`0?>!bpC@SC67kUDIuanlsk@}z@V#*(mzDEr zL+>pfElm&EJoIL$+}v2nz#*{j;u+Q(S=@S!;Vuq$_#zn=8F+Atwdxr3IbGrE%NFo@ z_Le8q-n5*VrA8&2H%616ryHxKL6Bf=P?*AGD00+cMYFRU+Zyp>+1*WZ7!{qKB-k@F zZfDvzLD{v*qRJ^Sq9J*A?xHeoA*F>1FAptFXiRA14Ru>4S#(E|Z)w46&ChB78?agf z@*6PrRygpu8VVdbDUlm1aeSwQN6&?}8yf5aT`VR{3ePokB$l};CVDVL1kd1T%r#xI zl`+Z1V+$L@s-1~RI$V9K4F$$x$w!nosQ=)7qr`4vW*(rX6`|jt(bKDf)zWyVr5-?! zaV&E%VK}tun4^;CM2-!!7AA1m<+ZYU8mM$g^vZdgZ{qdPVL#ZZThgr6)a)uHBCzDJ t?!|-^9SH}RehL_Na!72L?$FQYY@WfPZ^)9y8l&0Wqo&AU4N9J1002N?5e5JN literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/editor.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/editor.png" new file mode 100644 index 0000000000000000000000000000000000000000..aeee188c6a30fcbfb54d2f0e846712e10d4873c8 GIT binary patch literal 2567 zcmZ{mc{J4f8^_0tVQiPtj4jKI$Pz9(xwaUZ(M+KcvQ$VY5z$y8nK6_ZgzUReA-UtK z$d4>hs6-)431vvBEJ>E`{nYoIIZo&NK7V}9^Sqw-^Zq>FInN)%qT22i6P6Q(!C+z( zGVve`#zz3LDGC8@+;CbZ3>V>8PU62gAH$zYY2N;3_s?a150Vz0u^U`0cpWhAw=;j4L2?zwC7!v=+ zf73%L^a|Ab%j2g%RDuFt%&YRmkl?ozdXzT?RE117$K?Bla$tks(+=9&!}#C`1V2Ag zKoErz5*85^6Z=D40xh`(gO!q&mXVd)Dle~~sHB9$ z$GyD0eNLP_>3ho0-~V*rnV_KH;IlMZNN8x-xroTf^XH>3MAPXECOaYVa&pR*^vtZB zy!?W~;*zp!*KbsDYW}IcbGNSk-v1h#np;{Qw0Asw)Yui zOul``oq0d|aqjcN;?nZBmG7%-8$a%4uH1pa1VkxB3x{yGxxDXZ(?~LpnkgE-r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bXO%Z<6D-uhzt(u=cZi^`NIPFR$Z_@kzH2YT#d16e3|$J zelS1=9johXtb!)XFNdowT8tbak}Z{XiqN7`q-aksT8@-ORBA-fxJhQH5p25s#>Ua{ zE6&o^*Og0Jaa6HX=2~-b43eg3Yd$ZHru1vHsB@~eV|6&;BNJ7vU{AHAM%6smi2gHq)$ literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/editor@2x.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/editor@2x.png" new file mode 100644 index 0000000000000000000000000000000000000000..b361ff6ec629a3b80309bac6e218dde04f54d950 GIT binary patch literal 6501 zcmZ|Ubx@T}+W_$Ua1L(j^E8Qqm-z1r5vt0v*qCIP003aiy_8Z102IW-zb6#(@a;~2 ze+mGkY;scKnx50UnSLJ#J1>6<7@c}XBi=!wEC|{V6HW2(FqVtQot{jzcL#tm2L1w` zmsO<%L*)UYIdjwhEYFO^Q(S3?MZqi|Ns_CrPGeoTf?HTf7}zc^@sbb>S@7rj!{s4V z?eJ$*xQT1_I5T%D*I^d&R7g zC?@W9jm>Y8?U*#_9+Z1rFX&IF@9w;65D-_1CqipHEgM(80^H_1$sXtnB<}>>*Usju zEP5R1Pr-~UTL(VWncgr%%Mobz49mrIshNBin0*Oy14(W zw41jPd}kW)h3ZQvYD;EMi~XwdpZz@r;g>NLezN_xTJK91jhH%&^X)r(OYR_qLNXjL zc(Ls5WLDf-97Zo_#cs0`fs^}*Pcc|f=cmK(xkI$>@}3Tt%$_nl1L&_w4_XjKH~Z5t z>-eNCkqy#sz=okepf^?QT->)_?C!25%Wqy_(ekcP66hj8z$3`9%K0$+SEv;w0Qs?w zeaq=I3%-(+nV@r!!!NY#&gnnC4jq{`owi2Xsmi0Y(wS#nFE$dIeQxtzV>COjKwcRJ znb(ay$~t;6n5EM*5%C!0W4^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Rt9$} z#VZgpb+&f&O}sX##yUzXrb#?GKVgCh`Bz1P)Nn*t2(4lICRZ9Qc`s#agxnG8gZ?Is z5b$-FiyvU*`3|4s1$hwsO%$@5oFgd+16{Bh2g9bjsUEl9tf&C>hngzYuxFwF1@+DA A=l}o! literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/icons-s0c4f1c5ae6.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/icons-s0c4f1c5ae6.png" new file mode 100644 index 0000000000000000000000000000000000000000..b82a6daa93ed669120f333ef5e5d735bb7a394ef GIT binary patch literal 2039 zcmciDc~Dc=9>DQLkg$udpeS{PqJUZpb$kW z0xFA@&0r)@B?x6{g_I={Hh}=LL}F+KLRsq>N8paNRl|8iq03bk7PPQuaL8SozI}*-0x*}z-Te&^f3%{us&N6c28HMsr zMfb>@j^rALcY}jogQEt)#6Ad_XG-Lml4J(9konsNp)q_Y=?#=Lu#FET4?xL$C}ltf z7Ty8-t`8RT21b(M!$^ZLGXKAk&HqOB;THZUgD}cx;4yu0GJo43oczxyJUE5_xj{JP zGgdg7EjiDYl4~2AhalfVkQoTsVhaOF%t2Cek(4}S?0+zjvSHj76!{h^HWw9}w~c|4 zO}4qYxzT8}jEs!z>})!ne)Chgxw(0tcl)2a^M5S=e^C_*#bh#Bm~ZMa=z4o}eSJL} zg<@mSY7b^ZqO;g*LFtwv!ycwNXy|h}{@QN$gFnB2PsA4vD56>-2)?pFX zAGNL#QaY#RrHUSo)>cOovK+p$&%tq6qi!oUp0uuY=8{xSK}BOPNL|ZFRolSSY>%;{ zrw=|jCIy1Db8_+U@(U+KQxj9u9#&S>FdLd)wYGJ3j|rycM9Y%34cYNv{<2M;R5x~T z`-kU+;-%H~P3ayTt^NTMuy{a)QMuceCHlWEdoC2u6wbieNA1E<&Nt+d5m zy3HR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"b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/img/noscreen.png" new file mode 100644 index 0000000000000000000000000000000000000000..67b7a6a84c202ba91d92b14539635f84459031dd GIT binary patch literal 1187 zcmeAS@N?(olHy`uVBq!ia0y~yV4MJCKjdHrk{2_C^?;OdfKQ0)%$YOSu3a;4-n^?< zFF$$m@ZiDy+qZ99ym-;em(T9szjN!>jnk)3?%A{Z*s&vz7V)>afXL_FRxyr!6 zqV4J87*Y}U_U7rl+Xey-7az{9`u%_Zwy=y@3GM}3UMQu$yIZPM!66?K6m`;GONx<2 zfC-3N7#NX|q5}ge;t+5^LLd!rgrp5<1eLUjA7VPeuhk*p@XxV<;n5v_CdL#|PJ0d( z0cH+`{R$2-9Kq*`4b;ls|Gq3Xe{t@qU8?iMf5%j_B%j&k^WHzY%=o(h&0fx@{8@{( zz2+57xn(zJ{Tp8;HJjh}9h*8n@2)95Q~GN0o~YV)vnSW2{_Q^QrFqrg+U3YxhPtVj z;=WvQ$qkq0^7!$t#_?V+Ls7?<_)jH%lMG*mymD3h{p)1llO7x6=L-8AdiFT@&D_$K zu{36lTGsAc0S?#BKbPiHIr(rN$LfwF-}delPS{+3|Ip*tO3z=-z0LMt)l_^!sEXC| z)8~_1xh-FJ-dktRB3S*n=CO^l({JyBt}8Rwnx_lCe0MkONco(ycNMo21aF?c61_3b z|4Z4{g}amf7wp^U@Je{cy{t7REgF+{F^f((w)yW_>08<7gSQ6hR~7BG?Pi*pHz!|Z z!eYL@Pha(v%&tHC)w(4+X`St<+`Xc+rcW>1T&%QuUQB+z^t<`_1_GD&pPIjT?{0Tn zE(g;ITYhYRwyr|DiF5rU&xPt$yKfb|uW@b;nO=7z>dDOBeVlQh*h;u>gy9Gmt2M=d(N)8>zsVD_Hx$g!-q@4wI;}U`{njas3dE%Cx=?^2mJmGT5-BG@8)fVgR zJ#0bCx0;m8@vqcP-SFzZ_PyLsdaq83cHArYU$bmZlFtO2w?$<+cI7`OJki-V_gQS* zbgc + + typecho-logo + Created with Sketch (http://www.bohemiancoding.com/sketch) + + + + + + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/index.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/index.php" new file mode 100644 index 0000000..1ee87fc --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/index.php" @@ -0,0 +1,159 @@ + +
    + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/Moxie.swf" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/Moxie.swf" new file mode 100644 index 0000000000000000000000000000000000000000..6493572bdf005ad7765d58f79f2ef65660fba931 GIT binary patch literal 28902 zcmV(}K+wNKS5pe+%K!j)+SI&xd{agDKYnNK+}zxxOIo0m0$MbJV1R-f-~y#>pcNXV zEdpAarAbpwo0_C7KA-1#07Y>Z7u>aM?&7|0xbNDu0`B|1@4NQ*K68^aMSMP=&+qm9 z{_(Axxie>G&di)S+swUjxgy?GltF71rI;y|1;Z3Y`S+k_n4%mSYYt7DU+FGg-WF+( zPebXjG2uj_W7@=t%a$#hux$Sc(OApGNmHjzome(`;^fKW(PDgjMSH@xe0+O+?=go< z0+qpdAlBNEXpOd)QrYK^b|wxRGbTl~IglaR(HV{4XIC}H4zCOUfvw_2TR?N z;PTP~O3VBE%hqNSYTVpE(ZjQr>7(8g0@1dK9kFP0X8>~wft2i=-GxYWbowK$@o+G9 zcxU@@?a^iC5dBzc6Nm+UiRi!l*5$8lhI#iE8i~Ek?G4fgl5kf%GIttS9a~$*QfsZ zP|mhK_0c}HyHDNOr@q>!zS5_@)2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~#uP2_5Y%tBK$JTLqTdBl5@e0R@gse&04+>eEv^NV`m$V-e^0cJ=FbMrg`w>6)8q5XC zyoJiJl}flx$Y9dmPPy-(ydI@o9uqR0v>zu5PY5|GX+J4sebU}39#S|Sn6C(#Ga*!flKq9vlfL|o=Ap|cO z9($><4-5N&od0C>h0JsQlSk#9DRX~!&}etiOzrd?*{n7(o4q`n{pW0UhmznP zqXq|23G0JZnI-Vt25mZr#;g_5wG{INM-PDgcPq3?`FnWMEAy{tPEi4hU5Tq4^M+yKuaHyN>xqdKy^&r|FLF0Qb~GJ0B1P zV+1pcU>spS;Gm!QY3{kcl7W7ySu=RA2kV(OKt}}mQuHx5UHd*MejecX4YX;bE>0h` z0-Q5*WwyRxe(`k`dX}T|hBBR^(M!qD_l8OvNMjqgssSK3uXR%K=lCftagZANJk`+B zE==M*hHYs-eTveTd+9Iopf1-u({g|+BO)(j-@Hg6ru{>Rjo!dJyFT$T#$@Xt84i=v9Xo6=Z-(rw(fY)$MmoWOMwl3*f z2JlHZZV~ce@w)MX-+i0B?vwS27jeIOk(WaE{SPo?7SBlEgBt{Z36~ z1;4MnX8>aE)Y|XTR6oPd@SYfR7wMf9m*B8pf(N}4SoMiRSb`(|EzfezPHTzfnEEK! zJ+~OSbF^dJ`+zT=iC%!`p-|12{DpLL{%~y^ETo5#aw&Q+4_yAge*4R-1Ct>1{{SIf F8yMhWOBnzF literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/diff.js" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/diff.js" new file mode 100644 index 0000000..e028122 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/diff.js" @@ -0,0 +1 @@ +function diff_match_patch(){this.Diff_Timeout=1;this.Diff_EditCost=4;this.Match_Threshold=0.5;this.Match_Distance=1000;this.Patch_DeleteThreshold=0.5;this.Patch_Margin=4;this.Match_MaxBits=32}var DIFF_DELETE=-1;var DIFF_INSERT=1;var DIFF_EQUAL=0;diff_match_patch.Diff;diff_match_patch.prototype.diff_main=function(b,a,d,f){if(typeof f=="undefined"){if(this.Diff_Timeout<=0){f=Number.MAX_VALUE}else{f=(new Date).getTime()+this.Diff_Timeout*1000}}var i=f;if(b==null||a==null){throw new Error("Null input. (diff_main)")}if(b==a){if(b){return[[DIFF_EQUAL,b]]}return[]}if(typeof d=="undefined"){d=true}var j=d;var e=this.diff_commonPrefix(b,a);var h=b.substring(0,e);b=b.substring(e);a=a.substring(e);e=this.diff_commonSuffix(b,a);var c=b.substring(b.length-e);b=b.substring(0,b.length-e);a=a.substring(0,a.length-e);var g=this.diff_compute_(b,a,j,i);if(h){g.unshift([DIFF_EQUAL,h])}if(c){g.push([DIFF_EQUAL,c])}this.diff_cleanupMerge(g);return g};diff_match_patch.prototype.diff_compute_=function(c,b,q,p){var j;if(!c){return[[DIFF_INSERT,b]]}if(!b){return[[DIFF_DELETE,c]]}var m=c.length>b.length?c:b;var d=c.length>b.length?b:c;var f=m.indexOf(d);if(f!=-1){j=[[DIFF_INSERT,m.substring(0,f)],[DIFF_EQUAL,d],[DIFF_INSERT,m.substring(f+d.length)]];if(c.length>b.length){j[0][0]=j[2][0]=DIFF_DELETE}return j}if(d.length==1){return[[DIFF_DELETE,c],[DIFF_INSERT,b]]}var a=this.diff_halfMatch_(c,b);if(a){var l=a[0];var h=a[1];var o=a[2];var n=a[3];var e=a[4];var k=this.diff_main(l,o,q,p);var g=this.diff_main(h,n,q,p);return k.concat([[DIFF_EQUAL,e]],g)}if(q&&c.length>100&&b.length>100){return this.diff_lineMode_(c,b,p)}return this.diff_bisect_(c,b,p)};diff_match_patch.prototype.diff_lineMode_=function(d,c,n){var k=this.diff_linesToChars_(d,c);d=k.chars1;c=k.chars2;var e=k.lineArray;var g=this.diff_main(d,c,false,n);this.diff_charsToLines_(g,e);this.diff_cleanupSemantic(g);g.push([DIFF_EQUAL,""]);var b=0;var m=0;var l=0;var i="";var h="";while(b=1&&l>=1){g.splice(b-m-l,m+l);b=b-m-l;var k=this.diff_main(i,h,false,n);for(var f=k.length-1;f>=0;f--){g.splice(b,0,k[f])}b=b+k.length}l=0;m=0;i="";h="";break}b++}g.pop();return g};diff_match_patch.prototype.diff_bisect_=function(n,l,A){var v=n.length;var g=l.length;var h=Math.ceil((v+g)/2);var r=h;var o=2*h;var e=new Array(o);var b=new Array(o);for(var m=0;mA){break}for(var k=-z+s;k<=z-p;k+=2){var q=r+k;var y;if(k==-z||(k!=z&&e[q-1]v){p+=2}else{if(f>g){s+=2}else{if(i){var a=r+B-k;if(a>=0&&a=w){return this.diff_bisectSplit_(n,l,y,f,A)}}}}}}for(var j=-z+u;j<=z-t;j+=2){var a=r+j;var w;if(j==-z||(j!=z&&b[a-1]v){t+=2}else{if(c>g){u+=2}else{if(!i){var q=r+B-j;if(q>=0&&q=w){return this.diff_bisectSplit_(n,l,y,f,A)}}}}}}}return[[DIFF_DELETE,n],[DIFF_INSERT,l]]};diff_match_patch.prototype.diff_bisectSplit_=function(d,c,i,h,k){var f=d.substring(0,i);var b=c.substring(0,h);var e=d.substring(i);var a=c.substring(h);var g=this.diff_main(f,b,false,k);var j=this.diff_main(e,a,false,k);return g.concat(j)};diff_match_patch.prototype.diff_linesToChars_=function(g,e){var d=[];var a={};d[0]="";function f(m){var k="";var i=0;var l=-1;var j=d.length;while(le){b=b.substring(g-e)}else{if(gb.length?c:b;var d=c.length>b.length?b:c;if(j.length<4||d.length*2=v.length){return[s,q,y,x,z]}else{return null}}var g=k(j,d,Math.ceil(j.length/4));var f=k(j,d,Math.ceil(j.length/2));var a;if(!g&&!f){return null}else{if(!f){a=g}else{if(!g){a=f}else{a=g[4].length>f[4].length?g:f}}}var i,h,m,l;if(c.length>b.length){i=a[0];h=a[1];m=a[2];l=a[3]}else{m=a[0];l=a[1];i=a[2];h=a[3]}var e=a[4];return[i,h,m,l,e]};diff_match_patch.prototype.diff_cleanupSemantic=function(m){var n=false;var l=[];var e=0;var f=null;var a=0;var k=0;var j=0;var i=0;var h=0;while(a0?l[e-1]:-1;k=0;j=0;i=0;h=0;f=null;n=true}}a++}if(n){this.diff_cleanupMerge(m)}this.diff_cleanupSemanticLossless(m);a=1;while(a=c){if(d>=g.length/2||d>=b.length/2){m.splice(a,0,[DIFF_EQUAL,b.substring(0,d)]);m[a-1][1]=g.substring(0,g.length-d);m[a+1][1]=b.substring(d);a++}}else{if(c>=g.length/2||c>=b.length/2){m.splice(a,0,[DIFF_EQUAL,g.substring(0,c)]);m[a-1][0]=DIFF_INSERT;m[a-1][1]=b.substring(0,b.length-c);m[a+1][0]=DIFF_DELETE;m[a+1][1]=g.substring(c);a++}}a++}a++}};diff_match_patch.prototype.diff_cleanupSemanticLossless=function(i){function c(r,y){if(!r||!y){return 6}var t=r.charAt(r.length-1);var s=y.charAt(0);var x=t.match(diff_match_patch.nonAlphaNumericRegex_);var w=s.match(diff_match_patch.nonAlphaNumericRegex_);var o=x&&t.match(diff_match_patch.whitespaceRegex_);var n=w&&s.match(diff_match_patch.whitespaceRegex_);var q=o&&t.match(diff_match_patch.linebreakRegex_);var p=n&&s.match(diff_match_patch.linebreakRegex_);var v=q&&r.match(diff_match_patch.blanklineEndRegex_);var u=p&&y.match(diff_match_patch.blanklineStartRegex_);if(v||u){return 5}else{if(q||p){return 4}else{if(x&&!o&&n){return 3}else{if(o||n){return 2}else{if(x||w){return 1}}}}}return 0}var a=1;while(a=e){e=d;g=m;h=l;f=k}}if(i[a-1][1]!=g){if(g){i[a-1][1]=g}else{i.splice(a-1,1);a--}i[a][1]=h;if(f){i[a+1][1]=f}else{i.splice(a+1,1);a--}}}a++}};diff_match_patch.nonAlphaNumericRegex_=/[^a-zA-Z0-9]/;diff_match_patch.whitespaceRegex_=/\s/;diff_match_patch.linebreakRegex_=/[\r\n]/;diff_match_patch.blanklineEndRegex_=/\n\r?\n$/;diff_match_patch.blanklineStartRegex_=/^\r?\n\r?\n/;diff_match_patch.prototype.diff_cleanupEfficiency=function(g){var i=false;var f=[];var c=0;var d=null;var a=0;var h=false;var j=false;var b=false;var e=false;while(a0?f[c-1]:-1;b=e=false}i=true}}a++}if(i){this.diff_cleanupMerge(g)}};diff_match_patch.prototype.diff_cleanupMerge=function(h){h.push([DIFF_EQUAL,""]);var g=0;var f=0;var e=0;var c="";var b="";var a;while(g1){if(f!==0&&e!==0){a=this.diff_commonPrefix(b,c);if(a!==0){if((g-f-e)>0&&h[g-f-e-1][0]==DIFF_EQUAL){h[g-f-e-1][1]+=b.substring(0,a)}else{h.splice(0,0,[DIFF_EQUAL,b.substring(0,a)]);g++}b=b.substring(a);c=c.substring(a)}a=this.diff_commonSuffix(b,c);if(a!==0){h[g][1]=b.substring(b.length-a)+h[g][1];b=b.substring(0,b.length-a);c=c.substring(0,c.length-a)}}if(f===0){h.splice(g-e,f+e,[DIFF_INSERT,b])}else{if(e===0){h.splice(g-f,f+e,[DIFF_DELETE,c])}else{h.splice(g-f-e,f+e,[DIFF_DELETE,c],[DIFF_INSERT,b])}}g=g-f-e+(f?1:0)+(e?1:0)+1}else{if(g!==0&&h[g-1][0]==DIFF_EQUAL){h[g-1][1]+=h[g][1];h.splice(g,1)}else{g++}}e=0;f=0;c="";b="";break}}if(h[h.length-1][1]===""){h.pop()}var d=false;g=1;while(gf){break}e=d;c=b}if(g.length!=a&&g[a][0]===DIFF_DELETE){return c}return c+(f-e)};diff_match_patch.prototype.diff_prettyHtml=function(f){var d=[];var h=/&/g;var c=//g;var g=/\n/g;for(var i=0;i");switch(e){case DIFF_INSERT:d[i]=''+j+"";break;case DIFF_DELETE:d[i]=''+j+"";break;case DIFF_EQUAL:d[i]=""+j+"";break}}return d.join("")};diff_match_patch.prototype.diff_text1=function(c){var b=[];for(var a=0;athis.Match_MaxBits){throw new Error("Pattern too long for this browser.")}var m=this.match_alphabet_(t);var a=this;function b(y,d){var s=y/t.length;var j=Math.abs(i-d);if(!a.Match_Distance){return j?1:s}return s+(j/a.Match_Distance)}var o=this.Match_Threshold;var c=l.indexOf(t,i);if(c!=-1){o=Math.min(b(0,c),o);c=l.lastIndexOf(t,i+t.length);if(c!=-1){o=Math.min(b(0,c),o)}}var v=1<<(t.length-1);c=-1;var f,k;var g=t.length+l.length;var h;for(var u=0;u=e;q--){var w=m[l.charAt(q-1)];if(u===0){p[q]=((p[q+1]<<1)|1)&w}else{p[q]=(((p[q+1]<<1)|1)&w)|(((h[q+1]|h[q])<<1)|1)|h[q+1]}if(p[q]&v){var r=b(u,q-1);if(r<=o){o=r;c=q-1;if(c>i){e=Math.max(1,2*i-c)}else{break}}}}if(b(u+1,i)>o){break}h=p}return c};diff_match_patch.prototype.match_alphabet_=function(c){var b={};for(var a=0;a2){this.diff_cleanupSemantic(k);this.diff_cleanupEfficiency(k)}}else{if(o&&typeof o=="object"&&typeof c=="undefined"&&typeof p=="undefined"){k=(o);d=this.diff_text1(k)}else{if(typeof o=="string"&&c&&typeof c=="object"&&typeof p=="undefined"){d=(o);k=(c)}else{if(typeof o=="string"&&typeof c=="string"&&p&&typeof p=="object"){d=(o);k=(p)}else{throw new Error("Unknown call format to patch_make.")}}}}if(k.length===0){return[]}var b=[];var e=new diff_match_patch.patch_obj();var h=0;var j=0;var i=0;var g=d;var m=d;for(var n=0;n=2*this.Patch_Margin){if(h){this.patch_addContext_(e,g);b.push(e);e=new diff_match_patch.patch_obj();h=0;g=m;j=i}}}break}if(f!==DIFF_INSERT){j+=l.length}if(f!==DIFF_DELETE){i+=l.length}}if(h){this.patch_addContext_(e,g);b.push(e)}return b};diff_match_patch.prototype.patch_deepCopy=function(c){var d=[];for(var b=0;bthis.Match_MaxBits){f=this.match_main(p,e.substring(0,this.Match_MaxBits),b);if(f!=-1){k=this.match_main(p,e.substring(e.length-this.Match_MaxBits),b+e.length-this.Match_MaxBits);if(k==-1||f>=k){f=-1}}}else{f=this.match_main(p,e,b)}if(f==-1){g[n]=false;o-=a[n].length2-a[n].length1}else{g[n]=true;o=f-b;var d;if(k==-1){d=p.substring(f,f+e.length)}else{d=p.substring(f,k+this.Match_MaxBits)}if(e==d){p=p.substring(0,f)+this.diff_text2(a[n].diffs)+p.substring(f+e.length)}else{var i=this.diff_main(e,d,false);if(e.length>this.Match_MaxBits&&this.diff_levenshtein(i)/e.length>this.Patch_DeleteThreshold){g[n]=false}else{this.diff_cleanupSemanticLossless(i);var j=0;var h;for(var m=0;mf[0][1].length){var e=c-f[0][1].length;f[0][1]=b.substring(f[0][1].length)+f[0][1];g.start1-=e;g.start2-=e;g.length1+=e;g.length2+=e}}g=d[d.length-1];f=g.diffs;if(f.length==0||f[f.length-1][0]!=DIFF_EQUAL){f.push([DIFF_EQUAL,b]);g.length1+=c;g.length2+=c}else{if(c>f[f.length-1][1].length){var e=c-f[f.length-1][1].length;f[f.length-1][1]+=b.substring(0,e);g.length1+=e;g.length2+=e}}return b};diff_match_patch.prototype.patch_splitMax=function(a){var i=this.Match_MaxBits;for(var l=0;l2*i){e.length1+=k.length;c+=k.length;j=false;e.diffs.push([h,k]);f.diffs.shift()}else{k=k.substring(0,i-e.length1-this.Patch_Margin);e.length1+=k.length;c+=k.length;if(h===DIFF_EQUAL){e.length2+=k.length;b+=k.length}else{j=false}e.diffs.push([h,k]);if(k==f.diffs[0][1]){f.diffs.shift()}else{f.diffs[0][1]=f.diffs[0][1].substring(k.length)}}}}g=this.diff_text2(e.diffs);g=g.substring(g.length-this.Patch_Margin);var d=this.diff_text1(f.diffs).substring(0,this.Patch_Margin);if(d!==""){e.length1+=d.length;e.length2+=d.length;if(e.diffs.length!==0&&e.diffs[e.diffs.length-1][0]===DIFF_EQUAL){e.diffs[e.diffs.length-1][1]+=d}else{e.diffs.push([DIFF_EQUAL,d])}}if(!j){a.splice(++l,0,e)}}}};diff_match_patch.prototype.patch_toText=function(b){var c=[];for(var a=0;a";q=("hidden" in t);e=t.childNodes.length==1||(function(){(m.createElement)("a");var v=m.createDocumentFragment();return(typeof v.cloneNode=="undefined"||typeof v.createDocumentFragment=="undefined"||typeof v.createElement=="undefined")}())}catch(u){q=true;e=true}}());function f(t,v){var w=t.createElement("p"),u=t.getElementsByTagName("head")[0]||t.documentElement;w.innerHTML="x";return u.insertBefore(w.lastChild,u.firstChild)}function l(){var t=j.elements;return typeof t=="string"?t.split(" "):t}function p(t){var u=o[t[i]];if(!u){u={};a++;t[i]=a;o[a]=u}return u}function n(w,t,v){if(!t){t=m}if(e){return t.createElement(w)}if(!v){v=p(t)}var u;if(v.cache[w]){u=v.cache[w].cloneNode()}else{if(c.test(w)){u=(v.cache[w]=v.createElem(w)).cloneNode()}else{u=v.createElem(w)}}return u.canHaveChildren&&!h.test(w)?v.frag.appendChild(u):u}function r(v,x){if(!v){v=m}if(e){return v.createDocumentFragment()}x=x||p(v);var y=x.frag.cloneNode(),w=0,u=l(),t=u.length;for(;w=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;k0){return true}j[g]=1;i=(j[g]>0);j[g]=0;return i}})})(jQuery);(function(b,e){var a=0,d=Array.prototype.slice,c=b.cleanData;b.cleanData=function(f){for(var g=0,h;(h=f[g])!=null;g++){try{b(h).triggerHandler("remove")}catch(j){}}c(f)};b.widget=function(f,g,n){var k,l,i,m,h={},j=f.split(".")[0];f=f.split(".")[1];k=j+"-"+f;if(!n){n=g;g=b.Widget}b.expr[":"][k.toLowerCase()]=function(o){return !!b.data(o,k)};b[j]=b[j]||{};l=b[j][f];i=b[j][f]=function(o,p){if(!this._createWidget){return new i(o,p)}if(arguments.length){this._createWidget(o,p)}};b.extend(i,l,{version:n.version,_proto:b.extend({},n),_childConstructors:[]});m=new g();m.options=b.widget.extend({},m.options);b.each(n,function(p,o){if(!b.isFunction(o)){h[p]=o;return}h[p]=(function(){var q=function(){return g.prototype[p].apply(this,arguments)},r=function(s){return g.prototype[p].apply(this,s)};return function(){var u=this._super,s=this._superApply,t;this._super=q;this._superApply=r;t=o.apply(this,arguments);this._super=u;this._superApply=s;return t}})()});i.prototype=b.widget.extend(m,{widgetEventPrefix:l?m.widgetEventPrefix:f},h,{constructor:i,namespace:j,widgetName:f,widgetFullName:k});if(l){b.each(l._childConstructors,function(p,q){var o=q.prototype;b.widget(o.namespace+"."+o.widgetName,i,q._proto)});delete l._childConstructors}else{g._childConstructors.push(i)}b.widget.bridge(f,i)};b.widget.extend=function(k){var g=d.call(arguments,1),j=0,f=g.length,h,i;for(;j",options:{disabled:false,create:null},_createWidget:function(f,g){g=b(g||this.defaultElement||this)[0];this.element=b(g);this.uuid=a++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=b.widget.extend({},this.options,this._getCreateOptions(),f);this.bindings=b();this.hoverable=b();this.focusable=b();if(g!==this){b.data(g,this.widgetFullName,this);this._on(true,this.element,{remove:function(h){if(h.target===g){this.destroy()}}});this.document=b(g.style?g.ownerDocument:g.document||g);this.window=b(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:b.noop,_getCreateEventData:b.noop,_create:b.noop,_init:b.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetName).removeData(this.widgetFullName).removeData(b.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:b.noop,widget:function(){return this.element},option:function(j,k){var f=j,l,h,g;if(arguments.length===0){return b.widget.extend({},this.options)}if(typeof j==="string"){f={};l=j.split(".");j=l.shift();if(l.length){h=f[j]=b.widget.extend({},this.options[j]);for(g=0;g=this.options.distance)},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery);(function(e,g){e.extend(e.ui,{datepicker:{version:"1.10.3"}});var f="datepicker",c;function b(){this._curInst=null;this._keyEvent=false;this._disabledInputs=[];this._datepickerShowing=false;this._inDialog=false;this._mainDivId="ui-datepicker-div";this._inlineClass="ui-datepicker-inline";this._appendClass="ui-datepicker-append";this._triggerClass="ui-datepicker-trigger";this._dialogClass="ui-datepicker-dialog";this._disableClass="ui-datepicker-disabled";this._unselectableClass="ui-datepicker-unselectable";this._currentClass="ui-datepicker-current-day";this._dayOverClass="ui-datepicker-days-cell-over";this.regional=[];this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:false,showMonthAfterYear:false,yearSuffix:""};this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:false,hideIfNoPrevNext:false,navigationAsDateFormat:false,gotoCurrent:false,changeMonth:false,changeYear:false,yearRange:"c-10:c+10",showOtherMonths:false,selectOtherMonths:false,showWeek:false,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:true,showButtonPanel:false,autoSize:false,disabled:false};e.extend(this._defaults,this.regional[""]);this.dpDiv=d(e("
    "))}e.extend(b.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(h){a(this._defaults,h||{});return this},_attachDatepicker:function(k,h){var l,j,i;l=k.nodeName.toLowerCase();j=(l==="div"||l==="span");if(!k.id){this.uuid+=1;k.id="dp"+this.uuid}i=this._newInst(e(k),j);i.settings=e.extend({},h||{});if(l==="input"){this._connectDatepicker(k,i)}else{if(j){this._inlineDatepicker(k,i)}}},_newInst:function(i,h){var j=i[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1");return{id:j,input:i,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:h,dpDiv:(!h?this.dpDiv:d(e("
    ")))}},_connectDatepicker:function(j,i){var h=e(j);i.append=e([]);i.trigger=e([]);if(h.hasClass(this.markerClassName)){return}this._attachments(h,i);h.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp);this._autoSize(i);e.data(j,f,i);if(i.settings.disabled){this._disableDatepicker(j)}},_attachments:function(j,m){var i,l,h,n=this._get(m,"appendText"),k=this._get(m,"isRTL");if(m.append){m.append.remove()}if(n){m.append=e(""+n+"");j[k?"before":"after"](m.append)}j.unbind("focus",this._showDatepicker);if(m.trigger){m.trigger.remove()}i=this._get(m,"showOn");if(i==="focus"||i==="both"){j.focus(this._showDatepicker)}if(i==="button"||i==="both"){l=this._get(m,"buttonText");h=this._get(m,"buttonImage");m.trigger=e(this._get(m,"buttonImageOnly")?e("").addClass(this._triggerClass).attr({src:h,alt:l,title:l}):e("").addClass(this._triggerClass).html(!h?l:e("").attr({src:h,alt:l,title:l})));j[k?"before":"after"](m.trigger);m.trigger.click(function(){if(e.datepicker._datepickerShowing&&e.datepicker._lastInput===j[0]){e.datepicker._hideDatepicker()}else{if(e.datepicker._datepickerShowing&&e.datepicker._lastInput!==j[0]){e.datepicker._hideDatepicker();e.datepicker._showDatepicker(j[0])}else{e.datepicker._showDatepicker(j[0])}}return false})}},_autoSize:function(o){if(this._get(o,"autoSize")&&!o.inline){var l,j,k,n,m=new Date(2009,12-1,20),h=this._get(o,"dateFormat");if(h.match(/[DM]/)){l=function(i){j=0;k=0;for(n=0;nj){j=i[n].length;k=n}}return k};m.setMonth(l(this._get(o,(h.match(/MM/)?"monthNames":"monthNamesShort"))));m.setDate(l(this._get(o,(h.match(/DD/)?"dayNames":"dayNamesShort")))+20-m.getDay())}o.input.attr("size",this._formatDate(o,m).length)}},_inlineDatepicker:function(i,h){var j=e(i);if(j.hasClass(this.markerClassName)){return}j.addClass(this.markerClassName).append(h.dpDiv);e.data(i,f,h);this._setDate(h,this._getDefaultDate(h),true);this._updateDatepicker(h);this._updateAlternate(h);if(h.settings.disabled){this._disableDatepicker(i)}h.dpDiv.css("display","block")},_dialogDatepicker:function(o,i,m,j,n){var h,r,l,q,p,k=this._dialogInst;if(!k){this.uuid+=1;h="dp"+this.uuid;this._dialogInput=e("");this._dialogInput.keydown(this._doKeyDown);e("body").append(this._dialogInput);k=this._dialogInst=this._newInst(this._dialogInput,false);k.settings={};e.data(this._dialogInput[0],f,k)}a(k.settings,j||{});i=(i&&i.constructor===Date?this._formatDate(k,i):i);this._dialogInput.val(i);this._pos=(n?(n.length?n:[n.pageX,n.pageY]):null);if(!this._pos){r=document.documentElement.clientWidth;l=document.documentElement.clientHeight;q=document.documentElement.scrollLeft||document.body.scrollLeft;p=document.documentElement.scrollTop||document.body.scrollTop;this._pos=[(r/2)-100+q,(l/2)-150+p]}this._dialogInput.css("left",(this._pos[0]+20)+"px").css("top",this._pos[1]+"px");k.settings.onSelect=m;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);if(e.blockUI){e.blockUI(this.dpDiv)}e.data(this._dialogInput[0],f,k);return this},_destroyDatepicker:function(j){var k,h=e(j),i=e.data(j,f);if(!h.hasClass(this.markerClassName)){return}k=j.nodeName.toLowerCase();e.removeData(j,f);if(k==="input"){i.append.remove();i.trigger.remove();h.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else{if(k==="div"||k==="span"){h.removeClass(this.markerClassName).empty()}}},_enableDatepicker:function(k){var l,j,h=e(k),i=e.data(k,f);if(!h.hasClass(this.markerClassName)){return}l=k.nodeName.toLowerCase();if(l==="input"){k.disabled=false;i.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else{if(l==="div"||l==="span"){j=h.children("."+this._inlineClass);j.children().removeClass("ui-state-disabled");j.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",false)}}this._disabledInputs=e.map(this._disabledInputs,function(m){return(m===k?null:m)})},_disableDatepicker:function(k){var l,j,h=e(k),i=e.data(k,f);if(!h.hasClass(this.markerClassName)){return}l=k.nodeName.toLowerCase();if(l==="input"){k.disabled=true;i.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else{if(l==="div"||l==="span"){j=h.children("."+this._inlineClass);j.children().addClass("ui-state-disabled");j.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",true)}}this._disabledInputs=e.map(this._disabledInputs,function(m){return(m===k?null:m)});this._disabledInputs[this._disabledInputs.length]=k},_isDisabledDatepicker:function(j){if(!j){return false}for(var h=0;h-1)}},_doKeyUp:function(j){var h,k=e.datepicker._getInst(j.target);if(k.input.val()!==k.lastVal){try{h=e.datepicker.parseDate(e.datepicker._get(k,"dateFormat"),(k.input?k.input.val():null),e.datepicker._getFormatConfig(k));if(h){e.datepicker._setDateFromField(k);e.datepicker._updateAlternate(k);e.datepicker._updateDatepicker(k)}}catch(i){}}return true},_showDatepicker:function(i){i=i.target||i;if(i.nodeName.toLowerCase()!=="input"){i=e("input",i.parentNode)[0]}if(e.datepicker._isDisabledDatepicker(i)||e.datepicker._lastInput===i){return}var k,o,j,m,n,h,l;k=e.datepicker._getInst(i);if(e.datepicker._curInst&&e.datepicker._curInst!==k){e.datepicker._curInst.dpDiv.stop(true,true);if(k&&e.datepicker._datepickerShowing){e.datepicker._hideDatepicker(e.datepicker._curInst.input[0])}}o=e.datepicker._get(k,"beforeShow");j=o?o.apply(i,[i,k]):{};if(j===false){return}a(k.settings,j);k.lastVal=null;e.datepicker._lastInput=i;e.datepicker._setDateFromField(k);if(e.datepicker._inDialog){i.value=""}if(!e.datepicker._pos){e.datepicker._pos=e.datepicker._findPos(i);e.datepicker._pos[1]+=i.offsetHeight}m=false;e(i).parents().each(function(){m|=e(this).css("position")==="fixed";return !m});n={left:e.datepicker._pos[0],top:e.datepicker._pos[1]};e.datepicker._pos=null;k.dpDiv.empty();k.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});e.datepicker._updateDatepicker(k);n=e.datepicker._checkOffset(k,n,m);k.dpDiv.css({position:(e.datepicker._inDialog&&e.blockUI?"static":(m?"fixed":"absolute")),display:"none",left:n.left+"px",top:n.top+"px"});if(!k.inline){h=e.datepicker._get(k,"showAnim");l=e.datepicker._get(k,"duration");k.dpDiv.zIndex(e(i).zIndex()+1);e.datepicker._datepickerShowing=true;if(e.effects&&e.effects.effect[h]){k.dpDiv.show(h,e.datepicker._get(k,"showOptions"),l)}else{k.dpDiv[h||"show"](h?l:null)}if(e.datepicker._shouldFocusInput(k)){k.input.focus()}e.datepicker._curInst=k}},_updateDatepicker:function(j){this.maxRows=4;c=j;j.dpDiv.empty().append(this._generateHTML(j));this._attachHandlers(j);j.dpDiv.find("."+this._dayOverClass+" a").mouseover();var l,h=this._getNumberOfMonths(j),k=h[1],i=17;j.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");if(k>1){j.dpDiv.addClass("ui-datepicker-multi-"+k).css("width",(i*k)+"em")}j.dpDiv[(h[0]!==1||h[1]!==1?"add":"remove")+"Class"]("ui-datepicker-multi");j.dpDiv[(this._get(j,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");if(j===e.datepicker._curInst&&e.datepicker._datepickerShowing&&e.datepicker._shouldFocusInput(j)){j.input.focus()}if(j.yearshtml){l=j.yearshtml;setTimeout(function(){if(l===j.yearshtml&&j.yearshtml){j.dpDiv.find("select.ui-datepicker-year:first").replaceWith(j.yearshtml)}l=j.yearshtml=null},0)}},_shouldFocusInput:function(h){return h.input&&h.input.is(":visible")&&!h.input.is(":disabled")&&!h.input.is(":focus")},_checkOffset:function(m,k,j){var l=m.dpDiv.outerWidth(),p=m.dpDiv.outerHeight(),o=m.input?m.input.outerWidth():0,h=m.input?m.input.outerHeight():0,n=document.documentElement.clientWidth+(j?0:e(document).scrollLeft()),i=document.documentElement.clientHeight+(j?0:e(document).scrollTop());k.left-=(this._get(m,"isRTL")?(l-o):0);k.left-=(j&&k.left===m.input.offset().left)?e(document).scrollLeft():0;k.top-=(j&&k.top===(m.input.offset().top+h))?e(document).scrollTop():0;k.left-=Math.min(k.left,(k.left+l>n&&n>l)?Math.abs(k.left+l-n):0);k.top-=Math.min(k.top,(k.top+p>i&&i>p)?Math.abs(p+h):0);return k},_findPos:function(k){var h,j=this._getInst(k),i=this._get(j,"isRTL");while(k&&(k.type==="hidden"||k.nodeType!==1||e.expr.filters.hidden(k))){k=k[i?"previousSibling":"nextSibling"]}h=e(k).offset();return[h.left,h.top]},_hideDatepicker:function(j){var i,m,l,h,k=this._curInst;if(!k||(j&&k!==e.data(j,f))){return}if(this._datepickerShowing){i=this._get(k,"showAnim");m=this._get(k,"duration");l=function(){e.datepicker._tidyDialog(k)};if(e.effects&&(e.effects.effect[i]||e.effects[i])){k.dpDiv.hide(i,e.datepicker._get(k,"showOptions"),m,l)}else{k.dpDiv[(i==="slideDown"?"slideUp":(i==="fadeIn"?"fadeOut":"hide"))]((i?m:null),l)}if(!i){l()}this._datepickerShowing=false;h=this._get(k,"onClose");if(h){h.apply((k.input?k.input[0]:null),[(k.input?k.input.val():""),k])}this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(e.blockUI){e.unblockUI();e("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(h){h.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")},_checkExternalClick:function(i){if(!e.datepicker._curInst){return}var h=e(i.target),j=e.datepicker._getInst(h[0]);if(((h[0].id!==e.datepicker._mainDivId&&h.parents("#"+e.datepicker._mainDivId).length===0&&!h.hasClass(e.datepicker.markerClassName)&&!h.closest("."+e.datepicker._triggerClass).length&&e.datepicker._datepickerShowing&&!(e.datepicker._inDialog&&e.blockUI)))||(h.hasClass(e.datepicker.markerClassName)&&e.datepicker._curInst!==j)){e.datepicker._hideDatepicker()}},_adjustDate:function(l,k,j){var i=e(l),h=this._getInst(i[0]);if(this._isDisabledDatepicker(i[0])){return}this._adjustInstDate(h,k+(j==="M"?this._get(h,"showCurrentAtPos"):0),j);this._updateDatepicker(h)},_gotoToday:function(k){var h,j=e(k),i=this._getInst(j[0]);if(this._get(i,"gotoCurrent")&&i.currentDay){i.selectedDay=i.currentDay;i.drawMonth=i.selectedMonth=i.currentMonth;i.drawYear=i.selectedYear=i.currentYear}else{h=new Date();i.selectedDay=h.getDate();i.drawMonth=i.selectedMonth=h.getMonth();i.drawYear=i.selectedYear=h.getFullYear()}this._notifyChange(i);this._adjustDate(j)},_selectMonthYear:function(l,h,k){var j=e(l),i=this._getInst(j[0]);i["selected"+(k==="M"?"Month":"Year")]=i["draw"+(k==="M"?"Month":"Year")]=parseInt(h.options[h.selectedIndex].value,10);this._notifyChange(i);this._adjustDate(j)},_selectDay:function(m,k,h,l){var i,j=e(m);if(e(l).hasClass(this._unselectableClass)||this._isDisabledDatepicker(j[0])){return}i=this._getInst(j[0]);i.selectedDay=i.currentDay=e("a",l).html();i.selectedMonth=i.currentMonth=k;i.selectedYear=i.currentYear=h;this._selectDate(m,this._formatDate(i,i.currentDay,i.currentMonth,i.currentYear))},_clearDate:function(i){var h=e(i);this._selectDate(h,"")},_selectDate:function(l,h){var i,k=e(l),j=this._getInst(k[0]);h=(h!=null?h:this._formatDate(j));if(j.input){j.input.val(h)}this._updateAlternate(j);i=this._get(j,"onSelect");if(i){i.apply((j.input?j.input[0]:null),[h,j])}else{if(j.input){j.input.trigger("change")}}if(j.inline){this._updateDatepicker(j)}else{this._hideDatepicker();this._lastInput=j.input[0];if(typeof(j.input[0])!=="object"){j.input.focus()}this._lastInput=null}},_updateAlternate:function(l){var k,j,h,i=this._get(l,"altField");if(i){k=this._get(l,"altFormat")||this._get(l,"dateFormat");j=this._getDate(l);h=this.formatDate(k,j,this._getFormatConfig(l));e(i).each(function(){e(this).val(h)})}},noWeekends:function(i){var h=i.getDay();return[(h>0&&h<6),""]},iso8601Week:function(h){var i,j=new Date(h.getTime());j.setDate(j.getDate()+4-(j.getDay()||7));i=j.getTime();j.setMonth(0);j.setDate(1);return Math.floor(Math.round((i-j)/86400000)/7)+1},parseDate:function(x,s,z){if(x==null||s==null){throw"Invalid arguments"}s=(typeof s==="object"?s.toString():s+"");if(s===""){return null}var k,u,i,y=0,n=(z?z.shortYearCutoff:null)||this._defaults.shortYearCutoff,j=(typeof n!=="string"?n:new Date().getFullYear()%100+parseInt(n,10)),q=(z?z.dayNamesShort:null)||this._defaults.dayNamesShort,B=(z?z.dayNames:null)||this._defaults.dayNames,h=(z?z.monthNamesShort:null)||this._defaults.monthNamesShort,l=(z?z.monthNames:null)||this._defaults.monthNames,m=-1,C=-1,w=-1,p=-1,v=false,A,r=function(E){var F=(k+1-1){C=1;w=p;do{u=this._getDaysInMonth(m,C-1);if(w<=u){break}C++;w-=u}while(true)}A=this._daylightSavingAdjust(new Date(m,C-1,w));if(A.getFullYear()!==m||A.getMonth()+1!==C||A.getDate()!==w){throw"Invalid date"}return A},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(((1970-1)*365+Math.floor(1970/4)-Math.floor(1970/100)+Math.floor(1970/400))*24*60*60*10000000),formatDate:function(q,k,l){if(!k){return""}var s,t=(l?l.dayNamesShort:null)||this._defaults.dayNamesShort,i=(l?l.dayNames:null)||this._defaults.dayNames,o=(l?l.monthNamesShort:null)||this._defaults.monthNamesShort,m=(l?l.monthNames:null)||this._defaults.monthNames,r=function(u){var v=(s+112?h.getHours()+2:0);return h},_setDate:function(n,k,m){var h=!k,j=n.selectedMonth,l=n.selectedYear,i=this._restrictMinMax(n,this._determineDate(n,k,new Date()));n.selectedDay=n.currentDay=i.getDate();n.drawMonth=n.selectedMonth=n.currentMonth=i.getMonth();n.drawYear=n.selectedYear=n.currentYear=i.getFullYear();if((j!==n.selectedMonth||l!==n.selectedYear)&&!m){this._notifyChange(n)}this._adjustInstDate(n);if(n.input){n.input.val(h?"":this._formatDate(n))}},_getDate:function(i){var h=(!i.currentYear||(i.input&&i.input.val()==="")?null:this._daylightSavingAdjust(new Date(i.currentYear,i.currentMonth,i.currentDay)));return h},_attachHandlers:function(i){var h=this._get(i,"stepMonths"),j="#"+i.id.replace(/\\\\/g,"\\");i.dpDiv.find("[data-handler]").map(function(){var k={prev:function(){e.datepicker._adjustDate(j,-h,"M")},next:function(){e.datepicker._adjustDate(j,+h,"M")},hide:function(){e.datepicker._hideDatepicker()},today:function(){e.datepicker._gotoToday(j)},selectDay:function(){e.datepicker._selectDay(j,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this);return false},selectMonth:function(){e.datepicker._selectMonthYear(j,this,"M");return false},selectYear:function(){e.datepicker._selectMonthYear(j,this,"Y");return false}};e(this).bind(this.getAttribute("data-event"),k[this.getAttribute("data-handler")])})},_generateHTML:function(X){var A,z,S,K,l,ab,V,O,ae,I,ai,s,u,t,i,aa,q,D,ad,Q,aj,C,H,r,m,T,M,P,N,p,F,v,W,Z,k,ac,ag,L,w,Y=new Date(),B=this._daylightSavingAdjust(new Date(Y.getFullYear(),Y.getMonth(),Y.getDate())),af=this._get(X,"isRTL"),ah=this._get(X,"showButtonPanel"),R=this._get(X,"hideIfNoPrevNext"),G=this._get(X,"navigationAsDateFormat"),x=this._getNumberOfMonths(X),o=this._get(X,"showCurrentAtPos"),J=this._get(X,"stepMonths"),E=(x[0]!==1||x[1]!==1),j=this._daylightSavingAdjust((!X.currentDay?new Date(9999,9,9):new Date(X.currentYear,X.currentMonth,X.currentDay))),n=this._getMinMaxDate(X,"min"),y=this._getMinMaxDate(X,"max"),h=X.drawMonth-o,U=X.drawYear;if(h<0){h+=12;U--}if(y){A=this._daylightSavingAdjust(new Date(y.getFullYear(),y.getMonth()-(x[0]*x[1])+1,y.getDate()));A=(n&&AA){h--;if(h<0){h=11;U--}}}X.drawMonth=h;X.drawYear=U;z=this._get(X,"prevText");z=(!G?z:this.formatDate(z,this._daylightSavingAdjust(new Date(U,h-J,1)),this._getFormatConfig(X)));S=(this._canAdjustMonth(X,-1,U,h)?"
    "+z+"":(R?"":""+z+""));K=this._get(X,"nextText");K=(!G?K:this.formatDate(K,this._daylightSavingAdjust(new Date(U,h+J,1)),this._getFormatConfig(X)));l=(this._canAdjustMonth(X,+1,U,h)?""+K+"":(R?"":""+K+""));ab=this._get(X,"currentText");V=(this._get(X,"gotoCurrent")&&X.currentDay?j:B);ab=(!G?ab:this.formatDate(ab,V,this._getFormatConfig(X)));O=(!X.inline?"":"");ae=(ah)?"
    "+(af?O:"")+(this._isInRange(X,V)?"":"")+(af?"":O)+"
    ":"";I=parseInt(this._get(X,"firstDay"),10);I=(isNaN(I)?0:I);ai=this._get(X,"showWeek");s=this._get(X,"dayNames");u=this._get(X,"dayNamesMin");t=this._get(X,"monthNames");i=this._get(X,"monthNamesShort");aa=this._get(X,"beforeShowDay");q=this._get(X,"showOtherMonths");D=this._get(X,"selectOtherMonths");ad=this._getDefaultDate(X);Q="";aj;for(C=0;C1){switch(r){case 0:M+=" ui-datepicker-group-first";T=" ui-corner-"+(af?"right":"left");break;case x[1]-1:M+=" ui-datepicker-group-last";T=" ui-corner-"+(af?"left":"right");break;default:M+=" ui-datepicker-group-middle";T="";break}}M+="'>"}M+="
    "+(/all|left/.test(T)&&C===0?(af?l:S):"")+(/all|right/.test(T)&&C===0?(af?S:l):"")+this._generateMonthYearHeader(X,h,U,n,y,C>0||r>0,t,i)+"
    ";P=(ai?"":"");for(aj=0;aj<7;aj++){N=(aj+I)%7;P+="=5?" class='ui-datepicker-week-end'":"")+">"+u[N]+""}M+=P+"";p=this._getDaysInMonth(U,h);if(U===X.selectedYear&&h===X.selectedMonth){X.selectedDay=Math.min(X.selectedDay,p)}F=(this._getFirstDayOfMonth(U,h)-I+7)%7;v=Math.ceil((F+p)/7);W=(E?this.maxRows>v?this.maxRows:v:v);this.maxRows=W;Z=this._daylightSavingAdjust(new Date(U,h,1-F));for(k=0;k";ac=(!ai?"":"");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&&Zy);ac+="";Z.setDate(Z.getDate()+1);Z=this._daylightSavingAdjust(Z)}M+=ac+""}h++;if(h>11){h=0;U++}M+="
    "+this._get(X,"weekHeader")+"
    "+this._get(X,"calculateWeek")(Z)+""+(L&&!q?" ":(w?""+Z.getDate()+"":""+Z.getDate()+""))+"
    "+(E?"
    +
    + +
    +
    +

    %s 绡囨枃绔, 骞舵湁 %s 鏉″叧浜庝綘鐨勮瘎璁哄湪 %s 涓垎绫讳腑.', + $stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?> +

    + + + + +
    +

    + → + +

    +
    + +
    + + + + + + +
    +
    +
    "+((x[0]>0&&r===x[1]-1)?"
    ":""):"");H+=M}Q+=H}Q+=ae;X._keyEvent=false;return Q},_generateMonthYearHeader:function(l,j,t,n,r,u,p,h){var y,i,z,w,m,v,s,o,k=this._get(l,"changeMonth"),A=this._get(l,"changeYear"),B=this._get(l,"showMonthAfterYear"),q="
    ",x="";if(u||!k){x+=""+p[j]+""}else{y=(n&&n.getFullYear()===t);i=(r&&r.getFullYear()===t);x+=""}if(!B){q+=x+(u||!(k&&A)?" ":"")}if(!l.yearshtml){l.yearshtml="";if(u||!A){q+=""+t+""}else{w=this._get(l,"yearRange").split(":");m=new Date().getFullYear();v=function(D){var C=(D.match(/c[+\-].*/)?t+parseInt(D.substring(1),10):(D.match(/[+\-].*/)?m+parseInt(D,10):parseInt(D,10)));return(isNaN(C)?m:C)};s=v(w[0]);o=Math.max(s,v(w[1]||""));s=(n?Math.max(s,n.getFullYear()):s);o=(r?Math.min(o,r.getFullYear()):o);l.yearshtml+="";q+=l.yearshtml;l.yearshtml=null}}q+=this._get(l,"yearSuffix");if(B){q+=(u||!(k&&A)?" ":"")+x}q+="
    ";return q},_adjustInstDate:function(k,n,m){var j=k.drawYear+(m==="Y"?n:0),l=k.drawMonth+(m==="M"?n:0),h=Math.min(k.selectedDay,this._getDaysInMonth(j,l))+(m==="D"?n:0),i=this._restrictMinMax(k,this._daylightSavingAdjust(new Date(j,l,h)));k.selectedDay=i.getDate();k.drawMonth=k.selectedMonth=i.getMonth();k.drawYear=k.selectedYear=i.getFullYear();if(m==="M"||m==="Y"){this._notifyChange(k)}},_restrictMinMax:function(k,i){var j=this._getMinMaxDate(k,"min"),l=this._getMinMaxDate(k,"max"),h=(j&&il?l:h)},_notifyChange:function(i){var h=this._get(i,"onChangeMonthYear");if(h){h.apply((i.input?i.input[0]:null),[i.selectedYear,i.selectedMonth+1,i])}},_getNumberOfMonths:function(i){var h=this._get(i,"numberOfMonths");return(h==null?[1,1]:(typeof h==="number"?[1,h]:h))},_getMinMaxDate:function(i,h){return this._determineDate(i,this._get(i,h+"Date"),null)},_getDaysInMonth:function(h,i){return 32-this._daylightSavingAdjust(new Date(h,i,32)).getDate()},_getFirstDayOfMonth:function(h,i){return new Date(h,i,1).getDay()},_canAdjustMonth:function(k,m,j,l){var h=this._getNumberOfMonths(k),i=this._daylightSavingAdjust(new Date(j,l+(m<0?m:h[0]*h[1]),1));if(m<0){i.setDate(this._getDaysInMonth(i.getFullYear(),i.getMonth()))}return this._isInRange(k,i)},_isInRange:function(l,j){var i,o,k=this._getMinMaxDate(l,"min"),h=this._getMinMaxDate(l,"max"),p=null,m=null,n=this._get(l,"yearRange");if(n){i=n.split(":");o=new Date().getFullYear();p=parseInt(i[0],10);m=parseInt(i[1],10);if(i[0].match(/[+\-].*/)){p+=o}if(i[1].match(/[+\-].*/)){m+=o}}return((!k||j.getTime()>=k.getTime())&&(!h||j.getTime()<=h.getTime())&&(!p||j.getFullYear()>=p)&&(!m||j.getFullYear()<=m))},_getFormatConfig:function(h){var i=this._get(h,"shortYearCutoff");i=(typeof i!=="string"?i:new Date().getFullYear()%100+parseInt(i,10));return{shortYearCutoff:i,dayNamesShort:this._get(h,"dayNamesShort"),dayNames:this._get(h,"dayNames"),monthNamesShort:this._get(h,"monthNamesShort"),monthNames:this._get(h,"monthNames")}},_formatDate:function(k,h,l,j){if(!h){k.currentDay=k.selectedDay;k.currentMonth=k.selectedMonth;k.currentYear=k.selectedYear}var i=(h?(typeof h==="object"?h:this._daylightSavingAdjust(new Date(j,l,h))):this._daylightSavingAdjust(new Date(k.currentYear,k.currentMonth,k.currentDay)));return this.formatDate(this._get(k,"dateFormat"),i,this._getFormatConfig(k))}});function d(i){var h="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return i.delegate(h,"mouseout",function(){e(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){e(this).removeClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){e(this).removeClass("ui-datepicker-next-hover")}}).delegate(h,"mouseover",function(){if(!e.datepicker._isDisabledDatepicker(c.inline?i.parent()[0]:c.input[0])){e(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");e(this).addClass("ui-state-hover");if(this.className.indexOf("ui-datepicker-prev")!==-1){e(this).addClass("ui-datepicker-prev-hover")}if(this.className.indexOf("ui-datepicker-next")!==-1){e(this).addClass("ui-datepicker-next-hover")}}})}function a(j,i){e.extend(j,i);for(var h in i){if(i[h]==null){j[h]=i[h]}}return j}e.fn.datepicker=function(i){if(!this.length){return this}if(!e.datepicker.initialized){e(document).mousedown(e.datepicker._checkExternalClick);e.datepicker.initialized=true}if(e("#"+e.datepicker._mainDivId).length===0){e("body").append(e.datepicker.dpDiv)}var h=Array.prototype.slice.call(arguments,1);if(typeof i==="string"&&(i==="isDisabled"||i==="getDate"||i==="widget")){return e.datepicker["_"+i+"Datepicker"].apply(e.datepicker,[this[0]].concat(h))}if(i==="option"&&arguments.length===2&&typeof arguments[1]==="string"){return e.datepicker["_"+i+"Datepicker"].apply(e.datepicker,[this[0]].concat(h))}return this.each(function(){typeof i==="string"?e.datepicker["_"+i+"Datepicker"].apply(e.datepicker,[this].concat(h)):e.datepicker._attachDatepicker(this,i)})};e.datepicker=new b();e.datepicker.initialized=false;e.datepicker.uuid=new Date().getTime();e.datepicker.version="1.10.3"})(jQuery);(function(b,c){var a=5;b.widget("ui.slider",b.ui.mouse,{version:"1.10.3",widgetEventPrefix:"slide",options:{animate:false,distance:0,max:100,min:0,orientation:"horizontal",range:false,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},_create:function(){this._keySliding=false;this._mouseSliding=false;this._animateOff=true;this._handleIndex=null;this._detectOrientation();this._mouseInit();this.element.addClass("ui-slider ui-slider-"+this.orientation+" ui-widget ui-widget-content ui-corner-all");this._refresh();this._setOption("disabled",this.options.disabled);this._animateOff=false},_refresh:function(){this._createRange();this._createHandles();this._setupEvents();this._refreshValue()},_createHandles:function(){var g,d,e=this.options,j=this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),h="",f=[];d=(e.values&&e.values.length)||1;if(j.length>d){j.slice(d).remove();j=j.slice(0,d)}for(g=j.length;g
    ").appendTo(this.element);e="ui-slider-range ui-widget-header ui-corner-all"}else{this.range.removeClass("ui-slider-range-min ui-slider-range-max").css({left:"",bottom:""})}this.range.addClass(e+((d.range==="min"||d.range==="max")?" ui-slider-range-"+d.range:""))}else{this.range=b([])}},_setupEvents:function(){var d=this.handles.add(this.range).filter("a");this._off(d);this._on(d,this._handleEvents);this._hoverable(d);this._focusable(d)},_destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-widget ui-widget-content ui-corner-all");this._mouseDestroy()},_mouseCapture:function(f){var j,m,e,h,l,n,i,d,k=this,g=this.options;if(g.disabled){return false}this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();j={x:f.pageX,y:f.pageY};m=this._normValueFromMouse(j);e=this._valueMax()-this._valueMin()+1;this.handles.each(function(o){var p=Math.abs(m-k.values(o));if((e>p)||(e===p&&(o===k._lastChangedValue||k.values(o)===g.min))){e=p;h=b(this);l=o}});n=this._start(f,l);if(n===false){return false}this._mouseSliding=true;this._handleIndex=l;h.addClass("ui-state-active").focus();i=h.offset();d=!b(f.target).parents().addBack().is(".ui-slider-handle");this._clickOffset=d?{left:0,top:0}:{left:f.pageX-i.left-(h.width()/2),top:f.pageY-i.top-(h.height()/2)-(parseInt(h.css("borderTopWidth"),10)||0)-(parseInt(h.css("borderBottomWidth"),10)||0)+(parseInt(h.css("marginTop"),10)||0)};if(!this.handles.hasClass("ui-state-hover")){this._slide(f,l,m)}this._animateOff=true;return true},_mouseStart:function(){return true},_mouseDrag:function(f){var d={x:f.pageX,y:f.pageY},e=this._normValueFromMouse(d);this._slide(f,this._handleIndex,e);return false},_mouseStop:function(d){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(d,this._handleIndex);this._change(d,this._handleIndex);this._handleIndex=null;this._clickOffset=null;this._animateOff=false;return false},_detectOrientation:function(){this.orientation=(this.options.orientation==="vertical")?"vertical":"horizontal"},_normValueFromMouse:function(e){var d,h,g,f,i;if(this.orientation==="horizontal"){d=this.elementSize.width;h=e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{d=this.elementSize.height;h=e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}g=(h/d);if(g>1){g=1}if(g<0){g=0}if(this.orientation==="vertical"){g=1-g}f=this._valueMax()-this._valueMin();i=this._valueMin()+g*f;return this._trimAlignValue(i)},_start:function(f,e){var d={handle:this.handles[e],value:this.value()};if(this.options.values&&this.options.values.length){d.value=this.values(e);d.values=this.values()}return this._trigger("start",f,d)},_slide:function(h,g,f){var d,e,i;if(this.options.values&&this.options.values.length){d=this.values(g?0:1);if((this.options.values.length===2&&this.options.range===true)&&((g===0&&f>d)||(g===1&&f1){this.options.values[e]=this._trimAlignValue(h);this._refreshValue();this._change(null,e);return}if(arguments.length){if(b.isArray(arguments[0])){g=this.options.values;d=arguments[0];for(f=0;f=this._valueMax()){return this._valueMax()}var d=(this.options.step>0)?this.options.step:1,f=(g-this._valueMin())%d,e=g-f;if(Math.abs(f)*2>=d){e+=(f>0)?d:(-d)}return parseFloat(e.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var i,h,l,j,m,g=this.options.range,f=this.options,k=this,e=(!this._animateOff)?f.animate:false,d={};if(this.options.values&&this.options.values.length){this.handles.each(function(n){h=(k.values(n)-k._valueMin())/(k._valueMax()-k._valueMin())*100;d[k.orientation==="horizontal"?"left":"bottom"]=h+"%";b(this).stop(1,1)[e?"animate":"css"](d,f.animate);if(k.options.range===true){if(k.orientation==="horizontal"){if(n===0){k.range.stop(1,1)[e?"animate":"css"]({left:h+"%"},f.animate)}if(n===1){k.range[e?"animate":"css"]({width:(h-i)+"%"},{queue:false,duration:f.animate})}}else{if(n===0){k.range.stop(1,1)[e?"animate":"css"]({bottom:(h)+"%"},f.animate)}if(n===1){k.range[e?"animate":"css"]({height:(h-i)+"%"},{queue:false,duration:f.animate})}}}i=h})}else{l=this.value();j=this._valueMin();m=this._valueMax();h=(m!==j)?(l-j)/(m-j)*100:0;d[this.orientation==="horizontal"?"left":"bottom"]=h+"%";this.handle.stop(1,1)[e?"animate":"css"](d,f.animate);if(g==="min"&&this.orientation==="horizontal"){this.range.stop(1,1)[e?"animate":"css"]({width:h+"%"},f.animate)}if(g==="max"&&this.orientation==="horizontal"){this.range[e?"animate":"css"]({width:(100-h)+"%"},{queue:false,duration:f.animate})}if(g==="min"&&this.orientation==="vertical"){this.range.stop(1,1)[e?"animate":"css"]({height:h+"%"},f.animate)}if(g==="max"&&this.orientation==="vertical"){this.range[e?"animate":"css"]({height:(100-h)+"%"},{queue:false,duration:f.animate})}}},_handleEvents:{keydown:function(h){var i,f,e,g,d=b(h.target).data("ui-slider-handle-index");switch(h.keyCode){case b.ui.keyCode.HOME:case b.ui.keyCode.END:case b.ui.keyCode.PAGE_UP:case b.ui.keyCode.PAGE_DOWN:case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:h.preventDefault();if(!this._keySliding){this._keySliding=true;b(h.target).addClass("ui-state-active");i=this._start(h,d);if(i===false){return}}break}g=this.options.step;if(this.options.values&&this.options.values.length){f=e=this.values(d)}else{f=e=this.value()}switch(h.keyCode){case b.ui.keyCode.HOME:e=this._valueMin();break;case b.ui.keyCode.END:e=this._valueMax();break;case b.ui.keyCode.PAGE_UP:e=this._trimAlignValue(f+((this._valueMax()-this._valueMin())/a));break;case b.ui.keyCode.PAGE_DOWN:e=this._trimAlignValue(f-((this._valueMax()-this._valueMin())/a));break;case b.ui.keyCode.UP:case b.ui.keyCode.RIGHT:if(f===this._valueMax()){return}e=this._trimAlignValue(f+g);break;case b.ui.keyCode.DOWN:case b.ui.keyCode.LEFT:if(f===this._valueMin()){return}e=this._trimAlignValue(f-g);break}this._slide(h,d,e)},click:function(d){d.preventDefault()},keyup:function(e){var d=b(e.target).data("ui-slider-handle-index");if(this._keySliding){this._keySliding=false;this._stop(e,d);this._change(e,d);b(e.target).removeClass("ui-state-active")}}}})}(jQuery));(function(a,c){var b="ui-effects-";a.effects={effect:{}}; +/* + * jQuery Color Animations v2.1.2 + * https://github.com/jquery/jquery-color + * + * Copyright 2013 jQuery Foundation and other contributors + * Released under the MIT license. + * http://jquery.org/license + * + * Date: Wed Jan 16 08:47:09 2013 -0600 + */ +(function(r,g){var n="backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor",k=/^([\-+])=\s*(\d+\.?\d*)/,j=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(s){return[s[1],s[2],s[3],s[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(s){return[s[1]*2.55,s[2]*2.55,s[3]*2.55,s[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(s){return[parseInt(s[1],16),parseInt(s[2],16),parseInt(s[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(s){return[parseInt(s[1]+s[1],16),parseInt(s[2]+s[2],16),parseInt(s[3]+s[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(s){return[s[1],s[2]/100,s[3]/100,s[4]]}}],h=r.Color=function(t,u,s,v){return new r.Color.fn.parse(t,u,s,v)},m={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},q={"byte":{floor:true,max:255},percent:{max:1},degrees:{mod:360,floor:true}},p=h.support={},e=r("

    ")[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.maxE.mod/2){B+=E.mod}else{if(B-A>E.mod/2){B-=E.mod}}}s[C]=l((A-B)*z+B,F)}});return this[v](s)},blend:function(v){if(this._rgba[3]===1){return this}var u=this._rgba.slice(),t=u.pop(),s=h(v)._rgba;return h(r.map(u,function(w,x){return(1-t)*s[x]+t*w}))},toRgbaString:function(){var t="rgba(",s=r.map(this._rgba,function(u,w){return u==null?(w>2?1:0):u});if(s[3]===1){s.pop();t="rgb("}return t+s.join()+")"},toHslaString:function(){var t="hsla(",s=r.map(this.hsla(),function(u,w){if(u==null){u=w>2?1:0}if(w&&w<3){u=Math.round(u*100)+"%"}return u});if(s[3]===1){s.pop();t="hsl("}return t+s.join()+")"},toHexString:function(s){var t=this._rgba.slice(),u=t.pop();if(s){t.push(~~(u*255))}return"#"+r.map(t,function(w){w=(w||0).toString(16);return w.length===1?"0"+w:w}).join("")},toString:function(){return this._rgba[3]===0?"transparent":this.toRgbaString()}});h.fn.parse.prototype=h.fn;function f(u,t,s){s=(s+1)%1;if(s*6<1){return u+(t-u)*s*6}if(s*2<1){return t}if(s*3<2){return u+(t-u)*((2/3)-s)*6}return u}m.hsla.to=function(v){if(v[0]==null||v[1]==null||v[2]==null){return[null,null,null,v[3]]}var t=v[0]/255,y=v[1]/255,z=v[2]/255,B=v[3],A=Math.max(t,y,z),w=Math.min(t,y,z),C=A-w,D=A+w,u=D*0.5,x,E;if(w===A){x=0}else{if(t===A){x=(60*(y-z)/C)+360}else{if(y===A){x=(60*(z-t)/C)+120}else{x=(60*(t-y)/C)+240}}}if(C===0){E=0}else{if(u<=0.5){E=C/D}else{E=C/(2-D)}}return[Math.round(x)%360,E,u,B==null?1:B]};m.hsla.from=function(x){if(x[0]==null||x[1]==null||x[2]==null){return[null,null,null,x[3]]}var w=x[0]/360,v=x[1],u=x[2],t=x[3],y=u<=0.5?u*(1+v):u+v-u*v,z=2*u-y;return[Math.round(f(z,y,w+(1/3))*255),Math.round(f(z,y,w)*255),Math.round(f(z,y,w-(1/3))*255),t]};o(m,function(t,v){var u=v.props,s=v.cache,x=v.to,w=v.from;h.fn[t]=function(C){if(x&&!this[s]){this[s]=x(this._rgba)}if(C===g){return this[s].slice()}var z,B=r.type(C),y=(B==="array"||B==="object")?C:arguments,A=this[s].slice();o(u,function(D,F){var E=y[B==="object"?D:F.idx];if(E==null){E=A[F.idx]}A[F.idx]=l(E,F)});if(w){z=h(w(A));z[s]=A;return z}else{return h(A)}};o(u,function(y,z){if(h.fn[y]){return}h.fn[y]=function(D){var F=r.type(D),C=(y==="alpha"?(this._hsla?"hsla":"rgba"):t),B=this[C](),E=B[z.idx],A;if(F==="undefined"){return E}if(F==="function"){D=D.call(this,E);F=r.type(D)}if(D==null&&z.empty){return this}if(F==="string"){A=k.exec(D);if(A){D=E+parseFloat(A[2])*(A[1]==="+"?1:-1)}}B[z.idx]=D;return this[C](B)}})});h.hook=function(t){var s=t.split(" ");o(s,function(u,v){r.cssHooks[v]={set:function(z,A){var x,y,w="";if(A!=="transparent"&&(r.type(A)!=="string"||(x=i(A)))){A=h(x||A);if(!p.rgba&&A._rgba[3]!==1){y=v==="backgroundColor"?z.parentNode:z;while((w===""||w==="transparent")&&y&&y.style){try{w=r.css(y,"backgroundColor");y=y.parentNode}catch(B){}}A=A.blend(w&&w!=="transparent"?w:"_default")}A=A.toRgbaString()}try{z.style[v]=A}catch(B){}}};r.fx.step[v]=function(w){if(!w.colorInit){w.start=h(w.elem,v);w.end=h(w.end);w.colorInit=true}r.cssHooks[v].set(w.elem,w.start.transition(w.end,w.pos))}})};h.hook(n);r.cssHooks.borderColor={expand:function(t){var s={};o(["Top","Right","Bottom","Left"],function(v,u){s["border"+u+"Color"]=t});return s}};d=r.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}})(jQuery);(function(){var e=["add","remove","toggle"],f={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(h,i){a.fx.step[i]=function(j){if(j.end!=="none"&&!j.setAttr||j.pos===1&&!j.setAttr){jQuery.style(j.elem,i,j.end);j.setAttr=true}}});function g(l){var i,h,j=l.ownerDocument.defaultView?l.ownerDocument.defaultView.getComputedStyle(l,null):l.currentStyle,k={};if(j&&j.length&&j[0]&&j[j[0]]){h=j.length;while(h--){i=j[h];if(typeof j[i]==="string"){k[a.camelCase(i)]=j[i]}}}else{for(i in j){if(typeof j[i]==="string"){k[i]=j[i]}}}return k}function d(h,j){var l={},i,k;for(i in j){k=j[i];if(h[i]!==k){if(!f[i]){if(a.fx.step[i]||!isNaN(parseFloat(k))){l[i]=k}}}}return l}if(!a.fn.addBack){a.fn.addBack=function(h){return this.add(h==null?this.prevObject:this.prevObject.filter(h))}}a.effects.animateClass=function(h,i,l,k){var j=a.speed(i,l,k);return this.queue(function(){var o=a(this),m=o.attr("class")||"",n,p=j.children?o.find("*").addBack():o;p=p.map(function(){var q=a(this);return{el:q,start:g(this)}});n=function(){a.each(e,function(q,r){if(h[r]){o[r+"Class"](h[r])}})};n();p=p.map(function(){this.end=g(this.el[0]);this.diff=d(this.start,this.end);return this});o.attr("class",m);p=p.map(function(){var s=this,q=a.Deferred(),r=a.extend({},j,{queue:false,complete:function(){q.resolve(s)}});this.el.animate(this.diff,r);return q.promise()});a.when.apply(a,p.get()).done(function(){n();a.each(arguments,function(){var q=this.el;a.each(this.diff,function(r){q.css(r,"")})});j.complete.call(o[0])})})};a.fn.extend({addClass:(function(h){return function(j,i,l,k){return i?a.effects.animateClass.call(this,{add:j},i,l,k):h.apply(this,arguments)}})(a.fn.addClass),removeClass:(function(h){return function(j,i,l,k){return arguments.length>1?a.effects.animateClass.call(this,{remove:j},i,l,k):h.apply(this,arguments)}})(a.fn.removeClass),toggleClass:(function(h){return function(k,j,i,m,l){if(typeof j==="boolean"||j===c){if(!i){return h.apply(this,arguments)}else{return a.effects.animateClass.call(this,(j?{add:k}:{remove:k}),i,m,l)}}else{return a.effects.animateClass.call(this,{toggle:k},j,i,m)}}})(a.fn.toggleClass),switchClass:function(h,j,i,l,k){return a.effects.animateClass.call(this,{add:j,remove:h},i,l,k)}})})();(function(){a.extend(a.effects,{version:"1.10.3",save:function(g,h){for(var f=0;f

    ").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),f={width:g.width(),height:g.height()},j=document.activeElement;try{j.id}catch(i){j=document.body}g.wrap(k);if(g[0]===j||a.contains(g[0],j)){a(j).focus()}k=g.parent();if(g.css("position")==="static"){k.css({position:"relative"});g.css({position:"relative"})}else{a.extend(h,{position:g.css("position"),zIndex:g.css("z-index")});a.each(["top","left","bottom","right"],function(l,m){h[m]=g.css(m);if(isNaN(parseInt(h[m],10))){h[m]="auto"}});g.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}g.css(f);return k.css(h).show()},removeWrapper:function(f){var g=document.activeElement;if(f.parent().is(".ui-effects-wrapper")){f.parent().replaceWith(f);if(f[0]===g||a.contains(f[0],g)){a(g).focus()}}return f},setTransition:function(g,i,f,h){h=h||{};a.each(i,function(k,j){var l=g.cssUnit(j);if(l[0]>0){h[j]=l[0]*f+l[1]}});return h}});function d(g,f,h,i){if(a.isPlainObject(g)){f=g;g=g.effect}g={effect:g};if(f==null){f={}}if(a.isFunction(f)){i=f;h=null;f={}}if(typeof f==="number"||a.fx.speeds[f]){i=h;h=f;f={}}if(a.isFunction(h)){i=h;h=null}if(f){a.extend(g,f)}h=h||f.duration;g.duration=a.fx.off?0:typeof h==="number"?h:h in a.fx.speeds?a.fx.speeds[h]:a.fx.speeds._default;g.complete=i||f.complete;return g}function e(f){if(!f||typeof f==="number"||a.fx.speeds[f]){return true}if(typeof f==="string"&&!a.effects.effect[f]){return true}if(a.isFunction(f)){return true}if(typeof f==="object"&&!f.effect){return true}return false}a.fn.extend({effect:function(){var h=d.apply(this,arguments),j=h.mode,f=h.queue,g=a.effects.effect[h.effect];if(a.fx.off||!g){if(j){return this[j](h.duration,h.complete)}else{return this.each(function(){if(h.complete){h.complete.call(this)}})}}function i(m){var n=a(this),l=h.complete,o=h.mode;function k(){if(a.isFunction(l)){l.call(n[0])}if(a.isFunction(m)){m()}}if(n.is(":hidden")?o==="hide":o==="show"){n[o]();k()}else{g.call(n[0],h,k)}}return f===false?this.each(i):this.queue(f||"fx",i)},show:(function(f){return function(h){if(e(h)){return f.apply(this,arguments)}else{var g=d.apply(this,arguments);g.mode="show";return this.effect.call(this,g)}}})(a.fn.show),hide:(function(f){return function(h){if(e(h)){return f.apply(this,arguments)}else{var g=d.apply(this,arguments);g.mode="hide";return this.effect.call(this,g)}}})(a.fn.hide),toggle:(function(f){return function(h){if(e(h)||typeof h==="boolean"){return f.apply(this,arguments)}else{var g=d.apply(this,arguments);g.mode="toggle";return this.effect.call(this,g)}}})(a.fn.toggle),cssUnit:function(f){var g=this.css(f),h=[];a.each(["em","px","%","pt"],function(j,k){if(g.indexOf(k)>0){h=[parseFloat(g),k]}});return h}})})();(function(){var d={};a.each(["Quad","Cubic","Quart","Quint","Expo"],function(f,e){d[e]=function(g){return Math.pow(g,f+2)}});a.extend(d,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return e===0||e===1?e:-Math.pow(2,8*(e-1))*Math.sin(((e-1)*80-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(g){var e,f=4;while(g<((e=Math.pow(2,--f))-1)/11){}return 1/Math.pow(4,3-f)-7.5625*Math.pow((e*3-2)/22-g,2)}});a.each(d,function(f,e){a.easing["easeIn"+f]=e;a.easing["easeOut"+f]=function(g){return 1-e(1-g)};a.easing["easeInOut"+f]=function(g){return g<0.5?e(g*2)/2:1-e(g*-2+2)/2}})})()})(jQuery);(function(a,b){a.effects.effect.highlight=function(h,c){var e=a(this),d=["backgroundImage","backgroundColor","opacity"],g=a.effects.setMode(e,h.mode||"show"),f={backgroundColor:e.css("backgroundColor")};if(g==="hide"){f.opacity=0}a.effects.save(e,d);e.show().css({backgroundImage:"none",backgroundColor:h.color||"#ffff99"}).animate(f,{queue:false,duration:h.duration,easing:h.easing,complete:function(){if(g==="hide"){e.hide()}a.effects.restore(e,d);c()}})}})(jQuery); \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/jquery.js" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/jquery.js" new file mode 100644 index 0000000..80ff812 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/js/jquery.js" @@ -0,0 +1,25 @@ +/* + * jQuery JavaScript Library v2.1.1-rc2 + * http://jquery.com/ + * + * Includes Sizzle.js + * http://sizzlejs.com/ + * + * Copyright 2005, 2014 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-21T20:27Z + */ +(function(b,a){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=b.document?a(b,true):function(c){if(!c.document){throw new Error("jQuery requires a window with a document")}return a(c)}}else{a(b)}}(typeof window!=="undefined"?window:this,function(window,noGlobal){var arr=[];var slice=arr.slice;var concat=arr.concat;var push=arr.push;var indexOf=arr.indexOf;var class2type={};var toString=class2type.toString;var hasOwn=class2type.hasOwnProperty;var support={};var document=window.document,version="2.1.1-rc2",jQuery=function(selector,context){return new jQuery.fn.init(selector,context)},rtrim=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,rmsPrefix=/^-ms-/,rdashAlpha=/-([\da-z])/gi,fcamelCase=function(all,letter){return letter.toUpperCase()};jQuery.fn=jQuery.prototype={jquery:version,constructor:jQuery,selector:"",length:0,toArray:function(){return slice.call(this)},get:function(num){return num!=null?(num<0?this[num+this.length]:this[num]):slice.call(this)},pushStack:function(elems){var ret=jQuery.merge(this.constructor(),elems);ret.prevObject=this;ret.context=this.context;return ret},each:function(callback,args){return jQuery.each(this,callback,args)},map:function(callback){return this.pushStack(jQuery.map(this,function(elem,i){return callback.call(elem,i,elem)}))},slice:function(){return this.pushStack(slice.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(i){var len=this.length,j=+i+(i<0?len:0);return this.pushStack(j>=0&&j=0},isPlainObject:function(obj){if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback,args){var value,i=0,length=obj.length,isArray=isArraylike(obj);if(args){if(isArray){for(;i0&&(length-1) in obj}var Sizzle= +/* + * Sizzle CSS Selector Engine v1.10.19 + * http://sizzlejs.com/ + * + * Copyright 2013 jQuery Foundation, Inc. and other contributors + * Released under the MIT license + * http://jquery.org/license + * + * Date: 2014-04-18 + */ +(function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+-(new Date()),preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},strundefined=typeof undefined,MAX_NEGATIVE=1<<31,hasOwn=({}).hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=arr.indexOf||function(elem){var i=0,len=this.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+characterEncoding+")"),CLASS:new RegExp("^\\.("+characterEncoding+")"),TAG:new RegExp("^("+characterEncoding.replace("w","w*")+")"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)};try{push.apply((arr=slice.call(preferredDoc.childNodes)),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType}catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while((target[j++]=els[i++])){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var match,elem,m,nodeType,i,groups,old,nid,newContext,newSelector;if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;results=results||[];if(!selector||typeof selector!=="string"){return results}if((nodeType=context.nodeType)!==1&&nodeType!==9){return[]}if(documentIsHTML&&!seed){if((match=rquickExpr.exec(selector))){if((m=match[1])){if(nodeType===9){elem=context.getElementById(m);if(elem&&elem.parentNode){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(context.ownerDocument&&(elem=context.ownerDocument.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else{if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else{if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}}}if(support.qsa&&(!rbuggyQSA||!rbuggyQSA.test(selector))){nid=old=expando;newContext=context;newSelector=nodeType===9&&selector;if(nodeType===1&&context.nodeName.toLowerCase()!=="object"){groups=tokenize(selector);if((old=context.getAttribute("id"))){nid=old.replace(rescape,"\\$&")}else{context.setAttribute("id",nid)}nid="[id='"+nid+"'] ";i=groups.length;while(i--){groups[i]=nid+toSelector(groups[i])}newContext=rsibling.test(selector)&&testContext(context.parentNode)||context;newSelector=groups.join(",")}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(!old){context.removeAttribute("id")}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return(cache[key+" "]=value)}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return !!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=attrs.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while((cur=cur.nextSibling)){if(cur===b){return -1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[(j=matchIndexes[i])]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!==strundefined&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,doc=node?node.ownerDocument||node:preferredDoc,parent=doc.defaultView;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=doc.documentElement;documentIsHTML=!isXML(doc);if(parent&&parent!==parent.top){if(parent.addEventListener){parent.addEventListener("unload",function(){setDocument()},false)}else{if(parent.attachEvent){parent.attachEvent("onunload",function(){setDocument()})}}}support.attributes=assert(function(div){div.className="i";return !div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(doc.createComment(""));return !div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(doc.getElementsByClassName)&&assert(function(div){div.innerHTML="
    ";div.firstChild.className="i";return div.getElementsByClassName("i").length===2});support.getById=assert(function(div){docElem.appendChild(div).id=expando;return !doc.getElementsByName||!doc.getElementsByName(expando).length});if(support.getById){Expr.find.ID=function(id,context){if(typeof context.getElementById!==strundefined&&documentIsHTML){var m=context.getElementById(id);return m&&m.parentNode?[m]:[]}};Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find.ID;Expr.filter.ID=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!==strundefined&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find.TAG=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!==strundefined){return context.getElementsByTagName(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while((elem=results[i++])){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find.CLASS=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!==strundefined&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if((support.qsa=rnative.test(doc.querySelectorAll))){assert(function(div){div.innerHTML="";if(div.querySelectorAll("[msallowclip^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}});assert(function(div){var input=doc.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if((support.matchesSelector=rnative.test((matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)))){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while((b=b.parentNode)){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||(!support.sortDetached&&b.compareDocumentPosition(a)===compare)){if(a===doc||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return -1}if(b===doc||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===doc?-1:b===doc?1:aup?-1:bup?1:sortInput?(indexOf.call(sortInput,a)-indexOf.call(sortInput,b)):0}else{if(aup===bup){return siblingCheck(a,b)}}cur=a;while((cur=cur.parentNode)){ap.unshift(cur)}cur=b;while((cur=cur.parentNode)){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return doc};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while((elem=results[i++])){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while((node=elem[i++])){ret+=getText(node)}}else{if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else{if(nodeType===3||nodeType===4){return elem.nodeValue}}}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+((match[7]+match[8])||match[3]==="odd")}else{if(match[3]){Sizzle.error(match[0])}}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr.CHILD.test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else{if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!==strundefined&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return !!elem.parentNode}:function(elem,context,xml){var cache,outerCache,node,diff,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType;if(parent){if(simple){while(dir){node=elem;while((node=node[dir])){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){outerCache=parent[expando]||(parent[expando]={});cache=outerCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=cache[0]===dirruns&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if(node.nodeType===1&&++diff&&node===elem){outerCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache&&(cache=(elem[expando]||(elem[expando]={}))[type])&&cache[0]===dirruns){diff=cache[1]}else{while((node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop())){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){(node[expando]||(node[expando]={}))[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||(diff%first===0&&diff/first>=0)}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf.call(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if((elem=unmatched[i])){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);return !results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if((elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang"))){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return(nodeName==="input"&&!!elem.checked)||(nodeName==="option"&&!!elem.selected)},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return !Expr.pseudos.empty(elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf.call(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){return(!leadingRelative&&(xml||context!==outermostContext))||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml))}];for(;i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find.TAG("*",outermost),dirrunsUnique=(dirruns+=contextBackup==null?1:Math.random()||0.1),len=elems.length;if(outermost){outermostContext=context!==document&&context}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;while((matcher=elementMatchers[j++])){if(matcher(elem,context,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if((elem=!matcher&&elem)){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while((matcher=setMatchers[j++])){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&(matchedCount+setMatchers.length)>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize((selector=compiled.selector||selector));results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find.ID(token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else{if(compiled){context=context.parentNode}}selector=selector.slice(tokens.shift().value.length)}i=matchExpr.needsContext.test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[(type=token.type)]){break}if((find=Expr.find[type])){if((seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context))){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle})(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=(/^<(\w+)\s*\/?>(?:<\/\1>|)$/);var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return !!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return(elem===qualifier)!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return(indexOf.call(qualifier,elem)>=0)!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return !!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context){var match,elem;if(!selector){return this}if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else{if(!context||context.jquery){return(context||rootjQuery).find(selector)}else{return this.constructor(context).find(selector)}}}else{if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else{if(jQuery.isFunction(selector)){return typeof rootjQuery.ready!=="undefined"?rootjQuery.ready(selector):selector(jQuery)}}}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.extend({dir:function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched},sibling:function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched}});jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i-1:cur.nodeType===1&&jQuery.find.matchesSelector(cur,selectors))){matched.push(cur);break}}}return this.pushStack(matched.length>1?jQuery.unique(matched):matched)},index:function(elem){if(!elem){return(this[0]&&this[0].parentNode)?this.first().prevAll().length:-1}if(typeof elem==="string"){return indexOf.call(jQuery(elem),this[0])}return indexOf.call(this,elem.jquery?elem[0]:elem)},add:function(selector,context){return this.pushStack(jQuery.unique(jQuery.merge(this.get(),jQuery(selector,context))))},addBack:function(selector){return this.add(selector==null?this.prevObject:this.prevObject.filter(selector))}});function sibling(cur,dir){while((cur=cur[dir])&&cur.nodeType!==1){}return cur}jQuery.each({parent:function(elem){var parent=elem.parentNode;return parent&&parent.nodeType!==11?parent:null},parents:function(elem){return jQuery.dir(elem,"parentNode")},parentsUntil:function(elem,i,until){return jQuery.dir(elem,"parentNode",until)},next:function(elem){return sibling(elem,"nextSibling")},prev:function(elem){return sibling(elem,"previousSibling")},nextAll:function(elem){return jQuery.dir(elem,"nextSibling")},prevAll:function(elem){return jQuery.dir(elem,"previousSibling")},nextUntil:function(elem,i,until){return jQuery.dir(elem,"nextSibling",until)},prevUntil:function(elem,i,until){return jQuery.dir(elem,"previousSibling",until)},siblings:function(elem){return jQuery.sibling((elem.parentNode||{}).firstChild,elem)},children:function(elem){return jQuery.sibling(elem.firstChild)},contents:function(elem){return elem.contentDocument||jQuery.merge([],elem.childNodes)}},function(name,fn){jQuery.fn[name]=function(until,selector){var matched=jQuery.map(this,fn,until);if(name.slice(-5)!=="Until"){selector=until}if(selector&&typeof selector==="string"){matched=jQuery.filter(selector,matched)}if(this.length>1){if(!guaranteedUnique[name]){jQuery.unique(matched)}if(rparentsprev.test(name)){matched.reverse()}}return this.pushStack(matched)}});var rnotwhite=(/\S+/g);var optionsCache={};function createOptions(options){var object=optionsCache[options]={};jQuery.each(options.match(rnotwhite)||[],function(_,flag){object[flag]=true});return object}jQuery.Callbacks=function(options){options=typeof options==="string"?(optionsCache[options]||createOptions(options)):jQuery.extend({},options);var memory,fired,firing,firingStart,firingLength,firingIndex,list=[],stack=!options.once&&[],fire=function(data){memory=options.memory&&data;fired=true;firingIndex=firingStart||0;firingStart=0;firingLength=list.length;firing=true;for(;list&&firingIndex-1){list.splice(index,1);if(firing){if(index<=firingLength){firingLength--}if(index<=firingIndex){firingIndex--}}}})}return this},has:function(fn){return fn?jQuery.inArray(fn,list)>-1:!!(list&&list.length)},empty:function(){list=[];firingLength=0;return this},disable:function(){list=stack=memory=undefined;return this},disabled:function(){return !list},lock:function(){stack=undefined;if(!memory){self.disable()}return this},locked:function(){return !stack},fireWith:function(context,args){if(list&&(!fired||stack)){args=args||[];args=[context,args.slice?args.slice():args];if(firing){stack.push(args)}else{fire(args)}}return this},fire:function(){self.fireWith(this,arguments);return this},fired:function(){return !!fired}};return self};jQuery.extend({Deferred:function(func){var tuples=[["resolve","done",jQuery.Callbacks("once memory"),"resolved"],["reject","fail",jQuery.Callbacks("once memory"),"rejected"],["notify","progress",jQuery.Callbacks("memory")]],state="pending",promise={state:function(){return state},always:function(){deferred.done(arguments).fail(arguments);return this},then:function(){var fns=arguments;return jQuery.Deferred(function(newDefer){jQuery.each(tuples,function(i,tuple){var fn=jQuery.isFunction(fns[i])&&fns[i];deferred[tuple[1]](function(){var returned=fn&&fn.apply(this,arguments);if(returned&&jQuery.isFunction(returned.promise)){returned.promise().done(newDefer.resolve).fail(newDefer.reject).progress(newDefer.notify)}else{newDefer[tuple[0]+"With"](this===promise?newDefer.promise():this,fn?[returned]:arguments)}})});fns=null}).promise()},promise:function(obj){return obj!=null?jQuery.extend(obj,promise):promise}},deferred={};promise.pipe=promise.then;jQuery.each(tuples,function(i,tuple){var list=tuple[2],stateString=tuple[3];promise[tuple[1]]=list.add;if(stateString){list.add(function(){state=stateString},tuples[i^1][2].disable,tuples[2][2].lock)}deferred[tuple[0]]=function(){deferred[tuple[0]+"With"](this===deferred?promise:this,arguments);return this};deferred[tuple[0]+"With"]=list.fireWith});promise.promise(deferred);if(func){func.call(deferred,deferred)}return deferred},when:function(subordinate){var i=0,resolveValues=slice.call(arguments),length=resolveValues.length,remaining=length!==1||(subordinate&&jQuery.isFunction(subordinate.promise))?length:0,deferred=remaining===1?subordinate:jQuery.Deferred(),updateFunc=function(i,contexts,values){return function(value){contexts[i]=this;values[i]=arguments.length>1?slice.call(arguments):value;if(values===progressValues){deferred.notifyWith(contexts,values)}else{if(!(--remaining)){deferred.resolveWith(contexts,values)}}}},progressValues,progressContexts,resolveContexts;if(length>1){progressValues=new Array(length);progressContexts=new Array(length);resolveContexts=new Array(length);for(;i0){return}readyList.resolveWith(document,[jQuery]);if(jQuery.fn.triggerHandler){jQuery(document).triggerHandler("ready");jQuery(document).off("ready")}}});function completed(){document.removeEventListener("DOMContentLoaded",completed,false);window.removeEventListener("load",completed,false);jQuery.ready()}jQuery.ready.promise=function(obj){if(!readyList){readyList=jQuery.Deferred();if(document.readyState==="complete"){setTimeout(jQuery.ready)}else{document.addEventListener("DOMContentLoaded",completed,false);window.addEventListener("load",completed,false)}}return readyList.promise(obj)};jQuery.ready.promise();var access=jQuery.access=function(elems,fn,key,value,chainable,emptyGet,raw){var i=0,len=elems.length,bulk=key==null;if(jQuery.type(key)==="object"){chainable=true;for(i in key){jQuery.access(elems,fn,i,key[i],true,emptyGet,raw)}}else{if(value!==undefined){chainable=true;if(!jQuery.isFunction(value)){raw=true}if(bulk){if(raw){fn.call(elems,value);fn=null}else{bulk=fn;fn=function(elem,key,value){return bulk.call(jQuery(elem),value)}}}if(fn){for(;i1,null,true)},removeData:function(key){return this.each(function(){data_user.remove(this,key)})}});jQuery.extend({queue:function(elem,type,data){var queue;if(elem){type=(type||"fx")+"queue";queue=data_priv.get(elem,type);if(data){if(!queue||jQuery.isArray(data)){queue=data_priv.access(elem,type,jQuery.makeArray(data))}else{queue.push(data)}}return queue||[]}},dequeue:function(elem,type){type=type||"fx";var queue=jQuery.queue(elem,type),startLength=queue.length,fn=queue.shift(),hooks=jQuery._queueHooks(elem,type),next=function(){jQuery.dequeue(elem,type)};if(fn==="inprogress"){fn=queue.shift();startLength--}if(fn){if(type==="fx"){queue.unshift("inprogress")}delete hooks.stop;fn.call(elem,next,hooks)}if(!startLength&&hooks){hooks.empty.fire()}},_queueHooks:function(elem,type){var key=type+"queueHooks";return data_priv.get(elem,key)||data_priv.access(elem,key,{empty:jQuery.Callbacks("once memory").add(function(){data_priv.remove(elem,[type+"queue",key])})})}});jQuery.fn.extend({queue:function(type,data){var setter=2;if(typeof type!=="string"){data=type;type="fx";setter--}if(arguments.lengthx";support.noCloneChecked=!!div.cloneNode(true).lastChild.defaultValue})();var strundefined=typeof undefined;support.focusinBubbles="onfocusin" in window;var rkeyEvent=/^key/,rmouseEvent=/^(?:mouse|pointer|contextmenu)|click/,rfocusMorph=/^(?:focusinfocus|focusoutblur)$/,rtypenamespace=/^([^.]*)(?:\.(.+)|)$/;function returnTrue(){return true}function returnFalse(){return false}function safeActiveElement(){try{return document.activeElement}catch(err){}}jQuery.event={global:{},add:function(elem,types,handler,data,selector){var handleObjIn,eventHandle,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.get(elem);if(!elemData){return}if(handler.handler){handleObjIn=handler;handler=handleObjIn.handler;selector=handleObjIn.selector}if(!handler.guid){handler.guid=jQuery.guid++}if(!(events=elemData.events)){events=elemData.events={}}if(!(eventHandle=elemData.handle)){eventHandle=elemData.handle=function(e){return typeof jQuery!==strundefined&&jQuery.event.triggered!==e.type?jQuery.event.dispatch.apply(elem,arguments):undefined}}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;special=jQuery.event.special[type]||{};handleObj=jQuery.extend({type:type,origType:origType,data:data,handler:handler,guid:handler.guid,selector:selector,needsContext:selector&&jQuery.expr.match.needsContext.test(selector),namespace:namespaces.join(".")},handleObjIn);if(!(handlers=events[type])){handlers=events[type]=[];handlers.delegateCount=0;if(!special.setup||special.setup.call(elem,data,namespaces,eventHandle)===false){if(elem.addEventListener){elem.addEventListener(type,eventHandle,false)}}}if(special.add){special.add.call(elem,handleObj);if(!handleObj.handler.guid){handleObj.handler.guid=handler.guid}}if(selector){handlers.splice(handlers.delegateCount++,0,handleObj)}else{handlers.push(handleObj)}jQuery.event.global[type]=true}},remove:function(elem,types,handler,selector,mappedTypes){var j,origCount,tmp,events,t,handleObj,special,handlers,type,namespaces,origType,elemData=data_priv.hasData(elem)&&data_priv.get(elem);if(!elemData||!(events=elemData.events)){return}types=(types||"").match(rnotwhite)||[""];t=types.length;while(t--){tmp=rtypenamespace.exec(types[t])||[];type=origType=tmp[1];namespaces=(tmp[2]||"").split(".").sort();if(!type){for(type in events){jQuery.event.remove(elem,type+types[t],handler,selector,true)}continue}special=jQuery.event.special[type]||{};type=(selector?special.delegateType:special.bindType)||type;handlers=events[type]||[];tmp=tmp[2]&&new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)");origCount=j=handlers.length;while(j--){handleObj=handlers[j];if((mappedTypes||origType===handleObj.origType)&&(!handler||handler.guid===handleObj.guid)&&(!tmp||tmp.test(handleObj.namespace))&&(!selector||selector===handleObj.selector||selector==="**"&&handleObj.selector)){handlers.splice(j,1);if(handleObj.selector){handlers.delegateCount--}if(special.remove){special.remove.call(elem,handleObj)}}}if(origCount&&!handlers.length){if(!special.teardown||special.teardown.call(elem,namespaces,elemData.handle)===false){jQuery.removeEvent(elem,type,elemData.handle)}delete events[type]}}if(jQuery.isEmptyObject(events)){delete elemData.handle;data_priv.remove(elem,"events")}},trigger:function(event,data,elem,onlyHandlers){var i,cur,tmp,bubbleType,ontype,handle,special,eventPath=[elem||document],type=hasOwn.call(event,"type")?event.type:event,namespaces=hasOwn.call(event,"namespace")?event.namespace.split("."):[];cur=tmp=elem=elem||document;if(elem.nodeType===3||elem.nodeType===8){return}if(rfocusMorph.test(type+jQuery.event.triggered)){return}if(type.indexOf(".")>=0){namespaces=type.split(".");type=namespaces.shift();namespaces.sort()}ontype=type.indexOf(":")<0&&"on"+type;event=event[jQuery.expando]?event:new jQuery.Event(type,typeof event==="object"&&event);event.isTrigger=onlyHandlers?2:3;event.namespace=namespaces.join(".");event.namespace_re=event.namespace?new RegExp("(^|\\.)"+namespaces.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;event.result=undefined;if(!event.target){event.target=elem}data=data==null?[event]:jQuery.makeArray(data,[event]);special=jQuery.event.special[type]||{};if(!onlyHandlers&&special.trigger&&special.trigger.apply(elem,data)===false){return}if(!onlyHandlers&&!special.noBubble&&!jQuery.isWindow(elem)){bubbleType=special.delegateType||type;if(!rfocusMorph.test(bubbleType+type)){cur=cur.parentNode}for(;cur;cur=cur.parentNode){eventPath.push(cur);tmp=cur}if(tmp===(elem.ownerDocument||document)){eventPath.push(tmp.defaultView||tmp.parentWindow||window)}}i=0;while((cur=eventPath[i++])&&!event.isPropagationStopped()){event.type=i>1?bubbleType:special.bindType||type;handle=(data_priv.get(cur,"events")||{})[event.type]&&data_priv.get(cur,"handle");if(handle){handle.apply(cur,data)}handle=ontype&&cur[ontype];if(handle&&handle.apply&&jQuery.acceptData(cur)){event.result=handle.apply(cur,data);if(event.result===false){event.preventDefault()}}}event.type=type;if(!onlyHandlers&&!event.isDefaultPrevented()){if((!special._default||special._default.apply(eventPath.pop(),data)===false)&&jQuery.acceptData(elem)){if(ontype&&jQuery.isFunction(elem[type])&&!jQuery.isWindow(elem)){tmp=elem[ontype];if(tmp){elem[ontype]=null}jQuery.event.triggered=type;elem[type]();jQuery.event.triggered=undefined;if(tmp){elem[ontype]=tmp}}}}return event.result},dispatch:function(event){event=jQuery.event.fix(event);var i,j,ret,matched,handleObj,handlerQueue=[],args=slice.call(arguments),handlers=(data_priv.get(this,"events")||{})[event.type]||[],special=jQuery.event.special[event.type]||{};args[0]=event;event.delegateTarget=this;if(special.preDispatch&&special.preDispatch.call(this,event)===false){return}handlerQueue=jQuery.event.handlers.call(this,event,handlers);i=0;while((matched=handlerQueue[i++])&&!event.isPropagationStopped()){event.currentTarget=matched.elem;j=0;while((handleObj=matched.handlers[j++])&&!event.isImmediatePropagationStopped()){if(!event.namespace_re||event.namespace_re.test(handleObj.namespace)){event.handleObj=handleObj;event.data=handleObj.data;ret=((jQuery.event.special[handleObj.origType]||{}).handle||handleObj.handler).apply(matched.elem,args);if(ret!==undefined){if((event.result=ret)===false){event.preventDefault();event.stopPropagation()}}}}}if(special.postDispatch){special.postDispatch.call(this,event)}return event.result},handlers:function(event,handlers){var i,matches,sel,handleObj,handlerQueue=[],delegateCount=handlers.delegateCount,cur=event.target;if(delegateCount&&cur.nodeType&&(!event.button||event.type!=="click")){for(;cur!==this;cur=cur.parentNode||this){if(cur.disabled!==true||event.type!=="click"){matches=[];for(i=0;i=0:jQuery.find(sel,this,null,[cur]).length}if(matches[sel]){matches.push(handleObj)}}if(matches.length){handlerQueue.push({elem:cur,handlers:matches})}}}}if(delegateCount]*)\/>/gi,rtagName=/<([\w:]+)/,rhtml=/<|&#?\w+;/,rnoInnerhtml=/<(?:script|style|link)/i,rchecked=/checked\s*(?:[^=]|=\s*.checked.)/i,rscriptType=/^$|\/(?:java|ecma)script/i,rscriptTypeMasked=/^true\/(.*)/,rcleanScript=/^\s*\s*$/g,wrapMap={option:[1,""],thead:[1,"","
    "],col:[2,"","
    "],tr:[2,"","
    "],td:[3,"","
    "],_default:[0,"",""]};wrapMap.optgroup=wrapMap.option;wrapMap.tbody=wrapMap.tfoot=wrapMap.colgroup=wrapMap.caption=wrapMap.thead;wrapMap.th=wrapMap.td;function manipulationTarget(elem,content){return jQuery.nodeName(elem,"table")&&jQuery.nodeName(content.nodeType!==11?content:content.firstChild,"tr")?elem.getElementsByTagName("tbody")[0]||elem.appendChild(elem.ownerDocument.createElement("tbody")):elem}function disableScript(elem){elem.type=(elem.getAttribute("type")!==null)+"/"+elem.type;return elem}function restoreScript(elem){var match=rscriptTypeMasked.exec(elem.type);if(match){elem.type=match[1]}else{elem.removeAttribute("type")}return elem}function setGlobalEval(elems,refElements){var i=0,l=elems.length;for(;i0){setGlobalEval(destElements,!inPage&&getAll(elem,"script"))}return clone},buildFragment:function(elems,context,scripts,selection){var elem,tmp,tag,wrap,contains,j,fragment=context.createDocumentFragment(),nodes=[],i=0,l=elems.length;for(;i")+wrap[2];j=wrap[0];while(j--){tmp=tmp.lastChild}jQuery.merge(nodes,tmp.childNodes);tmp=fragment.firstChild;tmp.textContent=""}}}}fragment.textContent="";i=0;while((elem=nodes[i++])){if(selection&&jQuery.inArray(elem,selection)!==-1){continue}contains=jQuery.contains(elem.ownerDocument,elem);tmp=getAll(fragment.appendChild(elem),"script");if(contains){setGlobalEval(tmp)}if(scripts){j=0;while((elem=tmp[j++])){if(rscriptType.test(elem.type||"")){scripts.push(elem)}}}}return fragment},cleanData:function(elems){var data,elem,type,key,special=jQuery.event.special,i=0;for(;(elem=elems[i])!==undefined;i++){if(jQuery.acceptData(elem)){key=elem[data_priv.expando];if(key&&(data=data_priv.cache[key])){if(data.events){for(type in data.events){if(special[type]){jQuery.event.remove(elem,type)}else{jQuery.removeEvent(elem,type,data.handle)}}}if(data_priv.cache[key]){delete data_priv.cache[key]}}}delete data_user.cache[elem[data_user.expando]]}}});jQuery.fn.extend({text:function(value){return access(this,function(value){return value===undefined?jQuery.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=value}})},null,value,arguments.length)},append:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.appendChild(elem)}})},prepend:function(){return this.domManip(arguments,function(elem){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var target=manipulationTarget(this,elem);target.insertBefore(elem,target.firstChild)}})},before:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this)}})},after:function(){return this.domManip(arguments,function(elem){if(this.parentNode){this.parentNode.insertBefore(elem,this.nextSibling)}})},remove:function(selector,keepData){var elem,elems=selector?jQuery.filter(selector,this):this,i=0;for(;(elem=elems[i])!=null;i++){if(!keepData&&elem.nodeType===1){jQuery.cleanData(getAll(elem))}if(elem.parentNode){if(keepData&&jQuery.contains(elem.ownerDocument,elem)){setGlobalEval(getAll(elem,"script"))}elem.parentNode.removeChild(elem)}}return this},empty:function(){var elem,i=0;for(;(elem=this[i])!=null;i++){if(elem.nodeType===1){jQuery.cleanData(getAll(elem,false));elem.textContent=""}}return this},clone:function(dataAndEvents,deepDataAndEvents){dataAndEvents=dataAndEvents==null?false:dataAndEvents;deepDataAndEvents=deepDataAndEvents==null?dataAndEvents:deepDataAndEvents;return this.map(function(){return jQuery.clone(this,dataAndEvents,deepDataAndEvents)})},html:function(value){return access(this,function(value){var elem=this[0]||{},i=0,l=this.length;if(value===undefined&&elem.nodeType===1){return elem.innerHTML}if(typeof value==="string"&&!rnoInnerhtml.test(value)&&!wrapMap[(rtagName.exec(value)||["",""])[1].toLowerCase()]){value=value.replace(rxhtmlTag,"<$1>");try{for(;i1&&typeof value==="string"&&!support.checkClone&&rchecked.test(value))){return this.each(function(index){var self=set.eq(index);if(isFunction){args[0]=value.call(this,index,self.html())}self.domManip(args,callback)})}if(l){fragment=jQuery.buildFragment(args,this[0].ownerDocument,false,this);first=fragment.firstChild;if(fragment.childNodes.length===1){fragment=first}if(first){scripts=jQuery.map(getAll(fragment,"script"),disableScript);hasScripts=scripts.length;for(;i")).appendTo(doc.documentElement);doc=iframe[0].contentDocument;doc.write();doc.close();display=actualDisplay(nodeName,doc);iframe.detach()}elemdisplay[nodeName]=display}return display}var rmargin=(/^margin/);var rnumnonpx=new RegExp("^("+pnum+")(?!px)[a-z%]+$","i");var getStyles=function(elem){return elem.ownerDocument.defaultView.getComputedStyle(elem,null)};function curCSS(elem,name,computed){var width,minWidth,maxWidth,ret,style=elem.style;computed=computed||getStyles(elem);if(computed){ret=computed.getPropertyValue(name)||computed[name]}if(computed){if(ret===""&&!jQuery.contains(elem.ownerDocument,elem)){ret=jQuery.style(elem,name)}if(rnumnonpx.test(ret)&&rmargin.test(name)){width=style.width;minWidth=style.minWidth;maxWidth=style.maxWidth;style.minWidth=style.maxWidth=style.width=ret;ret=computed.width;style.width=width;style.minWidth=minWidth;style.maxWidth=maxWidth}}return ret!==undefined?ret+"":ret}function addGetHookIf(conditionFn,hookFn){return{get:function(){if(conditionFn()){delete this.get;return}return(this.get=hookFn).apply(this,arguments)}}}(function(){var pixelPositionVal,boxSizingReliableVal,docElem=document.documentElement,container=document.createElement("div"),div=document.createElement("div");if(!div.style){return}div.style.backgroundClip="content-box";div.cloneNode(true).style.backgroundClip="";support.clearCloneStyle=div.style.backgroundClip==="content-box";container.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;position:absolute";container.appendChild(div);function computePixelPositionAndBoxSizingReliable(){div.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;display:block;margin-top:1%;top:1%;border:1px;padding:1px;width:4px;position:absolute";div.innerHTML="";docElem.appendChild(container);var divStyle=window.getComputedStyle(div,null);pixelPositionVal=divStyle.top!=="1%";boxSizingReliableVal=divStyle.width==="4px";docElem.removeChild(container)}if(window.getComputedStyle){jQuery.extend(support,{pixelPosition:function(){computePixelPositionAndBoxSizingReliable();return pixelPositionVal},boxSizingReliable:function(){if(boxSizingReliableVal==null){computePixelPositionAndBoxSizingReliable()}return boxSizingReliableVal},reliableMarginRight:function(){var ret,marginDiv=div.appendChild(document.createElement("div"));marginDiv.style.cssText=div.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0";marginDiv.style.marginRight=marginDiv.style.width="0";div.style.width="1px";docElem.appendChild(container);ret=!parseFloat(window.getComputedStyle(marginDiv,null).marginRight);docElem.removeChild(container);return ret}})}})();jQuery.swap=function(elem,options,callback,args){var ret,name,old={};for(name in options){old[name]=elem.style[name];elem.style[name]=options[name]}ret=callback.apply(elem,args||[]);for(name in options){elem.style[name]=old[name]}return ret};var rdisplayswap=/^(none|table(?!-c[ea]).+)/,rnumsplit=new RegExp("^("+pnum+")(.*)$","i"),rrelNum=new RegExp("^([+-])=("+pnum+")","i"),cssShow={position:"absolute",visibility:"hidden",display:"block"},cssNormalTransform={letterSpacing:"0",fontWeight:"400"},cssPrefixes=["Webkit","O","Moz","ms"];function vendorPropName(style,name){if(name in style){return name}var capName=name[0].toUpperCase()+name.slice(1),origName=name,i=cssPrefixes.length;while(i--){name=cssPrefixes[i]+capName;if(name in style){return name}}return origName}function setPositiveNumber(elem,value,subtract){var matches=rnumsplit.exec(value);return matches?Math.max(0,matches[1]-(subtract||0))+(matches[2]||"px"):value}function augmentWidthOrHeight(elem,name,extra,isBorderBox,styles){var i=extra===(isBorderBox?"border":"content")?4:name==="width"?1:0,val=0;for(;i<4;i+=2){if(extra==="margin"){val+=jQuery.css(elem,extra+cssExpand[i],true,styles)}if(isBorderBox){if(extra==="content"){val-=jQuery.css(elem,"padding"+cssExpand[i],true,styles)}if(extra!=="margin"){val-=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}else{val+=jQuery.css(elem,"padding"+cssExpand[i],true,styles);if(extra!=="padding"){val+=jQuery.css(elem,"border"+cssExpand[i]+"Width",true,styles)}}}return val}function getWidthOrHeight(elem,name,extra){var valueIsBorderBox=true,val=name==="width"?elem.offsetWidth:elem.offsetHeight,styles=getStyles(elem),isBorderBox=jQuery.css(elem,"boxSizing",false,styles)==="border-box";if(val<=0||val==null){val=curCSS(elem,name,styles);if(val<0||val==null){val=elem.style[name]}if(rnumnonpx.test(val)){return val}valueIsBorderBox=isBorderBox&&(support.boxSizingReliable()||val===elem.style[name]);val=parseFloat(val)||0}return(val+augmentWidthOrHeight(elem,name,extra||(isBorderBox?"border":"content"),valueIsBorderBox,styles))+"px"}function showHide(elements,show){var display,elem,hidden,values=[],index=0,length=elements.length;for(;index1)},show:function(){return showHide(this,true)},hide:function(){return showHide(this)},toggle:function(state){if(typeof state==="boolean"){return state?this.show():this.hide()}return this.each(function(){if(isHidden(this)){jQuery(this).show()}else{jQuery(this).hide()}})}});function Tween(elem,options,prop,end,easing){return new Tween.prototype.init(elem,options,prop,end,easing)}jQuery.Tween=Tween;Tween.prototype={constructor:Tween,init:function(elem,options,prop,end,easing,unit){this.elem=elem;this.prop=prop;this.easing=easing||"swing";this.options=options;this.start=this.now=this.cur();this.end=end;this.unit=unit||(jQuery.cssNumber[prop]?"":"px")},cur:function(){var hooks=Tween.propHooks[this.prop];return hooks&&hooks.get?hooks.get(this):Tween.propHooks._default.get(this)},run:function(percent){var eased,hooks=Tween.propHooks[this.prop];if(this.options.duration){this.pos=eased=jQuery.easing[this.easing](percent,this.options.duration*percent,0,1,this.options.duration)}else{this.pos=eased=percent}this.now=(this.end-this.start)*eased+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(hooks&&hooks.set){hooks.set(this)}else{Tween.propHooks._default.set(this)}return this}};Tween.prototype.init.prototype=Tween.prototype;Tween.propHooks={_default:{get:function(tween){var result;if(tween.elem[tween.prop]!=null&&(!tween.elem.style||tween.elem.style[tween.prop]==null)){return tween.elem[tween.prop]}result=jQuery.css(tween.elem,tween.prop,"");return !result||result==="auto"?0:result},set:function(tween){if(jQuery.fx.step[tween.prop]){jQuery.fx.step[tween.prop](tween)}else{if(tween.elem.style&&(tween.elem.style[jQuery.cssProps[tween.prop]]!=null||jQuery.cssHooks[tween.prop])){jQuery.style(tween.elem,tween.prop,tween.now+tween.unit)}else{tween.elem[tween.prop]=tween.now}}}}};Tween.propHooks.scrollTop=Tween.propHooks.scrollLeft={set:function(tween){if(tween.elem.nodeType&&tween.elem.parentNode){tween.elem[tween.prop]=tween.now}}};jQuery.easing={linear:function(p){return p},swing:function(p){return 0.5-Math.cos(p*Math.PI)/2}};jQuery.fx=Tween.prototype.init;jQuery.fx.step={};var fxNow,timerId,rfxtypes=/^(?:toggle|show|hide)$/,rfxnum=new RegExp("^(?:([+-])=|)("+pnum+")([a-z%]*)$","i"),rrun=/queueHooks$/,animationPrefilters=[defaultPrefilter],tweeners={"*":[function(prop,value){var tween=this.createTween(prop,value),target=tween.cur(),parts=rfxnum.exec(value),unit=parts&&parts[3]||(jQuery.cssNumber[prop]?"":"px"),start=(jQuery.cssNumber[prop]||unit!=="px"&&+target)&&rfxnum.exec(jQuery.css(tween.elem,prop)),scale=1,maxIterations=20;if(start&&start[3]!==unit){unit=unit||start[3];parts=parts||[];start=+target||1;do{scale=scale||".5";start=start/scale;jQuery.style(tween.elem,prop,start+unit)}while(scale!==(scale=tween.cur()/target)&&scale!==1&&--maxIterations)}if(parts){start=tween.start=+start||+target||0;tween.unit=unit;tween.end=parts[1]?start+(parts[1]+1)*parts[2]:+parts[2]}return tween}]};function createFxNow(){setTimeout(function(){fxNow=undefined});return(fxNow=jQuery.now())}function genFx(type,includeWidth){var which,i=0,attrs={height:type};includeWidth=includeWidth?1:0;for(;i<4;i+=2-includeWidth){which=cssExpand[i];attrs["margin"+which]=attrs["padding"+which]=type}if(includeWidth){attrs.opacity=attrs.width=type}return attrs}function createTween(value,prop,animation){var tween,collection=(tweeners[prop]||[]).concat(tweeners["*"]),index=0,length=collection.length;for(;index1)},removeAttr:function(name){return this.each(function(){jQuery.removeAttr(this,name)})}});jQuery.extend({attr:function(elem,name,value){var hooks,ret,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}if(typeof elem.getAttribute===strundefined){return jQuery.prop(elem,name,value)}if(nType!==1||!jQuery.isXMLDoc(elem)){name=name.toLowerCase();hooks=jQuery.attrHooks[name]||(jQuery.expr.match.bool.test(name)?boolHook:nodeHook)}if(value!==undefined){if(value===null){jQuery.removeAttr(elem,name)}else{if(hooks&&"set" in hooks&&(ret=hooks.set(elem,value,name))!==undefined){return ret}else{elem.setAttribute(name,value+"");return value}}}else{if(hooks&&"get" in hooks&&(ret=hooks.get(elem,name))!==null){return ret}else{ret=jQuery.find.attr(elem,name);return ret==null?undefined:ret}}},removeAttr:function(elem,value){var name,propName,i=0,attrNames=value&&value.match(rnotwhite);if(attrNames&&elem.nodeType===1){while((name=attrNames[i++])){propName=jQuery.propFix[name]||name;if(jQuery.expr.match.bool.test(name)){elem[propName]=false}elem.removeAttribute(name)}}},attrHooks:{type:{set:function(elem,value){if(!support.radioValue&&value==="radio"&&jQuery.nodeName(elem,"input")){var val=elem.value;elem.setAttribute("type",value);if(val){elem.value=val}return value}}}}});boolHook={set:function(elem,value,name){if(value===false){jQuery.removeAttr(elem,name)}else{elem.setAttribute(name,name)}return name}};jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g),function(i,name){var getter=attrHandle[name]||jQuery.find.attr;attrHandle[name]=function(elem,name,isXML){var ret,handle;if(!isXML){handle=attrHandle[name];attrHandle[name]=ret;ret=getter(elem,name,isXML)!=null?name.toLowerCase():null;attrHandle[name]=handle}return ret}});var rfocusable=/^(?:input|select|textarea|button)$/i;jQuery.fn.extend({prop:function(name,value){return access(this,jQuery.prop,name,value,arguments.length>1)},removeProp:function(name){return this.each(function(){delete this[jQuery.propFix[name]||name]})}});jQuery.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(elem,name,value){var ret,hooks,notxml,nType=elem.nodeType;if(!elem||nType===3||nType===8||nType===2){return}notxml=nType!==1||!jQuery.isXMLDoc(elem);if(notxml){name=jQuery.propFix[name]||name;hooks=jQuery.propHooks[name]}if(value!==undefined){return hooks&&"set" in hooks&&(ret=hooks.set(elem,value,name))!==undefined?ret:(elem[name]=value)}else{return hooks&&"get" in hooks&&(ret=hooks.get(elem,name))!==null?ret:elem[name]}},propHooks:{tabIndex:{get:function(elem){return elem.hasAttribute("tabindex")||rfocusable.test(elem.nodeName)||elem.href?elem.tabIndex:-1}}}});if(!support.optSelected){jQuery.propHooks.selected={get:function(elem){var parent=elem.parentNode;if(parent&&parent.parentNode){parent.parentNode.selectedIndex}return null}}}jQuery.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){jQuery.propFix[this.toLowerCase()]=this});var rclass=/[\t\r\n\f]/g;jQuery.fn.extend({addClass:function(value){var classes,elem,cur,clazz,j,finalValue,proceed=typeof value==="string"&&value,i=0,len=this.length;if(jQuery.isFunction(value)){return this.each(function(j){jQuery(this).addClass(value.call(this,j,this.className))})}if(proceed){classes=(value||"").match(rnotwhite)||[];for(;i=0){cur=cur.replace(" "+clazz+" "," ")}}finalValue=value?jQuery.trim(cur):"";if(elem.className!==finalValue){elem.className=finalValue}}}}return this},toggleClass:function(value,stateVal){var type=typeof value;if(typeof stateVal==="boolean"&&type==="string"){return stateVal?this.addClass(value):this.removeClass(value)}if(jQuery.isFunction(value)){return this.each(function(i){jQuery(this).toggleClass(value.call(this,i,this.className,stateVal),stateVal)})}return this.each(function(){if(type==="string"){var className,i=0,self=jQuery(this),classNames=value.match(rnotwhite)||[];while((className=classNames[i++])){if(self.hasClass(className)){self.removeClass(className)}else{self.addClass(className)}}}else{if(type===strundefined||type==="boolean"){if(this.className){data_priv.set(this,"__className__",this.className)}this.className=this.className||value===false?"":data_priv.get(this,"__className__")||""}}})},hasClass:function(selector){var className=" "+selector+" ",i=0,l=this.length;for(;i=0){return true}}return false}});var rreturn=/\r/g;jQuery.fn.extend({val:function(value){var hooks,ret,isFunction,elem=this[0];if(!arguments.length){if(elem){hooks=jQuery.valHooks[elem.type]||jQuery.valHooks[elem.nodeName.toLowerCase()];if(hooks&&"get" in hooks&&(ret=hooks.get(elem,"value"))!==undefined){return ret}ret=elem.value;return typeof ret==="string"?ret.replace(rreturn,""):ret==null?"":ret}return}isFunction=jQuery.isFunction(value);return this.each(function(i){var val;if(this.nodeType!==1){return}if(isFunction){val=value.call(this,i,jQuery(this).val())}else{val=value}if(val==null){val=""}else{if(typeof val==="number"){val+=""}else{if(jQuery.isArray(val)){val=jQuery.map(val,function(value){return value==null?"":value+""})}}}hooks=jQuery.valHooks[this.type]||jQuery.valHooks[this.nodeName.toLowerCase()];if(!hooks||!("set" in hooks)||hooks.set(this,val,"value")===undefined){this.value=val}})}});jQuery.extend({valHooks:{option:{get:function(elem){var val=jQuery.find.attr(elem,"value");return val!=null?val:jQuery.trim(jQuery.text(elem))}},select:{get:function(elem){var value,option,options=elem.options,index=elem.selectedIndex,one=elem.type==="select-one"||index<0,values=one?null:[],max=one?index+1:options.length,i=index<0?max:one?index:0;for(;i=0)){optionSet=true}}if(!optionSet){elem.selectedIndex=-1}return values}}}});jQuery.each(["radio","checkbox"],function(){jQuery.valHooks[this]={set:function(elem,value){if(jQuery.isArray(value)){return(elem.checked=jQuery.inArray(jQuery(elem).val(),value)>=0)}}};if(!support.checkOn){jQuery.valHooks[this].get=function(elem){return elem.getAttribute("value")===null?"on":elem.value}}});jQuery.each(("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu").split(" "),function(i,name){jQuery.fn[name]=function(data,fn){return arguments.length>0?this.on(name,null,data,fn):this.trigger(name)}});jQuery.fn.extend({hover:function(fnOver,fnOut){return this.mouseenter(fnOver).mouseleave(fnOut||fnOver)},bind:function(types,data,fn){return this.on(types,null,data,fn)},unbind:function(types,fn){return this.off(types,null,fn)},delegate:function(selector,types,data,fn){return this.on(types,selector,data,fn)},undelegate:function(selector,types,fn){return arguments.length===1?this.off(selector,"**"):this.off(types,selector||"**",fn)}});var nonce=jQuery.now();var rquery=(/\?/);jQuery.parseJSON=function(data){return JSON.parse(data+"")};jQuery.parseXML=function(data){var xml,tmp;if(!data||typeof data!=="string"){return null}try{tmp=new DOMParser();xml=tmp.parseFromString(data,"text/xml")}catch(e){xml=undefined}if(!xml||xml.getElementsByTagName("parsererror").length){jQuery.error("Invalid XML: "+data)}return xml};var ajaxLocParts,ajaxLocation,rhash=/#.*$/,rts=/([?&])_=[^&]*/,rheaders=/^(.*?):[ \t]*([^\r\n]*)$/mg,rlocalProtocol=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,rnoContent=/^(?:GET|HEAD)$/,rprotocol=/^\/\//,rurl=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,prefilters={},transports={},allTypes="*/".concat("*");try{ajaxLocation=location.href}catch(e){ajaxLocation=document.createElement("a");ajaxLocation.href="";ajaxLocation=ajaxLocation.href}ajaxLocParts=rurl.exec(ajaxLocation.toLowerCase())||[];function addToPrefiltersOrTransports(structure){return function(dataTypeExpression,func){if(typeof dataTypeExpression!=="string"){func=dataTypeExpression;dataTypeExpression="*"}var dataType,i=0,dataTypes=dataTypeExpression.toLowerCase().match(rnotwhite)||[];if(jQuery.isFunction(func)){while((dataType=dataTypes[i++])){if(dataType[0]==="+"){dataType=dataType.slice(1)||"*";(structure[dataType]=structure[dataType]||[]).unshift(func)}else{(structure[dataType]=structure[dataType]||[]).push(func)}}}}}function inspectPrefiltersOrTransports(structure,options,originalOptions,jqXHR){var inspected={},seekingTransport=(structure===transports);function inspect(dataType){var selected;inspected[dataType]=true;jQuery.each(structure[dataType]||[],function(_,prefilterOrFactory){var dataTypeOrTransport=prefilterOrFactory(options,originalOptions,jqXHR);if(typeof dataTypeOrTransport==="string"&&!seekingTransport&&!inspected[dataTypeOrTransport]){options.dataTypes.unshift(dataTypeOrTransport);inspect(dataTypeOrTransport);return false}else{if(seekingTransport){return !(selected=dataTypeOrTransport)}}});return selected}return inspect(options.dataTypes[0])||!inspected["*"]&&inspect("*")}function ajaxExtend(target,src){var key,deep,flatOptions=jQuery.ajaxSettings.flatOptions||{};for(key in src){if(src[key]!==undefined){(flatOptions[key]?target:(deep||(deep={})))[key]=src[key]}}if(deep){jQuery.extend(true,target,deep)}return target}function ajaxHandleResponses(s,jqXHR,responses){var ct,type,finalDataType,firstDataType,contents=s.contents,dataTypes=s.dataTypes;while(dataTypes[0]==="*"){dataTypes.shift();if(ct===undefined){ct=s.mimeType||jqXHR.getResponseHeader("Content-Type")}}if(ct){for(type in contents){if(contents[type]&&contents[type].test(ct)){dataTypes.unshift(type);break}}}if(dataTypes[0] in responses){finalDataType=dataTypes[0]}else{for(type in responses){if(!dataTypes[0]||s.converters[type+" "+dataTypes[0]]){finalDataType=type;break}if(!firstDataType){firstDataType=type}}finalDataType=finalDataType||firstDataType}if(finalDataType){if(finalDataType!==dataTypes[0]){dataTypes.unshift(finalDataType)}return responses[finalDataType]}}function ajaxConvert(s,response,jqXHR,isSuccess){var conv2,current,conv,tmp,prev,converters={},dataTypes=s.dataTypes.slice();if(dataTypes[1]){for(conv in s.converters){converters[conv.toLowerCase()]=s.converters[conv]}}current=dataTypes.shift();while(current){if(s.responseFields[current]){jqXHR[s.responseFields[current]]=response}if(!prev&&isSuccess&&s.dataFilter){response=s.dataFilter(response,s.dataType)}prev=current;current=dataTypes.shift();if(current){if(current==="*"){current=prev}else{if(prev!=="*"&&prev!==current){conv=converters[prev+" "+current]||converters["* "+current];if(!conv){for(conv2 in converters){tmp=conv2.split(" ");if(tmp[1]===current){conv=converters[prev+" "+tmp[0]]||converters["* "+tmp[0]];if(conv){if(conv===true){conv=converters[conv2]}else{if(converters[conv2]!==true){current=tmp[0];dataTypes.unshift(tmp[1])}}break}}}}if(conv!==true){if(conv&&s["throws"]){response=conv(response)}else{try{response=conv(response)}catch(e){return{state:"parsererror",error:conv?e:"No conversion from "+prev+" to "+current}}}}}}}}return{state:"success",data:response}}jQuery.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:ajaxLocation,type:"GET",isLocal:rlocalProtocol.test(ajaxLocParts[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":allTypes,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":true,"text json":jQuery.parseJSON,"text xml":jQuery.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(target,settings){return settings?ajaxExtend(ajaxExtend(target,jQuery.ajaxSettings),settings):ajaxExtend(jQuery.ajaxSettings,target)},ajaxPrefilter:addToPrefiltersOrTransports(prefilters),ajaxTransport:addToPrefiltersOrTransports(transports),ajax:function(url,options){if(typeof url==="object"){options=url;url=undefined}options=options||{};var transport,cacheURL,responseHeadersString,responseHeaders,timeoutTimer,parts,fireGlobals,i,s=jQuery.ajaxSetup({},options),callbackContext=s.context||s,globalEventContext=s.context&&(callbackContext.nodeType||callbackContext.jquery)?jQuery(callbackContext):jQuery.event,deferred=jQuery.Deferred(),completeDeferred=jQuery.Callbacks("once memory"),statusCode=s.statusCode||{},requestHeaders={},requestHeadersNames={},state=0,strAbort="canceled",jqXHR={readyState:0,getResponseHeader:function(key){var match;if(state===2){if(!responseHeaders){responseHeaders={};while((match=rheaders.exec(responseHeadersString))){responseHeaders[match[1].toLowerCase()]=match[2]}}match=responseHeaders[key.toLowerCase()]}return match==null?null:match},getAllResponseHeaders:function(){return state===2?responseHeadersString:null},setRequestHeader:function(name,value){var lname=name.toLowerCase();if(!state){name=requestHeadersNames[lname]=requestHeadersNames[lname]||name;requestHeaders[name]=value}return this},overrideMimeType:function(type){if(!state){s.mimeType=type}return this},statusCode:function(map){var code;if(map){if(state<2){for(code in map){statusCode[code]=[statusCode[code],map[code]]}}else{jqXHR.always(map[jqXHR.status])}}return this},abort:function(statusText){var finalText=statusText||strAbort;if(transport){transport.abort(finalText)}done(0,finalText);return this}};deferred.promise(jqXHR).complete=completeDeferred.add;jqXHR.success=jqXHR.done;jqXHR.error=jqXHR.fail;s.url=((url||s.url||ajaxLocation)+"").replace(rhash,"").replace(rprotocol,ajaxLocParts[1]+"//");s.type=options.method||options.type||s.method||s.type;s.dataTypes=jQuery.trim(s.dataType||"*").toLowerCase().match(rnotwhite)||[""];if(s.crossDomain==null){parts=rurl.exec(s.url.toLowerCase());s.crossDomain=!!(parts&&(parts[1]!==ajaxLocParts[1]||parts[2]!==ajaxLocParts[2]||(parts[3]||(parts[1]==="http:"?"80":"443"))!==(ajaxLocParts[3]||(ajaxLocParts[1]==="http:"?"80":"443"))))}if(s.data&&s.processData&&typeof s.data!=="string"){s.data=jQuery.param(s.data,s.traditional)}inspectPrefiltersOrTransports(prefilters,s,options,jqXHR);if(state===2){return jqXHR}fireGlobals=s.global;if(fireGlobals&&jQuery.active++===0){jQuery.event.trigger("ajaxStart")}s.type=s.type.toUpperCase();s.hasContent=!rnoContent.test(s.type);cacheURL=s.url;if(!s.hasContent){if(s.data){cacheURL=(s.url+=(rquery.test(cacheURL)?"&":"?")+s.data);delete s.data}if(s.cache===false){s.url=rts.test(cacheURL)?cacheURL.replace(rts,"$1_="+nonce++):cacheURL+(rquery.test(cacheURL)?"&":"?")+"_="+nonce++}}if(s.ifModified){if(jQuery.lastModified[cacheURL]){jqXHR.setRequestHeader("If-Modified-Since",jQuery.lastModified[cacheURL])}if(jQuery.etag[cacheURL]){jqXHR.setRequestHeader("If-None-Match",jQuery.etag[cacheURL])}}if(s.data&&s.hasContent&&s.contentType!==false||options.contentType){jqXHR.setRequestHeader("Content-Type",s.contentType)}jqXHR.setRequestHeader("Accept",s.dataTypes[0]&&s.accepts[s.dataTypes[0]]?s.accepts[s.dataTypes[0]]+(s.dataTypes[0]!=="*"?", "+allTypes+"; q=0.01":""):s.accepts["*"]);for(i in s.headers){jqXHR.setRequestHeader(i,s.headers[i])}if(s.beforeSend&&(s.beforeSend.call(callbackContext,jqXHR,s)===false||state===2)){return jqXHR.abort()}strAbort="abort";for(i in {success:1,error:1,complete:1}){jqXHR[i](s[i])}transport=inspectPrefiltersOrTransports(transports,s,options,jqXHR);if(!transport){done(-1,"No Transport")}else{jqXHR.readyState=1;if(fireGlobals){globalEventContext.trigger("ajaxSend",[jqXHR,s])}if(s.async&&s.timeout>0){timeoutTimer=setTimeout(function(){jqXHR.abort("timeout")},s.timeout)}try{state=1;transport.send(requestHeaders,done)}catch(e){if(state<2){done(-1,e)}else{throw e}}}function done(status,nativeStatusText,responses,headers){var isSuccess,success,error,response,modified,statusText=nativeStatusText;if(state===2){return}state=2;if(timeoutTimer){clearTimeout(timeoutTimer)}transport=undefined;responseHeadersString=headers||"";jqXHR.readyState=status>0?4:0;isSuccess=status>=200&&status<300||status===304;if(responses){response=ajaxHandleResponses(s,jqXHR,responses)}response=ajaxConvert(s,response,jqXHR,isSuccess);if(isSuccess){if(s.ifModified){modified=jqXHR.getResponseHeader("Last-Modified");if(modified){jQuery.lastModified[cacheURL]=modified}modified=jqXHR.getResponseHeader("etag");if(modified){jQuery.etag[cacheURL]=modified}}if(status===204||s.type==="HEAD"){statusText="nocontent"}else{if(status===304){statusText="notmodified"}else{statusText=response.state;success=response.data;error=response.error;isSuccess=!error}}}else{error=statusText;if(status||!statusText){statusText="error";if(status<0){status=0}}}jqXHR.status=status;jqXHR.statusText=(nativeStatusText||statusText)+"";if(isSuccess){deferred.resolveWith(callbackContext,[success,statusText,jqXHR])}else{deferred.rejectWith(callbackContext,[jqXHR,statusText,error])}jqXHR.statusCode(statusCode);statusCode=undefined;if(fireGlobals){globalEventContext.trigger(isSuccess?"ajaxSuccess":"ajaxError",[jqXHR,s,isSuccess?success:error])}completeDeferred.fireWith(callbackContext,[jqXHR,statusText]);if(fireGlobals){globalEventContext.trigger("ajaxComplete",[jqXHR,s]);if(!(--jQuery.active)){jQuery.event.trigger("ajaxStop")}}}return jqXHR},getJSON:function(url,data,callback){return jQuery.get(url,data,callback,"json")},getScript:function(url,callback){return jQuery.get(url,undefined,callback,"script")}});jQuery.each(["get","post"],function(i,method){jQuery[method]=function(url,data,callback,type){if(jQuery.isFunction(data)){type=type||callback;callback=data;data=undefined}return jQuery.ajax({url:url,type:method,dataType:type,data:data,success:callback})}});jQuery.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(i,type){jQuery.fn[type]=function(fn){return this.on(type,fn)}});jQuery._evalUrl=function(url){return jQuery.ajax({url:url,type:"GET",dataType:"script",async:false,global:false,"throws":true})};jQuery.fn.extend({wrapAll:function(html){var wrap;if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapAll(html.call(this,i))})}if(this[0]){wrap=jQuery(html,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){wrap.insertBefore(this[0])}wrap.map(function(){var elem=this;while(elem.firstElementChild){elem=elem.firstElementChild}return elem}).append(this)}return this},wrapInner:function(html){if(jQuery.isFunction(html)){return this.each(function(i){jQuery(this).wrapInner(html.call(this,i))})}return this.each(function(){var self=jQuery(this),contents=self.contents();if(contents.length){contents.wrapAll(html)}else{self.append(html)}})},wrap:function(html){var isFunction=jQuery.isFunction(html);return this.each(function(i){jQuery(this).wrapAll(isFunction?html.call(this,i):html)})},unwrap:function(){return this.parent().each(function(){if(!jQuery.nodeName(this,"body")){jQuery(this).replaceWith(this.childNodes)}}).end()}});jQuery.expr.filters.hidden=function(elem){return elem.offsetWidth<=0&&elem.offsetHeight<=0};jQuery.expr.filters.visible=function(elem){return !jQuery.expr.filters.hidden(elem)};var r20=/%20/g,rbracket=/\[\]$/,rCRLF=/\r?\n/g,rsubmitterTypes=/^(?:submit|button|image|reset|file)$/i,rsubmittable=/^(?:input|select|textarea|keygen)/i;function buildParams(prefix,obj,traditional,add){var name;if(jQuery.isArray(obj)){jQuery.each(obj,function(i,v){if(traditional||rbracket.test(prefix)){add(prefix,v)}else{buildParams(prefix+"["+(typeof v==="object"?i:"")+"]",v,traditional,add)}})}else{if(!traditional&&jQuery.type(obj)==="object"){for(name in obj){buildParams(prefix+"["+name+"]",obj[name],traditional,add)}}else{add(prefix,obj)}}}jQuery.param=function(a,traditional){var prefix,s=[],add=function(key,value){value=jQuery.isFunction(value)?value():(value==null?"":value);s[s.length]=encodeURIComponent(key)+"="+encodeURIComponent(value)};if(traditional===undefined){traditional=jQuery.ajaxSettings&&jQuery.ajaxSettings.traditional}if(jQuery.isArray(a)||(a.jquery&&!jQuery.isPlainObject(a))){jQuery.each(a,function(){add(this.name,this.value)})}else{for(prefix in a){buildParams(prefix,a[prefix],traditional,add)}}return s.join("&").replace(r20,"+")};jQuery.fn.extend({serialize:function(){return jQuery.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var elements=jQuery.prop(this,"elements");return elements?jQuery.makeArray(elements):this}).filter(function(){var type=this.type;return this.name&&!jQuery(this).is(":disabled")&&rsubmittable.test(this.nodeName)&&!rsubmitterTypes.test(type)&&(this.checked||!rcheckableType.test(type))}).map(function(i,elem){var val=jQuery(this).val();return val==null?null:jQuery.isArray(val)?jQuery.map(val,function(val){return{name:elem.name,value:val.replace(rCRLF,"\r\n")}}):{name:elem.name,value:val.replace(rCRLF,"\r\n")}}).get()}});jQuery.ajaxSettings.xhr=function(){try{return new XMLHttpRequest()}catch(e){}};var xhrId=0,xhrCallbacks={},xhrSuccessStatus={0:200,1223:204},xhrSupported=jQuery.ajaxSettings.xhr();if(window.ActiveXObject){jQuery(window).on("unload",function(){for(var key in xhrCallbacks){xhrCallbacks[key]()}})}support.cors=!!xhrSupported&&("withCredentials" in xhrSupported);support.ajax=xhrSupported=!!xhrSupported;jQuery.ajaxTransport(function(options){var callback;if(support.cors||xhrSupported&&!options.crossDomain){return{send:function(headers,complete){var i,xhr=options.xhr(),id=++xhrId;xhr.open(options.type,options.url,options.async,options.username,options.password);if(options.xhrFields){for(i in options.xhrFields){xhr[i]=options.xhrFields[i]}}if(options.mimeType&&xhr.overrideMimeType){xhr.overrideMimeType(options.mimeType)}if(!options.crossDomain&&!headers["X-Requested-With"]){headers["X-Requested-With"]="XMLHttpRequest"}for(i in headers){xhr.setRequestHeader(i,headers[i])}callback=function(type){return function(){if(callback){delete xhrCallbacks[id];callback=xhr.onload=xhr.onerror=null;if(type==="abort"){xhr.abort()}else{if(type==="error"){complete(xhr.status,xhr.statusText)}else{complete(xhrSuccessStatus[xhr.status]||xhr.status,xhr.statusText,typeof xhr.responseText==="string"?{text:xhr.responseText}:undefined,xhr.getAllResponseHeaders())}}}}};xhr.onload=callback();xhr.onerror=callback("error");callback=xhrCallbacks[id]=callback("abort");try{xhr.send(options.hasContent&&options.data||null)}catch(e){if(callback){throw e}}},abort:function(){if(callback){callback()}}}}});jQuery.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(text){jQuery.globalEval(text);return text}}});jQuery.ajaxPrefilter("script",function(s){if(s.cache===undefined){s.cache=false}if(s.crossDomain){s.type="GET"}});jQuery.ajaxTransport("script",function(s){if(s.crossDomain){var script,callback;return{send:function(_,complete){script=jQuery(" + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-categories.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-categories.php" new file mode 100644 index 0000000..8124eac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-categories.php" @@ -0,0 +1,154 @@ +to($categories); +?> + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + + +
    +
    + +
    + +
    + + + + + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + + + + + + + + + + + + + + + +
    name(); ?> + + + + children) > 0): ?> + children)); ?> + + + + slug(); ?> + defaultCategory == $categories->mid): ?> + + + + + count(); ?>
    +
    +
    + +
    +
    +
    +
    + + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-comments.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-comments.php" new file mode 100644 index 0000000..9dfeb46 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-comments.php" @@ -0,0 +1,373 @@ +get('__typecho_all_comments') || 'on' == Typecho_Cookie::get('__typecho_all_comments')); +?> +
    +
    + +
    +
    + + +
    +
    +
    + +
    + + + get('status')): ?> + + +
    +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + + + + + + + + + + + + + +
    + + +
    + type): ?> + gravatar(40); ?> + + type): ?> + + +
    +
    +
    + author(true); ?> + mail): ?> +
    mail(); ?> + + ip): ?> +
    ip(); ?> + +
    +
    +
    dateWord(); ?> 浜 title(); ?>
    +
    + content(); ?> +
    +
    + status): ?> + + + + + + status): ?> + + + + + + status): ?> + + + + + + + + status && 'comment' == $comments->type): ?> + + + + +
    +
    +
    + + cid)): ?> + + +
    + +
    +
    +
    + +
    + + + get('status')): ?> + + +
    +
    + have()): ?> +
      + pageNav(); ?> +
    + +
    +
    +
    +
    +
    +
    + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-medias.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-medias.php" new file mode 100644 index 0000000..1c08f79 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-medias.php" @@ -0,0 +1,122 @@ + + +to($attachments); ?> +
    +
    + +
    +
    + +
    +
    +
    + +
    + + + +
    +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + attachment->mime); ?> + + + + + + + + + + + + + + + +
    commentsNum(); ?> + + title(); ?> + + author(); ?> + parentPost->cid): ?> + parentPost->title(); ?> + + + + dateWord(); ?>
    +
    +
    + +
    +
    +
    + +
    + + +
    + +
    + have()): ?> +
      + pageNav(); ?> +
    + +
    +
    + +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-pages.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-pages.php" new file mode 100644 index 0000000..423770f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-pages.php" @@ -0,0 +1,131 @@ + +
    +
    + +
    +
    +
    +
    +
    + +
    + + +
    +
    + + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + to($pages); ?> + have()): ?> + next()): ?> + + + + + + + + + + + + + + + +
    commentsNum(); ?> + title(); ?> + hasSaved || 'page_draft' == $pages->type) { + echo '' . _t('鑽夌ǹ') . ''; + } else if ('hidden' == $pages->status) { + echo '' . _t('闅愯棌') . ''; + } + ?> + type): ?> + + + slug(); ?>author(); ?> + hasSaved): ?> + + modified); ?> + word()); ?> + + + dateWord(); ?> + +
    +
    +
    +
    +
    +
    +
    + + + +status) || 'publish' == $request->get('status')): ?> + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-posts.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-posts.php" new file mode 100644 index 0000000..c8f2f4a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-posts.php" @@ -0,0 +1,152 @@ + +
    +
    + +
    +
    +
    +
    +
    + +
    + + +
    +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + to($posts); ?> + have()): ?> + next()): ?> + + + + + + + + + + + + + + + +
    commentsNum(); ?> + title(); ?> + hasSaved || 'post_draft' == $posts->type) { + echo '' . _t('鑽夌ǹ') . ''; + } else if ('hidden' == $posts->status) { + echo '' . _t('闅愯棌') . ''; + } else if ('waiting' == $posts->status) { + echo '' . _t('寰呭鏍') . ''; + } else if ('private' == $posts->status) { + echo '' . _t('绉佸瘑') . ''; + } else if ($posts->password) { + echo '' . _t('瀵嗙爜淇濇姢') . ''; + } + ?> + type): ?> + + + author(); ?>categories; $length = count($categories); ?> + $val): ?> + adminUrl('manage-posts.php?category=' . $val['mid'] + . (isset($request->uid) ? '&uid=' . $request->uid : '') + . (isset($request->status) ? '&status=' . $request->status : '')); + echo '">' . $val['name'] . '' . ($key < $length - 1 ? ', ' : ''); ?> + + + hasSaved): ?> + + modified); ?> + word()); ?> + + + dateWord(); ?> + +
    +
    +
    + +
    +
    +
    + +
    + + +
    +
    + + have()): ?> +
      + pageNav(); ?> +
    + +
    +
    +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-tags.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-tags.php" new file mode 100644 index 0000000..b0f6ffd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-tags.php" @@ -0,0 +1,91 @@ +to($tags); +?> + +
    +
    + +
    + +
    + +
    +
    +
    + +
    + + +
    +
    +
    + +
      + have()): ?> + next()): ?> +
    • + + name(); ?> + +
    • + + +
      + +
    + +
    + +
    +
    + form()->render(); ?> +
    +
    +
    +
    + + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-users.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-users.php" new file mode 100644 index 0000000..5bfe7bf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/manage-users.php" @@ -0,0 +1,118 @@ + +
    +
    + +
    +
    +
    +
    +
    + +
    + + +
    +
    + +
    +
    + +
    +
    + + + + + + + + + + + + + + + + + + + + + to($users); ?> + next()): ?> + + + + + + + + + + +
    postsNum(); ?>name(); ?> + + screenName(); ?>mail): ?>mail(); ?>group) { + case 'administrator': + _e('绠$悊鍛'); + break; + case 'editor': + _e('缂栬緫'); + break; + case 'contributor': + _e('璐$尞鑰'); + break; + case 'subscriber': + _e('鍏虫敞鑰'); + break; + case 'visitor': + _e('璁块棶鑰'); + break; + default: + break; + } ?>
    +
    +
    + +
    +
    +
    + +
    + + +
    +
    + have()): ?> +
      + pageNav(); ?> +
    + +
    +
    +
    +
    +
    +
    + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/media.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/media.php" new file mode 100644 index 0000000..34b6de8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/media.php" @@ -0,0 +1,194 @@ +to($attachment); +?> + +
    +
    + +
    +
    + attachment->isImage): ?> +

    <?php $attachment->attachment->name(); ?>

    + + +

    + attachment->mime); ?> + + attachment->name(); ?> + attachment->size / 1024)); ?> Kb +

    + +

    + +

    + +
    +
    鎴栬 %s閫夋嫨鏂囦欢涓婁紶%s', '', ''); ?>
    +
      +
      +
      +
      + form()->render(); ?> +
      +
      +
      +
      + + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/menu.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/menu.php" new file mode 100644 index 0000000..88376da --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/menu.php" @@ -0,0 +1,15 @@ + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-discussion.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-discussion.php" new file mode 100644 index 0000000..5468985 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-discussion.php" @@ -0,0 +1,23 @@ + + +
      +
      + +
      +
      + form()->render(); ?> +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-general.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-general.php" new file mode 100644 index 0000000..062018a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-general.php" @@ -0,0 +1,23 @@ + + +
      +
      + +
      +
      + form()->render(); ?> +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-permalink.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-permalink.php" new file mode 100644 index 0000000..b715d6d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-permalink.php" @@ -0,0 +1,24 @@ + + +
      +
      + +
      +
      + form()->render(); ?> +
      +
      +
      +
      + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-plugin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-plugin.php" new file mode 100644 index 0000000..f74c249 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-plugin.php" @@ -0,0 +1,23 @@ + + +
      +
      + +
      +
      + config()->render(); ?> +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-reading.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-reading.php" new file mode 100644 index 0000000..6c871bd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-reading.php" @@ -0,0 +1,37 @@ + + +
      +
      + +
      +
      + form()->render(); ?> +
      +
      +
      +
      + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-theme.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-theme.php" new file mode 100644 index 0000000..d5fdb46 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/options-theme.php" @@ -0,0 +1,32 @@ + + +
      +
      + +
      +
      +
        +
      • + +
      • + +
      • +
      +
      +
      + config()->render(); ?> +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/page-title.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/page-title.php" new file mode 100644 index 0000000..af25b8d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/page-title.php" @@ -0,0 +1,8 @@ + +
      +

      title; ?>addLink)) { + echo "addLink}\">" . _t("鏂板") . ""; + } + ?>

      +
      diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/plugins.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/plugins.php" new file mode 100644 index 0000000..e77d203 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/plugins.php" @@ -0,0 +1,127 @@ + +
      +
      + +
      +
      + to($activatedPlugins); ?> + have() || !empty($activatedPlugins->activatedPlugins)): ?> +

      +
      + + + + + + + + + + + + + + + + + + + next()): ?> + + + + + + + + + + activatedPlugins)): ?> + activatedPlugins as $key => $val): ?> + + + + + + + + + +
      title(); ?> + dependence): ?> + <?php _e('%s 鏃犳硶鍦ㄦ鐗堟湰鐨則ypecho涓嬫甯稿伐浣', $activatedPlugins->title); ?> + + description(); ?>version(); ?>homepage) ? $activatedPlugins->author : '' . $activatedPlugins->author . ''; ?> + activate || $activatedPlugins->deactivate || $activatedPlugins->config || $activatedPlugins->personalConfig): ?> + config): ?> + + • + + + + + +
      +
      + + + to($deactivatedPlugins); ?> + have() || !$activatedPlugins->have()): ?> +

      +
      + + + + + + + + + + + + + + + + + + + have()): ?> + next()): ?> + + + + + + + + + + + + + + +
      title(); ?>description(); ?>version(); ?>homepage) ? $deactivatedPlugins->author : '' . $deactivatedPlugins->author . ''; ?> + +
      +
      + + +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/profile.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/profile.php" new file mode 100644 index 0000000..d65eb03 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/profile.php" @@ -0,0 +1,58 @@ + + +
      +
      + +
      +
      +

      mail, 220, 'X', 'mm', $request->isSecure()) . '" alt="' . $user->screenName . '" />'; ?>

      +

      screenName(); ?>

      +

      name(); ?>

      +

      %s 绡囨棩蹇, 骞舵湁 %s 鏉″叧浜庝綘鐨勮瘎璁哄湪 %s 涓垎绫讳腑.', + $stat->myPublishedPostsNum, $stat->myPublishedCommentsNum, $stat->categoriesNum); ?>

      +

      logged > 0) { + _e('鏈鍚庣櫥褰: %s', Typecho_I18n::dateWord($user->logged + $options->timezone, $options->gmtTime + $options->timezone)); + } + ?>

      +
      + +
      +
      +

      + profileForm()->render(); ?> +
      + + pass('contributor', true)): ?> +
      +
      +

      + optionsForm()->render(); ?> +
      + + +
      + +
      +

      + personalFormList(); ?> + passwordForm()->render(); ?> +
      +
      +
      +
      +
      + +bottom(); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/register.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/register.php" new file mode 100644 index 0000000..5c8a11c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/register.php" @@ -0,0 +1,50 @@ +hasLogin() || !$options->allowRegister) { + $response->redirect($options->siteUrl); +} +$rememberName = htmlspecialchars(Typecho_Cookie::get('__typecho_remember_name')); +$rememberMail = htmlspecialchars(Typecho_Cookie::get('__typecho_remember_mail')); +Typecho_Cookie::delete('__typecho_remember_name'); +Typecho_Cookie::delete('__typecho_remember_mail'); + +$bodyClass = 'body-100'; + +include 'header.php'; +?> + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/table-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/table-js.php" new file mode 100644 index 0000000..13ac1c3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/table-js.php" @@ -0,0 +1,18 @@ + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/theme-editor.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/theme-editor.php" new file mode 100644 index 0000000..a042d00 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/theme-editor.php" @@ -0,0 +1,62 @@ +to($files); +?> + +
      +
      + +
      + + +
      +
      +
      + + +

      + currentIsWriteable()): ?> + + + + + + +

      +
      +
      +
        +
      • 妯℃澘鏂囦欢
      • + next()): ?> + current): ?> class="current"> + file(); ?> + +
      +
      +
      +
      +
      + +bottom($files); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/themes.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/themes.php" new file mode 100644 index 0000000..a2d0a00 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/themes.php" @@ -0,0 +1,69 @@ + + +
      +
      + +
      +
      +
        +
      • + +
      • + + +
      • + +
      + +
      + + + + + + + + + + + + + to($themes); ?> + next()): ?> + + + + + + +
      鎴浘璇︽儏
      <?php $themes->name(); ?> +

      title ? $themes->title() : $themes->name(); ?>

      + + author): ?>: homepage): ?>author(); ?>homepage): ?>    + version): ?>: version() ?> + +

      description); ?>

      + theme != $themes->name): ?> +

      + +   + + +

      + +
      +
      +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/upgrade.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/upgrade.php" new file mode 100644 index 0000000..718d47a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/upgrade.php" @@ -0,0 +1,41 @@ + + +
      +
      + +
      +
      +
      +
      +

      +
        +
      • +
      • %s 鍗囩骇鍒 %s', $options->version, Typecho_Common::VERSION); ?>
      • +
      • +
      +

      + +
      +
      +
      +
      +
      + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/user.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/user.php" new file mode 100644 index 0000000..f6cb957 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/user.php" @@ -0,0 +1,23 @@ + + +
      +
      + +
      +
      + form()->render(); ?> +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/welcome.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/welcome.php" new file mode 100644 index 0000000..6c26136 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/welcome.php" @@ -0,0 +1,36 @@ + + +
      +
      + +
      +
      +
      +
      +

      title); ?>

      +
        +
      1. + pass('contributor', true)): ?> +
      2. +
      3. + +
      4. + +
      +

      +
      +
      +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-js.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-js.php" new file mode 100644 index 0000000..958635f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-js.php" @@ -0,0 +1,260 @@ + +write(); ?> +to($tags); ?> + + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-page.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-page.php" new file mode 100644 index 0000000..2b50bf2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-page.php" @@ -0,0 +1,151 @@ +to($page); +?> +
      +
      + +
      +
      +
      + draft && $page->draft['cid'] != $page->cid): ?> + draft['modified']); ?> + 鍒犻櫎瀹', $pageModifyDate->word(), + $security->getIndex('/action/contents-page-edit?do=deleteDraft&cid=' . $page->cid)); ?> + + +

      + + +

      + routingTable['page']['url'], $options->index); + list ($scheme, $permalink) = explode(':', $permalink, 2); + $permalink = ltrim($permalink, '/'); + $permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink); + if ($page->have()) { + $permalink = str_replace('{cid}', $page->cid, $permalink); + } + $input = ''; + ?> +

      + + +

      +

      + + +

      + + +

      + + + + + markdown && (!$page->have() || $page->isMarkdown)): ?> + + + +

      + + content($page); ?> +
      + +
      +
      +
      +
      + +trigger($plugged)->richEditor($page); +if (!$plugged) { + include 'editor-js.php'; +} + +include 'file-upload-js.php'; +include 'custom-fields-js.php'; +Typecho_Plugin::factory('admin/write-page.php')->bottom($page); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-post.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-post.php" new file mode 100644 index 0000000..d8ad69f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/admin/write-post.php" @@ -0,0 +1,180 @@ +to($post); +?> +
      +
      + +
      +
      +
      + draft && $post->draft['cid'] != $post->cid): ?> + draft['modified']); ?> + 鍒犻櫎瀹', $postModifyDate->word(), + $security->getIndex('/action/contents-post-edit?do=deleteDraft&cid=' . $post->cid)); ?> + + +

      + + +

      + routingTable['post']['url'], $options->index); + list ($scheme, $permalink) = explode(':', $permalink, 2); + $permalink = ltrim($permalink, '/'); + $permalink = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $permalink); + if ($post->have()) { + $permalink = str_replace(array( + '{cid}', '{category}', '{year}', '{month}', '{day}' + ), array( + $post->cid, $post->category, $post->year, $post->month, $post->day + ), $permalink); + } + $input = ''; + ?> +

      + + +

      +

      + + +

      + + + +

      + + + + + markdown && (!$post->have() || $post->isMarkdown)): ?> + + + +

      + + content($post); ?> +
      + + +
      +
      +
      +
      + +trigger($plugged)->richEditor($post); +if (!$plugged) { + include 'editor-js.php'; +} + +include 'file-upload-js.php'; +include 'custom-fields-js.php'; +Typecho_Plugin::factory('admin/write-post.php')->bottom($post); +include 'footer.php'; +?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/config.inc.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/config.inc.php" new file mode 100644 index 0000000..a719edb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/config.inc.php" @@ -0,0 +1,64 @@ +addServer(array ( + 'host' => 'localhost', + 'user' => 'mcblog', + 'password' => 'mcblog123***', + 'charset' => 'utf8', + 'port' => '3306', + 'database' => 'mcblog', +), Typecho_Db::READ | Typecho_Db::WRITE); +Typecho_Db::set($db); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/index.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/index.php" new file mode 100644 index 0000000..79efa8b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/index.php" @@ -0,0 +1,26 @@ +begin(); + +/** 寮濮嬭矾鐢卞垎鍙 */ +Typecho_Router::dispatch(); + +/** 娉ㄥ唽涓涓粨鏉熸彃浠 */ +Typecho_Plugin::factory('index.php')->end(); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install.php" new file mode 100644 index 0000000..ce361a3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install.php" @@ -0,0 +1,666 @@ +generator = 'Typecho ' . Typecho_Common::VERSION; +list($soft, $currentVersion) = explode(' ', $options->generator); + +$options->software = $soft; +$options->version = $currentVersion; + +list($prefixVersion, $suffixVersion) = explode('/', $currentVersion); + +/** 鑾峰彇璇█ */ +$lang = _r('lang', Typecho_Cookie::get('__typecho_lang')); +$langs = Widget_Options_General::getLangs(); + +if (empty($lang) && count($langs) > 1) { + foreach ($langs as $lang) { + if ('zh_CN' != $lang) { + break; + } + } +} + +if (empty($lang)) { + $lang = 'zh_CN'; +} + +if ('zh_CN' != $lang) { + $dir = defined('__TYPECHO_LANG_DIR__') ? __TYPECHO_LANG_DIR__ : __TYPECHO_ROOT_DIR__ . '/usr/langs'; + Typecho_I18n::setLang($dir . '/' . $lang . '.mo'); +} + +Typecho_Cookie::set('__typecho_lang', $lang); + +?> + + + + <?php _e('Typecho 瀹夎绋嬪簭'); ?> + + + + + +
      +

      Typecho

      +
        + class="current">1 + class="current">2 + class="current">3 + class="current">4 +
      +
      +
      +
      +
      +
      + + +

      +
      +
      +

      +
      +
      + +

      +
      +
      +

      +
      +
      + + addServer($config, Typecho_Db::READ | Typecho_Db::WRITE); + Typecho_Db::set($db); + ?> +

      +
      +
      + + + + + :
      + : + + +
      + + + +
      +

      :

      +
        + getTokenUrl($loginUrl); + } else { + $loginUrl = _u() . '/admin/index.php'; + } + ?> +
      • +
      • +
      +
      + +

      +
      + + + +

      +
      +
      +

      +
      +
      + + addServer($config, Typecho_Db::READ | Typecho_Db::WRITE); + + /** 鍒濆鍖栨暟鎹簱缁撴瀯 */ + $scripts = file_get_contents ('./install/' . $type . '.sql'); + $scripts = str_replace('typecho_', $config['prefix'], $scripts); + + if (isset($config['charset'])) { + $scripts = str_replace('%charset%', $config['charset'], $scripts); + } + + $scripts = explode(';', $scripts); + foreach ($scripts as $script) { + $script = trim($script); + if ($script) { + $installDb->query($script, Typecho_Db::WRITE); + } + } + + /** 鍏ㄥ眬鍙橀噺 */ + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'theme', 'user' => 0, 'value' => 'default'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'theme:default', 'user' => 0, 'value' => 'a:2:{s:7:"logoUrl";N;s:12:"sidebarBlock";a:5:{i:0;s:15:"ShowRecentPosts";i:1;s:18:"ShowRecentComments";i:2;s:12:"ShowCategory";i:3;s:11:"ShowArchive";i:4;s:9:"ShowOther";}}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'timezone', 'user' => 0, 'value' => _t('28800')))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'lang', 'user' => 0, 'value' => $lang))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'charset', 'user' => 0, 'value' => _t('UTF-8')))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'contentType', 'user' => 0, 'value' => 'text/html'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'gzip', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'generator', 'user' => 0, 'value' => $options->generator))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'title', 'user' => 0, 'value' => 'Hello World'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'description', 'user' => 0, 'value' => 'Just So So ...'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'keywords', 'user' => 0, 'value' => 'typecho,php,blog'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'rewrite', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'frontPage', 'user' => 0, 'value' => 'recent'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'frontArchive', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsRequireMail', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsWhitelist', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsRequireURL', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsRequireModeration', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'plugins', 'user' => 0, 'value' => 'a:0:{}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentDateFormat', 'user' => 0, 'value' => 'F jS, Y \a\t h:i a'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'siteUrl', 'user' => 0, 'value' => $config['siteUrl']))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultCategory', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'allowRegister', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultAllowComment', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultAllowPing', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'defaultAllowFeed', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'pageSize', 'user' => 0, 'value' => 5))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'postsListSize', 'user' => 0, 'value' => 10))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsListSize', 'user' => 0, 'value' => 10))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsHTMLTagAllowed', 'user' => 0, 'value' => NULL))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'postDateFormat', 'user' => 0, 'value' => 'Y-m-d'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'feedFullText', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'editorSize', 'user' => 0, 'value' => 350))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'autoSave', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'markdown', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsMaxNestingLevels', 'user' => 0, 'value' => 5))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPostTimeout', 'user' => 0, 'value' => 24 * 3600 * 30))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsUrlNofollow', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsShowUrl', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsMarkdown', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPageBreak', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsThreaded', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPageSize', 'user' => 0, 'value' => 20))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPageDisplay', 'user' => 0, 'value' => 'last'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsOrder', 'user' => 0, 'value' => 'ASC'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsCheckReferer', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAutoClose', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPostIntervalEnable', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsPostInterval', 'user' => 0, 'value' => 60))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsShowCommentOnly', 'user' => 0, 'value' => 0))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAvatar', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAvatarRating', 'user' => 0, 'value' => 'G'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'commentsAntiSpam', 'user' => 0, 'value' => 1))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'routingTable', 'user' => 0, 'value' => 'a:25:{s:5:"index";a:3:{s:3:"url";s:1:"/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:7:"archive";a:3:{s:3:"url";s:6:"/blog/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:2:"do";a:3:{s:3:"url";s:22:"/action/[action:alpha]";s:6:"widget";s:9:"Widget_Do";s:6:"action";s:6:"action";}s:4:"post";a:3:{s:3:"url";s:24:"/archives/[cid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:10:"attachment";a:3:{s:3:"url";s:26:"/attachment/[cid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:8:"category";a:3:{s:3:"url";s:17:"/category/[slug]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:3:"tag";a:3:{s:3:"url";s:12:"/tag/[slug]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:6:"author";a:3:{s:3:"url";s:22:"/author/[uid:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:6:"search";a:3:{s:3:"url";s:19:"/search/[keywords]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:10:"index_page";a:3:{s:3:"url";s:21:"/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"archive_page";a:3:{s:3:"url";s:26:"/blog/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:13:"category_page";a:3:{s:3:"url";s:32:"/category/[slug]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:8:"tag_page";a:3:{s:3:"url";s:27:"/tag/[slug]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"author_page";a:3:{s:3:"url";s:37:"/author/[uid:digital]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"search_page";a:3:{s:3:"url";s:34:"/search/[keywords]/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"archive_year";a:3:{s:3:"url";s:18:"/[year:digital:4]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:13:"archive_month";a:3:{s:3:"url";s:36:"/[year:digital:4]/[month:digital:2]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:11:"archive_day";a:3:{s:3:"url";s:52:"/[year:digital:4]/[month:digital:2]/[day:digital:2]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:17:"archive_year_page";a:3:{s:3:"url";s:38:"/[year:digital:4]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:18:"archive_month_page";a:3:{s:3:"url";s:56:"/[year:digital:4]/[month:digital:2]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:16:"archive_day_page";a:3:{s:3:"url";s:72:"/[year:digital:4]/[month:digital:2]/[day:digital:2]/page/[page:digital]/";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:12:"comment_page";a:3:{s:3:"url";s:53:"[permalink:string]/comment-page-[commentPage:digital]";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}s:4:"feed";a:3:{s:3:"url";s:20:"/feed[feed:string:0]";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:4:"feed";}s:8:"feedback";a:3:{s:3:"url";s:31:"[permalink:string]/[type:alpha]";s:6:"widget";s:15:"Widget_Feedback";s:6:"action";s:6:"action";}s:4:"page";a:3:{s:3:"url";s:12:"/[slug].html";s:6:"widget";s:14:"Widget_Archive";s:6:"action";s:6:"render";}}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'actionTable', 'user' => 0, 'value' => 'a:0:{}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'panelTable', 'user' => 0, 'value' => 'a:0:{}'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'attachmentTypes', 'user' => 0, 'value' => '@image@'))); + $installDb->query($installDb->insert('table.options')->rows(array('name' => 'secret', 'user' => 0, 'value' => Typecho_Common::randString(32, true)))); + + /** 鍒濆鍒嗙被 */ + $installDb->query($installDb->insert('table.metas')->rows(array('name' => _t('榛樿鍒嗙被'), 'slug' => 'default', 'type' => 'category', 'description' => _t('鍙槸涓涓粯璁ゅ垎绫'), + 'count' => 1, 'order' => 1))); + + /** 鍒濆鍏崇郴 */ + $installDb->query($installDb->insert('table.relationships')->rows(array('cid' => 1, 'mid' => 1))); + + /** 鍒濆鍐呭 */ + $installDb->query($installDb->insert('table.contents')->rows(array('title' => _t('娆㈣繋浣跨敤 Typecho'), 'slug' => 'start', 'created' => Typecho_Date::gmtTime(), 'modified' => Typecho_Date::gmtTime(), + 'text' => '' . _t('濡傛灉鎮ㄧ湅鍒拌繖绡囨枃绔,琛ㄧず鎮ㄧ殑 blog 宸茬粡瀹夎鎴愬姛.'), 'authorId' => 1, 'type' => 'post', 'status' => 'publish', 'commentsNum' => 1, 'allowComment' => 1, + 'allowPing' => 1, 'allowFeed' => 1, 'parent' => 0))); + + $installDb->query($installDb->insert('table.contents')->rows(array('title' => _t('鍏充簬'), 'slug' => 'start-page', 'created' => Typecho_Date::gmtTime(), 'modified' => Typecho_Date::gmtTime(), + 'text' => '' . _t('鏈〉闈㈢敱 Typecho 鍒涘缓, 杩欏彧鏄釜娴嬭瘯椤甸潰.'), 'authorId' => 1, 'order' => 0, 'type' => 'page', 'status' => 'publish', 'commentsNum' => 0, 'allowComment' => 1, + 'allowPing' => 1, 'allowFeed' => 1, 'parent' => 0))); + + /** 鍒濆璇勮 */ + $installDb->query($installDb->insert('table.comments')->rows(array('cid' => 1, 'created' => Typecho_Date::gmtTime(), 'author' => 'Typecho', 'ownerId' => 1, 'url' => 'http://typecho.org', + 'ip' => '127.0.0.1', 'agent' => $options->generator, 'text' => '娆㈣繋鍔犲叆 Typecho 澶у鏃', 'type' => 'comment', 'status' => 'approved', 'parent' => 0))); + + /** 鍒濆鐢ㄦ埛 */ + $password = empty($config['userPassword']) ? substr(uniqid(), 7) : $config['userPassword']; + $hasher = new PasswordHash(8, true); + + $installDb->query($installDb->insert('table.users')->rows(array('name' => $config['userName'], 'password' => $hasher->HashPassword($password), 'mail' => $config['userMail'], + 'url' => 'http://www.typecho.org', 'screenName' => $config['userName'], 'group' => 'administrator', 'created' => Typecho_Date::gmtTime()))); + + unset($_SESSION['typecho']); + header('Location: ./install.php?finish&user=' . urlencode($config['userName']) + . '&password=' . urlencode($password)); + } catch (Typecho_Db_Exception $e) { + $success = false; + $code = $e->getCode(); +?> +

      +
      +
      +query("DROP TABLE IF EXISTS `{$table}`"); + } elseif($type == 'Pgsql') { + $installDb->query("DROP TABLE {$table}"); + } elseif($type == 'SQLite') { + $installDb->query("DROP TABLE {$table}"); + } + } + echo '

      ' . _t('宸茬粡鍒犻櫎瀹屽師鏈夋暟鎹') . '

      '; + } elseif (_r('goahead')) { + //浣跨敤鍘熸湁鏁版嵁 + //浣嗘槸瑕佹洿鏂扮敤鎴风綉绔 + $installDb->query($installDb->update('table.options')->rows(array('value' => $config['siteUrl']))->where('name = ?', 'siteUrl')); + unset($_SESSION['typecho']); + header('Location: ./install.php?finish&use_old'); + exit; + } else { + echo '

      ' . _t('瀹夎绋嬪簭妫鏌ュ埌鍘熸湁鏁版嵁琛ㄥ凡缁忓瓨鍦.') + . '

      ' . ' ' + . _t('鎴栬') . '

      '; + } + } else { + echo '

      ' . _t('瀹夎绋嬪簭鎹曟崏鍒颁互涓嬮敊璇: "%s". 绋嬪簭琚粓姝, 璇锋鏌ユ偍鐨勯厤缃俊鎭.',$e->getMessage()) . '

      '; + } + ?> +
      +
      + + + + +
      +

      +
      +

      + ' . _t('娌℃湁妫娴嬪埌鎮ㄦ墜鍔ㄥ垱寤虹殑閰嶇疆鏂囦欢, 璇锋鏌ュ悗鍐嶆鍒涘缓') . '

      '; + $success = false; + } else { + if (NULL == _r('userUrl')) { + $success = false; + echo '

      ' . _t('璇峰~鍐欐偍鐨勭綉绔欏湴鍧') . '

      '; + } else if (NULL == _r('userName')) { + $success = false; + echo '

      ' . _t('璇峰~鍐欐偍鐨勭敤鎴峰悕') . '

      '; + } else if (NULL == _r('userMail')) { + $success = false; + echo '

      ' . _t('璇峰~鍐欐偍鐨勯偖绠卞湴鍧') . '

      '; + } else if (32 < strlen(_r('userName'))) { + $success = false; + echo '

      ' . _t('鐢ㄦ埛鍚嶉暱搴﹁秴杩囬檺鍒, 璇蜂笉瑕佽秴杩 32 涓瓧绗') . '

      '; + } else if (200 < strlen(_r('userMail'))) { + $success = false; + echo '

      ' . _t('閭闀垮害瓒呰繃闄愬埗, 璇蜂笉瑕佽秴杩 200 涓瓧绗') . '

      '; + } + } + + $_dbConfig = _rFrom('dbHost', 'dbUser', 'dbPassword', 'dbCharset', 'dbPort', 'dbDatabase', 'dbFile', 'dbDsn'); + + $_dbConfig = array_filter($_dbConfig); + $dbConfig = array(); + foreach ($_dbConfig as $key => $val) { + $dbConfig[strtolower (substr($key, 2))] = $val; + } + + // 鍦ㄧ壒娈婃湇鍔″櫒涓婄殑鐗规畩瀹夎杩囩▼澶勭悊 + if (_r('config')) { + $replace = array_keys($dbConfig); + foreach ($replace as &$key) { + $key = '{' . $key . '}'; + } + + if (!empty($_dbConfig['dbDsn'])) { + $dbConfig['dsn'] = str_replace($replace, array_values($dbConfig), $dbConfig['dsn']); + } + $config = str_replace($replace, array_values($dbConfig), _r('config')); + } + + if (!isset($config) && $success && !_r('created')) { + $installDb = new Typecho_Db($adapter, _r('dbPrefix')); + $installDb->addServer($dbConfig, Typecho_Db::READ | Typecho_Db::WRITE); + + + /** 妫娴嬫暟鎹簱閰嶇疆 */ + try { + $installDb->query('SELECT 1=1'); + } catch (Typecho_Db_Adapter_Exception $e) { + $success = false; + echo '

      ' + . _t('瀵逛笉璧凤紝鏃犳硶杩炴帴鏁版嵁搴擄紝璇峰厛妫鏌ユ暟鎹簱閰嶇疆鍐嶇户缁繘琛屽畨瑁') . '

      '; + } catch (Typecho_Db_Exception $e) { + $success = false; + echo '

      ' + . _t('瀹夎绋嬪簭鎹曟崏鍒颁互涓嬮敊璇: " %s ". 绋嬪簭琚粓姝, 璇锋鏌ユ偍鐨勯厤缃俊鎭.',$e->getMessage()) . '

      '; + } + } + + if($success) { + Typecho_Cookie::set('__typecho_config', base64_encode(serialize(array_merge(array( + 'prefix' => _r('dbPrefix'), + 'userName' => _r('userName'), + 'userPassword' => _r('userPassword'), + 'userMail' => _r('userMail'), + 'adapter' => $adapter, + 'siteUrl' => _r('userUrl') + ), $dbConfig)))); + + if (_r('created')) { + header('Location: ./install.php?start'); + exit; + } + + /** 鍒濆鍖栭厤缃枃浠 */ + $lines = array_slice(file(__FILE__), 0, 52); + $lines[] = " +/** 瀹氫箟鏁版嵁搴撳弬鏁 */ +\$db = new Typecho_Db('{$adapter}', '" . _r('dbPrefix') . "'); +\$db->addServer(" . (empty($config) ? var_export($dbConfig, true) : $config) . ", Typecho_Db::READ | Typecho_Db::WRITE); +Typecho_Db::set(\$db); +"; + $contents = implode('', $lines); + if (!Typecho_Common::isAppEngine()) { + @file_put_contents('./config.inc.php', $contents); + } + + // 鍒涘缓涓涓敤浜庢爣璇嗙殑涓存椂鏂囦欢 + $_SESSION['typecho'] = 1; + + if (!file_exists('./config.inc.php')) { + ?> +

      config.inc.php 鏂囦欢'); ?>
      +config.inc.php
      鏂囦欢, 骞跺鍒跺涓嬩唬鐮佽嚦鍏朵腑'); ?>

      +

      +

      + +
        +
      • + + +

        +
      • + +
      • + + +

        +
      • +
      + + + +

      +
        +
      • + + +

        +
      • +
      • + + +

        +
      • +
      • + + +

        +
      • +
      • + + +

        +
      • +
      +
      + +

      +
      + +
      +

      +
      +

      +

      +

      +

      GPL 鍗忚鍙戝竷, 鎴戜滑鍏佽鐢ㄦ埛鍦 GPL 鍗忚璁稿彲鐨勮寖鍥村唴浣跨敤, 鎷疯礉, 淇敼鍜屽垎鍙戞绋嬪簭.'); ?> +

      +

      + +

      +
      +

      + + + 1): ?> + + +

      +
      + + +
      +
      +
      +
      + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.php" new file mode 100644 index 0000000..dac6899 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.php" @@ -0,0 +1,175 @@ + + + + + +

      + + + + + + + + + + + + + +
    • + + +
    • + + + + + +
    • + + +
    • + + + + +
    • + + +

      +
    • + + + + + + +
    • + + +

      +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • +
    • + + +
    • + + + +

      + +
    • + + +

      /cloudsql/typecho-gae:typecho'); ?>

      +
    • + +
    • + + +

      :/cloudsql/typecho-gae:typecho'); ?>

      +
    • + + +
    • + + +
    • +
    • + + +
    • +
    • + + +

      +
    • + + + + + + + + + + +
    • + + +

      +
    • +
    • + + +

      +
    • +
    • + + +

      +
    • +
    • + + +
    • +
    • + + +

      +
    • + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.sql" new file mode 100644 index 0000000..78f2ad6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Mysql.sql" @@ -0,0 +1,152 @@ +-- phpMyAdmin SQL Dump +-- version 2.11.5 +-- http://www.phpmyadmin.net +-- +-- 涓绘満: localhost +-- 鐢熸垚鏃ユ湡: 2008 骞 07 鏈 06 鏃 18:00 +-- 鏈嶅姟鍣ㄧ増鏈: 5.0.51 +-- PHP 鐗堟湰: 5.2.5 + +-- +-- 鏁版嵁搴: `typecho` +-- + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_comments` +-- + +CREATE TABLE `typecho_comments` ( + `coid` int(10) unsigned NOT NULL auto_increment, + `cid` int(10) unsigned default '0', + `created` int(10) unsigned default '0', + `author` varchar(200) default NULL, + `authorId` int(10) unsigned default '0', + `ownerId` int(10) unsigned default '0', + `mail` varchar(200) default NULL, + `url` varchar(200) default NULL, + `ip` varchar(64) default NULL, + `agent` varchar(200) default NULL, + `text` text, + `type` varchar(16) default 'comment', + `status` varchar(16) default 'approved', + `parent` int(10) unsigned default '0', + PRIMARY KEY (`coid`), + KEY `cid` (`cid`), + KEY `created` (`created`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_contents` +-- + +CREATE TABLE `typecho_contents` ( + `cid` int(10) unsigned NOT NULL auto_increment, + `title` varchar(200) default NULL, + `slug` varchar(200) default NULL, + `created` int(10) unsigned default '0', + `modified` int(10) unsigned default '0', + `text` text, + `order` int(10) unsigned default '0', + `authorId` int(10) unsigned default '0', + `template` varchar(32) default NULL, + `type` varchar(16) default 'post', + `status` varchar(16) default 'publish', + `password` varchar(32) default NULL, + `commentsNum` int(10) unsigned default '0', + `allowComment` char(1) default '0', + `allowPing` char(1) default '0', + `allowFeed` char(1) default '0', + `parent` int(10) unsigned default '0', + PRIMARY KEY (`cid`), + UNIQUE KEY `slug` (`slug`), + KEY `created` (`created`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_fields` +-- + +CREATE TABLE `typecho_fields` ( + `cid` int(10) unsigned NOT NULL, + `name` varchar(200) NOT NULL, + `type` varchar(8) default 'str', + `str_value` text, + `int_value` int(10) default '0', + `float_value` float default '0', + PRIMARY KEY (`cid`,`name`), + KEY `int_value` (`int_value`), + KEY `float_value` (`float_value`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_metas` +-- + +CREATE TABLE `typecho_metas` ( + `mid` int(10) unsigned NOT NULL auto_increment, + `name` varchar(200) default NULL, + `slug` varchar(200) default NULL, + `type` varchar(32) NOT NULL, + `description` varchar(200) default NULL, + `count` int(10) unsigned default '0', + `order` int(10) unsigned default '0', + `parent` int(10) unsigned default '0', + PRIMARY KEY (`mid`), + KEY `slug` (`slug`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_options` +-- + +CREATE TABLE `typecho_options` ( + `name` varchar(32) NOT NULL, + `user` int(10) unsigned NOT NULL default '0', + `value` text, + PRIMARY KEY (`name`,`user`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_relationships` +-- + +CREATE TABLE `typecho_relationships` ( + `cid` int(10) unsigned NOT NULL, + `mid` int(10) unsigned NOT NULL, + PRIMARY KEY (`cid`,`mid`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; + +-- -------------------------------------------------------- + +-- +-- 琛ㄧ殑缁撴瀯 `typecho_users` +-- + +CREATE TABLE `typecho_users` ( + `uid` int(10) unsigned NOT NULL auto_increment, + `name` varchar(32) default NULL, + `password` varchar(64) default NULL, + `mail` varchar(200) default NULL, + `url` varchar(200) default NULL, + `screenName` varchar(32) default NULL, + `created` int(10) unsigned default '0', + `activated` int(10) unsigned default '0', + `logged` int(10) unsigned default '0', + `group` varchar(16) default 'visitor', + `authCode` varchar(64) default NULL, + PRIMARY KEY (`uid`), + UNIQUE KEY `name` (`name`), + UNIQUE KEY `mail` (`mail`) +) ENGINE=MyISAM DEFAULT CHARSET=%charset%; diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.php" new file mode 100644 index 0000000..b6fc203 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.php" @@ -0,0 +1,26 @@ + +
    • + + +

      +
    • +
    • + + +

      +
    • +
    • + + +

      +
    • +
    • + + +
    • +
    • + + +

      +
    • + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.sql" new file mode 100644 index 0000000..d612bd6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/Pgsql.sql" @@ -0,0 +1,130 @@ +-- +-- Table structure for table "typecho_comments" +-- +CREATE SEQUENCE "typecho_comments_seq"; + +CREATE TABLE "typecho_comments" ( "coid" INT NOT NULL DEFAULT nextval('typecho_comments_seq'), + "cid" INT NULL DEFAULT '0', + "created" INT NULL DEFAULT '0', + "author" VARCHAR(200) NULL DEFAULT NULL, + "authorId" INT NULL DEFAULT '0', + "ownerId" INT NULL DEFAULT '0', + "mail" VARCHAR(200) NULL DEFAULT NULL, + "url" VARCHAR(200) NULL DEFAULT NULL, + "ip" VARCHAR(64) NULL DEFAULT NULL, + "agent" VARCHAR(200) NULL DEFAULT NULL, + "text" TEXT NULL DEFAULT NULL, + "type" VARCHAR(16) NULL DEFAULT 'comment', + "status" VARCHAR(16) NULL DEFAULT 'approved', + "parent" INT NULL DEFAULT '0', + PRIMARY KEY ("coid") +); + +CREATE INDEX "typecho_comments_cid" ON "typecho_comments" ("cid"); +CREATE INDEX "typecho_comments_created" ON "typecho_comments" ("created"); + + +-- +-- Table structure for table "typecho_contents" +-- + +CREATE SEQUENCE "typecho_contents_seq"; + +CREATE TABLE "typecho_contents" ( "cid" INT NOT NULL DEFAULT nextval('typecho_contents_seq'), + "title" VARCHAR(200) NULL DEFAULT NULL, + "slug" VARCHAR(200) NULL DEFAULT NULL, + "created" INT NULL DEFAULT '0', + "modified" INT NULL DEFAULT '0', + "text" TEXT NULL DEFAULT NULL, + "order" INT NULL DEFAULT '0', + "authorId" INT NULL DEFAULT '0', + "template" VARCHAR(32) NULL DEFAULT NULL, + "type" VARCHAR(16) NULL DEFAULT 'post', + "status" VARCHAR(16) NULL DEFAULT 'publish', + "password" VARCHAR(32) NULL DEFAULT NULL, + "commentsNum" INT NULL DEFAULT '0', + "allowComment" CHAR(1) NULL DEFAULT '0', + "allowPing" CHAR(1) NULL DEFAULT '0', + "allowFeed" CHAR(1) NULL DEFAULT '0', + "parent" INT NULL DEFAULT '0', + PRIMARY KEY ("cid"), + UNIQUE ("slug") +); + +CREATE INDEX "typecho_contents_created" ON "typecho_contents" ("created"); + +-- +-- Table structure for table "typecho_fields" +-- + +CREATE TABLE "typecho_fields" ("cid" INT NOT NULL, + "name" VARCHAR(200) NOT NULL, + "type" VARCHAR(8) NULL DEFAULT 'str', + "str_value" TEXT NULL DEFAULT NULL, + "int_value" INT NULL DEFAULT '0', + "float_value" REAL NULL DEFAULT '0', + PRIMARY KEY ("cid","name") +); + +CREATE INDEX "typecho_fields_int_value" ON "typecho_fields" ("int_value"); +CREATE INDEX "typecho_fields_float_value" ON "typecho_fields" ("float_value"); + +-- +-- Table structure for table "typecho_metas" +-- + +CREATE SEQUENCE "typecho_metas_seq"; + +CREATE TABLE "typecho_metas" ( "mid" INT NOT NULL DEFAULT nextval('typecho_metas_seq'), + "name" VARCHAR(200) NULL DEFAULT NULL, + "slug" VARCHAR(200) NULL DEFAULT NULL, + "type" VARCHAR(16) NOT NULL DEFAULT '', + "description" VARCHAR(200) NULL DEFAULT NULL, + "count" INT NULL DEFAULT '0', + "order" INT NULL DEFAULT '0', + "parent" INT NULL DEFAULT '0', + PRIMARY KEY ("mid") +); + +CREATE INDEX "typecho_metas_slug" ON "typecho_metas" ("slug"); + + +-- +-- Table structure for table "typecho_options" +-- + +CREATE TABLE "typecho_options" ( "name" VARCHAR(32) NOT NULL DEFAULT '', + "user" INT NOT NULL DEFAULT '0', + "value" TEXT NULL DEFAULT NULL, + PRIMARY KEY ("name","user") +); + +-- +-- Table structure for table "typecho_relationships" +-- + +CREATE TABLE "typecho_relationships" ( "cid" INT NOT NULL DEFAULT '0', + "mid" INT NOT NULL DEFAULT '0', + PRIMARY KEY ("cid","mid") +); + +-- +-- Table structure for table "typecho_users" +-- +CREATE SEQUENCE "typecho_users_seq"; + +CREATE TABLE "typecho_users" ( "uid" INT NOT NULL DEFAULT nextval('typecho_users_seq') , + "name" VARCHAR(32) NULL DEFAULT NULL, + "password" VARCHAR(64) NULL DEFAULT NULL, + "mail" VARCHAR(200) NULL DEFAULT NULL, + "url" VARCHAR(200) NULL DEFAULT NULL, + "screenName" VARCHAR(32) NULL DEFAULT NULL, + "created" INT NULL DEFAULT '0', + "activated" INT NULL DEFAULT '0', + "logged" INT NULL DEFAULT '0', + "group" VARCHAR(16) NULL DEFAULT 'visitor', + "authCode" VARCHAR(64) NULL DEFAULT NULL, + PRIMARY KEY ("uid"), + UNIQUE ("name"), + UNIQUE ("mail") +); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.php" new file mode 100644 index 0000000..ec0fa66 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.php" @@ -0,0 +1,7 @@ + + +
    • + + +

      +
    • diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.sql" new file mode 100644 index 0000000..80d53d6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/install/SQLite.sql" @@ -0,0 +1,87 @@ +CREATE TABLE typecho_comments ( "coid" INTEGER NOT NULL PRIMARY KEY, +"cid" int(10) default '0' , +"created" int(10) default '0' , +"author" varchar(200) default NULL , +"authorId" int(10) default '0' , +"ownerId" int(10) default '0' , +"mail" varchar(200) default NULL , +"url" varchar(200) default NULL , +"ip" varchar(64) default NULL , +"agent" varchar(200) default NULL , +"text" text , +"type" varchar(16) default 'comment' , +"status" varchar(16) default 'approved' , +"parent" int(10) default '0' ); + +CREATE INDEX typecho_comments_cid ON typecho_comments ("cid"); +CREATE INDEX typecho_comments_created ON typecho_comments ("created"); + +CREATE TABLE typecho_contents ( "cid" INTEGER NOT NULL PRIMARY KEY, +"title" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"created" int(10) default '0' , +"modified" int(10) default '0' , +"text" text , +"order" int(10) default '0' , +"authorId" int(10) default '0' , +"template" varchar(32) default NULL , +"type" varchar(16) default 'post' , +"status" varchar(16) default 'publish' , +"password" varchar(32) default NULL , +"commentsNum" int(10) default '0' , +"allowComment" char(1) default '0' , +"allowPing" char(1) default '0' , +"allowFeed" char(1) default '0' , +"parent" int(10) default '0' ); + +CREATE UNIQUE INDEX typecho_contents_slug ON typecho_contents ("slug"); +CREATE INDEX typecho_contents_created ON typecho_contents ("created"); + +CREATE TABLE "typecho_fields" ("cid" INTEGER NOT NULL, + "name" varchar(200) NOT NULL, + "type" varchar(8) default 'str', + "str_value" text, + "int_value" int(10) default '0', + "float_value" real default '0' +); + +CREATE UNIQUE INDEX typecho_fields_cid_name ON typecho_fields ("cid", "name"); +CREATE INDEX typecho_fields_int_value ON typecho_fields ("int_value"); +CREATE INDEX typecho_fields_float_value ON typecho_fields ("float_value"); + +CREATE TABLE typecho_metas ( "mid" INTEGER NOT NULL PRIMARY KEY, +"name" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"type" varchar(32) NOT NULL , +"description" varchar(200) default NULL , +"count" int(10) default '0' , +"order" int(10) default '0' , +"parent" int(10) default '0'); + +CREATE INDEX typecho_metas_slug ON typecho_metas ("slug"); + +CREATE TABLE typecho_options ( "name" varchar(32) NOT NULL , +"user" int(10) NOT NULL default '0' , +"value" text ); + +CREATE UNIQUE INDEX typecho_options_name_user ON typecho_options ("name", "user"); + +CREATE TABLE typecho_relationships ( "cid" int(10) NOT NULL , +"mid" int(10) NOT NULL ); + +CREATE UNIQUE INDEX typecho_relationships_cid_mid ON typecho_relationships ("cid", "mid"); + +CREATE TABLE typecho_users ( "uid" INTEGER NOT NULL PRIMARY KEY, +"name" varchar(32) default NULL , +"password" varchar(64) default NULL , +"mail" varchar(200) default NULL , +"url" varchar(200) default NULL , +"screenName" varchar(32) default NULL , +"created" int(10) default '0' , +"activated" int(10) default '0' , +"logged" int(10) default '0' , +"group" varchar(16) default 'visitor' , +"authCode" varchar(64) default NULL); + +CREATE UNIQUE INDEX typecho_users_name ON typecho_users ("name"); +CREATE UNIQUE INDEX typecho_users_mail ON typecho_users ("mail"); diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/plugins/HelloWorld/Plugin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/plugins/HelloWorld/Plugin.php" new file mode 100644 index 0000000..6425858 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/plugins/HelloWorld/Plugin.php" @@ -0,0 +1,70 @@ +navBar = array('HelloWorld_Plugin', 'render'); + } + + /** + * 绂佺敤鎻掍欢鏂规硶,濡傛灉绂佺敤澶辫触,鐩存帴鎶涘嚭寮傚父 + * + * @static + * @access public + * @return void + * @throws Typecho_Plugin_Exception + */ + public static function deactivate(){} + + /** + * 鑾峰彇鎻掍欢閰嶇疆闈㈡澘 + * + * @access public + * @param Typecho_Widget_Helper_Form $form 閰嶇疆闈㈡澘 + * @return void + */ + public static function config(Typecho_Widget_Helper_Form $form) + { + /** 鍒嗙被鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('word', NULL, 'Hello World', _t('璇寸偣浠涔')); + $form->addInput($name); + } + + /** + * 涓汉鐢ㄦ埛鐨勯厤缃潰鏉 + * + * @access public + * @param Typecho_Widget_Helper_Form $form + * @return void + */ + public static function personalConfig(Typecho_Widget_Helper_Form $form){} + + /** + * 鎻掍欢瀹炵幇鏂规硶 + * + * @access public + * @return void + */ + public static function render() + { + echo '' + . htmlspecialchars(Typecho_Widget::widget('Widget_Options')->plugin('HelloWorld')->word) + . ''; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/404.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/404.php" new file mode 100644 index 0000000..6a2a210 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/404.php" @@ -0,0 +1,16 @@ + +need('header.php'); ?> + +
      + +
      +

      404 -

      +

      +
      +

      +

      +
      +
      + +
      + need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/archive.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/archive.php" new file mode 100644 index 0000000..cc5f991 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/archive.php" @@ -0,0 +1,36 @@ + +need('header.php'); ?> + +
      +

      archiveTitle(array( + 'category' => _t('鍒嗙被 %s 涓嬬殑鏂囩珷'), + 'search' => _t('鍖呭惈鍏抽敭瀛 %s 鐨勬枃绔'), + 'tag' => _t('鏍囩 %s 涓嬬殑鏂囩珷'), + 'author' => _t('%s 鍙戝竷鐨勬枃绔') + ), '', ''); ?>

      + have()): ?> + next()): ?> + + + +
      +

      +
      + + + pageNav('« 鍓嶄竴椤', '鍚庝竴椤 »'); ?> +
      + + need('sidebar.php'); ?> + need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/comments.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/comments.php" new file mode 100644 index 0000000..709d0b9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/comments.php" @@ -0,0 +1,49 @@ + +
      + comments()->to($comments); ?> + have()): ?> +

      commentsNum(_t('鏆傛棤璇勮'), _t('浠呮湁涓鏉¤瘎璁'), _t('宸叉湁 %d 鏉¤瘎璁')); ?>

      + + listComments(); ?> + + pageNav('« 鍓嶄竴椤', '鍚庝竴椤 »'); ?> + + + + allow('comment')): ?> +
      +
      + cancelReply(); ?> +
      + +

      +
      + user->hasLogin()): ?> +

      user->screenName(); ?>. »

      + +

      + + +

      +

      + + options->commentsRequireMail): ?> required /> +

      +

      + + options->commentsRequireURL): ?> required /> +

      + +

      + + +

      +

      + +

      +
      +
      + +

      + +
      diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/footer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/footer.php" new file mode 100644 index 0000000..347cd19 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/footer.php" @@ -0,0 +1,14 @@ + + + + + + + + +footer(); ?> + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/functions.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/functions.php" new file mode 100644 index 0000000..77b4855 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/functions.php" @@ -0,0 +1,26 @@ +addInput($logoUrl); + + $sidebarBlock = new Typecho_Widget_Helper_Form_Element_Checkbox('sidebarBlock', + array('ShowRecentPosts' => _t('鏄剧ず鏈鏂版枃绔'), + 'ShowRecentComments' => _t('鏄剧ず鏈杩戝洖澶'), + 'ShowCategory' => _t('鏄剧ず鍒嗙被'), + 'ShowArchive' => _t('鏄剧ず褰掓。'), + 'ShowOther' => _t('鏄剧ず鍏跺畠鏉傞」')), + array('ShowRecentPosts', 'ShowRecentComments', 'ShowCategory', 'ShowArchive', 'ShowOther'), _t('渚ц竟鏍忔樉绀')); + + $form->addInput($sidebarBlock->multiMode()); +} + + +/* +function themeFields($layout) { + $logoUrl = new Typecho_Widget_Helper_Form_Element_Text('logoUrl', NULL, NULL, _t('绔欑偣LOGO鍦板潃'), _t('鍦ㄨ繖閲屽~鍏ヤ竴涓浘鐗嘦RL鍦板潃, 浠ュ湪缃戠珯鏍囬鍓嶅姞涓婁竴涓狶OGO')); + $layout->addItem($logoUrl); +} +*/ + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/grid.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/grid.css" new file mode 100644 index 0000000..16183b3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/grid.css" @@ -0,0 +1 @@ +.container,.row [class*="col-"]{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}.container{margin-left:auto;margin-right:auto;padding-left:10px;padding-right:10px;}.row{margin-right:-10px;margin-left:-10px;}.row [class*="col-"]{float:left;min-height:1px;padding-right:10px;padding-left:10px;}.row [class*="-push-"],.row [class*="-pull-"]{position:relative;}.col-mb-1{width:8.33333%;}.col-mb-2{width:16.66667%;}.col-mb-3{width:25%;}.col-mb-4{width:33.33333%;}.col-mb-5{width:41.66667%;}.col-mb-6{width:50%;}.col-mb-7{width:58.33333%;}.col-mb-8{width:66.66667%;}.col-mb-9{width:75%;}.col-mb-10{width:83.33333%;}.col-mb-11{width:91.66667%;}.col-mb-12{width:100%;}@media(min-width:768px){.container{max-width:728px;}.col-tb-1{width:8.33333%;}.col-tb-2{width:16.66667%;}.col-tb-3{width:25%;}.col-tb-4{width:33.33333%;}.col-tb-5{width:41.66667%;}.col-tb-6{width:50%;}.col-tb-7{width:58.33333%;}.col-tb-8{width:66.66667%;}.col-tb-9{width:75%;}.col-tb-10{width:83.33333%;}.col-tb-11{width:91.66667%;}.col-tb-12{width:100%;}.col-tb-offset-0{margin-left:0;}.col-tb-offset-1{margin-left:8.33333%;}.col-tb-offset-2{margin-left:16.66667%;}.col-tb-offset-3{margin-left:25%;}.col-tb-offset-4{margin-left:33.33333%;}.col-tb-offset-5{margin-left:41.66667%;}.col-tb-offset-6{margin-left:50%;}.col-tb-offset-7{margin-left:58.33333%;}.col-tb-offset-8{margin-left:66.66667%;}.col-tb-offset-9{margin-left:75%;}.col-tb-offset-10{margin-left:83.33333%;}.col-tb-offset-11{margin-left:91.66667%;}.col-tb-offset-12{margin-left:100%;}.col-tb-pull-0{right:0;}.col-tb-pull-1{right:8.33333%;}.col-tb-pull-2{right:16.66667%;}.col-tb-pull-3{right:25%;}.col-tb-pull-4{right:33.33333%;}.col-tb-pull-5{right:41.66667%;}.col-tb-pull-6{right:50%;}.col-tb-pull-7{right:58.33333%;}.col-tb-pull-8{right:66.66667%;}.col-tb-pull-9{right:75%;}.col-tb-pull-10{right:83.33333%;}.col-tb-pull-11{right:91.66667%;}.col-tb-pull-12{right:100%;}.col-tb-push-0{left:0;}.col-tb-push-1{left:8.33333%;}.col-tb-push-2{left:16.66667%;}.col-tb-push-3{left:25%;}.col-tb-push-4{left:33.33333%;}.col-tb-push-5{left:41.66667%;}.col-tb-push-6{left:50%;}.col-tb-push-7{left:58.33333%;}.col-tb-push-8{left:66.66667%;}.col-tb-push-9{left:75%;}.col-tb-push-10{left:83.33333%;}.col-tb-push-11{left:91.66667%;}.col-tb-push-12{left:100%;}}@media(min-width:992px){.container{max-width:952px;}.col-1{width:8.33333%;}.col-2{width:16.66667%;}.col-3{width:25%;}.col-4{width:33.33333%;}.col-5{width:41.66667%;}.col-6{width:50%;}.col-7{width:58.33333%;}.col-8{width:66.66667%;}.col-9{width:75%;}.col-10{width:83.33333%;}.col-11{width:91.66667%;}.col-12{width:100%;}.col-offset-0{margin-left:0;}.col-offset-1{margin-left:8.33333%;}.col-offset-2{margin-left:16.66667%;}.col-offset-3{margin-left:25%;}.col-offset-4{margin-left:33.33333%;}.col-offset-5{margin-left:41.66667%;}.col-offset-6{margin-left:50%;}.col-offset-7{margin-left:58.33333%;}.col-offset-8{margin-left:66.66667%;}.col-offset-9{margin-left:75%;}.col-offset-10{margin-left:83.33333%;}.col-offset-11{margin-left:91.66667%;}.col-offset-12{margin-left:100%;}.col-pull-0{right:0;}.col-pull-1{right:8.33333%;}.col-pull-2{right:16.66667%;}.col-pull-3{right:25%;}.col-pull-4{right:33.33333%;}.col-pull-5{right:41.66667%;}.col-pull-6{right:50%;}.col-pull-7{right:58.33333%;}.col-pull-8{right:66.66667%;}.col-pull-9{right:75%;}.col-pull-10{right:83.33333%;}.col-pull-11{right:91.66667%;}.col-pull-12{right:100%;}.col-push-0{left:0;}.col-push-1{left:8.33333%;}.col-push-2{left:16.66667%;}.col-push-3{left:25%;}.col-push-4{left:33.33333%;}.col-push-5{left:41.66667%;}.col-push-6{left:50%;}.col-push-7{left:58.33333%;}.col-push-8{left:66.66667%;}.col-push-9{left:75%;}.col-push-10{left:83.33333%;}.col-push-11{left:91.66667%;}.col-push-12{left:100%;}}@media(min-width:1200px){.container{max-width:1160px;}.col-wd-1{width:8.33333%;}.col-wd-2{width:16.66667%;}.col-wd-3{width:25%;}.col-wd-4{width:33.33333%;}.col-wd-5{width:41.66667%;}.col-wd-6{width:50%;}.col-wd-7{width:58.33333%;}.col-wd-8{width:66.66667%;}.col-wd-9{width:75%;}.col-wd-10{width:83.33333%;}.col-wd-11{width:91.66667%;}.col-wd-12{width:100%;}.col-wd-offset-0{margin-left:0;}.col-wd-offset-1{margin-left:8.33333%;}.col-wd-offset-2{margin-left:16.66667%;}.col-wd-offset-3{margin-left:25%;}.col-wd-offset-4{margin-left:33.33333%;}.col-wd-offset-5{margin-left:41.66667%;}.col-wd-offset-6{margin-left:50%;}.col-wd-offset-7{margin-left:58.33333%;}.col-wd-offset-8{margin-left:66.66667%;}.col-wd-offset-9{margin-left:75%;}.col-wd-offset-10{margin-left:83.33333%;}.col-wd-offset-11{margin-left:91.66667%;}.col-wd-offset-12{margin-left:100%;}.col-wd-pull-0{right:0;}.col-wd-pull-1{right:8.33333%;}.col-wd-pull-2{right:16.66667%;}.col-wd-pull-3{right:25%;}.col-wd-pull-4{right:33.33333%;}.col-wd-pull-5{right:41.66667%;}.col-wd-pull-6{right:50%;}.col-wd-pull-7{right:58.33333%;}.col-wd-pull-8{right:66.66667%;}.col-wd-pull-9{right:75%;}.col-wd-pull-10{right:83.33333%;}.col-wd-pull-11{right:91.66667%;}.col-wd-pull-12{right:100%;}.col-wd-push-0{left:0;}.col-wd-push-1{left:8.33333%;}.col-wd-push-2{left:16.66667%;}.col-wd-push-3{left:25%;}.col-wd-push-4{left:33.33333%;}.col-wd-push-5{left:41.66667%;}.col-wd-push-6{left:50%;}.col-wd-push-7{left:58.33333%;}.col-wd-push-8{left:66.66667%;}.col-wd-push-9{left:75%;}.col-wd-push-10{left:83.33333%;}.col-wd-push-11{left:91.66667%;}.col-wd-push-12{left:100%;}}@media(max-width:767px){.kit-hidden-mb{display:none;}}@media(max-width:991px){.kit-hidden-tb{display:none;}}@media(max-width:1199px){.kit-hidden{display:none;}}.clearfix,.row{zoom:1;}.clearfix:before,.row:before,.clearfix:after,.row:after{content:" ";display:table;}.clearfix:after,.row:after{clear:both;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/header.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/header.php" new file mode 100644 index 0000000..efabbed --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/header.php" @@ -0,0 +1,70 @@ + + + + + + + + + <?php $this->archiveTitle(array( + 'category' => _t('鍒嗙被 %s 涓嬬殑鏂囩珷'), + 'search' => _t('鍖呭惈鍏抽敭瀛 %s 鐨勬枃绔'), + 'tag' => _t('鏍囩 %s 涓嬬殑鏂囩珷'), + 'author' => _t('%s 鍙戝竷鐨勬枃绔') + ), '', ' - '); ?><?php $this->options->title(); ?> + + + + + + + + + + header(); ?> + + + + + +
      +
      +
      + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/img/icon-search.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/img/icon-search.png" new file mode 100644 index 0000000000000000000000000000000000000000..6ab06195ca72227d297ec6b7f79f1e31dcaed4fb GIT binary patch literal 303 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM3?#3wJbMaA1qS$pxB}_W&`<{lhlGTLsZ*zx zm6c7IGNr%2fAZwX)2C0LHfZomss*!lUA7_BxxCJI5;v*&fDT@pTRix)7dt zK(lbh>J2M2O*h=^ded_z%rWKNfh)`O;?0fv<9i#=G>304(aC%^Z|TY#$KOO7aqQ*Z S^5P`WdInEdKbLh*2~7aulY$xm literal 0 HcmV?d00001 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/img/icon-search@2x.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/img/icon-search@2x.png" new file mode 100644 index 0000000000000000000000000000000000000000..243b408eb8e74ef0b5cfa51d701f833137ce95da GIT binary patch literal 437 zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-r0X`wFK-$5gnPbQW5ud%0;0j z1p(KI9$R`?0?&H=`>&sTd|{y4gxVD^5B{!bKm3k0;?w+FQ@OA9C$D#z$0BlT&(dyR zg~^j6GbTmKB&_{-Wz&m)pMNcTH09H(nVk{5oZ4-dB%d<0^gL<(x7(F}O|#6yCsNeftUg5~p~U6Y49mOQIS<`ccr0*7{n0PM uhea`*>)d$R7O|~4E?|1_rN_QCvHA;2G_#_w-}VK1n8DN4&t;ucLK6Tneed('header.php'); + ?> + +
      + next()): ?> + + + + pageNav('« 鍓嶄竴椤', '鍚庝竴椤 »'); ?> +
      + +need('sidebar.php'); ?> +need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/page.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/page.php" new file mode 100644 index 0000000..8f1cd6f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/page.php" @@ -0,0 +1,15 @@ + +need('header.php'); ?> + +
      + + need('comments.php'); ?> +
      + +need('sidebar.php'); ?> +need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/post.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/post.php" new file mode 100644 index 0000000..3732c9f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/post.php" @@ -0,0 +1,27 @@ + +need('header.php'); ?> + +
      +
      +

      title() ?>

      + +
      + content(); ?> +
      +

      tags(', ', true, 'none'); ?>

      +
      + + need('comments.php'); ?> + +
        +
      • 涓婁竴绡: thePrev('%s','娌℃湁浜'); ?>
      • +
      • 涓嬩竴绡: theNext('%s','娌℃湁浜'); ?>
      • +
      +
      + +need('sidebar.php'); ?> +need('footer.php'); ?> diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/screenshot.png" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/screenshot.png" new file mode 100644 index 0000000000000000000000000000000000000000..8aa2987ed676476537bc6578c64d4ef74871e24d GIT binary patch literal 12880 zcmV-WGOx{vP)&$qSKrKHVceZ0=k=uTj*pp=tK zalDx5QQ1|)%m6VjN zt*sRoAEu(EO*}a+EGNau&Lbfmfoomv=H(k8EuEpI#l674#>PB4IYBcmF+ESYt)9-# z*XQ8g*456%xUDouRg8;@VNps>JuT3^tIpNejdf#OYJ0}Lwf67s`|RE4<=)N3#qH+Z z@9*~a@b*wrRMf}0S4lk}D>$^ayojK>`1bH08Xex%#bI`elAf-Nla~MZ_nDcQGcz;r z`2U)$x#s2Xyvx@A{`dLu=hoilf0U}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247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/style.css" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/style.css" new file mode 100644 index 0000000..2faa800 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/usr/themes/default/style.css" @@ -0,0 +1 @@ +body{background-color:#FFF;color:#444;font-family:"Droid Serif",Georgia,"Times New Roman",STHeiti,serif;font-size:87.5%;}a{color:#3354AA;text-decoration:none;}a:hover,a:active{color:#444;}pre,code{background:#F3F3F0;font-family:Menlo,Monaco,Consolas,"Lucida Console","Courier New",monospace;font-size:.92857em;}code{padding:2px 4px;color:#B94A48;}pre{padding:0;border:1px solid #ccc;overflow:auto;max-height:400px;}pre code{padding:3px;color:#444;}blockquote{margin:1em 1.5em;padding-left:1.5em;border-left:4px solid #F3F3F0;}h1,h2,h3,h4,h5,h6{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}input[type="text"],input[type="email"],input[type="url"],input[type="password"],textarea{padding:5px;border:1px solid #E9E9E9;width:100%;border-radius:2px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}textarea{resize:vertical;}.post-meta a,.post-content a,.widget a,.comment-content a{border-bottom:1px solid #EEE;}.post-meta a:hover,.post-content a:hover,.widget a:hover,.comment-content a:hover{border-bottom-color:transparent;}.browsehappy{padding:8px 0;background:#FBE3E4;color:#8A1F11;text-align:center;}.browsehappy a{color:#8A1F11;text-decoration:underline;font-weight:bold;}#header{padding-top:35px;border-bottom:1px solid #EEE;}#logo{color:#333;font-size:2.5em;}.description{margin:.5em 0 0;color:#999;font-style:italic;}#nav-menu{margin:25px 0 0;padding:0;}#nav-menu a{display:block;margin-right:-1px;padding:0 20px;border:1px solid #EEE;border-bottom:none;height:32px;line-height:32px;color:#444;float:left;}#nav-menu a:hover,#nav-menu .current{background:#F6F6F6;}#search{position:relative;margin-top:15px;}#search input{padding-right:30px;}#search button{position:absolute;right:4px;top:2px;border:none;padding:0;width:24px;height:24px;background:transparent url(img/icon-search.png) no-repeat center center;direction:ltr;text-indent:-9999em;}@media(-webkit-min-device-pixel-ratio:2),(min-resolution:192dpi){#search button{background-image:url(img/icon-search@2x.png);-webkit-background-size:24px 24px;-moz-background-size:24px 24px;-o-background-size:24px 24px;background-size:24px 24px;}}.post{padding:15px 0 20px;border-bottom:1px solid #EEE;}.post-title{margin:.83em 0;font-size:1.4em;}.post-meta{margin-top:-0.5em;padding:0;color:#999;font-size:.92857em;}.post-meta li{display:inline-block;margin:0 8px 0 0;padding-left:12px;border-left:1px solid #EEE;}.post-meta li:first-child{margin-left:0;padding-left:0;border:none;}.post-content{line-height:1.5;}.post .tags{clear:both;}.post-near{list-style:none;margin:30px 0;padding:0;color:#999;}.post-near li{margin:10px 0;}.archive-title{margin:1em 0 -1em;padding-top:20px;color:#999;font-size:1em;}.more{text-align:center;}.more a{border:none;}.protected .text{width:50%;}.page-navigator{list-style:none;margin:25px 0;padding:0;text-align:center;}.page-navigator li{display:inline-block;margin:0 4px;}.page-navigator a{display:inline-block;padding:0 10px;height:30px;line-height:30px;}.page-navigator a:hover{background:#EEE;text-decoration:none;}.page-navigator .current a{color:#444;background:#EEE;}#comments{padding-top:15px;}.comment-list,.comment-list ol{list-style:none;margin:0;padding:0;}.comment-list li{padding:14px;margin-top:10px;border:1px solid #EEE;}.comment-list li.comment-level-odd{background:#F6F6F3;}.comment-list li.comment-level-even{background:#FFF;}.comment-list li.comment-by-author{background:#FFF9E8;}.comment-list li .comment-reply{text-align:right;font-size:.92857em;}.comment-meta a{color:#999;font-size:.92857em;}.comment-author{display:block;margin-bottom:3px;color:#444;}.comment-author .avatar{float:left;margin-right:10px;}.comment-author cite{font-weight:bold;font-style:normal;}.comment-list .respond{margin-top:15px;border-top:1px solid #EEE;}.respond .cancel-comment-reply{float:right;margin-top:15px;font-size:.92857em;}#comment-form label{display:block;margin-bottom:.5em;font-weight:bold;}#comment-form .required:after{content:" *";color:#C00;}#secondary{padding-top:15px;word-wrap:break-word;}.widget{margin-bottom:30px;}.widget-list{list-style:none;padding:0;}.widget-list li{margin:5px 0;line-height:1.5;}.widget-list li ul{margin-left:15px;}#footer{padding:3em 0;line-height:1.5;text-align:center;color:#999;}.error-page{margin-top:100px;margin-bottom:100px;}.post-content,.comment-content{line-height:1.5;word-wrap:break-word;}.post-content h2,.comment-content h2{font-size:1.28571em;}.post-content img,.comment-content img,.post-content video,.comment-content video{max-width:100%;}.post-content a img,.comment-content a img{background:#FFF;position:relative;bottom:-4px;}.post-content hr,.comment-content hr{margin:2em auto;width:100px;border:1px solid #E9E9E9;border-width:2px 0 0 0;}.aligncenter,div.aligncenter{display:block;margin-left:auto;margin-right:auto;}.alignleft{float:left;}.alignright{float:right;}img.alignleft{margin:0 15px 0 0;}img.alignright{margin:0 0 0 15px;}@media(max-width:767px){body{font-size:81.25%;}#nav-menu a{float:none;display:inline-block;margin:0 -2px;}}@media(max-width:768px){#header,.post-title,.post-meta{text-align:center;}}@media(min-width:1200px){.container{max-width:952px;}}.hidden{display:none!important;visibility:hidden;}.sr-only{border:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.sr-only.focusable:active,.sr-only.focusable:focus{clip:auto;height:auto;margin:0;overflow:visible;position:static;width:auto;}.invisible{visibility:hidden;} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/DocParser.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/DocParser.php" new file mode 100644 index 0000000..1f494ac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/DocParser.php" @@ -0,0 +1,599 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Parses Markdown into an AST + */ +class CommonMark_DocParser +{ + const CODE_INDENT = 4; + + /** + * @var BlockElement + */ + protected $tip; + + /** + * @var BlockElement + */ + protected $doc; + + /** + * @var InlineParser + */ + protected $inlineParser; + + /** + * @var ReferenceMap + */ + protected $refMap; + + /** + * Convert tabs to spaces on each line using a 4-space tab stop + * @param string $string + * + * @return string + */ + protected static function detabLine($string) + { + if (strpos($string, "\t") === false) { + return $string; + } + + // Split into different parts + $parts = explode("\t", $string); + // Add each part to the resulting line + // The first one is done here; others are prefixed + // with the necessary spaces inside the loop below + $line = $parts[0]; + unset($parts[0]); + + foreach ($parts as $part) { + // Calculate number of spaces; insert them followed by the non-tab contents + $amount = 4 - Typecho_Common::strLen($line, 'UTF-8') % 4; + $line .= str_repeat(' ', $amount) . $part; + } + + return $line; + } + + /** + * Break out of all containing lists, resetting the tip of the + * document to the parent of the highest list, and finalizing + * all the lists. (This is used to implement the "two blank lines + * break of of all lists" feature.) + * + * @param BlockElement $block + * @param int $lineNumber + */ + protected function breakOutOfLists(CommonMark_Element_BlockElement $block, $lineNumber) + { + $b = $block; + $lastList = null; + do { + if ($b->getType() === CommonMark_Element_BlockElement::TYPE_LIST) { + $lastList = $b; + } + + $b = $b->getParent(); + } while ($b); + + if ($lastList) { + while ($block != $lastList) { + $this->finalize($block, $lineNumber); + $block = $block->getParent(); + } + $this->finalize($lastList, $lineNumber); + $this->tip = $lastList->getParent(); + } + } + + /** + * @param string $ln + * @param int $offset + * + * @throws \RuntimeException + */ + protected function addLine($ln, $offset) + { + $s = substr($ln, $offset); + if ($s === false) { + $s = ''; + } + + if (!$this->tip->getIsOpen()) { + throw new RuntimeException(sprintf('Attempted to add line (%s) to closed container.', $ln)); + } + + $this->tip->getStrings()->add($s); + } + + /** + * @param string $tag + * @param int $lineNumber + * @param int $offset + * + * @return BlockElement + */ + protected function addChild($tag, $lineNumber, $offset) + { + while (!$this->tip->canContain($tag)) { + $this->finalize($this->tip, $lineNumber); + } + + $columnNumber = $offset + 1; // offset 0 = column 1 + $newBlock = new CommonMark_Element_BlockElement($tag, $lineNumber, $columnNumber); + $this->tip->getChildren()->add($newBlock); + $newBlock->setParent($this->tip); + $this->tip = $newBlock; + + return $newBlock; + } + + /** + * @param string $ln + * @param int $offset + * + * @return array|null + */ + protected function parseListMarker($ln, $offset) + { + $rest = substr($ln, $offset); + $data = array(); + + if (preg_match(CommonMark_Util_RegexHelper::getInstance()->getHRuleRegex(), $rest)) { + return null; + } + + if ($matches = CommonMark_Util_RegexHelper::matchAll('/^[*+-]( +|$)/', $rest)) { + $spacesAfterMarker = strlen($matches[1]); + $data['type'] = CommonMark_Element_BlockElement::LIST_TYPE_UNORDERED; + $data['delimiter'] = null; + $data['bullet_char'] = $matches[0][0]; + } elseif ($matches = CommonMark_Util_RegexHelper::matchAll('/^(\d+)([.)])( +|$)/', $rest)) { + $spacesAfterMarker = strlen($matches[3]); + $data['type'] = CommonMark_Element_BlockElement::LIST_TYPE_ORDERED; + $data['start'] = intval($matches[1]); + $data['delimiter'] = $matches[2]; + $data['bullet_char'] = null; + } else { + return null; + } + + $blankItem = strlen($matches[0]) === strlen($rest); + if ($spacesAfterMarker >= 5 || + $spacesAfterMarker < 1 || + $blankItem + ) { + $data['padding'] = strlen($matches[0]) - $spacesAfterMarker + 1; + } else { + $data['padding'] = strlen($matches[0]); + } + + return $data; + } + + /** + * @param array $listData + * @param array $itemData + * + * @return bool + */ + protected function listsMatch($listData, $itemData) + { + return ($listData['type'] === $itemData['type'] && + $listData['delimiter'] === $itemData['delimiter'] && + $listData['bullet_char'] === $itemData['bullet_char']); + } + + /** + * @param DocParser $self + * @param mixed $oldTip + * @param mixed $lastMatchedContainer + * @param mixed $lineNumber + * @param bool $closeUnmatchedBlocksAlreadyDone + */ + protected function closeUnmatchedBlocks(CommonMark_DocParser $self, $oldTip, $lastMatchedContainer, $lineNumber, &$closeUnmatchedBlocksAlreadyDone) + { + // finalize any blocks not matched + while (!$closeUnmatchedBlocksAlreadyDone && $oldTip != $lastMatchedContainer && $oldTip !== null) { + $self->finalize($oldTip, $lineNumber); + $oldTip = $oldTip->getParent(); + } + $closeUnmatchedBlocksAlreadyDone = true; + } + + /** + * @param string $ln + * @param int $lineNumber + */ + protected function incorporateLine($ln, $lineNumber) + { + $allMatched = true; + $offset = 0; + $blank = false; + $container = $this->doc; + $oldTip = $this->tip; + + // Convert tabs to spaces: + $ln = self::detabLine($ln); + + // For each containing block, try to parse the associated line start. + // Bail out on failure: container will point to the last matching block. + // Set all_matched to false if not all containers match. + while ($container->hasChildren()) { + /** @var BlockElement $lastChild */ + $lastChild = $container->getChildren()->last(); + if (!$lastChild->getIsOpen()) { + break; + } + + $container = $lastChild; + + $match = CommonMark_Util_RegexHelper::matchAt('/[^ ]/', $ln, $offset); + if ($match === null) { + $firstNonSpace = strlen($ln); + $blank = true; + } else { + $firstNonSpace = $match; + $blank = false; + } + + $indent = $firstNonSpace - $offset; + + switch ($container->getType()) { + case CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE: + $matched = $indent <= 3 && isset($ln[$firstNonSpace]) && $ln[$firstNonSpace] === '>'; + if ($matched) { + $offset = $firstNonSpace + 1; + if (isset($ln[$offset]) && $ln[$offset] === ' ') { + $offset++; + } + } else { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_LIST_ITEM: + $listData = $container->getExtra('list_data'); + $increment = $listData['marker_offset'] + $listData['padding']; + if ($indent >= $increment) { + $offset += $increment; + } elseif ($blank) { + $offset = $firstNonSpace; + } else { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_INDENTED_CODE: + if ($indent >= self::CODE_INDENT) { + $offset += self::CODE_INDENT; + } elseif ($blank) { + $offset = $firstNonSpace; + } else { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_ATX_HEADER: + case CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER: + case CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE: + // a header can never contain > 1 line, so fail to match: + $allMatched = false; + break; + + case CommonMark_Element_BlockElement::TYPE_FENCED_CODE: + // skip optional spaces of fence offset + $i = $container->getExtra('fence_offset'); + while ($i > 0 && $ln[$offset] === ' ') { + $offset++; + $i--; + } + break; + + case CommonMark_Element_BlockElement::TYPE_HTML_BLOCK: + if ($blank) { + $allMatched = false; + } + break; + + case CommonMark_Element_BlockElement::TYPE_PARAGRAPH: + if ($blank) { + $container->setIsLastLineBlank(true); + $allMatched = false; + } + break; + + default: + // Nothing + } + + if (!$allMatched) { + $container = $container->getParent(); // back up to the last matching block + break; + } + } + + $lastMatchedContainer = $container; + + // This function is used to finalize and close any unmatched + // blocks. We aren't ready to do this now, because we might + // have a lazy paragraph continuation, in which case we don't + // want to close unmatched blocks. So we store this closure for + // use later, when we have more information. + $closeUnmatchedBlocksAlreadyDone = false; + + // Check to see if we've hit 2nd blank line; if so break out of list: + if ($blank && $container->getIsLastLineBlank()) { + $this->breakOutOfLists($container, $lineNumber); + } + + // Unless last matched container is a code block, try new container starts, + // adding children to the last matched container: + while ($container->getType() != CommonMark_Element_BlockElement::TYPE_FENCED_CODE && + $container->getType() != CommonMark_Element_BlockElement::TYPE_INDENTED_CODE && + $container->getType() != CommonMark_Element_BlockElement::TYPE_HTML_BLOCK && + // this is a little performance optimization + CommonMark_Util_RegexHelper::matchAt('/^[ #`~*+_=<>0-9-]/', $ln, $offset) !== null + ) { + $match = CommonMark_Util_RegexHelper::matchAt('/[^ ]/', $ln, $offset); + if ($match === null) { + $firstNonSpace = strlen($ln); + $blank = true; + } else { + $firstNonSpace = $match; + $blank = false; + } + + $indent = $firstNonSpace - $offset; + + if ($indent >= self::CODE_INDENT) { + // indented code + if ($this->tip->getType() != CommonMark_Element_BlockElement::TYPE_PARAGRAPH && !$blank) { + $offset += self::CODE_INDENT; + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_INDENTED_CODE, $lineNumber, $offset); + } else { // ident > 4 in a lazy paragraph continuation + break; + } + } elseif (!$blank && $ln[$firstNonSpace] === '>') { + // blockquote + $offset = $firstNonSpace + 1; + // optional following space + if (isset($ln[$offset]) && $ln[$offset] === ' ') { + $offset++; + } + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE, $lineNumber, $offset); + } elseif ($match = CommonMark_Util_RegexHelper::matchAll('/^#{1,6}(?: +|$)/', $ln, $firstNonSpace)) { + // ATX header + $offset = $firstNonSpace + strlen($match[0]); + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_ATX_HEADER, $lineNumber, $firstNonSpace); + $container->setExtra('level', strlen(trim($match[0]))); // number of #s + // remove trailing ###s + $container->getStrings()->add( + preg_replace( + '/(?:(\\\\#) *#*| *#+) *$/', + '$1', + substr($ln, $offset) + ) + ); + break; + } elseif ($match = CommonMark_Util_RegexHelper::matchAll('/^`{3,}(?!.*`)|^~{3,}(?!.*~)/', $ln, $firstNonSpace)) { + // fenced code block + $fenceLength = strlen($match[0]); + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_FENCED_CODE, $lineNumber, $firstNonSpace); + $container->setExtra('fence_length', $fenceLength); + $container->setExtra('fence_char', $match[0][0]); + $container->setExtra('fence_offset', $firstNonSpace - $offset); + $offset = $firstNonSpace + $fenceLength; + break; + } elseif (CommonMark_Util_RegexHelper::matchAt( + CommonMark_Util_RegexHelper::getInstance()->getHtmlBlockOpenRegex(), + $ln, + $firstNonSpace + ) !== null + ) { + // html block + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_HTML_BLOCK, $lineNumber, $firstNonSpace); + // note, we don't adjust offset because the tag is part of the text + break; + } elseif ($container->getType() === CommonMark_Element_BlockElement::TYPE_PARAGRAPH && + $container->getStrings()->count() === 1 && + ($match = CommonMark_Util_RegexHelper::matchAll('/^(?:=+|-+) *$/', $ln, $firstNonSpace)) + ) { + // setext header line + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container->setType(CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER); + $container->setExtra('level', $match[0][0] === '=' ? 1 : 2); + $offset = strlen($ln); + } elseif (CommonMark_Util_RegexHelper::matchAt(CommonMark_Util_RegexHelper::getInstance()->getHRuleRegex(), $ln, $firstNonSpace) !== null) { + // hrule + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE, $lineNumber, $firstNonSpace); + $offset = strlen($ln) - 1; + break; + } elseif (($data = $this->parseListMarker($ln, $firstNonSpace))) { + // list item + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + $data['marker_offset'] = $indent; + $offset = $firstNonSpace + $data['padding']; + + // add the list if needed + if ($container->getType() !== CommonMark_Element_BlockElement::TYPE_LIST || + !($this->listsMatch($container->getExtra('list_data'), $data)) + ) { + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_LIST, $lineNumber, $firstNonSpace); + $container->setExtra('list_data', $data); + } + + // add the list item + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_LIST_ITEM, $lineNumber, $firstNonSpace); + $container->setExtra('list_data', ($data)); + } else { + break; + } + + if ($container->acceptsLines()) { + // if it's a line container, it can't contain other containers + break; + } + } + + // What remains at the offset is a text line. Add the text to the appropriate container. + + $match = CommonMark_Util_RegexHelper::matchAt('/[^ ]/', $ln, $offset); + if ($match === null) { + $firstNonSpace = strlen($ln); + $blank = true; + } else { + $firstNonSpace = $match; + $blank = false; + } + + $indent = $firstNonSpace - $offset; + + // First check for a lazy paragraph continuation: + if ($this->tip !== $lastMatchedContainer && + !$blank && + $this->tip->getType() == CommonMark_Element_BlockElement::TYPE_PARAGRAPH && + $this->tip->getStrings()->count() > 0 + ) { + // lazy paragraph continuation + $this->lastLineBlank = false; // TODO: really? (see line 1152) + $this->addLine($ln, $offset); + } else { // not a lazy continuation + //finalize any blocks not matched + $this->closeUnmatchedBlocks($this, $oldTip, $lastMatchedContainer, $lineNumber, $closeUnmatchedBlocksAlreadyDone); + + // Block quote lines are never blank as they start with > + // and we don't count blanks in fenced code for purposes of tight/loose + // lists or breaking out of lists. We also don't set last_line_blank + // on an empty list item. + $container->setIsLastLineBlank( + $blank && + !( + $container->getType() == CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE || + $container->getType() == CommonMark_Element_BlockElement::TYPE_FENCED_CODE || + ($container->getType() == CommonMark_Element_BlockElement::TYPE_LIST_ITEM && + $container->getChildren()->count() === 0 && + $container->getStartLine() == $lineNumber + ) + ) + ); + + $cont = $container; + while ($cont->getParent()) { + $cont->getParent()->setIsLastLineBlank(false); + $cont = $cont->getParent(); + } + + switch ($container->getType()) { + case CommonMark_Element_BlockElement::TYPE_INDENTED_CODE: + case CommonMark_Element_BlockElement::TYPE_HTML_BLOCK: + $this->addLine($ln, $offset); + break; + + case CommonMark_Element_BlockElement::TYPE_FENCED_CODE: + // check for closing code fence + $test = ($indent <= 3 && + isset($ln[$firstNonSpace]) && + $ln[$firstNonSpace] == $container->getExtra('fence_char') && + $match = CommonMark_Util_RegexHelper::matchAll('/^(?:`{3,}|~{3,})(?= *$)/', $ln, $firstNonSpace) + ); + if ($test && strlen($match[0]) >= $container->getExtra('fence_length')) { + // don't add closing fence to container; instead, close it: + $this->finalize($container, $lineNumber); + } else { + $this->addLine($ln, $offset); + } + break; + + case CommonMark_Element_BlockElement::TYPE_ATX_HEADER: + case CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER: + case CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE: + // nothing to do; we already added the contents. + break; + + default: + if ($container->acceptsLines()) { + $this->addLine($ln, $firstNonSpace); + } elseif ($blank) { + // do nothing + } elseif ($container->getType() != CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE && $container->getType( + ) != CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER + ) { + // create paragraph container for line + $container = $this->addChild(CommonMark_Element_BlockElement::TYPE_PARAGRAPH, $lineNumber, $firstNonSpace); + $this->addLine($ln, $firstNonSpace); + } else { + // TODO: throw exception? + } + } + } + } + + /** + * @param BlockElement $block + * @param int $lineNumber + */ + public function finalize(CommonMark_Element_BlockElement $block, $lineNumber) + { + $block->finalize($lineNumber, $this->inlineParser, $this->refMap); + + $this->tip = $block->getParent(); // typo on 1310? + } + + /** + * The main parsing function. Returns a parsed document AST. + * @param string $input + * + * @return BlockElement + * + * @api + */ + public function parse($input) + { + $this->doc = new CommonMark_Element_BlockElement(CommonMark_Element_BlockElement::TYPE_DOCUMENT, 1, 1); + $this->tip = $this->doc; + + $this->inlineParser = new CommonMark_InlineParser(); + $this->refMap = new CommonMark_Reference_ReferenceMap(); + + // Remove any /n which appears at the very end of the string + if (substr($input, -1) == "\n") { + $input = substr($input, 0, -1); + } + + $lines = preg_split('/\r\n|\n|\r/', $input); + $len = count($lines); + for ($i = 0; $i < $len; $i++) { + $this->incorporateLine($lines[$i], $i + 1); + } + + while ($this->tip) { + $this->finalize($this->tip, $len - 1); + } + + $this->doc->processInlines($this->inlineParser, $this->refMap); + + return $this->doc; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/BlockElement.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/BlockElement.php" new file mode 100644 index 0000000..f69d898 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/BlockElement.php" @@ -0,0 +1,478 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Block-level element + */ +class CommonMark_Element_BlockElement +{ + const TYPE_ATX_HEADER = 'ATXHeader'; + const TYPE_BLOCK_QUOTE = 'BlockQuote'; + const TYPE_DOCUMENT = 'Document'; + const TYPE_FENCED_CODE = 'FencedCode'; + const TYPE_HORIZONTAL_RULE = 'HorizontalRule'; + const TYPE_HTML_BLOCK = 'HtmlBlock'; + const TYPE_INDENTED_CODE = 'IndentedCode'; + const TYPE_LIST = 'List'; + const TYPE_LIST_ITEM = 'ListItem'; + const TYPE_PARAGRAPH = 'Paragraph'; + const TYPE_REFERENCE_DEF = 'ReferenceDef'; + const TYPE_SETEXT_HEADER = 'SetextHeader'; + + const LIST_TYPE_ORDERED = 'Outline'; + const LIST_TYPE_UNORDERED = 'Bullet'; + + /** + * @var string + */ + protected $type; + + /** + * @var bool + */ + protected $open = true; + + /** + * @var bool + */ + protected $lastLineBlank = false; + + /** + * @var int + */ + protected $startLine; + + /** + * @var int + */ + protected $startColumn; + + /** + * @var int + */ + protected $endLine; + + /** + * @var ArrayCollection|BlockELement[] + */ + protected $children; + + /** + * @var BlockElement|null + */ + protected $parent = null; + + /** + * This is formed by concatenating strings, in finalize: + * @var string + */ + protected $stringContent = ''; + + /** + * @var string[] + */ + protected $strings; + + /** + * @var ArrayCollection|InlineElementInterface[] + */ + protected $inlineContent; + + /** + * Extra data storage + * @var array + */ + protected $extras = array(); + + /** + * Constrcutor + * + * @param string $type Block type (see TYPE_ constants) + * @param int $startLine Line where the block element starts + * @param int $startColumn Column where the block element starts + */ + public function __construct($type, $startLine, $startColumn) + { + $this->type = $type; + $this->startLine = $startLine; + $this->startColumn = $startColumn; + $this->endLine = $startLine; + + $this->children = new CommonMark_Util_ArrayCollection(); + $this->strings = new CommonMark_Util_ArrayCollection(); + $this->inlineContent = new CommonMark_Util_ArrayCollection(); + } + + /** + * Returns true if parent block can contain child block + * + * @param mixed $childType The type of child block to add (see TYPE_ constants) + * + * @return bool + */ + public function canContain($childType) + { + $parentType = $this->type; + + return ($parentType == self::TYPE_DOCUMENT || + $parentType == self::TYPE_BLOCK_QUOTE || + $parentType == self::TYPE_LIST_ITEM || + ($parentType == self::TYPE_LIST && $childType == self::TYPE_LIST_ITEM)); + } + + /** + * Returns true if block type can accept lines of text + * + * @return bool + */ + public function acceptsLines() + { + return ($this->type == self::TYPE_PARAGRAPH || + $this->type == self::TYPE_INDENTED_CODE || + $this->type == self::TYPE_FENCED_CODE); + } + + /** + * Whether the block ends with a blank line + * + * @return bool + */ + public function endsWithBlankLine() + { + if ($this->lastLineBlank) { + return true; + } + + if (($this->type == self::TYPE_LIST || $this->type == self::TYPE_LIST_ITEM) && $this->hasChildren()) { + return $this->getChildren()->last()->endsWithBlankLine(); + } + + return false; + } + + /** + * @return ArrayCollection|BlockElement[] + */ + public function getChildren() + { + return $this->children; + } + + /** + * @return bool + */ + public function hasChildren() + { + return !$this->children->isEmpty(); + } + + /** + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * @param mixed $type + * + * @return $this + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * @return BlockElement|null + */ + public function getParent() + { + return $this->parent ? $this->parent : null; + } + + /** + * Whether the block is open for modifications + * + * @return bool + */ + public function getIsOpen() + { + return $this->open; + } + + /** + * @return ArrayCollection|string[] + */ + public function getStrings() + { + return $this->strings; + } + + /** + * @param BlockElement $parent + * + * @return $this + */ + public function setParent(CommonMark_Element_BlockElement $parent) + { + $this->parent = $parent; + + return $this; + } + + /** + * @return bool + */ + public function getIsLastLineBlank() + { + return $this->lastLineBlank; + } + + /** + * @param bool $value + * + * @return $this + */ + public function setIsLastLineBlank($value) + { + $this->lastLineBlank = $value; + + return $this; + } + + /** + * @param bool $value + * + * @return $this + */ + public function setIsOpen($value) + { + $this->open = $value; + + return $this; + } + + /** + * @return int + */ + public function getStartLine() + { + return $this->startLine; + } + + /** + * @param int $lineNumber + * + * @return $this + */ + public function setEndLine($lineNumber) + { + $this->endLine = $lineNumber; + + return $this; + } + + /** + * @return ArrayCollection|InlineElementInterface[] + */ + public function getInlineContent() + { + return $this->inlineContent; + } + + /** + * @param string $key + * + * @return mixed|null + */ + public function getExtra($key) + { + return isset($this->extras[$key]) ? $this->extras[$key] : null; + } + + /** + * @param string $key + * @param mixed $value + * + * @return $this + */ + public function setExtra($key, $value) + { + $this->extras[$key] = $value; + + return $this; + } + + /** + * @return string + */ + public function getStringContent() + { + return $this->stringContent; + } + + /** + * Returns true if string contains only space characters + * + * @return bool + */ + private function isStringContentBlank() + { + return preg_match('/^\s*$/', $this->stringContent) == 1; + } + + /** + * Finalize the block; mark it closed for modification + * + * @param int $lineNumber + * @param InlineParser $inlineParser + * @param ReferenceMap $refMap + */ + public function finalize($lineNumber, CommonMark_InlineParser $inlineParser, CommonMark_Reference_ReferenceMap $refMap) + { + if (!$this->open) { + return; + } + + $this->open = false; + if ($lineNumber > $this->startLine) { + $this->endLine = $lineNumber - 1; + } else { + $this->endLine = $lineNumber; + } + + switch ($this->getType()) { + case self::TYPE_PARAGRAPH: + $this->stringContent = preg_replace( + '/^ */m', + '', + implode("\n", $this->strings->toArray()) + ); + + // Try parsing the beginning as link reference definitions: + while ($this->stringContent[0] === '[' && + ($pos = $inlineParser->parseReference($this->stringContent, $refMap)) + ) { + $this->stringContent = substr($this->stringContent, $pos); + if ($this->isStringContentBlank()) { //RegexHelper::getInstance()->isBlank($this->stringContent)) { + $this->type = self::TYPE_REFERENCE_DEF; + break; + } + } + break; + + case self::TYPE_ATX_HEADER: + case self::TYPE_SETEXT_HEADER: + case self::TYPE_HTML_BLOCK: + $this->stringContent = implode("\n", $this->strings->toArray()); + break; + + case self::TYPE_INDENTED_CODE: + $reversed = array_reverse($this->strings->toArray(), true); + foreach ($reversed as $index => $line) { + if ($line == '' || $line === "\n" || preg_match('/^(\n *)$/', $line)) { + unset($reversed[$index]); + } else { + break; + } + } + $fixed = array_reverse($reversed); + $tmp = implode("\n", $fixed); + if (substr($tmp, -1) !== "\n") { + $tmp .= "\n"; + } + + $this->stringContent = $tmp; + break; + + case self::TYPE_FENCED_CODE: + // first line becomes info string + $this->setExtra('info', CommonMark_Util_RegexHelper::unescape(trim($this->strings->first()))); + if ($this->strings->count() == 1) { + $this->stringContent = ''; + } else { + $this->stringContent = implode("\n", $this->strings->slice(1)) . "\n"; + } + break; + + case self::TYPE_LIST: + $this->setExtra('tight', true); // tight by default + + $numItems = $this->children->count(); + $i = 0; + while ($i < $numItems) { + /** @var BlockElement $item */ + $item = $this->children->get($i); + // check for non-final list item ending with blank line: + $lastItem = $i == $numItems - 1; + if ($item->endsWithBlankLine() && !$lastItem) { + $this->setExtra('tight', false); + break; + } + + // Recurse into children of list item, to see if there are + // spaces between any of them: + $numSubItems = $item->getChildren()->count(); + $j = 0; + while ($j < $numSubItems) { + $subItem = $item->getChildren()->get($j); + $lastSubItem = $j == $numSubItems - 1; + if ($subItem->endsWithBlankLine() && !($lastItem && $lastSubItem)) { + $this->setExtra('tight', false); + break; + } + + $j++; + } + + $i++; + } + + break; + + default: + break; + } + } + + /** + * @param InlineParser $inlineParser + * @param ReferenceMap $refMap + */ + public function processInlines(CommonMark_InlineParser $inlineParser, CommonMark_Reference_ReferenceMap $refMap) + { + switch ($this->getType()) { + case self::TYPE_PARAGRAPH: + case self::TYPE_SETEXT_HEADER: + case self::TYPE_ATX_HEADER: + $this->inlineContent = $inlineParser->parse(trim($this->stringContent), $refMap); + $this->stringContent = ''; + break; + default: + break; + } + + if ($this->hasChildren()) { + foreach ($this->getChildren() as $child) { + $child->processInlines($inlineParser, $refMap); + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineCreator.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineCreator.php" new file mode 100644 index 0000000..34361d8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineCreator.php" @@ -0,0 +1,125 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Provides static methods to simplify and standardize the creation of inline elements + */ +class CommonMark_Element_InlineCreator +{ + /** + * @param string $code + * + * @return InlineElement + */ + public static function createCode($code) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_CODE, array('c' => $code)); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createEmph($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_EMPH, array('c' => $contents)); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createEntity($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_ENTITY, array('c' => $contents)); + } + + /** + * @return InlineElement + */ + public static function createHardbreak() + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_HARDBREAK); + } + + /** + * @param string $html + * + * @return InlineElement + */ + public static function createHtml($html) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_HTML, array('c' => $html)); + } + + /** + * @param string $destination + * @param string|ArrayCollection|null $label + * @param string|null $title + * + * @return InlineElement + */ + public static function createLink($destination, $label = null, $title = null) + { + $attr = array('destination' => $destination); + + if (is_string($label)) { + $attr['label'] = array(self::createString($label)); + } elseif (is_object($label) && $label instanceof CommonMark_Util_ArrayCollection) { + $attr['label'] = $label->toArray(); + } elseif (empty($label)) { + $attr['label'] = array(self::createString($destination)); + } else { + $attr['label'] = $label; + } + + if ($title) { + $attr['title'] = $title; + } + + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_LINK, $attr); + } + + /** + * @return InlineElement + */ + public static function createSoftbreak() + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_SOFTBREAK); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createString($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_STRING, array('c' => $contents)); + } + + /** + * @param string $contents + * + * @return InlineElement + */ + public static function createStrong($contents) + { + return new CommonMark_Element_InlineElement(CommonMark_Element_InlineElement::TYPE_STRONG, array('c' => $contents)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElement.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElement.php" new file mode 100644 index 0000000..f6931ba --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElement.php" @@ -0,0 +1,114 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Inline element + */ +class CommonMark_Element_InlineElement implements CommonMark_Element_InlineElementInterface +{ + const TYPE_CODE = 'Code'; + const TYPE_EMPH = 'Emph'; + const TYPE_ENTITY = 'Entity'; + const TYPE_HARDBREAK = 'Hardbreak'; + const TYPE_HTML = 'Html'; + const TYPE_IMAGE = 'Image'; + const TYPE_LINK = 'Link'; + const TYPE_SOFTBREAK = 'Softbreak'; + const TYPE_STRING = 'Str'; + const TYPE_STRONG = 'Strong'; + + /** + * @var mixed + */ + protected $type; + + /** + * @var array + */ + protected $attributes; + + /** + * @param mixed $type + * @param array $attributes + */ + public function __construct($type, array $attributes = array()) + { + $this->type = $type; + $this->attributes = $attributes; + } + + /** + * @return mixed + */ + public function getType() + { + return $this->type; + } + + /** + * @param string $type + * + * @return $this + */ + public function setType($type) + { + $this->type = $type; + + return $this; + } + + /** + * @return mixed|null + */ + public function getContents() + { + return $this->getAttribute('c'); + } + + /** + * @param mixed $contents + * + * @return $this + */ + public function setContents($contents) + { + $this->setAttribute('c', $contents); + + return $this; + } + + /** + * @param string $attrName + * + * @return mixed|null + */ + public function getAttribute($attrName) + { + return isset($this->attributes[$attrName]) ? $this->attributes[$attrName] : null; + } + + /** + * @param string $attrName + * @param mixed $value + * + * @return $this + */ + public function setAttribute($attrName, $value) + { + $this->attributes[$attrName] = $value; + + return $this; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" new file mode 100644 index 0000000..98bed54 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Element/InlineElementInterface.php" @@ -0,0 +1,56 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +interface CommonMark_Element_InlineElementInterface +{ + /** + * @return $string + */ + public function getType(); + + /** + * @param string $type + * + * @return $this + */ + public function setType($type); + + /** + * @return mixed + */ + public function getContents(); + + /** + * @param mixed $contents + * + * @return $this + */ + public function setContents($contents); + + /** + * @param string $attrName + * + * @return mixed + */ + public function getAttribute($attrName); + + /** + * @param string $attrName + * @param mixed $value + * + * @return $this + */ + public function setAttribute($attrName, $value); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/HtmlRenderer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/HtmlRenderer.php" new file mode 100644 index 0000000..b3bcbb9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/HtmlRenderer.php" @@ -0,0 +1,261 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Renders a parsed AST to HTML + */ +class CommonMark_HtmlRenderer +{ + protected $blockSeparator = "\n"; + protected $innerSeparator = "\n"; + protected $softBreak = "\n"; + + /** + * @param string $string + * @param bool $preserveEntities + * + * @return string + * + * @todo: Can we use simple find/replace instead? + */ + protected function escape($string, $preserveEntities = false) + { + if ($preserveEntities) { + $string = preg_replace('/[&](?![#](x[a-f0-9]{1,8}|[0-9]{1,8});|[a-z][a-z0-9]{1,31};)/i', '&', $string); + } else { + $string = preg_replace('/[&]/', '&', $string); + } + + $string = preg_replace('/[<]/', '<', $string); + $string = preg_replace('/[>]/', '>', $string); + $string = preg_replace('/["]/', '"', $string); + + return $string; + } + + /** + * Helper function to produce content in a pair of HTML tags. + * + * @param string $tag + * @param array $attribs + * @param string|null $contents + * @param bool $selfClosing + * + * @return string + */ + protected function inTags($tag, $attribs = array(), $contents = null, $selfClosing = false) + { + $result = '<' . $tag; + + foreach ($attribs as $key => $value) { + $result .= ' ' . $key . '="' . $value . '"'; + + } + + if ($contents) { + $result .= '>' . $contents . ''; + } elseif ($selfClosing) { + $result .= ' />'; + } else { + $result .= '>'; + } + + return $result; + } + + /** + * @param InlineElementInterface $inline + * + * @return mixed|string + * + * @throws \InvalidArgumentException + */ + public function renderInline(CommonMark_Element_InlineElementInterface $inline) + { + $attrs = array(); + switch ($inline->getType()) { + case CommonMark_Element_InlineElement::TYPE_STRING: + return $this->escape($inline->getContents()); + case CommonMark_Element_InlineElement::TYPE_SOFTBREAK: + return $this->softBreak; + case CommonMark_Element_InlineElement::TYPE_HARDBREAK: + return $this->inTags('br', array(), '', true) . "\n"; + case CommonMark_Element_InlineElement::TYPE_EMPH: + return $this->inTags('em', array(), $this->renderInlines($inline->getContents())); + case CommonMark_Element_InlineElement::TYPE_STRONG: + return $this->inTags('strong', array(), $this->renderInlines($inline->getContents())); + case CommonMark_Element_InlineElement::TYPE_HTML: + return $inline->getContents(); + case CommonMark_Element_InlineElement::TYPE_ENTITY: + return $inline->getContents(); + case CommonMark_Element_InlineElement::TYPE_LINK: + $attrs['href'] = $this->escape($inline->getAttribute('destination'), true); + if ($title = $inline->getAttribute('title')) { + $attrs['title'] = $this->escape($title, true); + } + + return $this->inTags('a', $attrs, $this->renderInlines($inline->getAttribute('label'))); + case CommonMark_Element_InlineElement::TYPE_IMAGE: + $attrs['src'] = $this->escape($inline->getAttribute('destination'), true); + $attrs['alt'] = $this->escape($this->renderInlines($inline->getAttribute('label'))); + if ($title = $inline->getAttribute('title')) { + $attrs['title'] = $this->escape($title, true); + } + + return $this->inTags('img', $attrs, '', true); + case CommonMark_Element_InlineElement::TYPE_CODE: + return $this->inTags('code', array(), $this->escape($inline->getContents())); + default: + throw new InvalidArgumentException('Unknown inline type: ' . $inline->getType()); + } + } + + /** + * @param InlineElement[] $inlines + * + * @return string + */ + public function renderInlines($inlines) + { + $result = array(); + foreach ($inlines as $inline) { + $result[] = $this->renderInline($inline); + } + + return implode('', $result); + } + + /** + * @param BlockElement $block + * @param bool $inTightList + * + * @return string + * + * @throws \RuntimeException + */ + public function renderBlock(CommonMark_Element_BlockElement $block, $inTightList = false) + { + switch ($block->getType()) { + case CommonMark_Element_BlockElement::TYPE_DOCUMENT: + $wholeDoc = $this->renderBlocks($block->getChildren()); + + return $wholeDoc === '' ? '' : $wholeDoc . "\n"; + case CommonMark_Element_BlockElement::TYPE_PARAGRAPH: + if ($inTightList) { + return $this->renderInlines($block->getInlineContent()); + } else { + return $this->inTags('p', array(), $this->renderInlines($block->getInlineContent())); + } + break; + case CommonMark_Element_BlockElement::TYPE_BLOCK_QUOTE: + $filling = $this->renderBlocks($block->getChildren()); + if ($filling === '') { + return $this->inTags('blockquote', array(), $this->innerSeparator); + } else { + return $this->inTags( + 'blockquote', + array(), + $this->innerSeparator . $filling . $this->innerSeparator + ); + } + case CommonMark_Element_BlockElement::TYPE_LIST_ITEM: + return trim($this->inTags('li', array(), $this->renderBlocks($block->getChildren(), $inTightList))); + case CommonMark_Element_BlockElement::TYPE_LIST: + $listData = $block->getExtra('list_data'); + $start = isset($listData['start']) ? $listData['start'] : null; + + $tag = $listData['type'] == CommonMark_Element_BlockElement::LIST_TYPE_UNORDERED ? 'ul' : 'ol'; + $attr = (!$start || $start == 1) ? + array() : array('start' => (string)$start); + + return $this->inTags( + $tag, + $attr, + $this->innerSeparator . $this->renderBlocks( + $block->getChildren(), + $block->getExtra('tight') + ) . $this->innerSeparator + ); + case CommonMark_Element_BlockElement::TYPE_ATX_HEADER: + case CommonMark_Element_BlockElement::TYPE_SETEXT_HEADER: + $tag = 'h' . $block->getExtra('level'); + + return $this->inTags($tag, array(), $this->renderInlines($block->getInlineContent())); + + case CommonMark_Element_BlockElement::TYPE_INDENTED_CODE: + return $this->inTags( + 'pre', + array(), + $this->inTags('code', array(), $this->escape($block->getStringContent())) + ); + + case CommonMark_Element_BlockElement::TYPE_FENCED_CODE: + $infoWords = preg_split('/ +/', $block->getExtra('info')); + $attr = count($infoWords) === 0 || strlen( + $infoWords[0] + ) === 0 ? array() : array('class' => 'language-' . $this->escape($infoWords[0], true)); + return $this->inTags( + 'pre', + array(), + $this->inTags('code', $attr, $this->escape($block->getStringContent())) + ); + + case CommonMark_Element_BlockElement::TYPE_HTML_BLOCK: + return $block->getStringContent(); + + case CommonMark_Element_BlockElement::TYPE_REFERENCE_DEF: + return ''; + + case CommonMark_Element_BlockElement::TYPE_HORIZONTAL_RULE: + return $this->inTags('hr', array(), '', true); + + default: + throw new RuntimeException('Unknown block type: ' . $block->getType()); + } + } + + /** + * @param BlockElement[] $blocks + * @param bool $inTightList + * + * @return string + */ + public function renderBlocks($blocks, $inTightList = false) + { + $result = array(); + foreach ($blocks as $block) { + if ($block->getType() !== 'ReferenceDef') { + $result[] = $this->renderBlock($block, $inTightList); + } + } + + return implode($this->blockSeparator, $result); + } + + /** + * @param BlockElement $block + * @param bool $inTightList + * + * @return string + * + * @api + */ + public function render(CommonMark_Element_BlockElement $block, $inTightList = false) + { + return $this->renderBlock($block, $inTightList); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/InlineParser.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/InlineParser.php" new file mode 100644 index 0000000..f461ef5 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/InlineParser.php" @@ -0,0 +1,831 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Parses inline elements + */ +class CommonMark_InlineParser +{ + /** + * @var string + */ + protected $subject; + + /** + * @var int + */ + protected $labelNestLevel = 0; // Used by parseLinkLabel method + + /** + * @var int + */ + protected $pos = 0; + + /** + * @var ReferenceMap + */ + protected $refmap; + + /** + * @var RegexHelper + */ + protected $regexHelper; + + /** + * Constrcutor + */ + public function __construct() + { + $this->refmap = new CommonMark_Reference_ReferenceMap(); + } + + /** + * If re matches at current position in the subject, advance + * position in subject and return the match; otherwise return null + * @param string $re + * + * @return string|null The match (if found); null otherwise + */ + protected function match($re) + { + $matches = array(); + $subject = substr($this->subject, $this->pos); + if (!preg_match($re, $subject, $matches, PREG_OFFSET_CAPTURE)) { + return null; + } + + // [0][0] contains the matched text + // [0][1] contains the index of that match + $this->pos += $matches[0][1] + strlen($matches[0][0]); + + return $matches[0][0]; + } + + /** + * Returns the character at the current subject position, or null if + * there are no more characters + * + * @return string|null + */ + protected function peek() + { + $ch = substr($this->subject, $this->pos, 1); + return false !== $ch && strlen($ch) > 0 ? $ch : null; + } + + /** + * Parse zero or more space characters, including at most one newline + * + * @return int + */ + protected function spnl() + { + $this->match('/^ *(?:\n *)?/'); + + return 1; + } + + // All of the parsers below try to match something at the current position + // in the subject. If they succeed in matching anything, they + // push an inline element onto the 'inlines' list. They return the + // number of characters parsed (possibly 0). + + /** + * Attempt to parse backticks, adding either a backtick code span or a + * literal sequence of backticks to the 'inlines' list. + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int Number of characters parsed + */ + protected function parseBackticks(CommonMark_Util_ArrayCollection $inlines) + { + $startpos = $this->pos; + $ticks = $this->match('/^`+/'); + if (!$ticks) { + return 0; + } + + $afterOpenTicks = $this->pos; + $foundCode = false; + $match = null; + while (!$foundCode && ($match = $this->match('/`+/m'))) { + if ($match == $ticks) { + $c = substr($this->subject, $afterOpenTicks, $this->pos - $afterOpenTicks - strlen($ticks)); + $c = preg_replace('/[ \n]+/', ' ', $c); + $inlines->add(CommonMark_Element_InlineCreator::createCode(trim($c))); + + return ($this->pos - $startpos); + } + } + + // If we go here, we didn't match a closing backtick sequence + $inlines->add(CommonMark_Element_InlineCreator::createString($ticks)); + $this->pos = $afterOpenTicks; + + return ($this->pos - $startpos); + } + + /** + * Parse a backslash-escaped special character, adding either the escaped + * character, a hard line break (if the backslash is followed by a newline), + * or a literal backslash to the 'inlines' list. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseEscaped(CommonMark_Util_ArrayCollection $inlines) + { + $subject = $this->subject; + $pos = $this->pos; + if ($subject[$pos] === '\\') { + if (isset($subject[$pos + 1]) && $subject[$pos + 1] === "\n") { + $inlines->add(CommonMark_Element_InlineCreator::createHardbreak()); + $this->pos = $this->pos + 2; + + return 2; + } elseif (isset($subject[$pos + 1]) && preg_match( + '/' . CommonMark_Util_RegexHelper::REGEX_ESCAPABLE . '/', + $subject[$pos + 1] + ) + ) { + $inlines->add(CommonMark_Element_InlineCreator::createString($subject[$pos + 1])); + $this->pos = $this->pos + 2; + + return 2; + } else { + $this->pos++; + $inlines->add(CommonMark_Element_InlineCreator::createString('\\')); + + return 1; + } + } else { + return 0; + } + } + + /** + * Attempt to parse an autolink (URL or email in pointy brackets) + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseAutolink(CommonMark_Util_ArrayCollection $inlines) + { + $emailRegex = '/^<([a-zA-Z0-9.!#$%&\'*+\\/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*)>/'; + $otherLinkRegex = '/^<(?:coap|doi|javascript|aaa|aaas|about|acap|cap|cid|crid|data|dav|dict|dns|file|ftp|geo|go|gopher|h323|http|https|iax|icap|im|imap|info|ipp|iris|iris.beep|iris.xpc|iris.xpcs|iris.lwz|ldap|mailto|mid|msrp|msrps|mtqp|mupdate|news|nfs|ni|nih|nntp|opaquelocktoken|pop|pres|rtsp|service|session|shttp|sieve|sip|sips|sms|snmp|soap.beep|soap.beeps|tag|tel|telnet|tftp|thismessage|tn3270|tip|tv|urn|vemmi|ws|wss|xcon|xcon-userid|xmlrpc.beep|xmlrpc.beeps|xmpp|z39.50r|z39.50s|adiumxtra|afp|afs|aim|apt|attachment|aw|beshare|bitcoin|bolo|callto|chrome|chrome-extension|com-eventbrite-attendee|content|cvs|dlna-playsingle|dlna-playcontainer|dtn|dvb|ed2k|facetime|feed|finger|fish|gg|git|gizmoproject|gtalk|hcp|icon|ipn|irc|irc6|ircs|itms|jar|jms|keyparc|lastfm|ldaps|magnet|maps|market|message|mms|ms-help|msnim|mumble|mvn|notes|oid|palm|paparazzi|platform|proxy|psyc|query|res|resource|rmi|rsync|rtmp|secondlife|sftp|sgn|skype|smb|soldat|spotify|ssh|steam|svn|teamspeak|things|udp|unreal|ut2004|ventrilo|view-source|webcal|wtai|wyciwyg|xfire|xri|ymsgr):[^<>\x00-\x20]*>/i'; + + if ($m = $this->match($emailRegex)) { + $email = substr($m, 1, -1); + $inlines->add(CommonMark_Element_InlineCreator::createLink('mailto:' . $email, $email)); + + return strlen($m); + } elseif ($m = $this->match($otherLinkRegex)) { + $dest = substr($m, 1, -1); + $inlines->add(CommonMark_Element_InlineCreator::createLink($dest, $dest)); + + return strlen($m); + } else { + return 0; + } + } + + /** + * Attempt to parse a raw HTML tag + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseHtmlTag(CommonMark_Util_ArrayCollection $inlines) + { + if ($m = $this->match(CommonMark_Util_RegexHelper::getInstance()->getHtmlTagRegex())) { + $inlines->add(CommonMark_Element_InlineCreator::createHtml($m)); + + return strlen($m); + } else { + return 0; + } + } + + /** + * Scan a sequence of characters == c, and return information about + * the number of delimiters and whether they are positioned such that + * they can open and/or close emphasis or strong emphasis. A utility + * function for strong/emph parsing. + * + * @param string $char + * + * @return array + */ + protected function scanDelims($char) + { + $numDelims = 0; + $startPos = $this->pos; + + $charBefore = $this->pos === 0 ? "\n" : $this->subject[$this->pos - 1]; + + while ($this->peek() === $char) { + $numDelims++; + $this->pos++; + } + + $peek = $this->peek(); + $charAfter = $peek ? $peek : "\n"; + + $canOpen = $numDelims > 0 && $numDelims <= 3 && !preg_match('/\s/', $charAfter); + $canClose = $numDelims > 0 && $numDelims <= 3 && !preg_match('/\s/', $charBefore); + if ($char === '_') { + $canOpen = $canOpen && !preg_match('/[a-z0-9]/i', $charBefore); + $canClose = $canClose && !preg_match('/[a-z0-9]/i', $charAfter); + } + + $this->pos = $startPos; + + return compact('numDelims', 'canOpen', 'canClose'); + } + + /** + * @param ArrayCollection $inlines + * + * @return int + */ + protected function parseEmphasis(CommonMark_Util_ArrayCollection $inlines) + { + $startPos = $this->pos; + $firstClose = 0; + $nxt = $this->peek(); + if ($nxt == '*' || $nxt == '_') { + $c = $nxt; + } else { + return 0; + } + + // Get opening delimiters + $res = $this->scanDelims($c); + $numDelims = $res['numDelims']; + $this->pos += $numDelims; + + // We provisionally add a literal string. If we match appropriate + // closing delimiters, we'll change this to Strong or Emph. + $inlines->add(CommonMark_Element_InlineCreator::createString(substr($this->subject, $this->pos - $numDelims, $numDelims))); + // Record the position of this opening delimiter: + $delimPos = $inlines->count() - 1; + + if (!$res['canOpen'] || $numDelims === 0) { + return 0; + } + + $firstCloseDelims = 0; + switch ($numDelims) { + case 1: // we started with * or _ + while (true) { + $res = $this->scanDelims($c); + if ($res['numDelims'] >= 1 && $res['canClose']) { + $this->pos += 1; + // Convert the inline at delimpos, currently a string with the delim, + // into an Emph whose contents are the succeeding inlines + $inlines->get($delimPos)->setType(CommonMark_Element_InlineElement::TYPE_EMPH); + $inlines->get($delimPos)->setContents($inlines->slice($delimPos + 1)); + $inlines->splice($delimPos + 1); + break; + } else { + if ($this->parseInline($inlines) === 0) { + break; + } + } + } + + return ($this->pos - $startPos); + + case 2: // We started with ** or __ + while (true) { + $res = $this->scanDelims($c); + if ($res['numDelims'] >= 2 && $res['canClose']) { + $this->pos += 2; + $inlines->get($delimPos)->setType(CommonMark_Element_InlineElement::TYPE_STRONG); + $inlines->get($delimPos)->setContents($inlines->slice($delimPos + 1)); + $inlines->splice($delimPos + 1); + break; + } else { + if ($this->parseInline($inlines) === 0) { + break; + } + } + } + + return ($this->pos - $startPos); + + case 3: // We started with *** or ___ + while (true) { + $res = $this->scanDelims($c); + if ($res['numDelims'] >= 1 && $res['numDelims'] <= 3 && $res['canClose'] && $res['numDelims'] != $firstCloseDelims) { + if ($firstCloseDelims === 1 && $numDelims > 2) { + $res['numDelims'] = 2; + } elseif ($firstCloseDelims === 2) { + $res['numDelims'] = 1; + } elseif ($res['numDelims'] === 3) { + // If we opened with ***, then we interpret *** as ** followed by * + // giving us + $res['numDelims'] = 1; + } + + $this->pos += $res['numDelims']; + + if ($firstClose > 0) { // if we've already passed the first closer: + $targetInline = $inlines->get($delimPos); + if ($firstCloseDelims === 1) { + $targetInline->setType(CommonMark_Element_InlineElement::TYPE_STRONG); + $targetInline->setContents( + array( + CommonMark_Element_InlineCreator::createEmph( + $inlines->slice($delimPos + 1, $firstClose - $delimPos - 1) + ) + ) + ); + } else { + $targetInline->setType(CommonMark_Element_InlineElement::TYPE_EMPH); + $targetInline->setContents( + array( + CommonMark_Element_InlineCreator::createStrong( + $inlines->slice($delimPos + 1, $firstClose - $delimPos - 1) + ) + ) + ); + } + + $targetInline->setContents($targetInline->getContents() + $inlines->slice($firstClose + 1)); + $inlines->splice($delimPos + 1); + break; + } else { + // this is the first closer; for now, add literal string; + // we'll change this when he hit the second closer + $str = substr($this->subject, $this->pos - $res['numDelims'], $this->pos); + $inlines->add(CommonMark_Element_InlineCreator::createString($str)); + $firstClose = $inlines->count() - 1; + $firstCloseDelims = $res['numDelims']; + } + } else { + // Parse another inline element, til we hit the end + if ($this->parseInline($inlines) === 0) { + break; + } + } + } + + return ($this->pos - $startPos); + } + + return 0; + } + + /** + * Attempt to parse link title (sans quotes) + * + * @return null|string The string, or null if no match + */ + protected function parseLinkTitle() + { + if ($title = $this->match(CommonMark_Util_RegexHelper::getInstance()->getLinkTitleRegex())) { + // Chop off quotes from title and unescape + return CommonMark_Util_RegexHelper::unescape(substr($title, 1, strlen($title) - 2)); + } else { + return null; + } + } + + /** + * Attempt to parse link destination + * + * @return null|string The string, or null if no match + */ + protected function parseLinkDestination() + { + if ($res = $this->match(CommonMark_Util_RegexHelper::getInstance()->getLinkDestinationBracesRegex())) { + // Chop off surrounding <..>: + return CommonMark_Util_RegexHelper::unescape(substr($res, 1, strlen($res) - 2)); + } else { + $res = $this->match(CommonMark_Util_RegexHelper::getInstance()->getLinkDestinationRegex()); + if ($res !== null) { + return CommonMark_Util_RegexHelper::unescape($res); + } else { + return null; + } + } + } + + /** + * @return int + */ + protected function parseLinkLabel() + { + if ($this->peek() != '[') { + return 0; + } + + $startPos = $this->pos; + $nestLevel = 0; + if ($this->labelNestLevel > 0) { + // If we've already checked to the end of this subject + // for a label, even with a different starting [, we + // know we won't find one here and we can just return. + // This avoids lots of backtracking. + // Note: nest level 1 would be: [foo [bar] + // nest level 2 would be: [foo [bar [baz] + $this->labelNestLevel--; + + return 0; + } + + $this->pos++; // Advance past [ + while (($c = $this->peek()) !== null && ($c != ']' || $nestLevel > 0)) { + switch ($c) { + case '`': + $this->parseBackticks(new CommonMark_Util_ArrayCollection()); + break; + case '<': + $this->parseAutolink(new CommonMark_Util_ArrayCollection()) || $this->parseHtmlTag( + new CommonMark_Util_ArrayCollection() + ) || $this->parseString(new CommonMark_Util_ArrayCollection()); // TODO: Does PHP support this use of "||"? + break; + case '[': // nested [] + $nestLevel++; + $this->pos++; + break; + case ']': //nested [] + $nestLevel--; + $this->pos++; + break; + case '\\': + $this->parseEscaped(new CommonMark_Util_ArrayCollection()); + break; + default: + $this->parseString(new CommonMark_Util_ArrayCollection()); + } + } + + if ($c === ']') { + $this->labelNestLevel = 0; + $this->pos++; // advance past ] + + return $this->pos - $startPos; + } else { + if ($c === null) { + $this->labelNestLevel = $nestLevel; + } + + $this->pos = $startPos; + + return 0; + } + } + + /** + * Parse raw link label, including surrounding [], and return + * inline contents. + * + * @param string $s + * + * @return ArrayCollection|InlineElementInterface[] Inline contents + */ + private function parseRawLabel($s) + { + // note: parse without a refmap; we don't want links to resolve + // in nested brackets! + $parser = new self(); + $substring = substr($s, 1, strlen($s) - 2); + + return $parser->parse($substring, new CommonMark_Reference_ReferenceMap()); + } + + /** + * Attempt to parse a link. If successful, add the link to inlines. + * @param ArrayCollection $inlines + * + * @return int + */ + protected function parseLink(CommonMark_Util_ArrayCollection $inlines) + { + $startPos = $this->pos; + $n = $this->parseLinkLabel(); + if ($n === 0) { + return 0; + } + + $rawLabel = substr($this->subject, $startPos, $n); + + // if we got this far, we've parsed a label. + // Try to parse an explicit link: [label](url "title") + if ($this->peek() == '(') { + $this->pos++; + if ($this->spnl() && + (($dest = $this->parseLinkDestination()) !== null) && + $this->spnl() + ) { + // make sure there's a space before the title: + if (preg_match('/^\\s/', $this->subject[$this->pos - 1])) { + $title = $this->parseLinkTitle(); + $title = $title ? $title : ''; + } else { + $title = null; + } + + if ($this->spnl() && $this->match('/^\\)/')) { + $inlines->add(CommonMark_Element_InlineCreator::createLink($dest, $this->parseRawLabel($rawLabel), $title)); + + return $this->pos - $startPos; + } + } + + $this->pos = $startPos; + + return 0; + } + + // If we're here, it wasn't an explicit link. Try to parse a reference link. + // first, see if there's another label + $savePos = $this->pos; + $this->spnl(); + $beforeLabel = $this->pos; + $n = $this->parseLinkLabel(); + if ($n == 2) { + // empty second label + $refLabel = $rawLabel; + } elseif ($n > 0) { + $refLabel = substr($this->subject, $beforeLabel, $n); + } else { + $this->pos = $savePos; + $refLabel = $rawLabel; + } + + // Lookup rawLabel in refmap + if ($link = $this->refmap->getReference($refLabel)) { + $inlines->add( + CommonMark_Element_InlineCreator::createLink($link->getDestination(), $this->parseRawLabel($rawLabel), $link->getTitle()) + ); + + return $this->pos - $startPos; + } + + // Nothing worked, rewind: + $this->pos = $startPos; + + return 0; + } + + /** + * Attempt to parse an entity, adding to inlines if successful + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseEntity(CommonMark_Util_ArrayCollection $inlines) + { + if ($m = $this->match('/^&(?:#x[a-f0-9]{1,8}|#[0-9]{1,8}|[a-z][a-z0-9]{1,31});/i')) { + $inlines->add(CommonMark_Element_InlineCreator::createEntity($m)); + + return strlen($m); + } + + return 0; + } + + /** + * Parse a run of ordinary characters, or a single character with + * a special meaning in markdown, as a plain string, adding to inlines. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseString(CommonMark_Util_ArrayCollection $inlines) + { + if ($m = $this->match(CommonMark_Util_RegexHelper::getInstance()->getMainRegex())) { + $inlines->add(CommonMark_Element_InlineCreator::createString($m)); + + return strlen($m); + } + + return 0; + } + + /** + * Parse a newline. If it was preceded by two spaces, return a hard + * line break; otherwise a soft line break. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseNewline(CommonMark_Util_ArrayCollection $inlines) + { + if ($this->peek() == "\n") { + $this->pos++; + $last = $inlines->last(); + if ($last && $last->getType() == CommonMark_Element_InlineElement::TYPE_STRING && substr($last->getContents(), -2) == ' ') { + $last->setContents(rtrim($last->getContents(), ' ')); + $inlines->add(CommonMark_Element_InlineCreator::createHardbreak()); + } else { + if ($last && $last->getType() == CommonMark_Element_InlineElement::TYPE_STRING && substr( + $last->getContents(), + -1 + ) == ' ' + ) { + $last->setContents(substr($last->getContents(), 0, -1)); + } + $inlines->add(CommonMark_Element_InlineCreator::createSoftbreak()); + } + + return 1; + } + + return 0; + } + + /** + * @param ArrayCollection $inlines + * + * @return int + * + * @throws \RuntimeException + */ + protected function parseImage(CommonMark_Util_ArrayCollection $inlines) + { + if ($this->match('/^!/')) { + $n = $this->parseLink($inlines); + if ($n === 0) { + $inlines->add(CommonMark_Element_InlineCreator::createString('!')); + + return 1; + } + + /** @var InlineElementInterface $last */ + $last = $inlines->last(); + + if ($last && $last->getType() == CommonMark_Element_InlineElement::TYPE_LINK) { + $last->setType(CommonMark_Element_InlineElement::TYPE_IMAGE); + + return $n + 1; + } else { + // This shouldn't happen + throw new RuntimeException('Unknown error occurred while attempting to parse an image'); + } + } else { + return 0; + } + } + + /** + * Parse the next inline element in subject, advancing subject position + * and adding the result to 'inlines'. + * + * @param \ColinODell\CommonMark\Util\ArrayCollection $inlines + * + * @return int + */ + protected function parseInline(CommonMark_Util_ArrayCollection $inlines) + { + $c = $this->peek(); + $res = null; + + switch ($c) { + case "\n": + $res = $this->parseNewline($inlines); + break; + case '\\': + $res = $this->parseEscaped($inlines); + break; + case '`': + $res = $this->parseBackticks($inlines); + break; + case '*': + case '_': + $res = $this->parseEmphasis($inlines); + break; + case '[': + $res = $this->parseLink($inlines); + break; + case '!': + $res = $this->parseImage($inlines); + break; + case '<': + $res = $this->parseAutolink($inlines); + $res = $res ? $res : $this->parseHtmlTag($inlines); + break; + case '&': + $res = $this->parseEntity($inlines); + break; + default: + // Nothing + } + + return $res ? $res : $this->parseString($inlines); + } + + /** + * Parse s as a list of inlines, using refmap to resolve references. + * + * @param string $s + * @param ReferenceMap $refMap + * + * @return ArrayCollection|InlineElementInterface[] + */ + protected function parseInlines($s, CommonMark_Reference_ReferenceMap $refMap) + { + $this->subject = $s; + $this->pos = 0; + $this->refmap = $refMap; + $inlines = new CommonMark_Util_ArrayCollection(); + while ($this->parseInline($inlines)) { + ; + } + + return $inlines; + } + + /** + * @param string $s + * @param ReferenceMap $refMap + * + * @return ArrayCollection|Element\InlineElementInterface[] + */ + public function parse($s, CommonMark_Reference_ReferenceMap $refMap) + { + return $this->parseInlines($s, $refMap); + } + + /** + * Attempt to parse a link reference, modifying refmap. + * @param string $s + * @param ReferenceMap $refMap + * + * @return int + */ + public function parseReference($s, CommonMark_Reference_ReferenceMap $refMap) + { + $this->subject = $s; + $this->pos = 0; + $startPos = $this->pos; + + // label: + $matchChars = $this->parseLinkLabel(); + if ($matchChars === 0) { + return 0; + } else { + $label = substr($this->subject, 0, $matchChars); + } + + // colon: + if ($this->peek() === ':') { + $this->pos++; + } else { + $this->pos = $startPos; + + return 0; + } + + // link url + $this->spnl(); + + $destination = $this->parseLinkDestination(); + if ($destination === null || strlen($destination) === 0) { + $this->pos = $startPos; + + return 0; + } + + $beforeTitle = $this->pos; + $this->spnl(); + $title = $this->parseLinkTitle(); + if ($title === null) { + $title = ''; + // rewind before spaces + $this->pos = $beforeTitle; + } + + // make sure we're at line end: + if ($this->match('/^ *(?:\n|$)/') === null) { + $this->pos = $startPos; + + return 0; + } + + if (!$refMap->contains($label)) { + $refMap->addReference(new CommonMark_Reference_Reference($label, $destination, $title)); + } + + return $this->pos - $startPos; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/Reference.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/Reference.php" new file mode 100644 index 0000000..40ab748 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/Reference.php" @@ -0,0 +1,92 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + + +/** + * Link reference + */ +class CommonMark_Reference_Reference +{ + /** + * @var string + */ + protected $label; + + /** + * @var string + */ + protected $destination; + + /** + * @var string + */ + protected $title; + + /** + * Constructor + * + * @param string $label + * @param string $destination + * @param string $title + */ + public function __construct($label, $destination, $title) + { + $this->label = self::normalizeReference($label); + $this->destination = $destination; + $this->title = $title; + } + + /** + * @return string + */ + public function getLabel() + { + return $this->label; + } + + /** + * @return string + */ + public function getDestination() + { + return $this->destination; + } + + /** + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Normalize reference label + * + * This enables case-insensitive label matching + * + * @param string $string + * + * @return string + */ + public static function normalizeReference($string) + { + // Collapse internal whitespace to single space and remove + // leading/trailing whitespace + $string = preg_replace('/\s+/', '', trim($string)); + + return Typecho_Common::strToUpper($string, 'UTF-8'); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" new file mode 100644 index 0000000..c6b23c5 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Reference/ReferenceMap.php" @@ -0,0 +1,66 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * A collection of references, indexed by label + */ +class CommonMark_Reference_ReferenceMap +{ + /** + * @var Reference[] + */ + protected $references = array(); + + /** + * @param Reference $reference + * + * @return $this + */ + public function addReference(CommonMark_Reference_Reference $reference) + { + $key = CommonMark_Reference_Reference::normalizeReference($reference->getLabel()); + $this->references[$key] = $reference; + + return $this; + } + + /** + * @param string $label + * + * @return bool + */ + public function contains($label) + { + $label = CommonMark_Reference_Reference::normalizeReference($label); + + return isset($this->references[$label]); + } + + /** + * @param string $label + * + * @return Reference|null + */ + public function getReference($label) + { + $label = CommonMark_Reference_Reference::normalizeReference($label); + + if (isset($this->references[$label])) { + return $this->references[$label]; + } else { + return null; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/ArrayCollection.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/ArrayCollection.php" new file mode 100644 index 0000000..68dbc73 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/ArrayCollection.php" @@ -0,0 +1,225 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Array collection + * + * Provides a wrapper around a standard PHP array. + */ +class CommonMark_Util_ArrayCollection implements IteratorAggregate, Countable, ArrayAccess +{ + /** + * @var array + */ + private $elements; + + /** + * Constructor + * @param array $elements + */ + public function __construct(array $elements = array()) + { + $this->elements = $elements; + } + + /** + * @return mixed + */ + public function first() + { + return reset($this->elements); + } + + /** + * @return mixed + */ + public function last() + { + return end($this->elements); + } + + /** + * Retrieve an external iterator + * + * @return \Traversable + */ + public function getIterator() + { + return new ArrayIterator($this->elements); + } + + /** + * @param mixed $element + * + * @return bool + */ + public function add($element) + { + $this->elements[] = $element; + + return true; + } + + /** + * @param mixed $key + * @param mixed $value + */ + public function set($key, $value) + { + $this->elements[$key] = $value; + } + + /** + * @param mixed $key + * + * @return mixed|null + */ + public function get($key) + { + return isset($this->elements[$key]) ? $this->elements[$key] : null; + } + + /** + * @param mixed $key + * + * @return mixed|null + */ + public function remove($key) + { + if (!isset($this->elements[$key]) && !array_key_exists($key, $this->elements)) { + return null; + } + + $removed = $this->elements[$key]; + unset($this->elements[$key]); + + return $removed; + } + + /** + * @return bool + */ + public function isEmpty() + { + return empty($this->elements); + } + + /** + * @param mixed $key + * + * @return bool + */ + public function containsKey($key) + { + return isset($this->elements[$key]) || array_key_exists($key, $this->elements); + } + + /** + * Count elements of an object + * + * @return int The count as an integer. + */ + public function count() + { + return count($this->elements); + } + + /** + * Whether an offset exists + * + * @param mixed $offset An offset to check for. + * + * @return boolean true on success or false on failure. + */ + public function offsetExists($offset) + { + return $this->containsKey($offset); + } + + /** + * Offset to retrieve + * @param mixed $offset The offset to retrieve. + * + * @return mixed|null + */ + public function offsetGet($offset) + { + return $this->get($offset); + } + + /** + * Offset to set + * @param mixed $offset The offset to assign the value to. + * @param mixed $value The value to set. + * + * @return void + */ + public function offsetSet($offset, $value) + { + if (!isset($offset)) { + $this->add($value); + } else { + $this->set($offset, $value); + } + } + + /** + * Offset to unset + * @param mixed $offset The offset to unset. + * + * @return void + */ + public function offsetUnset($offset) + { + $this->remove($offset); + } + + /** + * Returns a subset of the array + * @param int $offset + * @param int|null $length + * + * @return array + */ + public function slice($offset, $length = null) + { + return array_slice($this->elements, $offset, $length, true); + } + + /** + * Remove a subset of the array + * + * The removed part will be returned + * + * @param int $offset + * @param int|null $length + * @param array $replacement + * + * @return array The removed subset + */ + public function splice($offset, $length = null, $replacement = array()) + { + if ($length === null) { + $length = count($this->elements); + } + + return array_splice($this->elements, $offset, $length, $replacement); + } + + /** + * @return array + */ + public function toArray() + { + return $this->elements; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/RegexHelper.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/RegexHelper.php" new file mode 100644 index 0000000..6621eca --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/CommonMark/Util/RegexHelper.php" @@ -0,0 +1,252 @@ + + * + * Original code based on stmd.js + * - (c) John MacFarlane + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Provides regular expressions and utilties for parsing Markdown + * + * Singletons are generally bad, but it allows us to build the regexes once (and only once). + */ +class CommonMark_Util_RegexHelper +{ + const ESCAPABLE = 0; + const ESCAPED_CHAR = 1; + const IN_DOUBLE_QUOTES = 2; + const IN_SINGLE_QUOTES = 3; + const IN_PARENS = 4; + const REG_CHAR = 5; + const IN_PARENS_NOSP = 6; + const TAGNAME = 7; + const BLOCKTAGNAME = 8; + const ATTRIBUTENAME = 9; + const UNQUOTEDVALUE = 10; + const SINGLEQUOTEDVALUE = 11; + const DOUBLEQUOTEDVALUE = 12; + const ATTRIBUTEVALUE = 13; + const ATTRIBUTEVALUESPEC = 14; + const ATTRIBUTE = 15; + const OPENTAG = 16; + const CLOSETAG = 17; + const OPENBLOCKTAG = 18; + const CLOSEBLOCKTAG = 19; + const HTMLCOMMENT = 20; + const PROCESSINGINSTRUCTION = 21; + const DECLARATION = 22; + const CDATA = 23; + const HTMLTAG = 24; + const HTMLBLOCKOPEN = 25; + const LINK_TITLE = 26; + + const REGEX_ESCAPABLE = '[!"#$%&\'()*+,.\/:;<=>?@[\\\\\]^_`{|}~-]'; + + protected $regex = array(); + + static protected $instance; + + /** + * Constructor + */ + protected function __construct() + { + $this->buildRegexPatterns(); + } + + /** + * @return RegexHelper + */ + public static function getInstance() + { + if (self::$instance === null) { + self::$instance = new CommonMark_Util_RegexHelper(); + } + + return self::$instance; + } + + /** + * Builds the regular expressions required to parse Markdown + * + * We could hard-code them all as pre-built constants, but that would be more difficult to manage. + */ + protected function buildRegexPatterns() + { + $regex = array(); + $regex[self::ESCAPABLE] = self::REGEX_ESCAPABLE; + $regex[self::ESCAPED_CHAR] = '\\\\' . $regex[self::ESCAPABLE]; + $regex[self::IN_DOUBLE_QUOTES] = '"(' . $regex[self::ESCAPED_CHAR] . '|[^"\x00])*"'; + $regex[self::IN_SINGLE_QUOTES] = '\'(' . $regex[self::ESCAPED_CHAR] . '|[^\'\x00])*\''; + $regex[self::IN_PARENS] = '\\((' . $regex[self::ESCAPED_CHAR] . '|[^)\x00])*\\)'; + $regex[self::REG_CHAR] = '[^\\\\()\x00-\x20]'; + $regex[self::IN_PARENS_NOSP] = '\((' . $regex[self::REG_CHAR] . '|' . $regex[self::ESCAPED_CHAR] . ')*\)'; + $regex[self::TAGNAME] = '[A-Za-z][A-Za-z0-9]*'; + $regex[self::BLOCKTAGNAME] = '(?:article|header|aside|hgroup|iframe|blockquote|hr|body|li|map|button|object|canvas|ol|caption|output|col|p|colgroup|pre|dd|progress|div|section|dl|table|td|dt|tbody|embed|textarea|fieldset|tfoot|figcaption|th|figure|thead|footer|footer|tr|form|ul|h1|h2|h3|h4|h5|h6|video|script|style)'; + $regex[self::ATTRIBUTENAME] = '[a-zA-Z_:][a-zA-Z0-9:._-]*'; + $regex[self::UNQUOTEDVALUE] = '[^"\'=<>`\x00-\x20]+'; + $regex[self::SINGLEQUOTEDVALUE] = '\'[^\']*\''; + $regex[self::DOUBLEQUOTEDVALUE] = '"[^"]*"'; + $regex[self::ATTRIBUTEVALUE] = '(?:' . $regex[self::UNQUOTEDVALUE] . '|' . $regex[self::SINGLEQUOTEDVALUE] . '|' . $regex[self::DOUBLEQUOTEDVALUE] . ')'; + $regex[self::ATTRIBUTEVALUESPEC] = '(?:' . '\s*=' . '\s*' . $regex[self::ATTRIBUTEVALUE] . ')'; + $regex[self::ATTRIBUTE] = '(?:' . '\s+' . $regex[self::ATTRIBUTENAME] . $regex[self::ATTRIBUTEVALUESPEC] . '?)'; + $regex[self::OPENTAG] = '<' . $regex[self::TAGNAME] . $regex[self::ATTRIBUTE] . '*' . '\s*\/?>'; + $regex[self::CLOSETAG] = '<\/' . $regex[self::TAGNAME] . '\s*[>]'; + $regex[self::OPENBLOCKTAG] = '<' . $regex[self::BLOCKTAGNAME] . $regex[self::ATTRIBUTE] . '*' . '\s*\/?>'; + $regex[self::CLOSEBLOCKTAG] = '<\/' . $regex[self::BLOCKTAGNAME] . '\s*[>]'; + $regex[self::HTMLCOMMENT] = ''; + $regex[self::PROCESSINGINSTRUCTION] = '[<][?].*?[?][>]'; + $regex[self::DECLARATION] = ']*>'; + $regex[self::CDATA] = '])*\]\]>'; + $regex[self::HTMLTAG] = '(?:' . $regex[self::OPENTAG] . '|' . $regex[self::CLOSETAG] . '|' . $regex[self::HTMLCOMMENT] . '|' . + $regex[self::PROCESSINGINSTRUCTION] . '|' . $regex[self::DECLARATION] . '|' . $regex[self::CDATA] . ')'; + $regex[self::HTMLBLOCKOPEN] = '<(?:' . $regex[self::BLOCKTAGNAME] . '[\s\/>]' . '|' . + '\/' . $regex[self::BLOCKTAGNAME] . '[\s>]' . '|' . '[?!])'; + $regex[self::LINK_TITLE] = '^(?:"(' . $regex[self::ESCAPED_CHAR] . '|[^"\x00])*"' . + '|' . '\'(' . $regex[self::ESCAPED_CHAR] . '|[^\'\x00])*\'' . + '|' . '\((' . $regex[self::ESCAPED_CHAR] . '|[^)\x00])*\))'; + + $this->regex = $regex; + } + + /** + * Returns a partial regex + * + * It'll need to be wrapped with /.../ before use + * @param int $const + * + * @return string + */ + public function getPartialRegex($const) + { + return $this->regex[$const]; + } + + /** + * @return string + */ + public function getHtmlTagRegex() + { + return '/^' . $this->regex[self::HTMLTAG] . '/i'; + } + + /** + * @return string + */ + public function getHtmlBlockOpenRegex() + { + return '/^' . $this->regex[self::HTMLBLOCKOPEN] . '/i'; + } + + /** + * @return string + */ + public function getLinkTitleRegex() + { + return '/' . $this->regex[self::LINK_TITLE] . '/'; + } + + /** + * @return string + */ + public function getLinkDestinationRegex() + { + return '/^' . '(?:' . $this->regex[self::REG_CHAR] . '+|' . $this->regex[self::ESCAPED_CHAR] . '|' . $this->regex[self::IN_PARENS_NOSP] . ')*' . '/'; + } + + /** + * @return string + */ + public function getLinkDestinationBracesRegex() + { + return '/^(?:' . '[<](?:[^<>\\n\\\\\\x00]' . '|' . $this->regex[self::ESCAPED_CHAR] . '|' . '\\\\)*[>]' . ')/'; + } + + /** + * @return string + */ + public function getHRuleRegex() + { + return '/^(?:(?:\* *){3,}|(?:_ *){3,}|(?:- *){3,}) *$/'; + } + + /** + * Matches a character with a special meaning in markdown, + * or a string of non-special characters. + * + * @return string + */ + public function getMainRegex() + { + return '/^(?:[\n`\[\]\\\\!<&*_]|[^\n`\[\]\\\\!<&*_]+)/m'; + } + + /** + * Attempt to match a regex in string s at offset offset + * @param string $regex + * @param string $string + * @param int $offset + * + * @return int|null Index of match, or null + */ + public static function matchAt($regex, $string, $offset) + { + $matches = array(); + $string = substr($string, $offset); + if (!preg_match($regex, $string, $matches, PREG_OFFSET_CAPTURE)) { + return null; + } + + return $offset + $matches[0][1]; + } + + /** + * Functional wrapper around preg_match_all + * + * @param string $pattern + * @param string $subject + * @param int $offset + * + * @return array|null + */ + public static function matchAll($pattern, $subject, $offset = 0) + { + $matches = array(); + $subject = substr($subject, $offset); + preg_match_all($pattern, $subject, $matches, PREG_PATTERN_ORDER); + + $fullMatches = reset($matches); + if (empty($fullMatches)) { + return null; + } + + if (count($fullMatches) == 1) { + foreach ($matches as &$match) { + $match = reset($match); + } + } + + return !empty($matches) ? $matches : null; + } + + /** + * Replace backslash escapes with literal characters + * @param string $string + * + * @return string + */ + public static function unescape($string) + { + $allEscapedChar = '/\\\\(' . self::REGEX_ESCAPABLE . ')/'; + + return preg_replace($allEscapedChar, '$1', $string); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Helper.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Helper.php" new file mode 100644 index 0000000..d1079bc --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Helper.php" @@ -0,0 +1,442 @@ +query($db->update('table.options') + ->rows(array('value' => serialize(Typecho_Plugin::export()))) + ->where('name = ?', 'plugins')); + } catch (Typecho_Plugin_Exception $e) { + //nothing to do + } + + $db->query($db->delete('table.options')->where('name = ?', 'plugin:' . $pluginName)); + } + + /** + * 瀵煎叆璇█椤 + * + * @access public + * @param string $domain + * @return void + */ + public static function lang($domain) + { + $currentLang = Typecho_I18n::getLang(); + if ($currentLang) { + $currentLang = basename($currentLang); + $fileName = dirname(__FILE__) . '/' . $domain . '/lang/' . $currentLang; + if (file_exists($fileName)) { + Typecho_I18n::addLang($fileName); + } + } + } + + /** + * 澧炲姞璺敱 + * + * @access public + * @param string $name 璺敱鍚嶇О + * @param string $url 璺敱璺緞 + * @param string $widget 缁勪欢鍚嶇О + * @param string $action 缁勪欢鍔ㄤ綔 + * @param string $after 鍦ㄦ煇涓矾鐢卞悗闈 + * @return integer + */ + public static function addRoute($name, $url, $widget, $action = NULL, $after = NULL) + { + $routingTable = self::options()->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pos = 0; + foreach ($routingTable as $key => $val) { + $pos ++; + + if ($key == $after) { + break; + } + } + + $pre = array_slice($routingTable, 0, $pos); + $next = array_slice($routingTable, $pos); + + $routingTable = array_merge($pre, array($name => array( + 'url' => $url, + 'widget' => $widget, + 'action' => $action + )), $next); + self::options()->routingTable = $routingTable; + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => serialize($routingTable)) + , $db->sql()->where('name = ?', 'routingTable')); + } + + /** + * 绉婚櫎璺敱 + * + * @access public + * @param string $name 璺敱鍚嶇О + * @return integer + */ + public static function removeRoute($name) + { + $routingTable = self::options()->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + unset($routingTable[$name]); + self::options()->routingTable = $routingTable; + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => serialize($routingTable)) + , $db->sql()->where('name = ?', 'routingTable')); + } + + /** + * 澧炲姞action鎵╁睍 + * + * @access public + * @param string $actionName 闇瑕佹墿灞曠殑action鍚嶇О + * @param string $widgetName 闇瑕佹墿灞曠殑widget鍚嶇О + * @return integer + */ + public static function addAction($actionName, $widgetName) + { + $actionTable = unserialize(self::options()->actionTable); + $actionTable = empty($actionTable) ? array() : $actionTable; + $actionTable[$actionName] = $widgetName; + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->actionTable = serialize($actionTable))) + , $db->sql()->where('name = ?', 'actionTable')); + } + + /** + * 鍒犻櫎action鎵╁睍 + * + * @access public + * @param string $actionName + * @return Typecho_Widget + */ + public static function removeAction($actionName) + { + $actionTable = unserialize(self::options()->actionTable); + $actionTable = empty($actionTable) ? array() : $actionTable; + + if (isset($actionTable[$actionName])) { + unset($actionTable[$actionName]); + reset($actionTable); + } + + $db = Typecho_Db::get(); + return Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->actionTable = serialize($actionTable))) + , $db->sql()->where('name = ?', 'actionTable')); + } + + /** + * 澧炲姞涓涓彍鍗 + * + * @access public + * @param string $menuName 鑿滃崟鍚 + * @return integer + */ + public static function addMenu($menuName) + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['parent'] = empty($panelTable['parent']) ? array() : $panelTable['parent']; + $panelTable['parent'][] = $menuName; + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + + end($panelTable['parent']); + return key($panelTable['parent']) + 10; + } + + /** + * 绉婚櫎涓涓彍鍗 + * + * @access public + * @param string $menuName 鑿滃崟鍚 + * @return integer + */ + public static function removeMenu($menuName) + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['parent'] = empty($panelTable['parent']) ? array() : $panelTable['parent']; + + if (false !== ($index = array_search($menuName, $panelTable['parent']))) { + unset($panelTable['parent'][$index]); + } + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + + return $index + 10; + } + + /** + * 澧炲姞涓涓潰鏉 + * + * @access public + * @param integer $index 鑿滃崟绱㈠紩 + * @param string $fileName 鏂囦欢鍚嶇О + * @param string $title 闈㈡澘鏍囬 + * @param string $subTitle 闈㈡澘鍓爣棰 + * @param string $level 杩涘叆鏉冮檺 + * @param boolean $hidden 鏄惁闅愯棌 + * @param string $addLink 鏂板椤圭洰閾炬帴, 浼氭樉绀哄湪椤甸潰鏍囬涔嬪悗 + * @return integer + */ + public static function addPanel($index, $fileName, $title, $subTitle, $level, $hidden = false, $addLink = '') + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['child'] = empty($panelTable['child']) ? array() : $panelTable['child']; + $panelTable['child'][$index] = empty($panelTable['child'][$index]) ? array() : $panelTable['child'][$index]; + $fileName = urlencode(trim($fileName, '/')); + $panelTable['child'][$index][] = array($title, $subTitle, 'extending.php?panel=' . $fileName, $level, $hidden, $addLink); + + $panelTable['file'] = empty($panelTable['file']) ? array() : $panelTable['file']; + $panelTable['file'][] = $fileName; + $panelTable['file'] = array_unique($panelTable['file']); + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + + end($panelTable['child'][$index]); + return key($panelTable['child'][$index]); + } + + /** + * 绉婚櫎涓涓潰鏉 + * + * @access public + * @param integer $index 鑿滃崟绱㈠紩 + * @param string $fileName 鏂囦欢鍚嶇О + * @return integer + */ + public static function removePanel($index, $fileName) + { + $panelTable = unserialize(self::options()->panelTable); + $panelTable['child'] = empty($panelTable['child']) ? array() : $panelTable['child']; + $panelTable['child'][$index] = empty($panelTable['child'][$index]) ? array() : $panelTable['child'][$index]; + $panelTable['file'] = empty($panelTable['file']) ? array() : $panelTable['file']; + $fileName = urlencode(trim($fileName, '/')); + + if (false !== ($key = array_search($fileName, $panelTable['file']))) { + unset($panelTable['file'][$key]); + } + + $return = 0; + foreach ($panelTable['child'][$index] as $key => $val) { + if ($val[2] == 'extending.php?panel=' . $fileName) { + unset($panelTable['child'][$index][$key]); + $return = $key; + } + } + + $db = Typecho_Db::get(); + Typecho_Widget::widget('Widget_Abstract_Options')->update(array('value' => (self::options()->panelTable = serialize($panelTable))) + , $db->sql()->where('name = ?', 'panelTable')); + return $return; + } + + /** + * 鑾峰彇闈㈡澘url + * + * @access public + * @param string $fileName + * @return string + */ + public static function url($fileName) + { + return Typecho_Common::url('extending.php?panel=' . (trim($fileName, '/')), self::options()->adminUrl); + } + + /** + * 鎵嬪姩閰嶇疆鎻掍欢鍙橀噺 + * + * @access public + * @static + * @param mixed $pluginName 鎻掍欢鍚嶇О + * @param array $settings 鍙橀噺閿煎 + * @param bool $isPersonal. (default: false) 鏄惁涓虹浜哄彉閲 + * @return void + */ + public static function configPlugin($pluginName, array $settings, $isPersonal = false) + { + if (empty($settings)) { + return; + } + + Widget_Plugins_Edit::configPlugin($pluginName, $settings, $isPersonal); + } + + /** + * 璇勮鍥炲鎸夐挳 + * + * @access public + * @param string $theId 璇勮鍏冪礌id + * @param integer $coid 璇勮id + * @param string $word 鎸夐挳鏂囧瓧 + * @param string $formId 琛ㄥ崟id + * @param integer $style 鏍峰紡绫诲瀷 + * @return void + */ + public static function replyLink($theId, $coid, $word = 'Reply', $formId = 'respond', $style = 2) + { + if (self::options()->commentsThreaded) { + echo '' . $word . ''; + } + } + + /** + * 璇勮鍙栨秷鎸夐挳 + * + * @access public + * @param string $word 鎸夐挳鏂囧瓧 + * @param string $formId 琛ㄥ崟id + * @return void + */ + public static function cancleCommentReplyLink($word = 'Cancle', $formId = 'respond') + { + if (self::options()->commentsThreaded) { + echo '' . $word . ''; + } + } + + /** + * 璇勮鍥炲js鑴氭湰 + * + * @access public + * @return void + */ + public static function threadedCommentsScript() + { + if (self::options()->commentsThreaded) { + echo +<< +var typechoAddCommentReply = function (cid, coid, cfid, style) { + var _ce = document.getElementById(cid), _cp = _ce.parentNode; + var _cf = document.getElementById(cfid); + + var _pi = document.getElementById('comment-parent'); + if (null == _pi) { + _pi = document.createElement('input'); + _pi.setAttribute('type', 'hidden'); + _pi.setAttribute('name', 'parent'); + _pi.setAttribute('id', 'comment-parent'); + + var _form = 'form' == _cf.tagName ? _cf : _cf.getElementsByTagName('form')[0]; + + _form.appendChild(_pi); + } + _pi.setAttribute('value', coid); + + if (null == document.getElementById('comment-form-place-holder')) { + var _cfh = document.createElement('div'); + _cfh.setAttribute('id', 'comment-form-place-holder'); + _cf.parentNode.insertBefore(_cfh, _cf); + } + + 1 == style ? (null == _ce.nextSibling ? _cp.appendChild(_cf) + : _cp.insertBefore(_cf, _ce.nextSibling)) : _ce.appendChild(_cf); + + return false; +}; + +var typechoCancleCommentReply = function (cfid) { + var _cf = document.getElementById(cfid), + _cfh = document.getElementById('comment-form-place-holder'); + + var _pi = document.getElementById('comment-parent'); + if (null != _pi) { + _pi.parentNode.removeChild(_pi); + } + + if (null == _cfh) { + return true; + } + + _cfh.parentNode.insertBefore(_cf, _cfh); + return false; +}; + +EOF; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Base64.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Base64.php" new file mode 100644 index 0000000..0afe16e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Base64.php" @@ -0,0 +1,43 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR Base64缂栫爜 + * + * @package IXR + */ +class IXR_Base64 +{ + /** + * 缂栫爜鏁版嵁 + * + * @var string + */ + private $data; + + /** + * 鍒濆鍖栨暟鎹 + * + * @param string $data + */ + public function __construct($data) + { + $this->data = $data; + } + + /** + * 鑾峰彇XML鏁版嵁 + * + * @return string + */ + public function getXml() + { + return '' . base64_encode($this->data) . ''; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Client.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Client.php" new file mode 100644 index 0000000..30098b4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Client.php" @@ -0,0 +1,279 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR瀹㈡埛绔 + * reload by typecho team(http://www.typecho.org) + * + * @package IXR + */ +class IXR_Client +{ + /** 榛樿瀹㈡埛绔 */ + const DEFAULT_USERAGENT = 'The Incutio XML-RPC PHP Library(Reload By Typecho)'; + + /** + * 鏈嶅姟绔湴鍧 + * + * @access private + * @var string + */ + private $server; + + /** + * 绔彛鍚嶇О + * + * @access private + * @var integer + */ + private $port; + + /** + * 璺緞鍚嶇О + * + * @access private + * @var string + */ + private $path; + + /** + * 鍦板潃 + * + * @access private + * @var string + */ + private $url; + + /** + * 瀹㈡埛绔 + * + * @access private + * @var string + */ + private $useragent; + + /** + * 鍥炴墽缁撴瀯浣 + * + * @access private + * @var string + */ + private $response; + + /** + * 娑堟伅浣 + * + * @access private + * @var string + */ + private $message = false; + + /** + * 璋冭瘯寮鍏 + * + * @access private + * @var boolean + */ + private $debug = false; + + /** + * 璇锋眰鍓嶇紑 + * + * @access private + * @var string + */ + private $prefix = NULL; + + // Storage place for an error message + private $error = false; + + /** + * 瀹㈡埛绔瀯閫犲嚱鏁 + * + * @access public + * @param string $server 鏈嶅姟绔湴鍧 + * @param string $path 璺緞鍚嶇О + * @param integer $port 绔彛鍚嶇О + * @param string $useragent 瀹㈡埛绔 + * @return void + */ + public function __construct($server, $path = false, $port = 80, $useragent = self::DEFAULT_USERAGENT, $prefix = NULL) + { + if (!$path) { + $this->url = $server; + + // Assume we have been given a Url instead + $bits = parse_url($server); + $this->server = $bits['host']; + $this->port = isset($bits['port']) ? $bits['port'] : 80; + $this->path = isset($bits['path']) ? $bits['path'] : '/'; + + // Make absolutely sure we have a path + if (isset($bits['query'])) { + $this->path .= '?' . $bits['query']; + } + } else { + /** Typecho_Common */ + require_once 'Typecho/Common.php'; + + $this->url = Typecho_Common::buildUrl(array( + 'scheme' => 'http', + 'host' => $server, + 'path' => $path, + 'port' => $port + )); + + $this->server = $server; + $this->path = $path; + $this->port = $port; + } + + $this->prefix = $prefix; + $this->useragent = $useragent; + } + + /** + * 璁剧疆璋冭瘯妯″紡 + * + * @access public + * @return void + */ + public function __setDebug() + { + $this->debug = true; + } + + /** + * 鎵ц璇锋眰 + * + * @access public + * @return void + */ + public function __rpcCall() + { + $args = func_get_args(); + $method = array_shift($args); + $request = new IXR_Request($method, $args); + $xml = $request->getXml(); + + $client = Typecho_Http_Client::get(); + if (!$client) { + $this->error = new IXR_Error(-32300, 'transport error - could not open socket'); + return false; + } + + $client->setHeader('Content-Type', 'text/xml') + ->setHeader('User-Agent', $this->useragent) + ->setData($xml) + ->send($this->url); + + $contents = $client->getResponseBody(); + + if ($this->debug) { + echo '
      '.htmlspecialchars($contents)."\n
      \n\n"; + } + + // Now parse what we've got back + $this->message = new IXR_Message($contents); + if (!$this->message->parse()) { + // XML error + $this->error = new IXR_Error(-32700, 'parse error. not well formed'); + return false; + } + + // Is the message a fault? + if ($this->message->messageType == 'fault') { + $this->error = new IXR_Error($this->message->faultCode, $this->message->faultString); + return false; + } + + // Message must be OK + return true; + } + + /** + * 澧炲姞鍓嶇紑 + * + * $rpc->metaWeblog->newPost(); + * + * + * @access public + * @param string $prefix 鍓嶇紑 + * @return void + */ + public function __get($prefix) + { + return new IXR_Client($this->server, $this->path, $this->port, $this->useragent, $this->prefix . $prefix . '.'); + } + + /** + * 澧炲姞榄旀湳鐗规 + * by 70 + * + * @access public + * @return mixed + */ + public function __call($method, $args) + { + array_unshift($args, $this->prefix . $method); + $return = call_user_func_array(array($this, '__rpcCall'), $args); + + if ($return) { + return $this->__getResponse(); + } else { + require_once 'IXR/Exception.php'; + throw new IXR_Exception($this->__getErrorMessage(), $this->__getErrorCode()); + } + } + + /** + * 鑾峰緱杩斿洖鍊 + * + * @access public + * @return void + */ + public function __getResponse() + { + // methodResponses can only have one param - return that + return $this->message->params[0]; + } + + /** + * 鏄惁涓洪敊璇 + * + * @access public + * @return void + */ + public function __isError() + { + return (is_object($this->error)); + } + + /** + * 鑾峰彇閿欒浠g爜 + * + * @access public + * @return void + */ + public function __getErrorCode() + { + return $this->error->code; + } + + /** + * 鑾峰彇閿欒娑堟伅 + * + * @access public + * @return void + */ + public function __getErrorMessage() + { + return $this->error->message; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/ClientMulticall.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/ClientMulticall.php" new file mode 100644 index 0000000..6433bdb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/ClientMulticall.php" @@ -0,0 +1,35 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR瀹㈡埛绔 + * + * @package IXR + */ +class IXR_ClientMulticall extends IXR_Client { + var $calls = array(); + function IXR_ClientMulticall($server, $path = false, $port = 80) { + parent::IXR_Client($server, $path, $port); + $this->useragent = 'The Incutio XML-RPC PHP Library (multicall client)'; + } + function addCall() { + $args = func_get_args(); + $methodName = array_shift($args); + $struct = array( + 'methodName' => $methodName, + 'params' => $args + ); + $this->calls[] = $struct; + } + function query() { + // Prepare multicall, then call the parent::query() method + return parent::query('system.multicall', $this->calls); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Date.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Date.php" new file mode 100644 index 0000000..048caae --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Date.php" @@ -0,0 +1,55 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鏃ユ湡 + * + * @package IXR + */ +class IXR_Date { + var $year; + var $month; + var $day; + var $hour; + var $minute; + var $second; + function IXR_Date($time) { + // $time can be a PHP timestamp or an ISO one + if (is_numeric($time)) { + $this->parseTimestamp($time); + } else { + $this->parseIso($time); + } + } + function parseTimestamp($timestamp) { + $this->year = date('Y', $timestamp); + $this->month = date('m', $timestamp); + $this->day = date('d', $timestamp); + $this->hour = date('H', $timestamp); + $this->minute = date('i', $timestamp); + $this->second = date('s', $timestamp); + } + function parseIso($iso) { + $this->year = substr($iso, 0, 4); + $this->month = substr($iso, 4, 2); + $this->day = substr($iso, 6, 2); + $this->hour = substr($iso, 9, 2); + $this->minute = substr($iso, 12, 2); + $this->second = substr($iso, 15, 2); + } + function getIso() { + return $this->year.$this->month.$this->day.'T'.$this->hour.':'.$this->minute.':'.$this->second; + } + function getXml() { + return ''.$this->getIso().''; + } + function getTimestamp() { + return mktime($this->hour, $this->minute, $this->second, $this->month, $this->day, $this->year); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Error.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Error.php" new file mode 100644 index 0000000..cfc7aaa --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Error.php" @@ -0,0 +1,76 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR閿欒 + * + * @package IXR + */ +class IXR_Error +{ + /** + * 閿欒浠g爜 + * + * @access public + * @var integer + */ + public $code; + + /** + * 閿欒娑堟伅 + * + * @access public + * @var string + */ + public $message; + + /** + * 鏋勯犲嚱鏁 + * + * @access public + * @param integer $code 閿欒浠g爜 + * @param string $message 閿欒娑堟伅 + * @return void + */ + public function __construct($code, $message) + { + $this->code = $code; + $this->message = $message; + } + + /** + * 鑾峰彇xml + * + * @access public + * @return string + */ + public function getXml() + { + $xml = << + + + + + faultCode + {$this->code} + + + faultString + {$this->message} + + + + + + +EOD; + return $xml; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Exception.php" new file mode 100644 index 0000000..682c42a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Exception.php" @@ -0,0 +1,17 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR寮傚父绫 + * + * @package IXR + */ +class IXR_Exception extends Exception +{} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/IntrospectionServer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/IntrospectionServer.php" new file mode 100644 index 0000000..664302c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/IntrospectionServer.php" @@ -0,0 +1,158 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鏈嶅姟鍣 + * + * @package IXR + */ +class IXR_IntrospectionServer extends IXR_Server { + var $signatures; + var $help; + function IXR_IntrospectionServer() { + $this->setCallbacks(); + $this->setCapabilities(); + $this->capabilities['introspection'] = array( + 'specUrl' => 'http://xmlrpc.usefulinc.com/doc/reserved.html', + 'specVersion' => 1 + ); + $this->addCallback( + 'system.methodSignature', + 'this:methodSignature', + array('array', 'string'), + 'Returns an array describing the return type and required parameters of a method' + ); + $this->addCallback( + 'system.getCapabilities', + 'this:getCapabilities', + array('struct'), + 'Returns a struct describing the XML-RPC specifications supported by this server' + ); + $this->addCallback( + 'system.listMethods', + 'this:listMethods', + array('array'), + 'Returns an array of available methods on this server' + ); + $this->addCallback( + 'system.methodHelp', + 'this:methodHelp', + array('string', 'string'), + 'Returns a documentation string for the specified method' + ); + } + function addCallback($method, $callback, $args, $help) { + $this->callbacks[$method] = $callback; + $this->signatures[$method] = $args; + $this->help[$method] = $help; + } + function call($methodname, $args) { + // Make sure it's in an array + if ($args && !is_array($args)) { + $args = array($args); + } + // Over-rides default call method, adds signature check + if (!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method "'.$this->message->methodName.'" not specified.'); + } + $method = $this->callbacks[$methodname]; + $signature = $this->signatures[$methodname]; + $returnType = array_shift($signature); + // Check the number of arguments + if (count($args) != count($signature)) { + // print 'Num of args: '.count($args).' Num in signature: '.count($signature); + return new IXR_Error(-32602, 'server error. wrong number of method parameters'); + } + // Check the argument types + $ok = true; + $argsbackup = $args; + for ($i = 0, $j = count($args); $i < $j; $i++) { + $arg = array_shift($args); + $type = array_shift($signature); + switch ($type) { + case 'int': + case 'i4': + if (is_array($arg) || !is_int($arg)) { + $ok = false; + } + break; + case 'base64': + case 'string': + if (!is_string($arg)) { + $ok = false; + } + break; + case 'boolean': + if ($arg !== false && $arg !== true) { + $ok = false; + } + break; + case 'float': + case 'double': + if (!is_float($arg)) { + $ok = false; + } + break; + case 'date': + case 'dateTime.iso8601': + if (!is_a($arg, 'IXR_Date')) { + $ok = false; + } + break; + } + if (!$ok) { + return new IXR_Error(-32602, 'server error. invalid method parameters'); + } + } + // It passed the test - run the "real" method call + return parent::call($methodname, $argsbackup); + } + function methodSignature($method) { + if (!$this->hasMethod($method)) { + return new IXR_Error(-32601, 'server error. requested method "'.$method.'" not specified.'); + } + // We should be returning an array of types + $types = $this->signatures[$method]; + $return = array(); + foreach ($types as $type) { + switch ($type) { + case 'string': + $return[] = 'string'; + break; + case 'int': + case 'i4': + $return[] = 42; + break; + case 'double': + $return[] = 3.1415; + break; + case 'dateTime.iso8601': + $return[] = new IXR_Date(time()); + break; + case 'boolean': + $return[] = true; + break; + case 'base64': + $return[] = new IXR_Base64('base64'); + break; + case 'array': + $return[] = array('array'); + break; + case 'struct': + $return[] = array('struct' => 'struct'); + break; + } + } + return $return; + } + function methodHelp($method) { + return $this->help[$method]; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Message.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Message.php" new file mode 100644 index 0000000..78cb703 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Message.php" @@ -0,0 +1,167 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR娑堟伅 + * + * @package IXR + */ +class IXR_Message { + var $message; + var $messageType; // methodCall / methodResponse / fault + var $faultCode; + var $faultString; + var $methodName; + var $params; + // Current variable stacks + var $_arraystructs = array(); // The stack used to keep track of the current array/struct + var $_arraystructstypes = array(); // Stack keeping track of if things are structs or array + var $_currentStructName = array(); // A stack as well + var $_param; + var $_value; + var $_currentTag; + var $_currentTagContents; + // The XML parser + var $_parser; + function IXR_Message ($message) { + $this->message = $message; + } + function parse() { + // first remove the XML declaration + $this->message = preg_replace('/<\?xml(.*)?\?'.'>/', '', $this->message); + if (trim($this->message) == '') { + return false; + } + $this->_parser = xml_parser_create(); + // Set XML parser to take the case of tags in to account + xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false); + // Set XML parser callback functions + xml_set_object($this->_parser, $this); + xml_set_element_handler($this->_parser, 'tag_open', 'tag_close'); + xml_set_character_data_handler($this->_parser, 'cdata'); + if (!xml_parse($this->_parser, $this->message)) { + /* die(sprintf('XML error: %s at line %d', + xml_error_string(xml_get_error_code($this->_parser)), + xml_get_current_line_number($this->_parser))); */ + return false; + } + xml_parser_free($this->_parser); + // Grab the error messages, if any + if ($this->messageType == 'fault') { + $this->faultCode = $this->params[0]['faultCode']; + $this->faultString = $this->params[0]['faultString']; + } + return true; + } + function tag_open($parser, $tag, $attr) { + $this->currentTag = $tag; + switch($tag) { + case 'methodCall': + case 'methodResponse': + case 'fault': + $this->messageType = $tag; + break; + /* Deal with stacks of arrays and structs */ + case 'data': // data is to all intents and puposes more interesting than array + $this->_arraystructstypes[] = 'array'; + $this->_arraystructs[] = array(); + break; + case 'struct': + $this->_arraystructstypes[] = 'struct'; + $this->_arraystructs[] = array(); + break; + } + } + function cdata($parser, $cdata) { + $this->_currentTagContents .= $cdata; + } + function tag_close($parser, $tag) { + $valueFlag = false; + switch($tag) { + case 'int': + case 'i4': + $value = (int)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'double': + $value = (double)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'string': + $value = (string)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'dateTime.iso8601': + $value = new IXR_Date(trim($this->_currentTagContents)); + // $value = $iso->getTimestamp(); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'value': + // "If no type is indicated, the type is string." + if (trim($this->_currentTagContents) != '') { + $value = (string)$this->_currentTagContents; + $this->_currentTagContents = ''; + $valueFlag = true; + } + break; + case 'boolean': + $value = (boolean)trim($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + case 'base64': + $value = base64_decode($this->_currentTagContents); + $this->_currentTagContents = ''; + $valueFlag = true; + break; + /* Deal with stacks of arrays and structs */ + case 'data': + case 'struct': + $value = array_pop($this->_arraystructs); + array_pop($this->_arraystructstypes); + $valueFlag = true; + break; + case 'member': + array_pop($this->_currentStructName); + break; + case 'name': + $this->_currentStructName[] = trim($this->_currentTagContents); + $this->_currentTagContents = ''; + break; + case 'methodName': + $this->methodName = trim($this->_currentTagContents); + $this->_currentTagContents = ''; + break; + } + if ($valueFlag) { + /* + if (!is_array($value) && !is_object($value)) { + $value = trim($value); + } + */ + if (count($this->_arraystructs) > 0) { + // Add value to struct or array + if ($this->_arraystructstypes[count($this->_arraystructstypes)-1] == 'struct') { + // Add to struct + $this->_arraystructs[count($this->_arraystructs)-1][$this->_currentStructName[count($this->_currentStructName)-1]] = $value; + } else { + // Add to array + $this->_arraystructs[count($this->_arraystructs)-1][] = $value; + } + } else { + // Just add as a paramater + $this->params[] = $value; + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Request.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Request.php" new file mode 100644 index 0000000..ef2df6c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Request.php" @@ -0,0 +1,43 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR璇锋眰浣 + * + * @package IXR + */ +class IXR_Request { + var $method; + var $args; + var $xml; + function IXR_Request($method, $args) { + $this->method = $method; + $this->args = $args; + $this->xml = << + +{$this->method} + + +EOD; + foreach ($this->args as $arg) { + $this->xml .= ''; + $v = new IXR_Value($arg); + $this->xml .= $v->getXml(); + $this->xml .= "\n"; + } + $this->xml .= ''; + } + function getLength() { + return strlen($this->xml); + } + function getXml() { + return $this->xml; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Server.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Server.php" new file mode 100644 index 0000000..b3d47a2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Server.php" @@ -0,0 +1,328 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鏈嶅姟鍣 + * + * @package IXR + */ +class IXR_Server +{ + /** + * 杈撳叆鍙傛暟 + * + * @access private + * @var array + */ + private $data; + + /** + * 鍥炶皟鍑芥暟 + * + * @access private + * @var array + */ + private $callbacks = array(); + + /** + * 娑堟伅浣 + * + * @access private + * @var IXR_Message + */ + private $message; + + /** + * 榛樿鍙傛暟 + * + * @access private + * @var array + */ + private $capabilities; + + /** + * 鏋勯犲嚱鏁 + * + * @access public + * @param mixed $callbacks 鍥炶皟鍑芥暟 + * @param mixed $data 杈撳叆鍙傛暟 + * @return void + */ + public function __construct($callbacks = false, $data = false) + { + $this->setCapabilities(); + if ($callbacks) { + $this->callbacks = $callbacks; + } + $this->setCallbacks(); + $this->serve($data); + } + + /** + * 鍛煎彨鍐呴儴鏂规硶 + * + * @access private + * @param string $methodname 鏂规硶鍚 + * @param mixed $args 鍙傛暟 + * @return mixed + */ + private function call($methodname, $args) + { + // hook + if (0 !== strpos($methodname, 'hook.') && $this->hasMethod('hook.beforeCall')) { + $this->call('hook.beforeCall', array($methodname)); + } + + if (!$this->hasMethod($methodname)) { + return new IXR_Error(-32601, 'server error. requested method '.$methodname.' does not exist.'); + } + $method = $this->callbacks[$methodname]; + + // Are we dealing with a function or a method? + if (is_string($method) && substr($method, 0, 5) == 'this:') { + // It's a class method - check it exists + $method = substr($method, 5); + if (!method_exists($this, $method)) { + return new IXR_Error(-32601, 'server error. requested class method "'.$method.'" does not exist.'); + } + // Call the method + $result = $this->$method($args); + } else { + if (is_array($method)) { + list($object, $func) = $method; + if (!is_callable($method)) { + return new IXR_Error(-32601, 'server error. requested class method "'.$object . '.' . $func.'" does not exist.'); + } + + $result = call_user_func_array(array($object, $func), $args); + } elseif (!function_exists($method)) { + // It's a function - does it exist? + return new IXR_Error(-32601, 'server error. requested function "'.$method.'" does not exist.'); + } else { + // Call the function + $result = $method($args); + } + } + + // hook + if (0 !== strpos($methodname, 'hook.') && $this->hasMethod('hook.afterCall')) { + $this->call('hook.afterCall', array($methodname)); + } + + return $result; + } + + /** + * 鎶涘嚭閿欒 + * + * @access private + * @param integer $error 閿欒浠g爜 + * @param string $message 閿欒娑堟伅 + * @return void + */ + private function error($error, $message = false) + { + // Accepts either an error object or an error code and message + if ($message && !is_object($error)) { + $error = new IXR_Error($error, $message); + } + $this->output($error->getXml()); + } + + /** + * 杈撳嚭xml + * + * @access private + * @param string $xml 杈撳嚭xml + * @return 杈撳嚭xml + */ + private function output($xml) + { + $xml = ''."\n".$xml; + $length = strlen($xml); + header('Connection: close'); + header('Content-Length: '.$length); + header('Content-Type: text/xml'); + header('Date: '.date('r')); + echo $xml; + exit; + } + + /** + * 鏄惁瀛樺湪鏂规硶 + * + * @access private + * @param string $method 鏂规硶鍚 + * @return mixed + */ + private function hasMethod($method) + { + return in_array($method, array_keys($this->callbacks)); + } + + /** + * 璁剧疆榛樿鍙傛暟 + * + * @access public + * @return void + */ + private function setCapabilities() + { + // Initialises capabilities array + $this->capabilities = array( + 'xmlrpc' => array( + 'specUrl' => 'http://www.xmlrpc.com/spec', + 'specVersion' => 1 + ), + 'faults_interop' => array( + 'specUrl' => 'http://xmlrpc-epi.sourceforge.net/specs/rfc.fault_codes.php', + 'specVersion' => 20010516 + ), + 'system.multicall' => array( + 'specUrl' => 'http://www.xmlrpc.com/discuss/msgReader$1208', + 'specVersion' => 1 + ), + ); + } + + /** + * 璁剧疆榛樿鏂规硶 + * + * @access private + * @return void + */ + private function setCallbacks() + { + $this->callbacks['system.getCapabilities'] = 'this:getCapabilities'; + $this->callbacks['system.listMethods'] = 'this:listMethods'; + $this->callbacks['system.multicall'] = 'this:multiCall'; + } + + /** + * 鏈嶅姟鍏ュ彛 + * + * @access private + * @param mixed $data 杈撳叆鍙傛暟 + * @return void + */ + private function serve($data = false) + { + if (!isset($GLOBALS['HTTP_RAW_POST_DATA'])) { + $GLOBALS['HTTP_RAW_POST_DATA'] = file_get_contents("php://input"); + } + if (isset($GLOBALS['HTTP_RAW_POST_DATA'])) { + $GLOBALS['HTTP_RAW_POST_DATA'] = trim($GLOBALS['HTTP_RAW_POST_DATA']); + } + + if (!$data) { + global $HTTP_RAW_POST_DATA; + if (!$HTTP_RAW_POST_DATA) { + die('XML-RPC server accepts POST requests only.'); + } + $data = $HTTP_RAW_POST_DATA; + } + $this->message = new IXR_Message($data); + if (!$this->message->parse()) { + $this->error(-32700, 'parse error. not well formed'); + } + if ($this->message->messageType != 'methodCall') { + $this->error(-32600, 'server error. invalid xml-rpc. not conforming to spec. Request must be a methodCall'); + } + + if (0 === strpos($this->message->methodName, 'hook.')) { + die('THIS METHOD MUST BE CALLED INSIDE.'); + } + + $result = $this->call($this->message->methodName, $this->message->params); + // Is the result an error? + if (is_a($result, 'IXR_Error')) { + $this->error($result); + } + // Encode the result + $r = new IXR_Value($result); + $resultxml = $r->getXml(); + // Create the XML + $xml = << + + + + $resultxml + + + + + +EOD; + // hook + if ($this->hasMethod('hook.beforeOutput')) { + $this->call('hook.beforeOutput', array()); + } + + // Send it + $this->output($xml); + } + + /** + * 鑾峰彇榛樿鍙傛暟 + * + * @access public + * @param mixed $args 杈撳叆鍙傛暟 + * @return array + */ + public function getCapabilities($args) + { + return $this->capabilities; + } + + /** + * 鍒楀嚭鎵鏈夋柟娉 + * + * @access public + * @param mixed $args 杈撳叆鍙傛暟 + * @return mixed + */ + public function listMethods($args) + { + // Returns a list of methods - uses array_reverse to ensure user defined + // methods are listed before server defined methods + return array_reverse(array_keys($this->callbacks)); + } + + /** + * 涓娆″鐞嗗涓姹 + * + * @access public + * @param void $methodcalls + * @return array + */ + public function multiCall($methodcalls) + { + // See http://www.xmlrpc.com/discuss/msgReader$1208 + $return = array(); + foreach ($methodcalls as $call) { + $method = $call['methodName']; + $params = $call['params']; + if ($method == 'system.multicall') { + $result = new IXR_Error(-32600, 'Recursive calls to system.multicall are forbidden'); + } else { + $result = $this->call($method, $params); + } + if (is_a($result, 'IXR_Error')) { + $return[] = array( + 'faultCode' => $result->code, + 'faultString' => $result->message + ); + } else { + $return[] = array($result); + } + } + return $return; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Value.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Value.php" new file mode 100644 index 0000000..4e8424d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/IXR/Value.php" @@ -0,0 +1,119 @@ + htmlspecialchars) + Site: http://scripts.incutio.com/xmlrpc/ + Manual: http://scripts.incutio.com/xmlrpc/manual.php + Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php +*/ + +/** + * IXR鍊 + * + * @package IXR + */ +class IXR_Value { + var $data; + var $type; + function IXR_Value ($data, $type = false) { + $this->data = $data; + if (!$type) { + $type = $this->calculateType(); + } + $this->type = $type; + if ($type == 'struct') { + /* Turn all the values in the array in to new IXR_Value objects */ + foreach ($this->data as $key => $value) { + $this->data[$key] = new IXR_Value($value); + } + } + if ($type == 'array') { + for ($i = 0, $j = count($this->data); $i < $j; $i++) { + $this->data[$i] = new IXR_Value($this->data[$i]); + } + } + } + function calculateType() { + if ($this->data === true || $this->data === false) { + return 'boolean'; + } + if (is_integer($this->data)) { + return 'int'; + } + if (is_double($this->data)) { + return 'double'; + } + // Deal with IXR object types base64 and date + if (is_object($this->data) && is_a($this->data, 'IXR_Date')) { + return 'date'; + } + if (is_object($this->data) && is_a($this->data, 'IXR_Base64')) { + return 'base64'; + } + // If it is a normal PHP object convert it in to a struct + if (is_object($this->data)) { + + $this->data = get_object_vars($this->data); + return 'struct'; + } + if (!is_array($this->data)) { + return 'string'; + } + /* We have an array - is it an array or a struct ? */ + if ($this->isStruct($this->data)) { + return 'struct'; + } else { + return 'array'; + } + } + function getXml() { + /* Return XML for this value */ + switch ($this->type) { + case 'boolean': + return ''.(($this->data) ? '1' : '0').''; + break; + case 'int': + return ''.$this->data.''; + break; + case 'double': + return ''.$this->data.''; + break; + case 'string': + return ''.htmlspecialchars($this->data).''; + break; + case 'array': + $return = ''."\n"; + foreach ($this->data as $item) { + $return .= ' '.$item->getXml()."\n"; + } + $return .= ''; + return $return; + break; + case 'struct': + $return = ''."\n"; + foreach ($this->data as $name => $value) { + $return .= " $name"; + $return .= $value->getXml()."\n"; + } + $return .= ''; + return $return; + break; + case 'date': + case 'base64': + return $this->data->getXml(); + break; + } + return false; + } + function isStruct($array) { + /* Nasty function to check if an array is a struct or not */ + $expected = 0; + foreach ($array as $key => $value) { + if ((string)$key != (string)$expected) { + return true; + } + $expected++; + } + return false; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Json.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Json.php" new file mode 100644 index 0000000..7a602a4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Json.php" @@ -0,0 +1,545 @@ +> 6) & 0x1F)) + . chr(0x80 | ($bytes & 0x3F)); + + case (0xFFFF & $bytes) == $bytes: + return chr(0xE0 | (($bytes >> 12) & 0x0F)) + . chr(0x80 | (($bytes >> 6) & 0x3F)) + . chr(0x80 | ($bytes & 0x3F)); + } + return ''; + } + + /** + * 灏唘tf8杞崲涓簎tf16 + * + * @access private + * @param string $utf8 utf8瀛楃涓 + * @return string + */ + private static function utf82utf16($utf8) + { + if (function_exists('mb_convert_encoding')) { + return mb_convert_encoding($utf8, 'UTF-16', 'UTF-8'); + } + + switch (strlen($utf8)) { + case 1: + return $utf8; + + case 2: + return chr(0x07 & (ord($utf8{0}) >> 2)) + . chr((0xC0 & (ord($utf8{0}) << 6)) + | (0x3F & ord($utf8{1}))); + case 3: + return chr((0xF0 & (ord($utf8{0}) << 4)) + | (0x0F & (ord($utf8{1}) >> 2))) + . chr((0xC0 & (ord($utf8{1}) << 6)) + | (0x7F & ord($utf8{2}))); + } + return ''; + } + + /** + * 鍒ゆ柇閿欒 + * + * @access private + * @param mixed $data 閿欒瀵硅薄 + * @param string $code 閿欒浠g爜 + * @return boolean + */ + private static function _is_error($data, $code = null) + { + if (is_object($data) && (get_class($data) == 'services_json_error' || + is_subclass_of($data, 'services_json_error'))) { + return true; + } + + return false; + } + + /** + * 娓呴櫎鐗规畩鏍煎紡 + * + * @access private + * @param string $str 寰呭鐞嗗瓧绗︿覆 + * @return string + */ + private static function _reduce_string($str) + { + $str = preg_replace(array( + '#^\s*//(.+)$#m', + '#^\s*/\*(.+)\*/#Us', + '#/\*(.+)\*/\s*$#Us' + ), '', $str); + return trim($str); + } + + /** + * 灏嗗璞¤浆鎹负json涓 + * + * @access public + * @param mixed $var 闇瑕佽浆鎹㈢殑瀵硅薄 + * @return string + */ + public static function _encode($var) + { + switch (gettype($var)) { + case 'boolean': + return $var ? 'true' : 'false'; + + case 'NULL': + return 'null'; + + case 'integer': + return (int) $var; + + case 'double': + case 'float': + return (float) $var; + + case 'string': + $ascii = ''; + $strlen_var = strlen($var); + + for ($c = 0; $c < $strlen_var; ++$c) { + + $ord_var_c = ord($var{$c}); + + switch (true) { + case $ord_var_c == 0x08: + $ascii .= '\b'; + break; + case $ord_var_c == 0x09: + $ascii .= '\t'; + break; + case $ord_var_c == 0x0A: + $ascii .= '\n'; + break; + case $ord_var_c == 0x0C: + $ascii .= '\f'; + break; + case $ord_var_c == 0x0D: + $ascii .= '\r'; + break; + + case $ord_var_c == 0x22: + case $ord_var_c == 0x2F: + case $ord_var_c == 0x5C: + $ascii .= '\\'.$var{$c}; + break; + + case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)): + $ascii .= $var{$c}; + break; + + case (($ord_var_c & 0xE0) == 0xC0): + $char = pack('C*', $ord_var_c, ord($var{$c + 1})); + $c += 1; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF0) == 0xE0): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2})); + $c += 2; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xF8) == 0xF0): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3})); + $c += 3; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFC) == 0xF8): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4})); + $c += 4; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + + case (($ord_var_c & 0xFE) == 0xFC): + $char = pack('C*', $ord_var_c, + ord($var{$c + 1}), + ord($var{$c + 2}), + ord($var{$c + 3}), + ord($var{$c + 4}), + ord($var{$c + 5})); + $c += 5; + $utf16 = self::utf82utf16($char); + $ascii .= sprintf('\u%04s', bin2hex($utf16)); + break; + } + } + + return '"'.$ascii.'"'; + + case 'array': + if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) { + $properties = array_map(array('Typecho_Json', '_name_value'), + array_keys($var), + array_values($var)); + + foreach ($properties as $property) { + if (self::_is_error($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + } + + // treat it like a regular array + $elements = array_map(array('Typecho_Json', '_encode'), $var); + + foreach ($elements as $element) { + if (self::_is_error($element)) { + return $element; + } + } + + return '[' . join(',', $elements) . ']'; + + case 'object': + $vars = get_object_vars($var); + + $properties = array_map(array('Typecho_Json', '_name_value'), + array_keys($vars), + array_values($vars)); + + foreach ($properties as $property) { + if (self::_is_error($property)) { + return $property; + } + } + + return '{' . join(',', $properties) . '}'; + + default: + return false; + } + } + + /** + * 瑙g爜json瀛楃涓 + * + * @access public + * @param string $str 瑙g爜瀛楃涓 + * @return mixed + */ + public static function _decode($str) + { + $str = self::_reduce_string($str); + + switch (strtolower($str)) { + case 'true': + return true; + + case 'false': + return false; + + case 'null': + return null; + + default: + $m = array(); + + if (is_numeric($str)) { + return ((float)$str == (integer)$str) + ? (integer)$str + : (float)$str; + + } elseif (preg_match('/^("|\').*(\1)$/s', $str, $m) && $m[1] == $m[2]) { + $delim = substr($str, 0, 1); + $chrs = substr($str, 1, -1); + $utf8 = ''; + $strlen_chrs = strlen($chrs); + + for ($c = 0; $c < $strlen_chrs; ++$c) { + + $substr_chrs_c_2 = substr($chrs, $c, 2); + $ord_chrs_c = ord($chrs{$c}); + + switch (true) { + case $substr_chrs_c_2 == '\b': + $utf8 .= chr(0x08); + ++$c; + break; + case $substr_chrs_c_2 == '\t': + $utf8 .= chr(0x09); + ++$c; + break; + case $substr_chrs_c_2 == '\n': + $utf8 .= chr(0x0A); + ++$c; + break; + case $substr_chrs_c_2 == '\f': + $utf8 .= chr(0x0C); + ++$c; + break; + case $substr_chrs_c_2 == '\r': + $utf8 .= chr(0x0D); + ++$c; + break; + + case $substr_chrs_c_2 == '\\"': + case $substr_chrs_c_2 == '\\\'': + case $substr_chrs_c_2 == '\\\\': + case $substr_chrs_c_2 == '\\/': + if (($delim == '"' && $substr_chrs_c_2 != '\\\'') || + ($delim == "'" && $substr_chrs_c_2 != '\\"')) { + $utf8 .= $chrs{++$c}; + } + break; + + case preg_match('/\\\u[0-9A-F]{4}/i', substr($chrs, $c, 6)): + $utf16 = chr(hexdec(substr($chrs, ($c + 2), 2))) + . chr(hexdec(substr($chrs, ($c + 4), 2))); + $utf8 .= self::utf162utf8($utf16); + $c += 5; + break; + + case ($ord_chrs_c >= 0x20) && ($ord_chrs_c <= 0x7F): + $utf8 .= $chrs{$c}; + break; + + case ($ord_chrs_c & 0xE0) == 0xC0: + $utf8 .= substr($chrs, $c, 2); + ++$c; + break; + + case ($ord_chrs_c & 0xF0) == 0xE0: + $utf8 .= substr($chrs, $c, 3); + $c += 2; + break; + + case ($ord_chrs_c & 0xF8) == 0xF0: + $utf8 .= substr($chrs, $c, 4); + $c += 3; + break; + + case ($ord_chrs_c & 0xFC) == 0xF8: + $utf8 .= substr($chrs, $c, 5); + $c += 4; + break; + + case ($ord_chrs_c & 0xFE) == 0xFC: + $utf8 .= substr($chrs, $c, 6); + $c += 5; + break; + + } + + } + + return $utf8; + + } elseif (preg_match('/^\[.*\]$/s', $str) || preg_match('/^\{.*\}$/s', $str)) { + if ($str {0} == '[') { + $stk = array(self::SERVICES_JSON_IN_ARR); + $arr = array(); + } else { + $stk = array(self::SERVICES_JSON_IN_OBJ); + $obj = new stdClass(); + } + + array_push($stk, array('what' => self::SERVICES_JSON_SLICE, + 'where' => 0, + 'delim' => false)); + + $chrs = substr($str, 1, -1); + $chrs = self::_reduce_string($chrs); + + if ($chrs == '') { + if (reset($stk) == self::SERVICES_JSON_IN_ARR) { + return $arr; + + } else { + return $obj; + + } + } + + $strlen_chrs = strlen($chrs); + for ($c = 0; $c <= $strlen_chrs; ++$c) { + + $top = end($stk); + $substr_chrs_c_2 = substr($chrs, $c, 2); + + if (($c == $strlen_chrs) || (($chrs {$c} == ',') && ($top['what'] == self::SERVICES_JSON_SLICE))) { + $slice = substr($chrs, $top['where'], ($c - $top['where'])); + array_push($stk, array('what' => self::SERVICES_JSON_SLICE, 'where' => ($c + 1), 'delim' => false)); + + if (reset($stk) == self::SERVICES_JSON_IN_ARR) { + array_push($arr, self::_decode($slice)); + + } elseif (reset($stk) == self::SERVICES_JSON_IN_OBJ) { + $parts = array(); + + if (preg_match('/^\s*(["\'].*[^\\\]["\'])\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + $key = self::_decode($parts[1]); + $val = self::_decode($parts[2]); + $obj->$key = $val; + } elseif (preg_match('/^\s*(\w+)\s*:\s*(\S.*),?$/Uis', $slice, $parts)) { + $key = $parts[1]; + $val = self::_decode($parts[2]); + $obj->$key = $val; + } + + } + + } elseif ((($chrs {$c} == '"') || ($chrs{$c} == "'")) && ($top['what'] != self::SERVICES_JSON_IN_STR)) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_STR, 'where' => $c, 'delim' => $chrs{$c})); + + } elseif (($chrs {$c} == $top['delim']) && + ($top['what'] == self::SERVICES_JSON_IN_STR) && + ((strlen(substr($chrs, 0, $c)) - strlen(rtrim(substr($chrs, 0, $c), '\\'))) % 2 != 1)) { + array_pop($stk); + + } elseif (($chrs {$c} == '[') && + in_array($top['what'], array(self::SERVICES_JSON_SLICE, self::SERVICES_JSON_IN_ARR, self::SERVICES_JSON_IN_OBJ))) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_ARR, 'where' => $c, 'delim' => false)); + } elseif (($chrs {$c} == ']') && ($top['what'] == self::SERVICES_JSON_IN_ARR)) { + array_pop($stk); + } elseif (($chrs {$c} == '{') && + in_array($top['what'], array(self::SERVICES_JSON_SLICE, self::SERVICES_JSON_IN_ARR, self::SERVICES_JSON_IN_OBJ))) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_OBJ, 'where' => $c, 'delim' => false)); + } elseif (($chrs {$c} == '}') && ($top['what'] == self::SERVICES_JSON_IN_OBJ)) { + array_pop($stk); + } elseif (($substr_chrs_c_2 == '/*') && + in_array($top['what'], array(self::SERVICES_JSON_SLICE, self::SERVICES_JSON_IN_ARR, self::SERVICES_JSON_IN_OBJ))) { + array_push($stk, array('what' => self::SERVICES_JSON_IN_CMT, 'where' => $c, 'delim' => false)); + $c++; + } elseif (($substr_chrs_c_2 == '*/') && ($top['what'] == self::SERVICES_JSON_IN_CMT)) { + array_pop($stk); + $c++; + for ($i = $top['where']; $i <= $c; ++$i) + $chrs = substr_replace($chrs, ' ', $i, 1); + } + + } + + if (reset($stk) == self::SERVICES_JSON_IN_ARR) { + return $arr; + + } elseif (reset($stk) == self::SERVICES_JSON_IN_OBJ) { + return $obj; + + } + + } + } + } + + /** + * 瀵归厤瀵瑰肩紪鐮 + * + * @access public + * @param string $name 鍚嶇О + * @param mixed $value 鍊 + * @return string + */ + public static function _name_value($name, $value) + { + $encoded_value = self::_encode($value); + + if (self::_is_error($encoded_value)) { + return $encoded_value; + } + + return self::_encode(strval($name)) . ':' . $encoded_value; + } + + /** + * 瀵瑰彉閲忚繘琛宩son缂栫爜 + * + * @access public + * @param mixed $var 闇瑕佸鐞嗙殑瀵硅薄 + * @return string + */ + public static function encode($var) + { + if (function_exists('json_encode')) { + /** from php 5.1 */ + return json_encode($var); + } else { + return self::_encode($var); + } + } + + /** + * 瀵瑰瓧绗︿覆杩涜json瑙g爜 + * + * @access public + * @param string $var 闇瑕佽В鐮佺殑瀛楃涓 + * @param boolean $assoc 鏄惁寮哄埗瑙i噴涓烘暟缁 + * @return mixed + */ + public static function decode($var, $assoc = false) + { + if (function_exists('json_decode')) { + /** from php 5.1 */ + return json_decode($var, $assoc); + } else { + $result = self::_decode($var); + } + + if ($assoc && is_object($result)) { + return (array) $result; + } else if (!$assoc && is_array($result)) { + return (object) $result; + } + + return $result; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Markdown.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Markdown.php" new file mode 100644 index 0000000..c1d6d1d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Markdown.php" @@ -0,0 +1,62 @@ +getType() == CommonMark_Element_InlineElement::TYPE_SOFTBREAK) { + $inline->setType(CommonMark_Element_InlineElement::TYPE_HARDBREAK); + } + + return parent::renderInline($inline); + } +} + +/** + * Markdown瑙f瀽 + * + * @package Markdown + * @copyright Copyright (c) 2014 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Markdown +{ + /** + * convert + * + * @param string $text + * @return string + */ + public static function convert($text) + { + static $docParser, $renderer; + + if (empty($docParser)) { + $docParser = new CommonMark_DocParser(); + } + + + if (empty($renderer)) { + $renderer = new HtmlRendererExtra(); + } + + $doc = $docParser->parse($text); + return $renderer->render($doc); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/PasswordHash.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/PasswordHash.php" new file mode 100644 index 0000000..bf6e214 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/PasswordHash.php" @@ -0,0 +1,257 @@ + in 2004-2006 and placed in +# the public domain. +# +# There's absolutely no warranty. +# +# Please be sure to update the Version line if you edit this file in any way. +# It is suggested that you leave the main version number intact, but indicate +# your project name (after the slash) and add your own revision information. +# +# Please do not change the "private" password hashing method implemented in +# here, thereby making your hashes incompatible. However, if you must, please +# change the hash type identifier (the "$P$") to something different. +# +# Obviously, since this code is in the public domain, the above are not +# requirements (there can be none), but merely suggestions. +# + +/** + * Portable PHP password hashing framework. + * + * @package phpass + * @version 0.2 / genuine. + * @link http://www.openwall.com/phpass/ + * @since 2.5 + */ +class PasswordHash { + var $itoa64; + var $iteration_count_log2; + var $portable_hashes; + var $random_state; + + function PasswordHash($iteration_count_log2, $portable_hashes) + { + $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; + + if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) + $iteration_count_log2 = 8; + $this->iteration_count_log2 = $iteration_count_log2; + + $this->portable_hashes = $portable_hashes; + + $this->random_state = microtime() . uniqid(rand(), TRUE); // removed getmypid() for compability reasons + } + + function get_random_bytes($count) + { + $output = ''; + if ( @is_readable('/dev/urandom') && + ($fh = @fopen('/dev/urandom', 'rb'))) { + $output = fread($fh, $count); + fclose($fh); + } + + if (strlen($output) < $count) { + $output = ''; + for ($i = 0; $i < $count; $i += 16) { + $this->random_state = + md5(microtime() . $this->random_state); + $output .= + pack('H*', md5($this->random_state)); + } + $output = substr($output, 0, $count); + } + + return $output; + } + + function encode64($input, $count) + { + $output = ''; + $i = 0; + do { + $value = ord($input[$i++]); + $output .= $this->itoa64[$value & 0x3f]; + if ($i < $count) + $value |= ord($input[$i]) << 8; + $output .= $this->itoa64[($value >> 6) & 0x3f]; + if ($i++ >= $count) + break; + if ($i < $count) + $value |= ord($input[$i]) << 16; + $output .= $this->itoa64[($value >> 12) & 0x3f]; + if ($i++ >= $count) + break; + $output .= $this->itoa64[($value >> 18) & 0x3f]; + } while ($i < $count); + + return $output; + } + + function gensalt_private($input) + { + $output = '$P$'; + $output .= $this->itoa64[min($this->iteration_count_log2 + + ((PHP_VERSION >= '5') ? 5 : 3), 30)]; + $output .= $this->encode64($input, 6); + + return $output; + } + + function crypt_private($password, $setting) + { + $output = '*0'; + if (substr($setting, 0, 2) == $output) + $output = '*1'; + + if (substr($setting, 0, 3) != '$P$') + return $output; + + $count_log2 = strpos($this->itoa64, $setting[3]); + if ($count_log2 < 7 || $count_log2 > 30) + return $output; + + $count = 1 << $count_log2; + + $salt = substr($setting, 4, 8); + if (strlen($salt) != 8) + return $output; + +# We're kind of forced to use MD5 here since it's the only +# cryptographic primitive available in all versions of PHP +# currently in use. To implement our own low-level crypto +# in PHP would result in much worse performance and +# consequently in lower iteration counts and hashes that are +# quicker to crack (by non-PHP code). + if (PHP_VERSION >= '5') { + $hash = md5($salt . $password, TRUE); + do { + $hash = md5($hash . $password, TRUE); + } while (--$count); + } else { + $hash = pack('H*', md5($salt . $password)); + do { + $hash = pack('H*', md5($hash . $password)); + } while (--$count); + } + + $output = substr($setting, 0, 12); + $output .= $this->encode64($hash, 16); + + return $output; + } + + function gensalt_extended($input) + { + $count_log2 = min($this->iteration_count_log2 + 8, 24); +# This should be odd to not reveal weak DES keys, and the +# maximum valid value is (2**24 - 1) which is odd anyway. + $count = (1 << $count_log2) - 1; + + $output = '_'; + $output .= $this->itoa64[$count & 0x3f]; + $output .= $this->itoa64[($count >> 6) & 0x3f]; + $output .= $this->itoa64[($count >> 12) & 0x3f]; + $output .= $this->itoa64[($count >> 18) & 0x3f]; + + $output .= $this->encode64($input, 3); + + return $output; + } + + function gensalt_blowfish($input) + { +# This one needs to use a different order of characters and a +# different encoding scheme from the one in encode64() above. +# We care because the last character in our encoded string will +# only represent 2 bits. While two known implementations of +# bcrypt will happily accept and correct a salt string which +# has the 4 unused bits set to non-zero, we do not want to take +# chances and we also do not want to waste an additional byte +# of entropy. + $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + + $output = '$2a$'; + $output .= chr(ord('0') + $this->iteration_count_log2 / 10); + $output .= chr(ord('0') + $this->iteration_count_log2 % 10); + $output .= '$'; + + $i = 0; + do { + $c1 = ord($input[$i++]); + $output .= $itoa64[$c1 >> 2]; + $c1 = ($c1 & 0x03) << 4; + if ($i >= 16) { + $output .= $itoa64[$c1]; + break; + } + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 4; + $output .= $itoa64[$c1]; + $c1 = ($c2 & 0x0f) << 2; + + $c2 = ord($input[$i++]); + $c1 |= $c2 >> 6; + $output .= $itoa64[$c1]; + $output .= $itoa64[$c2 & 0x3f]; + } while (1); + + return $output; + } + + function HashPassword($password) + { + $random = ''; + + if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { + $random = $this->get_random_bytes(16); + $hash = + crypt($password, $this->gensalt_blowfish($random)); + if (strlen($hash) == 60) + return $hash; + } + + if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { + if (strlen($random) < 3) + $random = $this->get_random_bytes(3); + $hash = + crypt($password, $this->gensalt_extended($random)); + if (strlen($hash) == 20) + return $hash; + } + + if (strlen($random) < 6) + $random = $this->get_random_bytes(6); + $hash = + $this->crypt_private($password, + $this->gensalt_private($random)); + if (strlen($hash) == 34) + return $hash; + +# Returning '*' on error is safe here, but would _not_ be safe +# in a crypt(3)-like function used _both_ for generating new +# hashes and for validating passwords against existing hashes. + return '*'; + } + + function CheckPassword($password, $stored_hash) + { + $hash = $this->crypt_private($password, $stored_hash); + if ($hash[0] == '*') + $hash = crypt($password, $stored_hash); + + return $hash == $stored_hash; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/AutoP.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/AutoP.php" new file mode 100644 index 0000000..ac7e643 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/AutoP.php" @@ -0,0 +1,195 @@ + + * @license GNU General Public License 2.0 + */ +class AutoP +{ + // 浣滀负娈佃惤鐨勬爣绛 + const BLOCK = 'p|pre|div|blockquote|form|ul|ol|dd|table|ins|h1|h2|h3|h4|h5|h6'; + + /** + * 鍞竴id + * + * @access private + * @var integer + */ + private $_uniqueId = 0; + + /** + * 瀛樺偍鐨勬钀 + * + * @access private + * @var array + */ + private $_blocks = array(); + + /** + * 鐢熸垚鍞竴鐨刬d, 涓轰簡閫熷害鑰冭檻鏈澶氭敮鎸1涓囦釜tag鐨勫鐞 + * + * @access private + * @return string + */ + private function makeUniqueId() + { + return ':' . str_pad($this->_uniqueId ++, 4, '0', STR_PAD_LEFT); + } + + /** + * 鐢ㄦ钀芥柟娉曞鐞嗘崲琛 + * + * @access private + * @param string $text + * @return string + */ + private function cutByBlock($text) + { + $space = "( |銆)"; + $text = preg_replace("/{$space}*\n{$space}*/is", "\n", $text); + $text = preg_replace("/\s*\s*/is", "

      ", $text); + $text = preg_replace("/\n{2,}/", "

      ", $text); + $text = nl2br($text); + $text = preg_replace("/(

      )?\s*\s*(<\/p>)?/is", "", $text); + $text = preg_replace("/

      {$space}*<\/p>/is", '', $text); + $text = preg_replace("/\s*

      \s*$/is", '', $text); + $text = preg_replace("/^\s*<\/p>\s*/is", '', $text); + return $text; + } + + /** + * 淇娈佃惤寮澶村拰缁撳熬 + * + * @access private + * @param string $text + * @return string + */ + private function fixPragraph($text) + { + $text = trim($text); + if (!preg_match("/^<(" . self::BLOCK . ")(\s|>)/i", $text)) { + $text = '

      ' . $text; + } + + if (!preg_match("/<\/(" . self::BLOCK . ")>$/i", $text)) { + $text = $text . '

      '; + } + + return $text; + } + + /** + * 鏇挎崲娈佃惤鐨勫洖璋冨嚱鏁 + * + * @access public + * @param array $matches 鍖归厤鍊 + * @return string + */ + public function replaceBlockCallback($matches) + { + $tagMatch = '|' . $matches[1] . '|'; + $text = $matches[4]; + + switch (true) { + /** 鐢╞r澶勭悊鎹㈣ */ + case false !== strpos('|li|dd|dt|td|p|a|span|code|cite|strong|sup|sub|small|del|u|i|b|ins|h1|h2|h3|h4|h5|h6|', $tagMatch): + $text = nl2br(trim($text)); + break; + /** 鐢ㄦ钀藉鐞嗘崲琛 */ + case false !== strpos('|div|blockquote|form|', $tagMatch): + $text = $this->cutByBlock($text); + if (false !== strpos($text, '

      ')) { + $text = $this->fixPragraph($text); + } + break; + default: + break; + } + + /** 娌℃湁娈佃惤鑳藉姏鐨勬爣绛 */ + if (false !== strpos('|a|span|code|cite|strong|sup|sub|small|del|u|i|b|', $tagMatch)) { + $key = ''; + } else { + $key = ''; + } + + $this->_blocks[$key] = "<{$matches[1]}{$matches[3]}>{$text}"; + return $key; + } + + /** + * 鑷姩鍒嗘 + * + * @param string $text + * @static + * @access private + * @return string + */ + public function parse($text) + { + /** 閲嶇疆璁℃暟鍣 */ + $this->_uniqueId = 0; + $this->_blocks = array(); + + /** 灏嗗凡鏈夌殑娈佃惤鍚庨潰鐨勬崲琛屽鐞嗘帀 */ + $text = preg_replace(array("/<\/p>\s+\s*/is"), array("

      "), trim($text)); + + /** 灏嗘墍鏈夐潪鑷棴鍚堟爣绛捐В鏋愪负鍞竴鐨勫瓧绗︿覆 */ + $foundTagCount = 0; + $textLength = strlen($text); + $uniqueIdList = array(); + + if (preg_match_all("/<\/\s*([a-z0-9]+)>/is", $text, $matches, PREG_OFFSET_CAPTURE)) { + foreach ($matches[0] as $key => $match) { + $tag = $matches[1][$key][0]; + + $leftOffset = $match[1] - $textLength; + $posSingle = strrpos($text, '<' . $tag . '>', $leftOffset); + $posFix = strrpos($text, '<' . $tag . ' ', $leftOffset); + $pos = false; + + switch (true) { + case (false !== $posSingle && false !== $posFix): + $pos = max($posSingle, $posFix); + break; + case false === $posSingle && false !== $posFix: + $pos = $posFix; + break; + case false !== $posSingle && false === $posFix: + $pos = $posSingle; + break; + default: + break; + } + + if (false !== $pos) { + $uniqueId = $this->makeUniqueId(); + $uniqueIdList[$uniqueId] = $tag; + $tagLength = strlen($tag); + + $text = substr_replace($text, $uniqueId, $pos + 1 + $tagLength, 0); + $text = substr_replace($text, $uniqueId, $match[1] + 7 + $foundTagCount * 10 + $tagLength, 0); // 7 = 5 + 2 + $foundTagCount ++; + } + } + } + + foreach ($uniqueIdList as $uniqueId => $tag) { + $text = preg_replace_callback("/<({$tag})({$uniqueId})([^>]*)>(.*)<\/\\1\\2>/is", + array($this, 'replaceBlockCallback'), $text, 1); + } + + $text = $this->cutByBlock($text); + $blocks = array_reverse($this->_blocks); + + foreach ($blocks as $blockKey => $blockValue) { + $text = str_replace($blockKey, $blockValue, $text); + } + + return $this->fixPragraph($text); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Common.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Common.php" new file mode 100644 index 0000000..53a7b6c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Common.php" @@ -0,0 +1,1433 @@ + $val) { + if (in_array($key, self::$_allowableAttributes[$tag])) { + $parsedAttrs[] = " {$key}" . (empty($val) ? '' : "={$val}"); + } + } + + return '<' . $tag . implode('', $parsedAttrs) . '>'; + } + + /** + * 瑙f瀽灞炴 + * + * @access public + * @param string $attrs 灞炴у瓧绗︿覆 + * @return array + */ + public static function __parseAttrs($attrs) + { + $attrs = trim($attrs); + $len = strlen($attrs); + $pos = -1; + $result = array(); + $quote = ''; + $key = ''; + $value = ''; + + for ($i = 0; $i < $len; $i ++) { + if ('=' != $attrs[$i] && !ctype_space($attrs[$i]) && -1 == $pos) { + $key .= $attrs[$i]; + + /** 鏈鍚庝竴涓 */ + if ($i == $len - 1) { + if ('' != ($key = trim($key))) { + $result[$key] = ''; + $key = ''; + $value = ''; + } + } + + } else if (ctype_space($attrs[$i]) && -1 == $pos) { + $pos = -2; + } else if ('=' == $attrs[$i] && 0 > $pos) { + $pos = 0; + } else if (('"' == $attrs[$i] || "'" == $attrs[$i]) && 0 == $pos) { + $quote = $attrs[$i]; + $value .= $attrs[$i]; + $pos = 1; + } else if ($quote != $attrs[$i] && 1 == $pos) { + $value .= $attrs[$i]; + } else if ($quote == $attrs[$i] && 1 == $pos) { + $pos = -1; + $value .= $attrs[$i]; + $result[trim($key)] = $value; + $key = ''; + $value = ''; + } else if ('=' != $attrs[$i] && !ctype_space($attrs[$i]) && -2 == $pos) { + if ('' != ($key = trim($key))) { + $result[$key] = ''; + } + + $key = ''; + $value = ''; + $pos = -1; + $key .= $attrs[$i]; + } + } + + return $result; + } + + /** + * 鑷姩杞藉叆绫 + * + * @param $className + */ + public static function __autoLoad($className) + { + @include_once str_replace(array('\\', '_'), '/', $className) . '.php'; + } + + /** + * 绋嬪簭鍒濆鍖栨柟娉 + * + * @access public + * @return void + */ + public static function init() + { + /** 璁剧疆鑷姩杞藉叆鍑芥暟 */ + if (function_exists('spl_autoload_register')) { + spl_autoload_register(array('Typecho_Common', '__autoLoad')); + } else { + function __autoLoad($className) { + Typecho_Common::__autoLoad($className); + } + } + + /** 鍏煎php6 */ + if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { + $_GET = self::stripslashesDeep($_GET); + $_POST = self::stripslashesDeep($_POST); + $_COOKIE = self::stripslashesDeep($_COOKIE); + + reset($_GET); + reset($_POST); + reset($_COOKIE); + } + + /** 璁剧疆寮傚父鎴幏鍑芥暟 */ + set_exception_handler(array('Typecho_Common', 'exceptionHandle')); + } + + /** + * 寮傚父鎴幏鍑芥暟 + * + * @access public + * @param Exception $exception 鎴幏鐨勫紓甯 + * @return void + */ + public static function exceptionHandle(Exception $exception) + { + @ob_end_clean(); + + if (defined('__TYPECHO_DEBUG__')) { + echo '

      ' . $exception->getMessage() . '

      '; + echo nl2br($exception->__toString()); + } else { + if (404 == $exception->getCode() && !empty(self::$exceptionHandle)) { + $handleClass = self::$exceptionHandle; + new $handleClass($exception); + } else { + self::error($exception); + } + } + + exit; + } + + /** + * 杈撳嚭閿欒椤甸潰 + * + * @access public + * @param mixed $exception 閿欒淇℃伅 + * @return void + */ + public static function error($exception) + { + $isException = is_object($exception); + $message = ''; + + if ($isException) { + $code = $exception->getCode(); + $message = $exception->getMessage(); + } else { + $code = $exception; + } + + $charset = self::$charset; + + if ($isException && $exception instanceof Typecho_Db_Exception) { + $code = 500; + @error_log($message); + + //瑕嗙洊鍘熷閿欒淇℃伅 + $message = 'Database Server Error'; + + if ($exception instanceof Typecho_Db_Adapter_Exception) { + $code = 503; + $message = 'Error establishing a database connection'; + } else if ($exception instanceof Typecho_Db_Query_Exception) { + $message = 'Database Query Error'; + } + } else { + switch ($code) { + case 500: + $message = 'Server Error'; + break; + + case 404: + $message = 'Page Not Found'; + break; + + default: + $code = 'Error'; + break; + } + } + + + /** 璁剧疆http code */ + if (is_numeric($code) && $code > 200) { + Typecho_Response::setStatus($code); + } + + $message = nl2br($message); + + if (defined('__TYPECHO_EXCEPTION_FILE__')) { + require_once __TYPECHO_EXCEPTION_FILE__; + } else { + echo +<< + + + + {$code} + + + +
      + {$message} +
      + + +EOF; + } + + exit; + } + + /** + * 鍒ゆ柇绫绘槸鍚﹁兘琚姞杞 + * 姝ゅ嚱鏁颁細閬嶅巻鎵鏈夌殑include鐩綍, 鎵浠ヤ細鏈変竴瀹氱殑鎬ц兘娑堣, 浣嗘槸涓嶄細寰堝ぇ + * 鍙槸鎴戜滑渚濈劧寤鸿浣犲湪蹇呴』妫娴嬩竴涓被鑳藉惁琚姞杞芥椂浣跨敤瀹, 瀹冮氬父琛ㄧ幇涓轰互涓嬩袱绉嶆儏鍐 + * 1. 褰撻渶瑕佽鍔犺浇鐨勭被涓嶅瓨鍦ㄦ椂, 绯荤粺涓嶄細鍋滄杩愯 (濡傛灉浣犱笉鍒ゆ柇, 绯荤粺浼氬洜鎶涘嚭涓ラ噸閿欒鑰屽仠姝) + * 2. 浣犻渶瑕佺煡閬撳摢浜涚被鏃犳硶琚姞杞, 浠ユ彁绀轰娇鐢ㄨ + * 闄や簡浠ヤ笂鎯呭喌, 浣犳棤闇鍏虫敞閭d簺绫绘棤娉曡鍔犺浇, 鍥犱负褰撳畠浠笉瀛樺湪鏃剁郴缁熶細鑷姩鍋滄骞舵姤閿 + * + * @access public + * @param string $className 绫诲悕 + * @param string $path 鎸囧畾鐨勮矾寰勫悕绉 + * @return boolean + */ + public static function isAvailableClass($className, $path = NULL) + { + /** 鑾峰彇鎵鏈塱nclude鐩綍 */ + //澧炲姞瀹夊叏鐩綍妫娴 fix issue 106 + $dirs = array_map('realpath', array_filter(explode(PATH_SEPARATOR, get_include_path()), + array('Typecho_Common', '__safePath'))); + + $file = str_replace('_', '/', $className) . '.php'; + + if (!empty($path)) { + $path = realpath($path); + if (in_array($path, $dirs)) { + $dirs = array($path); + } else { + return false; + } + } + + foreach ($dirs as $dir) { + if (!empty($dir)) { + if (file_exists($dir . '/' . $file)) { + return true; + } + } + } + + return false; + } + + /** + * 妫娴嬫槸鍚﹀湪app engine涓婅繍琛岋紝灞忚斀鏌愪簺鍔熻兘 + * + * @static + * @access public + * @return boolean + */ + public static function isAppEngine() + { + return !empty($_SERVER['HTTP_APPNAME']) // SAE + || !!getenv('HTTP_BAE_ENV_APPID') // BAE + || !!getenv('HTTP_BAE_LOGID') // BAE 3.0 + || (ini_get('acl.app_id') && class_exists('Alibaba')) // ACE + || (isset($_SERVER['SERVER_SOFTWARE']) && strpos($_SERVER['SERVER_SOFTWARE'],'Google App Engine') !== false) // GAE + ; + } + + /** + * 閫掑綊鍘绘帀鏁扮粍鍙嶆枩绾 + * + * @access public + * @param mixed $value + * @return mixed + */ + public static function stripslashesDeep($value) + { + return is_array($value) ? array_map(array('Typecho_Common', 'stripslashesDeep'), $value) : stripslashes($value); + } + + /** + * 鎶藉彇澶氱淮鏁扮粍鐨勬煇涓厓绱,缁勬垚涓涓柊鏁扮粍,浣胯繖涓暟缁勫彉鎴愪竴涓墎骞虫暟缁 + * 浣跨敤鏂规硶: + * + * 2, 'banana' => 3), array('apple' => 10, 'banana' => 12)); + * $banana = Typecho_Common::arrayFlatten($fruit, 'banana'); + * print_r($banana); + * //outputs: array(0 => 3, 1 => 12); + * ?> + * + * + * @access public + * @param array $value 琚鐞嗙殑鏁扮粍 + * @param string $key 闇瑕佹娊鍙栫殑閿 + * @return array + */ + public static function arrayFlatten(array $value, $key) + { + $result = array(); + + if ($value) { + foreach ($value as $inval) { + if (is_array($inval) && isset($inval[$key])) { + $result[] = $inval[$key]; + } else { + break; + } + } + } + + return $result; + } + + /** + * 鏍规嵁parse_url鐨勭粨鏋滈噸鏂扮粍鍚坲rl + * + * @access public + * @param array $params 瑙f瀽鍚庣殑鍙傛暟 + * @return string + */ + public static function buildUrl($params) + { + return (isset($params['scheme']) ? $params['scheme'] . '://' : NULL) + . (isset($params['user']) ? $params['user'] . (isset($params['pass']) ? ':' . $params['pass'] : NULL) . '@' : NULL) + . (isset($params['host']) ? $params['host'] : NULL) + . (isset($params['port']) ? ':' . $params['port'] : NULL) + . (isset($params['path']) ? $params['path'] : NULL) + . (isset($params['query']) ? '?' . $params['query'] : NULL) + . (isset($params['fragment']) ? '#' . $params['fragment'] : NULL); + } + + /** + * 鏍规嵁count鏁扮洰鏉ヨ緭鍑哄瓧绗 + * + * echo splitByCount(20, 10, 20, 30, 40, 50); + * + * + * @access public + * @param int $count + * @return string + */ + public static function splitByCount($count) + { + $sizes = func_get_args(); + array_shift($sizes); + + foreach ($sizes as $size) { + if ($count < $size) { + return $size; + } + } + + return 0; + } + + /** + * 鑷棴鍚坔tml淇鍑芥暟 + * 浣跨敤鏂规硶: + * + * $input = '杩欐槸涓娈佃鎴柇鐨刪tml鏂囨湰 + * + * @access public + * @param string $string 闇瑕佷慨澶嶅鐞嗙殑瀛楃涓 + * @return string + */ + public static function fixHtml($string) + { + //鍏抽棴鑷棴鍚堟爣绛 + $startPos = strrpos($string, "<"); + + if (false == $startPos) { + return $string; + } + + $trimString = substr($string, $startPos); + + if (false === strpos($trimString, ">")) { + $string = substr($string, 0, $startPos); + } + + //闈炶嚜闂悎html鏍囩鍒楄〃 + preg_match_all("/<([_0-9a-zA-Z-\:]+)\s*([^>]*)>/is", $string, $startTags); + preg_match_all("/<\/([_0-9a-zA-Z-\:]+)>/is", $string, $closeTags); + + if (!empty($startTags[1]) && is_array($startTags[1])) { + krsort($startTags[1]); + $closeTagsIsArray = is_array($closeTags[1]); + foreach ($startTags[1] as $key => $tag) { + $attrLength = strlen($startTags[2][$key]); + if ($attrLength > 0 && "/" == trim($startTags[2][$key][$attrLength - 1])) { + continue; + } + if (!empty($closeTags[1]) && $closeTagsIsArray) { + if (false !== ($index = array_search($tag, $closeTags[1]))) { + unset($closeTags[1][$index]); + continue; + } + } + $string .= ""; + } + } + + return preg_replace("/\\s*\<\/p\>/is", '

      ', $string); + } + + /** + * 鍘绘帀瀛楃涓蹭腑鐨刪tml鏍囩 + * 浣跨敤鏂规硶: + * + * $input = '
      hello'; + * $output = Typecho_Common::stripTags($input, ); + * echo $output; + * //display: 'hello' + * + * + * @access public + * @param string $html 闇瑕佸鐞嗙殑瀛楃涓 + * @param string $allowableTags 闇瑕佸拷鐣ョ殑html鏍囩 + * @return string + */ + public static function stripTags($html, $allowableTags = NULL) + { + $normalizeTags = ''; + $allowableAttributes = array(); + + if (!empty($allowableTags) && preg_match_all("/\<([_a-z0-9-]+)([^>]*)\>/is", $allowableTags, $tags)) { + $normalizeTags = '<' . implode('><', array_map('strtolower', $tags[1])) . '>'; + $attributes = array_map('trim', $tags[2]); + foreach ($attributes as $key => $val) { + $allowableAttributes[strtolower($tags[1][$key])] = + array_map('strtolower', array_keys(self::__parseAttrs($val))); + } + } + + self::$_allowableAttributes = $allowableAttributes; + $html = strip_tags($html, $normalizeTags); + $html = preg_replace_callback("/<([_a-z0-9-]+)(\s+[^>]+)?>/is", + array('Typecho_Common', '__filterAttrs'), $html); + + return $html; + } + + /** + * 杩囨护鐢ㄤ簬鎼滅储鐨勫瓧绗︿覆 + * + * @access public + * @param string $query 鎼滅储瀛楃涓 + * @return string + */ + public static function filterSearchQuery($query) + { + return str_replace('-', ' ', self::slugName($query)); + } + + /** + * 灏唘rl涓殑闈炴硶瀛楃涓 + * + * @param string $url 闇瑕佽繃婊ょ殑url + * @return string + */ + public static function safeUrl($url) + { + //~ 閽堝location鐨剎ss杩囨护, 鍥犱负鍏剁壒娈婃ф棤娉曚娇鐢╮emoveXSS鍑芥暟 + //~ fix issue 66 + $params = parse_url(str_replace(array("\r", "\n", "\t", ' '), '', $url)); + + /** 绂佹闈炴硶鐨勫崗璁烦杞 */ + if (isset($params['scheme'])) { + if (!in_array($params['scheme'], array('http', 'https'))) { + return '/'; + } + } + + /** 杩囨护瑙f瀽涓 */ + $params = array_map(array('Typecho_Common', '__removeUrlXss'), $params); + return self::buildUrl($params); + } + + /** + * 澶勭悊XSS璺ㄧ珯鏀诲嚮鐨勮繃婊ゅ嚱鏁 + * + * @author kallahar@kallahar.com + * @link http://kallahar.com/smallprojects/php_xss_filter_function.php + * @access public + * @param string $val 闇瑕佸鐞嗙殑瀛楃涓 + * @return string + */ + public static function removeXSS($val) + { + // remove all non-printable characters. CR(0a) and LF(0b) and TAB(9) are allowed + // this prevents some character re-spacing such as + // note that you have to handle splits with \n, \r, and \t later since they *are* allowed in some inputs + $val = preg_replace('/([\x00-\x08]|[\x0b-\x0c]|[\x0e-\x19])/', '', $val); + + // straight replacements, the user should never need these since they're normal characters + // this prevents like + $search = 'abcdefghijklmnopqrstuvwxyz'; + $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $search .= '1234567890!@#$%^&*()'; + $search .= '~`";:?+/={}[]-_|\'\\'; + + for ($i = 0; $i < strlen($search); $i++) { + // ;? matches the ;, which is optional + // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars + + // @ @ search for the hex values + $val = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ; + // @ @ 0{0,7} matches '0' zero to seven times + $val = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ; + } + + // now the only remaining whitespace attacks are \t, \n, and \r + $ra1 = Array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base'); + $ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload'); + $ra = array_merge($ra1, $ra2); + + $found = true; // keep replacing as long as the previous round replaced something + while ($found == true) { + $val_before = $val; + for ($i = 0; $i < sizeof($ra); $i++) { + $pattern = '/'; + for ($j = 0; $j < strlen($ra[$i]); $j++) { + if ($j > 0) { + $pattern .= '('; + $pattern .= '(&#[xX]0{0,8}([9ab]);)'; + $pattern .= '|'; + $pattern .= '|(�{0,8}([9|10|13]);)'; + $pattern .= ')*'; + } + $pattern .= $ra[$i][$j]; + } + $pattern .= '/i'; + $replacement = substr($ra[$i], 0, 2).''.substr($ra[$i], 2); // add in <> to nerf the tag + $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags + + if ($val_before == $val) { + // no replacements were made, so exit the loop + $found = false; + } + } + } + + return $val; + } + + /** + * 瀹藉瓧绗︿覆鎴瓧鍑芥暟 + * + * @access public + * @param string $str 闇瑕佹埅鍙栫殑瀛楃涓 + * @param integer $start 寮濮嬫埅鍙栫殑浣嶇疆 + * @param integer $length 闇瑕佹埅鍙栫殑闀垮害 + * @param string $trim 鎴彇鍚庣殑鎴柇鏍囩ず绗 + * @return string + */ + public static function subStr($str, $start, $length, $trim = "...") + { + if (!strlen($str)) { + return ''; + } + + $iLength = self::strLen($str) - $start; + $tLength = $length < $iLength ? ($length - self::strLen($trim)) : $length; + + if (__TYPECHO_MB_SUPPORTED__) { + $str = mb_substr($str, $start, $tLength, self::$charset); + } else { + if ('UTF-8' == strtoupper(self::$charset)) { + if (preg_match_all("/./u", $str, $matches)) { + $str = implode('', array_slice($matches[0], $start, $tLength)); + } + } else { + $str = substr($str, $start, $tLength); + } + } + + return $length < $iLength ? ($str . $trim) : $str; + } + + /** + * 鑾峰彇瀹藉瓧绗︿覆闀垮害鍑芥暟 + * + * @access public + * @param string $str 闇瑕佽幏鍙栭暱搴︾殑瀛楃涓 + * @return integer + */ + public static function strLen($str) + { + if (__TYPECHO_MB_SUPPORTED__) { + return mb_strlen($str, self::$charset); + } else { + return 'UTF-8' == strtoupper(self::$charset) + ? strlen(utf8_decode($str)) : strlen($str); + } + } + + /** + * 鑾峰彇澶у啓瀛楃涓 + * + * @param string $str + * @access public + * @return string + */ + public static function strToUpper($str) + { + if (__TYPECHO_MB_SUPPORTED__) { + return mb_strtoupper($str, self::$charset); + } else { + return 'UTF-8' == strtoupper(self::$charset) + ? preg_replace_callback("/[a-z]+/u", array('Typecho_Common', '__strToUpper'), $str) : strtoupper($str); + } + } + + /** + * 妫鏌ユ槸鍚︿负鍚堟硶鐨勭紪鐮佹暟鎹 + * + * @param string|array $str + * @return boolean + */ + public static function checkStrEncoding($str) + { + if (is_array($str)) { + return array_map(array('Typecho_Common', 'checkStrEncoding'), $str); + } + + if (__TYPECHO_MB_SUPPORTED__) { + return mb_check_encoding($str, self::$charset); + } else { + // just support utf-8 + return preg_match('//u', $str); + } + } + + /** + * 鐢熸垚缂╃暐鍚 + * + * @access public + * @param string $str 闇瑕佺敓鎴愮缉鐣ュ悕鐨勫瓧绗︿覆 + * @param string $default 榛樿鐨勭缉鐣ュ悕 + * @param integer $maxLength 缂╃暐鍚嶆渶澶ч暱搴 + * @return string + */ + public static function slugName($str, $default = NULL, $maxLength = 128) + { + $str = trim($str); + + if (!strlen($str)) { + return $default; + } + + if (__TYPECHO_MB_SUPPORTED__) { + mb_regex_encoding(self::$charset); + mb_ereg_search_init($str, "[\w" . preg_quote('_-') . "]+"); + $result = mb_ereg_search(); + $return = ''; + + if ($result) { + $regs = mb_ereg_search_getregs(); + $pos = 0; + do { + $return .= ($pos > 0 ? '-' : '') . $regs[0]; + $pos ++; + } while ($regs = mb_ereg_search_regs()); + } + + $str = $return; + } else if ('UTF-8' == strtoupper(self::$charset)) { + if (preg_match_all("/[\w" . preg_quote('_-') . "]+/u", $str, $matches)) { + $str = implode('-', $matches[0]); + } + } else { + $str = str_replace(array("'", ":", "\\", "/", '"'), "", $str); + $str = str_replace(array("+", ",", ' ', '锛', ' ', ".", "?", "=", "&", "!", "<", ">", "(", ")", "[", "]", "{", "}"), "-", $str); + } + + $str = trim($str, '-_'); + $str = !strlen($str) ? $default : $str; + return substr($str, 0, $maxLength); + } + + /** + * 鐢熸垚闅忔満瀛楃涓 + * + * @access public + * @param integer $length 瀛楃涓查暱搴 + * @param boolean $specialChars 鏄惁鏈夌壒娈婂瓧绗 + * @return string + */ + public static function randString($length, $specialChars = false) + { + $chars = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'; + if ($specialChars) { + $chars .= '!@#$%^&*()'; + } + + $result = ''; + $max = strlen($chars) - 1; + for ($i = 0; $i < $length; $i++) { + $result .= $chars[rand(0, $max)]; + } + return $result; + } + + /** + * 瀵瑰瓧绗︿覆杩涜hash鍔犲瘑 + * + * @access public + * @param string $string 闇瑕乭ash鐨勫瓧绗︿覆 + * @param string $salt 鎵扮爜 + * @return string + */ + public static function hash($string, $salt = NULL) + { + /** 鐢熸垚闅忔満瀛楃涓 */ + $salt = empty($salt) ? self::randString(9) : $salt; + $length = strlen($string); + $hash = ''; + $last = ord($string[$length - 1]); + $pos = 0; + + /** 鍒ゆ柇鎵扮爜闀垮害 */ + if (strlen($salt) != 9) { + /** 濡傛灉涓嶆槸9鐩存帴杩斿洖 */ + return; + } + + while ($pos < $length) { + $asc = ord($string[$pos]); + $last = ($last * ord($salt[($last % $asc) % 9]) + $asc) % 95 + 32; + $hash .= chr($last); + $pos ++; + } + + return '$T$' . $salt . md5($hash); + } + + /** + * 鍒ゆ柇hash鍊兼槸鍚︾浉绛 + * + * @access public + * @param string $from 婧愬瓧绗︿覆 + * @param string $to 鐩爣瀛楃涓 + * @return boolean + */ + public static function hashValidate($from, $to) + { + if ('$T$' == substr($to, 0, 3)) { + $salt = substr($to, 3, 9); + return self::hash($from, $salt) === $to; + } else { + return md5($from) === $to; + } + } + + /** + * 灏嗚矾寰勮浆鍖栦负閾炬帴 + * + * @access public + * @param string $path 璺緞 + * @param string $prefix 鍓嶇紑 + * @return string + */ + public static function url($path, $prefix) + { + $path = (0 === strpos($path, './')) ? substr($path, 2) : $path; + return rtrim($prefix, '/') . '/' . str_replace('//', '/', ltrim($path, '/')); + } + + /** + * 鑾峰彇gravatar澶村儚鍦板潃 + * + * @param string $mail + * @param int $size + * @param string $rating + * @param string $default + * @param bool $isSecure + * @return string + */ + public static function gravatarUrl($mail, $size, $rating, $default, $isSecure = false) + { + $url = $isSecure ? 'https://secure.gravatar.com' : 'http://www.gravatar.com'; + $url .= '/avatar/'; + + if (!empty($mail)) { + $url .= md5(strtolower(trim($mail))); + } + + $url .= '?s=' . $size; + $url .= '&r=' . $rating; + $url .= '&d=' . $default; + + return $url; + } + + /** + * 缁檍avascript璧嬪煎姞鍏ユ壈鐮佽璁 + * + * @param string $value + * @return string + */ + public static function shuffleScriptVar($value) + { + $length = strlen($value); + $max = 3; + $offset = 0; + $result = array(); + $cut = array(); + + while ($length > 0) { + $len = rand(0, min($max, $length)); + $rand = "'" . self::randString(rand(1, $max)) . "'"; + + if ($len > 0) { + $val = "'" . substr($value, $offset, $len) . "'"; + $result[] = rand(0, 1) ? "//{$rand}\n{$val}" : "{$val}//{$rand}\n"; + } else { + if (rand(0, 1)) { + $result[] = rand(0, 1) ? "''///*{$rand}*/{$rand}\n" : "/* {$rand}//{$rand} */''"; + } else { + $result[] = rand(0, 1) ? "//{$rand}\n{$rand}" : "{$rand}//{$rand}\n"; + $cut[] = array($offset, strlen($rand) - 2 + $offset); + } + } + + $offset += $len; + $length -= $len; + } + + $name = '_' . self::randString(rand(3, 7)); + $cutName = '_' . self::randString(rand(3, 7)); + $var = implode('+', $result); + $cutVar = Json::encode($cut); + return "(function () { + var {$name} = {$var}, {$cutName} = {$cutVar}; + + for (var i = 0; i < {$cutName}.length; i ++) { + {$name} = {$name}.substring(0, {$cutName}[i][0]) + {$name}.substring({$cutName}[i][1]); + } + + return {$name}; +})();"; + } + + /** + * 杩囨护瀛楁鍚 + * + * @access private + * @param mixed $result + * @return array + */ + public static function filterSQLite2ColumnName($result) + { + /** 濡傛灉缁撴灉涓虹┖,鐩存帴杩斿洖 */ + if (empty($result)) { + return $result; + } + + $tResult = array(); + + /** 閬嶅巻鏁扮粍 */ + foreach ($result as $key => $val) { + /** 鎸夌偣鍒嗛殧 */ + if (false !== ($pos = strpos($key, '.'))) { + $key = substr($key, $pos + 1); + } + + $tResult[trim($key, '"')] = $val; + } + + return $tResult; + } + + /** + * 澶勭悊sqlite2鐨刣istinct count + * + * @param $sql + * @return string + */ + public static function filterSQLite2CountQuery($sql) + { + if (preg_match("/SELECT\s+COUNT\(DISTINCT\s+([^\)]+)\)\s+(AS\s+[^\s]+)?\s*FROM\s+(.+)/is", $sql, $matches)) { + return 'SELECT COUNT(' . $matches[1] . ') ' . $matches[2] . ' FROM SELECT DISTINCT ' + . $matches[1] . ' FROM ' . $matches[3]; + } + + return $sql; + } + + /** + * 鑾峰彇鍥剧墖 + * + * @access public + * @param string $fileName 鏂囦欢鍚 + * @return string + */ + public static function mimeContentType($fileName) + { + //鏀逛负骞跺垪鍒ゆ柇 + if (function_exists('mime_content_type')) { + return mime_content_type($fileName); + } + + if (function_exists('finfo_open')) { + $fInfo = @finfo_open(FILEINFO_MIME_TYPE); + + if (false !== $fInfo) { + $mimeType = finfo_file($fInfo, $fileName); + finfo_close($fInfo); + return $mimeType; + } + } + + $mimeTypes = array( + 'ez' => 'application/andrew-inset', + 'csm' => 'application/cu-seeme', + 'cu' => 'application/cu-seeme', + 'tsp' => 'application/dsptype', + 'spl' => 'application/x-futuresplash', + 'hta' => 'application/hta', + 'cpt' => 'image/x-corelphotopaint', + 'hqx' => 'application/mac-binhex40', + 'nb' => 'application/mathematica', + 'mdb' => 'application/msaccess', + 'doc' => 'application/msword', + 'dot' => 'application/msword', + 'bin' => 'application/octet-stream', + 'oda' => 'application/oda', + 'ogg' => 'application/ogg', + 'prf' => 'application/pics-rules', + 'key' => 'application/pgp-keys', + 'pdf' => 'application/pdf', + 'pgp' => 'application/pgp-signature', + 'ps' => 'application/postscript', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'rss' => 'application/rss+xml', + 'rtf' => 'text/rtf', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'wp5' => 'application/wordperfect5.1', + 'xht' => 'application/xhtml+xml', + 'xhtml' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'cdy' => 'application/vnd.cinderella', + 'mif' => 'application/x-mif', + 'xls' => 'application/vnd.ms-excel', + 'xlb' => 'application/vnd.ms-excel', + 'cat' => 'application/vnd.ms-pki.seccat', + 'stl' => 'application/vnd.ms-pki.stl', + 'ppt' => 'application/vnd.ms-powerpoint', + 'pps' => 'application/vnd.ms-powerpoint', + 'pot' => 'application/vnd.ms-powerpoint', + 'sdc' => 'application/vnd.stardivision.calc', + 'sda' => 'application/vnd.stardivision.draw', + 'sdd' => 'application/vnd.stardivision.impress', + 'sdp' => 'application/vnd.stardivision.impress', + 'smf' => 'application/vnd.stardivision.math', + 'sdw' => 'application/vnd.stardivision.writer', + 'vor' => 'application/vnd.stardivision.writer', + 'sgl' => 'application/vnd.stardivision.writer-global', + 'sxc' => 'application/vnd.sun.xml.calc', + 'stc' => 'application/vnd.sun.xml.calc.template', + 'sxd' => 'application/vnd.sun.xml.draw', + 'std' => 'application/vnd.sun.xml.draw.template', + 'sxi' => 'application/vnd.sun.xml.impress', + 'sti' => 'application/vnd.sun.xml.impress.template', + 'sxm' => 'application/vnd.sun.xml.math', + 'sxw' => 'application/vnd.sun.xml.writer', + 'sxg' => 'application/vnd.sun.xml.writer.global', + 'stw' => 'application/vnd.sun.xml.writer.template', + 'sis' => 'application/vnd.symbian.install', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'wmlsc' => 'application/vnd.wap.wmlscriptc', + 'wk' => 'application/x-123', + 'dmg' => 'application/x-apple-diskimage', + 'bcpio' => 'application/x-bcpio', + 'torrent' => 'application/x-bittorrent', + 'cdf' => 'application/x-cdf', + 'vcd' => 'application/x-cdlink', + 'pgn' => 'application/x-chess-pgn', + 'cpio' => 'application/x-cpio', + 'csh' => 'text/x-csh', + 'deb' => 'application/x-debian-package', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'wad' => 'application/x-doom', + 'dms' => 'application/x-dms', + 'dvi' => 'application/x-dvi', + 'pfa' => 'application/x-font', + 'pfb' => 'application/x-font', + 'gsf' => 'application/x-font', + 'pcf' => 'application/x-font', + 'pcf.Z' => 'application/x-font', + 'gnumeric' => 'application/x-gnumeric', + 'sgf' => 'application/x-go-sgf', + 'gcf' => 'application/x-graphing-calculator', + 'gtar' => 'application/x-gtar', + 'tgz' => 'application/x-gtar', + 'taz' => 'application/x-gtar', + 'gz' => 'application/x-gtar', + 'hdf' => 'application/x-hdf', + 'phtml' => 'application/x-httpd-php', + 'pht' => 'application/x-httpd-php', + 'php' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'php3' => 'application/x-httpd-php3', + 'php3p' => 'application/x-httpd-php3-preprocessed', + 'php4' => 'application/x-httpd-php4', + 'ica' => 'application/x-ica', + 'ins' => 'application/x-internet-signup', + 'isp' => 'application/x-internet-signup', + 'iii' => 'application/x-iphone', + 'jar' => 'application/x-java-archive', + 'jnlp' => 'application/x-java-jnlp-file', + 'ser' => 'application/x-java-serialized-object', + 'class' => 'application/x-java-vm', + 'js' => 'application/x-javascript', + 'chrt' => 'application/x-kchart', + 'kil' => 'application/x-killustrator', + 'kpr' => 'application/x-kpresenter', + 'kpt' => 'application/x-kpresenter', + 'skp' => 'application/x-koan', + 'skd' => 'application/x-koan', + 'skt' => 'application/x-koan', + 'skm' => 'application/x-koan', + 'ksp' => 'application/x-kspread', + 'kwd' => 'application/x-kword', + 'kwt' => 'application/x-kword', + 'latex' => 'application/x-latex', + 'lha' => 'application/x-lha', + 'lzh' => 'application/x-lzh', + 'lzx' => 'application/x-lzx', + 'frm' => 'application/x-maker', + 'maker' => 'application/x-maker', + 'frame' => 'application/x-maker', + 'fm' => 'application/x-maker', + 'fb' => 'application/x-maker', + 'book' => 'application/x-maker', + 'fbdoc' => 'application/x-maker', + 'wmz' => 'application/x-ms-wmz', + 'wmd' => 'application/x-ms-wmd', + 'com' => 'application/x-msdos-program', + 'exe' => 'application/x-msdos-program', + 'bat' => 'application/x-msdos-program', + 'dll' => 'application/x-msdos-program', + 'msi' => 'application/x-msi', + 'nc' => 'application/x-netcdf', + 'pac' => 'application/x-ns-proxy-autoconfig', + 'nwc' => 'application/x-nwc', + 'o' => 'application/x-object', + 'oza' => 'application/x-oz-application', + 'pl' => 'application/x-perl', + 'pm' => 'application/x-perl', + 'p7r' => 'application/x-pkcs7-certreqresp', + 'crl' => 'application/x-pkcs7-crl', + 'qtl' => 'application/x-quicktimeplayer', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'shar' => 'application/x-shar', + 'swf' => 'application/x-shockwave-flash', + 'swfl' => 'application/x-shockwave-flash', + 'sh' => 'text/x-sh', + 'sit' => 'application/x-stuffit', + 'sv4cpio' => 'application/x-sv4cpio', + 'sv4crc' => 'application/x-sv4crc', + 'tar' => 'application/x-tar', + 'tcl' => 'text/x-tcl', + 'tex' => 'text/x-tex', + 'gf' => 'application/x-tex-gf', + 'pk' => 'application/x-tex-pk', + 'texinfo' => 'application/x-texinfo', + 'texi' => 'application/x-texinfo', + '~' => 'application/x-trash', + '%' => 'application/x-trash', + 'bak' => 'application/x-trash', + 'old' => 'application/x-trash', + 'sik' => 'application/x-trash', + 't' => 'application/x-troff', + 'tr' => 'application/x-troff', + 'roff' => 'application/x-troff', + 'man' => 'application/x-troff-man', + 'me' => 'application/x-troff-me', + 'ms' => 'application/x-troff-ms', + 'ustar' => 'application/x-ustar', + 'src' => 'application/x-wais-source', + 'wz' => 'application/x-wingz', + 'crt' => 'application/x-x509-ca-cert', + 'fig' => 'application/x-xfig', + 'au' => 'audio/basic', + 'snd' => 'audio/basic', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'kar' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mpega' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'm3u' => 'audio/x-mpegurl', + 'sid' => 'audio/prs.sid', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'gsm' => 'audio/x-gsm', + 'wma' => 'audio/x-ms-wma', + 'wax' => 'audio/x-ms-wax', + 'ra' => 'audio/x-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'ram' => 'audio/x-pn-realaudio', + 'pls' => 'audio/x-scpls', + 'sd2' => 'audio/x-sd2', + 'wav' => 'audio/x-wav', + 'pdb' => 'chemical/x-pdb', + 'xyz' => 'chemical/x-xyz', + 'bmp' => 'image/x-ms-bmp', + 'gif' => 'image/gif', + 'ief' => 'image/ief', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'pcx' => 'image/pcx', + 'png' => 'image/png', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'wbmp' => 'image/vnd.wap.wbmp', + 'ras' => 'image/x-cmu-raster', + 'cdr' => 'image/x-coreldraw', + 'pat' => 'image/x-coreldrawpattern', + 'cdt' => 'image/x-coreldrawtemplate', + 'djvu' => 'image/x-djvu', + 'djv' => 'image/x-djvu', + 'ico' => 'image/x-icon', + 'art' => 'image/x-jg', + 'jng' => 'image/x-jng', + 'psd' => 'image/x-photoshop', + 'pnm' => 'image/x-portable-anymap', + 'pbm' => 'image/x-portable-bitmap', + 'pgm' => 'image/x-portable-graymap', + 'ppm' => 'image/x-portable-pixmap', + 'rgb' => 'image/x-rgb', + 'xbm' => 'image/x-xbitmap', + 'xpm' => 'image/x-xpixmap', + 'xwd' => 'image/x-xwindowdump', + 'igs' => 'model/iges', + 'iges' => 'model/iges', + 'msh' => 'model/mesh', + 'mesh' => 'model/mesh', + 'silo' => 'model/mesh', + 'wrl' => 'x-world/x-vrml', + 'vrml' => 'x-world/x-vrml', + 'csv' => 'text/comma-separated-values', + 'css' => 'text/css', + '323' => 'text/h323', + 'htm' => 'text/html', + 'html' => 'text/html', + 'uls' => 'text/iuls', + 'mml' => 'text/mathml', + 'asc' => 'text/plain', + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'diff' => 'text/plain', + 'rtx' => 'text/richtext', + 'sct' => 'text/scriptlet', + 'wsc' => 'text/scriptlet', + 'tm' => 'text/texmacs', + 'ts' => 'text/texmacs', + 'tsv' => 'text/tab-separated-values', + 'jad' => 'text/vnd.sun.j2me.app-descriptor', + 'wml' => 'text/vnd.wap.wml', + 'wmls' => 'text/vnd.wap.wmlscript', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'h++' => 'text/x-c++hdr', + 'hpp' => 'text/x-c++hdr', + 'hxx' => 'text/x-c++hdr', + 'hh' => 'text/x-c++hdr', + 'c++' => 'text/x-c++src', + 'cpp' => 'text/x-c++src', + 'cxx' => 'text/x-c++src', + 'cc' => 'text/x-c++src', + 'h' => 'text/x-chdr', + 'c' => 'text/x-csrc', + 'java' => 'text/x-java', + 'moc' => 'text/x-moc', + 'p' => 'text/x-pascal', + 'pas' => 'text/x-pascal', + '***' => 'text/x-pcs-***', + 'shtml' => 'text/x-server-parsed-html', + 'etx' => 'text/x-setext', + 'tk' => 'text/x-tcl', + 'ltx' => 'text/x-tex', + 'sty' => 'text/x-tex', + 'cls' => 'text/x-tex', + 'vcs' => 'text/x-vcalendar', + 'vcf' => 'text/x-vcard', + 'dl' => 'video/dl', + 'fli' => 'video/fli', + 'gl' => 'video/gl', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'mxu' => 'video/vnd.mpegurl', + 'dif' => 'video/x-dv', + 'dv' => 'video/x-dv', + 'lsf' => 'video/x-la-asf', + 'lsx' => 'video/x-la-asf', + 'mng' => 'video/x-mng', + 'asf' => 'video/x-ms-asf', + 'asx' => 'video/x-ms-asf', + 'wm' => 'video/x-ms-wm', + 'wmv' => 'video/x-ms-wmv', + 'wmx' => 'video/x-ms-wmx', + 'wvx' => 'video/x-ms-wvx', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'ice' => 'x-conference/x-cooltalk', + 'vrm' => 'x-world/x-vrml', + 'rar' => 'application/x-rar-compressed', + 'cab' => 'application/vnd.ms-cab-compressed' + ); + + $part = explode('.', $fileName); + $size = count($part); + + if ($size > 1) { + $ext = $part[$size - 1]; + if (isset($mimeTypes[$ext])) { + return $mimeTypes[$ext]; + } + } + + return 'application/octet-stream'; + } + + /** + * 瀵绘壘鍖归厤鐨刴ime鍥炬爣 + * + * @access public + * @param string $mime mime绫诲瀷 + * @return string + */ + public static function mimeIconType($mime) + { + $parts = explode('/', $mime); + + if (count($parts) < 2) { + return 'unknown'; + } + + list ($type, $stream) = $parts; + + if (in_array($type, array('image', 'video', 'audio', 'text', 'application'))) { + switch (true) { + case in_array($stream, array('msword', 'msaccess', 'ms-powerpoint', 'ms-powerpoint')): + case 0 === strpos($stream, 'vnd.'): + return 'office'; + case false !== strpos($stream, 'html') || false !== strpos($stream, 'xml') || false !== strpos($stream, 'wml'): + return 'html'; + case false !== strpos($stream, 'compressed') || false !== strpos($stream, 'zip') || + in_array($stream, array('application/x-gtar', 'application/x-tar')): + return 'archive'; + case 'text' == $type && 0 === strpos($stream, 'x-'): + return 'script'; + default: + return $type; + } + } else { + return 'unknown'; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Config.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Config.php" new file mode 100644 index 0000000..0e58fc7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Config.php" @@ -0,0 +1,198 @@ +setDefault($config); + } + + /** + * 宸ュ巶妯″紡瀹炰緥鍖栦竴涓綋鍓嶉厤缃 + * + * @access public + * @param array $config 閰嶇疆鍒楄〃 + * @return Typecho_Config + */ + public static function factory($config = array()) + { + return new Typecho_Config($config); + } + + /** + * 璁剧疆榛樿鐨勯厤缃 + * + * @access public + * @param mixed $config 閰嶇疆淇℃伅 + * @param boolean $replace 鏄惁鏇挎崲宸茬粡瀛樺湪鐨勪俊鎭 + * @return void + */ + public function setDefault($config, $replace = false) + { + if (empty($config)) { + return; + } + + /** 鍒濆鍖栧弬鏁 */ + if (is_string($config)) { + parse_str($config, $params); + } else { + $params = $config; + } + + /** 璁剧疆榛樿鍙傛暟 */ + foreach ($params as $name => $value) { + if ($replace || !array_key_exists($name, $this->_currentConfig)) { + $this->_currentConfig[$name] = $value; + } + } + } + + /** + * 閲嶈鎸囬拡 + * + * @access public + * @return void + */ + public function rewind() + { + reset($this->_currentConfig); + } + + /** + * 杩斿洖褰撳墠鍊 + * + * @access public + * @return mixed + */ + public function current() + { + return current($this->_currentConfig); + } + + /** + * 鎸囬拡鍚庣Щ涓浣 + * + * @access public + * @return void + */ + public function next() + { + next($this->_currentConfig); + } + + /** + * 鑾峰彇褰撳墠鎸囬拡 + * + * @access public + * @return mixed + */ + public function key() + { + return key($this->_currentConfig); + } + + /** + * 楠岃瘉褰撳墠鍊兼槸鍚﹀埌杈炬渶鍚 + * + * @access public + * @return boolean + */ + public function valid() + { + return false !== $this->current(); + } + + /** + * 榄旀湳鍑芥暟鑾峰彇涓涓厤缃 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @return mixed + */ + public function __get($name) + { + return isset($this->_currentConfig[$name]) ? $this->_currentConfig[$name] : NULL; + } + + /** + * 榄旀湳鍑芥暟璁剧疆涓涓厤缃 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @param mixed $value 閰嶇疆鍊 + * @return void + */ + public function __set($name, $value) + { + $this->_currentConfig[$name] = $value; + } + + /** + * 鐩存帴杈撳嚭榛樿閰嶇疆鍊 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @param array $args 鍙傛暟 + * @return void + */ + public function __call($name, $args) + { + echo $this->_currentConfig[$name]; + } + + /** + * 鍒ゆ柇褰撳墠閰嶇疆鍊兼槸鍚﹀瓨鍦 + * + * @access public + * @param string $name 閰嶇疆鍚嶇О + * @return boolean + */ + public function __isSet($name) + { + return isset($this->_currentConfig[$name]); + } + + /** + * 榄旀湳鏂规硶,鎵撳嵃褰撳墠閰嶇疆鏁扮粍 + * + * @access public + * @return string + */ + public function __toString() + { + return serialize($this->_currentConfig); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Cookie.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Cookie.php" new file mode 100644 index 0000000..8c5e59e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Cookie.php" @@ -0,0 +1,124 @@ +timeStamp = $gmtTime + (self::$timezoneOffset - self::$serverTimezoneOffset); + } + + /** + * 璁剧疆褰撳墠鏈熸湜鐨勬椂鍖哄亸绉 + * + * @access public + * @param integer $offset + * @return void + */ + public static function setTimezoneOffset($offset) + { + self::$timezoneOffset = $offset; + self::$serverTimezoneOffset = idate('Z'); + } + + /** + * 鑾峰彇鏍煎紡鍖栨椂闂 + * + * @access public + * @param string $format 鏃堕棿鏍煎紡 + * @return string + */ + public function format($format) + { + return date($format, $this->timeStamp); + } + + /** + * 鑾峰彇鍥介檯鍖栧亸绉绘椂闂 + * + * @access public + * @return string + */ + public function word() + { + return Typecho_I18n::dateWord($this->timeStamp, self::gmtTime() + (self::$timezoneOffset - self::$serverTimezoneOffset)); + } + + /** + * 鑾峰彇鍗曢」鏁版嵁 + * + * @access public + * @param string $name 鍚嶇О + * @return integer + */ + public function __get($name) + { + switch ($name) { + case 'year': + return date('Y', $this->timeStamp); + case 'month': + return date('m', $this->timeStamp); + case 'day': + return date('d', $this->timeStamp); + default: + return; + } + } + + /** + * 鑾峰彇GMT鏃堕棿 + * + * @access public + * @return integer + */ + public static function gmtTime() + { + return self::$gmtTimeStamp ? self::$gmtTimeStamp : (self::$gmtTimeStamp = @gmmktime()); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db.php" new file mode 100644 index 0000000..df6ab5e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db.php" @@ -0,0 +1,407 @@ +_adapterName = $adapterName; + + /** 鏁版嵁搴撻傞厤鍣 */ + $adapterName = 'Typecho_Db_Adapter_' . $adapterName; + + if (!call_user_func(array($adapterName, 'isAvailable'))) { + throw new Typecho_Db_Exception("Adapter {$adapterName} is not available"); + } + + $this->_prefix = $prefix; + + /** 鍒濆鍖栧唴閮ㄥ彉閲 */ + $this->_pool = array(); + $this->_connectedPool = array(); + $this->_config = array(); + + //瀹炰緥鍖栭傞厤鍣ㄥ璞 + $this->_adapter = new $adapterName(); + } + + /** + * 鑾峰彇閫傞厤鍣ㄥ悕绉 + * + * @access public + * @return string + */ + public function getAdapterName() + { + return $this->_adapterName; + } + + /** + * 鑾峰彇琛ㄥ墠缂 + * + * @access public + * @return string + */ + public function getPrefix() + { + return $this->_prefix; + } + + /** + * getConfig + * + * @access public + * @return void + */ + public function getConfig() + { + return $this->_config; + } + + /** + * 鑾峰彇SQL璇嶆硶鏋勫缓鍣ㄥ疄渚嬪寲瀵硅薄 + * + * @return Typecho_Db_Query + */ + public function sql() + { + return new Typecho_Db_Query($this->_adapter, $this->_prefix); + } + + /** + * 涓哄鏁版嵁搴撴彁渚涙敮鎸 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳疄渚 + * @param integer $op 鏁版嵁搴撴搷浣 + * @return void + */ + public function addServer($config, $op) + { + $this->_config[] = Typecho_Config::factory($config); + $key = count($this->_config) - 1; + + /** 灏嗚繛鎺ユ斁鍏ユ睜涓 */ + switch ($op) { + case self::READ: + case self::WRITE: + $this->_pool[$op][] = $key; + break; + default: + $this->_pool[self::READ][] = $key; + $this->_pool[self::WRITE][] = $key; + break; + } + } + + /** + * 璁剧疆榛樿鏁版嵁搴撳璞 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @return void + */ + public static function set(Typecho_Db $db) + { + self::$_instance = $db; + } + + /** + * 鑾峰彇鏁版嵁搴撳疄渚嬪寲瀵硅薄 + * 鐢ㄩ潤鎬佸彉閲忓瓨鍌ㄥ疄渚嬪寲鐨勬暟鎹簱瀵硅薄,鍙互淇濊瘉鏁版嵁杩炴帴浠呰繘琛屼竴娆 + * + * @return Typecho_Db + * @throws Typecho_Db_Exception + */ + public static function get() + { + if (empty(self::$_instance)) { + /** Typecho_Db_Exception */ + throw new Typecho_Db_Exception('Missing Database Object'); + } + + return self::$_instance; + } + + /** + * 閫夋嫨鏌ヨ瀛楁 + * + * @access public + * @param mixed $field 鏌ヨ瀛楁 + * @return Typecho_Db_Query + */ + public function select() + { + $args = func_get_args(); + return call_user_func_array(array($this->sql(), 'select'), $args ? $args : array('*')); + } + + /** + * 鏇存柊璁板綍鎿嶄綔(UPDATE) + * + * @param string $table 闇瑕佹洿鏂拌褰曠殑琛 + * @return Typecho_Db_Query + */ + public function update($table) + { + return $this->sql()->update($table); + } + + /** + * 鍒犻櫎璁板綍鎿嶄綔(DELETE) + * + * @param string $table 闇瑕佸垹闄よ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function delete($table) + { + return $this->sql()->delete($table); + } + + /** + * 鎻掑叆璁板綍鎿嶄綔(INSERT) + * + * @param string $table 闇瑕佹彃鍏ヨ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function insert($table) + { + return $this->sql()->insert($table); + } + + /** + * 鎵ц鏌ヨ璇彞 + * + * @param mixed $query 鏌ヨ璇彞鎴栬呮煡璇㈠璞 + * @param boolean $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鎿嶄綔鍔ㄤ綔 + * @return mixed + */ + public function query($query, $op = self::READ, $action = self::SELECT) + { + /** 鍦ㄩ傞厤鍣ㄤ腑鎵ц鏌ヨ */ + if ($query instanceof Typecho_Db_Query) { + $action = $query->getAttribute('action'); + $op = (self::UPDATE == $action || self::DELETE == $action + || self::INSERT == $action) ? self::WRITE : self::READ; + } else if (!is_string($query)) { + /** 濡傛灉query涓嶆槸瀵硅薄涔熶笉鏄瓧绗︿覆,閭d箞灏嗗叾鍒ゆ柇涓烘煡璇㈣祫婧愬彞鏌,鐩存帴杩斿洖 */ + return $query; + } + + /** 閫夋嫨杩炴帴姹 */ + if (!isset($this->_connectedPool[$op])) { + if (empty($this->_pool[$op])) { + /** Typecho_Db_Exception */ + throw new Typecho_Db_Exception('Missing Database Connection'); + } + + //鑾峰彇鐩稿簲璇绘垨鍐欐湇鍔″櫒杩炴帴姹犱腑鐨勪竴涓 + $selectConnection = rand(0, count($this->_pool[$op]) - 1); + //鑾峰彇闅忔満鑾峰緱鐨勮繛鎺ユ睜閰嶇疆 + $selectConnectionConfig = $this->_config[$this->_pool[$op][$selectConnection]]; + $selectConnectionHandle = $this->_adapter->connect($selectConnectionConfig); + $this->_connectedPool[$op] = &$selectConnectionHandle; + + } + $handle = $this->_connectedPool[$op]; + + /** 鎻愪氦鏌ヨ */ + $resource = $this->_adapter->query($query, $handle, $op, $action); + + if ($action) { + //鏍规嵁鏌ヨ鍔ㄤ綔杩斿洖鐩稿簲璧勬簮 + switch ($action) { + case self::UPDATE: + case self::DELETE: + return $this->_adapter->affectedRows($resource, $handle); + case self::INSERT: + return $this->_adapter->lastInsertId($resource, $handle); + case self::SELECT: + default: + return $resource; + } + } else { + //濡傛灉鐩存帴鎵ц鏌ヨ璇彞鍒欒繑鍥炶祫婧 + return $resource; + } + } + + /** + * 涓娆″彇鍑烘墍鏈夎 + * + * @param mixed $query 鏌ヨ瀵硅薄 + * @param array $filter 琛岃繃婊ゅ櫒鍑芥暟,灏嗘煡璇㈢殑姣忎竴琛屼綔涓虹涓涓弬鏁颁紶鍏ユ寚瀹氱殑杩囨护鍣ㄤ腑 + * @return array + */ + public function fetchAll($query, array $filter = NULL) + { + //鎵ц鏌ヨ + $resource = $this->query($query, self::READ); + $result = array(); + + /** 鍙栧嚭杩囨护鍣 */ + if (!empty($filter)) { + list($object, $method) = $filter; + } + + //鍙栧嚭姣忎竴琛 + while ($rows = $this->_adapter->fetch($resource)) { + //鍒ゆ柇鏄惁鏈夎繃婊ゅ櫒 + $result[] = $filter ? call_user_func(array(&$object, $method), $rows) : $rows; + } + + return $result; + } + + /** + * 涓娆″彇鍑轰竴琛 + * + * @param mixed $query 鏌ヨ瀵硅薄 + * @param array $filter 琛岃繃婊ゅ櫒鍑芥暟,灏嗘煡璇㈢殑姣忎竴琛屼綔涓虹涓涓弬鏁颁紶鍏ユ寚瀹氱殑杩囨护鍣ㄤ腑 + * @return stdClass + */ + public function fetchRow($query, array $filter = NULL) + { + $resource = $this->query($query, self::READ); + + /** 鍙栧嚭杩囨护鍣 */ + if ($filter) { + list($object, $method) = $filter; + } + + return ($rows = $this->_adapter->fetch($resource)) ? + ($filter ? $object->$method($rows) : $rows) : + array(); + } + + /** + * 涓娆″彇鍑轰竴涓璞 + * + * @param mixed $query 鏌ヨ瀵硅薄 + * @param array $filter 琛岃繃婊ゅ櫒鍑芥暟,灏嗘煡璇㈢殑姣忎竴琛屼綔涓虹涓涓弬鏁颁紶鍏ユ寚瀹氱殑杩囨护鍣ㄤ腑 + * @return array + */ + public function fetchObject($query, array $filter = NULL) + { + $resource = $this->query($query, self::READ); + + /** 鍙栧嚭杩囨护鍣 */ + if ($filter) { + list($object, $method) = $filter; + } + + return ($rows = $this->_adapter->fetchObject($resource)) ? + ($filter ? $object->$method($rows) : $rows) : + new stdClass(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter.php" new file mode 100644 index 0000000..63170c8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter.php" @@ -0,0 +1,104 @@ +_dbLink = @mysql_connect($config->host . (empty($config->port) ? '' : ':' . $config->port), + $config->user, $config->password, true)) { + if (@mysql_select_db($config->database, $this->_dbLink)) { + if ($config->charset) { + mysql_query("SET NAMES '{$config->charset}'", $this->_dbLink); + } + return $this->_dbLink; + } + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception(@mysql_error($this->_dbLink)); + } + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query 鏁版嵁搴撴煡璇QL瀛楃涓 + * @param mixed $handle 杩炴帴瀵硅薄 + * @param integer $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鏁版嵁搴撳姩浣 + * @throws Typecho_Db_Exception + * @return resource + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + if ($resource = @mysql_query($query instanceof Typecho_Db_Query ? $query->__toString() : $query, $handle)) { + return $resource; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Query_Exception(@mysql_error($this->_dbLink), mysql_errno($this->_dbLink)); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return mysql_fetch_assoc($resource); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return mysql_fetch_object($resource); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . str_replace(array('\'', '\\'), array('\'\'', '\\\\'), $string) . '\''; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '`' . $string . '`'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return mysql_affected_rows($handle); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + return mysql_insert_id($handle); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" new file mode 100644 index 0000000..c19eff7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo.php" @@ -0,0 +1,173 @@ +_object = $this->init($config); + $this->_object->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); + return $this->_object; + } catch (PDOException $e) { + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception($e->getMessage()); + } + } + + /** + * 鍒濆鍖栨暟鎹簱 + * + * @param Typecho_Config $config 鏁版嵁搴撻厤缃 + * @abstract + * @access public + * @return PDO + */ + abstract public function init(Typecho_Config $config); + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query 鏁版嵁搴撴煡璇QL瀛楃涓 + * @param mixed $handle 杩炴帴瀵硅薄 + * @param integer $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鏁版嵁搴撳姩浣 + * @throws Typecho_Db_Exception + * @return resource + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + try { + $isQueryObject = $query instanceof Typecho_Db_Query; + $this->_lastTable = $isQueryObject ? $query->getAttribute('table') : NULL; + $resource = $handle->prepare($isQueryObject ? $query->__toString() : $query); + $resource->execute(); + } catch (PDOException $e) { + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Query_Exception($e->getMessage(), $e->getCode()); + } + + return $resource; + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return $resource->fetch(PDO::FETCH_ASSOC); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return $resource->fetchObject(); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return $this->_object->quote($string); + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string){} + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql){} + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return $resource->rowCount(); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + return $handle->lastInsertId(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" new file mode 100644 index 0000000..cf8269d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Mysql.php" @@ -0,0 +1,90 @@ +dsn) ? $config->dsn : + "mysql:dbname={$config->database};host={$config->host};port={$config->port}", $config->user, $config->password); + $pdo->setAttribute(PDO::MYSQL_ATTR_USE_BUFFERED_QUERY, true); + $pdo->exec("SET NAMES '{$config->charset}'"); + return $pdo; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '`' . $string . '`'; + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . str_replace(array('\'', '\\'), array('\'\'', '\\\\'), $string) . '\''; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" new file mode 100644 index 0000000..90ca1c8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/Pgsql.php" @@ -0,0 +1,94 @@ +database};host={$config->host};port={$config->port}", $config->user, $config->password); + $pdo->exec("SET NAMES '{$config->charset}'"); + return $pdo; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + /** 鏌ョ湅鏄惁瀛樺湪搴忓垪,鍙兘闇瑕佹洿涓ユ牸鐨勬鏌 */ + if ($handle->query('SELECT oid FROM pg_class WHERE relname = ' . $this->quoteValue($this->_lastTable . '_seq'))->fetchAll()) { + return $handle->lastInsertId($this->_lastTable . '_seq'); + } + + return 0; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" new file mode 100644 index 0000000..b1f5c70 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pdo/SQLite.php" @@ -0,0 +1,106 @@ +file}"); + $this->_isSQLite2 = version_compare($pdo->getAttribute(PDO::ATTR_SERVER_VERSION), '3.0.0', '<'); + return $pdo; + } + + /** + * @param resource $resource + * @return array + */ + public function fetch($resource) + { + return Typecho_Common::filterSQLite2ColumnName(parent::fetch($resource)); + } + + /** + * @param resource $resource + * @return object + */ + public function fetchObject($resource) + { + return (object) $this->fetch($resource); + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + $query = 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + + if ($this->_isSQLite2) { + $query = Typecho_Common::filterSQLite2CountQuery($query); + } + + return $query; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" new file mode 100644 index 0000000..e711f4d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/Pgsql.php" @@ -0,0 +1,184 @@ +_dbLink = @pg_connect("host={$config->host} port={$config->port} dbname={$config->database} user={$config->user} password={$config->password}")) { + if ($config->charset) { + pg_query($this->_dbLink, "SET NAMES '{$config->charset}'"); + } + return $this->_dbLink; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception(@pg_last_error($this->_dbLink)); + } + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query 鏁版嵁搴撴煡璇QL瀛楃涓 + * @param mixed $handle 杩炴帴瀵硅薄 + * @param integer $op 鏁版嵁搴撹鍐欑姸鎬 + * @param string $action 鏁版嵁搴撳姩浣 + * @throws Typecho_Db_Exception + * @return resource + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + $isQueryObject = $query instanceof Typecho_Db_Query; + $this->_lastTable = $isQueryObject ? $query->getAttribute('table') : NULL; + if ($resource = @pg_query($handle, $isQueryObject ? $query->__toString() : $query)) { + return $resource; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Query_Exception(@pg_last_error($this->_dbLink), + pg_result_error_field(pg_get_result($this->_dbLink), PGSQL_DIAG_SQLSTATE)); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return pg_fetch_assoc($resource); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return pg_fetch_object($resource); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . pg_escape_string($string) . '\''; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return 'SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']; + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return pg_affected_rows($resource); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + /** 鏌ョ湅鏄惁瀛樺湪搴忓垪,鍙兘闇瑕佹洿涓ユ牸鐨勬鏌 */ + if (pg_fetch_assoc(pg_query($handle, 'SELECT oid FROM pg_class WHERE relname = ' . $this->quoteValue($this->_lastTable . '_seq')))) { + return pg_fetch_result(pg_query($handle, 'SELECT CURRVAL(' . $this->quoteValue($this->_lastTable . '_seq') . ')'), 0, 0); + } + + return 0; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" new file mode 100644 index 0000000..5378191 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Adapter/SQLite.php" @@ -0,0 +1,166 @@ +_dbHandle = sqlite_open($config->file, 0666, $error)) { + return $this->_dbHandle; + } + + /** 鏁版嵁搴撳紓甯 */ + throw new Typecho_Db_Adapter_Exception($error); + } + + /** + * 鎵ц鏁版嵁搴撴煡璇 + * + * @param string $query + * @param mixed $handle + * @param int $op + * @param null $action + * @return resource|SQLiteResult + * @throws Typecho_Db_Query_Exception + */ + public function query($query, $handle, $op = Typecho_Db::READ, $action = NULL) + { + if ($resource = @sqlite_query($query instanceof Typecho_Db_Query ? $query->__toString() : $query, $handle)) { + return $resource; + } + + /** 鏁版嵁搴撳紓甯 */ + $errorCode = sqlite_last_error($this->_dbHandle); + throw new Typecho_Db_Query_Exception(sqlite_error_string($errorCode), $errorCode); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓烘暟缁勫彇鍑,鍏朵腑瀛楁鍚嶅搴旀暟缁勯敭鍊 + * + * @param resource $resource 鏌ヨ杩斿洖璧勬簮鏍囪瘑 + * @return array + */ + public function fetch($resource) + { + return Typecho_Common::filterSQLite2ColumnName(sqlite_fetch_array($resource, SQLITE_ASSOC)); + } + + /** + * 灏嗘暟鎹煡璇㈢殑鍏朵腑涓琛屼綔涓哄璞″彇鍑,鍏朵腑瀛楁鍚嶅搴斿璞″睘鎬 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @return object + */ + public function fetchObject($resource) + { + return (object) $this->fetch($resource); + } + + /** + * 寮曞彿杞箟鍑芥暟 + * + * @param string $string 闇瑕佽浆涔夌殑瀛楃涓 + * @return string + */ + public function quoteValue($string) + { + return '\'' . str_replace('\'', '\'\'', $string) . '\''; + } + + /** + * 瀵硅薄寮曞彿杩囨护 + * + * @access public + * @param string $string + * @return string + */ + public function quoteColumn($string) + { + return '"' . $string . '"'; + } + + /** + * 鍚堟垚鏌ヨ璇彞 + * + * @access public + * @param array $sql 鏌ヨ瀵硅薄璇嶆硶鏁扮粍 + * @return string + */ + public function parseSelect(array $sql) + { + if (!empty($sql['join'])) { + foreach ($sql['join'] as $val) { + list($table, $condition, $op) = $val; + $sql['table'] = "{$sql['table']} {$op} JOIN {$table} ON {$condition}"; + } + } + + $sql['limit'] = (0 == strlen($sql['limit'])) ? NULL : ' LIMIT ' . $sql['limit']; + $sql['offset'] = (0 == strlen($sql['offset'])) ? NULL : ' OFFSET ' . $sql['offset']; + + return Typecho_Common::filterSQLite2CountQuery('SELECT ' . $sql['fields'] . ' FROM ' . $sql['table'] . + $sql['where'] . $sql['group'] . $sql['having'] . $sql['order'] . $sql['limit'] . $sql['offset']); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃煡璇㈠奖鍝嶇殑琛屾暟 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function affectedRows($resource, $handle) + { + return sqlite_changes($handle); + } + + /** + * 鍙栧嚭鏈鍚庝竴娆℃彃鍏ヨ繑鍥炵殑涓婚敭鍊 + * + * @param resource $resource 鏌ヨ鐨勮祫婧愭暟鎹 + * @param mixed $handle 杩炴帴瀵硅薄 + * @return integer + */ + public function lastInsertId($resource, $handle) + { + return sqlite_last_insert_rowid($handle); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Exception.php" new file mode 100644 index 0000000..460c70c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Exception.php" @@ -0,0 +1,17 @@ +select('posts', 'post_id, post_title') + * ->where('post_id = %d', 1) + * ->limit(1); + * echo $query; + * 鎵撳嵃鐨勭粨鏋滃皢鏄 + * SELECT post_id, post_title FROM posts WHERE 1=1 AND post_id = 1 LIMIT 1 + * + * + * @package Db + */ +class Typecho_Db_Query +{ + /** 鏁版嵁搴撳叧閿瓧 */ + const KEYWORDS = '*PRIMARY|AND|OR|LIKE|BINARY|BY|DISTINCT|AS|IN|IS|NULL'; + + /** + * 榛樿瀛楁 + * + * @var array + * @access private + */ + private static $_default = array( + 'action' => NULL, + 'table' => NULL, + 'fields' => '*', + 'join' => array(), + 'where' => NULL, + 'limit' => NULL, + 'offset' => NULL, + 'order' => NULL, + 'group' => NULL, + 'having' => NULL, + 'rows' => array(), + ); + + /** + * 鏁版嵁搴撻傞厤鍣 + * + * @var Typecho_Db_Adapter + */ + private $_adapter; + + /** + * 鏌ヨ璇彞棰勭粨鏋,鐢辨暟缁勬瀯鎴,鏂逛究缁勫悎涓篠QL鏌ヨ瀛楃涓 + * + * @var array + */ + private $_sqlPreBuild; + + /** + * 鍓嶇紑 + * + * @access private + * @var string + */ + private $_prefix; + + /** + * 鏋勯犲嚱鏁,寮曠敤鏁版嵁搴撻傞厤鍣ㄤ綔涓哄唴閮ㄦ暟鎹 + * + * @param Typecho_Db_Adapter $adapter 鏁版嵁搴撻傞厤鍣 + * @param string $prefix 鍓嶇紑 + * @return void + */ + public function __construct(Typecho_Db_Adapter $adapter, $prefix) + { + $this->_adapter = &$adapter; + $this->_prefix = $prefix; + + $this->_sqlPreBuild = self::$_default; + } + + /** + * 杩囨护琛ㄥ墠缂,琛ㄥ墠缂鐢眛able.鏋勬垚 + * + * @param string $string 闇瑕佽В鏋愮殑瀛楃涓 + * @return string + */ + private function filterPrefix($string) + { + return (0 === strpos($string, 'table.')) ? substr_replace($string, $this->_prefix, 0, 6) : $string; + } + + /** + * 杩囨护鏁扮粍閿 + * + * @access private + * @param string $str 寰呭鐞嗗瓧娈靛 + * @return string + */ + private function filterColumn($str) + { + $str = $str . ' 0'; + $length = strlen($str); + $lastIsAlnum = false; + $result = ''; + $word = ''; + $split = ''; + $quotes = 0; + + for ($i = 0; $i < $length; $i ++) { + $cha = $str[$i]; + + if (ctype_alnum($cha) || false !== strpos('_*', $cha)) { + if (!$lastIsAlnum) { + if ($quotes > 0 && !ctype_digit($word) && '.' != $split + && false === strpos(self::KEYWORDS, strtoupper($word))) { + $word = $this->_adapter->quoteColumn($word); + } else if ('.' == $split && 'table' == $word) { + $word = $this->_prefix; + $split = ''; + } + + $result .= $word . $split; + $word = ''; + $quotes = 0; + } + + $word .= $cha; + $lastIsAlnum = true; + } else { + + if ($lastIsAlnum) { + + if (0 == $quotes) { + if (false !== strpos(' ,)=<>.+-*/', $cha)) { + $quotes = 1; + } else if ('(' == $cha) { + $quotes = -1; + } + } + + $split = ''; + } + + $split .= $cha; + $lastIsAlnum = false; + } + + } + + return $result; + } + + /** + * 浠庡弬鏁颁腑鍚堟垚鏌ヨ瀛楁 + * + * @access private + * @param array $parameters + * @return string + */ + private function getColumnFromParameters(array $parameters) + { + $fields = array(); + + foreach ($parameters as $value) { + if (is_array($value)) { + foreach ($value as $key => $val) { + $fields[] = $key . ' AS ' . $val; + } + } else { + $fields[] = $value; + } + } + + return $this->filterColumn(implode(' , ', $fields)); + } + + /** + * 杞箟鍙傛暟 + * + * @param array $values + * @access protected + * @return array + */ + protected function quoteValues(array $values) + { + foreach ($values as &$value) { + if (is_array($value)) { + $value = '(' . implode(',', array_map(array($this->_adapter, 'quoteValue'), $value)) . ')'; + } else { + $value = $this->_adapter->quoteValue($value); + } + } + + return $values; + } + + /** + * set default params + * + * @param array $default + */ + public static function setDefault(array $default) + { + self::$_default = array_merge(self::$_default, $default); + } + + /** + * 鑾峰彇鏌ヨ瀛椾覆灞炴у + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return string + */ + public function getAttribute($attributeName) + { + return isset($this->_sqlPreBuild[$attributeName]) ? $this->_sqlPreBuild[$attributeName] : NULL; + } + + /** + * 娓呴櫎鏌ヨ瀛椾覆灞炴у + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return Typecho_Db_Query + */ + public function cleanAttribute($attributeName) + { + if (isset($this->_sqlPreBuild[$attributeName])) { + $this->_sqlPreBuild[$attributeName] = self::$_default[$attributeName]; + } + return $this; + } + + /** + * 杩炴帴琛 + * + * @param string $table 闇瑕佽繛鎺ョ殑琛 + * @param string $condition 杩炴帴鏉′欢 + * @param string $op 杩炴帴鏂规硶(LEFT, RIGHT, INNER) + * @return Typecho_Db_Query + */ + public function join($table, $condition, $op = Typecho_Db::INNER_JOIN) + { + $this->_sqlPreBuild['join'][] = array($this->filterPrefix($table), $this->filterColumn($condition), $op); + return $this; + } + + /** + * AND鏉′欢鏌ヨ璇彞 + * + * @param string $condition 鏌ヨ鏉′欢 + * @param mixed $param 鏉′欢鍊 + * @return Typecho_Db_Query + */ + public function where() + { + $condition = func_get_arg(0); + $condition = str_replace('?', "%s", $this->filterColumn($condition)); + $operator = empty($this->_sqlPreBuild['where']) ? ' WHERE ' : ' AND'; + + if (func_num_args() <= 1) { + $this->_sqlPreBuild['where'] .= $operator . ' (' . $condition . ')'; + } else { + $args = func_get_args(); + array_shift($args); + $this->_sqlPreBuild['where'] .= $operator . ' (' . vsprintf($condition, $this->quoteValues($args)) . ')'; + } + + return $this; + } + + /** + * OR鏉′欢鏌ヨ璇彞 + * + * @param string $condition 鏌ヨ鏉′欢 + * @param mixed $param 鏉′欢鍊 + * @return Typecho_Db_Query + */ + public function orWhere() + { + $condition = func_get_arg(0); + $condition = str_replace('?', "%s", $this->filterColumn($condition)); + $operator = empty($this->_sqlPreBuild['where']) ? ' WHERE ' : ' OR'; + + if (func_num_args() <= 1) { + $this->_sqlPreBuild['where'] .= $operator . ' (' . $condition . ')'; + } else { + $args = func_get_args(); + array_shift($args); + $this->_sqlPreBuild['where'] .= $operator . ' (' . vsprintf($condition, $this->quoteValues($args)) . ')'; + } + + return $this; + } + + /** + * 鏌ヨ琛屾暟闄愬埗 + * + * @param integer $limit 闇瑕佹煡璇㈢殑琛屾暟 + * @return Typecho_Db_Query + */ + public function limit($limit) + { + $this->_sqlPreBuild['limit'] = intval($limit); + return $this; + } + + /** + * 鏌ヨ琛屾暟鍋忕Щ閲 + * + * @param integer $offset 闇瑕佸亸绉荤殑琛屾暟 + * @return Typecho_Db_Query + */ + public function offset($offset) + { + $this->_sqlPreBuild['offset'] = intval($offset); + return $this; + } + + /** + * 鍒嗛〉鏌ヨ + * + * @param integer $page 椤垫暟 + * @param integer $pageSize 姣忛〉琛屾暟 + * @return Typecho_Db_Query + */ + public function page($page, $pageSize) + { + $pageSize = intval($pageSize); + $this->_sqlPreBuild['limit'] = $pageSize; + $this->_sqlPreBuild['offset'] = (max(intval($page), 1) - 1) * $pageSize; + return $this; + } + + /** + * 鎸囧畾闇瑕佸啓鍏ョ殑鏍忕洰鍙婂叾鍊 + * + * @param array $rows + * @return Typecho_Db_Query + */ + public function rows(array $rows) + { + foreach ($rows as $key => $row) { + $this->_sqlPreBuild['rows'][$this->filterColumn($key)] = is_null($row) ? 'NULL' : $this->_adapter->quoteValue($row); + } + return $this; + } + + /** + * 鎸囧畾闇瑕佸啓鍏ユ爮鐩強鍏跺 + * 鍗曡涓斾笉浼氳浆涔夊紩鍙 + * + * @param string $key 鏍忕洰鍚嶇О + * @param mixed $value 鎸囧畾鐨勫 + * @param bool $escape 鏄惁杞箟 + * @return Typecho_Db_Query + */ + public function expression($key, $value, $escape = true) + { + $this->_sqlPreBuild['rows'][$this->filterColumn($key)] = $escape ? $this->filterColumn($value) : $value; + return $this; + } + + /** + * 鎺掑簭椤哄簭(ORDER BY) + * + * @param string $orderby 鎺掑簭鐨勭储寮 + * @param string $sort 鎺掑簭鐨勬柟寮(ASC, DESC) + * @return Typecho_Db_Query + */ + public function order($orderby, $sort = Typecho_Db::SORT_ASC) + { + $this->_sqlPreBuild['order'] = ' ORDER BY ' . $this->filterColumn($orderby) . (empty($sort) ? NULL : ' ' . $sort); + return $this; + } + + /** + * 闆嗗悎鑱氶泦(GROUP BY) + * + * @param string $key 鑱氶泦鐨勯敭鍊 + * @return Typecho_Db_Query + */ + public function group($key) + { + $this->_sqlPreBuild['group'] = ' GROUP BY ' . $this->filterColumn($key); + return $this; + } + + /** + * HAVING (HAVING) + * + * @return Typecho_Db_Query + */ + public function having() + { + $condition = func_get_arg(0); + $condition = str_replace('?', "%s", $this->filterColumn($condition)); + $operator = empty($this->_sqlPreBuild['having']) ? ' HAVING ' : ' AND'; + + if (func_num_args() <= 1) { + $this->_sqlPreBuild['having'] .= $operator . ' (' . $condition . ')'; + } else { + $args = func_get_args(); + array_shift($args); + $this->_sqlPreBuild['having'] .= $operator . ' (' . vsprintf($condition, $this->quoteValues($args)) . ')'; + } + + return $this; + } + + /** + * 閫夋嫨鏌ヨ瀛楁 + * + * @access public + * @param mixed $field 鏌ヨ瀛楁 + * @return Typecho_Db_Query + */ + public function select($field = '*') + { + $this->_sqlPreBuild['action'] = Typecho_Db::SELECT; + $args = func_get_args(); + + $this->_sqlPreBuild['fields'] = $this->getColumnFromParameters($args); + return $this; + } + + /** + * 鏌ヨ璁板綍鎿嶄綔(SELECT) + * + * @param string $table 鏌ヨ鐨勮〃 + * @return Typecho_Db_Query + */ + public function from($table) + { + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鏇存柊璁板綍鎿嶄綔(UPDATE) + * + * @param string $table 闇瑕佹洿鏂拌褰曠殑琛 + * @return Typecho_Db_Query + */ + public function update($table) + { + $this->_sqlPreBuild['action'] = Typecho_Db::UPDATE; + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鍒犻櫎璁板綍鎿嶄綔(DELETE) + * + * @param string $table 闇瑕佸垹闄よ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function delete($table) + { + $this->_sqlPreBuild['action'] = Typecho_Db::DELETE; + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鎻掑叆璁板綍鎿嶄綔(INSERT) + * + * @param string $table 闇瑕佹彃鍏ヨ褰曠殑琛 + * @return Typecho_Db_Query + */ + public function insert($table) + { + $this->_sqlPreBuild['action'] = Typecho_Db::INSERT; + $this->_sqlPreBuild['table'] = $this->filterPrefix($table); + return $this; + } + + /** + * 鏋勯犳渶缁堟煡璇㈣鍙 + * + * @return string + */ + public function __toString() + { + switch ($this->_sqlPreBuild['action']) { + case Typecho_Db::SELECT: + return $this->_adapter->parseSelect($this->_sqlPreBuild); + case Typecho_Db::INSERT: + return 'INSERT INTO ' + . $this->_sqlPreBuild['table'] + . '(' . implode(' , ', array_keys($this->_sqlPreBuild['rows'])) . ')' + . ' VALUES ' + . '(' . implode(' , ', array_values($this->_sqlPreBuild['rows'])) . ')' + . $this->_sqlPreBuild['limit']; + case Typecho_Db::DELETE: + return 'DELETE FROM ' + . $this->_sqlPreBuild['table'] + . $this->_sqlPreBuild['where']; + case Typecho_Db::UPDATE: + $columns = array(); + if (isset($this->_sqlPreBuild['rows'])) { + foreach ($this->_sqlPreBuild['rows'] as $key => $val) { + $columns[] = "$key = $val"; + } + } + + return 'UPDATE ' + . $this->_sqlPreBuild['table'] + . ' SET ' . implode(' , ', $columns) + . $this->_sqlPreBuild['where']; + default: + return NULL; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Query/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Query/Exception.php" new file mode 100644 index 0000000..4546021 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Db/Query/Exception.php" @@ -0,0 +1,17 @@ +message = $message; + $this->code = $code; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Feed.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Feed.php" new file mode 100644 index 0000000..42d0701 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Feed.php" @@ -0,0 +1,411 @@ + + * @category typecho + * @package Feed + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Feed.php 219 2008-05-27 09:06:15Z magike.net $ + */ + +/** + * Typecho_Feed + * + * @author qining + * @category typecho + * @package Feed + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Typecho_Feed +{ + /** 瀹氫箟RSS 1.0绫诲瀷 */ + const RSS1 = 'RSS 1.0'; + + /** 瀹氫箟RSS 2.0绫诲瀷 */ + const RSS2 = 'RSS 2.0'; + + /** 瀹氫箟ATOM 1.0绫诲瀷 */ + const ATOM1 = 'ATOM 1.0'; + + /** 瀹氫箟RSS鏃堕棿鏍煎紡 */ + const DATE_RFC822 = 'r'; + + /** 瀹氫箟ATOM鏃堕棿鏍煎紡 */ + const DATE_W3CDTF = 'c'; + + /** 瀹氫箟琛岀粨鏉熺 */ + const EOL = "\n"; + + /** + * feed鐘舵 + * + * @access private + * @var string + */ + private $_type; + + /** + * 瀛楃闆嗙紪鐮 + * + * @access private + * @var string + */ + private $_charset; + + /** + * 璇█鐘舵 + * + * @access private + * @var string + */ + private $_lang; + + /** + * 鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedUrl; + + /** + * 鍩烘湰鍦板潃 + * + * @access private + * @var unknown + */ + private $_baseUrl; + + /** + * 鑱氬悎鏍囬 + * + * @access private + * @var string + */ + private $_title; + + /** + * 鑱氬悎鍓爣棰 + * + * @access private + * @var string + */ + private $_subTitle; + + /** + * 鐗堟湰淇℃伅 + * + * @access private + * @var string + */ + private $_version; + + /** + * 鎵鏈夌殑items + * + * @access private + * @var array + */ + private $_items = array(); + + /** + * 鍒涘缓Feed瀵硅薄 + * + * @access public + * @return void + */ + public function __construct($version, $type = self::RSS2, $charset = 'UTF-8', $lang = 'en') + { + $this->_version = $version; + $this->_type = $type; + $this->_charset = $charset; + $this->_lang = $lang; + } + + /** + * 璁剧疆鏍囬 + * + * @access public + * @param string $title 鏍囬 + * @return void + */ + public function setTitle($title) + { + $this->_title = $title; + } + + /** + * 璁剧疆鍓爣棰 + * + * @access public + * @param string $subTitle 鍓爣棰 + * @return void + */ + public function setSubTitle($subTitle) + { + $this->_subTitle = $subTitle; + } + + /** + * 璁剧疆鑱氬悎鍦板潃 + * + * @access public + * @param string $feedUrl 鑱氬悎鍦板潃 + * @return void + */ + public function setFeedUrl($feedUrl) + { + $this->_feedUrl = $feedUrl; + } + + /** + * 璁剧疆涓婚〉 + * + * @access public + * @param string $baseUrl 涓婚〉鍦板潃 + * @return void + */ + public function setBaseUrl($baseUrl) + { + $this->_baseUrl = $baseUrl; + } + + /** + * 鑾峰彇Feed鏃堕棿鏍煎紡 + * + * @access public + * @param integer $stamp 鏃堕棿鎴 + * @return string + */ + public function dateFormat($stamp) + { + if (self::RSS2 == $this->_type) { + return date(self::DATE_RFC822, $stamp); + } else if (self::RSS1 == $this->_type || self::ATOM1 == $this->_type) { + return date(self::DATE_W3CDTF, $stamp); + } + } + + /** + * $item鐨勬牸寮忎负 + * + * array ( + * 'title' => 'xxx', + * 'content' => 'xxx', + * 'excerpt' => 'xxx', + * 'date' => 'xxx', + * 'link' => 'xxx', + * 'author' => 'xxx', + * 'comments' => 'xxx', + * 'commentsUrl'=> 'xxx', + * 'commentsFeedUrl' => 'xxx', + * ) + * + * + * @access public + * @param array $item + * @return unknown + */ + public function addItem(array $item) + { + $this->_items[] = $item; + } + + /** + * 杈撳嚭瀛楃涓 + * + * @access public + * @return string + */ + public function __toString() + { + $result = '_charset . '"?>' . self::EOL; + + if (self::RSS1 == $this->_type) { + $result .= '' . self::EOL; + + $content = ''; + $links = array(); + $lastUpdate = 0; + + foreach ($this->_items as $item) { + $content .= '' . self::EOL; + $content .= '' . htmlspecialchars($item['title']) . '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= '' . strip_tags($item['content']) . '' . self::EOL; + if (!empty($item['suffix'])) { + $content .= $item['suffix']; + } + $content .= '' . self::EOL; + + $links[] = $item['link']; + + if ($item['date'] > $lastUpdate) { + $lastUpdate = $item['date']; + } + } + + $result .= ' +' . htmlspecialchars($this->_title) . ' +' . $this->_baseUrl . ' +' . htmlspecialchars($this->_subTitle) . ' + +' . self::EOL; + + foreach ($links as $link) { + $result .= '' . self::EOL; + } + + $result .= ' + +' . self::EOL; + + $result .= $content . ''; + + } else if (self::RSS2 == $this->_type) { + $result .= ' +' . self::EOL; + + $content = ''; + $lastUpdate = 0; + + foreach ($this->_items as $item) { + $content .= '' . self::EOL; + $content .= '' . htmlspecialchars($item['title']) . '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= '' . htmlspecialchars($item['author']->screenName) . '' . self::EOL; + + if (!empty($item['category']) && is_array($item['category'])) { + foreach ($item['category'] as $category) { + $content .= '' . self::EOL; + } + } + + if (!empty($item['excerpt'])) { + $content .= '' . self::EOL; + } + + if (!empty($item['content'])) { + $content .= '' . self::EOL; + } + + if (isset($item['comments']) && strlen($item['comments']) > 0) { + $content .= '' . $item['comments'] . '' . self::EOL; + } + + $content .= '' . $item['link'] . '#comments' . self::EOL; + if (!empty($item['commentsFeedUrl'])) { + $content .= '' . $item['commentsFeedUrl'] . '' . self::EOL; + } + + if (!empty($item['suffix'])) { + $content .= $item['suffix']; + } + + $content .= '' . self::EOL; + + if ($item['date'] > $lastUpdate) { + $lastUpdate = $item['date']; + } + } + + $result .= '' . htmlspecialchars($this->_title) . ' +' . $this->_baseUrl . ' + +' . $this->_lang . ' +' . htmlspecialchars($this->_subTitle) . ' +' . $this->dateFormat($lastUpdate) . ' +' . $this->dateFormat($lastUpdate) . '' . self::EOL; + + $result .= $content . ' +'; + + } else if (self::ATOM1 == $this->_type) { + $result .= '' . self::EOL; + + $content = ''; + $lastUpdate = 0; + + foreach ($this->_items as $item) { + $content .= '' . self::EOL; + $content .= '<![CDATA[' . $item['title'] . ']]>' . self::EOL; + $content .= '' . self::EOL; + $content .= '' . $item['link'] . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= '' . $this->dateFormat($item['date']) . '' . self::EOL; + $content .= ' + ' . $item['author']->screenName . ' + ' . $item['author']->url . ' +' . self::EOL; + + if (!empty($item['category']) && is_array($item['category'])) { + foreach ($item['category'] as $category) { + $content .= '' . self::EOL; + } + } + + if (!empty($item['excerpt'])) { + $content .= '' . self::EOL; + } + + if (!empty($item['content'])) { + $content .= '' . self::EOL; + } + + if (isset($item['comments']) && strlen($item['comments']) > 0) { + $content .= '' . self::EOL; + + if (!empty($item['commentsFeedUrl'])) { + $content .= '' . self::EOL; + } + } + + if (!empty($item['suffix'])) { + $content .= $item['suffix']; + } + + $content .= '' . self::EOL; + + if ($item['date'] > $lastUpdate) { + $lastUpdate = $item['date']; + } + } + + $result .= '' . htmlspecialchars($this->_title) . ' +' . htmlspecialchars($this->_subTitle) . ' +' . $this->dateFormat($lastUpdate) . ' +Typecho + +' . $this->_feedUrl . ' + +'; + $result .= $content . ''; + } + + return $result; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client.php" new file mode 100644 index 0000000..4d4a7cf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client.php" @@ -0,0 +1,58 @@ +method = $method; + return $this; + } + + /** + * 璁剧疆鎸囧畾鐨凜OOKIE鍊 + * + * @access public + * @param string $key 鎸囧畾鐨勫弬鏁 + * @param mixed $value 璁剧疆鐨勫 + * @return Typecho_Http_Client_Adapter + */ + public function setCookie($key, $value) + { + $this->cookies[$key] = $value; + return $this; + } + + /** + * 璁剧疆浼犻掑弬鏁 + * + * @access public + * @param mixed $query 浼犻掑弬鏁 + * @return Typecho_Http_Client_Adapter + */ + public function setQuery($query) + { + $query = is_array($query) ? http_build_query($query) : $query; + $this->query = empty($this->query) ? $query : $this->query . '&' . $query; + return $this; + } + + /** + * 璁剧疆闇瑕丳OST鐨勬暟鎹 + * + * @access public + * @param array $data 闇瑕丳OST鐨勬暟鎹 + * @return Typecho_Http_Client_Adapter + */ + public function setData($data) + { + $this->data = $data; + $this->setMethod(Typecho_Http_Client::METHOD_POST); + return $this; + } + + /** + * 璁剧疆闇瑕丳OST鐨勬枃浠 + * + * @access public + * @param array $files 闇瑕丳OST鐨勬枃浠 + * @return Typecho_Http_Client_Adapter + */ + public function setFiles(array $files) + { + $this->files = empty($this->files) ? $files : array_merge($this->files, $files); + $this->setMethod(Typecho_Http_Client::METHOD_POST); + return $this; + } + + /** + * 璁剧疆瓒呮椂鏃堕棿 + * + * @access public + * @param integer $timeout 瓒呮椂鏃堕棿 + * @return Typecho_Http_Client_Adapter + */ + public function setTimeout($timeout) + { + $this->timeout = $timeout; + return $this; + } + + /** + * 璁剧疆http鍗忚 + * + * @access public + * @param string $rfc http鍗忚 + * @return Typecho_Http_Client_Adapter + */ + public function setRfc($rfc) + { + $this->rfc = $rfc; + return $this; + } + + /** + * 璁剧疆ip鍦板潃 + * + * @access public + * @param string $ip ip鍦板潃 + * @return Typecho_Http_Client_Adapter + */ + public function setIp($ip) + { + $this->ip = $ip; + return $this; + } + + /** + * 璁剧疆澶翠俊鎭弬鏁 + * + * @access public + * @param string $key 鍙傛暟鍚嶇О + * @param string $value 鍙傛暟鍊 + * @return Typecho_Http_Client_Adapter + */ + public function setHeader($key, $value) + { + $key = str_replace(' ', '-', ucwords(str_replace('-', ' ', $key))); + $this->headers[$key] = $value; + return $this; + } + + /** + * 鍙戦佽姹 + * + * @access public + * @param string $url 璇锋眰鍦板潃 + * @param string $rfc 璇锋眰鍗忚 + * @return string + */ + public function send($url) + { + $params = parse_url($url); + + if (!empty($params['host'])) { + $this->host = $params['host']; + } else { + throw new Typecho_Http_Client_Exception('Unknown Host', 500); + } + + if (!empty($params['path'])) { + $this->path = $params['path']; + } + + $query = empty($params['query']) ? '' : $params['query']; + + if (!empty($this->query)) { + $query = empty($query) ? $this->query : '&' . $this->query; + } + + if (!empty($query)) { + $this->path .= '?' . $query; + $params['query'] = $query; + } + + $this->scheme = $params['scheme']; + $this->port = ('https' == $params['scheme']) ? 443 : 80; + $url = Typecho_Common::buildUrl($params); + + if (!empty($params['port'])) { + $this->port = $params['port']; + } + + /** 鏁寸悊cookie */ + if (!empty($this->cookies)) { + $this->setHeader('Cookie', str_replace('&', '; ', http_build_query($this->cookies))); + } + + $response = $this->httpSend($url); + + if (!$response) { + return; + } + + str_replace("\r", '', $response); + $rows = explode("\n", $response); + + $foundStatus = false; + $foundInfo = false; + $lines = array(); + + foreach ($rows as $key => $line) { + if (!$foundStatus) { + if (0 === strpos($line, "HTTP/")) { + if ('' == trim($rows[$key + 1])) { + continue; + } else { + $status = explode(' ', str_replace(' ', ' ', $line)); + $this->responseStatus = intval($status[1]); + $foundStatus = true; + } + } + } else { + if (!$foundInfo) { + if ('' != trim($line)) { + $status = explode(':', $line); + $name = strtolower(array_shift($status)); + $data = implode(':', $status); + $this->responseHeader[trim($name)] = trim($data); + } else { + $foundInfo = true; + } + } else { + $lines[] = $line; + } + } + } + + $this->responseBody = implode("\n", $lines); + return $this->responseBody; + } + + /** + * 鑾峰彇鍥炴墽鐨勫ご閮ㄤ俊鎭 + * + * @access public + * @param string $key 澶翠俊鎭悕绉 + * @return string + */ + public function getResponseHeader($key) + { + $key = strtolower($key); + return isset($this->responseHeader[$key]) ? $this->responseHeader[$key] : NULL; + } + + /** + * 鑾峰彇鍥炴墽浠g爜 + * + * @access public + * @return integer + */ + public function getResponseStatus() + { + return $this->responseStatus; + } + + /** + * 鑾峰彇鍥炴墽韬綋 + * + * @access public + * @return string + */ + public function getResponseBody() + { + return $this->responseBody; + } + + /** + * 闇瑕佸疄鐜扮殑璇锋眰鏂规硶 + * + * @access public + * @param string $url 璇锋眰鍦板潃 + * @return string + */ + abstract public function httpSend($url); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" new file mode 100644 index 0000000..a700915 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Curl.php" @@ -0,0 +1,121 @@ +ip) { + $url = $this->scheme . '://' . $this->ip . $this->path; + $this->headers['Rfc'] = $this->method . ' ' . $this->path . ' ' . $this->rfc; + $this->headers['Host'] = $this->host; + } + + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_PORT, $this->port); + curl_setopt($ch, CURLOPT_HEADER, true); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_FRESH_CONNECT, true); + curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); + + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + + /** 璁剧疆HTTP鐗堟湰 */ + switch ($this->rfc) { + case 'HTTP/1.0': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_0); + break; + case 'HTTP/1.1': + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); + break; + default: + curl_setopt($ch, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_NONE); + break; + } + + /** 璁剧疆header淇℃伅 */ + if (!empty($this->headers)) { + if (isset($this->headers['User-Agent'])) { + curl_setopt($ch, CURLOPT_USERAGENT, $this->headers['User-Agent']); + unset($this->headers['User-Agent']); + } + + $headers = array(); + + if (isset($this->headers['Rfc'])) { + $headers[] = $this->headers['Rfc']; + unset($this->headers['Rfc']); + } + + foreach ($this->headers as $key => $val) { + $headers[] = $key . ': ' . $val; + } + + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + } + + /** POST妯″紡 */ + if (Typecho_Http_Client::METHOD_POST == $this->method) { + if (!isset($this->headers['content-type'])) { + curl_setopt($ch, CURLOPT_POST, true); + } + + if (!empty($this->data)) { + curl_setopt($ch, CURLOPT_POSTFIELDS, is_array($this->data) ? http_build_query($this->data) : $this->data); + } + + if (!empty($this->files)) { + foreach ($this->files as $key => &$file) { + $file = '@' . $file; + } + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->files); + } + } + + $response = curl_exec($ch); + if (false === $response) { + throw new Typecho_Http_Client_Exception(curl_error($ch), 500); + } + + curl_close($ch); + return $response; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" new file mode 100644 index 0000000..267c220 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Adapter/Socket.php" @@ -0,0 +1,154 @@ +method . ' ' . $this->path . ' ' . $this->rfc . $eol; + $request .= 'Host: ' . $this->host . $eol; + $request .= 'Accept: */*' . $eol; + $request .= 'Cache-Control: no-cache' . $eol; + $request .= 'Connection: Close' . $eol; + + /** 璁剧疆header淇℃伅 */ + if (!empty($this->headers)) { + foreach ($this->headers as $key => $val) { + $request .= $key . ': ' . $val . $eol; + } + } + + /** 鍙戦丳OST淇℃伅 */ + if (Typecho_Http_Client::METHOD_POST == $this->method) { + if (empty($this->files)) { + $content = is_array($this->data) ? http_build_query($this->data) : $this->data; + $request .= 'Content-Length: ' . strlen($content) . $eol; + + if (!isset($this->headers['content-type'])) { + $request .= 'Content-Type: application/x-www-form-urlencoded' . $eol; + } + + $request .= $eol; + $request .= $content; + } else { + $boundary = '---------------------------' . substr(md5(uniqid()), 0, 16); + $content = $eol . $boundary; + + if (!empty($this->data)) { + foreach ($this->data as $key => $val) { + $content .= $eol . 'Content-Disposition: form-data; name="' . $key . '"' . $eol . $eol; + $content .= $val . $eol; + $content .= $boundary; + } + } + + foreach ($this->files as $key => $file) { + $content .= $eol . 'Content-Disposition: form-data; name="' . $key . '"; filename="' . $file . '"' . $eol; + $content .= 'Content-Type: ' . mime_content_type($file) . $eol . $eol; + $content .= file_get_contents($file) . $eol; + $content .= $boundary; + } + + $content .= '--' . $eol; + $request .= 'Content-Length: ' . strlen($content) . $eol; + $request .= 'Content-Type: multipart/form-data; boundary=' . $boundary; + $request .= $eol; + $request .= $content; + } + } else { + $request .= $eol; + } + + /** 鎵撳紑杩炴帴 */ + $socket = @fsockopen($this->ip ? $this->ip : $this->host, $this->port, $errno, $errstr, $this->timeout); + if (false === $socket) { + throw new Typecho_Http_Client_Exception($errno . ':' . $errstr, 500); + } + + /** 鍙戦佹暟鎹 */ + fwrite($socket, $request); + stream_set_timeout($socket, $this->timeout); + $response = ''; + + //facebook code + while (!feof($socket)) { + $buf = fgets($socket, 4096); + + if (false === $buf || '' === $buf) { + $info = stream_get_meta_data($socket); + + //瓒呮椂鍒ゆ柇 + if ($info['timed_out']) { + throw new Typecho_Http_Client_Exception(__CLASS__ . ': timeout reading from ' . $this->host . ':' . $this->port, 500); + } else { + throw new Typecho_Http_Client_Exception(__CLASS__ . ': could not read from ' . $this->host . ':' . $this->port, 500); + } + } else if (strlen($buf) < 4096) { + $info = stream_get_meta_data($socket); + + if ($info['timed_out']) { + throw new Typecho_Http_Client_Exception(__CLASS__ . ': timeout reading from ' . $this->host . ':' . $this->port, 500); + } + } + + $response .= $buf; + } + + fclose($socket); + return $response; + } + + /** + * 鑾峰彇鍥炴墽韬綋 + * + * @access public + * @return string + */ + public function getResponseBody() + { + /** 鏀寔chunked缂栫爜 */ + if ('chunked' == $this->getResponseHeader('Transfer-Encoding')) { + $parts = explode("\r\n", $this->reponseBody, 2); + $counter = hexdec($parts[0]); + $this->reponseBody = substr($parts[1], 0, $counter); + } + + return $this->reponseBody; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Exception.php" new file mode 100644 index 0000000..f79b63a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Http/Client/Exception.php" @@ -0,0 +1,17 @@ +translate($string) : $string; + } + + /** + * 閽堝澶嶆暟褰㈠紡鐨勭炕璇戝嚱鏁 + * + * @param string $single 鍗曟暟褰㈠紡鐨勭炕璇 + * @param string $plural 澶嶆暟褰㈠紡鐨勭炕璇 + * @param integer $number 鏁板瓧 + * @return string + */ + public static function ngettext($single, $plural, $number) + { + self::init(); + return self::$_lang ? self::$_loaded->ngettext($single, $plural, $number) : ($number > 1 ? $plural : $single); + } + + /** + * 璇嶄箟鍖栨椂闂 + * + * @access public + * @param string $from 璧峰鏃堕棿 + * @param string $now 缁堟鏃堕棿 + * @return string + */ + public static function dateWord($from, $now) + { + $between = $now - $from; + + /** 濡傛灉鏄竴澶 */ + if ($between >= 0 && $between < 86400 && date('d', $from) == date('d', $now)) { + /** 濡傛灉鏄竴灏忔椂 */ + if ($between < 3600) { + /** 濡傛灉鏄竴鍒嗛挓 */ + if ($between < 60) { + if (0 == $between) { + return _t('鍒氬垰'); + } else { + return str_replace('%d', $between, _n('涓绉掑墠', '%d绉掑墠', $between)); + } + } + + $min = floor($between / 60); + return str_replace('%d', $min, _n('涓鍒嗛挓鍓', '%d鍒嗛挓鍓', $min)); + } + + $hour = floor($between / 3600); + return str_replace('%d', $hour, _n('涓灏忔椂鍓', '%d灏忔椂鍓', $hour)); + } + + /** 濡傛灉鏄槰澶 */ + if ($between > 0 && $between < 172800 + && (date('z', $from) + 1 == date('z', $now) // 鍦ㄥ悓涓骞寸殑鎯呭喌 + || date('z', $from) + 1 == date('L') + 365 + date('z', $now))) { // 璺ㄥ勾鐨勬儏鍐 + return _t('鏄ㄥぉ %s', date('H:i', $from)); + } + + /** 濡傛灉鏄竴涓槦鏈 */ + if ($between > 0 && $between < 604800) { + $day = floor($between / 86400); + return str_replace('%d', $day, _n('涓澶╁墠', '%d澶╁墠', $day)); + } + + /** 濡傛灉鏄 */ + if (date('Y', $from) == date('Y', $now)) { + return date(_t('n鏈坖鏃'), $from); + } + + return date(_t('Y骞磎鏈坉鏃'), $from); + } + + /** + * 璁剧疆璇█椤 + * + * @access public + * @param string $lang 閰嶇疆淇℃伅 + * @return void + */ + public static function setLang($lang) + { + self::$_lang = $lang; + } + + /** + * 澧炲姞璇█椤 + * + * @access public + * @param string $lang 璇█鍚嶇О + * @return void + */ + public static function addLang($lang) + { + self::$_loaded->addFile($lang); + } + + /** + * 鑾峰彇璇█椤 + * + * @access public + * @return void + */ + public static function getLang() + { + return self::$_lang; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetText.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetText.php" new file mode 100644 index 0000000..2b45503 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetText.php" @@ -0,0 +1,393 @@ +. + Copyright (c) 2005 Nico Kaiser + + This file is part of PHP-gettext. + + PHP-gettext is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHP-gettext is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + */ + +/** + * Provides a simple gettext replacement that works independently from + * the system's gettext abilities. + * It can read MO files and use them for translating strings. + * The files are passed to gettext_reader as a Stream (see streams.php) + * + * This version has the ability to cache all strings and translations to + * speed up the string lookup. + * While the cache is enabled by default, it can be switched off with the + * second parameter in the constructor (e.g. whenusing very large MO files + * that you don't want to keep in memory) + */ + +//reload by 70 (typecho group) +/** + * This file is part of PHP-gettext + * + * @author Danilo Segan , Nico Kaiser + * @category typecho + * @package I18n + */ +class Typecho_I18n_GetText +{ + //public: + public $error = 0; // public variable that holds error code (0 if no error) + + //private: + private $BYTEORDER = 0; // 0: low endian, 1: big endian + private $STREAM = NULL; + private $short_circuit = false; + private $enable_cache = false; + private $originals = NULL; // offset of original table + private $translations = NULL; // offset of translation table + private $pluralheader = NULL; // cache header field for plural forms + private $total = 0; // total string count + private $table_originals = NULL; // table for original strings (offsets) + private $table_translations = NULL; // table for translated strings (offsets) + private $cache_translations = NULL; // original -> translation mapping + + + /* Methods */ + /** + * Constructor + * + * @param string $file file name + * @param boolean enable_cache Enable or disable caching of strings (default on) + */ + public function __construct($file, $enable_cache = true) + { + // If there isn't a StreamReader, turn on short circuit mode. + if (!file_exists($file)) { + $this->short_circuit = true; + return; + } + + // Caching can be turned off + $this->enable_cache = $enable_cache; + $this->STREAM = @fopen($file, 'rb'); + + $unpacked = unpack('c', $this->read(4)); + $magic = array_shift($unpacked); + + if (-34 == $magic) { + $this->BYTEORDER = 0; + } elseif (-107 == $magic) { + $this->BYTEORDER = 1; + } else { + $this->error = 1; // not MO file + return false; + } + + // FIXME: Do we care about revision? We should. + $revision = $this->readint(); + + $this->total = $this->readint(); + $this->originals = $this->readint(); + $this->translations = $this->readint(); + } + + /** + * read + * + * @param mixed $count + * @access private + * @return void + */ + private function read($count) + { + $count = abs($count); + + if ($count > 0) { + return fread($this->STREAM, $count); + } + + return NULL; + } + + /** + * Reads a 32bit Integer from the Stream + * + * @access private + * @return Integer from the Stream + */ + private function readint() + { + $end = unpack($this->BYTEORDER == 0 ? 'V' : 'N', $this->read(4)); + return array_shift($end); + } + + /** + * Reads an array of Integers from the Stream + * + * @param int count How many elements should be read + * @return Array of Integers + */ + private function readintarray($count) + { + return unpack(($this->BYTEORDER == 0 ? 'V' : 'N') . $count, $this->read(4 * $count)); + } + + /** + * Loads the translation tables from the MO file into the cache + * If caching is enabled, also loads all strings into a cache + * to speed up translation lookups + * + * @access private + */ + private function load_tables() + { + if (is_array($this->cache_translations) && + is_array($this->table_originals) && + is_array($this->table_translations)) + return; + + /* get original and translations tables */ + fseek($this->STREAM, $this->originals); + $this->table_originals = $this->readintarray($this->total * 2); + fseek($this->STREAM, $this->translations); + $this->table_translations = $this->readintarray($this->total * 2); + + if ($this->enable_cache) { + $this->cache_translations = array ('' => NULL); + /* read all strings in the cache */ + for ($i = 0; $i < $this->total; $i++) { + if ($this->table_originals[$i * 2 + 1] > 0) { + fseek($this->STREAM, $this->table_originals[$i * 2 + 2]); + $original = fread($this->STREAM, $this->table_originals[$i * 2 + 1]); + fseek($this->STREAM, $this->table_translations[$i * 2 + 2]); + $translation = fread($this->STREAM, $this->table_translations[$i * 2 + 1]); + $this->cache_translations[$original] = $translation; + } + } + } + } + + /** + * Returns a string from the "originals" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + private function get_original_string($num) + { + $length = $this->table_originals[$num * 2 + 1]; + $offset = $this->table_originals[$num * 2 + 2]; + if (! $length) + return ''; + fseek($this->STREAM, $offset); + $data = fread($this->STREAM, $length); + return (string)$data; + } + + /** + * Returns a string from the "translations" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + private function get_translation_string($num) + { + $length = $this->table_translations[$num * 2 + 1]; + $offset = $this->table_translations[$num * 2 + 2]; + if (! $length) + return ''; + fseek($this->STREAM, $offset); + $data = fread($this->STREAM, $length); + return (string)$data; + } + + /** + * Binary search for string + * + * @access private + * @param string string + * @param int start (internally used in recursive function) + * @param int end (internally used in recursive function) + * @return int string number (offset in originals table) + */ + private function find_string($string, $start = -1, $end = -1) + { + if (($start == -1) or ($end == -1)) { + // find_string is called with only one parameter, set start end end + $start = 0; + $end = $this->total; + } + if (abs($start - $end) <= 1) { + // We're done, now we either found the string, or it doesn't exist + $txt = $this->get_original_string($start); + if ($string == $txt) + return $start; + else + return -1; + } else if ($start > $end) { + // start > end -> turn around and start over + return $this->find_string($string, $end, $start); + } else { + // Divide table in two parts + $half = (int)(($start + $end) / 2); + $cmp = strcmp($string, $this->get_original_string($half)); + if ($cmp == 0) + // string is exactly in the middle => return it + return $half; + else if ($cmp < 0) + // The string is in the upper half + return $this->find_string($string, $start, $half); + else + // The string is in the lower half + return $this->find_string($string, $half, $end); + } + } + + /** + * Translates a string + * + * @access public + * @param string string to be translated + * @param integer $num found string number + * @return string translated string (or original, if not found) + */ + public function translate($string, &$num) + { + if ($this->short_circuit) + return $string; + $this->load_tables(); + + if ($this->enable_cache) { + // Caching enabled, get translated string from cache + if (array_key_exists($string, $this->cache_translations)) + return $this->cache_translations[$string]; + else + return $string; + } else { + // Caching not enabled, try to find string + $num = $this->find_string($string); + if ($num == -1) + return $string; + else + return $this->get_translation_string($num); + } + } + + /** + * Get possible plural forms from MO header + * + * @access private + * @return string plural form header + */ + private function get_plural_forms() + { + // lets assume message number 0 is header + // this is true, right? + $this->load_tables(); + + // cache header field for plural forms + if (! is_string($this->pluralheader)) { + if ($this->enable_cache) { + $header = $this->cache_translations[""]; + } else { + $header = $this->get_translation_string(0); + } + if (preg_match("/plural\-forms: ([^\n]*)\n/i", $header, $regs)) + $expr = $regs[1]; + else + $expr = "nplurals=2; plural=n == 1 ? 0 : 1;"; + $this->pluralheader = $expr; + } + return $this->pluralheader; + } + + /** + * Detects which plural form to take + * + * @access private + * @param n count + * @return int array index of the right plural form + */ + private function select_string($n) + { + $string = $this->get_plural_forms(); + $string = str_replace('nplurals',"\$total",$string); + $string = str_replace("n",$n,$string); + $string = str_replace('plural',"\$plural",$string); + + $total = 0; + $plural = 0; + + eval("$string"); + if ($plural >= $total) $plural = $total - 1; + return $plural; + } + + /** + * Plural version of gettext + * + * @access public + * @param string single + * @param string plural + * @param string number + * @param integer $num found string number + * @return translated plural form + */ + public function ngettext($single, $plural, $number, &$num) + { + if ($this->short_circuit) { + if ($number != 1) + return $plural; + else + return $single; + } + + // find out the appropriate form + $select = $this->select_string($number); + + // this should contains all strings separated by NULLs + $key = $single.chr(0).$plural; + + + if ($this->enable_cache) { + if (! array_key_exists($key, $this->cache_translations)) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->cache_translations[$key]; + $list = explode(chr(0), $result); + return $list[$select]; + } + } else { + $num = $this->find_string($key); + if ($num == -1) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->get_translation_string($num); + $list = explode(chr(0), $result); + return $list[$select]; + } + } + } + + /** + * 鍏抽棴鏂囦欢鍙ユ焺 + * + * @access public + * @return void + */ + public function __destruct() + { + fclose($this->STREAM); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetTextMulti.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetTextMulti.php" new file mode 100644 index 0000000..0f246c5 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/I18n/GetTextMulti.php" @@ -0,0 +1,105 @@ +addFile($fileName); + } + + /** + * 澧炲姞涓涓瑷鏂囦欢 + * + * @access public + * @param string $fileName 璇█鏂囦欢鍚 + * @return void + */ + public function addFile($fileName) + { + $this->_handles[] = new Typecho_I18n_GetText($fileName, true); + } + + /** + * Translates a string + * + * @access public + * @param string string to be translated + * @return string translated string (or original, if not found) + */ + public function translate($string) + { + foreach ($this->_handles as $handle) { + $string = $handle->translate($string, $count); + if (-1 != $count) { + break; + } + } + + return $string; + } + + /** + * Plural version of gettext + * + * @access public + * @param string single + * @param string plural + * @param string number + * @return translated plural form + */ + public function ngettext($single, $plural, $number) + { + foreach ($this->_handles as $handle) { + $string = $handle->ngettext($single, $plural, $number, $count); + if (-1 != $count) { + break; + } + } + + return $string; + } + + /** + * 鍏抽棴鎵鏈夊彞鏌 + * + * @access public + * @return void + */ + public function __destruct() + { + foreach ($this->_handles as $handle) { + /** 鏄剧ず鐨勯噴鏀惧唴瀛 */ + unset($handle); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin.php" new file mode 100644 index 0000000..bf06feb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin.php" @@ -0,0 +1,495 @@ +_handle = $handle; + } + + /** + * 鎻掍欢handle姣斿 + * + * @access private + * @param array $pluginHandles + * @param array $otherPluginHandles + * @return void + */ + private static function pluginHandlesDiff(array $pluginHandles, array $otherPluginHandles) + { + foreach ($otherPluginHandles as $handle) { + while (false !== ($index = array_search($handle, $pluginHandles))) { + unset($pluginHandles[$index]); + } + } + + return $pluginHandles; + } + + /** + * 鎻掍欢鍒濆鍖 + * + * @access public + * @param array $plugins 鎻掍欢鍒楄〃 + * @param mixed $callback 鑾峰彇鎻掍欢绯荤粺鍙橀噺鐨勪唬鐞嗗嚱鏁 + * @return void + */ + public static function init(array $plugins) + { + $plugins['activated'] = array_key_exists('activated', $plugins) ? $plugins['activated'] : array(); + $plugins['handles'] = array_key_exists('handles', $plugins) ? $plugins['handles'] : array(); + + /** 鍒濆鍖栧彉閲 */ + self::$_plugins = $plugins; + } + + /** + * 鑾峰彇瀹炰緥鍖栨彃浠跺璞 + * + * @access public + * @return Typecho_Plugin + */ + public static function factory($handle) + { + return isset(self::$_instances[$handle]) ? self::$_instances[$handle] : + (self::$_instances[$handle] = new Typecho_Plugin($handle)); + } + + /** + * 鍚敤鎻掍欢 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @return void + */ + public static function activate($pluginName) + { + self::$_plugins['activated'][$pluginName] = self::$_tmp; + self::$_tmp = array(); + } + + /** + * 绂佺敤鎻掍欢 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @return void + */ + public static function deactivate($pluginName) + { + /** 鍘绘帀鎵鏈夌浉鍏冲洖璋冨嚱鏁 */ + if (isset(self::$_plugins['activated'][$pluginName]['handles']) && is_array(self::$_plugins['activated'][$pluginName]['handles'])) { + foreach (self::$_plugins['activated'][$pluginName]['handles'] as $handle => $handles) { + self::$_plugins['handles'][$handle] = self::pluginHandlesDiff( + empty(self::$_plugins['handles'][$handle]) ? array() : self::$_plugins['handles'][$handle], + empty($handles) ? array() : $handles); + if (empty(self::$_plugins['handles'][$handle])) { + unset(self::$_plugins['handles'][$handle]); + } + } + } + + /** 绂佺敤褰撳墠鎻掍欢 */ + unset(self::$_plugins['activated'][$pluginName]); + } + + /** + * 瀵煎嚭褰撳墠鎻掍欢璁剧疆 + * + * @access public + * @return array + */ + public static function export() + { + return self::$_plugins; + } + + /** + * 鑾峰彇鎻掍欢鏂囦欢鐨勫ご淇℃伅 + * + * @access public + * @param string $pluginFile 鎻掍欢鏂囦欢璺緞 + * @return array + */ + public static function parseInfo($pluginFile) + { + $tokens = token_get_all(file_get_contents($pluginFile)); + $isDoc = false; + $isFunction = false; + $isClass = false; + $isInClass = false; + $isInFunction = false; + $isDefined = false; + $current = NULL; + + /** 鍒濆淇℃伅 */ + $info = array( + 'description' => '', + 'title' => '', + 'author' => '', + 'homepage' => '', + 'version' => '', + 'dependence' => '', + 'activate' => false, + 'deactivate' => false, + 'config' => false, + 'personalConfig' => false + ); + + $map = array( + 'package' => 'title', + 'author' => 'author', + 'link' => 'homepage', + 'dependence'=> 'dependence', + 'version' => 'version' + ); + + foreach ($tokens as $token) { + /** 鑾峰彇doc comment */ + if (!$isDoc && is_array($token) && T_DOC_COMMENT == $token[0]) { + + /** 鍒嗚璇诲彇 */ + $described = false; + $lines = preg_split("(\r|\n)", $token[1]); + foreach ($lines as $line) { + $line = trim($line); + if (!empty($line) && '*' == $line[0]) { + $line = trim(substr($line, 1)); + if (!$described && !empty($line) && '@' == $line[0]) { + $described = true; + } + + if (!$described && !empty($line)) { + $info['description'] .= $line . "\n"; + } else if ($described && !empty($line) && '@' == $line[0]) { + $info['description'] = trim($info['description']); + $line = trim(substr($line, 1)); + $args = explode(' ', $line); + $key = array_shift($args); + + if (isset($map[$key])) { + $info[$map[$key]] = trim(implode(' ', $args)); + } + } + } + } + + $isDoc = true; + } + + if (is_array($token)) { + switch ($token[0]) { + case T_FUNCTION: + $isFunction = true; + break; + case T_IMPLEMENTS: + $isClass = true; + break; + case T_WHITESPACE: + case T_COMMENT: + case T_DOC_COMMENT: + break; + case T_STRING: + $string = strtolower($token[1]); + switch ($string) { + case 'typecho_plugin_interface': + $isInClass = $isClass; + break; + case 'activate': + case 'deactivate': + case 'config': + case 'personalconfig': + if ($isFunction) { + $current = ('personalconfig' == $string ? 'personalConfig' : $string); + } + break; + default: + if (!empty($current) && $isInFunction && $isInClass) { + $info[$current] = true; + } + break; + } + break; + default: + if (!empty($current) && $isInFunction && $isInClass) { + $info[$current] = true; + } + break; + } + } else { + $token = strtolower($token); + switch ($token) { + case '{': + if ($isDefined) { + $isInFunction = true; + } + break; + case '(': + if ($isFunction && !$isDefined) { + $isDefined = true; + } + break; + case '}': + case ';': + $isDefined = false; + $isFunction = false; + $isInFunction = false; + $current = NULL; + break; + default: + if (!empty($current) && $isInFunction && $isInClass) { + $info[$current] = true; + } + break; + } + } + } + + return $info; + } + + /** + * 鑾峰彇鎻掍欢璺緞鍜岀被鍚 + * 杩斿洖鍊间负涓涓暟缁 + * 绗竴椤逛负鎻掍欢璺緞,绗簩椤逛负绫诲悕 + * + * @access public + * @param string $pluginName 鎻掍欢鍚 + * @param string $path 鎻掍欢鐩綍 + * @return array + */ + public static function portal($pluginName, $path) + { + switch (true) { + case file_exists($pluginFileName = $path . '/' . $pluginName . '/Plugin.php'): + $className = $pluginName . '_Plugin'; + break; + case file_exists($pluginFileName = $path . '/' . $pluginName . '.php'): + $className = $pluginName; + break; + default: + throw new Typecho_Plugin_Exception('Missing Plugin ' . $pluginName, 404); + } + + return array($pluginFileName, $className); + } + + /** + * 鐗堟湰渚濊禆鎬ф娴 + * + * @access public + * @param string $version 绋嬪簭鐗堟湰 + * @param string $versionRange 渚濊禆鐨勭増鏈鍒 + * @return boolean + */ + public static function checkDependence($version, $versionRange) + { + //濡傛灉娌℃湁妫娴嬭鍒,鐩存帴鎺犺繃 + if (empty($versionRange)) { + return true; + } + + $items = array_map('trim', explode('-', $versionRange)); + if (count($items) < 2) { + $items[1] = $items[0]; + } + + list ($minVersion, $maxVersion) = $items; + + //瀵*鍜?鐨勬敮鎸,4涓9鏄渶澶х増鏈 + $minVersion = str_replace(array('*', '?'), array('9999', '9'), $minVersion); + $maxVersion = str_replace(array('*', '?'), array('9999', '9'), $maxVersion); + + if (version_compare($version, $minVersion, '>=') && version_compare($version, $maxVersion, '<=')) { + return true; + } + + return false; + } + + /** + * 鎻掍欢璋冪敤鍚庣殑瑙﹀彂鍣 + * + * @access public + * @param boolean $signal 瑙﹀彂鍣 + * @return Typecho_Plugin + */ + public function trigger(&$signal) + { + $signal = false; + $this->_signal = &$signal; + return $this; + } + + /** + * 鍒ゆ柇鎻掍欢鏄惁瀛樺湪 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @return void + */ + public function exists($pluginName) { + return array_search($pluginName, self::$_plugins['activated']); + } + + /** + * 璁剧疆鍥炶皟鍑芥暟 + * + * @access public + * @param string $component 褰撳墠缁勪欢 + * @param mixed $value 鍥炶皟鍑芥暟 + * @return void + */ + public function __set($component, $value) + { + $weight = 0; + + if (strpos($component, '_') > 0) { + $parts = explode('_', $component, 2); + list($component, $weight) = $parts; + $weight = intval($weight) - 10; + } + + $component = $this->_handle . ':' . $component; + + if (!isset(self::$_plugins['handles'][$component])) { + self::$_plugins['handles'][$component] = array(); + } + + if (!isset(self::$_tmp['handles'][$component])) { + self::$_tmp['handles'][$component] = array(); + } + + foreach (self::$_plugins['handles'][$component] as $key => $val) { + $key = floatval($key); + + if ($weight > $key) { + break; + } else if ($weight == $key) { + $weight += 0.001; + } + } + + self::$_plugins['handles'][$component][strval($weight)] = $value; + self::$_tmp['handles'][$component][] = $value; + + ksort(self::$_plugins['handles'][$component], SORT_NUMERIC); + } + + /** + * 閫氳繃榄旀湳鍑芥暟璁剧疆褰撳墠缁勪欢浣嶇疆 + * + * @access public + * @param string $component 褰撳墠缁勪欢 + * @return Typecho_Plugin + */ + public function __get($component) + { + $this->_component = $component; + return $this; + } + + /** + * 鍥炶皟澶勭悊鍑芥暟 + * + * @access public + * @param string $component 褰撳墠缁勪欢 + * @param string $args 鍙傛暟 + * @return mixed + */ + public function __call($component, $args) + { + $component = $this->_handle . ':' . $component; + $last = count($args); + $args[$last] = $last > 0 ? $args[0] : false; + + if (isset(self::$_plugins['handles'][$component])) { + $args[$last] = NULL; + $this->_signal = true; + foreach (self::$_plugins['handles'][$component] as $callback) { + $args[$last] = call_user_func_array($callback, $args); + } + } + + return $args[$last]; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin/Exception.php" new file mode 100644 index 0000000..617c75e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Plugin/Exception.php" @@ -0,0 +1,17 @@ + 'intval', + 'integer' => 'intval', + 'search' => array('Typecho_Common', 'filterSearchQuery'), + 'xss' => array('Typecho_Common', 'removeXSS'), + 'url' => array('Typecho_Common', 'safeUrl'), + 'slug' => array('Typecho_Common', 'slugName') + ); + + /** + * 鑾峰彇鍗曚緥鍙ユ焺 + * + * @access public + * @return Typecho_Request + */ + public static function getInstance() + { + if (NULL === self::$_instance) { + self::$_instance = new Typecho_Request(); + } + + return self::$_instance; + } + + /** + * 搴旂敤杩囨护鍣 + * + * @access private + * @param mixed $value + * @return mixed + */ + private function _applyFilter($value) + { + if ($this->_filter) { + foreach ($this->_filter as $filter) { + $value = is_array($value) ? array_map($filter, $value) : + call_user_func($filter, $value); + } + + $this->_filter = array(); + } + + return $value; + } + + /** + * 妫鏌p鍦板潃鏄惁鍚堟硶 + * + * @param string $ip ip鍦板潃 + * @return boolean + */ + private function _checkIp($ip) + { + if (__TYPECHO_FILTER_SUPPORTED__) { + return false !== (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) + || filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6)); + } + + return preg_match("/^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/", $ip) + || preg_match("/^[0-9a-f:]+$/i", $ip); + } + + /** + * 妫鏌a鏄惁鍚堟硶 + * + * @param $agent ua瀛楃涓 + * @return boolean + */ + private function _checkAgent($agent) + { + return preg_match("/^[_a-z0-9- ,:;=#@\.\(\)\/\+\*\?]+$/i", $agent); + } + + /** + * 鍒濆鍖栧彉閲 + */ + public function __construct() + { + if (false === self::$_httpParams) { + self::$_httpParams = array_filter(array_merge($_POST, $_GET), + array('Typecho_Common', 'checkStrEncoding')); + } + } + + /** + * 鑾峰彇url鍓嶇紑 + * + * @access public + * @return string + */ + public static function getUrlPrefix() + { + if (empty(self::$_urlPrefix)) { + self::$_urlPrefix = (self::isSecure() ? 'https' : 'http') + . '://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']) + . (in_array($_SERVER['SERVER_PORT'], array(80, 443)) ? '' : ':' . $_SERVER['SERVER_PORT']); + } + + return self::$_urlPrefix; + } + + /** + * 鍒ゆ柇鏄惁涓篽ttps + * + * @access public + * @return boolean + */ + public static function isSecure() + { + return (!empty($_SERVER['HTTPS']) && 'off' != strtolower($_SERVER['HTTPS'])) + || (!empty($_SERVER['SERVER_PORT']) && 443 == $_SERVER['SERVER_PORT']) + || (defined('__TYPECHO_SECURE__') && __TYPECHO_SECURE__); + } + + /** + * 璁剧疆杩囨护鍣 + * + * @access public + * @return Typecho_Request + */ + public function filter() + { + $filters = func_get_args(); + + foreach ($filters as $filter) { + $this->_filter[] = is_string($filter) && isset(self::$_supportFilters[$filter]) + ? self::$_supportFilters[$filter] : $filter; + } + + return $this; + } + + /** + * 鑾峰彇瀹為檯浼犻掑弬鏁(magic) + * + * @access public + * @param string $key 鎸囧畾鍙傛暟 + * @return mixed + */ + public function __get($key) + { + return $this->get($key); + } + + /** + * 鍒ゆ柇鍙傛暟鏄惁瀛樺湪 + * + * @access public + * @param string $key 鎸囧畾鍙傛暟 + * @return boolean + */ + public function __isset($key) + { + return isset(self::$_httpParams[$key]) + || isset($this->_params[$key]); + } + + /** + * 鑾峰彇瀹為檯浼犻掑弬鏁 + * + * @access public + * @param string $key 鎸囧畾鍙傛暟 + * @param mixed $default 榛樿鍙傛暟 (default: NULL) + * @return mixed + */ + public function get($key, $default = NULL) + { + switch (true) { + case isset($this->_params[$key]): + $value = $this->_params[$key]; + break; + case isset(self::$_httpParams[$key]): + $value = self::$_httpParams[$key]; + break; + default: + $value = $default; + break; + } + + $value = !is_array($value) && strlen($value) > 0 ? $value : $default; + return $this->_applyFilter($value); + } + + /** + * 鑾峰彇涓涓暟缁 + * + * @param $key + * @return array + */ + public function getArray($key) + { + $result = isset($this->_params[$key]) ? $this->_params[$key] : + (isset(self::$_httpParams[$key]) ? self::$_httpParams[$key] : array()); + + $result = is_array($result) ? $result + : (strlen($result) > 0 ? array($result) : array()); + return $this->_applyFilter($result); + } + + /** + * 浠庡弬鏁板垪琛ㄦ寚瀹氱殑鍊间腑鑾峰彇http浼犻掑弬鏁 + * + * @access public + * @param mixed $params 鎸囧畾鐨勫弬鏁 + * @return array + */ + public function from($params) + { + $result = array(); + $args = is_array($params) ? $params : func_get_args(); + + foreach ($args as $arg) { + $result[$arg] = $this->get($arg); + } + + return $result; + } + + /** + * 璁剧疆http浼犻掑弬鏁 + * + * @access public + * @param string $name 鎸囧畾鐨勫弬鏁 + * @param mixed $value 鍙傛暟鍊 + * @return void + */ + public function setParam($name, $value) + { + if (Typecho_Common::checkStrEncoding($value)) { + $this->_params[$name] = $value; + } + } + + /** + * 璁剧疆澶氫釜鍙傛暟 + * + * @access public + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function setParams($params) + { + //澶勭悊瀛楃涓 + if (!is_array($params)) { + parse_str($params, $out); + $params = $out; + } + + $this->_params = array_merge($this->_params, + array_filter($params, array('Typecho_Common', 'checkStrEncoding'))); + } + + /** + * getRequestRoot + * + * @access public + * @return string + */ + public function getRequestRoot() + { + if (NULL === $this->_requestRoot) { + $root = rtrim(self::getUrlPrefix() . $this->getBaseUrl(), '/') . '/'; + + $pos = strrpos($root, '.php/'); + if ($pos) { + $root = dirname(substr($root, 0, $pos)); + } + + $this->_requestRoot = rtrim($root, '/'); + } + + return $this->_requestRoot; + } + + /** + * 鑾峰彇褰撳墠璇锋眰url + * + * @access public + * @return string + */ + public function getRequestUrl() + { + return self::getUrlPrefix() . $this->getRequestUri(); + } + + /** + * 鑾峰彇璇锋眰鍦板潃 + * + * @access public + * @return string + */ + public function getRequestUri() + { + if (!empty($this->_requestUri)) { + return $this->_requestUri; + } + + //澶勭悊requestUri + $requestUri = '/'; + + if (isset($_SERVER['HTTP_X_REWRITE_URL'])) { // check this first so IIS will catch + $requestUri = $_SERVER['HTTP_X_REWRITE_URL']; + } elseif ( + // IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem) + isset($_SERVER['IIS_WasUrlRewritten']) + && $_SERVER['IIS_WasUrlRewritten'] == '1' + && isset($_SERVER['UNENCODED_URL']) + && $_SERVER['UNENCODED_URL'] != '' + ) { + $requestUri = $_SERVER['UNENCODED_URL']; + } elseif (isset($_SERVER['REQUEST_URI'])) { + $requestUri = $_SERVER['REQUEST_URI']; + if (isset($_SERVER['HTTP_HOST']) && strstr($requestUri, $_SERVER['HTTP_HOST'])) { + $parts = @parse_url($requestUri); + + if (false !== $parts) { + $requestUri = (empty($parts['path']) ? '' : $parts['path']) + . ((empty($parts['query'])) ? '' : '?' . $parts['query']); + } + } + } elseif (isset($_SERVER['ORIG_PATH_INFO'])) { // IIS 5.0, PHP as CGI + $requestUri = $_SERVER['ORIG_PATH_INFO']; + if (!empty($_SERVER['QUERY_STRING'])) { + $requestUri .= '?' . $_SERVER['QUERY_STRING']; + } + } + + return $this->_requestUri = $requestUri; + } + + /** + * getBaseUrl + * + * @access public + * @return string + */ + public function getBaseUrl() + { + if (NULL !== $this->_baseUrl) { + return $this->_baseUrl; + } + + //澶勭悊baseUrl + $filename = (isset($_SERVER['SCRIPT_FILENAME'])) ? basename($_SERVER['SCRIPT_FILENAME']) : ''; + + if (isset($_SERVER['SCRIPT_NAME']) && basename($_SERVER['SCRIPT_NAME']) === $filename) { + $baseUrl = $_SERVER['SCRIPT_NAME']; + } elseif (isset($_SERVER['PHP_SELF']) && basename($_SERVER['PHP_SELF']) === $filename) { + $baseUrl = $_SERVER['PHP_SELF']; + } elseif (isset($_SERVER['ORIG_SCRIPT_NAME']) && basename($_SERVER['ORIG_SCRIPT_NAME']) === $filename) { + $baseUrl = $_SERVER['ORIG_SCRIPT_NAME']; // 1and1 shared hosting compatibility + } else { + // Backtrack up the script_filename to find the portion matching + // php_self + $path = isset($_SERVER['PHP_SELF']) ? $_SERVER['PHP_SELF'] : ''; + $file = isset($_SERVER['SCRIPT_FILENAME']) ? $_SERVER['SCRIPT_FILENAME'] : ''; + $segs = explode('/', trim($file, '/')); + $segs = array_reverse($segs); + $index = 0; + $last = count($segs); + $baseUrl = ''; + do { + $seg = $segs[$index]; + $baseUrl = '/' . $seg . $baseUrl; + ++$index; + } while (($last > $index) && (false !== ($pos = strpos($path, $baseUrl))) && (0 != $pos)); + } + + // Does the baseUrl have anything in common with the request_uri? + $finalBaseUrl = NULL; + $requestUri = $this->getRequestUri(); + + if (0 === strpos($requestUri, $baseUrl)) { + // full $baseUrl matches + $finalBaseUrl = $baseUrl; + } else if (0 === strpos($requestUri, dirname($baseUrl))) { + // directory portion of $baseUrl matches + $finalBaseUrl = rtrim(dirname($baseUrl), '/'); + } else if (!strpos($requestUri, basename($baseUrl))) { + // no match whatsoever; set it blank + $finalBaseUrl = ''; + } else if ((strlen($requestUri) >= strlen($baseUrl)) + && ((false !== ($pos = strpos($requestUri, $baseUrl))) && ($pos !== 0))) + { + // If using mod_rewrite or ISAPI_Rewrite strip the script filename + // out of baseUrl. $pos !== 0 makes sure it is not matching a value + // from PATH_INFO or QUERY_STRING + $baseUrl = substr($requestUri, 0, $pos + strlen($baseUrl)); + } + + return ($this->_baseUrl = (NULL === $finalBaseUrl) ? rtrim($baseUrl, '/') : $finalBaseUrl); + } + + /** + * 鏍规嵁褰撳墠uri鏋勯犳寚瀹氬弬鏁扮殑uri + * + * @access public + * @param mixed $parameter 鎸囧畾鐨勫弬鏁 + * @return string + */ + public function makeUriByRequest($parameter = NULL) + { + /** 鍒濆鍖栧湴鍧 */ + $requestUri = $this->getRequestUrl(); + $parts = parse_url($requestUri); + + /** 鍒濆鍖栧弬鏁 */ + if (is_string($parameter)) { + parse_str($parameter, $args); + } else if (is_array($parameter)) { + $args = $parameter; + } else { + return $requestUri; + } + + /** 鏋勯爍uery */ + if (isset($parts['query'])) { + parse_str($parts['query'], $currentArgs); + $args = array_merge($currentArgs, $args); + } + $parts['query'] = http_build_query($args); + + /** 杩斿洖鍦板潃 */ + return Typecho_Common::buildUrl($parts); + } + + /** + * 鑾峰彇褰撳墠pathinfo + * + * @access public + * @param string $inputEncoding 杈撳叆缂栫爜 + * @param string $outputEncoding 杈撳嚭缂栫爜 + * @return string + */ + public function getPathInfo($inputEncoding = NULL, $outputEncoding = NULL) + { + /** 缂撳瓨淇℃伅 */ + if (NULL !== $this->_pathInfo) { + return $this->_pathInfo; + } + + //鍙傝僙end Framework瀵筽ahtinfo鐨勫鐞, 鏇村ソ鐨勫吋瀹规 + $pathInfo = NULL; + + //澶勭悊requestUri + $requestUri = $this->getRequestUri(); + $finalBaseUrl = $this->getBaseUrl(); + + // Remove the query string from REQUEST_URI + if ($pos = strpos($requestUri, '?')) { + $requestUri = substr($requestUri, 0, $pos); + } + + if ((NULL !== $finalBaseUrl) + && (false === ($pathInfo = substr($requestUri, strlen($finalBaseUrl))))) + { + // If substr() returns false then PATH_INFO is set to an empty string + $pathInfo = '/'; + } elseif (NULL === $finalBaseUrl) { + $pathInfo = $requestUri; + } + + if (!empty($pathInfo)) { + //閽堝iis鐨剈tf8缂栫爜鍋氬己鍒惰浆鎹 + //鍙傝僪ttp://docs.moodle.org/ja/%E5%A4%9A%E8%A8%80%E8%AA%9E%E5%AF%BE%E5%BF%9C%EF%BC%9A%E3%82%B5%E3%83%BC%E3%83%90%E3%81%AE%E8%A8%AD%E5%AE%9A + if (!empty($inputEncoding) && !empty($outputEncoding) && + (stripos($_SERVER['SERVER_SOFTWARE'], 'Microsoft-IIS') !== false + || stripos($_SERVER['SERVER_SOFTWARE'], 'ExpressionDevServer') !== false)) { + if (function_exists('mb_convert_encoding')) { + $pathInfo = mb_convert_encoding($pathInfo, $outputEncoding, $inputEncoding); + } else if (function_exists('iconv')) { + $pathInfo = iconv($pathInfoEncoding, $outputEncoding, $pathInfo); + } + } + } else { + $pathInfo = '/'; + } + + // fix issue 456 + return ($this->_pathInfo = '/' . ltrim(urldecode($pathInfo), '/')); + } + + /** + * 璁剧疆鏈嶅姟绔弬鏁 + * + * @access public + * @param string $name 鍙傛暟鍚嶇О + * @param mixed $value 鍙傛暟鍊 + * @return void + */ + public function setServer($name, $value = NULL) + { + if (NULL == $value) { + if (isset($_SERVER[$name])) { + $value = $_SERVER[$name]; + } else if (isset($_ENV[$name])) { + $value = $_ENV[$name]; + } + } + + $this->_server[$name] = $value; + } + + /** + * 鑾峰彇鐜鍙橀噺 + * + * @access public + * @param string $name 鑾峰彇鐜鍙橀噺鍚 + * @return string + */ + public function getServer($name) + { + if (!isset($this->_server[$name])) { + $this->setServer($name); + } + + return $this->_server[$name]; + } + + /** + * 璁剧疆ip鍦板潃 + * + * @access public + * @param string $ip + */ + public function setIp($ip = NULL) + { + if (!empty($ip)) { + $this->_ip = $ip; + } else { + switch (true) { + case defined('__TYPECHO_IP_SOURCE__') && NULL !== $this->getServer(__TYPECHO_IP_SOURCE__): + list($this->_ip) = array_map('trim', explode(',', $this->getServer(__TYPECHO_IP_SOURCE__))); + break; + case NULL !== $this->getServer('REMOTE_ADDR'): + $this->_ip = $this->getServer('REMOTE_ADDR'); + break; + case NULL !== $this->getServer('HTTP_CLIENT_IP'): + $this->_ip = $this->getServer('HTTP_CLIENT_IP'); + break; + default: + break; + } + } + + if (empty($this->_ip) || !self::_checkIp($this->_ip)) { + $this->_ip = 'unknown'; + } + } + + /** + * 鑾峰彇ip鍦板潃 + * + * @access public + * @return string + */ + public function getIp() + { + if (NULL === $this->_ip) { + $this->setIp(); + } + + return $this->_ip; + } + + /** + * 璁剧疆瀹㈡埛绔 + * + * @access public + * @param string $agent 瀹㈡埛绔瓧绗︿覆 + * @return void + */ + public function setAgent($agent = NULL) + { + $agent = (NULL === $agent) ? $this->getServer('HTTP_USER_AGENT') : $agent; + $this->_agent = self::_checkAgent($agent) ? $agent : ''; + } + + /** + * 鑾峰彇瀹㈡埛绔 + * + * @access public + * @return string + */ + public function getAgent() + { + if (NULL === $this->_agent) { + $this->setAgent(); + } + + return $this->_agent; + } + + /** + * 璁剧疆鏉ユ簮椤 + * + * @access public + * @param string $referer 瀹㈡埛绔瓧绗︿覆 + * @return void + */ + public function setReferer($referer = NULL) + { + $this->_referer = (NULL === $referer) ? $this->getServer('HTTP_REFERER') : $referer; + } + + /** + * 鑾峰彇瀹㈡埛绔 + * + * @access public + * @return string + */ + public function getReferer() + { + if (NULL === $this->_referer) { + $this->setReferer(); + } + + return $this->_referer; + } + + /** + * 鍒ゆ柇鏄惁涓篻et鏂规硶 + * + * @access public + * @return boolean + */ + public function isGet() + { + return 'GET' == $this->getServer('REQUEST_METHOD'); + } + + /** + * 鍒ゆ柇鏄惁涓簆ost鏂规硶 + * + * @access public + * @return boolean + */ + public function isPost() + { + return 'POST' == $this->getServer('REQUEST_METHOD'); + } + + /** + * 鍒ゆ柇鏄惁涓簆ut鏂规硶 + * + * @access public + * @return boolean + */ + public function isPut() + { + return 'PUT' == $this->getServer('REQUEST_METHOD'); + } + + /** + * 鍒ゆ柇鏄惁涓篴jax + * + * @access public + * @return boolean + */ + public function isAjax() + { + return 'XMLHttpRequest' == $this->getServer('HTTP_X_REQUESTED_WITH'); + } + + /** + * 鍒ゆ柇鏄惁涓篺lash + * + * @access public + * @return boolean + */ + public function isFlash() + { + return 'Shockwave Flash' == $this->getServer('USER_AGENT'); + } + + /** + * isMobile + * + * @static + * @access public + * @return boolean + */ + public function isMobile() + { + $userAgent = $this->getAgent(); + return preg_match('/android.+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i',$userAgent) || preg_match('/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(di|rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i',substr($userAgent,0,4)); + } + + /** + * 鍒ゆ柇杈撳叆鏄惁婊¤冻瑕佹眰 + * + * @access public + * @param mixed $query 鏉′欢 + * @return boolean + */ + public function is($query) + { + $validated = false; + + /** 瑙f瀽涓 */ + if (is_string($query)) { + parse_str($query, $params); + } else if (is_array($query)) { + $params = $query; + } + + /** 楠岃瘉涓 */ + if ($params) { + $validated = true; + foreach ($params as $key => $val) { + $validated = empty($val) ? $this->__isset($key) : ($val == $this->get($key)); + + if (!$validated) { + break; + } + } + } + + return $validated; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Response.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Response.php" new file mode 100644 index 0000000..d84ec61 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Response.php" @@ -0,0 +1,299 @@ + 'Continue', + 101 => 'Switching Protocols', + 200 => 'OK', + 201 => 'Created', + 202 => 'Accepted', + 203 => 'Non-Authoritative Information', + 204 => 'No Content', + 205 => 'Reset Content', + 206 => 'Partial Content', + 300 => 'Multiple Choices', + 301 => 'Moved Permanently', + 302 => 'Found', + 303 => 'See Other', + 304 => 'Not Modified', + 305 => 'Use Proxy', + 307 => 'Temporary Redirect', + 400 => 'Bad Request', + 401 => 'Unauthorized', + 402 => 'Payment Required', + 403 => 'Forbidden', + 404 => 'Not Found', + 405 => 'Method Not Allowed', + 406 => 'Not Acceptable', + 407 => 'Proxy Authentication Required', + 408 => 'Request Timeout', + 409 => 'Conflict', + 410 => 'Gone', + 411 => 'Length Required', + 412 => 'Precondition Failed', + 413 => 'Request Entity Too Large', + 414 => 'Request-URI Too Long', + 415 => 'Unsupported Media Type', + 416 => 'Requested Range Not Satisfiable', + 417 => 'Expectation Failed', + 500 => 'Internal Server Error', + 501 => 'Not Implemented', + 502 => 'Bad Gateway', + 503 => 'Service Unavailable', + 504 => 'Gateway Timeout', + 505 => 'HTTP Version Not Supported' + ); + + /** + * 瀛楃缂栫爜 + * + * @var mixed + * @access private + */ + private $_charset; + + //榛樿鐨勫瓧绗︾紪鐮 + const CHARSET = 'UTF-8'; + + /** + * 鍗曚緥鍙ユ焺 + * + * @access private + * @var Typecho_Response + */ + private static $_instance = null; + + /** + * 鑾峰彇鍗曚緥鍙ユ焺 + * + * @access public + * @return Typecho_Response + */ + public static function getInstance() + { + if (null === self::$_instance) { + self::$_instance = new Typecho_Response(); + } + + return self::$_instance; + } + + /** + * 瑙f瀽ajax鍥炴墽鐨勫唴閮ㄥ嚱鏁 + * + * @access private + * @param mixed $message 鏍煎紡鍖栨暟鎹 + * @return string + */ + private function _parseXml($message) + { + /** 瀵逛簬鏁扮粍鍨嬪垯缁х画閫掑綊 */ + if (is_array($message)) { + $result = ''; + + foreach ($message as $key => $val) { + $tagName = is_int($key) ? 'item' : $key; + $result .= '<' . $tagName . '>' . $this->_parseXml($val) . ''; + } + + return $result; + } else { + return preg_match("/^[^<>]+$/is", $message) ? $message : ''; + } + } + + /** + * 璁剧疆榛樿鍥炴墽缂栫爜 + * + * @access public + * @param string $charset 瀛楃闆 + * @return void + */ + public function setCharset($charset = null) + { + $this->_charset = empty($charset) ? self::CHARSET : $charset; + } + + /** + * 鑾峰彇瀛楃闆 + * + * @access public + * @return string + */ + public function getCharset() + { + if (empty($this->_charset)) { + $this->setCharset(); + } + + return $this->_charset; + } + + /** + * 鍦╤ttp澶撮儴璇锋眰涓0鏄庣被鍨嬪拰瀛楃闆 + * + * @access public + * @param string $contentType 鏂囨。绫诲瀷 + * @return void + */ + public function setContentType($contentType = 'text/html') + { + header('Content-Type: ' . $contentType . '; charset=' . $this->getCharset(), true); + } + + /** + * 璁剧疆http澶 + * + * @access public + * @param string $name 鍚嶇О + * @param string $value 瀵瑰簲鍊 + * @return void + */ + public function setHeader($name, $value) + { + header($name . ': ' . $value, true); + } + + /** + * 璁剧疆HTTP鐘舵 + * + * @access public + * @param integer $code http浠g爜 + * @return void + */ + public static function setStatus($code) + { + if (isset(self::$_httpCode[$code])) { + header((isset($_SERVER['SERVER_PROTOCOL']) ? $_SERVER['SERVER_PROTOCOL'] : 'HTTP/1.1') . ' ' . $code . ' ' . self::$_httpCode[$code], true, $code); + } + } + + /** + * 鎶涘嚭ajax鐨勫洖鎵т俊鎭 + * + * @access public + * @param string $message 娑堟伅浣 + * @return void + */ + public function throwXml($message) + { + /** 璁剧疆http澶翠俊鎭 */ + $this->setContentType('text/xml'); + + /** 鏋勫缓娑堟伅浣 */ + echo 'getCharset() . '"?>', + '', + $this->_parseXml($message), + ''; + + /** 缁堟鍚庣画杈撳嚭 */ + exit; + } + + /** + * 鎶涘嚭json鍥炴墽淇℃伅 + * + * @access public + * @param string $message 娑堟伅浣 + * @return void + */ + public function throwJson($message) + { + /** 璁剧疆http澶翠俊鎭 */ + $this->setContentType('application/json'); + + echo Json::encode($message); + + /** 缁堟鍚庣画杈撳嚭 */ + exit; + } + + /** + * 閲嶅畾鍚戝嚱鏁 + * + * @access public + * @param string $location 閲嶅畾鍚戣矾寰 + * @param boolean $isPermanently 鏄惁涓烘案涔呴噸瀹氬悜 + * @return void + */ + public function redirect($location, $isPermanently = false) + { + /** Typecho_Common */ + $location = Typecho_Common::safeUrl($location); + + if ($isPermanently) { + header('Location: ' . $location, false, 301); + exit; + } else { + header('Location: ' . $location, false, 302); + exit; + } + } + + /** + * 杩斿洖鏉ヨ矾 + * + * @access public + * @param string $suffix 闄勫姞鍦板潃 + * @param string $default 榛樿鏉ヨ矾 + */ + public function goBack($suffix = NULL, $default = NULL) + { + //鑾峰彇鏉ユ簮 + $referer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : ''; + + //鍒ゆ柇鏉ユ簮 + if (!empty($referer)) { + // ~ fix Issue 38 + if (!empty($suffix)) { + $parts = parse_url($referer); + $myParts = parse_url($suffix); + + if (isset($myParts['fragment'])) { + $parts['fragment'] = $myParts['fragment']; + } + + if (isset($myParts['query'])) { + $args = array(); + if (isset($parts['query'])) { + parse_str($parts['query'], $args); + } + + parse_str($myParts['query'], $currentArgs); + $args = array_merge($args, $currentArgs); + $parts['query'] = http_build_query($args); + } + + $referer = Typecho_Common::buildUrl($parts); + } + + $this->redirect($referer, false); + } else if (!empty($default)) { + $this->redirect($default); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router.php" new file mode 100644 index 0000000..483ee82 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router.php" @@ -0,0 +1,209 @@ + $route) { + if (preg_match($route['regx'], $pathInfo, $matches)) { + self::$current = $key; + + try { + /** 杞藉叆鍙傛暟 */ + $params = NULL; + + if (!empty($route['params'])) { + unset($matches[0]); + $params = array_combine($route['params'], $matches); + } + + $widget = Typecho_Widget::widget($route['widget'], $parameter, $params); + + return $widget; + + } catch (Exception $e) { + if (404 == $e->getCode()) { + Typecho_Widget::destory($route['widget']); + continue; + } + + throw $e; + } + } + } + + return false; + } + + /** + * 璁剧疆鍏ㄨ矾寰 + * + * @access public + * @param string $pathInfo + * @return void + */ + public static function setPathInfo($pathInfo = '/') + { + self::$_pathInfo = $pathInfo; + } + + /** + * 鑾峰彇鍏ㄨ矾寰 + * + * @access public + * @return string + */ + public static function getPathInfo() + { + if (NULL === self::$_pathInfo) { + self::setPathInfo(); + } + + return self::$_pathInfo; + } + + /** + * 璺敱鍒嗗彂鍑芥暟 + * + * @param string $path 鐩殑鏂囦欢鎵鍦ㄧ洰褰 + * @return void + * @throws Typecho_Route_Exception + */ + public static function dispatch() + { + /** 鑾峰彇PATHINFO */ + $pathInfo = self::getPathInfo(); + + foreach (self::$_routingTable as $key => $route) { + if (preg_match($route['regx'], $pathInfo, $matches)) { + self::$current = $key; + + try { + /** 杞藉叆鍙傛暟 */ + $params = NULL; + + if (!empty($route['params'])) { + unset($matches[0]); + $params = array_combine($route['params'], $matches); + } + + $widget = Typecho_Widget::widget($route['widget'], NULL, $params); + + if (isset($route['action'])) { + $widget->{$route['action']}(); + } + + return; + + } catch (Exception $e) { + if (404 == $e->getCode()) { + Typecho_Widget::destory($route['widget']); + continue; + } + + throw $e; + } + } + } + + /** 杞藉叆璺敱寮傚父鏀寔 */ + throw new Typecho_Router_Exception("Path '{$pathInfo}' not found", 404); + } + + /** + * 璺敱鍙嶈В鏋愬嚱鏁 + * + * @param string $name 璺敱閰嶇疆琛ㄥ悕绉 + * @param string $value 璺敱濉厖鍊 + * @param string $prefix 鏈缁堝悎鎴愯矾寰勭殑鍓嶇紑 + * @return string + */ + public static function url($name, array $value = NULL, $prefix = NULL) + { + $route = self::$_routingTable[$name]; + + //浜ゆ崲鏁扮粍閿 + $pattern = array(); + foreach ($route['params'] as $row) { + $pattern[$row] = isset($value[$row]) ? $value[$row] : '{' . $row . '}'; + } + + return Typecho_Common::url(vsprintf($route['format'], $pattern), $prefix); + } + + /** + * 璁剧疆璺敱鍣ㄩ粯璁ら厤缃 + * + * @access public + * @param mixed $routes 閰嶇疆淇℃伅 + * @return void + */ + public static function setRoutes($routes) + { + if (isset($routes[0])) { + self::$_routingTable = $routes[0]; + } else { + /** 瑙f瀽璺敱閰嶇疆 */ + $parser = new Typecho_Router_Parser($routes); + self::$_routingTable = $parser->parse(); + } + } + + /** + * 鑾峰彇璺敱淇℃伅 + * + * @param string $routeName 璺敱鍚嶇О + * @static + * @access public + * @return void + */ + public static function get($routeName) + { + return isset(self::$_routingTable[$routeName]) ? self::$_routingTable[$routeName] : NULL; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router/Exception.php" new file mode 100644 index 0000000..ebd76ad --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Router/Exception.php" @@ -0,0 +1,17 @@ +_routingTable = $routingTable; + + $this->_defaultRegx = array( + 'string' => '(.%s)', + 'char' => '([^/]%s)', + 'digital'=> '([0-9]%s)', + 'alpha' => '([_0-9a-zA-Z-]%s)', + 'alphaslash' => '([_0-9a-zA-Z-/]%s)', + 'split' => '((?:[^/]+/)%s[^/]+)', + ); + } + + /** + * 灞閮ㄥ尮閰嶅苟鏇挎崲姝e垯瀛楃涓 + * + * @access public + * @param array $matches 鍖归厤閮ㄥ垎 + * @return string + */ + public function _match(array $matches) + { + $params = explode(' ', $matches[1]); + $paramsNum = count($params); + $this->_params[] = $params[0]; + + if (1 == $paramsNum) { + return sprintf($this->_defaultRegx['char'], '+'); + } else if (2 == $paramsNum) { + return sprintf($this->_defaultRegx[$params[1]], '+'); + } else if (3 == $paramsNum) { + return sprintf($this->_defaultRegx[$params[1]], $params[2] > 0 ? '{' . $params[2] . '}' : '*'); + } else if (4 == $paramsNum) { + return sprintf($this->_defaultRegx[$params[1]], '{' . $params[2] . ',' . $params[3] . '}'); + } + } + + /** + * 瑙f瀽璺敱琛 + * + * @access public + * @return array + */ + public function parse() + { + $result = array(); + + foreach ($this->_routingTable as $key => $route) { + $this->_params = array(); + $route['regx'] = preg_replace_callback("/%([^%]+)%/", array($this, '_match'), + preg_quote(str_replace(array('[', ']', ':'), array('%', '%', ' '), $route['url']))); + + /** 澶勭悊鏂滅嚎 */ + $route['regx'] = rtrim($route['regx'], '/'); + $route['regx'] = '|^' . $route['regx'] . '[/]?$|'; + + $route['format'] = preg_replace("/\[([^\]]+)\]/", "%s", $route['url']); + $route['params'] = $this->_params; + + $result[$key] = $route; + } + + return $result; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Validate.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Validate.php" new file mode 100644 index 0000000..e8620ff --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Validate.php" @@ -0,0 +1,320 @@ + + * $test = "hello"; + * $Validation = new TypechoValidation(); + * $Validation->form($test, array("alpha" => "涓嶆槸瀛楃"); + * var_dump($Validation->getErrorMsg()); + *
      + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Validation.php 106 2008-04-11 02:23:54Z magike.net $ + */ + +/** + * 楠岃瘉绫 + * + * @package Validate + */ +class Typecho_Validate +{ + /** + * 鍐呴儴鏁版嵁 + * + * @access private + * @var array + */ + private $_data; + + /** + * 褰撳墠楠岃瘉鎸囬拡 + * + * @access private + * @var string + */ + private $_key; + + /** + * 楠岃瘉瑙勫垯鏁扮粍 + * + * @access private + * @var array + */ + private $_rules = array(); + + /** + * 涓柇妯″紡,涓鏃﹀嚭鐜伴獙璇侀敊璇嵆鎶涘嚭鑰屼笉鍐嶇户缁墽琛 + * + * @access private + * @var boolean + */ + private $_break = false; + + /** + * 澧炲姞楠岃瘉瑙勫垯 + * + * @access public + * @param string $key 鏁板奸敭鍊 + * @param string $rule 瑙勫垯鍚嶇О + * @param string $message 閿欒瀛楃涓 + * @return Typecho_Validation + */ + public function addRule($key, $rule, $message) + { + if (func_num_args() <= 3) { + $this->_rules[$key][] = array($rule, $message); + } else { + $params = func_get_args(); + $params = array_splice($params, 3); + $this->_rules[$key][] = array_merge(array($rule, $message), $params); + } + + return $this; + } + + /** + * 璁剧疆涓轰腑鏂ā寮 + * + * @access public + * @return void + */ + public function setBreak() + { + $this->_break = true; + } + + /** + * Run the Validator + * This function does all the work. + * + * @access public + * @param array $data 闇瑕侀獙璇佺殑鏁版嵁 + * @param array $rules 楠岃瘉鏁版嵁閬靛惊鐨勮鍒 + * @return array + * @throws Typecho_Validate_Exception + */ + public function run(array $data, $rules = NULL) + { + $result = array(); + $this->_data = $data; + $rules = empty($rules) ? $this->_rules : $rules; + + // Cycle through the rules and test for errors + foreach ($rules as $key => $rules) { + $this->_key = $key; + $data[$key] = (is_array($data[$key]) ? 0 == count($data[$key]) + : 0 == strlen($data[$key])) ? NULL : $data[$key]; + + foreach ($rules as $params) { + $method = $params[0]; + + if ('required' != $method && 'confirm' != $method && 0 == strlen($data[$key])) { + continue; + } + + $message = $params[1]; + $params[1] = $data[$key]; + $params = array_slice($params, 1); + + if (!call_user_func_array(is_array($method) ? $method : array($this, $method), $params)) { + $result[$key] = $message; + break; + } + } + + /** 寮鍚腑鏂 */ + if ($this->_break && $result) { + break; + } + } + + return $result; + } + + /** + * 鏈灏忛暱搴 + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @param integer $length 鏈灏忛暱搴 + * @return boolean + */ + public static function minLength($str, $length) + { + return (Typecho_Common::strLen($str) >= $length); + } + + /** + * 楠岃瘉杈撳叆鏄惁涓鑷 + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @param string $key 闇瑕佷竴鑷存ф鏌ョ殑閿 + * @return boolean + */ + public function confirm($str, $key) + { + return !empty($this->_data[$key]) ? ($str == $this->_data[$key]) : empty($str); + } + + /** + * 鏄惁涓虹┖ + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @return boolean + */ + public function required($str) + { + return !empty($this->_data[$this->_key]); + } + + /** + * 鏋氫妇绫诲瀷鍒ゆ柇 + * + * @access public + * @param string $str 寰呭鐞嗙殑瀛楃涓 + * @param array $params 鏋氫妇鍊 + * @return unknown + */ + public static function enum($str, array $params) + { + $keys = array_flip($params); + return isset($keys[$str]); + } + + /** + * Max Length + * + * @param $str + * @param $length + * @return bool + */ + public static function maxLength($str, $length) + { + return (Typecho_Common::strLen($str) < $length); + } + + /** + * Valid Email + * + * @access public + * @param string + * @return boolean + */ + public static function email($str) + { + return preg_match("/^[_a-z0-9-\.]+@([-a-z0-9]+\.)+[a-z]{2,}$/i", $str); + } + + /** + * 楠岃瘉鏄惁涓虹綉鍧 + * + * @access public + * @param string $str + * @return boolean + */ + public static function url($str) + { + $parts = @parse_url($str); + if (!$parts) { + return false; + } + + return isset($parts['scheme']) && + in_array($parts['scheme'], array('http', 'https', 'ftp')) && + !preg_match('/(\(|\)|\\\|"|<|>|[\x00-\x08]|[\x0b-\x0c]|[\x0e-\x19])/', $str); + } + + /** + * Alpha + * + * @access public + * @param string + * @return boolean + */ + public static function alpha($str) + { + return preg_match("/^([a-z])+$/i", $str) ? true : false; + } + + /** + * Alpha-numeric + * + * @access public + * @param string + * @return boolean + */ + public static function alphaNumeric($str) + { + return preg_match("/^([a-z0-9])+$/i", $str); + } + + /** + * Alpha-numeric with underscores and dashes + * + * @access public + * @param string + * @return boolean + */ + public static function alphaDash($str) + { + return preg_match("/^([_a-z0-9-])+$/i", $str) ? true : false; + } + + /** + * 瀵箈ss瀛楃涓茬殑妫娴 + * + * @access public + * @param string $str + * @return boolean + */ + public static function xssCheck($str) + { + $search = 'abcdefghijklmnopqrstuvwxyz'; + $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + $search .= '1234567890!@#$%^&*()'; + $search .= '~`";:?+/={}[]-_|\'\\'; + + for ($i = 0; $i < strlen($search); $i++) { + // ;? matches the ;, which is optional + // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars + + // @ @ search for the hex values + $str = preg_replace('/(&#[xX]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $str); // with a ; + // @ @ 0{0,7} matches '0' zero to seven times + $str = preg_replace('/(�{0,8}'.ord($search[$i]).';?)/', $search[$i], $str); // with a ; + } + + return !preg_match('/(\(|\)|\\\|"|<|>|[\x00-\x08]|[\x0b-\x0c]|[\x0e-\x19]|' . "\r|\n|\t" . ')/', $str); + } + + /** + * Numeric + * + * @access public + * @param integer + * @return boolean + */ + public static function isFloat($str) + { + return preg_match("/^[0-9\.]+$/", $str); + } + + /** + * Is Numeric + * + * @access public + * @param string + * @return boolean + */ + public static function isInteger($str) + { + return is_numeric($str); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget.php" new file mode 100644 index 0000000..9f45cdb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget.php" @@ -0,0 +1,420 @@ +request = $request; + $this->response = $response; + $this->parameter = new Typecho_Config(); + + if (!empty($params)) { + $this->parameter->setDefault($params); + } + } + + /** + * 瑙f瀽鍥炶皟 + * + * @param array $matches + * @access protected + * @return string + */ + protected function __parseCallback($matches) + { + return $this->{$matches[1]}; + } + + /** + * execute function. + * + * @access public + * @return void + */ + public function execute(){} + + /** + * post浜嬩欢瑙﹀彂 + * + * @param boolean $condition 瑙﹀彂鏉′欢 + * @return mixed + */ + public function on($condition) + { + if ($condition) { + return $this; + } else { + return new Typecho_Widget_Helper_Empty(); + } + } + + /** + * 鑾峰彇瀵硅薄鎻掍欢鍙ユ焺 + * + * @access public + * @param string $handle 鍙ユ焺 + * @return Typecho_Plugin + */ + public function pluginHandle($handle = NULL) + { + return Typecho_Plugin::factory(empty($handle) ? get_class($this) : $handle); + } + + /** + * widget鍒悕 + * + * @param string $widgetClass + * @param string $aliasClass + * @static + * @access public + * @return void + */ + public static function alias($widgetClass, $aliasClass) + { + self::$_widgetAlias[$widgetClass] = $aliasClass; + } + + /** + * 宸ュ巶鏂规硶,灏嗙被闈欐佸寲鏀剧疆鍒板垪琛ㄤ腑 + * + * @access public + * @param string $alias 缁勪欢鍒悕 + * @param mixed $params 浼犻掔殑鍙傛暟 + * @param mixed $request 鍓嶇鍙傛暟 + * @param boolean $enableResponse 鏄惁鍏佽http鍥炴墽 + * @return object + * @throws Typecho_Exception + */ + public static function widget($alias, $params = NULL, $request = NULL, $enableResponse = true) + { + $parts = explode('@', $alias); + $className = $parts[0]; + $alias = empty($parts[1]) ? $className : $parts[1]; + + if (isset(self::$_widgetAlias[$className])) { + $className = self::$_widgetAlias[$className]; + } + + if (!isset(self::$_widgetPool[$alias])) { + /** 濡傛灉绫讳笉瀛樺湪 */ + if (!class_exists($className)) { + throw new Typecho_Widget_Exception($className); + } + + /** 鍒濆鍖杛equest */ + if (!empty($request)) { + $requestObject = new Typecho_Request(); + $requestObject->setParams($request); + } else { + $requestObject = Typecho_Request::getInstance(); + } + + /** 鍒濆鍖杛esponse */ + $responseObject = $enableResponse ? Typecho_Response::getInstance() + : Typecho_Widget_Helper_Empty::getInstance(); + + /** 鍒濆鍖栫粍浠 */ + $widget = new $className($requestObject, $responseObject, $params); + + $widget->execute(); + self::$_widgetPool[$alias] = $widget; + } + + return self::$_widgetPool[$alias]; + } + + /** + * 閲婃斁缁勪欢 + * + * @access public + * @param string $alias 缁勪欢鍚嶇О + * @return void + */ + public static function destory($alias) + { + if (isset(self::$_widgetPool[$alias])) { + unset(self::$_widgetPool[$alias]); + } + } + + /** + * 灏嗙被鏈韩璧嬪 + * + * @param string $variable 鍙橀噺鍚 + * @return void + */ + public function to(&$variable) + { + return $variable = $this; + } + + /** + * 鏍煎紡鍖栬В鏋愬爢鏍堝唴鐨勬墍鏈夋暟鎹 + * + * @param string $format 鏁版嵁鏍煎紡 + * @return void + */ + public function parse($format) + { + while ($this->next()) { + echo preg_replace_callback("/\{([_a-z0-9]+)\}/i", + array($this, '__parseCallback'), $format); + } + } + + /** + * 灏嗘瘡涓琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @param array $value 姣忎竴琛岀殑鍊 + * @return array + */ + public function push(array $value) + { + //灏嗚鏁版嵁鎸夐『搴忕疆浣 + $this->row = $value; + $this->length ++; + + $this->stack[] = $value; + return $value; + } + + /** + * 鏍规嵁浣欐暟杈撳嚭 + * + * @access public + * @param string $param 闇瑕佽緭鍑虹殑鍊 + * @return void + */ + public function alt() + { + $args = func_get_args(); + $num = func_num_args(); + $split = $this->sequence % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 杈撳嚭椤哄簭鍊 + * + * @access public + * @return void + */ + public function sequence() + { + echo $this->sequence; + } + + /** + * 杈撳嚭鏁版嵁闀垮害 + * + * @access public + * @return void + */ + public function length() + { + echo $this->length; + } + + /** + * 杩斿洖鍫嗘爤鏄惁涓虹┖ + * + * @return boolean + */ + public function have() + { + return !empty($this->stack); + } + + /** + * 杩斿洖鍫嗘爤姣忎竴琛岀殑鍊 + * + * @return array + */ + public function next() + { + if ($this->stack) { + $this->row = @$this->stack[key($this->stack)]; + next($this->stack); + $this->sequence ++; + } + + if (!$this->row) { + reset($this->stack); + if ($this->stack) { + $this->row = $this->stack[key($this->stack)]; + } + + $this->sequence = 0; + return false; + } + + return $this->row; + } + + /** + * 榄旀湳鍑芥暟,鐢ㄤ簬鎸傛帴鍏跺畠鍑芥暟 + * + * @access public + * @param string $name 鍑芥暟鍚 + * @param array $args 鍑芥暟鍙傛暟 + * @return void + */ + public function __call($name, $args) + { + echo $this->{$name}; + } + + /** + * 榄旀湳鍑芥暟,鐢ㄤ簬鑾峰彇鍐呴儴鍙橀噺 + * + * @access public + * @param string $name 鍙橀噺鍚 + * @return mixed + */ + public function __get($name) + { + if (array_key_exists($name, $this->row)) { + return $this->row[$name]; + } else { + $method = '___' . $name; + + if (method_exists($this, $method)) { + return $this->$method(); + } else { + $return = $this->pluginHandle()->trigger($plugged)->{$method}($this); + if ($plugged) { + return $return; + } + } + } + + return NULL; + } + + /** + * 璁惧畾鍫嗘爤姣忎竴琛岀殑鍊 + * + * @param string $name 鍊煎搴旂殑閿 + * @param mixed $value 鐩稿簲鐨勫 + * @return void + */ + public function __set($name, $value) + { + $this->row[$name] = $value; + } + + /** + * 楠岃瘉鍫嗘爤鍊兼槸鍚﹀瓨鍦 + * + * @access public + * @param string $name + * @return boolean + */ + public function __isSet($name) + { + return isset($this->row[$name]); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Exception.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Exception.php" new file mode 100644 index 0000000..d3587c9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Exception.php" @@ -0,0 +1,17 @@ +setClose(false); + + /** 璁剧疆琛ㄥ崟灞炴 */ + $this->setAction($action); + $this->setMethod($method); + $this->setEncodeType($enctype); + } + + /** + * 璁剧疆琛ㄥ崟缂栫爜鏂规 + * + * @access public + * @param string $enctype 缂栫爜鏂规硶 + * @return Typecho_Widget_Helper_Form + */ + public function setEncodeType($enctype) + { + $this->setAttribute('enctype', $enctype); + return $this; + } + + /** + * 澧炲姞杈撳叆鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Form_Abstract $input 杈撳叆鍏冪礌 + * @return Typecho_Widget_Helper_Form + */ + public function addInput(Typecho_Widget_Helper_Form_Element $input) + { + $this->_inputs[$input->name] = $input; + $this->addItem($input); + return $this; + } + + /** + * 澧炲姞鍏冪礌(閲嶈浇) + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 琛ㄥ崟鍏冪礌 + * @return Typecho_Widget_Helper_Layout + */ + public function addItem(Typecho_Widget_Helper_Layout $item) + { + if ($item instanceof Typecho_Widget_Helper_Form_Submit) { + $this->addItem($item); + } else { + parent::addItem($item); + } + + return $this; + } + + /** + * 鑾峰彇杈撳叆椤 + * + * @access public + * @param string $name 杈撳叆椤瑰悕绉 + * @return mixed + */ + public function getInput($name) + { + return $this->_inputs[$name]; + } + + /** + * 鑾峰彇鎵鏈夎緭鍏ラ」鐨勬彁浜ゅ + * + * @access public + * @return array + */ + public function getAllRequest() + { + $result = array(); + $source = (self::POST_METHOD == $this->getAttribute('method')) ? $_POST : $_GET; + + foreach ($this->_inputs as $name => $input) { + $result[$name] = isset($source[$name]) ? $source[$name] : NULL; + } + return $result; + } + + /** + * 璁剧疆琛ㄥ崟鎻愪氦鏂规硶 + * + * @access public + * @param string $method 琛ㄥ崟鎻愪氦鏂规硶 + * @return Typecho_Widget_Helper_Form + */ + public function setMethod($method) + { + $this->setAttribute('method', $method); + return $this; + } + + /** + * 璁剧疆琛ㄥ崟鎻愪氦鐩殑 + * + * @access public + * @param string $action 琛ㄥ崟鎻愪氦鐩殑 + * @return Typecho_Widget_Helper_Form + */ + public function setAction($action) + { + $this->setAttribute('action', $action); + return $this; + } + + /** + * 鑾峰彇姝よ〃鍗曠殑鎵鏈夎緭鍏ラ」鍥烘湁鍊 + * + * @access public + * @return array + */ + public function getValues() + { + $values = array(); + + foreach ($this->_inputs as $name => $input) { + $values[$name] = $input->value; + } + return $values; + } + + /** + * 鑾峰彇姝よ〃鍗曠殑鎵鏈夎緭鍏ラ」 + * + * @access public + * @return array + */ + public function getInputs() + { + return $this->_inputs; + } + + /** + * 鑾峰彇鎻愪氦鏁版嵁婧 + * + * @access public + * @param array $params 鏁版嵁鍙傛暟闆 + * @return array + */ + public function getParams(array $params) + { + $result = array(); + $source = (self::POST_METHOD == $this->getAttribute('method')) ? $_POST : $_GET; + + foreach ($params as $param) { + $result[$param] = isset($source[$param]) ? $source[$param] : NULL; + } + + return $result; + } + + /** + * 楠岃瘉琛ㄥ崟 + * + * @access public + * @return void + */ + public function validate() + { + $validator = new Typecho_Validate(); + $rules = array(); + + foreach ($this->_inputs as $name => $input) { + $rules[$name] = $input->rules; + } + + $id = md5(implode('"', array_keys($this->_inputs))); + + /** 琛ㄥ崟鍊 */ + $formData = $this->getParams(array_keys($rules)); + $error = $validator->run($formData, $rules); + + if ($error) { + /** 鍒╃敤session璁板綍閿欒 */ + $_SESSION['__typecho_form_message_' . $id] = $error; + + /** 鍒╃敤session璁板綍琛ㄥ崟鍊 */ + $_SESSION['__typecho_form_record_' . $id] = $formData; + } + + return $error; + } + + /** + * 鏄剧ず琛ㄥ崟 + * + * @access public + * @return void + */ + public function render() + { + $id = md5(implode('"', array_keys($this->_inputs))); + + /** 鎭㈠琛ㄥ崟鍊 */ + if (isset($_SESSION['__typecho_form_record_' . $id])) { + $record = $_SESSION['__typecho_form_record_' . $id]; + $message = $_SESSION['__typecho_form_message_' . $id]; + foreach ($this->_inputs as $name => $input) { + $input->value(isset($record[$name]) ? $record[$name] : $input->value); + + /** 鏄剧ず閿欒娑堟伅 */ + if (isset($message[$name])) { + $input->message($message[$name]); + } + } + + unset($_SESSION['__typecho_form_record_' . $id]); + } + + parent::render(); + unset($_SESSION['__typecho_form_message_' . $id]); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" new file mode 100644 index 0000000..f4807e8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element.php" @@ -0,0 +1,322 @@ + 'typecho-option', 'id' => 'typecho-option-item-' . $name . '-' . self::$uniqueId)); + $this->name = $name; + self::$uniqueId ++; + + /** 杩愯鑷畾涔夊垵濮嬪嚱鏁 */ + $this->init(); + + /** 鍒濆鍖栬〃鍗曟爣棰 */ + if (NULL !== $label) { + $this->label($label); + } + + /** 鍒濆鍖栬〃鍗曢」 */ + $this->input = $this->input($name, $options); + + /** 鍒濆鍖栬〃鍗曞 */ + if (NULL !== $value) { + $this->value($value); + } + + /** 鍒濆鍖栬〃鍗曟弿杩 */ + if (NULL !== $description) { + $this->description($description); + } + } + + /** + * filterValue + * + * @param mixed $value + * @access protected + * @return string + */ + protected function filterValue($value) + { + if (preg_match_all('/[_0-9a-z-]+/i', $value, $matches)) { + return implode('-', $matches[0]); + } + + return ''; + } + + /** + * 鑷畾涔夊垵濮嬪嚱鏁 + * + * @access public + * @return void + */ + public function init(){} + + /** + * 鍒涘缓琛ㄥ崟鏍囬 + * + * @access public + * @param string $value 鏍囬瀛楃涓 + * @return Typecho_Widget_Helper_Form_Element + */ + public function label($value) + { + /** 鍒涘缓鏍囬鍏冪礌 */ + if (empty($this->label)) { + $this->label = new Typecho_Widget_Helper_Layout('label', array('class' => 'typecho-label')); + $this->container($this->label); + } + + $this->label->html($value); + return $this; + } + + /** + * 鍦ㄥ鍣ㄩ噷澧炲姞鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 琛ㄥ崟鍏冪礌 + * @return $this + */ + public function container(Typecho_Widget_Helper_Layout $item) + { + /** 鍒涘缓琛ㄥ崟瀹瑰櫒 */ + if (empty($this->container)) { + $this->container = new Typecho_Widget_Helper_Layout('li'); + $this->addItem($this->container); + } + + $this->container->addItem($item); + return $this; + } + + /** + * 璁剧疆鎻愮ず淇℃伅 + * + * @access public + * @param string $message 鎻愮ず淇℃伅 + * @return Typecho_Widget_Helper_Form_Element + */ + public function message($message) + { + if (empty($this->message)) { + $this->message = new Typecho_Widget_Helper_Layout('p', array('class' => 'message error')); + $this->container($this->message); + } + + $this->message->html($message); + return $this; + } + + /** + * 璁剧疆鎻忚堪淇℃伅 + * + * @access public + * @param string $description 鎻忚堪淇℃伅 + * @return Typecho_Widget_Helper_Form_Element + */ + public function description($description) + { + /** 鍒涘缓鎻忚堪鍏冪礌 */ + if (empty($this->description)) { + $this->description = new Typecho_Widget_Helper_Layout('p', array('class' => 'description')); + $this->container($this->description); + } + + $this->description->html($description); + return $this; + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access public + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return Typecho_Widget_Helper_Form_Element + */ + public function value($value) + { + $this->value = $value; + $this->_value($value); + return $this; + } + + /** + * 澶氳杈撳嚭妯″紡 + * + * @access public + * @return Typecho_Widget_Helper_Layout + */ + public function multiline() + { + $item = new Typecho_Widget_Helper_Layout('span'); + $this->multiline[] = $item; + return $item; + } + + /** + * 澶氳杈撳嚭妯″紡 + * + * @access public + * @return Typecho_Widget_Helper_Form_Element + */ + public function multiMode() + { + foreach ($this->multiline as $item) { + $item->setAttribute('class', 'multiline'); + } + return $this; + } + + /** + * 鍒濆鍖栧綋鍓嶈緭鍏ラ」 + * + * @access public + * @param Typecho_Widget_Helper_Layout $container 瀹瑰櫒瀵硅薄 + * @param string $name 琛ㄥ崟鍏冪礌鍚嶇О + * @param array $options 閫夋嫨椤 + * @return Typecho_Widget_Helper_Form_Element + */ + abstract public function input($name = NULL, array $options = NULL); + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + abstract protected function _value($value); + + /** + * 澧炲姞楠岃瘉鍣 + * + * @access public + * @return Typecho_Widget_Helper_Form_Element + */ + public function addRule($name) + { + $this->rules[] = func_get_args(); + return $this; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" new file mode 100644 index 0000000..8ae5265 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Checkbox.php" @@ -0,0 +1,81 @@ + $label) { + $this->_options[$value] = new Typecho_Widget_Helper_Layout('input'); + $item = $this->multiline(); + $id = $this->name . '-' . $this->filterValue($value); + $this->inputs[] = $this->_options[$value]; + + $item->addItem($this->_options[$value]->setAttribute('name', $this->name . '[]') + ->setAttribute('type', 'checkbox') + ->setAttribute('value', $value) + ->setAttribute('id', $id)); + + $labelItem = new Typecho_Widget_Helper_Layout('label'); + $item->addItem($labelItem->setAttribute('for', $id)->html($label)); + $this->container($item); + } + + return current($this->_options); + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + $values = is_array($value) ? $value : array($value); + + foreach ($this->_options as $option) { + $option->removeAttribute('checked'); + } + + foreach ($values as $value) { + if (isset($this->_options[$value])) { + $this->_options[$value]->setAttribute('checked', 'true'); + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" new file mode 100644 index 0000000..248d935 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Fake.php" @@ -0,0 +1,84 @@ +name = $name; + self::$uniqueId ++; + + /** 杩愯鑷畾涔夊垵濮嬪嚱鏁 */ + $this->init(); + + /** 鍒濆鍖栬〃鍗曢」 */ + $this->input = $this->input($name, $options); + + /** 鍒濆鍖栬〃鍗曞 */ + if (NULL !== $value) { + $this->value($value); + } + } + + /** + * 鑷畾涔夊垵濮嬪嚱鏁 + * + * @access public + * @return void + */ + public function init() + {} + + /** + * 鍒濆鍖栧綋鍓嶈緭鍏ラ」 + * + * @access public + * @param string $name 琛ㄥ崟鍏冪礌鍚嶇О + * @param array $options 閫夋嫨椤 + * @return Typecho_Widget_Helper_Layout + */ + public function input($name = NULL, array $options = NULL) + { + $input = new Typecho_Widget_Helper_Layout('input'); + $this->inputs[] = $input; + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', $value); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" new file mode 100644 index 0000000..c3c9214 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Hidden.php" @@ -0,0 +1,62 @@ +setAttribute('style', 'display:none'); + } + + /** + * 鍒濆鍖栧綋鍓嶈緭鍏ラ」 + * + * @access public + * @param string $name 琛ㄥ崟鍏冪礌鍚嶇О + * @param array $options 閫夋嫨椤 + * @return Typecho_Widget_Helper_Layout + */ + public function input($name = NULL, array $options = NULL) + { + $input = new Typecho_Widget_Helper_Layout('input', array('name' => $name, 'type' => 'hidden')); + $this->container($input); + $this->inputs[] = $input; + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" new file mode 100644 index 0000000..347a540 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Password.php" @@ -0,0 +1,52 @@ + $name . '-0-' . self::$uniqueId, + 'name' => $name, 'type' => 'password', 'class' => 'password')); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->container($input); + $this->inputs[] = $input; + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" new file mode 100644 index 0000000..c487b79 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Radio.php" @@ -0,0 +1,79 @@ + $label) { + $this->_options[$value] = new Typecho_Widget_Helper_Layout('input'); + $item = $this->multiline(); + $id = $this->name . '-' . $this->filterValue($value); + $this->inputs[] = $this->_options[$value]; + + $item->addItem($this->_options[$value]->setAttribute('name', $this->name) + ->setAttribute('type', 'radio') + ->setAttribute('value', $value) + ->setAttribute('id', $id)); + + $labelItem = new Typecho_Widget_Helper_Layout('label'); + $item->addItem($labelItem->setAttribute('for', $id)->html($label)); + $this->container($item); + } + + return current($this->_options); + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + foreach ($this->_options as $option) { + $option->removeAttribute('checked'); + } + + if (isset($this->_options[$value])) { + $this->value = $value; + $this->_options[$value]->setAttribute('checked', 'true'); + $this->input = $this->_options[$value]; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" new file mode 100644 index 0000000..e589990 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Select.php" @@ -0,0 +1,72 @@ +container($input->setAttribute('name', $name) + ->setAttribute('id', $name . '-0-' . self::$uniqueId)); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->inputs[] = $input; + + foreach ($options as $value => $label) { + $this->_options[$value] = new Typecho_Widget_Helper_Layout('option'); + $input->addItem($this->_options[$value]->setAttribute('value', $value)->html($label)); + } + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + foreach ($this->_options as $option) { + $option->removeAttribute('selected'); + } + + if (isset($this->_options[$value])) { + $this->_options[$value]->setAttribute('selected', 'true'); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" new file mode 100644 index 0000000..1272f7c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Submit.php" @@ -0,0 +1,52 @@ +setAttribute('class', 'typecho-option typecho-option-submit'); + $input = new Typecho_Widget_Helper_Layout('button', array('type' => 'submit')); + $this->container($input); + $this->inputs[] = $input; + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟鍏冪礌鍊 + * + * @access protected + * @param mixed $value 琛ㄥ崟鍏冪礌鍊 + * @return void + */ + protected function _value($value) + { + $this->input->html($value); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" new file mode 100644 index 0000000..78d1939 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Text.php" @@ -0,0 +1,53 @@ + $name . '-0-' . self::$uniqueId, + 'name' => $name, 'type' => 'text', 'class' => 'text')); + $this->container($input); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->inputs[] = $input; + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param mixed $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->setAttribute('value', htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" new file mode 100644 index 0000000..ec5adac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Form/Element/Textarea.php" @@ -0,0 +1,52 @@ + $name . '-0-' . self::$uniqueId, 'name' => $name)); + $this->label->setAttribute('for', $name . '-0-' . self::$uniqueId); + $this->container($input->setClose(false)); + $this->inputs[] = $input; + + return $input; + } + + /** + * 璁剧疆琛ㄥ崟椤归粯璁ゅ + * + * @access protected + * @param string $value 琛ㄥ崟椤归粯璁ゅ + * @return void + */ + protected function _value($value) + { + $this->input->html(htmlspecialchars($value)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Layout.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Layout.php" new file mode 100644 index 0000000..b90c081 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/Layout.php" @@ -0,0 +1,352 @@ +setTagName($tagName); + + if (!empty($attributes)) { + foreach ($attributes as $attributeName => $attributeValue) { + $this->setAttribute($attributeName, $attributeValue); + } + } + } + + /** + * 澧炲姞鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 鍏冪礌 + * @return Typecho_Widget_Helper_Layout + */ + public function addItem(Typecho_Widget_Helper_Layout $item) + { + $item->setParent($this); + $this->_items[] = $item; + return $this; + } + + /** + * 鍒犻櫎鍏冪礌 + * + * @access public + * @param Typecho_Widget_Helper_Layout $item 鍏冪礌 + * @return Typecho_Widget_Helper_Layout + */ + public function removeItem(Typecho_Widget_Helper_Layout $item) + { + unset($this->_items[array_search($item, $this->_items)]); + return $this; + } + + /** + * getItems + * + * @access public + * @return array + */ + public function getItems() + { + return $this->_items; + } + + /** + * 璁剧疆鍐呴儴鏁版嵁 + * + * @access public + * @param mixed $html 鍐呴儴鏁版嵁 + * @return unknown + */ + public function html($html = false) + { + if (false === $html) { + if (empty($this->_html)) { + foreach ($this->_items as $item) { + $item->render(); + } + } else { + echo $this->_html; + } + } else { + $this->_html = $html; + return $this; + } + } + + /** + * 璁剧疆鏍囩鍚 + * + * @access public + * @param string $tagName 鏍囩鍚 + * @return void + */ + public function setTagName($tagName) + { + $this->_tagName = $tagName; + } + + /** + * getTagName + * + * @param mixed $tagName + * @access public + * @return void + */ + public function getTagName($tagName) + {} + + /** + * 璁剧疆琛ㄥ崟灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @param string $attributeValue 灞炴у + * @return Typecho_Widget_Helper_Layout + */ + public function setAttribute($attributeName, $attributeValue) + { + $this->_attributes[$attributeName] = $attributeValue; + return $this; + } + + /** + * 绉婚櫎鏌愪釜灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return Typecho_Widget_Helper_Layout + */ + public function removeAttribute($attributeName) + { + if (isset($this->_attributes[$attributeName])) { + unset($this->_attributes[$attributeName]); + } + + return $this; + } + + /** + * 鑾峰彇灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕 + * @return string + */ + public function getAttribute($attributeName) + { + return isset($this->_attributes[$attributeName]) ? $this->_attributes[$attributeName] : NULL; + } + + /** + * 璁剧疆鏄惁鑷棴鍚 + * + * @access public + * @param boolean $close 鏄惁鑷棴鍚 + * @return Typecho_Widget_Helper_Layout + */ + public function setClose($close) + { + $this->_forceClose = $close; + return $this; + } + + /** + * 璁剧疆鐖惰妭鐐 + * + * @access public + * @param Typecho_Widget_Helper_Layout $parent 鐖惰妭鐐 + * @return Typecho_Widget_Helper_Layout + */ + public function setParent(Typecho_Widget_Helper_Layout $parent) + { + $this->_parent = $parent; + return $this; + } + + /** + * 鑾峰彇鐖惰妭鐐 + * + * @access public + * @return Typecho_Widget_Helper_Layout + */ + public function getParent() + { + return $this->_parent; + } + + /** + * 澧炲姞鍒版煇甯冨眬鍏冪礌闆嗗悎涓 + * + * @access public + * @param Typecho_Widget_Helper_Layout $parent 甯冨眬瀵硅薄 + * @return Typecho_Widget_Helper_Layout + */ + public function appendTo(Typecho_Widget_Helper_Layout $parent) + { + $parent->addItem($this); + return $this; + } + + /** + * 寮濮嬫爣绛 + * + * @access public + * @return void + */ + public function start() + { + /** 杈撳嚭鏍囩 */ + echo $this->_tagName ? "<{$this->_tagName}" : NULL; + + /** 杈撳嚭灞炴 */ + foreach ($this->_attributes as $attributeName => $attributeValue) { + echo " {$attributeName}=\"{$attributeValue}\""; + } + + /** 鏀寔鑷棴鍚 */ + if (!$this->_close && $this->_tagName) { + echo ">\n"; + } + } + + /** + * 缁撴潫鏍囩 + * + * @access public + * @return void + */ + public function end() + { + if ($this->_tagName) { + echo $this->_close ? " />\n" : "_tagName}>\n"; + } + } + + /** + * 璁剧疆灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @param string $attributeValue 灞炴у + * @return void + */ + public function __set($name, $value) + { + $this->_attributes[$name] = $value; + } + + /** + * 鑾峰彇灞炴 + * + * @access public + * @param string $attributeName 灞炴у悕绉 + * @return void + */ + public function __get($name) + { + return isset($this->_attributes[$name]) ? $this->_attributes[$name] : NULL; + } + + /** + * 杈撳嚭鎵鏈夊厓绱 + * + * @access public + * @return void + */ + public function render() + { + if (empty($this->_items) && empty($this->_html)) { + $this->_close = true; + } + + if (NULL !== $this->_forceClose) { + $this->_close = $this->_forceClose; + } + + $this->start(); + $this->html(); + $this->end(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" new file mode 100644 index 0000000..12d5b96 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator.php" @@ -0,0 +1,131 @@ +_total = $total; + $this->_totalPage = ceil($total / $pageSize); + $this->_currentPage = $currentPage; + $this->_pageSize = $pageSize; + $this->_pageTemplate = $pageTemplate; + + if (($currentPage > $this->_totalPage || $currentPage < 1) && $total > 0) { + throw new Typecho_Widget_Exception('Page Not Exists', 404); + } + } + + /** + * 璁剧疆椤甸潰鍗犱綅绗 + * + * @access protected + * @param string $holder 椤甸潰鍗犱綅绗 + * @return void + */ + public function setPageHolder($holder) + { + $this->_pageHolder = array('{' . $holder . '}', + str_replace(array('{', '}'), array('%7B', '%7D'), $holder)); + } + + /** + * 璁剧疆閿氱偣 + * + * @access public + * @param string $anchor 閿氱偣 + * @return void + */ + public function setAnchor($anchor) + { + $this->_anchor = '#' . $anchor; + } + + /** + * 杈撳嚭鏂规硶 + * + * @access public + * @return void + */ + public function render() + { + throw new Typecho_Widget_Exception(get_class($this) . ':' . __METHOD__, 500); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" new file mode 100644 index 0000000..57b9df4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Box.php" @@ -0,0 +1,120 @@ +_total < 1) { + return; + } + + $default = array( + 'itemTag' => 'li', + 'textTag' => 'span', + 'currentClass' => 'current', + 'prevClass' => 'prev', + 'nextClass' => 'next' + ); + + $template = array_merge($default, $template); + extract($template); + + // 瀹氫箟item + $itemBegin = empty($itemTag) ? '' : ('<' . $itemTag . '>'); + $itemCurrentBegin = empty($itemTag) ? '' : ('<' . $itemTag + . (empty($currentClass) ? '' : ' class="' . $currentClass . '"') . '>'); + $itemPrevBegin = empty($itemTag) ? '' : ('<' . $itemTag + . (empty($prevClass) ? '' : ' class="' . $prevClass . '"') . '>'); + $itemNextBegin = empty($itemTag) ? '' : ('<' . $itemTag + . (empty($nextClass) ? '' : ' class="' . $nextClass . '"') . '>'); + $itemEnd = empty($itemTag) ? '' : (''); + $textBegin = empty($textTag) ? '' : ('<' . $textTag . '>'); + $textEnd = empty($textTag) ? '' : (''); + $linkBegin = ''; + $linkCurrentBegin = empty($itemTag) ? ('') + : $linkBegin; + $linkPrevBegin = empty($itemTag) ? ('') + : $linkBegin; + $linkNextBegin = empty($itemTag) ? ('') + : $linkBegin; + $linkEnd = ''; + + $from = max(1, $this->_currentPage - $splitPage); + $to = min($this->_totalPage, $this->_currentPage + $splitPage); + + //杈撳嚭涓婁竴椤 + if ($this->_currentPage > 1) { + echo $itemPrevBegin . sprintf($linkPrevBegin, + str_replace($this->_pageHolder, $this->_currentPage - 1, $this->_pageTemplate) . $this->_anchor) + . $prevWord . $linkEnd . $itemEnd; + } + + //杈撳嚭绗竴椤 + if ($from > 1) { + echo $itemBegin . sprintf($linkBegin, str_replace($this->_pageHolder, 1, $this->_pageTemplate) . $this->_anchor) + . '1' . $linkEnd . $itemEnd; + + if ($from > 2) { + //杈撳嚭鐪佺暐鍙 + echo $itemBegin . $textBegin . $splitWord . $textEnd . $itemEnd; + } + } + + //杈撳嚭涓棿椤 + for ($i = $from; $i <= $to; $i ++) { + $current = ($i == $this->_currentPage); + + echo ($current ? $itemCurrentBegin : $itemBegin) . sprintf(($current ? $linkCurrentBegin : $linkBegin), + str_replace($this->_pageHolder, $i, $this->_pageTemplate) . $this->_anchor) + . $i . $linkEnd . $itemEnd; + } + + //杈撳嚭鏈鍚庨〉 + if ($to < $this->_totalPage) { + if ($to < $this->_totalPage - 1) { + echo $itemBegin . $textBegin . $splitWord . $textEnd . $itemEnd; + } + + echo $itemBegin . sprintf($linkBegin, str_replace($this->_pageHolder, $this->_totalPage, $this->_pageTemplate) . $this->_anchor) + . $this->_totalPage . $linkEnd . $itemEnd; + } + + //杈撳嚭涓嬩竴椤 + if ($this->_currentPage < $this->_totalPage) { + echo $itemNextBegin . sprintf($linkNextBegin, + str_replace($this->_pageHolder, $this->_currentPage + 1, $this->_pageTemplate) . $this->_anchor) + . $nextWord . $linkEnd . $itemEnd; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" new file mode 100644 index 0000000..d90bba0 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Typecho/Widget/Helper/PageNavigator/Classic.php" @@ -0,0 +1,67 @@ +prev($prevWord); + $this->next($nextWord); + } + + /** + * 杈撳嚭涓婁竴椤 + * + * @access public + * @param string $prevWord 涓婁竴椤垫枃瀛 + * @return void + */ + public function prev($prevWord = 'PREV') + { + //杈撳嚭涓婁竴椤 + if ($this->_total > 0 && $this->_currentPage > 1) { + echo ''; + } + } + + /** + * 杈撳嚭涓嬩竴椤 + * + * @access public + * @param string $prevWord 涓嬩竴椤垫枃瀛 + * @return void + */ + public function next($nextWord = 'NEXT') + { + //杈撳嚭涓嬩竴椤 + if ($this->_total > 0 && $this->_currentPage < $this->_totalPage) { + echo ''; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Upgrade.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Upgrade.php" new file mode 100644 index 0000000..79614bb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Upgrade.php" @@ -0,0 +1,1207 @@ +query($db->select('coid', 'text')->from('table.comments') + ->order('coid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $text = nl2br($row['text']); + + $db->query($db->update('table.comments') + ->rows(array('text' => $text)) + ->where('coid = ?', $row['coid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + + /** 杞崲鍐呭 */ + $i = 1; + + while (true) { + $result = $db->query($db->select('cid', 'text')->from('table.contents') + ->order('cid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $text = preg_replace( + array("/\s*

      /is", "/\s*<\/p>\s*/is", "/\s*\s*/is", + "/\s*<(div|blockquote|pre|table|ol|ul)>/is", "/<\/(div|blockquote|pre|table|ol|ul)>\s*/is"), + array('', "\n\n", "\n", "\n\n<\\1>", "\n\n"), + $row['text']); + + $db->query($db->update('table.contents') + ->rows(array('text' => $text)) + ->where('cid = ?', $row['cid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + } + + /** + * 鍗囩骇鑷9.1.14 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_4r9_1_14($db, $options) + { + if (is_writeable(__TYPECHO_ROOT_DIR__ . '/config.inc.php')) { + $handle = fopen(__TYPECHO_ROOT_DIR__ . '/config.inc.php', 'ab'); + fwrite($handle, ' +/** 鍒濆鍖栨椂鍖 */ +Typecho_Date::setTimezoneOffset($options->timezone); +'); + fclose($handle); + } else { + throw new Typecho_Exception(_t('config.inc.php 鏂囦欢鏃犳硶鍐欏叆, 璇峰皢瀹冪殑鏉冮檺璁剧疆涓哄彲鍐')); + } + } + + /** + * 鍗囩骇鑷9.2.3 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_5r9_2_3($db, $options) + { + /** 杞崲璇勮 */ + $i = 1; + + while (true) { + $result = $db->query($db->select('coid', 'text')->from('table.comments') + ->order('coid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $text = preg_replace("/\s*\s*/i", "\n", $row['text']); + + $db->query($db->update('table.comments') + ->rows(array('text' => $text)) + ->where('coid = ?', $row['coid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + } + + /** + * 鍗囩骇鑷9.2.18 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_5r9_2_18($db, $options) + { + /** 鍗囩骇缂栬緫鍣ㄦ帴鍙 */ + $db->query($db->update('table.options') + ->rows(array('value' => 350)) + ->where('name = ?', 'editorSize')); + } + + /** + * 鍗囩骇鑷9.2.25 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_5r9_2_25($db, $options) + { + /** 鍗囩骇缂栬緫鍣ㄦ帴鍙 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'useRichEditor', 'user' => 0, 'value' => 1))); + } + + /** + * 鍗囩骇鑷9.4.3 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_6r9_4_3($db, $options) + { + /** 淇敼鏁版嵁搴撳瓧娈 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + //鍒犻櫎鑰佹暟鎹 + try { + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query('ALTER TABLE `' . $prefix . 'users` DROP `meta`', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'users" DROP COLUMN "meta"', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'users_' . $uuid . ' ( "uid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(32) default NULL , + "password" varchar(64) default NULL , + "mail" varchar(200) default NULL , + "url" varchar(200) default NULL , + "screenName" varchar(32) default NULL , + "created" int(10) default \'0\' , + "activated" int(10) default \'0\' , + "logged" int(10) default \'0\' , + "group" varchar(16) default \'visitor\' , + "authCode" varchar(64) default NULL)', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'users_' . $uuid . ' ("uid", "name", "password", "mail", "url" + , "screenName", "created", "activated", "logged", "group", "authCode") SELECT "uid", "name", "password", "mail", "url" + , "screenName", "created", "activated", "logged", "group", "authCode" FROM ' . $prefix . 'users', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'users', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'users ( "uid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(32) default NULL , + "password" varchar(64) default NULL , + "mail" varchar(200) default NULL , + "url" varchar(200) default NULL , + "screenName" varchar(32) default NULL , + "created" int(10) default \'0\' , + "activated" int(10) default \'0\' , + "logged" int(10) default \'0\' , + "group" varchar(16) default \'visitor\' , + "authCode" varchar(64) default NULL)', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'users SELECT * FROM ' . $prefix . 'users_' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'users_' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'users_name ON ' . $prefix . 'users ("name")', Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'users_mail ON ' . $prefix . 'users ("mail")', Typecho_Db::WRITE); + + break; + + default: + break; + } + } catch (Typecho_Db_Exception $e) { + //do nothing + } + + //灏唖lug瀛楁闀垮害澧炲姞鍒200 + try { + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query("ALTER TABLE `" . $prefix . "contents` MODIFY COLUMN `slug` varchar(200)", Typecho_Db::WRITE); + $db->query("ALTER TABLE `" . $prefix . "metas` MODIFY COLUMN `slug` varchar(200)", Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'contents" ALTER COLUMN "slug" TYPE varchar(200)', Typecho_Db::WRITE); + $db->query('ALTER TABLE "' . $prefix . 'metas" ALTER COLUMN "slug" TYPE varchar(200)', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'contents' . $uuid . ' ( "cid" INTEGER NOT NULL PRIMARY KEY, + "title" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "created" int(10) default \'0\' , + "modified" int(10) default \'0\' , + "text" text , + "order" int(10) default \'0\' , + "authorId" int(10) default \'0\' , + "template" varchar(32) default NULL , + "type" varchar(16) default \'post\' , + "status" varchar(16) default \'publish\' , + "password" varchar(32) default NULL , + "commentsNum" int(10) default \'0\' , + "allowComment" char(1) default \'0\' , + "allowPing" char(1) default \'0\' , + "allowFeed" char(1) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents' . $uuid . ' SELECT * FROM ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'contents ( "cid" INTEGER NOT NULL PRIMARY KEY, + "title" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "created" int(10) default \'0\' , + "modified" int(10) default \'0\' , + "text" text , + "order" int(10) default \'0\' , + "authorId" int(10) default \'0\' , + "template" varchar(32) default NULL , + "type" varchar(16) default \'post\' , + "status" varchar(16) default \'publish\' , + "password" varchar(32) default NULL , + "commentsNum" int(10) default \'0\' , + "allowComment" char(1) default \'0\' , + "allowPing" char(1) default \'0\' , + "allowFeed" char(1) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents SELECT * FROM ' . $prefix . 'contents' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'contents_slug ON ' . $prefix . 'contents ("slug")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'contents_created ON ' . $prefix . 'contents ("created")', Typecho_Db::WRITE); + + $db->query('CREATE TABLE ' . $prefix . 'metas' . $uuid . ' ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas' . $uuid . ' SELECT * FROM ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'metas ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas SELECT * FROM ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'metas_slug ON ' . $prefix . 'metas ("slug")', Typecho_Db::WRITE); + + break; + + default: + break; + } + } catch (Typecho_Db_Exception $e) { + //do nothing + } + } + + /** + * 鍗囩骇鑷9.4.21 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_6r9_4_21($db, $options) + { + //鍒涘缓涓婁紶鐩綍 + $uploadDir = Typecho_Common::url(Widget_Upload::UPLOAD_PATH, __TYPECHO_ROOT_DIR__); + if (is_dir($uploadDir)) { + if (!is_writeable($uploadDir)) { + if (!@chmod($uploadDir, 0644)) { + throw new Typecho_Widget_Exception(_t('涓婁紶鐩綍鏃犳硶鍐欏叆, 璇锋墜鍔ㄥ皢瀹夎鐩綍涓嬬殑 %s 鐩綍鐨勬潈闄愯缃负鍙啓鐒跺悗缁х画鍗囩骇', Widget_Upload::UPLOAD_PATH)); + } + } + } else { + if (!@mkdir($uploadDir, 0644)) { + throw new Typecho_Widget_Exception(_t('涓婁紶鐩綍鏃犳硶鍒涘缓, 璇锋墜鍔ㄥ垱寤哄畨瑁呯洰褰曚笅鐨 %s 鐩綍, 骞跺皢瀹冪殑鏉冮檺璁剧疆涓哄彲鍐欑劧鍚庣户缁崌绾', Widget_Upload::UPLOAD_PATH)); + } + } + + /** 澧炲姞鑷畾涔変富椤 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'customHomePage', 'user' => 0, 'value' => 0))); + + /** 澧炲姞鏂囦欢涓婁紶鏁e垪鍑芥暟 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'uploadHandle', 'user' => 0, 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:12:"uploadHandle";}'))); + + /** 澧炲姞鏂囦欢鍒犻櫎鍑芥暟 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'deleteHandle', 'user' => 0, 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:12:"deleteHandle";}'))); + + /** 澧炲姞鏂囦欢灞曠幇鏁e垪鍑芥暟 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'attachmentHandle', 'user' => 0, 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:16:"attachmentHandle";}'))); + + /** 澧炲姞鏂囦欢鎵╁睍鍚 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'attachmentTypes', 'user' => 0, 'value' => '*.jpg;*.gif;*.png;*.zip;*.tar.gz'))); + + /** 澧炲姞璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pre = array_slice($routingTable, 0, 2); + $next = array_slice($routingTable, 2); + + $routingTable = array_merge($pre, array('attachment' => + array ( + 'url' => '/attachment/[cid:digital]/', + 'widget' => 'Widget_Archive', + 'action' => 'render', + )), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.6.1 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_6r9_6_1($db, $options) + { + /** 鍘绘帀鎵瑙佸嵆鎵寰楃紪杈戝櫒 */ + $db->query($db->delete('table.options') + ->where('name = ?', 'useRichEditor')); + + /** 淇鑷姩淇濆瓨鍊 */ + $db->query($db->update('table.options') + ->rows(array('value' => 0)) + ->where('name = ?', 'autoSave')); + + /** 澧炲姞鍫嗘ゼ妤煎眰鏁扮洰闄愬埗 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsMaxNestingLevels', 'user' => 0, 'value' => 5))); + } + + /** + * 鍗囩骇鑷9.6.16 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_6_16($db, $options) + { + /** 澧炲姞闄勪欢handle */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'modifyHandle', 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:12:"modifyHandle";}'))); + + /** 澧炲姞闄勪欢handle */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'attachmentDataHandle', 'value' => 'a:2:{i:0;s:13:"Widget_Upload";i:1;s:20:"attachmentDataHandle";}'))); + + /** 杞崲闄勪欢 */ + $i = 1; + + while (true) { + $result = $db->query($db->select('cid', 'text')->from('table.contents') + ->where('type = ?', 'attachment') + ->order('cid', Typecho_Db::SORT_ASC)->page($i, 100)); + $j = 0; + + while ($row = $db->fetchRow($result)) { + $attachment = unserialize($row['text']); + $attachment['modifyHandle'] = array('Widget_Upload', 'modifyHandle'); + $attachment['attachmentDataHandle'] = array('Widget_Upload', 'attachmentDataHandle'); + + $db->query($db->update('table.contents') + ->rows(array('text' => serialize($attachment))) + ->where('cid = ?', $row['cid'])); + + $j ++; + unset($text); + unset($row); + } + + if ($j < 100) { + break; + } + + $i ++; + unset($result); + } + } + + /** + * 鍗囩骇鑷9.6.16.1 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_6_16_1($db, $options) + { + //淇敼action璺敱 + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $routingTable['do'] = array ( + 'url' => '/action/[action:alpha]', + 'widget' => 'Widget_Do', + 'action' => 'action' + ); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + + //骞叉帀鍨冨溇鏁版嵁 + $db->query($db->update('table.options') + ->rows(array('value' => 'a:0:{}')) + ->where('name = ?', 'actionTable')); + } + + /** + * 鍗囩骇鑷9.7.2 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_7_2($db, $options) + { + /** 澧炲姞榛樿鍐呭鏍煎紡 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'contentType', 'user' => 0, 'value' => 'text/html'))); + + /** 澧炲姞gzip寮鍏 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'gzip', 'user' => 0, 'value' => 0))); + + + if(is_writeable(__TYPECHO_ROOT_DIR__ . '/config.inc.php')) { + + $contents = file_get_contents(__TYPECHO_ROOT_DIR__ . '/config.inc.php'); + $contents = preg_replace("/Typecho_Common::init([^;]+);/is", "Typecho_Common::init(array( + 'autoLoad' => true, + 'exception' => 'Widget_ExceptionHandle', + 'gpc' => true +));", $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Widget::widget([^;]+);/is", '', $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Router::setRoutes([^;]+);/is", '', $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Plugin::init([^;]+);/is", '', $contents); + $contents = preg_replace("/\s*(\/[^\/]+\/)?\s*Typecho_Date::setTimezoneOffset([^;]+);/is", '', $contents); + file_put_contents(__TYPECHO_ROOT_DIR__ . '/config.inc.php', $contents); + + } else { + /** 鍗囩骇鎻愮ず */ + return _t('寤鸿鎮ㄥ湪鍗囩骇鍒 Typecho 0.7/9.7.2 浠ュ悗鐨勭増鏈悗, 绔嬪埢鎵ц浠ヤ笅浼樺寲姝ラ'); + } + } + + /** + * 鍗囩骇鑷9.9.2 + * 淇敼contents琛ㄧ殑text瀛楁绫诲瀷涓簂ongtext(浠呴檺mysql, pgsql鍜宻qlite閮芥槸涓嶉檺鍒堕暱搴︾殑) + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_2($db, $options) + { + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + if (false !== strpos($adapterName, 'Mysql')) { + $db->query("ALTER TABLE `{$prefix}contents` CHANGE `text` `text` LONGTEXT NULL DEFAULT NULL COMMENT '鍐呭鏂囧瓧'", Typecho_Db::WRITE); + } + } + + /** + * 鍗囩骇鑷9.9.15 + * 浼樺寲璺敱琛ㄧ粨鏋 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_15($db, $options) + { + /** 澧炲姞璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $do = $routingTable['do']; + unset($routingTable['do']); + + $pre = array_slice($routingTable, 0, 1); + $next = array_slice($routingTable, 1); + + $routingTable = array_merge($pre, array('do' => $do), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.9.22 + * 姝ゅ崌绾х敤浜庝慨澶嶄粠0.6鍗囩骇鏃舵崯鍧忕殑璺敱琛 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_22($db, $options) + { + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $routingTable['do'] = array ( + 'url' => '/action/[action:alpha]', + 'widget' => 'Widget_Do', + 'action' => 'action' + ); + + $do = $routingTable['do']; + unset($routingTable['do']); + + $pre = array_slice($routingTable, 0, 1); + $next = array_slice($routingTable, 1); + + $routingTable = array_merge($pre, array('do' => $do), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.9.27 + * 澧炲姞鎸変綔鑰呭綊妗 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_9_27($db, $options) + { + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pre = array_slice($routingTable, 0, 6); + $next = array_slice($routingTable, 6); + $next_pre = array_slice($next, 0, 5); + $next_next = array_slice($next, 5); + + $author = array ( + 'url' => '/author/[uid:digital]/', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $author_page = array ( + 'url' => '/author/[uid:digital]/[page:digital]/', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $routingTable = array_merge($pre, array('author' => $author), $next_pre, + array('author_page' => $author_page), $next_next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.10.16 + * 澧炲姞璇勮鍒嗛〉 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_10_16($db, $options) + { + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $pre = array_slice($routingTable, 0, 20); + $next = array_slice($routingTable, 20); + + $commentPage = array ( + 'url' => '[permalink:string]/[commentType:alpha]-page-[commentPage:digital]', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $routingTable = array_merge($pre, array('comment_page' => $commentPage), $next); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.10.16 + * 澧炲姞璇勮鍒嗛〉 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_10_20($db, $options) + { + /** 淇敼鏁版嵁搴撳瓧娈 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query('ALTER TABLE `' . $prefix . 'contents` ADD `parent` INT(10) UNSIGNED NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'contents" ADD COLUMN "parent" INT NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'contents_tmp ( "cid" INTEGER NOT NULL PRIMARY KEY, +"title" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"created" int(10) default \'0\' , +"modified" int(10) default \'0\' , +"text" text , +"order" int(10) default \'0\' , +"authorId" int(10) default \'0\' , +"template" varchar(32) default NULL , +"type" varchar(16) default \'post\' , +"status" varchar(16) default \'publish\' , +"password" varchar(32) default NULL , +"commentsNum" int(10) default \'0\' , +"allowComment" char(1) default \'0\' , +"allowPing" char(1) default \'0\' , +"allowFeed" char(1) default \'0\' , +"parent" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents_tmp ("cid", "title", "slug", "created", "modified" + , "text", "order", "authorId", "template", "type", "status", "password", "commentsNum", "allowComment", + "allowPing", "allowFeed", "parent") SELECT "cid", "title", "slug", "created", "modified" + , "text", "order", "authorId", "template", "type", "status", "password", "commentsNum", "allowComment", + "allowPing", "allowFeed", "parent" FROM ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'contents ( "cid" INTEGER NOT NULL PRIMARY KEY, +"title" varchar(200) default NULL , +"slug" varchar(200) default NULL , +"created" int(10) default \'0\' , +"modified" int(10) default \'0\' , +"text" text , +"order" int(10) default \'0\' , +"authorId" int(10) default \'0\' , +"template" varchar(32) default NULL , +"type" varchar(16) default \'post\' , +"status" varchar(16) default \'publish\' , +"password" varchar(32) default NULL , +"commentsNum" int(10) default \'0\' , +"allowComment" char(1) default \'0\' , +"allowPing" char(1) default \'0\' , +"allowFeed" char(1) default \'0\' , +"parent" int(10) default \'0\' )', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'contents SELECT * FROM ' . $prefix . 'contents_tmp', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'contents_tmp', Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'contents_slug ON ' . $prefix . 'contents ("slug")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'contents_created ON ' . $prefix . 'contents ("created")', Typecho_Db::WRITE); + + break; + + default: + break; + } + + $db->query($db->update('table.contents')->expression('parent', 'order') + ->where('type = ?', 'attachment')); + + $db->query($db->update('table.contents')->rows(array('order' => 0)) + ->where('type = ?', 'attachment')); + } + + /** + * 鍗囩骇鑷9.10.31 + * 淇闄勪欢 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_7r9_10_31($db, $options) + { + $db->query($db->update('table.contents')->rows(array('status' => 'publish')) + ->where('type = ?', 'attachment')); + } + + /** + * 鍗囩骇鑷9.11.25 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r9_11_25($db, $options) + { + /** 澧炲姞鑻ュ共閫夐」 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPageBreak', 'user' => 0, 'value' => 0))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsThreaded', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPageSize', 'user' => 0, 'value' => 20))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPageDisplay', 'user' => 0, 'value' => 'last'))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsOrder', 'user' => 0, 'value' => 'ASC'))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsCheckReferer', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAutoClose', 'user' => 0, 'value' => 0))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPostIntervalEnable', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsPostInterval', 'user' => 0, 'value' => 60))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsShowCommentOnly', 'user' => 0, 'value' => 0))); + + /** 淇敼璺敱 */ + $routingTable = $options->routingTable; + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + if (isset($routingTable['comment_page'])) { + $routingTable['comment_page'] = array ( + 'url' => '[permalink:string]/comment-page-[commentPage:digital]', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + } else { + $pre = array_slice($routingTable, 0, 20); + $next = array_slice($routingTable, 20); + + $commentPage = array ( + 'url' => '[permalink:string]/comment-page-[commentPage:digital]', + 'widget' => 'Widget_Archive', + 'action' => 'render', + ); + + $routingTable = array_merge($pre, array('comment_page' => $commentPage), $next); + } + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($routingTable))) + ->where('name = ?', 'routingTable')); + } + + /** + * 鍗囩骇鑷9.12.11 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r9_12_11($db, $options) + { + /** 鍒犻櫎鏃犵敤閫夐」 */ + $db->query($db->delete('table.options') + ->where('name = ? OR name = ? OR name = ? OR name = ? OR name = ? OR name = ? OR name = ?', 'customHomePage', 'uploadHandle', + 'deleteHandle', 'modifyHandle', 'attachmentHandle', 'attachmentDataHandle', 'gzip')); + + // 澧炲姞鑷畾涔夐椤 + $db->query($db->insert('table.options') + ->rows(array('name' => 'frontPage', 'user' => 0, 'value' => 'recent'))); + } + + /** + * 鍗囩骇鑷10.2.27 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r10_2_27($db, $options) + { + /** 澧炲姞鑻ュ共閫夐」 */ + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAvatar', 'user' => 0, 'value' => 1))); + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAvatarRating', 'user' => 0, 'value' => 'G'))); + + //鏇存柊鎵╁睍 + if (NULL != $options->attachmentTypes) { + $attachmentTypes = array_map('trim', explode(';', $options->attachmentTypes)); + $attachmentTypesResult = array(); + + foreach ($attachmentTypes as $type) { + $type = trim($type, '*.'); + if (!empty($type)) { + $attachmentTypesResult[] = $type; + } + } + + if (!empty($attachmentTypesResult)) { + $db->query($db->update('table.options') + ->rows(array('value' => implode(',', $attachmentTypesResult))) + ->where('name = ?', 'attachmentTypes')); + } + } + } + + /** + * 鍗囩骇鑷10.3.8 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r10_3_8($db, $options) + { + /** 鍒犻櫎鏃犵敤閫夐」 */ + $db->query($db->delete('table.options') + ->where('name = ?', 'commentsAvatarSize')); + } + + /** + * 鍗囩骇鑷10.5.17 + * + * @access public + * @param Typecho_Db $db 鏁版嵁搴撳璞 + * @param Typecho_Widget $options 鍏ㄥ眬淇℃伅缁勪欢 + * @return void + */ + public static function v0_8r10_5_17($db, $options) + { + Typecho_Widget::widget('Widget_Themes_Edit', NULL, 'change=' . $options->theme, false)->action(); + } + + + /** + * 鍗囩骇鑷13.10.18 + * + * @param mixed $db + * @param mixed $options + * @static + * @access public + * @return void + */ + public static function v0_9r13_10_18($db, $options) + { + // 澧炲姞markdown + $db->query($db->insert('table.options') + ->rows(array('name' => 'markdown', 'user' => 0, 'value' => 0))); + + // 鏇存柊鍘熸潵琚悶涔辩殑鑽夌ǹ + $db->query($db->update('table.contents') + ->rows(array( + 'type' => 'post_draft', + 'status' => 'publish' + )) + ->where('type = ? AND status = ?', 'post', 'draft')); + + $db->query($db->update('table.contents') + ->rows(array( + 'type' => 'page_draft', + 'status' => 'publish' + )) + ->where('type = ? AND status = ?', 'page', 'draft')); + } + + /** + * v0_9r13_11_17 + * + * @param mixed $db + * @param mixed $options + * @static + * @access public + * @return void + */ + public static function v0_9r13_11_17($db, $options) + { + Helper::addRoute('archive', '/blog/', 'Widget_Archive', 'render', 'index'); + Helper::addRoute('archive_page', '/blog/[page:digital]/', 'Widget_Archive', 'render', 'index_page'); + $db->query($db->insert('table.options') + ->rows(array('name' => 'frontArchive', 'user' => 0, 'value' => 0))); + } + + /** + * v0_9r13_11_24 + * + * @param mixed $db + * @param mixed $options + * @static + * @access public + * @return void + */ + public static function v0_9r13_11_24($db, $options) + { + /* 澧炲姞鏁版嵁琛 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $config = $db->getConfig(); + $db->query("CREATE TABLE `{$prefix}fields` ( + `cid` int(10) unsigned NOT NULL, + `name` varchar(200) NOT NULL, + `type` varchar(8) default 'str', + `str_value` text, + `int_value` int(10) default '0', + `float_value` float default '0', + PRIMARY KEY (`cid`,`name`), + KEY `int_value` (`int_value`), + KEY `float_value` (`float_value`) +) ENGINE=MyISAM DEFAULT CHARSET=" . $config[0]->charset, Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('CREATE TABLE "' . $prefix . 'fields" ("cid" INT NOT NULL, + "name" VARCHAR(200) NOT NULL, + "type" VARCHAR(8) NULL DEFAULT \'str\', + "str_value" TEXT NULL DEFAULT NULL, + "int_value" INT NULL DEFAULT \'0\', + "float_value" REAL NULL DEFAULT \'0\', + PRIMARY KEY ("cid","name") +)', Typecho_Db::WRITE); + $db->query('CREATE INDEX "' . $prefix . 'fields_int_value" ON "' . $prefix . 'fields" ("int_value")', Typecho_Db::WRITE); + $db->query('CREATE INDEX "' . $prefix . 'fields_float_value" ON "' . $prefix . 'fields" ("float_value")', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $db->query('CREATE TABLE "' . $prefix . 'fields" ("cid" INTEGER NOT NULL, + "name" varchar(200) NOT NULL, + "type" varchar(8) default \'str\', + "str_value" text, + "int_value" int(10) default \'0\', + "float_value" real default \'0\' +)', Typecho_Db::WRITE); + $db->query('CREATE UNIQUE INDEX ' . $prefix . 'fields_cid_name ON ' . $prefix . 'fields ("cid", "name")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'fields_int_value ON ' . $prefix . 'fields ("int_value")', Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'fields_float_value ON ' . $prefix . 'fields ("float_value")', Typecho_Db::WRITE); + + break; + + default: + break; + } + + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsMarkdown', 'user' => 0, 'value' => 0))); + } + + /** + * v0_9r13_11_24 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r13_12_6($db, $options) + { + $frontArchive = $db->fetchRow($db->select()->from('table.options')->where('name = ?', 'frontArchive')); + if (empty($frontArchive)) { + $db->query($db->insert('table.options') + ->rows(array('name' => 'frontArchive', 'user' => 0, 'value' => 0))); + } + } + + /** + * v0_9r13_12_20 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r13_12_20($db, $options) + { + $commentsWhitelist = $db->fetchRow($db->select()->from('table.options')->where('name = ?', 'commentsWhitelist')); + if (empty($commentsWhitelist)) { + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsWhitelist', 'user' => 0, 'value' => 0))); + } + } + + /** + * v0_9r14_2_24 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r14_2_24($db, $options) + { + /** 淇敼鏁版嵁搴撳瓧娈 */ + $adapterName = $db->getAdapterName(); + $prefix = $db->getPrefix(); + + switch (true) { + case false !== strpos($adapterName, 'Mysql'): + $db->query('ALTER TABLE `' . $prefix . 'metas` ADD `parent` INT(10) UNSIGNED NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'Pgsql'): + $db->query('ALTER TABLE "' . $prefix . 'metas" ADD COLUMN "parent" INT NULL DEFAULT \'0\'', Typecho_Db::WRITE); + break; + + case false !== strpos($adapterName, 'SQLite'): + $uuid = uniqid(); + $db->query('CREATE TABLE ' . $prefix . 'metas' . $uuid . ' ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' , + "parent" int(10) default \'0\')', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas' . $uuid . ' ("mid", "name", "slug", "type", "description", "count", "order") + SELECT "mid", "name", "slug", "type", "description", "count", "order" FROM ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas', Typecho_Db::WRITE); + $db->query('CREATE TABLE ' . $prefix . 'metas ( "mid" INTEGER NOT NULL PRIMARY KEY, + "name" varchar(200) default NULL , + "slug" varchar(200) default NULL , + "type" varchar(32) NOT NULL , + "description" varchar(200) default NULL , + "count" int(10) default \'0\' , + "order" int(10) default \'0\' , + "parent" int(10) default \'0\')', Typecho_Db::WRITE); + $db->query('INSERT INTO ' . $prefix . 'metas SELECT * FROM ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('DROP TABLE ' . $prefix . 'metas' . $uuid, Typecho_Db::WRITE); + $db->query('CREATE INDEX ' . $prefix . 'metas_slug ON ' . $prefix . 'metas ("slug")', Typecho_Db::WRITE); + + break; + + default: + break; + } + } + + /** + * v0_9r14_3_14 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v0_9r14_3_14($db, $options) + { + $db->query($db->insert('table.options') + ->rows(array('name' => 'secret', 'user' => 0, 'value' => Typecho_Common::randString(32, true)))); + } + + /** + * v1_0r14_9_2 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v1_0r14_9_2($db, $options) + { + $db->query($db->insert('table.options') + ->rows(array('name' => 'lang', 'user' => 0, 'value' => 'zh_CN'))); + } + + /** + * v1_0r14_10_10 + * + * @param mixed $db + * @param mixed $options + * @access public + * @return void + */ + public function v1_0r14_10_10($db, $options) + { + $db->query($db->insert('table.options') + ->rows(array('name' => 'commentsAntiSpam', 'user' => 0, 'value' => 1))); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract.php" new file mode 100644 index 0000000..103387e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract.php" @@ -0,0 +1,119 @@ +db = Typecho_Db::get(); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->options = $this->widget('Widget_Options'); + $this->user = $this->widget('Widget_User'); + $this->security = $this->widget('Widget_Security'); + } + + /** + * 鏌ヨ鏂规硶 + * + * @access public + * @return Typecho_Db_Query + */ + abstract public function select(); + + /** + * 鑾峰緱鎵鏈夎褰曟暟 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + abstract public function size(Typecho_Db_Query $condition); + + /** + * 澧炲姞璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @return integer + */ + abstract public function insert(array $rows); + + /** + * 鏇存柊璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + abstract public function update(array $rows, Typecho_Db_Query $condition); + + /** + * 鍒犻櫎璁板綍鏂规硶 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + abstract public function delete(Typecho_Db_Query $condition); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Comments.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Comments.php" new file mode 100644 index 0000000..e98b697 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Comments.php" @@ -0,0 +1,459 @@ +db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.cid = ?', $this->cid) + ->limit(1), array($this->widget('Widget_Abstract_Contents'), 'filter')); + } + + /** + * 鑾峰彇褰撳墠璇勮鏍囬 + * + * @access protected + * @return string + */ + protected function ___title() + { + return $this->parentContent['title']; + } + + /** + * 鑾峰彇褰撳墠璇勮閾炬帴 + * + * @access protected + * @return string + */ + protected function ___permalink() + { + + if ($this->options->commentsPageBreak && 'approved' == $this->status) { + + $coid = $this->coid; + $parent = $this->parent; + + while ($parent > 0 && $this->options->commentsThreaded) { + $parentRows = $this->db->fetchRow($this->db->select('parent')->from('table.comments') + ->where('coid = ? AND status = ?', $parent, 'approved')->limit(1)); + + if (!empty($parentRows)) { + $coid = $parent; + $parent = $parentRows['parent']; + } else { + break; + } + } + + $select = $this->db->select('coid', 'parent') + ->from('table.comments')->where('cid = ? AND status = ?', $this->parentContent['cid'], 'approved') + ->where('coid ' . ('DESC' == $this->options->commentsOrder ? '>=' : '<=') . ' ?', $coid) + ->order('coid', Typecho_Db::SORT_ASC); + + if ($this->options->commentsShowCommentOnly) { + $select->where('type = ?', 'comment'); + } + + $comments = $this->db->fetchAll($select); + + $commentsMap = array(); + $total = 0; + + foreach ($comments as $comment) { + $commentsMap[$comment['coid']] = $comment['parent']; + + if (0 == $comment['parent'] || !isset($commentsMap[$comment['parent']])) { + $total ++; + } + } + + $currentPage = ceil($total / $this->options->commentsPageSize); + + $pageRow = array('permalink' => $this->parentContent['pathinfo'], 'commentPage' => $currentPage); + return Typecho_Router::url('comment_page', + $pageRow, $this->options->index) . '#' . $this->theId; + } + + return $this->parentContent['permalink'] . '#' . $this->theId; + } + + /** + * 鑾峰彇褰撳墠璇勮鍐呭 + * + * @access protected + * @return string + */ + protected function ___content() + { + $text = $this->parentContent['hidden'] ? _t('鍐呭琚殣钘') : $this->text; + + $text = $this->pluginHandle(__CLASS__)->trigger($plugged)->content($text, $this); + if (!$plugged) { + $text = $this->options->commentsMarkdown ? $this->markdown($text) + : $this->autoP($text); + } + + $text = $this->pluginHandle(__CLASS__)->contentEx($text, $this); + return Typecho_Common::stripTags($text, '


      ' . $this->options->commentsHTMLTagAllowed); + } + + /** + * 杈撳嚭璇嶄箟鍖栨棩鏈 + * + * @access protected + * @return string + */ + protected function ___dateWord() + { + return $this->date->word(); + } + + /** + * 閿氱偣id + * + * @access protected + * @return string + */ + protected function ___theId() + { + return $this->type . '-' . $this->coid; + } + + /** + * 鑾峰彇鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select('table.comments.coid', 'table.comments.cid', 'table.comments.author', 'table.comments.mail', 'table.comments.url', 'table.comments.ip', + 'table.comments.authorId', 'table.comments.ownerId', 'table.comments.agent', 'table.comments.text', 'table.comments.type', 'table.comments.status', 'table.comments.parent', 'table.comments.created') + ->from('table.comments'); + } + + /** + * 澧炲姞璇勮 + * + * @access public + * @param array $comment 璇勮缁撴瀯鏁扮粍 + * @return integer + */ + public function insert(array $comment) + { + /** 鏋勫缓鎻掑叆缁撴瀯 */ + $insertStruct = array( + 'cid' => $comment['cid'], + 'created' => empty($comment['created']) ? $this->options->gmtTime : $comment['created'], + 'author' => empty($comment['author']) ? NULL : $comment['author'], + 'authorId' => empty($comment['authorId']) ? 0 : $comment['authorId'], + 'ownerId' => empty($comment['ownerId']) ? 0 : $comment['ownerId'], + 'mail' => empty($comment['mail']) ? NULL : $comment['mail'], + 'url' => empty($comment['url']) ? NULL : $comment['url'], + 'ip' => empty($comment['ip']) ? $this->request->getIp() : $comment['ip'], + 'agent' => empty($comment['agent']) ? $_SERVER["HTTP_USER_AGENT"] : $comment['agent'], + 'text' => empty($comment['text']) ? NULL : $comment['text'], + 'type' => empty($comment['type']) ? 'comment' : $comment['type'], + 'status' => empty($comment['status']) ? 'approved' : $comment['status'], + 'parent' => empty($comment['parent']) ? 0 : $comment['parent'], + ); + + if (!empty($comment['coid'])) { + $insertStruct['coid'] = $comment['coid']; + } + + /** 棣栧厛鎻掑叆閮ㄥ垎鏁版嵁 */ + $insertId = $this->db->query($this->db->insert('table.comments')->rows($insertStruct)); + + /** 鏇存柊璇勮鏁 */ + $num = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num'))->from('table.comments') + ->where('status = ? AND cid = ?', 'approved', $comment['cid']))->num; + + $this->db->query($this->db->update('table.contents')->rows(array('commentsNum' => $num)) + ->where('cid = ?', $comment['cid'])); + + return $insertId; + } + + /** + * 鏇存柊璇勮 + * + * @access public + * @param array $comment 璇勮缁撴瀯鏁扮粍 + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function update(array $comment, Typecho_Db_Query $condition) + { + /** 鑾峰彇鍐呭涓婚敭 */ + $updateCondition = clone $condition; + $updateComment = $this->db->fetchObject($condition->select('cid')->from('table.comments')->limit(1)); + + if ($updateComment) { + $cid = $updateComment->cid; + } else { + return false; + } + + /** 鏋勫缓鎻掑叆缁撴瀯 */ + $preUpdateStruct = array( + 'author' => empty($comment['author']) ? NULL : $comment['author'], + 'mail' => empty($comment['mail']) ? NULL : $comment['mail'], + 'url' => empty($comment['url']) ? NULL : $comment['url'], + 'text' => empty($comment['text']) ? NULL : $comment['text'], + 'status' => empty($comment['status']) ? 'approved' : $comment['status'], + ); + + $updateStruct = array(); + foreach ($comment as $key => $val) { + if ((array_key_exists($key, $preUpdateStruct))) { + $updateStruct[$key] = $preUpdateStruct[$key]; + } + } + + /** 鏇存柊鍒涘缓鏃堕棿 */ + if (!empty($comment['created'])) { + $updateStruct['created'] = $comment['created']; + } + + /** 鏇存柊璇勮鏁版嵁 */ + $updateRows = $this->db->query($updateCondition->update('table.comments')->rows($updateStruct)); + + /** 鏇存柊璇勮鏁 */ + $num = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num'))->from('table.comments') + ->where('status = ? AND cid = ?', 'approved', $cid))->num; + + $this->db->query($this->db->update('table.contents')->rows(array('commentsNum' => $num)) + ->where('cid = ?', $cid)); + + return $updateRows; + } + + /** + * 鍒犻櫎鏁版嵁 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + /** 鑾峰彇鍐呭涓婚敭 */ + $deleteCondition = clone $condition; + $deleteComment = $this->db->fetchObject($condition->select('cid')->from('table.comments')->limit(1)); + + if ($deleteComment) { + $cid = $deleteComment->cid; + } else { + return false; + } + + /** 鍒犻櫎璇勮鏁版嵁 */ + $deleteRows = $this->db->query($deleteCondition->delete('table.comments')); + + /** 鏇存柊璇勮鏁 */ + $num = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num'))->from('table.comments') + ->where('status = ? AND cid = ?', 'approved', $cid))->num; + + $this->db->query($this->db->update('table.contents')->rows(array('commentsNum' => $num)) + ->where('cid = ?', $cid)); + + return $deleteRows; + } + + /** + * 璇勮鏄惁鍙互琚慨鏀 + * + * @access public + * @param Typecho_Db_Query $condition 鏉′欢 + * @return mixed + */ + public function commentIsWriteable(Typecho_Db_Query $condition = NULL) + { + if (empty($condition)) { + if ($this->have() && ($this->user->pass('editor', true) || $this->ownerId == $this->user->uid)) { + return true; + } + } else { + $post = $this->db->fetchRow($condition->select('ownerId')->from('table.comments')->limit(1)); + + if ($post && ($this->user->pass('editor', true) || $post['ownerId'] == $this->user->uid)) { + return true; + } + } + + return false; + } + + /** + * 鎸夌収鏉′欢璁$畻璇勮鏁伴噺 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(coid)' => 'num'))->from('table.comments'))->num; + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + */ + public function filter(array $value) + { + $value['date'] = new Typecho_Date($value['created']); + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 杈撳嚭鏂囩珷鍙戝竷鏃ユ湡 + * + * @access public + * @param string $format 鏃ユ湡鏍煎紡 + * @return void + */ + public function date($format = NULL) + { + echo $this->date->format(empty($format) ? $this->options->commentDateFormat : $format); + } + + /** + * 杈撳嚭浣滆呯浉鍏 + * + * @access public + * @param boolean $autoLink 鏄惁鑷姩鍔犱笂閾炬帴 + * @param boolean $noFollow 鏄惁鍔犱笂nofollow鏍囩 + * @return void + */ + public function author($autoLink = NULL, $noFollow = NULL) + { + $autoLink = (NULL === $autoLink) ? $this->options->commentsShowUrl : $autoLink; + $noFollow = (NULL === $noFollow) ? $this->options->commentsUrlNofollow : $noFollow; + + if ($this->url && $autoLink) { + echo '' , $this->author , ''; + } else { + echo $this->author; + } + } + + /** + * 璋冪敤gravatar杈撳嚭鐢ㄦ埛澶村儚 + * + * @access public + * @param integer $size 澶村儚灏哄 + * @param string $default 榛樿杈撳嚭澶村儚 + * @return void + */ + public function gravatar($size = 32, $default = NULL) + { + if ($this->options->commentsAvatar && 'comment' == $this->type) { + $rating = $this->options->commentsAvatarRating; + + $this->pluginHandle(__CLASS__)->trigger($plugged)->gravatar($size, $rating, $default, $this); + if (!$plugged) { + $url = Typecho_Common::gravatarUrl($this->mail, $size, $rating, $default, $this->request->isSecure()); + echo '' .
+                $this->author . ''; + } + } + } + + /** + * 杈撳嚭璇勮鎽樿 + * + * @access public + * @param integer $length 鎽樿鎴彇闀垮害 + * @param string $trim 鎽樿鍚庣紑 + * @return void + */ + public function excerpt($length = 100, $trim = '...') + { + echo Typecho_Common::subStr(strip_tags($this->content), 0, $length, $trim); + } + + /** + * autoP + * + * @param mixed $text + * @access public + * @return void + */ + public function autoP($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->autoP($text); + + if (!$parsed) { + static $parser; + + if (empty($parser)) { + $parser = new AutoP(); + } + + $html = $parser->parse($text); + } + + return $html; + } + + /** + * markdown + * + * @param mixed $text + * @access public + * @return void + */ + public function markdown($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->markdown($text); + + if (!$parsed) { + $html = Markdown::convert($text); + } + + return $html; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Contents.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Contents.php" new file mode 100644 index 0000000..08e2412 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Contents.php" @@ -0,0 +1,968 @@ +db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $this->cid) + ->where('table.metas.type = ?', 'tag'), array($this->widget('Widget_Abstract_Metas'), 'filter')); + } + + /** + * 鏂囩珷浣滆 + * + * @access protected + * @return Typecho_Config + */ + protected function ___author() + { + return $this->widget('Widget_Users_Author@' . $this->cid, array('uid' => $this->authorId)); + } + + /** + * 鑾峰彇璇嶄箟鍖栨棩鏈 + * + * @access protected + * @return string + */ + protected function ___dateWord() + { + return $this->date->word(); + } + + /** + * 鑾峰彇鐖秈d + * + * @access protected + * @return string + */ + protected function ___parentId() + { + return $this->row['parent']; + } + + /** + * 瀵规枃绔犵殑绠鐭函鏂囨湰鎻忚堪 + * + * @access protected + * @return string + */ + protected function ___description() + { + $plainTxt = str_replace("\n", '', trim(strip_tags($this->excerpt))); + $plainTxt = $plainTxt ? $plainTxt : $this->title; + return Typecho_Common::subStr($plainTxt, 0, 100, '...'); + } + + /** + * ___fields + * + * @access protected + * @return Typecho_Config + */ + protected function ___fields() + { + $fields = array(); + $rows = $this->db->fetchAll($this->db->select()->from('table.fields') + ->where('cid = ?', $this->cid)); + + foreach ($rows as $row) { + $fields[$row['name']] = $row[$row['type'] . '_value']; + } + + return new Typecho_Config($fields); + } + + /** + * 鑾峰彇鏂囩珷鍐呭鎽樿 + * + * @access protected + * @return string + */ + protected function ___excerpt() + { + if ($this->hidden) { + return $this->text; + } + + $content = $this->pluginHandle(__CLASS__)->trigger($plugged)->excerpt($this->text, $this); + if (!$plugged) { + $content = $this->isMarkdown ? $this->markdown($content) + : $this->autoP($content); + } + + $contents = explode('', $content); + list($excerpt) = $contents; + + return Typecho_Common::fixHtml($this->pluginHandle(__CLASS__)->excerptEx($excerpt, $this)); + } + + /** + * 鑾峰彇鏂囩珷鍐呭 + * + * @access protected + * @return string + */ + protected function ___content() + { + if ($this->hidden) { + return $this->text; + } + + $content = $this->pluginHandle(__CLASS__)->trigger($plugged)->content($this->text, $this); + + if (!$plugged) { + $content = $this->isMarkdown ? $this->markdown($content) + : $this->autoP($content); + } + + return $this->pluginHandle(__CLASS__)->contentEx($content, $this); + } + + /** + * 杈撳嚭鏂囩珷鐨勭涓琛屼綔涓烘憳瑕 + * + * @return string + */ + protected function ___summary() + { + $content = $this->content; + $parts = preg_split("/(<\/\s*(?:p|blockquote|q|pre|table)\s*>)/i", $content, 2, PREG_SPLIT_DELIM_CAPTURE); + if (!empty($parts)) { + $content = $parts[0] . $parts[1]; + } + + return $content; + } + + /** + * 閿氱偣id + * + * @access protected + * @return string + */ + protected function ___theId() + { + return $this->type . '-' . $this->cid; + } + + /** + * 鍥炲妗唅d + * + * @access protected + * @return string + */ + protected function ___respondId() + { + return 'respond-' . $this->theId; + } + + /** + * 璇勮鍦板潃 + * + * @access protected + * @return string + */ + protected function ___commentUrl() + { + /** 鐢熸垚鍙嶉鍦板潃 */ + /** 璇勮 */ + return Typecho_Router::url('feedback', + array('type' => 'comment', 'permalink' => $this->pathinfo), $this->options->index); + } + + /** + * trackback鍦板潃 + * + * @access protected + * @return string + */ + protected function ___trackbackUrl() + { + return Typecho_Router::url('feedback', + array('type' => 'trackback', 'permalink' => $this->pathinfo), $this->options->index); + } + + /** + * 鍥炲鍦板潃 + * + * @access protected + * @return string + */ + protected function ___responseUrl() + { + return $this->permalink . '#' . $this->respondId; + } + + /** + * 鑾峰彇椤甸潰鍋忕Щ + * + * @access protected + * @param string $column 瀛楁鍚 + * @param integer $offset 鍋忕Щ鍊 + * @param string $type 绫诲瀷 + * @param string $status 鐘舵佸 + * @param integer $authorId 浣滆 + * @param integer $pageSize 鍒嗛〉鍊 + * @return integer + */ + protected function getPageOffset($column, $offset, $type, $status = NULL, $authorId = 0, $pageSize = 20) + { + $select = $this->db->select(array('COUNT(table.contents.cid)' => 'num'))->from('table.contents') + ->where("table.contents.{$column} > {$offset}") + ->where("table.contents.type = ?", $type); + + if (!empty($status)) { + $select->where("table.contents.status = ?", $status); + } + + if ($authorId > 0) { + $select->where('table.contents.authorId = ?', $authorId); + } + + $count = $this->db->fetchObject($select)->num + 1; + return ceil($count / $pageSize); + } + + /** + * 鑾峰彇鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select('table.contents.cid', 'table.contents.title', 'table.contents.slug', 'table.contents.created', 'table.contents.authorId', + 'table.contents.modified', 'table.contents.type', 'table.contents.status', 'table.contents.text', 'table.contents.commentsNum', 'table.contents.order', + 'table.contents.template', 'table.contents.password', 'table.contents.allowComment', 'table.contents.allowPing', 'table.contents.allowFeed', + 'table.contents.parent')->from('table.contents'); + } + + /** + * 鎻掑叆鍐呭 + * + * @access public + * @param array $content 鍐呭鏁扮粍 + * @return integer + */ + public function insert(array $content) + { + /** 鏋勫缓鎻掑叆缁撴瀯 */ + $insertStruct = array( + 'title' => empty($content['title']) ? NULL : htmlspecialchars($content['title']), + 'created' => empty($content['created']) ? $this->options->gmtTime : $content['created'], + 'modified' => $this->options->gmtTime, + 'text' => empty($content['text']) ? NULL : $content['text'], + 'order' => empty($content['order']) ? 0 : intval($content['order']), + 'authorId' => isset($content['authorId']) ? $content['authorId'] : $this->user->uid, + 'template' => empty($content['template']) ? NULL : $content['template'], + 'type' => empty($content['type']) ? 'post' : $content['type'], + 'status' => empty($content['status']) ? 'publish' : $content['status'], + 'password' => empty($content['password']) ? NULL : $content['password'], + 'commentsNum' => empty($content['commentsNum']) ? 0 : $content['commentsNum'], + 'allowComment' => !empty($content['allowComment']) && 1 == $content['allowComment'] ? 1 : 0, + 'allowPing' => !empty($content['allowPing']) && 1 == $content['allowPing'] ? 1 : 0, + 'allowFeed' => !empty($content['allowFeed']) && 1 == $content['allowFeed'] ? 1 : 0, + 'parent' => empty($content['parent']) ? 0 : intval($content['parent']) + ); + + if (!empty($content['cid'])) { + $insertStruct['cid'] = $content['cid']; + } + + /** 棣栧厛鎻掑叆閮ㄥ垎鏁版嵁 */ + $insertId = $this->db->query($this->db->insert('table.contents')->rows($insertStruct)); + + /** 鏇存柊缂╃暐鍚 */ + if ($insertId > 0) { + $this->applySlug(empty($content['slug']) ? NULL : $content['slug'], $insertId); + } + + return $insertId; + } + + /** + * 鏇存柊鍐呭 + * + * @access public + * @param array $content 鍐呭鏁扮粍 + * @param Typecho_Db_Query $condition 鏇存柊鏉′欢 + * @return integer + */ + public function update(array $content, Typecho_Db_Query $condition) + { + /** 棣栧厛楠岃瘉鍐欏叆鏉冮檺 */ + if (!$this->isWriteable(clone $condition)) { + return false; + } + + /** 鏋勫缓鏇存柊缁撴瀯 */ + $preUpdateStruct = array( + 'title' => empty($content['title']) ? NULL : htmlspecialchars($content['title']), + 'order' => empty($content['order']) ? 0 : intval($content['order']), + 'text' => empty($content['text']) ? NULL : $content['text'], + 'template' => empty($content['template']) ? NULL : $content['template'], + 'type' => empty($content['type']) ? 'post' : $content['type'], + 'status' => empty($content['status']) ? 'publish' : $content['status'], + 'password' => empty($content['password']) ? NULL : $content['password'], + 'allowComment' => !empty($content['allowComment']) && 1 == $content['allowComment'] ? 1 : 0, + 'allowPing' => !empty($content['allowPing']) && 1 == $content['allowPing'] ? 1 : 0, + 'allowFeed' => !empty($content['allowFeed']) && 1 == $content['allowFeed'] ? 1 : 0, + 'parent' => empty($content['parent']) ? 0 : intval($content['parent']) + ); + + $updateStruct = array(); + foreach ($content as $key => $val) { + if (array_key_exists($key, $preUpdateStruct)) { + $updateStruct[$key] = $preUpdateStruct[$key]; + } + } + + /** 鏇存柊鍒涘缓鏃堕棿 */ + if (!empty($content['created'])) { + $updateStruct['created'] = $content['created']; + } + + $updateStruct['modified'] = $this->options->gmtTime; + + /** 棣栧厛鎻掑叆閮ㄥ垎鏁版嵁 */ + $updateCondition = clone $condition; + $updateRows = $this->db->query($condition->update('table.contents')->rows($updateStruct)); + + /** 鏇存柊缂╃暐鍚 */ + if ($updateRows > 0 && isset($content['slug'])) { + $this->applySlug(empty($content['slug']) ? NULL : $content['slug'], $updateCondition); + } + + return $updateRows; + } + + /** + * 鍒犻櫎鍐呭 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.contents')); + } + + /** + * 涓哄唴瀹瑰簲鐢ㄧ缉鐣ュ悕 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @param mixed $cid 鍐呭id + * @return string + */ + public function applySlug($slug, $cid) + { + if ($cid instanceof Typecho_Db_Query) { + $cid = $this->db->fetchObject($cid->select('cid') + ->from('table.contents')->limit(1))->cid; + } + + /** 鐢熸垚涓涓潪绌虹殑缂╃暐鍚 */ + $slug = Typecho_Common::slugName($slug, $cid); + $result = $slug; + + /** 瀵硅崏绋跨殑slug鍋氱壒娈婂鐞 */ + $draft = $this->db->fetchObject($this->db->select('type', 'parent') + ->from('table.contents')->where('cid = ?', $cid)); + + if ('_draft' == substr($draft->type, -6) && $draft->parent) { + $result = '@' . $result; + } + + + /** 鍒ゆ柇鏄惁鍦ㄦ暟鎹簱涓凡缁忓瓨鍦 */ + $count = 1; + while ($this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents')->where('slug = ? AND cid <> ?', $result, $cid))->num > 0) { + $result = $slug . '-' . $count; + $count ++; + } + + $this->db->query($this->db->update('table.contents')->rows(array('slug' => $result)) + ->where('cid = ?', $cid)); + + return $result; + } + + /** + * 鍒犻櫎鑷畾涔夊瓧娈 + * + * @param integer $cid + * @access public + * @return integer + */ + public function deleteFields($cid) + { + return $this->db->query($this->db->delete('table.fields') + ->where('cid = ?', $cid)); + } + + /** + * 妫鏌ュ瓧娈靛悕鏄惁绗﹀悎瑕佹眰 + * + * @param string $name + * @access public + * @return boolean + */ + public function checkFieldName($name) + { + return preg_match("/^[_a-z][_a-z0-9]*$/i", $name); + } + + /** + * 淇濆瓨鑷畾涔夊瓧娈 + * + * @param array $fields + * @param mixed $cid + * @access public + * @return void + */ + public function applyFields(array $fields, $cid) + { + $exists = array_flip(Typecho_Common::arrayFlatten($this->db->fetchAll($this->db->select('name') + ->from('table.fields')->where('cid = ?', $cid)), 'name')); + + foreach ($fields as $name => $value) { + $type = 'str'; + + if (is_array($value) && 2 == count($value)) { + $type = $value[0]; + $value = $value[1]; + } else if (strpos($name, ':') > 0) { + list ($type, $name) = explode(':', $name, 2); + } + + if (!$this->checkFieldName($name)) { + continue; + } + + $isFieldReadOnly = $this->pluginHandle(__CLASS__)->trigger($plugged)->isFieldReadOnly($name); + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (isset($exists[$name])) { + unset($exists[$name]); + } + + $this->setField($name, $type, $value, $cid); + } + + foreach ($exists as $name => $value) { + $this->db->query($this->db->delete('table.fields') + ->where('cid = ? AND name = ?', $cid, $name)); + } + } + + /** + * 璁剧疆鍗曚釜瀛楁 + * + * @param string $name + * @param string $type + * @param string $value + * @param integer $cid + * @access public + * @return integer + */ + public function setField($name, $type, $value, $cid) + { + if (empty($name) || !$this->checkFieldName($name) + || !in_array($type, array('str', 'int', 'float'))) { + return false; + } + + $exist = $this->db->fetchRow($this->db->select('cid')->from('table.fields') + ->where('cid = ? AND name = ?', $cid, $name)); + + if (empty($exist)) { + return $this->db->query($this->db->insert('table.fields') + ->rows(array( + 'cid' => $cid, + 'name' => $name, + 'type' => $type, + 'str_value' => 'str' == $type ? $value : NULL, + 'int_value' => 'int' == $type ? intval($value) : 0, + 'float_value' => 'float' == $type ? floatval($value) : 0 + ))); + } else { + return $this->db->query($this->db->update('table.fields') + ->rows(array( + 'type' => $type, + 'str_value' => 'str' == $type ? $value : NULL, + 'int_value' => 'int' == $type ? intval($value) : 0, + 'float_value' => 'float' == $type ? floatval($value) : 0 + )) + ->where('cid = ? AND name = ?', $cid, $name)); + } + } + + /** + * 鑷涓涓暣褰㈠瓧娈 + * + * @param string $name + * @param integer $value + * @param integer $cid + * @access public + * @return integer + */ + public function incrIntField($name, $value, $cid) + { + if (!$this->checkFieldName($name)) { + return false; + } + + $exist = $this->db->fetchRow($this->db->select('type')->from('table.fields') + ->where('cid = ? AND name = ?', $cid, $name)); + $value = intval($value); + + if (empty($exist)) { + return $this->db->query($this->db->insert('table.fields') + ->rows(array( + 'cid' => $cid, + 'name' => $name, + 'type' => 'int', + 'str_value' => NULL, + 'int_value' => $value, + 'float_value' => 0 + ))); + } else { + $struct = array( + 'str_value' => NULL, + 'float_value' => NULL + ); + + if ('int' != $exist['type']) { + $struct['type'] = 'int'; + } + + return $this->db->query($this->db->update('table.fields') + ->rows($struct) + ->expression('int_value', 'int_value ' . ($value >= 0 ? '+' : '') . $value) + ->where('cid = ? AND name = ?', $cid, $name)); + } + } + + /** + * 鍐呭鏄惁鍙互琚慨鏀 + * + * @access public + * @param Typecho_Db_Query $condition 鏉′欢 + * @return mixed + */ + public function isWriteable(Typecho_Db_Query $condition) + { + $post = $this->db->fetchRow($condition->select('authorId')->from('table.contents')->limit(1)); + return $post && ($this->user->pass('editor', true) || $post['authorId'] == $this->user->uid); + } + + /** + * 鎸夌収鏉′欢璁$畻鍐呭鏁伴噺 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition + ->select(array('COUNT(DISTINCT table.contents.cid)' => 'num')) + ->from('table.contents') + ->cleanAttribute('group'))->num; + } + + /** + * 鑾峰彇褰撳墠鎵鏈夎嚜瀹氫箟妯℃澘 + * + * @access public + * @return array + */ + public function getTemplates() + { + $files = glob($this->options->themeFile($this->options->theme, '*.php')); + $result = array(); + + foreach ($files as $file) { + $info = Typecho_Plugin::parseInfo($file); + $file = basename($file); + + if ('index.php' != $file && 'custom' == $info['title']) { + $result[$file] = $info['description']; + } + } + + return $result; + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + * @throws Typecho_Widget_Exception + */ + public function filter(array $value) + { + /** 鍙栧嚭鎵鏈夊垎绫 */ + $value['categories'] = $this->db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $value['cid']) + ->where('table.metas.type = ?', 'category') + ->order('table.metas.order', Typecho_Db::SORT_ASC), array($this->widget('Widget_Metas_Category_List'), 'filter')); + $value['category'] = NULL; + $value['directory'] = array(); + + /** 鍙栧嚭绗竴涓垎绫讳綔涓簊lug鏉′欢 */ + if (!empty($value['categories'])) { + $value['category'] = $value['categories'][0]['slug']; + + $value['directory'] = $this->widget('Widget_Metas_Category_List')->getAllParents($value['categories'][0]['mid']); + $value['directory'][] = $value['category']; + } + + $value['date'] = new Typecho_Date($value['created']); + + /** 鐢熸垚鏃ユ湡 */ + $value['year'] = $value['date']->year; + $value['month'] = $value['date']->month; + $value['day'] = $value['date']->day; + + /** 鐢熸垚璁块棶鏉冮檺 */ + $value['hidden'] = false; + + /** 鑾峰彇璺敱绫诲瀷骞跺垽鏂绫诲瀷鍦ㄨ矾鐢辫〃涓槸鍚﹀瓨鍦 */ + $type = $value['type']; + $routeExists = (NULL != Typecho_Router::get($type)); + + $tmpSlug = $value['slug']; + $tmpCategory = $value['category']; + $tmpDirectory = $value['directory']; + $value['slug'] = urlencode($value['slug']); + $value['category'] = urlencode($value['category']); + $value['directory'] = implode('/', array_map('urlencode', $value['directory'])); + + /** 鐢熸垚闈欐佽矾寰 */ + $value['pathinfo'] = $routeExists ? Typecho_Router::url($type, $value) : '#'; + + /** 鐢熸垚闈欐侀摼鎺 */ + $value['permalink'] = Typecho_Common::url($value['pathinfo'], $this->options->index); + + /** 澶勭悊闄勪欢 */ + if ('attachment' == $type) { + $content = @unserialize($value['text']); + + //澧炲姞鏁版嵁淇℃伅 + $value['attachment'] = new Typecho_Config($content); + $value['attachment']->isImage = in_array($content['type'], array('jpg', 'jpeg', 'gif', 'png', 'tiff', 'bmp')); + $value['attachment']->url = Widget_Upload::attachmentHandle($value); + + if ($value['attachment']->isImage) { + $value['text'] = '' .
+                $value['title'] . ''; + } else { + $value['text'] = '' . $value['title'] . ''; + } + } + + /** 澶勭悊Markdown **/ + $value['isMarkdown'] = (0 === strpos($value['text'], '')); + if ($value['isMarkdown']) { + $value['text'] = substr($value['text'], 15); + } + + /** 鐢熸垚鑱氬悎閾炬帴 */ + /** RSS 2.0 */ + $value['feedUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedUrl) : '#'; + + /** RSS 1.0 */ + $value['feedRssUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedRssUrl) : '#'; + + /** ATOM 1.0 */ + $value['feedAtomUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedAtomUrl) : '#'; + + $value['slug'] = $tmpSlug; + $value['category'] = $tmpCategory; + $value['directory'] = $tmpDirectory; + + /** 澶勭悊瀵嗙爜淇濇姢娴佺▼ */ + if (!empty($value['password']) && + $value['password'] !== Typecho_Cookie::get('protectPassword') && + $value['authorId'] != $this->user->uid && + !$this->user->pass('editor', true)) { + $value['hidden'] = true; + + /** 鎶涘嚭閿欒 */ + if ($this->request->isPost() && isset($this->request->protectPassword)) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧,鎮ㄨ緭鍏ョ殑瀵嗙爜閿欒'), 403); + } + } + + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + + /** 濡傛灉璁块棶鏉冮檺琚姝 */ + if ($value['hidden']) { + $value['text'] = '

      ' . + '

      ' . _t('璇疯緭鍏ュ瘑鐮佽闂') . '

      ' . + '

      +

      ' . + '
      '; + + $value['title'] = _t('姝ゅ唴瀹硅瀵嗙爜淇濇姢'); + $value['tags'] = array(); + $value['commentsNum'] = 0; + } + + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 杈撳嚭鏂囩珷鍙戝竷鏃ユ湡 + * + * @access public + * @param string $format 鏃ユ湡鏍煎紡 + */ + public function date($format = NULL) + { + echo $this->date->format(empty($format) ? $this->options->postDateFormat : $format); + } + + /** + * 杈撳嚭鏂囩珷鍐呭 + * + * @access public + * @param mixed $more 鏂囩珷鎴彇鍚庣紑 + */ + public function content($more = false) + { + echo false !== $more && false !== strpos($this->text, '') ? + $this->excerpt . "

      permalink}\" title=\"{$this->title}\">{$more}

      " : $this->content; + } + + /** + * 杈撳嚭鏂囩珷鎽樿 + * + * @access public + * @param integer $length 鎽樿鎴彇闀垮害 + * @param string $trim 鎽樿鍚庣紑 + */ + public function excerpt($length = 100, $trim = '...') + { + echo Typecho_Common::subStr(strip_tags($this->excerpt), 0, $length, $trim); + } + + /** + * 杈撳嚭鏍囬 + * + * @access public + * @param integer $length 鏍囬鎴彇闀垮害 + * @param string $trim 鎴彇鍚庣紑 + */ + public function title($length = 0, $trim = '...') + { + $title = $this->pluginHandle()->trigger($plugged)->title($this->title, $this); + if (!$plugged) { + echo $length > 0 ? Typecho_Common::subStr($this->title, 0, $length, $trim) : $this->title; + } else { + echo $title; + } + } + + /** + * 杈撳嚭鏂囩珷璇勮鏁 + * + * @access public + */ + public function commentsNum() + { + $args = func_get_args(); + if (!$args) { + $args[] = '%d'; + } + + $num = intval($this->commentsNum); + + echo sprintf(isset($args[$num]) ? $args[$num] : array_pop($args), $num); + } + + /** + * 鑾峰彇鏂囩珷鏉冮檺 + * + * @access public + */ + public function allow() + { + $permissions = func_get_args(); + $allow = true; + + foreach ($permissions as $permission) { + $permission = strtolower($permission); + + if ('edit' == $permission) { + $allow &= ($this->user->pass('editor', true) || $this->authorId == $this->user->uid); + } else { + /** 瀵硅嚜鍔ㄥ叧闂弽棣堝姛鑳界殑鏀寔 */ + if (('ping' == $permission || 'comment' == $permission) && $this->options->commentsPostTimeout > 0 && + $this->options->commentsAutoClose) { + if ($this->options->gmtTime - $this->created > $this->options->commentsPostTimeout) { + return false; + } + } + + $allow &= ($this->row['allow' . ucfirst($permission)] == 1) and !$this->hidden; + } + } + + return $allow; + } + + /** + * 杈撳嚭鏂囩珷鍒嗙被 + * + * @access public + * @param string $split 澶氫釜鍒嗙被涔嬮棿鍒嗛殧绗 + * @param boolean $link 鏄惁杈撳嚭閾炬帴 + * @param string $default 濡傛灉娌℃湁鍒欒緭鍑 + * @return void + */ + public function category($split = ',', $link = true, $default = NULL) + { + $categories = $this->categories; + if ($categories) { + $result = array(); + + foreach ($categories as $category) { + $result[] = $link ? '' + . $category['name'] . '' : $category['name']; + } + + echo implode($split, $result); + } else { + echo $default; + } + } + + /** + * 杈撳嚭鏂囩珷鏍囩 + * + * @access public + * @param string $split 澶氫釜鏍囩涔嬮棿鍒嗛殧绗 + * @param boolean $link 鏄惁杈撳嚭閾炬帴 + * @param string $default 濡傛灉娌℃湁鍒欒緭鍑 + * @return void + */ + public function tags($split = ',', $link = true, $default = NULL) + { + /** 鍙栧嚭tags */ + if ($this->tags) { + $result = array(); + foreach ($this->tags as $tag) { + $result[] = $link ? '' + . $tag['name'] . '' : $tag['name']; + } + + echo implode($split, $result); + } else { + echo $default; + } + } + + /** + * 杈撳嚭褰撳墠浣滆 + * + * @access public + * @param string $item 闇瑕佽緭鍑虹殑椤圭洰 + * @return void + */ + public function author($item = 'screenName') + { + echo $this->author->{$item}; + } + + /** + * autoP + * + * @param mixed $text + * @access public + * @return void + */ + public function autoP($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->autoP($text); + + if (!$parsed) { + static $parser; + + if (empty($parser)) { + $parser = new AutoP(); + } + + $html = $parser->parse($text); + } + + return $html; + } + + /** + * markdown + * + * @param mixed $text + * @access public + * @return void + */ + public function markdown($text) + { + $html = $this->pluginHandle(__CLASS__)->trigger($parsed)->markdown($text); + + if (!$parsed) { + $html = Markdown::convert($text); + } + + return $html; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Metas.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Metas.php" new file mode 100644 index 0000000..08a9256 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Metas.php" @@ -0,0 +1,300 @@ +type . '-' . $this->mid; + } + + /** + * 鑾峰彇鍘熷鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select()->from('table.metas'); + } + + /** + * 鎻掑叆涓鏉¤褰 + * + * @access public + * @param array $options 璁板綍鎻掑叆鍊 + * @return integer + */ + public function insert(array $options) + { + return $this->db->query($this->db->insert('table.metas')->rows($options)); + } + + /** + * 鏇存柊璁板綍 + * + * @access public + * @param array $options 璁板綍鏇存柊鍊 + * @param Typecho_Db_Query $condition 鏇存柊鏉′欢 + * @return integer + */ + public function update(array $options, Typecho_Db_Query $condition) + { + return $this->db->query($condition->update('table.metas')->rows($options)); + } + + /** + * 鍒犻櫎璁板綍 + * + * @access public + * @param Typecho_Db_Query $condition 鍒犻櫎鏉′欢 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.metas')); + } + + /** + * 鑾峰彇璁板綍鎬绘暟 + * + * @access public + * @param Typecho_Db_Query $condition 璁$畻鏉′欢 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(mid)' => 'num'))->from('table.metas'))->num; + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + */ + public function filter(array $value) + { + //鐢熸垚闈欐侀摼鎺 + $type = $value['type']; + $routeExists = (NULL != Typecho_Router::get($type)); + $tmpSlug = $value['slug']; + $value['slug'] = urlencode($value['slug']); + + $value['permalink'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->index) : '#'; + + /** 鐢熸垚鑱氬悎閾炬帴 */ + /** RSS 2.0 */ + $value['feedUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedUrl) : '#'; + + /** RSS 1.0 */ + $value['feedRssUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedRssUrl) : '#'; + + /** ATOM 1.0 */ + $value['feedAtomUrl'] = $routeExists ? Typecho_Router::url($type, $value, $this->options->feedAtomUrl) : '#'; + + $value['slug'] = $tmpSlug; + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 鑾峰彇鏈澶ф帓搴 + * + * @param mixed $type + * @param int $parent + * @access public + * @return integer + */ + public function getMaxOrder($type, $parent = 0) + { + return $this->db->fetchObject($this->db->select(array('MAX(order)' => 'maxOrder')) + ->from('table.metas') + ->where('type = ? AND parent = ?', 'category', $parent))->maxOrder; + } + + /** + * 瀵规暟鎹寜鐓ort瀛楁鎺掑簭 + * + * @access public + * @param array $metas + * @param string $type + * @return void + */ + public function sort(array $metas, $type) + { + foreach ($metas as $sort => $mid) { + $this->update(array('order' => $sort + 1), + $this->db->sql()->where('mid = ?', $mid)->where('type = ?', $type)); + } + } + + /** + * 鍚堝苟鏁版嵁 + * + * @access public + * @param integer $mid 鏁版嵁涓婚敭 + * @param string $type 鏁版嵁绫诲瀷 + * @param array $metas 闇瑕佸悎骞剁殑鏁版嵁闆 + * @return void + */ + public function merge($mid, $type, array $metas) + { + $contents = Typecho_Common::arrayFlatten($this->db->fetchAll($this->select('cid') + ->from('table.relationships') + ->where('mid = ?', $mid)), 'cid'); + + foreach ($metas as $meta) { + if ($mid != $meta) { + $existsContents = Typecho_Common::arrayFlatten($this->db->fetchAll($this->db + ->select('cid')->from('table.relationships') + ->where('mid = ?', $meta)), 'cid'); + + $where = $this->db->sql()->where('mid = ? AND type = ?', $meta, $type); + $this->delete($where); + $diffContents = array_diff($existsContents, $contents); + $this->db->query($this->db->delete('table.relationships')->where('mid = ?', $meta)); + + foreach ($diffContents as $content) { + $this->db->query($this->db->insert('table.relationships') + ->rows(array('mid' => $mid, 'cid' => $content))); + $contents[] = $content; + } + + $this->update(array('parent' => $mid), $this->db->sql()->where('parent = ?', $meta)); + unset($existsContents); + } + } + + $num = $this->db->fetchObject($this->db + ->select(array('COUNT(mid)' => 'num'))->from('table.relationships') + ->where('table.relationships.mid = ?', $mid))->num; + + $this->update(array('count' => $num), $this->db->sql()->where('mid = ?', $mid)); + } + + /** + * 鏍规嵁tag鑾峰彇ID + * + * @access public + * @param mixed $inputTags 鏍囩鍚 + * @return array + */ + public function scanTags($inputTags) + { + $tags = is_array($inputTags) ? $inputTags : array($inputTags); + $result = array(); + + foreach ($tags as $tag) { + if (empty($tag)) { + continue; + } + + $row = $this->db->fetchRow($this->select() + ->where('type = ?', 'tag') + ->where('name = ?', $tag)->limit(1)); + + if ($row) { + $result[] = $row['mid']; + } else { + $slug = Typecho_Common::slugName($tag); + + if ($slug) { + $result[] = $this->insert(array( + 'name' => $tag, + 'slug' => $slug, + 'type' => 'tag', + 'count' => 0, + 'order' => 0, + )); + } + } + } + + return is_array($inputTags) ? $result : current($result); + } + + /** + * 娓呯悊娌℃湁浠讳綍鍐呭鐨勬爣绛 + * + * @access public + * @return void + */ + public function clearTags() + { + // 鍙栧嚭count涓0鐨勬爣绛 + $tags = Typecho_Common::arrayFlatten($this->db->fetchAll($this->db->select('mid') + ->from('table.metas')->where('type = ? AND count = ?', 'tags', 0)), 'mid'); + + foreach ($tags as $tag) { + // 纭鏄惁宸茬粡娌℃湁鍏宠仈浜 + $content = $this->db->fetchRow($this->db->select('cid') + ->from('table.relationships')->where('mid = ?', $tag) + ->limit(1)); + + if (empty($content)) { + $this->db->query($this->db->delete('table.metas') + ->where('mid = ?', $tag)); + } + } + } + + /** + * 鏍规嵁鍐呭鐨勬寚瀹氱被鍒拰鐘舵佹洿鏂扮浉鍏砿eta鐨勮鏁颁俊鎭 + * + * @access public + * @param int $mid meta id + * @param string $type 绫诲埆 + * @param string $status 鐘舵 + * @return void + */ + public function refreshCountByTypeAndStatus($mid, $type, $status = 'publish') + { + $num = $this->db->fetchObject($this->db->select(array('COUNT(table.contents.cid)' => 'num'))->from('table.contents') + ->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid = ?', $mid) + ->where('table.contents.type = ?', $type) + ->where('table.contents.status = ?', $status))->num; + + $this->db->query($this->db->update('table.metas')->rows(array('count' => $num)) + ->where('mid = ?', $mid)); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Options.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Options.php" new file mode 100644 index 0000000..1b8a799 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Options.php" @@ -0,0 +1,95 @@ +db->select()->from('table.options'); + } + + /** + * 鎻掑叆涓鏉¤褰 + * + * @access public + * @param array $options 璁板綍鎻掑叆鍊 + * @return integer + */ + public function insert(array $options) + { + return $this->db->query($this->db->insert('table.options')->rows($options)); + } + + /** + * 鏇存柊璁板綍 + * + * @access public + * @param array $options 璁板綍鏇存柊鍊 + * @param Typecho_Db_Query $condition 鏇存柊鏉′欢 + * @return integer + */ + public function update(array $options, Typecho_Db_Query $condition) + { + return $this->db->query($condition->update('table.options')->rows($options)); + } + + /** + * 鍒犻櫎璁板綍 + * + * @access public + * @param Typecho_Db_Query $condition 鍒犻櫎鏉′欢 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.options')); + } + + /** + * 鑾峰彇璁板綍鎬绘暟 + * + * @access public + * @param Typecho_Db_Query $condition 璁$畻鏉′欢 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(name)' => 'num'))->from('table.options'))->num; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Users.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Users.php" new file mode 100644 index 0000000..464c834 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Abstract/Users.php" @@ -0,0 +1,247 @@ +db->fetchAll($this->db->select() + ->from('table.options')->where('user = ?', $this->uid)); + $options = array(); + foreach ($rows as $row) { + $options[$row['name']] = $row['value']; + } + + return new Typecho_Config($options); + } + + /** + * 鍒ゆ柇鐢ㄦ埛鍚嶇О鏄惁瀛樺湪 + * + * @access public + * @param string $name 鐢ㄦ埛鍚嶇О + * @return boolean + */ + public function nameExists($name) + { + $select = $this->db->select() + ->from('table.users') + ->where('name = ?', $name) + ->limit(1); + + if ($this->request->uid) { + $select->where('uid <> ?', $this->request->uid); + } + + $user = $this->db->fetchRow($select); + return $user ? false : true; + } + + /** + * 鍒ゆ柇鐢靛瓙閭欢鏄惁瀛樺湪 + * + * @access public + * @param string $mail 鐢靛瓙閭欢 + * @return boolean + */ + public function mailExists($mail) + { + $select = $this->db->select() + ->from('table.users') + ->where('mail = ?', $mail) + ->limit(1); + + if ($this->request->uid) { + $select->where('uid <> ?', $this->request->uid); + } + + $user = $this->db->fetchRow($select); + return $user ? false : true; + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏄电О鏄惁瀛樺湪 + * + * @access public + * @param string $screenName 鏄电О + * @return boolean + */ + public function screenNameExists($screenName) + { + $select = $this->db->select() + ->from('table.users') + ->where('screenName = ?', $screenName) + ->limit(1); + + if ($this->request->uid) { + $select->where('uid <> ?', $this->request->uid); + } + + $user = $this->db->fetchRow($select); + return $user ? false : true; + } + + /** + * 鑾峰彇椤甸潰鍋忕Щ + * + * @access protected + * @param string $column 瀛楁鍚 + * @param integer $offset 鍋忕Щ鍊 + * @param string $group 鐢ㄦ埛缁 + * @param integer $pageSize 鍒嗛〉鍊 + * @return integer + */ + protected function getPageOffset($column, $offset, $group = NULL, $pageSize = 20) + { + $select = $this->db->select(array('COUNT(uid)' => 'num'))->from('table.users') + ->where("table.users.{$column} > {$offset}"); + + if (!empty($group)) { + $select->where('table.users.group = ?', $group); + } + + $count = $this->db->fetchObject($select)->num + 1; + return ceil($count / $pageSize); + } + + /** + * 閫氱敤杩囨护鍣 + * + * @access public + * @param array $value 闇瑕佽繃婊ょ殑琛屾暟鎹 + * @return array + */ + public function filter(array $value) + { + //鐢熸垚闈欐侀摼鎺 + $routeExists = (NULL != Typecho_Router::get('author')); + + $value['permalink'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->index) : '#'; + + /** 鐢熸垚鑱氬悎閾炬帴 */ + /** RSS 2.0 */ + $value['feedUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedUrl) : '#'; + + /** RSS 1.0 */ + $value['feedRssUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedRssUrl) : '#'; + + /** ATOM 1.0 */ + $value['feedAtomUrl'] = $routeExists ? Typecho_Router::url('author', $value, $this->options->feedAtomUrl) : '#'; + + $value = $this->pluginHandle(__CLASS__)->filter($value, $this); + return $value; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + return parent::push($value); + } + + /** + * 鏌ヨ鏂规硶 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select()->from('table.users'); + } + + /** + * 鑾峰緱鎵鏈夎褰曟暟 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function size(Typecho_Db_Query $condition) + { + return $this->db->fetchObject($condition->select(array('COUNT(uid)' => 'num'))->from('table.users'))->num; + } + + /** + * 澧炲姞璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @return integer + */ + public function insert(array $rows) + { + return $this->db->query($this->db->insert('table.users')->rows($rows)); + } + + /** + * 鏇存柊璁板綍鏂规硶 + * + * @access public + * @param array $rows 瀛楁瀵瑰簲鍊 + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function update(array $rows, Typecho_Db_Query $condition) + { + return $this->db->query($condition->update('table.users')->rows($rows)); + } + + /** + * 鍒犻櫎璁板綍鏂规硶 + * + * @access public + * @param Typecho_Db_Query $condition 鏌ヨ瀵硅薄 + * @return integer + */ + public function delete(Typecho_Db_Query $condition) + { + return $this->db->query($condition->delete('table.users')); + } + + /** + * 璋冪敤gravatar杈撳嚭鐢ㄦ埛澶村儚 + * + * @access public + * @param integer $size 澶村儚灏哄 + * @param string $rating 澶村儚璇勭骇 + * @param string $default 榛樿杈撳嚭澶村儚 + * @param string $class 榛樿css class + * @return void + */ + public function gravatar($size = 40, $rating = 'X', $default = NULL, $class = NULL) + { + $url = Typecho_Common::gravatarUrl($this->mail, $size, $rating, $default, $this->request->isSecure()); + echo ''; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Ajax.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Ajax.php" new file mode 100644 index 0000000..4775c61 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Ajax.php" @@ -0,0 +1,162 @@ +options->generator == $this->request->getAgent()) { + echo 'OK'; + } + } + + /** + * 鑾峰彇鏈鏂扮増鏈 + * + * @throws Typecho_Widget_Exception + */ + public function checkVersion() + { + $this->user->pass('editor'); + $client = Typecho_Http_Client::get(); + if ($client) { + $client->setHeader('User-Agent', $this->options->generator) + ->setTimeout(10) + ->send('https://github.com/typecho/typecho/releases.atom'); + + /** 鍖归厤鍐呭浣 */ + $response = $client->getResponseBody(); + preg_match_all("/]+href=\"([^>]*)\"\s*\/>/is", $response, $matches); + $result = array('available' => 0); + + list($soft, $version) = explode(' ', $this->options->generator); + $current = explode('/', $version); + + if ($matches) { + foreach ($matches[0] as $key => $val) { + $title = trim($matches[1][$key]); + if (preg_match("/v([0-9\.]+)\-([0-9\.]+)\-release$/is", $title, $out)) { + if (version_compare($out[1], $current[0], '>=') + && version_compare($out[2], $current[1], '>')) { + $result = array( + 'available' => 1, + 'latest' => $out[1] . '-' . $out[2], + 'current' => $current[0] . '-' . $current[1], + 'link' => 'https://github.com' . $matches[1][$key] + ); + break; + } + } + } + } + + $this->response->throwJson($result); + return; + } + + throw new Typecho_Widget_Exception(_t('绂佹璁块棶'), 403); + } + + /** + * 杩滅▼璇锋眰浠g悊 + * + * @throws Typecho_Widget_Exception + */ + public function feed() + { + $this->user->pass('subscriber'); + $client = Typecho_Http_Client::get(); + if ($client) { + $client->setHeader('User-Agent', $this->options->generator) + ->setTimeout(10) + ->send('http://typecho.org/feed/'); + + /** 鍖归厤鍐呭浣 */ + $response = $client->getResponseBody(); + preg_match_all("/\s*([^>]*)<\/title>\s*<link>([^>]*)<\/link>\s*<guid>[^>]*<\/guid>\s*<pubDate>([^>]*)<\/pubDate>/is", $response, $matches); + + $data = array(); + + if ($matches) { + foreach ($matches[0] as $key => $val) { + $data[] = array( + 'title' => $matches[1][$key], + 'link' => $matches[2][$key], + 'date' => date('n.j', strtotime($matches[3][$key])) + ); + + if ($key > 8) { + break; + } + } + } + + $this->response->throwJson($data); + return; + } + + throw new Typecho_Widget_Exception(_t('绂佹璁块棶'), 403); + } + + /** + * 鑷畾涔夌紪杈戝櫒澶у皬 + * + * @access public + * @return void + */ + public function editorResize() + { + $this->user->pass('contributor'); + if ($this->db->fetchObject($this->db->select(array('COUNT(*)' => 'num')) + ->from('table.options')->where('name = ? AND user = ?', 'editorSize', $this->user->uid))->num > 0) { + $this->widget('Widget_Abstract_Options') + ->update(array('value' => $this->request->size), $this->db->sql()->where('name = ? AND user = ?', 'editorSize', $this->user->uid)); + } else { + $this->widget('Widget_Abstract_Options')->insert(array( + 'name' => 'editorSize', + 'value' => $this->request->size, + 'user' => $this->user->uid + )); + } + } + + /** + * 寮傛璇锋眰鍏ュ彛 + * + * @access public + * @return void + */ + public function action() + { + if (!$this->request->isAjax()) { + $this->response->goBack(); + } + + $this->on($this->request->is('do=remoteCallback'))->remoteCallback(); + $this->on($this->request->is('do=feed'))->feed(); + $this->on($this->request->is('do=checkVersion'))->checkVersion(); + $this->on($this->request->is('do=editorResize'))->editorResize(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Archive.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Archive.php" new file mode 100644 index 0000000..8fe5d1d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Archive.php" @@ -0,0 +1,2090 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Posts.php 200 2008-05-21 06:33:20Z magike.net $ + */ + +/** + * 鍐呭鐨勬枃绔犲熀绫 + * 瀹氫箟鐨刢ss绫 + * p.more:闃呰鍏ㄦ枃閾炬帴鎵灞炴钀 + * + * @package Widget + */ +class Widget_Archive extends Widget_Abstract_Contents +{ + /** + * 璋冪敤鐨勯鏍兼枃浠 + * + * @access private + * @var string + */ + private $_themeFile; + + /** + * 椋庢牸鐩綍 + * + * @access private + * @var string + */ + private $_themeDir; + + /** + * 鍒嗛〉璁$畻瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 鏍囪鏄惁涓轰粠澶栭儴璋冪敤 + * + * @access private + * @var boolean + */ + private $_invokeFromOutside = false; + + /** + * 鏄惁鐢辫仛鍚堣皟鐢 + * + * @access private + * @var boolean + */ + private $_invokeByFeed = false; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鐢熸垚鍒嗛〉鐨勫唴瀹 + * + * @access private + * @var array + */ + private $_pageRow = array(); + + /** + * 鑱氬悎鍣ㄥ璞 + * + * @access private + * @var Typecho_Feed + */ + private $_feed; + + /** + * RSS 2.0鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedUrl; + + /** + * RSS 1.0鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedRssUrl; + + /** + * ATOM 鑱氬悎鍦板潃 + * + * @access private + * @var string + */ + private $_feedAtomUrl; + + /** + * 鏈〉鍏抽敭瀛 + * + * @access private + * @var string + */ + private $_keywords; + + /** + * 鏈〉鎻忚堪 + * + * @access private + * @var string + */ + private $_description; + + /** + * 鑱氬悎绫诲瀷 + * + * @access private + * @var string + */ + private $_feedType; + + /** + * 鑱氬悎绫诲瀷 + * + * @access private + * @var string + */ + private $_feedContentType; + + /** + * 褰撳墠feed鍦板潃 + * + * @access private + * @var string + */ + private $_currentFeedUrl; + + /** + * 褰掓。鏍囬 + * + * @access private + * @var string + */ + private $_archiveTitle = NULL; + + /** + * 褰掓。绫诲瀷 + * + * @access private + * @var string + */ + private $_archiveType = 'index'; + + /** + * 鏄惁涓哄崟涓褰掓。 + * + * @access private + * @var string + */ + private $_archiveSingle = false; + + /** + * 鏄惁涓鸿嚜瀹氫箟棣栭〉, 涓昏涓轰簡鏍囪鑷畾涔夐椤电殑鎯呭喌 + * + * (default value: false) + * + * @var boolean + * @access private + */ + private $_makeSinglePageAsFrontPage = false; + + /** + * 褰掓。缂╃暐鍚 + * + * @access private + * @var string + */ + private $_archiveSlug; + + /** + * 璁剧疆鍒嗛〉瀵硅薄 + * + * @access private + * @var Typecho_Widget_Helper_PageNavigator + */ + private $_pageNav; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @param mixed $request + * @param mixed $response + * @param mixed $params + * @throws Typecho_Widget_Exception + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + $this->parameter->setDefault(array( + 'pageSize' => $this->options->pageSize, + 'type' => NULL, + 'checkPermalink' => true + )); + + /** 鐢ㄤ簬鍒ゆ柇鏄矾鐢辫皟鐢ㄨ繕鏄閮ㄨ皟鐢 */ + if (NULL == $this->parameter->type) { + $this->parameter->type = Typecho_Router::$current; + } else { + $this->_invokeFromOutside = true; + } + + /** 鐢ㄤ簬鍒ゆ柇鏄惁涓篺eed璋冪敤 */ + if ($this->parameter->isFeed) { + $this->_invokeByFeed = true; + } + + /** 鍒濆鍖栫毊鑲よ矾寰 */ + $this->_themeDir = rtrim($this->options->themeFile($this->options->theme), '/') . '/'; + + /** 澶勭悊feed妯″紡 **/ + if ('feed' == $this->parameter->type) { + + $this->_currentFeedUrl = ''; + + /** 鍒ゆ柇鑱氬悎绫诲瀷 */ + switch (true) { + case 0 === strpos($this->request->feed, '/rss/') || '/rss' == $this->request->feed: + /** 濡傛灉鏄疪SS1鏍囧噯 */ + $this->request->feed = substr($this->request->feed, 4); + $this->_feedType = Typecho_Feed::RSS1; + $this->_currentFeedUrl = $this->options->feedRssUrl; + $this->_feedContentType = 'application/rdf+xml'; + break; + case 0 === strpos($this->request->feed, '/atom/') || '/atom' == $this->request->feed: + /** 濡傛灉鏄疉TOM鏍囧噯 */ + $this->request->feed = substr($this->request->feed, 5); + $this->_feedType = Typecho_Feed::ATOM1; + $this->_currentFeedUrl = $this->options->feedAtomUrl; + $this->_feedContentType = 'application/atom+xml'; + break; + default: + $this->_feedType = Typecho_Feed::RSS2; + $this->_currentFeedUrl = $this->options->feedUrl; + $this->_feedContentType = 'application/rss+xml'; + break; + } + + $feedQuery = $this->request->feed; + //$this->parameter->type = Typecho_Router::$current; + //$this->request->setParams($params); + + if ('/comments/' == $feedQuery || '/comments' == $feedQuery) { + /** 涓撲负feed浣跨敤鐨刪ack */ + $this->parameter->type = 'comments'; + } else { + $matched = Typecho_Router::match($this->request->feed, 'pageSize=10&isFeed=1'); + if ($matched && $matched instanceof Widget_Archive) { + $this->import($matched); + } else { + throw new Typecho_Widget_Exception(_t('鑱氬悎椤典笉瀛樺湪'), 404); + } + } + + /** 鍒濆鍖栬仛鍚堝櫒 */ + $this->setFeed(new Typecho_Feed(Typecho_Common::VERSION, $this->_feedType, $this->options->charset, _t('zh-CN'))); + + /** 榛樿杈撳嚭10鍒欐枃绔 **/ + $this->parameter->pageSize = 10; + } + } + + /** + * 璇勮鍦板潃 + * + * @access protected + * @return string + */ + protected function ___commentUrl() + { + /** 鐢熸垚鍙嶉鍦板潃 */ + /** 璇勮 */ + $commentUrl = parent::___commentUrl(); + + //涓嶄緷璧杍s鐨勭埗绾ц瘎璁 + $reply = $this->request->filter('int')->replyTo; + if ($reply && $this->is('single')) { + $commentUrl .= '?parent=' . $reply; + } + + return $this->options->commentsAntiSpam ? $commentUrl : $this->security->getTokenUrl($commentUrl); + } + + /** + * 璁剧疆鍒嗛〉瀵硅薄 + * @param array $pageRow + * @return void + */ + public function setPageRow($pageRow) + { + $this->_pageRow = $pageRow; + } + + /** + * @param string $archiveSlug the $_archiveSlug to set + */ + public function setArchiveSlug($archiveSlug) + { + $this->_archiveSlug = $archiveSlug; + } + + /** + * @param string $archiveSingle the $_archiveSingle to set + */ + public function setArchiveSingle($archiveSingle) + { + $this->_archiveSingle = $archiveSingle; + } + + /** + * @param $_archiveType the $_archiveType to set + */ + public function setArchiveType($archiveType) + { + $this->_archiveType = $archiveType; + } + + /** + * @param $_archiveTitle the $_archiveTitle to set + */ + public function setArchiveTitle($archiveTitle) + { + $this->_archiveTitle = $archiveTitle; + } + + /** + * 澧炲姞鏍囬 + * @param string $archiveTitle 鏍囬 + * @return void + */ + public function addArchiveTitle($archiveTitle) + { + $current = $this->getArchiveTitle(); + $current[] = $archiveTitle; + $this->setArchiveTitle($current); + } + + /** + * @param $_feedType the $_feedType to set + */ + public function setFeedType($feedType) + { + $this->_feedType = $feedType; + } + + /** + * @param $_description the $_description to set + */ + public function setDescription($description) + { + $this->_description = $description; + } + + /** + * @param $_keywords the $_keywords to set + */ + public function setKeywords($keywords) + { + $this->_keywords = $keywords; + } + + /** + * @param $_feedAtomUrl the $_feedAtomUrl to set + */ + public function setFeedAtomUrl($feedAtomUrl) + { + $this->_feedAtomUrl = $feedAtomUrl; + } + + /** + * @param $_feedRssUrl the $_feedRssUrl to set + */ + public function setFeedRssUrl($feedRssUrl) + { + $this->_feedRssUrl = $feedRssUrl; + } + + /** + * @param $_feedUrl the $_feedUrl to set + */ + public function setFeedUrl($feedUrl) + { + $this->_feedUrl = $feedUrl; + } + + /** + * @param $_feed the $_feed to set + */ + public function setFeed($feed) + { + $this->_feed = $feed; + } + + /** + * @param $_countSql the $_countSql to set + */ + public function setCountSql($countSql) + { + $this->_countSql = $countSql; + } + + /** + * @param $_total the $_total to set + */ + public function setTotal($total) + { + $this->_total = $total; + } + + /** + * @param $_themeFile the $_themeFile to set + */ + public function setThemeFile($themeFile) + { + $this->_themeFile = $themeFile; + } + + /** + * @param $_themeDir the $_themeDir to set + */ + public function setThemeDir($themeDir) + { + $this->_themeDir = $themeDir; + } + + /** + * 鑾峰彇鍒嗛〉瀵硅薄 + * @return array + */ + public function getPageRow() + { + return $this->_pageRow; + } + + /** + * @return the $_archiveSlug + */ + public function getArchiveSlug() + { + return $this->_archiveSlug; + } + + /** + * @return the $_archiveSingle + */ + public function getArchiveSingle() + { + return $this->_archiveSingle; + } + + /** + * @return the $_archiveType + */ + public function getArchiveType() + { + return $this->_archiveType; + } + + /** + * @return the $_archiveTitle + */ + public function getArchiveTitle() + { + return $this->_archiveTitle; + } + + /** + * @return the $_feedType + */ + public function getFeedType() + { + return $this->_feedType; + } + + /** + * @return the $_description + */ + public function getDescription() + { + return $this->_description; + } + + /** + * @return the $_keywords + */ + public function getKeywords() + { + return $this->_keywords; + } + + /** + * @return the $_feedAtomUrl + */ + public function getFeedAtomUrl() + { + return $this->_feedAtomUrl; + } + + /** + * @return the $_feedRssUrl + */ + public function getFeedRssUrl() + { + return $this->_feedRssUrl; + } + + /** + * @return the $_feedUrl + */ + public function getFeedUrl() + { + return $this->_feedUrl; + } + + /** + * @return the $_feed + */ + public function getFeed() + { + return $this->_feed; + } + + /** + * @return the $_countSql + */ + public function getCountSql() + { + return $this->_countSql; + } + + /** + * @return the $_total + */ + public function getTotal() + { + if (false === $this->_total) { + $this->_total = $this->size($this->_countSql); + } + + return $this->_total; + } + + /** + * @return the $_currentPage + */ + public function getCurrentPage() + { + return $this->_currentPage; + } + + /** + * 鑾峰彇椤垫暟 + * + * @return integer + */ + public function getTotalPage() + { + return ceil($this->getTotal() / $this->parameter->pageSize); + } + + /** + * @return the $_themeFile + */ + public function getThemeFile() + { + return $this->_themeFile; + } + + /** + * @return the $_themeDir + */ + public function getThemeDir() + { + return $this->_themeDir; + } + + /** + * 妫鏌ラ摼鎺ユ槸鍚︽纭 + * + * @access private + * @return void + */ + private function checkPermalink() + { + $type = $this->parameter->type; + + if (in_array($type, array('index', 'comment_page', 404)) + || $this->_makeSinglePageAsFrontPage // 鑷畾涔夐椤典笉澶勭悊 + || !$this->parameter->checkPermalink) { // 寮哄埗鍏抽棴 + return; + } + + if ($this->_archiveSingle) { + $permalink = $this->permalink; + } else { + $value = array_merge($this->_pageRow, array( + 'page' => $this->_currentPage + )); + + $path = Typecho_Router::url($type, $value); + $permalink = Typecho_Common::url($path, $this->options->index); + } + + $requestUrl = $this->request->getRequestUrl(); + + $src = parse_url($permalink); + $target = parse_url($requestUrl); + + if ($src['host'] != $target['host'] || urldecode($src['path']) != urldecode($target['path'])) { + $this->response->redirect($permalink, true); + } + } + + /** + * 瀵煎叆瀵硅薄 + * + * @access private + * @param Widget_Archive $widget 闇瑕佸鍏ョ殑瀵硅薄 + * @return void + */ + private function import(Widget_Archive $widget) + { + $currentProperties = get_object_vars($this); + + foreach ($currentProperties as $name => $value) { + if (false !== strpos('|request|response|parameter|_feed|_feedType|_currentFeedUrl|', '|' . $name . '|')) { + continue; + } + + if (isset($widget->{$name})) { + $this->{$name} = $widget->{$name}; + } else { + $method = ucfirst(trim($name, '_')); + $setMethod = 'set' . $method; + $getMethod = 'get' . $method; + + if (method_exists($this, $setMethod) + && method_exists($widget, $getMethod)) { + $this->{$setMethod}($widget->{$getMethod}()); + } + } + } + } + + /** + * 澶勭悊index + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function indexHandle(Typecho_Db_Query $select, &$hasPushed) + { + $select->where('table.contents.type = ?', 'post'); + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->indexHandle($this, $select); + } + + /** + * 404椤甸潰澶勭悊 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function error404Handle(Typecho_Db_Query $select, &$hasPushed) + { + /** 璁剧疆header */ + $this->response->setStatus(404); + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('椤甸潰娌℃壘鍒'); + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'archive'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 404; + + /** 璁剧疆褰掓。妯℃澘 */ + $this->_themeFile = '404.php'; + + /** 璁剧疆鍗曚竴褰掓。绫诲瀷 */ + $this->_archiveSingle = false; + + $hasPushed = true; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->error404Handle($this, $select); + } + + /** + * 鐙珛椤靛鐞 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function singleHandle(Typecho_Db_Query $select, &$hasPushed) + { + if ('comment_page' == $this->parameter->type) { + $params = array(); + $matched = Typecho_Router::match($this->request->permalink); + + if ($matched && $matched instanceof Widget_Archive && $matched->is('single')) { + $this->import($matched); + $hasPushed = true; + return; + } + } + + /** 灏嗚繖涓や釜璁剧疆鎻愬墠鏄负浜嗕繚璇佸湪璋冪敤query鐨刾lugin鏃跺彲浠ュ湪鎻掍欢涓娇鐢╥s鍒ゆ柇鍒濇褰掓。绫诲瀷 */ + /** 濡傛灉闇瑕佹洿缁嗗垽鏂紝鍒欏彲浠ヤ娇鐢╯ingleHandle鏉ュ疄鐜 */ + $this->_archiveSingle = true; + + /** 榛樿褰掓。绫诲瀷 */ + $this->_archiveType = 'single'; + + /** 鍖归厤绫诲瀷 */ + + if ('single' != $this->parameter->type) { + $select->where('table.contents.type = ?', $this->parameter->type); + } + + /** 濡傛灉鏄崟绡囨枃绔犳垨鐙珛椤甸潰 */ + if (isset($this->request->cid)) { + $select->where('table.contents.cid = ?', $this->request->filter('int')->cid); + } + + /** 鍖归厤缂╃暐鍚 */ + if (isset($this->request->slug)) { + $select->where('table.contents.slug = ?', $this->request->slug); + } + + /** 鍖归厤鏃堕棿 */ + if (isset($this->request->year)) { + $year = $this->request->filter('int')->year; + + $fromMonth = 1; + $toMonth = 12; + + $fromDay = 1; + $toDay = 31; + + if (isset($this->request->month)) { + $fromMonth = $this->request->filter('int')->month; + $toMonth = $fromMonth; + + $fromDay = 1; + $toDay = date('t', mktime(0, 0, 0, $toMonth, 1, $year)); + + if (isset($this->request->day)) { + $fromDay = $this->request->filter('int')->day; + $toDay = $fromDay; + } + } + + /** 鑾峰彇璧峰GMT鏃堕棿鐨剈nix鏃堕棿鎴 */ + $from = mktime(0, 0, 0, $fromMonth, $fromDay, $year) - $this->options->timezone + $this->options->serverTimezone; + $to = mktime(23, 59, 59, $toMonth, $toDay, $year) - $this->options->timezone + $this->options->serverTimezone; + $select->where('table.contents.created > ? AND table.contents.created < ?', $from, $to); + } + + /** 淇濆瓨瀵嗙爜鑷砪ookie */ + if ($this->request->isPost() && isset($this->request->protectPassword)) { + $this->security->protect(); + Typecho_Cookie::set('protectPassword', $this->request->protectPassword, 0); + } + + /** 鍖归厤绫诲瀷 */ + $select->limit(1); + $this->query($select); + + if (!$this->have() + || (isset($this->request->category) && $this->category != $this->request->category) + || (isset($this->request->directory) && $this->request->directory != implode('/', $this->directory))) { + if (!$this->_invokeFromOutside) { + /** 瀵规病鏈夌储寮曟儏鍐典笅鐨勫垽鏂 */ + throw new Typecho_Widget_Exception(_t('璇锋眰鐨勫湴鍧涓嶅瓨鍦'), 404); + } else { + $hasPushed = true; + return; + } + } + + /** 璁剧疆妯℃澘 */ + if ($this->template) { + /** 搴旂敤鑷畾涔夋ā鏉 */ + $this->_themeFile = $this->template; + } + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + + //瀵硅嚜瀹氫箟棣栭〉浣跨敤鍏ㄥ眬鍙橀噺 + if (!$this->_makeSinglePageAsFrontPage) { + $this->_feedUrl = $this->feedUrl; + + /** RSS 1.0 */ + $this->_feedRssUrl = $this->feedRssUrl; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $this->feedAtomUrl; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $this->title; + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = implode(',', Typecho_Common::arrayFlatten($this->tags, 'name')); + + /** 璁剧疆鎻忚堪 */ + $this->_description = $this->description; + } + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = $this->type; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = ('post' == $this->type || 'attachment' == $this->type) ? $this->cid : $this->slug; + + /** 璁剧疆403澶 */ + if ($this->hidden) { + $this->response->setStatus(403); + } + + $hasPushed = true; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->singleHandle($this, $select); + } + + /** + * 澶勭悊鍒嗙被 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function categoryHandle(Typecho_Db_Query $select, &$hasPushed) + { + /** 濡傛灉鏄垎绫 */ + $categorySelect = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->limit(1); + + if (isset($this->request->mid)) { + $categorySelect->where('mid = ?', $this->request->filter('int')->mid); + } + + if (isset($this->request->slug)) { + $categorySelect->where('slug = ?', $this->request->slug); + } + + if (isset($this->request->directory)) { + $directory = explode('/', $this->request->directory); + $categorySelect->where('slug = ?', $directory[count($directory) - 1]); + } + + $category = $this->db->fetchRow($categorySelect); + if (empty($category)) { + throw new Typecho_Widget_Exception(_t('鍒嗙被涓嶅瓨鍦'), 404); + } + + $categoryListWidget = $this->widget('Widget_Metas_Category_List', 'current=' . $category['mid']); + $category = $categoryListWidget->filter($category); + + if (isset($directory) && ($this->request->directory != implode('/', $category['directory']))) { + throw new Typecho_Widget_Exception(_t('鐖剁骇鍒嗙被涓嶅瓨鍦'), 404); + } + + $children = $categoryListWidget->getAllChildren($category['mid']); + $children[] = $category['mid']; + + /** fix sql92 by 70 */ + $select->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid IN ?', $children) + ->where('table.contents.type = ?', 'post') + ->group('table.contents.cid'); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = array_merge($category, array( + 'slug' => urlencode($category['slug']), + 'directory' => implode('/', array_map('urlencode', $category['directory'])) + )); + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $category['name']; + + /** 璁剧疆鎻忚堪 */ + $this->_description = $category['description']; + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = $category['feedUrl']; + + /** RSS 1.0 */ + $this->_feedRssUrl = $category['feedRssUrl']; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $category['feedAtomUrl']; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $category['name']; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'category'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = $category['slug']; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->categoryHandle($this, $select); + } + + /** + * 澶勭悊鏍囩 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function tagHandle(Typecho_Db_Query $select, &$hasPushed) + { + $tagSelect = $this->db->select()->from('table.metas') + ->where('type = ?', 'tag')->limit(1); + + if (isset($this->request->mid)) { + $tagSelect->where('mid = ?', $this->request->filter('int')->mid); + } + + if (isset($this->request->slug)) { + $tagSelect->where('slug = ?', $this->request->slug); + } + + /** 濡傛灉鏄爣绛 */ + $tag = $this->db->fetchRow($tagSelect, + array($this->widget('Widget_Abstract_Metas'), 'filter')); + + if (!$tag) { + throw new Typecho_Widget_Exception(_t('鏍囩涓嶅瓨鍦'), 404); + } + + /** fix sql92 by 70 */ + $select->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid = ?', $tag['mid']) + ->where('table.contents.type = ?', 'post'); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = array_merge($tag, array( + 'slug' => urlencode($tag['slug']) + )); + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $tag['name']; + + /** 璁剧疆鎻忚堪 */ + $this->_description = $tag['description']; + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = $tag['feedUrl']; + + /** RSS 1.0 */ + $this->_feedRssUrl = $tag['feedRssUrl']; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $tag['feedAtomUrl']; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $tag['name']; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'tag'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = $tag['slug']; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->tagHandle($this, $select); + } + + /** + * 澶勭悊浣滆 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + * @throws Typecho_Widget_Exception + */ + private function authorHandle(Typecho_Db_Query $select, &$hasPushed) + { + $uid = $this->request->filter('int')->uid; + + $author = $this->db->fetchRow($this->db->select()->from('table.users') + ->where('uid = ?', $uid), + array($this->widget('Widget_Abstract_Users'), 'filter')); + + if (!$author) { + throw new Typecho_Widget_Exception(_t('浣滆呬笉瀛樺湪'), 404); + } + + $select->where('table.contents.authorId = ?', $uid) + ->where('table.contents.type = ?', 'post'); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = $author; + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $author['screenName']; + + /** 璁剧疆鎻忚堪 */ + $this->_description = $author['screenName']; + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = $author['feedUrl']; + + /** RSS 1.0 */ + $this->_feedRssUrl = $author['feedRssUrl']; + + /** ATOM 1.0 */ + $this->_feedAtomUrl = $author['feedAtomUrl']; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $author['screenName']; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'author'; + + /** 璁剧疆褰掓。缂╃暐鍚 */ + $this->_archiveSlug = $author['uid']; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->authorHandle($this, $select); + } + + /** + * 澶勭悊鏃ユ湡 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function dateHandle(Typecho_Db_Query $select, &$hasPushed) + { + /** 濡傛灉鏄寜鏃ユ湡褰掓。 */ + $year = $this->request->filter('int')->year; + $month = $this->request->filter('int')->month; + $day = $this->request->filter('int')->day; + + if (!empty($year) && !empty($month) && !empty($day)) { + + /** 濡傛灉鎸夋棩褰掓。 */ + $from = mktime(0, 0, 0, $month, $day, $year); + $to = mktime(23, 59, 59, $month, $day, $year); + + /** 褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 'day'; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('%d骞%d鏈%d鏃', $year, $month, $day); + } else if (!empty($year) && !empty($month)) { + + /** 濡傛灉鎸夋湀褰掓。 */ + $from = mktime(0, 0, 0, $month, 1, $year); + $to = mktime(23, 59, 59, $month, date('t', $from), $year); + + /** 褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 'month'; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('%d骞%d鏈', $year, $month); + } else if (!empty($year)) { + + /** 濡傛灉鎸夊勾褰掓。 */ + $from = mktime(0, 0, 0, 1, 1, $year); + $to = mktime(23, 59, 59, 12, 31, $year); + + /** 褰掓。缂╃暐鍚 */ + $this->_archiveSlug = 'year'; + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = _t('%d骞', $year); + } + + $select->where('table.contents.created >= ?', $from - $this->options->timezone + $this->options->serverTimezone) + ->where('table.contents.created <= ?', $to - $this->options->timezone + $this->options->serverTimezone) + ->where('table.contents.type = ?', 'post'); + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'date'; + + /** 璁剧疆澶撮儴feed */ + $value = array('year' => $year, 'month' => str_pad($month, 2, '0', STR_PAD_LEFT), 'day' => str_pad($day, 2, '0', STR_PAD_LEFT)); + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = $value; + + /** 鑾峰彇褰撳墠璺敱,杩囨护鎺夌炕椤垫儏鍐 */ + $currentRoute = str_replace('_page', '', $this->parameter->type); + + /** RSS 2.0 */ + $this->_feedUrl = Typecho_Router::url($currentRoute, $value, $this->options->feedUrl); + + /** RSS 1.0 */ + $this->_feedRssUrl = Typecho_Router::url($currentRoute, $value, $this->options->feedRssUrl); + + /** ATOM 1.0 */ + $this->_feedAtomUrl = Typecho_Router::url($currentRoute, $value, $this->options->feedAtomUrl); + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->dateHandle($this, $select); + } + + /** + * 澶勭悊鎼滅储 + * + * @access private + * @param Typecho_Db_Query $select 鏌ヨ瀵硅薄 + * @param boolean $hasPushed 鏄惁宸茬粡鍘嬪叆闃熷垪 + * @return void + */ + private function searchHandle(Typecho_Db_Query $select, &$hasPushed) + { + /** 澧炲姞鑷畾涔夋悳绱㈠紩鎿庢帴鍙 */ + //~ fix issue 40 + $keywords = $this->request->filter('url', 'search')->keywords; + $this->pluginHandle()->trigger($hasPushed)->search($keywords, $this); + + if (!$hasPushed) { + $searchQuery = '%' . str_replace(' ', '%', $keywords) . '%'; + + /** 鎼滅储鏃犳硶杩涘叆闅愮椤逛繚鎶ゅ綊妗 */ + $select->where('table.contents.password IS NULL') + ->where('table.contents.title LIKE ? OR table.contents.text LIKE ?', $searchQuery, $searchQuery) + ->where('table.contents.type = ?', 'post'); + } + + /** 璁剧疆鍏抽敭璇 */ + $this->_keywords = $keywords; + + /** 璁剧疆鍒嗛〉 */ + $this->_pageRow = array('keywords' => urlencode($keywords)); + + /** 璁剧疆澶撮儴feed */ + /** RSS 2.0 */ + $this->_feedUrl = Typecho_Router::url('search', array('keywords' => $keywords), $this->options->feedUrl); + + /** RSS 1.0 */ + $this->_feedRssUrl = Typecho_Router::url('search', array('keywords' => $keywords), $this->options->feedAtomUrl); + + /** ATOM 1.0 */ + $this->_feedAtomUrl = Typecho_Router::url('search', array('keywords' => $keywords), $this->options->feedAtomUrl); + + /** 璁剧疆鏍囬 */ + $this->_archiveTitle = $keywords; + + /** 璁剧疆褰掓。绫诲瀷 */ + $this->_archiveType = 'search'; + + /** 鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->searchHandle($this, $select); + } + + /** + * 閲嶈浇select + * + * @access public + * @return void + */ + public function select() + { + if ($this->_feed) { + // 瀵筬eed杈撳嚭鍔犲叆闄愬埗鏉′欢 + return parent::select()->where('table.contents.allowFeed = ?', 1) + ->where('table.contents.password IS NULL'); + } else { + return parent::select(); + } + } + + /** + * 鎻愪氦鏌ヨ + * + * @access public + * @param mixed $select 鏌ヨ瀵硅薄 + * @return void + */ + public function query($select) + { + $this->pluginHandle()->trigger($queryPlugged)->query($this, $select); + if (!$queryPlugged) { + $this->db->fetchAll($select, array($this, 'push')); + } + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 閬垮厤閲嶅鍙栨暟鎹 */ + if ($this->have()) { + return; + } + + $handles = array( + 'index' => 'indexHandle', + 'index_page' => 'indexHandle', + 'archive' => 'error404Handle', + 'archive_page' => 'error404Handle', + 404 => 'error404Handle', + 'single' => 'singleHandle', + 'page' => 'singleHandle', + 'post' => 'singleHandle', + 'attachment' => 'singleHandle', + 'comment_page' => 'singleHandle', + 'category' => 'categoryHandle', + 'category_page' => 'categoryHandle', + 'tag' => 'tagHandle', + 'tag_page' => 'tagHandle', + 'author' => 'authorHandle', + 'author_page' => 'authorHandle', + 'archive_year' => 'dateHandle', + 'archive_year_page' => 'dateHandle', + 'archive_month' => 'dateHandle', + 'archive_month_page' => 'dateHandle', + 'archive_day' => 'dateHandle', + 'archive_day_page' => 'dateHandle', + 'search' => 'searchHandle', + 'search_page' => 'searchHandle' + ); + + /** 澶勭悊鎼滅储缁撴灉璺宠浆 */ + if (isset($this->request->s)) { + $filterKeywords = $this->request->filter('search')->s; + + /** 璺宠浆鍒版悳绱㈤〉 */ + if (NULL != $filterKeywords) { + $this->response->redirect(Typecho_Router::url('search', + array('keywords' => urlencode($filterKeywords)), $this->options->index)); + } + } + + /** 鑷畾涔夐椤靛姛鑳 */ + $frontPage = $this->options->frontPage; + if (!$this->_invokeByFeed && ('index' == $this->parameter->type || 'index_page' == $this->parameter->type)) { + //鏄剧ず鏌愪釜椤甸潰 + if (0 === strpos($frontPage, 'page:')) { + // 瀵规煇浜涘彉閲忓仛hack + $this->request->setParam('cid', intval(substr($frontPage, 5))); + $this->parameter->type = 'page'; + $this->_makeSinglePageAsFrontPage = true; + } else if (0 === strpos($frontPage, 'file:')) { + // 鏄剧ず鏌愪釜鏂囦欢 + $this->setThemeFile(substr($frontPage, 5)); + return; + } + } + + if ('recent' != $frontPage && $this->options->frontArchive) { + $handles['archive'] = 'indexHandle'; + $handles['archive_page'] = 'indexHandle'; + $this->_archiveType = 'front'; + } + + /** 鍒濆鍖栧垎椤靛彉閲 */ + $this->_currentPage = isset($this->request->page) ? $this->request->page : 1; + $hasPushed = false; + + /** select鍒濆鍖 */ + $select = $this->pluginHandle()->trigger($selectPlugged)->select($this); + + /** 瀹氭椂鍙戝竷鍔熻兘 */ + if (!$selectPlugged) { + if ('post' == $this->parameter->type || 'page' == $this->parameter->type) { + if ($this->user->hasLogin()) { + $select = $this->select()->where('table.contents.status = ? OR table.contents.status = ? OR + (table.contents.status = ? AND table.contents.authorId = ?)', + 'publish', 'hidden', 'private', $this->user->uid); + } else { + $select = $this->select()->where('table.contents.status = ? OR table.contents.status = ?', + 'publish', 'hidden'); + } + } else { + if ($this->user->hasLogin()) { + $select = $this->select()->where('table.contents.status = ? OR + (table.contents.status = ? AND table.contents.authorId = ?)', 'publish', 'private', $this->user->uid); + } else { + $select = $this->select()->where('table.contents.status = ?', 'publish'); + } + } + $select->where('table.contents.created < ?', $this->options->gmtTime); + } + + /** handle鍒濆鍖 */ + $this->pluginHandle()->handleInit($this, $select); + + /** 鍒濆鍖栧叾瀹冨彉閲 */ + $this->_feedUrl = $this->options->feedUrl; + $this->_feedRssUrl = $this->options->feedRssUrl; + $this->_feedAtomUrl = $this->options->feedAtomUrl; + $this->_keywords = $this->options->keywords; + $this->_description = $this->options->description; + + if (isset($handles[$this->parameter->type])) { + $handle = $handles[$this->parameter->type]; + $this->{$handle}($select, $hasPushed); + } else { + $hasPushed = $this->pluginHandle()->handle($this->parameter->type, $this, $select); + } + + /** 鍒濆鍖栫毊鑲ゅ嚱鏁 */ + $functionsFile = $this->_themeDir . 'functions.php'; + if (!$this->_invokeFromOutside && file_exists($functionsFile)) { + require_once $functionsFile; + if (function_exists('themeInit')) { + themeInit($this); + } + } + + /** 濡傛灉宸茬粡鎻愬墠鍘嬪叆鍒欑洿鎺ヨ繑鍥 */ + if ($hasPushed) { + return; + } + + /** 浠呰緭鍑烘枃绔 */ + $this->_countSql = clone $select; + + $select->order('table.contents.created', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + $this->query($select); + } + + /** + * 杈撳嚭鏂囩珷鍐呭 + * + * @access public + * @param string $more 鏂囩珷鎴彇鍚庣紑 + * @return void + */ + public function content($more = NULL) + { + parent::content($this->is('single') ? false : $more); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @param string $prev 涓婁竴椤垫枃瀛 + * @param string $next 涓嬩竴椤垫枃瀛 + * @param int $splitPage 鍒嗗壊鑼冨洿 + * @param string $splitWord 鍒嗗壊瀛楃 + * @param string $template 灞曠幇閰嶇疆淇℃伅 + * @return void + */ + public function pageNav($prev = '«', $next = '»', $splitPage = 3, $splitWord = '...', $template = '') + { + if ($this->have()) { + $hasNav = false; + $default = array( + 'wrapTag' => 'ol', + 'wrapClass' => 'page-navigator' + ); + + if (is_string($template)) { + parse_str($template, $config); + } else { + $config = $template; + } + + $template = array_merge($default, $config); + + $total = $this->getTotal(); + $this->pluginHandle()->trigger($hasNav)->pageNav($this->_currentPage, $total, + $this->parameter->pageSize, $prev, $next, $splitPage, $splitWord); + + if (!$hasNav && $total > $this->parameter->pageSize) { + $query = Typecho_Router::url($this->parameter->type . + (false === strpos($this->parameter->type, '_page') ? '_page' : NULL), + $this->_pageRow, $this->options->index); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box($total, + $this->_currentPage, $this->parameter->pageSize, $query); + + echo '<' . $template['wrapTag'] . (empty($template['wrapClass']) + ? '' : ' class="' . $template['wrapClass'] . '"') . '>'; + $nav->render($prev, $next, $splitPage, $splitWord, $template); + echo '</' . $template['wrapTag'] . '>'; + } + } + } + + /** + * 鍓嶄竴椤 + * + * @access public + * @param string $word 閾炬帴鏍囬 + * @param string $page 椤甸潰閾炬帴 + * @return void + */ + public function pageLink($word = '« Previous Entries', $page = 'prev') + { + if ($this->have()) { + if (empty($this->_pageNav)) { + $query = Typecho_Router::url($this->parameter->type . + (false === strpos($this->parameter->type, '_page') ? '_page' : NULL), + $this->_pageRow, $this->options->index); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $this->_pageNav = new Typecho_Widget_Helper_PageNavigator_Classic($this->getTotal(), + $this->_currentPage, $this->parameter->pageSize, $query); + } + + $this->_pageNav->{$page}($word); + } + } + + /** + * 鑾峰彇璇勮褰掓。瀵硅薄 + * + * @access public + * @return Widget_Abstract_Comments + */ + public function comments() + { + $parameter = array( + 'parentId' => $this->hidden ? 0 : $this->cid, + 'parentContent' => $this->row, + 'respondId' => $this->respondId, + 'commentPage' => $this->request->filter('int')->commentPage, + 'allowComment' => $this->allow('comment') + ); + + return $this->widget('Widget_Comments_Archive', $parameter); + } + + /** + * 鑾峰彇鍥炲搷褰掓。瀵硅薄 + * + * @access public + * @return Widget_Comments_Ping + */ + public function pings() + { + return $this->widget('Widget_Comments_Ping', array( + 'parentId' => $this->hidden ? 0 : $this->cid, + 'parentContent' => $this->row, + 'allowPing' => $this->allow('ping') + )); + } + + /** + * 鑾峰彇闄勪欢瀵硅薄 + * + * @access public + * @param integer $limit 鏈澶т釜鏁 + * @param integer $offset 閲嶆柊 + * @return Widget_Contents_Attachment_Related + */ + public function attachments($limit = 0, $offset = 0) + { + return $this->widget('Widget_Contents_Attachment_Related@' . $this->cid . '-' . uniqid(), array( + 'parentId' => $this->cid, + 'limit' => $limit, + 'offset' => $offset + )); + } + + /** + * 鏄剧ず涓嬩竴涓唴瀹圭殑鏍囬閾炬帴 + * + * @access public + * @param string $format 鏍煎紡 + * @param string $default 濡傛灉娌℃湁涓嬩竴绡,鏄剧ず鐨勯粯璁ゆ枃瀛 + * @param array $custom 瀹氬埗鍖栨牱寮 + * @return void + */ + public function theNext($format = '%s', $default = NULL, $custom = array()) + { + $content = $this->db->fetchRow($this->select()->where('table.contents.created > ? AND table.contents.created < ?', + $this->created, $this->options->gmtTime) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.type = ?', $this->type) + ->where('table.contents.password IS NULL') + ->order('table.contents.created', Typecho_Db::SORT_ASC) + ->limit(1)); + + if ($content) { + $content = $this->filter($content); + $default = array( + 'title' => NULL, + 'tagClass' => NULL + ); + $custom = array_merge($default, $custom); + extract($custom); + + $linkText = empty($title) ? $content['title'] : $title; + $linkClass = empty($tagClass) ? '' : 'class="' . $tagClass . '" '; + $link = '<a ' . $linkClass . 'href="' . $content['permalink'] . '" title="' . $content['title'] . '">' . $linkText . '</a>'; + + printf($format, $link); + } else { + echo $default; + } + } + + /** + * 鏄剧ず涓婁竴涓唴瀹圭殑鏍囬閾炬帴 + * + * @access public + * @param string $format 鏍煎紡 + * @param string $default 濡傛灉娌℃湁涓婁竴绡,鏄剧ず鐨勯粯璁ゆ枃瀛 + * @param array $custom 瀹氬埗鍖栨牱寮 + * @return void + */ + public function thePrev($format = '%s', $default = NULL, $custom = array()) + { + $content = $this->db->fetchRow($this->select()->where('table.contents.created < ?', $this->created) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.type = ?', $this->type) + ->where('table.contents.password IS NULL') + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit(1)); + + if ($content) { + $content = $this->filter($content); + $default = array( + 'title' => NULL, + 'tagClass' => NULL + ); + $custom = array_merge($default, $custom); + extract($custom); + + $linkText = empty($title) ? $content['title'] : $title; + $linkClass = empty($tagClass) ? '' : 'class="' . $tagClass . '" '; + $link = '<a ' . $linkClass . 'href="' . $content['permalink'] . '" title="' . $content['title'] . '">' . $linkText . '</a>'; + + printf($format, $link); + } else { + echo $default; + } + } + + /** + * 鑾峰彇鍏宠仈鍐呭缁勪欢 + * + * @access public + * @param integer $limit 杈撳嚭鏁伴噺 + * @param string $type 鍏宠仈绫诲瀷 + * @return Typecho_Widget + */ + public function related($limit = 5, $type = NULL) + { + $type = strtolower($type); + + switch ($type) { + case 'author': + /** 濡傛灉璁块棶鏉冮檺琚缃负绂佹,鍒檛ag浼氳缃负绌 */ + return $this->widget('Widget_Contents_Related_Author', + array('cid' => $this->cid, 'type' => $this->type, 'author' => $this->author->uid, 'limit' => $limit)); + default: + /** 濡傛灉璁块棶鏉冮檺琚缃负绂佹,鍒檛ag浼氳缃负绌 */ + return $this->widget('Widget_Contents_Related', + array('cid' => $this->cid, 'type' => $this->type, 'tags' => $this->tags, 'limit' => $limit)); + } + } + + /** + * 杈撳嚭澶撮儴鍏冩暟鎹 + * + * @access public + * @param string $rule 瑙勫垯 + * @return void + */ + public function header($rule = NULL) + { + $rules = array(); + $allows = array( + 'description' => htmlspecialchars($this->_description), + 'keywords' => htmlspecialchars($this->_keywords), + 'generator' => $this->options->generator, + 'template' => $this->options->theme, + 'pingback' => $this->options->xmlRpcUrl, + 'xmlrpc' => $this->options->xmlRpcUrl . '?rsd', + 'wlw' => $this->options->xmlRpcUrl . '?wlw', + 'rss2' => $this->_feedUrl, + 'rss1' => $this->_feedRssUrl, + 'commentReply' => 1, + 'antiSpam' => 1, + 'atom' => $this->_feedAtomUrl + ); + + /** 澶撮儴鏄惁杈撳嚭鑱氬悎 */ + $allowFeed = !$this->is('single') || $this->allow('feed') || $this->_makeSinglePageAsFrontPage; + + if (!empty($rule)) { + parse_str($rule, $rules); + $allows = array_merge($allows, $rules); + } + + $allows = $this->pluginHandle()->headerOptions($allows, $this); + + $header = ''; + if (!empty($allows['description'])) { + $header .= '<meta name="description" content="' . $allows['description'] . '" />' . "\n"; + } + + if (!empty($allows['keywords'])) { + $header .= '<meta name="keywords" content="' . $allows['keywords'] . '" />' . "\n"; + } + + if (!empty($allows['generator'])) { + $header .= '<meta name="generator" content="' . $allows['generator'] . '" />' . "\n"; + } + + if (!empty($allows['template'])) { + $header .= '<meta name="template" content="' . $allows['template'] . '" />' . "\n"; + } + + if (!empty($allows['pingback'])) { + $header .= '<link rel="pingback" href="' . $allows['pingback'] . '" />' . "\n"; + } + + if (!empty($allows['xmlrpc'])) { + $header .= '<link rel="EditURI" type="application/rsd+xml" title="RSD" href="' . $allows['xmlrpc'] . '" />' . "\n"; + } + + if (!empty($allows['wlw'])) { + $header .= '<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="' . $allows['wlw'] . '" />' . "\n"; + } + + if (!empty($allows['rss2']) && $allowFeed) { + $header .= '<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="' . $allows['rss2'] . '" />' . "\n"; + } + + if (!empty($allows['rss1']) && $allowFeed) { + $header .= '<link rel="alternate" type="application/rdf+xml" title="RSS 1.0" href="' . $allows['rss1'] . '" />' . "\n"; + } + + if (!empty($allows['atom']) && $allowFeed) { + $header .= '<link rel="alternate" type="application/atom+xml" title="ATOM 1.0" href="' . $allows['atom'] . '" />' . "\n"; + } + + if ($this->options->commentsThreaded && $this->is('single')) { + if ('' != $allows['commentReply']) { + if (1 == $allows['commentReply']) { + $header .= "<script type=\"text/javascript\"> +(function () { + window.TypechoComment = { + dom : function (id) { + return document.getElementById(id); + }, + + create : function (tag, attr) { + var el = document.createElement(tag); + + for (var key in attr) { + el.setAttribute(key, attr[key]); + } + + return el; + }, + + reply : function (cid, coid) { + var comment = this.dom(cid), parent = comment.parentNode, + response = this.dom('" . $this->respondId . "'), input = this.dom('comment-parent'), + form = 'form' == response.tagName ? response : response.getElementsByTagName('form')[0], + textarea = response.getElementsByTagName('textarea')[0]; + + if (null == input) { + input = this.create('input', { + 'type' : 'hidden', + 'name' : 'parent', + 'id' : 'comment-parent' + }); + + form.appendChild(input); + } + + input.setAttribute('value', coid); + + if (null == this.dom('comment-form-place-holder')) { + var holder = this.create('div', { + 'id' : 'comment-form-place-holder' + }); + + response.parentNode.insertBefore(holder, response); + } + + comment.appendChild(response); + this.dom('cancel-comment-reply-link').style.display = ''; + + if (null != textarea && 'text' == textarea.name) { + textarea.focus(); + } + + return false; + }, + + cancelReply : function () { + var response = this.dom('{$this->respondId}'), + holder = this.dom('comment-form-place-holder'), input = this.dom('comment-parent'); + + if (null != input) { + input.parentNode.removeChild(input); + } + + if (null == holder) { + return true; + } + + this.dom('cancel-comment-reply-link').style.display = 'none'; + holder.parentNode.insertBefore(response, holder); + return false; + } + }; +})(); +</script> +"; + } else { + $header .= '<script src="' . $allows['commentReply'] . '" type="text/javascript"></script>'; + } + } + } + + /** 鍙嶅瀮鍦捐缃 */ + if ($this->options->commentsAntiSpam && $this->is('single')) { + if ('' != $allows['antiSpam']) { + if (1 == $allows['antiSpam']) { + $header .= "<script type=\"text/javascript\"> +(function () { + var event = document.addEventListener ? { + add: 'addEventListener', + focus: 'focus', + load: 'DOMContentLoaded' + } : { + add: 'attachEvent', + focus: 'onfocus', + load: 'onload' + }; + + document[event.add](event.load, function () { + var r = document.getElementById('{$this->respondId}'); + + if (null != r) { + var forms = r.getElementsByTagName('form'); + if (forms.length > 0) { + var f = forms[0], textarea = f.getElementsByTagName('textarea')[0], added = false; + + if (null != textarea && 'text' == textarea.name) { + textarea[event.add](event.focus, function () { + if (!added) { + var input = document.createElement('input'); + input.type = 'hidden'; + input.name = '_'; + input.value = " . Typecho_Common::shuffleScriptVar( + $this->security->getToken($this->request->getRequestUrl())) . " + + f.appendChild(input); + added = true; + } + }); + } + } + } + }); +})(); +</script>"; + } else { + $header .= '<script src="' . $allows['antiSpam'] . '" type="text/javascript"></script>'; + } + } + } + + /** 鎻掍欢鏀寔 */ + $this->pluginHandle()->header($header, $this); + + /** 杈撳嚭header */ + echo $header; + } + + /** + * 鏀寔椤佃剼鑷畾涔 + * + * @access public + * @return void + */ + public function footer() + { + $this->pluginHandle()->footer($this); + } + + /** + * 杈撳嚭cookie璁板繂鍒悕 + * + * @access public + * @param string $cookieName 宸茬粡璁板繂鐨刢ookie鍚嶇О + * @param boolean $return 鏄惁杩斿洖 + * @return string + */ + public function remember($cookieName, $return = false) + { + $cookieName = strtolower($cookieName); + if (!in_array($cookieName, array('author', 'mail', 'url'))) { + return ''; + } + + $value = Typecho_Cookie::get('__typecho_remember_' . $cookieName); + if ($return) { + return $value; + } else { + echo htmlspecialchars($value); + } + } + + /** + * 杈撳嚭褰掓。鏍囬 + * + * @param mixed $defines + * @param string $before + * @param string $end + * @access public + * @return void + */ + public function archiveTitle($defines = NULL, $before = ' » ', $end = '') + { + if ($this->_archiveTitle) { + $define = '%s'; + if (is_array($defines) && !empty($defines[$this->_archiveType])) { + $define = $defines[$this->_archiveType]; + } + + echo $before . sprintf($define, $this->_archiveTitle) . $end; + } + } + + /** + * 杈撳嚭鍏抽敭瀛 + * + * @access public + */ + public function keywords($split = ',', $default = '') + { + echo empty($this->_keywords) ? $default : str_replace(',', $split, htmlspecialchars($this->_keywords)); + } + + /** + * 鍒ゆ柇褰掓。绫诲瀷鍜屽悕绉 + * + * @access public + * @param string $archiveType 褰掓。绫诲瀷 + * @param string $archiveSlug 褰掓。鍚嶇О + * @return boolean + */ + public function is($archiveType, $archiveSlug = NULL) + { + return ($archiveType == $this->_archiveType || + (($this->_archiveSingle ? 'single' : 'archive') == $archiveType && 'index' != $this->_archiveType) || + ('index' == $archiveType && $this->_makeSinglePageAsFrontPage)) + && (empty($archiveSlug) ? true : $archiveSlug == $this->_archiveSlug); + } + + /** + * 鑾峰彇涓婚鏂囦欢 + * + * @access public + * @param string $fileName 涓婚鏂囦欢 + * @return void + */ + public function need($fileName) + { + require $this->_themeDir . $fileName; + } + + /** + * 杈撳嚭瑙嗗浘 + * + * @access public + * @return void + */ + public function render() + { + /** 澶勭悊闈欐侀摼鎺ヨ烦杞 */ + $this->checkPermalink(); + + /** 娣诲姞Pingback */ + $this->response->setHeader('X-Pingback', $this->options->xmlRpcUrl); + $validated = false; + + //~ 鑷畾涔夋ā鏉 + if (!empty($this->_themeFile)) { + if (file_exists($this->_themeDir . $this->_themeFile)) { + $validated = true; + } + } + + if (!$validated && !empty($this->_archiveType)) { + + //~ 棣栧厛鎵惧叿浣撹矾寰, 姣斿 category/default.php + if (!$validated && !empty($this->_archiveSlug)) { + $themeFile = $this->_archiveType . '/' . $this->_archiveSlug . '.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + + //~ 鐒跺悗鎵惧綊妗g被鍨嬭矾寰, 姣斿 category.php + if (!$validated) { + $themeFile = $this->_archiveType . '.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + + //閽堝attachment鐨刪ook + if (!$validated && 'attachment' == $this->_archiveType) { + if (file_exists($this->_themeDir . 'page.php')) { + $this->_themeFile = 'page.php'; + $validated = true; + } else if (file_exists($this->_themeDir . 'post.php')) { + $this->_themeFile = 'post.php'; + $validated = true; + } + } + + //~ 鏈鍚庢壘褰掓。璺緞, 姣斿 archive.php 鎴栬 single.php + if (!$validated && 'index' != $this->_archiveType && 'front' != $this->_archiveType) { + $themeFile = $this->_archiveSingle ? 'single.php' : 'archive.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + + if (!$validated) { + $themeFile = 'index.php'; + if (file_exists($this->_themeDir . $themeFile)) { + $this->_themeFile = $themeFile; + $validated = true; + } + } + } + + /** 鏂囦欢涓嶅瓨鍦 */ + if (!$validated) { + Typecho_Common::error(500); + } + + /** 鎸傛帴鎻掍欢 */ + $this->pluginHandle()->beforeRender($this); + + /** 杈撳嚭妯℃澘 */ + require_once $this->_themeDir . $this->_themeFile; + + /** 鎸傛帴鎻掍欢 */ + $this->pluginHandle()->afterRender($this); + } + + /** + * 杈撳嚭feed + * + * @access public + * @return void + */ + public function feed() + { + $this->_feed->setSubTitle($this->_description); + $this->_feed->setFeedUrl($this->_currentFeedUrl); + + $this->_feed->setBaseUrl(('/' == $this->request->feed || 0 == strlen($this->request->feed) + || '/comments' == $this->request->feed || '/comments/' == $this->request->feed) ? + $this->options->siteUrl : Typecho_Common::url($this->request->feed, $this->options->index)); + $this->_feed->setFeedUrl($this->request->makeUriByRequest()); + + if ($this->is('single') || 'comments' == $this->parameter->type) { + $this->_feed->setTitle(_t('%s 鐨勮瘎璁', + $this->options->title . ($this->_archiveTitle ? ' - ' . $this->_archiveTitle : NULL))); + + if ('comments' == $this->parameter->type) { + $comments = $this->widget('Widget_Comments_Recent', 'pageSize=10'); + } else { + $comments = $this->widget('Widget_Comments_Recent', 'pageSize=10&parentId=' . $this->cid); + } + + while ($comments->next()) { + $suffix = $this->pluginHandle()->trigger($plugged)->commentFeedItem($this->_feedType, $comments); + if (!$plugged) { + $suffix = NULL; + } + + $this->_feed->addItem(array( + 'title' => $comments->author, + 'content' => $comments->content, + 'date' => $comments->created, + 'link' => $comments->permalink, + 'author' => (object) array( + 'screenName' => $comments->author, + 'url' => $comments->url, + 'mail' => $comments->mail + ), + 'excerpt' => strip_tags($comments->content), + 'suffix' => $suffix + )); + } + } else { + $this->_feed->setTitle($this->options->title . ($this->_archiveTitle ? ' - ' . $this->_archiveTitle : NULL)); + + while ($this->next()) { + $suffix = $this->pluginHandle()->trigger($plugged)->feedItem($this->_feedType, $this); + if (!$plugged) { + $suffix = NULL; + } + + $feedUrl = ''; + if (Typecho_Feed::RSS2 == $this->_feedType) { + $feedUrl = $this->feedUrl; + } else if (Typecho_Feed::RSS1 == $this->_feedType) { + $feedUrl = $this->feedRssUrl; + } else if (Typecho_Feed::ATOM1 == $this->_feedType) { + $feedUrl = $this->feedAtomUrl; + } + + $this->_feed->addItem(array( + 'title' => $this->title, + 'content' => $this->options->feedFullText ? $this->content : (false !== strpos($this->text, '<!--more-->') ? + $this->excerpt . "<p class=\"more\"><a href=\"{$this->permalink}\" title=\"{$this->title}\">[...]</a></p>" : $this->content), + 'date' => $this->created, + 'link' => $this->permalink, + 'author' => $this->author, + 'excerpt' => $this->description, + 'comments' => $this->commentsNum, + 'commentsFeedUrl' => $feedUrl, + 'suffix' => $suffix + )); + } + } + + $this->response->setContentType($this->_feedContentType); + echo $this->_feed->__toString(); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Admin.php" new file mode 100644 index 0000000..776ff8c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Admin.php" @@ -0,0 +1,147 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍚庡彴璇勮杈撳嚭缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Admin extends Widget_Abstract_Comments +{ + /** + * 鍒嗛〉璁$畻瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 鑾峰彇褰撳墠鍐呭缁撴瀯 + * + * @access protected + * @return array + */ + protected function ___parentContent() + { + $cid = isset($this->request->cid) ? $this->request->filter('int')->cid : $this->cid; + return $this->db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.cid = ?', $cid) + ->limit(1), array($this->widget('Widget_Abstract_Contents'), 'filter')); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + $content = $this->parentContent; + + if ($content) { + return _t('%s鐨勮瘎璁', $content['title']); + } + + throw new Typecho_Widget_Exception(_t('鍐呭涓嶅瓨鍦'), 404); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select(); + $this->parameter->setDefault('pageSize=20'); + $this->_currentPage = $this->request->get('page', 1); + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->filter('search')->keywords)) { + $select->where('table.comments.text LIKE ?', '%' . $keywords . '%'); + } + + /** 濡傛灉鍏锋湁璐$尞鑰呬互涓婃潈闄,鍙互鏌ョ湅鎵鏈夎瘎璁,鍙嶄箣鍙兘鏌ョ湅鑷繁鐨勮瘎璁 */ + if (!$this->user->pass('editor', true)) { + $select->where('table.comments.ownerId = ?', $this->user->uid); + } else if (!isset($this->request->cid)) { + if ('on' == $this->request->__typecho_all_comments) { + Typecho_Cookie::set('__typecho_all_comments', 'on'); + } else { + if ('off' == $this->request->__typecho_all_comments) { + Typecho_Cookie::set('__typecho_all_comments', 'off'); + } + + if ('on' != Typecho_Cookie::get('__typecho_all_comments')) { + $select->where('table.comments.ownerId = ?', $this->user->uid); + } + } + } + + if (in_array($this->request->status, array('approved', 'waiting', 'spam'))) { + $select->where('table.comments.status = ?', $this->request->status); + } else if ('hold' == $this->request->status) { + $select->where('table.comments.status <> ?', 'approved'); + } else { + $select->where('table.comments.status = ?', 'approved'); + } + + //澧炲姞鎸夋枃绔犲綊妗e姛鑳 + if (isset($this->request->cid)) { + $select->where('table.comments.cid = ?', $this->request->filter('int')->cid); + } + + $this->_countSql = clone $select; + + $select->order('table.comments.coid', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}'); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render(_t('«'), _t('»')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Archive.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Archive.php" new file mode 100644 index 0000000..5f0c810 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Archive.php" @@ -0,0 +1,519 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 璇勮褰掓。 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 璇勮褰掓。缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Archive extends Widget_Abstract_Comments +{ + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 瀛愮埗绾ц瘎璁哄叧绯 + * + * @access private + * @var array + */ + private $_threadedComments = array(); + + /** + * 澶氱骇璇勮鍥炶皟鍑芥暟 + * + * @access private + * @var mixed + */ + private $_customThreadedCommentsCallback = false; + + /** + * _singleCommentOptions + * + * @var mixed + * @access private + */ + private $_singleCommentOptions = NULL; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault('parentId=0&commentPage=0&commentsNum=0&allowComment=1'); + + /** 鍒濆鍖栧洖璋冨嚱鏁 */ + if (function_exists('threadedComments')) { + $this->_customThreadedCommentsCallback = true; + } + } + + /** + * 璇勮鍥炶皟鍑芥暟 + * + * @access private + * @return void + */ + private function threadedCommentsCallback() + { + $singleCommentOptions = $this->_singleCommentOptions; + if ($this->_customThreadedCommentsCallback) { + return threadedComments($this, $singleCommentOptions); + } + + $commentClass = ''; + if ($this->authorId) { + if ($this->authorId == $this->ownerId) { + $commentClass .= ' comment-by-author'; + } else { + $commentClass .= ' comment-by-user'; + } + } + + $commentLevelClass = $this->levels > 0 ? ' comment-child' : ' comment-parent'; +?> +<li itemscope itemtype="http://schema.org/UserComments" id="<?php $this->theId(); ?>" class="comment-body<?php + if ($this->levels > 0) { + echo ' comment-child'; + $this->levelsAlt(' comment-level-odd', ' comment-level-even'); + } else { + echo ' comment-parent'; + } + $this->alt(' comment-odd', ' comment-even'); + echo $commentClass; +?>"> + <div class="comment-author" itemprop="creator" itemscope itemtype="http://schema.org/Person"> + <span itemprop="image"><?php $this->gravatar($singleCommentOptions->avatarSize, $singleCommentOptions->defaultAvatar); ?></span> + <cite class="fn" itemprop="name"><?php $singleCommentOptions->beforeAuthor(); + $this->author(); + $singleCommentOptions->afterAuthor(); ?></cite> + </div> + <div class="comment-meta"> + <a href="<?php $this->permalink(); ?>"><time itemprop="commentTime" datetime="<?php $this->date('c'); ?>"><?php $singleCommentOptions->beforeDate(); + $this->date($singleCommentOptions->dateFormat); + $singleCommentOptions->afterDate(); ?></time></a> + <?php if ('waiting' == $this->status) { ?> + <em class="comment-awaiting-moderation"><?php $singleCommentOptions->commentStatus(); ?></em> + <?php } ?> + </div> + <div class="comment-content" itemprop="commentText"> + <?php $this->content(); ?> + </div> + <div class="comment-reply"> + <?php $this->reply($singleCommentOptions->replyWord); ?> + </div> + <?php if ($this->children) { ?> + <div class="comment-children" itemprop="discusses"> + <?php $this->threadedComments(); ?> + </div> + <?php } ?> +</li> +<?php + } + + /** + * 鑾峰彇褰撳墠璇勮閾炬帴 + * + * @access protected + * @return string + */ + protected function ___permalink() + { + + if ($this->options->commentsPageBreak) { + $pageRow = array('permalink' => $this->parentContent['pathinfo'], 'commentPage' => $this->_currentPage); + return Typecho_Router::url('comment_page', + $pageRow, $this->options->index) . '#' . $this->theId; + } + + return $this->parentContent['permalink'] . '#' . $this->theId; + } + + /** + * 瀛愯瘎璁 + * + * @access protected + * @return array + */ + protected function ___children() + { + return $this->options->commentsThreaded && !$this->isTopLevel && isset($this->_threadedComments[$this->coid]) + ? $this->_threadedComments[$this->coid] : array(); + } + + /** + * 鏄惁鍒拌揪椤跺眰 + * + * @access protected + * @return boolean + */ + protected function ___isTopLevel() + { + return $this->levels > $this->options->commentsMaxNestingLevels - 2; + } + + /** + * 閲嶈浇鍐呭鑾峰彇 + * + * @access protected + * @return void + */ + protected function ___parentContent() + { + return $this->parameter->parentContent; + } + + /** + * 杈撳嚭鏂囩珷璇勮鏁 + * + * @access public + * @param string $string 璇勮鏁版牸寮忓寲鏁版嵁 + * @return void + */ + public function num() + { + $args = func_get_args(); + if (!$args) { + $args[] = '%d'; + } + + $num = intval($this->_total); + + echo sprintf(isset($args[$num]) ? $args[$num] : array_pop($args), $num); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + if (!$this->parameter->parentId) { + return; + } + + $commentsAuthor = Typecho_Cookie::get('__typecho_remember_author'); + $commentsMail = Typecho_Cookie::get('__typecho_remember_mail'); + $select = $this->select()->where('table.comments.cid = ?', $this->parameter->parentId) + ->where('table.comments.status = ? OR (table.comments.author = ? AND table.comments.mail = ? AND table.comments.status = ?)', 'approved', $commentsAuthor, $commentsMail, 'waiting'); + $threadedSelect = NULL; + + if ($this->options->commentsShowCommentOnly) { + $select->where('table.comments.type = ?', 'comment'); + } + + $select->order('table.comments.coid', 'ASC'); + $this->db->fetchAll($select, array($this, 'push')); + + /** 闇瑕佽緭鍑虹殑璇勮鍒楄〃 */ + $outputComments = array(); + + /** 濡傛灉寮鍚瘎璁哄洖澶 */ + if ($this->options->commentsThreaded) { + + foreach ($this->stack as $coid => &$comment) { + + /** 鍙栧嚭鐖惰妭鐐 */ + $parent = $comment['parent']; + + /** 濡傛灉瀛樺湪鐖惰妭鐐 */ + if (0 != $parent && isset($this->stack[$parent])) { + + /** 濡傛灉褰撳墠鑺傜偣娣卞害澶т簬鏈澶ф繁搴, 鍒欏皢鍏舵寕鎺ュ湪鐖惰妭鐐逛笂 */ + if ($comment['levels'] >= $this->options->commentsMaxNestingLevels) { + $comment['levels'] = $this->stack[$parent]['levels']; + $parent = $this->stack[$parent]['parent']; // 涓婁笂灞傝妭鐐 + $comment['parent'] = $parent; + } + + /** 璁$畻瀛愯妭鐐归『搴 */ + $comment['order'] = isset($this->_threadedComments[$parent]) + ? count($this->_threadedComments[$parent]) + 1 : 1; + + /** 濡傛灉鏄瓙鑺傜偣 */ + $this->_threadedComments[$parent][$coid] = $comment; + } else { + $outputComments[$coid] = $comment; + } + + } + + $this->stack = $outputComments; + } + + /** 璇勮鎺掑簭 */ + if ('DESC' == $this->options->commentsOrder) { + $this->stack = array_reverse($this->stack, true); + $this->_threadedComments = array_map('array_reverse', $this->_threadedComments); + } + + /** 璇勮鎬绘暟 */ + $this->_total = count($this->stack); + + /** 瀵硅瘎璁鸿繘琛屽垎椤 */ + if ($this->options->commentsPageBreak) { + if ('last' == $this->options->commentsPageDisplay && !$this->parameter->commentPage) { + $this->_currentPage = ceil($this->_total / $this->options->commentsPageSize); + } else { + $this->_currentPage = $this->parameter->commentPage ? $this->parameter->commentPage : 1; + } + + /** 鎴彇璇勮 */ + $this->stack = array_slice($this->stack, + ($this->_currentPage - 1) * $this->options->commentsPageSize, $this->options->commentsPageSize); + + /** 璇勮缃綅 */ + $this->row = current($this->stack); + $this->length = count($this->stack); + } + + reset($this->stack); + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + $value = $this->filter($value); + + /** 璁$畻娣卞害 */ + if (0 != $value['parent'] && isset($this->stack[$value['parent']]['levels'])) { + $value['levels'] = $this->stack[$value['parent']]['levels'] + 1; + } else { + $value['levels'] = 0; + } + + /** 閲嶈浇push鍑芥暟,浣跨敤coid浣滀负鏁扮粍閿,渚夸簬绱㈠紩 */ + $this->stack[$value['coid']] = $value; + $this->length ++; + + return $value; + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @param string $prev 涓婁竴椤垫枃瀛 + * @param string $next 涓嬩竴椤垫枃瀛 + * @param int $splitPage 鍒嗗壊鑼冨洿 + * @param string $splitWord 鍒嗗壊瀛楃 + * @param string $template 灞曠幇閰嶇疆淇℃伅 + * @return void + */ + public function pageNav($prev = '«', $next = '»', $splitPage = 3, $splitWord = '...', $template = '') + { + if ($this->options->commentsPageBreak && $this->_total > $this->options->commentsPageSize) { + $default = array( + 'wrapTag' => 'ol', + 'wrapClass' => 'page-navigator' + ); + + if (is_string($template)) { + parse_str($template, $config); + } else { + $config = $template; + } + + $template = array_merge($default, $config); + + $pageRow = $this->parameter->parentContent; + $pageRow['permalink'] = $pageRow['pathinfo']; + + $query = Typecho_Router::url('comment_page', $pageRow, $this->options->index); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box($this->_total, + $this->_currentPage, $this->options->commentsPageSize, $query); + $nav->setPageHolder('commentPage'); + $nav->setAnchor('comments'); + + echo '<' . $template['wrapTag'] . (empty($template['wrapClass']) + ? '' : ' class="' . $template['wrapClass'] . '"') . '>'; + $nav->render($prev, $next, $splitPage, $splitWord, $template); + echo '</' . $template['wrapTag'] . '>'; + } + } + + /** + * 閫掑綊杈撳嚭璇勮 + * + * @access protected + * @return void + */ + public function threadedComments() + { + $children = $this->children; + if ($children) { + //缂撳瓨鍙橀噺渚夸簬杩樺師 + $tmp = $this->row; + $this->sequence ++; + + //鍦ㄥ瓙璇勮涔嬪墠杈撳嚭 + echo $this->_singleCommentOptions->before; + + foreach ($children as $child) { + $this->row = $child; + $this->threadedCommentsCallback(); + $this->row = $tmp; + } + + //鍦ㄥ瓙璇勮涔嬪悗杈撳嚭 + echo $this->_singleCommentOptions->after; + + $this->sequence --; + } + } + + /** + * 鍒楀嚭璇勮 + * + * @access private + * @param mixed $singleCommentOptions 鍗曚釜璇勮鑷畾涔夐夐」 + * @return void + */ + public function listComments($singleCommentOptions = NULL) + { + //鍒濆鍖栦竴浜涘彉閲 + $this->_singleCommentOptions = Typecho_Config::factory($singleCommentOptions); + $this->_singleCommentOptions->setDefault(array( + 'before' => '<ol class="comment-list">', + 'after' => '</ol>', + 'beforeAuthor' => '', + 'afterAuthor' => '', + 'beforeDate' => '', + 'afterDate' => '', + 'dateFormat' => $this->options->commentDateFormat, + 'replyWord' => _t('鍥炲'), + 'commentStatus' => _t('鎮ㄧ殑璇勮姝g瓑寰呭鏍革紒'), + 'avatarSize' => 32, + 'defaultAvatar' => NULL + )); + $this->pluginHandle()->trigger($plugged)->listComments($this->_singleCommentOptions, $this); + + if (!$plugged) { + if ($this->have()) { + echo $this->_singleCommentOptions->before; + + while ($this->next()) { + $this->threadedCommentsCallback(); + } + + echo $this->_singleCommentOptions->after; + } + } + } + + /** + * 閲嶈浇alt鍑芥暟,浠ラ傚簲澶氱骇璇勮 + * + * @access public + * @return void + */ + public function alt() + { + $args = func_get_args(); + $num = func_num_args(); + + $sequence = $this->levels <= 0 ? $this->sequence : $this->order; + + $split = $sequence % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 鏍规嵁娣卞害浣欐暟杈撳嚭 + * + * @access public + * @param string $param 闇瑕佽緭鍑虹殑鍊 + * @return void + */ + public function levelsAlt() + { + $args = func_get_args(); + $num = func_num_args(); + $split = $this->levels % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 璇勮鍥炲閾炬帴 + * + * @access public + * @param string $word 鍥炲閾炬帴鏂囧瓧 + * @return void + */ + public function reply($word = '') + { + if ($this->options->commentsThreaded && !$this->isTopLevel && $this->parameter->allowComment) { + $word = empty($word) ? _t('鍥炲') : $word; + $this->pluginHandle()->trigger($plugged)->reply($word, $this); + + if (!$plugged) { + echo '<a href="' . substr($this->permalink, 0, - strlen($this->theId) - 1) . '?replyTo=' . $this->coid . + '#' . $this->parameter->respondId . '" rel="nofollow" onclick="return TypechoComment.reply(\'' . + $this->theId . '\', ' . $this->coid . ');">' . $word . '</a>'; + } + } + } + + /** + * 鍙栨秷璇勮鍥炲閾炬帴 + * + * @access public + * @param string $word 鍙栨秷鍥炲閾炬帴鏂囧瓧 + * @return void + */ + public function cancelReply($word = '') + { + if ($this->options->commentsThreaded) { + $word = empty($word) ? _t('鍙栨秷鍥炲') : $word; + $this->pluginHandle()->trigger($plugged)->cancelReply($word, $this); + + if (!$plugged) { + $replyId = $this->request->filter('int')->replyTo; + echo '<a id="cancel-comment-reply-link" href="' . $this->parameter->parentContent['permalink'] . '#' . $this->parameter->respondId . + '" rel="nofollow"' . ($replyId ? '' : ' style="display:none"') . ' onclick="return TypechoComment.cancelReply();">' . $word . '</a>'; + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Edit.php" new file mode 100644 index 0000000..39eeedf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Edit.php" @@ -0,0 +1,372 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 璇勮缂栬緫缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Edit extends Widget_Abstract_Comments implements Widget_Interface_Do +{ + /** + * 鏍囪璇勮鐘舵 + * + * @access private + * @param integer $coid 璇勮涓婚敭 + * @param string $status 鐘舵 + * @return boolean + */ + private function mark($coid, $status) + { + $comment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($comment && $this->commentIsWriteable()) { + /** 澧炲姞璇勮缂栬緫鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->mark($comment, $this, $status); + + /** 涓嶅繀鏇存柊鐨勬儏鍐 */ + if ($status == $comment['status']) { + return false; + } + + /** 鏇存柊璇勮 */ + $this->db->query($this->db->update('table.comments') + ->rows(array('status' => $status))->where('coid = ?', $coid)); + + /** 鏇存柊鐩稿叧鍐呭鐨勮瘎璁烘暟 */ + if ('approved' == $comment['status'] && 'approved' != $status) { + $this->db->query($this->db->update('table.contents') + ->expression('commentsNum', 'commentsNum - 1')->where('cid = ? AND commentsNum > 0', $comment['cid'])); + } else if ('approved' != $comment['status'] && 'approved' == $status) { + $this->db->query($this->db->update('table.contents') + ->expression('commentsNum', 'commentsNum + 1')->where('cid = ?', $comment['cid'])); + } + + return true; + } + + return false; + } + + /** + * 鏍囪涓哄緟瀹℃牳 + * + * @access public + * @return void + */ + public function waitingComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $updateRows = 0; + + foreach ($comments as $comment) { + if ($this->mark($comment, 'waiting')) { + $updateRows ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($updateRows > 0 ? _t('璇勮宸茬粡琚爣璁颁负寰呭鏍') : _t('娌℃湁璇勮琚爣璁颁负寰呭鏍'), + $updateRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鏍囪涓哄瀮鍦 + * + * @access public + * @return void + */ + public function spamComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $updateRows = 0; + + foreach ($comments as $comment) { + if ($this->mark($comment, 'spam')) { + $updateRows ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($updateRows > 0 ? _t('璇勮宸茬粡琚爣璁颁负鍨冨溇') : _t('娌℃湁璇勮琚爣璁颁负鍨冨溇'), + $updateRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鏍囪涓哄睍鐜 + * + * @access public + * @return void + */ + public function approvedComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $updateRows = 0; + + foreach ($comments as $comment) { + if ($this->mark($comment, 'approved')) { + $updateRows ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($updateRows > 0 ? _t('璇勮宸茬粡琚氳繃') : _t('娌℃湁璇勮琚氳繃'), + $updateRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鍒犻櫎璇勮 + * + * @access public + * @return void + */ + public function deleteComment() + { + $comments = $this->request->filter('int')->getArray('coid'); + $deleteRows = 0; + + foreach ($comments as $coid) { + $comment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($comment && $this->commentIsWriteable()) { + $this->pluginHandle()->delete($comment, $this); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments')->where('coid = ?', $coid)); + + /** 鏇存柊鐩稿叧鍐呭鐨勮瘎璁烘暟 */ + if ('approved' == $comment['status']) { + $this->db->query($this->db->update('table.contents') + ->expression('commentsNum', 'commentsNum - 1')->where('cid = ?', $comment['cid'])); + } + + $this->pluginHandle()->finishDelete($comment, $this); + + $deleteRows ++; + } + } + + if ($this->request->isAjax()) { + + if ($deleteRows > 0) { + $this->response->throwJson(array( + 'success' => 1, + 'message' => _t('鍒犻櫎璇勮鎴愬姛') + )); + } else { + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('鍒犻櫎璇勮澶辫触') + )); + } + + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteRows > 0 ? _t('璇勮宸茬粡琚垹闄') : _t('娌℃湁璇勮琚垹闄'), + $deleteRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + } + + /** + * 鍒犻櫎鎵鏈夊瀮鍦捐瘎璁 + * + * @access public + * @return string + */ + public function deleteSpamComment() + { + $deleteQuery = $this->db->delete('table.comments')->where('status = ?', 'spam'); + if (!$this->request->__typecho_all_comments || !$this->user->pass('editor', true)) { + $deleteQuery->where('ownerId = ?', $this->user->uid); + } + + if (isset($this->request->cid)) { + $deleteQuery->where('cid = ?', $this->request->cid); + } + + $deleteRows = $this->db->query($deleteQuery); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteRows > 0 ? + _t('鎵鏈夊瀮鍦捐瘎璁哄凡缁忚鍒犻櫎') : _t('娌℃湁鍨冨溇璇勮琚垹闄'), + $deleteRows > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鑾峰彇鍙紪杈戠殑璇勮 + * + * @access public + * @return void + */ + public function getComment() + { + $coid = $this->request->filter('int')->coid; + $comment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($comment && $this->commentIsWriteable()) { + + $this->response->throwJson(array( + 'success' => 1, + 'comment' => $comment + )); + + } else { + + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('鑾峰彇璇勮澶辫触') + )); + + } + } + + /** + * 缂栬緫璇勮 + * + * @access public + * @return void + */ + public function editComment() + { + $coid = $this->request->filter('int')->coid; + $commentSelect = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($commentSelect && $this->commentIsWriteable()) { + + $comment['text'] = $this->request->text; + $comment['author'] = $this->request->filter('strip_tags', 'trim', 'xss')->author; + $comment['mail'] = $this->request->filter('strip_tags', 'trim', 'xss')->mail; + $comment['url'] = $this->request->filter('url')->url; + + /** 璇勮鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->edit($comment, $this); + + /** 鏇存柊璇勮 */ + $this->update($comment, $this->db->sql()->where('coid = ?', $coid)); + + $updatedComment = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + $updatedComment['content'] = $this->content; + + /** 璇勮鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->finishEdit($this); + + $this->response->throwJson(array( + 'success' => 1, + 'comment' => $updatedComment + )); + } + + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('淇瘎璁哄け璐') + )); + } + + /** + * 鍥炲璇勮 + * + * @access public + * @return void + */ + public function replyComment() + { + $coid = $this->request->filter('int')->coid; + $commentSelect = $this->db->fetchRow($this->select() + ->where('coid = ?', $coid)->limit(1), array($this, 'push')); + + if ($commentSelect && $this->commentIsWriteable()) { + + $comment = array( + 'cid' => $commentSelect['cid'], + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'ownerId' => $commentSelect['ownerId'], + 'authorId' => $this->user->uid, + 'type' => 'comment', + 'author' => $this->user->screenName, + 'mail' => $this->user->mail, + 'url' => $this->user->url, + 'parent' => $coid, + 'text' => $this->request->text, + 'status' => 'approved' + ); + + /** 璇勮鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->comment($comment, $this); + + /** 鍥炲璇勮 */ + $commentId = $this->insert($comment); + + $insertComment = $this->db->fetchRow($this->select() + ->where('coid = ?', $commentId)->limit(1), array($this, 'push')); + $insertComment['content'] = $this->content; + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishComment($this); + + $this->response->throwJson(array( + 'success' => 1, + 'comment' => $insertComment + )); + } + + $this->response->throwJson(array( + 'success' => 0, + 'message' => _t('鍥炲璇勮澶辫触') + )); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('contributor'); + $this->security->protect(); + $this->on($this->request->is('do=waiting'))->waitingComment(); + $this->on($this->request->is('do=spam'))->spamComment(); + $this->on($this->request->is('do=approved'))->approvedComment(); + $this->on($this->request->is('do=delete'))->deleteComment(); + $this->on($this->request->is('do=delete-spam'))->deleteSpamComment(); + $this->on($this->request->is('do=get&coid'))->getComment(); + $this->on($this->request->is('do=edit&coid'))->editComment(); + $this->on($this->request->is('do=reply&coid'))->replyComment(); + + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Ping.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Ping.php" new file mode 100644 index 0000000..1dd1c2f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Ping.php" @@ -0,0 +1,162 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍥炲搷褰掓。 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍥炲搷褰掓。缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Ping extends Widget_Abstract_Comments +{ + /** + * _customSinglePingCallback + * + * @var boolean + * @access private + */ + private $_customSinglePingCallback = false; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault('parentId=0'); + + /** 鍒濆鍖栧洖璋冨嚱鏁 */ + if (function_exists('singlePing')) { + $this->_customSinglePingCallback = true; + } + } + + /** + * 閲嶈浇鍐呭鑾峰彇 + * + * @access protected + * @return void + */ + protected function ___parentContent() + { + return $this->parameter->parentContent; + } + + /** + * 鍥炲搷鍥炶皟鍑芥暟 + * + * @access private + * @param string $singlePingOptions 鍗曚釜鍥炲搷鑷畾涔夐夐」 + * @return void + */ + private function singlePingCallback($singlePingOptions) + { + if ($this->_customSinglePingCallback) { + return singlePing($this, $singlePingOptions); + } + +?> +<li id="<?php $this->theId(); ?>" class="ping-body"> + <div class="ping-title"> + <cite class="fn"><?php + $singlePingOptions->beforeTitle(); + $this->author(true); + $singlePingOptions->afterTitle(); + ?></cite> + </div> + <div class="ping-meta"> + <a href="<?php $this->permalink(); ?>"><?php $singlePingOptions->beforeDate(); + $this->date($singlePingOptions->dateFormat); + $singlePingOptions->afterDate(); ?></a> + </div> + <?php $this->content(); ?> +</li> +<?php + } + + /** + * 杈撳嚭鏂囩珷鍥炲搷鏁 + * + * @access public + * @param string $string 璇勮鏁版牸寮忓寲鏁版嵁 + * @return void + */ + public function num() + { + $args = func_get_args(); + if (!$args) { + $args[] = '%d'; + } + + echo sprintf(isset($args[$this->length]) ? $args[$this->length] : array_pop($this->length), $this->length); + } + + /** + * execute + * + * @access public + * @return void + */ + public function execute() + { + if (!$this->parameter->parentId) { + return; + } + + $select = $this->select()->where('table.comments.status = ?', 'approved') + ->where('table.comments.cid = ?', $this->parameter->parentId) + ->where('table.comments.type <> ?', 'comment') + ->order('table.comments.coid', 'ASC'); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 鍒楀嚭鍥炲搷 + * + * @access private + * @param mixed $singlePingOptions 鍗曚釜鍥炲搷鑷畾涔夐夐」 + * @return void + */ + public function listPings($singlePingOptions = NULL) + { + if ($this->have()) { + //鍒濆鍖栦竴浜涘彉閲 + $parsedSinglePingOptions = Typecho_Config::factory($singlePingOptions); + $parsedSinglePingOptions->setDefault(array( + 'before' => '<ol class="ping-list">', + 'after' => '</ol>', + 'beforeTitle' => '', + 'afterTitle' => '', + 'beforeDate' => '', + 'afterDate' => '', + 'dateFormat' => $this->options->commentDateFormat + )); + + echo $parsedSinglePingOptions->before; + + while ($this->next()) { + $this->singlePingCallback($parsedSinglePingOptions); + } + + echo $parsedSinglePingOptions->after; + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Recent.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Recent.php" new file mode 100644 index 0000000..56ce4ce --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Comments/Recent.php" @@ -0,0 +1,63 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏈杩戣瘎璁虹粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Comments_Recent extends Widget_Abstract_Comments +{ + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault(array('pageSize' => $this->options->commentsListSize, 'parentId' => 0, 'ignoreAuthor' => false)); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select()->limit($this->parameter->pageSize) + ->where('table.comments.status = ?', 'approved') + ->order('table.comments.coid', Typecho_Db::SORT_DESC); + + if ($this->parameter->parentId) { + $select->where('cid = ?', $this->parameter->parentId); + } + + if ($this->options->commentsShowCommentOnly) { + $select->where('type = ?', 'comment'); + } + + /** 蹇界暐浣滆呰瘎璁 */ + if ($this->parameter->ignoreAuthor) { + $select->where('ownerId <> authorId'); + } + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Admin.php" new file mode 100644 index 0000000..e1e57f9 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Admin.php" @@ -0,0 +1,125 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囦欢绠$悊鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囦欢绠$悊鍒楄〃缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Admin extends Widget_Abstract_Contents +{ + /** + * 鐢ㄤ簬璁$畻鏁板肩殑璇彞瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 鍒嗛〉澶у皬 + * + * @access private + * @var integer + */ + private $pageSize; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 鎵灞炴枃绔 + * + * @access protected + * @return Typecho_Config + */ + protected function ___parentPost() + { + return new Typecho_Config($this->db->fetchRow( + $this->select()->where('table.contents.cid = ?', $this->parentId) + ->limit(1))); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('pageSize=20'); + $this->_currentPage = $this->request->get('page', 1); + + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ?', 'attachment'); + + /** 濡傛灉鍏锋湁缂栬緫浠ヤ笂鏉冮檺,鍙互鏌ョ湅鎵鏈夋枃浠,鍙嶄箣鍙兘鏌ョ湅鑷繁鐨勬枃浠 */ + if (!$this->user->pass('editor', true)) { + $select->where('table.contents.authorId = ?', $this->user->uid); + } + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->filter('search')->keywords)) { + $args = array(); + $keywordsList = explode(' ', $keywords); + $args[] = implode(' OR ', array_fill(0, count($keywordsList), 'table.contents.title LIKE ?')); + + foreach ($keywordsList as $keyword) { + $args[] = '%' . $keyword . '%'; + } + + call_user_func_array(array($select, 'where'), $args); + } + + /** 缁欒绠楁暟鐩璞¤祴鍊,鍏嬮殕瀵硅薄 */ + $this->_countSql = clone $select; + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}'); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render('«', '»'); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Edit.php" new file mode 100644 index 0000000..c001970 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Edit.php" @@ -0,0 +1,330 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鏂囩珷 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鏂囩珷缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Edit extends Widget_Contents_Post_Edit implements Widget_Interface_Do +{ + /** + * 鑾峰彇椤甸潰鍋忕Щ鐨刄RL Query + * + * @access protected + * @param integer $cid 鏂囦欢id + * @param string $status 鐘舵 + * @return string + */ + protected function getPageOffsetQuery($cid, $status = NULL) + { + return 'page=' . $this->getPageOffset('cid', $cid, 'attachment', $status, + $this->user->pass('editor', true) ? 0 : $this->user->uid); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 蹇呴』涓鸿础鐚呬互涓婃潈闄 */ + $this->user->pass('contributor'); + + /** 鑾峰彇鏂囩珷鍐呭 */ + if ((isset($this->request->cid) && 'delete' != $this->request->do + && 'insert' != $this->request->do) || 'update' == $this->request->do) { + $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->limit(1), array($this, 'push')); + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('鏂囦欢涓嶅瓨鍦'), 404); + } else if ($this->have() && !$this->allow('edit')) { + throw new Typecho_Widget_Exception(_t('娌℃湁缂栬緫鏉冮檺'), 403); + } + } + } + + /** + * 鍒ゆ柇鏂囦欢鍚嶈浆鎹㈠埌缂╃暐鍚嶅悗鏄惁鍚堟硶 + * + * @access public + * @param string $name 鏂囦欢鍚 + * @return boolean + */ + public function nameToSlug($name) + { + if (empty($this->request->slug)) { + $slug = Typecho_Common::slugName($name); + if (empty($slug) || !$this->slugExists($name)) { + return false; + } + } + + return true; + } + + /** + * 鍒ゆ柇鏂囦欢缂╃暐鍚嶆槸鍚﹀瓨鍦 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @return boolean + */ + public function slugExists($slug) + { + $select = $this->db->select() + ->from('table.contents') + ->where('type = ?', 'attachment') + ->where('slug = ?', Typecho_Common::slugName($slug)) + ->limit(1); + + if ($this->request->cid) { + $select->where('cid <> ?', $this->request->cid); + } + + $attachment = $this->db->fetchRow($select); + return $attachment ? false : true; + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @return Typecho_Widget_Helper_Form_Element + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/contents-attachment-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鏂囦欢鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, $this->title, _t('鏍囬 *')); + $form->addInput($name); + + /** 鏂囦欢缂╃暐鍚 */ + $slug = new Typecho_Widget_Helper_Form_Element_Text('slug', NULL, $this->slug, _t('缂╃暐鍚'), + _t('鏂囦欢缂╃暐鍚嶇敤浜庡垱寤哄弸濂界殑閾炬帴褰㈠紡,寤鸿浣跨敤瀛楁瘝,鏁板瓧,涓嬪垝绾垮拰妯潬.')); + $form->addInput($slug); + + /** 鏂囦欢鎻忚堪 */ + $description = new Typecho_Widget_Helper_Form_Element_Textarea('description', NULL, $this->attachment->description, + _t('鎻忚堪'), _t('姝ゆ枃瀛楃敤浜庢弿杩版枃浠,鍦ㄦ湁鐨勪富棰樹腑瀹冧細琚樉绀.')); + $form->addInput($description); + + /** 鍒嗙被鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'update'); + $form->addInput($do); + + /** 鍒嗙被涓婚敭 */ + $cid = new Typecho_Widget_Helper_Form_Element_Hidden('cid', NULL, $this->cid); + $form->addInput($cid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('鎻愪氦淇敼')); + $submit->input->setAttribute('class', 'btn primary'); + $delete = new Typecho_Widget_Helper_Layout('a', array( + 'href' => $this->security->getIndex('/action/contents-attachment-edit?do=delete&cid=' . $this->cid), + 'class' => 'operate-delete', + 'lang' => _t('浣犵‘璁ゅ垹闄ゆ枃浠 %s 鍚?', $this->attachment->name) + )); + $submit->container($delete->html(_t('鍒犻櫎鏂囦欢'))); + $form->addItem($submit); + + $name->addRule('required', _t('蹇呴』濉啓鏂囦欢鏍囬')); + $name->addRule(array($this, 'nameToSlug'), _t('鏂囦欢鏍囬鏃犳硶琚浆鎹负缂╃暐鍚')); + $slug->addRule(array($this, 'slugExists'), _t('缂╃暐鍚嶅凡缁忓瓨鍦')); + + return $form; + } + + /** + * 鏇存柊鏂囦欢 + * + * @access public + * @return void + */ + public function updateAttachment() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $input = $this->request->from('name', 'slug', 'description'); + $input['slug'] = Typecho_Common::slugName(empty($input['slug']) ? $input['name'] : $input['slug']); + + $attachment['title'] = $input['name']; + $attachment['slug'] = $input['slug']; + + $content = unserialize($this->attachment->__toString()); + $content['description'] = $input['description']; + + $attachment['text'] = serialize($content); + $cid = $this->request->filter('int')->cid; + + /** 鏇存柊鏁版嵁 */ + $updateRows = $this->update($attachment, $this->db->sql()->where('cid = ?', $cid)); + + if ($updateRows > 0) { + + $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $cid) + ->limit(1), array($this, 'push')); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set('publish' == $this->status ? + _t('鏂囦欢 <a href="%s">%s</a> 宸茬粡琚洿鏂', $this->permalink, $this->title) : + _t('鏈綊妗f枃浠 %s 宸茬粡琚洿鏂', $this->title), 'success'); + + } + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-medias.php?' . + $this->getPageOffsetQuery($cid, $this->status), $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鏂囩珷 + * + * @access public + * @return void + */ + public function deleteAttachment() + { + $posts = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($posts as $post) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($post, $this); + + $condition = $this->db->sql()->where('cid = ?', $post); + $row = $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $post) + ->limit(1), array($this, 'push')); + + if ($this->isWriteable($condition) && $this->delete($condition)) { + /** 鍒犻櫎鏂囦欢 */ + Widget_Upload::deleteHandle($row); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $post)); + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($post, $this); + + $deleteCount ++; + } + + unset($condition); + } + + if ($this->request->isAjax()) { + $this->response->throwJson($deleteCount > 0 ? array('code' => 200, 'message' => _t('鏂囦欢宸茬粡琚垹闄')) + : array('code' => 500, 'message' => _t('娌℃湁鏂囦欢琚垹闄'))); + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏂囦欢宸茬粡琚垹闄') : _t('娌℃湁鏂囦欢琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->redirect(Typecho_Common::url('manage-medias.php', $this->options->adminUrl)); + } + } + + /** + * clearAttachment + * + * @access public + * @return void + */ + public function clearAttachment() + { + $page = 1; + $deleteCount = 0; + + do { + $posts = Typecho_Common::arrayFlatten($this->db->fetchAll($this->select('cid') + ->from('table.contents') + ->where('type = ? AND parent = ?', 'attachment', 0) + ->page($page, 100)), 'cid'); + $page ++; + + foreach ($posts as $post) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($post, $this); + + $condition = $this->db->sql()->where('cid = ?', $post); + $row = $this->db->fetchRow($this->select() + ->where('table.contents.type = ?', 'attachment') + ->where('table.contents.cid = ?', $post) + ->limit(1), array($this, 'push')); + + if ($this->isWriteable($condition) && $this->delete($condition)) { + /** 鍒犻櫎鏂囦欢 */ + Widget_Upload::deleteHandle($row); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $post)); + + $status = $this->status; + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($post, $this); + + $deleteCount ++; + } + + unset($condition); + } + } while (count($posts) == 100); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏈綊妗f枃浠跺凡缁忚娓呯悊') : _t('娌℃湁鏈綊妗f枃浠惰娓呯悊'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->redirect(Typecho_Common::url('manage-medias.php', $this->options->adminUrl)); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=delete'))->deleteAttachment(); + $this->on($this->request->is('do=update'))->updateAttachment(); + $this->on($this->request->is('do=clear'))->clearAttachment(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Related.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Related.php" new file mode 100644 index 0000000..61f84b7 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Related.php" @@ -0,0 +1,57 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囩珷鐩稿叧鏂囦欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囩珷鐩稿叧鏂囦欢缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Related extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('parentId=0&limit=0'); + + //濡傛灉娌℃湁cid鍊 + if (!$this->parameter->parentId) { + return; + } + + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ?', 'attachment'); + + //order瀛楁鍦ㄦ枃浠堕噷浠h〃鎵灞炴枃绔 + $select->where('table.contents.parent = ?', $this->parameter->parentId); + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_ASC); + + if ($this->parameter->limit > 0) { + $select->limit($this->parameter->limit); + } + + if ($this->parameter->offset > 0) { + $select->offset($this->parameter->offset); + } + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" new file mode 100644 index 0000000..768bb43 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Attachment/Unattached.php" @@ -0,0 +1,43 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 娌℃湁鍏宠仈鐨勬枃浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 娌℃湁鍏宠仈鐨勬枃浠剁粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Attachment_Unattached extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ? AND + (table.contents.parent = 0 OR table.contents.parent IS NULL)', 'attachment'); + + /** 鍔犱笂瀵圭敤鎴风殑鍒ゆ柇 */ + $this->where('table.contents.authorId = ?', $this->user->uid); + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_DESC); + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Admin.php" new file mode 100644 index 0000000..e65abfc --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Admin.php" @@ -0,0 +1,52 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐙珛椤甸潰绠$悊鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐙珛椤甸潰绠$悊鍒楄〃缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Page_Admin extends Widget_Contents_Post_Admin +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 杩囨护鐘舵 */ + $select = $this->select()->where('table.contents.type = ? OR (table.contents.type = ? AND table.contents.parent = ?)', 'page', 'page_draft', 0); + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->keywords)) { + $args = array(); + $keywordsList = explode(' ', $keywords); + $args[] = implode(' OR ', array_fill(0, count($keywordsList), 'table.contents.title LIKE ?')); + + foreach ($keywordsList as $keyword) { + $args[] = '%' . Typecho_Common::filterSearchQuery($keyword) . '%'; + } + + call_user_func_array(array($select, 'where'), $args); + } + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.order', Typecho_Db::SORT_ASC); + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Edit.php" new file mode 100644 index 0000000..9b03d2a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/Edit.php" @@ -0,0 +1,262 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫椤甸潰 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫椤甸潰缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Page_Edit extends Widget_Contents_Post_Edit implements Widget_Interface_Do +{ + /** + * 鑷畾涔夊瓧娈电殑hook鍚嶇О + * + * @var string + * @access protected + */ + protected $themeCustomFieldsHook = 'themePageFields'; + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 蹇呴』涓虹紪杈戜互涓婃潈闄 */ + $this->user->pass('editor'); + + /** 鑾峰彇鏂囩珷鍐呭 */ + if (!empty($this->request->cid) && 'delete' != $this->request->do + && 'sort' != $this->request->do) { + $this->db->fetchRow($this->select() + ->where('table.contents.type = ? OR table.contents.type = ?', 'page', 'page_draft') + ->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->limit(1), array($this, 'push')); + + if ('page_draft' == $this->status && $this->parent) { + $this->response->redirect(Typecho_Common::url('write-page.php?cid=' . $this->parent, $this->options->adminUrl)); + } + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('椤甸潰涓嶅瓨鍦'), 404); + } else if ($this->have() && !$this->allow('edit')) { + throw new Typecho_Widget_Exception(_t('娌℃湁缂栬緫鏉冮檺'), 403); + } + } + } + + /** + * 鍙戝竷鏂囩珷 + * + * @access public + * @return void + */ + public function writePage() + { + $contents = $this->request->from('text', 'template', 'allowComment', + 'allowPing', 'allowFeed', 'slug', 'order', 'visibility'); + + $contents['title'] = $this->request->get('title', _t('鏈懡鍚嶉〉闈')); + $contents['created'] = $this->getCreated(); + $contents['visibility'] = ('hidden' == $contents['visibility'] ? 'hidden' : 'publish'); + + if ($this->request->markdown && $this->options->markdown) { + $contents['text'] = '<!--markdown-->' . $contents['text']; + } + + $contents = $this->pluginHandle()->write($contents, $this); + + if ($this->request->is('do=publish')) { + /** 閲嶆柊鍙戝竷宸茬粡瀛樺湪鐨勬枃绔 */ + $contents['type'] = 'page'; + $this->publish($contents); + + // 瀹屾垚鍙戝竷鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishPublish($contents, $this); + + /** 鍙戦乸ing */ + $this->widget('Widget_Service')->sendPing($this->cid); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('椤甸潰 "<a href="%s">%s</a>" 宸茬粡鍙戝竷', $this->permalink, $this->title), 'success'); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 椤甸潰璺宠浆 */ + $this->response->redirect(Typecho_Common::url('manage-pages.php?', $this->options->adminUrl)); + } else { + /** 淇濆瓨鏂囩珷 */ + $contents['type'] = 'page_draft'; + $this->save($contents); + + // 瀹屾垚鍙戝竷鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishSave($contents, $this); + + if ($this->request->isAjax()) { + $created = new Typecho_Date($this->options->gmtTime); + $this->response->throwJson(array( + 'success' => 1, + 'time' => $created->format('H:i:s A'), + 'cid' => $this->cid + )); + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鑽夌ǹ "%s" 宸茬粡琚繚瀛', $this->title), 'success'); + + /** 杩斿洖鍘熼〉闈 */ + $this->response->redirect(Typecho_Common::url('write-page.php?cid=' . $this->cid, $this->options->adminUrl)); + } + } + } + + /** + * 鍒犻櫎椤甸潰 + * + * @access public + * @return void + */ + public function deletePage() + { + $pages = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($pages as $page) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($page, $this); + + if ($this->delete($this->db->sql()->where('cid = ?', $page))) { + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $page)); + + /** 瑙i櫎闄勪欢鍏宠仈 */ + $this->unAttach($page); + + /** 瑙i櫎棣栭〉鍏宠仈 */ + if ($this->options->frontPage == 'page:' . $page) { + $this->db->query($this->db->update('table.options') + ->rows(array('value' => 'recent')) + ->where('name = ?', 'frontPage')); + } + + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $page, 'page_draft') + ->limit(1)); + + /** 鍒犻櫎鑷畾涔夊瓧娈 */ + $this->deleteFields($page); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + } + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($page, $this); + + $deleteCount ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('椤甸潰宸茬粡琚垹闄') : _t('娌℃湁椤甸潰琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鍒犻櫎椤甸潰鎵灞炶崏绋 + * + * @access public + * @return void + */ + public function deletePageDraft() + { + $pages = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($pages as $page) { + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $page, 'page_draft') + ->limit(1)); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + $deleteCount ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鑽夌ǹ宸茬粡琚垹闄') : _t('娌℃湁鑽夌ǹ琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 椤甸潰鎺掑簭 + * + * @access public + * @return void + */ + public function sortPage() + { + $pages = $this->request->filter('int')->getArray('cid'); + + if ($pages) { + foreach ($pages as $sort => $cid) { + $this->db->query($this->db->update('table.contents')->rows(array('order' => $sort + 1)) + ->where('cid = ?', $cid)); + } + } + + if (!$this->request->isAjax()) { + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } else { + $this->response->throwJson(array('success' => 1, 'message' => _t('椤甸潰鎺掑簭宸茬粡瀹屾垚'))); + } + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=publish') || $this->request->is('do=save'))->writePage(); + $this->on($this->request->is('do=delete'))->deletePage(); + $this->on($this->request->is('do=deleteDraft'))->deletePageDraft(); + $this->on($this->request->is('do=sort'))->sortPage(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/List.php" new file mode 100644 index 0000000..92580f2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Page/List.php" @@ -0,0 +1,45 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐙珛椤甸潰鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐙珛椤甸潰鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Page_List extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select()->where('table.contents.type = ?', 'page') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->order('table.contents.order', Typecho_Db::SORT_ASC); + + //鍘绘帀鑷畾涔夐椤 + $frontPage = explode(':', $this->options->frontPage); + if (2 == count($frontPage) && 'page' == $frontPage[0]) { + $select->where('table.contents.cid <> ?', $frontPage[1]); + } + + $this->db->fetchAll($select, array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Admin.php" new file mode 100644 index 0000000..ae6a141 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Admin.php" @@ -0,0 +1,151 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囩珷绠$悊鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囩珷绠$悊鍒楄〃缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Post_Admin extends Widget_Abstract_Contents +{ + /** + * 鐢ㄤ簬璁$畻鏁板肩殑璇彞瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 褰撳墠鏂囩珷鐨勮崏绋 + * + * @access protected + * @return array + */ + protected function ___hasSaved() + { + $savedPost = $this->db->fetchRow($this->db->select('cid', 'modified') + ->from('table.contents') + ->where('table.contents.parent = ? AND (table.contents.type = ? OR table.contents.type = ?)', + $this->cid, 'post_draft', 'page_draft') + ->limit(1)); + + if ($savedPost) { + $this->modified = $savedPost['modified']; + return true; + } + + return false; + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + if (isset($this->request->uid)) { + return _t('%s鐨勬枃绔', $this->db->fetchObject($this->db->select('screenName')->from('table.users') + ->where('uid = ?', $this->request->filter('int')->uid))->screenName); + } + + throw new Typecho_Widget_Exception(_t('鐢ㄦ埛涓嶅瓨鍦'), 404); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('pageSize=20'); + $this->_currentPage = $this->request->get('page', 1); + + /** 鏋勫缓鍩虹鏌ヨ */ + $select = $this->select()->where('table.contents.type = ? OR (table.contents.type = ? AND table.contents.parent = ?)', 'post', 'post_draft', 0); + + /** 杩囨护鍒嗙被 */ + if (NULL != ($category = $this->request->category)) { + $select->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid = ?', $category); + } + + /** 濡傛灉鍏锋湁缂栬緫浠ヤ笂鏉冮檺,鍙互鏌ョ湅鎵鏈夋枃绔,鍙嶄箣鍙兘鏌ョ湅鑷繁鐨勬枃绔 */ + if (!$this->user->pass('editor', true)) { + $select->where('table.contents.authorId = ?', $this->user->uid); + } else if (isset($this->request->uid)) { + $select->where('table.contents.authorId = ?', $this->request->filter('int')->uid); + } + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->filter('search')->keywords)) { + $args = array(); + $keywordsList = explode(' ', $keywords); + $args[] = implode(' OR ', array_fill(0, count($keywordsList), 'table.contents.title LIKE ?')); + + foreach ($keywordsList as $keyword) { + $args[] = '%' . $keyword . '%'; + } + + call_user_func_array(array($select, 'where'), $args); + } + + /** 缁欒绠楁暟鐩璞¤祴鍊,鍏嬮殕瀵硅薄 */ + $this->_countSql = clone $select; + + /** 鎻愪氦鏌ヨ */ + $select->order('table.contents.created', Typecho_Db::SORT_DESC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}'); + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render('«', '»'); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Date.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Date.php" new file mode 100644 index 0000000..e3de4fb --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Date.php" @@ -0,0 +1,102 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鎸夋棩鏈熷綊妗e垪琛ㄧ粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎸夋棩鏈熷綊妗e垪琛ㄧ粍浠 + * + * @fixme 浜ょ粰缂撳瓨 + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Contents_Post_Date extends Typecho_Widget +{ + /** + * 鍏ㄥ眬閫夐」 + * + * @access protected + * @var Widget_Options + */ + protected $options; + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->options = $this->widget('Widget_Options'); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function execute() + { + /** 璁剧疆鍙傛暟榛樿鍊 */ + $this->parameter->setDefault('format=Y-m&type=month&limit=0'); + + $resource = $this->db->query($this->db->select('created')->from('table.contents') + ->where('type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->order('table.contents.created', Typecho_Db::SORT_DESC)); + + $offset = $this->options->timezone - $this->options->serverTimezone; + $result = array(); + while ($post = $this->db->fetchRow($resource)) { + $timeStamp = $post['created'] + $offset; + $date = date($this->parameter->format, $timeStamp); + + if (isset($result[$date])) { + $result[$date]['count'] ++; + } else { + $result[$date]['year'] = date('Y', $timeStamp); + $result[$date]['month'] = date('m', $timeStamp); + $result[$date]['day'] = date('d', $timeStamp); + $result[$date]['date'] = $date; + $result[$date]['count'] = 1; + } + } + + if ($this->parameter->limit > 0) { + $result = array_slice($result, 0, $this->parameter->limit); + } + + foreach ($result as $row) { + $row['permalink'] = Typecho_Router::url('archive_' . $this->parameter->type, $row, $this->widget('Widget_Options')->index); + $this->push($row); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Edit.php" new file mode 100644 index 0000000..54107db --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Edit.php" @@ -0,0 +1,917 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鏂囩珷 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鏂囩珷缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Post_Edit extends Widget_Abstract_Contents implements Widget_Interface_Do +{ + /** + * 鑷畾涔夊瓧娈电殑hook鍚嶇О + * + * @var string + * @access protected + */ + protected $themeCustomFieldsHook = 'themePostFields'; + + /** + * 灏唗ags鍙栧嚭 + * + * @access protected + * @return array + */ + protected function ___tags() + { + if ($this->have()) { + return $this->db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $this->cid) + ->where('table.metas.type = ?', 'tag'), array($this->widget('Widget_Abstract_Metas'), 'filter')); + } + + return array(); + } + + /** + * 鑾峰彇褰撳墠鏃堕棿 + * + * @access protected + * @return Typecho_Date + */ + protected function ___date() + { + return new Typecho_Date($this->options->gmtTime); + } + + /** + * 褰撳墠鏂囩珷鐨勮崏绋 + * + * @access protected + * @return array + */ + protected function ___draft() + { + if ($this->have()) { + if ('post_draft' == $this->type) { + return $this->row; + } else { + return $this->db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.parent = ? AND (table.contents.type = ? OR table.contents.type = ?)', + $this->cid, 'post_draft', 'page_draft') + ->limit(1), array($this->widget('Widget_Abstract_Contents'), 'filter')); + } + } + + return NULL; + } + + /** + * getFields + * + * @access protected + * @return void + */ + protected function getFields() + { + $fields = array(); + $fieldNames = $this->request->getArray('fieldNames'); + + if (!empty($fieldNames)) { + $data = array( + 'fieldNames' => $this->request->getArray('fieldNames'), + 'fieldTypes' => $this->request->getArray('fieldTypes'), + 'fieldValues' => $this->request->getArray('fieldValues') + ); + foreach ($data['fieldNames'] as $key => $val) { + if (empty($val)) { + continue; + } + + $fields[$val] = array($data['fieldTypes'][$key], $data['fieldValues'][$key]); + } + } + + $customFields = $this->request->getArray('fields'); + if (!empty($customFields)) { + $fields = array_merge($fields, $customFields); + } + + return $fields; + } + + /** + * 鏍规嵁鎻愪氦鍊艰幏鍙朿reated瀛楁鍊 + * + * @access protected + * @return integer + */ + protected function getCreated() + { + $created = $this->options->gmtTime; + if (!empty($this->request->created)) { + $created = $this->request->created; + } else if (!empty($this->request->date)) { + $created = strtotime($this->request->date) - $this->options->timezone + $this->options->serverTimezone; + } else if (!empty($this->request->year) && !empty($this->request->month) && !empty($this->request->day)) { + $second = intval($this->request->get('sec', date('s'))); + $min = intval($this->request->get('min', date('i'))); + $hour = intval($this->request->get('hour', date('H'))); + + $year = intval($this->request->year); + $month = intval($this->request->month); + $day = intval($this->request->day); + + $created = mktime($hour, $min, $second, $month, $day, $year) - $this->options->timezone + $this->options->serverTimezone; + } else if ($this->request->is('cid')) { + //濡傛灉鏄慨鏀规枃绔 + $created = $this->created; + } + + return $created; + } + + /** + * 鍚屾闄勪欢 + * + * @access protected + * @param integer $cid 鍐呭id + * @return void + */ + protected function attach($cid) + { + $attachments = $this->request->getArray('attachment'); + if (!empty($attachments)) { + foreach ($attachments as $key => $attachment) { + $this->db->query($this->db->update('table.contents')->rows(array('parent' => $cid, 'status' => 'publish', + 'order' => $key + 1))->where('cid = ? AND type = ?', $attachment, 'attachment')); + } + } + } + + /** + * 鍙栨秷闄勪欢鍏宠仈 + * + * @access protected + * @param integer $cid 鍐呭id + * @return void + */ + protected function unAttach($cid) + { + $this->db->query($this->db->update('table.contents')->rows(array('parent' => 0, 'status' => 'publish')) + ->where('parent = ? AND type = ?', $cid, 'attachment')); + } + + /** + * 鑾峰彇椤甸潰鍋忕Щ鐨刄RL Query + * + * @access protected + * @param integer $created 鍒涘缓鏃堕棿 + * @param string $status 鐘舵 + * @return string + */ + protected function getPageOffsetQuery($created, $status = NULL) + { + return 'page=' . $this->getPageOffset('created', $created, 'post', $status, + 'on' == $this->request->__typecho_all_posts ? 0 : $this->user->uid); + } + + /** + * 鍒犻櫎鑽夌ǹ + * + * @access protected + * @param integer $cid 鑽夌ǹid + * @return void + */ + protected function deleteDraft($cid) + { + $this->delete($this->db->sql()->where('cid = ?', $cid)); + + /** 鍒犻櫎鑽夌ǹ鍒嗙被 */ + $this->setCategories($cid, array(), false, false); + + /** 鍒犻櫎鏍囩 */ + $this->setTags($cid, NULL, false, false); + } + + /** + * 鍙戝竷鍐呭 + * + * @access protected + * @param array $contents 鍐呭缁撴瀯 + * @return void + */ + protected function publish(array $contents) + { + /** 鍙戝竷鍐呭, 妫鏌ユ槸鍚﹀叿鏈夌洿鎺ュ彂甯冪殑鏉冮檺 */ + if ($this->user->pass('editor', true)) { + if (empty($contents['visibility'])) { + $contents['status'] = 'publish'; + } else if ('password' == $contents['visibility'] || !in_array($contents['visibility'], array('private', 'waiting', 'publish', 'hidden'))) { + if (empty($contents['password']) || 'password' != $contents['visibility']) { + $contents['password'] = ''; + } + $contents['status'] = 'publish'; + } else { + $contents['status'] = $contents['visibility']; + $contents['password'] = ''; + } + } else { + $contents['status'] = 'waiting'; + $contents['password'] = ''; + } + + /** 鐪熷疄鐨勫唴瀹筰d */ + $realId = 0; + + /** 鏄惁鏄粠鑽夌ǹ鐘舵佸彂甯 */ + $isDraftToPublish = ('post_draft' == $this->type); + + $isBeforePublish = ('publish' == $this->status); + $isAfterPublish = ('publish' == $contents['status']); + + /** 閲嶆柊鍙戝竷鐜版湁鍐呭 */ + if ($this->have()) { + + /** 濡傛灉瀹冩湰韬笉鏄崏绋, 闇瑕佸垹闄ゅ叾鑽夌ǹ */ + if (!$isDraftToPublish && $this->draft) { + $this->deleteDraft($this->draft['cid']); + $this->deleteFields($this->draft['cid']); + } + + /** 鐩存帴灏嗚崏绋跨姸鎬佹洿鏀 */ + if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->cid))) { + $realId = $this->cid; + } + + } else { + /** 鍙戝竷涓涓柊鍐呭 */ + $realId = $this->insert($contents); + } + + if ($realId > 0) { + /** 鎻掑叆鍒嗙被 */ + if (array_key_exists('category', $contents)) { + $this->setCategories($realId, !empty($contents['category']) && is_array($contents['category']) ? + $contents['category'] : array($this->options->defaultCategory), !$isDraftToPublish && $isBeforePublish, $isAfterPublish); + } + + /** 鎻掑叆鏍囩 */ + if (array_key_exists('tags', $contents)) { + $this->setTags($realId, $contents['tags'], !$isDraftToPublish && $isBeforePublish, $isAfterPublish); + } + + /** 鍚屾闄勪欢 */ + $this->attach($realId); + + /** 淇濆瓨鑷畾涔夊瓧娈 */ + $this->applyFields($this->getFields(), $realId); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $realId)->limit(1), array($this, 'push')); + } + } + + /** + * 淇濆瓨鍐呭 + * + * @access protected + * @param array $contents 鍐呭缁撴瀯 + * @return void + */ + protected function save(array $contents) + { + /** 鍙戝竷鍐呭, 妫鏌ユ槸鍚﹀叿鏈夌洿鎺ュ彂甯冪殑鏉冮檺 */ + if ($this->user->pass('editor', true)) { + if (empty($contents['visibility'])) { + $contents['status'] = 'publish'; + } else if ('password' == $contents['visibility'] || !in_array($contents['visibility'], array('private', 'waiting', 'publish', 'hidden'))) { + if (empty($contents['password']) || 'password' != $contents['visibility']) { + $contents['password'] = ''; + } + $contents['status'] = 'publish'; + } else { + $contents['status'] = $contents['visibility']; + $contents['password'] = ''; + } + } else { + $contents['status'] = 'waiting'; + $contents['password'] = ''; + } + + /** 鐪熷疄鐨勫唴瀹筰d */ + $realId = 0; + + /** 濡傛灉鑽夌ǹ宸茬粡瀛樺湪 */ + if ($this->draft) { + + /** 鐩存帴灏嗚崏绋跨姸鎬佹洿鏀 */ + if ($this->update($contents, $this->db->sql()->where('cid = ?', $this->draft['cid']))) { + $realId = $this->draft['cid']; + } + + } else { + if ($this->have()) { + $contents['parent'] = $this->cid; + } + + /** 鍙戝竷涓涓柊鍐呭 */ + $realId = $this->insert($contents); + + if (!$this->have()) { + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $realId)->limit(1), array($this, 'push')); + } + } + + if ($realId > 0) { + //$this->db->fetchRow($this->select()->where('table.contents.cid = ?', $realId)->limit(1), array($this, 'push')); + + /** 鎻掑叆鍒嗙被 */ + if (array_key_exists('category', $contents)) { + $this->setCategories($realId, !empty($contents['category']) && is_array($contents['category']) ? + $contents['category'] : array($this->options->defaultCategory), false, false); + } + + /** 鎻掑叆鏍囩 */ + if (array_key_exists('tags', $contents)) { + $this->setTags($realId, $contents['tags'], false, false); + } + + /** 鍚屾闄勪欢 */ + $this->attach($this->cid); + + /** 淇濆瓨鑷畾涔夊瓧娈 */ + $this->applyFields($this->getFields(), $realId); + } + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 蹇呴』涓鸿础鐚呬互涓婃潈闄 */ + $this->user->pass('contributor'); + + /** 鑾峰彇鏂囩珷鍐呭 */ + if (!empty($this->request->cid) && 'delete' != $this->request->do) { + $this->db->fetchRow($this->select() + ->where('table.contents.type = ? OR table.contents.type = ?', 'post', 'post_draft') + ->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->limit(1), array($this, 'push')); + + if ('post_draft' == $this->type && $this->parent) { + $this->response->redirect(Typecho_Common::url('write-post.php?cid=' . $this->parent, $this->options->adminUrl)); + } + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('鏂囩珷涓嶅瓨鍦'), 404); + } else if ($this->have() && !$this->allow('edit')) { + throw new Typecho_Widget_Exception(_t('娌℃湁缂栬緫鏉冮檺'), 403); + } + } + } + + /** + * 杩囨护鍫嗘爤 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function filter(array $value) + { + if ('post' == $value['type'] || 'page' == $value['type']) { + $draft = $this->db->fetchRow($this->widget('Widget_Abstract_Contents')->select() + ->where('table.contents.parent = ? AND table.contents.type = ?', + $value['cid'], $value['type'] . '_draft') + ->limit(1)); + + if (!empty($draft)) { + $draft['slug'] = ltrim($draft['slug'], '@'); + $draft['type'] = $value['type']; + + $draft = parent::filter($draft); + + $draft['tags'] = $this->db->fetchAll($this->db + ->select()->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $draft['cid']) + ->where('table.metas.type = ?', 'tag'), array($this->widget('Widget_Abstract_Metas'), 'filter')); + $draft['cid'] = $value['cid']; + + return $draft; + } + } + + return parent::filter($value); + } + + /** + * 杈撳嚭鏂囩珷鍙戝竷鏃ユ湡 + * + * @access public + * @param string $format 鏃ユ湡鏍煎紡 + * @return void + */ + public function date($format = NULL) + { + if (isset($this->created)) { + parent::date($format); + } else { + echo date($format, $this->options->gmtTime + $this->options->timezone - $this->options->serverTimezone); + } + } + + /** + * 鑾峰彇鏂囩珷鏉冮檺 + * + * @access public + * @param string $permission 鏉冮檺 + * @return unknown + */ + public function allow() + { + $permissions = func_get_args(); + $allow = true; + + foreach ($permissions as $permission) { + $permission = strtolower($permission); + + if ('edit' == $permission) { + $allow &= ($this->user->pass('editor', true) || $this->authorId == $this->user->uid); + } else { + $permission = 'allow' . ucfirst(strtolower($permission)); + $optionPermission = 'default' . ucfirst($permission); + $allow &= (isset($this->{$permission}) ? $this->{$permission} : $this->options->{$optionPermission}); + } + } + + return $allow; + } + + /** + * 鑾峰彇缃戦〉鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('缂栬緫 %s', $this->title); + } + + /** + * getDefaultFieldItems + * + * @access public + * @return array + */ + public function getDefaultFieldItems() + { + $defaultFields = array(); + $configFile = $this->options->themeFile($this->options->theme, 'functions.php'); + $layout = new Typecho_Widget_Helper_Layout(); + $fields = new Typecho_Config(); + + if ($this->have()) { + $fields = $this->fields; + } + + $this->pluginHandle()->getDefaultFieldItems($layout); + + if (file_exists($configFile)) { + require_once $configFile; + + if (function_exists('themeFields')) { + themeFields($layout); + } + + if (function_exists($this->themeCustomFieldsHook)) { + call_user_func($this->themeCustomFieldsHook, $layout); + } + } + + $items = $layout->getItems(); + foreach ($items as $item) { + if ($item instanceof Typecho_Widget_Helper_Form_Element) { + $name = $item->input->getAttribute('name'); + + $isFieldReadOnly = $this->pluginHandle('Widget_Abstract_Contents') + ->trigger($plugged)->isFieldReadOnly($name); + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (preg_match("/^fields\[(.+)\]$/", $name, $matches)) { + $name = $matches[1]; + } else { + foreach ($item->inputs as $input) { + $input->setAttribute('name', 'fields[' . $name . ']'); + } + } + + $item->value($fields->{$name}); + + $elements = $item->container->getItems(); + array_shift($elements); + $div = new Typecho_Widget_Helper_Layout('div'); + + foreach ($elements as $el) { + $div->addItem($el); + } + + $defaultFields[$name] = array($item->label, $div); + } + } + + return $defaultFields; + } + + /** + * getFieldItems + * + * @access public + * @return void + */ + public function getFieldItems() + { + $fields = array(); + + if ($this->have()) { + $defaultFields = $this->getDefaultFieldItems(); + $rows = $this->db->fetchAll($this->db->select()->from('table.fields') + ->where('cid = ?', $this->cid)); + + foreach ($rows as $row) { + $isFieldReadOnly = $this->pluginHandle('Widget_Abstract_Contents') + ->trigger($plugged)->isFieldReadOnly($row['name']); + + if ($plugged && $isFieldReadOnly) { + continue; + } + + if (!isset($defaultFields[$row['name']])) { + $fields[] = $row; + } + } + } + + return $fields; + } + + /** + * 璁剧疆鍐呭鏍囩 + * + * @access public + * @param integer $cid + * @param string $tags + * @param boolean $count 鏄惁鍙備笌璁℃暟 + * @return string + */ + public function setTags($cid, $tags, $beforeCount = true, $afterCount = true) + { + $tags = str_replace('锛', ',', $tags); + $tags = array_unique(array_map('trim', explode(',', $tags))); + $tags = array_filter($tags, array('Typecho_Validate', 'xssCheck')); + + /** 鍙栧嚭宸叉湁tag */ + $existTags = Typecho_Common::arrayFlatten($this->db->fetchAll( + $this->db->select('table.metas.mid') + ->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $cid) + ->where('table.metas.type = ?', 'tag')), 'mid'); + + /** 鍒犻櫎宸叉湁tag */ + if ($existTags) { + foreach ($existTags as $tag) { + if (0 == strlen($tag)) { + continue; + } + + $this->db->query($this->db->delete('table.relationships') + ->where('cid = ?', $cid) + ->where('mid = ?', $tag)); + + if ($beforeCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count - 1') + ->where('mid = ?', $tag)); + } + } + } + + /** 鍙栧嚭鎻掑叆tag */ + $insertTags = $this->widget('Widget_Abstract_Metas')->scanTags($tags); + + /** 鎻掑叆tag */ + if ($insertTags) { + foreach ($insertTags as $tag) { + if (0 == strlen($tag)) { + continue; + } + + $this->db->query($this->db->insert('table.relationships') + ->rows(array( + 'mid' => $tag, + 'cid' => $cid + ))); + + if ($afterCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count + 1') + ->where('mid = ?', $tag)); + } + } + } + } + + /** + * 璁剧疆鍒嗙被 + * + * @access public + * @param integer $cid 鍐呭id + * @param array $categories 鍒嗙被id鐨勯泦鍚堟暟缁 + * @param boolean $count 鏄惁鍙備笌璁℃暟 + * @return integer + */ + public function setCategories($cid, array $categories, $beforeCount = true, $afterCount = true) + { + $categories = array_unique(array_map('trim', $categories)); + + /** 鍙栧嚭宸叉湁category */ + $existCategories = Typecho_Common::arrayFlatten($this->db->fetchAll( + $this->db->select('table.metas.mid') + ->from('table.metas') + ->join('table.relationships', 'table.relationships.mid = table.metas.mid') + ->where('table.relationships.cid = ?', $cid) + ->where('table.metas.type = ?', 'category')), 'mid'); + + /** 鍒犻櫎宸叉湁category */ + if ($existCategories) { + foreach ($existCategories as $category) { + $this->db->query($this->db->delete('table.relationships') + ->where('cid = ?', $cid) + ->where('mid = ?', $category)); + + if ($beforeCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count - 1') + ->where('mid = ?', $category)); + } + } + } + + /** 鎻掑叆category */ + if ($categories) { + foreach ($categories as $category) { + /** 濡傛灉鍒嗙被涓嶅瓨鍦 */ + if (!$this->db->fetchRow($this->db->select('mid') + ->from('table.metas') + ->where('mid = ?', $category) + ->limit(1))) { + continue; + } + + $this->db->query($this->db->insert('table.relationships') + ->rows(array( + 'mid' => $category, + 'cid' => $cid + ))); + + if ($afterCount) { + $this->db->query($this->db->update('table.metas') + ->expression('count', 'count + 1') + ->where('mid = ?', $category)); + } + } + } + } + + /** + * 鍙戝竷鏂囩珷 + * + * @access public + * @return void + */ + public function writePost() + { + $contents = $this->request->from('password', 'allowComment', + 'allowPing', 'allowFeed', 'slug', 'tags', 'text', 'visibility'); + + $contents['category'] = $this->request->getArray('category'); + $contents['title'] = $this->request->get('title', _t('鏈懡鍚嶆枃妗')); + $contents['created'] = $this->getCreated(); + + if ($this->request->markdown && $this->options->markdown) { + $contents['text'] = '<!--markdown-->' . $contents['text']; + } + + $contents = $this->pluginHandle()->write($contents, $this); + + if ($this->request->is('do=publish')) { + /** 閲嶆柊鍙戝竷宸茬粡瀛樺湪鐨勬枃绔 */ + $contents['type'] = 'post'; + $this->publish($contents); + + // 瀹屾垚鍙戝竷鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishPublish($contents, $this); + + /** 鍙戦乸ing */ + $trackback = array_unique(preg_split("/(\r|\n|\r\n)/", trim($this->request->trackback))); + $this->widget('Widget_Service')->sendPing($this->cid, $trackback); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set('post' == $this->type ? + _t('鏂囩珷 "<a href="%s">%s</a>" 宸茬粡鍙戝竷', $this->permalink, $this->title) : + _t('鏂囩珷 "%s" 绛夊緟瀹℃牳', $this->title), 'success'); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鑾峰彇椤甸潰鍋忕Щ */ + $pageQuery = $this->getPageOffsetQuery($this->created); + + /** 椤甸潰璺宠浆 */ + $this->response->redirect(Typecho_Common::url('manage-posts.php?' . $pageQuery, $this->options->adminUrl)); + } else { + /** 淇濆瓨鏂囩珷 */ + $contents['type'] = 'post_draft'; + $this->save($contents); + + // 瀹屾垚淇濆瓨鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishSave($contents, $this); + + if ($this->request->isAjax()) { + $created = new Typecho_Date($this->options->gmtTime); + $this->response->throwJson(array( + 'success' => 1, + 'time' => $created->format('H:i:s A'), + 'cid' => $this->cid + )); + } else { + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鑽夌ǹ "%s" 宸茬粡琚繚瀛', $this->title), 'success'); + + /** 杩斿洖鍘熼〉闈 */ + $this->response->redirect(Typecho_Common::url('write-post.php?cid=' . $this->cid, $this->options->adminUrl)); + } + } + } + + /** + * 鍒犻櫎鏂囩珷 + * + * @access public + * @return void + */ + public function deletePost() + { + $posts = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($posts as $post) { + // 鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->delete($post, $this); + + $condition = $this->db->sql()->where('cid = ?', $post); + $postObject = $this->db->fetchObject($this->db->select('status', 'type') + ->from('table.contents')->where('cid = ? AND type = ?', $post, 'post')); + + if ($this->isWriteable($condition) && + $postObject && + $this->delete($condition)) { + + /** 鍒犻櫎鍒嗙被 */ + $this->setCategories($post, array(), 'publish' == $postObject->status + && 'post' == $postObject->type); + + /** 鍒犻櫎鏍囩 */ + $this->setTags($post, NULL, 'publish' == $postObject->status + && 'post' == $postObject->type); + + /** 鍒犻櫎璇勮 */ + $this->db->query($this->db->delete('table.comments') + ->where('cid = ?', $post)); + + /** 瑙i櫎闄勪欢鍏宠仈 */ + $this->unAttach($post); + + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $post, 'post_draft') + ->limit(1)); + + /** 鍒犻櫎鑷畾涔夊瓧娈 */ + $this->deleteFields($post); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + } + + // 瀹屾垚鍒犻櫎鎻掍欢鎺ュ彛 + $this->pluginHandle()->finishDelete($post, $this); + + $deleteCount ++; + } + + unset($condition); + } + + // 娓呯悊鏍囩 + if ($deleteCount > 0) { + $this->widget('Widget_Abstract_Metas')->clearTags(); + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏂囩珷宸茬粡琚垹闄') : _t('娌℃湁鏂囩珷琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 鍒犻櫎鏂囩珷鎵灞炶崏绋 + * + * @access public + * @return void + */ + public function deletePostDraft() + { + $posts = $this->request->filter('int')->getArray('cid'); + $deleteCount = 0; + + foreach ($posts as $post) { + /** 鍒犻櫎鑽夌ǹ */ + $draft = $this->db->fetchRow($this->db->select('cid') + ->from('table.contents') + ->where('table.contents.parent = ? AND table.contents.type = ?', + $post, 'post_draft') + ->limit(1)); + + if ($draft) { + $this->deleteDraft($draft['cid']); + $this->deleteFields($draft['cid']); + $deleteCount ++; + } + } + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鑽夌ǹ宸茬粡琚垹闄') : _t('娌℃湁鑽夌ǹ琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杩斿洖鍘熺綉椤 */ + $this->response->goBack(); + } + + /** + * 杈撳嚭Markdown棰勮 + * + * @access public + * @return void + */ + public function preview() + { + $this->response->throwJson($this->markdown($this->request->text)); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=publish') || $this->request->is('do=save'))->writePost(); + $this->on($this->request->is('do=delete'))->deletePost(); + $this->on($this->request->is('do=deleteDraft'))->deletePostDraft(); + $this->on($this->request->is('do=preview'))->preview(); + + $this->response->redirect($this->options->adminUrl); + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Recent.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Recent.php" new file mode 100644 index 0000000..5645acf --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Post/Recent.php" @@ -0,0 +1,40 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏈鏂版枃绔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏈鏂拌瘎璁虹粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Post_Recent extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault(array('pageSize' => $this->options->postsListSize)); + + $this->db->fetchAll($this->select() + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->where('table.contents.type = ?', 'post') + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit($this->parameter->pageSize), array($this, 'push')); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related.php" new file mode 100644 index 0000000..15edbdd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related.php" @@ -0,0 +1,62 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐩稿叧鍐呭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐩稿叧鍐呭缁勪欢(鏍规嵁鏍囩鍏宠仈) + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Related extends Widget_Abstract_Contents +{ + /** + * 鑾峰彇鏌ヨ瀵硅薄 + * + * @access public + * @return Typecho_Db_Query + */ + public function select() + { + return $this->db->select('DISTINCT table.contents.cid', 'table.contents.title', 'table.contents.slug', 'table.contents.created', 'table.contents.authorId', + 'table.contents.modified', 'table.contents.type', 'table.contents.status', 'table.contents.text', 'table.contents.commentsNum', 'table.contents.order', + 'table.contents.template', 'table.contents.password', 'table.contents.allowComment', 'table.contents.allowPing', 'table.contents.allowFeed') + ->from('table.contents'); + } + + /** + * 鎵ц鍑芥暟,鍒濆鍖栨暟鎹 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('limit=5'); + + if ($this->parameter->tags) { + $tagsGroup = implode(',', Typecho_Common::arrayFlatten($this->parameter->tags, 'mid')); + $this->db->fetchAll($this->select() + ->join('table.relationships', 'table.contents.cid = table.relationships.cid') + ->where('table.relationships.mid IN (' . $tagsGroup . ')') + ->where('table.contents.cid <> ?', $this->parameter->cid) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.password IS NULL') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->where('table.contents.type = ?', $this->parameter->type) + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit($this->parameter->limit), array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related/Author.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related/Author.php" new file mode 100644 index 0000000..a1f571d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Contents/Related/Author.php" @@ -0,0 +1,46 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐩稿叧鍐呭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐩稿叧鍐呭缁勪欢(鏍规嵁浣滆呭叧鑱) + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Contents_Related_Author extends Widget_Abstract_Contents +{ + /** + * 鎵ц鍑芥暟,鍒濆鍖栨暟鎹 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('limit=5'); + + if ($this->parameter->author) { + $this->db->fetchAll($this->select() + ->where('table.contents.authorId = ?', $this->parameter->author) + ->where('table.contents.cid <> ?', $this->parameter->cid) + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.password IS NULL') + ->where('table.contents.created < ?', $this->options->gmtTime) + ->where('table.contents.type = ?', $this->parameter->type) + ->order('table.contents.created', Typecho_Db::SORT_DESC) + ->limit($this->parameter->limit), array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Do.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Do.php" new file mode 100644 index 0000000..445c3e0 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Do.php" @@ -0,0 +1,88 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎵ц妯″潡 + * + * @package Widget + */ +class Widget_Do extends Typecho_Widget +{ + /** + * 璺敱鏄犲皠 + * + * @access private + * @var array + */ + private $_map = array( + 'ajax' => 'Widget_Ajax', + 'login' => 'Widget_Login', + 'logout' => 'Widget_Logout', + 'register' => 'Widget_Register', + 'upgrade' => 'Widget_Upgrade', + 'upload' => 'Widget_Upload', + 'service' => 'Widget_Service', + 'xmlrpc' => 'Widget_XmlRpc', + 'comments-edit' => 'Widget_Comments_Edit', + 'contents-page-edit' => 'Widget_Contents_Page_Edit', + 'contents-post-edit' => 'Widget_Contents_Post_Edit', + 'contents-attachment-edit' => 'Widget_Contents_Attachment_Edit', + 'metas-category-edit' => 'Widget_Metas_Category_Edit', + 'metas-tag-edit' => 'Widget_Metas_Tag_Edit', + 'options-discussion' => 'Widget_Options_Discussion', + 'options-general' => 'Widget_Options_General', + 'options-permalink' => 'Widget_Options_Permalink', + 'options-reading' => 'Widget_Options_Reading', + 'plugins-edit' => 'Widget_Plugins_Edit', + 'themes-edit' => 'Widget_Themes_Edit', + 'users-edit' => 'Widget_Users_Edit', + 'users-profile' => 'Widget_Users_Profile' + ); + + /** + * 鍏ュ彛鍑芥暟,鍒濆鍖栬矾鐢卞櫒 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function execute() + { + /** 楠岃瘉璺敱鍦板潃 **/ + $action = $this->request->action; + + //鍏煎鑰佺増鏈 + if (empty($action)) { + $widget = trim($this->request->widget, '/'); + $objectName = 'Widget_' . str_replace('/', '_', $widget); + + if (Typecho_Common::isAvailableClass($objectName)) { + $widgetName = $objectName; + } + } else { + /** 鍒ゆ柇鏄惁涓簆lugin */ + $actionTable = array_merge($this->_map, unserialize($this->widget('Widget_Options')->actionTable)); + + if (isset($actionTable[$action])) { + $widgetName = $actionTable[$action]; + } + } + + if (isset($widgetName) && class_exists($widgetName)) { + $reflectionWidget = new ReflectionClass($widgetName); + if ($reflectionWidget->implementsInterface('Widget_Interface_Do')) { + $this->widget($widgetName)->action(); + return; + } + } + + throw new Typecho_Widget_Exception(_t('璇锋眰鐨勫湴鍧涓嶅瓨鍦'), 404); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/ExceptionHandle.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/ExceptionHandle.php" new file mode 100644 index 0000000..d2f2fc8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/ExceptionHandle.php" @@ -0,0 +1,30 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 寮傚父澶勭悊缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_ExceptionHandle extends Widget_Archive +{ + /** + * 閲嶈浇鏋勯犲嚱鏁 + */ + public function __construct() + { + $this->widget('Widget_Archive@404', 'type=404')->render(); + exit; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Feedback.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Feedback.php" new file mode 100644 index 0000000..a0c2c9b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Feedback.php" @@ -0,0 +1,339 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍙嶉鎻愪氦 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍙嶉鎻愪氦缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Feedback extends Widget_Abstract_Comments implements Widget_Interface_Do +{ + /** + * 鍐呭瀵硅薄 + * + * @access private + * @var Widget_Archive + */ + private $_content; + + /** + * 璇勮澶勭悊鍑芥暟 + * + * @throws Typecho_Widget_Exception + * @throws Exception + * @throws Typecho_Exception + */ + private function comment() + { + // 浣跨敤瀹夊叏妯″潡淇濇姢 + $this->security->protect(); + + $comment = array( + 'cid' => $this->_content->cid, + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'ownerId' => $this->_content->author->uid, + 'type' => 'comment', + 'status' => !$this->_content->allow('edit') && $this->options->commentsRequireModeration ? 'waiting' : 'approved' + ); + + /** 鍒ゆ柇鐖惰妭鐐 */ + if ($parentId = $this->request->filter('int')->get('parent')) { + if ($this->options->commentsThreaded && ($parent = $this->db->fetchRow($this->db->select('coid', 'cid')->from('table.comments') + ->where('coid = ?', $parentId))) && $this->_content->cid == $parent['cid']) { + $comment['parent'] = $parentId; + } else { + throw new Typecho_Widget_Exception(_t('鐖剁骇璇勮涓嶅瓨鍦')); + } + } + + //妫楠屾牸寮 + $validator = new Typecho_Validate(); + $validator->addRule('author', 'required', _t('蹇呴』濉啓鐢ㄦ埛鍚')); + $validator->addRule('author', 'xssCheck', _t('璇蜂笉瑕佸湪鐢ㄦ埛鍚嶄腑浣跨敤鐗规畩瀛楃')); + $validator->addRule('author', array($this, 'requireUserLogin'), _t('鎮ㄦ墍浣跨敤鐨勭敤鎴峰悕宸茬粡琚敞鍐,璇风櫥褰曞悗鍐嶆鎻愪氦')); + $validator->addRule('author', 'maxLength', _t('鐢ㄦ埛鍚嶆渶澶氬寘鍚200涓瓧绗'), 200); + + if ($this->options->commentsRequireMail && !$this->user->hasLogin()) { + $validator->addRule('mail', 'required', _t('蹇呴』濉啓鐢靛瓙閭鍦板潃')); + } + + $validator->addRule('mail', 'email', _t('閭鍦板潃涓嶅悎娉')); + $validator->addRule('mail', 'maxLength', _t('鐢靛瓙閭鏈澶氬寘鍚200涓瓧绗'), 200); + + if ($this->options->commentsRequireUrl && !$this->user->hasLogin()) { + $validator->addRule('url', 'required', _t('蹇呴』濉啓涓汉涓婚〉')); + } + $validator->addRule('url', 'url', _t('涓汉涓婚〉鍦板潃鏍煎紡閿欒')); + $validator->addRule('url', 'maxLength', _t('涓汉涓婚〉鍦板潃鏈澶氬寘鍚200涓瓧绗'), 200); + + $validator->addRule('text', 'required', _t('蹇呴』濉啓璇勮鍐呭')); + + $comment['text'] = $this->request->text; + + /** 瀵逛竴鑸尶鍚嶈闂,灏嗙敤鎴锋暟鎹繚瀛樹竴涓湀 */ + if (!$this->user->hasLogin()) { + /** Anti-XSS */ + $comment['author'] = $this->request->filter('trim')->author; + $comment['mail'] = $this->request->filter('trim')->mail; + $comment['url'] = $this->request->filter('trim')->url; + + /** 淇鐢ㄦ埛鎻愪氦鐨剈rl */ + if (!empty($comment['url'])) { + $urlParams = parse_url($comment['url']); + if (!isset($urlParams['scheme'])) { + $comment['url'] = 'http://' . $comment['url']; + } + } + + $expire = $this->options->gmtTime + $this->options->timezone + 30*24*3600; + Typecho_Cookie::set('__typecho_remember_author', $comment['author'], $expire); + Typecho_Cookie::set('__typecho_remember_mail', $comment['mail'], $expire); + Typecho_Cookie::set('__typecho_remember_url', $comment['url'], $expire); + } else { + $comment['author'] = $this->user->screenName; + $comment['mail'] = $this->user->mail; + $comment['url'] = $this->user->url; + + /** 璁板綍鐧诲綍鐢ㄦ埛鐨刬d */ + $comment['authorId'] = $this->user->uid; + } + + /** 璇勮鑰呬箣鍓嶉』鏈夎瘎璁洪氳繃浜嗗鏍 */ + if (!$this->options->commentsRequireModeration && $this->options->commentsWhitelist) { + if ($commentApprovedNum = $this->size($this->select()->where('author = ? AND mail = ? AND status = ?', $comment['author'], $comment['mail'], 'approved'))) { + $comment['status'] = 'approved'; + } else { + $comment['status'] = 'waiting'; + } + } + + if ($error = $validator->run($comment)) { + /** 璁板綍鏂囧瓧 */ + Typecho_Cookie::set('__typecho_remember_text', $comment['text']); + throw new Typecho_Widget_Exception(implode("\n", $error)); + } + + /** 鐢熸垚杩囨护鍣 */ + try { + $comment = $this->pluginHandle()->comment($comment, $this->_content); + } catch (Typecho_Exception $e) { + Typecho_Cookie::set('__typecho_remember_text', $comment['text']); + throw $e; + } + + /** 娣诲姞璇勮 */ + $commentId = $this->insert($comment); + Typecho_Cookie::delete('__typecho_remember_text'); + $this->db->fetchRow($this->select()->where('coid = ?', $commentId) + ->limit(1), array($this, 'push')); + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishComment($this); + + $this->response->goBack('#' . $this->theId); + } + + /** + * 寮曠敤澶勭悊鍑芥暟 + * + * @access private + * @return void + */ + private function trackback() + { + /** 濡傛灉涓嶆槸POST鏂规硶 */ + if (!$this->request->isPost() || $this->request->getReferer()) { + $this->response->redirect($this->_content->permalink); + } + + /** 濡傛灉搴撲腑宸茬粡瀛樺湪褰撳墠ip涓簊pam鐨則rackback鍒欑洿鎺ユ嫆缁 */ + if ($this->size($this->select() + ->where('status = ? AND ip = ?', 'spam', $this->request->getIp())) > 0) { + /** 浣跨敤404鍛婅瘔鏈哄櫒浜 */ + throw new Typecho_Widget_Exception(_t('鎵句笉鍒板唴瀹'), 404); + } + + $trackback = array( + 'cid' => $this->_content->cid, + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'ownerId' => $this->_content->author->uid, + 'type' => 'trackback', + 'status' => $this->options->commentsRequireModeration ? 'waiting' : 'approved' + ); + + $trackback['author'] = $this->request->filter('trim')->blog_name; + $trackback['url'] = $this->request->filter('trim')->url; + $trackback['text'] = $this->request->excerpt; + + //妫楠屾牸寮 + $validator = new Typecho_Validate(); + $validator->addRule('url', 'required', 'We require all Trackbacks to provide an url.') + ->addRule('url', 'url', 'Your url is not valid.') + ->addRule('url', 'maxLength', 'Your url is not valid.', 200) + ->addRule('text', 'required', 'We require all Trackbacks to provide an excerption.') + ->addRule('author', 'required', 'We require all Trackbacks to provide an blog name.') + ->addRule('author', 'xssCheck', 'Your blog name is not valid.') + ->addRule('author', 'maxLength', 'Your blog name is not valid.', 200); + + $validator->setBreak(); + if ($error = $validator->run($trackback)) { + $message = array('success' => 1, 'message' => current($error)); + $this->response->throwXml($message); + } + + /** 鎴彇闀垮害 */ + $trackback['text'] = Typecho_Common::subStr($trackback['text'], 0, 100, '[...]'); + + /** 濡傛灉搴撲腑宸茬粡瀛樺湪閲嶅url鍒欑洿鎺ユ嫆缁 */ + if ($this->size($this->select() + ->where('cid = ? AND url = ? AND type <> ?', $this->_content->cid, $trackback['url'], 'comment')) > 0) { + /** 浣跨敤403鍛婅瘔鏈哄櫒浜 */ + throw new Typecho_Widget_Exception(_t('绂佹閲嶅鎻愪氦'), 403); + } + + /** 鐢熸垚杩囨护鍣 */ + $trackback = $this->pluginHandle()->trackback($trackback, $this->_content); + + /** 娣诲姞寮曠敤 */ + $trackbackId = $this->insert($trackback); + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishTrackback($this); + + /** 杩斿洖姝g‘ */ + $this->response->throwXml(array('success' => 0, 'message' => 'Trackback has registered.')); + } + + /** + * 杩囨护璇勮鍐呭 + * + * @access public + * @param string $text 璇勮鍐呭 + * @return string + */ + public function filterText($text) + { + $text = str_replace("\r", '', trim($text)); + $text = preg_replace("/\n{2,}/", "\n\n", $text); + + return Typecho_Common::removeXSS(Typecho_Common::stripTags( + $text, $this->options->commentsHTMLTagAllowed)); + } + + /** + * 瀵瑰凡娉ㄥ唽鐢ㄦ埛鐨勪繚鎶ゆф娴 + * + * @access public + * @param string $userName 鐢ㄦ埛鍚 + * @return void + */ + public function requireUserLogin($userName) + { + if ($this->user->hasLogin() && $this->user->screenName != $userName) { + /** 褰撳墠鐢ㄦ埛鍚嶄笌鎻愪氦鑰呬笉鍖归厤 */ + return false; + } else if (!$this->user->hasLogin() && $this->db->fetchRow($this->db->select('uid') + ->from('table.users')->where('screenName = ? OR name = ?', $userName, $userName)->limit(1))) { + /** 姝ょ敤鎴峰悕宸茬粡琚敞鍐 */ + return false; + } + + return true; + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function action() + { + /** 鍥炶皟鏂规硶 */ + $callback = $this->request->type; + $this->_content = Typecho_Router::match($this->request->permalink); + + /** 鍒ゆ柇鍐呭鏄惁瀛樺湪 */ + if (false !== $this->_content && $this->_content instanceof Widget_Archive && + $this->_content->have() && $this->_content->is('single') && + in_array($callback, array('comment', 'trackback'))) { + + /** 濡傛灉鏂囩珷涓嶅厑璁稿弽棣 */ + if ('comment' == $callback) { + /** 璇勮鍏抽棴 */ + if (!$this->_content->allow('comment')) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧,姝ゅ唴瀹圭殑鍙嶉琚姝.'), 403); + } + + /** 妫鏌ユ潵婧 */ + if ($this->options->commentsCheckReferer && 'false' != $this->parameter->checkReferer) { + $referer = $this->request->getReferer(); + + if (empty($referer)) { + throw new Typecho_Widget_Exception(_t('璇勮鏉ユ簮椤甸敊璇.'), 403); + } + + $refererPart = parse_url($referer); + $currentPart = parse_url($this->_content->permalink); + + if ($refererPart['host'] != $currentPart['host'] || + 0 !== strpos($refererPart['path'], $currentPart['path'])) { + + //鑷畾涔夐椤垫敮鎸 + if ('page:' . $this->_content->cid == $this->options->frontPage) { + $currentPart = parse_url(rtrim($this->options->siteUrl, '/') . '/'); + + if ($refererPart['host'] != $currentPart['host'] || + 0 !== strpos($refererPart['path'], $currentPart['path'])) { + throw new Typecho_Widget_Exception(_t('璇勮鏉ユ簮椤甸敊璇.'), 403); + } + } else { + throw new Typecho_Widget_Exception(_t('璇勮鏉ユ簮椤甸敊璇.'), 403); + } + } + } + + /** 妫鏌p璇勮闂撮殧 */ + if (!$this->user->pass('editor', true) && $this->_content->authorId != $this->user->uid && + $this->options->commentsPostIntervalEnable) { + $latestComment = $this->db->fetchRow($this->db->select('created')->from('table.comments') + ->where('cid = ?', $this->_content->cid) + ->order('created', Typecho_Db::SORT_DESC) + ->limit(1)); + + if ($latestComment && ($this->options->gmtTime - $latestComment['created'] > 0 && + $this->options->gmtTime - $latestComment['created'] < $this->options->commentsPostInterval)) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧, 鎮ㄧ殑鍙戣█杩囦簬棰戠箒, 璇风◢渚啀娆″彂甯.'), 403); + } + } + } + + /** 濡傛灉鏂囩珷涓嶅厑璁稿紩鐢 */ + if ('trackback' == $callback && !$this->_content->allow('ping')) { + throw new Typecho_Widget_Exception(_t('瀵逛笉璧,姝ゅ唴瀹圭殑寮曠敤琚姝.'), 403); + } + + /** 璋冪敤鍑芥暟 */ + $this->$callback(); + } else { + throw new Typecho_Widget_Exception(_t('鎵句笉鍒板唴瀹'), 404); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Init.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Init.php" new file mode 100644 index 0000000..8409dce --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Init.php" @@ -0,0 +1,79 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍒濆鍖栨ā鍧 + * + * @package Widget + */ +class Widget_Init extends Typecho_Widget +{ + /** + * 鍏ュ彛鍑芥暟,鍒濆鍖栬矾鐢卞櫒 + * + * @access public + * @return void + */ + public function execute() + { + /** 瀵瑰彉閲忚祴鍊 */ + $options = $this->widget('Widget_Options'); + + /** 璇█鍖呭垵濮嬪寲 */ + if ($options->lang && $options->lang != 'zh_CN') { + $dir = defined('__TYPECHO_LANG_DIR__') ? __TYPECHO_LANG_DIR__ : __TYPECHO_ROOT_DIR__ . '/usr/langs'; + Typecho_I18n::setLang($dir . '/' . $options->lang . '.mo'); + } + + /** cookie鍒濆鍖 */ + Typecho_Cookie::setPrefix($options->rootUrl); + + /** 鍒濆鍖朿harset */ + Typecho_Common::$charset = $options->charset; + + /** 鍒濆鍖杄xception */ + Typecho_Common::$exceptionHandle = 'Widget_ExceptionHandle'; + + /** 璁剧疆璺緞 */ + if (defined('__TYPECHO_PATHINFO_ENCODING__')) { + $pathInfo = $this->request->getPathInfo(__TYPECHO_PATHINFO_ENCODING__, $options->charset); + } else { + $pathInfo = $this->request->getPathInfo(); + } + + Typecho_Router::setPathInfo($pathInfo); + + /** 鍒濆鍖栬矾鐢卞櫒 */ + Typecho_Router::setRoutes($options->routingTable); + + /** 鍒濆鍖栨彃浠 */ + Typecho_Plugin::init($options->plugins); + + /** 鍒濆鍖栧洖鎵 */ + $this->response->setCharset($options->charset); + $this->response->setContentType($options->contentType); + + /** 榛樿鏃跺尯 */ + if (function_exists("ini_get") && !ini_get("date.timezone") && function_exists("date_default_timezone_set")) { + @date_default_timezone_set('UTC'); + } + + /** 鍒濆鍖栨椂鍖 */ + Typecho_Date::setTimezoneOffset($options->timezone); + + /** 寮濮嬩細璇, 鍑忓皬璐熻浇鍙拡瀵瑰悗鍙版墦寮session鏀寔 */ + if ($this->widget('Widget_User')->hasLogin()) { + @session_start(); + } + + /** 鐩戝惉缂撳啿鍖 */ + ob_start(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Interface/Do.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Interface/Do.php" new file mode 100644 index 0000000..355caf8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Interface/Do.php" @@ -0,0 +1,20 @@ +<?php +/** + * 鍙互琚玏idget_Do璋冪敤鐨勬帴鍙 + * + * @package Widget + * @version $id$ + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @author qining <magike.net@gmail.com> + * @license GNU General Public License 2.0 + */ +interface Widget_Interface_Do +{ + /** + * 鎺ュ彛闇瑕佸疄鐜扮殑鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action(); +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Login.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Login.php" new file mode 100644 index 0000000..597a559 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Login.php" @@ -0,0 +1,84 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐧诲綍鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐧诲綍缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Login extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + // protect + $this->security->protect(); + + /** 濡傛灉宸茬粡鐧诲綍 */ + if ($this->user->hasLogin()) { + /** 鐩存帴杩斿洖 */ + $this->response->redirect($this->options->index); + } + + /** 鍒濆鍖栭獙璇佺被 */ + $validator = new Typecho_Validate(); + $validator->addRule('name', 'required', _t('璇疯緭鍏ョ敤鎴峰悕')); + $validator->addRule('password', 'required', _t('璇疯緭鍏ュ瘑鐮')); + + /** 鎴幏楠岃瘉寮傚父 */ + if ($error = $validator->run($this->request->from('name', 'password'))) { + Typecho_Cookie::set('__typecho_remember_name', $this->request->name); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($error); + $this->response->goBack(); + } + + /** 寮濮嬮獙璇佺敤鎴 **/ + $valid = $this->user->login($this->request->name, $this->request->password, + false, 1 == $this->request->remember ? $this->options->gmtTime + $this->options->timezone + 30*24*3600 : 0); + + /** 姣斿瀵嗙爜 */ + if (!$valid) { + /** 闃叉绌蜂妇,浼戠湢3绉 */ + sleep(3); + + $this->pluginHandle()->loginFail($this->user, $this->request->name, + $this->request->password, 1 == $this->request->remember); + + Typecho_Cookie::set('__typecho_remember_name', $this->request->name); + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛鍚嶆垨瀵嗙爜鏃犳晥'), 'error'); + $this->response->goBack('?referer=' . urlencode($this->request->referer)); + } + + $this->pluginHandle()->loginSucceed($this->user, $this->request->name, + $this->request->password, 1 == $this->request->remember); + + /** 璺宠浆楠岃瘉鍚庡湴鍧 */ + if (NULL != $this->request->referer) { + $this->response->redirect($this->request->referer); + } else if (!$this->user->pass('contributor', true)) { + /** 涓嶅厑璁告櫘閫氱敤鎴风洿鎺ヨ烦杞悗鍙 */ + $this->response->redirect($this->options->profileUrl); + } else { + $this->response->redirect($this->options->adminUrl); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Logout.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Logout.php" new file mode 100644 index 0000000..a1b7d86 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Logout.php" @@ -0,0 +1,36 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐧诲嚭鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐧诲嚭缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Logout extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + $this->user->logout(); + $this->pluginHandle()->logout(); + $this->response->goBack(NULL, $this->options->index); + @session_destroy(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Menu.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Menu.php" new file mode 100644 index 0000000..3f8f629 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Menu.php" @@ -0,0 +1,343 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍚庡彴鑿滃崟鏄剧ず + * + * @package Widget + */ +class Widget_Menu extends Typecho_Widget +{ + /** + * 鐖惰彍鍗曞垪琛 + * + * @access private + * @var array + */ + private $_menu = array(); + + /** + * 褰撳墠鐖惰彍鍗 + * + * @access private + * @var integer + */ + private $_currentParent = 1; + + /** + * 褰撳墠瀛愯彍鍗 + * + * @access private + * @var integer + */ + private $_currentChild = 0; + + /** + * 褰撳墠椤甸潰 + * + * @access private + * @var string + */ + private $_currentUrl; + + /** + * 鍏ㄥ眬閫夐」 + * + * @access protected + * @var Widget_Options + */ + protected $options; + + /** + * 鐢ㄦ埛瀵硅薄 + * + * @access protected + * @var Widget_User + */ + protected $user; + + /** + * 褰撳墠鑿滃崟鏍囬 + * @var string + */ + public $title; + + /** + * 褰撳墠澧炲姞椤圭洰閾炬帴 + * @var string + */ + public $addLink; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->options = $this->widget('Widget_Options'); + $this->user = $this->widget('Widget_User'); + } + + /** + * 鎵ц鍑芥暟,鍒濆鍖栬彍鍗 + * + * @access public + * @return void + */ + public function execute() + { + $parentNodes = array(NULL, _t('鎺у埗鍙'), _t('鎾板啓'), _t('绠$悊'), _t('璁剧疆')); + + $childNodes = array( + array( + array(_t('鐧诲綍'), _t('鐧诲綍鍒%s', $this->options->title), 'login.php', 'visitor'), + array(_t('娉ㄥ唽'), _t('娉ㄥ唽鍒%s', $this->options->title), 'register.php', 'visitor') + ), + array( + array(_t('姒傝'), _t('缃戠珯姒傝'), 'index.php', 'subscriber'), + array(_t('涓汉璁剧疆'), _t('涓汉璁剧疆'), 'profile.php', 'subscriber'), + array(_t('鎻掍欢'), _t('鎻掍欢绠$悊'), 'plugins.php', 'administrator'), + array(array('Widget_Plugins_Config', 'getMenuTitle'), array('Widget_Plugins_Config', 'getMenuTitle'), 'options-plugin.php?config=', 'administrator', true), + array(_t('澶栬'), _t('缃戠珯澶栬'), 'themes.php', 'administrator'), + array(array('Widget_Themes_Files', 'getMenuTitle'), array('Widget_Themes_Files', 'getMenuTitle'), 'theme-editor.php', 'administrator', true), + array(_t('璁剧疆澶栬'), _t('璁剧疆澶栬'), 'options-theme.php', 'administrator', true), + array(_t('鍗囩骇'), _t('鍗囩骇绋嬪簭'), 'upgrade.php', 'administrator', true), + array(_t('娆㈣繋'), _t('娆㈣繋浣跨敤'), 'welcome.php', 'subscriber', true) + ), + array( + array(_t('鎾板啓鏂囩珷'), _t('鎾板啓鏂版枃绔'), 'write-post.php', 'contributor'), + array(array('Widget_Contents_Post_Edit', 'getMenuTitle'), array('Widget_Contents_Post_Edit', 'getMenuTitle'), 'write-post.php?cid=', 'contributor', true), + array(_t('鍒涘缓椤甸潰'), _t('鍒涘缓鏂伴〉闈'), 'write-page.php', 'editor'), + array(array('Widget_Contents_Page_Edit', 'getMenuTitle'), array('Widget_Contents_Page_Edit', 'getMenuTitle'), 'write-page.php?cid=', 'editor', true), + ), + array( + array(_t('鏂囩珷'), _t('绠$悊鏂囩珷'), 'manage-posts.php', 'contributor', false, 'write-post.php'), + array(array('Widget_Contents_Post_Admin', 'getMenuTitle'), array('Widget_Contents_Post_Admin', 'getMenuTitle'), 'manage-posts.php?uid=', 'contributor', true), + array(_t('鐙珛椤甸潰'), _t('绠$悊鐙珛椤甸潰'), 'manage-pages.php', 'editor', false, 'write-page.php'), + array(_t('璇勮'), _t('绠$悊璇勮'), 'manage-comments.php', 'contributor'), + array(array('Widget_Comments_Admin', 'getMenuTitle'), array('Widget_Comments_Admin', 'getMenuTitle'), 'manage-comments.php?cid=', 'contributor', true), + array(_t('鍒嗙被'), _t('绠$悊鍒嗙被'), 'manage-categories.php', 'editor', false, 'category.php'), + array(_t('鏂板鍒嗙被'), _t('鏂板鍒嗙被'), 'category.php', 'editor', true), + array(array('Widget_Metas_Category_Admin', 'getMenuTitle'), array('Widget_Metas_Category_Admin', 'getMenuTitle'), 'manage-categories.php?parent=', 'editor', true, array('Widget_Metas_Category_Admin', 'getAddLink')), + array(array('Widget_Metas_Category_Edit', 'getMenuTitle'), array('Widget_Metas_Category_Edit', 'getMenuTitle'), 'category.php?mid=', 'editor', true), + array(array('Widget_Metas_Category_Edit', 'getMenuTitle'), array('Widget_Metas_Category_Edit', 'getMenuTitle'), 'category.php?parent=', 'editor', true), + array(_t('鏍囩'), _t('绠$悊鏍囩'), 'manage-tags.php', 'editor'), + array(array('Widget_Metas_Tag_Admin', 'getMenuTitle'), array('Widget_Metas_Tag_Admin', 'getMenuTitle'), 'manage-tags.php?mid=', 'editor', true), + array(_t('鏂囦欢'), _t('绠$悊鏂囦欢'), 'manage-medias.php', 'editor'), + array(array('Widget_Contents_Attachment_Edit', 'getMenuTitle'), array('Widget_Contents_Attachment_Edit', 'getMenuTitle'), 'media.php?cid=', 'contributor', true), + array(_t('鐢ㄦ埛'), _t('绠$悊鐢ㄦ埛'), 'manage-users.php', 'administrator', false, 'user.php'), + array(_t('鏂板鐢ㄦ埛'), _t('鏂板鐢ㄦ埛'), 'user.php', 'administrator', true), + array(array('Widget_Users_Edit', 'getMenuTitle'), array('Widget_Users_Edit', 'getMenuTitle'), 'user.php?uid=', 'administrator', true), + ), + array( + array(_t('鍩烘湰'), _t('鍩烘湰璁剧疆'), 'options-general.php', 'administrator'), + array(_t('璇勮'), _t('璇勮璁剧疆'), 'options-discussion.php', 'administrator'), + array(_t('闃呰'), _t('闃呰璁剧疆'), 'options-reading.php', 'administrator'), + array(_t('姘镐箙閾炬帴'), _t('姘镐箙閾炬帴璁剧疆'), 'options-permalink.php', 'administrator'), + )); + + /** 鑾峰彇鎵╁睍鑿滃崟 */ + $panelTable = unserialize($this->options->panelTable); + $extendingParentMenu = empty($panelTable['parent']) ? array() : $panelTable['parent']; + $extendingChildMenu = empty($panelTable['child']) ? array() : $panelTable['child']; + $currentUrl = $this->request->makeUriByRequest(); + $adminUrl = $this->options->adminUrl; + $menu = array(); + $defaultChildeNode = array(NULL, NULL, NULL, 'administrator', false, NULL); + + $currentUrlParts = parse_url($currentUrl); + $currentUrlParams = array(); + if (!empty($currentUrlParts['query'])) { + parse_str($currentUrlParts['query'], $currentUrlParams); + } + + if ('/' == $currentUrlParts['path'][strlen($currentUrlParts['path']) - 1]) { + $currentUrlParts['path'] .= 'index.php'; + } + + foreach ($extendingParentMenu as $key => $val) { + $parentNodes[10 + $key] = $val; + } + + foreach ($extendingChildMenu as $key => $val) { + $childNodes[$key] = array_merge(isset($childNodes[$key]) ? $childNodes[$key] : array(), $val); + } + + foreach ($parentNodes as $key => $parentNode) { + // this is a simple struct than before + $children = array(); + $showedChildrenCount = 0; + $firstUrl = NULL; + + foreach ($childNodes[$key] as $inKey => $childNode) { + // magic merge + $childNode += $defaultChildeNode; + list ($name, $title, $url, $access, $hidden, $addLink) = $childNode; + + // 淇濆瓨鏈鍘熷鐨刪idden淇℃伅 + $orgHidden = $hidden; + + // parse url + $url = Typecho_Common::url($url, $adminUrl); + + // compare url + $urlParts = parse_url($url); + $urlParams = array(); + if (!empty($urlParts['query'])) { + parse_str($urlParts['query'], $urlParams); + } + + $validate = true; + if ($urlParts['path'] != $currentUrlParts['path']) { + $validate = false; + } else { + foreach ($urlParams as $paramName => $paramValue) { + if (!isset($currentUrlParams[$paramName])) { + $validate = false; + break; + } + } + } + + if ($validate + && basename($urlParts['path']) == 'extending.php' + && !empty($currentUrlParams['panel']) && !empty($urlParams['panel']) + && $urlParams['panel'] != $currentUrlParams['panel']){ + $validate = false; + } + + if ($hidden && $validate) { + $hidden = false; + } + + if (!$hidden && !$this->user->pass($access, true)) { + $hidden = true; + } + + if (!$hidden) { + $showedChildrenCount ++; + + if (empty($firstUrl)) { + $firstUrl = $url; + } + + if (is_array($name)) { + list($widget, $method) = $name; + $name = Typecho_Widget::widget($widget)->$method(); + } + + if (is_array($title)) { + list($widget, $method) = $title; + $title = Typecho_Widget::widget($widget)->$method(); + } + + if (is_array($addLink)) { + list($widget, $method) = $addLink; + $addLink = Typecho_Widget::widget($widget)->$method(); + } + } + + if ($validate) { + if ('visitor' != $access) { + $this->user->pass($access); + } + + $this->_currentParent = $key; + $this->_currentChild = $inKey; + $this->title = $title; + $this->addLink = $addLink ? Typecho_Common::url($addLink, $adminUrl) : NULL; + } + + $children[$inKey] = array( + $name, + $title, + $url, + $access, + $hidden, + $addLink, + $orgHidden + ); + } + + $menu[$key] = array($parentNode, $showedChildrenCount > 0, $firstUrl,$children); + } + + $this->_menu = $menu; + $this->_currentUrl = $currentUrl; + } + + /** + * 鑾峰彇褰撳墠鑿滃崟 + * + * @access public + * @return array + */ + public function getCurrentMenu() + { + return $this->_currentParent > 0 ? $this->_menu[$this->_currentParent][3][$this->_currentChild] : NULL; + } + + /** + * 杈撳嚭鐖剁骇鑿滃崟 + * + * @access public + * @return string + */ + public function output($class = 'focus', $childClass = 'focus') + { + foreach ($this->_menu as $key => $node) { + if (!$node[1] || !$key) { + continue; + } + + echo "<ul class=\"root" . ($key == $this->_currentParent ? ' ' . $class : NULL) + . "\"><li class=\"parent\"><a href=\"{$node[2]}\">{$node[0]}</a></dt>" + . "</li><ul class=\"child\">"; + + $last = 0; + foreach ($node[3] as $inKey => $inNode) { + if (!$inNode[4]) { + $last = $inKey; + } + } + + foreach ($node[3] as $inKey => $inNode) { + if ($inNode[4]) { + continue; + } + + $classes = array(); + if ($key == $this->_currentParent && $inKey == $this->_currentChild) { + $classes[] = $childClass; + } else if ($inNode[6]) { + continue; + } + + if ($inKey == $last) { + $classes[] = 'last'; + } + + echo "<li" . (!empty($classes) ? ' class="' . implode(' ', $classes) . '"' : NULL) . + "><a href=\"" . ($key == $this->_currentParent && $inKey == $this->_currentChild ? $this->_currentUrl : $inNode[2]) . "\">{$inNode[0]}</a></li>"; + } + + echo "</ul></ul>"; + } + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Admin.php" new file mode 100644 index 0000000..e5795b6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Admin.php" @@ -0,0 +1,95 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * Widget_Metas_Category_Admin + * + * @uses Widget_Metas_Category_List + * @copyright Copyright (c) 2012 Typecho Team. (http://typecho.org) + * @author Joyqi <magike.net@gmail.com> + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Category_Admin extends Widget_Metas_Category_List +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->db->select('mid')->from('table.metas')->where('type = ?', 'category'); + $select->where('parent = ?', $this->request->parent ? $this->request->parent : 0); + + $this->stack = $this->getCategories(Typecho_Common::arrayFlatten( + $this->db->fetchAll($select->order('table.metas.order', Typecho_Db::SORT_ASC)), 'mid')); + } + + /** + * 鍚戜笂鐨勮繑鍥為摼鎺 + * + * @access public + * @return void + */ + public function backLink() + { + if (isset($this->request->parent)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->parent)); + + if (!empty($category)) { + $parent = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $category['parent'])); + + if ($parent) { + echo '<a href="' . Typecho_Common::url('manage-categories.php?parent=' . $parent['mid'], $this->options->adminUrl) . '">'; + } else { + echo '<a href="' . Typecho_Common::url('manage-categories.php', $this->options->adminUrl) . '">'; + } + + echo '« '; + _e('杩斿洖鐖剁骇鍒嗙被'); + echo '</a>'; + } + } + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + if (isset($this->request->parent)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->parent)); + + if (!empty($category)) { + return _t('绠$悊 %s 鐨勫瓙鍒嗙被', $category['name']); + } + } else { + return; + } + + throw new Typecho_Widget_Exception(_t('鍒嗙被涓嶅瓨鍦'), 404); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getAddLink() + { + if (isset($this->request->parent)) { + return 'category.php?parent=' . $this->request->filter('int')->parent; + } else { + return 'category.php'; + } + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Edit.php" new file mode 100644 index 0000000..6ff55b3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/Edit.php" @@ -0,0 +1,492 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鍒嗙被 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鍒嗙被缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Category_Edit extends Widget_Abstract_Metas implements Widget_Interface_Do +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 缂栬緫浠ヤ笂鏉冮檺 */ + $this->user->pass('editor'); + } + + /** + * 鍒ゆ柇鍒嗙被鏄惁瀛樺湪 + * + * @access public + * @param integer $mid 鍒嗙被涓婚敭 + * @return boolean + */ + public function categoryExists($mid) + { + $category = $this->db->fetchRow($this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->where('mid = ?', $mid)->limit(1)); + + return $category ? true : false; + } + + /** + * 鍒ゆ柇鍒嗙被鍚嶇О鏄惁瀛樺湪 + * + * @access public + * @param string $name 鍒嗙被鍚嶇О + * @return boolean + */ + public function nameExists($name) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->where('name = ?', $name) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->mid); + } + + $category = $this->db->fetchRow($select); + return $category ? false : true; + } + + /** + * 鍒ゆ柇鍒嗙被鍚嶈浆鎹㈠埌缂╃暐鍚嶅悗鏄惁鍚堟硶 + * + * @access public + * @param string $name 鍒嗙被鍚 + * @return boolean + */ + public function nameToSlug($name) + { + if (empty($this->request->slug)) { + $slug = Typecho_Common::slugName($name); + if (empty($slug) || !$this->slugExists($name)) { + return false; + } + } + + return true; + } + + /** + * 鍒ゆ柇鍒嗙被缂╃暐鍚嶆槸鍚﹀瓨鍦 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @return boolean + */ + public function slugExists($slug) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'category') + ->where('slug = ?', Typecho_Common::slugName($slug)) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->mid); + } + + $category = $this->db->fetchRow($select); + return $category ? false : true; + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @param string $action 琛ㄥ崟鍔ㄤ綔 + * @return Typecho_Widget_Helper_Form_Element + */ + public function form($action = NULL) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/metas-category-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鍒嗙被鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('鍒嗙被鍚嶇О *')); + $form->addInput($name); + + /** 鍒嗙被缂╃暐鍚 */ + $slug = new Typecho_Widget_Helper_Form_Element_Text('slug', NULL, NULL, _t('鍒嗙被缂╃暐鍚'), + _t('鍒嗙被缂╃暐鍚嶇敤浜庡垱寤哄弸濂界殑閾炬帴褰㈠紡, 寤鸿浣跨敤瀛楁瘝, 鏁板瓧, 涓嬪垝绾垮拰妯潬.')); + $form->addInput($slug); + + /** 鐖剁骇鍒嗙被 */ + $options = array(0 => _t('涓嶉夋嫨')); + $parents = $this->widget('Widget_Metas_Category_List@options', + (isset($this->request->mid) ? 'ignore=' . $this->request->mid : '')); + + while ($parents->next()) { + $options[$parents->mid] = str_repeat('    ', $parents->levels) . $parents->name; + } + + $parent = new Typecho_Widget_Helper_Form_Element_Select('parent', $options, $this->request->parent, _t('鐖剁骇鍒嗙被'), + _t('姝ゅ垎绫诲皢褰掓。鍦ㄦ偍閫夋嫨鐨勭埗绾у垎绫讳笅.')); + $form->addInput($parent); + + /** 鍒嗙被鎻忚堪 */ + $description = new Typecho_Widget_Helper_Form_Element_Textarea('description', NULL, NULL, + _t('鍒嗙被鎻忚堪'), _t('姝ゆ枃瀛楃敤浜庢弿杩板垎绫, 鍦ㄦ湁鐨勪富棰樹腑瀹冧細琚樉绀.')); + $form->addInput($description); + + /** 鍒嗙被鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do'); + $form->addInput($do); + + /** 鍒嗙被涓婚敭 */ + $mid = new Typecho_Widget_Helper_Form_Element_Hidden('mid'); + $form->addInput($mid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + if (isset($this->request->mid) && 'insert' != $action) { + /** 鏇存柊妯″紡 */ + $meta = $this->db->fetchRow($this->select() + ->where('mid = ?', $this->request->mid) + ->where('type = ?', 'category')->limit(1)); + + if (!$meta) { + $this->response->redirect(Typecho_Common::url('manage-categories.php', $this->options->adminUrl)); + } + + $name->value($meta['name']); + $slug->value($meta['slug']); + $parent->value($meta['parent']); + $description->value($meta['description']); + $do->value('update'); + $mid->value($meta['mid']); + $submit->value(_t('缂栬緫鍒嗙被')); + $_action = 'update'; + } else { + $do->value('insert'); + $submit->value(_t('澧炲姞鍒嗙被')); + $_action = 'insert'; + } + + if (empty($action)) { + $action = $_action; + } + + /** 缁欒〃鍗曞鍔犺鍒 */ + if ('insert' == $action || 'update' == $action) { + $name->addRule('required', _t('蹇呴』濉啓鍒嗙被鍚嶇О')); + $name->addRule(array($this, 'nameExists'), _t('鍒嗙被鍚嶇О宸茬粡瀛樺湪')); + $name->addRule(array($this, 'nameToSlug'), _t('鍒嗙被鍚嶇О鏃犳硶琚浆鎹负缂╃暐鍚')); + $name->addRule('xssCheck', _t('璇蜂笉瑕佸湪鍒嗙被鍚嶇О涓娇鐢ㄧ壒娈婂瓧绗')); + $slug->addRule(array($this, 'slugExists'), _t('缂╃暐鍚嶅凡缁忓瓨鍦')); + $slug->addRule('xssCheck', _t('璇蜂笉瑕佸湪缂╃暐鍚嶄腑浣跨敤鐗规畩瀛楃')); + } + + if ('update' == $action) { + $mid->addRule('required', _t('鍒嗙被涓婚敭涓嶅瓨鍦')); + $mid->addRule(array($this, 'categoryExists'), _t('鍒嗙被涓嶅瓨鍦')); + } + + return $form; + } + + /** + * 澧炲姞鍒嗙被 + * + * @access public + * @return void + */ + public function insertCategory() + { + if ($this->form('insert')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $category = $this->request->from('name', 'slug', 'description', 'parent'); + + $category['slug'] = Typecho_Common::slugName(empty($category['slug']) ? $category['name'] : $category['slug']); + $category['type'] = 'category'; + $category['order'] = $this->getMaxOrder('category', $category['parent']) + 1; + + /** 鎻掑叆鏁版嵁 */ + $category['mid'] = $this->insert($category); + $this->push($category); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鍒嗙被 <a href="%s">%s</a> 宸茬粡琚鍔', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php' + . ($category['parent'] ? '?parent=' . $category['parent'] : ''), $this->options->adminUrl)); + } + + /** + * 鏇存柊鍒嗙被 + * + * @access public + * @return void + */ + public function updateCategory() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $category = $this->request->from('name', 'slug', 'description', 'parent'); + $category['mid'] = $this->request->mid; + $category['slug'] = Typecho_Common::slugName(empty($category['slug']) ? $category['name'] : $category['slug']); + $category['type'] = 'category'; + $current = $this->db->fetchRow($this->select()->where('mid = ?', $category['mid'])); + + if ($current['parent'] != $category['parent']) { + $parent = $this->db->fetchRow($this->select()->where('mid = ?', $category['parent'])); + + if ($parent['mid'] == $category['mid']) { + $category['order'] = $parent['order']; + $this->update(array( + 'parent' => $current['parent'], + 'order' => $current['order'] + ), $this->db->sql()->where('mid = ?', $parent['mid'])); + } else { + $category['order'] = $this->getMaxOrder('category', $category['parent']) + 1; + } + } + + /** 鏇存柊鏁版嵁 */ + $this->update($category, $this->db->sql()->where('mid = ?', $this->request->filter('int')->mid)); + $this->push($category); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鍒嗙被 <a href="%s">%s</a> 宸茬粡琚洿鏂', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php' + . ($category['parent'] ? '?parent=' . $category['parent'] : ''), $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鍒嗙被 + * + * @access public + * @return void + */ + public function deleteCategory() + { + $categories = $this->request->filter('int')->getArray('mid'); + $deleteCount = 0; + + foreach ($categories as $category) { + $parent = $this->db->fetchObject($this->select()->where('mid = ?', $category))->parent; + + if ($this->delete($this->db->sql()->where('mid = ?', $category))) { + $this->db->query($this->db->delete('table.relationships')->where('mid = ?', $category)); + $this->update(array('parent' => $parent), $this->db->sql()->where('parent = ?', $category)); + $deleteCount ++; + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鍒嗙被宸茬粡鍒犻櫎') : _t('娌℃湁鍒嗙被琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鍚堝苟鍒嗙被 + * + * @access public + * @return void + */ + public function mergeCategory() + { + /** 楠岃瘉鏁版嵁 */ + $validator = new Typecho_Validate(); + $validator->addRule('merge', 'required', _t('鍒嗙被涓婚敭涓嶅瓨鍦')); + $validator->addRule('merge', array($this, 'categoryExists'), _t('璇烽夋嫨闇瑕佸悎骞剁殑鍒嗙被')); + + if ($error = $validator->run($this->request->from('merge'))) { + $this->widget('Widget_Notice')->set($error, 'error'); + $this->response->goBack(); + } + + $merge = $this->request->merge; + $categories = $this->request->filter('int')->getArray('mid'); + + if ($categories) { + $this->merge($merge, 'category', $categories); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鍒嗙被宸茬粡鍚堝苟'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鍒嗙被'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鍒嗙被鎺掑簭 + * + * @access public + * @return void + */ + public function sortCategory() + { + $categories = $this->request->filter('int')->getArray('mid'); + if ($categories) { + $this->sort($categories, 'category'); + } + + if (!$this->request->isAjax()) { + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php', $this->options->adminUrl)); + } else { + $this->response->throwJson(array('success' => 1, 'message' => _t('鍒嗙被鎺掑簭宸茬粡瀹屾垚'))); + } + } + + /** + * 鍒锋柊鍒嗙被 + * + * @access public + * @return void + */ + public function refreshCategory() + { + $categories = $this->request->filter('int')->getArray('mid'); + if ($categories) { + foreach ($categories as $category) { + $this->refreshCountByTypeAndStatus($category, 'post', 'publish'); + } + + $this->widget('Widget_Notice')->set(_t('鍒嗙被鍒锋柊宸茬粡瀹屾垚'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鍒嗙被'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 璁剧疆榛樿鍒嗙被 + * + * @access public + * @return void + */ + public function defaultCategory() + { + /** 楠岃瘉鏁版嵁 */ + $validator = new Typecho_Validate(); + $validator->addRule('mid', 'required', _t('鍒嗙被涓婚敭涓嶅瓨鍦')); + $validator->addRule('mid', array($this, 'categoryExists'), _t('鍒嗙被涓嶅瓨鍦')); + + if ($error = $validator->run($this->request->from('mid'))) { + $this->widget('Widget_Notice')->set($error, 'error'); + } else { + + $this->db->query($this->db->update('table.options') + ->rows(array('value' => $this->request->mid)) + ->where('name = ?', 'defaultCategory')); + + $this->db->fetchRow($this->select()->where('mid = ?', $this->request->mid) + ->where('type = ?', 'category')->limit(1), array($this, 'push')); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('<a href="%s">%s</a> 宸茬粡琚涓洪粯璁ゅ垎绫', + $this->permalink, $this->name), 'success'); + } + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-categories.php', $this->options->adminUrl)); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @return string + * @throws Typecho_Widget_Exception + */ + public function getMenuTitle() + { + if (isset($this->request->mid)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->mid)); + + if (!empty($category)) { + return _t('缂栬緫鍒嗙被 %s', $category['name']); + } + + } if (isset($this->request->parent)) { + $category = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'category', $this->request->parent)); + + if (!empty($category)) { + return _t('鏂板 %s 鐨勫瓙鍒嗙被', $category['name']); + } + + } else { + return; + } + + throw new Typecho_Widget_Exception(_t('鍒嗙被涓嶅瓨鍦'), 404); + } + + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=insert'))->insertCategory(); + $this->on($this->request->is('do=update'))->updateCategory(); + $this->on($this->request->is('do=delete'))->deleteCategory(); + $this->on($this->request->is('do=merge'))->mergeCategory(); + $this->on($this->request->is('do=sort'))->sortCategory(); + $this->on($this->request->is('do=refresh'))->refreshCategory(); + $this->on($this->request->is('do=default'))->defaultCategory(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/List.php" new file mode 100644 index 0000000..cf85926 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Category/List.php" @@ -0,0 +1,415 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍒嗙被杈撳嚭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍒嗙被杈撳嚭缁勪欢 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Category_List extends Widget_Abstract_Metas +{ + /** + * 澶氱骇鍒嗙被鍥炶皟鍑芥暟 + * + * @var boolean + * @access private + */ + private $_customTreeViewCategoriesCallback = false; + + /** + * 鏍戠姸鍒嗙被缁撴瀯 + * + * @var array + * @access private + */ + private $_treeViewCategories = array(); + + /** + * _categoryOptions + * + * @var mixed + * @access private + */ + private $_categoryOptions = NULL; + + /** + * 椤跺眰鍒嗙被 + * + * @var array + * @access private + */ + private $_top = array(); + + /** + * 鎵鏈夊垎绫诲搱甯岃〃 + * + * @var array + * @access private + */ + private $_map = array(); + + /** + * 椤哄簭娴 + * + * @var array + * @access private + */ + private $_orders = array(); + + /** + * 鎵鏈夊瓙鑺傜偣鍒楄〃 + * + * @var array + * @access private + */ + private $_children = array(); + + /** + * 鎵鏈夌埗鑺傜偣鍒楄〃 + * + * @var array + * @access private + */ + private $_parents = array(); + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + $this->parameter->setDefault('ignore=0¤t='); + + /** 鍒濆鍖栧洖璋冨嚱鏁 */ + if (function_exists('treeViewCategories')) { + $this->_customTreeViewCategoriesCallback = true; + } + + $select = $this->select()->where('type = ?', 'category'); + if ($this->parameter->ignore) { + $select->where('mid <> ?', $this->parameter->ignore); + } + + $categories = $this->db->fetchAll($select->order('table.metas.order', Typecho_Db::SORT_ASC)); + foreach ($categories as $category) { + $category['levels'] = 0; + $this->_map[$category['mid']] = $category; + } + + // 璇诲彇鏁版嵁 + foreach ($this->_map as $mid => $category) { + $parent = $category['parent']; + + if (0 != $parent && isset($this->_map[$parent])) { + $this->_treeViewCategories[$parent][] = $mid; + } else { + $this->_top[] = $mid; + } + } + + // 棰勫鐞嗘繁搴 + $this->levelWalkCallback($this->_top); + $this->_map = array_map(array($this, 'filter'), $this->_map); + } + + /** + * 鍒楀嚭鍒嗙被鍥炶皟 + * + * @access private + */ + private function treeViewCategoriesCallback() + { + $categoryOptions = $this->_categoryOptions; + if ($this->_customTreeViewCategoriesCallback) { + return treeViewCategories($this, $categoryOptions); + } + + $classes = array(); + + if ($categoryOptions->itemClass) { + $classes[] = $categoryOptions->itemClass; + } + + $classes[] = 'category-level-' . $this->levels; + + echo '<' . $categoryOptions->itemTag . ' class="' + . implode(' ', $classes); + + if ($this->levels > 0) { + echo ' category-child'; + $this->levelsAlt(' category-level-odd', ' category-level-even'); + } else { + echo ' category-parent'; + } + + if ($this->mid == $this->parameter->current) { + echo ' category-active'; + } else if (isset($this->_children[$this->mid]) && in_array($this->parameter->current, $this->_children[$this->mid])) { + echo ' category-parent-active'; + } + + echo '"><a href="' . $this->permalink . '">' . $this->name . '</a>'; + + if ($categoryOptions->showCount) { + printf($categoryOptions->countTemplate, intval($this->count)); + } + + if ($categoryOptions->showFeed) { + printf($categoryOptions->feedTemplate, $this->feedUrl); + } + + if ($this->children) { + $this->treeViewCategories(); + } + + echo '</li>'; + } + + /** + * 棰勫鐞嗗垎绫昏凯浠 + * + * @param array $categories + * @param array $parents + * @access private + */ + private function levelWalkCallback(array $categories, $parents = array()) + { + foreach ($parents as $parent) { + if (!isset($this->_children[$parent])) { + $this->_children[$parent] = array(); + } + + $this->_children[$parent] = array_merge($this->_children[$parent], $categories); + } + + foreach ($categories as $mid) { + $this->_orders[] = $mid; + $parent = $this->_map[$mid]['parent']; + + if (0 != $parent && isset($this->_map[$parent])) { + $levels = $this->_map[$parent]['levels'] + 1; + $this->_map[$mid]['levels'] = $levels; + } + + $this->_parents[$mid] = $parents; + + if (!empty($this->_treeViewCategories[$mid])) { + $new = $parents; + $new[] = $mid; + $this->levelWalkCallback($this->_treeViewCategories[$mid], $new); + } + } + } + + /** + * 瀛愯瘎璁 + * + * @access protected + * @return array + */ + protected function ___children() + { + return isset($this->_treeViewCategories[$this->mid]) ? + $this->getCategories($this->_treeViewCategories[$this->mid]) : array(); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->stack = $this->getCategories($this->_orders); + } + + /** + * treeViewCategories + * + * @access public + * @return void + */ + public function treeViewCategories() + { + $children = $this->children; + if ($children) { + //缂撳瓨鍙橀噺渚夸簬杩樺師 + $tmp = $this->row; + $this->sequence ++; + + //鍦ㄥ瓙璇勮涔嬪墠杈撳嚭 + echo '<' . $this->_categoryOptions->wrapTag . (empty($this->_categoryOptions->wrapClass) + ? '' : ' class="' . $this->_categoryOptions->wrapClass . '"') . '>'; + + foreach ($children as $child) { + $this->row = $child; + $this->treeViewCategoriesCallback(); + $this->row = $tmp; + } + + //鍦ㄥ瓙璇勮涔嬪悗杈撳嚭 + echo '</' . $this->_categoryOptions->wrapTag . '>'; + + $this->sequence --; + } + } + + /** + * treeViewCategories + * + * @param $categoryOptions 杈撳嚭閫夐」 + * @access public + * @return void + */ + public function listCategories($categoryOptions = NULL) + { + //鍒濆鍖栦竴浜涘彉閲 + $this->_categoryOptions = Typecho_Config::factory($categoryOptions); + $this->_categoryOptions->setDefault(array( + 'wrapTag' => 'ul', + 'wrapClass' => '', + 'itemTag' => 'li', + 'itemClass' => '', + 'showCount' => false, + 'showFeed' => false, + 'countTemplate' => '(%d)', + 'feedTemplate' => '<a href="%s">RSS</a>' + )); + + // 鎻掍欢鎻掍欢鎺ュ彛 + $this->pluginHandle()->trigger($plugged)->listCategories($this->_categoryOptions, $this); + + if (!$plugged) { + $this->stack = $this->getCategories($this->_top); + + if ($this->have()) { + echo '<' . $this->_categoryOptions->wrapTag . (empty($this->_categoryOptions->wrapClass) + ? '' : ' class="' . $this->_categoryOptions->wrapClass . '"') . '>'; + while ($this->next()) { + $this->treeViewCategoriesCallback(); + } + echo '</' . $this->_categoryOptions->wrapTag . '>'; + } + + $this->stack = $this->_map; + } + } + + /** + * 鏍规嵁娣卞害浣欐暟杈撳嚭 + * + * @access public + * @return void + */ + public function levelsAlt() + { + $args = func_get_args(); + $num = func_num_args(); + $split = $this->levels % $num; + echo $args[(0 == $split ? $num : $split) -1]; + } + + /** + * 灏嗘瘡琛岀殑鍊煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function filter(array $value) + { + $value['directory'] = $this->getAllParents($value['mid']); + $value['directory'][] = $value['slug']; + + $tmpCategoryTree = $value['directory']; + $value['directory'] = implode('/', array_map('urlencode', $value['directory'])); + + $value = parent::filter($value); + $value['directory'] = $tmpCategoryTree; + + return $value; + } + + /** + * 鑾峰彇鏌愪釜鍒嗙被涓嬬殑鎵鏈夊瓙鑺傜偣 + * + * @param mixed $mid + * @access public + * @return array + */ + public function getAllChildren($mid) + { + return isset($this->_children[$mid]) ? $this->_children[$mid] : array(); + } + + /** + * 鑾峰彇鏌愪釜鍒嗙被鎵鏈夌埗绾ц妭鐐 + * + * @param mixed $mid + * @access public + * @return array + */ + public function getAllParents($mid) + { + $parents = array(); + + if (isset($this->_parents[$mid])) { + foreach ($this->_parents[$mid] as $parent) { + $parents[] = $this->_map[$parent]['slug']; + } + } + + return $parents; + } + + /** + * 鑾峰彇鍗曚釜鍒嗙被 + * + * @param integer $mid + * @access public + * @return mixed + */ + public function getCategory($mid) + { + return isset($this->_map[$mid]) ? $this->_map[$mid] : NULL; + } + + /** + * 鑾峰彇澶氫釜鍒嗙被 + * + * @param mixed $mids + * @access public + * @return array + */ + public function getCategories($mids) + { + $result = array(); + + if (!empty($mids)) { + foreach ($mids as $mid) { + $result[] = $this->_map[$mid]; + } + } + + return $result; + } +} + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Admin.php" new file mode 100644 index 0000000..9c7fcb8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Admin.php" @@ -0,0 +1,56 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏍囩浜 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏍囩浜戠粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Tag_Admin extends Widget_Metas_Tag_Cloud +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $select = $this->select()->where('type = ?', 'tag')->order('mid', Typecho_Db::SORT_DESC); + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + if (isset($this->request->mid)) { + $tag = $this->db->fetchRow($this->select() + ->where('type = ? AND mid = ?', 'tag', $this->request->mid)); + + if (!empty($tag)) { + return _t('缂栬緫鏍囩 %s', $tag['name']); + } + } else { + return; + } + + throw new Typecho_Widget_Exception(_t('鏍囩涓嶅瓨鍦'), 404); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Cloud.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Cloud.php" new file mode 100644 index 0000000..92de350 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Cloud.php" @@ -0,0 +1,61 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏍囩浜 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏍囩浜戠粍浠 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Tag_Cloud extends Widget_Abstract_Metas +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault(array('sort' => 'count', 'ignoreZeroCount' => false, 'desc' => true, 'limit' => 0)); + $select = $this->select()->where('type = ?', 'tag')->order($this->parameter->sort, + $this->parameter->desc ? Typecho_Db::SORT_DESC : Typecho_Db::SORT_ASC); + + /** 蹇界暐闆舵暟閲 */ + if ($this->parameter->ignoreZeroCount) { + $select->where('count > 0'); + } + + /** 鎬绘暟闄愬埗 */ + if ($this->parameter->limit) { + $select->limit($this->parameter->limit); + } + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 鎸夊垎鍓叉暟杈撳嚭瀛楃涓 + * + * @access public + * @param string $param 闇瑕佽緭鍑虹殑鍊 + * @return void + */ + public function split() + { + $args = func_get_args(); + array_unshift($args, $this->count); + echo call_user_func_array(array('Typecho_Common', 'splitByCount'), $args); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Edit.php" new file mode 100644 index 0000000..ec0f908 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Metas/Tag/Edit.php" @@ -0,0 +1,366 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏍囩缂栬緫 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏍囩缂栬緫缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Metas_Tag_Edit extends Widget_Abstract_Metas implements Widget_Interface_Do +{ + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 缂栬緫浠ヤ笂鏉冮檺 */ + $this->user->pass('editor'); + } + + /** + * 鍒ゆ柇鏍囩鏄惁瀛樺湪 + * + * @access public + * @param integer $mid 鏍囩涓婚敭 + * @return boolean + */ + public function tagExists($mid) + { + $tag = $this->db->fetchRow($this->db->select() + ->from('table.metas') + ->where('type = ?', 'tag') + ->where('mid = ?', $mid)->limit(1)); + + return $tag ? true : false; + } + + /** + * 鍒ゆ柇鏍囩鍚嶇О鏄惁瀛樺湪 + * + * @access public + * @param string $name 鏍囩鍚嶇О + * @return boolean + */ + public function nameExists($name) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'tag') + ->where('name = ?', $name) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->filter('int')->mid); + } + + $tag = $this->db->fetchRow($select); + return $tag ? false : true; + } + + /** + * 鍒ゆ柇鏍囩鍚嶈浆鎹㈠埌缂╃暐鍚嶅悗鏄惁鍚堟硶 + * + * @access public + * @param string $name 鏍囩鍚 + * @return boolean + */ + public function nameToSlug($name) + { + if (empty($this->request->slug)) { + $slug = Typecho_Common::slugName($name); + if (empty($slug) || !$this->slugExists($name)) { + return false; + } + } + + return true; + } + + /** + * 鍒ゆ柇鏍囩缂╃暐鍚嶆槸鍚﹀瓨鍦 + * + * @access public + * @param string $slug 缂╃暐鍚 + * @return boolean + */ + public function slugExists($slug) + { + $select = $this->db->select() + ->from('table.metas') + ->where('type = ?', 'tag') + ->where('slug = ?', Typecho_Common::slugName($slug)) + ->limit(1); + + if ($this->request->mid) { + $select->where('mid <> ?', $this->request->mid); + } + + $tag = $this->db->fetchRow($select); + return $tag ? false : true; + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @param string $action 琛ㄥ崟鍔ㄤ綔 + * @return Typecho_Widget_Helper_Form + */ + public function form($action = NULL) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/metas-tag-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鏍囩鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, + _t('鏍囩鍚嶇О *'), _t('杩欐槸鏍囩鍦ㄧ珯鐐逛腑鏄剧ず鐨勫悕绉.鍙互浣跨敤涓枃,濡 "鍦扮悆".')); + $form->addInput($name); + + /** 鏍囩缂╃暐鍚 */ + $slug = new Typecho_Widget_Helper_Form_Element_Text('slug', NULL, NULL, + _t('鏍囩缂╃暐鍚'), _t('鏍囩缂╃暐鍚嶇敤浜庡垱寤哄弸濂界殑閾炬帴褰㈠紡, 濡傛灉鐣欑┖鍒欓粯璁や娇鐢ㄦ爣绛惧悕绉.')); + $form->addInput($slug); + + /** 鏍囩鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do'); + $form->addInput($do); + + /** 鏍囩涓婚敭 */ + $mid = new Typecho_Widget_Helper_Form_Element_Hidden('mid'); + $form->addInput($mid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + if (isset($this->request->mid) && 'insert' != $action) { + /** 鏇存柊妯″紡 */ + $meta = $this->db->fetchRow($this->select() + ->where('mid = ?', $this->request->mid) + ->where('type = ?', 'tag')->limit(1)); + + if (!$meta) { + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + $name->value($meta['name']); + $slug->value($meta['slug']); + $do->value('update'); + $mid->value($meta['mid']); + $submit->value(_t('缂栬緫鏍囩')); + $_action = 'update'; + } else { + $do->value('insert'); + $submit->value(_t('澧炲姞鏍囩')); + $_action = 'insert'; + } + + if (empty($action)) { + $action = $_action; + } + + /** 缁欒〃鍗曞鍔犺鍒 */ + if ('insert' == $action || 'update' == $action) { + $name->addRule('required', _t('蹇呴』濉啓鏍囩鍚嶇О')); + $name->addRule(array($this, 'nameExists'), _t('鏍囩鍚嶇О宸茬粡瀛樺湪')); + $name->addRule(array($this, 'nameToSlug'), _t('鏍囩鍚嶇О鏃犳硶琚浆鎹负缂╃暐鍚')); + $name->addRule('xssCheck', _t('璇蜂笉瑕佹爣绛惧悕绉颁腑浣跨敤鐗规畩瀛楃')); + $slug->addRule(array($this, 'slugExists'), _t('缂╃暐鍚嶅凡缁忓瓨鍦')); + $slug->addRule('xssCheck', _t('璇蜂笉瑕佸湪缂╃暐鍚嶄腑浣跨敤鐗规畩瀛楃')); + } + + if ('update' == $action) { + $mid->addRule('required', _t('鏍囩涓婚敭涓嶅瓨鍦')); + $mid->addRule(array($this, 'tagExists'), _t('鏍囩涓嶅瓨鍦')); + } + + return $form; + } + + /** + * 鎻掑叆鏍囩 + * + * @access public + * @return void + */ + public function insertTag() + { + if ($this->form('insert')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $tag = $this->request->from('name', 'slug'); + $tag['type'] = 'tag'; + $tag['slug'] = Typecho_Common::slugName(empty($tag['slug']) ? $tag['name'] : $tag['slug']); + + /** 鎻掑叆鏁版嵁 */ + $tag['mid'] = $this->insert($tag); + $this->push($tag); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鏍囩 <a href="%s">%s</a> 宸茬粡琚鍔', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鏇存柊鏍囩 + * + * @access public + * @return void + */ + public function updateTag() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $tag = $this->request->from('name', 'slug', 'mid'); + $tag['type'] = 'tag'; + $tag['slug'] = Typecho_Common::slugName(empty($tag['slug']) ? $tag['name'] : $tag['slug']); + + /** 鏇存柊鏁版嵁 */ + $this->update($tag, $this->db->sql()->where('mid = ?', $this->request->filter('int')->mid)); + $this->push($tag); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight($this->theId); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鏍囩 <a href="%s">%s</a> 宸茬粡琚洿鏂', + $this->permalink, $this->name), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鏍囩 + * + * @access public + * @return void + */ + public function deleteTag() + { + $tags = $this->request->filter('int')->getArray('mid'); + $deleteCount = 0; + + if ($tags && is_array($tags)) { + foreach ($tags as $tag) { + if ($this->delete($this->db->sql()->where('mid = ?', $tag))) { + $this->db->query($this->db->delete('table.relationships')->where('mid = ?', $tag)); + $deleteCount ++; + } + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鏍囩宸茬粡鍒犻櫎') : _t('娌℃湁鏍囩琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鍚堝苟鏍囩 + * + * @access public + * @return void + */ + public function mergeTag() + { + if (empty($this->request->merge)) { + $this->widget('Widget_Notice')->set(_t('璇峰~鍐欓渶瑕佸悎骞跺埌鐨勬爣绛'), 'notice'); + $this->response->goBack(); + } + + $merge = $this->scanTags($this->request->merge); + if (empty($merge)) { + $this->widget('Widget_Notice')->set(_t('鍚堝苟鍒扮殑鏍囩鍚嶄笉鍚堟硶'), 'error'); + $this->response->goBack(); + } + + $tags = $this->request->filter('int')->getArray('mid'); + + if ($tags) { + $this->merge($merge, 'tag', $tags); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鏍囩宸茬粡鍚堝苟'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鏍囩'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-tags.php', $this->options->adminUrl)); + } + + /** + * 鍒锋柊鏍囩 + * + * @access public + * @return void + */ + public function refreshTag() + { + $tags = $this->request->filter('int')->getArray('mid'); + if ($tags) { + foreach ($tags as $tag) { + $this->refreshCountByTypeAndStatus($tag, 'post', 'publish'); + } + + // 鑷姩娓呯悊鏍囩 + $this->clearTags(); + + $this->widget('Widget_Notice')->set(_t('鏍囩鍒锋柊宸茬粡瀹屾垚'), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t('娌℃湁閫夋嫨浠讳綍鏍囩'), 'notice'); + } + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鍏ュ彛鍑芥暟,缁戝畾浜嬩欢 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=insert'))->insertTag(); + $this->on($this->request->is('do=update'))->updateTag(); + $this->on($this->request->is('do=delete'))->deleteTag(); + $this->on($this->request->is('do=merge'))->mergeTag(); + $this->on($this->request->is('do=refresh'))->refreshTag(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Notice.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Notice.php" new file mode 100644 index 0000000..40edf6d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Notice.php" @@ -0,0 +1,71 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id: Widget.php 48 2008-03-16 02:51:40Z magike.net $ + */ + +/** + * 鎻愮ず妗嗙粍浠 + * + * @package Widget + */ +class Widget_Notice extends Typecho_Widget +{ + /** + * 鎻愮ず楂樹寒 + * + * @access public + * @var string + */ + public $highlight; + + /** + * 楂樹寒鐩稿叧鍏冪礌 + * + * @access public + * @param string $theId 闇瑕侀珮浜厓绱犵殑id + * @return void + */ + public function highlight($theId) + { + $this->highlight = $theId; + Typecho_Cookie::set('__typecho_notice_highlight', $theId, + $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); + } + + /** + * 鑾峰彇楂樹寒鐨刬d + * + * @access public + * @return integer + */ + public function getHighlightId() + { + return preg_match("/[0-9]+/", $this->highlight, $matches) ? $matches[0] : 0; + } + + /** + * 璁惧畾鍫嗘爤姣忎竴琛岀殑鍊 + * + * @param string $value 鍊煎搴旂殑閿 + * @param string $type 鎻愮ず绫诲瀷 + * @param string $typeFix 鍏煎鑰佹彃浠 + * @return array + */ + public function set($value, $type = 'notice', $typeFix = 'notice') + { + $notice = is_array($value) ? array_values($value) : array($value); + if (empty($type) && $typeFix) { + $type = $typeFix; + } + + Typecho_Cookie::set('__typecho_notice', Json::encode($notice), + $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); + Typecho_Cookie::set('__typecho_notice_type', $type, + $this->widget('Widget_Options')->gmtTime + $this->widget('Widget_Options')->timezone + 86400); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options.php" new file mode 100644 index 0000000..e673cf2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options.php" @@ -0,0 +1,571 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍏ㄥ眬閫夐」 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍏ㄥ眬閫夐」缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options extends Typecho_Widget +{ + /** + * 缂撳瓨鐨勬彃浠堕厤缃 + * + * @access private + * @var array + */ + private $_pluginConfig = array(); + + /** + * 缂撳瓨鐨勪釜浜烘彃浠堕厤缃 + * + * @access private + * @var array + */ + private $_personalPluginConfig = array(); + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + } + + /** + * RSS2.0 + * + * @access protected + * @return string + */ + protected function ___feedUrl() + { + return Typecho_Router::url('feed', array('feed' => '/'), $this->index); + } + + /** + * RSS1.0 + * + * @access protected + * @return string + */ + protected function ___feedRssUrl() + { + return Typecho_Router::url('feed', array('feed' => '/rss/'), $this->index); + } + + /** + * ATOM1.O + * + * @access protected + * @return string + */ + protected function ___feedAtomUrl() + { + return Typecho_Router::url('feed', array('feed' => '/atom/'), $this->index); + } + + /** + * 璇勮RSS2.0鑱氬悎 + * + * @access protected + * @return string + */ + protected function ___commentsFeedUrl() + { + return Typecho_Router::url('feed', array('feed' => '/comments/'), $this->index); + } + + /** + * 璇勮RSS1.0鑱氬悎 + * + * @access protected + * @return string + */ + protected function ___commentsFeedRssUrl() + { + return Typecho_Router::url('feed', array('feed' => '/rss/comments/'), $this->index); + } + + /** + * 璇勮ATOM1.0鑱氬悎 + * + * @access protected + * @return string + */ + protected function ___commentsFeedAtomUrl() + { + return Typecho_Router::url('feed', array('feed' => '/atom/comments/'), $this->index); + } + + /** + * xmlrpc api鍦板潃 + * + * @access protected + * @return string + */ + protected function ___xmlRpcUrl() + { + return Typecho_Router::url('do', array('action' => 'xmlrpc'), $this->index); + } + + /** + * 鑾峰彇瑙f瀽璺緞鍓嶇紑 + * + * @access protected + * @return string + */ + protected function ___index() + { + return ($this->rewrite || (defined('__TYPECHO_REWRITE__') && __TYPECHO_REWRITE__)) + ? $this->rootUrl : Typecho_Common::url('index.php', $this->rootUrl); + } + + /** + * 鑾峰彇妯℃澘璺緞 + * + * @access protected + * @return string + */ + protected function ___themeUrl() + { + return defined('__TYPECHO_THEME_URL__') ? __TYPECHO_THEME_URL__ : + Typecho_Common::url(__TYPECHO_THEME_DIR__ . '/' . $this->theme, $this->siteUrl); + } + + /** + * 鑾峰彇鎻掍欢璺緞 + * + * @access protected + * @return string + */ + protected function ___pluginUrl() + { + return defined('__TYPECHO_PLUGIN_URL__') ? __TYPECHO_PLUGIN_URL__ : + Typecho_Common::url(__TYPECHO_PLUGIN_DIR__, $this->siteUrl); + } + + /** + * 鑾峰彇鍚庡彴璺緞 + * + * @access protected + * @return string + */ + protected function ___adminUrl() + { + return Typecho_Common::url(defined('__TYPECHO_ADMIN_DIR__') ? + __TYPECHO_ADMIN_DIR__ : '/admin/', $this->rootUrl); + } + + /** + * 鑾峰彇鐧诲綍鍦板潃 + * + * @access protected + * @return string + */ + protected function ___loginUrl() + { + return Typecho_Common::url('login.php', $this->adminUrl); + } + + /** + * 鑾峰彇鐧诲綍鎻愪氦鍦板潃 + * + * @access protected + * @return string + */ + protected function ___loginAction() + { + return $this->widget('Widget_Security')->getTokenUrl( + Typecho_Router::url('do', array('action' => 'login', 'widget' => 'Login'), + Typecho_Common::url('index.php', $this->rootUrl))); + } + + /** + * 鑾峰彇娉ㄥ唽鍦板潃 + * + * @access protected + * @return string + */ + protected function ___registerUrl() + { + return Typecho_Common::url('register.php', $this->adminUrl); + } + + /** + * 鑾峰彇鐧诲綍鎻愪氦鍦板潃 + * + * @access protected + * @return string + */ + protected function ___registerAction() + { + return $this->widget('Widget_Security')->getTokenUrl( + Typecho_Router::url('do', array('action' => 'register', 'widget' => 'Register'), $this->index)); + } + + /** + * 鑾峰彇涓汉妗f鍦板潃 + * + * @access protected + * @return string + */ + protected function ___profileUrl() + { + return Typecho_Common::url('profile.php', $this->adminUrl); + } + + /** + * 鑾峰彇鐧诲嚭鍦板潃 + * + * @access protected + * @return string + */ + protected function ___logoutUrl() + { + return Typecho_Common::url('/action/logout', $this->index); + } + + /** + * 鑾峰彇绯荤粺鏃跺尯 + * + * @access protected + * @return integer + */ + protected function ___serverTimezone() + { + return Typecho_Date::$serverTimezoneOffset; + } + + /** + * 鑾峰彇鏍兼灄灏兼不鏍囧噯鏃堕棿 + * + * @access protected + * @return integer + */ + protected function ___gmtTime() + { + return Typecho_Date::gmtTime(); + } + + /** + * 鑾峰彇鏍煎紡 + * + * @access protected + * @return string + */ + protected function ___contentType() + { + return isset($this->contentType) ? $this->contentType : 'text/html'; + } + + /** + * 杞欢鍚嶇О + * + * @access protected + * @return string + */ + protected function ___software() + { + list($software, $version) = explode(' ', $this->generator); + return $software; + } + + /** + * 杞欢鐗堟湰 + * + * @access protected + * @return string + */ + protected function ___version() + { + list($software, $version) = explode(' ', $this->generator); + return $version; + } + + /** + * 鍏佽涓婁紶鐨勬枃浠剁被鍨 + * + * @access protected + * @return string + */ + protected function ___allowedAttachmentTypes() + { + $attachmentTypesResult = array(); + + if (NULL != $this->attachmentTypes) { + $attachmentTypes = str_replace( + array('@image@', '@media@', '@doc@'), + array('gif,jpg,jpeg,png,tiff,bmp', 'mp3,wmv,wma,rmvb,rm,avi,flv', + 'txt,doc,docx,xls,xlsx,ppt,pptx,zip,rar,pdf'), $this->attachmentTypes); + + $attachmentTypesResult = array_unique(array_map('trim', explode(',', $attachmentTypes))); + } + + return $attachmentTypesResult; + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->db->fetchAll($this->db->select()->from('table.options') + ->where('user = 0'), array($this, 'push')); + + /** 鏀寔鐨偆鍙橀噺閲嶈浇 */ + if (!empty($this->row['theme:' . $this->row['theme']])) { + $themeOptions = NULL; + + /** 瑙f瀽鍙橀噺 */ + if ($themeOptions = unserialize($this->row['theme:' . $this->row['theme']])) { + /** 瑕嗙洊鍙橀噺 */ + $this->row = array_merge($this->row, $themeOptions); + } + } + + $this->stack[] = &$this->row; + + /** 鍒濆鍖栫珯鐐逛俊鎭 */ + if (defined('__TYPECHO_SITE_URL__')) { + $this->siteUrl = __TYPECHO_SITE_URL__; + } + + $this->originalSiteUrl = $this->siteUrl; + $this->siteUrl = Typecho_Common::url(NULL, $this->siteUrl); + $this->plugins = unserialize($this->plugins); + + /** 鍔ㄦ佸垽鏂毊鑲ょ洰褰 */ + $this->theme = is_dir($this->themeFile($this->theme)) ? $this->theme : 'default'; + + /** 鍔ㄦ佽幏鍙栨牴鐩綍 */ + $this->rootUrl = $this->request->getRequestRoot(); + if (defined('__TYPECHO_ADMIN__')) { + $adminDir = '/' . trim(defined('__TYPECHO_ADMIN_DIR__') ? __TYPECHO_ADMIN_DIR__ : '/admin/', '/'); + $this->rootUrl = substr($this->rootUrl, 0, - strlen($adminDir)); + } + + /** 澧炲姞瀵筍SL杩炴帴鐨勬敮鎸 */ + if ($this->request->isSecure() && 0 === strpos($this->siteUrl, 'http://')) { + $this->siteUrl = substr_replace($this->siteUrl, 'https', 0, 4); + } + + /** 鑷姩鍒濆鍖栬矾鐢辫〃 */ + $this->routingTable = unserialize($this->routingTable); + if (!isset($this->routingTable[0])) { + /** 瑙f瀽璺敱骞剁紦瀛 */ + $parser = new Typecho_Router_Parser($this->routingTable); + $parsedRoutingTable = $parser->parse(); + $this->routingTable = array_merge(array($parsedRoutingTable), $this->routingTable); + $this->db->query($this->db->update('table.options')->rows(array('value' => serialize($this->routingTable))) + ->where('name = ?', 'routingTable')); + } + } + + /** + * 閲嶈浇鐖剁被push鍑芥暟,灏嗘墍鏈夊彉閲忓煎帇鍏ュ爢鏍 + * + * @access public + * @param array $value 姣忚鐨勫 + * @return array + */ + public function push(array $value) + { + //灏嗚鏁版嵁鎸夐『搴忕疆浣 + $this->row[$value['name']] = $value['value']; + return $value; + } + + /** + * 杈撳嚭缃戠珯璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function siteUrl($path = NULL) + { + echo Typecho_Common::url($path, $this->siteUrl); + } + + /** + * 杈撳嚭瑙f瀽鍦板潃 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function index($path = NULL) + { + echo Typecho_Common::url($path, $this->index); + } + + /** + * 杈撳嚭妯℃澘璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @param string $theme 妯$増鍚嶇О + * @return void + */ + public function themeUrl($path = NULL, $theme = NULL) + { + if (empty($theme)) { + echo Typecho_Common::url($path, $this->themeUrl); + } + + $url = defined('__TYPECHO_THEME_URL__') ? __TYPECHO_THEME_URL__ : + Typecho_Common::url(__TYPECHO_THEME_DIR__ . '/' . $theme, $this->siteUrl); + + return Typecho_Common::url($path, $url); + } + + /** + * 杈撳嚭鎻掍欢璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function pluginUrl($path = NULL) + { + echo Typecho_Common::url($path, $this->pluginUrl); + } + + /** + * 鑾峰彇鐨偆鏂囦欢 + * + * @param string $theme + * @param string $file + * @return string + */ + public function themeFile($theme, $file = '') + { + return __TYPECHO_ROOT_DIR__ . __TYPECHO_THEME_DIR__ . '/' . trim($theme, './') . '/' . trim($file, './'); + } + + /** + * 鑾峰彇鎻掍欢鐩綍 + * + * @param $plugin + * @return string + */ + public function pluginDir($plugin) + { + return __TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__; + } + + /** + * 杈撳嚭鍚庡彴璺緞 + * + * @access public + * @param string $path 瀛愯矾寰 + * @return void + */ + public function adminUrl($path = NULL) + { + echo Typecho_Common::url($path, $this->adminUrl); + } + + /** + * 鑾峰彇鎴栬緭鍑哄悗鍙伴潤鎬佹枃浠惰矾寰 + * + * @param string $type + * @param string $file + * @return void|string + */ + public function adminStaticUrl($type, $file = NULL) + { + $url = Typecho_Common::url($type, $this->adminUrl); + + if (empty($file)) { + return $url; + } + + echo Typecho_Common::url($file, $url); + } + + /** + * 缂栫爜杈撳嚭鍏佽鍑虹幇鍦ㄨ瘎璁轰腑鐨刪tml鏍囩 + * + * @access public + * @return void + */ + public function commentsHTMLTagAllowed() + { + echo htmlspecialchars($this->commentsHTMLTagAllowed); + } + + /** + * 鑾峰彇鎻掍欢绯荤粺鍙傛暟 + * + * @param mixed $pluginName 鎻掍欢鍚嶇О + * @return mixed + * @throws Typecho_Plugin_Exception + */ + public function plugin($pluginName) + { + if (!isset($this->_pluginConfig[$pluginName])) { + if (!empty($this->row['plugin:' . $pluginName]) + && false !== ($options = unserialize($this->row['plugin:' . $pluginName]))) { + $this->_pluginConfig[$pluginName] = new Typecho_Config($options); + } else { + throw new Typecho_Plugin_Exception(_t('鎻掍欢%s鐨勯厤缃俊鎭病鏈夋壘鍒', $pluginName), 500); + } + } + + return $this->_pluginConfig[$pluginName]; + } + + /** + * 鑾峰彇涓汉鎻掍欢绯荤粺鍙傛暟 + * + * @param mixed $pluginName 鎻掍欢鍚嶇О + * @return mixed + * @throws Typecho_Plugin_Exception + */ + public function personalPlugin($pluginName) + { + if (!isset($this->_personalPluginConfig[$pluginName])) { + if (!empty($this->row['_plugin:' . $pluginName]) + && false !== ($options = unserialize($this->row['_plugin:' . $pluginName]))) { + $this->_personalPluginConfig[$pluginName] = new Typecho_Config($options); + } else { + throw new Typecho_Plugin_Exception(_t('鎻掍欢%s鐨勯厤缃俊鎭病鏈夋壘鍒', $pluginName), 500); + } + } + + return $this->_personalPluginConfig[$pluginName]; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Discussion.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Discussion.php" new file mode 100644 index 0000000..893c71b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Discussion.php" @@ -0,0 +1,248 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 璇勮璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 璇勮璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_Discussion extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/options-discussion'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 璇勮鏃ユ湡鏍煎紡 */ + $commentDateFormat = new Typecho_Widget_Helper_Form_Element_Text('commentDateFormat', NULL, $this->options->commentDateFormat, + _t('璇勮鏃ユ湡鏍煎紡'), _t('杩欐槸涓涓粯璁ょ殑鏍煎紡,褰撲綘鍦ㄦā鏉夸腑璋冪敤鏄剧ず璇勮鏃ユ湡鏂规硶鏃, 濡傛灉娌℃湁鎸囧畾鏃ユ湡鏍煎紡, 灏嗘寜鐓ф鏍煎紡杈撳嚭.') . '<br />' + . _t('鍏蜂綋鍐欐硶璇峰弬鑰 <a href="http://www.php.net/manual/zh/function.date.php">PHP 鏃ユ湡鏍煎紡鍐欐硶</a>.')); + $commentDateFormat->input->setAttribute('class', 'w-40 mono'); + $form->addInput($commentDateFormat); + + /** 璇勮鍒楄〃鏁扮洰 */ + $commentsListSize = new Typecho_Widget_Helper_Form_Element_Text('commentsListSize', NULL, $this->options->commentsListSize, + _t('璇勮鍒楄〃鏁扮洰'), _t('姝ゆ暟鐩敤浜庢寚瀹氭樉绀哄湪渚ц竟鏍忎腑鐨勮瘎璁哄垪琛ㄦ暟鐩.')); + $commentsListSize->input->setAttribute('class', 'w-20'); + $form->addInput($commentsListSize->addRule('isInteger', _t('璇峰~鍏ヤ竴涓暟瀛'))); + + $commentsShowOptions = array( + 'commentsShowCommentOnly' => _t('浠呮樉绀鸿瘎璁, 涓嶆樉绀 Pingback 鍜 Trackback'), + 'commentsMarkdown' => _t('鍦ㄨ瘎璁轰腑浣跨敤Markdown璇硶'), + 'commentsShowUrl' => _t('璇勮鑰呭悕绉版樉绀烘椂鑷姩鍔犱笂鍏朵釜浜轰富椤甸摼鎺'), + 'commentsUrlNofollow' => _t('瀵硅瘎璁鸿呬釜浜轰富椤甸摼鎺ヤ娇鐢 <a href="http://en.wikipedia.org/wiki/Nofollow">nofollow 灞炴</a>'), + 'commentsAvatar' => _t('鍚敤 <a href="http://gravatar.com">Gravatar</a> 澶村儚鏈嶅姟, 鏈楂樻樉绀鸿瘎绾т负 %s 鐨勫ご鍍', + '</label><select id="commentsShow-commentsAvatarRating" name="commentsAvatarRating"> + <option value="G"' . ('G' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>G - 鏅</option> + <option value="PG"' . ('PG' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>PG - 13宀佷互涓</option> + <option value="R"' . ('R' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>R - 17宀佷互涓婃垚浜</option> + <option value="X"' . ('X' == $this->options->commentsAvatarRating ? ' selected="true"' : '') . '>X - 闄愬埗绾</option></select> + <label for="commentsShow-commentsAvatarRating">'), + 'commentsPageBreak' => _t('鍚敤鍒嗛〉, 骞朵笖姣忛〉鏄剧ず %s 绡囪瘎璁, 鍦ㄥ垪鍑烘椂灏 %s 浣滀负榛樿鏄剧ず', + '</label><input type="text" value="' . $this->options->commentsPageSize + . '" class="text num text-s" id="commentsShow-commentsPageSize" name="commentsPageSize" /><label for="commentsShow-commentsPageSize">', + '</label><select id="commentsShow-commentsPageDisplay" name="commentsPageDisplay"> + <option value="first"' . ('first' == $this->options->commentsPageDisplay ? ' selected="true"' : '') . '>' . _t('绗竴椤') . '</option> + <option value="last"' . ('last' == $this->options->commentsPageDisplay ? ' selected="true"' : '') . '>' . _t('鏈鍚庝竴椤') . '</option></select>' + . '<label for="commentsShow-commentsPageDisplay">'), + 'commentsThreaded' => _t('鍚敤璇勮鍥炲, 浠 %s 灞備綔涓烘瘡涓瘎璁烘渶澶氱殑鍥炲灞傛暟', + '</label><input name="commentsMaxNestingLevels" type="text" class="text num text-s" value="' . $this->options->commentsMaxNestingLevels . '" id="commentsShow-commentsMaxNestingLevels" /> + <label for="commentsShow-commentsMaxNestingLevels">') . '</label></span><span class="multiline">' + . _t('灏 %s 鐨勮瘎璁烘樉绀哄湪鍓嶉潰', '<select id="commentsShow-commentsOrder" name="commentsOrder"> + <option value="DESC"' . ('DESC' == $this->options->commentsOrder ? ' selected="true"' : '') . '>' . _t('杈冩柊鐨') . '</option> + <option value="ASC"' . ('ASC' == $this->options->commentsOrder ? ' selected="true"' : '') . '>' . _t('杈冩棫鐨') . '</option></select><label for="commentsShow-commentsOrder">') + ); + + $commentsShowOptionsValue = array(); + if ($this->options->commentsShowCommentOnly) { + $commentsShowOptionsValue[] = 'commentsShowCommentOnly'; + } + + if ($this->options->commentsMarkdown) { + $commentsShowOptionsValue[] = 'commentsMarkdown'; + } + + if ($this->options->commentsShowUrl) { + $commentsShowOptionsValue[] = 'commentsShowUrl'; + } + + if ($this->options->commentsUrlNofollow) { + $commentsShowOptionsValue[] = 'commentsUrlNofollow'; + } + + if ($this->options->commentsAvatar) { + $commentsShowOptionsValue[] = 'commentsAvatar'; + } + + if ($this->options->commentsPageBreak) { + $commentsShowOptionsValue[] = 'commentsPageBreak'; + } + + if ($this->options->commentsThreaded) { + $commentsShowOptionsValue[] = 'commentsThreaded'; + } + + $commentsShow = new Typecho_Widget_Helper_Form_Element_Checkbox('commentsShow', $commentsShowOptions, + $commentsShowOptionsValue, _t('璇勮鏄剧ず')); + $form->addInput($commentsShow->multiMode()); + + /** 璇勮鎻愪氦 */ + $commentsPostOptions = array( + 'commentsRequireModeration' => _t('鎵鏈夎瘎璁哄繀椤荤粡杩囧鏍'), + 'commentsWhitelist' => _t('璇勮鑰呬箣鍓嶉』鏈夎瘎璁洪氳繃浜嗗鏍'), + 'commentsRequireMail' => _t('蹇呴』濉啓閭'), + 'commentsRequireURL' => _t('蹇呴』濉啓缃戝潃'), + 'commentsCheckReferer' => _t('妫鏌ヨ瘎璁烘潵婧愰〉 URL 鏄惁涓庢枃绔犻摼鎺ヤ竴鑷'), + 'commentsAntiSpam' => _t('寮鍚弽鍨冨溇淇濇姢'), + 'commentsAutoClose' => _t('鍦ㄦ枃绔犲彂甯 %s 澶╀互鍚庤嚜鍔ㄥ叧闂瘎璁', + '</label><input name="commentsPostTimeout" type="text" class="text num text-s" value="' . intval($this->options->commentsPostTimeout / (24 * 3600)) . '" id="commentsPost-commentsPostTimeout" /> + <label for="commentsPost-commentsPostTimeout">'), + 'commentsPostIntervalEnable' => _t('鍚屼竴 IP 鍙戝竷璇勮鐨勬椂闂撮棿闅旈檺鍒朵负 %s 鍒嗛挓', + '</label><input name="commentsPostInterval" type="text" class="text num text-s" value="' . round($this->options->commentsPostInterval / (60), 1) . '" id="commentsPost-commentsPostInterval" /> + <label for="commentsPost-commentsPostInterval">') + ); + + $commentsPostOptionsValue = array(); + if ($this->options->commentsRequireModeration) { + $commentsPostOptionsValue[] = 'commentsRequireModeration'; + } + + if ($this->options->commentsWhitelist) { + $commentsPostOptionsValue[] = 'commentsWhitelist'; + } + + if ($this->options->commentsRequireMail) { + $commentsPostOptionsValue[] = 'commentsRequireMail'; + } + + if ($this->options->commentsRequireURL) { + $commentsPostOptionsValue[] = 'commentsRequireURL'; + } + + if ($this->options->commentsCheckReferer) { + $commentsPostOptionsValue[] = 'commentsCheckReferer'; + } + + if ($this->options->commentsAntiSpam) { + $commentsPostOptionsValue[] = 'commentsAntiSpam'; + } + + if ($this->options->commentsAutoClose) { + $commentsPostOptionsValue[] = 'commentsAutoClose'; + } + + if ($this->options->commentsPostIntervalEnable) { + $commentsPostOptionsValue[] = 'commentsPostIntervalEnable'; + } + + $commentsPost = new Typecho_Widget_Helper_Form_Element_Checkbox('commentsPost', $commentsPostOptions, + $commentsPostOptionsValue, _t('璇勮鎻愪氦')); + $form->addInput($commentsPost->multiMode()); + + /** 鍏佽浣跨敤鐨凥TML鏍囩鍜屽睘鎬 */ + $commentsHTMLTagAllowed = new Typecho_Widget_Helper_Form_Element_Textarea('commentsHTMLTagAllowed', NULL, + $this->options->commentsHTMLTagAllowed, + _t('鍏佽浣跨敤鐨凥TML鏍囩鍜屽睘鎬'), _t('榛樿鐨勭敤鎴疯瘎璁轰笉鍏佽濉啓浠讳綍鐨凥TML鏍囩, 浣犲彲浠ュ湪杩欓噷濉啓鍏佽浣跨敤鐨凥TML鏍囩.') . '<br />' + . _t('姣斿: %s', ': <code><a href=""> <img src=""> <blockquote></code>')); + $commentsHTMLTagAllowed->input->setAttribute('class', 'mono'); + $form->addInput($commentsHTMLTagAllowed); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateDiscussionSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + $this->response->goBack(); + } + + $settings = $this->request->from('commentDateFormat', 'commentsListSize', 'commentsPageSize', 'commentsPageDisplay', 'commentsAvatar', + 'commentsOrder', 'commentsMaxNestingLevels', 'commentsUrlNofollow', 'commentsPostTimeout', 'commentsUniqueIpInterval', 'commentsWhitelist', 'commentsRequireMail', 'commentsAvatarRating', + 'commentsPostTimeout', 'commentsPostInterval', 'commentsRequireModeration', 'commentsRequireURL', 'commentsHTMLTagAllowed', 'commentsStopWords', 'commentsIpBlackList'); + $settings['commentsShow'] = $this->request->getArray('commentsShow'); + $settings['commentsPost'] = $this->request->getArray('commentsPost'); + + $settings['commentsShowCommentOnly'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsShowCommentOnly'); + $settings['commentsMarkdown'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsMarkdown'); + $settings['commentsShowUrl'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsShowUrl'); + $settings['commentsUrlNofollow'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsUrlNofollow'); + $settings['commentsAvatar'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsAvatar'); + $settings['commentsPageBreak'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsPageBreak'); + $settings['commentsThreaded'] = $this->isEnableByCheckbox($settings['commentsShow'], 'commentsThreaded'); + + $settings['commentsPageSize'] = intval($settings['commentsPageSize']); + $settings['commentsMaxNestingLevels'] = min(7, max(2, intval($settings['commentsMaxNestingLevels']))); + $settings['commentsPageDisplay'] = ('first' == $settings['commentsPageDisplay']) ? 'first' : 'last'; + $settings['commentsOrder'] = ('DESC' == $settings['commentsOrder']) ? 'DESC' : 'ASC'; + $settings['commentsAvatarRating'] = in_array($settings['commentsAvatarRating'], array('G', 'PG', 'R', 'X')) + ? $settings['commentsAvatarRating'] : 'G'; + + $settings['commentsRequireModeration'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsRequireModeration'); + $settings['commentsWhitelist'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsWhitelist'); + $settings['commentsRequireMail'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsRequireMail'); + $settings['commentsRequireURL'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsRequireURL'); + $settings['commentsCheckReferer'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsCheckReferer'); + $settings['commentsAntiSpam'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsAntiSpam'); + $settings['commentsAutoClose'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsAutoClose'); + $settings['commentsPostIntervalEnable'] = $this->isEnableByCheckbox($settings['commentsPost'], 'commentsPostIntervalEnable'); + + $settings['commentsPostTimeout'] = intval($settings['commentsPostTimeout']) * 24 * 3600; + $settings['commentsPostInterval'] = round($settings['commentsPostInterval'], 1) * 60; + + unset($settings['commentsShow']); + unset($settings['commentsPost']); + + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updateDiscussionSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/General.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/General.php" new file mode 100644 index 0000000..c59bca6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/General.php" @@ -0,0 +1,266 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍩烘湰璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍩烘湰璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_General extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鑾峰彇璇█鍒楄〃 + * + * @access private + * @return array + */ + public static function getLangs() + { + $dir = defined('__TYPECHO_LANG_DIR__') ? __TYPECHO_LANG_DIR__ : __TYPECHO_ROOT_DIR__ . '/usr/langs'; + $files = glob($dir . '/*.mo'); + $langs = array('zh_CN' => '绠浣撲腑鏂'); + + if (!empty($files)) { + foreach ($files as $file) { + $getText = new Typecho_I18n_GetText($file); + list ($name) = explode('.', basename($file)); + $title = $getText->translate('lang', $count); + $langs[$name] = $count > -1 ? $title : $name; + } + + ksort($langs); + } + + return $langs; + } + + /** + * 妫鏌ユ槸鍚﹀湪璇█鍒楄〃涓 + * + * @param mixed $lang + * @access public + * @return bool + */ + public function checkLang($lang) + { + $langs = self::getLangs(); + return isset($langs[$lang]); + } + + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/options-general'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 绔欑偣鍚嶇О */ + $title = new Typecho_Widget_Helper_Form_Element_Text('title', NULL, $this->options->title, _t('绔欑偣鍚嶇О'), _t('绔欑偣鐨勫悕绉板皢鏄剧ず鍦ㄧ綉椤电殑鏍囬澶.')); + $title->input->setAttribute('class', 'w-100'); + $form->addInput($title->addRule('required', _t('璇峰~鍐欑珯鐐瑰悕绉')) + ->addRule('xssCheck', _t('璇蜂笉瑕佸湪绔欑偣鍚嶇О涓娇鐢ㄧ壒娈婂瓧绗'))); + + /** 绔欑偣鍦板潃 */ + if (!defined('__TYPECHO_SITE_URL__')) { + $siteUrl = new Typecho_Widget_Helper_Form_Element_Text('siteUrl', NULL, $this->options->originalSiteUrl, _t('绔欑偣鍦板潃'), _t('绔欑偣鍦板潃涓昏鐢ㄤ簬鐢熸垚鍐呭鐨勬案涔呴摼鎺.') . ($this->options->originalSiteUrl == $this->options->rootUrl ? + '' : '</p><p class="message notice mono">' . _t('褰撳墠鍦板潃 <strong>%s</strong> 涓庝笂杩拌瀹氬间笉涓鑷', + $this->options->rootUrl))); + $siteUrl->input->setAttribute('class', 'w-100 mono'); + $form->addInput($siteUrl->addRule('required', _t('璇峰~鍐欑珯鐐瑰湴鍧')) + ->addRule('url', _t('璇峰~鍐欎竴涓悎娉曠殑URL鍦板潃'))); + } + + /** 绔欑偣鎻忚堪 */ + $description = new Typecho_Widget_Helper_Form_Element_Text('description', NULL, $this->options->description, _t('绔欑偣鎻忚堪'), _t('绔欑偣鎻忚堪灏嗘樉绀哄湪缃戦〉浠g爜鐨勫ご閮.')); + $form->addInput($description->addRule('xssCheck', _t('璇蜂笉瑕佸湪绔欑偣鎻忚堪涓娇鐢ㄧ壒娈婂瓧绗'))); + + /** 鍏抽敭璇 */ + $keywords = new Typecho_Widget_Helper_Form_Element_Text('keywords', NULL, $this->options->keywords, _t('鍏抽敭璇'), _t('璇蜂互鍗婅閫楀彿 "," 鍒嗗壊澶氫釜鍏抽敭瀛.')); + $form->addInput($keywords->addRule('xssCheck', _t('璇蜂笉瑕佸湪鍏抽敭璇嶄腑浣跨敤鐗规畩瀛楃'))); + + /** 娉ㄥ唽 */ + $allowRegister = new Typecho_Widget_Helper_Form_Element_Radio('allowRegister', array('0' => _t('涓嶅厑璁'), '1' => _t('鍏佽')), $this->options->allowRegister, _t('鏄惁鍏佽娉ㄥ唽'), + _t('鍏佽璁块棶鑰呮敞鍐屽埌浣犵殑缃戠珯, 榛樿鐨勬敞鍐岀敤鎴蜂笉浜湁浠讳綍鍐欏叆鏉冮檺.')); + $form->addInput($allowRegister); + + /** 璇█椤 */ + // hack 璇█鎵弿 + _t('lang'); + + $langs = self::getLangs(); + + if (count($langs) > 1) { + $lang = new Typecho_Widget_Helper_Form_Element_Select('lang', $langs, $this->options->lang, _t('璇█')); + $form->addInput($lang->addRule(array($this, 'checkLang'), _t('鎵閫夋嫨鐨勮瑷鍖呬笉瀛樺湪'))); + } + + /** 鏃跺尯 */ + $timezoneList = array( + "0" => _t('鏍兼灄濞佹不(瀛愬崍绾)鏍囧噯鏃堕棿 (GMT)'), + "3600" => _t('涓鏍囧噯鏃堕棿 闃垮鏂壒涓,鑽峰叞,娉曞浗 (GMT +1)'), + "7200" => _t('涓滄鏍囧噯鏃堕棿 甯冨姞鍕掓柉鐗,濉炴郸璺柉,甯岃厞 (GMT +2)'), + "10800" => _t('鑾柉绉戞椂闂 浼婃媺鍏,鍩冨淇勬瘮浜,椹揪鍔犳柉鍔 (GMT +3)'), + "14400" => _t('绗瘮鍒╂柉鏃堕棿 闃挎浖,姣涢噷濉斿凹浜,鐣欏凹姹矝 (GMT +4)'), + "18000" => _t('鏂板痉閲屾椂闂 宸村熀鏂潶,椹皵浠eか (GMT +5)'), + "21600" => _t('绉戜鸡鍧℃椂闂 瀛熷姞鎷 (GMT +6)'), + "25200" => _t('鏇艰胺闆呭姞杈 鏌煍瀵,鑻忛棬绛旇厞,鑰佹対 (GMT +7)'), + "28800" => _t('鍖椾含鏃堕棿 棣欐腐,鏂板姞鍧,瓒婂崡 (GMT +8)'), + "32400" => _t('涓滀含骞冲¥鏃堕棿 瑗夸紛閲屽畨,鎽╅箍鍔犵兢宀 (GMT +9)'), + "36000" => _t('鎮夊凹鍏冲矝鏃堕棿 濉旀柉椹凹浜氬矝,鏂板嚑鍐呬簹 (GMT +10)'), + "39600" => _t('鎵缃楅棬缇ゅ矝 搴撻〉宀 (GMT +11)'), + "43200" => _t('鎯犵伒椤挎椂闂 鏂拌タ鍏,鏂愭祹缇ゅ矝 (GMT +12)'), + "-3600" => _t('浣涘痉灏旂兢宀 浜氶熷皵缇ゅ矝,钁″睘鍑犲唴浜 (GMT -1)'), + "-7200" => _t('澶цタ娲嬩腑閮ㄦ椂闂 鏍奸櫟鍏 (GMT -2)'), + "-10800" => _t('甯冨疁璇烘柉鑹惧埄鏂 涔屾媺鍦,娉曞睘鍦簹閭 (GMT -3)'), + "-14400" => _t('鏅哄埄宸磋タ 濮斿唴鐟炴媺,鐜诲埄缁翠簹 (GMT -4)'), + "-18000" => _t('绾界害娓ュお鍗 鍙ゅ反,鍝ヤ鸡姣斾簹,鐗欎拱鍔 (GMT -5)'), + "-21600" => _t('澧ㄨタ鍝ュ煄鏃堕棿 娲兘鎷夋柉,鍗卞湴椹媺,鍝ユ柉杈鹃粠鍔 (GMT -6)'), + "-25200" => _t('缇庡浗涓逛經鏃堕棿 (GMT -7)'), + "-28800" => _t('缇庡浗鏃ч噾灞辨椂闂 (GMT -8)'), + "-32400" => _t('闃挎媺鏂姞鏃堕棿 (GMT -9)'), + "-36000" => _t('澶忓▉澶风兢宀 (GMT -10)'), + "-39600" => _t('涓滆惃鎽╀簹缇ゅ矝 (GMT -11)'), + "-43200" => _t('鑹惧凹濞佹墭鍏嬪矝 (GMT -12)') + ); + + $timezone = new Typecho_Widget_Helper_Form_Element_Select('timezone', $timezoneList, $this->options->timezone, _t('鏃跺尯')); + $form->addInput($timezone); + + /** 鎵╁睍鍚 */ + $attachmentTypesOptionsResult = (NULL != trim($this->options->attachmentTypes)) ? + array_map('trim', explode(',', $this->options->attachmentTypes)) : array(); + $attachmentTypesOptionsValue = array(); + + if (in_array('@image@', $attachmentTypesOptionsResult)) { + $attachmentTypesOptionsValue[] = '@image@'; + } + + if (in_array('@media@', $attachmentTypesOptionsResult)) { + $attachmentTypesOptionsValue[] = '@media@'; + } + + if (in_array('@doc@', $attachmentTypesOptionsResult)) { + $attachmentTypesOptionsValue[] = '@doc@'; + } + + $attachmentTypesOther = array_diff($attachmentTypesOptionsResult, $attachmentTypesOptionsValue); + $attachmentTypesOtherValue = ''; + if (!empty($attachmentTypesOther)) { + $attachmentTypesOptionsValue[] = '@other@'; + $attachmentTypesOtherValue = implode(',', $attachmentTypesOther); + } + + $attachmentTypesOptions = array( + '@image@' => _t('鍥剧墖鏂囦欢') . ' <code>(gif jpg jpeg png tiff bmp)</code>', + '@media@' => _t('澶氬獟浣撴枃浠') . ' <code>(mp3 wmv wma rmvb rm avi flv)</code>', + '@doc@' => _t('甯哥敤妗f鏂囦欢') . ' <code>(txt doc docx xls xlsx ppt pptx zip rar pdf)</code>', + '@other@' => _t('鍏朵粬鏍煎紡 %s', ' <input type="text" class="w-50 text-s mono" name="attachmentTypesOther" value="' . htmlspecialchars($attachmentTypesOtherValue) . '" />'), + ); + + $attachmentTypes = new Typecho_Widget_Helper_Form_Element_Checkbox('attachmentTypes', $attachmentTypesOptions, + $attachmentTypesOptionsValue, _t('鍏佽涓婁紶鐨勬枃浠剁被鍨'), _t('鐢ㄩ楀彿 "," 灏嗗悗缂鍚嶉殧寮, 渚嬪: %s', '<code>cpp, h, mak</code>')); + $form->addInput($attachmentTypes->multiMode()); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 杩囨护鎺夊彲鎵ц鐨勫悗缂鍚 + * + * @param string $ext + * @return boolean + */ + public function removeShell($ext) + { + return !preg_match("/^(php|php4|php5|sh|asp|jsp|rb|py|pl|dll|exe|bat)$/i", $ext); + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateGeneralSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + $this->response->goBack(); + } + + $settings = $this->request->from('title','description', 'keywords', 'allowRegister', 'lang', 'timezone'); + $settings['attachmentTypes'] = $this->request->getArray('attachmentTypes'); + + if (!defined('__TYPECHO_SITE_URL__')) { + $settings['siteUrl'] = rtrim($this->request->siteUrl, '/'); + } + + $attachmentTypes = array(); + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@image@')) { + $attachmentTypes[] = '@image@'; + } + + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@media@')) { + $attachmentTypes[] = '@media@'; + } + + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@doc@')) { + $attachmentTypes[] = '@doc@'; + } + + $attachmentTypesOther = $this->request->filter('trim', 'strtolower')->attachmentTypesOther; + if ($this->isEnableByCheckbox($settings['attachmentTypes'], '@other@') && !empty($attachmentTypesOther)) { + $types = implode(',', array_filter(array_map('trim', + explode(',', $attachmentTypesOther)), array($this, 'removeShell'))); + + if (!empty($types)) { + $attachmentTypes[] = $types; + } + } + + $settings['attachmentTypes'] = implode(',', $attachmentTypes); + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updateGeneralSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Permalink.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Permalink.php" new file mode 100644 index 0000000..41d3bf3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Permalink.php" @@ -0,0 +1,342 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍩烘湰璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍩烘湰璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_Permalink extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 缂栫爜鑷畾涔夌殑璺緞 + * + * @access private + * @param string $rule 寰呯紪鐮佺殑璺緞 + * @return string + */ + protected function encodeRule($rule) + { + return str_replace(array('{cid}', '{slug}', '{category}', '{directory}', '{year}', '{month}', '{day}', '{mid}'), + array('[cid:digital]', '[slug]', '[category]', '[directory:split:0]', + '[year:digital:4]', '[month:digital:2]', '[day:digital:2]', '[mid:digital]'), $rule); + } + + /** + * 瑙f瀽鑷畾涔夌殑璺緞 + * + * @access private + * @param string $rule 寰呰В鐮佺殑璺緞 + * @return string + */ + protected function decodeRule($rule) + { + return preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $rule); + } + + /** + * 妫楠岃鍒欐槸鍚﹀啿绐 + * + * @access public + * @param string $value 璺敱瑙勫垯 + * @return boolean + */ + public function checkRule($value) + { + if ('custom' != $value) { + return true; + } + + $routingTable = $this->options->routingTable; + $currentTable = array('custom' => array('url' => $this->encodeRule($this->request->customPattern))); + $parser = new Typecho_Router_Parser($currentTable); + $currentTable = $parser->parse(); + $regx = $currentTable['custom']['regx']; + + foreach ($routingTable as $key => $val) { + if ('post' != $key && 'page' != $key) { + $pathInfo = preg_replace("/\[([_a-z0-9-]+)[^\]]*\]/i", "{\\1}", $val['url']); + $pathInfo = str_replace(array('{cid}', '{slug}', '{category}', '{year}', '{month}', '{day}', '{', '}'), + array('123', 'hello', 'default', '2008', '08', '08', '', ''), $pathInfo); + + if (preg_match($regx, $pathInfo)) { + return false; + } + } + } + + return true; + } + + /** + * 妫鏌agePattern閲屾槸鍚﹀惈鏈夊繀瑕佸弬鏁 + * + * @param mixed $value + * @access public + * @return void + */ + public function checkPagePattern($value) + { + return strpos($value, '{slug}') !== false || strpos($value, '{cid}') !== false; + } + + /** + * 妫鏌ategoryPattern閲屾槸鍚﹀惈鏈夊繀瑕佸弬鏁 + * + * @param mixed $value + * @access public + * @return void + */ + public function checkCategoryPattern($value) + { + return strpos($value, '{slug}') !== false || strpos($value, '{mid}') !== false || strpos($value, '{directory}') !== false; + } + + /** + * 妫娴嬫槸鍚﹀彲浠ewrite + * + * @access public + * @param string $value 鏄惁鎵撳紑rewrite + * @return void + */ + public function checkRewrite($value) + { + if ($value) { + $this->user->pass('administrator'); + + /** 棣栧厛鐩存帴璇锋眰杩滅▼鍦板潃楠岃瘉 */ + $client = Typecho_Http_Client::get(); + $hasWrote = false; + + if (!file_exists(__TYPECHO_ROOT_DIR__ . '/.htaccess') + && !Typecho_Common::isAppEngine()) { + if (is_writeable(__TYPECHO_ROOT_DIR__)) { + $parsed = parse_url($this->options->siteUrl); + $basePath = empty($parsed['path']) ? '/' : $parsed['path']; + $basePath = rtrim($basePath, '/') . '/'; + + $hasWrote = file_put_contents(__TYPECHO_ROOT_DIR__ . '/.htaccess', "<IfModule mod_rewrite.c> +RewriteEngine On +RewriteBase {$basePath} +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule ^(.*)$ {$basePath}index.php/$1 [L] +</IfModule>"); + } + } + + try { + if ($client) { + /** 鍙戦佷竴涓猺ewrite鍦板潃璇锋眰 */ + $client->setData(array('do' => 'remoteCallback')) + ->setHeader('User-Agent', $this->options->generator) + ->send(Typecho_Common::url('/action/ajax', $this->options->siteUrl)); + + if (200 == $client->getResponseStatus() && 'OK' == $client->getResponseBody()) { + return true; + } + } + + if (false !== $hasWrote) { + @unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + + //澧炲己鍏煎鎬,浣跨敤wordpress鐨剅edirect寮弐ewrite瑙勫垯,铏界劧鏁堢巼鏈夌偣鍦颁笅,浣嗘槸瀵筬astcgi妯″紡鍏煎鎬ц緝濂 + $hasWrote = file_put_contents(__TYPECHO_ROOT_DIR__ . '/.htaccess', "<IfModule mod_rewrite.c> +RewriteEngine On +RewriteBase {$basePath} +RewriteCond %{REQUEST_FILENAME} !-f +RewriteCond %{REQUEST_FILENAME} !-d +RewriteRule . {$basePath}index.php [L] +</IfModule>"); + + //鍐嶆杩涜楠岃瘉 + $client = Typecho_Http_Client::get(); + + if ($client) { + /** 鍙戦佷竴涓猺ewrite鍦板潃璇锋眰 */ + $client->setData(array('do' => 'remoteCallback')) + ->setHeader('User-Agent', $this->options->generator) + ->send(Typecho_Common::url('/action/ajax', $this->options->siteUrl)); + + if (200 == $client->getResponseStatus() && 'OK' == $client->getResponseBody()) { + return true; + } + } + + unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + } + } catch (Typecho_Http_Client_Exception $e) { + if (false !== $hasWrote) { + @unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + } + return false; + } + + return false; + } else if (file_exists(__TYPECHO_ROOT_DIR__ . '/.htaccess')) { + @unlink(__TYPECHO_ROOT_DIR__ . '/.htaccess'); + } + + return true; + } + + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getRootUrl('index.php/action/options-permalink'), + Typecho_Widget_Helper_Form::POST_METHOD); + + if (!defined('__TYPECHO_REWRITE__')) { + /** 鏄惁浣跨敤鍦板潃閲嶅啓鍔熻兘 */ + $rewrite = new Typecho_Widget_Helper_Form_Element_Radio('rewrite', array('0' => _t('涓嶅惎鐢'), '1' => _t('鍚敤')), + $this->options->rewrite, _t('鏄惁浣跨敤鍦板潃閲嶅啓鍔熻兘'), _t('鍦板潃閲嶅啓鍗 rewrite 鍔熻兘鏄煇浜涙湇鍔″櫒杞欢鎻愪緵鐨勪紭鍖栧唴閮ㄨ繛鎺ョ殑鍔熻兘.') . '<br />' + . _t('鎵撳紑姝ゅ姛鑳藉彲浠ヨ浣犵殑閾炬帴鐪嬩笂鍘诲畬鍏ㄦ槸闈欐佸湴鍧.')); + + // disable rewrite check when rewrite opened + if (!$this->options->rewrite && !$this->request->is('enableRewriteAnyway=1')) { + $errorStr = _t('閲嶅啓鍔熻兘妫娴嬪け璐, 璇锋鏌ヤ綘鐨勬湇鍔″櫒璁剧疆'); + + /** 濡傛灉鏄痑pache鏈嶅姟鍣, 鍙兘瀛樺湪鏃犳硶鍐欏叆.htaccess鏂囦欢鐨勭幇璞 */ + if (((isset($_SERVER['SERVER_SOFTWARE']) && false !== strpos(strtolower($_SERVER['SERVER_SOFTWARE']), 'apache')) + || function_exists('apache_get_version')) && !file_exists(__TYPECHO_ROOT_DIR__ . '/.htaccess') + && !is_writeable(__TYPECHO_ROOT_DIR__)) { + $errorStr .= '<br /><strong>' . _t('鎴戜滑妫娴嬪埌浣犱娇鐢ㄤ簡apache鏈嶅姟鍣, 浣嗘槸绋嬪簭鏃犳硶鍦ㄦ牴鐩綍鍒涘缓.htaccess鏂囦欢, 杩欏彲鑳芥槸浜х敓杩欎釜閿欒鐨勫師鍥.') + . _t('璇疯皟鏁翠綘鐨勭洰褰曟潈闄, 鎴栬呮墜鍔ㄥ垱寤轰竴涓.htaccess鏂囦欢.') . '</strong>'; + } + + $errorStr .= '<br /><input type="checkbox" name="enableRewriteAnyway" id="enableRewriteAnyway" value="1" />' + . ' <label for="enableRewriteAnyway">' . _t('濡傛灉浣犱粛鐒舵兂鍚敤姝ゅ姛鑳, 璇峰嬀閫夎繖閲') . '</label>'; + $rewrite->addRule(array($this, 'checkRewrite'), $errorStr); + } + + $form->addInput($rewrite); + } + + $patterns = array('/archives/[cid:digital]/' => _t('榛樿椋庢牸') . ' <code>/archives/{cid}/</code>', + '/archives/[slug].html' => _t('wordpress椋庢牸') . ' <code>/archives/{slug}.html</code>', + '/[year:digital:4]/[month:digital:2]/[day:digital:2]/[slug].html' => _t('鎸夋棩鏈熷綊妗') . ' <code>/archives/{year}/{month}/{day}/{slug}.html</code>', + '/[category]/[slug].html' => _t('鎸夊垎绫诲綊妗') . ' <code>/{category}/{slug}.html</code>'); + + /** 鑷畾涔夋枃绔犺矾寰 */ + $postPatternValue = $this->options->routingTable['post']['url']; + + /** 澧炲姞涓у寲璺緞 */ + $customPatternValue = NULL; + if (isset($this->request->__typecho_form_item_postPattern)) { + $customPatternValue = $this->request->__typecho_form_item_postPattern; + Typecho_Cookie::delete('__typecho_form_item_postPattern'); + } else if (!isset($patterns[$postPatternValue])) { + $customPatternValue = $this->decodeRule($postPatternValue); + } + $patterns['custom'] = _t('涓у寲瀹氫箟') . ' <input type="text" class="w-50 text-s mono" name="customPattern" value="' . $customPatternValue . '" />'; + + $postPattern = new Typecho_Widget_Helper_Form_Element_Radio('postPattern', $patterns, + $postPatternValue, _t('鑷畾涔夋枃绔犺矾寰'), _t('鍙敤鍙傛暟: <code>{cid}</code> 鏃ュ織 ID, <code>{slug}</code> 鏃ュ織缂╃暐鍚, <code>{category}</code> 鍒嗙被, <code>{directory}</code> 澶氱骇鍒嗙被, <code>{year}</code> 骞, <code>{month}</code> 鏈, <code>{day}</code> 鏃') + . '<br />' . _t('閫夋嫨涓绉嶅悎閫傜殑鏂囩珷闈欐佽矾寰勯鏍, 浣垮緱浣犵殑缃戠珯閾炬帴鏇村姞鍙嬪ソ.') + . '<br />' . _t('涓鏃︿綘閫夋嫨浜嗘煇绉嶉摼鎺ラ鏍艰涓嶈杞绘槗淇敼瀹.')); + if ($customPatternValue) { + $postPattern->value('custom'); + } + $form->addInput($postPattern->multiMode()); + + /** 鐙珛椤甸潰鍚庣紑鍚 */ + $pagePattern = new Typecho_Widget_Helper_Form_Element_Text('pagePattern', NULL, $this->decodeRule($this->options->routingTable['page']['url']), _t('鐙珛椤甸潰璺緞'), _t('鍙敤鍙傛暟: <code>{cid}</code> 椤甸潰 ID, <code>{slug}</code> 椤甸潰缂╃暐鍚') + . '<br />' . _t('璇峰湪璺緞涓嚦灏戝寘鍚笂杩扮殑涓椤瑰弬鏁.')); + $pagePattern->input->setAttribute('class', 'mono w-60'); + $form->addInput($pagePattern->addRule(array($this, 'checkPagePattern'), _t('鐙珛椤甸潰璺緞涓病鏈夊寘鍚 {cid} 鎴栬 {slug} '))); + + /** 鍒嗙被椤甸潰 */ + $categoryPattern = new Typecho_Widget_Helper_Form_Element_Text('categoryPattern', NULL, $this->decodeRule($this->options->routingTable['category']['url']), _t('鍒嗙被璺緞'), _t('鍙敤鍙傛暟: <code>{mid}</code> 鍒嗙被 ID, <code>{slug}</code> 鍒嗙被缂╃暐鍚, <code>{directory}</code> 澶氱骇鍒嗙被') + . '<br />' . _t('璇峰湪璺緞涓嚦灏戝寘鍚笂杩扮殑涓椤瑰弬鏁.')); + $categoryPattern->input->setAttribute('class', 'mono w-60'); + $form->addInput($categoryPattern->addRule(array($this, 'checkCategoryPattern'), _t('鍒嗙被璺緞涓病鏈夊寘鍚 {mid} 鎴栬 {slug} '))); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updatePermalinkSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + Typecho_Cookie::set('__typecho_form_item_postPattern', $this->request->customPattern); + $this->response->goBack(); + } + + $patternValid = $this->checkRule($this->request->postPattern); + + /** 瑙f瀽url pattern */ + if ('custom' == $this->request->postPattern) { + $this->request->postPattern = '/' . ltrim($this->encodeRule($this->request->customPattern), '/'); + } + + $settings = defined('__TYPECHO_REWRITE__') ? array() : $this->request->from('rewrite'); + if (isset($this->request->postPattern) && isset($this->request->pagePattern)) { + $routingTable = $this->options->routingTable; + $routingTable['post']['url'] = $this->request->postPattern; + $routingTable['page']['url'] = '/' . ltrim($this->encodeRule($this->request->pagePattern), '/'); + $routingTable['category']['url'] = '/' . ltrim($this->encodeRule($this->request->categoryPattern), '/'); + $routingTable['category_page']['url'] = rtrim($routingTable['category']['url'], '/') . '/[page:digital]/'; + + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $settings['routingTable'] = serialize($routingTable); + } + + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + if ($patternValid) { + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t("鑷畾涔夐摼鎺ヤ笌鐜版湁瑙勫垯瀛樺湪鍐茬獊! 瀹冨彲鑳藉奖鍝嶈В鏋愭晥鐜, 寤鸿浣犻噸鏂板垎閰嶄竴涓鍒."), 'notice'); + } + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updatePermalinkSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Reading.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Reading.php" new file mode 100644 index 0000000..589422c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Options/Reading.php" @@ -0,0 +1,219 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鏂囩珷闃呰璁剧疆 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鏂囩珷闃呰璁剧疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Options_Reading extends Widget_Options_Permalink +{ + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function form() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/options-reading'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鏂囩珷鏃ユ湡鏍煎紡 */ + $postDateFormat = new Typecho_Widget_Helper_Form_Element_Text('postDateFormat', NULL, $this->options->postDateFormat, + _t('鏂囩珷鏃ユ湡鏍煎紡'), _t('姝ゆ牸寮忕敤浜庢寚瀹氭樉绀哄湪鏂囩珷褰掓。涓殑鏃ユ湡榛樿鏄剧ず鏍煎紡.') . '<br />' + . _t('鍦ㄦ煇浜涗富棰樹腑杩欎釜鏍煎紡鍙兘涓嶄細鐢熸晥, 鍥犱负涓婚浣滆呭彲浠ヨ嚜瀹氫箟鏃ユ湡鏍煎紡.') . '<br />' + . _t('璇峰弬鑰 <a href="http://www.php.net/manual/zh/function.date.php">PHP 鏃ユ湡鏍煎紡鍐欐硶</a>.')); + $postDateFormat->input->setAttribute('class', 'w-40 mono'); + $form->addInput($postDateFormat->addRule('xssCheck', _t('璇蜂笉瑕佸湪鏃ユ湡鏍煎紡涓娇鐢ㄧ壒娈婂瓧绗'))); + + //棣栭〉鏄剧ず + $frontPageParts = explode(':', $this->options->frontPage); + $frontPageType = $frontPageParts[0]; + $frontPageValue = count($frontPageParts) > 1 ? $frontPageParts[1] : ''; + + $frontPageOptions = array( + 'recent' => _t('鏄剧ず鏈鏂板彂甯冪殑鏂囩珷') + ); + + $frontPattern = '</label></span><span class="multiline front-archive%class%">' + . '<input type="checkbox" id="frontArchive" name="frontArchive" value="1"' + . ($this->options->frontArchive && 'recent' != $frontPageType ? ' checked' : '') .' /> +<label for="frontArchive">' . _t('鍚屾椂灏嗘枃绔犲垪琛ㄩ〉璺緞鏇存敼涓 %s', + '<input type="text" name="archivePattern" class="w-20 mono" value="' + . htmlspecialchars($this->decodeRule($this->options->routingTable['archive']['url'])) . '" />') + . '</label>'; + + // 椤甸潰鍒楄〃 + $pages = $this->db->fetchAll($this->db->select('cid', 'title') + ->from('table.contents')->where('type = ?', 'page') + ->where('status = ?', 'publish')->where('created < ?', $this->options->gmtTime)); + + if (!empty($pages)) { + $pagesSelect = '<select name="frontPagePage" id="frontPage-frontPagePage">'; + foreach ($pages as $page) { + $selected = ''; + if ('page' == $frontPageType && $page['cid'] == $frontPageValue) { + $selected = ' selected="true"'; + } + + $pagesSelect .= '<option value="' . $page['cid'] . '"' . $selected + . '>' . $page['title'] . '</option>'; + } + $pagesSelect .= '</select>'; + $frontPageOptions['page'] = _t('浣跨敤 %s 椤甸潰浣滀负棣栭〉', '</label>' . $pagesSelect . '<label for="frontPage-frontPagePage">'); + $selectedFrontPageType = 'page'; + } + + // 鑷畾涔夋枃浠跺垪琛 + $files = glob($this->options->themeFile($this->options->theme, '*.php')); + $filesSelect = ''; + + foreach ($files as $file) { + $info = Typecho_Plugin::parseInfo($file); + $file = basename($file); + + if ('index.php' != $file && 'index' == $info['title']) { + $selected = ''; + if ('file' == $frontPageType && $file == $frontPageValue) { + $selected = ' selected="true"'; + } + + $filesSelect .= '<option value="' . $file . '"' . $selected + . '>' . $file . '</option>'; + } + } + + if (!empty($filesSelect)) { + $frontPageOptions['file'] = _t('鐩存帴璋冪敤 %s 妯℃澘鏂囦欢', + '</label><select name="frontPageFile" id="frontPage-frontPageFile">' + . $filesSelect . '</select><label for="frontPage-frontPageFile">'); + $selectedFrontPageType = 'file'; + } + + if (isset($frontPageOptions[$frontPageType]) && 'recent' != $frontPageType && isset($selectedFrontPageType)) { + $selectedFrontPageType = $frontPageType; + $frontPattern = str_replace('%class%', '', $frontPattern); + } + + if (isset($selectedFrontPageType)) { + $frontPattern = str_replace('%class%', ' hidden', $frontPattern); + $frontPageOptions[$selectedFrontPageType] .= $frontPattern; + } + + $frontPage = new Typecho_Widget_Helper_Form_Element_Radio('frontPage', $frontPageOptions, + $frontPageType, _t('绔欑偣棣栭〉')); + $form->addInput($frontPage->multiMode()); + + /** 鏂囩珷鍒楄〃鏁扮洰 */ + $postsListSize = new Typecho_Widget_Helper_Form_Element_Text('postsListSize', NULL, $this->options->postsListSize, + _t('鏂囩珷鍒楄〃鏁扮洰'), _t('姝ゆ暟鐩敤浜庢寚瀹氭樉绀哄湪渚ц竟鏍忎腑鐨勬枃绔犲垪琛ㄦ暟鐩.')); + $postsListSize->input->setAttribute('class', 'w-20'); + $form->addInput($postsListSize->addRule('isInteger', _t('璇峰~鍏ヤ竴涓暟瀛'))); + + /** 姣忛〉鏂囩珷鏁扮洰 */ + $pageSize = new Typecho_Widget_Helper_Form_Element_Text('pageSize', NULL, $this->options->pageSize, + _t('姣忛〉鏂囩珷鏁扮洰'), _t('姝ゆ暟鐩敤浜庢寚瀹氭枃绔犲綊妗h緭鍑烘椂姣忛〉鏄剧ず鐨勬枃绔犳暟鐩.')); + $pageSize->input->setAttribute('class', 'w-20'); + $form->addInput($pageSize->addRule('isInteger', _t('璇峰~鍏ヤ竴涓暟瀛'))); + + /** FEED鍏ㄦ枃杈撳嚭 */ + $feedFullText = new Typecho_Widget_Helper_Form_Element_Radio('feedFullText', array('0' => _t('浠呰緭鍑烘憳瑕'), '1' => _t('鍏ㄦ枃杈撳嚭')), + $this->options->feedFullText, _t('鑱氬悎鍏ㄦ枃杈撳嚭'), _t('濡傛灉浣犱笉甯屾湜鍦ㄨ仛鍚堜腑杈撳嚭鏂囩珷鍏ㄦ枃,璇蜂娇鐢ㄤ粎杈撳嚭鎽樿閫夐」.') . '<br />' + . _t('鎽樿鐨勬枃瀛楀彇鍐充簬浣犲湪鏂囩珷涓娇鐢ㄥ垎闅旂鐨勪綅缃.')); + $form->addInput($feedFullText); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateReadingSettings() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->form()->validate()) { + $this->response->goBack(); + } + + $settings = $this->request->from('postDateFormat', 'frontPage', 'frontArchive', 'pageSize', 'postsListSize', 'feedFullText'); + + if ('page' == $settings['frontPage'] && isset($this->request->frontPagePage) && + $this->db->fetchRow($this->db->select('cid') + ->from('table.contents')->where('type = ?', 'page') + ->where('status = ?', 'publish')->where('created < ?', $this->options->gmtTime) + ->where('cid = ?', $pageId = intval($this->request->frontPagePage)))) { + + $settings['frontPage'] = 'page:' . $pageId; + + } else if ('file' == $settings['frontPage'] && isset($this->request->frontPageFile) && + file_exists(__TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_THEME_DIR__ . '/' . $this->options->theme . '/' . + ($file = trim($this->request->frontPageFile, " ./\\")))) { + + $settings['frontPage'] = 'file:' . $file; + + } else { + $settings['frontPage'] = 'recent'; + } + + if ('recent' != $settings['frontPage']) { + $settings['frontArchive'] = empty($settings['frontArchive']) ? 0 : 1; + if ($settings['frontArchive']) { + $routingTable = $this->options->routingTable; + $routingTable['archive']['url'] = '/' . ltrim($this->encodeRule($this->request->archivePattern), '/'); + $routingTable['archive_page']['url'] = rtrim($routingTable['archive']['url'], '/') . '/page/[page:digital]/'; + + if (isset($routingTable[0])) { + unset($routingTable[0]); + } + + $settings['routingTable'] = serialize($routingTable); + } + } else { + $settings['frontArchive'] = 0; + } + + foreach ($settings as $name => $value) { + $this->update(array('value' => $value), $this->db->sql()->where('name = ?', $name)); + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->updateReadingSettings(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Config.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Config.php" new file mode 100644 index 0000000..ffbe2d2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Config.php" @@ -0,0 +1,116 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎻掍欢閰嶇疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Plugins_Config extends Widget_Abstract_Options +{ + /** + * 鎻掍欢鏂囦欢璺緞 + * + * @access private + * @var string + */ + private $_pluginFileName; + + /** + * 鎻掍欢绫 + * + * @access private + * @var string + */ + private $_className; + + /** + * 鑾峰彇鎻掍欢淇℃伅 + * + * @access public + * @var array + */ + public $info; + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + */ + public function execute() + { + $this->user->pass('administrator'); + $config = $this->request->filter('slug')->config; + if (empty($config)) { + throw new Typecho_Widget_Exception(_t('鎻掍欢涓嶅瓨鍦'), 404); + } + + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($this->_pluginFileName, $this->_className) = Typecho_Plugin::portal($config, + $this->options->pluginDir($config)); + $this->info = Typecho_Plugin::parseInfo($this->_pluginFileName); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('璁剧疆鎻掍欢 %s', $this->info['title']); + } + + /** + * 閰嶇疆鎻掍欢 + * + * @access public + * @return Typecho_Widget_Helper_Form + * @throws Typecho_Widget_Exception + */ + public function config() + { + /** 鑾峰彇鎻掍欢鍚嶇О */ + $pluginName = $this->request->filter('slug')->config; + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (!$this->info['config'] || !isset($activatedPlugins[$pluginName])) { + throw new Typecho_Widget_Exception(_t('鏃犳硶閰嶇疆鎻掍欢'), 500); + } + + /** 杞藉叆鎻掍欢 */ + require_once $this->_pluginFileName; + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/plugins-edit?config=' . $pluginName), + Typecho_Widget_Helper_Form::POST_METHOD); + call_user_func(array($this->_className, 'config'), $form); + + $options = $this->options->plugin($pluginName); + + if (!empty($options)) { + foreach ($options as $key => $val) { + $form->getInput($key)->value($val); + } + } + + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + return $form; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Edit.php" new file mode 100644 index 0000000..45a5a98 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/Edit.php" @@ -0,0 +1,297 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鎻掍欢绠$悊 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎻掍欢绠$悊缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Plugins_Edit extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鎵嬪姩閰嶇疆鎻掍欢鍙橀噺 + * + * @param $pluginName 鎻掍欢鍚嶇О + * @param array $settings 鍙橀噺閿煎 + * @param bool $isPersonal 鏄惁涓虹浜哄彉閲 + */ + public static function configPlugin($pluginName, array $settings, $isPersonal = false) + { + $db = Typecho_Db::get(); + $pluginName = ($isPersonal ? '_' : '') . 'plugin:' . $pluginName; + + $select = $db->select()->from('table.options') + ->where('name = ?', $pluginName); + + $options = $db->fetchAll($select); + + if (empty($settings)) { + if (!empty($options)) { + $db->query($db->delete('table.options')->where('name = ?', $pluginName)); + } + } else { + if (empty($options)) { + $db->query($db->insert('table.options') + ->rows(array( + 'name' => $pluginName, + 'value' => serialize($settings), + 'user' => 0 + ))); + } else { + foreach ($options as $option) { + $value = unserialize($option['value']); + $value = array_merge($value, $settings); + + $db->query($db->update('table.options') + ->rows(array('value' => serialize($value))) + ->where('name = ?', $pluginName) + ->where('user = ?', $option['user'])); + } + } + } + } + + /** + * 鍚敤鎻掍欢 + * + * @param $pluginName + * @throws Typecho_Widget_Exception + */ + public function activate($pluginName) + { + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($pluginName, $this->options->pluginDir($pluginName)); + $info = Typecho_Plugin::parseInfo($pluginFileName); + + /** 妫娴嬩緷璧栦俊鎭 */ + list ($version, $build) = explode('/', Typecho_Common::VERSION); + if (Typecho_Plugin::checkDependence($build, $info['dependence'])) { + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + + /** 杞藉叆鎻掍欢 */ + require_once $pluginFileName; + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (isset($activatedPlugins[$pluginName]) || !class_exists($className) + || !method_exists($className, 'activate')) { + throw new Typecho_Widget_Exception(_t('鏃犳硶鍚敤鎻掍欢'), 500); + } + + try { + $result = call_user_func(array($className, 'activate')); + Typecho_Plugin::activate($pluginName); + $this->update(array('value' => serialize(Typecho_Plugin::export())), + $this->db->sql()->where('name = ?', 'plugins')); + } catch (Typecho_Plugin_Exception $e) { + /** 鎴幏寮傚父 */ + $this->widget('Widget_Notice')->set($e->getMessage(), 'error'); + $this->response->goBack(); + } + + $form = new Typecho_Widget_Helper_Form(); + call_user_func(array($className, 'config'), $form); + + $personalForm = new Typecho_Widget_Helper_Form(); + call_user_func(array($className, 'personalConfig'), $personalForm); + + $options = $form->getValues(); + $personalOptions = $personalForm->getValues(); + + if ($options && !$this->configHandle($pluginName, $options, true)) { + self::configPlugin($pluginName, $options); + } + + if ($personalOptions && !$this->personalConfigHandle($className, $personalOptions)) { + self::configPlugin($pluginName, $personalOptions, true); + } + + } else { + + $result = _t('<a href="%s">%s</a> 鏃犳硶鍦ㄦ鐗堟湰鐨則ypecho涓嬫甯稿伐浣', $info['link'], $info['title']); + + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('plugin-' . $pluginName); + + if (isset($result) && is_string($result)) { + $this->widget('Widget_Notice')->set($result, 'notice'); + } else { + $this->widget('Widget_Notice')->set(_t('鎻掍欢宸茬粡琚惎鐢'), 'success'); + } + $this->response->goBack(); + } + + /** + * 绂佺敤鎻掍欢 + * + * @param $pluginName + * @throws Typecho_Widget_Exception + * @throws Exception + * @throws Typecho_Plugin_Exception + */ + public function deactivate($pluginName) + { + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + $pluginFileExist = true; + + try { + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($pluginName, $this->options->pluginDir($pluginName)); + } catch (Typecho_Plugin_Exception $e) { + $pluginFileExist = false; + + if (!isset($activatedPlugins[$pluginName])) { + throw $e; + } + } + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (!isset($activatedPlugins[$pluginName])) { + throw new Typecho_Widget_Exception(_t('鏃犳硶绂佺敤鎻掍欢'), 500); + } + + if ($pluginFileExist) { + + /** 杞藉叆鎻掍欢 */ + require_once $pluginFileName; + + /** 鍒ゆ柇瀹炰緥鍖栨槸鍚︽垚鍔 */ + if (!isset($activatedPlugins[$pluginName]) || !class_exists($className) + || !method_exists($className, 'deactivate')) { + throw new Typecho_Widget_Exception(_t('鏃犳硶绂佺敤鎻掍欢'), 500); + } + + try { + $result = call_user_func(array($className, 'deactivate')); + } catch (Typecho_Plugin_Exception $e) { + /** 鎴幏寮傚父 */ + $this->widget('Widget_Notice')->set($e->getMessage(), 'error'); + $this->response->goBack(); + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('plugin-' . $pluginName); + } + + Typecho_Plugin::deactivate($pluginName); + $this->update(array('value' => serialize(Typecho_Plugin::export())), + $this->db->sql()->where('name = ?', 'plugins')); + + $this->delete($this->db->sql()->where('name = ?', 'plugin:' . $pluginName)); + $this->delete($this->db->sql()->where('name = ?', '_plugin:' . $pluginName)); + + if (isset($result) && is_string($result)) { + $this->widget('Widget_Notice')->set($result, 'notice'); + } else { + $this->widget('Widget_Notice')->set(_t('鎻掍欢宸茬粡琚鐢'), 'success'); + } + $this->response->goBack(); + } + + /** + * 閰嶇疆鎻掍欢 + * + * @param $pluginName + * @access public + * @return void + */ + public function config($pluginName) + { + $form = $this->widget('Widget_Plugins_Config')->config(); + + /** 楠岃瘉琛ㄥ崟 */ + if ($form->validate()) { + $this->response->goBack(); + } + + $settings = $form->getAllRequest(); + + if (!$this->configHandle($pluginName, $settings, false)) { + self::configPlugin($pluginName, $settings); + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('plugin-' . $pluginName); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t("鎻掍欢璁剧疆宸茬粡淇濆瓨"), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('plugins.php', $this->options->adminUrl)); + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗛厤缃俊鎭 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @param array $settings 閰嶇疆鍊 + * @param boolean $isInit 鏄惁涓哄垵濮嬪寲 + * @return boolean + */ + public function configHandle($pluginName, array $settings, $isInit) + { + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($pluginName, $this->options->pluginDir($pluginName)); + + if (method_exists($className, 'configHandle')) { + call_user_func(array($className, 'configHandle'), $settings, $isInit); + return true; + } + + return false; + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗚嚜瀹氫箟閰嶇疆淇℃伅 + * + * @access public + * @param string $className 绫诲悕 + * @param array $settings 閰嶇疆鍊 + * @return boolean + */ + public function personalConfigHandle($className, array $settings) + { + if (method_exists($className, 'personalConfigHandle')) { + call_user_func(array($className, 'personalConfigHandle'), $settings, true); + return true; + } + + return false; + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->is('activate'))->activate($this->request->filter('slug')->activate); + $this->on($this->request->is('deactivate'))->deactivate($this->request->filter('slug')->deactivate); + $this->on($this->request->is('config'))->config($this->request->filter('slug')->config); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/List.php" new file mode 100644 index 0000000..d57f803 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Plugins/List.php" @@ -0,0 +1,116 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鎻掍欢鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Plugins_List extends Typecho_Widget +{ + /** + * 宸插惎鐢ㄦ彃浠 + * + * @access public + * @var array + */ + public $activatedPlugins = array(); + + /** + * @return array + */ + protected function getPlugins() + { + return glob(__TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__ . '/*'); + } + + /** + * @param string $plugin + * @param string $index + * @return array|null + */ + protected function getPlugin($plugin, $index) + { + if (is_dir($plugin)) { + /** 鑾峰彇鎻掍欢鍚嶇О */ + $pluginName = basename($plugin); + + /** 鑾峰彇鎻掍欢涓绘枃浠 */ + $pluginFileName = $plugin . '/Plugin.php'; + } else if (file_exists($plugin) && 'index.php' != basename($plugin)) { + $pluginFileName = $plugin; + $part = explode('.', basename($plugin)); + if (2 == count($part) && 'php' == $part[1]) { + $pluginName = $part[0]; + } else { + return NULL; + } + } else { + return NULL; + } + + return array($pluginName, $pluginFileName); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 鍒楀嚭鎻掍欢鐩綍 */ + $pluginDirs = $this->getPlugins(); + $this->parameter->setDefault(array('activated' => NULL)); + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $this->activatedPlugins = $plugins['activated']; + + if (!empty($pluginDirs)) { + foreach ($pluginDirs as $key => $pluginDir) { + $parts = $this->getPlugin($pluginDir, $key); + if (empty($parts)) { + continue; + } + + list ($pluginName, $pluginFileName) = $parts; + + if (file_exists($pluginFileName)) { + $info = Typecho_Plugin::parseInfo($pluginFileName); + $info['name'] = $pluginName; + + list ($version, $build) = explode('/', Typecho_Common::VERSION); + $info['dependence'] = Typecho_Plugin::checkDependence($build, $info['dependence']); + + /** 榛樿鍗虫彃鍗崇敤 */ + $info['activated'] = true; + + if ($info['activate'] || $info['deactivate'] || $info['config'] || $info['personalConfig']) { + $info['activated'] = isset($this->activatedPlugins[$pluginName]); + + if (isset($this->activatedPlugins[$pluginName])) { + unset($this->activatedPlugins[$pluginName]); + } + } + + if ($info['activated'] == $this->parameter->activated) { + $this->push($info); + } + } + } + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Register.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Register.php" new file mode 100644 index 0000000..057afa2 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Register.php" @@ -0,0 +1,88 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 娉ㄥ唽缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Register extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + // protect + $this->security->protect(); + + /** 濡傛灉宸茬粡鐧诲綍 */ + if ($this->user->hasLogin() || !$this->options->allowRegister) { + /** 鐩存帴杩斿洖 */ + $this->response->redirect($this->options->index); + } + + /** 鍒濆鍖栭獙璇佺被 */ + $validator = new Typecho_Validate(); + $validator->addRule('name', 'required', _t('蹇呴』濉啓鐢ㄦ埛鍚嶇О')); + $validator->addRule('name', 'minLength', _t('鐢ㄦ埛鍚嶈嚦灏戝寘鍚2涓瓧绗'), 2); + $validator->addRule('name', 'maxLength', _t('鐢ㄦ埛鍚嶆渶澶氬寘鍚32涓瓧绗'), 32); + $validator->addRule('name', 'xssCheck', _t('璇蜂笉瑕佸湪鐢ㄦ埛鍚嶄腑浣跨敤鐗规畩瀛楃')); + $validator->addRule('name', array($this, 'nameExists'), _t('鐢ㄦ埛鍚嶅凡缁忓瓨鍦')); + $validator->addRule('mail', 'required', _t('蹇呴』濉啓鐢靛瓙閭')); + $validator->addRule('mail', array($this, 'mailExists'), _t('鐢靛瓙閭鍦板潃宸茬粡瀛樺湪')); + $validator->addRule('mail', 'email', _t('鐢靛瓙閭鏍煎紡閿欒')); + $validator->addRule('mail', 'maxLength', _t('鐢靛瓙閭鏈澶氬寘鍚200涓瓧绗'), 200); + + /** 濡傛灉璇锋眰涓湁password */ + if (array_key_exists('password', $_REQUEST)) { + $validator->addRule('password', 'required', _t('蹇呴』濉啓瀵嗙爜')); + $validator->addRule('password', 'minLength', _t('涓轰簡淇濊瘉璐︽埛瀹夊叏, 璇疯緭鍏ヨ嚦灏戝叚浣嶇殑瀵嗙爜'), 6); + $validator->addRule('password', 'maxLength', _t('涓轰簡渚夸簬璁板繂, 瀵嗙爜闀垮害璇蜂笉瑕佽秴杩囧崄鍏綅'), 18); + $validator->addRule('confirm', 'confirm', _t('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓鑷'), 'password'); + } + + /** 鎴幏楠岃瘉寮傚父 */ + if ($error = $validator->run($this->request->from('name', 'password', 'mail', 'confirm'))) { + Typecho_Cookie::set('__typecho_remember_name', $this->request->name); + Typecho_Cookie::set('__typecho_remember_mail', $this->request->mail); + + /** 璁剧疆鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($error); + $this->response->goBack(); + } + + $hasher = new PasswordHash(8, true); + $generatedPassword = Typecho_Common::randString(7); + + $dataStruct = array( + 'name' => $this->request->name, + 'mail' => $this->request->mail, + 'screenName'=> $this->request->name, + 'password' => $hasher->HashPassword($generatedPassword), + 'created' => $this->options->gmtTime, + 'group' => 'subscriber' + ); + + $dataStruct = $this->pluginHandle()->register($dataStruct); + + $insertId = $this->insert($dataStruct); + $this->db->fetchRow($this->select()->where('uid = ?', $insertId) + ->limit(1), array($this, 'push')); + + $this->pluginHandle()->finishRegister($this); + + $this->user->login($this->request->name, $generatedPassword); + + Typecho_Cookie::delete('__typecho_first_run'); + Typecho_Cookie::delete('__typecho_remember_name'); + Typecho_Cookie::delete('__typecho_remember_mail'); + + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛 <strong>%s</strong> 宸茬粡鎴愬姛娉ㄥ唽, 瀵嗙爜涓 <strong>%s</strong>', $this->screenName, $generatedPassword), 'success'); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Security.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Security.php" new file mode 100644 index 0000000..e1562e8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Security.php" @@ -0,0 +1,135 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * 瀹夊叏閫夐」缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2014 Typecho team (http://typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Security extends Typecho_Widget +{ + /** + * @var string + */ + private $_token; + + /** + * @var Widget_Options + */ + private $_options; + + /** + * 鍒濆鍖栧嚱鏁 + * + */ + public function execute() + { + $this->_options = $this->widget('Widget_Options'); + $user = $this->widget('Widget_User'); + + $this->_token = $this->_options->secret; + if ($user->hasLogin()) { + $this->_token .= '&' . $user->authCode . '&' . $user->uid; + } + } + + /** + * 鑾峰彇token + * + * @param string $suffix 鍚庣紑 + * @return string + */ + public function getToken($suffix) + { + return md5($this->_token . '&' . $suffix); + } + + /** + * 鐢熸垚甯oken鐨勮矾寰 + * + * @param $path + * @return string + */ + public function getTokenUrl($path) + { + $parts = parse_url($path); + $params = array(); + + if (!empty($parts['query'])) { + parse_str($parts['query'], $params); + } + + $params['_'] = $this->getToken($this->request->getRequestUrl()); + $parts['query'] = http_build_query($params); + + return Typecho_Common::buildUrl($parts); + } + + /** + * 淇濇姢鎻愪氦鏁版嵁 + * + */ + public function protect() + { + if ($this->request->get('_') != $this->getToken($this->request->getReferer())) { + $this->response->goBack(); + } + } + + /** + * 鑾峰彇瀹夊叏鐨勫悗鍙拌矾寰 + * + * @param string $path + * @return string + */ + public function getAdminUrl($path) + { + return Typecho_Common::url($this->getTokenUrl($path), $this->_options->adminUrl); + } + + /** + * 鑾峰彇瀹夊叏鐨勮矾鐢辫矾寰 + * + * @param $path + * @return string + */ + public function getIndex($path) + { + return Typecho_Common::url($this->getTokenUrl($path), $this->_options->index); + } + + /** + * 鑾峰彇缁濆璺敱璺緞 + * + * @param $path + * @return string + */ + public function getRootUrl($path) + { + return Typecho_Common::url($this->getTokenUrl($path), $this->_options->rootUrl); + } + + /** + * 杈撳嚭鍚庡彴瀹夊叏璺緞 + * + * @param $path + */ + public function adminUrl($path) + { + echo $this->getAdminUrl($path); + } + + /** + * 杈撳嚭瀹夊叏鐨勮矾鐢辫矾寰 + * + * @param $path + */ + public function index($path) + { + echo $this->getIndex($path); + } +} + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Service.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Service.php" new file mode 100644 index 0000000..ff291ac --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Service.php" @@ -0,0 +1,162 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 閫氱敤寮傛鏈嶅姟 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 閫氱敤寮傛鏈嶅姟缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Service extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鍙戦乸ingback瀹炵幇 + * + * @access public + * @return void + */ + public function sendPingHandle() + { + /** 楠岃瘉鏉冮檺 */ + $this->user->pass('contributor'); + + /** 蹇界暐瓒呮椂 */ + ignore_user_abort(true); + + /** 鑾峰彇post */ + $post = $this->widget('Widget_Archive', "type=post", "cid={$this->request->cid}"); + + if ($post->have() && preg_match_all("|<a[^>]*href=[\"'](.*?)[\"'][^>]*>(.*?)</a>|", $post->text, $matches)) { + $links = array_unique($matches[1]); + $permalinkPart = parse_url($post->permalink); + + /** 鍙戦乸ingback */ + foreach ($links as $url) { + $urlPart = parse_url($url); + + if (isset($urlPart['scheme'])) { + if ('http' != $urlPart['scheme'] || 'https' != $urlPart['scheme']) { + continue; + } + } else { + $urlPart['scheme'] = 'http'; + $url = Typecho_Common::buildUrl($urlPart); + } + + if ($permalinkPart['host'] == $urlPart['host'] && $permalinkPart['path'] == $urlPart['path']) { + continue; + } + + $spider = Typecho_Http_Client::get(); + + if ($spider) { + $spider->setTimeout(10) + ->send($url); + + if (!($xmlrpcUrl = $spider->getResponseHeader('x-pingback'))) { + if (preg_match("/<link[^>]*rel=[\"']pingback[\"'][^>]*href=[\"']([^\"']+)[\"'][^>]*>/i", + $spider->getResponseBody(), $out)) { + $xmlrpcUrl = $out[1]; + } + } + + if (!empty($xmlrpcUrl)) { + try { + $xmlrpc = new IXR_Client($xmlrpcUrl); + $xmlrpc->pingback->ping($post->permalink, $url); + unset($xmlrpc); + } catch (Exception $e) { + continue; + } + } + } + + unset($spider); + } + } + + /** 鍙戦乼rackback */ + if ($post->have() && !empty($this->request->trackback)) { + $links = $this->request->trackback; + foreach ($links as $url) { + + $client = Typecho_Http_Client::get(); + + if ($client) { + try { + $client->setTimeout(5) + ->setData(array( + 'blog_name' => $this->options->title . ' » ' . $post->title, + 'url' => $post->permalink, + 'excerpt' => $post->excerpt + )) + ->send($url); + + unset($client); + } catch (Typecho_Http_Client_Exception $e) { + continue; + } + } + + } + } + } + + /** + * 鍙戦乸ingback + * <code> + * $this->sendPingbacks(365); + * </code> + * + * @access public + * @param integer $cid 鍐呭id + * @param array $trackback trackback鐨剈rl + * @return void + */ + public function sendPing($cid, array $trackback = NULL) + { + $this->user->pass('contributor'); + + if ($client = Typecho_Http_Client::get()) { + try { + + $input = array('do' => 'ping', 'cid' => $cid); + if (!empty($trackback)) { + $input['trackback'] = $trackback; + } + + $client->setCookie('__typecho_uid', Typecho_Cookie::get('__typecho_uid')) + ->setCookie('__typecho_authCode', Typecho_Cookie::get('__typecho_authCode')) + ->setHeader('User-Agent', $this->options->generator) + ->setTimeout(3) + ->setData($input) + ->setIp('127.0.0.1') + ->send(Typecho_Common::url('/action/service', $this->options->index)); + + } catch (Typecho_Http_Client_Exception $e) { + return; + } + } + } + + /** + * 寮傛璇锋眰鍏ュ彛 + * + * @access public + * @return void + */ + public function action() + { + $this->on($this->request->is('do=ping'))->sendPingHandle(); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Stat.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Stat.php" new file mode 100644 index 0000000..de3cc50 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Stat.php" @@ -0,0 +1,367 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍏ㄥ眬缁熻 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍏ㄥ眬缁熻缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Stat extends Typecho_Widget +{ + /** + * 鐢ㄦ埛瀵硅薄 + * + * @access protected + * @var Widget_User + */ + protected $user; + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + * @return void + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + + /** 鍒濆鍖栧父鐢ㄧ粍浠 */ + $this->user = $this->widget('Widget_User'); + } + + /** + * 鑾峰彇宸插彂甯冪殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___publishedPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish'))->num; + } + + /** + * 鑾峰彇寰呭鏍哥殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___waitingPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'waiting'))->num; + } + + /** + * 鑾峰彇鑽夌ǹ鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___draftPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'draft'))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛宸插彂甯冪殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___myPublishedPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.authorId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛寰呭鏍告枃绔犳暟鐩 + * + * @access protected + * @return integer + */ + protected function ___myWaitingPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'waiting') + ->where('table.contents.authorId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鑽夌ǹ鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___myDraftPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'draft') + ->where('table.contents.authorId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛宸插彂甯冪殑鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___currentPublishedPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.authorId = ?', $this->request->filter('int')->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛寰呭鏍告枃绔犳暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentWaitingPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'waiting') + ->where('table.contents.authorId = ?', $this->request->filter('int')->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鑽夌ǹ鏂囩珷鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___currentDraftPostsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'draft') + ->where('table.contents.authorId = ?', $this->request->filter('int')->uid))->num; + } + + /** + * 鑾峰彇宸插彂甯冮〉闈㈡暟鐩 + * + * @access protected + * @return integer + */ + protected function ___publishedPagesNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'page') + ->where('table.contents.status = ?', 'publish'))->num; + } + + /** + * 鑾峰彇鑽夌ǹ椤甸潰鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___draftPagesNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'page') + ->where('table.contents.status = ?', 'draft'))->num; + } + + /** + * 鑾峰彇褰撳墠鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___publishedCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'approved'))->num; + } + + /** + * 鑾峰彇褰撳墠寰呭鏍哥殑璇勮鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___waitingCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'waiting'))->num; + } + + /** + * 鑾峰彇褰撳墠鍨冨溇璇勮鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___spamCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'spam'))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___myPublishedCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'approved') + ->where('table.comments.ownerId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___myWaitingCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'waiting') + ->where('table.comments.ownerId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鐢ㄦ埛鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___mySpamCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'spam') + ->where('table.comments.ownerId = ?', $this->user->uid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentPublishedCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'approved') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentWaitingCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'waiting') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇褰撳墠鏂囩珷鏄剧ず鐨勮瘎璁烘暟鐩 + * + * @access protected + * @return integer + */ + protected function ___currentSpamCommentsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments') + ->where('table.comments.status = ?', 'spam') + ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; + } + + /** + * 鑾峰彇鍒嗙被鏁扮洰 + * + * @access protected + * @return integer + */ + protected function ___categoriesNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(mid)' => 'num')) + ->from('table.metas') + ->where('table.metas.type = ?', 'category'))->num; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Config.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Config.php" new file mode 100644 index 0000000..00f9761 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Config.php" @@ -0,0 +1,84 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐨偆閰嶇疆缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_Config extends Widget_Abstract_Options +{ + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function execute() + { + $this->user->pass('administrator'); + + if (!self::isExists()) { + throw new Typecho_Widget_Exception(_t('澶栬閰嶇疆鍔熻兘涓嶅瓨鍦'), 404); + } + } + + /** + * 閰嶇疆鍔熻兘鏄惁瀛樺湪 + * + * @access public + * @return boolean + */ + public static function isExists() + { + $options = Typecho_Widget::widget('Widget_Options'); + $configFile = $options->themeFile($options->theme, 'functions.php'); + + if (file_exists($configFile)) { + require_once $configFile; + + if (function_exists('themeConfig')) { + return true; + } + } + + return false; + } + + /** + * 閰嶇疆澶栬 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function config() + { + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/themes-edit?config'), + Typecho_Widget_Helper_Form::POST_METHOD); + themeConfig($form); + $inputs = $form->getInputs(); + + if (!empty($inputs)) { + foreach ($inputs as $key => $val) { + $form->getInput($key)->value($this->options->{$key}); + } + } + + $submit = new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + return $form; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Edit.php" new file mode 100644 index 0000000..17c1164 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Edit.php" @@ -0,0 +1,179 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫椋庢牸 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫椋庢牸缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_Edit extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 鏇存崲澶栬 + * + * @access public + * @param string $theme 澶栬鍚嶇О + * @return void + * @throws Typecho_Widget_Exception + */ + public function changeTheme($theme) + { + $theme = trim($theme, './'); + if (is_dir($this->options->themeFile($theme))) { + /** 鍒犻櫎鍘熷瑙傝缃俊鎭 */ + $this->delete($this->db->sql()->where('name = ?', 'theme:' . $this->options->theme)); + + $this->update(array('value' => $theme), $this->db->sql()->where('name = ?', 'theme')); + + /** 瑙i櫎棣栭〉鍏宠仈 */ + if (0 === strpos($this->options->frontPage, 'file:')) { + $this->update(array('value' => 'recent'), $this->db->sql()->where('name = ?', 'frontPage')); + } + + $configFile = $this->options->themeFile($theme, 'functions.php'); + + if (file_exists($configFile)) { + require_once $configFile; + + if (function_exists('themeConfig')) { + $form = new Typecho_Widget_Helper_Form(); + themeConfig($form); + $options = $form->getValues(); + + if ($options && !$this->configHandle($options, true)) { + $this->insert(array( + 'name' => 'theme:' . $theme, + 'value' => serialize($options), + 'user' => 0 + )); + } + } + } + + $this->widget('Widget_Notice')->highlight('theme-' . $theme); + $this->widget('Widget_Notice')->set(_t("澶栬宸茬粡鏀瑰彉"), 'success'); + $this->response->goBack(); + } else { + throw new Typecho_Widget_Exception(_t('鎮ㄩ夋嫨鐨勯鏍间笉瀛樺湪')); + } + } + + /** + * 缂栬緫澶栬鏂囦欢 + * + * @access public + * @param string $theme 澶栬鍚嶇О + * @param string $file 鏂囦欢鍚 + * @return void + * @throws Typecho_Widget_Exception + */ + public function editThemeFile($theme, $file) + { + $path = $this->options->themeFile($theme, $file); + + if (file_exists($path) && is_writeable($path) && !Typecho_Common::isAppEngine() + && (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__)) { + $handle = fopen($path, 'wb'); + if ($handle && fwrite($handle, $this->request->content)) { + fclose($handle); + $this->widget('Widget_Notice')->set(_t("鏂囦欢 %s 鐨勬洿鏀瑰凡缁忎繚瀛", $file), 'success'); + } else { + $this->widget('Widget_Notice')->set(_t("鏂囦欢 %s 鏃犳硶琚啓鍏", $file), 'error'); + } + $this->response->goBack(); + } else { + throw new Typecho_Widget_Exception(_t('鎮ㄧ紪杈戠殑鏂囦欢涓嶅瓨鍦')); + } + } + + /** + * 閰嶇疆澶栬 + * + * @access public + * @param string $theme 澶栬鍚 + * @return void + */ + public function config($theme) + { + // 宸茬粡杞藉叆浜嗗瑙傚嚱鏁 + $form = $this->widget('Widget_Themes_Config')->config(); + + /** 楠岃瘉琛ㄥ崟 */ + if ($form->validate()) { + $this->response->goBack(); + } + + $settings = $form->getAllRequest(); + + if (!$this->configHandle($settings, false)) { + if ($this->options->__get('theme:' . $theme)) { + $this->update(array('value' => serialize($settings)), + $this->db->sql()->where('name = ?', 'theme:' . $theme)); + } else { + $this->insert(array( + 'name' => 'theme:' . $theme, + 'value' => serialize($settings), + 'user' => 0 + )); + } + } + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('theme-' . $theme); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t("澶栬璁剧疆宸茬粡淇濆瓨"), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('options-theme.php', $this->options->adminUrl)); + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗛厤缃俊鎭 + * + * @access public + * @param array $settings 閰嶇疆鍊 + * @param boolean $isInit 鏄惁涓哄垵濮嬪寲 + * @return boolean + */ + public function configHandle(array $settings, $isInit) + { + if (function_exists('themeConfigHandle')) { + themeConfigHandle($settings, $isInit); + return true; + } + + return false; + } + + /** + * 缁戝畾鍔ㄤ綔 + * + * @access public + * @return void + */ + public function action() + { + /** 闇瑕佺鐞嗗憳鏉冮檺 */ + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->is('change'))->changeTheme($this->request->filter('slug')->change); + $this->on($this->request->is('edit&theme')) + ->editThemeFile($this->request->filter('slug')->theme, $this->request->edit); + $this->on($this->request->is('config'))->config($this->options->theme); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Files.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Files.php" new file mode 100644 index 0000000..99db3b4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/Files.php" @@ -0,0 +1,136 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 椋庢牸鏂囦欢鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 椋庢牸鏂囦欢鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_Files extends Typecho_Widget +{ + /** + * 褰撳墠椋庢牸 + * + * @access private + * @var string + */ + private $_currentTheme; + + /** + * 褰撳墠鏂囦欢 + * + * @access private + * @var string + */ + private $_currentFile; + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + * @throws Typecho_Widget_Exception + */ + public function execute() + { + /** 绠$悊鍛樻潈闄 */ + $this->widget('Widget_User')->pass('administrator'); + $this->_currentTheme = $this->request->filter('slug')->get('theme', $this->widget('Widget_Options')->theme); + + if (preg_match("/^([_0-9a-z-\.\ ])+$/i", $this->_currentTheme) + && is_dir($dir = $this->widget('Widget_Options')->themeFile($this->_currentTheme)) + && (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__)) { + $files = glob($dir . '/*.{php,PHP,js,JS,css,CSS,vbs,VBS}', GLOB_BRACE); + $this->_currentFile = $this->request->get('file', 'index.php'); + + if (preg_match("/^([_0-9a-z-\.\ ])+$/i", $this->_currentFile) + && file_exists($dir . '/' . $this->_currentFile)) { + foreach ($files as $file) { + if (file_exists($file)) { + $file = basename($file); + $this->push(array( + 'file' => $file, + 'theme' => $this->_currentTheme, + 'current' => ($file == $this->_currentFile) + )); + } + } + + return; + } + } + + throw new Typecho_Widget_Exception('椋庢牸鏂囦欢涓嶅瓨鍦', 404); + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('缂栬緫鏂囦欢 %s', $this->_currentFile); + } + + /** + * 鑾峰彇鏂囦欢鍐呭 + * + * @access public + * @return string + */ + public function currentContent() + { + return htmlspecialchars(file_get_contents($this->widget('Widget_Options') + ->themeFile($this->_currentTheme, $this->_currentFile))); + } + + /** + * 鑾峰彇鏂囦欢鏄惁鍙 + * + * @access public + * @return string + */ + public function currentIsWriteable() + { + return is_writeable($this->widget('Widget_Options') + ->themeFile($this->_currentTheme, $this->_currentFile)) && !Typecho_Common::isAppEngine() + && (!defined('__TYPECHO_THEME_WRITEABLE__') || __TYPECHO_THEME_WRITEABLE__); + } + + /** + * 鑾峰彇褰撳墠鏂囦欢 + * + * @access public + * @return string + */ + public function currentFile() + { + return $this->_currentFile; + } + + /** + * 鑾峰彇褰撳墠椋庢牸 + * + * @access public + * @return string + */ + public function currentTheme() + { + return $this->_currentTheme; + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/List.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/List.php" new file mode 100644 index 0000000..e826b03 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Themes/List.php" @@ -0,0 +1,88 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 椋庢牸鍒楄〃 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 椋庢牸鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Themes_List extends Typecho_Widget +{ + /** + * @return array + */ + protected function getThemes() + { + return glob(__TYPECHO_ROOT_DIR__ . __TYPECHO_THEME_DIR__ . '/*'); + } + + /** + * get theme + * + * @param string $theme + * @param mixed $index + * @return string + */ + protected function getTheme($theme, $index) + { + return basename($theme); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $themes = $this->getThemes(); + + if ($themes) { + $options = $this->widget('Widget_Options'); + $siteUrl = $options->siteUrl; + $adminUrl = $options->adminUrl; + $activated = 0; + $result = array(); + + foreach ($themes as $key => $theme) { + $themeFile = $theme . '/index.php'; + if (file_exists($themeFile)) { + $info = Typecho_Plugin::parseInfo($themeFile); + $info['name'] = $this->getTheme($theme, $key); + + if ($info['activated'] = ($options->theme == $info['name'])) { + $activated = $key; + } + + $screen = glob($theme . '/screen*.{jpg,png,gif,bmp,jpeg,JPG,PNG,GIF,BMG,JPEG}', GLOB_BRACE); + if ($screen) { + $info['screen'] = $options->themeUrl(basename(current($screen)), $info['name']); + } else { + $info['screen'] = Typecho_Common::url('noscreen.png', $options->adminStaticUrl('img')); + } + + $result[$key] = $info; + } + } + + $clone = $result[$activated]; + unset($result[$activated]); + array_unshift($result, $clone); + array_filter($result, array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upgrade.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upgrade.php" new file mode 100644 index 0000000..5373863 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upgrade.php" @@ -0,0 +1,125 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鍗囩骇鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍗囩骇缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Upgrade extends Widget_Abstract_Options implements Widget_Interface_Do +{ + /** + * 褰撳墠鍐呴儴鐗堟湰鍙 + * + * @access private + * @var string + */ + private $_currentVersion; + + /** + * 瀵瑰崌绾у寘鎸夌増鏈繘琛屾帓搴 + * + * @access public + * @param string $a a鐗堟湰 + * @param string $b b鐗堟湰 + * @return integer + */ + public function sortPackage($a, $b) + { + list ($ver, $rev) = explode('r', $a); + $a = str_replace('_', '.', $rev); + + list ($ver, $rev) = explode('r', $b); + $b = str_replace('_', '.', $rev); + + return version_compare($a, $b, '>') ? 1 : -1; + } + + /** + * 杩囨护浣庣増鏈殑鍗囩骇鍖 + * + * @access public + * @param string $version 鐗堟湰鍙 + * @return boolean + */ + public function filterPackage($version) + { + list ($ver, $rev) = explode('r', $version); + $rev = str_replace('_', '.', $rev); + return version_compare($rev, $this->_currentVersion, '>'); + } + + /** + * 鎵ц鍗囩骇绋嬪簭 + * + * @access public + * @return void + */ + public function upgrade() + { + list($prefix, $this->_currentVersion) = explode('/', $this->options->generator); + $packages = get_class_methods('Upgrade'); + $packages = array_filter($packages, array($this, 'filterPackage')); + usort($packages, array($this, 'sortPackage')); + + $message = array(); + + foreach ($packages as $package) { + $options = $this->widget('Widget_Options@' . $package); + + /** 鎵ц鍗囩骇鑴氭湰 */ + try { + $result = call_user_func(array('Upgrade', $package), $this->db, $options); + if (!empty($result)) { + $message[] = $result; + } + } catch (Typecho_Exception $e) { + $this->widget('Widget_Notice')->set($e->getMessage(), 'error'); + $this->response->goBack(); + return; + } + + list ($ver, $rev) = explode('r', $package); + $ver = substr(str_replace('_', '.', $ver), 1); + $rev = str_replace('_', '.', $rev); + + /** 鏇存柊鐗堟湰鍙 */ + $this->update(array('value' => 'Typecho ' . $ver . '/' . $rev), + $this->db->sql()->where('name = ?', 'generator')); + + $this->destory('Widget_Options@' . $package); + } + + /** 鏇存柊鐗堟湰鍙 */ + $this->update(array('value' => 'Typecho ' . Typecho_Common::VERSION), + $this->db->sql()->where('name = ?', 'generator')); + + $this->widget('Widget_Notice')->set(empty($message) ? _t("鍗囩骇宸茬粡瀹屾垚") : $message, + empty($message) ? 'success' : 'notice'); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->isPost())->upgrade(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upload.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upload.php" new file mode 100644 index 0000000..2927dca --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Upload.php" @@ -0,0 +1,432 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 涓婁紶鍔ㄤ綔 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 涓婁紶缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + */ +class Widget_Upload extends Widget_Abstract_Contents implements Widget_Interface_Do +{ + //涓婁紶鏂囦欢鐩綍 + const UPLOAD_DIR = '/usr/uploads'; + + /** + * 鍒涘缓涓婁紶璺緞 + * + * @access private + * @param string $path 璺緞 + * @return boolean + */ + private static function makeUploadDir($path) + { + $path = preg_replace("/\\\+/", '/', $path); + $current = rtrim($path, '/'); + $last = $current; + + while (!is_dir($current) && false !== strpos($path, '/')) { + $last = $current; + $current = dirname($current); + } + + if ($last == $current) { + return true; + } + + if (!@mkdir($last)) { + return false; + } + + $stat = @stat($last); + $perms = $stat['mode'] & 0007777; + @chmod($last, $perms); + + return self::makeUploadDir($path); + } + + /** + * 鑾峰彇瀹夊叏鐨勬枃浠跺悕 + * + * @param string $name + * @static + * @access private + * @return string + */ + private static function getSafeName(&$name) + { + $name = str_replace(array('"', '<', '>'), '', $name); + $name = str_replace('\\', '/', $name); + $name = false === strpos($name, '/') ? ('a' . $name) : str_replace('/', '/a', $name); + $info = pathinfo($name); + $name = substr($info['basename'], 1); + + return isset($info['extension']) ? $info['extension'] : ''; + } + + /** + * 涓婁紶鏂囦欢澶勭悊鍑芥暟,濡傛灉闇瑕佸疄鐜拌嚜宸辩殑鏂囦欢鍝堝笇鎴栬呯壒娈婄殑鏂囦欢绯荤粺,璇峰湪options琛ㄩ噷鎶妘ploadHandle鏀规垚鑷繁鐨勫嚱鏁 + * + * @access public + * @param array $file 涓婁紶鐨勬枃浠 + * @return mixed + */ + public static function uploadHandle($file) + { + if (empty($file['name'])) { + return false; + } + + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasUploaded)->uploadHandle($file); + if ($hasUploaded) { + return $result; + } + + $ext = self::getSafeName($file['name']); + + if (!self::checkFileType($ext) || Typecho_Common::isAppEngine()) { + return false; + } + + $options = Typecho_Widget::widget('Widget_Options'); + $date = new Typecho_Date($options->gmtTime); + $path = Typecho_Common::url(defined('__TYPECHO_UPLOAD_DIR__') ? __TYPECHO_UPLOAD_DIR__ : self::UPLOAD_DIR, + defined('__TYPECHO_UPLOAD_ROOT_DIR__') ? __TYPECHO_UPLOAD_ROOT_DIR__ : __TYPECHO_ROOT_DIR__) + . '/' . $date->year . '/' . $date->month; + + //鍒涘缓涓婁紶鐩綍 + if (!is_dir($path)) { + if (!self::makeUploadDir($path)) { + return false; + } + } + + //鑾峰彇鏂囦欢鍚 + $fileName = sprintf('%u', crc32(uniqid())) . '.' . $ext; + $path = $path . '/' . $fileName; + + if (isset($file['tmp_name'])) { + + //绉诲姩涓婁紶鏂囦欢 + if (!@move_uploaded_file($file['tmp_name'], $path)) { + return false; + } + } else if (isset($file['bytes'])) { + + //鐩存帴鍐欏叆鏂囦欢 + if (!file_put_contents($path, $file['bytes'])) { + return false; + } + } else { + return false; + } + + if (!isset($file['size'])) { + $file['size'] = filesize($path); + } + + //杩斿洖鐩稿瀛樺偍璺緞 + return array( + 'name' => $file['name'], + 'path' => (defined('__TYPECHO_UPLOAD_DIR__') ? __TYPECHO_UPLOAD_DIR__ : self::UPLOAD_DIR) + . '/' . $date->year . '/' . $date->month . '/' . $fileName, + 'size' => $file['size'], + 'type' => $ext, + 'mime' => Typecho_Common::mimeContentType($path) + ); + } + + /** + * 淇敼鏂囦欢澶勭悊鍑芥暟,濡傛灉闇瑕佸疄鐜拌嚜宸辩殑鏂囦欢鍝堝笇鎴栬呯壒娈婄殑鏂囦欢绯荤粺,璇峰湪options琛ㄩ噷鎶妋odifyHandle鏀规垚鑷繁鐨勫嚱鏁 + * + * @access public + * @param array $content 鑰佹枃浠 + * @param array $file 鏂颁笂浼犵殑鏂囦欢 + * @return mixed + */ + public static function modifyHandle($content, $file) + { + if (empty($file['name'])) { + return false; + } + + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasModified)->modifyHandle($content, $file); + if ($hasModified) { + return $result; + } + + $ext = self::getSafeName($file['name']); + + if ($content['attachment']->type != $ext || Typecho_Common::isAppEngine()) { + return false; + } + + $path = Typecho_Common::url($content['attachment']->path, + defined('__TYPECHO_UPLOAD_ROOT_DIR__') ? __TYPECHO_UPLOAD_ROOT_DIR__ : __TYPECHO_ROOT_DIR__); + $dir = dirname($path); + + //鍒涘缓涓婁紶鐩綍 + if (!is_dir($dir)) { + if (!self::makeUploadDir($dir)) { + return false; + } + } + + if (isset($file['tmp_name'])) { + + @unlink($path); + + //绉诲姩涓婁紶鏂囦欢 + if (!@move_uploaded_file($file['tmp_name'], $path)) { + return false; + } + } else if (isset($file['bytes'])) { + + @unlink($path); + + //鐩存帴鍐欏叆鏂囦欢 + if (!file_put_contents($path, $file['bytes'])) { + return false; + } + } else { + return false; + } + + if (!isset($file['size'])) { + $file['size'] = filesize($path); + } + + //杩斿洖鐩稿瀛樺偍璺緞 + return array( + 'name' => $content['attachment']->name, + 'path' => $content['attachment']->path, + 'size' => $file['size'], + 'type' => $content['attachment']->type, + 'mime' => $content['attachment']->mime + ); + } + + /** + * 鍒犻櫎鏂囦欢 + * + * @access public + * @param array $content 鏂囦欢鐩稿叧淇℃伅 + * @return string + */ + public static function deleteHandle(array $content) + { + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasDeleted)->deleteHandle($content); + if ($hasDeleted) { + return $result; + } + + return !Typecho_Common::isAppEngine() + && @unlink(__TYPECHO_ROOT_DIR__ . '/' . $content['attachment']->path); + } + + /** + * 鑾峰彇瀹為檯鏂囦欢缁濆璁块棶璺緞 + * + * @access public + * @param array $content 鏂囦欢鐩稿叧淇℃伅 + * @return string + */ + public static function attachmentHandle(array $content) + { + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasPlugged)->attachmentHandle($content); + if ($hasPlugged) { + return $result; + } + + $options = Typecho_Widget::widget('Widget_Options'); + return Typecho_Common::url($content['attachment']->path, + defined('__TYPECHO_UPLOAD_URL__') ? __TYPECHO_UPLOAD_URL__ : $options->siteUrl); + } + + /** + * 鑾峰彇瀹為檯鏂囦欢鏁版嵁 + * + * @access public + * @param array $content + * @return string + */ + public static function attachmentDataHandle(array $content) + { + $result = Typecho_Plugin::factory('Widget_Upload')->trigger($hasPlugged)->attachmentDataHandle($content); + if ($hasPlugged) { + return $result; + } + + return file_get_contents(Typecho_Common::url($content['attachment']->path, + defined('__TYPECHO_UPLOAD_ROOT_DIR__') ? __TYPECHO_UPLOAD_ROOT_DIR__ : __TYPECHO_ROOT_DIR__)); + } + + /** + * 妫鏌ユ枃浠跺悕 + * + * @access private + * @param string $ext 鎵╁睍鍚 + * @return boolean + */ + public static function checkFileType($ext) + { + $options = Typecho_Widget::widget('Widget_Options'); + return in_array($ext, $options->allowedAttachmentTypes); + } + + /** + * 鎵ц鍗囩骇绋嬪簭 + * + * @access public + * @return void + */ + public function upload() + { + if (!empty($_FILES)) { + $file = array_pop($_FILES); + if (0 == $file['error'] && is_uploaded_file($file['tmp_name'])) { + // xhr鐨剆end鏃犳硶鏀寔utf8 + if ($this->request->isAjax()) { + $file['name'] = urldecode($file['name']); + } + $result = self::uploadHandle($file); + + if (false !== $result) { + $this->pluginHandle()->beforeUpload($result); + + $struct = array( + 'title' => $result['name'], + 'slug' => $result['name'], + 'type' => 'attachment', + 'status' => 'publish', + 'text' => serialize($result), + 'allowComment' => 1, + 'allowPing' => 0, + 'allowFeed' => 1 + ); + + if (isset($this->request->cid)) { + $cid = $this->request->filter('int')->cid; + + if ($this->isWriteable($this->db->sql()->where('cid = ?', $cid))) { + $struct['parent'] = $cid; + } + } + + $insertId = $this->insert($struct); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $insertId) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + /** 澧炲姞鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->upload($this); + + $this->response->throwJson(array($this->attachment->url, array( + 'cid' => $insertId, + 'title' => $this->attachment->name, + 'type' => $this->attachment->type, + 'size' => $this->attachment->size, + 'bytes' => number_format(ceil($this->attachment->size / 1024)) . ' Kb', + 'isImage' => $this->attachment->isImage, + 'url' => $this->attachment->url, + 'permalink' => $this->permalink + ))); + + } + } + } + + $this->response->throwJson(false); + } + + /** + * 鎵ц鍗囩骇绋嬪簭 + * + * @access public + * @return void + */ + public function modify() + { + if (!empty($_FILES)) { + $file = array_pop($_FILES); + if (0 == $file['error'] && is_uploaded_file($file['tmp_name'])) { + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $this->request->filter('int')->cid) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + if (!$this->have()) { + $this->response->setStatus(404); + exit; + } + + if (!$this->allow('edit')) { + $this->response->setStatus(403); + exit; + } + + // xhr鐨剆end鏃犳硶鏀寔utf8 + if ($this->request->isAjax()) { + $file['name'] = urldecode($file['name']); + } + + $result = self::modifyHandle($this->row, $file); + + if (false !== $result) { + $this->pluginHandle()->beforeModify($result); + + $this->update(array( + 'text' => serialize($result) + ), $this->db->sql()->where('cid = ?', $this->cid)); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $this->cid) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + /** 澧炲姞鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->modify($this); + + $this->response->throwJson(array($this->attachment->url, array( + 'cid' => $this->cid, + 'title' => $this->attachment->name, + 'type' => $this->attachment->type, + 'size' => $this->attachment->size, + 'bytes' => number_format(ceil($this->attachment->size / 1024)) . ' Kb', + 'isImage' => $this->attachment->isImage, + 'url' => $this->attachment->url, + 'permalink' => $this->permalink + ))); + } + } + } + + $this->response->throwJson(false); + } + + /** + * 鍒濆鍖栧嚱鏁 + * + * @access public + * @return void + */ + public function action() + { + if ($this->user->pass('contributor', true) && $this->request->isPost()) { + $this->security->protect(); + if ($this->request->is('do=modify&cid')) { + $this->modify(); + } else { + $this->upload(); + } + } else { + $this->response->setStatus(403); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/User.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/User.php" new file mode 100644 index 0000000..941c5ee --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/User.php" @@ -0,0 +1,275 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; + +/** + * 褰撳墠鐧诲綍鐢ㄦ埛 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_User extends Typecho_Widget +{ + /** + * 鐢ㄦ埛 + * + * @access private + * @var array + */ + private $_user; + + /** + * 鏄惁宸茬粡鐧诲綍 + * + * @access private + * @var boolean + */ + private $_hasLogin = NULL; + + /** + * 鍏ㄥ眬閫夐」 + * + * @access protected + * @var Widget_Options + */ + protected $options; + + /** + * 鏁版嵁搴撳璞 + * + * @access protected + * @var Typecho_Db + */ + protected $db; + + /** + * 鐢ㄦ埛缁 + * + * @access public + * @var array + */ + public $groups = array( + 'administrator' => 0, + 'editor' => 1, + 'contributor' => 2, + 'subscriber' => 3, + 'visitor' => 4 + ); + + /** + * 鏋勯犲嚱鏁,鍒濆鍖栫粍浠 + * + * @access public + * @param mixed $request request瀵硅薄 + * @param mixed $response response瀵硅薄 + * @param mixed $params 鍙傛暟鍒楄〃 + */ + public function __construct($request, $response, $params = NULL) + { + parent::__construct($request, $response, $params); + + /** 鍒濆鍖栨暟鎹簱 */ + $this->db = Typecho_Db::get(); + $this->options = $this->widget('Widget_Options'); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + if ($this->hasLogin()) { + $rows = $this->db->fetchAll($this->db->select() + ->from('table.options')->where('user = ?', $this->_user['uid'])); + + $this->push($this->_user); + + foreach ($rows as $row) { + $this->options->__set($row['name'], $row['value']); + } + + //鏇存柊鏈鍚庢椿鍔ㄦ椂闂 + $this->db->query($this->db + ->update('table.users') + ->rows(array('activated' => $this->options->gmtTime)) + ->where('uid = ?', $this->_user['uid'])); + } + } + + /** + * 浠ョ敤鎴峰悕鍜屽瘑鐮佺櫥褰 + * + * @access public + * @param string $name 鐢ㄦ埛鍚 + * @param string $password 瀵嗙爜 + * @param boolean $temporarily 鏄惁涓轰复鏃剁櫥褰 + * @param integer $expire 杩囨湡鏃堕棿 + * @return boolean + */ + public function login($name, $password, $temporarily = false, $expire = 0) + { + //鎻掍欢鎺ュ彛 + $result = $this->pluginHandle()->trigger($loginPluggable)->login($name, $password, $temporarily, $expire); + if ($loginPluggable) { + return $result; + } + + /** 寮濮嬮獙璇佺敤鎴 **/ + $user = $this->db->fetchRow($this->db->select() + ->from('table.users') + ->where((strpos($name, '@') ? 'mail' : 'name') . ' = ?', $name) + ->limit(1)); + + if (empty($user)) { + return false; + } + + $hashValidate = $this->pluginHandle()->trigger($hashPluggable)->hashValidate($password, $user['password']); + if (!$hashPluggable) { + if ('$P$' == substr($user['password'], 0, 3)) { + $hasher = new PasswordHash(8, true); + $hashValidate = $hasher->CheckPassword($password, $user['password']); + } else { + $hashValidate = Typecho_Common::hashValidate($password, $user['password']); + } + } + + if ($user && $hashValidate) { + + if (!$temporarily) { + $authCode = function_exists('openssl_random_pseudo_bytes') ? + bin2hex(openssl_random_pseudo_bytes(16)) : sha1(Typecho_Common::randString(20)); + $user['authCode'] = $authCode; + + Typecho_Cookie::set('__typecho_uid', $user['uid'], $expire); + Typecho_Cookie::set('__typecho_authCode', Typecho_Common::hash($authCode), $expire); + + //鏇存柊鏈鍚庣櫥褰曟椂闂翠互鍙婇獙璇佺爜 + $this->db->query($this->db + ->update('table.users') + ->expression('logged', 'activated') + ->rows(array('authCode' => $authCode)) + ->where('uid = ?', $user['uid'])); + } + + /** 鍘嬪叆鏁版嵁 */ + $this->push($user); + $this->_hasLogin = true; + $this->pluginHandle()->loginSucceed($this, $name, $password, $temporarily, $expire); + + return true; + } + + $this->pluginHandle()->loginFail($this, $name, $password, $temporarily, $expire); + return false; + } + + /** + * 鍙渶瑕佹彁渚泆id鍗冲彲鐧诲綍鐨勬柟娉, 澶氱敤浜庢彃浠剁瓑鐗规畩鍦哄悎 + * + * @access public + * @param integer $uid 鐢ㄦ埛id + * @return boolean + */ + public function simpleLogin($uid) + { + $user = $this->db->fetchRow($this->db->select() + ->from('table.users') + ->where('uid = ?', $uid) + ->limit(1)); + + if (empty($user)) { + return false; + } + + $this->push($user); + $this->_hasLogin = true; + + return true; + } + + /** + * 鐢ㄦ埛鐧诲嚭鍑芥暟 + * + * @access public + * @return void + */ + public function logout() + { + $this->pluginHandle()->trigger($logoutPluggable)->logout(); + if ($logoutPluggable) { + return; + } + + Typecho_Cookie::delete('__typecho_uid'); + Typecho_Cookie::delete('__typecho_authCode'); + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏄惁宸茬粡鐧诲綍 + * + * @access public + * @return boolean + */ + public function hasLogin() + { + if (NULL !== $this->_hasLogin) { + return $this->_hasLogin; + } else { + $cookieUid = Typecho_Cookie::get('__typecho_uid'); + if (NULL !== $cookieUid) { + /** 楠岃瘉鐧婚檰 */ + $user = $this->db->fetchRow($this->db->select()->from('table.users') + ->where('uid = ?', intval($cookieUid)) + ->limit(1)); + + $cookieAuthCode = Typecho_Cookie::get('__typecho_authCode'); + if ($user && Typecho_Common::hashValidate($user['authCode'], $cookieAuthCode)) { + $this->_user = $user; + return ($this->_hasLogin = true); + } + + $this->logout(); + } + + return ($this->_hasLogin = false); + } + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏉冮檺 + * + * @access public + * @param string $group 鐢ㄦ埛缁 + * @param boolean $return 鏄惁涓鸿繑鍥炴ā寮 + * @return boolean + * @throws Typecho_Widget_Exception + */ + public function pass($group, $return = false) + { + if ($this->hasLogin()) { + if (array_key_exists($group, $this->groups) && $this->groups[$this->group] <= $this->groups[$group]) { + return true; + } + } else { + if ($return) { + return false; + } else { + //闃叉寰幆閲嶅畾鍚 + $this->response->redirect($this->options->loginUrl . + (0 === strpos($this->request->getReferer(), $this->options->loginUrl) ? '' : + '?referer=' . urlencode($this->request->makeUriByRequest())), false); + } + } + + if ($return) { + return false; + } else { + throw new Typecho_Widget_Exception(_t('绂佹璁块棶'), 403); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Admin.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Admin.php" new file mode 100644 index 0000000..6f6a432 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Admin.php" @@ -0,0 +1,115 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鍚庡彴鎴愬憳鍒楄〃缁勪欢 + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Admin extends Widget_Abstract_Users +{ + /** + * 鍒嗛〉璁$畻瀵硅薄 + * + * @access private + * @var Typecho_Db_Query + */ + private $_countSql; + + /** + * 鎵鏈夋枃绔犱釜鏁 + * + * @access private + * @var integer + */ + private $_total = false; + + /** + * 褰撳墠椤 + * + * @access private + * @var integer + */ + private $_currentPage; + + /** + * 浠呬粎杈撳嚭鍩熷悕鍜岃矾寰 + * + * @access protected + * @return string + */ + protected function ___domainPath() + { + $parts = parse_url($this->url); + return $parts['host'] . (isset($parts['path']) ? $parts['path'] : NULL); + } + + /** + * 鍙戝竷鏂囩珷鏁 + * + * @access protected + * @return integer + */ + protected function ___postsNum() + { + return $this->db->fetchObject($this->db->select(array('COUNT(cid)' => 'num')) + ->from('table.contents') + ->where('table.contents.type = ?', 'post') + ->where('table.contents.status = ?', 'publish') + ->where('table.contents.authorId = ?', $this->uid))->num; + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + $this->parameter->setDefault('pageSize=20'); + $select = $this->select(); + $this->_currentPage = $this->request->get('page', 1); + + /** 杩囨护鏍囬 */ + if (NULL != ($keywords = $this->request->keywords)) { + $select->where('name LIKE ? OR screenName LIKE ?', + '%' . Typecho_Common::filterSearchQuery($keywords) . '%', + '%' . Typecho_Common::filterSearchQuery($keywords) . '%'); + } + + $this->_countSql = clone $select; + + $select->order('table.users.uid', Typecho_Db::SORT_ASC) + ->page($this->_currentPage, $this->parameter->pageSize); + + $this->db->fetchAll($select, array($this, 'push')); + } + + /** + * 杈撳嚭鍒嗛〉 + * + * @access public + * @return void + */ + public function pageNav() + { + $query = $this->request->makeUriByRequest('page={page}');; + + /** 浣跨敤鐩掔姸鍒嗛〉 */ + $nav = new Typecho_Widget_Helper_PageNavigator_Box(false === $this->_total ? $this->_total = $this->size($this->_countSql) : $this->_total, + $this->_currentPage, $this->parameter->pageSize, $query); + $nav->render('«', '»'); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Author.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Author.php" new file mode 100644 index 0000000..e8e8fb4 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Author.php" @@ -0,0 +1,37 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 鐩稿叧鍐呭 + * + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 鐩稿叧鍐呭缁勪欢(鏍规嵁鏍囩鍏宠仈) + * + * @author qining + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Author extends Widget_Abstract_Users +{ + /** + * 鎵ц鍑芥暟,鍒濆鍖栨暟鎹 + * + * @access public + * @return void + */ + public function execute() + { + if ($this->parameter->uid) { + $this->db->fetchRow($this->select() + ->where('uid = ?', $this->parameter->uid), array($this, 'push')); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Edit.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Edit.php" new file mode 100644 index 0000000..6f4d371 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Edit.php" @@ -0,0 +1,311 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鐢ㄦ埛 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鐢ㄦ埛缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Edit extends Widget_Abstract_Users implements Widget_Interface_Do +{ + /** + * 鑾峰彇椤甸潰鍋忕Щ鐨刄RL Query + * + * @access protected + * @param integer $uid 鐢ㄦ埛id + * @return string + */ + protected function getPageOffsetQuery($uid) + { + return 'page=' . $this->getPageOffset('uid', $uid); + } + + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 绠$悊鍛樹互涓婃潈闄 */ + $this->user->pass('administrator'); + + /** 鏇存柊妯″紡 */ + if (($this->request->uid && 'delete' != $this->request->do) || 'update' == $this->request->do) { + $this->db->fetchRow($this->select() + ->where('uid = ?', $this->request->uid)->limit(1), array($this, 'push')); + + if (!$this->have()) { + throw new Typecho_Widget_Exception(_t('鐢ㄦ埛涓嶅瓨鍦'), 404); + } + } + } + + /** + * 鑾峰彇鑿滃崟鏍囬 + * + * @access public + * @return string + */ + public function getMenuTitle() + { + return _t('缂栬緫鐢ㄦ埛 %s', $this->name); + } + + /** + * 鍒ゆ柇鐢ㄦ埛鏄惁瀛樺湪 + * + * @access public + * @param integer $uid 鐢ㄦ埛涓婚敭 + * @return boolean + */ + public function userExists($uid) + { + $user = $this->db->fetchRow($this->db->select() + ->from('table.users') + ->where('uid = ?', $uid)->limit(1)); + + return !empty($user); + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @param string $action 琛ㄥ崟鍔ㄤ綔 + * @return Typecho_Widget_Helper_Form + */ + public function form($action = NULL) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-edit'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鐢ㄦ埛鍚嶇О */ + $name = new Typecho_Widget_Helper_Form_Element_Text('name', NULL, NULL, _t('鐢ㄦ埛鍚 *'), _t('姝ょ敤鎴峰悕灏嗕綔涓虹敤鎴风櫥褰曟椂鎵鐢ㄧ殑鍚嶇О.') + . '<br />' . _t('璇蜂笉瑕佷笌绯荤粺涓幇鏈夌殑鐢ㄦ埛鍚嶉噸澶.')); + $form->addInput($name); + + /** 鐢靛瓙閭鍦板潃 */ + $mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('鐢靛瓙閭鍦板潃 *'), _t('鐢靛瓙閭鍦板潃灏嗕綔涓烘鐢ㄦ埛鐨勪富瑕佽仈绯绘柟寮.') + . '<br />' . _t('璇蜂笉瑕佷笌绯荤粺涓幇鏈夌殑鐢靛瓙閭鍦板潃閲嶅.')); + $form->addInput($mail); + + /** 鐢ㄦ埛鏄电О */ + $screenName = new Typecho_Widget_Helper_Form_Element_Text('screenName', NULL, NULL, _t('鐢ㄦ埛鏄电О'), _t('鐢ㄦ埛鏄电О鍙互涓庣敤鎴峰悕涓嶅悓, 鐢ㄤ簬鍓嶅彴鏄剧ず.') + . '<br />' . _t('濡傛灉浣犲皢姝ら」鐣欑┖, 灏嗛粯璁や娇鐢ㄧ敤鎴峰悕.')); + $form->addInput($screenName); + + /** 鐢ㄦ埛瀵嗙爜 */ + $password = new Typecho_Widget_Helper_Form_Element_Password('password', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜'), _t('涓烘鐢ㄦ埛鍒嗛厤涓涓瘑鐮.') + . '<br />' . _t('寤鸿浣跨敤鐗规畩瀛楃涓庡瓧姣嶃佹暟瀛楃殑娣风紪鏍峰紡,浠ュ鍔犵郴缁熷畨鍏ㄦ.')); + $password->input->setAttribute('class', 'w-60'); + $form->addInput($password); + + /** 鐢ㄦ埛瀵嗙爜纭 */ + $confirm = new Typecho_Widget_Helper_Form_Element_Password('confirm', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜纭'), _t('璇风‘璁や綘鐨勫瘑鐮, 涓庝笂闈㈣緭鍏ョ殑瀵嗙爜淇濇寔涓鑷.')); + $confirm->input->setAttribute('class', 'w-60'); + $form->addInput($confirm); + + /** 涓汉涓婚〉鍦板潃 */ + $url = new Typecho_Widget_Helper_Form_Element_Text('url', NULL, NULL, _t('涓汉涓婚〉鍦板潃'), _t('姝ょ敤鎴风殑涓汉涓婚〉鍦板潃, 璇风敤 <code>http://</code> 寮澶.')); + $form->addInput($url); + + /** 鐢ㄦ埛缁 */ + $group = new Typecho_Widget_Helper_Form_Element_Select('group', array('subscriber' => _t('鍏虫敞鑰'), + 'contributor' => _t('璐$尞鑰'), 'editor' => _t('缂栬緫'), 'administrator' => _t('绠$悊鍛')), + NULL, _t('鐢ㄦ埛缁'), _t('涓嶅悓鐨勭敤鎴风粍鎷ユ湁涓嶅悓鐨勬潈闄.') + . '<br />' . _t('鍏蜂綋鐨勬潈闄愬垎閰嶈〃璇<a href="http://docs.typecho.org/develop/acl">鍙傝冭繖閲</a>.')); + $form->addInput($group); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do'); + $form->addInput($do); + + /** 鐢ㄦ埛涓婚敭 */ + $uid = new Typecho_Widget_Helper_Form_Element_Hidden('uid'); + $form->addInput($uid); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit(); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + if (NULL != $this->request->uid) { + $submit->value(_t('缂栬緫鐢ㄦ埛')); + $name->value($this->name); + $screenName->value($this->screenName); + $url->value($this->url); + $mail->value($this->mail); + $group->value($this->group); + $do->value('update'); + $uid->value($this->uid); + $_action = 'update'; + } else { + $submit->value(_t('澧炲姞鐢ㄦ埛')); + $do->value('insert'); + $_action = 'insert'; + } + + if (empty($action)) { + $action = $_action; + } + + /** 缁欒〃鍗曞鍔犺鍒 */ + if ('insert' == $action || 'update' == $action) { + $screenName->addRule(array($this, 'screenNameExists'), _t('鏄电О宸茬粡瀛樺湪')); + $screenName->addRule('xssCheck', _t('璇蜂笉瑕佸湪鏄电О涓娇鐢ㄧ壒娈婂瓧绗')); + $url->addRule('url', _t('涓汉涓婚〉鍦板潃鏍煎紡閿欒')); + $mail->addRule('required', _t('蹇呴』濉啓鐢靛瓙閭')); + $mail->addRule(array($this, 'mailExists'), _t('鐢靛瓙閭鍦板潃宸茬粡瀛樺湪')); + $mail->addRule('email', _t('鐢靛瓙閭鏍煎紡閿欒')); + $password->addRule('minLength', _t('涓轰簡淇濊瘉璐︽埛瀹夊叏, 璇疯緭鍏ヨ嚦灏戝叚浣嶇殑瀵嗙爜'), 6); + $confirm->addRule('confirm', _t('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓鑷'), 'password'); + } + + if ('insert' == $action) { + $name->addRule('required', _t('蹇呴』濉啓鐢ㄦ埛鍚嶇О')); + $name->addRule('xssCheck', _t('璇蜂笉瑕佸湪鐢ㄦ埛鍚嶄腑浣跨敤鐗规畩瀛楃')); + $name->addRule(array($this, 'nameExists'), _t('鐢ㄦ埛鍚嶅凡缁忓瓨鍦')); + $password->label(_t('鐢ㄦ埛瀵嗙爜 *')); + $confirm->label(_t('鐢ㄦ埛瀵嗙爜纭 *')); + $password->addRule('required', _t('蹇呴』濉啓瀵嗙爜')); + } + + if ('update' == $action) { + $name->input->setAttribute('disabled', 'disabled'); + $uid->addRule('required', _t('鐢ㄦ埛涓婚敭涓嶅瓨鍦')); + $uid->addRule(array($this, 'userExists'), _t('鐢ㄦ埛涓嶅瓨鍦')); + } + + return $form; + } + + /** + * 澧炲姞鐢ㄦ埛 + * + * @access public + * @return void + */ + public function insertUser() + { + if ($this->form('insert')->validate()) { + $this->response->goBack(); + } + + $hasher = new PasswordHash(8, true); + + /** 鍙栧嚭鏁版嵁 */ + $user = $this->request->from('name', 'mail', 'screenName', 'password', 'url', 'group'); + $user['screenName'] = empty($user['screenName']) ? $user['name'] : $user['screenName']; + $user['password'] = $hasher->HashPassword($user['password']); + $user['created'] = $this->options->gmtTime; + + /** 鎻掑叆鏁版嵁 */ + $user['uid'] = $this->insert($user); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $user['uid']); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛 %s 宸茬粡琚鍔', $user['screenName']), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-users.php', $this->options->adminUrl)); + } + + /** + * 鏇存柊鐢ㄦ埛 + * + * @access public + * @return void + */ + public function updateUser() + { + if ($this->form('update')->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $user = $this->request->from('mail', 'screenName', 'password', 'url', 'group'); + $user['screenName'] = empty($user['screenName']) ? $user['name'] : $user['screenName']; + if (empty($user['password'])) { + unset($user['password']); + } else { + $hasher = new PasswordHash(8, true); + $user['password'] = $hasher->HashPassword($user['password']); + } + + /** 鏇存柊鏁版嵁 */ + $this->update($user, $this->db->sql()->where('uid = ?', $this->request->uid)); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $this->request->uid); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鐢ㄦ埛 %s 宸茬粡琚洿鏂', $user['screenName']), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-users.php?' . + $this->getPageOffsetQuery($this->request->uid), $this->options->adminUrl)); + } + + /** + * 鍒犻櫎鐢ㄦ埛 + * + * @access public + * @return void + */ + public function deleteUser() + { + $users = $this->request->filter('int')->getArray('uid'); + $masterUserId = $this->db->fetchObject($this->db->select(array('MIN(uid)' => 'num'))->from('table.users'))->num; + $deleteCount = 0; + + foreach ($users as $user) { + if ($masterUserId == $user || $user == $this->user->id) { + continue; + } + + if ($this->delete($this->db->sql()->where('uid = ?', $user))) { + $deleteCount ++; + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set($deleteCount > 0 ? _t('鐢ㄦ埛宸茬粡鍒犻櫎') : _t('娌℃湁鐢ㄦ埛琚垹闄'), + $deleteCount > 0 ? 'success' : 'notice'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('manage-users.php', $this->options->adminUrl)); + } + + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action() + { + $this->user->pass('administrator'); + $this->security->protect(); + $this->on($this->request->is('do=insert'))->insertUser(); + $this->on($this->request->is('do=update'))->updateUser(); + $this->on($this->request->is('do=delete'))->deleteUser(); + $this->response->redirect($this->options->adminUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Profile.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Profile.php" new file mode 100644 index 0000000..f27e66d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/Users/Profile.php" @@ -0,0 +1,424 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * 缂栬緫鐢ㄦ埛 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * 缂栬緫鐢ㄦ埛缁勪欢 + * + * @link typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_Users_Profile extends Widget_Users_Edit implements Widget_Interface_Do +{ + /** + * 鎵ц鍑芥暟 + * + * @access public + * @return void + */ + public function execute() + { + /** 娉ㄥ唽鐢ㄦ埛浠ヤ笂鏉冮檺 */ + $this->user->pass('subscriber'); + $this->request->setParam('uid', $this->user->uid); + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function profileForm() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鐢ㄦ埛鏄电О */ + $screenName = new Typecho_Widget_Helper_Form_Element_Text('screenName', NULL, NULL, _t('鏄电О'), _t('鐢ㄦ埛鏄电О鍙互涓庣敤鎴峰悕涓嶅悓, 鐢ㄤ簬鍓嶅彴鏄剧ず.') + . '<br />' . _t('濡傛灉浣犲皢姝ら」鐣欑┖, 灏嗛粯璁や娇鐢ㄧ敤鎴峰悕.')); + $form->addInput($screenName); + + /** 涓汉涓婚〉鍦板潃 */ + $url = new Typecho_Widget_Helper_Form_Element_Text('url', NULL, NULL, _t('涓汉涓婚〉鍦板潃'), _t('姝ょ敤鎴风殑涓汉涓婚〉鍦板潃, 璇风敤 <code>http://</code> 寮澶.')); + $form->addInput($url); + + /** 鐢靛瓙閭鍦板潃 */ + $mail = new Typecho_Widget_Helper_Form_Element_Text('mail', NULL, NULL, _t('鐢靛瓙閭鍦板潃 *'), _t('鐢靛瓙閭鍦板潃灏嗕綔涓烘鐢ㄦ埛鐨勪富瑕佽仈绯绘柟寮.') + . '<br />' . _t('璇蜂笉瑕佷笌绯荤粺涓幇鏈夌殑鐢靛瓙閭鍦板潃閲嶅.')); + $form->addInput($mail); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'profile'); + $form->addInput($do); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('鏇存柊鎴戠殑妗f')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + $screenName->value($this->user->screenName); + $url->value($this->user->url); + $mail->value($this->user->mail); + + /** 缁欒〃鍗曞鍔犺鍒 */ + $screenName->addRule(array($this, 'screenNameExists'), _t('鏄电О宸茬粡瀛樺湪')); + $screenName->addRule('xssCheck', _t('璇蜂笉瑕佸湪鏄电О涓娇鐢ㄧ壒娈婂瓧绗')); + $url->addRule('url', _t('涓汉涓婚〉鍦板潃鏍煎紡閿欒')); + $mail->addRule('required', _t('蹇呴』濉啓鐢靛瓙閭')); + $mail->addRule(array($this, 'mailExists'), _t('鐢靛瓙閭鍦板潃宸茬粡瀛樺湪')); + $mail->addRule('email', _t('鐢靛瓙閭鏍煎紡閿欒')); + + return $form; + } + + /** + * 杈撳嚭琛ㄥ崟缁撴瀯 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function optionsForm() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鎾板啓璁剧疆 */ + $markdown = new Typecho_Widget_Helper_Form_Element_Radio('markdown', + array('0' => _t('鍏抽棴'), '1' => _t('鎵撳紑')), + $this->options->markdown, _t('浣跨敤 Markdown 璇硶缂栬緫鍜岃В鏋愬唴瀹'), + _t('浣跨敤 <a href="http://daringfireball.net/projects/markdown/">Markdown</a> 璇硶鑳藉浣挎偍鐨勬挵鍐欒繃绋嬫洿鍔犵畝渚跨洿瑙.') + . '<br />' . _t('姝ゅ姛鑳藉紑鍚笉浼氬奖鍝嶄互鍓嶆病鏈変娇鐢 Markdown 璇硶缂栬緫鐨勫唴瀹.')); + $form->addInput($markdown); + + /** 鑷姩淇濆瓨 */ + $autoSave = new Typecho_Widget_Helper_Form_Element_Radio('autoSave', + array('0' => _t('鍏抽棴'), '1' => _t('鎵撳紑')), + $this->options->autoSave, _t('鑷姩淇濆瓨'), _t('鑷姩淇濆瓨鍔熻兘鍙互鏇村ソ鍦颁繚鎶や綘鐨勬枃绔犱笉浼氫涪澶.')); + $form->addInput($autoSave); + + /** 榛樿鍏佽 */ + $allow = array(); + if ($this->options->defaultAllowComment) { + $allow[] = 'comment'; + } + + if ($this->options->defaultAllowPing) { + $allow[] = 'ping'; + } + + if ($this->options->defaultAllowFeed) { + $allow[] = 'feed'; + } + + $defaultAllow = new Typecho_Widget_Helper_Form_Element_Checkbox('defaultAllow', + array('comment' => _t('鍙互琚瘎璁'), 'ping' => _t('鍙互琚紩鐢'), 'feed' => _t('鍑虹幇鍦ㄨ仛鍚堜腑')), + $allow, _t('榛樿鍏佽'), _t('璁剧疆浣犵粡甯镐娇鐢ㄧ殑榛樿鍏佽鏉冮檺')); + $form->addInput($defaultAllow); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'options'); + $form->addInput($do); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('淇濆瓨璁剧疆')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + return $form; + } + + /** + * 杈撳嚭鑷畾涔夎缃夐」 + * + * @access public + * @param string $pluginName 鎻掍欢鍚嶇О + * @param string $className 绫诲悕绉 + * @param string $pluginFileName 鎻掍欢鏂囦欢鍚 + * @param string $group 鐢ㄦ埛缁 + * @return Typecho_Widget_Helper_Form + */ + public function personalForm($pluginName, $className, $pluginFileName, &$group) + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + $form->setAttribute('name', $pluginName); + $form->setAttribute('id', $pluginName); + + require_once $pluginFileName; + $group = call_user_func(array($className, 'personalConfig'), $form); + $group = $group ? $group : 'subscriber'; + + $options = $this->options->personalPlugin($pluginName); + + if (!empty($options)) { + foreach ($options as $key => $val) { + $form->getInput($key)->value($val); + } + } + + $form->addItem(new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'personal')); + $form->addItem(new Typecho_Widget_Helper_Form_Element_Hidden('plugin', NULL, $pluginName)); + $form->addItem(new Typecho_Widget_Helper_Form_Element_Submit(NULL, NULL, _t('淇濆瓨璁剧疆'))); + return $form; + } + + /** + * 鑷畾涔夎缃垪琛 + * + * @access public + * @return void + */ + public function personalFormList() + { + $this->widget('Widget_Plugins_List@personalPlugins', 'activated=1')->to($plugins); + while ($plugins->next()) { + if ($plugins->personalConfig) { + echo '<h3>' . $plugins->title . '</h3>'; + list($pluginFileName, $className) = Typecho_Plugin::portal($plugins->name, + $this->options->pluginDir($plugins->name)); + + $form = $this->personalForm($plugins->name, $className, $pluginFileName, $group); + if ($this->user->pass($group, true)) { + $form->render(); + } + } + } + } + + /** + * 鐢熸垚琛ㄥ崟 + * + * @access public + * @return Typecho_Widget_Helper_Form + */ + public function passwordForm() + { + /** 鏋勫缓琛ㄦ牸 */ + $form = new Typecho_Widget_Helper_Form($this->security->getIndex('/action/users-profile'), + Typecho_Widget_Helper_Form::POST_METHOD); + + /** 鐢ㄦ埛瀵嗙爜 */ + $password = new Typecho_Widget_Helper_Form_Element_Password('password', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜'), _t('涓烘鐢ㄦ埛鍒嗛厤涓涓瘑鐮.') + . '<br />' . _t('寤鸿浣跨敤鐗规畩瀛楃涓庡瓧姣嶃佹暟瀛楃殑娣风紪鏍峰紡,浠ュ鍔犵郴缁熷畨鍏ㄦ.')); + $password->input->setAttribute('class', 'w-60'); + $form->addInput($password); + + /** 鐢ㄦ埛瀵嗙爜纭 */ + $confirm = new Typecho_Widget_Helper_Form_Element_Password('confirm', NULL, NULL, _t('鐢ㄦ埛瀵嗙爜纭'), _t('璇风‘璁や綘鐨勫瘑鐮, 涓庝笂闈㈣緭鍏ョ殑瀵嗙爜淇濇寔涓鑷.')); + $confirm->input->setAttribute('class', 'w-60'); + $form->addInput($confirm); + + /** 鐢ㄦ埛鍔ㄤ綔 */ + $do = new Typecho_Widget_Helper_Form_Element_Hidden('do', NULL, 'password'); + $form->addInput($do); + + /** 鎻愪氦鎸夐挳 */ + $submit = new Typecho_Widget_Helper_Form_Element_Submit('submit', NULL, _t('鏇存柊瀵嗙爜')); + $submit->input->setAttribute('class', 'btn primary'); + $form->addItem($submit); + + $password->addRule('required', _t('蹇呴』濉啓瀵嗙爜')); + $password->addRule('minLength', _t('涓轰簡淇濊瘉璐︽埛瀹夊叏, 璇疯緭鍏ヨ嚦灏戝叚浣嶇殑瀵嗙爜'), 6); + $confirm->addRule('confirm', _t('涓ゆ杈撳叆鐨勫瘑鐮佷笉涓鑷'), 'password'); + + return $form; + } + + /** + * 鏇存柊鐢ㄦ埛 + * + * @access public + * @return void + */ + public function updateProfile() + { + if ($this->profileForm()->validate()) { + $this->response->goBack(); + } + + /** 鍙栧嚭鏁版嵁 */ + $user = $this->request->from('mail', 'screenName', 'url'); + $user['screenName'] = empty($user['screenName']) ? $user['name'] : $user['screenName']; + + /** 鏇存柊鏁版嵁 */ + $this->update($user, $this->db->sql()->where('uid = ?', $this->user->uid)); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $this->user->uid); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('鎮ㄧ殑妗f宸茬粡鏇存柊'), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鎵ц鏇存柊鍔ㄤ綔 + * + * @access public + * @return void + */ + public function updateOptions() + { + $settings['autoSave'] = $this->request->autoSave ? 1 : 0; + $settings['markdown'] = $this->request->markdown ? 1 : 0; + $defaultAllow = $this->request->getArray('defaultAllow'); + + $settings['defaultAllowComment'] = in_array('comment', $defaultAllow) ? 1 : 0; + $settings['defaultAllowPing'] = in_array('ping', $defaultAllow) ? 1 : 0; + $settings['defaultAllowFeed'] = in_array('feed', $defaultAllow) ? 1 : 0; + + foreach ($settings as $name => $value) { + if ($this->db->fetchObject($this->db->select(array('COUNT(*)' => 'num')) + ->from('table.options')->where('name = ? AND user = ?', $name, $this->user->uid))->num > 0) { + $this->widget('Widget_Abstract_Options') + ->update(array('value' => $value), $this->db->sql()->where('name = ? AND user = ?', $name, $this->user->uid)); + } else { + $this->widget('Widget_Abstract_Options')->insert(array( + 'name' => $name, + 'value' => $value, + 'user' => $this->user->uid + )); + } + } + + $this->widget('Widget_Notice')->set(_t("璁剧疆宸茬粡淇濆瓨"), 'success'); + $this->response->goBack(); + } + + /** + * 鏇存柊瀵嗙爜 + * + * @access public + * @return void + */ + public function updatePassword() + { + /** 楠岃瘉鏍煎紡 */ + if ($this->passwordForm()->validate()) { + $this->response->goBack(); + } + + $hasher = new PasswordHash(8, true); + $password = $hasher->HashPassword($this->request->password); + + /** 鏇存柊鏁版嵁 */ + $this->update(array('password' => $password), + $this->db->sql()->where('uid = ?', $this->user->uid)); + + /** 璁剧疆楂樹寒 */ + $this->widget('Widget_Notice')->highlight('user-' . $this->user->uid); + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t('瀵嗙爜宸茬粡鎴愬姛淇敼'), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->goBack(); + } + + /** + * 鏇存柊涓汉璁剧疆 + * + * @access public + * @return void + */ + public function updatePersonal() + { + /** 鑾峰彇鎻掍欢鍚嶇О */ + $pluginName = $this->request->plugin; + + /** 鑾峰彇宸插惎鐢ㄦ彃浠 */ + $plugins = Typecho_Plugin::export(); + $activatedPlugins = $plugins['activated']; + + /** 鑾峰彇鎻掍欢鍏ュ彛 */ + list($pluginFileName, $className) = Typecho_Plugin::portal($this->request->plugin, + __TYPECHO_ROOT_DIR__ . '/' . __TYPECHO_PLUGIN_DIR__); + $info = Typecho_Plugin::parseInfo($pluginFileName); + + if (!$info['personalConfig'] || !isset($activatedPlugins[$pluginName])) { + throw new Typecho_Widget_Exception(_t('鏃犳硶閰嶇疆鎻掍欢'), 500); + } + + $form = $this->personalForm($pluginName, $className, $pluginFileName, $group); + $this->user->pass($group); + + /** 楠岃瘉琛ㄥ崟 */ + if ($form->validate()) { + $this->response->goBack(); + } + + $settings = $form->getAllRequest(); + unset($settings['do'], $settings['plugin']); + $name = '_plugin:' . $pluginName; + + if (!$this->personalConfigHandle($className, $settings)) { + if ($this->db->fetchObject($this->db->select(array('COUNT(*)' => 'num')) + ->from('table.options')->where('name = ? AND user = ?', $name, $this->user->uid))->num > 0) { + $this->widget('Widget_Abstract_Options') + ->update(array('value' => serialize($settings)), $this->db->sql()->where('name = ? AND user = ?', $name, $this->user->uid)); + } else { + $this->widget('Widget_Abstract_Options')->insert(array( + 'name' => $name, + 'value' => serialize($settings), + 'user' => $this->user->uid + )); + } + } + + /** 鎻愮ず淇℃伅 */ + $this->widget('Widget_Notice')->set(_t("%s 璁剧疆宸茬粡淇濆瓨", $info['title']), 'success'); + + /** 杞悜鍘熼〉 */ + $this->response->redirect(Typecho_Common::url('profile.php', $this->options->adminUrl)); + } + + /** + * 鐢ㄨ嚜鏈夊嚱鏁板鐞嗚嚜瀹氫箟閰嶇疆淇℃伅 + * + * @access public + * @param string $className 绫诲悕 + * @param array $settings 閰嶇疆鍊 + * @return boolean + */ + public function personalConfigHandle($className, array $settings) + { + if (method_exists($className, 'personalConfigHandle')) { + call_user_func(array($className, 'personalConfigHandle'), $settings, false); + return true; + } + + return false; + } + + /** + * 鍏ュ彛鍑芥暟 + * + * @access public + * @return void + */ + public function action() + { + $this->security->protect(); + $this->on($this->request->is('do=profile'))->updateProfile(); + $this->on($this->request->is('do=options'))->updateOptions(); + $this->on($this->request->is('do=password'))->updatePassword(); + $this->on($this->request->is('do=personal&plugin'))->updatePersonal(); + $this->response->redirect($this->options->siteUrl); + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/XmlRpc.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/XmlRpc.php" new file mode 100644 index 0000000..3a2525b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.hack123.pw/var/Widget/XmlRpc.php" @@ -0,0 +1,2326 @@ +<?php +if (!defined('__TYPECHO_ROOT_DIR__')) exit; +/** + * Typecho Blog Platform + * + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + * @version $Id$ + */ + +/** + * XmlRpc鎺ュ彛 + * + * @author blankyao + * @category typecho + * @package Widget + * @copyright Copyright (c) 2008 Typecho team (http://www.typecho.org) + * @license GNU General Public License 2.0 + */ +class Widget_XmlRpc extends Widget_Abstract_Contents implements Widget_Interface_Do +{ + /** + * 褰撳墠閿欒 + * + * @access private + * @var IXR_Error + */ + private $error; + + /** + * wordpress椋庢牸鐨勭郴缁熼夐」 + * + * @access private + * @var array + */ + private $_wpOptions; + + /** + * 宸茬粡浣跨敤杩囩殑缁勪欢鍒楄〃 + * + * @access private + * @var array + */ + private $_usedWidgetNameList = array(); + + /** + * 鑾峰彇鎵╁睍瀛楁 + * + * @access private + * @param Widget_Abstract_Contents $content + * @return array + */ + private function getPostExtended(Widget_Abstract_Contents $content) + { + //鏍规嵁瀹㈡埛绔樉绀烘潵鍒ゆ柇鏄惁鏄剧ずhtml浠g爜 + $agent = $this->request->getAgent(); + $text = ''; + + switch (true) { + case false !== strpos($agent, 'wp-iphone'): // wordpress iphone瀹㈡埛绔 + case false !== strpos($agent, 'wp-blackberry'): // 榛戣帗 + case false !== strpos($agent, 'wp-andriod'): // andriod + case false !== strpos($agent, 'plain-text'): // 杩欐槸棰勭暀缁欑涓夋柟寮鍙戣呯殑鎺ュ彛, 鐢ㄤ簬寮鸿璋冪敤闈炴墍瑙佸嵆鎵寰楁暟鎹 + $text = $content->text; + break; + default: + $text = $content->content; + break; + } + + $post = explode('<!--more-->', $text, 2); + return array(Typecho_Common::fixHtml($post[0]), isset($post[1]) ? Typecho_Common::fixHtml($post[1]) : NULL); + } + + /** + * 灏唗ypecho鐨勭姸鎬佺被鍨嬭浆鎹负wordperss鐨勯鏍 + * + * @access private + * @param string $status typecho鐨勭姸鎬 + * @param string $type 鍐呭绫诲瀷 + * @return string + */ + private function typechoToWordpressStatus($status, $type = 'post') + { + if ('post' == $type) { + /** 鏂囩珷鐘舵 */ + switch ($status) { + case 'waiting': + return 'pending'; + case 'publish': + case 'draft': + case 'private': + return $status; + default: + return 'publish'; + } + } else if ('page' == $type) { + switch ($status) { + case 'publish': + case 'draft': + case 'private': + return $status; + default: + return 'publish'; + } + } else if ('comment' == $type) { + switch ($status) { + case 'publish': + case 'approved': + return 'approve'; + case 'waiting': + return 'hold'; + case 'spam': + return $status; + default: + return 'approve'; + } + } + + return ''; + } + + /** + * 灏唚ordpress鐨勭姸鎬佺被鍨嬭浆鎹负typecho鐨勯鏍 + * + * @access private + * @param string $status wordpress鐨勭姸鎬 + * @param string $type 鍐呭绫诲瀷 + * @return string + */ + private function wordpressToTypechoStatus($status, $type = 'post') + { + if ('post' == $type) { + /** 鏂囩珷鐘舵 */ + switch ($status) { + case 'pending': + return 'waiting'; + case 'publish': + case 'draft': + case 'private': + case 'waiting': + return $status; + default: + return 'publish'; + } + } else if ('page' == $type) { + switch ($status) { + case 'publish': + case 'draft': + case 'private': + return $status; + default: + return 'publish'; + } + } else if ('comment' == $type) { + switch ($status) { + case 'approve': + case 'publish': + case 'approved': + return 'approved'; + case 'hold': + case 'waiting': + return 'waiting'; + case 'spam': + return $status; + default: + return 'approved'; + } + } + + return ''; + } + + /** + * 浠g悊宸ュ巶鏂规硶,灏嗙被闈欐佸寲鏀剧疆鍒板垪琛ㄤ腑 + * + * @access public + * @param string $alias 缁勪欢鍒悕 + * @param mixed $params 浼犻掔殑鍙傛暟 + * @param mixed $request 鍓嶇鍙傛暟 + * @param boolean $enableResponse 鏄惁鍏佽http鍥炴墽 + * @return object + * @throws Typecho_Exception + */ + private function singletonWidget($alias, $params = NULL, $request = NULL, $enableResponse = true) + { + $this->_usedWidgetNameList[] = $alias; + return Typecho_Widget::widget($alias, $params, $request, $enableResponse); + } + + /** + * 濡傛灉杩欓噷娌℃湁閲嶈浇, 姣忔閮戒細琚粯璁ゆ墽琛 + * + * @access public + * @param boolen $run 鏄惁鎵ц + * @return void + */ + public function execute($run = false) + { + if ($run) { + parent::execute(); + } + + $this->_wpOptions = array( + // Read only options + 'software_name' => array( + 'desc' => _t( '杞欢鍚嶇О' ), + 'readonly' => true, + 'value' => $this->options->software + ), + 'software_version' => array( + 'desc' => _t( '杞欢鐗堟湰' ), + 'readonly' => true, + 'value' => $this->options->version + ), + 'blog_url' => array( + 'desc' => _t( '鍗氬鍦板潃' ), + 'readonly' => true, + 'option' => 'siteUrl' + ), + 'home_url' => array( + 'desc' => _t( '鍗氬棣栭〉鍦板潃' ), + 'readonly' => true, + 'option' => 'siteUrl' + ), + 'login_url' => array( + 'desc' => _t( '鐧诲綍鍦板潃' ), + 'readonly' => true, + 'value' => $this->options->siteUrl.'admin/login.php' + ), + 'admin_url' => array( + 'desc' => _t( '绠$悊鍖哄煙鐨勫湴鍧' ), + 'readonly' => true, + 'value' => $this->options->siteUrl.'admin/' + ), + + 'post_thumbnail' => array( + 'desc' => _t( '鏂囩珷缂╃暐鍥' ), + 'readonly' => true, + 'value' => false + ), + + // Updatable options + 'time_zone' => array( + 'desc' => _t( '鏃跺尯' ), + 'readonly' => false, + 'option' => 'timezone' + ), + 'blog_title' => array( + 'desc' => _t( '鍗氬鏍囬' ), + 'readonly' => false, + 'option' => 'title' + ), + 'blog_tagline' => array( + 'desc' => _t( '鍗氬鍏抽敭瀛' ), + 'readonly' => false, + 'option' => 'description' + ), + 'date_format' => array( + 'desc' => _t( '鏃ユ湡鏍煎紡' ), + 'readonly' => false, + 'option' => 'postDateFormat' + ), + 'time_format' => array( + 'desc' => _t( '鏃堕棿鏍煎紡' ), + 'readonly' => false, + 'option' => 'postDateFormat' + ), + 'users_can_register' => array( + 'desc' => _t( '鏄惁鍏佽娉ㄥ唽' ), + 'readonly' => false, + 'option' => 'allowRegister' + ) + ); + } + + /** + * 妫鏌ユ潈闄 + * + * @access public + * @return void + */ + public function checkAccess($name, $password, $level = 'contributor') + { + if ($this->user->login($name, $password, true)) { + /** 楠岃瘉鏉冮檺 */ + if ($this->user->pass($level, true)) { + return true; + } else { + $this->error = new IXR_Error(403, _t('鏉冮檺涓嶈冻')); + return false; + } + } else { + $this->error = new IXR_Error(403, _t('鏃犳硶鐧婚檰, 瀵嗙爜閿欒')); + return false; + } + } + + /** about wp xmlrpc api, you can see http://codex.wordpress.org/XML-RPC*/ + + /** + * 鑾峰彇pageId鎸囧畾鐨刾age + * + * @param int $blogId + * @param int $pageId + * @param string $userName + * @param string $password + * @access public + * @return struct $pageStruct + */ + public function wpGetPage($blogId, $pageId, $userName, $password) + { + /** 妫鏌ユ潈闄 */ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + /** 鑾峰彇椤甸潰 */ + try { + /** 鐢变簬Widget_Contents_Page_Edit鏄粠request涓幏鍙栧弬鏁, 鍥犳鎴戜滑闇瑕佸己琛岃缃甪lush涓涓媟equest */ + /** widget鏂规硶鐨勭涓変釜鍙傛暟鍙互鎸囧畾寮鸿杞崲浼犲叆姝idget鐨剅equest鍙傛暟 */ + /** 姝ょ粍浠朵細杩涜澶嶆潅鐨勬潈闄愭娴 */ + $page = $this->singletonWidget('Widget_Contents_Page_Edit', NULL, "cid={$pageId}"); + } catch (Typecho_Widget_Exception $e) { + /** 鎴幏鍙兘浼氭姏鍑虹殑寮傚父(鍙傝 Widget_Contents_Page_Edit 鐨 execute 鏂规硶) */ + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($page); + + $pageStruct = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $page->created), + 'userid' => $page->authorId, + 'page_id' => $page->cid, + 'page_status' => $this->typechoToWordpressStatus($page->status, 'page'), + 'description' => $excerpt, + 'title' => $page->title, + 'link' => $page->permalink, + 'permaLink' => $page->permalink, + 'categories' => $page->categories, + 'excerpt' => $page->description, + 'text_more' => $more, + 'mt_allow_comments' => intval($page->allowComment), + 'mt_allow_pings' => intval($page->allowPing), + 'wp_slug' => $page->slug, + 'wp_password' => $page->password, + 'wp_author' => $page->author->name, + 'wp_page_parent_id' => '0', + 'wp_page_parent_title' => '', + 'wp_page_order' => $page->order, //meta鏄弿杩板瓧娈, 鍦╬age鏃惰〃绀洪『搴 + 'wp_author_id' => $page->authorId, + 'wp_author_display_name' => $page->author->screenName, + 'date_created_gmt' => new IXR_Date($page->created), + 'custom_fields' => array(), + 'wp_page_template' => $page->template + ); + + return $pageStruct; + } + + /** + * 鑾峰彇鎵鏈夌殑page + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return array(contains $pageStruct) + */ + public function wpGetPages($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + /** 杩囨护type涓簆age鐨刢ontents */ + /** 鍚屾牱闇瑕乫lush涓涓, 闇瑕佸彇鍑烘墍鏈塻tatus鐨勯〉闈 */ + $pages = $this->singletonWidget('Widget_Contents_Page_Admin', NULL, 'status=all'); + + /** 鍒濆鍖栬杩斿洖鐨勬暟鎹粨鏋 */ + $pageStructs = array(); + + while ($pages->next()) { + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($pages); + $pageStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $pages->created), + 'userid' => $pages->authorId, + 'page_id' => intval($pages->cid), + /** todo:姝ゅ鏈夌枒闂 */ + 'page_status' => $this->typechoToWordpressStatus($pages->status, 'page'), + 'description' => $excerpt, + 'title' => $pages->title, + 'link' => $pages->permalink, + 'permaLink' => $pages->permalink, + 'categories' => $pages->categories, + 'excerpt' => $pages->description, + 'text_more' => $more, + 'mt_allow_comments' => intval($pages->allowComment), + 'mt_allow_pings' => intval($pages->allowPing), + 'wp_slug' => $pages->slug, + 'wp_password' => $pages->password, + 'wp_author' => $pages->author->name, + 'wp_page_parent_id' => 0, + 'wp_page_parent_title' => '', + 'wp_page_order' => intval($pages->order), //meta鏄弿杩板瓧娈, 鍦╬age鏃惰〃绀洪『搴 + 'wp_author_id' => $pages->authorId, + 'wp_author_display_name' => $pages->author->screenName, + 'date_created_gmt' => new IXR_Date($pages->created), + 'custom_fields' => array(), + 'wp_page_template' => $pages->template + ); + } + + return $pageStructs; + } + + /** + * 鎾板啓涓涓柊page + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return void + */ + public function wpNewPage($blogId, $userName, $password, $content, $publish) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + $content['post_type'] = 'page'; + $this->mwNewPost($blogId, $userName, $password, $content, $publish); + } + + /** + * 鍒犻櫎pageId鎸囧畾鐨刾age + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $pageId + * @access public + * @return bool + */ + public function wpDeletePage($blogId, $userName, $password, $pageId) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + /** 鍒犻櫎椤甸潰 */ + try { + /** 姝ょ粍浠朵細杩涜澶嶆潅鐨勬潈闄愭娴 */ + $this->singletonWidget('Widget_Contents_Page_Edit', NULL, "cid={$pageId}", false)->deletePage(); + } catch (Typecho_Widget_Exception $e) { + /** 鎴幏鍙兘浼氭姏鍑虹殑寮傚父(鍙傝 Widget_Contents_Page_Edit 鐨 execute 鏂规硶) */ + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + return true; + } + + /** + * 缂栬緫pageId鎸囧畾鐨刾age + * + * @param int $blogId + * @param int $pageId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return bool + */ + public function wpEditPage($blogId, $pageId, $userName, $password, $content, $publish) + { + $content['type'] = 'page'; + $this->mwEditPost($blogId, $pageId, $userName, $password, $content, $publish); + } + + + /** + * 缂栬緫postId鎸囧畾鐨刾ost + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postId + * @param struct $content + * @access public + * @return bool + */ + public function wpEditPost($blogId, $userName, $password, $postId, $content) + { + + $post = $this->singletonWidget('Widget_Archive', 'type=single', 'cid=' . $postId, false); + if ($post->type == 'attachment') { + $attachment['title'] = $content['post_title']; + $attachment['slug'] = $content['post_excerpt']; + + $text = unserialize($post->text); + $text['description'] = $content['description']; + + $attachment['text'] = serialize($text); + + /** 鏇存柊鏁版嵁 */ + $updateRows = $this->update($attachment, $this->db->sql()->where('cid = ?', $postId)); + return true; + } + return $this->mwEditPost($blogId, $postId, $userName, $password, $content); + } + + /** + * 鑾峰彇page鍒楄〃锛屾病鏈墂pGetPages鑾峰緱鐨勮缁 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return array + */ + public function wpGetPageList($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return ($this->error); + } + $pages = $this->singletonWidget('Widget_Contents_Page_Admin', NULL, 'status=all'); + /**鍒濆鍖*/ + $pageStructs = array(); + + while ($pages->next()) { + $pageStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $pages->created), + 'date_created_gmt' => new IXR_Date($this->options->timezone + $pages->created), + 'page_id' => $pages->cid, + 'page_title' => $pages->title, + 'page_parent_id' => '0', + ); + } + + return $pageStructs; + } + + /** + * 鑾峰緱涓涓敱blog鎵鏈変綔鑰呯殑淇℃伅缁勬垚鐨勬暟缁 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return struct + */ + public function wpGetAuthors($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return ($this->error); + } + + /** 鏋勫缓鏌ヨ*/ + $select = $this->db->select('table.users.uid', 'table.users.name', 'table.users.screenName')->from('table.users'); + $authors = $this->db->fetchAll($select); + + $authorStructs = array(); + foreach ($authors as $author) { + $authorStructs[] = array( + 'user_id' => $author['uid'], + 'user_login' => $author['name'], + 'display_name' => $author['screenName'] + ); + } + + return $authorStructs; + } + + /** + * 娣诲姞涓涓柊鐨勫垎绫 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param struct $category + * @access public + * @return void + */ + public function wpNewCategory($blogId, $userName, $password, $category) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + /** 寮濮嬫帴鍙楁暟鎹 */ + $input['name'] = $category['name']; + $input['slug'] = Typecho_Common::slugName(empty($category['slug']) ? $category['name'] : $category['slug']); + $input['parent'] = isset($category['parent_id']) ? $category['parent_id'] : + (isset($category['parent']) ? $category['parent'] : 0); + $input['description'] = isset($category['description']) ? $category['description'] : $category['name']; + $input['do'] = 'insert'; + + /** 璋冪敤宸叉湁缁勪欢 */ + try { + /** 鎻掑叆 */ + $categoryWidget = $this->singletonWidget('Widget_Metas_Category_Edit', NULL, $input, false); + $categoryWidget->action(); + return $categoryWidget->mid; + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + return new IXR_Error(403, _t('鏃犳硶娣诲姞鍒嗙被')); + } + + /** + * 鑾峰彇鐢辩粰瀹氱殑string寮澶寸殑閾炬帴缁勬垚鐨勬暟缁 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param string $category + * @param int $max_results + * @access public + * @return array + */ + public function wpSuggestCategories($blogId, $userName, $password, $category, $max_results) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + $meta = $this->singletonWidget('Widget_Abstract_Metas'); + + /** 鏋勯犲嚭鏌ヨ璇彞骞朵笖鏌ヨ*/ + $key = Typecho_Common::filterSearchQuery($category); + $key = '%' . $key . '%'; + $select = $meta->select()->where('table.metas.type = ? AND (table.metas.name LIKE ? OR slug LIKE ?)', 'category', $key, $key); + + /** 涓嶈category push鍒癱ontents鐨勫鍣ㄤ腑 */ + $categories = $this->db->fetchAll($select); + + /** 鍒濆鍖朿ategorise鏁扮粍*/ + $categoryStructs = array(); + foreach ($categories as $category) { + $categoryStructs[] = array( + 'category_id' => $category['mid'], + 'category_name' => $category['name'], + ); + } + + return $categoryStructs; + } + + /** + * 鑾峰彇鐢ㄦ埛 + * + * @access public + * @param string $userName 鐢ㄦ埛鍚 + * @param string $password 瀵嗙爜 + * @return array + */ + public function wpGetUsersBlogs($userName, $password) + { + + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array(); + $struct[] = array( + 'isAdmin' => $this->user->pass('administrator', true), + 'url' => $this->options->siteUrl, + 'blogid' => '1', + 'blogName' => $this->options->title, + 'xmlrpc' => $this->options->xmlRpcUrl + ); + return $struct; + } + + /** + * 鑾峰彇鐢ㄦ埛 + * + * @access public + * @param string $userName 鐢ㄦ埛鍚 + * @param string $password 瀵嗙爜 + * @return array + */ + public function wpGetProfile($blogId, $userName, $password) + { + + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array( + 'user_id' => $this->user->uid, + 'username' => $this->user->name, + 'first_name' => '', + 'last_name' => '', + 'registered' => new IXR_Date($this->options->timezone + $this->user->created), + 'bio' => '', + 'email' => $this->user->mail, + 'nickname' => $this->user->screenName, + 'url' => $this->user->url, + 'display_name' => $this->user->screenName, + 'roles' => $this->user->group + ); + return $struct; + } + + /** + * 鑾峰彇鏍囩鍒楄〃 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetTags($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array(); + $tags = $this->singletonWidget('Widget_Metas_Tag_Cloud'); + + while ($tags->next()) { + $struct[] = array( + 'tag_id' => $tags->mid, + 'name' => $tags->name, + 'count' => $tags->count, + 'slug' => $tags->slug, + 'html_url' => $tags->permalink, + 'rss_url' => $tags->feedUrl + ); + } + + return $struct; + } + + /** + * 鍒犻櫎鍒嗙被 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $categoryId + * @return array + */ + public function wpDeleteCategory($blogId, $userName, $password, $categoryId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + try { + $this->singletonWidget('Widget_Metas_Category_Edit', NULL, 'do=delete&mid=' . intval($categoryId), false); + return true; + } catch (Typecho_Exception $e) { + return false; + } + } + + /** + * 鑾峰彇璇勮鏁扮洰 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $postId + * @return array + */ + public function wpGetCommentCount($blogId, $userName, $password, $postId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $stat = $this->singletonWidget('Widget_Stat', NULL, 'cid=' . intval($postId), false); + + return array( + 'approved' => $stat->currentPublishedCommentsNum, + 'awaiting_moderation' => $stat->currentWaitingCommentsNum, + 'spam' => $stat->currentSpamCommentsNum, + 'total_comments' => $stat->currentCommentsNum + ); + } + + + /** + * 鑾峰彇鏂囩珷绫诲瀷鍒楄〃 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPostFormats($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + return array( + 'standard' => _t('鏍囧噯') + ); + } + + /** + * 鑾峰彇鏂囩珷鐘舵佸垪琛 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPostStatusList($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + return array( + 'draft' => _t('鑽夌ǹ'), + 'pending' => _t('寰呭鏍'), + 'publish' => _t('宸插彂甯') + ); + } + + /** + * 鑾峰彇椤甸潰鐘舵佸垪琛 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPageStatusList($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + return array( + 'draft' => _t('鑽夌ǹ'), + 'publish' => _t('宸插彂甯') + ); + } + + + + /** + * 鑾峰彇璇勮鐘舵佸垪琛 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetCommentStatusList($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + return array( + 'hold' => _t('寰呭鏍'), + 'approve' => _t('鏄剧ず'), + 'spam' => _t('鍨冨溇') + ); + } + + /** + * 鑾峰彇椤甸潰妯℃澘 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @return array + */ + public function wpGetPageTemplates($blogId, $userName, $password) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + $templates = array_flip($this->getTemplates()); + $templates['Default'] = ''; + + return $templates; + } + + /** + * 鑾峰彇绯荤粺閫夐」 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param array $options + * @return array + */ + public function wpGetOptions($blogId, $userName, $password, $options = array()) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'administrator')) { + return $this->error; + } + + $struct = array(); + if (empty($options)) { + $options = array_keys($this->_wpOptions); + } + + foreach ($options as $option) { + if (isset($this->_wpOptions[$option])) { + $struct[$option] = $this->_wpOptions[$option]; + if (isset($struct[$option]['option'])) { + $struct[$option]['value'] = $this->options->{$struct[$option]['option']}; + unset($struct[$option]['option']); + } + } + } + + return $struct; + } + + /** + * 璁剧疆绯荤粺閫夐」 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param array $options + * @return array + */ + public function wpSetOptions($blogId, $userName, $password, $options = array()) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password, 'administrator')) { + return $this->error; + } + + $struct = array(); + foreach ($options as $option => $value) { + if (isset($this->_wpOptions[$option])) { + $struct[$option] = $this->_wpOptions[$option]; + if (isset($struct[$option]['option'])) { + $struct[$option]['value'] = $this->options->{$struct[$option]['option']}; + unset($struct[$option]['option']); + } + + if (!$this->_wpOptions[$option]['readonly'] && isset($this->_wpOptions[$option]['option'])) { + if ($this->db->query($this->db->update('table.options') + ->rows(array('value' => $value)) + ->where('name = ?', $this->_wpOptions[$option]['option'])) > 0) { + $struct[$option]['value'] = $value; + } + } + } + } + + return $struct; + } + + /** + * 鑾峰彇璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $commentId + * @return array + */ + public function wpGetComment($blogId, $userName, $password, $commentId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $comment = $this->singletonWidget('Widget_Comments_Edit', NULL, 'do=get&coid=' . intval($commentId), false); + + if (!$comment->have()) { + return new IXR_Error(404, _t('璇勮涓嶅瓨鍦')); + } + + if (!$comment->commentIsWriteable()) { + return new IXR_Error(403, _t('娌℃湁鑾峰彇璇勮鐨勬潈闄')); + } + + return array( + 'date_created_gmt' => new IXR_Date($this->options->timezone + $comment->created), + 'user_id' => $comment->authorId, + 'comment_id' => $comment->coid, + 'parent' => $comment->parent, + 'status' => $this->typechoToWordpressStatus($comment->status, 'comment'), + 'content' => $comment->text, + 'link' => $comment->permalink, + 'post_id' => $comment->cid, + 'post_title' => $comment->title, + 'author' => $comment->author, + 'author_url' => $comment->url, + 'author_email' => $comment->mail, + 'author_ip' => $comment->ip, + 'type' => $comment->type + ); + } + + /** + * 鑾峰彇璇勮鍒楄〃 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param array $struct + * @return array + */ + public function wpGetComments($blogId, $userName, $password, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $input = array(); + if (!empty($struct['status'])) { + $input['status'] = 'hold' == $input['status'] ? $input['status'] : + $this->wordpressToTypechoStatus($struct['status']); + } else { + $input['__typecho_all_comments'] = 'on'; + } + + if (!empty($struct['post_id'])) { + $input['cid'] = $struct['post_id']; + } + + $pageSize = 10; + if (!empty($struct['number'])) { + $pageSize = abs(intval($struct['number'])); + } + + if (!empty($struct['offset'])) { + $offset = abs(intval($struct['offset'])); + $input['page'] = ceil($offset / $pageSize); + } + + $comments = $this->singletonWidget('Widget_Comments_Admin', 'pageSize=' . $pageSize, $input, false); + $commentsStruct = array(); + + while ($comments->next()) { + $commentsStruct[] = array( + 'date_created_gmt' => new IXR_Date($this->options->timezone + $comments->created), + 'user_id' => $comments->authorId, + 'comment_id' => $comments->coid, + 'parent' => $comments->parent, + 'status' => $this->typechoToWordpressStatus($comments->status, 'comment'), + 'content' => $comments->text, + 'link' => $comments->permalink, + 'post_id' => $comments->cid, + 'post_title' => $comments->title, + 'author' => $comments->author, + 'author_url' => $comments->url, + 'author_email' => $comments->mail, + 'author_ip' => $comments->ip, + 'type' => $comments->type + ); + } + + return $commentsStruct; + } + + /** + * 鑾峰彇璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $commentId + * @return boolean + */ + public function wpDeleteComment($blogId, $userName, $password, $commentId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $commentId = abs(intval($commentId)); + $commentWidget = $this->singletonWidget('Widget_Abstract_Comments'); + $where = $this->db->sql()->where('coid = ?', $commentId); + + if (!$commentWidget->commentIsWriteable($where)) { + return new IXR_Error(403, _t('鏃犳硶缂栬緫姝よ瘎璁')); + } + + return intval($this->singletonWidget('Widget_Abstract_Comments')->delete($where)) > 0; + } + + /** + * 缂栬緫璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param integer $commentId + * @param array $struct + * @return boolean + */ + public function wpEditComment($blogId, $userName, $password, $commentId, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $commentId = abs(intval($commentId)); + $commentWidget = $this->singletonWidget('Widget_Abstract_Comments'); + $where = $this->db->sql()->where('coid = ?', $commentId); + + if (!$commentWidget->commentIsWriteable($where)) { + return new IXR_Error(403, _t('鏃犳硶缂栬緫姝よ瘎璁')); + } + + $input = array(); + + if (isset($struct['date_created_gmt'])) { + $input['created'] = $struct['date_created_gmt']->getTimestamp() - $this->options->timezone + $this->options->serverTimezone; + } + + if (isset($struct['status'])) { + $input['status'] = $this->wordpressToTypechoStatus($struct['status'], 'comment'); + } + + if (isset($struct['content'])) { + $input['text'] = $struct['content']; + } + + if (isset($struct['author'])) { + $input['author'] = $struct['author']; + } + + if (isset($struct['author_url'])) { + $input['url'] = $struct['author_url']; + } + + if (isset($struct['author_email'])) { + $input['mail'] = $struct['author_email']; + } + + $result = $commentWidget->update((array) $input, $where); + + if (!$result) { + return new IXR_Error(404, _t('璇勮涓嶅瓨鍦')); + } + + return true; + } + + /** + * 鏇存柊璇勮 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param mixed $path + * @param array $struct + * @return int + */ + public function wpNewComment($blogId, $userName, $password, $path, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + if (is_numeric($path)) { + $post = $this->singletonWidget('Widget_Archive', 'type=single', 'cid=' . $path, false); + } else { + /** 妫鏌ョ洰鏍囧湴鍧鏄惁姝g‘*/ + $pathInfo = Typecho_Common::url(substr($path, strlen($this->options->index)), '/'); + $post = Typecho_Router::match($pathInfo); + } + + /** 杩欐牱鍙互寰楀埌cid鎴栬卻lug*/ + if (!isset($post) || !($post instanceof Widget_Archive) || !$post->have() || !$post->is('single')) { + return new IXR_Error(404, _t('杩欎釜鐩爣鍦板潃涓嶅瓨鍦')); + } + + $input = array(); + $input['permalink'] = $post->pathinfo; + $input['type'] = 'comment'; + + if (isset($struct['comment_author'])) { + $input['author'] = $struct['author']; + } + + if (isset($struct['comment_author_email'])) { + $input['mail'] = $struct['author_email']; + } + + if (isset($struct['comment_author_url'])) { + $input['url'] = $struct['author_url']; + } + + if (isset($struct['comment_parent'])) { + $input['parent'] = $struct['comment_parent']; + } + + if (isset($struct['content'])) { + $input['text'] = $struct['content']; + } + + try { + $commentWidget = $this->singletonWidget('Widget_Feedback', 'checkReferer=false', $input, false); + $commentWidget->action(); + return intval($commentWidget->coid); + } catch (Typecho_Exception $e) { + return new IXR_Error(500, $e->getMessage()); + } + + return new IXR_Error(403, _t('鏃犳硶娣诲姞璇勮')); + } + + + + /** + * 鑾峰彇濯掍綋鏂囦欢 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param struct $struct + * @return boolean + */ + public function wpGetMediaLibrary($blogId, $userName, $password, $struct) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + + $input = array(); + + if (!empty($struct['parent_id'])) { + $input['parent'] = $struct['parent_id']; + } + + if (!empty($struct['mime_type'])) { + $input['mime'] = $struct['mime_type']; + } + + $pageSize = 10; + if (!empty($struct['number'])) { + $pageSize = abs(intval($struct['number'])); + } + + if (!empty($struct['offset'])) { + $input['page'] = abs(intval($struct['offset'])) + 1; + } + + $attachments = $this->singletonWidget('Widget_Contents_Attachment_Admin', 'pageSize=' . $pageSize, $input, false); + $attachmentsStruct = array(); + + while ($attachments->next()) { + $attachmentsStruct[] = array( + 'attachment_id' => $attachments->cid, + 'date_created_gmt' => new IXR_Date($this->options->timezone + $attachments->created), + 'parent' => $attachments->parent, + 'link' => $attachments->attachment->url, + 'title' => $attachments->title, + 'caption' => $attachments->slug, + 'description' => $attachments->attachment->description, + 'metadata' => array( + 'file' => $attachments->attachment->path, + 'size' => $attachments->attachment->size, + ), + 'thumbnail' => $attachments->attachment->url, + + ); + } + return $attachmentsStruct; + } + + /** + * 鑾峰彇濯掍綋鏂囦欢 + * + * @access public + * @param integer $blogId + * @param string $userName + * @param string $password + * @param int $attachmentId + * @return boolean + */ + public function wpGetMediaItem($blogId, $userName, $password, $attachmentId) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + + $attachment = $this->singletonWidget('Widget_Contents_Attachment_Edit', NULL, "cid={$attachmentId}"); + $struct = array( + 'attachment_id' => $attachment->cid, + 'date_created_gmt' => new IXR_Date($this->options->timezone + $attachment->created), + 'parent' => $attachment->parent, + 'link' => $attachment->attachment->url, + 'title' => $attachment->title, + 'caption' => $attachment->slug, + 'description' => $attachment->attachment->description, + 'metadata' => array( + 'file' => $attachment->attachment->path, + 'size' => $attachment->attachment->size, + ), + 'thumbnail' => $attachment->attachment->url, + + ); + return $struct; + } + + + + /**about MetaWeblog API, you can see http://www.xmlrpc.com/metaWeblogApi*/ + /** + * MetaWeblog API + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return int + */ + public function mwNewPost($blogId, $userName, $password, $content, $publish) + { + /** 妫鏌ユ潈闄*/ + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + /** 鍙栧緱content鍐呭 */ + $input = array(); + $type = isset($content['post_type']) && 'page' == $content['post_type'] ? 'page' : 'post'; + + $input['title'] = trim($content['title']) == NULL ? _t('鏈懡鍚嶆枃妗') : $content['title']; + + if (isset($content['slug'])) { + $input['slug'] = $content['slug']; + } else if (isset($content['wp_slug'])) { + //fix issue 338, wlw鍙彂閫佽繖涓 + $input['slug'] = $content['wp_slug']; + } + + $input['text'] = !empty($content['mt_text_more']) ? $content['description'] + . "\n<!--more-->\n" . $content['mt_text_more'] : $content['description']; + $input['text'] = $this->pluginHandle()->textFilter($input['text'], $this); + + $input['password'] = isset($content["wp_password"]) ? $content["wp_password"] : NULL; + $input['order'] = isset($content["wp_page_order"]) ? $content["wp_page_order"] : NULL; + + $input['tags'] = isset($content['mt_keywords']) ? $content['mt_keywords'] : NULL; + $input['category'] = array(); + + if (isset($content['postId'])) { + $input['cid'] = $content['postId']; + } + + if ('page' == $type && isset($content['wp_page_template'])) { + $input['template'] = $content['wp_page_template']; + } + + if (isset($content['dateCreated'])) { + /** 瑙e喅瀹㈡埛绔笌鏈嶅姟鍣ㄧ鏃堕棿鍋忕Щ */ + $input['created'] = $content['dateCreated']->getTimestamp() - $this->options->timezone + $this->options->serverTimezone; + } + + if (!empty($content['categories']) && is_array($content['categories'])) { + foreach ($content['categories'] as $category) { + if (!$this->db->fetchRow($this->db->select('mid') + ->from('table.metas')->where('type = ? AND name = ?', 'category', $category))) { + $result = $this->wpNewCategory($blogId, $userName, $password, array('name' => $category)); + if (true !== $result) { + return $result; + } + } + + $input['category'][] = $this->db->fetchObject($this->db->select('mid') + ->from('table.metas')->where('type = ? AND name = ?', 'category', $category) + ->limit(1))->mid; + } + } + + $input['allowComment'] = (isset($content['mt_allow_comments']) && (1 == $content['mt_allow_comments'] + || 'open' == $content['mt_allow_comments'])) ? 1 : ((isset($content['mt_allow_comments']) && (0 == $content['mt_allow_comments'] + || 'closed' == $content['mt_allow_comments'])) ? 0 : $this->options->defaultAllowComment); + + $input['allowPing'] = (isset($content['mt_allow_pings']) && (1 == $content['mt_allow_pings'] + || 'open' == $content['mt_allow_pings'])) ? 1 : ((isset($content['mt_allow_pings']) && (0 == $content['mt_allow_pings'] + || 'closed' == $content['mt_allow_pings'])) ? 0 : $this->options->defaultAllowPing); + + $input['allowFeed'] = $this->options->defaultAllowFeed; + $input['do'] = $publish ? 'publish' : 'save'; + + /** 璋冩暣鐘舵 */ + if (isset($content["{$type}_status"])) { + $status = $this->wordpressToTypechoStatus($content["{$type}_status"], $type); + + if ('publish' == $status || 'waiting' == $status || 'private' == $status) { + $input['do'] = 'publish'; + + if ('private' == $status) { + $input['private'] = 1; + } + } else { + $input['do'] = 'save'; + } + } + + /** 瀵规湭褰掓。闄勪欢杩涜褰掓。 */ + $unattached = $this->db->fetchAll($this->select()->where('table.contents.type = ? AND + (table.contents.parent = 0 OR table.contents.parent IS NULL)', 'attachment'), array($this, 'filter')); + + if (!empty($unattached)) { + foreach ($unattached as $attach) { + if (false !== strpos($input['text'], $attach['attachment']->url)) { + if (!isset($input['attachment'])) { + $input['attachment'] = array(); + } + + $input['attachment'][] = $attach['cid']; + } + } + } + + /** 璋冪敤宸叉湁缁勪欢 */ + try { + /** 鎻掑叆 */ + if ('page' == $type) { + $this->singletonWidget('Widget_Contents_Page_Edit', NULL, $input, false)->action(); + } else { + $this->singletonWidget('Widget_Contents_Post_Edit', NULL, $input, false)->action(); + } + + return $this->singletonWidget('Widget_Notice')->getHighlightId(); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + } + + /** + * 缂栬緫post + * + * @param int $postId + * @param string $userName + * @param string $password + * @param struct $content + * @param bool $publish + * @access public + * @return int + */ + public function mwEditPost($postId, $userName, $password, $content, $publish = true) + { + $content['postId'] = $postId; + return $this->mwNewPost(1, $userName, $password, $content, $publish); + } + + /** + * 鑾峰彇鎸囧畾id鐨刾ost + * + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function mwGetPost($postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($post); + /** 鍙渶瑕佸垎绫荤殑name*/ + $categories = Typecho_Common::arrayFlatten($post->categories, 'name'); + $tags = Typecho_Common::arrayFlatten($post->tags, 'name'); + + $postStruct = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $post->created), + 'userid' => $post->authorId, + 'postid' => $post->cid, + 'description' => $excerpt, + 'title' => $post->title, + 'link' => $post->permalink, + 'permaLink' => $post->permalink, + 'categories' => $categories, + 'mt_excerpt' => $post->description, + 'mt_text_more' => $more, + 'mt_allow_comments' => intval($post->allowComment), + 'mt_allow_pings' => intval($post->allowPing), + 'mt_keywords' => implode(', ', $tags), + 'wp_slug' => $post->slug, + 'wp_password' => $post->password, + 'wp_author' => $post->author->name, + 'wp_author_id' => $post->authorId, + 'wp_author_display_name' => $post->author->screenName, + 'date_created_gmt' => new IXR_Date($post->created), + 'post_status' => $this->typechoToWordpressStatus($post->status, 'post'), + 'custom_fields' => array(), + 'sticky' => 0 + ); + + return $postStruct; + } + + /** + * 鑾峰彇鍓$postsNum涓猵ost + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postsNum + * @access public + * @return postStructs + */ + public function mwGetRecentPosts($blogId, $userName, $password, $postsNum) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $posts = $this->singletonWidget('Widget_Contents_Post_Admin', "pageSize={$postsNum}", 'status=all'); + + $postStructs = array(); + /** 濡傛灉杩欎釜post瀛樺湪鍒欒緭鍑猴紝鍚﹀垯杈撳嚭閿欒 */ + while ($posts->next()) { + /** 瀵规枃绔犲唴瀹瑰仛鎴彇澶勭悊锛屼互鑾峰緱description鍜宼ext_more*/ + list($excerpt, $more) = $this->getPostExtended($posts); + + /** 鍙渶瑕佸垎绫荤殑name*/ + /** 鍙互鐢╢latten鍑芥暟澶勭悊 */ + $categories = Typecho_Common::arrayFlatten($posts->categories, 'name'); + $tags = Typecho_Common::arrayFlatten($posts->tags, 'name'); + + $postStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $posts->created), + 'userid' => $posts->authorId, + 'postid' => $posts->cid, + 'description' => $excerpt, + 'title' => $posts->title, + 'link' => $posts->permalink, + 'permaLink' => $posts->permalink, + 'categories' => $categories, + 'mt_excerpt' => $posts->description, + 'mt_text_more' => $more, + 'wp_more_text' => $more, + 'mt_allow_comments' => intval($posts->allowComment), + 'mt_allow_pings' => intval($posts->allowPing), + 'mt_keywords' => implode(', ', $tags), + 'wp_slug' => $posts->slug, + 'wp_password' => $posts->password, + 'wp_author' => $posts->author->name, + 'wp_author_id' => $posts->authorId, + 'wp_author_display_name' => $posts->author->screenName, + 'date_created_gmt' => new IXR_Date($posts->created), + 'post_status' => $this->typechoToWordpressStatus($posts->status, 'post'), + 'custom_fields' => array(), + 'wp_post_format' => 'standard', + 'date_modified' => new IXR_Date($this->options->timezone + $posts->modified), + 'date_modified_gmt' => new IXR_Date($posts->modified), + 'wp_post_thumbnail' => '', + 'sticky' => 0 + ); + } + + return $postStructs; + } + + /** + * 鑾峰彇鎵鏈夌殑鍒嗙被 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return categoryStructs + */ + public function mwGetCategories($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + $categories = $this->singletonWidget('Widget_Metas_Category_List'); + + /** 鍒濆鍖朿ategory鏁扮粍*/ + $categoryStructs = array(); + while ($categories->next()) { + $categoryStructs[] = array( + 'categoryId' => $categories->mid, + 'parentId' => $categories->parent, + 'categoryName' => $categories->name, + 'categoryDescription' => $categories->description, + 'description' => $categories->name, + 'htmlUrl' => $categories->permalink, + 'rssUrl' => $categories->feedUrl, + ); + } + + return $categoryStructs; + } + + /** + * mwNewMediaObject + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param mixed $data + * @access public + * @return void + */ + public function mwNewMediaObject($blogId, $userName, $password, $data) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $result = Widget_Upload::uploadHandle($data); + + if (false === $result) { + return IXR_Error(500, _t('涓婁紶澶辫触')); + } else { + + $insertId = $this->insert(array( + 'title' => $result['name'], + 'slug' => $result['name'], + 'type' => 'attachment', + 'status' => 'publish', + 'text' => serialize($result), + 'allowComment' => 1, + 'allowPing' => 0, + 'allowFeed' => 1 + )); + + $this->db->fetchRow($this->select()->where('table.contents.cid = ?', $insertId) + ->where('table.contents.type = ?', 'attachment'), array($this, 'push')); + + /** 澧炲姞鎻掍欢鎺ュ彛 */ + $this->pluginHandle()->upload($this); + + return array( + 'file' => $this->attachment->name, + 'url' => $this->attachment->url + ); + } + } + + /** + * 鑾峰彇 $postNum涓猵ost title + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postNum + * @access public + * @return postTitleStructs + */ + public function mtGetRecentPostTitles($blogId, $userName, $password, $postsNum) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + /** 璇诲彇鏁版嵁*/ + $posts = $this->singletonWidget('Widget_Contents_Post_Admin', "pageSize=$postsNum", 'status=all'); + + /**鍒濆鍖*/ + $postTitleStructs = array(); + while ($posts->next()) { + $postTitleStructs[] = array( + 'dateCreated' => new IXR_Date($this->options->timezone + $posts->created), + 'userid' => $posts->authorId, + 'postid' => $posts->cid, + 'title' => $posts->title, + 'date_created_gmt' => new IXR_Date($this->options->timezone + $posts->created) + ); + } + + return $postTitleStructs; + } + + /** + * 鑾峰彇鍒嗙被鍒楄〃 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return categories + */ + public function mtGetCategoryList($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return ($this->error); + } + + $categories = $this->singletonWidget('Widget_Metas_Category_List'); + + /** 鍒濆鍖朿ategorise鏁扮粍*/ + $categoryStructs = array(); + while ($categories->next()) { + $categoryStructs[] = array( + 'categoryId' => $categories->mid, + 'categoryName' => $categories->name, + ); + } + return $categoryStructs; + } + + /** + * 鑾峰彇鎸囧畾post鐨勫垎绫 + * + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function mtGetPostCategories($postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + /** 鏍煎紡鍖朿ategories*/ + $categories = array(); + foreach ($post->categories as $category) { + $categories[] = array( + 'categoryName' => $category['name'], + 'categoryId' => $category['mid'], + 'isPrimary' => true + ); + } + return $categories; + } + + /** + * 淇敼post鐨勫垎绫 + * + * @param int $postId + * @param string $userName + * @param string $password + * @param string $categories + * @access public + * @return bool + */ + public function mtSetPostCategories($postId, $userName, $password, $categories) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + $post->setCategories($postId, Typecho_Common::arrayFlatten($categories, 'categoryId'), + 'publish' == $post->status); + return true; + } + + /** + * 鍙戝竷(閲嶅缓)鏁版嵁 + * + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return bool + */ + public function mtPublishPost($postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password, 'editor')) { + return $this->error; + } + + /** 杩囨护id涓$postId鐨刾ost */ + $select = $this->select()->where('table.contents.cid = ? AND table.contents.type = ?', $postId, 'post')->limit(1); + + /** 鎻愪氦鏌ヨ */ + $post = $this->$db->fetchRow($select, array($this, 'push')); + if ($this->authorId != $this->user->uid && !$this->checkAccess($userName, $password, 'administrator')) { + return new IXR_Error(403, '鏉冮檺涓嶈冻.'); + } + + /** 鏆傛椂鍙仛鎴愬彂甯*/ + $content = array(); + $this->update($content, $this->db->sql()->where('table.contents.cid = ?', $postId)); + + + } + + /** + * 鍙栧緱褰撳墠鐢ㄦ埛鐨勬墍鏈塨log + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function bloggerGetUsersBlogs($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array(); + $struct[] = array( + 'isAdmin' => $this->user->pass('administrator', true), + 'url' => $this->options->siteUrl, + 'blogid' => '1', + 'blogName' => $this->options->title, + 'xmlrpc' => $this->options->xmlRpcUrl + ); + + return $struct; + } + + /** + * 杩斿洖褰撳墠鐢ㄦ埛鐨勪俊鎭 + * + * @param int $blogId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function bloggerGetUserInfo($blogId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + $struct = array( + 'nickname' => $this->user->screenName, + 'userid' => $this->user->uid, + 'url' => $this->user->url, + 'email' => $this->user->mail, + 'lastname' => '', + 'firstname' => '' + ); + + return $struct; + } + + /** + * 鑾峰彇褰撳墠浣滆呯殑涓涓寚瀹歩d鐨刾ost鐨勮缁嗕俊鎭 + * + * @param int $blogId + * @param int $postId + * @param string $userName + * @param string $password + * @access public + * @return void + */ + public function bloggerGetPost($blogId, $postId, $userName, $password) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + + try { + $post = $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}"); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + + $categories = Typecho_Common::arrayFlatten($post->categories, 'name'); + + $content = '<title>' . $post->title . ''; + $content .= '' . implode(',', $categories) . ''; + $content .= stripslashes($post->text); + + $struct = array( + 'userid' => $post->authorId, + 'dateCreated' => new IXR_Date($this->options->timezone + $post->created), + 'content' => $content, + 'postid' => $post->cid + ); + return $struct; + } + + /** + * bloggerDeletePost + * 鍒犻櫎鏂囩珷 + * @param mixed $blogId + * @param mixed $userName + * @param mixed $password + * @param mixed $publish + * @access public + * @return bool + */ + public function bloggerDeletePost($blogId, $postId, $userName, $password, $publish) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + try { + $this->singletonWidget('Widget_Contents_Post_Edit', NULL, "cid={$postId}", false)->deletePost(); + } catch (Typecho_Widget_Exception $e) { + return new IXR_Error($e->getCode(), $e->getMessage()); + } + } + + /** + * 鑾峰彇褰撳墠浣滆呭墠postsNum涓猵ost + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param int $postsNum + * @access public + * @return void + */ + public function bloggerGetRecentPosts($blogId, $userName, $password, $postsNum) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + //todo:闄愬埗鏁伴噺 + $posts = $this->singletonWidget('Widget_Contents_Post_Admin', "pageSize=$postsNum", 'status=all'); + + $postStructs = array(); + while ($posts->next()) { + $categories = Typecho_Common::arrayFlatten($posts->categories, 'name'); + + $content = '' . $posts->title . ''; + $content .= '' . implode(',', $categories) . ''; + $content .= stripslashes($posts->text); + + $struct = array( + 'userid' => $posts->authorId, + 'dateCreated' => new IXR_Date($this->options->timezone + $posts->created), + 'content' => $content, + 'postid' => $posts->cid, + ); + $postStructs[] = $struct; + } + if (NULL == $postStructs) { + return new IXR_Error('404', '娌℃湁浠讳綍鏂囩珷'); + } + return $postStructs; + } + + /** + * bloggerGetTemplate + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param mixed $template + * @access public + * @return void + */ + public function bloggerGetTemplate($blogId, $userName, $password, $template) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + /** todo:鏆傛椂鍏堣繑鍥瀟rue*/ + return true; + } + + /** + * bloggerSetTemplate + * + * @param int $blogId + * @param string $userName + * @param string $password + * @param mixed $content + * @param mixed $template + * @access public + * @return void + */ + public function bloggerSetTemplate($blogId, $userName, $password, $content, $template) + { + if (!$this->checkAccess($userName, $password)) { + return $this->error; + } + /** todo:鏆傛椂鍏堣繑鍥瀟rue*/ + return true; + } + + /** + * pingbackPing + * + * @param string $source + * @param string $target + * @access public + * @return void + */ + public function pingbackPing($source, $target) + { + /** 妫鏌ユ簮鍦板潃鏄惁瀛樺湪*/ + if (!($http = Typecho_Http_Client::get())) { + return new IXR_Error(16, _t('婧愬湴鍧鏈嶅姟鍣ㄩ敊璇')); + } + + try { + + $http->setTimeout(5)->send($source); + $response = $http->getResponseBody(); + + if (200 == $http->getResponseStatus()) { + + if (!$http->getResponseHeader('x-pingback')) { + preg_match_all("/]*rel=[\"']([^\"']*)[\"'][^>]*href=[\"']([^\"']*)[\"'][^>]*>/i", $response, $out); + if (!isset($out[1]['pingback'])) { + return new IXR_Error(50, _t('婧愬湴鍧涓嶆敮鎸丳ingBack')); + } + } + + } else { + return new IXR_Error(16, _t('婧愬湴鍧鏈嶅姟鍣ㄩ敊璇')); + } + + } catch (Exception $e) { + return new IXR_Error(16, _t('婧愬湴鍧鏈嶅姟鍣ㄩ敊璇')); + } + + /** 妫鏌ョ洰鏍囧湴鍧鏄惁姝g‘*/ + $pathInfo = Typecho_Common::url(substr($target, strlen($this->options->index)), '/'); + $post = Typecho_Router::match($pathInfo); + + /** 杩欐牱鍙互寰楀埌cid鎴栬卻lug*/ + if (!($post instanceof Widget_Archive) || !$post->have() || !$post->is('single')) { + return new IXR_Error(33, _t('杩欎釜鐩爣鍦板潃涓嶅瓨鍦')); + } + + if ($post) { + /** 妫鏌ユ槸鍚﹀彲浠ing*/ + if ($post->allowPing) { + + /** 鐜板湪鍙互ping浜嗭紝浣嗘槸杩樺緱妫鏌ヤ笅杩欎釜pingback鏄惁宸茬粡瀛樺湪浜*/ + $pingNum = $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) + ->from('table.comments')->where('table.comments.cid = ? AND table.comments.url = ? AND table.comments.type <> ?', + $post->cid, $source, 'comment'))->num; + + if ($pingNum <= 0) { + + /** 鐜板湪寮濮嬫彃鍏ヤ互鍙婇偖浠舵彁绀轰簡 $response灏辨槸绗竴琛岃姹傛椂杩斿洖鐨勬暟缁*/ + preg_match("/\([^<]*?)\<\/title\\>/is", $response, $matchTitle); + $finalTitle = Typecho_Common::removeXSS(trim(strip_tags($matchTitle[1]))); + + /** 骞叉帀html tag锛屽彧鐣欎笅*/ + $text = Typecho_Common::stripTags($response, ''); + + /** 姝ゅ灏$target quote,鐣欑潃鍚庨潰鐢*/ + $pregLink = preg_quote($target); + + /** 鎵惧嚭鍚湁target閾炬帴鐨勬渶闀跨殑涓琛屼綔涓$finalText*/ + $finalText = ''; + $lines = explode("\n", $text); + + foreach ($lines as $line) { + $line = trim($line); + if (NULL != $line) { + if (preg_match("|]*href=[\"']{$pregLink}[\"'][^>]*>(.*?)|",$line)) { + if (strlen($line) > strlen($finalText)) { + /** 涔熻骞叉帀锛*/ + $finalText = Typecho_Common::stripTags($line); + } + } + } + } + + /** 鎴彇涓娈靛瓧*/ + if (NULL == trim($finalText)) { + return new IXR_Error('17', _t('婧愬湴鍧涓笉鍖呮嫭鐩爣鍦板潃')); + } + + $finalText = '[...]' . Typecho_Common::subStr($finalText, 0, 200, '') . '[...]'; + + $pingback = array( + 'cid' => $post->cid, + 'created' => $this->options->gmtTime, + 'agent' => $this->request->getAgent(), + 'ip' => $this->request->getIp(), + 'author' => $finalTitle, + 'url' => Typecho_Common::safeUrl($source), + 'text' => $finalText, + 'ownerId' => $post->author->uid, + 'type' => 'pingback', + 'status' => $this->options->commentsRequireModeration ? 'waiting' : 'approved' + ); + + /** 鍔犲叆plugin */ + $pingback = $this->pluginHandle()->pingback($pingback, $post); + + /** 鎵ц鎻掑叆*/ + $insertId = $this->singletonWidget('Widget_Abstract_Comments')->insert($pingback); + + /** 璇勮瀹屾垚鎺ュ彛 */ + $this->pluginHandle()->finishPingback($this); + + return $insertId; + + /** todo:鍙戦侀偖浠舵彁绀*/ + } else { + return new IXR_Error(48, _t('PingBack宸茬粡瀛樺湪')); + } + } else { + return IXR_Error(49, _t('鐩爣鍦板潃绂佹Ping')); + } + } else { + return new IXR_Error(33, _t('杩欎釜鐩爣鍦板潃涓嶅瓨鍦')); + } + } + + /** + * 鍥炴敹鍙橀噺 + * + * @access public + * @param string $methodName 鏂规硶 + * @return void + */ + public function hookAfterCall($methodName) + { + if (!empty($this->_usedWidgetNameList)) { + foreach ($this->_usedWidgetNameList as $key => $widgetName) { + $this->destory($widgetName); + unset($this->_usedWidgetNameList[$key]); + } + } + } + + /** + * 鍏ュ彛鎵ц鏂规硶 + * + * @access public + * @return void + */ + public function action() + { + if (isset($this->request->rsd)) { + echo +<< + + + Typecho + http://www.typecho.org/ + {$this->options->siteUrl} + + + + + + + + +EOF; + } else if (isset($this->request->wlw)) { + echo +<< + + + Yes + Yes + Yes + Yes + Yes + + Yes + Yes + Yes + Yes + Yes + Yes + + Yes + Yes + Yes + Yes + Yes + Yes + + Yes + + Yes + No + Yes + True + No + + + +EOF; + } else { + + + + /** 鐩存帴鎶婂垵濮嬪寲鏀惧埌杩欓噷 */ + new IXR_Server(array( + /** WordPress API */ + 'wp.getPage' => array($this, 'wpGetPage'), + 'wp.getPages' => array($this, 'wpGetPages'), + 'wp.newPage' => array($this, 'wpNewPage'), + 'wp.deletePage' => array($this, 'wpDeletePage'), + 'wp.editPage' => array($this, 'wpEditPage'), + 'wp.getPageList' => array($this, 'wpGetPageList'), + 'wp.getAuthors' => array($this, 'wpGetAuthors'), + 'wp.getCategories' => array($this, 'mwGetCategories'), + 'wp.newCategory' => array($this, 'wpNewCategory'), + 'wp.suggestCategories' => array($this, 'wpSuggestCategories'), + 'wp.uploadFile' => array($this, 'mwNewMediaObject'), + + /** New Wordpress API since 2.9.2 */ + 'wp.getUsersBlogs' => array($this, 'wpGetUsersBlogs'), + 'wp.getTags' => array($this, 'wpGetTags'), + 'wp.deleteCategory' => array($this, 'wpDeleteCategory'), + 'wp.getCommentCount' => array($this, 'wpGetCommentCount'), + 'wp.getPostStatusList' => array($this, 'wpGetPostStatusList'), + 'wp.getPageStatusList' => array($this, 'wpGetPageStatusList'), + 'wp.getPageTemplates' => array($this, 'wpGetPageTemplates'), + 'wp.getOptions' => array($this, 'wpGetOptions'), + 'wp.setOptions' => array($this, 'wpSetOptions'), + 'wp.getComment' => array($this, 'wpGetComment'), + 'wp.getComments' => array($this, 'wpGetComments'), + 'wp.deleteComment' => array($this, 'wpDeleteComment'), + 'wp.editComment' => array($this, 'wpEditComment'), + 'wp.newComment' => array($this, 'wpNewComment'), + 'wp.getCommentStatusList' => array($this, 'wpGetCommentStatusList'), + + /** New Wordpress API after 2.9.2 */ + 'wp.getProfile' => array($this, 'wpGetProfile'), + 'wp.getPostFormats' => array($this, 'wpGetPostFormats'), + 'wp.getMediaLibrary' => array($this, 'wpGetMediaLibrary'), + 'wp.getMediaItem' => array($this, 'wpGetMediaItem'), + 'wp.editPost' => array($this, 'wpEditPost'), + + /** Blogger API */ + 'blogger.getUsersBlogs' => array($this, 'bloggerGetUsersBlogs'), + 'blogger.getUserInfo' => array($this, 'bloggerGetUserInfo'), + 'blogger.getPost' => array($this, 'bloggerGetPost'), + 'blogger.getRecentPosts' => array($this, 'bloggerGetRecentPosts'), + 'blogger.getTemplate' => array($this, 'bloggerGetTemplate'), + 'blogger.setTemplate' => array($this, 'bloggerSetTemplate'), + 'blogger.deletePost' => array($this, 'bloggerDeletePost'), + + /** MetaWeblog API (with MT extensions to structs) */ + 'metaWeblog.newPost' => array($this, 'mwNewPost'), + 'metaWeblog.editPost' => array($this, 'mwEditPost'), + 'metaWeblog.getPost' => array($this, 'mwGetPost'), + 'metaWeblog.getRecentPosts' => array($this, 'mwGetRecentPosts'), + 'metaWeblog.getCategories' => array($this, 'mwGetCategories'), + 'metaWeblog.newMediaObject' => array($this, 'mwNewMediaObject'), + + /** MetaWeblog API aliases for Blogger API */ + 'metaWeblog.deletePost' => array($this, 'bloggerDeletePost'), + 'metaWeblog.getTemplate' => array($this, 'bloggerGetTemplate'), + 'metaWeblog.setTemplate' => array($this, 'bloggerSetTemplate'), + 'metaWeblog.getUsersBlogs' => array($this, 'bloggerGetUsersBlogs'), + + /** MovableType API */ + 'mt.getCategoryList' => array($this, 'mtGetCategoryList'), + 'mt.getRecentPostTitles' => array($this, 'mtGetRecentPostTitles'), + 'mt.getPostCategories' => array($this, 'mtGetPostCategories'), + 'mt.setPostCategories' => array($this, 'mtSetPostCategories'), + 'mt.publishPost' => array($this, 'mtPublishPost'), + + /** PingBack */ + 'pingback.ping' => array($this,'pingbackPing'), + 'pingback.extensions.getPingbacks' => array($this,'pingbackExtensionsGetPingbacks'), + + /** hook after */ + 'hook.afterCall' => array($this, 'hookAfterCall'), + )); + } + } +} diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.sql" new file mode 100644 index 0000000..a81e5a8 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcblog.sql" @@ -0,0 +1,250 @@ +-- MySQL dump 10.13 Distrib 5.5.46, for Linux (x86_64) +-- +-- Host: localhost Database: mcblog +-- ------------------------------------------------------ +-- Server version 5.5.46-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `mcblog_comments` +-- + +DROP TABLE IF EXISTS `mcblog_comments`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcblog_comments` ( + `coid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `cid` int(10) unsigned DEFAULT '0', + `created` int(10) unsigned DEFAULT '0', + `author` varchar(200) DEFAULT NULL, + `authorId` int(10) unsigned DEFAULT '0', + `ownerId` int(10) unsigned DEFAULT '0', + `mail` varchar(200) DEFAULT NULL, + `url` varchar(200) DEFAULT NULL, + `ip` varchar(64) DEFAULT NULL, + `agent` varchar(200) DEFAULT NULL, + `text` text, + `type` varchar(16) DEFAULT 'comment', + `status` varchar(16) DEFAULT 'approved', + `parent` int(10) unsigned DEFAULT '0', + PRIMARY KEY (`coid`), + KEY `cid` (`cid`), + KEY `created` (`created`) +) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcblog_comments` +-- + +LOCK TABLES `mcblog_comments` WRITE; +/*!40000 ALTER TABLE `mcblog_comments` DISABLE KEYS */; +INSERT INTO `mcblog_comments` VALUES (2,5,1449026706,'鍒囩粯閰',0,1,'kirie@hack123.pw',NULL,'49.212.85.35','Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36','灏辨槸鎴戝氨鏄垜~娆㈣繋澶у瀵规垜浠殑鏂伴椤垫彁鎰忚~','comment','approved',0),(3,5,1449309573,'dsgsdg',0,1,'gagd@fudan.edu.cn',NULL,'140.207.196.3','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36','','comment','approved',2),(4,5,1449309634,'dsgsdg',0,1,'gagd@fudan.edu.cn',NULL,'140.207.196.3','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.86 Safari/537.36','','comment','approved',0),(5,5,1449310807,'FY',0,1,'FY@FY.FY',NULL,'59.52.223.226','Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko','/>','comment','approved',0),(6,5,1449310913,'FY',0,1,'FY@FY.FY',NULL,'59.52.223.226','Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko','asdadasdassa','comment','approved',0),(7,5,1449326359,'11',0,1,'111@qq.com',NULL,'111.8.49.201','Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0',' ','comment','approved',2),(8,5,1449326441,'11',0,1,'111@qq.com',NULL,'111.8.49.201','Mozilla/5.0 (Windows NT 6.3; WOW64; rv:42.0) Gecko/20100101 Firefox/42.0',' ','comment','approved',2),(9,4,1449331364,'11a',0,1,'1@qq.com','http://www.dream4.com','198.148.116.121','Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36','\'\">','comment','approved',0),(10,2,1449390054,'sdf',0,1,'sdf@sdf.cn','http://www.baidu.com','202.118.236.189','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36','sdf','comment','approved',0),(11,2,1449390135,'xcxcv',0,1,'sdfxcv@sdf.cn','http://www.baidu.com','202.118.236.189','Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36','','comment','approved',0); +/*!40000 ALTER TABLE `mcblog_comments` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcblog_contents` +-- + +DROP TABLE IF EXISTS `mcblog_contents`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcblog_contents` ( + `cid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(200) DEFAULT NULL, + `slug` varchar(200) DEFAULT NULL, + `created` int(10) unsigned DEFAULT '0', + `modified` int(10) unsigned DEFAULT '0', + `text` text, + `order` int(10) unsigned DEFAULT '0', + `authorId` int(10) unsigned DEFAULT '0', + `template` varchar(32) DEFAULT NULL, + `type` varchar(16) DEFAULT 'post', + `status` varchar(16) DEFAULT 'publish', + `password` varchar(32) DEFAULT NULL, + `commentsNum` int(10) unsigned DEFAULT '0', + `allowComment` char(1) DEFAULT '0', + `allowPing` char(1) DEFAULT '0', + `allowFeed` char(1) DEFAULT '0', + `parent` int(10) unsigned DEFAULT '0', + PRIMARY KEY (`cid`), + UNIQUE KEY `slug` (`slug`), + KEY `created` (`created`) +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcblog_contents` +-- + +LOCK TABLES `mcblog_contents` WRITE; +/*!40000 ALTER TABLE `mcblog_contents` DISABLE KEYS */; +INSERT INTO `mcblog_contents` VALUES (3,'HDUISA MC鏈嶅姟鍣ㄧ鍞腑蹇冨畼鏂瑰崥瀹㈠紑閫氬暒锛','3',1448190060,1449026595,'HDUISA MC鏈嶅姟鍣ㄧ鍞腑蹇冨畼鏂瑰崥瀹㈠紑閫氬暒锛乗r\n\r\n涓轰簡杩庢帴鍙12锛佹墍鏈夋湇鍔″櫒涓寰嬩紭鎯犵壒浠凤紒搴撳瓨鏈夐檺锛佸厛鍒板厛寰楋紒\r\n\r\nPS. 娆㈣繋鍔犲叆鎴戜滑涓璧峰垱涓氾紒JD璇︽儏瑙佸畼鏂归椤典腑鐨勫姞鍏ユ垜浠紒',0,1,NULL,'post','publish',NULL,0,'1','1','1',0),(2,'鍏充簬','start-page',1449025868,1449025868,'鏈〉闈㈢敱 Typecho 鍒涘缓, 杩欏彧鏄釜娴嬭瘯椤甸潰.',0,1,NULL,'page','publish',NULL,2,'1','1','1',0),(4,'绱фュ叕鍛婏紒','4',1449026460,1449026799,'鏈杩戞垜浠娴嬪埌缃戠珯鏈嶅姟鍣ㄩ伃鍙楀ぇ閲忔伓鎰忔敞鍐屽拰澶ч噺web鏀诲嚮锛屾垜浠凡缁忓仠姝㈡敞鍐屽姛鑳斤紝宸叉湁鐨勭敤鎴蜂笉鍙楀奖鍝嶏紝濡傛灉鏂扮敤鎴锋兂璐拱鏈嶅姟鍣紝璇疯愬績绛夊緟鎴戜滑涓嬫寮鏀捐喘涔般俓r\n\r\nPS. 璇氭嫑鍚勮矾澶х鍔犲叆鎴戜滑锛孞D璇︽儏瑙佸畼鏂归椤点俓r\nPSS. 榛戝浠斁寮冨惂锛佷笉浼氭湁婕忔礊鐨勶紒锛佸搰鍝堝搱锛侊紒',0,1,NULL,'post','publish',NULL,1,'1','1','1',0),(5,'娆㈣繋鏂板憳宸','5',1448844600,1449026654,'娆㈣繋`鍒囩粯閰盽鍔犲叆鎴戜滑~鎴戜滑鐨勯椤靛凡缁忔敼鐗堬紝鏄敱鍒囩粯閰卞畬鎴愮殑鍝',0,1,NULL,'post','publish',NULL,7,'1','1','1',0); +/*!40000 ALTER TABLE `mcblog_contents` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcblog_fields` +-- + +DROP TABLE IF EXISTS `mcblog_fields`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcblog_fields` ( + `cid` int(10) unsigned NOT NULL, + `name` varchar(200) NOT NULL, + `type` varchar(8) DEFAULT 'str', + `str_value` text, + `int_value` int(10) DEFAULT '0', + `float_value` float DEFAULT '0', + PRIMARY KEY (`cid`,`name`), + KEY `int_value` (`int_value`), + KEY `float_value` (`float_value`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcblog_fields` +-- + +LOCK TABLES `mcblog_fields` WRITE; +/*!40000 ALTER TABLE `mcblog_fields` DISABLE KEYS */; +/*!40000 ALTER TABLE `mcblog_fields` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcblog_metas` +-- + +DROP TABLE IF EXISTS `mcblog_metas`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcblog_metas` ( + `mid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(200) DEFAULT NULL, + `slug` varchar(200) DEFAULT NULL, + `type` varchar(32) NOT NULL, + `description` varchar(200) DEFAULT NULL, + `count` int(10) unsigned DEFAULT '0', + `order` int(10) unsigned DEFAULT '0', + `parent` int(10) unsigned DEFAULT '0', + PRIMARY KEY (`mid`), + KEY `slug` (`slug`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcblog_metas` +-- + +LOCK TABLES `mcblog_metas` WRITE; +/*!40000 ALTER TABLE `mcblog_metas` DISABLE KEYS */; +INSERT INTO `mcblog_metas` VALUES (1,'榛樿鍒嗙被','default','category','鍙槸涓涓粯璁ゅ垎绫',3,1,0); +/*!40000 ALTER TABLE `mcblog_metas` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcblog_options` +-- + +DROP TABLE IF EXISTS `mcblog_options`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcblog_options` ( + `name` varchar(32) NOT NULL, + `user` int(10) unsigned NOT NULL DEFAULT '0', + `value` text, + PRIMARY KEY (`name`,`user`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcblog_options` +-- + +LOCK TABLES `mcblog_options` WRITE; +/*!40000 ALTER TABLE `mcblog_options` DISABLE KEYS */; +INSERT INTO `mcblog_options` VALUES ('theme',0,'default'),('theme:default',0,'a:2:{s:7:\"logoUrl\";N;s:12:\"sidebarBlock\";a:5:{i:0;s:15:\"ShowRecentPosts\";i:1;s:18:\"ShowRecentComments\";i:2;s:12:\"ShowCategory\";i:3;s:11:\"ShowArchive\";i:4;s:9:\"ShowOther\";}}'),('timezone',0,'28800'),('lang',0,NULL),('charset',0,'UTF-8'),('contentType',0,'text/html'),('gzip',0,'0'),('generator',0,'Typecho 1.0/14.10.10'),('title',0,'HDUISA MC鏈嶅姟鍣ㄧ鍞腑蹇冨畼鏂瑰崥瀹'),('description',0,'瀹樻柟缃戠珯锛歮c.hack123.xyz'),('keywords',0,'HDUISA,MC,鏈嶅姟鍣ㄧ鍞腑蹇'),('rewrite',0,'1'),('frontPage',0,'recent'),('frontArchive',0,'0'),('commentsRequireMail',0,'1'),('commentsWhitelist',0,'0'),('commentsRequireURL',0,'0'),('commentsRequireModeration',0,'0'),('plugins',0,'a:0:{}'),('commentDateFormat',0,'F jS, Y \\a\\t h:i a'),('siteUrl',0,'http://mcblog.hack123.pw'),('defaultCategory',0,'1'),('allowRegister',0,'0'),('defaultAllowComment',0,'1'),('defaultAllowPing',0,'1'),('defaultAllowFeed',0,'1'),('pageSize',0,'5'),('postsListSize',0,'10'),('commentsListSize',0,'10'),('commentsHTMLTagAllowed',0,NULL),('postDateFormat',0,'Y-m-d'),('feedFullText',0,'1'),('editorSize',0,'350'),('autoSave',0,'0'),('markdown',0,'1'),('commentsMaxNestingLevels',0,'5'),('commentsPostTimeout',0,'2592000'),('commentsUrlNofollow',0,'1'),('commentsShowUrl',0,'1'),('commentsMarkdown',0,'0'),('commentsPageBreak',0,'0'),('commentsThreaded',0,'1'),('commentsPageSize',0,'20'),('commentsPageDisplay',0,'last'),('commentsOrder',0,'ASC'),('commentsCheckReferer',0,'1'),('commentsAutoClose',0,'0'),('commentsPostIntervalEnable',0,'1'),('commentsPostInterval',0,'60'),('commentsShowCommentOnly',0,'0'),('commentsAvatar',0,'1'),('commentsAvatarRating',0,'G'),('commentsAntiSpam',0,'1'),('routingTable',0,'a:26:{i:0;a:25:{s:5:\"index\";a:6:{s:3:\"url\";s:1:\"/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:8:\"|^[/]?$|\";s:6:\"format\";s:1:\"/\";s:6:\"params\";a:0:{}}s:7:\"archive\";a:6:{s:3:\"url\";s:6:\"/blog/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:13:\"|^/blog[/]?$|\";s:6:\"format\";s:6:\"/blog/\";s:6:\"params\";a:0:{}}s:2:\"do\";a:6:{s:3:\"url\";s:22:\"/action/[action:alpha]\";s:6:\"widget\";s:9:\"Widget_Do\";s:6:\"action\";s:6:\"action\";s:4:\"regx\";s:32:\"|^/action/([_0-9a-zA-Z-]+)[/]?$|\";s:6:\"format\";s:10:\"/action/%s\";s:6:\"params\";a:1:{i:0;s:6:\"action\";}}s:4:\"post\";a:6:{s:3:\"url\";s:24:\"/archives/[cid:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:26:\"|^/archives/([0-9]+)[/]?$|\";s:6:\"format\";s:13:\"/archives/%s/\";s:6:\"params\";a:1:{i:0;s:3:\"cid\";}}s:10:\"attachment\";a:6:{s:3:\"url\";s:26:\"/attachment/[cid:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:28:\"|^/attachment/([0-9]+)[/]?$|\";s:6:\"format\";s:15:\"/attachment/%s/\";s:6:\"params\";a:1:{i:0;s:3:\"cid\";}}s:8:\"category\";a:6:{s:3:\"url\";s:17:\"/category/[slug]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:25:\"|^/category/([^/]+)[/]?$|\";s:6:\"format\";s:13:\"/category/%s/\";s:6:\"params\";a:1:{i:0;s:4:\"slug\";}}s:3:\"tag\";a:6:{s:3:\"url\";s:12:\"/tag/[slug]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:20:\"|^/tag/([^/]+)[/]?$|\";s:6:\"format\";s:8:\"/tag/%s/\";s:6:\"params\";a:1:{i:0;s:4:\"slug\";}}s:6:\"author\";a:6:{s:3:\"url\";s:22:\"/author/[uid:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:24:\"|^/author/([0-9]+)[/]?$|\";s:6:\"format\";s:11:\"/author/%s/\";s:6:\"params\";a:1:{i:0;s:3:\"uid\";}}s:6:\"search\";a:6:{s:3:\"url\";s:19:\"/search/[keywords]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:23:\"|^/search/([^/]+)[/]?$|\";s:6:\"format\";s:11:\"/search/%s/\";s:6:\"params\";a:1:{i:0;s:8:\"keywords\";}}s:10:\"index_page\";a:6:{s:3:\"url\";s:21:\"/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:22:\"|^/page/([0-9]+)[/]?$|\";s:6:\"format\";s:9:\"/page/%s/\";s:6:\"params\";a:1:{i:0;s:4:\"page\";}}s:12:\"archive_page\";a:6:{s:3:\"url\";s:26:\"/blog/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:27:\"|^/blog/page/([0-9]+)[/]?$|\";s:6:\"format\";s:14:\"/blog/page/%s/\";s:6:\"params\";a:1:{i:0;s:4:\"page\";}}s:13:\"category_page\";a:6:{s:3:\"url\";s:32:\"/category/[slug]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:34:\"|^/category/([^/]+)/([0-9]+)[/]?$|\";s:6:\"format\";s:16:\"/category/%s/%s/\";s:6:\"params\";a:2:{i:0;s:4:\"slug\";i:1;s:4:\"page\";}}s:8:\"tag_page\";a:6:{s:3:\"url\";s:27:\"/tag/[slug]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:29:\"|^/tag/([^/]+)/([0-9]+)[/]?$|\";s:6:\"format\";s:11:\"/tag/%s/%s/\";s:6:\"params\";a:2:{i:0;s:4:\"slug\";i:1;s:4:\"page\";}}s:11:\"author_page\";a:6:{s:3:\"url\";s:37:\"/author/[uid:digital]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:33:\"|^/author/([0-9]+)/([0-9]+)[/]?$|\";s:6:\"format\";s:14:\"/author/%s/%s/\";s:6:\"params\";a:2:{i:0;s:3:\"uid\";i:1;s:4:\"page\";}}s:11:\"search_page\";a:6:{s:3:\"url\";s:34:\"/search/[keywords]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:32:\"|^/search/([^/]+)/([0-9]+)[/]?$|\";s:6:\"format\";s:14:\"/search/%s/%s/\";s:6:\"params\";a:2:{i:0;s:8:\"keywords\";i:1;s:4:\"page\";}}s:12:\"archive_year\";a:6:{s:3:\"url\";s:18:\"/[year:digital:4]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:19:\"|^/([0-9]{4})[/]?$|\";s:6:\"format\";s:4:\"/%s/\";s:6:\"params\";a:1:{i:0;s:4:\"year\";}}s:13:\"archive_month\";a:6:{s:3:\"url\";s:36:\"/[year:digital:4]/[month:digital:2]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:30:\"|^/([0-9]{4})/([0-9]{2})[/]?$|\";s:6:\"format\";s:7:\"/%s/%s/\";s:6:\"params\";a:2:{i:0;s:4:\"year\";i:1;s:5:\"month\";}}s:11:\"archive_day\";a:6:{s:3:\"url\";s:52:\"/[year:digital:4]/[month:digital:2]/[day:digital:2]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:41:\"|^/([0-9]{4})/([0-9]{2})/([0-9]{2})[/]?$|\";s:6:\"format\";s:10:\"/%s/%s/%s/\";s:6:\"params\";a:3:{i:0;s:4:\"year\";i:1;s:5:\"month\";i:2;s:3:\"day\";}}s:17:\"archive_year_page\";a:6:{s:3:\"url\";s:38:\"/[year:digital:4]/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:33:\"|^/([0-9]{4})/page/([0-9]+)[/]?$|\";s:6:\"format\";s:12:\"/%s/page/%s/\";s:6:\"params\";a:2:{i:0;s:4:\"year\";i:1;s:4:\"page\";}}s:18:\"archive_month_page\";a:6:{s:3:\"url\";s:56:\"/[year:digital:4]/[month:digital:2]/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:44:\"|^/([0-9]{4})/([0-9]{2})/page/([0-9]+)[/]?$|\";s:6:\"format\";s:15:\"/%s/%s/page/%s/\";s:6:\"params\";a:3:{i:0;s:4:\"year\";i:1;s:5:\"month\";i:2;s:4:\"page\";}}s:16:\"archive_day_page\";a:6:{s:3:\"url\";s:72:\"/[year:digital:4]/[month:digital:2]/[day:digital:2]/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:55:\"|^/([0-9]{4})/([0-9]{2})/([0-9]{2})/page/([0-9]+)[/]?$|\";s:6:\"format\";s:18:\"/%s/%s/%s/page/%s/\";s:6:\"params\";a:4:{i:0;s:4:\"year\";i:1;s:5:\"month\";i:2;s:3:\"day\";i:3;s:4:\"page\";}}s:12:\"comment_page\";a:6:{s:3:\"url\";s:53:\"[permalink:string]/comment-page-[commentPage:digital]\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:36:\"|^(.+)/comment\\-page\\-([0-9]+)[/]?$|\";s:6:\"format\";s:18:\"%s/comment-page-%s\";s:6:\"params\";a:2:{i:0;s:9:\"permalink\";i:1;s:11:\"commentPage\";}}s:4:\"feed\";a:6:{s:3:\"url\";s:20:\"/feed[feed:string:0]\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:4:\"feed\";s:4:\"regx\";s:17:\"|^/feed(.*)[/]?$|\";s:6:\"format\";s:7:\"/feed%s\";s:6:\"params\";a:1:{i:0;s:4:\"feed\";}}s:8:\"feedback\";a:6:{s:3:\"url\";s:31:\"[permalink:string]/[type:alpha]\";s:6:\"widget\";s:15:\"Widget_Feedback\";s:6:\"action\";s:6:\"action\";s:4:\"regx\";s:29:\"|^(.+)/([_0-9a-zA-Z-]+)[/]?$|\";s:6:\"format\";s:5:\"%s/%s\";s:6:\"params\";a:2:{i:0;s:9:\"permalink\";i:1;s:4:\"type\";}}s:4:\"page\";a:6:{s:3:\"url\";s:12:\"/[slug].html\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";s:4:\"regx\";s:22:\"|^/([^/]+)\\.html[/]?$|\";s:6:\"format\";s:8:\"/%s.html\";s:6:\"params\";a:1:{i:0;s:4:\"slug\";}}}s:5:\"index\";a:3:{s:3:\"url\";s:1:\"/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:7:\"archive\";a:3:{s:3:\"url\";s:6:\"/blog/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:2:\"do\";a:3:{s:3:\"url\";s:22:\"/action/[action:alpha]\";s:6:\"widget\";s:9:\"Widget_Do\";s:6:\"action\";s:6:\"action\";}s:4:\"post\";a:3:{s:3:\"url\";s:24:\"/archives/[cid:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:10:\"attachment\";a:3:{s:3:\"url\";s:26:\"/attachment/[cid:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:8:\"category\";a:3:{s:3:\"url\";s:17:\"/category/[slug]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:3:\"tag\";a:3:{s:3:\"url\";s:12:\"/tag/[slug]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:6:\"author\";a:3:{s:3:\"url\";s:22:\"/author/[uid:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:6:\"search\";a:3:{s:3:\"url\";s:19:\"/search/[keywords]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:10:\"index_page\";a:3:{s:3:\"url\";s:21:\"/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:12:\"archive_page\";a:3:{s:3:\"url\";s:26:\"/blog/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:13:\"category_page\";a:3:{s:3:\"url\";s:32:\"/category/[slug]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:8:\"tag_page\";a:3:{s:3:\"url\";s:27:\"/tag/[slug]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:11:\"author_page\";a:3:{s:3:\"url\";s:37:\"/author/[uid:digital]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:11:\"search_page\";a:3:{s:3:\"url\";s:34:\"/search/[keywords]/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:12:\"archive_year\";a:3:{s:3:\"url\";s:18:\"/[year:digital:4]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:13:\"archive_month\";a:3:{s:3:\"url\";s:36:\"/[year:digital:4]/[month:digital:2]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:11:\"archive_day\";a:3:{s:3:\"url\";s:52:\"/[year:digital:4]/[month:digital:2]/[day:digital:2]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:17:\"archive_year_page\";a:3:{s:3:\"url\";s:38:\"/[year:digital:4]/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:18:\"archive_month_page\";a:3:{s:3:\"url\";s:56:\"/[year:digital:4]/[month:digital:2]/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:16:\"archive_day_page\";a:3:{s:3:\"url\";s:72:\"/[year:digital:4]/[month:digital:2]/[day:digital:2]/page/[page:digital]/\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:12:\"comment_page\";a:3:{s:3:\"url\";s:53:\"[permalink:string]/comment-page-[commentPage:digital]\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}s:4:\"feed\";a:3:{s:3:\"url\";s:20:\"/feed[feed:string:0]\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:4:\"feed\";}s:8:\"feedback\";a:3:{s:3:\"url\";s:31:\"[permalink:string]/[type:alpha]\";s:6:\"widget\";s:15:\"Widget_Feedback\";s:6:\"action\";s:6:\"action\";}s:4:\"page\";a:3:{s:3:\"url\";s:12:\"/[slug].html\";s:6:\"widget\";s:14:\"Widget_Archive\";s:6:\"action\";s:6:\"render\";}}'),('actionTable',0,'a:0:{}'),('panelTable',0,'a:0:{}'),('attachmentTypes',0,'@image@'),('secret',0,'J9G!D9BcIRv)TCgSHyFnqVIk1IO^)EbJ'); +/*!40000 ALTER TABLE `mcblog_options` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcblog_relationships` +-- + +DROP TABLE IF EXISTS `mcblog_relationships`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcblog_relationships` ( + `cid` int(10) unsigned NOT NULL, + `mid` int(10) unsigned NOT NULL, + PRIMARY KEY (`cid`,`mid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcblog_relationships` +-- + +LOCK TABLES `mcblog_relationships` WRITE; +/*!40000 ALTER TABLE `mcblog_relationships` DISABLE KEYS */; +INSERT INTO `mcblog_relationships` VALUES (3,1),(4,1),(5,1); +/*!40000 ALTER TABLE `mcblog_relationships` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcblog_users` +-- + +DROP TABLE IF EXISTS `mcblog_users`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcblog_users` ( + `uid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `name` varchar(32) DEFAULT NULL, + `password` varchar(64) DEFAULT NULL, + `mail` varchar(200) DEFAULT NULL, + `url` varchar(200) DEFAULT NULL, + `screenName` varchar(32) DEFAULT NULL, + `created` int(10) unsigned DEFAULT '0', + `activated` int(10) unsigned DEFAULT '0', + `logged` int(10) unsigned DEFAULT '0', + `group` varchar(16) DEFAULT 'visitor', + `authCode` varchar(64) DEFAULT NULL, + PRIMARY KEY (`uid`), + UNIQUE KEY `name` (`name`), + UNIQUE KEY `mail` (`mail`) +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcblog_users` +-- + +LOCK TABLES `mcblog_users` WRITE; +/*!40000 ALTER TABLE `mcblog_users` DISABLE KEYS */; +INSERT INTO `mcblog_users` VALUES (1,'admin','$P$BRPpKjbfqy2J97iO1cNVZDdxeXjkyC.','admin@mcblog123.pw','http://www.typecho.org','admin',1449025868,1449027322,1449026666,'administrator','757f29e975f9576d9e2dfb03a42ce5d2'); +/*!40000 ALTER TABLE `mcblog_users` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2015-12-08 15:27:56 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcshop.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcshop.sql" new file mode 100644 index 0000000..b230044 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/mcshop.sql" @@ -0,0 +1,167 @@ +-- MySQL dump 10.13 Distrib 5.5.46, for Linux (x86_64) +-- +-- Host: localhost Database: mcshop +-- ------------------------------------------------------ +-- Server version 5.5.46-log + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `cart` +-- + +DROP TABLE IF EXISTS `cart`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cart` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `uid` varchar(64) NOT NULL, + `username` varchar(64) NOT NULL, + `server_id` int(10) NOT NULL, + `price` int(10) NOT NULL, + `cnt` int(10) NOT NULL, + `sum_price` int(10) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=53 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `cart` +-- + +LOCK TABLES `cart` WRITE; +/*!40000 ALTER TABLE `cart` DISABLE KEYS */; +INSERT INTO `cart` VALUES (6,'2','Aklis',1,10,1,930),(12,'3','lightless',2,20,0,180),(14,'2','Aklis',2,20,1,60),(37,'13','xuesheng',2,20,9,180),(38,'13','xuesheng',3,35,275,9625),(41,'13','xuesheng',5,120,2,240),(42,'13','xuesheng',6,180,2,360),(44,'13','xuesheng',1,10,2,20),(45,'13','xuesheng',4,50,39369,1968450),(50,'4','admin',5,120,1,120),(52,'4','admin',1,10,1,10); +/*!40000 ALTER TABLE `cart` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `flagma` +-- + +DROP TABLE IF EXISTS `flagma`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `flagma` ( + `flagfuck` varchar(128) NOT NULL +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `flagma` +-- + +LOCK TABLES `flagma` WRITE; +/*!40000 ALTER TABLE `flagma` DISABLE KEYS */; +INSERT INTO `flagma` VALUES ('hctf{1s_Mc+lsFun@Bu71d0n07-7hinkS0}'); +/*!40000 ALTER TABLE `flagma` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcshop_admin` +-- + +DROP TABLE IF EXISTS `mcshop_admin`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcshop_admin` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `username` varchar(64) NOT NULL, + `password` varchar(512) NOT NULL, + `email` varchar(128) NOT NULL, + `token` varchar(64) NOT NULL, + `level` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcshop_admin` +-- + +LOCK TABLES `mcshop_admin` WRITE; +/*!40000 ALTER TABLE `mcshop_admin` DISABLE KEYS */; +INSERT INTO `mcshop_admin` VALUES (1,'mcshop_admin','6471ed64f102429d4bdfdcd3840645ca','mcshop_admin@hack123.xyz','nUWg5R3M7IxA3lfZk4VT0cgsC9saUBBSU55YCxl3FLUr4FwQEV4Zq1mIvfQzo3DN','0'),(2,'mcshop_sale','4909ccbd5734add765b4be6668f8c48c','mcshop_sale@hack123.xyz','QaJuOdcB9xN1BFLfbk98D8jMLO7VaOZkpTyFCqrWL2nF718bp9sS4ACsh6POnhlG','1'),(3,'kirie','24d846d86f30d7044c280ce62095b368','kirie@hack123.pw','qAHUpdcB9zs2BFLfbO98D8jMLO7VaOZkpFyFCqrWL2nF718bp9sS4ACsh6POnhls','2'); +/*!40000 ALTER TABLE `mcshop_admin` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `mcshop_user` +-- + +DROP TABLE IF EXISTS `mcshop_user`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mcshop_user` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `username` varchar(64) NOT NULL, + `password` varchar(512) NOT NULL, + `email` varchar(128) NOT NULL, + `token` varchar(64) NOT NULL, + `bank` varchar(64) NOT NULL, + `history_bank` varchar(128) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `mcshop_user` +-- + +LOCK TABLES `mcshop_user` WRITE; +/*!40000 ALTER TABLE `mcshop_user` DISABLE KEYS */; +INSERT INTO `mcshop_user` VALUES (1,'test','309031d05eb343448b725b09a3635f13','test@test.com','7ClEs9RBtKJEuFSrxjpSLkNAqcFPc90Bh5eTfd0aj3V8jJWmvQzKBxjT56rhYbmp','999999','2348'),(2,'Aklis','bbdab7cdd82331485272002f90ee3d46','a@qq.com','Cet65hreTN6yZF8FJU9SYvAlB2ft7KE6EdDdtF1ChvyAY61eKBSUnsvmj0x4Jb5Z','100000','0'),(3,'lightless','e10adc3949ba59abbe56e057f20f883e','1@qq.com','FvaBQWSlKwZm21RDQtgnTOb5lf5TGvnTuOsR8IqMmxutxfqiCA0RHW6ae4YtM9UP','60000','0'),(4,'admin','e10adc3949ba59abbe56e057f20f883e','123456@qq.com','9fUNFCq5gDnUdZLKEfCQdRYDV0RkYnlYefPtjucP7hKb5os1QtUOCANepoLDIBAj','500500000','0'),(5,'lightless123','e10adc3949ba59abbe56e057f20f883e','1@qq.com','2NsOx00kraC5GE4uyvP7LOLBMrhQNRBQLl3jZOz1YKoJHeFk199HbsRCibkw77oq','0','0'),(6,'jeje','21dbd9ee5a8e54ec3157e76b32ce450c','aaa@qq.com','q2KzyIONXI2nEkCAVlu5srgRdYrZSO6byTvOOVssO3SvECLLsuYJYwMb3D69rX6A','0','0'),(7,'admin1','e00cf25ad42683b3df678c61f42c6bda','admin@admin.com','AFTU0uDjA92oLEfUH6EA5JjvmbBdQR6zlkxSMswTMAQxjyPiw5KRys9dDn1aRfPy','0','0'),(8,'q','7694f4a66316e53c8cdd9d9954bd611d','q@q.com','bEG9PCvfmzwsOys4yoVit6SN4LvH4mF0Y8f16bU33saGbLbbFDz53XbeRuOTJspY','0','0'),(9,'h','8277e0910d750195b448797616e091ad','t@t.cn','GxXaZB94B6ZLUbbJOlF9KRilQlymx9nLLaQmfWcyF7LTOV8Fxuo93dcIMe57UHVU','0','0'),(10,'fuckkk','96e79218965eb72c92a549dd5a330112','fuckkk@qq.com','esal62GLS63xYbgiDEqmTb2VHLB3BxR5YoBZAuXx3WcRRQr1DO0VrZwMUPVbLlMn','0','0'),(11,'nnnnnnnn','adbc91a43e988a3b5b745b8529a90b61','1@qq.com','0l1Korwz1uvFjJPcjcHIJr4N0mtbtGwL6W88PmZYQjGIPTl4M6nVdn6yaOZSeoIh','0','0'),(12,'123','698d51a19d8a121ce581499d7b701668','123@qq.com','J9UAWHaUABuRzRT1XClyr6L3oIAf9SIzO2XhK10ttpDIyrRzEaKcedcFE0dBSU0g','0','0'),(13,'xuesheng','1a2617ff99ccf1e1481e806e249c5a44','xuesheng@163.com','m1FIdN4sxUx7HPSI24h6PaAF68i34qCpJULT8sHafEsJyRf7lgGILE7OzOaXdA3h','500000000000','0'),(14,'adminadmin','f6fdffe48c908deb0f4c3bd36c032e72','adminadmin@dd','bNmjEyNvTbyk18bnTdGaznO7u5k9Cb0UfD4tPWZd17iZ3oa44hf8sQzRDt7OGnoY','0','0'),(15,'fuckgank','1786a39c136815dc549d1825ca7c95c9','scriptteam@163.com','4FUpBz41wbD2MGcdFfLviyhYhQRk688p14RMV6E2jstmP2Z1jBLSEv9wGCobdq1i','0','0'),(16,'test123','4297f44b13955235245b2497399d7a93','123123@1.com','YkA8vuuOTmhws3upUFdA3FiOP8gLrsj5WNvFDVKAKWiJeGJFmsdeK3eaVYE2hN9m','0','0'),(17,'aaaaaad','698d51a19d8a121ce581499d7b701668','123@qq.com','hqrGaY5cizFjtIjXCxHM4OgRwEo5qmbC4bAGkIyYJSO31E6jVcTvwu5A49r4NBZc','0','0'),(18,'aaa','74b87337454200d4d33f80c4663dc5e5','sads@aaa.cim','mQyv7KBHlmWamma9VSsPu4dgsQZaDnGm2h7vnGjRQCGf6hOSkPEmUKdHPXNO7pI8','0','0'),(19,'1\' OR \'1\'=\'1','c4ca4238a0b923820dcc509a6f75849b','123@qq.com','7Sm9IpWqNTYvH5aqMggWVaxgnsauOrNWApVWUQQxzM6oG2rczWGTG8U51al5IaNE','0','0'),(20,'\'fdd\"||updatexml(1,concat(0x7e,(select(replace((select(group_con','c4ca4238a0b923820dcc509a6f75849b','123@qq.com','i1kKJeEU2kVrYaH6XCVlNXWBGyhIR4QnmmRDcRabw1srZWymA4E3SLOjE7AozvZF','0','0'),(21,'fdd\'||updatexml(1,concat(0x7e,select(1),\'xxx))),1),1)#\'','c4ca4238a0b923820dcc509a6f75849b','123@qq.com','DOspIvFcJnOzJgGyZryiVrCKZlZtlZs1ECxVXpV0YuFNNY3X9CgcwG6CYlR9fvFB','0','0'),(22,'bibi','8115153332991997460b9f236e0da71a','zsbpro@163.com','fEh7uK2zFVuZgwZ96HBRlhy7OegMu2yaOFMDag2Nb4MmM5LwKYMAtqUfe7ewHAbk','0','0'),(23,'bibi\'','8115153332991997460b9f236e0da71a','zsbpro@163.com','ikdNYDxmghTwGvoiarS9poljD5v8PzOkveff96Ta2vUnSvM11Glj8PjbKynkEAwe','0','0'),(24,'DeadSoul','76d80224611fc919a5d54f0ff9fba446','qwe@qwe.qwe','gIQDLnV9CwzWmzeGqYC91g8tdvSmvdGAY08nPQB1mS7BqsjgsrM1dueENCvztavY','0','0'),(25,'wabzsy','e046ada646cb223ff252a0ef486a8141','wabzsy@hotmail.com','mIpeOrmcCTwMcVmQBzvMqp9qt36dMqRYvGZrDKFkv48Zr0P54PARLp0QQBlbNuC6','0','0'),(26,'admin\'','25f9e794323b453885f5181f1b624d0b','123456789@qq.com','ad8D1hS6npSTBNmELaKSG5gTWPmh1hUyrFJUcGuUjhzQPglNVsdZN5SKt3hlDRxY','10000000','0'),(27,'admin\\','e10adc3949ba59abbe56e057f20f883e','admin@qq.com','mWmUHyXIvYf5DvJeieWtveyD5uzQhMDf1uYooTK5paKtX0kg43oXYbgYfZEFW4OK','11111','0'),(28,'Peter','202cb962ac59075b964b07152d234b70','peterqi37@163.com','g7xAhmQ78RO7Jxd0Ype6BQbNNUSC4Kcdgdlr6lpNl2Kwv01edc4Nc867FE5hYNET','0','0'),(29,'1\' or\'','1b9d89871a4318e454509bf43688cff2','1\' or\'@qq.com','CF43jrK4Rsk2vZo59OVhYQTYwgTYAOhw5vnsdfePFCP6pgJna8dF1Kpqqwalf3eU','0','0'),(30,'1','c4ca4238a0b923820dcc509a6f75849b','1@1.com','mrhs6bwvNdiMN2zQydnNb5TiqZI0CWAvVkKhc7A22WWwwJDUqJyppVSl7gXnmr09','0','0'),(31,'admin\', \'admin\', \'admin\') --','c4ca4238a0b923820dcc509a6f75849b','admin@qq.com','UVoKI7ZoI25wQf6Covaj8yiWodGfybQ9Koo2U48B7qzLtpivja48RVSNoeXEjcc0','0','0'),(32,'username','5f4dcc3b5aa765d61d8327deb882cf99','1@1.com','K9mTf3NhcfKqbgbx14ji6Do6jiGFX6XhNEoQKCI6w9RSYX82fq0qtpaMPg0Aa8RD','0','0'),(33,'a','0cc175b9c0f1b6a831c399e269772661','a@q.c','iiL0kmbyjA8kRqDWZwfDiU71c2cF7aNAljGN98rsL6NU5WOHjYhIFsQyLVAqBeDn','0','0'),(34,'asswecan','63a9f0ea7bb98050796b649e85481845','admin@qq.com','5pKBfhnjVlaXmuuwDnowZbhfOfks8tuzIp6agAoF2hHlpYQfKmZT6C4gB6kCsQYj','0','0'),(35,'rootkits','63a9f0ea7bb98050796b649e85481845','root@qq.com','ubTR6dMGCgm03UfKw6vEfIAN3wnBWOZ4ahFKSitZXPlfdi3dJzvg8AmUov18jpvT','0','0'),(36,'testluo\\\'','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','0tFIScCW3QFvgzFh1CEfjvCQhqg2whwDt5sOoYawI9cCbRy3Z3R9TjaIyVbrpro4','0','0'),(37,'test1luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','oNZscXtzkC6pgNQgPX3g9LnQsK6AAQ6HRXhYSJ0vKO6EOYqMvMjpX9QLen2Xuyvq','0','0'),(38,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','5UUV89VHJ495YhaKxsMz68diybzB7pXmfDV6t33dzrrgGYj7QFOy3pTs3MsAZDTZ','0','0'),(39,'test2luo\'','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','F0YQ03N76MusnGxFdwKxqAsM6RjP4aHaStiAn6tBmInHjb59C9t0EiaDyw2V26g0','0','0'),(40,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','Hy0zUZySjEnT4t3V8RiyETvvkMsH4J3mKXMHAdDnSfeeLoBiLQ8ZurWvGHImdzc3','0','0'),(41,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','IQtqNZWNYFAbMbZpzHGpydLXsAYVyVqT9652a7sURkOsEcxbkIQDxPaGWOaqE5kj','0','0'),(42,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','nfq1uFoqb93LXfDB9MQJMwb5BXprRFrKss2qNwi2iaWXIpvkzz9lVWoZluxU5Mvq','0','0'),(43,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','dujbCTEe9glnu5i9Roz6dq2i0VMZZncYDIVzCaAR23z5zaKoPL0oo3TgTKpH1HLs','0','0'),(44,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','2ueWGPID9Eulpjb58ZHDPEjI7PDJG1lbXRzaX1B5T4LVXjTafXl5klCuHmGji8Zc','0','0'),(45,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','ogiwEm7aCvjEOFe02vC5boZSUbIGGGLe82Hytb4XDgDvYxUXFXY23woqj5Lf9hTf','0','0'),(46,'test2luo1','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','mgWcDKOyBWZ9mqDRdQQmel0qKfB7jOv3YT4onBtOYMpkN5ZqHdEfqv02eLP2fZAJ','0','0'),(47,'test2luoa\'','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','lQLO39AzHi37nsVvpSW3AnLez2U9xwAedYULEWPlbbyxJlbgWGt4ew6b7sDkPYqi','0','0'),(48,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','B6k07s3iGuZrZq0dcD9k5cgPUtrCedKH0jWhRpAZp9uooczF4MAmg5p8QPvSOIc2','0','0'),(49,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','4kb5vUtJk5BezgzzZ3JvPVo5a5W7pNOeZRLXPCmvQdspQLx6UK8zMQXdp84gzQSl','0','0'),(50,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','6ZomRnzbdLIFY1D0IFAMDdRhmVTwF9k5KHxgw7VxllETlEOacDyZbnsEtvpGeroU','0','0'),(51,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','fhByXnltHsAYJ1KKabTMRqkqmccVXC2gBLJXgFsVKcIDaqqnaOFz4SANHUVkUZmY','0','0'),(52,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','2n5fTn9nOYnSo3vz42zRoqX7F8qLuwZlUQ5yRsb4PyJeSoj96k7qyLUrDqqq97Ph','0','0'),(53,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','6RKWJggNRL5r361K7IVR3OJPrLruxhl4rWmjEf6RIZisQ6nErZ2VKIh8vljxF9Pb','0','0'),(54,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','Z6OnDrGqrp9FDWydcuXsJv1mFeF30HSEb4AWkG9qi1pdJCIFxKB72CqxP4L4jDEJ','0','0'),(55,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','NL9IG04EcntU0Woe71Q735j884J4lKNSUbw3wHvmAAwyOLrbdX3tWEMnqbVNA6ln','0','0'),(56,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','x3G9aYg5xckakIYk7FS8lM55QtBmaLPWAq5HiHiI8Z9P6uXylrttRid34z9dptkK','0','0'),(57,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','6hU79eOSyv09cuV0513U7rOd53kObtMsqNVhNm9rBOo0ubIH0tLEOeb1EHZPLiRg','0','0'),(58,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','lsVOLQudHZnM8qu3swA19EQfDoWi2zBhfTDEKVhQY27uEtGg7Q9PXIsL613Yxr9i','0','0'),(59,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','n272yzF27b3xPz417cAWopQ2kya9wABQPGSNcd5BO4PmNEiUvpMvOvyJeFUyeWNV','0','0'),(60,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','uONKXF0FKVU5Kb2utJhrlTGW2gypmF17a00SBkGFTadRtgKUmTbjT0V8IqDMHdug','0','0'),(61,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','azAUnpLBTbMkEZj6sgJuCBzUXXOPhyWUFxhv8m6hetziQ5gdExlpECwkidNU52QK','0','0'),(62,'test2luo','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','lmdy4Fb3IEZlTh193p190re6Uoyo7DEZurgCfXhiEJHBOYpIq5BLfsIK1o1vOxBe','0','0'),(63,'test2luo22','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','2ia3HyCimP7UtH59Yi1WB2Ttlt1aXWEHZyIw8HaQuJ7wftVFIrRHe4gNk7bCbuKW','0','0'),(64,'test2luo223','e10adc3949ba59abbe56e057f20f883e','199407186@qq.com','1PEu6SaEe6VCNPqCM8XUYQZOBIuKTwdJZLfEQZgAWk9PVDJfJ0od7Tyro5LHywR9','0','0'),(65,'test2luo22311','e10adc3949ba59abbe56e057f20f883e','1','KKR7s5IAZHkVVyUGcgtDJIt0Rv983F5cQiJQ5IyFTKNBbwOSvMzzoNdmGNILc01j','0','0'),(66,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','wJuOdf6PcqqZTSkqSall0Ptkf6pPlOGxvu5dWpksqvgl7OEnCjSvLd1yNG1Xffk1','0','0'),(67,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','rBN2OU0UWxpJXE1nDrwGoCG6ta3cjkK7hFxWKYmNUNLDWPiM8MoNQBunysrYdXVJ','0','0'),(68,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','Nk6cvMrVGutPwGGCcITzV8Yyg1q10WJBCAQ3NhmJqaCLkhVupMbUftakDS0LFcHr','0','0'),(69,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','HBmhmYgli6BFO5ZQoE2SRIqNVXaOHisiMc5UKr1lYN1xkoiyim8seZeT3Uxg0Gzx','0','0'),(70,'test2luo\'1','e10adc3949ba59abbe56e057f20f883e','1','VAz21X11GtKmoFip1z5fHTBiMhOHURmI8pkhOciQwBHGZXGAUeVzF62sI3AbAG1f','0','0'),(71,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','Ml4Lne0T9rYgTsYVvLHPdVLrTnDSAAL6J339HyqDcElViceu9zRJMHFeqbE9ohJC','0','0'),(72,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','R6oJREx1MJgiKfFCt3OD4lNHIiimx5C8poH5lfPWhZWvkxDWZTJSm1JiU620NurQ','0','0'),(73,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','5cW12DinaBSQyA7I8cbJveHoprpLLsusuWnKs0L0sb2r4KXZmOAfFDuKvDyvdLUi','0','0'),(74,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','n6hi2oHe0T9eHbsARQLabiCNd0ckFRS8oXw9szvfyGI2jKd683izbTRwBDDsDXOf','0','0'),(75,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','D0SxJq5fiebxNc3I8CDRuO40cSXhsQeiTPy8KJGVguFVMAPvJ5ANP1KnLOPCnnux','0','0'),(76,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','eac4XxiSSr5tq7OULg1fkj5u1lozc87ooWODRaoLL4ZcPOYlrjjbj4h0PnNLdE9u','0','0'),(77,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','nYt3EFMNPfkZqc7zibsysdAb2OBa7tH1pqFeek23ZtpsV0fUGoV19lyUhLYzfVR6','0','0'),(78,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','spdFwtD5uFDQAh2q2zg5HXzzvesW6hPwqbwHwK8bxpskCJ6DET7eJtz41vHkrugV','0','0'),(79,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','R50ChMoUTATpCy29DXRzEkRqlcxEIcBLGRaekpF4e88lITKkCnG3jKpx4MZ2PUvU','0','0'),(80,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','Qg4oPWr8LY0DfA8uVrGlK7ajtN3YKH8TIBW0EDogFMqju6HPjaD0gidSEefOtd5s','0','0'),(81,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','dpLTmRzgc3p7a27aEJZ41kGvF6C0j0BrMhqQmRW9c193cHZIjOEeUO3yG3PhlEys','0','0'),(82,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','xd6xHacJwwqaUymP1pcbe4bZhrGuugEjHoO4IXBR24WdEBk7bumHfE0bRwujOLc0','0','0'),(83,'test2luo','e10adc3949ba59abbe56e057f20f883e','1','tdEjVXaq9dmWqaSxwRktmoTljsLc2UT6uWEfhq5zBHv79lObgJ0S9BB46DV9MLDP','0','0'),(84,'test3luo\\\'or\\\'1\\\'=\\\'1','e10adc3949ba59abbe56e057f20f883e','1','HJyXQVr16XqF6ImGxRrfwKX5swkF707YNrGuRrdbAIvHw5AgYKdnAwqBH2pEcgKr','0','0'),(85,'test3luo\'or\'1\'=\'1','e10adc3949ba59abbe56e057f20f883e','1','MKRma9dXCunTlwo7frAyiJfRjKCezV5pDCSEZlHJeZmOprIhT1ieXDBIvxxBlSR3','11111111111111','0'),(86,'test123\'','4297f44b13955235245b2497399d7a93','ricter@qq.com','jXW9DI5K8FHqeZBGZCOtM9HBvWbWzmcjl0NIiKU9Eja3nTHzHqNMdvMJXGiko7D6','0','0'),(87,'test123aaa','4297f44b13955235245b2497399d7a93','ricter@qq.com','gBMynpChxNclbHxpylO1jvI6EaOtLIU0GXW9zi5uZkFa6Y4cLnRiqPfC7J9hSsct','0','0'),(88,'payne','50ac9c8856c464e33edba5d1086fbc18','payne138@qq.com','ViqwzT6ekA4RZEdye3sQzkbxbJBfGRLXCu6ITEsiplEeQ5f2HDRNfO43UCiz0AKd','0','0'),(89,'phukkk','21232f297a57a5a743894a0e4a801fc3','admin@admin.admin','3ypoelJLnEMuKYbWxhdcVefHzjpx0dDtygVNH4PcCOAMpDjodRC6BW7U2oiguGL5','0','0'); +/*!40000 ALTER TABLE `mcshop_user` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `server_list` +-- + +DROP TABLE IF EXISTS `server_list`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `server_list` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `server_name` varchar(64) NOT NULL, + `cpu` varchar(64) NOT NULL, + `memory` varchar(64) NOT NULL, + `harddisk` varchar(64) NOT NULL, + `ssd` varchar(64) NOT NULL, + `sum_number` varchar(64) NOT NULL, + `inuse_number` varchar(64) NOT NULL, + `left_number` varchar(64) NOT NULL, + `price` varchar(64) NOT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `server_list` +-- + +LOCK TABLES `server_list` WRITE; +/*!40000 ALTER TABLE `server_list` DISABLE KEYS */; +INSERT INTO `server_list` VALUES (1,'server-a','1','1','1024','0','9.223372036854776e18','9.223372036854776e18','0','10'),(2,'server-b','2','2','1024','0','301','299','2','20'),(3,'server-c','2','3','1024','1','301','301','0','35'),(4,'server-d','4','4','1024','1','9.223372036865886e18','9.223372036865858e18','12797','50'),(5,'server-e','8','8','1024','1','70','70','0','120'),(6,'server-f','8','16','1024','1','41','41','0','180'); +/*!40000 ALTER TABLE `server_list` ENABLE KEYS */; +UNLOCK TABLES; +/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; + +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; + +-- Dump completed on 2015-12-08 15:28:10 diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/readme.txt" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/readme.txt" new file mode 100644 index 0000000..2e6ec6b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/readme.txt" @@ -0,0 +1,4 @@ +题目思路 +1. 基本的信息收集能力(博客,火车票等等) +2. CBC字节翻转攻击(后台权限提升) +3. UPDATE注入(购物车) \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/.user.ini" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/.user.ini" new file mode 100644 index 0000000..e50f2b6 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/.user.ini" @@ -0,0 +1 @@ +open_basedir=/home/wwwroot/shop.hack123.pw:/tmp/:/proc/ diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/404.html" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/404.html" new file mode 100644 index 0000000..89912fd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/404.html" @@ -0,0 +1 @@ +No special input. \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/ajax-cart.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/ajax-cart.php" new file mode 100644 index 0000000..a71ba73 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/ajax-cart.php" @@ -0,0 +1,79 @@ +alert("璇峰厛鐧诲綍");'; + exit; +} + +$id = $_SESSION['id']; +$sql = "SELECT * FROM mcshop_user WHERE id='$id'"; +$result = $dbConn->query($sql); +$row = $result->fetch_assoc(); + +$bank = $row['bank']; +if ($bank < 50000) { + echo ''; + exit; +} + +if (!isset($_POST['p'])) { + header('Location: 404.html'); + exit; +} + +$p = SqlGuard($_POST['p'], $dbConn); +$server_name = 'server-'.$p; + +// 鍙栧嚭璇ユ湇鍔″櫒鐨勭浉鍏充俊鎭 +$sql = "SELECT * FROM server_list WHERE server_name = '$server_name'"; +$result = $dbConn->query($sql); +if ($result->num_rows != 1) { + header('Location: 404.html'); + exit; +} +$server_info = $result->fetch_assoc(); +//print_r($_SESSION); + +// 鎻掑叆鍒拌喘鐗╄溅琛ㄤ腑 +// 妫鏌ヨ鐢ㄦ埛璐墿杞︿腑鏄惁鏈夋鍟嗗搧 +$uid = $_SESSION['id']; +$username = $_SESSION['username']; +$server_id = $server_info['id']; +$price = $server_info['price']; + +$sql = "SELECT * FROM cart WHERE uid='$uid' AND server_id = '$server_id'"; +$result = $dbConn->query($sql); +if ($result->num_rows == 1) { + // 宸茬粡鏈変簡锛寀pdate鍗冲彲 + $sql = "UPDATE cart SET `cnt` = `cnt` + 1, sum_price = sum_price + $price WHERE uid='$id' AND server_id='$server_id'"; + //echo $sql; + $result = $dbConn->query($sql); +} else { + // 杩樻病鏈夛紝insert杩涘幓 + $sql = "INSERT INTO cart VALUES ('', '$uid', '$username', '$server_id', '$price', '1', '$price');"; + $result = $dbConn->query($sql); +} + +// 淇敼鏈嶅姟鍣ㄥ彲鐢ㄤ綑閲 +if ($server_info['left_number'] < 1) { + echo ''; + exit; +} +$sql = "UPDATE server_list SET inuse_number=inuse_number+1,left_number=left_number-1 WHERE id='$server_id'"; +$result = $dbConn->query($sql); + +if ($result) { + echo ''; + exit; +} else { + echo ''; + exit; +} + + + + require_once "footer.php"; + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/buycart.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/buycart.php" new file mode 100644 index 0000000..fbe6ed3 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/buycart.php" @@ -0,0 +1,4 @@ +alert("璐拱灏氭湭寮濮嬶紝璇疯愬績绛夊緟銆");'; \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/clearcart.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/clearcart.php" new file mode 100644 index 0000000..8047d65 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/clearcart.php" @@ -0,0 +1,13 @@ +query($sql); + +echo ''; +header('Refresh:0.1;url=mycart.php'); +exit; \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/common.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/common.php" new file mode 100644 index 0000000..df54b6b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/common.php" @@ -0,0 +1,29 @@ +query($sql); + return $result->num_rows; +} \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/config.inc.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/config.inc.php" new file mode 100644 index 0000000..813c4da --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/config.inc.php" @@ -0,0 +1,39 @@ +set_charset("utf8mb4"); + date_default_timezone_set('Asia/Shanghai'); + + function SqlGuard($input, $db) { + if (get_magic_quotes_gpc()) { + $input = stripcslashes($input); + } + $input = strip_tags($input); + $input = $db->real_escape_string(trim($input)); + return $input; + } diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/mcshoplalalalalacaibudao.sql" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/mcshoplalalalalacaibudao.sql" new file mode 100644 index 0000000..b6be52c --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/config/mcshoplalalalalacaibudao.sql" @@ -0,0 +1,92 @@ +DROP DATABASE IF EXISTS mcshop; + +CREATE DATABASE mcshop DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +# 绠$悊鍛樿〃 +CREATE TABLE mcshop.mcshop_admin ( + id INT(10) NOT NULL AUTO_INCREMENT, + username VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + password VARCHAR(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + email VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + token VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + level VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (id) +) ENGINE = InnoDB; + +INSERT INTO mcshop.mcshop_admin (id, username, password, email, token, level) VALUES + # please change the password to your own!!! + ( # password: mcshop_admin!@# + 1,'mcshop_admin','6471ed64f102429d4bdfdcd3840645ca','mcshop_admin@hack123.xyz', + 'nUWg5R3M7IxA3lfZk4VT0cgsC9saUBBSU55YCxl3FLUr4FwQEV4Zq1mIvfQzo3DN','0'), + ( # password: mcshop_sale!@# + 2, 'mcshop_sale', '4909ccbd5734add765b4be6668f8c48c', 'mcshop_sale@hack123.xyz', + 'QaJuOdcB9xN1BFLfbk98D8jMLO7VaOZkpTyFCqrWL2nF718bp9sS4ACsh6POnhlG','1' + ); + +# 鐢ㄦ埛琛 +CREATE TABLE mcshop.mcshop_user ( + id INT(10) NOT NULL AUTO_INCREMENT, + username VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + password VARCHAR(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + email VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + token VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + bank VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + history_bank VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (id) +) ENGINE = InnoDB; + +# delete the test data when you use this sql file in product env !!! +INSERT INTO mcshop.mcshop_user VALUES ( + 1, 'test', '309031d05eb343448b725b09a3635f13','test@test.com', + '7ClEs9RBtKJEuFSrxjpSLkNAqcFPc90Bh5eTfd0aj3V8jJWmvQzKBxjT56rhYbmp', + '999999','2348' +); + +# 鏈嶅姟鍣ㄥ垪琛 +CREATE TABLE mcshop.server_list ( + id INT(10) NOT NULL AUTO_INCREMENT, + server_name VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + cpu VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + memory VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + harddisk VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + ssd VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + sum_number VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + inuse_number VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + left_number VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + price VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (id) +) ENGINE = InnoDB; + +INSERT INTO mcshop.server_list VALUES ( + 1, 'server-a', '1', '1', '1024', '0', '100', '3', '97', '10' +), ( + 2, 'server-b', '2', '2', '1024', '0', '300', '17', '283', '20' +),( + 3, 'server-c', '2', '3', '1024', '1', '300', '24', '276', '35' +),( + 4, 'server-d', '4', '4', '1024', '1', '200', '10', '190', '50' +),( + 5, 'server-e', '8', '8', '1024', '1', '70', '2', '68', '120' +),( + 6, 'server-f', '8', '16', '1024', '1', '40', '1', '39', '180' +); + +# 璐墿杞﹁〃 +CREATE TABLE mcshop.cart ( + id INT(10) NOT NULL AUTO_INCREMENT, + uid VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + username VARCHAR(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + server_id INT(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + price INT(10) COLLATE utf8mb4_general_ci NOT NULL, + cnt INT(10) COLLATE utf8mb4_general_ci NOT NULL, + sum_price INT(10) COLLATE utf8mb4_general_ci NOT NULL, + PRIMARY KEY (id) +) ENGINE = InnoDB; + +# flag琛 +CREATE TABLE mcshop.flag ( + flag VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL +) ENGINE = InnoDB; + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/fix-num.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/fix-num.php" new file mode 100644 index 0000000..1238dbd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/fix-num.php" @@ -0,0 +1,117 @@ + + +query($sql); + // 鏈夊垯娣诲姞锛屾病鏈夊氨404 + if ($result->num_rows != 1) { + // 娌℃湁 + header('Location: 404.html'); + exit; + } else { + // 鏈夎繖涓笢瑗匡紝杩涜鏁版嵁妫鏌 + if ($n <= 0) { + header('Location: 404.html'); + exit; + } + + // 鏇存柊鏈嶅姟鍣ㄤ綑閲 + // 妫鏌ヤ綑閲忔槸鍚﹀厖瓒 + $sql = "SELECT * FROM server_list WHERE id='$t'"; + $result = $dbConn->query($sql); + $server_info = $result->fetch_assoc(); + + if ($server_info['left_number'] < $n) { + echo ''; + header('Refresh:0.1;url=mycart.php'); + exit; + } + + // 鏇存柊鏈嶅姟鍣ㄤ綑閲 + $sql = "UPDATE server_list SET inuse_number=inuse_number+'$n',left_number=left_number-'$n' WHERE id='$t'"; + $result = $dbConn->query($sql); + + // 淇敼璐墿杞 + $sql = "UPDATE cart SET cnt = cnt + '$n', sum_price = sum_price + '$n'*price WHERE server_id='$t' AND uid='$uid'"; + $result = $dbConn->query($sql); + + echo ''; + echo ''; + header('Refresh:0.1;url=mycart.php'); + exit; + } + +} else if ($act == 's') { + // sub from cart + // 妫鏌ヨ喘鐗╄溅涓槸鍚︽湁杩欎釜鍟嗗搧锛岀暀鍧戯細涓嶆鏌ヨ緭鍏ユ暟鎹 + $sql = "SELECT * FROM cart WHERE uid='$uid' AND server_id='$t'"; + $result = $dbConn->query($sql); + // 鏈夊垯鍒犻櫎锛屾病鏈夊氨404 + if ($result->num_rows != 1) { + // 璐墿杞﹂噷娌℃湁 + header('Location: 404.html'); + exit; + } else { + // 璐墿杞﹂噷鏈 + // 妫鏌ユ暟鎹畬鏁存э紝鍑忔帀姣0灏忓氨404 + $row = $result->fetch_assoc(); + $oldCnt = $row['cnt']; + if ($oldCnt - $n < 0) { + header('Location: 404.html'); + exit; + } else if ($oldCnt - $n == 0) { + $sql = "DELETE FROM cart WHERE uid='$uid' AND server_id='$t'"; + $result = $dbConn->query($sql); + } else { + $n = $_GET['n']; + $pattern = '/ifnull|substr|or|and|benchmark/i'; + $n = preg_replace($pattern, 'aa', $n); + $sql = "UPDATE cart SET cnt = cnt - '$n', sum_price = sum_price - '$n'*price WHERE server_id='$t' AND uid='$uid'"; + $result = $dbConn->query($sql); + //echo mysqli_error($dbConn); + //echo '
      '.$sql; + } + + // 鏇存柊鏈嶅姟鍣ㄤ綑閲 + // t - server_id + // n - count + $n = SqlGuard($_GET['n'], $dbConn); + $sql = "UPDATE server_list SET inuse_number=inuse_number-'$n',left_number=left_number+'$n' WHERE id='$t'"; + $result = $dbConn->query($sql); + + echo ''; + header('Refresh:0.1;url=mycart.php'); + exit; + } +} else { + header('Location: 404.html'); +} +?> + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/footer.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/footer.php" new file mode 100644 index 0000000..bb4583f --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/footer.php" @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/header.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/header.php" new file mode 100644 index 0000000..998f55d --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/header.php" @@ -0,0 +1,16 @@ + + + + + + + + + + + HDUISA MC 绉熷敭涓績 + + \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/index.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/index.php" new file mode 100644 index 0000000..cd9c63e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/index.php" @@ -0,0 +1,149 @@ + + +
      +
      +
      +
      +
      + +
      +
      +

      + A濂楅 +

      +

      + 鏀寔浜烘暟锛1-5浜
      + CPU锛1鏍
      + 鍐呭瓨锛1GB
      + SSD锛氬惁
      + 浠锋牸锛10鍏/鏈 +

      +

      + 鍔犲叆璐墿杞 禄 +

      +
      +
      +

      + B濂楅 鐑攢涓 +

      +

      + 鏀寔浜烘暟锛5-10浜
      + CPU锛2鏍
      + 鍐呭瓨锛2GB
      + SSD锛氬惁
      + 浠锋牸锛20鍏/鏈 +

      +

      + 鍔犲叆璐墿杞 禄 +

      +
      +
      +

      + C濂楅 鐑攢涓 +

      +

      + 鏀寔浜烘暟锛10-15浜
      + CPU锛2鏍
      + 鍐呭瓨锛3GB
      + SSD锛氭敮鎸
      + 浠锋牸锛35鍏/鏈 +

      +

      + 鍔犲叆璐墿杞 禄 +

      +
      +
      +
      +
      +

      + D濂楅 +

      +

      + 鏀寔浜烘暟锛15-25浜
      + CPU锛4鏍
      + 鍐呭瓨锛4GB
      + SSD锛氭敮鎸
      + 浠锋牸锛50鍏/鏈 +

      +

      + 鍔犲叆璐墿杞 禄 +

      +
      +
      +

      + E濂楅 +

      +

      + 鏀寔浜烘暟锛25-50浜
      + CPU锛8鏍
      + 鍐呭瓨锛8GB
      + SSD锛氭敮鎸
      + 浠锋牸锛120鍏/鏈 +

      +

      + 鍔犲叆璐墿杞 禄 +

      +
      +
      +

      + F濂楅 +

      +

      + 鏀寔浜烘暟锛50浜轰互涓
      + CPU锛8鏍
      + 鍐呭瓨锛16GB
      + SSD锛氭敮鎸
      + 浠锋牸锛180鍏/鏈 +

      +

      + 鍔犲叆璐墿杞 禄 +

      +
      +
      +
      +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/cart.js" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/cart.js" new file mode 100644 index 0000000..33a729e --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/cart.js" @@ -0,0 +1,17 @@ +$(document).ready(function () { + console.error('寮鍙戜腑銆傘傘'); + + $('#clearcart').click(function () { + $.get('clearcart.php', function(data) { + $('#cart-result').html(data); + location.reload(true); + }); + }); + + $('#buycart').click(function () { + $.get('buycart.php', function(data) { + $('#cart-result').html(data); + location.reload(true); + }); + }); +}); \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/common.js" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/common.js" new file mode 100644 index 0000000..7ea10dd --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/js/common.js" @@ -0,0 +1,43 @@ +$(document).ready(function () { + $('#server-a').click(function () { + $.post("ajax-cart.php", {p:'a'}, function (data) { + $('#add-result').html(data); + location.reload(true); + }); + }); + + $('#server-b').click(function () { + $.post("ajax-cart.php", {p:'b'}, function (data) { + $('#add-result').html(data); + location.reload(true); + }); + }); + + $('#server-c').click(function () { + $.post("ajax-cart.php", {p:'c'}, function (data) { + $('#add-result').html(data); + location.reload(true); + }); + }); + + $('#server-d').click(function () { + $.post("ajax-cart.php", {p:'d'}, function (data) { + $('#add-result').html(data); + location.reload(true); + }); + }); + + $('#server-e').click(function () { + $.post("ajax-cart.php", {p:'e'}, function (data) { + $('#add-result').html(data); + location.reload(true); + }); + }); + + $('#server-f').click(function () { + $.post("ajax-cart.php", {p:'f'}, function (data) { + $('#add-result').html(data); + location.reload(true); + }); + }); +}); \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/login.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/login.php" new file mode 100644 index 0000000..c58cd73 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/login.php" @@ -0,0 +1,74 @@ + + +
      + +
      +
      + +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      +
      +
      +
      + + query($sql); + if ($result->num_rows == 1) { + $row = $result->fetch_assoc(); + $_SESSION['username'] = $row['username']; + $_SESSION['id'] = $row['id']; + $_SESSION['token'] = $row['token']; + $_SESSION['isLogin'] = 1; + echo '鐧诲綍鎴愬姛锛鐐规垜杩斿洖'; + } else { + echo '瀵嗙爜閿欒銆'; + exit; + } + + + ?> + + +
      +
      + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/logout.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/logout.php" new file mode 100644 index 0000000..0fab19a --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/logout.php" @@ -0,0 +1,11 @@ + + +query($sql); + if ($result->num_rows == 0) { + echo '0'; + } else { + $sum = 0; + while ($row = $result->fetch_assoc()) { + $sum = $sum + $row['sum_price']; + } + echo $sum; + } + + } +?> + +
      +
      +
      +
      +
      + + + + + + + + + + + + + + query($sql); + + while ($row = $result->fetch_assoc()) { + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + echo ''; + $server_id = $row['server_id']; + $sss["$server_id"]['count'] = $row['cnt']; + $sss["$server_id"]['sum_price'] = $row['sum_price']; + $_SESSION['cart'] = $sss; + } + #print_r($_SESSION['cart']); + + ?> + +
      + 浜у搧鍚嶇О + + 閰嶇疆 + + 鍗曚环 + + 鏁伴噺 + + 鎿嶄綔 + + 鎬讳环 +
      '.$row['server_name'].''.$row['cpu'].'鏍革紝鍐呭瓨'.$row['memory'].'GB锛孲SD锛'.($row['ssd']?'鏄':'鍚').''.$row['price'].''.$row['cnt'].'+    '; + echo '-'.$row['sum_price'].'
      + + +
      +
      +
      +
      +
      + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/pay.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/pay.php" new file mode 100644 index 0000000..07cf089 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/pay.php" @@ -0,0 +1,70 @@ + + +
      +
      +
      + +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      +
      +
      +
      + alert("浣犲拫杩樿缁欏埆浜哄厖閽便傘傘");'; + exit; + } + + $sql = "SELECT * FROM mcshop_user WHERE username = '$username'"; + $result = $dbConn->query($sql); + if ($result->num_rows != 1) { + echo ""; + exit; + } + echo ""; + exit; + } + + ?> +
      +
      + + + + diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/register.php" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/register.php" new file mode 100644 index 0000000..bb07e34 --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/register.php" @@ -0,0 +1,113 @@ +alert('鍒瘯鍟︼紒娉ㄥ唽鐪熺殑鍏抽棴浜嗭紒');"; + //echo '鍒瘯鍟︼紒娉ㄥ唽鐪熺殑鍏抽棴浜嗗晩锛'; + header("Refresh:0.1;url=index.php"); + exit; + break; + case '1': + // 杈撳嚭琛ㄥ崟 + echo <<< EOF +
      + + + + + + + + + + +
      +
      + +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      + +
      + +
      +
      +
      +
      + +
      +
      +
      +
      +
      +
      +EOF; + break; + case '2': + // array(4) { ["username"]=> string(9) "lightless" + // ["password1"]=> string(6) "111111" ["password2"]=> string(6) "111111" + // ["email"]=> string(9) "li@qq.com" } + + if (!isset($_POST['username'], $_POST['password1'], $_POST['password2'], $_POST['email'])) { + header('Location: 404.html'); + exit; + } + + if ($_POST['username'] == "" || $_POST['password1'] == "" || $_POST['password2'] == "" || $_POST['email'] == "") { + header('Location: 404.html'); + exit; + } + + echo ''; + header("Refresh:0.1;url=404.html"); + + $username = SqlGuard($_POST['username'], $dbConn); + $password1 = SqlGuard($_POST['password1'], $dbConn); + $password2 = SqlGuard($_POST['password2'], $dbConn); + $email = SqlGuard($_POST['email'], $dbConn); + + $password = md5($password1); + $token = CreateRandomString(64); + + $sql = "SELECT * FROM mcshop_user WHERE username = '$username'"; + $result = $dbConn->query($sql); + if ($result->num_rows != 0) { + exit; + } + + $sql = "INSERT INTO mcshop_user VALUES ('', '$username', '$password', '$email', '$token', '0', '0')"; + //echo $sql; + $result = $dbConn->query($sql); + + break; + + default: + header('Location: 404.html'); + exit; +} +require_once "footer.php"; \ No newline at end of file diff --git "a/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/shop.sql.bak" "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/shop.sql.bak" new file mode 100644 index 0000000..4d2223b --- /dev/null +++ "b/MC\346\234\215\345\212\241\345\231\250\347\247\237\345\224\256\344\270\255\345\277\203/shop.hack123.pw/shop.sql.bak" @@ -0,0 +1,45 @@ +DROP DATABASE IF EXISTS mcshop; + +CREATE DATABASE mcshop DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; + +# 绠$悊鍛樿〃 +CREATE TABLE mcshop.mcshop_admin ( +) ENGINE = InnoDB; + +INSERT INTO mcshop.mcshop_admin (id, username, password, email, token, level) VALUES + # please change the password to your own!!! + ( # password: mcshop_admin!@# + 1,'mcshop_admin','6471ed64f102429d4bdfdcd3840645ca','mcshop_admin@hack123.xyz', + 'nUWg5R3M7IxA3lfZk4VT0cgsC9saUBBSU55YCxl3FLUr4FwQEV4Zq1mIvfQzo3DN','0'), + ( # password: mcshop_sale!@# + 2, 'mcshop_sale', '4909ccbd5734add765b4be6668f8c48c', 'mcshop_sale@hack123.xyz', + 'QaJuOdcB9xN1BFLfbk98D8jMLO7VaOZkpTyFCqrWL2nF718bp9sS4ACsh6POnhlG','1' + ); + +# 鐢ㄦ埛琛 +CREATE TABLE mcshop.mcshop_user ( +) ENGINE = InnoDB; + +# delete the test data when you use this sql file in product env !!! +INSERT INTO mcshop.mcshop_user VALUES ( + 1, 'test', '309031d05eb343448b725b09a3635f13','test@test.com', + '7ClEs9RBtKJEuFSrxjpSLkNAqcFPc90Bh5eTfd0aj3V8jJWmvQzKBxjT56rhYbmp', + '999999','2348' +); + +# 鏈嶅姟鍣ㄥ垪琛 +CREATE TABLE mcshop.server_list ( + PRIMARY KEY (id) +) ENGINE = InnoDB; + +# 璐墿杞﹁〃 +CREATE TABLE mcshop.cart ( +) ENGINE = InnoDB; + +# flag琛 +CREATE TABLE mcshop.flag ( + flag VARCHAR(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL +) ENGINE = InnoDB; + +# 浣犱滑璋佹妸琛ㄧ粨鏋勭粰鍒犱簡锛岃佹澘鏄笉鏄綘骞茬殑锛燂紒 + diff --git a/WhatIsThis/index.html b/WhatIsThis/index.html new file mode 100644 index 0000000..2981f6b --- /dev/null +++ b/WhatIsThis/index.html @@ -0,0 +1 @@ +forbidden. diff --git a/WhatIsThis/readme.txt b/WhatIsThis/readme.txt new file mode 100644 index 0000000..9dec87f --- /dev/null +++ b/WhatIsThis/readme.txt @@ -0,0 +1,2 @@ +NES游戏,可以通过一些比较神奇的NES工具拿到flag。 +只是比较好玩。 \ No newline at end of file diff --git a/WhatIsThis/what-is-this.1d9bb46782a411bdb72ac82590539826 b/WhatIsThis/what-is-this.1d9bb46782a411bdb72ac82590539826 new file mode 100644 index 0000000000000000000000000000000000000000..d1b0942b25ac10e88f7f122727e4750de5f58391 GIT binary patch literal 131088 zcmeFaeSA|@wm-a2&Pj4w0y*Wa0Sif6s-Rv;L9{wZQ!2_h%uEY1!|2SA4uh|EhE^z` z0!f;tFVL5ig1{)!id723&`{A~w33Pz>Knm8z&iqYVW3@16PG z`8UVAqwKbbabBu`Sw)fb~;IkiT+eH_zyyDy>RoNsV*g6o{M z^FakrHxC2QlpzlI=y^son1Zeu_t|N6;PzXX&N-sS^tH>BSk{zL{XFv$X&@^T6J1?x zH!&h>`i;FSsP&z*nr6Dtp9d23jP*a0E5t#h^+&A7sVP+a@y)xc}DH!i>}V z7;Bq}Irbvso(}9dK^)Mwl@T90zLlBLV{co{ByQRLPK7JDdvAp+gqHYLW{W4-8Fve! zhSD&O{hr{)t&A_?35uB;TPUXOWkysVf0^;!+P0o~0I!WNGZ?EALLP6SwX7?zGoq?R z)y#}4V@&V4TG$yiF6(~Jsm>^>6H2nqL`{#D-R`*E@k7V29NQeGxvsX`n2nDxZIhUd zzhf{#%m>mYs5VY!Ohqo!3Rf?VvXI3wZF3mIT(7!?ZoZY`l$W`yI1! zQeSu4P2tl_(7u1YVg4ylG?V$KuaZ!GsKk-9xPpP&9#DAXf5QVRb_LP@CT8Oz1{6&} zEUCIVYesolXSy%3`4^`0vgUgMLHAif&Npy77HY)yHH>fQjIUimH4tMNk*5fDMq(K_ zDQvJxs%G<5z0mQYx*5E)sq29U#<8xT=hQgSH?S!PCH=PKw`Wr!_cZFu0 z2FGz?rw`LAbW$9ZHK>6aZlH45nV<^wkq$-pHaqNeeoZS!WUx6Ah2ETbuRO!z}BkH?VD;S2hTi z_bY_29^2Av1aih(E>6vAG#afoIRl1VLC10h#erBc!}46FBj~#wbym14=@&s+XR0JbhD;YC z!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K7YR}*xE66jawH|z4>)Q4Dq|w-D6`eS7!cuBxpu9X7M73TzsdQ3dVfmy<#g&EO zDJ7H2ix(IF5ak8x3lCfT7Sp3lmwbIPfIIIr3OV|SC}ohoQK_ikZyHgb?*&Bx#K z_l%z&zYJAKp}`dg6}_Jg=)jFO0@oZ(A^h*a>Z@cJFN zc2L0d4A4*C%lX8;_}4)sV{itcFflI4WRck=sR|!KVRD?Y%P_fJLMU9JdY|${+dUtR zeZP4tDv``4i>?D`2*?3T)6KY^^;?rg7;tM3n%Bu7xs}IX6FsrD8GDFwqi32il;DeL zfM%K_B6WZ36ywq~qkBc`bfdeWHDttl$_&E11TK{s&KY~3haK6QyJ=#Rn@g;tLT84x zAW!3KVioX>?nOdk1tg#+=B@#JlDRF_$?CJ(pMIFl8Z+|SL3gY!CoA`bL#0M4k!weS zmP1f5oVtpC6T+Kpy|hG14C<0lpLiLkOt*+-v2d=6gbyU4PlJgN8i)?cCxqhIlQ@)v z-VViCx7D7PN+)a$_`1w$aJ^@W!RoFf)Sq`Z;;KJvpbXDMjc7#au<>X_^+t_wRL)5! zm-C_MO&rGbOgB!4jNU06otj^oZse1aZaxk{t0TbYjPxT!iTt+aJMP}FZ?E!h4PJ~- cR_;(hsp8KAq`$cSq6O~S0=otl4O|@fH}KyYqyPW_ literal 0 HcmV?d00001 diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.css b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.css new file mode 100644 index 0000000..c0bba15 --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.css @@ -0,0 +1,1109 @@ +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +@-ms-viewport { + width: device-width; +} + +.hidden { + display: none; + visibility: hidden; +} + +.visible-phone { + display: none !important; +} + +.visible-tablet { + display: none !important; +} + +.hidden-desktop { + display: none !important; +} + +.visible-desktop { + display: inherit !important; +} + +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} + +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} + +.visible-print { + display: none !important; +} + +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} + +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} + +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} + +@media (max-width: 767px) { + body { + padding-right: 20px; + padding-left: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-right: -20px; + margin-left: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + width: auto; + clear: none; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + display: block; + float: none; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + right: 20px; + left: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} + +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 20px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-right: 10px; + padding-left: 10px; + } + .media .pull-left, + .media .pull-right { + display: block; + float: none; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + right: 10px; + left: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} + +@media (max-width: 979px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 20px; + } + .navbar-fixed-bottom { + margin-top: 20px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-right: 10px; + padding-left: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 10px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #777777; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #777777; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + padding: 0; + margin-top: 5px; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + display: none; + float: none; + max-width: none; + padding: 0; + margin: 0 15px; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 10px 15px; + margin: 10px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + height: 0; + overflow: hidden; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-right: 10px; + padding-left: 10px; + } +} + +@media (min-width: 980px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.min.css b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.min.css new file mode 100644 index 0000000..96a435b --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap-responsive.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap Responsive v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.css b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.css new file mode 100644 index 0000000..5b7fe7e --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.css @@ -0,0 +1,6167 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +audio:not([controls]) { + display: none; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +a:hover, +a:active { + outline: 0; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + width: auto\9; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +#map_canvas img, +.google-maps img { + max-width: none; +} + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} + +button, +input { + *overflow: visible; + line-height: normal; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} + +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} + +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; +} + +a { + color: #0088cc; + text-decoration: none; +} + +a:hover, +a:focus { + color: #005580; + text-decoration: underline; +} + +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} + +.row { + margin-left: -20px; + *zoom: 1; +} + +.row:before, +.row:after { + display: table; + line-height: 0; + content: ""; +} + +.row:after { + clear: both; +} + +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} + +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.span12 { + width: 940px; +} + +.span11 { + width: 860px; +} + +.span10 { + width: 780px; +} + +.span9 { + width: 700px; +} + +.span8 { + width: 620px; +} + +.span7 { + width: 540px; +} + +.span6 { + width: 460px; +} + +.span5 { + width: 380px; +} + +.span4 { + width: 300px; +} + +.span3 { + width: 220px; +} + +.span2 { + width: 140px; +} + +.span1 { + width: 60px; +} + +.offset12 { + margin-left: 980px; +} + +.offset11 { + margin-left: 900px; +} + +.offset10 { + margin-left: 820px; +} + +.offset9 { + margin-left: 740px; +} + +.offset8 { + margin-left: 660px; +} + +.offset7 { + margin-left: 580px; +} + +.offset6 { + margin-left: 500px; +} + +.offset5 { + margin-left: 420px; +} + +.offset4 { + margin-left: 340px; +} + +.offset3 { + margin-left: 260px; +} + +.offset2 { + margin-left: 180px; +} + +.offset1 { + margin-left: 100px; +} + +.row-fluid { + width: 100%; + *zoom: 1; +} + +.row-fluid:before, +.row-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.row-fluid:after { + clear: both; +} + +.row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} + +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} + +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} + +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} + +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} + +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} + +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} + +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} + +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} + +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} + +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} + +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} + +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} + +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} + +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} + +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} + +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} + +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} + +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} + +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} + +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} + +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} + +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} + +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} + +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} + +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} + +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} + +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} + +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} + +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} + +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} + +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} + +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} + +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} + +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} + +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} + +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} + +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} + +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} + +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} + +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} + +.container:before, +.container:after { + display: table; + line-height: 0; + content: ""; +} + +.container:after { + clear: both; +} + +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} + +.container-fluid:before, +.container-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.container-fluid:after { + clear: both; +} + +p { + margin: 0 0 10px; +} + +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; +} + +small { + font-size: 85%; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +cite { + font-style: normal; +} + +.muted { + color: #999999; +} + +a.muted:hover, +a.muted:focus { + color: #808080; +} + +.text-warning { + color: #c09853; +} + +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} + +.text-error { + color: #b94a48; +} + +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} + +.text-info { + color: #3a87ad; +} + +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} + +.text-success { + color: #468847; +} + +a.text-success:hover, +a.text-success:focus { + color: #356635; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: inherit; + font-weight: bold; + line-height: 20px; + color: inherit; + text-rendering: optimizelegibility; +} + +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} + +h1, +h2, +h3 { + line-height: 40px; +} + +h1 { + font-size: 38.5px; +} + +h2 { + font-size: 31.5px; +} + +h3 { + font-size: 24.5px; +} + +h4 { + font-size: 17.5px; +} + +h5 { + font-size: 14px; +} + +h6 { + font-size: 11.9px; +} + +h1 small { + font-size: 24.5px; +} + +h2 small { + font-size: 17.5px; +} + +h3 small { + font-size: 14px; +} + +h4 small { + font-size: 14px; +} + +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #eeeeee; +} + +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} + +li { + line-height: 20px; +} + +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} + +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} + +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + padding-right: 5px; + padding-left: 5px; + *zoom: 1; +} + +dl { + margin-bottom: 20px; +} + +dt, +dd { + line-height: 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 10px; +} + +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + +.dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dl-horizontal dd { + margin-left: 180px; +} + +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} + +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} + +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} + +blockquote p { + margin-bottom: 0; + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +blockquote small { + display: block; + line-height: 20px; + color: #999999; +} + +blockquote small:before { + content: '\2014 \00A0'; +} + +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} + +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} + +blockquote.pull-right small:before { + content: ''; +} + +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} + +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} + +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +code { + padding: 2px 4px; + color: #d14; + white-space: nowrap; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +pre.prettyprint { + margin-bottom: 20px; +} + +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +form { + margin: 0 0 20px; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} + +legend small { + font-size: 15px; + color: #999999; +} + +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} + +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +label { + display: block; + margin-bottom: 5px; +} + +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +input, +textarea, +.uneditable-input { + width: 206px; +} + +textarea { + height: auto; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + *margin-top: 0; + line-height: normal; +} + +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} + +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} + +select { + width: 220px; + background-color: #ffffff; + border: 1px solid #cccccc; +} + +select[multiple], +select[size] { + height: auto; +} + +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.uneditable-input, +.uneditable-textarea { + color: #999999; + cursor: not-allowed; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); +} + +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} + +.uneditable-textarea { + width: auto; + height: auto; +} + +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} + +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} + +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} + +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} + +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} + +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} + +.input-mini { + width: 60px; +} + +.input-small { + width: 90px; +} + +.input-medium { + width: 150px; +} + +.input-large { + width: 210px; +} + +.input-xlarge { + width: 270px; +} + +.input-xxlarge { + width: 530px; +} + +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} + +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} + +input, +textarea, +.uneditable-input { + margin-left: 0; +} + +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} + +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} + +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} + +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} + +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} + +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} + +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} + +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} + +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} + +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} + +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} + +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} + +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} + +.controls-row { + *zoom: 1; +} + +.controls-row:before, +.controls-row:after { + display: table; + line-height: 0; + content: ""; +} + +.controls-row:after { + clear: both; +} + +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} + +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} + +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} + +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} + +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} + +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} + +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} + +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} + +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} + +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} + +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} + +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} + +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} + +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} + +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} + +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} + +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} + +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} + +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} + +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} + +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} + +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} + +.form-actions:before, +.form-actions:after { + display: table; + line-height: 0; + content: ""; +} + +.form-actions:after { + clear: both; +} + +.help-block, +.help-inline { + color: #595959; +} + +.help-block { + display: block; + margin-bottom: 10px; +} + +.help-inline { + display: inline-block; + *display: inline; + padding-left: 5px; + vertical-align: middle; + *zoom: 1; +} + +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 10px; + font-size: 0; + white-space: nowrap; + vertical-align: middle; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 14px; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} + +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} + +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} + +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} + +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} + +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} + +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +/* Allow for input prepend/append in search forms */ + +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + margin-bottom: 0; + vertical-align: middle; + *zoom: 1; +} + +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} + +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} + +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} + +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} + +.control-group { + margin-bottom: 10px; +} + +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} + +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} + +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + line-height: 0; + content: ""; +} + +.form-horizontal .control-group:after { + clear: both; +} + +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} + +.form-horizontal .controls:first-child { + *padding-left: 180px; +} + +.form-horizontal .help-block { + margin-bottom: 0; +} + +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 10px; +} + +.form-horizontal .form-actions { + padding-left: 180px; +} + +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} + +.table { + width: 100%; + margin-bottom: 20px; +} + +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} + +.table th { + font-weight: bold; +} + +.table thead th { + vertical-align: bottom; +} + +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} + +.table tbody + tbody { + border-top: 2px solid #dddddd; +} + +.table .table { + background-color: #ffffff; +} + +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} + +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} + +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} + +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; +} + +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} + +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} + +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} + +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} + +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} + +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} + +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} + +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} + +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} + +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} + +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} + +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} + +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} + +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} + +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} + +.table tbody tr.success > td { + background-color: #dff0d8; +} + +.table tbody tr.error > td { + background-color: #f2dede; +} + +.table tbody tr.warning > td { + background-color: #fcf8e3; +} + +.table tbody tr.info > td { + background-color: #d9edf7; +} + +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} + +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} + +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} + +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} + +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; +} + +/* White icons with optional class, or on hover/focus/active states of certain elements */ + +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} + +.icon-glass { + background-position: 0 0; +} + +.icon-music { + background-position: -24px 0; +} + +.icon-search { + background-position: -48px 0; +} + +.icon-envelope { + background-position: -72px 0; +} + +.icon-heart { + background-position: -96px 0; +} + +.icon-star { + background-position: -120px 0; +} + +.icon-star-empty { + background-position: -144px 0; +} + +.icon-user { + background-position: -168px 0; +} + +.icon-film { + background-position: -192px 0; +} + +.icon-th-large { + background-position: -216px 0; +} + +.icon-th { + background-position: -240px 0; +} + +.icon-th-list { + background-position: -264px 0; +} + +.icon-ok { + background-position: -288px 0; +} + +.icon-remove { + background-position: -312px 0; +} + +.icon-zoom-in { + background-position: -336px 0; +} + +.icon-zoom-out { + background-position: -360px 0; +} + +.icon-off { + background-position: -384px 0; +} + +.icon-signal { + background-position: -408px 0; +} + +.icon-cog { + background-position: -432px 0; +} + +.icon-trash { + background-position: -456px 0; +} + +.icon-home { + background-position: 0 -24px; +} + +.icon-file { + background-position: -24px -24px; +} + +.icon-time { + background-position: -48px -24px; +} + +.icon-road { + background-position: -72px -24px; +} + +.icon-download-alt { + background-position: -96px -24px; +} + +.icon-download { + background-position: -120px -24px; +} + +.icon-upload { + background-position: -144px -24px; +} + +.icon-inbox { + background-position: -168px -24px; +} + +.icon-play-circle { + background-position: -192px -24px; +} + +.icon-repeat { + background-position: -216px -24px; +} + +.icon-refresh { + background-position: -240px -24px; +} + +.icon-list-alt { + background-position: -264px -24px; +} + +.icon-lock { + background-position: -287px -24px; +} + +.icon-flag { + background-position: -312px -24px; +} + +.icon-headphones { + background-position: -336px -24px; +} + +.icon-volume-off { + background-position: -360px -24px; +} + +.icon-volume-down { + background-position: -384px -24px; +} + +.icon-volume-up { + background-position: -408px -24px; +} + +.icon-qrcode { + background-position: -432px -24px; +} + +.icon-barcode { + background-position: -456px -24px; +} + +.icon-tag { + background-position: 0 -48px; +} + +.icon-tags { + background-position: -25px -48px; +} + +.icon-book { + background-position: -48px -48px; +} + +.icon-bookmark { + background-position: -72px -48px; +} + +.icon-print { + background-position: -96px -48px; +} + +.icon-camera { + background-position: -120px -48px; +} + +.icon-font { + background-position: -144px -48px; +} + +.icon-bold { + background-position: -167px -48px; +} + +.icon-italic { + background-position: -192px -48px; +} + +.icon-text-height { + background-position: -216px -48px; +} + +.icon-text-width { + background-position: -240px -48px; +} + +.icon-align-left { + background-position: -264px -48px; +} + +.icon-align-center { + background-position: -288px -48px; +} + +.icon-align-right { + background-position: -312px -48px; +} + +.icon-align-justify { + background-position: -336px -48px; +} + +.icon-list { + background-position: -360px -48px; +} + +.icon-indent-left { + background-position: -384px -48px; +} + +.icon-indent-right { + background-position: -408px -48px; +} + +.icon-facetime-video { + background-position: -432px -48px; +} + +.icon-picture { + background-position: -456px -48px; +} + +.icon-pencil { + background-position: 0 -72px; +} + +.icon-map-marker { + background-position: -24px -72px; +} + +.icon-adjust { + background-position: -48px -72px; +} + +.icon-tint { + background-position: -72px -72px; +} + +.icon-edit { + background-position: -96px -72px; +} + +.icon-share { + background-position: -120px -72px; +} + +.icon-check { + background-position: -144px -72px; +} + +.icon-move { + background-position: -168px -72px; +} + +.icon-step-backward { + background-position: -192px -72px; +} + +.icon-fast-backward { + background-position: -216px -72px; +} + +.icon-backward { + background-position: -240px -72px; +} + +.icon-play { + background-position: -264px -72px; +} + +.icon-pause { + background-position: -288px -72px; +} + +.icon-stop { + background-position: -312px -72px; +} + +.icon-forward { + background-position: -336px -72px; +} + +.icon-fast-forward { + background-position: -360px -72px; +} + +.icon-step-forward { + background-position: -384px -72px; +} + +.icon-eject { + background-position: -408px -72px; +} + +.icon-chevron-left { + background-position: -432px -72px; +} + +.icon-chevron-right { + background-position: -456px -72px; +} + +.icon-plus-sign { + background-position: 0 -96px; +} + +.icon-minus-sign { + background-position: -24px -96px; +} + +.icon-remove-sign { + background-position: -48px -96px; +} + +.icon-ok-sign { + background-position: -72px -96px; +} + +.icon-question-sign { + background-position: -96px -96px; +} + +.icon-info-sign { + background-position: -120px -96px; +} + +.icon-screenshot { + background-position: -144px -96px; +} + +.icon-remove-circle { + background-position: -168px -96px; +} + +.icon-ok-circle { + background-position: -192px -96px; +} + +.icon-ban-circle { + background-position: -216px -96px; +} + +.icon-arrow-left { + background-position: -240px -96px; +} + +.icon-arrow-right { + background-position: -264px -96px; +} + +.icon-arrow-up { + background-position: -289px -96px; +} + +.icon-arrow-down { + background-position: -312px -96px; +} + +.icon-share-alt { + background-position: -336px -96px; +} + +.icon-resize-full { + background-position: -360px -96px; +} + +.icon-resize-small { + background-position: -384px -96px; +} + +.icon-plus { + background-position: -408px -96px; +} + +.icon-minus { + background-position: -433px -96px; +} + +.icon-asterisk { + background-position: -456px -96px; +} + +.icon-exclamation-sign { + background-position: 0 -120px; +} + +.icon-gift { + background-position: -24px -120px; +} + +.icon-leaf { + background-position: -48px -120px; +} + +.icon-fire { + background-position: -72px -120px; +} + +.icon-eye-open { + background-position: -96px -120px; +} + +.icon-eye-close { + background-position: -120px -120px; +} + +.icon-warning-sign { + background-position: -144px -120px; +} + +.icon-plane { + background-position: -168px -120px; +} + +.icon-calendar { + background-position: -192px -120px; +} + +.icon-random { + width: 16px; + background-position: -216px -120px; +} + +.icon-comment { + background-position: -240px -120px; +} + +.icon-magnet { + background-position: -264px -120px; +} + +.icon-chevron-up { + background-position: -288px -120px; +} + +.icon-chevron-down { + background-position: -313px -119px; +} + +.icon-retweet { + background-position: -336px -120px; +} + +.icon-shopping-cart { + background-position: -360px -120px; +} + +.icon-folder-close { + width: 16px; + background-position: -384px -120px; +} + +.icon-folder-open { + width: 16px; + background-position: -408px -120px; +} + +.icon-resize-vertical { + background-position: -432px -119px; +} + +.icon-resize-horizontal { + background-position: -456px -118px; +} + +.icon-hdd { + background-position: 0 -144px; +} + +.icon-bullhorn { + background-position: -24px -144px; +} + +.icon-bell { + background-position: -48px -144px; +} + +.icon-certificate { + background-position: -72px -144px; +} + +.icon-thumbs-up { + background-position: -96px -144px; +} + +.icon-thumbs-down { + background-position: -120px -144px; +} + +.icon-hand-right { + background-position: -144px -144px; +} + +.icon-hand-left { + background-position: -168px -144px; +} + +.icon-hand-up { + background-position: -192px -144px; +} + +.icon-hand-down { + background-position: -216px -144px; +} + +.icon-circle-arrow-right { + background-position: -240px -144px; +} + +.icon-circle-arrow-left { + background-position: -264px -144px; +} + +.icon-circle-arrow-up { + background-position: -288px -144px; +} + +.icon-circle-arrow-down { + background-position: -312px -144px; +} + +.icon-globe { + background-position: -336px -144px; +} + +.icon-wrench { + background-position: -360px -144px; +} + +.icon-tasks { + background-position: -384px -144px; +} + +.icon-filter { + background-position: -408px -144px; +} + +.icon-briefcase { + background-position: -432px -144px; +} + +.icon-fullscreen { + background-position: -456px -144px; +} + +.dropup, +.dropdown { + position: relative; +} + +.dropdown-toggle { + *margin-bottom: -3px; +} + +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} + +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + outline: 0; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} + +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.open { + *z-index: 1000; +} + +.open > .dropdown-menu { + display: block; +} + +.dropdown-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 990; +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + +.dropdown-submenu > a:after { + display: block; + float: right; + width: 0; + height: 0; + margin-top: 5px; + margin-right: -10px; + border-color: transparent; + border-left-color: #cccccc; + border-style: solid; + border-width: 5px 0 5px 5px; + content: " "; +} + +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.dropdown .dropdown-menu .nav-header { + padding-right: 20px; + padding-left: 20px; +} + +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} + +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} + +.fade.in { + opacity: 1; +} + +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} + +.collapse.in { + height: auto; +} + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} + +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.btn { + display: inline-block; + *display: inline; + padding: 4px 12px; + margin-bottom: 0; + *margin-left: .3em; + font-size: 14px; + line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + *background-color: #e6e6e6; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #cccccc; + *border: 0; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-bottom-color: #b3b3b3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} + +.btn:active, +.btn.active { + background-color: #cccccc \9; +} + +.btn:first-child { + *margin-left: 0; +} + +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} + +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-large { + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} + +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} + +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} + +.btn-mini { + padding: 0 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} + +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #006dcc; + *background-color: #0044cc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} + +.btn-primary:active, +.btn-primary.active { + background-color: #003399 \9; +} + +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + *background-color: #f89406; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} + +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} + +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + *background-color: #bd362f; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-repeat: repeat-x; + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} + +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} + +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + *background-color: #51a351; + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-repeat: repeat-x; + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} + +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} + +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #49afcd; + *background-color: #2f96b4; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-repeat: repeat-x; + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} + +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} + +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #363636; + *background-color: #222222; + background-image: -moz-linear-gradient(top, #444444, #222222); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); + background-image: -webkit-linear-gradient(top, #444444, #222222); + background-image: -o-linear-gradient(top, #444444, #222222); + background-image: linear-gradient(to bottom, #444444, #222222); + background-repeat: repeat-x; + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} + +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} + +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} + +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} + +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} + +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-link { + color: #0088cc; + cursor: pointer; + border-color: transparent; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-link:hover, +.btn-link:focus { + color: #005580; + text-decoration: underline; + background-color: transparent; +} + +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} + +.btn-group { + position: relative; + display: inline-block; + *display: inline; + *margin-left: .3em; + font-size: 0; + white-space: nowrap; + vertical-align: middle; + *zoom: 1; +} + +.btn-group:first-child { + *margin-left: 0; +} + +.btn-group + .btn-group { + margin-left: 5px; +} + +.btn-toolbar { + margin-top: 10px; + margin-bottom: 10px; + font-size: 0; +} + +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} + +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group > .btn + .btn { + margin-left: -1px; +} + +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 14px; +} + +.btn-group > .btn-mini { + font-size: 10.5px; +} + +.btn-group > .btn-small { + font-size: 11.9px; +} + +.btn-group > .btn-large { + font-size: 17.5px; +} + +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + +.btn-group > .btn + .dropdown-toggle { + *padding-top: 5px; + padding-right: 8px; + *padding-bottom: 5px; + padding-left: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group > .btn-mini + .dropdown-toggle { + *padding-top: 2px; + padding-right: 5px; + *padding-bottom: 2px; + padding-left: 5px; +} + +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} + +.btn-group > .btn-large + .dropdown-toggle { + *padding-top: 7px; + padding-right: 12px; + *padding-bottom: 7px; + padding-left: 12px; +} + +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} + +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #0044cc; +} + +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} + +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} + +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} + +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} + +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} + +.btn .caret { + margin-top: 8px; + margin-left: 0; +} + +.btn-large .caret { + margin-top: 6px; +} + +.btn-large .caret { + border-top-width: 5px; + border-right-width: 5px; + border-left-width: 5px; +} + +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} + +.dropup .btn-large .caret { + border-bottom-width: 5px; +} + +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} + +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group-vertical > .btn + .btn { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} + +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.alert, +.alert h4 { + color: #c09853; +} + +.alert h4 { + margin: 0; +} + +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; +} + +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-success h4 { + color: #468847; +} + +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-info h4 { + color: #3a87ad; +} + +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} + +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} + +.alert-block p + p { + margin-top: 5px; +} + +.nav { + margin-bottom: 20px; + margin-left: 0; + list-style: none; +} + +.nav > li > a { + display: block; +} + +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} + +.nav > li > a > img { + max-width: none; +} + +.nav > .pull-right { + float: right; +} + +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} + +.nav li + .nav-header { + margin-top: 9px; +} + +.nav-list { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 0; +} + +.nav-list > li > a, +.nav-list .nav-header { + margin-right: -15px; + margin-left: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} + +.nav-list > li > a { + padding: 3px 15px; +} + +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #0088cc; +} + +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} + +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.nav-tabs, +.nav-pills { + *zoom: 1; +} + +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + line-height: 0; + content: ""; +} + +.nav-tabs:after, +.nav-pills:after { + clear: both; +} + +.nav-tabs > li, +.nav-pills > li { + float: left; +} + +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} + +.nav-tabs { + border-bottom: 1px solid #ddd; +} + +.nav-tabs > li { + margin-bottom: -1px; +} + +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} + +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + cursor: default; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #0088cc; +} + +.nav-stacked > li { + float: none; +} + +.nav-stacked > li > a { + margin-right: 0; +} + +.nav-tabs.nav-stacked { + border-bottom: 0; +} + +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; +} + +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + z-index: 2; + border-color: #ddd; +} + +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} + +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} + +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.nav .dropdown-toggle .caret { + margin-top: 6px; + border-top-color: #0088cc; + border-bottom-color: #0088cc; +} + +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #005580; + border-bottom-color: #005580; +} + +/* move down carets for tabs */ + +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} + +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} + +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} + +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} + +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} + +.tabbable { + *zoom: 1; +} + +.tabbable:before, +.tabbable:after { + display: table; + line-height: 0; + content: ""; +} + +.tabbable:after { + clear: both; +} + +.tab-content { + overflow: auto; +} + +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} + +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} + +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-top-color: #ddd; + border-bottom-color: transparent; +} + +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} + +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} + +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} + +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} + +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} + +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} + +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} + +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} + +.nav > .disabled > a { + color: #999999; +} + +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; +} + +.navbar { + *position: relative; + *z-index: 2; + margin-bottom: 20px; + overflow: visible; +} + +.navbar-inner { + min-height: 40px; + padding-right: 20px; + padding-left: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + border: 1px solid #d4d4d4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + *zoom: 1; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); +} + +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + +.navbar .container { + width: auto; +} + +.nav-collapse.collapse { + height: auto; + overflow: visible; +} + +.navbar .brand { + display: block; + float: left; + padding: 10px 20px 10px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #777777; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} + +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #777777; +} + +.navbar-link { + color: #777777; +} + +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} + +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-right: 1px solid #ffffff; + border-left: 1px solid #f2f2f2; +} + +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} + +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} + +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} + +.navbar-form:before, +.navbar-form:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-form:after { + clear: both; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} + +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} + +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} + +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} + +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} + +.navbar-search .search-query { + padding: 4px 14px; + margin-bottom: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.navbar-static-top { + position: static; + margin-bottom: 0; +} + +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} + +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-right: 0; + padding-left: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.navbar-fixed-top { + top: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar-fixed-bottom { + bottom: 0; +} + +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} + +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} + +.navbar .nav > li { + float: left; +} + +.navbar .nav > li > a { + float: none; + padding: 10px 15px 10px; + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} + +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + color: #333333; + text-decoration: none; + background-color: transparent; +} + +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} + +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-right: 5px; + margin-left: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + *background-color: #e5e5e5; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); +} + +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} + +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} + +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} + +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} + +.navbar .nav > li > .dropdown-menu:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.navbar .nav > li > .dropdown-menu:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-left: 6px solid transparent; + content: ''; +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + top: auto; + bottom: -7px; + border-top: 7px solid #ccc; + border-bottom: 0; + border-top-color: rgba(0, 0, 0, 0.2); +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + top: auto; + bottom: -6px; + border-top: 6px solid #ffffff; + border-bottom: 0; +} + +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + color: #555555; + background-color: #e5e5e5; +} + +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + right: 12px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + right: 13px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + right: 100%; + left: auto; + margin-right: -1px; + margin-left: 0; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + border-color: #252525; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); +} + +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} + +.navbar-inverse .brand { + color: #999999; +} + +.navbar-inverse .navbar-text { + color: #999999; +} + +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; + background-color: transparent; +} + +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .navbar-link { + color: #999999; +} + +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} + +.navbar-inverse .divider-vertical { + border-right-color: #222222; + border-left-color: #111111; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + outline: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} + +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + *background-color: #040404; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} + +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} + +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.breadcrumb > li { + display: inline-block; + *display: inline; + text-shadow: 0 1px 0 #ffffff; + *zoom: 1; +} + +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} + +.breadcrumb > .active { + color: #999999; +} + +.pagination { + margin: 20px 0; +} + +.pagination ul { + display: inline-block; + *display: inline; + margin-bottom: 0; + margin-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + *zoom: 1; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.pagination ul > li { + display: inline; +} + +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 20px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} + +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} + +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} + +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + cursor: default; + background-color: transparent; +} + +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.pagination-centered { + text-align: center; +} + +.pagination-right { + text-align: right; +} + +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} + +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; +} + +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; +} + +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} + +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0 6px; + font-size: 10.5px; +} + +.pager { + margin: 20px 0; + text-align: center; + list-style: none; + *zoom: 1; +} + +.pager:before, +.pager:after { + display: table; + line-height: 0; + content: ""; +} + +.pager:after { + clear: both; +} + +.pager li { + display: inline; +} + +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} + +.pager .next > a, +.pager .next > span { + float: right; +} + +.pager .previous > a, +.pager .previous > span { + float: left; +} + +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + cursor: default; + background-color: #fff; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} + +.modal-backdrop.fade { + opacity: 0; +} + +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} + +.modal.fade { + top: -25%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out; +} + +.modal.fade.in { + top: 10%; +} + +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} + +.modal-header .close { + margin-top: 2px; +} + +.modal-header h3 { + margin: 0; + line-height: 30px; +} + +.modal-body { + position: relative; + max-height: 400px; + padding: 15px; + overflow-y: auto; +} + +.modal-form { + margin-bottom: 0; +} + +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + line-height: 0; + content: ""; +} + +.modal-footer:after { + clear: both; +} + +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} + +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} + +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} + +.tooltip { + position: absolute; + z-index: 1030; + display: block; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); + visibility: visible; +} + +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} + +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} + +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} + +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} + +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #000000; + border-width: 5px 5px 5px 0; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #000000; + border-width: 5px 0 5px 5px; +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.popover.top { + margin-top: -10px; +} + +.popover.right { + margin-left: 10px; +} + +.popover.bottom { + margin-top: 10px; +} + +.popover.left { + margin-left: -10px; +} + +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} + +.popover-title:empty { + display: none; +} + +.popover-content { + padding: 9px 14px; +} + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover .arrow { + border-width: 11px; +} + +.popover .arrow:after { + border-width: 10px; + content: ""; +} + +.popover.top .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; +} + +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-top-color: #ffffff; + border-bottom-width: 0; +} + +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); + border-left-width: 0; +} + +.popover.right .arrow:after { + bottom: -10px; + left: 1px; + border-right-color: #ffffff; + border-left-width: 0; +} + +.popover.bottom .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-top-width: 0; +} + +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-bottom-color: #ffffff; + border-top-width: 0; +} + +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); + border-right-width: 0; +} + +.popover.left .arrow:after { + right: 1px; + bottom: -10px; + border-left-color: #ffffff; + border-right-width: 0; +} + +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} + +.thumbnails:before, +.thumbnails:after { + display: table; + line-height: 0; + content: ""; +} + +.thumbnails:after { + clear: both; +} + +.row-fluid .thumbnails { + margin-left: 0; +} + +.thumbnails > li { + float: left; + margin-bottom: 20px; + margin-left: 20px; +} + +.thumbnail { + display: block; + padding: 4px; + line-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #0088cc; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} + +.thumbnail > img { + display: block; + max-width: 100%; + margin-right: auto; + margin-left: auto; +} + +.thumbnail .caption { + padding: 9px; + color: #555555; +} + +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media > .pull-left { + margin-right: 10px; +} + +.media > .pull-right { + margin-left: 10px; +} + +.media-list { + margin-left: 0; + list-style: none; +} + +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + white-space: nowrap; + vertical-align: baseline; + background-color: #999999; +} + +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.badge { + padding-right: 9px; + padding-left: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} + +.label:empty, +.badge:empty { + display: none; +} + +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.label-important, +.badge-important { + background-color: #b94a48; +} + +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} + +.label-warning, +.badge-warning { + background-color: #f89406; +} + +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} + +.label-success, +.badge-success { + background-color: #468847; +} + +.label-success[href], +.badge-success[href] { + background-color: #356635; +} + +.label-info, +.badge-info { + background-color: #3a87ad; +} + +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} + +.label-inverse, +.badge-inverse { + background-color: #333333; +} + +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} + +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} + +.btn-mini .label, +.btn-mini .badge { + top: 0; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} + +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} + +.progress .bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + color: #ffffff; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} + +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); +} + +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} + +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} + +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} + +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} + +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} + +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.accordion { + margin-bottom: 20px; +} + +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.accordion-heading { + border-bottom: 0; +} + +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} + +.accordion-toggle { + cursor: pointer; +} + +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} + +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} + +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} + +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} + +.carousel-inner > .active { + left: 0; +} + +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} + +.carousel-inner > .next { + left: 100%; +} + +.carousel-inner > .prev { + left: -100%; +} + +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} + +.carousel-inner > .active.left { + left: -100%; +} + +.carousel-inner > .active.right { + left: 100%; +} + +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.carousel-control.right { + right: 15px; + left: auto; +} + +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} + +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} + +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} + +.carousel-indicators .active { + background-color: #fff; +} + +.carousel-caption { + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} + +.carousel-caption h4, +.carousel-caption p { + line-height: 20px; + color: #ffffff; +} + +.carousel-caption h4 { + margin: 0 0 5px; +} + +.carousel-caption p { + margin-bottom: 0; +} + +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + letter-spacing: -1px; + color: inherit; +} + +.hero-unit li { + line-height: 30px; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.hide { + display: none; +} + +.show { + display: block; +} + +.invisible { + visibility: hidden; +} + +.affix { + position: fixed; +} diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.min.css b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.min.css new file mode 100644 index 0000000..df96c86 --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.3.2 + * + * Copyright 2013 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.dropdown-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:990}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/download.php b/fuckphp/92169de79037c2de72f5088bf1e8310a/download.php new file mode 100644 index 0000000..5bf88b8 --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/download.php @@ -0,0 +1,33 @@ + diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/flag.php b/fuckphp/92169de79037c2de72f5088bf1e8310a/flag.php new file mode 100644 index 0000000..d0bcf36 --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/flag.php @@ -0,0 +1,5 @@ + \ No newline at end of file diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/flagflagflaggogogo.php b/fuckphp/92169de79037c2de72f5088bf1e8310a/flagflagflaggogogo.php new file mode 100644 index 0000000..71f750d --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/flagflagflaggogogo.php @@ -0,0 +1,101 @@ + + array_map("getArrayLength", array($arrUsername, $arrPassword))[1] ? + array_map("getArrayLength", array($arrUsername, $arrPassword))[0] : + array_map("getArrayLength", array($arrUsername, $arrPassword))[1]; + }; + + $getStrLen = function ($arg) { + return is_array($arg) ? exit : strlen($arg); + }; + + $checkStrLen = function ($arg) use ($getStrLen) { + return $getStrLen($arg) == 4 ? true : false; + }; + + $checkStrValid = function ($username, $password) use ($checkStrLen) { + foreach (array_map($checkStrLen, array($username, $password)) as $key => $value) { + if (!$value) { + exit; + } + } + }; + + $getXorStr = function ($arg1, $arg2) { + $xoredStr = ''; + for ($i=0; $i < strlen($arg1); $i++) { + $xoredStr .= $arg1[$i] ^ $arg2[$i]; + } + return $xoredStr; + }; + + $cnt = 0; + $serialNumber = ''; + while ($cnt < $getMinCount()) { + $strUsername = $arrUsername[$cnt]; + $strPassword = $arrPassword[$cnt]; + $checkStrValid($strUsername, $strPassword); + $serialNumber .= $getXorStr($strUsername, $strPassword); + $cnt++; + } + + if ($serialNumber === 'ILoveAklisheheha') { + $target1 = true; + } + }; + + $checkTarget1(); + + if ($target1 && $target2) { + $flag = $getFlag($flag, $cbc_key, $cbc_iv); + $echoFlag($flag); + $echoFlag($cbc_iv); + $echoFlag($cbc_key); + } +?> diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/img/glyphicons-halflings-white.png b/fuckphp/92169de79037c2de72f5088bf1e8310a/img/glyphicons-halflings-white.png new file mode 100644 index 0000000000000000000000000000000000000000..3bf6484a29d8da269f9bc874b25493a45fae3bae GIT binary patch literal 8777 zcmZvC1yGz#v+m*$LXcp=A$ZWB0fL7wNbp_U*$~{_gL`my3oP#L!5tQYy99Ta`+g_q zKlj|KJ2f@c)ARJx{q*bbkhN_!|Wn*Vos8{TEhUT@5e;_WJsIMMcG5%>DiS&dv_N`4@J0cnAQ-#>RjZ z00W5t&tJ^l-QC*ST1-p~00u^9XJ=AUl7oW-;2a+x2k__T=grN{+1c4XK0ZL~^z^i$ zp&>vEhr@4fZWb380S18T&!0cQ3IKpHF)?v=b_NIm0Q>vwY7D0baZ)n z31Fa5sELUQARIVaU0nqf0XzT+fB_63aA;@<$l~wse|mcA;^G1TmX?-)e)jkGPfkuA z92@|!<>h5S_4f8QP-JRq>d&7)^Yin8l7K8gED$&_FaV?gY+wLjpoW%~7NDe=nHfMG z5DO3j{R9kv5GbssrUpO)OyvVrlx>u0UKD0i;Dpm5S5dY16(DL5l{ixz|mhJU@&-OWCTb7_%}8-fE(P~+XIRO zJU|wp1|S>|J3KrLcz^+v1f&BDpd>&MAaibR4#5A_4(MucZwG9E1h4@u0P@C8;oo+g zIVj7kfJi{oV~E(NZ*h(@^-(Q(C`Psb3KZ{N;^GB(a8NE*Vwc715!9 zr-H4Ao|T_c6+VT_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=6Q0}zaubkDn)(lTax0+!+%B}9Vqw6{H zvL|BRM`O<@;eVi1DzM!tXtBrA20Ce@^Jz|>%X-t`vi-%WweXCh_LhI#bUg2*pcP~R z*RuTUzBKLXO~~uMd&o$v3@d0shHfUjC6c539PE6rF&;Ufa(Rw@K1*m7?f5)t`MjH0 z)_V(cajV5Am>f!kWcI@5rE8t6$S>5M=k=aRZROH6fA^jJp~2NlR4;Q2>L$7F#RT#9 z>4@1RhWG`Khy>P2j1Yx^BBL{S`niMaxlSWV-JBU0-T9zZ%>7mR3l$~QV$({o0;jTI ze5=cN^!Bc2bT|BcojXp~K#2cM>OTe*cM{Kg-j*CkiW)EGQot^}s;cy8_1_@JA0Whq zlrNr+R;Efa+`6N)s5rH*|E)nYZ3uqkk2C(E7@A|3YI`ozP~9Lexx#*1(r8luq+YPk z{J}c$s` zPM35Fx(YWB3Z5IYnN+L_4|jaR(5iWJi2~l&xy}aU7kW?o-V*6Av2wyZTG!E2KSW2* zGRLQkQU;Oz##ie-Z4fI)WSRxn$(ZcD;TL+;^r=a4(G~H3ZhK$lSXZj?cvyY8%d9JM zzc3#pD^W_QnWy#rx#;c&N@sqHhrnHRmj#i;s%zLm6SE(n&BWpd&f7>XnjV}OlZntI70fq%8~9<7 zMYaw`E-rp49-oC1N_uZTo)Cu%RR2QWdHpzQIcNsoDp`3xfP+`gI?tVQZ4X={qU?(n zV>0ASES^Xuc;9JBji{)RnFL(Lez;8XbB1uWaMp@p?7xhXk6V#!6B@aP4Rz7-K%a>i z?fvf}va_DGUXlI#4--`A3qK7J?-HwnG7O~H2;zR~RLW)_^#La!=}+>KW#anZ{|^D3 B7G?kd literal 0 HcmV?d00001 diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/img/glyphicons-halflings.png b/fuckphp/92169de79037c2de72f5088bf1e8310a/img/glyphicons-halflings.png new file mode 100644 index 0000000000000000000000000000000000000000..a9969993201f9cee63cf9f49217646347297b643 GIT binary patch literal 12799 zcma*OWmH^Ivn@*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ul-ekY=-w26VnU%U3f19Z-pj&2 z4J_a|o4Dci+MO)mPQIM>kdPG1xydiR9@#8m zh27D7GF{p|a{8({Q-Pr-;#jV{2zHR>lGoFtIfIpoMo?exuQyX_A;;l0AP4!)JEM$EwMInZkj+8*IHP4vKRd zKx_l-i*>A*C@{u%ct`y~s6MWAfO{@FPIX&sg8H{GMDc{4M3%$@c8&RAlw0-R<4DO3 trJqdc$mBpWeznn?E0M$F`|3v=`3%T2A17h;rxP7$%JLd=6(2u;`(N3pt&so# literal 0 HcmV?d00001 diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/index.php b/fuckphp/92169de79037c2de72f5088bf1e8310a/index.php new file mode 100644 index 0000000..317c5f6 --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/index.php @@ -0,0 +1,64 @@ + + + + Edward鐨勫皬璇寸珯 + + + + + + + + + + + +
      +
      +
      + +
      +
      +
      + +
      +

      + 璇曡绔犺妭02 +

      +

      + 褰曞叆锛氫竷澶 鎵浘锛氳交鍥芥壂鍥句箣绁濷鍙= Ozzie +

      +

      + 鏌ョ湅鏇村 禄 +

      +
      +
      +

      + 璇曡绔犺妭03 +

      +

      + 褰曞叆锛氫竷澶 鎵浘锛氳交鍥芥壂鍥句箣绁濷鍙= Ozzie +

      +

      + 鏌ョ湅鏇村 禄 +

      +
      +
      +
      + + + diff --git a/fuckphp/92169de79037c2de72f5088bf1e8310a/js/bootstrap.js b/fuckphp/92169de79037c2de72f5088bf1e8310a/js/bootstrap.js new file mode 100644 index 0000000..44109f6 --- /dev/null +++ b/fuckphp/92169de79037c2de72f5088bf1e8310a/js/bootstrap.js @@ -0,0 +1,2280 @@ +/* =================================================== + * bootstrap-transition.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#transitions + * =================================================== + * Copyright 2013 Twitter, Inc. + * + * 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. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CSS TRANSITION SUPPORT (http://www.modernizr.com/) + * ======================================================= */ + + $(function () { + + $.support.transition = (function () { + + var transitionEnd = (function () { + + var el = document.createElement('bootstrap') + , transEndEventNames = { + 'WebkitTransition' : 'webkitTransitionEnd' + , 'MozTransition' : 'transitionend' + , 'OTransition' : 'oTransitionEnd otransitionend' + , 'transition' : 'transitionend' + } + , name + + for (name in transEndEventNames){ + if (el.style[name] !== undefined) { + return transEndEventNames[name] + } + } + + }()) + + return transitionEnd && { + end: transitionEnd + } + + })() + + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-alert.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#alerts + * ========================================================== + * Copyright 2013 Twitter, Inc. + * + * 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. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + /* ALERT DATA-API + * ============== */ + + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) + +}(window.jQuery);/* ============================================================ + * bootstrap-button.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#buttons + * ============================================================ + * Copyright 2013 Twitter, Inc. + * + * 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. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + /* BUTTON DATA-API + * =============== */ + + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + +}(window.jQuery);/* ========================================================== + * bootstrap-carousel.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#carousel + * ========================================================== + * Copyright 2013 Twitter, Inc. + * + * 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. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + + , to: function (pos) { + var activeIndex = this.getActiveIndex() + , that = this + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activeIndex == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + e = $.Event('slide', { + relatedTarget: $next[0] + , direction: direction + }) + + if ($next.hasClass('active')) return + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + /* CAROUSEL DATA-API + * ================= */ + + $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + , slideIndex + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('carousel').pause().to(slideIndex).cycle() + } + + e.preventDefault() + }) + +}(window.jQuery);/* ============================================================= + * bootstrap-collapse.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#collapse + * ============================================================= + * Copyright 2013 Twitter, Inc. + * + * 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. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning || this.$element.hasClass('in')) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning || !this.$element.hasClass('in')) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSE NO CONFLICT + * ==================== */ + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + +}(window.jQuery);/* ============================================================ + * bootstrap-dropdown.js v2.3.2 + * http://getbootstrap.com/2.3.2/javascript.html#dropdowns + * ============================================================ + * Copyright 2013 Twitter, Inc. + * + * 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. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + if ('ontouchstart' in document.documentElement) { + // if mobile we we use a backdrop because click events don't delegate + $('