├── .htaccess
├── Application
├── Admin
│ ├── Common
│ │ └── index.html
│ ├── Conf
│ │ ├── config.php
│ │ └── index.html
│ ├── Controller
│ │ ├── IndexController.class.php
│ │ └── LoginController.class.php
│ ├── Model
│ │ └── index.html
│ ├── View
│ │ └── index.html
│ └── index.html
├── Common
│ ├── Common
│ │ └── index.html
│ ├── Conf
│ │ ├── config.php
│ │ └── index.html
│ └── index.html
├── Home
│ ├── Common
│ │ └── index.html
│ ├── Conf
│ │ ├── config.php
│ │ └── index.html
│ ├── Controller
│ │ ├── BuyhouseController.class.php
│ │ ├── IndexController.class.php
│ │ ├── LoginController.class.php
│ │ ├── MsgboardController.class.php
│ │ ├── RenthouseController.class.php
│ │ └── UserController.class.php
│ ├── Model
│ │ └── index.html
│ ├── View
│ │ └── index.html
│ └── index.html
├── README.md
├── Runtime
│ ├── Cache
│ │ ├── Admin
│ │ │ ├── 20914c0f075f91df3579ffbdf5180b02.php
│ │ │ └── index.html
│ │ ├── Home
│ │ │ ├── 20914c0f075f91df3579ffbdf5180b02.php
│ │ │ └── index.html
│ │ └── index.html
│ ├── Data
│ │ └── index.html
│ ├── Logs
│ │ ├── Admin
│ │ │ ├── 16_12_17.log
│ │ │ ├── 16_12_26.log
│ │ │ ├── 17_01_02.log
│ │ │ ├── 17_01_05.log
│ │ │ ├── 17_03_03.log
│ │ │ └── index.html
│ │ ├── Common
│ │ │ └── 16_12_26.log
│ │ ├── Home
│ │ │ ├── 16_12_17.log
│ │ │ ├── 16_12_26.log
│ │ │ ├── 16_12_31.log
│ │ │ ├── 17_01_01.log
│ │ │ ├── 17_01_02.log
│ │ │ ├── 17_01_04.log
│ │ │ ├── 17_01_05.log
│ │ │ ├── 17_01_06.log
│ │ │ ├── 17_03_03.log
│ │ │ └── index.html
│ │ └── index.html
│ ├── Temp
│ │ └── index.html
│ └── index.html
└── index.html
├── LICENSE
├── Public
└── README.md
├── README.md
├── ThinkPHP
├── Common
│ └── functions.php
├── Conf
│ ├── convention.php
│ └── debug.php
├── LICENSE.txt
├── Lang
│ ├── en-us.php
│ ├── pt-br.php
│ ├── zh-cn.php
│ └── zh-tw.php
├── Library
│ ├── Behavior
│ │ ├── AgentCheckBehavior.class.php
│ │ ├── BorisBehavior.class.php
│ │ ├── BrowserCheckBehavior.class.php
│ │ ├── BuildLiteBehavior.class.php
│ │ ├── CheckActionRouteBehavior.class.php
│ │ ├── CheckLangBehavior.class.php
│ │ ├── ChromeShowPageTraceBehavior.class.php
│ │ ├── ContentReplaceBehavior.class.php
│ │ ├── CronRunBehavior.class.php
│ │ ├── FireShowPageTraceBehavior.class.php
│ │ ├── ParseTemplateBehavior.class.php
│ │ ├── ReadHtmlCacheBehavior.class.php
│ │ ├── RobotCheckBehavior.class.php
│ │ ├── ShowPageTraceBehavior.class.php
│ │ ├── ShowRuntimeBehavior.class.php
│ │ ├── TokenBuildBehavior.class.php
│ │ ├── UpgradeNoticeBehavior.class.php
│ │ └── WriteHtmlCacheBehavior.class.php
│ ├── Org
│ │ ├── Net
│ │ │ ├── Http.class.php
│ │ │ └── IpLocation.class.php
│ │ └── Util
│ │ │ ├── ArrayList.class.php
│ │ │ ├── CodeSwitch.class.php
│ │ │ ├── Date.class.php
│ │ │ ├── Rbac.class.php
│ │ │ ├── Stack.class.php
│ │ │ └── String.class.php
│ ├── Think
│ │ ├── App.class.php
│ │ ├── Auth.class.php
│ │ ├── Behavior.class.php
│ │ ├── Build.class.php
│ │ ├── Cache.class.php
│ │ ├── Cache
│ │ │ └── Driver
│ │ │ │ ├── Apachenote.class.php
│ │ │ │ ├── Apc.class.php
│ │ │ │ ├── Db.class.php
│ │ │ │ ├── Eaccelerator.class.php
│ │ │ │ ├── File.class.php
│ │ │ │ ├── Memcache.class.php
│ │ │ │ ├── Memcached.class.php
│ │ │ │ ├── Memcachesae.class.php
│ │ │ │ ├── Redis.class.php
│ │ │ │ ├── Shmop.class.php
│ │ │ │ ├── Sqlite.class.php
│ │ │ │ ├── Wincache.class.php
│ │ │ │ └── Xcache.class.php
│ │ ├── Controller.class.php
│ │ ├── Controller
│ │ │ ├── HproseController.class.php
│ │ │ ├── JsonRpcController.class.php
│ │ │ ├── RestController.class.php
│ │ │ ├── RpcController.class.php
│ │ │ └── YarController.class.php
│ │ ├── Crypt.class.php
│ │ ├── Crypt
│ │ │ └── Driver
│ │ │ │ ├── Base64.class.php
│ │ │ │ ├── Crypt.class.php
│ │ │ │ ├── Des.class.php
│ │ │ │ ├── Think.class.php
│ │ │ │ └── Xxtea.class.php
│ │ ├── Db.class.php
│ │ ├── Db
│ │ │ ├── Driver.class.php
│ │ │ ├── Driver
│ │ │ │ ├── Firebird.class.php
│ │ │ │ ├── Mongo.class.php
│ │ │ │ ├── Mysql.class.php
│ │ │ │ ├── Oracle.class.php
│ │ │ │ ├── Pgsql.class.php
│ │ │ │ ├── Sqlite.class.php
│ │ │ │ └── Sqlsrv.class.php
│ │ │ └── Lite.class.php
│ │ ├── Dispatcher.class.php
│ │ ├── Exception.class.php
│ │ ├── Hook.class.php
│ │ ├── Image.class.php
│ │ ├── Image
│ │ │ └── Driver
│ │ │ │ ├── GIF.class.php
│ │ │ │ ├── Gd.class.php
│ │ │ │ └── Imagick.class.php
│ │ ├── Log.class.php
│ │ ├── Log
│ │ │ └── Driver
│ │ │ │ ├── File.class.php
│ │ │ │ └── Sae.class.php
│ │ ├── Model.class.php
│ │ ├── Model
│ │ │ ├── AdvModel.class.php
│ │ │ ├── MergeModel.class.php
│ │ │ ├── MongoModel.class.php
│ │ │ ├── RelationModel.class.php
│ │ │ └── ViewModel.class.php
│ │ ├── Page.class.php
│ │ ├── Route.class.php
│ │ ├── Session
│ │ │ └── Driver
│ │ │ │ ├── Db.class.php
│ │ │ │ ├── Memcache.class.php
│ │ │ │ └── Mysqli.class.php
│ │ ├── Storage.class.php
│ │ ├── Storage
│ │ │ └── Driver
│ │ │ │ ├── File.class.php
│ │ │ │ └── Sae.class.php
│ │ ├── Template.class.php
│ │ ├── Template
│ │ │ ├── Driver
│ │ │ │ ├── Ease.class.php
│ │ │ │ ├── Lite.class.php
│ │ │ │ ├── Mobile.class.php
│ │ │ │ ├── Smart.class.php
│ │ │ │ └── Smarty.class.php
│ │ │ ├── TagLib.class.php
│ │ │ └── TagLib
│ │ │ │ ├── Cx.class.php
│ │ │ │ └── Html.class.php
│ │ ├── Think.class.php
│ │ ├── Upload.class.php
│ │ ├── Upload
│ │ │ └── Driver
│ │ │ │ ├── Bcs.class.php
│ │ │ │ ├── Bcs
│ │ │ │ ├── bcs.class.php
│ │ │ │ ├── mimetypes.class.php
│ │ │ │ └── requestcore.class.php
│ │ │ │ ├── Ftp.class.php
│ │ │ │ ├── Local.class.php
│ │ │ │ ├── Qiniu.class.php
│ │ │ │ ├── Qiniu
│ │ │ │ └── QiniuStorage.class.php
│ │ │ │ ├── Sae.class.php
│ │ │ │ └── Upyun.class.php
│ │ ├── Verify.class.php
│ │ ├── 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
│ │ └── View.class.php
│ └── Vendor
│ │ ├── Boris
│ │ ├── Boris.php
│ │ ├── CLIOptionsHandler.php
│ │ ├── ColoredInspector.php
│ │ ├── Config.php
│ │ ├── DumpInspector.php
│ │ ├── EvalWorker.php
│ │ ├── ExportInspector.php
│ │ ├── Inspector.php
│ │ ├── ReadlineClient.php
│ │ └── ShallowParser.php
│ │ ├── EaseTemplate
│ │ ├── template.core.php
│ │ └── template.ease.php
│ │ ├── Hprose
│ │ ├── HproseClassManager.php
│ │ ├── HproseClient.php
│ │ ├── HproseCommon.php
│ │ ├── HproseFormatter.php
│ │ ├── HproseHttpClient.php
│ │ ├── HproseHttpServer.php
│ │ ├── HproseIO.php
│ │ ├── HproseIOStream.php
│ │ ├── HproseReader.php
│ │ ├── HproseTags.php
│ │ └── HproseWriter.php
│ │ ├── README.txt
│ │ ├── SmartTemplate
│ │ ├── class.smarttemplate.php
│ │ ├── class.smarttemplatedebugger.php
│ │ └── class.smarttemplateparser.php
│ │ ├── Smarty
│ │ ├── Smarty.class.php
│ │ ├── SmartyBC.class.php
│ │ ├── debug.tpl
│ │ ├── plugins
│ │ │ ├── block.textformat.php
│ │ │ ├── function.counter.php
│ │ │ ├── function.cycle.php
│ │ │ ├── function.fetch.php
│ │ │ ├── function.html_checkboxes.php
│ │ │ ├── function.html_image.php
│ │ │ ├── function.html_options.php
│ │ │ ├── function.html_radios.php
│ │ │ ├── function.html_select_date.php
│ │ │ ├── function.html_select_time.php
│ │ │ ├── function.html_table.php
│ │ │ ├── function.mailto.php
│ │ │ ├── function.math.php
│ │ │ ├── modifier.capitalize.php
│ │ │ ├── modifier.date_format.php
│ │ │ ├── modifier.debug_print_var.php
│ │ │ ├── modifier.escape.php
│ │ │ ├── modifier.regex_replace.php
│ │ │ ├── modifier.replace.php
│ │ │ ├── modifier.spacify.php
│ │ │ ├── modifier.truncate.php
│ │ │ ├── modifiercompiler.cat.php
│ │ │ ├── modifiercompiler.count_characters.php
│ │ │ ├── modifiercompiler.count_paragraphs.php
│ │ │ ├── modifiercompiler.count_sentences.php
│ │ │ ├── modifiercompiler.count_words.php
│ │ │ ├── modifiercompiler.default.php
│ │ │ ├── modifiercompiler.escape.php
│ │ │ ├── modifiercompiler.from_charset.php
│ │ │ ├── modifiercompiler.indent.php
│ │ │ ├── modifiercompiler.lower.php
│ │ │ ├── modifiercompiler.noprint.php
│ │ │ ├── modifiercompiler.string_format.php
│ │ │ ├── modifiercompiler.strip.php
│ │ │ ├── modifiercompiler.strip_tags.php
│ │ │ ├── modifiercompiler.to_charset.php
│ │ │ ├── modifiercompiler.unescape.php
│ │ │ ├── modifiercompiler.upper.php
│ │ │ ├── modifiercompiler.wordwrap.php
│ │ │ ├── outputfilter.trimwhitespace.php
│ │ │ ├── shared.escape_special_chars.php
│ │ │ ├── shared.literal_compiler_param.php
│ │ │ ├── shared.make_timestamp.php
│ │ │ ├── shared.mb_str_replace.php
│ │ │ ├── shared.mb_unicode.php
│ │ │ ├── shared.mb_wordwrap.php
│ │ │ └── variablefilter.htmlspecialchars.php
│ │ └── sysplugins
│ │ │ ├── smarty_cacheresource.php
│ │ │ ├── smarty_cacheresource_custom.php
│ │ │ ├── smarty_cacheresource_keyvaluestore.php
│ │ │ ├── smarty_config_source.php
│ │ │ ├── smarty_internal_cacheresource_file.php
│ │ │ ├── smarty_internal_compile_append.php
│ │ │ ├── smarty_internal_compile_assign.php
│ │ │ ├── smarty_internal_compile_block.php
│ │ │ ├── smarty_internal_compile_break.php
│ │ │ ├── smarty_internal_compile_call.php
│ │ │ ├── smarty_internal_compile_capture.php
│ │ │ ├── smarty_internal_compile_config_load.php
│ │ │ ├── smarty_internal_compile_continue.php
│ │ │ ├── smarty_internal_compile_debug.php
│ │ │ ├── smarty_internal_compile_eval.php
│ │ │ ├── smarty_internal_compile_extends.php
│ │ │ ├── smarty_internal_compile_for.php
│ │ │ ├── smarty_internal_compile_foreach.php
│ │ │ ├── smarty_internal_compile_function.php
│ │ │ ├── smarty_internal_compile_if.php
│ │ │ ├── smarty_internal_compile_include.php
│ │ │ ├── smarty_internal_compile_include_php.php
│ │ │ ├── smarty_internal_compile_insert.php
│ │ │ ├── smarty_internal_compile_ldelim.php
│ │ │ ├── smarty_internal_compile_nocache.php
│ │ │ ├── smarty_internal_compile_private_block_plugin.php
│ │ │ ├── smarty_internal_compile_private_function_plugin.php
│ │ │ ├── smarty_internal_compile_private_modifier.php
│ │ │ ├── smarty_internal_compile_private_object_block_function.php
│ │ │ ├── smarty_internal_compile_private_object_function.php
│ │ │ ├── smarty_internal_compile_private_print_expression.php
│ │ │ ├── smarty_internal_compile_private_registered_block.php
│ │ │ ├── smarty_internal_compile_private_registered_function.php
│ │ │ ├── smarty_internal_compile_private_special_variable.php
│ │ │ ├── smarty_internal_compile_rdelim.php
│ │ │ ├── smarty_internal_compile_section.php
│ │ │ ├── smarty_internal_compile_setfilter.php
│ │ │ ├── smarty_internal_compile_while.php
│ │ │ ├── smarty_internal_compilebase.php
│ │ │ ├── smarty_internal_config.php
│ │ │ ├── smarty_internal_config_file_compiler.php
│ │ │ ├── smarty_internal_configfilelexer.php
│ │ │ ├── smarty_internal_configfileparser.php
│ │ │ ├── smarty_internal_data.php
│ │ │ ├── smarty_internal_debug.php
│ │ │ ├── smarty_internal_filter_handler.php
│ │ │ ├── smarty_internal_function_call_handler.php
│ │ │ ├── smarty_internal_get_include_path.php
│ │ │ ├── smarty_internal_nocache_insert.php
│ │ │ ├── smarty_internal_parsetree.php
│ │ │ ├── smarty_internal_resource_eval.php
│ │ │ ├── smarty_internal_resource_extends.php
│ │ │ ├── smarty_internal_resource_file.php
│ │ │ ├── smarty_internal_resource_php.php
│ │ │ ├── smarty_internal_resource_registered.php
│ │ │ ├── smarty_internal_resource_stream.php
│ │ │ ├── smarty_internal_resource_string.php
│ │ │ ├── smarty_internal_smartytemplatecompiler.php
│ │ │ ├── smarty_internal_template.php
│ │ │ ├── smarty_internal_templatebase.php
│ │ │ ├── smarty_internal_templatecompilerbase.php
│ │ │ ├── smarty_internal_templatelexer.php
│ │ │ ├── smarty_internal_templateparser.php
│ │ │ ├── smarty_internal_utility.php
│ │ │ ├── smarty_internal_write_file.php
│ │ │ ├── smarty_resource.php
│ │ │ ├── smarty_resource_custom.php
│ │ │ ├── smarty_resource_recompiled.php
│ │ │ ├── smarty_resource_uncompiled.php
│ │ │ └── smarty_security.php
│ │ ├── TemplateLite
│ │ ├── class.compiler.php
│ │ ├── class.config.php
│ │ ├── class.template.php
│ │ └── internal
│ │ │ ├── compile.compile_config.php
│ │ │ ├── compile.compile_custom_block.php
│ │ │ ├── compile.compile_custom_function.php
│ │ │ ├── compile.compile_if.php
│ │ │ ├── compile.generate_compiler_debug_output.php
│ │ │ ├── compile.include.php
│ │ │ ├── compile.parse_is_expr.php
│ │ │ ├── compile.section_start.php
│ │ │ ├── debug.tpl
│ │ │ ├── template.build_dir.php
│ │ │ ├── template.config_loader.php
│ │ │ ├── template.destroy_dir.php
│ │ │ ├── template.fetch_compile_include.php
│ │ │ └── template.generate_debug_output.php
│ │ ├── jsonRPC
│ │ ├── jsonRPCClient.php
│ │ └── jsonRPCServer.php
│ │ ├── phpRPC
│ │ ├── bigint.php
│ │ ├── compat.php
│ │ ├── dhparams.php
│ │ ├── dhparams
│ │ │ ├── 1024.dhp
│ │ │ ├── 128.dhp
│ │ │ ├── 1536.dhp
│ │ │ ├── 160.dhp
│ │ │ ├── 192.dhp
│ │ │ ├── 2048.dhp
│ │ │ ├── 256.dhp
│ │ │ ├── 3072.dhp
│ │ │ ├── 4096.dhp
│ │ │ ├── 512.dhp
│ │ │ ├── 768.dhp
│ │ │ └── 96.dhp
│ │ ├── pecl
│ │ │ └── xxtea
│ │ │ │ ├── CREDITS
│ │ │ │ ├── INSTALL
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README
│ │ │ │ ├── config.m4
│ │ │ │ ├── config.w32
│ │ │ │ ├── php_xxtea.c
│ │ │ │ ├── php_xxtea.dsp
│ │ │ │ ├── php_xxtea.h
│ │ │ │ ├── php_xxtea.sln
│ │ │ │ ├── php_xxtea.vcproj
│ │ │ │ ├── test
│ │ │ │ └── test.php
│ │ │ │ ├── xxtea.c
│ │ │ │ └── xxtea.h
│ │ ├── phprpc_client.php
│ │ ├── phprpc_date.php
│ │ ├── phprpc_server.php
│ │ └── xxtea.php
│ │ └── spyc
│ │ ├── COPYING
│ │ ├── README.md
│ │ ├── Spyc.php
│ │ ├── composer.json
│ │ ├── examples
│ │ ├── yaml-dump.php
│ │ └── yaml-load.php
│ │ ├── php4
│ │ ├── 5to4.php
│ │ ├── spyc.php4
│ │ └── test.php4
│ │ ├── spyc.yaml
│ │ └── tests
│ │ ├── DumpTest.php
│ │ ├── IndentTest.php
│ │ ├── ParseTest.php
│ │ ├── RoundTripTest.php
│ │ ├── comments.yaml
│ │ ├── failing1.yaml
│ │ ├── indent_1.yaml
│ │ └── quotes.yaml
├── Mode
│ ├── Api
│ │ ├── App.class.php
│ │ ├── Controller.class.php
│ │ ├── Dispatcher.class.php
│ │ └── functions.php
│ ├── Lite
│ │ ├── App.class.php
│ │ ├── Controller.class.php
│ │ ├── Dispatcher.class.php
│ │ ├── Model.class.php
│ │ ├── View.class.php
│ │ ├── convention.php
│ │ └── functions.php
│ ├── Sae
│ │ └── convention.php
│ ├── api.php
│ ├── common.php
│ ├── lite.php
│ └── sae.php
├── ThinkPHP.php
├── Tpl
│ ├── dispatch_jump.tpl
│ ├── page_trace.tpl
│ └── think_exception.tpl
└── logo.png
├── composer.json
└── index.php
/.htaccess:
--------------------------------------------------------------------------------
1 |
2 | Options +FollowSymlinks
3 | RewriteEngine On
4 |
5 | RewriteCond %{REQUEST_FILENAME} !-d
6 | RewriteCond %{REQUEST_FILENAME} !-f
7 | RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
8 |
--------------------------------------------------------------------------------
/Application/Admin/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Admin/Conf/config.php:
--------------------------------------------------------------------------------
1 | '配置值'
4 | 'DEFAULT_MODULE' => 'Admin' // 默认模块
5 | // 'DEFAULT_CONTROLLER' => 'Index', // 默认控制器名称
6 | // 'DEFAULT_ACTION'=> 'index', // 默认操作名称
7 | );
--------------------------------------------------------------------------------
/Application/Admin/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Admin/Controller/IndexController.class.php:
--------------------------------------------------------------------------------
1 | where($where)->find();
12 | $this->ajaxReturn($data);
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/Application/Admin/Controller/LoginController.class.php:
--------------------------------------------------------------------------------
1 | where($where)->find();
13 | if ($result && $result['password'] == md5($_POST['password'])) {
14 | session('username', $result['username']);
15 | session('unumber', $result['unumber']);
16 | $arr = array(
17 | 'success'=> true,
18 | 'data'=> $result
19 | );
20 | $this->ajaxReturn($arr);
21 | } else {
22 | $arr = array(
23 | 'success'=> false,
24 | 'data'=> '登录失败'
25 | );
26 | $this->ajaxReturn($arr);
27 | }
28 |
29 | }
30 |
31 |
32 | public function addadmin(){
33 |
34 | $data['username'] = $_POST['username'];
35 | $data['unumber'] = $_POST['unumber'];
36 | $data['password'] = md5($_POST['password']);
37 |
38 | $Admin = M('Admin');
39 | $result = $Admin->add($data);
40 | if ($result) {
41 | $arr = array(
42 | 'success'=> true,
43 | 'data'=> '添加管理员成功'
44 | );
45 | $this->ajaxReturn($arr);
46 | } else {
47 | $arr = array(
48 | 'success'=> false,
49 | 'data'=> '添加管理员失败'
50 | );
51 | $this->ajaxReturn($arr);
52 | }
53 |
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/Application/Admin/Model/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Admin/View/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Admin/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Common/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Common/Conf/config.php:
--------------------------------------------------------------------------------
1 | '配置值'
4 | 'DB_TYPE' => 'mysql', // 数据库类型
5 | 'DB_HOST' => 'localhost', // 服务器地址
6 | 'DB_NAME' => 'curriculum-design', // 数据库名
7 | 'DB_USER' => 'root', // 用户名
8 | 'DB_PWD' => '', // 密码
9 | 'DB_PORT' => 3306, // 端口
10 | 'DB_PREFIX' => 'cd_', // 数据库表前缀
11 | 'DB_CHARSET'=> 'utf8', // 字符集
12 | );
--------------------------------------------------------------------------------
/Application/Common/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Home/Common/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Home/Conf/config.php:
--------------------------------------------------------------------------------
1 | '配置值'
4 | 'DEFAULT_MODULE' => 'Home' // 默认模块
5 | // 'DEFAULT_CONTROLLER' => 'Login', // 默认控制器名称
6 | // 'DEFAULT_ACTION'=> 'login', // 默认操作名称
7 | );
--------------------------------------------------------------------------------
/Application/Home/Conf/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Home/Controller/IndexController.class.php:
--------------------------------------------------------------------------------
1 | where($where)->find();
12 | $this->ajaxReturn($data);
13 | }
14 | //
15 | // public function text() {
16 | // $arr = array(
17 | // 'name'=> 'hzzly',
18 | // 'age'=> 21
19 | // );
20 | // echo json_encode($arr);
21 | // }
22 | }
23 |
--------------------------------------------------------------------------------
/Application/Home/Controller/LoginController.class.php:
--------------------------------------------------------------------------------
1 | where($where)->find();
12 | if ($result && $result['password'] == md5($_POST['password'])) {
13 | session('username', $result['username']);
14 | $arr = array(
15 | 'success'=> true,
16 | 'data'=> $result
17 | );
18 | $this->ajaxReturn($arr);
19 | } else {
20 | $arr = array(
21 | 'success'=> false,
22 | 'data'=> '登录失败'
23 | );
24 | $this->ajaxReturn($arr);
25 | }
26 | }
27 |
28 |
29 | public function register(){
30 |
31 | $data['username'] = $_POST['username'];
32 | $data['phone'] = $_POST['phone'];
33 | $data['password'] = md5($_POST['password']);
34 |
35 | $User = M('User');
36 | $result = $User->add($data);
37 | if ($result) {
38 | $arr = array(
39 | 'success'=> true,
40 | 'data'=> '注册成功'
41 | );
42 | $this->ajaxReturn($arr);
43 | } else {
44 | $arr = array(
45 | 'success'=> false,
46 | 'data'=> '注册失败'
47 | );
48 | $this->ajaxReturn($arr);
49 | }
50 |
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/Application/Home/Controller/MsgboardController.class.php:
--------------------------------------------------------------------------------
1 | join('cd_user ON cd_msgboard.uid = cd_user.uid')->order('id desc')->select();
10 |
11 | if ($result) {
12 | $arr = array(
13 | 'success'=> true,
14 | 'data'=> $result
15 | );
16 | $this->ajaxReturn($arr);
17 | } else {
18 | $arr = array(
19 | 'success'=> false,
20 | 'data'=> '查询失败'
21 | );
22 | $this->ajaxReturn($arr);
23 | }
24 | }
25 |
26 | public function addmsgboard(){
27 | $Msgboard = M("Msgboard");
28 |
29 | $data['uid'] = $_POST['uid'];
30 | $data['content'] = $_POST['content'];
31 | $data['time'] = time();
32 |
33 | $result = $Msgboard->add($data);
34 |
35 | if ($result) {
36 | $arr = array(
37 | 'success'=> true,
38 | 'data'=> $result
39 | );
40 | $this->ajaxReturn($arr);
41 | } else {
42 | $arr = array(
43 | 'success'=> false,
44 | 'data'=> '添加失败'
45 | );
46 | $this->ajaxReturn($arr);
47 | }
48 | }
49 |
50 | public function delete(){
51 |
52 | $where['id'] = $_GET['id'];
53 |
54 | $Msgboard = M("Msgboard");
55 | $result = $Msgboard->where($where)->delete();
56 | if ($result) {
57 | $arr = array(
58 | 'success'=> true,
59 | 'data'=> '删除成功'
60 | );
61 | $this->ajaxReturn($arr);
62 | } else {
63 | $arr = array(
64 | 'success'=> false,
65 | 'data'=> '删除失败'
66 | );
67 | $this->ajaxReturn($arr);
68 | }
69 |
70 | }
71 |
72 |
73 | }
74 |
--------------------------------------------------------------------------------
/Application/Home/Model/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Home/View/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Home/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/README.md:
--------------------------------------------------------------------------------
1 | 项目目录
--------------------------------------------------------------------------------
/Application/Runtime/Cache/Admin/20914c0f075f91df3579ffbdf5180b02.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Cache/Admin/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Cache/Home/20914c0f075f91df3579ffbdf5180b02.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Cache/Home/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Cache/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Data/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Logs/Admin/16_12_26.log:
--------------------------------------------------------------------------------
1 | [ 2016-12-26T19:28:37+08:00 ] ::1 /thinkphp/index.php/admin/index
2 | INFO: [ app_init ] --START--
3 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000133s ]
4 | INFO: [ app_init ] --END-- [ RunTime:0.126223s ]
5 | INFO: [ app_begin ] --START--
6 | INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.115787s ]
7 | INFO: [ app_begin ] --END-- [ RunTime:0.116954s ]
8 | INFO: [ app_end ] --START--
9 | INFO: Run Behavior\ShowPageTraceBehavior [ RunTime:0.128735s ]
10 | INFO: [ app_end ] --END-- [ RunTime:0.129468s ]
11 |
12 | [ 2016-12-26T19:30:13+08:00 ] ::1 /thinkphp/index.php/admin/index
13 | INFO: [ app_init ] --START--
14 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000097s ]
15 | INFO: [ app_init ] --END-- [ RunTime:0.002619s ]
16 | INFO: [ app_begin ] --START--
17 | INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.003206s ]
18 | INFO: [ app_begin ] --END-- [ RunTime:0.003827s ]
19 | INFO: [ app_end ] --START--
20 | INFO: Run Behavior\ShowPageTraceBehavior [ RunTime:0.002602s ]
21 | INFO: [ app_end ] --END-- [ RunTime:0.003131s ]
22 |
23 | [ 2016-12-26T19:30:18+08:00 ] ::1 /thinkphp/index.php/admin/index/index
24 | INFO: [ app_init ] --START--
25 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000092s ]
26 | INFO: [ app_init ] --END-- [ RunTime:0.002422s ]
27 | INFO: [ app_begin ] --START--
28 | INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.002532s ]
29 | INFO: [ app_begin ] --END-- [ RunTime:0.003010s ]
30 | INFO: [ app_end ] --START--
31 | INFO: Run Behavior\ShowPageTraceBehavior [ RunTime:0.002560s ]
32 | INFO: [ app_end ] --END-- [ RunTime:0.002994s ]
33 |
34 |
--------------------------------------------------------------------------------
/Application/Runtime/Logs/Admin/17_03_03.log:
--------------------------------------------------------------------------------
1 | [ 2017-03-03T11:00:22+08:00 ] ::1 /thinkphp/index.php/admin/Login/login
2 | INFO: [ app_init ] --START--
3 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000039s ]
4 | INFO: [ app_init ] --END-- [ RunTime:0.012069s ]
5 | INFO: [ app_begin ] --START--
6 | INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.010211s ]
7 | INFO: [ app_begin ] --END-- [ RunTime:0.010470s ]
8 | SQL: SHOW COLUMNS FROM `cd_admin` [ RunTime:0.0124s ]
9 | SQL: SELECT * FROM `cd_admin` WHERE `unumber` = '10001' LIMIT 1 [ RunTime:0.0462s ]
10 | NOTIC: [8] Undefined index: username F:\wamp\www\thinkphp\Application\Admin\Controller\LoginController.class.php 第 14 行.
11 |
12 |
--------------------------------------------------------------------------------
/Application/Runtime/Logs/Admin/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Logs/Common/16_12_26.log:
--------------------------------------------------------------------------------
1 | [ 2016-12-26T19:29:07+08:00 ] ::1 /thinkphp/index.php/index/text
2 | INFO: [ app_init ] --START--
3 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000109s ]
4 | INFO: [ app_init ] --END-- [ RunTime:0.003165s ]
5 | ERR: 无法加载模块:Index
6 |
7 |
--------------------------------------------------------------------------------
/Application/Runtime/Logs/Home/16_12_26.log:
--------------------------------------------------------------------------------
1 | [ 2016-12-26T19:29:23+08:00 ] ::1 /thinkphp/index.php/home/text
2 | INFO: [ app_init ] --START--
3 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000147s ]
4 | INFO: [ app_init ] --END-- [ RunTime:0.003617s ]
5 | INFO: [ app_begin ] --START--
6 | INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.003299s ]
7 | INFO: [ app_begin ] --END-- [ RunTime:0.003769s ]
8 | ERR: 无法加载控制器:Text
9 |
10 | [ 2016-12-26T19:29:32+08:00 ] ::1 /thinkphp/index.php/home/index/text
11 | INFO: [ app_init ] --START--
12 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000095s ]
13 | INFO: [ app_init ] --END-- [ RunTime:0.002834s ]
14 | INFO: [ app_begin ] --START--
15 | INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.002541s ]
16 | INFO: [ app_begin ] --END-- [ RunTime:0.002991s ]
17 | INFO: [ app_end ] --START--
18 | INFO: Run Behavior\ShowPageTraceBehavior [ RunTime:0.004879s ]
19 | INFO: [ app_end ] --END-- [ RunTime:0.005556s ]
20 |
21 | [ 2016-12-26T19:30:11+08:00 ] ::1 /thinkphp/index.php/home/text
22 | INFO: [ app_init ] --START--
23 | INFO: Run Behavior\BuildLiteBehavior [ RunTime:0.000150s ]
24 | INFO: [ app_init ] --END-- [ RunTime:0.003204s ]
25 | INFO: [ app_begin ] --START--
26 | INFO: Run Behavior\ReadHtmlCacheBehavior [ RunTime:0.003872s ]
27 | INFO: [ app_begin ] --END-- [ RunTime:0.004817s ]
28 | ERR: 无法加载控制器:Text
29 |
30 |
--------------------------------------------------------------------------------
/Application/Runtime/Logs/Home/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Logs/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/Temp/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/Runtime/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Application/index.html:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017
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 all
13 | 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 THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/Public/README.md:
--------------------------------------------------------------------------------
1 | 资源文件目录
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # cnavas-vue-backstage
2 |
3 | canvas-vue 的后台(ThinkPHP)
4 |
5 | ## 简介
6 |
7 | ThinkPHP 是一个免费开源的,快速、简单的面向对象的 轻量级PHP开发框架 ,创立于2006年初,遵循Apache2开源协议发布,是为了敏捷WEB应用开发和简化企业应用开发而诞生的。ThinkPHP从诞生以来一直秉承简洁实用的设计原则,在保持出色的性能和至简的代码的同时,也注重易用性。并且拥有众多的原创功能和特性,在社区团队的积极参与下,在易用性、扩展性和性能方面不断优化和改进,已经成长为国内最领先和最具影响力的WEB应用开发框架,众多的典型案例确保可以稳定用于商业以及门户级的开发。
8 |
9 | ## 全面的WEB开发特性支持
10 |
11 | 最新的ThinkPHP为WEB应用开发提供了强有力的支持,这些支持包括:
12 |
13 | * MVC支持-基于多层模型(M)、视图(V)、控制器(C)的设计模式
14 | * ORM支持-提供了全功能和高性能的ORM支持,支持大部分数据库
15 | * 模板引擎支持-内置了高性能的基于标签库和XML标签的编译型模板引擎
16 | * RESTFul支持-通过REST控制器扩展提供了RESTFul支持,为你打造全新的URL设计和访问体验
17 | * 云平台支持-提供了对新浪SAE平台和百度BAE平台的强力支持,具备“横跨性”和“平滑性”,支持本地化开发和调试以及部署切换,让你轻松过渡,打造全新的开发体验。
18 | * CLI支持-支持基于命令行的应用开发
19 | * RPC支持-提供包括PHPRpc、HProse、jsonRPC和Yar在内远程调用解决方案
20 | * MongoDb支持-提供NoSQL的支持
21 | * 缓存支持-提供了包括文件、数据库、Memcache、Xcache、Redis等多种类型的缓存支持
22 |
23 | ## 大道至简的开发理念
24 |
25 | ThinkPHP从诞生以来一直秉承大道至简的开发理念,无论从底层实现还是应用开发,我们都倡导用最少的代码完成相同的功能,正是由于对简单的执着和代码的修炼,让我们长期保持出色的性能和极速的开发体验。在主流PHP开发框架的评测数据中表现卓越,简单和快速开发是我们不变的宗旨。
26 |
27 | ## 安全性
28 |
29 | 框架在系统层面提供了众多的安全特性,确保你的网站和产品安全无忧。这些特性包括:
30 |
31 | * XSS安全防护
32 | * 表单自动验证
33 | * 强制数据类型转换
34 | * 输入数据过滤
35 | * 表单令牌验证
36 | * 防SQL注入
37 | * 图像上传检测
38 |
39 | ## 商业友好的开源协议
40 |
41 | ThinkPHP遵循Apache2开源协议发布。Apache Licence是著名的非盈利开源组织Apache采用的协议。该协议和BSD类似,鼓励代码共享和尊重原作者的著作权,同样允许代码修改,再作为开源或商业软件发布。
--------------------------------------------------------------------------------
/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_DEBUG' => 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 | );
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_SUPPORT_' => '系统不支持',
34 | '_CACHE_TYPE_INVALID_' => '无法加载缓存类型',
35 | '_FILE_NOT_WRITABLE_' => '目录(文件)不可写',
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 |
--------------------------------------------------------------------------------
/ThinkPHP/Lang/zh-tw.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_SUPPORT_' => '系統不支援',
34 | '_CACHE_TYPE_INVALID_' => '無法載入快取類型',
35 | '_FILE_NOT_WRITABLE_' => '目錄(檔案)不可寫',
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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Behavior/BorisBehavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Behavior;
12 | use Think\Think;
13 | /**
14 | * Boris行为扩展
15 | */
16 | class BorisBehavior {
17 | public function run(&$params) {
18 | if(IS_CLI){
19 | if(!function_exists('pcntl_signal'))
20 | E("pcntl_signal not working.\nRepl mode based on Linux OS or PHP for OS X(http://php-osx.liip.ch/)\n");
21 | Think::addMap(array(
22 | 'Boris\Boris' => VENDOR_PATH . 'Boris/Boris.php',
23 | 'Boris\Config' => VENDOR_PATH . 'Boris/Config.php',
24 | 'Boris\CLIOptionsHandler' => VENDOR_PATH . 'Boris/CLIOptionsHandler.php',
25 | 'Boris\ColoredInspector' => VENDOR_PATH . 'Boris/ColoredInspector.php',
26 | 'Boris\DumpInspector' => VENDOR_PATH . 'Boris/DumpInspector.php',
27 | 'Boris\EvalWorker' => VENDOR_PATH . 'Boris/EvalWorker.php',
28 | 'Boris\ExportInspector' => VENDOR_PATH . 'Boris/ExportInspector.php',
29 | 'Boris\Inspector' => VENDOR_PATH . 'Boris/Inspector.php',
30 | 'Boris\ReadlineClient' => VENDOR_PATH . 'Boris/ReadlineClient.php',
31 | 'Boris\ShallowParser' => VENDOR_PATH . 'Boris/ShallowParser.php',
32 | ));
33 | $boris = new \Boris\Boris(">>> ");
34 | $config = new \Boris\Config();
35 | $config->apply($boris, true);
36 | $options = new \Boris\CLIOptionsHandler();
37 | $options->handle($boris);
38 | $boris->onStart(sprintf("echo 'REPL MODE FOR THINKPHP \nTHINKPHP_VERSION: %s, PHP_VERSION: %s, BORIS_VERSION: %s\n';", THINK_VERSION, PHP_VERSION, $boris::VERSION));
39 | $boris->start();
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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__' => htmlentities(__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 | }
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/ThinkPHP/Library/Behavior/TokenBuildBehavior.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Behavior;
12 | /**
13 | * 系统行为扩展:表单令牌生成
14 | */
15 | class TokenBuildBehavior {
16 |
17 | public function run(&$content){
18 | if(C('TOKEN_ON')) {
19 | list($tokenName,$tokenKey,$tokenValue)=$this->getToken();
20 | $input_token = '';
21 | $meta_token = '';
22 | if(strpos($content,'{__TOKEN__}')) {
23 | // 指定表单令牌隐藏域位置
24 | $content = str_replace('{__TOKEN__}',$input_token,$content);
25 | }elseif(preg_match('/<\/form(\s*)>/is',$content,$match)) {
26 | // 智能生成表单令牌隐藏域
27 | $content = str_replace($match[0],$input_token.$match[0],$content);
28 | }
29 | $content = str_ireplace('',$meta_token.'',$content);
30 | }else{
31 | $content = str_replace('{__TOKEN__}','',$content);
32 | }
33 | }
34 |
35 | //获得token
36 | private function getToken(){
37 | $tokenName = C('TOKEN_NAME',null,'__hash__');
38 | $tokenType = C('TOKEN_TYPE',null,'md5');
39 | if(!isset($_SESSION[$tokenName])) {
40 | $_SESSION[$tokenName] = array();
41 | }
42 | // 标识当前页面唯一性
43 | $tokenKey = md5($_SERVER['REQUEST_URI']);
44 | if(isset($_SESSION[$tokenName][$tokenKey])) {// 相同页面不重复生成session
45 | $tokenValue = $_SESSION[$tokenName][$tokenKey];
46 | }else{
47 | $tokenValue = is_callable($tokenType) ? $tokenType(microtime(true)) : md5(microtime(true));
48 | $_SESSION[$tokenName][$tokenKey] = $tokenValue;
49 | if(IS_AJAX && C('TOKEN_RESET',null,true))
50 | header($tokenName.': '.$tokenKey.'_'.$tokenValue); //ajax需要获得这个header并替换页面中meta中的token值
51 | }
52 | return array($tokenName,$tokenKey,$tokenValue);
53 | }
54 | }
--------------------------------------------------------------------------------
/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 | //2014-11-28 修改 如果有HTTP 4xx 3xx 5xx 头部,禁止存储
21 | //2014-12-1 修改 对注入的网址 防止生成,例如 /game/lst/SortType/hot/-e8-90-8c-e5-85-94-e7-88-b1-e6-b6-88-e9-99-a4/-e8-bf-9b-e5-87-bb-e7-9a-84-e9-83-a8-e8-90-bd/-e9-a3-8e-e4-ba-91-e5-a4-a9-e4-b8-8b/index.shtml
22 | if (C('HTML_CACHE_ON') && defined('HTML_FILE_NAME')
23 | && !preg_match('/Status.*[345]{1}\d{2}/i', implode(' ', headers_list()))
24 | && !preg_match('/(-[a-z0-9]{2}){3,}/i',HTML_FILE_NAME)) {
25 | //静态文件写入
26 | Storage::put(HTML_FILE_NAME, $content, 'html');
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Controller/HproseController.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Controller;
12 | /**
13 | * ThinkPHP Hprose控制器类
14 | */
15 | class HproseController {
16 |
17 | protected $allowMethodList = '';
18 | protected $crossDomain = false;
19 | protected $P3P = false;
20 | protected $get = true;
21 | protected $debug = false;
22 |
23 | /**
24 | * 架构函数
25 | * @access public
26 | */
27 | public function __construct() {
28 | //控制器初始化
29 | if(method_exists($this,'_initialize'))
30 | $this->_initialize();
31 | //导入类库
32 | Vendor('Hprose.HproseHttpServer');
33 | //实例化HproseHttpServer
34 | $server = new \HproseHttpServer();
35 | if($this->allowMethodList){
36 | $methods = $this->allowMethodList;
37 | }else{
38 | $methods = get_class_methods($this);
39 | $methods = array_diff($methods,array('__construct','__call','_initialize'));
40 | }
41 | $server->addMethods($methods,$this);
42 | if(APP_DEBUG || $this->debug ) {
43 | $server->setDebugEnabled(true);
44 | }
45 | // Hprose设置
46 | $server->setCrossDomainEnabled($this->crossDomain);
47 | $server->setP3PEnabled($this->P3P);
48 | $server->setGetEnabled($this->get);
49 | // 启动server
50 | $server->start();
51 | }
52 |
53 | /**
54 | * 魔术方法 有不存在的操作的时候执行
55 | * @access public
56 | * @param string $method 方法名
57 | * @param array $args 参数
58 | * @return mixed
59 | */
60 | public function __call($method,$args){}
61 | }
62 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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_SUPPORT_').':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 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Crypt/Driver/Base64.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Crypt\Driver;
12 | /**
13 | * Base64 加密实现类
14 | */
15 | class Base64 {
16 |
17 | /**
18 | * 加密字符串
19 | * @param string $str 字符串
20 | * @param string $key 加密key
21 | * @param integer $expire 有效期(秒)
22 | * @return string
23 | */
24 | public static function encrypt($data,$key,$expire=0) {
25 | $expire = sprintf('%010d', $expire ? $expire + time():0);
26 | $key = md5($key);
27 | $data = base64_encode($expire.$data);
28 | $x=0;
29 | $len = strlen($data);
30 | $l = strlen($key);
31 | for ($i=0;$i< $len;$i++) {
32 | if ($x== $l) $x=0;
33 | $char .=substr($key,$x,1);
34 | $x++;
35 | }
36 |
37 | for ($i=0;$i< $len;$i++) {
38 | $str .=chr(ord(substr($data,$i,1))+(ord(substr($char,$i,1)))%256);
39 | }
40 | return $str;
41 | }
42 |
43 | /**
44 | * 解密字符串
45 | * @param string $str 字符串
46 | * @param string $key 加密key
47 | * @return string
48 | */
49 | public static function decrypt($data,$key) {
50 | $key = md5($key);
51 | $x=0;
52 | $len = strlen($data);
53 | $l = strlen($key);
54 | for ($i=0;$i< $len;$i++) {
55 | if ($x== $l) $x=0;
56 | $char .=substr($key,$x,1);
57 | $x++;
58 | }
59 | for ($i=0;$i< $len;$i++) {
60 | if (ord(substr($data,$i,1)) 0 && $expire < time()) {
69 | return '';
70 | }
71 | $data = substr($data,10);
72 | return $data;
73 | }
74 | }
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Crypt/Driver/Crypt.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think\Crypt\Driver;
12 | /**
13 | * Crypt 加密实现类
14 | * @category ORG
15 | * @package ORG
16 | * @subpackage Crypt
17 | * @author liu21st
18 | */
19 | class Crypt {
20 |
21 | /**
22 | * 加密字符串
23 | * @param string $str 字符串
24 | * @param string $key 加密key
25 | * @param integer $expire 有效期(秒)
26 | * @return string
27 | */
28 | public static function encrypt($str,$key,$expire=0){
29 | $expire = sprintf('%010d', $expire ? $expire + time():0);
30 | $r = md5($key);
31 | $c = 0;
32 | $v = "";
33 | $str = $expire.$str;
34 | $len = strlen($str);
35 | $l = strlen($r);
36 | for ($i=0;$i<$len;$i++){
37 | if ($c== $l) $c=0;
38 | $v .= substr($r,$c,1) .
39 | (substr($str,$i,1) ^ substr($r,$c,1));
40 | $c++;
41 | }
42 | return self::ed($v,$key);
43 | }
44 |
45 | /**
46 | * 解密字符串
47 | * @param string $str 字符串
48 | * @param string $key 加密key
49 | * @return string
50 | */
51 | public static function decrypt($str,$key) {
52 | $str = self::ed($str,$key);
53 | $v = "";
54 | $len = strlen($str);
55 | for ($i=0;$i<$len;$i++){
56 | $md5 = substr($str,$i,1);
57 | $i++;
58 | $v .= (substr($str,$i,1) ^ $md5);
59 | }
60 | $data = $v;
61 | $expire = substr($data,0,10);
62 | if($expire > 0 && $expire < time()) {
63 | return '';
64 | }
65 | $data = substr($data,10);
66 | return $data;
67 | }
68 |
69 |
70 | static private function ed($str,$key) {
71 | $r = md5($key);
72 | $c = 0;
73 | $v = '';
74 | $len = strlen($str);
75 | $l = strlen($r);
76 | for ($i=0;$i<$len;$i++) {
77 | if ($c==$l) $c=0;
78 | $v .= substr($str,$i,1) ^ substr($r,$c,1);
79 | $c++;
80 | }
81 | return $v;
82 | }
83 | }
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Exception.class.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 | namespace Think;
12 | /**
13 | * ThinkPHP系统异常基类
14 | */
15 | class Exception extends \Exception {
16 | }
--------------------------------------------------------------------------------
/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 | }
39 | // 自动创建日志目录
40 | $log_dir = dirname($destination);
41 | if (!is_dir($log_dir)) {
42 | mkdir($log_dir, 0755, true);
43 | }
44 | //检测日志文件大小,超过配置大小则备份日志文件重新生成
45 | if(is_file($destination) && floor($this->config['log_file_size']) <= filesize($destination) ){
46 | rename($destination,dirname($destination).'/'.time().'-'.basename($destination));
47 | }
48 | error_log("[{$now}] ".$_SERVER['REMOTE_ADDR'].' '.$_SERVER['REQUEST_URI']."\r\n{$log}\r\n", 3,$destination);
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/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 | }
43 | sae_debug($logstr);
44 | if($is_debug){
45 | sae_set_display_errors(true);
46 | }
47 |
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Session/Driver/Memcache.class.php:
--------------------------------------------------------------------------------
1 | lifeTime = C('SESSION_EXPIRE') ? C('SESSION_EXPIRE') : $this->lifeTime;
17 | // $this->sessionName = $sessName;
18 | $options = array(
19 | 'timeout' => C('SESSION_TIMEOUT') ? C('SESSION_TIMEOUT') : 1,
20 | 'persistent' => C('SESSION_PERSISTENT') ? C('SESSION_PERSISTENT') : 0
21 | );
22 | $this->handle = new \Memcache;
23 | $hosts = explode(',', C('MEMCACHE_HOST'));
24 | $ports = explode(',', C('MEMCACHE_PORT'));
25 | foreach ($hosts as $i=>$host) {
26 | $port = isset($ports[$i]) ? $ports[$i] : $ports[0];
27 | $this->handle->addServer($host, $port, true, 1, $options['timeout']);
28 | }
29 | return true;
30 | }
31 |
32 | /**
33 | * 关闭Session
34 | * @access public
35 | */
36 | public function close() {
37 | $this->gc(ini_get('session.gc_maxlifetime'));
38 | $this->handle->close();
39 | $this->handle = null;
40 | return true;
41 | }
42 |
43 | /**
44 | * 读取Session
45 | * @access public
46 | * @param string $sessID
47 | */
48 | public function read($sessID) {
49 | return $this->handle->get($this->sessionName.$sessID);
50 | }
51 |
52 | /**
53 | * 写入Session
54 | * @access public
55 | * @param string $sessID
56 | * @param String $sessData
57 | */
58 | public function write($sessID, $sessData) {
59 | return $this->handle->set($this->sessionName.$sessID, $sessData, 0, $this->lifeTime);
60 | }
61 |
62 | /**
63 | * 删除Session
64 | * @access public
65 | * @param string $sessID
66 | */
67 | public function destroy($sessID) {
68 | return $this->handle->delete($this->sessionName.$sessID);
69 | }
70 |
71 | /**
72 | * Session 垃圾回收
73 | * @access public
74 | * @param string $sessMaxLifeTime
75 | */
76 | public function gc($sessMaxLifeTime) {
77 | return true;
78 | }
79 | }
80 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/1.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/2.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/3.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/4.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/5.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/6.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/7.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/bgs/8.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/bgs/8.jpg
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/ttfs/1.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/ttfs/1.ttf
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/ttfs/2.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/ttfs/2.ttf
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/ttfs/3.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/ttfs/3.ttf
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/ttfs/4.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/ttfs/4.ttf
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/ttfs/5.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/ttfs/5.ttf
--------------------------------------------------------------------------------
/ThinkPHP/Library/Think/Verify/ttfs/6.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/Library/Think/Verify/ttfs/6.ttf
--------------------------------------------------------------------------------
/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 <<_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 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Boris/DumpInspector.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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Hprose/HproseClassManager.php:
--------------------------------------------------------------------------------
1 | *
20 | * *
21 | \**********************************************************/
22 |
23 | class HproseClassManager {
24 | private static $classCache1 = array();
25 | private static $classCache2 = array();
26 | public static function register($class, $alias) {
27 | self::$classCache1[$alias] = $class;
28 | self::$classCache2[$class] = $alias;
29 | }
30 | public static function getClassAlias($class) {
31 | if (array_key_exists($class, self::$classCache2)) {
32 | return self::$classCache2[$class];
33 | }
34 | $alias = str_replace('\\', '_', $class);
35 | self::register($class, $alias);
36 | return $alias;
37 | }
38 | public static function getClass($alias) {
39 | if (array_key_exists($alias, self::$classCache1)) {
40 | return self::$classCache1[$alias];
41 | }
42 | if (!class_exists($alias)) {
43 | $class = str_replace('_', '\\', $alias);
44 | if (class_exists($class)) {
45 | self::register($class, $alias);
46 | return $class;
47 | }
48 | eval("class " . $alias . " { }");
49 | }
50 | return $alias;
51 | }
52 | }
53 | ?>
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Hprose/HproseTags.php:
--------------------------------------------------------------------------------
1 | *
20 | * *
21 | \**********************************************************/
22 |
23 | class HproseTags {
24 | /* Serialize Tags */
25 | const TagInteger = 'i';
26 | const TagLong = 'l';
27 | const TagDouble = 'd';
28 | const TagNull = 'n';
29 | const TagEmpty = 'e';
30 | const TagTrue = 't';
31 | const TagFalse = 'f';
32 | const TagNaN = 'N';
33 | const TagInfinity = 'I';
34 | const TagDate = 'D';
35 | const TagTime = 'T';
36 | const TagUTC = 'Z';
37 | const TagBytes = 'b';
38 | const TagUTF8Char = 'u';
39 | const TagString = 's';
40 | const TagGuid = 'g';
41 | const TagList = 'a';
42 | const TagMap = 'm';
43 | const TagClass = 'c';
44 | const TagObject = 'o';
45 | const TagRef = 'r';
46 | /* Serialize Marks */
47 | const TagPos = '+';
48 | const TagNeg = '-';
49 | const TagSemicolon = ';';
50 | const TagOpenbrace = '{';
51 | const TagClosebrace = '}';
52 | const TagQuote = '"';
53 | const TagPoint = '.';
54 | /* Protocol Tags */
55 | const TagFunctions = 'F';
56 | const TagCall = 'C';
57 | const TagResult = 'R';
58 | const TagArgument = 'A';
59 | const TagError = 'E';
60 | const TagEnd = 'z';
61 | }
62 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/README.txt:
--------------------------------------------------------------------------------
1 | 第三方类库包目录
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/plugins/modifier.date_format.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: date_format
14 | * Purpose: format datestamps via strftime
15 | * Input:
16 | * - string: input date string
17 | * - format: strftime format for output
18 | * - default_date: default date if $string is empty
19 | *
20 | * @link http://www.smarty.net/manual/en/language.modifier.date.format.php date_format (Smarty online manual)
21 | * @author Monte Ohrt
22 | * @param string $string input date string
23 | * @param string $format strftime format for output
24 | * @param string $default_date default date if $string is empty
25 | * @param string $formatter either 'strftime' or 'auto'
26 | * @return string |void
27 | * @uses smarty_make_timestamp()
28 | */
29 | function smarty_modifier_date_format($string, $format = SMARTY_RESOURCE_DATE_FORMAT, $default_date = '',$formatter='auto')
30 | {
31 | /**
32 | * Include the {@link shared.make_timestamp.php} plugin
33 | */
34 | require_once(SMARTY_PLUGINS_DIR . 'shared.make_timestamp.php');
35 | if ($string != '') {
36 | $timestamp = smarty_make_timestamp($string);
37 | } elseif ($default_date != '') {
38 | $timestamp = smarty_make_timestamp($default_date);
39 | } else {
40 | return;
41 | }
42 | if($formatter=='strftime'||($formatter=='auto'&&strpos($format,'%')!==false)) {
43 | if (DS == '\\') {
44 | $_win_from = array('%D', '%h', '%n', '%r', '%R', '%t', '%T');
45 | $_win_to = array('%m/%d/%y', '%b', "\n", '%I:%M:%S %p', '%H:%M', "\t", '%H:%M:%S');
46 | if (strpos($format, '%e') !== false) {
47 | $_win_from[] = '%e';
48 | $_win_to[] = sprintf('%\' 2d', date('j', $timestamp));
49 | }
50 | if (strpos($format, '%l') !== false) {
51 | $_win_from[] = '%l';
52 | $_win_to[] = sprintf('%\' 2d', date('h', $timestamp));
53 | }
54 | $format = str_replace($_win_from, $_win_to, $format);
55 | }
56 | return strftime($format, $timestamp);
57 | } else {
58 | return date($format, $timestamp);
59 | }
60 | }
61 |
62 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/plugins/modifier.truncate.php:
--------------------------------------------------------------------------------
1 |
13 | * Name: truncate
14 | * Purpose: Truncate a string to a certain length if necessary,
15 | * optionally splitting in the middle of a word, and
16 | * appending the $etc string or inserting $etc into the middle.
17 | *
18 | * @link http://smarty.php.net/manual/en/language.modifier.truncate.php truncate (Smarty online manual)
19 | * @author Monte Ohrt
20 | * @param string $string input string
21 | * @param integer $length length of truncated text
22 | * @param string $etc end string
23 | * @param boolean $break_words truncate at word boundary
24 | * @param boolean $middle truncate in the middle of text
25 | * @return string truncated string
26 | */
27 | function smarty_modifier_truncate($string, $length = 80, $etc = '...', $break_words = false, $middle = false) {
28 | if ($length == 0)
29 | return '';
30 |
31 | if (SMARTY_MBSTRING /* ^phpunit */&&empty($_SERVER['SMARTY_PHPUNIT_DISABLE_MBSTRING'])/* phpunit$ */) {
32 | if (mb_strlen($string, SMARTY_RESOURCE_CHAR_SET) > $length) {
33 | $length -= min($length, mb_strlen($etc, SMARTY_RESOURCE_CHAR_SET));
34 | if (!$break_words && !$middle) {
35 | $string = preg_replace('/\s+?(\S+)?$/u', '', mb_substr($string, 0, $length + 1, SMARTY_RESOURCE_CHAR_SET));
36 | }
37 | if (!$middle) {
38 | return mb_substr($string, 0, $length, SMARTY_RESOURCE_CHAR_SET) . $etc;
39 | }
40 | return mb_substr($string, 0, $length / 2, SMARTY_RESOURCE_CHAR_SET) . $etc . mb_substr($string, - $length / 2, $length, SMARTY_RESOURCE_CHAR_SET);
41 | }
42 | return $string;
43 | }
44 |
45 | // no MBString fallback
46 | if (isset($string[$length])) {
47 | $length -= min($length, strlen($etc));
48 | if (!$break_words && !$middle) {
49 | $string = preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length + 1));
50 | }
51 | if (!$middle) {
52 | return substr($string, 0, $length) . $etc;
53 | }
54 | return substr($string, 0, $length / 2) . $etc . substr($string, - $length / 2);
55 | }
56 | return $string;
57 | }
58 |
59 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/plugins/modifiercompiler.to_charset.php:
--------------------------------------------------------------------------------
1 |
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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/plugins/shared.literal_compiler_param.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 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/plugins/shared.mb_str_replace.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/plugins/shared.mb_unicode.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/plugins/variablefilter.htmlspecialchars.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_break.php:
--------------------------------------------------------------------------------
1 | true, 'foreach' => true, 'while' => true, 'section' => true);
45 | // check and get attributes
46 | $_attr = $this->getAttributes($compiler, $args);
47 |
48 | if ($_attr['nocache'] === true) {
49 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
50 | }
51 |
52 | if (isset($_attr['levels'])) {
53 | if (!is_numeric($_attr['levels'])) {
54 | $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno);
55 | }
56 | $_levels = $_attr['levels'];
57 | } else {
58 | $_levels = 1;
59 | }
60 | $level_count = $_levels;
61 | $stack_count = count($compiler->_tag_stack) - 1;
62 | while ($level_count > 0 && $stack_count >= 0) {
63 | if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {
64 | $level_count--;
65 | }
66 | $stack_count--;
67 | }
68 | if ($level_count != 0) {
69 | $compiler->trigger_template_error("cannot break {$_levels} level(s)", $compiler->lex->taglineno);
70 | }
71 | $compiler->has_code = true;
72 | return "";
73 | }
74 |
75 | }
76 |
77 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_continue.php:
--------------------------------------------------------------------------------
1 | true, 'foreach' => true, 'while' => true, 'section' => true);
46 | // check and get attributes
47 | $_attr = $this->getAttributes($compiler, $args);
48 |
49 | if ($_attr['nocache'] === true) {
50 | $compiler->trigger_template_error('nocache option not allowed', $compiler->lex->taglineno);
51 | }
52 |
53 | if (isset($_attr['levels'])) {
54 | if (!is_numeric($_attr['levels'])) {
55 | $compiler->trigger_template_error('level attribute must be a numeric constant', $compiler->lex->taglineno);
56 | }
57 | $_levels = $_attr['levels'];
58 | } else {
59 | $_levels = 1;
60 | }
61 | $level_count = $_levels;
62 | $stack_count = count($compiler->_tag_stack) - 1;
63 | while ($level_count > 0 && $stack_count >= 0) {
64 | if (isset($_is_loopy[$compiler->_tag_stack[$stack_count][0]])) {
65 | $level_count--;
66 | }
67 | $stack_count--;
68 | }
69 | if ($level_count != 0) {
70 | $compiler->trigger_template_error("cannot continue {$_levels} level(s)", $compiler->lex->taglineno);
71 | }
72 | $compiler->has_code = true;
73 | return "";
74 | }
75 |
76 | }
77 |
78 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_eval.php:
--------------------------------------------------------------------------------
1 | required_attributes = array('var');
52 | $this->optional_attributes = array('assign');
53 | // check and get attributes
54 | $_attr = $this->getAttributes($compiler, $args);
55 | if (isset($_attr['assign'])) {
56 | // output will be stored in a smarty variable instead of beind displayed
57 | $_assign = $_attr['assign'];
58 | }
59 |
60 | // create template object
61 | $_output = "\$_template = new {$compiler->smarty->template_class}('eval:'.".$_attr['var'].", \$_smarty_tpl->smarty, \$_smarty_tpl);";
62 | //was there an assign attribute?
63 | if (isset($_assign)) {
64 | $_output .= "\$_smarty_tpl->assign($_assign,\$_template->fetch());";
65 | } else {
66 | $_output .= "echo \$_template->fetch();";
67 | }
68 | return "";
69 | }
70 |
71 | }
72 |
73 | ?>
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_private_function_plugin.php:
--------------------------------------------------------------------------------
1 | has_output = true;
49 |
50 | // check and get attributes
51 | $_attr = $this->getAttributes($compiler, $args);
52 | if ($_attr['nocache'] === true) {
53 | $compiler->tag_nocache = true;
54 | }
55 | unset($_attr['nocache']);
56 | // convert attributes into parameter array string
57 | $_paramsArray = array();
58 | foreach ($_attr as $_key => $_value) {
59 | if (is_int($_key)) {
60 | $_paramsArray[] = "$_key=>$_value";
61 | } else {
62 | $_paramsArray[] = "'$_key'=>$_value";
63 | }
64 | }
65 | $_params = 'array(' . implode(",", $_paramsArray) . ')';
66 | // compile code
67 | $output = "\n";
68 | return $output;
69 | }
70 |
71 | }
72 |
73 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_compile_setfilter.php:
--------------------------------------------------------------------------------
1 | variable_filter_stack[] = $compiler->template->variable_filters;
31 | $compiler->template->variable_filters = $parameter['modifier_list'];
32 | // this tag does not return compiled code
33 | $compiler->has_code = false;
34 | return true;
35 | }
36 |
37 | }
38 |
39 | /**
40 | * Smarty Internal Plugin Compile Setfilterclose Class
41 | *
42 | * @package Smarty
43 | * @subpackage Compiler
44 | */
45 | class Smarty_Internal_Compile_Setfilterclose extends Smarty_Internal_CompileBase {
46 |
47 | /**
48 | * Compiles code for the {/setfilter} tag
49 | *
50 | * This tag does not generate compiled output. It resets variable filter.
51 | *
52 | * @param array $args array with attributes from parser
53 | * @param object $compiler compiler object
54 | * @return string compiled code
55 | */
56 | public function compile($args, $compiler)
57 | {
58 | $_attr = $this->getAttributes($compiler, $args);
59 | // reset variable filter to previous state
60 | if (count($compiler->variable_filter_stack)) {
61 | $compiler->template->variable_filters = array_pop($compiler->variable_filter_stack);
62 | } else {
63 | $compiler->template->variable_filters = array();
64 | }
65 | // this tag does not return compiled code
66 | $compiler->has_code = false;
67 | return true;
68 | }
69 |
70 | }
71 |
72 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_get_include_path.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_resource_stream.php:
--------------------------------------------------------------------------------
1 | filepath = str_replace(':', '://', $source->resource);
34 | $source->uid = false;
35 | $source->content = $this->getContent($source);
36 | $source->timestamp = false;
37 | $source->exists = !!$source->content;
38 | }
39 |
40 | /**
41 | * Load template's source from stream into current template object
42 | *
43 | * @param Smarty_Template_Source $source source object
44 | * @return string template source
45 | * @throws SmartyException if source cannot be loaded
46 | */
47 | public function getContent(Smarty_Template_Source $source)
48 | {
49 | $t = '';
50 | // the availability of the stream has already been checked in Smarty_Resource::fetch()
51 | $fp = fopen($source->filepath, 'r+');
52 | if ($fp) {
53 | while (!feof($fp) && ($current_line = fgets($fp)) !== false) {
54 | $t .= $current_line;
55 | }
56 | fclose($fp);
57 | return $t;
58 | } else {
59 | return false;
60 | }
61 | }
62 |
63 | /**
64 | * modify resource_name according to resource handlers specifications
65 | *
66 | * @param Smarty $smarty Smarty instance
67 | * @param string $resource_name resource_name to make unique
68 | * @return string unique resource name
69 | */
70 | protected function buildUniqueResourceName(Smarty $smarty, $resource_name)
71 | {
72 | return get_class($this) . '#' . $resource_name;
73 | }
74 | }
75 |
76 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/Smarty/sysplugins/smarty_internal_write_file.php:
--------------------------------------------------------------------------------
1 | _file_perms !== null) {
31 | $old_umask = umask(0);
32 | }
33 |
34 | $_dirpath = dirname($_filepath);
35 | // if subdirs, create dir structure
36 | if ($_dirpath !== '.' && !file_exists($_dirpath)) {
37 | mkdir($_dirpath, $smarty->_dir_perms === null ? 0777 : $smarty->_dir_perms, true);
38 | }
39 |
40 | // write to tmp file, then move to overt file lock race condition
41 | $_tmp_file = $_dirpath . DS . uniqid('wrt');
42 | if (!file_put_contents($_tmp_file, $_contents)) {
43 | error_reporting($_error_reporting);
44 | throw new SmartyException("unable to write file {$_tmp_file}");
45 | return false;
46 | }
47 |
48 | // remove original file
49 | @unlink($_filepath);
50 |
51 | // rename tmp file
52 | $success = rename($_tmp_file, $_filepath);
53 | if (!$success) {
54 | error_reporting($_error_reporting);
55 | throw new SmartyException("unable to write file {$_filepath}");
56 | return false;
57 | }
58 |
59 | if ($smarty->_file_perms !== null) {
60 | // set file permissions
61 | chmod($_filepath, $smarty->_file_perms);
62 | umask($old_umask);
63 | }
64 | error_reporting($_error_reporting);
65 | return true;
66 | }
67 |
68 | }
69 |
70 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/TemplateLite/internal/template.config_loader.php:
--------------------------------------------------------------------------------
1 | _config_module_loaded = true;
10 | $this->template_dir = $this->_get_dir($this->template_dir);
11 | $this->config_dir = $this->_get_dir($this->config_dir);
12 | $this->compile_dir = $this->_get_dir($this->compile_dir);
13 | $name = ($this->encode_file_name) ? md5($this->template_dir . $file . $section_name . $var_name).'.php' : str_replace(".", "_", str_replace("/", "_", $file."_".$section_name."_".$var_name)).'.php';
14 |
15 | if ($this->debugging)
16 | {
17 | $debug_start_time = array_sum(explode(' ', microtime()));
18 | }
19 |
20 | if ($this->cache)
21 | {
22 | array_push($this->_cache_info['config'], $file);
23 | }
24 |
25 | if (!$this->force_compile && file_exists($this->compile_dir.'c_'.$name) && (filemtime($this->compile_dir.'c_'.$name) > filemtime($this->config_dir.$file)))
26 | {
27 | include($this->compile_dir.'c_'.$name);
28 | return true;
29 | }
30 |
31 | if (!is_object($this->_config_obj))
32 | {
33 | require_once(TEMPLATE_LITE_DIR . "class.config.php");
34 | $this->_config_obj = new $this->config_class;
35 | $this->_config_obj->overwrite = $this->config_overwrite;
36 | $this->_config_obj->booleanize = $this->config_booleanize;
37 | $this->_config_obj->fix_new_lines = $this->config_fix_new_lines;
38 | $this->_config_obj->read_hidden = $this->config_read_hidden;
39 | }
40 |
41 | if (!($_result = $this->_config_obj->config_load($this->config_dir.$file, $section_name, $var_name)))
42 | {
43 | return false;
44 | }
45 |
46 | if (!empty($var_name) || !empty($section_name))
47 | {
48 | $output = "\$this->_confs = " . var_export($_result, true) . ";";
49 | }
50 | else
51 | {
52 | // must shift of the bottom level of the array to get rid of the section labels
53 | $_temp = array();
54 | foreach($_result as $value)
55 | {
56 | $_temp = array_merge($_temp, $value);
57 | }
58 | $output = "\$this->_confs = " . var_export($_temp, true) . ";";
59 | }
60 |
61 | $f = fopen($this->compile_dir.'c_'.$name, "w");
62 | fwrite($f, '');
63 | fclose($f);
64 | eval($output);
65 |
66 | if ($this->debugging)
67 | {
68 | $this->_templatelite_debug_info[] = array('type' => 'config',
69 | 'filename' => $file.' ['.$section_name.'] '.$var_name,
70 | 'depth' => 0,
71 | 'exec_time' => array_sum(explode(' ', microtime())) - $debug_start_time );
72 | }
73 |
74 | return true;
75 |
76 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/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 | ?>
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/CREDITS:
--------------------------------------------------------------------------------
1 | XXTEA PHP extension
2 | Ma Bingyao (andot@coolcode.cn)
3 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/INSTALL:
--------------------------------------------------------------------------------
1 | Installing of XXTEA PHP package.
2 |
3 | There are many ways to build the package. Below you can find details for most
4 | useful ways of package building:
5 |
6 | 1. with PHP
7 | 2. with phpize utility
8 | 3. under Windows using Microsoft Visual C (.NET or VC6)
9 |
10 | -----------------------------------------------------------------------------
11 | Way 1: Building the package with PHP
12 | -----------------------------------------------------------------------------
13 |
14 | 1. Create ext/xxtea folder in the php-source-folder. Copy all files
15 | from the package into created folder.
16 |
17 | 2. Run
18 | ./buildconf
19 | to rebuild PHP's configure script.
20 |
21 | 3. Compile php with option:
22 | --enable-xxtea to build bundled into PHP module
23 | --enable-xxtea=shared to build dinamycally loadable module
24 |
25 | -----------------------------------------------------------------------------
26 | Way 2: Building the package with phpize utility
27 | -----------------------------------------------------------------------------
28 |
29 | 1. Unpack contents of the package.
30 |
31 | 2. Run
32 | phpize
33 | script, which will prepare environment for building XXTEA package.
34 |
35 | 3. Run
36 | ./configure --enable-xxtea=shared
37 | to generate makefile
38 |
39 | 4. Run
40 | make
41 | to build XXTEA extension library. It will be placed into
42 | ./modules folder.
43 |
44 | 5. Run
45 | make install
46 | to install XXTEA extension library into PHP
47 |
48 | -----------------------------------------------------------------------------
49 | Way 3: Building the package under Windows using Microsoft Visual C (.NET or VC6)
50 | -----------------------------------------------------------------------------
51 | 1. Create ext/xxtea folder in the php-source-folder. Copy all files
52 | from the package into created folder.
53 |
54 | 2. Copy php4ts.lib (for PHP4) or php5ts.lib (for PHP5) static library from
55 | your version of PHP into ext/xxtea folder.
56 |
57 | 3. Open php_xxtea.sln - solution file under MSVC.NET or php_xxtea.dsw -
58 | workspace file under MSVC6. Try to build Release_php4 (for PHP4) or Release_php5
59 | (for PHP5) configuration.
60 |
61 | 4. Copy php_xxtea.dll from ext/xxtea/Release_php4 or ext/xxtea/Release_php5
62 | into {extension_dir} folder. Path to {extension_dir} can be found in php.ini
63 |
64 | 5. Add line
65 | extension=php_xxtea.dll
66 | into php.ini
67 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/phpRPC/pecl/xxtea/test/test.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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.
--------------------------------------------------------------------------------
/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 | =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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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 | }
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/spyc/tests/comments.yaml:
--------------------------------------------------------------------------------
1 | foo: 'bar' #Comment
2 | arr: ['x', 'y', 'z'] # Comment here
3 | bar: kittens
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/spyc/tests/failing1.yaml:
--------------------------------------------------------------------------------
1 | MyObject:
2 | Prop1: {key1:val1}
--------------------------------------------------------------------------------
/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
--------------------------------------------------------------------------------
/ThinkPHP/Library/Vendor/spyc/tests/quotes.yaml:
--------------------------------------------------------------------------------
1 | html_tags:
2 | -
3 | -
4 | html_content:
5 | -
hello world
6 | - hello
world
7 | text_content:
8 | - hello world
--------------------------------------------------------------------------------
/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 | 'FILE_UPLOAD_TYPE' => 'Sae',
39 | );
40 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ThinkPHP/Mode/lite.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | /**
13 | * ThinkPHP Lite模式定义
14 | */
15 | return array(
16 | // 配置文件
17 | 'config' => array(
18 | MODE_PATH.'Lite/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.'Lite/functions.php',
35 | COMMON_PATH.'Common/function.php',
36 | CORE_PATH . 'Hook'.EXT,
37 | CORE_PATH . 'App'.EXT,
38 | CORE_PATH . 'Dispatcher'.EXT,
39 | //CORE_PATH . 'Log'.EXT,
40 | CORE_PATH . 'Route'.EXT,
41 | CORE_PATH . 'Controller'.EXT,
42 | CORE_PATH . 'View'.EXT,
43 | ),
44 | // 行为扩展定义
45 | 'tags' => array(
46 | ),
47 | );
48 |
--------------------------------------------------------------------------------
/ThinkPHP/Tpl/dispatch_jump.tpl:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 | 跳转提示
11 |
21 |
22 |
23 |
24 |
25 |
:)
26 |
27 |
28 |
:(
29 |
30 |
31 |
32 |
33 | 页面自动 跳转 等待时间:
34 |
35 |
36 |
48 |
49 |
50 |
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/ThinkPHP/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/hzzly/canvas-vue-backstage/53c44495eca7731a216aed816c42fbc2b7a449e6/ThinkPHP/logo.png
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "topthink/thinkphp",
3 | "description": "the ThinkPHP Framework",
4 | "type": "framework",
5 | "keywords": ["framework","thinkphp","ORM"],
6 | "homepage": "http://thinkphp.cn/",
7 | "license": "Apache2",
8 | "authors": [
9 | {
10 | "name": "liu21st",
11 | "email": "liu21st@gmail.com"
12 | }
13 | ],
14 | "require": {
15 | "php": ">=5.3.0"
16 | },
17 | "minimum-stability": "dev"
18 | }
19 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
10 | // +----------------------------------------------------------------------
11 |
12 | // 应用入口文件
13 |
14 | // 检测PHP环境
15 | if(version_compare(PHP_VERSION,'5.3.0','<')) die('require PHP > 5.3.0 !');
16 |
17 | // 开启调试模式 建议开发阶段开启 部署阶段注释或者设为false
18 | define('APP_DEBUG',True);
19 |
20 |
21 | header("Content-type: text/html; charset=utf-8");
22 | header('Access-Control-Allow-Origin: *');
23 | header("Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept");
24 | header('Access-Control-Allow-Methods: GET, POST, PUT');
25 |
26 | //用于生成Admin模块
27 | // define('BIND_MODULE','Admin');
28 |
29 | // 定义应用目录
30 | define('APP_PATH','./Application/');
31 |
32 | // 引入ThinkPHP入口文件
33 | require './ThinkPHP/ThinkPHP.php';
34 |
35 | // 亲^_^ 后面不需要任何代码了 就是如此简单
36 |
--------------------------------------------------------------------------------