├── code
├── .idea
│ ├── .name
│ ├── vcs.xml
│ ├── modules.xml
│ ├── code.iml
│ └── misc.xml
├── Admin
│ ├── index.html
│ ├── Conf
│ │ └── index.html
│ ├── Model
│ │ ├── index.html
│ │ ├── ArticlesModel.class.php
│ │ ├── UserModel.class.php
│ │ └── ManagerModel.class.php
│ ├── View
│ │ ├── index.html
│ │ ├── Type
│ │ │ ├── add.html
│ │ │ ├── del.html
│ │ │ ├── upd.html
│ │ │ └── index.html
│ │ ├── Manager
│ │ │ └── del.html
│ │ ├── Index
│ │ │ └── updpsd.html
│ │ └── User
│ │ │ ├── del.html
│ │ │ └── add.html
│ ├── Common
│ │ ├── index.html
│ │ └── function.php
│ └── Controller
│ │ ├── index.html
│ │ ├── PublicController.class.php
│ │ └── CommentController.class.php
├── Api
│ ├── index.html
│ ├── Common
│ │ └── index.html
│ ├── Conf
│ │ └── index.html
│ ├── Model
│ │ ├── index.html
│ │ ├── TypeModel.class.php
│ │ └── CommentModel.class.php
│ ├── View
│ │ └── index.html
│ └── Controller
│ │ ├── index.html
│ │ ├── IndexController.class.php
│ │ └── ArticlesController.class.php
├── Common
│ ├── index.html
│ ├── Conf
│ │ ├── index.html
│ │ └── config.php
│ ├── Common
│ │ └── index.html
│ ├── assets
│ │ ├── css
│ │ │ └── app.css
│ │ ├── i
│ │ │ ├── favicon.png
│ │ │ ├── app-icon72x72@2x.png
│ │ │ ├── examples
│ │ │ │ ├── landing.png
│ │ │ │ ├── admin-ie.png
│ │ │ │ ├── adminPage.png
│ │ │ │ ├── blogPage.png
│ │ │ │ ├── js_r6_c8.gif
│ │ │ │ ├── loginPage.png
│ │ │ │ ├── admin-chrome.png
│ │ │ │ ├── admin-opera.png
│ │ │ │ ├── admin-safari.png
│ │ │ │ ├── landingPage.png
│ │ │ │ ├── sidebarPage.png
│ │ │ │ └── admin-firefox.png
│ │ │ └── startup-640x1096.png
│ │ ├── fonts
│ │ │ ├── FontAwesome.otf
│ │ │ ├── fontawesome-webfont.eot
│ │ │ ├── fontawesome-webfont.ttf
│ │ │ ├── fontawesome-webfont.woff
│ │ │ └── fontawesome-webfont.woff2
│ │ └── js
│ │ │ └── app.js
│ ├── img
│ │ ├── glyphicons-halflings.png
│ │ └── glyphicons-halflings-white.png
│ └── fonts
│ │ ├── glyphicons-halflings-regular.eot
│ │ ├── glyphicons-halflings-regular.ttf
│ │ └── glyphicons-halflings-regular.woff
├── Model
│ ├── index.html
│ ├── ArticlesModel.class.php
│ └── ManagerModel.class.php
├── ThinkPHP
│ ├── Library
│ │ ├── Vendor
│ │ │ ├── README.txt
│ │ │ ├── spyc
│ │ │ │ ├── tests
│ │ │ │ │ ├── failing1.yaml
│ │ │ │ │ ├── comments.yaml
│ │ │ │ │ ├── quotes.yaml
│ │ │ │ │ ├── indent_1.yaml
│ │ │ │ │ └── IndentTest.php
│ │ │ │ ├── examples
│ │ │ │ │ ├── yaml-load.php
│ │ │ │ │ └── yaml-dump.php
│ │ │ │ ├── composer.json
│ │ │ │ ├── php4
│ │ │ │ │ └── 5to4.php
│ │ │ │ ├── README.md
│ │ │ │ └── COPYING
│ │ │ ├── phpRPC
│ │ │ │ └── pecl
│ │ │ │ │ └── xxtea
│ │ │ │ │ ├── CREDITS
│ │ │ │ │ ├── config.w32
│ │ │ │ │ ├── config.m4
│ │ │ │ │ ├── test
│ │ │ │ │ └── test.php
│ │ │ │ │ ├── README
│ │ │ │ │ ├── php_xxtea.sln
│ │ │ │ │ ├── xxtea.h
│ │ │ │ │ ├── php_xxtea.h
│ │ │ │ │ └── xxtea.c
│ │ │ ├── Boris
│ │ │ │ ├── ExportInspector.php
│ │ │ │ ├── DumpInspector.php
│ │ │ │ ├── Inspector.php
│ │ │ │ ├── Config.php
│ │ │ │ └── CLIOptionsHandler.php
│ │ │ ├── Smarty
│ │ │ │ ├── plugins
│ │ │ │ │ ├── modifiercompiler.noprint.php
│ │ │ │ │ ├── variablefilter.htmlspecialchars.php
│ │ │ │ │ ├── modifiercompiler.string_format.php
│ │ │ │ │ ├── modifiercompiler.cat.php
│ │ │ │ │ ├── modifiercompiler.count_paragraphs.php
│ │ │ │ │ ├── modifier.spacify.php
│ │ │ │ │ ├── modifiercompiler.count_sentences.php
│ │ │ │ │ ├── modifiercompiler.indent.php
│ │ │ │ │ ├── modifiercompiler.strip_tags.php
│ │ │ │ │ ├── modifiercompiler.upper.php
│ │ │ │ │ ├── modifiercompiler.lower.php
│ │ │ │ │ ├── modifiercompiler.strip.php
│ │ │ │ │ ├── modifiercompiler.default.php
│ │ │ │ │ ├── modifiercompiler.to_charset.php
│ │ │ │ │ ├── modifiercompiler.from_charset.php
│ │ │ │ │ ├── modifier.replace.php
│ │ │ │ │ ├── modifiercompiler.count_characters.php
│ │ │ │ │ ├── modifiercompiler.count_words.php
│ │ │ │ │ ├── shared.literal_compiler_param.php
│ │ │ │ │ ├── shared.make_timestamp.php
│ │ │ │ │ ├── modifiercompiler.unescape.php
│ │ │ │ │ ├── shared.mb_unicode.php
│ │ │ │ │ ├── modifier.regex_replace.php
│ │ │ │ │ ├── modifiercompiler.wordwrap.php
│ │ │ │ │ ├── shared.escape_special_chars.php
│ │ │ │ │ ├── shared.mb_str_replace.php
│ │ │ │ │ └── function.counter.php
│ │ │ │ └── sysplugins
│ │ │ │ │ ├── smarty_resource_recompiled.php
│ │ │ │ │ ├── smarty_internal_get_include_path.php
│ │ │ │ │ ├── smarty_internal_compile_ldelim.php
│ │ │ │ │ ├── smarty_internal_compile_rdelim.php
│ │ │ │ │ ├── smarty_internal_compile_debug.php
│ │ │ │ │ ├── smarty_resource_uncompiled.php
│ │ │ │ │ ├── smarty_internal_compile_append.php
│ │ │ │ │ ├── smarty_internal_nocache_insert.php
│ │ │ │ │ └── smarty_internal_compile_nocache.php
│ │ │ ├── TemplateLite
│ │ │ │ └── internal
│ │ │ │ │ ├── template.build_dir.php
│ │ │ │ │ ├── compile.compile_custom_function.php
│ │ │ │ │ ├── template.generate_debug_output.php
│ │ │ │ │ ├── template.fetch_compile_include.php
│ │ │ │ │ ├── template.destroy_dir.php
│ │ │ │ │ ├── compile.include.php
│ │ │ │ │ ├── compile.generate_compiler_debug_output.php
│ │ │ │ │ ├── compile.compile_custom_block.php
│ │ │ │ │ ├── compile.parse_is_expr.php
│ │ │ │ │ └── compile.compile_config.php
│ │ │ ├── EaseTemplate
│ │ │ │ └── template.ease.php
│ │ │ └── Hprose
│ │ │ │ ├── HproseIO.php
│ │ │ │ └── HproseFormatter.php
│ │ ├── Think
│ │ │ ├── Verify
│ │ │ │ ├── bgs
│ │ │ │ │ ├── 1.jpg
│ │ │ │ │ ├── 2.jpg
│ │ │ │ │ ├── 3.jpg
│ │ │ │ │ ├── 4.jpg
│ │ │ │ │ ├── 5.jpg
│ │ │ │ │ ├── 6.jpg
│ │ │ │ │ ├── 7.jpg
│ │ │ │ │ └── 8.jpg
│ │ │ │ └── ttfs
│ │ │ │ │ ├── 1.ttf
│ │ │ │ │ ├── 2.ttf
│ │ │ │ │ ├── 3.ttf
│ │ │ │ │ ├── 4.ttf
│ │ │ │ │ ├── 5.ttf
│ │ │ │ │ └── 6.ttf
│ │ │ ├── Exception.class.php
│ │ │ ├── Behavior.class.php
│ │ │ ├── Template
│ │ │ │ └── Driver
│ │ │ │ │ ├── Mobile.class.php
│ │ │ │ │ ├── Lite.class.php
│ │ │ │ │ ├── Smarty.class.php
│ │ │ │ │ ├── Smart.class.php
│ │ │ │ │ └── Ease.class.php
│ │ │ ├── Controller
│ │ │ │ ├── JsonRpcController.class.php
│ │ │ │ ├── YarController.class.php
│ │ │ │ └── RpcController.class.php
│ │ │ ├── Storage.class.php
│ │ │ ├── Crypt.class.php
│ │ │ └── Log
│ │ │ │ └── Driver
│ │ │ │ ├── Sae.class.php
│ │ │ │ └── File.class.php
│ │ ├── Behavior
│ │ │ ├── WriteHtmlCacheBehavior.class.php
│ │ │ ├── AgentCheckBehavior.class.php
│ │ │ ├── BrowserCheckBehavior.class.php
│ │ │ ├── RobotCheckBehavior.class.php
│ │ │ └── ContentReplaceBehavior.class.php
│ │ └── Org
│ │ │ └── Util
│ │ │ └── Stack.class.php
│ ├── logo.png
│ ├── Conf
│ │ └── debug.php
│ ├── LICENSE.txt
│ ├── Mode
│ │ ├── Sae
│ │ │ └── convention.php
│ │ └── api.php
│ ├── Tpl
│ │ ├── dispatch_jump.tpl
│ │ └── think_exception.tpl
│ └── Lang
│ │ └── zh-cn.php
├── public
│ └── upload
│ │ ├── 2014-10-09
│ │ ├── 2212.jpg
│ │ └── 3333.jpg
│ │ ├── 2014-10-12
│ │ ├── 161504.jpg
│ │ └── 543a440ebfa62.jpg
│ │ ├── 2014-10-11
│ │ ├── 5438f3c09c9da.jpg
│ │ └── 54391dc63664d.jpg
│ │ ├── 2014-10-15
│ │ ├── 543e373b3ac1f.jpg
│ │ └── 543e378b477ed.jpg
│ │ ├── 2014-10-16
│ │ ├── 543f90793744a.jpg
│ │ └── 543f9b34aa6a8.jpg
│ │ ├── 2014-10-24
│ │ ├── 544a6610ca725.jpg
│ │ └── 544a68c332775.jpg
│ │ ├── 2014-10-30
│ │ ├── 5451a9c87572b.jpg
│ │ ├── 5451a9c8762e3.png
│ │ ├── 5451a9e17e57b.jpg
│ │ ├── 5451a9e17f133.png
│ │ ├── 5451aa4b53c3f.gif
│ │ ├── 5451aa4b54410.gif
│ │ ├── 5451ba35910a0.gif
│ │ ├── 5451ba72dd469.gif
│ │ └── 5451ba72ddc39.gif
│ │ ├── logo
│ │ ├── 2014-10-31
│ │ │ ├── 545345ca993d1.jpg
│ │ │ ├── 545345ca9a75a.png
│ │ │ ├── 545345ca9b312.gif
│ │ │ └── 545345ca9c2b2.jpg
│ │ └── 2015-02-24
│ │ │ ├── 54ec6a76ceae1.jpg
│ │ │ ├── 54ec6a962d6a4.jpg
│ │ │ ├── 54ec6a9e336c6.jpg
│ │ │ └── 54ec6aa3c9bc5.jpg
│ │ └── shop
│ │ ├── 2014-11-29
│ │ ├── 5479877d0100a.jpg
│ │ ├── 5479877d01faa.jpg
│ │ ├── 547993cfe6a51.jpg
│ │ ├── 547993f71e93e.jpg
│ │ ├── 5479941d42369.jpg
│ │ ├── 5479949d64194.jpg
│ │ ├── 547994c38a560.jpg
│ │ ├── 547994e2c981e.jpg
│ │ └── 54799505e6981.jpg
│ │ ├── 2015-03-18
│ │ ├── 1550976e471ca1.jpg
│ │ ├── 15509792308d95.jpg
│ │ ├── 155097b055ae23.jpg
│ │ ├── 155097c3fbcc4d.jpg
│ │ ├── 155097cf2b852e.jpg
│ │ ├── 155097cf2b8a1f.jpg
│ │ ├── 155097d7843a8b.jpg
│ │ ├── 155097e29114ac.jpg
│ │ ├── 155097e918a677.jpg
│ │ ├── 155097f9b602c1.jpg
│ │ ├── 1550980127c4a6.jpg
│ │ ├── 1550980127cb6e.jpg
│ │ ├── 1550980837a4ca.jpg
│ │ ├── 1550980f07d092.jpg
│ │ ├── 1550980f07d546.jpg
│ │ ├── 550976e471ca1.jpg
│ │ ├── 5509792308d95.jpg
│ │ ├── 55097b055ae23.jpg
│ │ ├── 55097c3fbcc4d.jpg
│ │ ├── 55097c3fbd0f6.png
│ │ ├── 55097cf2b852e.jpg
│ │ ├── 55097cf2b8a1f.jpg
│ │ ├── 55097d7843a8b.jpg
│ │ ├── 55097d784401f.png
│ │ ├── 55097e29114ac.jpg
│ │ ├── 55097e2911911.jpg
│ │ ├── 55097e918a677.jpg
│ │ ├── 55097e918ad8c.png
│ │ ├── 55097f9b5ed75.jpeg
│ │ ├── 55097f9b602c1.jpg
│ │ ├── 550980127c4a6.jpg
│ │ ├── 550980127cb6e.jpg
│ │ ├── 5509808379de6.jpeg
│ │ ├── 550980837a4ca.jpg
│ │ ├── 550980f07d092.jpg
│ │ ├── 550980f07d546.jpg
│ │ ├── 155097f9b5ed75.jpeg
│ │ └── 15509808379de6.jpeg
│ │ └── 2015-07-24
│ │ ├── 55b177550aa02.jpg
│ │ ├── 55b177550b6aa.jpg
│ │ ├── 55b187baa0a3e.jpg
│ │ ├── 55b187baa0c50.jpg
│ │ ├── 55b195903bd62.jpg
│ │ ├── 55b195903be77.jpg
│ │ ├── 55b19c25f29ef.jpg
│ │ ├── 55b19c25f2c57.jpg
│ │ ├── 55b19fe08efef.jpg
│ │ ├── 55b1a2328e80f.jpg
│ │ ├── 55b1a439e3bde.jpg
│ │ ├── 55b1a439e3d5d.jpg
│ │ ├── 55b1a69500550.jpg
│ │ ├── 55b1a695006a0.jpg
│ │ ├── 55b1ad49e869c.jpg
│ │ ├── 55b1ad49e87bf.jpg
│ │ ├── 55b1aeebef09b.jpg
│ │ ├── 55b1aeebef2f1.jpg
│ │ ├── 55b1e12fd22ce.jpg
│ │ ├── 55b1e12fd2485.jpg
│ │ ├── 55b1e51bcada4.jpg
│ │ ├── 55b1e51bcaef5.jpg
│ │ ├── 55b1e9ed1bb7c.jpg
│ │ ├── 55b1e9ed1bcb6.jpg
│ │ ├── 55b1ebe21de25.jpg
│ │ ├── 55b1ebe21e049.jpg
│ │ ├── 55b1ed5d0d523.jpg
│ │ ├── 55b1ed5d0d8c1.jpg
│ │ ├── 55b1efbb6dd2d.jpg
│ │ ├── 55b1efbb6e117.jpg
│ │ ├── 55b1f14ae1a99.jpg
│ │ ├── 55b1f14ae1bf3.jpg
│ │ ├── 55b1f30b27808.jpg
│ │ ├── 55b1f30b27a2d.jpg
│ │ ├── 55b1f5074c6a4.jpg
│ │ ├── 55b1f5074c984.jpg
│ │ ├── 55b1f843b47f1.jpg
│ │ └── 55b1f8d12051b.jpg
├── index.php
└── admin.php
└── readme.md
/code/.idea/.name:
--------------------------------------------------------------------------------
1 | code
--------------------------------------------------------------------------------
/code/Admin/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Api/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Model/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Admin/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Admin/Model/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Admin/View/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Api/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Api/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Api/Model/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Api/View/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Common/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Admin/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Admin/Controller/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Api/Controller/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Common/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/README.txt:
--------------------------------------------------------------------------------
1 | 第三方类库包目录
--------------------------------------------------------------------------------
/code/Common/assets/css/app.css:
--------------------------------------------------------------------------------
1 | /* Write your styles */
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/tests/failing1.yaml:
--------------------------------------------------------------------------------
1 | MyObject:
2 | Prop1: {key1:val1}
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/CREDITS:
--------------------------------------------------------------------------------
1 | XXTEA PHP extension
2 | Ma Bingyao (andot@coolcode.cn)
3 |
--------------------------------------------------------------------------------
/code/ThinkPHP/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/ThinkPHP/logo.png
--------------------------------------------------------------------------------
/readme.md:
--------------------------------------------------------------------------------
1 | #基于ThinkPHP的商铺管理API接口
2 |
3 | 基于Thinkphp框架的一个商铺管理系统,主要提供API接口,可用于APP开发。拥有四个模块:商铺、用户、收藏和评论。包括后台管理界面,没有前台界面。
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/tests/comments.yaml:
--------------------------------------------------------------------------------
1 | foo: 'bar' #Comment
2 | arr: ['x', 'y', 'z'] # Comment here
3 | bar: kittens
--------------------------------------------------------------------------------
/code/Common/assets/i/favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/Common/assets/i/favicon.png
--------------------------------------------------------------------------------
/code/public/upload/2014-10-09/2212.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/public/upload/2014-10-09/2212.jpg
--------------------------------------------------------------------------------
/code/public/upload/2014-10-09/3333.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/public/upload/2014-10-09/3333.jpg
--------------------------------------------------------------------------------
/code/Common/assets/fonts/FontAwesome.otf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/Common/assets/fonts/FontAwesome.otf
--------------------------------------------------------------------------------
/code/Common/assets/i/app-icon72x72@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/Common/assets/i/app-icon72x72@2x.png
--------------------------------------------------------------------------------
/code/Common/assets/i/examples/landing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/Common/assets/i/examples/landing.png
--------------------------------------------------------------------------------
/code/Common/assets/i/startup-640x1096.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/Common/assets/i/startup-640x1096.png
--------------------------------------------------------------------------------
/code/Common/img/glyphicons-halflings.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/isdrchan/store-api-base-on-thinkphp/HEAD/code/Common/img/glyphicons-halflings.png
--------------------------------------------------------------------------------
/code/Model/ArticlesModel.class.php:
--------------------------------------------------------------------------------
1 |
3 | -
4 | html_content:
5 | -
hello world
6 | - hello
world
7 | text_content:
8 | - hello world
--------------------------------------------------------------------------------
/code/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/config.w32:
--------------------------------------------------------------------------------
1 | ARG_ENABLE("xxtea", "xxtea module", "no");
2 |
3 | if (PHP_XXTEA != "no") {
4 | EXTENSION("xxtea", "php_xxtea.c xxtea.c");
5 | }
6 |
7 |
--------------------------------------------------------------------------------
/code/Api/Controller/IndexController.class.php:
--------------------------------------------------------------------------------
1 | success("跳转到Admin模块" , "admin.php");
9 | }
10 | }
--------------------------------------------------------------------------------
/code/.idea/modules.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/config.m4:
--------------------------------------------------------------------------------
1 | PHP_ARG_ENABLE(xxtea, xxtea module,
2 | [ --enable-xxtea Enable xxtea module.])
3 |
4 | if test "$PHP_XXTEA" != "no"; then
5 | PHP_NEW_EXTENSION(xxtea, php_xxtea.c xxtea.c, $ext_shared)
6 | AC_DEFINE(HAVE_XXTEA, 1, [Have XXTEA library])
7 | fi
8 |
--------------------------------------------------------------------------------
/code/.idea/code.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/code/Api/Model/TypeModel.class.php:
--------------------------------------------------------------------------------
1 | getBytid($tid);
10 | return $result ? $result['typename'] : null;
11 | }
12 |
13 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Boris/ExportInspector.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/index.php:
--------------------------------------------------------------------------------
1 | 5.3.0 !');
7 |
8 | //把tp模式生成模式变为开发者模式
9 | define("APP_DEBUG", true);
10 |
11 | // 定义应用目录
12 | define('APP_PATH','./');
13 |
14 | define('BIND_MODULE','Api');
15 |
16 | // 引入ThinkPHP入口文件
17 | include './ThinkPHP/ThinkPHP.php';
18 |
19 |
--------------------------------------------------------------------------------
/code/admin.php:
--------------------------------------------------------------------------------
1 | 5.3.0 !');
7 |
8 | //把tp模式生成模式变为开发者模式
9 | define("APP_DEBUG", true);
10 |
11 | // 定义应用目录
12 | define('APP_PATH','./');
13 |
14 | define('BIND_MODULE','Admin');
15 |
16 | // 引入ThinkPHP入口文件
17 | include './ThinkPHP/ThinkPHP.php';
18 |
19 |
--------------------------------------------------------------------------------
/code/Common/assets/js/app.js:
--------------------------------------------------------------------------------
1 | (function($) {
2 | 'use strict';
3 |
4 | $(function() {
5 | var $fullText = $('.admin-fullText');
6 | $('#admin-fullscreen').on('click', function() {
7 | $.AMUI.fullscreen.toggle();
8 | });
9 |
10 | $(document).on($.AMUI.fullscreen.raw.fullscreenchange, function() {
11 | $.AMUI.fullscreen.isFullscreen ? $fullText.text('关闭全屏') : $fullText.text('开启全屏');
12 | });
13 | });
14 | })(jQuery);
15 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Boris/DumpInspector.php:
--------------------------------------------------------------------------------
1 | getByname($name);
9 |
10 | if($result != NULL) {
11 | if($result['password'] != $password) {
12 | return false;
13 | } else {
14 | return $result;
15 | }
16 |
17 | } else {
18 | return false;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/code/Admin/Model/ManagerModel.class.php:
--------------------------------------------------------------------------------
1 | getByname($name);
9 |
10 | if($result != NULL) {
11 | if($result['password'] != $password) {
12 | return false;
13 | } else {
14 | return $result;
15 | }
16 |
17 | } else {
18 | return false;
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Boris/Inspector.php:
--------------------------------------------------------------------------------
1 | where('fid = '.$fid) -> find();
13 | $test -> assign('resultByFront', $resultByFront);
14 |
15 | $test -> assign('id', $_SESSION['id']);
16 | $test -> assign('name', $_SESSION['name']);
17 | $test -> assign('role', $_SESSION['role']);
18 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/examples/yaml-load.php:
--------------------------------------------------------------------------------
1 | spyc.yaml loaded into PHP:
';
15 | print_r($array);
16 | echo '';
17 |
18 |
19 | echo 'YAML Data dumped back:
';
20 | echo Spyc::YAMLDump($array);
21 | echo '
';
22 |
--------------------------------------------------------------------------------
/code/Common/Conf/config.php:
--------------------------------------------------------------------------------
1 | '配置值'
4 |
5 | 'DB_TYPE' => 'mysql', // 数据库类型
6 | 'DB_HOST' => 'localhost', // 服务器地址
7 | 'DB_NAME' => 'cms', // 数据库名
8 | 'DB_USER' => '', // 用户名
9 | 'DB_PWD' => '', // 密码
10 | 'DB_PORT' => '3306', // 端口
11 | 'DB_PREFIX' => '', // 数据库表前缀
12 |
13 |
14 | 'SHOW_PAGE_TRACE' => true,
15 | 'MULTI_MODULE' => true,
16 | //'TMPL_ENGINE_TYPE' => 'Smarty',
17 |
18 | );
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.noprint.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: noprint
14 | * Purpose: return an empty string
15 | *
16 | * @author Uwe Tews
17 | * @param array $params parameters
18 | * @return string with compiled code
19 | */
20 | function smarty_modifiercompiler_noprint($params, $compiler)
21 | {
22 | return "''";
23 | }
24 |
25 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/variablefilter.htmlspecialchars.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/template.build_dir.php:
--------------------------------------------------------------------------------
1 | _get_dir($dir);
15 | }
16 | $_result = $object->_get_dir($dir);
17 | foreach($_args as $value)
18 | {
19 | $_result .= $value.DIRECTORY_SEPARATOR;
20 | if (!is_dir($_result))
21 | {
22 | @mkdir($_result, 0777);
23 | }
24 | }
25 | return $_result;
26 | }
27 |
28 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "mustangostang/spyc",
3 | "description": "A simple YAML loader/dumper class for PHP",
4 | "type": "library",
5 | "keywords": [
6 | "spyc",
7 | "yaml",
8 | "yml"
9 | ],
10 | "homepage": "https://github.com/mustangostang/spyc/",
11 | "authors" : [{
12 | "name": "mustangostang",
13 | "email": "vlad.andersen@gmail.com"
14 | }],
15 | "license": "MIT",
16 | "require": {
17 | "php": ">=5.3.1"
18 | },
19 | "autoload": {
20 | "files": [ "Spyc.php" ]
21 | },
22 | "extra": {
23 | "branch-alias": {
24 | "dev-master": "0.5.x-dev"
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Exception.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think;
12 | /**
13 | * ThinkPHP系统异常基类
14 | */
15 | class Exception extends \Exception {
16 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.string_format.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: string_format
14 | * Purpose: format strings via sprintf
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.string.format.php string_format (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_string_format($params, $compiler)
22 | {
23 | return 'sprintf(' . $params[1] . ',' . $params[0] . ')';
24 | }
25 |
26 | ?>
--------------------------------------------------------------------------------
/code/Model/ManagerModel.class.php:
--------------------------------------------------------------------------------
1 | getByname($name);
9 |
10 | if($result != NULL) {
11 | if($result['password'] != $password) {
12 | return false;
13 | } else {
14 | return $result;
15 | }
16 |
17 | } else {
18 | return false;
19 | }
20 | }
21 |
22 | protected $_validate = array(
23 | //用户名必须填写
24 | array('name', 'require', '用户名不能为空'),
25 | array('password', 'require', '密码不能为空'),
26 | array('password0', 'require', '确认密码不能为空'),
27 | array('password0', 'password', '密码与确认密码不一致', 0, 'confirm'),
28 | );
29 | //` protected $patchValidate = ture;
30 |
31 |
32 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/README:
--------------------------------------------------------------------------------
1 | XXTEA PHP extension
2 |
3 | What is it?
4 | -----------------------------------------------
5 | This extension based on xxtea library, which provides a set of functions
6 | for encrypt or decrypt data with XXTEA algorithm.
7 |
8 |
9 |
10 | How to install it?
11 | -----------------------------------------------
12 | See INSTALL for installation instructions.
13 |
14 |
15 |
16 | How to use it?
17 | -----------------------------------------------
18 | string xxtea_encrypt(string data, string key)
19 |
20 | Encrypt data using XXTEA algorithm. The key is a 16 bytes(128 bits) string.
21 |
22 | string xxtea_decrypt(string data, string key)
23 |
24 | Decrypt data using XXTEA algorithm. The key is a 16 bytes(128 bits) string.
25 |
26 | string xxtea_info()
27 |
28 | Get the version information.
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/php4/5to4.php:
--------------------------------------------------------------------------------
1 | ', $code);
13 | $f = fopen ($dest, 'w');
14 | fwrite($f, $code);
15 | fclose ($f);
16 | print "Written to $dest.\n";
17 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.cat.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: cat
14 | * Date: Feb 24, 2003
15 | * Purpose: catenate a value to a variable
16 | * Input: string to catenate
17 | * Example: {$var|cat:"foo"}
18 | *
19 | * @link http://smarty.php.net/manual/en/language.modifier.cat.php cat
20 | * (Smarty online manual)
21 | * @author Uwe Tews
22 | * @param array $params parameters
23 | * @return string with compiled code
24 | */
25 | function smarty_modifiercompiler_cat($params, $compiler)
26 | {
27 | return '('.implode(').(', $params).')';
28 | }
29 |
30 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.count_paragraphs.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: count_paragraphs
14 | * Purpose: count the number of paragraphs in a text
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php
17 | * count_paragraphs (Smarty online manual)
18 | * @author Uwe Tews
19 | * @param array $params parameters
20 | * @return string with compiled code
21 | */
22 | function smarty_modifiercompiler_count_paragraphs($params, $compiler)
23 | {
24 | // count \r or \n characters
25 | return '(preg_match_all(\'#[\r\n]+#\', ' . $params[0] . ', $tmp)+1)';
26 | }
27 |
28 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifier.spacify.php:
--------------------------------------------------------------------------------
1 |
12 | * Name: spacify
13 | * Purpose: add spaces between characters in a string
14 | *
15 | * @link http://smarty.php.net/manual/en/language.modifier.spacify.php spacify (Smarty online manual)
16 | * @author Monte Ohrt
17 | * @param string $string input string
18 | * @param string $spacify_char string to insert between characters.
19 | * @return string
20 | */
21 | function smarty_modifier_spacify($string, $spacify_char = ' ')
22 | {
23 | // well… what about charsets besides latin and UTF-8?
24 | return implode($spacify_char, preg_split('//u', $string, -1, PREG_SPLIT_NO_EMPTY));
25 | }
26 |
27 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.count_sentences.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: count_sentences
14 | * Purpose: count the number of sentences in a text
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.count.paragraphs.php
17 | * count_sentences (Smarty online manual)
18 | * @author Uwe Tews
19 | * @param array $params parameters
20 | * @return string with compiled code
21 | */
22 | function smarty_modifiercompiler_count_sentences($params, $compiler)
23 | {
24 | // find periods, question marks, exclamation marks with a word before but not after.
25 | return 'preg_match_all("#\w[\.\?\!](\W|$)#uS", ' . $params[0] . ', $tmp)';
26 | }
27 |
28 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.indent.php:
--------------------------------------------------------------------------------
1 |
12 | * Name: indent
13 | * Purpose: indent lines of text
14 | *
15 | * @link http://www.smarty.net/manual/en/language.modifier.indent.php indent (Smarty online manual)
16 | * @author Uwe Tews
17 | * @param array $params parameters
18 | * @return string with compiled code
19 | */
20 |
21 | function smarty_modifiercompiler_indent($params, $compiler)
22 | {
23 | if (!isset($params[1])) {
24 | $params[1] = 4;
25 | }
26 | if (!isset($params[2])) {
27 | $params[2] = "' '";
28 | }
29 | return 'preg_replace(\'!^!m\',str_repeat(' . $params[2] . ',' . $params[1] . '),' . $params[0] . ')';
30 | }
31 |
32 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.strip_tags.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: strip_tags
14 | * Purpose: strip html tags from text
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.strip.tags.php strip_tags (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_strip_tags($params, $compiler)
22 | {
23 | if (!isset($params[1])) {
24 | $params[1] = true;
25 | }
26 | if ($params[1] === true) {
27 | return "preg_replace('!<[^>]*?>!', ' ', {$params[0]})";
28 | } else {
29 | return 'strip_tags(' . $params[0] . ')';
30 | }
31 | }
32 |
33 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.upper.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: lower
14 | * Purpose: convert string to uppercase
15 | *
16 | * @link http://smarty.php.net/manual/en/language.modifier.upper.php lower (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_upper($params, $compiler)
22 | {
23 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
24 | return 'mb_strtoupper(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET)' ;
25 | }
26 | // no MBString fallback
27 | return 'strtoupper(' . $params[0] . ')';
28 | }
29 |
30 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Behavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think;
12 | /**
13 | * ThinkPHP Behavior基础类
14 | */
15 | abstract class Behavior {
16 | /**
17 | * 执行行为 run方法是Behavior唯一的接口
18 | * @access public
19 | * @param mixed $params 行为参数
20 | * @return void
21 | */
22 | abstract public function run(&$params);
23 |
24 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.lower.php:
--------------------------------------------------------------------------------
1 |
12 | * Name: lower
13 | * Purpose: convert string to lowercase
14 | *
15 | * @link http://www.smarty.net/manual/en/language.modifier.lower.php lower (Smarty online manual)
16 | * @author Monte Ohrt
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 |
22 | function smarty_modifiercompiler_lower($params, $compiler)
23 | {
24 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
25 | return 'mb_strtolower(' . $params[0] . ',SMARTY_RESOURCE_CHAR_SET)' ;
26 | }
27 | // no MBString fallback
28 | return 'strtolower(' . $params[0] . ')';
29 | }
30 |
31 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.strip.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: strip
14 | * Purpose: Replace all repeated spaces, newlines, tabs
15 | * with a single space or supplied replacement string.
16 | * Example: {$var|strip} {$var|strip:" "}
17 | * Date: September 25th, 2002
18 | *
19 | * @link http://www.smarty.net/manual/en/language.modifier.strip.php strip (Smarty online manual)
20 | * @author Uwe Tews
21 | * @param array $params parameters
22 | * @return string with compiled code
23 | */
24 |
25 | function smarty_modifiercompiler_strip($params, $compiler)
26 | {
27 | if (!isset($params[1])) {
28 | $params[1] = "' '";
29 | }
30 | return "preg_replace('!\s+!u', {$params[1]},{$params[0]})";
31 | }
32 |
33 | ?>
--------------------------------------------------------------------------------
/code/Admin/Controller/PublicController.class.php:
--------------------------------------------------------------------------------
1 | where('fid = '.$fid) -> find();
24 | $this -> assign('resultByFront', $resultByFront);
25 | $this -> assign('id', $_SESSION['id']);
26 | $this -> assign('name', $_SESSION['name']);
27 | $this -> assign('role', $_SESSION['role']);
28 |
29 | $this -> display();
30 |
31 | } else {
32 | $this -> success("即将跳转到登录页面!", U('Index/login'));
33 | }
34 | }
35 |
36 |
37 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.default.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: default
14 | * Purpose: designate default value for empty variables
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.default.php default (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_default ($params, $compiler)
22 | {
23 | $output = $params[0];
24 | if (!isset($params[1])) {
25 | $params[1] = "''";
26 | }
27 |
28 | array_shift($params);
29 | foreach ($params as $param) {
30 | $output = '(($tmp = @' . $output . ')===null||$tmp===\'\' ? ' . $param . ' : $tmp)';
31 | }
32 | return $output;
33 | }
34 |
35 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/README.md:
--------------------------------------------------------------------------------
1 | **Spyc** is a YAML loader/dumper written in pure PHP. Given a YAML document, Spyc will return an array that
2 | you can use however you see fit. Given an array, Spyc will return a string which contains a YAML document
3 | built from your data.
4 |
5 | **YAML** is an amazingly human friendly and strikingly versatile data serialization language which can be used
6 | for log files, config files, custom protocols, the works. For more information, see http://www.yaml.org.
7 |
8 | Spyc supports YAML 1.0 specification.
9 |
10 | ## Using Spyc
11 |
12 | Using Spyc is trivial:
13 |
14 | ```
15 |
13 | * Name: to_charset
14 | * Purpose: convert character encoding from internal encoding to $charset
15 | *
16 | * @author Rodney Rehm
17 | * @param array $params parameters
18 | * @return string with compiled code
19 | */
20 | function smarty_modifiercompiler_to_charset($params, $compiler)
21 | {
22 | if (!SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
23 | // FIXME: (rodneyrehm) shouldn't this throw an error?
24 | return $params[0];
25 | }
26 |
27 | if (!isset($params[1])) {
28 | $params[1] = '"ISO-8859-1"';
29 | }
30 |
31 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[1] . ', SMARTY_RESOURCE_CHAR_SET)';
32 | }
33 |
34 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.from_charset.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: from_charset
14 | * Purpose: convert character encoding from $charset to internal encoding
15 | *
16 | * @author Rodney Rehm
17 | * @param array $params parameters
18 | * @return string with compiled code
19 | */
20 | function smarty_modifiercompiler_from_charset($params, $compiler)
21 | {
22 | if (!SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
23 | // FIXME: (rodneyrehm) shouldn't this throw an error?
24 | return $params[0];
25 | }
26 |
27 | if (!isset($params[1])) {
28 | $params[1] = '"ISO-8859-1"';
29 | }
30 |
31 | return 'mb_convert_encoding(' . $params[0] . ', SMARTY_RESOURCE_CHAR_SET, ' . $params[1] . ')';
32 | }
33 |
34 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_resource_recompiled.php:
--------------------------------------------------------------------------------
1 | filepath = false;
30 | $compiled->timestamp = false;
31 | $compiled->exists = false;
32 | }
33 |
34 | }
35 |
36 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Behavior/WriteHtmlCacheBehavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Behavior;
12 | use Think\Storage;
13 | /**
14 | * 系统行为扩展:静态缓存写入
15 | */
16 | class WriteHtmlCacheBehavior {
17 |
18 | // 行为扩展的执行入口必须是run
19 | public function run(&$content){
20 | if(C('HTML_CACHE_ON') && defined('HTML_FILE_NAME')) {
21 | //静态文件写入
22 | Storage::put(HTML_FILE_NAME , $content,'html');
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/EaseTemplate/template.ease.php:
--------------------------------------------------------------------------------
1 | '1', //缓存ID
27 | 'TplType' =>'htm', //模板格式
28 | 'CacheDir' =>'cache', //缓存目录
29 | 'TemplateDir'=>'template' , //模板存放目录
30 | 'AutoImage' =>'on' , //自动解析图片目录开关 on表示开放 off表示关闭
31 | 'LangDir' =>'language' , //语言文件存放的目录
32 | 'Language' =>'default' , //语言的默认文件
33 | 'Copyright' =>'off' , //版权保护
34 | 'MemCache' =>'' , //Memcache服务器地址例如:127.0.0.1:11211
35 | )
36 | ){
37 |
38 | parent::ETCoreStart($set);
39 | }
40 |
41 | }
42 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifier.replace.php:
--------------------------------------------------------------------------------
1 |
12 | * Name: replace
13 | * Purpose: simple search/replace
14 | *
15 | * @link http://smarty.php.net/manual/en/language.modifier.replace.php replace (Smarty online manual)
16 | * @author Monte Ohrt
17 | * @author Uwe Tews
18 | * @param string $string input string
19 | * @param string $search text to search for
20 | * @param string $replace replacement text
21 | * @return string
22 | */
23 | function smarty_modifier_replace($string, $search, $replace)
24 | {
25 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
26 | require_once(SMARTY_PLUGINS_DIR . 'shared.mb_str_replace.php');
27 | return smarty_mb_str_replace($search, $replace, $string);
28 | }
29 |
30 | return str_replace($search, $replace, $string);
31 | }
32 |
33 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/examples/yaml-dump.php:
--------------------------------------------------------------------------------
1 | 'A sequence','second' => 'of mapped values');
18 | $array['Mapped'] = array('A sequence','which is mapped');
19 | $array['A Note'] = 'What if your text is too long?';
20 | $array['Another Note'] = 'If that is the case, the dumper will probably fold your text by using a block. Kinda like this.';
21 | $array['The trick?'] = 'The trick is that we overrode the default indent, 2, to 4 and the default wordwrap, 40, to 60.';
22 | $array['Old Dog'] = "And if you want\n to preserve line breaks, \ngo ahead!";
23 | $array['key:withcolon'] = "Should support this to";
24 |
25 | $yaml = Spyc::YAMLDump($array,4,60);
26 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_get_include_path.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.count_characters.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: count_characteres
14 | * Purpose: count the number of characters in a text
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.count.characters.php count_characters (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_count_characters($params, $compiler)
22 | {
23 | if (!isset($params[1]) || $params[1] != 'true') {
24 | return 'preg_match_all(\'/[^\s]/u\',' . $params[0] . ', $tmp)';
25 | }
26 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
27 | return 'mb_strlen(' . $params[0] . ', SMARTY_RESOURCE_CHAR_SET)';
28 | }
29 | // no MBString fallback
30 | return 'strlen(' . $params[0] . ')';
31 | }
32 |
33 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Behavior/AgentCheckBehavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Behavior;
12 | /**
13 | * 行为扩展:代理检测
14 | */
15 | class AgentCheckBehavior {
16 | public function run(&$params) {
17 | // 代理访问检测
18 | $limitProxyVisit = C('LIMIT_PROXY_VISIT',null,true);
19 | if($limitProxyVisit && ($_SERVER['HTTP_X_FORWARDED_FOR'] || $_SERVER['HTTP_VIA'] || $_SERVER['HTTP_PROXY_CONNECTION'] || $_SERVER['HTTP_USER_AGENT_VIA'])) {
20 | // 禁止代理访问
21 | exit('Access Denied');
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/COPYING:
--------------------------------------------------------------------------------
1 | The MIT License
2 |
3 | Copyright (c) 2011 Vladimir Andersen
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in
13 | all copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/code/Admin/View/Type/add.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 添加用户
4 |
5 | 账号管理
6 | 添加用户
7 |
8 |
9 |
36 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.count_words.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: count_words
14 | * Purpose: count the number of words in a text
15 | *
16 | * @link http://www.smarty.net/manual/en/language.modifier.count.words.php count_words (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_count_words($params, $compiler)
22 | {
23 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
24 | // return 'preg_match_all(\'#[\w\pL]+#u\', ' . $params[0] . ', $tmp)';
25 | // expression taken from http://de.php.net/manual/en/function.str-word-count.php#85592
26 | return 'preg_match_all(\'/\p{L}[\p{L}\p{Mn}\p{Pd}\\\'\x{2019}]*/u\', ' . $params[0] . ', $tmp)';
27 | }
28 | // no MBString fallback
29 | return 'str_word_count(' . $params[0] . ')';
30 | }
31 |
32 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Template/Driver/Mobile.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Template\Driver;
12 | /**
13 | * MobileTemplate模板引擎驱动
14 | */
15 | class Mobile {
16 | /**
17 | * 渲染模板输出
18 | * @access public
19 | * @param string $templateFile 模板文件名
20 | * @param array $var 模板变量
21 | * @return void
22 | */
23 | public function fetch($templateFile,$var) {
24 | $templateFile=substr($templateFile,strlen(THEME_PATH));
25 | $var['_think_template_path']=$templateFile;
26 | exit(json_encode($var));
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/compile.compile_custom_function.php:
--------------------------------------------------------------------------------
1 | _plugin_exists($function, "function"))
12 | {
13 | $_args = $object->_parse_arguments($arguments);
14 | foreach($_args as $key => $value)
15 | {
16 | if (is_bool($value))
17 | {
18 | $value = $value ? 'true' : 'false';
19 | }
20 | if (is_null($value))
21 | {
22 | $value = 'null';
23 | }
24 | $_args[$key] = "'$key' => $value";
25 | }
26 | $_result = '_parse_modifier($function . '(array(' . implode(',', (array)$_args) . '), $this)', $modifiers) . '; ';
30 | }
31 | else
32 | {
33 | $_result .= $function . '(array(' . implode(',', (array)$_args) . '), $this);';
34 | }
35 | $_result .= '?>';
36 | return true;
37 | }
38 | else
39 | {
40 | return false;
41 | }
42 | }
43 |
44 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/shared.literal_compiler_param.php:
--------------------------------------------------------------------------------
1 |
2 |
3 | {$result.username}的详情
4 |
5 | 账户管理
6 | {$result.username}的详情
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | | ID |
16 | {$result.tid} |
17 | |
18 |
19 |
20 | | 类别名 |
21 | {$result.typename} |
22 | |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_ldelim.php:
--------------------------------------------------------------------------------
1 | getAttributes($compiler, $args);
31 | if ($_attr['nocache'] === true) {
32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
33 | }
34 | // this tag does not return compiled code
35 | $compiler->has_code = true;
36 | return $compiler->smarty->left_delimiter;
37 | }
38 |
39 | }
40 |
41 | ?>
42 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_rdelim.php:
--------------------------------------------------------------------------------
1 | getAttributes($compiler, $args);
31 | if ($_attr['nocache'] === true) {
32 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
33 | }
34 | // this tag does not return compiled code
35 | $compiler->has_code = true;
36 | return $compiler->smarty->right_delimiter;
37 | }
38 |
39 | }
40 |
41 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/tests/indent_1.yaml:
--------------------------------------------------------------------------------
1 | root:
2 | child_1: 2
3 |
4 | child_2: 0
5 | child_3: 1
6 |
7 | root2:
8 | child_1: 1
9 | # A comment
10 | child_2: 2
11 |
12 | displays:
13 | - resolutions:
14 | 1024: 768
15 | - resolutions:
16 | 1920: 1200
17 |
18 | display:
19 | - resolutions:
20 | 1024: 768
21 | 1920: 1200
22 | producer: "Nec"
23 |
24 | nested_hashes_and_seqs:
25 | - { row: 0, col: 0, headsets_affected: [{ports: [0], side: left}], switch_function: {ics_ptt: true} }
26 |
27 | easier_nest: { h: [{a: b, a1: b1}, {c: d}] }
28 |
29 | one_space: |
30 | By four
31 | spaces
32 |
33 | steps:
34 | - step: &id001
35 | instrument: Lasik 2000
36 | pulseEnergy: 5.4
37 | pulseDuration: 12
38 | repetition: 1000
39 | spotSize: 1mm
40 | - step:
41 | <<: *id001
42 | spotSize: 2mm
43 |
44 | death masks are:
45 | sad: 2
46 | <<: {magnificent: 4}
47 |
48 | login: &login
49 | adapter: mysql
50 | host: localhost
51 |
52 | development:
53 | database: rails_dev
54 | <<: *login
55 |
56 | "key": "value:"
57 | colon_only: ":"
58 |
59 | list_and_comment: [one, two, three] # comment
60 | kai:
61 | -example: value
62 | kai_list_of_items:
63 | - -item
64 | - '-item'
65 | -item
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_debug.php:
--------------------------------------------------------------------------------
1 | getAttributes($compiler, $args);
32 |
33 | // compile always as nocache
34 | $compiler->tag_nocache = true;
35 |
36 | // display debug template
37 | $_output = "smarty->loadPlugin('Smarty_Internal_Debug'); Smarty_Internal_Debug::display_debug(\$_smarty_tpl); ?>";
38 | return $_output;
39 | }
40 |
41 | }
42 |
43 | ?>
--------------------------------------------------------------------------------
/code/Admin/View/Manager/del.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {$result.name}的详情
4 |
5 | 账号管理
6 | {$result.name}的详情
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | | ID |
16 | {$result.id} |
17 | |
18 |
19 |
20 | | 用户名 |
21 | {$result.name} |
22 | |
23 |
24 |
25 | | 用户权限 |
26 | 超级管理员普通管理员 |
27 | |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Conf/debug.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | /**
13 | * ThinkPHP 默认的调试模式配置文件
14 | */
15 | defined('THINK_PATH') or exit();
16 | // 调试模式下面默认设置 可以在应用配置目录下重新定义 debug.php 覆盖
17 | return array(
18 | 'LOG_RECORD' => true, // 进行日志记录
19 | 'LOG_EXCEPTION_RECORD' => true, // 是否记录异常信息日志
20 | 'LOG_LEVEL' => 'EMERG,ALERT,CRIT,ERR,WARN,NOTIC,INFO,DEBUG,SQL', // 允许记录的日志级别
21 | 'DB_FIELDS_CACHE' => false, // 字段缓存信息
22 | 'DB_SQL_LOG' => true, // 记录SQL信息
23 | 'TMPL_CACHE_ON' => false, // 是否开启模板编译缓存,设为false则每次都会重新编译
24 | 'TMPL_STRIP_SPACE' => false, // 是否去除模板文件里面的html空格与换行
25 | 'SHOW_ERROR_MSG' => true, // 显示错误信息
26 | 'URL_CASE_INSENSITIVE' => false, // URL区分大小写
27 | );
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Controller/JsonRpcController.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Controller;
12 | /**
13 | * ThinkPHP JsonRPC控制器类
14 | */
15 | class JsonRpcController {
16 |
17 | /**
18 | * 架构函数
19 | * @access public
20 | */
21 | public function __construct() {
22 | //控制器初始化
23 | if(method_exists($this,'_initialize'))
24 | $this->_initialize();
25 | //导入类库
26 | Vendor('jsonRPC.jsonRPCServer');
27 | // 启动server
28 | \jsonRPCServer::handle($this);
29 | }
30 |
31 | /**
32 | * 魔术方法 有不存在的操作的时候执行
33 | * @access public
34 | * @param string $method 方法名
35 | * @param array $args 参数
36 | * @return mixed
37 | */
38 | public function __call($method,$args){}
39 | }
40 |
--------------------------------------------------------------------------------
/code/ThinkPHP/LICENSE.txt:
--------------------------------------------------------------------------------
1 |
2 | ThinkPHP遵循Apache2开源协议发布,并提供免费使用。
3 | 版权所有Copyright © 2006-2014 by ThinkPHP (http://thinkphp.cn)
4 | All rights reserved。
5 | ThinkPHP® 商标和著作权所有者为上海顶想信息科技有限公司。
6 |
7 | Apache Licence是著名的非盈利开源组织Apache采用的协议。
8 | 该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,
9 | 允许代码修改,再作为开源或商业软件发布。需要满足
10 | 的条件:
11 | 1. 需要给代码的用户一份Apache Licence ;
12 | 2. 如果你修改了代码,需要在被修改的文件中说明;
13 | 3. 在延伸的代码中(修改和有源代码衍生的代码中)需要
14 | 带有原来代码中的协议,商标,专利声明和其他原来作者规
15 | 定需要包含的说明;
16 | 4. 如果再发布的产品中包含一个Notice文件,则在Notice文
17 | 件中需要带有本协议内容。你可以在Notice中增加自己的
18 | 许可,但不可以表现为对Apache Licence构成更改。
19 | 具体的协议参考:http://www.apache.org/licenses/LICENSE-2.0
20 |
21 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24 | FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25 | COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26 | INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27 | BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28 | LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31 | ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 | POSSIBILITY OF SUCH DAMAGE.
33 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/template.generate_debug_output.php:
--------------------------------------------------------------------------------
1 | _vars;
12 | ksort($assigned_vars);
13 | if (@is_array($object->_config[0]))
14 | {
15 | $config_vars = $object->_config[0];
16 | ksort($config_vars);
17 | $object->assign("_debug_config_keys", array_keys($config_vars));
18 | $object->assign("_debug_config_vals", array_values($config_vars));
19 | }
20 |
21 | $included_templates = $object->_templatelite_debug_info;
22 |
23 | $object->assign("_debug_keys", array_keys($assigned_vars));
24 | $object->assign("_debug_vals", array_values($assigned_vars));
25 | $object->assign("_debug_tpls", $included_templates);
26 | $object->assign("_templatelite_debug_output", "");
27 |
28 | $object->_templatelite_debug_loop = true;
29 | $object->_templatelite_debug_dir = $object->template_dir;
30 | $object->template_dir = TEMPLATE_LITE_DIR . "internal/";
31 | $debug_output = $object->fetch("debug.tpl");
32 | $object->template_dir = $object->_templatelite_debug_dir;
33 | $object->_templatelite_debug_loop = false;
34 | return $debug_output;
35 | }
36 |
37 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_resource_uncompiled.php:
--------------------------------------------------------------------------------
1 | filepath = false;
38 | $compiled->timestamp = false;
39 | $compiled->exists = false;
40 | }
41 |
42 | }
43 |
44 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/php_xxtea.sln:
--------------------------------------------------------------------------------
1 | Microsoft Visual Studio Solution File, Format Version 9.00
2 | # Visual Studio 2005
3 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "php_xxtea", "php_xxtea.vcproj", "{71165FA5-1EBC-4021-AA17-0CCBC7CD5204}"
4 | EndProject
5 | Global
6 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
7 | Debug_php4|Win32 = Debug_php4|Win32
8 | Debug_php5|Win32 = Debug_php5|Win32
9 | Release_php4|Win32 = Release_php4|Win32
10 | Release_php5|Win32 = Release_php5|Win32
11 | EndGlobalSection
12 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
13 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Debug_php4|Win32.ActiveCfg = Debug_php4|Win32
14 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Debug_php4|Win32.Build.0 = Debug_php4|Win32
15 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Debug_php5|Win32.ActiveCfg = Debug_php5|Win32
16 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Debug_php5|Win32.Build.0 = Debug_php5|Win32
17 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Release_php4|Win32.ActiveCfg = Release_php4|Win32
18 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Release_php4|Win32.Build.0 = Release_php4|Win32
19 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Release_php5|Win32.ActiveCfg = Release_php5|Win32
20 | {71165FA5-1EBC-4021-AA17-0CCBC7CD5204}.Release_php5|Win32.Build.0 = Release_php5|Win32
21 | EndGlobalSection
22 | GlobalSection(SolutionProperties) = preSolution
23 | HideSolutionNode = FALSE
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Hprose/HproseIO.php:
--------------------------------------------------------------------------------
1 | *
20 | * *
21 | \**********************************************************/
22 |
23 | require_once('HproseTags.php');
24 | require_once('HproseClassManager.php');
25 | require_once('HproseReader.php');
26 | require_once('HproseWriter.php');
27 | require_once('HproseFormatter.php');
28 |
29 | ?>
30 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Storage.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think;
12 | // 分布式文件存储类
13 | class Storage {
14 |
15 | /**
16 | * 操作句柄
17 | * @var string
18 | * @access protected
19 | */
20 | static protected $handler ;
21 |
22 | /**
23 | * 连接分布式文件系统
24 | * @access public
25 | * @param string $type 文件类型
26 | * @param array $options 配置数组
27 | * @return void
28 | */
29 | static public function connect($type='File',$options=array()) {
30 | $class = 'Think\\Storage\\Driver\\'.ucwords($type);
31 | self::$handler = new $class($options);
32 | }
33 |
34 | static public function __callstatic($method,$args){
35 | //调用缓存驱动的方法
36 | if(method_exists(self::$handler, $method)){
37 | return call_user_func_array(array(self::$handler,$method), $args);
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/code/Admin/Controller/CommentController.class.php:
--------------------------------------------------------------------------------
1 | assign('id', $_SESSION['id']);
12 | $this -> assign('name', $_SESSION['name']);
13 | $this -> assign('role', $_SESSION['role']);
14 | $fid = 1;
15 | $resultByFront = $front -> where('fid = '.$fid) -> find();
16 | $this -> assign('resultByFront', $resultByFront);
17 | } else {
18 | $this -> error("非法访问,你不是超级管理员!", U('Index/index'));
19 | }
20 | }
21 |
22 | function _empty(){
23 | header("HTTP/1.0 404 Not Found");//使HTTP返回404状态码
24 | $this->display("Public:base");
25 | }
26 |
27 | public function index($keyword = "") {
28 | $comment = D("Api/Comment");
29 |
30 | $result = $comment -> getCommentByKeyword($keyword);
31 | $this -> assign('result', $result);
32 | $this -> display();
33 | }
34 |
35 | public function del($id) {
36 | $comment = D("Api/Comment");
37 |
38 | if($comment -> delete($id)) {
39 | $this -> success("删除评论成功!", U('index'));
40 | } else {
41 | $this -> error("删除评论失败!", 'javascript:history.back();');
42 | }
43 | }
44 |
45 |
46 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Controller/YarController.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Controller;
12 | /**
13 | * ThinkPHP Yar控制器类
14 | */
15 | class YarController {
16 |
17 | /**
18 | * 架构函数
19 | * @access public
20 | */
21 | public function __construct() {
22 | //控制器初始化
23 | if(method_exists($this,'_initialize'))
24 | $this->_initialize();
25 | //判断扩展是否存在
26 | if(!extension_loaded('yar'))
27 | E(L('_NOT_SUPPERT_').':yar');
28 | //实例化Yar_Server
29 | $server = new \Yar_Server($this);
30 | // 启动server
31 | $server->handle();
32 | }
33 |
34 | /**
35 | * 魔术方法 有不存在的操作的时候执行
36 | * @access public
37 | * @param string $method 方法名
38 | * @param array $args 参数
39 | * @return mixed
40 | */
41 | public function __call($method,$args){}
42 | }
43 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/shared.make_timestamp.php:
--------------------------------------------------------------------------------
1 |
11 | * Purpose: used by other smarty functions to make a timestamp from a string.
12 | *
13 | * @author Monte Ohrt
14 | * @param DateTime|int|string $string date object, timestamp or string that can be converted using strtotime()
15 | * @return int
16 | */
17 | function smarty_make_timestamp($string)
18 | {
19 | if (empty($string)) {
20 | // use "now":
21 | return time();
22 | } elseif ($string instanceof DateTime) {
23 | return $string->getTimestamp();
24 | } elseif (strlen($string) == 14 && ctype_digit($string)) {
25 | // it is mysql timestamp format of YYYYMMDDHHMMSS?
26 | return mktime(substr($string, 8, 2),substr($string, 10, 2),substr($string, 12, 2),
27 | substr($string, 4, 2),substr($string, 6, 2),substr($string, 0, 4));
28 | } elseif (is_numeric($string)) {
29 | // it is a numeric string, we handle it as timestamp
30 | return (int) $string;
31 | } else {
32 | // strtotime should handle it
33 | $time = strtotime($string);
34 | if ($time == -1 || $time === false) {
35 | // strtotime() was not able to parse $string, use "now":
36 | return time();
37 | }
38 | return $time;
39 | }
40 | }
41 |
42 | ?>
43 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.unescape.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: unescape
14 | * Purpose: unescape html entities
15 | *
16 | * @author Rodney Rehm
17 | * @param array $params parameters
18 | * @return string with compiled code
19 | */
20 | function smarty_modifiercompiler_unescape($params, $compiler)
21 | {
22 | if (!isset($params[1])) {
23 | $params[1] = 'html';
24 | }
25 | if (!isset($params[2])) {
26 | $params[2] = "SMARTY_RESOURCE_CHAR_SET";
27 | } else {
28 | $params[2] = "'" . $params[2] . "'";
29 | }
30 |
31 | switch (trim($params[1], '"\'')) {
32 | case 'entity':
33 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')';
34 | case 'htmlall':
35 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
36 | return 'mb_convert_encoding(' . $params[0] . ', ' . $params[2] . ', \'HTML-ENTITIES\')';
37 | }
38 | return 'html_entity_decode(' . $params[0] . ', ENT_QUOTES, ' . $params[2] . ')';
39 |
40 | case 'html':
41 | return 'htmlspecialchars_decode(' . $params[0] . ', ENT_QUOTES)';
42 |
43 | default:
44 | return $params[0];
45 | }
46 | }
47 |
48 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Org/Util/Stack.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Org\Util;
12 |
13 | /**
14 | * Stack实现类
15 | * @category ORG
16 | * @package ORG
17 | * @subpackage Util
18 | * @author liu21st
19 | */
20 | class Stack extends ArrayList {
21 |
22 | /**
23 | * 架构函数
24 | * @access public
25 | * @param array $values 初始化数组元素
26 | */
27 | public function __construct($values = array()) {
28 | parent::__construct($values);
29 | }
30 |
31 | /**
32 | * 将堆栈的内部指针指向第一个单元
33 | * @access public
34 | * @return mixed
35 | */
36 | public function peek() {
37 | return reset($this->toArray());
38 | }
39 |
40 | /**
41 | * 元素进栈
42 | * @access public
43 | * @param mixed $value
44 | * @return mixed
45 | */
46 | public function push($value) {
47 | $this->add($value);
48 | return $value;
49 | }
50 |
51 | }
52 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/template.fetch_compile_include.php:
--------------------------------------------------------------------------------
1 | debugging)
12 | {
13 | $object->_templatelite_debug_info[] = array('type' => 'template',
14 | 'filename' => $_templatelite_include_file,
15 | 'depth' => ++$object->_inclusion_depth,
16 | 'exec_time' => array_sum(explode(' ', microtime())) );
17 | $included_tpls_idx = count($object->_templatelite_debug_info) - 1;
18 | }
19 |
20 | $object->_vars = array_merge($object->_vars, $_templatelite_include_vars);
21 | $_templatelite_include_file = $object->_get_resource($_templatelite_include_file);
22 | if(isset($object->_confs[0]))
23 | {
24 | array_unshift($object->_confs, $object->_confs[0]);
25 | $_compiled_output = $object->_fetch_compile($_templatelite_include_file);
26 | array_shift($object->_confs);
27 | }
28 | else
29 | {
30 | $_compiled_output = $object->_fetch_compile($_templatelite_include_file);
31 | }
32 |
33 | $object->_inclusion_depth--;
34 |
35 | if ($object->debugging)
36 | {
37 | $object->_templatelite_debug_info[$included_tpls_idx]['exec_time'] = array_sum(explode(' ', microtime())) - $object->_templatelite_debug_info[$included_tpls_idx]['exec_time'];
38 | }
39 | return $_compiled_output;
40 | }
41 |
42 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Behavior/BrowserCheckBehavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Behavior;
12 | /**
13 | * 浏览器防刷新检测
14 | */
15 | class BrowserCheckBehavior {
16 | public function run(&$params) {
17 | if($_SERVER['REQUEST_METHOD'] == 'GET') {
18 | // 启用页面防刷新机制
19 | $guid = md5($_SERVER['PHP_SELF']);
20 | // 浏览器防刷新的时间间隔(秒) 默认为10
21 | $refleshTime = C('LIMIT_REFLESH_TIMES',null,10);
22 | // 检查页面刷新间隔
23 | if(cookie('_last_visit_time_'.$guid) && cookie('_last_visit_time_'.$guid)>time()-$refleshTime) {
24 | // 页面刷新读取浏览器缓存
25 | header('HTTP/1.1 304 Not Modified');
26 | exit;
27 | }else{
28 | // 缓存当前地址访问时间
29 | cookie('_last_visit_time_'.$guid, $_SERVER['REQUEST_TIME']);
30 | //header('Last-Modified:'.(date('D,d M Y H:i:s',$_SERVER['REQUEST_TIME']-C('LIMIT_REFLESH_TIMES'))).' GMT');
31 | }
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/template.destroy_dir.php:
--------------------------------------------------------------------------------
1 | template_dir = $object->_get_dir($object->template_dir);
32 |
33 | $name = ($object->encode_file_name) ? md5($object->template_dir.$file).'.php' : str_replace(".", "_", str_replace("/", "_", $file)).'.php';
34 | @unlink($dir.$name);
35 | }
36 | else
37 | {
38 | $_args = "";
39 | foreach(explode('|', $id) as $value)
40 | {
41 | $_args .= $value.DIRECTORY_SEPARATOR;
42 | }
43 | template_rm_dir($dir.DIRECTORY_SEPARATOR.$_args);
44 | }
45 | }
46 | }
47 |
48 | function template_rm_dir($dir)
49 | {
50 | if (is_file(substr($dir, 0, -1)))
51 | {
52 | @unlink(substr($dir, 0, -1));
53 | return;
54 | }
55 | if ($d = opendir($dir))
56 | {
57 | while(($f = readdir($d)) !== false)
58 | {
59 | if ($f != '.' && $f != '..')
60 | {
61 | template_rm_dir($dir.$f.DIRECTORY_SEPARATOR, $object);
62 | }
63 | }
64 | @rmdir($dir.$f);
65 | }
66 | }
67 |
68 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/xxtea.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 |
3 | Copyright 2006-2007 Ma Bingyao
4 |
5 | These sources is free software. Redistributions of source code must
6 | retain the above copyright notice. Redistributions in binary form
7 | must reproduce the above copyright notice. You can redistribute it
8 | freely. You can use it with any free or commercial software.
9 |
10 | These sources is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY. Without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 |
14 | You may contact the author by:
15 | e-mail: andot@coolcode.cn
16 |
17 | *************************************************************************/
18 |
19 | #ifndef XXTEA_H
20 | #define XXTEA_H
21 |
22 | #include /* for size_t & NULL declarations */
23 |
24 | #if defined(_MSC_VER)
25 |
26 | typedef unsigned __int32 xxtea_long;
27 |
28 | #else
29 |
30 | #if defined(__FreeBSD__) && __FreeBSD__ < 5
31 | /* FreeBSD 4 doesn't have stdint.h file */
32 | #include
33 | #else
34 | #include
35 | #endif
36 |
37 | typedef uint32_t xxtea_long;
38 |
39 | #endif /* end of if defined(_MSC_VER) */
40 |
41 | #define XXTEA_MX (z >> 5 ^ y << 2) + (y >> 3 ^ z << 4) ^ (sum ^ y) + (k[p & 3 ^ e] ^ z)
42 | #define XXTEA_DELTA 0x9e3779b9
43 |
44 | void xxtea_long_encrypt(xxtea_long *v, xxtea_long len, xxtea_long *k);
45 | void xxtea_long_decrypt(xxtea_long *v, xxtea_long len, xxtea_long *k);
46 |
47 | #endif
48 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Template/Driver/Lite.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Template\Driver;
12 | /**
13 | * TemplateLite模板引擎驱动
14 | */
15 | class Lite {
16 | /**
17 | * 渲染模板输出
18 | * @access public
19 | * @param string $templateFile 模板文件名
20 | * @param array $var 模板变量
21 | * @return void
22 | */
23 | public function fetch($templateFile,$var) {
24 | vendor("TemplateLite.class#template");
25 | $templateFile = substr($templateFile,strlen(THEME_PATH));
26 | $tpl = new \Template_Lite();
27 | $tpl->template_dir = THEME_PATH;
28 | $tpl->compile_dir = CACHE_PATH ;
29 | $tpl->cache_dir = TEMP_PATH ;
30 | if(C('TMPL_ENGINE_CONFIG')) {
31 | $config = C('TMPL_ENGINE_CONFIG');
32 | foreach ($config as $key=>$val){
33 | $tpl->{$key} = $val;
34 | }
35 | }
36 | $tpl->assign($var);
37 | $tpl->display($templateFile);
38 | }
39 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/compile.include.php:
--------------------------------------------------------------------------------
1 | _parse_arguments($arguments);
12 |
13 | $arg_list = array();
14 | if (empty($_args['file']))
15 | {
16 | $object->trigger_error("missing 'file' attribute in include tag", E_USER_ERROR, __FILE__, __LINE__);
17 | }
18 |
19 | foreach ($_args as $arg_name => $arg_value)
20 | {
21 | if ($arg_name == 'file')
22 | {
23 | $include_file = $arg_value;
24 | continue;
25 | }
26 | else if ($arg_name == 'assign')
27 | {
28 | $assign_var = $arg_value;
29 | continue;
30 | }
31 | if (is_bool($arg_value))
32 | {
33 | $arg_value = $arg_value ? 'true' : 'false';
34 | }
35 | $arg_list[] = "'$arg_name' => $arg_value";
36 | }
37 |
38 | if (isset($assign_var))
39 | {
40 | $output = '_vars;' .
41 | "\n\$this->assign(" . $assign_var . ", \$this->_fetch_compile_include(" . $include_file . ", array(".implode(',', (array)$arg_list).")));\n" .
42 | "\$this->_vars = \$_templatelite_tpl_vars;\n" .
43 | "unset(\$_templatelite_tpl_vars);\n" .
44 | ' ?>';
45 | }
46 | else
47 | {
48 | $output = '_vars;' .
49 | "\necho \$this->_fetch_compile_include(" . $include_file . ", array(".implode(',', (array)$arg_list)."));\n" .
50 | "\$this->_vars = \$_templatelite_tpl_vars;\n" .
51 | "unset(\$_templatelite_tpl_vars);\n" .
52 | ' ?>';
53 | }
54 | return $output;
55 | }
56 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Template/Driver/Smarty.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Template\Driver;
12 | /**
13 | * Smarty模板引擎驱动
14 | */
15 | class Smarty {
16 |
17 | /**
18 | * 渲染模板输出
19 | * @access public
20 | * @param string $templateFile 模板文件名
21 | * @param array $var 模板变量
22 | * @return void
23 | */
24 | public function fetch($templateFile,$var) {
25 | $templateFile = substr($templateFile,strlen(THEME_PATH));
26 | vendor('Smarty.Smarty#class');
27 | $tpl = new \Smarty();
28 | $tpl->caching = C('TMPL_CACHE_ON');
29 | $tpl->template_dir = THEME_PATH;
30 | $tpl->compile_dir = CACHE_PATH ;
31 | $tpl->cache_dir = TEMP_PATH ;
32 | if(C('TMPL_ENGINE_CONFIG')) {
33 | $config = C('TMPL_ENGINE_CONFIG');
34 | foreach ($config as $key=>$val){
35 | $tpl->{$key} = $val;
36 | }
37 | }
38 | $tpl->assign($var);
39 | $tpl->display($templateFile);
40 | }
41 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Behavior/RobotCheckBehavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Behavior;
12 | /**
13 | * 机器人检测
14 | * @author liu21st
15 | */
16 | class RobotCheckBehavior {
17 |
18 | public function run(&$params) {
19 | // 机器人访问检测
20 | if(C('LIMIT_ROBOT_VISIT',null,true) && self::isRobot()) {
21 | // 禁止机器人访问
22 | exit('Access Denied');
23 | }
24 | }
25 |
26 | static private function isRobot() {
27 | static $_robot = null;
28 | if(is_null($_robot)) {
29 | $spiders = 'Bot|Crawl|Spider|slurp|sohu-search|lycos|robozilla';
30 | $browsers = 'MSIE|Netscape|Opera|Konqueror|Mozilla';
31 | if(preg_match("/($browsers)/", $_SERVER['HTTP_USER_AGENT'])) {
32 | $_robot = false ;
33 | } elseif(preg_match("/($spiders)/", $_SERVER['HTTP_USER_AGENT'])) {
34 | $_robot = true;
35 | } else {
36 | $_robot = false;
37 | }
38 | }
39 | return $_robot;
40 | }
41 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Template/Driver/Smart.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Template\Driver;
12 | /**
13 | * Smart模板引擎驱动
14 | */
15 | class Smart {
16 | /**
17 | * 渲染模板输出
18 | * @access public
19 | * @param string $templateFile 模板文件名
20 | * @param array $var 模板变量
21 | * @return void
22 | */
23 | public function fetch($templateFile,$var) {
24 | $templateFile = substr($templateFile,strlen(THEME_PATH));
25 | vendor('SmartTemplate.class#smarttemplate');
26 | $tpl = new \SmartTemplate($templateFile);
27 | $tpl->caching = C('TMPL_CACHE_ON');
28 | $tpl->template_dir = THEME_PATH;
29 | $tpl->compile_dir = CACHE_PATH ;
30 | $tpl->cache_dir = TEMP_PATH ;
31 | if(C('TMPL_ENGINE_CONFIG')) {
32 | $config = C('TMPL_ENGINE_CONFIG');
33 | foreach ($config as $key=>$val){
34 | $tpl->{$key} = $val;
35 | }
36 | }
37 | $tpl->assign($var);
38 | $tpl->output();
39 | }
40 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/compile.generate_compiler_debug_output.php:
--------------------------------------------------------------------------------
1 | _vars;\n";
12 | $debug_output .= "ksort(\$assigned_vars);\n";
13 | $debug_output .= "if (@is_array(\$this->_config[0])) {\n";
14 | $debug_output .= " \$config_vars = \$this->_config[0];\n";
15 | $debug_output .= " ksort(\$config_vars);\n";
16 | $debug_output .= " \$this->assign('_debug_config_keys', array_keys(\$config_vars));\n";
17 | $debug_output .= " \$this->assign('_debug_config_vals', array_values(\$config_vars));\n";
18 | $debug_output .= "} \n";
19 |
20 | $debug_output .= "\$included_templates = \$this->_templatelite_debug_info;\n";
21 |
22 | $debug_output .= "\$this->assign('_debug_keys', array_keys(\$assigned_vars));\n";
23 | $debug_output .= "\$this->assign('_debug_vals', array_values(\$assigned_vars));\n";
24 | $debug_output .= "\$this->assign('_debug_tpls', \$included_templates);\n";
25 |
26 | $debug_output .= "\$this->_templatelite_debug_loop = true;\n";
27 | $debug_output .= "\$this->_templatelite_debug_dir = \$this->template_dir;\n";
28 | $debug_output .= "\$this->template_dir = TEMPLATE_LITE_DIR . 'internal/';\n";
29 | $debug_output .= "echo \$this->_fetch_compile('debug.tpl');\n";
30 | $debug_output .= "\$this->template_dir = \$this->_templatelite_debug_dir;\n";
31 | $debug_output .= "\$this->_templatelite_debug_loop = false; \n";
32 | return $debug_output;
33 | }
34 |
35 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Template/Driver/Ease.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Template\Driver;
12 | /**
13 | * EaseTemplate模板引擎驱动
14 | */
15 | class Ease {
16 | /**
17 | * 渲染模板输出
18 | * @access public
19 | * @param string $templateFile 模板文件名
20 | * @param array $var 模板变量
21 | * @return void
22 | */
23 | public function fetch($templateFile,$var) {
24 | $templateFile = substr($templateFile,strlen(THEME_PATH),-5);
25 | $CacheDir = substr(CACHE_PATH,0,-1);
26 | $TemplateDir = substr(THEME_PATH,0,-1);
27 | vendor('EaseTemplate.template#ease');
28 | $config = array(
29 | 'CacheDir' => $CacheDir,
30 | 'TemplateDir' => $TemplateDir,
31 | 'TplType' => 'html'
32 | );
33 | if(C('TMPL_ENGINE_CONFIG')) {
34 | $config = array_merge($config,C('TMPL_ENGINE_CONFIG'));
35 | }
36 | $tpl = new \EaseTemplate($config);
37 | $tpl->set_var($var);
38 | $tpl->set_file($templateFile);
39 | $tpl->p();
40 | }
41 | }
--------------------------------------------------------------------------------
/code/Admin/View/Index/updpsd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 修改密码
4 |
5 | 首页
6 | 修改密码
7 |
8 |
9 |
51 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Mode/Sae/convention.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | /**
13 | * SAE模式惯例配置文件
14 | * 该文件请不要修改,如果要覆盖惯例配置的值,可在应用配置文件中设定和惯例不符的配置项
15 | * 配置名称大小写任意,系统会统一转换成小写
16 | * 所有配置参数都可以在生效前动态改变
17 | */
18 | defined('THINK_PATH') or exit();
19 | $st = new SaeStorage();
20 | return array(
21 | //SAE下固定mysql配置
22 | 'DB_TYPE' => 'mysql', // 数据库类型
23 | 'DB_DEPLOY_TYPE' => 1,
24 | 'DB_RW_SEPARATE' => true,
25 | 'DB_HOST' => SAE_MYSQL_HOST_M.','.SAE_MYSQL_HOST_S, // 服务器地址
26 | 'DB_NAME' => SAE_MYSQL_DB, // 数据库名
27 | 'DB_USER' => SAE_MYSQL_USER, // 用户名
28 | 'DB_PWD' => SAE_MYSQL_PASS, // 密码
29 | 'DB_PORT' => SAE_MYSQL_PORT, // 端口
30 | //更改模板替换变量,让普通能在所有平台下显示
31 | 'TMPL_PARSE_STRING' => array(
32 | // __PUBLIC__/upload --> /Public/upload -->http://appname-public.stor.sinaapp.com/upload
33 | '/Public/upload' => $st->getUrl('public','upload')
34 | ),
35 | 'LOG_TYPE' => 'Sae',
36 | 'DATA_CACHE_TYPE' => 'Memcachesae',
37 | 'CHECK_APP_DIR' => false,
38 | );
39 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/php_xxtea.h:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 |
3 | Copyright 2006-2007 Ma Bingyao
4 |
5 | These sources is free software. Redistributions of source code must
6 | retain the above copyright notice. Redistributions in binary form
7 | must reproduce the above copyright notice. You can redistribute it
8 | freely. You can use it with any free or commercial software.
9 |
10 | These sources is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY. Without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 |
14 | You may contact the author by:
15 | e-mail: andot@coolcode.cn
16 |
17 | *************************************************************************/
18 |
19 | #ifndef PHP_XXTEA_H
20 | #define PHP_XXTEA_H
21 |
22 | #ifdef HAVE_CONFIG_H
23 | #include "config.h"
24 | #endif
25 |
26 | #if HAVE_XXTEA
27 | extern zend_module_entry xxtea_module_entry;
28 | #define phpext_xxtea_ptr &xxtea_module_entry
29 |
30 | #define XXTEA_MODULE_NAME "xxtea"
31 | #define XXTEA_BUILD_DATE __DATE__ " " __TIME__
32 | #define XXTEA_VERSION "1.0.3"
33 | #define XXTEA_AUTHOR "Ma Bingyao"
34 | #define XXTEA_HOMEPAGE "http://www.coolcode.cn/?p=209"
35 |
36 | ZEND_MINIT_FUNCTION(xxtea);
37 | ZEND_MSHUTDOWN_FUNCTION(xxtea);
38 | ZEND_MINFO_FUNCTION(xxtea);
39 |
40 | /* declaration of functions to be exported */
41 | ZEND_FUNCTION(xxtea_encrypt);
42 | ZEND_FUNCTION(xxtea_decrypt);
43 | ZEND_FUNCTION(xxtea_info);
44 |
45 | #else /* if HAVE_XXTEA */
46 | #define phpext_xxtea_ptr NULL
47 | #endif
48 |
49 | #endif /* ifndef PHP_XXTEA_H */
50 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Mode/api.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | /**
13 | * ThinkPHP API模式定义
14 | */
15 | return array(
16 | // 配置文件
17 | 'config' => array(
18 | THINK_PATH.'Conf/convention.php', // 系统惯例配置
19 | CONF_PATH.'config'.CONF_EXT, // 应用公共配置
20 | ),
21 |
22 | // 别名定义
23 | 'alias' => array(
24 | 'Think\Exception' => CORE_PATH . 'Exception'.EXT,
25 | 'Think\Model' => CORE_PATH . 'Model'.EXT,
26 | 'Think\Db' => CORE_PATH . 'Db'.EXT,
27 | 'Think\Cache' => CORE_PATH . 'Cache'.EXT,
28 | 'Think\Cache\Driver\File' => CORE_PATH . 'Cache/Driver/File'.EXT,
29 | 'Think\Storage' => CORE_PATH . 'Storage'.EXT,
30 | ),
31 |
32 | // 函数和类文件
33 | 'core' => array(
34 | MODE_PATH.'Api/functions.php',
35 | COMMON_PATH.'Common/function.php',
36 | MODE_PATH . 'Api/App'.EXT,
37 | MODE_PATH . 'Api/Dispatcher'.EXT,
38 | MODE_PATH . 'Api/Controller'.EXT,
39 | CORE_PATH . 'Behavior'.EXT,
40 | ),
41 | // 行为扩展定义
42 | 'tags' => array(
43 | ),
44 | );
45 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/shared.mb_unicode.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/Admin/View/User/del.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {$result.username}的详情
4 |
5 | 账户管理
6 | {$result.username}的详情
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | | ID |
16 | {$result.uid} |
17 | |
18 |
19 |
20 | | 用户名 |
21 | {$result.username} |
22 | |
23 |
24 |
25 | | 电子邮箱 |
26 | {$result.email} |
27 | |
28 |
29 |
30 | | 登录IP |
31 | {$result.loginip} |
32 | |
33 |
34 |
35 | | 登录时间 |
36 | {$result.logintime} |
37 | |
38 |
39 |
40 | | 收藏店铺ID |
41 | {$result.favorite} |
42 | |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
56 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/compile.compile_custom_block.php:
--------------------------------------------------------------------------------
1 | _plugin_exists($function, "block"))
22 | {
23 | if ($start_tag)
24 | {
25 | $_args = $object->_parse_arguments($arguments);
26 | foreach($_args as $key => $value)
27 | {
28 | if (is_bool($value))
29 | {
30 | $value = $value ? 'true' : 'false';
31 | }
32 | if (is_null($value))
33 | {
34 | $value = 'null';
35 | }
36 | $_args[$key] = "'$key' => $value";
37 | }
38 | $_result = "_tag_stack[] = array('$function', array(".implode(',', (array)$_args).")); ";
39 | $_result .= $function . '(array(' . implode(',', (array)$_args) .'), null, $this); ';
40 | $_result .= 'ob_start(); ?>';
41 | }
42 | else
43 | {
44 | $_result .= '_block_content = ob_get_contents(); ob_end_clean(); ';
45 | $_result .= '$this->_block_content = ' . $function . '($this->_tag_stack[count($this->_tag_stack) - 1][1], $this->_block_content, $this); ';
46 | if (!empty($modifiers))
47 | {
48 | $_result .= '$this->_block_content = ' . $object->_parse_modifier('$this->_block_content', $modifiers) . '; ';
49 | }
50 | $_result .= 'echo $this->_block_content; array_pop($this->_tag_stack); ?>';
51 | }
52 | return true;
53 | }
54 | else
55 | {
56 | return false;
57 | }
58 | }
59 |
60 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Tpl/dispatch_jump.tpl:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
11 | 跳转提示
12 |
22 |
23 |
24 |
25 |
26 |
:)
27 |
28 |
29 |
:(
30 |
31 |
32 |
33 |
34 | 页面自动 跳转 等待时间:
35 |
36 |
37 |
49 |
50 |
51 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_append.php:
--------------------------------------------------------------------------------
1 | required_attributes = array('var', 'value');
32 | $this->shorttag_order = array('var', 'value');
33 | $this->optional_attributes = array('scope', 'index');
34 | // check and get attributes
35 | $_attr = $this->getAttributes($compiler, $args);
36 | // map to compile assign attributes
37 | if (isset($_attr['index'])) {
38 | $_params['smarty_internal_index'] = '[' . $_attr['index'] . ']';
39 | unset($_attr['index']);
40 | } else {
41 | $_params['smarty_internal_index'] = '[]';
42 | }
43 | $_new_attr = array();
44 | foreach ($_attr as $key => $value) {
45 | $_new_attr[] = array($key => $value);
46 | }
47 | // call compile assign
48 | return parent::compile($_new_attr, $compiler, $_params);
49 | }
50 |
51 | }
52 |
53 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifier.regex_replace.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: regex_replace
14 | * Purpose: regular expression search/replace
15 | *
16 | * @link http://smarty.php.net/manual/en/language.modifier.regex.replace.php
17 | * regex_replace (Smarty online manual)
18 | * @author Monte Ohrt
19 | * @param string $string input string
20 | * @param string|array $search regular expression(s) to search for
21 | * @param string|array $replace string(s) that should be replaced
22 | * @return string
23 | */
24 | function smarty_modifier_regex_replace($string, $search, $replace)
25 | {
26 | if(is_array($search)) {
27 | foreach($search as $idx => $s) {
28 | $search[$idx] = _smarty_regex_replace_check($s);
29 | }
30 | } else {
31 | $search = _smarty_regex_replace_check($search);
32 | }
33 | return preg_replace($search, $replace, $string);
34 | }
35 |
36 | /**
37 | * @param string $search string(s) that should be replaced
38 | * @return string
39 | * @ignore
40 | */
41 | function _smarty_regex_replace_check($search)
42 | {
43 | // null-byte injection detection
44 | // anything behind the first null-byte is ignored
45 | if (($pos = strpos($search,"\0")) !== false) {
46 | $search = substr($search,0,$pos);
47 | }
48 | // remove eval-modifier from $search
49 | if (preg_match('!([a-zA-Z\s]+)$!s', $search, $match) && (strpos($match[1], 'e') !== false)) {
50 | $search = substr($search, 0, -strlen($match[1])) . preg_replace('![e\s]+!', '', $match[1]);
51 | }
52 | return $search;
53 | }
54 |
55 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.wordwrap.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: wordwrap
14 | * Purpose: wrap a string of text at a given length
15 | *
16 | * @link http://smarty.php.net/manual/en/language.modifier.wordwrap.php wordwrap (Smarty online manual)
17 | * @author Uwe Tews
18 | * @param array $params parameters
19 | * @return string with compiled code
20 | */
21 | function smarty_modifiercompiler_wordwrap($params, $compiler)
22 | {
23 | if (!isset($params[1])) {
24 | $params[1] = 80;
25 | }
26 | if (!isset($params[2])) {
27 | $params[2] = '"\n"';
28 | }
29 | if (!isset($params[3])) {
30 | $params[3] = 'false';
31 | }
32 | $function = 'wordwrap';
33 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
34 | if ($compiler->tag_nocache | $compiler->nocache) {
35 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php';
36 | $compiler->template->required_plugins['nocache']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';
37 | } else {
38 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['file'] = SMARTY_PLUGINS_DIR .'shared.mb_wordwrap.php';
39 | $compiler->template->required_plugins['compiled']['wordwrap']['modifier']['function'] = 'smarty_mb_wordwrap';
40 | }
41 | $function = 'smarty_mb_wordwrap';
42 | }
43 | return $function . '(' . $params[0] . ',' . $params[1] . ',' . $params[2] . ',' . $params[3] . ')';
44 | }
45 |
46 | ?>
--------------------------------------------------------------------------------
/code/Admin/View/Type/upd.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 编辑类别
4 |
5 | 类别管理
6 | 编辑类别
7 |
8 |
9 |
10 |
54 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Crypt.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think;
12 | /**
13 | * 加密解密类
14 | */
15 | class Crypt {
16 |
17 | private static $handler = '';
18 |
19 | public static function init($type=''){
20 | $type = $type?:C('DATA_CRYPT_TYPE');
21 | $class = strpos($type,'\\')? $type: 'Think\\Crypt\\Driver\\'. ucwords(strtolower($type));
22 | self::$handler = $class;
23 | }
24 |
25 | /**
26 | * 加密字符串
27 | * @param string $str 字符串
28 | * @param string $key 加密key
29 | * @param integer $expire 有效期(秒) 0 为永久有效
30 | * @return string
31 | */
32 | public static function encrypt($data,$key,$expire=0){
33 | if(empty(self::$handler)){
34 | self::init();
35 | }
36 | $class = self::$handler;
37 | return $class::encrypt($data,$key,$expire);
38 | }
39 |
40 | /**
41 | * 解密字符串
42 | * @param string $str 字符串
43 | * @param string $key 加密key
44 | * @return string
45 | */
46 | public static function decrypt($data,$key){
47 | if(empty(self::$handler)){
48 | self::init();
49 | }
50 | $class = self::$handler;
51 | return $class::decrypt($data,$key);
52 | }
53 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Log/Driver/Sae.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace Think\Log\Driver;
13 |
14 | class Sae {
15 |
16 | protected $config = array(
17 | 'log_time_format' => ' c ',
18 | );
19 |
20 | // 实例化并传入参数
21 | public function __construct($config=array()){
22 | $this->config = array_merge($this->config,$config);
23 | }
24 |
25 | /**
26 | * 日志写入接口
27 | * @access public
28 | * @param string $log 日志信息
29 | * @param string $destination 写入目标
30 | * @return void
31 | */
32 | public function write($log,$destination='') {
33 | static $is_debug=null;
34 | $now = date($this->config['log_time_format']);
35 | $logstr="[{$now}] ".$_SERVER['REMOTE_ADDR'].' '.$_SERVER['REQUEST_URI']."\r\n{$log}\r\n";
36 | if(is_null($is_debug)){
37 | preg_replace('@(\w+)\=([^;]*)@e', '$appSettings[\'\\1\']="\\2";', $_SERVER['HTTP_APPCOOKIE']);
38 | $is_debug = in_array($_SERVER['HTTP_APPVERSION'], explode(',', $appSettings['debug'])) ? true : false;
39 | }
40 | if($is_debug)
41 | sae_set_display_errors(false);//记录日志不将日志打印出来
42 | sae_debug($logstr);
43 | if($is_debug)
44 | sae_set_display_errors(true);
45 |
46 | }
47 | }
48 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/xxtea.c:
--------------------------------------------------------------------------------
1 | /***********************************************************************
2 |
3 | Copyright 2006-2007 Ma Bingyao
4 |
5 | These sources is free software. Redistributions of source code must
6 | retain the above copyright notice. Redistributions in binary form
7 | must reproduce the above copyright notice. You can redistribute it
8 | freely. You can use it with any free or commercial software.
9 |
10 | These sources is distributed in the hope that it will be useful,
11 | but WITHOUT ANY WARRANTY. Without even the implied warranty of
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
13 |
14 | You may contact the author by:
15 | e-mail: andot@coolcode.cn
16 |
17 | *************************************************************************/
18 | #include "xxtea.h"
19 |
20 | void xxtea_long_encrypt(xxtea_long *v, xxtea_long len, xxtea_long *k) {
21 | xxtea_long n = len - 1;
22 | xxtea_long z = v[n], y = v[0], p, q = 6 + 52 / (n + 1), sum = 0, e;
23 | if (n < 1) {
24 | return;
25 | }
26 | while (0 < q--) {
27 | sum += XXTEA_DELTA;
28 | e = sum >> 2 & 3;
29 | for (p = 0; p < n; p++) {
30 | y = v[p + 1];
31 | z = v[p] += XXTEA_MX;
32 | }
33 | y = v[0];
34 | z = v[n] += XXTEA_MX;
35 | }
36 | }
37 |
38 | void xxtea_long_decrypt(xxtea_long *v, xxtea_long len, xxtea_long *k) {
39 | xxtea_long n = len - 1;
40 | xxtea_long z = v[n], y = v[0], p, q = 6 + 52 / (n + 1), sum = q * XXTEA_DELTA, e;
41 | if (n < 1) {
42 | return;
43 | }
44 | while (sum != 0) {
45 | e = sum >> 2 & 3;
46 | for (p = n; p > 0; p--) {
47 | z = v[p - 1];
48 | y = v[p] -= XXTEA_MX;
49 | }
50 | z = v[n];
51 | y = v[0] -= XXTEA_MX;
52 | sum -= XXTEA_DELTA;
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/shared.escape_special_chars.php:
--------------------------------------------------------------------------------
1 | =')) {
10 | /**
11 | * escape_special_chars common function
12 | *
13 | * Function: smarty_function_escape_special_chars
14 | * Purpose: used by other smarty functions to escape
15 | * special chars except for already escaped ones
16 | *
17 | * @author Monte Ohrt
18 | * @param string $string text that should by escaped
19 | * @return string
20 | */
21 | function smarty_function_escape_special_chars($string)
22 | {
23 | if (!is_array($string)) {
24 | $string = htmlspecialchars($string, ENT_COMPAT, SMARTY_RESOURCE_CHAR_SET, false);
25 | }
26 | return $string;
27 | }
28 | } else {
29 | /**
30 | * escape_special_chars common function
31 | *
32 | * Function: smarty_function_escape_special_chars
33 | * Purpose: used by other smarty functions to escape
34 | * special chars except for already escaped ones
35 | *
36 | * @author Monte Ohrt
37 | * @param string $string text that should by escaped
38 | * @return string
39 | */
40 | function smarty_function_escape_special_chars($string)
41 | {
42 | if (!is_array($string)) {
43 | $string = preg_replace('!&(#?\w+);!', '%%%SMARTY_START%%%\\1%%%SMARTY_END%%%', $string);
44 | $string = htmlspecialchars($string);
45 | $string = str_replace(array('%%%SMARTY_START%%%', '%%%SMARTY_END%%%'), array('&', ';'), $string);
46 | }
47 | return $string;
48 | }
49 | }
50 |
51 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Behavior/ContentReplaceBehavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Behavior;
12 | /**
13 | * 系统行为扩展:模板内容输出替换
14 | */
15 | class ContentReplaceBehavior {
16 |
17 | // 行为扩展的执行入口必须是run
18 | public function run(&$content){
19 | $content = $this->templateContentReplace($content);
20 | }
21 |
22 | /**
23 | * 模板内容替换
24 | * @access protected
25 | * @param string $content 模板内容
26 | * @return string
27 | */
28 | protected function templateContentReplace($content) {
29 | // 系统默认的特殊变量替换
30 | $replace = array(
31 | '__ROOT__' => __ROOT__, // 当前网站地址
32 | '__APP__' => __APP__, // 当前应用地址
33 | '__MODULE__' => __MODULE__,
34 | '__ACTION__' => __ACTION__, // 当前操作地址
35 | '__SELF__' => __SELF__, // 当前页面地址
36 | '__CONTROLLER__'=> __CONTROLLER__,
37 | '__URL__' => __CONTROLLER__,
38 | '__PUBLIC__' => __ROOT__.'/Public',// 站点公共目录
39 | );
40 | // 允许用户自定义模板的字符串替换
41 | if(is_array(C('TMPL_PARSE_STRING')) )
42 | $replace = array_merge($replace,C('TMPL_PARSE_STRING'));
43 | $content = str_replace(array_keys($replace),array_values($replace),$content);
44 | return $content;
45 | }
46 |
47 | }
--------------------------------------------------------------------------------
/code/Admin/View/Type/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 类别列表
4 |
5 | 类别管理
6 | 类别列表
7 |
8 |
9 |
10 |
11 |
12 |
46 |
47 |
48 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/compile.parse_is_expr.php:
--------------------------------------------------------------------------------
1 | _parse_variable($expr_arg) . "))";
30 | }
31 | else
32 | {
33 | $expr = "!(1 & $is_arg)";
34 | }
35 | break;
36 |
37 | case 'odd':
38 | if (isset($_args[$expr_end]) && $_args[$expr_end] == 'by')
39 | {
40 | $expr_end++;
41 | $expr_arg = $_args[$expr_end++];
42 | $expr = "(1 & ($is_arg / " . $object->_parse_variable($expr_arg) . "))";
43 | }
44 | else
45 | {
46 | $expr = "(1 & $is_arg)";
47 | }
48 | break;
49 |
50 | case 'div':
51 | if (@$_args[$expr_end] == 'by')
52 | {
53 | $expr_end++;
54 | $expr_arg = $_args[$expr_end++];
55 | $expr = "!($is_arg % " . $object->_parse_variable($expr_arg) . ")";
56 | }
57 | else
58 | {
59 | $object->trigger_error("expecting 'by' after 'div'", E_USER_ERROR, __FILE__, __LINE__);
60 | }
61 | break;
62 |
63 | default:
64 | $object->trigger_error("unknown 'is' expression - '$expr_type'", E_USER_ERROR, __FILE__, __LINE__);
65 | break;
66 | }
67 |
68 | if ($negate_expr) {
69 | $expr = "!($expr)";
70 | }
71 |
72 | array_splice($_args, 0, $expr_end, $expr);
73 |
74 | return $_args;
75 | }
76 |
77 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Log/Driver/File.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | namespace Think\Log\Driver;
13 |
14 | class File {
15 |
16 | protected $config = array(
17 | 'log_time_format' => ' c ',
18 | 'log_file_size' => 2097152,
19 | 'log_path' => '',
20 | );
21 |
22 | // 实例化并传入参数
23 | public function __construct($config=array()){
24 | $this->config = array_merge($this->config,$config);
25 | }
26 |
27 | /**
28 | * 日志写入接口
29 | * @access public
30 | * @param string $log 日志信息
31 | * @param string $destination 写入目标
32 | * @return void
33 | */
34 | public function write($log,$destination='') {
35 | $now = date($this->config['log_time_format']);
36 | if(empty($destination))
37 | $destination = $this->config['log_path'].date('y_m_d').'.log';
38 | if(!is_dir($this->config['log_path'])) {
39 | mkdir($this->config['log_path'],0755,true);
40 | }
41 | //检测日志文件大小,超过配置大小则备份日志文件重新生成
42 | if(is_file($destination) && floor($this->config['log_file_size']) <= filesize($destination) )
43 | rename($destination,dirname($destination).'/'.time().'-'.basename($destination));
44 | error_log("[{$now}] ".$_SERVER['REMOTE_ADDR'].' '.$_SERVER['REQUEST_URI']."\r\n{$log}\r\n", 3,$destination);
45 | }
46 | }
47 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Tpl/think_exception.tpl:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 | 系统发生错误
10 |
26 |
27 |
28 |
29 |
:(
30 |
31 |
32 |
33 |
34 |
35 |
错误位置
36 |
37 |
40 |
41 |
42 |
43 |
44 |
45 |
TRACE
46 |
47 |
50 |
51 |
52 |
53 |
54 |
55 |
ThinkPHP { Fast & Simple OOP PHP Framework } -- [ WE CAN DO IT JUST THINK ]
56 |
57 |
58 |
59 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_nocache_insert.php:
--------------------------------------------------------------------------------
1 | assign('{$_assign}' , {$_function} (" . var_export($_attr, true) . ",\$_smarty_tpl), true);?>";
41 | } else {
42 | $_output .= "echo {$_function}(" . var_export($_attr, true) . ",\$_smarty_tpl);?>";
43 | }
44 | $_tpl = $_template;
45 | while ($_tpl->parent instanceof Smarty_Internal_Template) {
46 | $_tpl = $_tpl->parent;
47 | }
48 | return "/*%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/" . $_output . "/*/%%SmartyNocache:{$_tpl->properties['nocache_hash']}%%*/";
49 | }
50 |
51 | }
52 |
53 | ?>
54 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Hprose/HproseFormatter.php:
--------------------------------------------------------------------------------
1 | *
20 | * *
21 | \**********************************************************/
22 |
23 | require_once('HproseIOStream.php');
24 | require_once('HproseReader.php');
25 | require_once('HproseWriter.php');
26 |
27 | class HproseFormatter {
28 | public static function serialize(&$var, $simple = false) {
29 | $stream = new HproseStringStream();
30 | $hproseWriter = ($simple ? new HproseSimpleWriter($stream) : new HproseWriter($stream));
31 | $hproseWriter->serialize($var);
32 | return $stream->toString();
33 | }
34 | public static function &unserialize($data, $simple = false) {
35 | $stream = new HproseStringStream($data);
36 | $hproseReader = ($simple ? new HproseSimpleReader($stream) : new HproseReader($stream));
37 | return $hproseReader->unserialize();
38 | }
39 | }
40 | ?>
41 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/shared.mb_str_replace.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Think/Controller/RpcController.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Controller;
12 | /**
13 | * ThinkPHP RPC控制器类
14 | */
15 | class RpcController {
16 |
17 | protected $allowMethodList = '';
18 | protected $debug = false;
19 |
20 | /**
21 | * 架构函数
22 | * @access public
23 | */
24 | public function __construct() {
25 | //控制器初始化
26 | if(method_exists($this,'_initialize'))
27 | $this->_initialize();
28 | //导入类库
29 | Vendor('phpRPC.phprpc_server');
30 | //实例化phprpc
31 | $server = new \PHPRPC_Server();
32 | if($this->allowMethodList){
33 | $methods = $this->allowMethodList;
34 | }else{
35 | $methods = get_class_methods($this);
36 | $methods = array_diff($methods,array('__construct','__call','_initialize'));
37 | }
38 | $server->add($methods,$this);
39 |
40 | if(APP_DEBUG || $this->debug ) {
41 | $server->setDebugMode(true);
42 | }
43 | $server->setEnableGZIP(true);
44 | $server->start();
45 | echo $server->comment();
46 | }
47 |
48 | /**
49 | * 魔术方法 有不存在的操作的时候执行
50 | * @access public
51 | * @param string $method 方法名
52 | * @param array $args 参数
53 | * @return mixed
54 | */
55 | public function __call($method,$args){}
56 | }
57 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/spyc/tests/IndentTest.php:
--------------------------------------------------------------------------------
1 | Y = Spyc::YAMLLoad("indent_1.yaml");
11 | }
12 |
13 | public function testIndent_1() {
14 | $this->assertEquals (array ('child_1' => 2, 'child_2' => 0, 'child_3' => 1), $this->Y['root']);
15 | }
16 |
17 | public function testIndent_2() {
18 | $this->assertEquals (array ('child_1' => 1, 'child_2' => 2), $this->Y['root2']);
19 | }
20 |
21 | public function testIndent_3() {
22 | $this->assertEquals (array (array ('resolutions' => array (1024 => 768, 1920 => 1200), 'producer' => 'Nec')), $this->Y['display']);
23 | }
24 |
25 | public function testIndent_4() {
26 | $this->assertEquals (array (
27 | array ('resolutions' => array (1024 => 768)),
28 | array ('resolutions' => array (1920 => 1200)),
29 | ), $this->Y['displays']);
30 | }
31 |
32 | public function testIndent_5() {
33 | $this->assertEquals (array (array (
34 | 'row' => 0,
35 | 'col' => 0,
36 | 'headsets_affected' => array (
37 | array (
38 | 'ports' => array (0),
39 | 'side' => 'left',
40 | )
41 | ),
42 | 'switch_function' => array (
43 | 'ics_ptt' => true
44 | )
45 | )), $this->Y['nested_hashes_and_seqs']);
46 | }
47 |
48 | public function testIndent_6() {
49 | $this->assertEquals (array (
50 | 'h' => array (
51 | array ('a' => 'b', 'a1' => 'b1'),
52 | array ('c' => 'd')
53 | )
54 | ), $this->Y['easier_nest']);
55 | }
56 |
57 | public function testIndent_space() {
58 | $this->assertEquals ("By four\n spaces", $this->Y['one_space']);
59 | }
60 |
61 | public function testListAndComment() {
62 | $this->assertEquals (array ('one', 'two', 'three'), $this->Y['list_and_comment']);
63 | }
64 |
65 | }
66 |
--------------------------------------------------------------------------------
/code/Admin/View/User/add.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | 添加用户
4 |
5 | 账号管理
6 | 添加用户
7 |
8 |
9 |
63 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/TemplateLite/internal/compile.compile_config.php:
--------------------------------------------------------------------------------
1 | _var_bracket_regexp . ')|\.\$?\w+|\S+!', $variable, $_match);
18 | $variable = $_match[0];
19 | $var_name = array_shift($variable);
20 |
21 | $_result = "\$this->_confs['$var_name']";
22 | foreach ($variable as $var)
23 | {
24 | if ($var{0} == '[')
25 | {
26 | $var = substr($var, 1, -1);
27 | if (is_numeric($var))
28 | {
29 | $_result .= "[$var]";
30 | }
31 | elseif ($var{0} == '$')
32 | {
33 | $_result .= "[" . $object->_compile_variable($var) . "]";
34 | }
35 | elseif ($var{0} == '#')
36 | {
37 | $_result .= "[" . $object->_compile_config($var) . "]";
38 | }
39 | else
40 | {
41 | $_result .= "['$var']";
42 | }
43 | }
44 | else if ($var{0} == '.')
45 | {
46 | if ($var{1} == '$')
47 | {
48 | $_result .= "[\$this->_TPL['" . substr($var, 2) . "']]";
49 | }
50 | else
51 | {
52 | $_result .= "['" . substr($var, 1) . "']";
53 | }
54 | }
55 | else if (substr($var,0,2) == '->')
56 | {
57 | if(substr($var,2,2) == '__')
58 | {
59 | $object->trigger_error('call to internal object members is not allowed', E_USER_ERROR, __FILE__, __LINE__);
60 | }
61 | else if (substr($var, 2, 1) == '$')
62 | {
63 | $_output .= '->{(($var=$this->_TPL[\''.substr($var,3).'\']) && substr($var,0,2)!=\'__\') ? $_var : $this->trigger_error("cannot access property \\"$var\\"")}';
64 | }
65 | }
66 | else
67 | {
68 | $object->trigger_error('#' . $var_name.implode('', $variable) . '# is an invalid reference', E_USER_ERROR, __FILE__, __LINE__);
69 | }
70 | }
71 | return $_result;
72 | }
73 |
74 | ?>
--------------------------------------------------------------------------------
/code/Api/Model/CommentModel.class.php:
--------------------------------------------------------------------------------
1 | where('id='.$aid ) -> setInc('comment_count');
19 |
20 | return $this -> add($data);
21 | }
22 |
23 | public function getCommentByKeyword($keyword) {
24 | $User = D('Api/User');
25 | $Articles = D('Api/Articles');
26 |
27 | $data['content'] = array('like','%'.$keyword.'%');
28 | $result = $this -> where($data) -> select();
29 | foreach($result as $key=>$value) {
30 | $result[$key]['username'] = $User -> getUsernameByUid($result[$key]['uid']);
31 | $result[$key]['shopname'] = $Articles -> getShopnameByid($result[$key]['aid']);
32 | }
33 | return $result;
34 | }
35 |
36 | public function getCommentByAid($aid) {
37 | $User = D('User');
38 | $Articles = D('Articles');
39 |
40 | $result = $this -> where("aid=".$aid) -> select();
41 | foreach($result as $key=>$value) {
42 | $result[$key]['username'] = $User -> getUsernameByUid($result[$key]['uid']);
43 | // $result[$key]['shopname'] = $Articles -> getShopnameByid($result[$key]['aid']);
44 | }
45 | return $result;
46 | }
47 |
48 | public function getCommentByUid($uid) {
49 | $User = D('User');
50 | $Articles = D('Articles');
51 |
52 | $result = $this -> where("uid=".$uid) -> select();
53 | foreach($result as $key=>$value) {
54 | // $result[$key]['username'] = $User -> getUsernameByUid($result[$key]['uid']);
55 | $result[$key]['shopname'] = $Articles -> getShopnameByid($result[$key]['aid']);
56 | }
57 | return $result;
58 | }
59 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/plugins/function.counter.php:
--------------------------------------------------------------------------------
1 |
12 | * Name: counter
13 | * Purpose: print out a counter value
14 | *
15 | * @author Monte Ohrt
16 | * @link http://www.smarty.net/manual/en/language.function.counter.php {counter}
17 | * (Smarty online manual)
18 | * @param array $params parameters
19 | * @param Smarty_Internal_Template $template template object
20 | * @return string|null
21 | */
22 | function smarty_function_counter($params, $template)
23 | {
24 | static $counters = array();
25 |
26 | $name = (isset($params['name'])) ? $params['name'] : 'default';
27 | if (!isset($counters[$name])) {
28 | $counters[$name] = array(
29 | 'start'=>1,
30 | 'skip'=>1,
31 | 'direction'=>'up',
32 | 'count'=>1
33 | );
34 | }
35 | $counter =& $counters[$name];
36 |
37 | if (isset($params['start'])) {
38 | $counter['start'] = $counter['count'] = (int)$params['start'];
39 | }
40 |
41 | if (!empty($params['assign'])) {
42 | $counter['assign'] = $params['assign'];
43 | }
44 |
45 | if (isset($counter['assign'])) {
46 | $template->assign($counter['assign'], $counter['count']);
47 | }
48 |
49 | if (isset($params['print'])) {
50 | $print = (bool)$params['print'];
51 | } else {
52 | $print = empty($counter['assign']);
53 | }
54 |
55 | if ($print) {
56 | $retval = $counter['count'];
57 | } else {
58 | $retval = null;
59 | }
60 |
61 | if (isset($params['skip'])) {
62 | $counter['skip'] = $params['skip'];
63 | }
64 |
65 | if (isset($params['direction'])) {
66 | $counter['direction'] = $params['direction'];
67 | }
68 |
69 | if ($counter['direction'] == "down")
70 | $counter['count'] -= $counter['skip'];
71 | else
72 | $counter['count'] += $counter['skip'];
73 |
74 | return $retval;
75 |
76 | }
77 |
78 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_nocache.php:
--------------------------------------------------------------------------------
1 | getAttributes($compiler, $args);
32 | if ($_attr['nocache'] === true) {
33 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
34 | }
35 | // enter nocache mode
36 | $compiler->nocache = true;
37 | // this tag does not return compiled code
38 | $compiler->has_code = false;
39 | return true;
40 | }
41 |
42 | }
43 |
44 | /**
45 | * Smarty Internal Plugin Compile Nocacheclose Class
46 | *
47 | * @package Smarty
48 | * @subpackage Compiler
49 | */
50 | class Smarty_Internal_Compile_Nocacheclose extends Smarty_Internal_CompileBase {
51 |
52 | /**
53 | * Compiles code for the {/nocache} tag
54 | *
55 | * This tag does not generate compiled output. It only sets a compiler flag.
56 | *
57 | * @param array $args array with attributes from parser
58 | * @param object $compiler compiler object
59 | * @return bool
60 | */
61 | public function compile($args, $compiler)
62 | {
63 | $_attr = $this->getAttributes($compiler, $args);
64 | // leave nocache mode
65 | $compiler->nocache = false;
66 | // this tag does not return compiled code
67 | $compiler->has_code = false;
68 | return true;
69 | }
70 |
71 | }
72 |
73 | ?>
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Boris/Config.php:
--------------------------------------------------------------------------------
1 | _cascade = $cascade;
38 | $this->_searchPaths = $searchPaths;
39 | }
40 |
41 | /**
42 | * Searches for configuration files in the available
43 | * search paths, and applies them to the provided
44 | * boris instance.
45 | *
46 | * Returns true if any configuration files were found.
47 | *
48 | * @param Boris\Boris $boris
49 | * @return bool
50 | */
51 | public function apply(Boris $boris) {
52 | $applied = false;
53 |
54 | foreach($this->_searchPaths as $path) {
55 | if (is_readable($path)) {
56 | $this->_loadInIsolation($path, $boris);
57 |
58 | $applied = true;
59 | $this->_files[] = $path;
60 |
61 | if (!$this->_cascade) {
62 | break;
63 | }
64 | }
65 | }
66 |
67 | return $applied;
68 | }
69 |
70 | /**
71 | * Returns an array of files that were loaded
72 | * for this Config
73 | *
74 | * @return array
75 | */
76 | public function loadedFiles() {
77 | return $this->_files;
78 | }
79 |
80 | // -- Private Methods
81 |
82 | private function _loadInIsolation($path, $boris) {
83 | require $path;
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/code/ThinkPHP/Library/Vendor/Boris/CLIOptionsHandler.php:
--------------------------------------------------------------------------------
1 | $value) {
20 | switch ($option) {
21 | /*
22 | * Sets files to load at startup, may be used multiple times,
23 | * i.e: boris -r test.php,foo/bar.php -r ba/foo.php --require hey.php
24 | */
25 | case 'r':
26 | case 'require':
27 | $this->_handleRequire($boris, $value);
28 | break;
29 |
30 | /*
31 | * Show Usage info
32 | */
33 | case 'h':
34 | case 'help':
35 | $this->_handleUsageInfo();
36 | break;
37 |
38 | /*
39 | * Show version
40 | */
41 | case 'v':
42 | case 'version':
43 | $this->_handleVersion();
44 | break;
45 | }
46 | }
47 | }
48 |
49 | // -- Private Methods
50 |
51 | private function _handleRequire($boris, $paths) {
52 | $require = array_reduce(
53 | (array) $paths,
54 | function($acc, $v) { return array_merge($acc, explode(',', $v)); },
55 | array()
56 | );
57 |
58 | $boris->onStart(function($worker, $scope) use($require) {
59 | foreach($require as $path) {
60 | require $path;
61 | }
62 |
63 | $worker->setLocal(get_defined_vars());
64 | });
65 | }
66 |
67 | private function _handleUsageInfo() {
68 | echo <<
11 | */
12 | public function get_articles_list($keyword = null, $building = null) {
13 | $Articles = D('Articles');
14 | $result = $Articles -> selectArticlesList($keyword, $building);
15 | if(!$result) {
16 | $array['status'] = 1;
17 | $array['msg'] = "无匹配数据";
18 | } else {
19 | $array['status'] = 0;
20 | $array['msg'] = "成功获取商铺列表";
21 | $array['data'] = $result;
22 | }
23 | echo json_encode($array, JSON_UNESCAPED_SLASHES);
24 | exit;
25 | }
26 |
27 | /**
28 | * 获取商铺信息
29 | * @param null $id 商铺id
30 | * Created by Dr.Chan
31 | */
32 | public function get_articles($id = null) {
33 | $Articles = D('Articles');
34 | $result = $Articles -> selectArticles($id);
35 | if(!$id) {
36 | $array['status'] = -1;
37 | $array['msg'] = "id不能为空";
38 | } elseif(!$result) {
39 | $array['status'] = 1;
40 | $array['msg'] = "无匹配数据";
41 | } else {
42 | $array['status'] = 0;
43 | $array['msg'] = "成功获取商铺信息";
44 | $array['data'] = $result;
45 | }
46 | echo json_encode($array, JSON_UNESCAPED_SLASHES);
47 | exit;
48 | }
49 |
50 | /**
51 | * 获取商铺列表(根据建筑物标志)
52 | * @param null $keyword 关键词
53 | * Created by Dr.Chan
54 | */
55 | public function get_articles_list_by_building($building = null) {
56 | $Articles = D('Articles');
57 | $result = $Articles -> selectArticlesListByBuilding($building);
58 | if(!$result) {
59 | $array['status'] = 1;
60 | $array['msg'] = "无匹配数据";
61 | } else {
62 | $array['status'] = 0;
63 | $array['msg'] = "成功获取商铺列表";
64 | $array['data'] = $result;
65 | }
66 | echo json_encode($array, JSON_UNESCAPED_SLASHES);
67 | exit;
68 | }
69 | }
--------------------------------------------------------------------------------
/code/ThinkPHP/Lang/zh-cn.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | /**
13 | * ThinkPHP 简体中文语言包
14 | */
15 | return array(
16 | /* 核心语言变量 */
17 | '_MODULE_NOT_EXIST_' => '无法加载模块',
18 | '_CONTROLLER_NOT_EXIST_' => '无法加载控制器',
19 | '_ERROR_ACTION_' => '非法操作',
20 | '_LANGUAGE_NOT_LOAD_' => '无法加载语言包',
21 | '_TEMPLATE_NOT_EXIST_' => '模板不存在',
22 | '_MODULE_' => '模块',
23 | '_ACTION_' => '操作',
24 | '_MODEL_NOT_EXIST_' => '模型不存在或者没有定义',
25 | '_VALID_ACCESS_' => '没有权限',
26 | '_XML_TAG_ERROR_' => 'XML标签语法错误',
27 | '_DATA_TYPE_INVALID_' => '非法数据对象!',
28 | '_OPERATION_WRONG_' => '操作出现错误',
29 | '_NOT_LOAD_DB_' => '无法加载数据库',
30 | '_NO_DB_DRIVER_' => '无法加载数据库驱动',
31 | '_NOT_SUPPORT_DB_' => '系统暂时不支持数据库',
32 | '_NO_DB_CONFIG_' => '没有定义数据库配置',
33 | '_NOT_SUPPERT_' => '系统不支持',
34 | '_CACHE_TYPE_INVALID_' => '无法加载缓存类型',
35 | '_FILE_NOT_WRITEABLE_' => '目录(文件)不可写',
36 | '_METHOD_NOT_EXIST_' => '方法不存在!',
37 | '_CLASS_NOT_EXIST_' => '实例化一个不存在的类!',
38 | '_CLASS_CONFLICT_' => '类名冲突',
39 | '_TEMPLATE_ERROR_' => '模板引擎错误',
40 | '_CACHE_WRITE_ERROR_' => '缓存文件写入失败!',
41 | '_TAGLIB_NOT_EXIST_' => '标签库未定义',
42 | '_OPERATION_FAIL_' => '操作失败!',
43 | '_OPERATION_SUCCESS_' => '操作成功!',
44 | '_SELECT_NOT_EXIST_' => '记录不存在!',
45 | '_EXPRESS_ERROR_' => '表达式错误',
46 | '_TOKEN_ERROR_' => '表单令牌错误',
47 | '_RECORD_HAS_UPDATE_' => '记录已经更新',
48 | '_NOT_ALLOW_PHP_' => '模板禁用PHP代码',
49 | '_PARAM_ERROR_' => '参数错误或者未定义',
50 | '_ERROR_QUERY_EXPRESS_' => '错误的查询条件',
51 | );
52 |
--------------------------------------------------------------------------------