├── README.md ├── admin.php ├── application ├── admin │ ├── controller │ │ ├── Admin.php │ │ ├── Article.php │ │ ├── Attachment.php │ │ ├── Category.php │ │ ├── Common.php │ │ ├── Index.php │ │ ├── Login.php │ │ ├── System.php │ │ ├── Tag.php │ │ └── Upload.php │ └── view │ │ ├── admin │ │ └── password.html │ │ ├── article │ │ ├── add.html │ │ ├── edit.html │ │ └── index.html │ │ ├── attachment │ │ └── index.html │ │ ├── category │ │ ├── add.html │ │ ├── addBatch.html │ │ ├── edit.html │ │ └── index.html │ │ ├── index │ │ └── index.html │ │ ├── login │ │ └── login.html │ │ ├── public │ │ ├── footer.html │ │ ├── header.html │ │ ├── ueditor.html │ │ └── upload.html │ │ ├── system │ │ └── set.html │ │ └── tag │ │ └── index.html ├── command.php ├── common.php ├── common │ └── taglib │ │ └── Article.php ├── config.php ├── database.php ├── index │ ├── controller │ │ ├── Article.php │ │ ├── Category.php │ │ ├── Common.php │ │ ├── Index.php │ │ ├── Search.php │ │ └── Tag.php │ └── view │ │ ├── article │ │ └── show.html │ │ ├── category │ │ ├── category.html │ │ └── list.html │ │ ├── index │ │ └── index.html │ │ ├── public │ │ ├── footer.html │ │ └── header.html │ │ ├── search │ │ └── index.html │ │ └── tag │ │ ├── index.html │ │ └── tag.html ├── install │ ├── common.php │ ├── config.php │ ├── controller │ │ └── Index.php │ └── view │ │ └── index │ │ ├── index.html │ │ ├── step1.html │ │ ├── step2.html │ │ ├── step3.html │ │ └── step4.html ├── route.php └── tags.php ├── data ├── install.lock └── install │ ├── database.tpl │ └── install.sql ├── extend └── org │ ├── Captcha.php │ ├── Http.php │ ├── Uploader.php │ └── captcha │ ├── 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 │ └── zhttfs │ └── 1.ttf ├── favicon.ico ├── index.php ├── install.php ├── public ├── 2016 │ ├── css │ │ ├── common.css │ │ └── layout.css │ ├── images │ │ ├── 20161107line.png │ │ ├── banner10.jpg │ │ ├── banner5.jpg │ │ ├── banner6.jpg │ │ ├── banner7.jpg │ │ ├── banner8.jpg │ │ ├── banner9.jpg │ │ ├── envelope.png │ │ ├── icon36.png │ │ ├── icon37.png │ │ ├── img59.jpg │ │ ├── img60.jpg │ │ ├── img61.jpg │ │ ├── img62.jpg │ │ ├── recruitment1.png │ │ ├── wqp_inco12.png │ │ ├── wwimg03.png │ │ ├── wwimg04.png │ │ ├── wwimg05.png │ │ ├── wwimg06.png │ │ ├── wwimg07.png │ │ ├── wwimg08.png │ │ ├── wwimg09.png │ │ ├── wwimg10.png │ │ ├── wwimg108.png │ │ ├── wwimg109.png │ │ ├── wwimg11.png │ │ ├── wwimg110.png │ │ ├── wwimg112.png │ │ ├── wwimg113.png │ │ ├── wwimg114.png │ │ ├── wwimg115.png │ │ ├── wwimg116.png │ │ ├── wwimg12.png │ │ ├── wwimg127.png │ │ ├── wwimg13.png │ │ ├── wwimg14.png │ │ ├── wwimg15.png │ │ ├── wwimg22.png │ │ ├── wwimg30.png │ │ ├── wwimg31.png │ │ ├── wwimg32.png │ │ ├── wwimg33.png │ │ ├── wwimg34.png │ │ ├── wwimg35.png │ │ ├── wwimg36.png │ │ ├── wwimg37.png │ │ ├── wwimg38.png │ │ ├── wwimg39.png │ │ ├── wwimg40.png │ │ ├── wwimg41.png │ │ ├── wwimg52.png │ │ ├── wwimg91.png │ │ ├── wwimg92.png │ │ ├── wwimg94.png │ │ ├── wwimg97.png │ │ ├── wwimg98.png │ │ ├── wwpic179.jpg │ │ ├── wwpic19.png │ │ ├── wwpic202.jpg │ │ ├── wwpic94.jpg │ │ ├── yysimg2.png │ │ ├── zdown.png │ │ ├── zhsh06.png │ │ └── zhsh06g.png │ ├── js │ │ ├── idangerous.swiper.min.js │ │ ├── jquery-1.12.2.min.js │ │ ├── layout.js │ │ └── nav.js │ └── picture │ │ ├── banner1.jpg │ │ ├── banner2.jpg │ │ ├── banner3.jpg │ │ ├── banner4.jpg │ │ ├── banner5.jpg │ │ ├── logo.jpg │ │ ├── wqp_img10.jpg │ │ ├── wwpic192.jpg │ │ ├── wwpic193.jpg │ │ ├── wwpic194.jpg │ │ └── wwpic195.jpg ├── admin │ ├── css │ │ ├── admin_login.css │ │ ├── common.css │ │ └── main.css │ ├── fonts │ │ ├── icomoon.dev.svg │ │ ├── icomoon.eot │ │ ├── icomoon.svg │ │ ├── icomoon.ttf │ │ └── icomoon.woff │ ├── images │ │ ├── login │ │ │ └── admin-login-btnbg.gif │ │ ├── logo.png │ │ ├── onCorrect.gif │ │ ├── onError.gif │ │ ├── onFocus.gif │ │ ├── onShow.gif │ │ └── tab-thbg.png │ └── js │ │ └── jquery-1.10.2.min.js ├── bootstrap │ ├── css │ │ ├── bootstrap.css │ │ ├── bootstrap.css.map │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.svg │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ └── js │ │ ├── Core Changelog.txt │ │ ├── Documentation │ │ └── index.html │ │ ├── Flash │ │ ├── ExternalCall.as │ │ ├── FileItem.as │ │ ├── SWFUpload v2.as3proj │ │ ├── SWFUpload.as │ │ ├── deploy.bat │ │ ├── obj │ │ │ ├── SWFUpload-v2Config.old │ │ │ └── SWFUpload-v2Config.xml │ │ └── swfupload.swf │ │ ├── bootstrap.js │ │ ├── bootstrap.min.js │ │ ├── check.js │ │ ├── npm.js │ │ ├── plugins │ │ ├── SWFObject License.txt │ │ ├── swfupload.cookies.js │ │ ├── swfupload.queue.js │ │ ├── swfupload.speed.js │ │ └── swfupload.swfobject.js │ │ ├── swfupload license.txt │ │ └── swfupload.js ├── images │ └── nopic_small.gif ├── install │ ├── css │ │ └── install.css │ ├── images │ │ ├── logo.png │ │ └── right.png │ └── layer │ │ ├── layer.js │ │ └── skin │ │ ├── default │ │ ├── icon-ext.png │ │ ├── icon.png │ │ ├── loading-0.gif │ │ ├── loading-1.gif │ │ └── loading-2.gif │ │ └── layer.css ├── js │ └── jquery-1.10.2.min.js ├── ueditor │ ├── dialogs │ │ ├── emotion │ │ │ ├── emotion.css │ │ │ ├── emotion.js │ │ │ └── images │ │ │ │ ├── 0.gif │ │ │ │ ├── bface.gif │ │ │ │ ├── cface.gif │ │ │ │ ├── fface.gif │ │ │ │ ├── jxface2.gif │ │ │ │ ├── neweditor-tab-bg.png │ │ │ │ ├── tface.gif │ │ │ │ ├── wface.gif │ │ │ │ └── yface.gif │ │ ├── formula │ │ │ ├── formula.css │ │ │ ├── formula.html │ │ │ ├── formula.js │ │ │ └── images │ │ │ │ └── formula.png │ │ ├── image │ │ │ ├── image.css │ │ │ ├── image.js │ │ │ └── images │ │ │ │ ├── close.png │ │ │ │ ├── upload1.png │ │ │ │ └── upload2.png │ │ ├── link │ │ │ └── link.js │ │ ├── map │ │ │ ├── map.html │ │ │ └── map.js │ │ └── video │ │ │ ├── images │ │ │ ├── center_focus.jpg │ │ │ ├── left_focus.jpg │ │ │ ├── none_focus.jpg │ │ │ └── right_focus.jpg │ │ │ ├── video.css │ │ │ └── video.js │ ├── lang │ │ └── zh-cn │ │ │ ├── images │ │ │ ├── copy.png │ │ │ ├── imglabel.png │ │ │ ├── localimage.png │ │ │ ├── music.png │ │ │ └── upload.png │ │ │ └── zh-cn.js │ ├── themes │ │ └── default │ │ │ ├── css │ │ │ ├── umeditor.css │ │ │ └── umeditor.min.css │ │ │ └── images │ │ │ ├── caret.png │ │ │ ├── close.png │ │ │ ├── icons.gif │ │ │ ├── icons.png │ │ │ ├── ok.gif │ │ │ ├── pop-bg.png │ │ │ ├── spacer.gif │ │ │ └── videologo.gif │ ├── umeditor.config.js │ └── umeditor.min.js └── webuploader │ ├── css │ └── webuploader.css │ ├── images │ ├── bg.png │ ├── icons.png │ ├── image.png │ ├── progress.png │ └── success.png │ └── js │ ├── Uploader.swf │ ├── upload.js │ └── webuploader.min.js ├── router.php ├── runtime ├── log │ ├── 201703 │ │ └── 16.log │ └── 201705 │ │ └── 25.log └── temp │ ├── 0c8b49059bc1ebbe048a5121bc1bf7a6.php │ ├── 17234b4be5c21c14091d612be45bd3bc.php │ ├── 210c8c356ba9bd3981b6ab43e9f305b8.php │ ├── 30d1cc99c1bc034e5c200ba707dd35a1.php │ ├── 475cf067fe13cd4ae194a4f93e6289fb.php │ ├── 6c53111cf3b524422fc724b9b7d7d0a2.php │ ├── 82ea6f6b4718772cb88cdadfeb464935.php │ ├── a53be606ea4014d3a783dc1d42a08787.php │ ├── b2fd86b9b813bac8e5a0c61c78bac52b.php │ ├── b444870957310c359fdda42c3909a8ee.php │ ├── b86381f1ff6d237a2d2dca38ef1726ee.php │ ├── cb3dc614ba1acd33d17896132e3ad7ec.php │ ├── cf54bafd355a108a93266bd22a0f461f.php │ ├── d3023fa7c137fe58ecb1423dc9f4a26c.php │ ├── dd63a90fe72680c336fcdfd81f850fa5.php │ └── f4cd5eabdab173c211f78c2339146fe0.php └── thinkphp ├── .travis.yml ├── CONTRIBUTING.md ├── LICENSE.txt ├── README.md ├── base.php ├── codecov.yml ├── composer.json ├── console.php ├── convention.php ├── helper.php ├── lang └── zh-cn.php ├── library ├── think │ ├── App.php │ ├── Build.php │ ├── Cache.php │ ├── Collection.php │ ├── Config.php │ ├── Console.php │ ├── Controller.php │ ├── Cookie.php │ ├── Db.php │ ├── Debug.php │ ├── Env.php │ ├── Error.php │ ├── Exception.php │ ├── File.php │ ├── Hook.php │ ├── Lang.php │ ├── Loader.php │ ├── Log.php │ ├── Model.php │ ├── Paginator.php │ ├── Process.php │ ├── Request.php │ ├── Response.php │ ├── Route.php │ ├── Session.php │ ├── Template.php │ ├── Url.php │ ├── Validate.php │ ├── View.php │ ├── cache │ │ ├── Driver.php │ │ └── driver │ │ │ ├── File.php │ │ │ ├── Lite.php │ │ │ ├── Memcache.php │ │ │ ├── Memcached.php │ │ │ ├── Redis.php │ │ │ ├── Sqlite.php │ │ │ ├── Wincache.php │ │ │ └── Xcache.php │ ├── config │ │ └── driver │ │ │ ├── Ini.php │ │ │ ├── Json.php │ │ │ └── Xml.php │ ├── console │ │ ├── Command.php │ │ ├── Input.php │ │ ├── LICENSE │ │ ├── Output.php │ │ ├── bin │ │ │ ├── README.md │ │ │ └── hiddeninput.exe │ │ ├── command │ │ │ ├── Build.php │ │ │ ├── Clear.php │ │ │ ├── Help.php │ │ │ ├── Lists.php │ │ │ ├── Make.php │ │ │ ├── make │ │ │ │ ├── Controller.php │ │ │ │ ├── Model.php │ │ │ │ └── stubs │ │ │ │ │ ├── controller.plain.stub │ │ │ │ │ ├── controller.stub │ │ │ │ │ └── model.stub │ │ │ └── optimize │ │ │ │ ├── Autoload.php │ │ │ │ ├── Config.php │ │ │ │ ├── Route.php │ │ │ │ └── Schema.php │ │ ├── input │ │ │ ├── Argument.php │ │ │ ├── Definition.php │ │ │ └── Option.php │ │ └── output │ │ │ ├── Ask.php │ │ │ ├── Descriptor.php │ │ │ ├── Formatter.php │ │ │ ├── Question.php │ │ │ ├── descriptor │ │ │ └── Console.php │ │ │ ├── driver │ │ │ ├── Buffer.php │ │ │ ├── Console.php │ │ │ └── Nothing.php │ │ │ ├── formatter │ │ │ ├── Stack.php │ │ │ └── Style.php │ │ │ └── question │ │ │ ├── Choice.php │ │ │ └── Confirmation.php │ ├── controller │ │ ├── Rest.php │ │ └── Yar.php │ ├── db │ │ ├── Builder.php │ │ ├── Connection.php │ │ ├── Query.php │ │ ├── builder │ │ │ ├── Mysql.php │ │ │ ├── Pgsql.php │ │ │ ├── Sqlite.php │ │ │ └── Sqlsrv.php │ │ ├── connector │ │ │ ├── Mysql.php │ │ │ ├── Pgsql.php │ │ │ ├── Sqlite.php │ │ │ ├── Sqlsrv.php │ │ │ └── pgsql.sql │ │ └── exception │ │ │ ├── BindParamException.php │ │ │ ├── DataNotFoundException.php │ │ │ └── ModelNotFoundException.php │ ├── debug │ │ ├── Console.php │ │ └── Html.php │ ├── exception │ │ ├── ClassNotFoundException.php │ │ ├── DbException.php │ │ ├── ErrorException.php │ │ ├── Handle.php │ │ ├── HttpException.php │ │ ├── HttpResponseException.php │ │ ├── PDOException.php │ │ ├── RouteNotFoundException.php │ │ ├── TemplateNotFoundException.php │ │ ├── ThrowableError.php │ │ └── ValidateException.php │ ├── log │ │ └── driver │ │ │ ├── File.php │ │ │ ├── Socket.php │ │ │ └── Test.php │ ├── model │ │ ├── Merge.php │ │ ├── Pivot.php │ │ └── Relation.php │ ├── paginator │ │ ├── Collection.php │ │ └── driver │ │ │ └── Bootstrap.php │ ├── process │ │ ├── Builder.php │ │ ├── Utils.php │ │ ├── exception │ │ │ ├── Faild.php │ │ │ └── Timeout.php │ │ └── pipes │ │ │ ├── Pipes.php │ │ │ ├── Unix.php │ │ │ └── Windows.php │ ├── response │ │ ├── Json.php │ │ ├── Jsonp.php │ │ ├── Redirect.php │ │ ├── View.php │ │ └── Xml.php │ ├── session │ │ └── driver │ │ │ ├── Memcache.php │ │ │ ├── Memcached.php │ │ │ └── Redis.php │ ├── template │ │ ├── TagLib.php │ │ ├── driver │ │ │ └── File.php │ │ └── taglib │ │ │ └── Cx.php │ └── view │ │ └── driver │ │ ├── Php.php │ │ └── Think.php └── traits │ ├── controller │ └── Jump.php │ ├── model │ └── SoftDelete.php │ └── think │ └── Instance.php ├── logo.png ├── phpunit.xml ├── start.php └── tpl ├── default_index.tpl ├── dispatch_jump.tpl ├── page_trace.tpl └── think_exception.tpl /README.md: -------------------------------------------------------------------------------- 1 | # tp5cms 2 | 一个基于thinkphp5的cms框架,前端采用swiper+bootstrap+自定义layout,外观相当美观。考虑到目前市场成熟的基于php的cms都商业收费,具有一定的使用成本,而且比较难定制开发,故本人收集到该代码时首先考虑到免费开源。系统存在一些问题,需要修改,本人希望本人和同行小伙伴们继续后面的工作,开发出一套基于php的真正免费开源的cms。 3 | -------------------------------------------------------------------------------- /admin.php: -------------------------------------------------------------------------------- 1 | isPost()) { 11 | $data = input('post.'); 12 | $id=session('cms_admin_id'); 13 | $r=db('admin')->where('id',$id)->find(); 14 | if($r['password']!=md5(md5($data['password_o']).$r['encrypt'])){ 15 | $this->error('原密码错误'); 16 | } 17 | if($data['password_n']!=$data['password_r']){ 18 | $this->error('新密码与重复密码不一致'); 19 | } 20 | $encrypt=create_randomstr(); 21 | $password=md5(md5($data['password_n']).$encrypt); 22 | db('admin')->where('id',$id)->update(['password'=>$password,'encrypt'=>$encrypt]); 23 | $this->success('密码修改成功','Login/index'); 24 | } 25 | return $this->fetch(); 26 | } 27 | 28 | 29 | } 30 | -------------------------------------------------------------------------------- /application/admin/controller/Attachment.php: -------------------------------------------------------------------------------- 1 | check(); 10 | $list = db('attachment')->order('id desc')->paginate(10); 11 | $page = $list->render(); 12 | $this->assign('list', $list); 13 | $this->assign('page', $page); 14 | return $this->fetch(); 15 | } 16 | public function check() 17 | { 18 | $list = db('attachment')->field('id,filepath')->select(); 19 | foreach ($list as $v) { 20 | if (!is_file($v['filepath'])) { 21 | db('attachment')->where('id', $v['id'])->delete(); 22 | } 23 | } 24 | if (!db('article')->limit(1)->select()&&!db('category')->limit(1)->select()) { 25 | $list = db('attachment')->field('id,filepath')->select(); 26 | foreach ($list as $v) { 27 | if (is_file($v['filepath'])) { 28 | @unlink($v['filepath']); 29 | } 30 | db('attachment')->where('id', $v['id'])->delete(); 31 | } 32 | } 33 | } 34 | public function delete() 35 | { 36 | $data = input('param.'); 37 | if (!isset($data['id']) || empty($data['id'])) { 38 | $this->error('参数错误'); 39 | } 40 | if (is_array($data['id'])) { 41 | foreach ($data['id'] as $v) { 42 | $v = intval($v); 43 | $file = db('attachment')->where('id', $v)->value('filepath'); 44 | db('attachment')->where('id', $v)->delete(); 45 | @unlink($file); 46 | } 47 | $this->success('删除成功'); 48 | } else { 49 | $id = intval($data['id']); 50 | if (!$id) { 51 | $this->error('非法参数'); 52 | } 53 | $file = db('attachment')->where('id', $id)->value('filepath'); 54 | db('attachment')->where('id', $id)->delete(); 55 | @unlink($file); 56 | $this->success('删除成功'); 57 | } 58 | $this->success('删除成功'); 59 | } 60 | } -------------------------------------------------------------------------------- /application/admin/controller/Common.php: -------------------------------------------------------------------------------- 1 | time() - session('cms_login_time') > 2 * 60 * 60) { 11 | session('cms_admin_username', null); 12 | session('cms_admin_id', null); 13 | session('cms_login_time', null); 14 | $this->redirect(url('Login/index')); 15 | } 16 | } 17 | public function logout() 18 | { 19 | session('cms_admin_username', null); 20 | session('cms_admin_id', null); 21 | session('cms_login_time', null); 22 | $this->success('退出成功', 'Login/index'); 23 | } 24 | public function cache() 25 | { 26 | $path=RUNTIME_PATH; 27 | delDirAndFile($path); 28 | $this->success('清除缓存成功'); 29 | } 30 | } -------------------------------------------------------------------------------- /application/admin/controller/Index.php: -------------------------------------------------------------------------------- 1 | PHP_OS.' '.$_SERVER["SERVER_SOFTWARE"], 13 | 'PHP运行方式' => php_sapi_name(), 14 | //'MYSQL版本' => mysql_get_client_info(), 15 | '上传附件限制' => ini_get('upload_max_filesize'), 16 | '执行时间限制' => ini_get('max_execution_time').'秒', 17 | '磁盘剩余空间 '=> round((@disk_free_space(".")/(1024*1024)),2).'M', 18 | ]; 19 | $this->assign('server_info',$server_info); 20 | return $this->fetch(); 21 | } 22 | 23 | 24 | } 25 | -------------------------------------------------------------------------------- /application/admin/controller/Login.php: -------------------------------------------------------------------------------- 1 | fetch('login'); 12 | } 13 | public function doLogin() 14 | { 15 | if (request()->isPost()) { 16 | $username = input('username'); 17 | $passowrd = input('password'); 18 | $code = input('code'); 19 | $rule = ['username' => 'require|max:20', 'password' => 'require|max:20', 'code' => 'require']; 20 | $msg = ['username.require' => '用户名必须填写', 'username.max' => '用户名最多不能超过20个字符', 'password.require' => '密码必须填写', 'password.between' => '密码最多不能超过20个字符', 'code.require' => '验证码必须填写']; 21 | $data = ['username' => $username, 'password' => $passowrd, 'code' => $code]; 22 | $validate = new Validate($rule, $msg); 23 | if (!$validate->check($data)) { 24 | $this->error($validate->getError()); 25 | } 26 | 27 | $captcha = new \org\Captcha(); 28 | if (!$captcha->check($code)) { 29 | $this->error('验证码错误'); 30 | } 31 | $r = db('admin')->where('username', $username)->find(); 32 | if (!$r) { 33 | $this->error('用户名不存在'); 34 | } 35 | if ($r['password'] != md5(md5($passowrd).$r['encrypt'])) { 36 | $this->error('密码错误'); 37 | } 38 | session('cms_admin_id', $r['id']); 39 | session('cms_admin_username', $username); 40 | session('cms_login_time', request()->time()); 41 | unset($r); 42 | db('admin')->where('username', $username)->update(['lastip' => request()->ip(), 'lasttime' => request()->time()]); 43 | $this->success('登录成功', 'Index/index'); 44 | } 45 | } 46 | public function captcha() 47 | { 48 | $captcha = new \org\Captcha(config('captcha')); 49 | $captcha->entry(); 50 | } 51 | } -------------------------------------------------------------------------------- /application/admin/controller/System.php: -------------------------------------------------------------------------------- 1 | isPost()) { 11 | $data = input('post.'); 12 | db('system')->where('id',1)->update($data); 13 | $this->success('设置成功'); 14 | } 15 | $detail = db('system')->where('id',1)->find(); 16 | $this->assign('detail', $detail); 17 | return $this->fetch(); 18 | } 19 | 20 | 21 | } 22 | -------------------------------------------------------------------------------- /application/admin/controller/Tag.php: -------------------------------------------------------------------------------- 1 | check(); 10 | $tag_list = db('tag')->order('tagid desc')->paginate(10); 11 | $page = $tag_list->render(); 12 | $this->assign('tag_list', $tag_list); 13 | $this->assign('page', $page); 14 | return $this->fetch(); 15 | } 16 | private function check() 17 | { 18 | db('tag')->where('tag', '')->delete(); 19 | if (!db('article')->limit(1)->select() || !db('tag')->limit(1)->select() || !db('tag_data')->limit(1)->select()) { 20 | db('tag')->where(1)->delete(); 21 | db('tag_data')->where(1)->delete(); 22 | } 23 | $list = db('tag_data')->field('contentid')->select(); 24 | foreach ($list as $v) { 25 | if (!db('article')->where('id', $v['contentid'])->find()) { 26 | db('tag_data')->where('content', $v['contentid'])->delete(); 27 | } 28 | } 29 | } 30 | public function delete() 31 | { 32 | $data = input('param.'); 33 | if (!isset($data['tagid']) || empty($data['tagid'])) { 34 | $this->error('参数错误'); 35 | } 36 | if (is_array($data['tagid'])) { 37 | foreach ($data['tagid'] as $v) { 38 | $v = intval($v); 39 | db('tag')->where('tagid', $v)->delete(); 40 | db('tag_data')->where('tagid', $v)->delete(); 41 | } 42 | $this->success('删除成功'); 43 | } else { 44 | $tagid = intval($data['tagid']); 45 | if (!$tagid) { 46 | $this->error('非法参数'); 47 | } 48 | db('tag')->where('tagid', $tagid)->delete(); 49 | db('tag_data')->where('tagid', $tagid)->delete(); 50 | $this->success('删除成功'); 51 | } 52 | $this->success('删除成功'); 53 | } 54 | } -------------------------------------------------------------------------------- /application/admin/controller/Upload.php: -------------------------------------------------------------------------------- 1 | file('file'); 10 | $info = $file->move('./uploads/'); 11 | if (!empty($info)) { 12 | $attachment['filename'] = $info->getFilename(); 13 | $attachment['filepath'] = 'uploads/' . pathConvert($info->getSaveName()); 14 | $attachment['fileext'] = $info->getExtension(); 15 | $attachment['filesize'] = $info->getSize(); 16 | $attachment['inputtime'] = request()->time(); 17 | db('attachment')->insert($attachment); 18 | $data['path'] = __ROOT__ . '/uploads/' . pathConvert($info->getSaveName()); 19 | $data['code'] = 1; 20 | $data['message'] = '上传成功!'; 21 | } else { 22 | $data['path'] = ''; 23 | $data['code'] = 0; 24 | $data['message'] = '上传失败!'; 25 | } 26 | return json($data); 27 | } 28 | 29 | public function ueditor() 30 | { 31 | $config = ["savePath" => "uploads/", "maxSize" => 1024, "allowFiles" => [".gif", ".png", ".jpg", ".jpeg", ".bmp"]]; 32 | $up = new \org\Uploader("upfile", $config); 33 | $info = $up->getFileInfo(); 34 | db('attachment')->insert(array('filename' => $info['name'], 'filepath' => $info['url'], 'fileext' =>str_replace('.','',$info['type']), 'filesize' => $info['size'], 'inputtime' => request()->time())); 35 | echo json_encode($info); 36 | } 37 | } -------------------------------------------------------------------------------- /application/admin/view/admin/password.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 |
3 | 4 |
5 |
首页>修改密码
6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 30 | 31 | 32 | 33 | 37 | 38 |
原密码: 16 | 17 |
新密码: 22 | 23 |
重复密码: 28 | 29 |
34 | 35 | 36 |
39 |
40 |
41 |
42 | 43 |
44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /application/admin/view/attachment/index.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 |
3 | 4 |
5 |
首页>附件管理
6 |
7 | 8 |
9 |
10 |
11 |
12 | 批量删除 13 |
14 | 15 |
16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | {volist name='list' id='vo'} 25 | 26 | 27 | 28 | 29 | 30 | 33 | 34 | {/volist} 35 | 36 |
附件大小操作
{:sizecount($vo.filesize)} 31 | 删除 32 |
{$page}
37 | 38 |
39 |
40 |
41 |
42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /application/admin/view/index/index.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 | 3 |
4 |
5 |
你好,{$Think.session.cms_admin_username}。
6 |
7 | 8 |
9 |
10 |

系统基本信息

11 |
12 |
13 |
    14 | {volist name="server_info" id="vo" } 15 |
  • 16 | {$vo} 17 |
  • 18 | {/volist} 19 |
20 |
21 |
22 | 23 |
24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /application/admin/view/login/login.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 后台管理 6 | 7 | 8 | 9 |
10 |
11 |
12 |
13 |
    14 |
  • 15 | 16 | 17 |
  • 18 |
  • 19 | 20 | 21 |
  • 22 |
  • 23 | 24 | captcha 25 |
  • 26 |
  • 27 | 28 |
  • 29 |
30 |
31 |
32 |
33 | 34 |
35 | 36 | -------------------------------------------------------------------------------- /application/admin/view/public/footer.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/application/admin/view/public/footer.html -------------------------------------------------------------------------------- /application/admin/view/public/ueditor.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 13 | -------------------------------------------------------------------------------- /application/admin/view/public/upload.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /application/admin/view/system/set.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 |
3 | 4 |
5 |
首页>系统设置
6 |
7 |
8 |
9 |
10 | 11 | 12 | 13 | 14 | 15 | 18 | 19 | 20 | 21 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 36 | 37 |
网站标题: 16 | 17 |
网站关键词: 22 | 23 |
网站描述:
33 | 34 | 35 |
38 |
39 |
40 |
41 | 42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /application/admin/view/tag/index.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 | 3 | 4 |
5 | 6 |
7 |
首页>TAG管理
8 |
9 | 10 |
11 |
12 |
13 |
14 | 批量删除 15 | 16 |
17 |
18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | {foreach name="tag_list" id='vo'} 28 | 29 | 30 | 31 | 32 | 33 | 36 | 37 | {/foreach} 38 | 39 |
TAG点击文章操作
{$vo.tag}{$vo.hits}{$vo.count} 34 | 删除 35 |
40 | {$page} 41 |
42 |
43 |
44 |
45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /application/command.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return []; -------------------------------------------------------------------------------- /application/common/taglib/Article.php: -------------------------------------------------------------------------------- 1 | ['attr' => 'pid,num,name', 'close' => 1], 13 | 'arclist' => ['attr' => 'cateid,num,name', 'close' => 1], 14 | 'taglist' => ['attr' => 'num,name', 'close' => 1], 15 | ]; 16 | 17 | 18 | public function tagCategory($tag, $content) { 19 | $pid = isset($tag['pid'])?$tag['pid']:0; 20 | $num = $tag['num']; 21 | $parseStr = $parseStr = 'alias(\'a\')->where(\'pid\','.$pid.')->where(\'ishidden\',0)->order("listorder desc")->limit('.$num.')->select();'; 23 | $parseStr .= '?>{volist name="__CATEGORY__" id="'. $tag['name'] .'"}'; 24 | $parseStr .= $content; 25 | $parseStr .= '{/volist}'; 26 | //解析模板 27 | $this->tpl->parse($parseStr); 28 | return $parseStr; 29 | } 30 | 31 | 32 | public function tagArclist($tag, $content) { 33 | $num = $tag['num']; 34 | $where=isset($tag['catid'])?'catid in ('.catid_str($tag['catid']).') and status=0':'status=0'; 35 | $parseStr = $parseStr = 'alias(\'a\')->where("'.$where.'")->order("id desc")->limit('.$num.')->select();'; 37 | $parseStr .= '?>{volist name="__LIST__" id="'. $tag['name'] .'"}'; 38 | $parseStr .= $content; 39 | $parseStr .= '{/volist}'; 40 | //解析模板 41 | $this->tpl->parse($parseStr); 42 | return $parseStr; 43 | } 44 | 45 | public function tagTaglist($tag, $content) { 46 | $num = $tag['num']; 47 | $parseStr = $parseStr = 'alias(\'a\')->order("tagid desc")->limit('.$num.')->select();'; 49 | $parseStr .= '?>{volist name="__LIST__" id="'. $tag['name'] .'"}'; 50 | $parseStr .= $content; 51 | $parseStr .= '{/volist}'; 52 | //解析模板 53 | $this->tpl->parse($parseStr); 54 | return $parseStr; 55 | } 56 | } -------------------------------------------------------------------------------- /application/database.php: -------------------------------------------------------------------------------- 1 | 'mysql', 10 | // 数据库连接DSN配置 11 | 'dsn' => '', 12 | // 服务器地址 13 | 'hostname' => 'localhost', 14 | // 数据库名 15 | 'database' => 'fivecms', 16 | // 数据库用户名 17 | 'username' => 'root', 18 | // 数据库密码 19 | 'password' => '123456', 20 | // 数据库连接端口 21 | 'hostport' => '3306', 22 | // 数据库连接参数 23 | 'params' => [], 24 | // 数据库编码默认采用utf8 25 | 'charset' => 'utf8', 26 | // 数据库表前缀 27 | 'prefix' => 'five_', 28 | // 数据库调试模式 29 | 'debug' => false, 30 | // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 31 | 'deploy' => 0, 32 | // 数据库读写是否分离 主从式有效 33 | 'rw_separate' => false, 34 | // 读写分离后 主服务器数量 35 | 'master_num' => 1, 36 | // 指定从服务器序号 37 | 'slave_no' => '', 38 | ]; -------------------------------------------------------------------------------- /application/index/controller/Category.php: -------------------------------------------------------------------------------- 1 | error('参数错误'); 12 | } 13 | $cate_db = db('category'); 14 | /*栏目详情start*/ 15 | $cate_info = $cate_db->where('catid', $catid)->find(); 16 | if (!$cate_info) { 17 | $this->error('栏目不存在'); 18 | } 19 | $this->assign('category', new_html_entity_decode($cate_info)); 20 | /*栏目详情end*/ 21 | /*子栏目start*/ 22 | $subcate = $cate_db->where('pid', $catid)->limit(10)->select(); 23 | /*子栏目end*/ 24 | /*同级栏目start*/ 25 | $samecate = $cate_db->where('pid', get_catpid($catid))->limit(10)->select(); 26 | /*同级栏目end*/ 27 | if (empty($subcate)) { 28 | $subcate = $samecate; 29 | } 30 | $this->assign('subcate', $subcate); 31 | $this->assign('samecate', $samecate); 32 | /*文章列表start*/ 33 | $article_db = db('article'); 34 | $article_list = $article_db->where('catid', 'in', catid_str($catid))->where('status', 0)->order('listorder desc,id desc')->paginate(10); 35 | $page = $article_list->render(); 36 | $this->assign('article_list', $article_list); 37 | $this->assign('page', $page); 38 | /*文章列表end*/ 39 | /*seo start*/ 40 | $seo = seo($cate_info['catname'] . '-' . $this->seo['title'], $cate_info['keywords'], $cate_info['description']); 41 | $this->assign('seo', $seo); 42 | /*seo end*/ 43 | /*模板start*/ 44 | if ($cate_info['ispart'] == 1) { 45 | $template = str_replace('.html', '', $cate_info['category']); 46 | return $this->fetch($template); 47 | } else { 48 | $template = str_replace('.html', '', $cate_info['list']); 49 | return $this->fetch($template); 50 | } 51 | /*模板end*/ 52 | } 53 | } -------------------------------------------------------------------------------- /application/index/controller/Common.php: -------------------------------------------------------------------------------- 1 | seo=db('system')->where('id',1)->find(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /application/index/controller/Index.php: -------------------------------------------------------------------------------- 1 | seo['title'],$this->seo['keywords'],$this->seo['description']); 9 | $this->assign('seo',$seo); 10 | return $this->fetch(); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /application/index/controller/Search.php: -------------------------------------------------------------------------------- 1 | error('参数错误'); 12 | } 13 | $q = FilterSearch(urldecode($q)); 14 | 15 | 16 | $db = db('article'); 17 | $article_list = $db->where('title','like','%'.$q.'%')->where('status',0)->order('listorder desc,id desc')->paginate(10, false, ['query' => ['q' => $q]]); 18 | $article_arr=[]; 19 | foreach($article_list as $k=>$v){ 20 | $article_arr[$k]['title']=str_replace($q, '' . $q . '', $v['title']); 21 | $article_arr[$k]['url']=$v['url']; 22 | $article_arr[$k]['thumb']=$v['thumb']; 23 | $article_arr[$k]['description']=$v['description']; 24 | $article_arr[$k]['inputtime']=$v['inputtime']; 25 | } 26 | $page = $article_list->render(); 27 | $this->assign('article_list', $article_arr); 28 | $this->assign('page', $page); 29 | /*文章列表end*/ 30 | 31 | /*seo start*/ 32 | $seo=seo($q.'搜索'.'-'.$this->seo['title'],$this->seo['keywords'],$this->seo['description']); 33 | $this->assign('seo',$seo); 34 | /*seo end*/ 35 | 36 | 37 | return $this->fetch(); 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /application/index/controller/Tag.php: -------------------------------------------------------------------------------- 1 | where('tag', $tag)->find(); 12 | if (!$r) { 13 | $this->error('TAG不存在!', __ROOT__); 14 | } 15 | $tagid = $r['tagid']; 16 | $list = db('tag_data')->where('tagid', $tagid)->paginate(10); 17 | if (!empty($list)) { 18 | $article_list = []; 19 | foreach ($list as $k => $v) { 20 | $article_info = db('article')->where('id', $v['contentid'])->find(); 21 | $article_list[$k]['title'] = str_replace($tag, '' . $tag . '', $article_info['title']); 22 | $article_list[$k]['description'] = str_replace($tag, '' . $tag . '', $article_info['description']); 23 | $article_list[$k]['thumb'] = $article_info['thumb']; 24 | $article_list[$k]['inputtime'] = $article_info['inputtime']; 25 | $article_list[$k]['hits'] = $article_info['hits']; 26 | $article_list[$k]['url'] = $article_info['url']; 27 | } 28 | } 29 | $page = $list->render(); 30 | $this->assign('article_list', $article_list); 31 | $this->assign('page', $page); 32 | $seo = seo($tag . '-' . $this->seo['title'], $this->seo['keywords'], $this->seo['description']); 33 | $this->assign('seo', $seo); 34 | /*点击数start*/ 35 | db('tag')->where('tag', $tag)->setInc('hits'); 36 | /*点击数end*/ 37 | return $this->fetch('tag'); 38 | } 39 | public function index() 40 | { 41 | $seo = seo($this->seo['title'], $this->seo['keywords'], $this->seo['description']); 42 | $this->assign('seo', $seo); 43 | return $this->fetch(); 44 | } 45 | } -------------------------------------------------------------------------------- /application/index/view/category/category.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 | 3 | 4 | 5 |
6 | 23 |
24 |
25 | 26 | 27 | 28 | 37 | 38 | 39 |
40 | {$category.content} 41 |
42 | 43 | 44 | 45 | 46 | {include file="public:footer" /} 47 | 48 | 49 |
50 |
51 |
52 | 53 | 54 | 55 | 56 | 57 | 58 | -------------------------------------------------------------------------------- /application/index/view/search/index.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 | 3 |
4 | 28 |
29 |
30 | 31 | 32 | 33 | 34 |
35 |
36 | 37 | {volist name='article_list' id='vo'} 38 | 39 |
40 |
41 |
42 |
43 |
44 |

{$vo.title}

45 |

{$vo.description}

46 | 查看详情 47 |
48 |
49 | {$vo.inputtime|date="d",###} 50 |

{$vo.inputtime|date="Y-m",###}

51 |
52 |
53 |
54 |
55 | {/volist} 56 | {$page} 57 | 58 | 59 | 60 |
61 |
62 | 63 | 64 | 65 | 66 | {include file="public:footer" /} 67 | 68 | 69 | 70 |
71 |
72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /application/index/view/tag/index.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 | 3 |
4 | 29 |
30 |
31 | 32 | 33 | 34 | 35 |
36 |
37 |
38 |

TAG标签

39 |
40 |
41 | {taglist name='vo' num='40'} 42 | {$vo.tag}  43 | {/taglist} 44 | 51 |
52 |
53 |

返回

54 | 55 |
56 |
57 |
58 | 59 | 60 | 61 | 62 | {include file="public:footer" /} 63 | 64 | 65 | 66 |
67 |
68 |
69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | -------------------------------------------------------------------------------- /application/index/view/tag/tag.html: -------------------------------------------------------------------------------- 1 | {include file="public:header" /} 2 | 3 |
4 | 28 |
29 |
30 | 31 | 32 | 33 | 34 |
35 |
36 | 37 | {volist name='article_list' id='vo'} 38 | 39 |
40 |
41 |
42 |
43 |
44 |

{$vo.title}

45 |

{$vo.description}

46 | 查看详情 47 |
48 |
49 | {$vo.inputtime|date="d",###} 50 |

{$vo.inputtime|date="Y-m",###}

51 |
52 |
53 |
54 |
55 | {/volist} 56 | {$page} 57 | 58 | 59 | 60 |
61 |
62 | 63 | 64 | 65 | 66 | {include file="public:footer" /} 67 | 68 | 69 | 70 |
71 |
72 |
73 | 74 | 75 | 76 | 77 | 78 | 79 | -------------------------------------------------------------------------------- /application/install/config.php: -------------------------------------------------------------------------------- 1 | 'five_', //默认表前缀 9 | // 模板设置 10 | 'view_replace_str'=>[ 11 | '__PUBLIC__'=> __ROOT__.'/public', // 模板变量替换 12 | ], 13 | ]; -------------------------------------------------------------------------------- /application/install/view/index/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fivecms安装 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
安装步骤
21 |
安装协议
22 |
环境检测
23 |
创建数据库
24 |
安装
25 |
完成
26 |
27 |
28 |
29 | 30 | 31 |

fivecms 安装协议

32 |
33 |

版权所有 (c) 2016,360仿站

34 |
35 | 38 | 39 |
40 |
41 |
42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /application/install/view/index/step3.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fivecms安装 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
安装步骤
21 |
安装协议
22 |
环境检测
23 |
创建数据库
24 |
安装
25 |
完成
26 |
27 |
28 |
29 | 30 | 31 |
32 |
33 |

正在安装程序,请稍后...

34 |
35 | 36 |
37 |
38 |
39 | 40 | 41 | 42 | 43 | 53 | -------------------------------------------------------------------------------- /application/install/view/index/step4.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | fivecms安装 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
安装步骤
21 |
安装协议
22 |
环境检测
23 |
创建数据库
24 |
安装
25 |
完成
26 |
27 |
28 |
29 |
30 |

恭喜您,已经成功安装fivecms

31 |
32 |
33 | 访问系统前台     34 | 访问系统后台 35 |
36 | 37 |
38 | 39 | 40 |
41 |
42 |
43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /application/route.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | return [ 13 | '__pattern__' => [ 14 | 'name' => '\w+', 15 | ], 16 | '[hello]' => [ 17 | ':id' => ['index/hello', ['method' => 'get'], ['id' => '\d+']], 18 | ':name' => ['index/hello', ['method' => 'post']], 19 | ], 20 | 21 | ]; 22 | -------------------------------------------------------------------------------- /application/tags.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | // 应用行为扩展定义文件 13 | return [ 14 | // 应用初始化 15 | 'app_init' => [], 16 | // 应用开始 17 | 'app_begin' => [], 18 | // 模块初始化 19 | 'module_init' => [], 20 | // 操作开始执行 21 | 'action_begin' => [], 22 | // 视图内容过滤 23 | 'view_filter' => [], 24 | // 日志写入 25 | 'log_write' => [], 26 | // 应用结束 27 | 'app_end' => [], 28 | ]; 29 | -------------------------------------------------------------------------------- /data/install.lock: -------------------------------------------------------------------------------- 1 | lock -------------------------------------------------------------------------------- /data/install/database.tpl: -------------------------------------------------------------------------------- 1 | '[type]', 10 | // 数据库连接DSN配置 11 | 'dsn' => '', 12 | // 服务器地址 13 | 'hostname' => '[hostname]', 14 | // 数据库名 15 | 'database' => '[database]', 16 | // 数据库用户名 17 | 'username' => '[username]', 18 | // 数据库密码 19 | 'password' => '[password]', 20 | // 数据库连接端口 21 | 'hostport' => '[hostport]', 22 | // 数据库连接参数 23 | 'params' => [], 24 | // 数据库编码默认采用utf8 25 | 'charset' => 'utf8', 26 | // 数据库表前缀 27 | 'prefix' => '[prefix]', 28 | // 数据库调试模式 29 | 'debug' => false, 30 | // 数据库部署方式:0 集中式(单一服务器),1 分布式(主从服务器) 31 | 'deploy' => 0, 32 | // 数据库读写是否分离 主从式有效 33 | 'rw_separate' => false, 34 | // 读写分离后 主服务器数量 35 | 'master_num' => 1, 36 | // 指定从服务器序号 37 | 'slave_no' => '', 38 | ]; -------------------------------------------------------------------------------- /extend/org/captcha/bgs/1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/1.jpg -------------------------------------------------------------------------------- /extend/org/captcha/bgs/2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/2.jpg -------------------------------------------------------------------------------- /extend/org/captcha/bgs/3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/3.jpg -------------------------------------------------------------------------------- /extend/org/captcha/bgs/4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/4.jpg -------------------------------------------------------------------------------- /extend/org/captcha/bgs/5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/5.jpg -------------------------------------------------------------------------------- /extend/org/captcha/bgs/6.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/6.jpg -------------------------------------------------------------------------------- /extend/org/captcha/bgs/7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/7.jpg -------------------------------------------------------------------------------- /extend/org/captcha/bgs/8.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/bgs/8.jpg -------------------------------------------------------------------------------- /extend/org/captcha/ttfs/1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/ttfs/1.ttf -------------------------------------------------------------------------------- /extend/org/captcha/ttfs/2.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/ttfs/2.ttf -------------------------------------------------------------------------------- /extend/org/captcha/ttfs/3.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/ttfs/3.ttf -------------------------------------------------------------------------------- /extend/org/captcha/ttfs/4.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/ttfs/4.ttf -------------------------------------------------------------------------------- /extend/org/captcha/ttfs/5.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/ttfs/5.ttf -------------------------------------------------------------------------------- /extend/org/captcha/ttfs/6.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/ttfs/6.ttf -------------------------------------------------------------------------------- /extend/org/captcha/zhttfs/1.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/extend/org/captcha/zhttfs/1.ttf -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/favicon.ico -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 991) { 28 | //pc导航 29 | $('.wwnav ul li').unbind("mouseenter").bind('mouseenter', function () { 30 | $(this).find('.wwnavlist').show(); 31 | }); 32 | 33 | $('.wwnav ul li').unbind("mouseleave").bind('mouseleave', function () { 34 | $(this).find('.wwnavlist').hide(); 35 | 36 | }); 37 | 38 | $('.wwnavdrop').unbind("mouseenter").bind('mouseenter', function () { 39 | 40 | if($(this).find('ul li').length == 0){ 41 | $(this).find('.wwnavdroplist').hide() 42 | }else{ 43 | $(this).find('.wwnavdroplist').show(); 44 | } 45 | }); 46 | 47 | $('.wwnavdrop').unbind("mouseleave").bind('mouseleave', function () { 48 | $(this).find('.wwnavdroplist').hide(); 49 | 50 | }); 51 | 52 | if($('.wwnavdrop').find('.wwnavdroplist').lengths > 0){ 53 | 54 | 55 | $('.wwnavdrop').unbind("mouseenter").bind('mouseenter', function () { 56 | 57 | $(this).find('.wwnavdroplist').show(); 58 | }); 59 | 60 | } 61 | 62 | 63 | 64 | 65 | }else{ 66 | $(".wwnav ul li").unbind("mouseenter"); 67 | $(".wwnavdrop").unbind("mouseenter"); 68 | $(".wwnav ul li").unbind("mouseleave"); 69 | $(".wwnavdrop").unbind("mouseleave"); 70 | } 71 | 72 | }) -------------------------------------------------------------------------------- /public/2016/picture/banner1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/banner1.jpg -------------------------------------------------------------------------------- /public/2016/picture/banner2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/banner2.jpg -------------------------------------------------------------------------------- /public/2016/picture/banner3.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/banner3.jpg -------------------------------------------------------------------------------- /public/2016/picture/banner4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/banner4.jpg -------------------------------------------------------------------------------- /public/2016/picture/banner5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/banner5.jpg -------------------------------------------------------------------------------- /public/2016/picture/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/logo.jpg -------------------------------------------------------------------------------- /public/2016/picture/wqp_img10.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/wqp_img10.jpg -------------------------------------------------------------------------------- /public/2016/picture/wwpic192.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/wwpic192.jpg -------------------------------------------------------------------------------- /public/2016/picture/wwpic193.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/wwpic193.jpg -------------------------------------------------------------------------------- /public/2016/picture/wwpic194.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/wwpic194.jpg -------------------------------------------------------------------------------- /public/2016/picture/wwpic195.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/2016/picture/wwpic195.jpg -------------------------------------------------------------------------------- /public/admin/fonts/icomoon.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/fonts/icomoon.eot -------------------------------------------------------------------------------- /public/admin/fonts/icomoon.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/fonts/icomoon.ttf -------------------------------------------------------------------------------- /public/admin/fonts/icomoon.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/fonts/icomoon.woff -------------------------------------------------------------------------------- /public/admin/images/login/admin-login-btnbg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/images/login/admin-login-btnbg.gif -------------------------------------------------------------------------------- /public/admin/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/images/logo.png -------------------------------------------------------------------------------- /public/admin/images/onCorrect.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/images/onCorrect.gif -------------------------------------------------------------------------------- /public/admin/images/onError.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/images/onError.gif -------------------------------------------------------------------------------- /public/admin/images/onFocus.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/images/onFocus.gif -------------------------------------------------------------------------------- /public/admin/images/onShow.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/images/onShow.gif -------------------------------------------------------------------------------- /public/admin/images/tab-thbg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/admin/images/tab-thbg.png -------------------------------------------------------------------------------- /public/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /public/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /public/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /public/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /public/bootstrap/js/Core Changelog.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/js/Core Changelog.txt -------------------------------------------------------------------------------- /public/bootstrap/js/Flash/SWFUpload v2.as3proj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | deploy.bat 74 | 75 | 76 | 79 | -------------------------------------------------------------------------------- /public/bootstrap/js/Flash/deploy.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | copy ..\swfupload.js ..\..\samples\demos\swfupload 3 | copy swfupload.swf ..\..\samples\demos\swfupload 4 | -------------------------------------------------------------------------------- /public/bootstrap/js/Flash/obj/SWFUpload-v2Config.old: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | C:\inetpub\wwwroot\other\swfupload\core\Flash 10 | C:\Program Files (x86)\FlashDevelop\Library\AS3\classes 11 | 12 | 13 | 14 | C:\inetpub\wwwroot\other\swfupload\core\Flash\SWFUpload.as 15 | 16 | #FFFFFF 17 | 15 18 | 19 | 300 20 | 300 21 | 22 | -------------------------------------------------------------------------------- /public/bootstrap/js/Flash/obj/SWFUpload-v2Config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | C:\inetpub\wwwroot\other\swfupload\core\Flash 10 | C:\Program Files (x86)\FlashDevelop\Library\AS3\classes 11 | 12 | 13 | 14 | C:\inetpub\wwwroot\other\swfupload\core\Flash\SWFUpload.as 15 | 16 | #FFFFFF 17 | 15 18 | 19 | 300 20 | 300 21 | 22 | -------------------------------------------------------------------------------- /public/bootstrap/js/Flash/swfupload.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/js/Flash/swfupload.swf -------------------------------------------------------------------------------- /public/bootstrap/js/check.js: -------------------------------------------------------------------------------- 1 | 2 | $(function(){ 3 | 4 | $('#username').blur(function(){ 5 | 6 | var uname=$('#username').val(); 7 | 8 | if(uname==''){ 9 | 10 | alert('请输入用户名!'); 11 | 12 | return false; 13 | 14 | } 15 | 16 | if(uname.length<5 ||uname.length>=16){ 17 | 18 | $('.uname').html('用户名长度必须在5-16位之间'); 19 | 20 | $('.uname').css('color','red'); 21 | 22 | return flase; 23 | 24 | } 25 | 26 | 27 | -------------------------------------------------------------------------------- /public/bootstrap/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /public/bootstrap/js/plugins/SWFObject License.txt: -------------------------------------------------------------------------------- 1 | /* SWFObject v2.0 rc4 2 | Copyright (c) 2007 Geoff Stearns, Michael Williams, and Bobby van der Sluis 3 | This software is released under the MIT License 4 | */ 5 | -------------------------------------------------------------------------------- /public/bootstrap/js/plugins/swfupload.cookies.js: -------------------------------------------------------------------------------- 1 | /* 2 | Cookie Plug-in 3 | 4 | This plug in automatically gets all the cookies for this site and adds them to the post_params. 5 | Cookies are loaded only on initialization. The refreshCookies function can be called to update the post_params. 6 | The cookies will override any other post params with the same name. 7 | */ 8 | 9 | var SWFUpload; 10 | if (typeof(SWFUpload) === "function") { 11 | SWFUpload.prototype.initSettings = function (oldInitSettings) { 12 | return function () { 13 | if (typeof(oldInitSettings) === "function") { 14 | oldInitSettings.call(this); 15 | } 16 | 17 | this.refreshCookies(false); // The false parameter must be sent since SWFUpload has not initialzed at this point 18 | }; 19 | }(SWFUpload.prototype.initSettings); 20 | 21 | // refreshes the post_params and updates SWFUpload. The sendToFlash parameters is optional and defaults to True 22 | SWFUpload.prototype.refreshCookies = function (sendToFlash) { 23 | if (sendToFlash === undefined) { 24 | sendToFlash = true; 25 | } 26 | sendToFlash = !!sendToFlash; 27 | 28 | // Get the post_params object 29 | var postParams = this.settings.post_params; 30 | 31 | // Get the cookies 32 | var i, cookieArray = document.cookie.split(';'), caLength = cookieArray.length, c, eqIndex, name, value; 33 | for (i = 0; i < caLength; i++) { 34 | c = cookieArray[i]; 35 | 36 | // Left Trim spaces 37 | while (c.charAt(0) === " ") { 38 | c = c.substring(1, c.length); 39 | } 40 | eqIndex = c.indexOf("="); 41 | if (eqIndex > 0) { 42 | name = c.substring(0, eqIndex); 43 | value = c.substring(eqIndex + 1); 44 | postParams[name] = value; 45 | } 46 | } 47 | 48 | if (sendToFlash) { 49 | this.setPostParams(postParams); 50 | } 51 | }; 52 | 53 | } 54 | -------------------------------------------------------------------------------- /public/bootstrap/js/swfupload license.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/js/swfupload license.txt -------------------------------------------------------------------------------- /public/bootstrap/js/swfupload.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/bootstrap/js/swfupload.js -------------------------------------------------------------------------------- /public/images/nopic_small.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/images/nopic_small.gif -------------------------------------------------------------------------------- /public/install/css/install.css: -------------------------------------------------------------------------------- 1 | 2 | /*头部样式*/ 3 | .header{ 4 | height:80px; 5 | text-align: center; 6 | margin: 0 auto; 7 | line-height: 80px; 8 | } 9 | 10 | .left{ 11 | background:#00A65A; 12 | border-radius: 4px; 13 | width:100%; 14 | height:420px; 15 | color: #fff; 16 | } 17 | .left div{ 18 | height: 30px; 19 | margin-top:15px; 20 | font-size: 16px; 21 | text-align: center; 22 | line-height: 30px; 23 | } 24 | .left .title{ 25 | margin-top: 0; 26 | height: 40px; 27 | line-height: 40px; 28 | color: #fff; 29 | font-size: 16px; 30 | text-align: center; 31 | padding-left:10px; 32 | border-bottom: #ccc 1px solid; 33 | width: 80%; 34 | margin: 0 auto; 35 | font-weight: bold; 36 | } 37 | 38 | 39 | .right{ 40 | overflow-y:auto; 41 | background: #fff; 42 | height:420px; 43 | } 44 | .right label{ 45 | color:#666; 46 | } 47 | .left .active{ 48 | color:yellow; 49 | font-weight: bold; 50 | background: url(../images/right.png) no-repeat 150px center; 51 | background-size: 20px; 52 | } 53 | 54 | 55 | /*底部样式*/ 56 | .footer{ 57 | text-align: center; 58 | margin-top: 10px; 59 | height:40px; 60 | line-height: 40px; 61 | } 62 | 63 | 64 | .green{ 65 | color:green; 66 | } 67 | .red{ 68 | color:red; 69 | } 70 | 71 | .success1{ 72 | font-weight: bold; 73 | text-align: center; 74 | font-size: 24px; 75 | margin-top: 100px; 76 | color:#00A8CD; 77 | } 78 | .success2{ 79 | font-size: 16px; 80 | margin-top:20px; 81 | text-align: center; 82 | } 83 | .success3{ 84 | text-align: center; 85 | margin-top: 50px; 86 | } 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | -------------------------------------------------------------------------------- /public/install/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/install/images/logo.png -------------------------------------------------------------------------------- /public/install/images/right.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/install/images/right.png -------------------------------------------------------------------------------- /public/install/layer/skin/default/icon-ext.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/install/layer/skin/default/icon-ext.png -------------------------------------------------------------------------------- /public/install/layer/skin/default/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/install/layer/skin/default/icon.png -------------------------------------------------------------------------------- /public/install/layer/skin/default/loading-0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/install/layer/skin/default/loading-0.gif -------------------------------------------------------------------------------- /public/install/layer/skin/default/loading-1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/install/layer/skin/default/loading-1.gif -------------------------------------------------------------------------------- /public/install/layer/skin/default/loading-2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/install/layer/skin/default/loading-2.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/emotion.css: -------------------------------------------------------------------------------- 1 | .edui-popup-emotion .edui-emotion-jd img{ 2 | background:transparent url(images/jxface2.gif?v=1.1) no-repeat scroll left top; 3 | cursor:pointer;width:35px;height:35px;display:block; 4 | } 5 | .edui-popup-emotion .edui-emotion-pp img{ 6 | background:transparent url(images/fface.gif?v=1.1) no-repeat scroll left top; 7 | cursor:pointer;width:25px;height:25px;display:block; 8 | } 9 | 10 | .edui-popup-emotion .edui-emotion-ldw img{ 11 | background:transparent url(images/wface.gif?v=1.1) no-repeat scroll left top; 12 | cursor:pointer;width:35px;height:35px;display:block; 13 | } 14 | 15 | .edui-popup-emotion .edui-emotion-tsj img{ 16 | background:transparent url(images/tface.gif?v=1.1) no-repeat scroll left top; 17 | cursor:pointer;width:35px;height:35px;display:block; 18 | } 19 | 20 | .edui-popup-emotion .edui-emotion-cat img{ 21 | background:transparent url(images/cface.gif?v=1.1) no-repeat scroll left top; 22 | cursor:pointer;width:35px;height:35px;display:block; 23 | } 24 | 25 | .edui-popup-emotion .edui-emotion-bb img{ 26 | background:transparent url(images/bface.gif?v=1.1) no-repeat scroll left top; 27 | cursor:pointer;width:35px;height:35px;display:block; 28 | } 29 | 30 | .edui-popup-emotion .edui-emotion-youa img{ 31 | background:transparent url(images/yface.gif?v=1.1) no-repeat scroll left top; 32 | cursor:pointer;width:35px;height:35px;display:block; 33 | } 34 | 35 | .edui-popup-emotion .edui-emotion-smileytable { 36 | width: 100%; 37 | border-spacing: 0; 38 | border-collapse: collapse; 39 | table-layout: fixed; 40 | } 41 | 42 | .edui-popup-emotion .edui-emotion-wrapper { 43 | padding: 15px; 44 | } 45 | 46 | .edui-popup-emotion .edui-tab-nav{ 47 | height: auto; 48 | *height: 31px; 49 | } 50 | .edui-popup-emotion .edui-emotion-tabs{ 51 | clear: both; 52 | width: 0; 53 | height: 0; 54 | } 55 | 56 | .edui-popup-emotion .edui-tab-content { 57 | padding: 15px 0; 58 | } 59 | 60 | .edui-popup-emotion .edui-emotion-preview-box { 61 | width:90px; 62 | height:76px; 63 | border:2px solid #9cb945; 64 | background:#FFFFFF; 65 | background-position:center; 66 | background-repeat:no-repeat; 67 | position: absolute; 68 | top: 67px; 69 | left: 494px; 70 | display: none; 71 | } 72 | 73 | .edui-popup-emotion .edui-tab-text { 74 | font-size: 12px; 75 | } 76 | 77 | .edui-popup-emotion .edui-emotion-preview-left { 78 | left: 15px; 79 | } 80 | 81 | .edui-popup-emotion .edui-emotion-preview-img { 82 | width: 100%; 83 | height: 100%; 84 | display: block; 85 | background-repeat: no-repeat; 86 | background-position: center center; 87 | } 88 | -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/0.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/0.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/bface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/bface.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/cface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/cface.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/fface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/fface.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/jxface2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/jxface2.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/neweditor-tab-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/neweditor-tab-bg.png -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/tface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/tface.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/wface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/wface.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/emotion/images/yface.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/emotion/images/yface.gif -------------------------------------------------------------------------------- /public/ueditor/dialogs/formula/formula.css: -------------------------------------------------------------------------------- 1 | .edui-popup-formula .edui-formula-wrapper { 2 | padding: 15px; 3 | } 4 | .edui-popup-formula .edui-formula-wrapper .edui-tab-nav{ 5 | height: auto; 6 | *height: 31px; 7 | } 8 | .edui-popup-formula .edui-formula-wrapper .edui-tab-text { 9 | font-size: 12px; 10 | } 11 | .edui-popup-formula .edui-formula-wrapper .edui-formula-clearboth { 12 | clear: both; 13 | width: 0; 14 | height: 0; 15 | } 16 | .edui-popup-formula .edui-formula-wrapper .edui-tab-pane ul { 17 | margin: 0px; 18 | padding: 0px; 19 | } 20 | .edui-popup-formula .edui-formula-wrapper .edui-tab-content { 21 | padding: 5px 0px 0px 0px; 22 | } 23 | .edui-popup-formula .edui-formula-wrapper .edui-tab-pane .edui-formula-latex-item { 24 | display: block; 25 | float: left; 26 | margin: 0px 3px 3px 0px; 27 | width: 30px; 28 | height: 30px; 29 | border:1px solid #cccccc; 30 | background-image: url("images/formula.png"); 31 | cursor: pointer; 32 | } -------------------------------------------------------------------------------- /public/ueditor/dialogs/formula/images/formula.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/formula/images/formula.png -------------------------------------------------------------------------------- /public/ueditor/dialogs/image/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/image/images/close.png -------------------------------------------------------------------------------- /public/ueditor/dialogs/image/images/upload1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/image/images/upload1.png -------------------------------------------------------------------------------- /public/ueditor/dialogs/image/images/upload2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/image/images/upload2.png -------------------------------------------------------------------------------- /public/ueditor/dialogs/video/images/center_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/video/images/center_focus.jpg -------------------------------------------------------------------------------- /public/ueditor/dialogs/video/images/left_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/video/images/left_focus.jpg -------------------------------------------------------------------------------- /public/ueditor/dialogs/video/images/none_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/video/images/none_focus.jpg -------------------------------------------------------------------------------- /public/ueditor/dialogs/video/images/right_focus.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/dialogs/video/images/right_focus.jpg -------------------------------------------------------------------------------- /public/ueditor/lang/zh-cn/images/copy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/lang/zh-cn/images/copy.png -------------------------------------------------------------------------------- /public/ueditor/lang/zh-cn/images/imglabel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/lang/zh-cn/images/imglabel.png -------------------------------------------------------------------------------- /public/ueditor/lang/zh-cn/images/localimage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/lang/zh-cn/images/localimage.png -------------------------------------------------------------------------------- /public/ueditor/lang/zh-cn/images/music.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/lang/zh-cn/images/music.png -------------------------------------------------------------------------------- /public/ueditor/lang/zh-cn/images/upload.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/lang/zh-cn/images/upload.png -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/caret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/caret.png -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/close.png -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/icons.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/icons.gif -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/icons.png -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/ok.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/ok.gif -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/pop-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/pop-bg.png -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/spacer.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/spacer.gif -------------------------------------------------------------------------------- /public/ueditor/themes/default/images/videologo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/ueditor/themes/default/images/videologo.gif -------------------------------------------------------------------------------- /public/webuploader/css/webuploader.css: -------------------------------------------------------------------------------- 1 | .webuploader-container { 2 | position: relative; 3 | } 4 | .webuploader-element-invisible { 5 | position: absolute !important; 6 | clip: rect(1px 1px 1px 1px); /* IE6, IE7 */ 7 | clip: rect(1px,1px,1px,1px); 8 | } 9 | .webuploader-pick { 10 | position: relative; 11 | display: inline-block; 12 | cursor: pointer; 13 | background: #00b7ee; 14 | padding: 0 10px; 15 | color: #fff; 16 | text-align: center; 17 | border-radius: 3px; 18 | overflow: hidden; 19 | } 20 | .webuploader-pick-hover { 21 | background: #00a2d4; 22 | } 23 | 24 | .webuploader-pick-disable { 25 | opacity: 0.6; 26 | pointer-events:none; 27 | } 28 | 29 | -------------------------------------------------------------------------------- /public/webuploader/images/bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/webuploader/images/bg.png -------------------------------------------------------------------------------- /public/webuploader/images/icons.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/webuploader/images/icons.png -------------------------------------------------------------------------------- /public/webuploader/images/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/webuploader/images/image.png -------------------------------------------------------------------------------- /public/webuploader/images/progress.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/webuploader/images/progress.png -------------------------------------------------------------------------------- /public/webuploader/images/success.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/webuploader/images/success.png -------------------------------------------------------------------------------- /public/webuploader/js/Uploader.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/public/webuploader/js/Uploader.swf -------------------------------------------------------------------------------- /router.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 跳转提示 7 | 17 | 18 | 19 |
20 |

提示信息

21 | 22 |

23 | 24 |

25 | 26 |

27 |

28 | 页面自动 跳转 等待时间: 29 |

30 |
31 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /runtime/temp/f4cd5eabdab173c211f78c2339146fe0.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 跳转提示 7 | 17 | 18 | 19 |
20 |

提示信息

21 | 22 |

23 | 24 |

25 | 26 |

27 |

28 | 页面自动 跳转 等待时间: 29 |

30 |
31 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /thinkphp/.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | 3 | language: php 4 | 5 | services: 6 | - memcached 7 | - mongodb 8 | - mysql 9 | - postgresql 10 | - redis-server 11 | 12 | matrix: 13 | fast_finish: true 14 | include: 15 | - php: 5.4 16 | - php: 5.5 17 | - php: 5.6 18 | - php: 7.0 19 | - php: hhvm 20 | allow_failures: 21 | - php: hhvm 22 | 23 | cache: 24 | directories: 25 | - $HOME/.composer/cache 26 | 27 | before_install: 28 | - composer self-update 29 | - mysql -e "create database IF NOT EXISTS test;" -uroot 30 | - psql -c 'DROP DATABASE IF EXISTS test;' -U postgres 31 | - psql -c 'create database test;' -U postgres 32 | 33 | install: 34 | - ./tests/script/install.sh 35 | 36 | script: 37 | ## LINT 38 | - find . -path ./vendor -prune -o -type f -name \*.php -exec php -l {} \; 39 | ## PHP_CodeSniffer 40 | - vendor/bin/phpcs --runtime-set ignore_errors_on_exit 1 --runtime-set ignore_warnings_on_exit 1 --standard=PSR2 --ignore="vendor/*" ./ 41 | ## PHP Copy/Paste Detector 42 | - vendor/bin/phpcpd --verbose --exclude vendor ./ || true 43 | ## PHPLOC 44 | - vendor/bin/phploc --exclude vendor ./ 45 | ## PHPUNIT 46 | - vendor/bin/phpunit --coverage-clover=coverage.xml --configuration=phpunit.xml 47 | 48 | after_success: 49 | - bash <(curl -s https://codecov.io/bash) 50 | -------------------------------------------------------------------------------- /thinkphp/LICENSE.txt: -------------------------------------------------------------------------------- 1 | 2 | ThinkPHP遵循Apache2开源协议发布,并提供免费使用。 3 | 版权所有Copyright © 2006-2016 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/codecov.yml: -------------------------------------------------------------------------------- 1 | comment: 2 | layout: header, changes, diff 3 | coverage: 4 | ignore: 5 | - base.php 6 | - helper.php 7 | - convention.php 8 | - lang/zh-cn.php 9 | - start.php 10 | - console.php 11 | status: 12 | patch: false 13 | -------------------------------------------------------------------------------- /thinkphp/composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "topthink/framework", 3 | "description": "the new thinkphp framework", 4 | "type": "think-framework", 5 | "keywords": [ 6 | "framework", 7 | "thinkphp", 8 | "ORM" 9 | ], 10 | "homepage": "http://thinkphp.cn/", 11 | "license": "Apache-2.0", 12 | "authors": [ 13 | { 14 | "name": "liu21st", 15 | "email": "liu21st@gmail.com" 16 | } 17 | ], 18 | "require": { 19 | "php": ">=5.4.0", 20 | "topthink/think-installer": "~1.0" 21 | }, 22 | "require-dev": { 23 | "phpunit/phpunit": "4.8.*", 24 | "johnkary/phpunit-speedtrap": "^1.0", 25 | "mikey179/vfsStream": "~1.6", 26 | "phploc/phploc": "2.*", 27 | "sebastian/phpcpd": "2.*", 28 | "squizlabs/php_codesniffer": "2.*", 29 | "phpdocumentor/reflection-docblock": "^2.0" 30 | }, 31 | "autoload": { 32 | "psr-4": { 33 | "think\\": "library/think" 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /thinkphp/console.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | // ThinkPHP 引导文件 15 | // 加载基础文件 16 | require __DIR__ . '/base.php'; 17 | 18 | // 执行应用 19 | App::initCommon(); 20 | Console::init(); -------------------------------------------------------------------------------- /thinkphp/library/think/Env.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | class Env 15 | { 16 | /** 17 | * 获取环境变量值 18 | * @param string $name 环境变量名(支持二级 .号分割) 19 | * @param string $default 默认值 20 | * @return mixed 21 | */ 22 | public static function get($name, $default = null) 23 | { 24 | $result = getenv(ENV_PREFIX . strtoupper(str_replace('.', '_', $name))); 25 | if (false !== $result) { 26 | return $result; 27 | } else { 28 | return $default; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /thinkphp/library/think/Exception.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | class Exception extends \Exception 15 | { 16 | 17 | /** 18 | * 保存异常页面显示的额外Debug数据 19 | * @var array 20 | */ 21 | protected $data = []; 22 | 23 | /** 24 | * 设置异常额外的Debug数据 25 | * 数据将会显示为下面的格式 26 | * 27 | * Exception Data 28 | * -------------------------------------------------- 29 | * Label 1 30 | * key1 value1 31 | * key2 value2 32 | * Label 2 33 | * key1 value1 34 | * key2 value2 35 | * 36 | * @param string $label 数据分类,用于异常页面显示 37 | * @param array $data 需要显示的数据,必须为关联数组 38 | */ 39 | final protected function setData($label, array $data) 40 | { 41 | $this->data[$label] = $data; 42 | } 43 | 44 | /** 45 | * 获取异常额外Debug数据 46 | * 主要用于输出到异常页面便于调试 47 | * @return array 由setData设置的Debug数据 48 | */ 49 | final public function getData() 50 | { 51 | return $this->data; 52 | } 53 | 54 | } 55 | -------------------------------------------------------------------------------- /thinkphp/library/think/config/driver/Ini.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Ini 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | return parse_ini_file($config, true); 20 | } else { 21 | return parse_ini_string($config, true); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /thinkphp/library/think/config/driver/Json.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Json 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | $config = file_get_contents($config); 20 | } 21 | $result = json_decode($config, true); 22 | return $result; 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /thinkphp/library/think/config/driver/Xml.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\config\driver; 13 | 14 | class Xml 15 | { 16 | public function parse($config) 17 | { 18 | if (is_file($config)) { 19 | $content = simplexml_load_file($config); 20 | } else { 21 | $content = simplexml_load_string($config); 22 | } 23 | $result = (array) $content; 24 | foreach ($result as $key => $val) { 25 | if (is_object($val)) { 26 | $result[$key] = (array) $val; 27 | } 28 | } 29 | return $result; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2004-2016 Fabien Potencier 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is furnished 8 | to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 19 | THE SOFTWARE. -------------------------------------------------------------------------------- /thinkphp/library/think/console/bin/README.md: -------------------------------------------------------------------------------- 1 | console 工具使用 hiddeninput.exe 在 windows 上隐藏密码输入,该二进制文件由第三方提供,相关源码和其他细节可以在 [Hidden Input](https://github.com/Seldaek/hidden-input) 找到。 2 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/bin/hiddeninput.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/thinkphp/library/think/console/bin/hiddeninput.exe -------------------------------------------------------------------------------- /thinkphp/library/think/console/command/Build.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command; 13 | 14 | use think\console\Command; 15 | use think\console\Input; 16 | use think\console\input\Option; 17 | use think\console\Output; 18 | 19 | class Build extends Command 20 | { 21 | 22 | /** 23 | * {@inheritdoc} 24 | */ 25 | protected function configure() 26 | { 27 | $this->setName('build') 28 | ->setDefinition([ 29 | new Option('config', null, Option::VALUE_OPTIONAL, "build.php path"), 30 | new Option('module', null, Option::VALUE_OPTIONAL, "module name"), 31 | ]) 32 | ->setDescription('Build Application Dirs'); 33 | } 34 | 35 | protected function execute(Input $input, Output $output) 36 | { 37 | if ($input->hasOption('module')) { 38 | \think\Build::module($input->getOption('module')); 39 | $output->writeln("Successed"); 40 | return; 41 | } 42 | 43 | if ($input->hasOption('config')) { 44 | $build = include $input->getOption('config'); 45 | } else { 46 | $build = include APP_PATH . 'build.php'; 47 | } 48 | if (empty($build)) { 49 | $output->writeln("Build Config Is Empty"); 50 | return; 51 | } 52 | \think\Build::run($build); 53 | $output->writeln("Successed"); 54 | 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/command/Clear.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | namespace think\console\command; 12 | 13 | use think\console\Command; 14 | use think\console\Input; 15 | use think\console\input\Option; 16 | use think\console\Output; 17 | 18 | class Clear extends Command 19 | { 20 | protected function configure() 21 | { 22 | // 指令配置 23 | $this 24 | ->setName('clear') 25 | ->addOption('path', 'd', Option::VALUE_OPTIONAL, 'path to clear', null) 26 | ->setDescription('Clear runtime file'); 27 | } 28 | 29 | protected function execute(Input $input, Output $output) 30 | { 31 | $path = $input->getOption('path') ?: RUNTIME_PATH; 32 | $files = scandir($path); 33 | if ($files) { 34 | foreach ($files as $file) { 35 | if ('.' != $file && '..' != $file && is_dir($path . $file)) { 36 | array_map('unlink', glob($path . $file . '/*.*')); 37 | } elseif (is_file($path . $file)) { 38 | unlink($path . $file); 39 | } 40 | } 41 | } 42 | $output->writeln("Clear Successed"); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/command/Help.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command; 13 | 14 | use think\console\Command; 15 | use think\console\Input; 16 | use think\console\input\Argument as InputArgument; 17 | use think\console\input\Option as InputOption; 18 | use think\console\Output; 19 | use think\console\helper\Descriptor as DescriptorHelper; 20 | 21 | class Help extends Command 22 | { 23 | 24 | private $command; 25 | 26 | /** 27 | * {@inheritdoc} 28 | */ 29 | protected function configure() 30 | { 31 | $this->ignoreValidationErrors(); 32 | 33 | $this->setName('help')->setDefinition([ 34 | new InputArgument('command_name', InputArgument::OPTIONAL, 'The command name', 'help'), 35 | new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), 36 | ])->setDescription('Displays help for a command')->setHelp(<<%command.name% command displays help for a given command: 38 | 39 | php %command.full_name% list 40 | 41 | To display the list of available commands, please use the list command. 42 | EOF 43 | ); 44 | } 45 | 46 | /** 47 | * Sets the command. 48 | * @param Command $command The command to set 49 | */ 50 | public function setCommand(Command $command) 51 | { 52 | $this->command = $command; 53 | } 54 | 55 | /** 56 | * {@inheritdoc} 57 | */ 58 | protected function execute(Input $input, Output $output) 59 | { 60 | if (null === $this->command) { 61 | $this->command = $this->getConsole()->find($input->getArgument('command_name')); 62 | } 63 | 64 | $output->describe($this->command, [ 65 | 'raw_text' => $input->getOption('raw'), 66 | ]); 67 | 68 | $this->command = null; 69 | } 70 | } -------------------------------------------------------------------------------- /thinkphp/library/think/console/command/Lists.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command; 13 | 14 | use think\console\Command; 15 | use think\console\Input; 16 | use think\console\Output; 17 | use think\console\input\Argument as InputArgument; 18 | use think\console\input\Option as InputOption; 19 | use think\console\input\Definition as InputDefinition; 20 | 21 | class Lists extends Command 22 | { 23 | 24 | /** 25 | * {@inheritdoc} 26 | */ 27 | protected function configure() 28 | { 29 | $this->setName('list')->setDefinition($this->createDefinition())->setDescription('Lists commands')->setHelp(<<%command.name% command lists all commands: 31 | 32 | php %command.full_name% 33 | 34 | You can also display the commands for a specific namespace: 35 | 36 | php %command.full_name% test 37 | 38 | It's also possible to get raw list of commands (useful for embedding command runner): 39 | 40 | php %command.full_name% --raw 41 | EOF 42 | ); 43 | } 44 | 45 | /** 46 | * {@inheritdoc} 47 | */ 48 | public function getNativeDefinition() 49 | { 50 | return $this->createDefinition(); 51 | } 52 | 53 | /** 54 | * {@inheritdoc} 55 | */ 56 | protected function execute(Input $input, Output $output) 57 | { 58 | $output->describe($this->getConsole(), [ 59 | 'raw_text' => $input->getOption('raw'), 60 | 'namespace' => $input->getArgument('namespace'), 61 | ]); 62 | } 63 | 64 | /** 65 | * {@inheritdoc} 66 | */ 67 | private function createDefinition() 68 | { 69 | return new InputDefinition([ 70 | new InputArgument('namespace', InputArgument::OPTIONAL, 'The namespace name'), 71 | new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command list') 72 | ]); 73 | } 74 | } -------------------------------------------------------------------------------- /thinkphp/library/think/console/command/make/Controller.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command\make; 13 | 14 | use think\Config; 15 | use think\console\command\Make; 16 | use think\console\input\Option; 17 | 18 | class Controller extends Make 19 | { 20 | 21 | protected $type = "Controller"; 22 | 23 | protected function configure() 24 | { 25 | parent::configure(); 26 | $this->setName('make:controller') 27 | ->addOption('plain', null, Option::VALUE_NONE, 'Generate an empty controller class.') 28 | ->setDescription('Create a new resource controller class'); 29 | } 30 | 31 | protected function getStub() 32 | { 33 | if ($this->input->getOption('plain')) { 34 | return __DIR__ . '/stubs/controller.plain.stub'; 35 | } 36 | 37 | return __DIR__ . '/stubs/controller.stub'; 38 | } 39 | 40 | protected function getClassName($name) 41 | { 42 | return parent::getClassName($name) . (Config::get('controller_suffix') ? ucfirst(Config::get('url_controller_layer')) : ''); 43 | } 44 | 45 | protected function getNamespace($appNamespace, $module) 46 | { 47 | return parent::getNamespace($appNamespace, $module) . '\controller'; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/command/make/Model.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\command\make; 13 | 14 | use think\console\command\Make; 15 | 16 | class Model extends Make 17 | { 18 | protected $type = "Model"; 19 | 20 | protected function configure() 21 | { 22 | parent::configure(); 23 | $this->setName('make:model') 24 | ->setDescription('Create a new model class'); 25 | } 26 | 27 | protected function getStub() 28 | { 29 | return __DIR__ . '/stubs/model.stub'; 30 | } 31 | 32 | protected function getNamespace($appNamespace, $module) 33 | { 34 | return parent::getNamespace($appNamespace, $module) . '\model'; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/command/make/stubs/controller.plain.stub: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\output\driver; 13 | 14 | use think\console\Output; 15 | 16 | class Buffer 17 | { 18 | /** 19 | * @var string 20 | */ 21 | private $buffer = ''; 22 | 23 | public function __construct(Output $output) 24 | { 25 | // do nothing 26 | } 27 | 28 | public function fetch() 29 | { 30 | $content = $this->buffer; 31 | $this->buffer = ''; 32 | return $content; 33 | } 34 | 35 | public function write($messages, $newline = false, $options = Output::OUTPUT_NORMAL) 36 | { 37 | $messages = (array) $messages; 38 | 39 | foreach ($messages as $message) { 40 | $this->buffer .= $message; 41 | } 42 | if ($newline) { 43 | $this->buffer .= "\n"; 44 | } 45 | } 46 | 47 | public function renderException(\Exception $e) 48 | { 49 | // do nothing 50 | } 51 | 52 | } 53 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/output/driver/Nothing.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\output\driver; 13 | 14 | use think\console\Output; 15 | 16 | class Nothing 17 | { 18 | 19 | public function __construct(Output $output) 20 | { 21 | // do nothing 22 | } 23 | 24 | public function write($messages, $newline = false, $options = Output::OUTPUT_NORMAL) 25 | { 26 | // do nothing 27 | } 28 | 29 | public function renderException(\Exception $e) 30 | { 31 | // do nothing 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /thinkphp/library/think/console/output/question/Confirmation.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\console\output\question; 13 | 14 | use think\console\output\Question; 15 | 16 | class Confirmation extends Question 17 | { 18 | 19 | private $trueAnswerRegex; 20 | 21 | /** 22 | * 构造方法 23 | * @param string $question 问题 24 | * @param bool $default 默认答案 25 | * @param string $trueAnswerRegex 验证正则 26 | */ 27 | public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i') 28 | { 29 | parent::__construct($question, (bool) $default); 30 | 31 | $this->trueAnswerRegex = $trueAnswerRegex; 32 | $this->setNormalizer($this->getDefaultNormalizer()); 33 | } 34 | 35 | /** 36 | * 获取默认的答案回调 37 | * @return callable 38 | */ 39 | private function getDefaultNormalizer() 40 | { 41 | $default = $this->getDefault(); 42 | $regex = $this->trueAnswerRegex; 43 | 44 | return function ($answer) use ($default, $regex) { 45 | if (is_bool($answer)) { 46 | return $answer; 47 | } 48 | 49 | $answerIsTrue = (bool) preg_match($regex, $answer); 50 | if (false === $default) { 51 | return $answer && $answerIsTrue; 52 | } 53 | 54 | return !$answer || $answerIsTrue; 55 | }; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /thinkphp/library/think/controller/Yar.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\controller; 13 | 14 | /** 15 | * ThinkPHP Yar控制器类 16 | */ 17 | abstract class Yar 18 | { 19 | 20 | /** 21 | * 架构函数 22 | * @access public 23 | */ 24 | public function __construct() 25 | { 26 | //控制器初始化 27 | if (method_exists($this, '_initialize')) { 28 | $this->_initialize(); 29 | } 30 | 31 | //判断扩展是否存在 32 | if (!extension_loaded('yar')) { 33 | throw new \Exception('not support yar'); 34 | } 35 | 36 | //实例化Yar_Server 37 | $server = new \Yar_Server($this); 38 | // 启动server 39 | $server->handle(); 40 | } 41 | 42 | /** 43 | * 魔术方法 有不存在的操作的时候执行 44 | * @access public 45 | * @param string $method 方法名 46 | * @param array $args 参数 47 | * @return mixed 48 | */ 49 | public function __call($method, $args) 50 | {} 51 | } 52 | -------------------------------------------------------------------------------- /thinkphp/library/think/db/builder/Mysql.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\builder; 13 | 14 | use think\db\Builder; 15 | 16 | /** 17 | * mysql数据库驱动 18 | */ 19 | class Mysql extends Builder 20 | { 21 | protected $updateSql = 'UPDATE %TABLE% %JOIN% SET %SET% %WHERE% %ORDER%%LIMIT% %LOCK%%COMMENT%'; 22 | 23 | /** 24 | * 字段和表名处理 25 | * @access protected 26 | * @param string $key 27 | * @param array $options 28 | * @return string 29 | */ 30 | protected function parseKey($key, $options = []) 31 | { 32 | $key = trim($key); 33 | if (strpos($key, '$.') && false === strpos($key, '(')) { 34 | // JSON字段支持 35 | list($field, $name) = explode('$.', $key); 36 | $key = 'json_extract(' . $field . ', \'$.' . $name . '\')'; 37 | } elseif (strpos($key, '.') && !preg_match('/[,\'\"\(\)`\s]/', $key)) { 38 | list($table, $key) = explode('.', $key, 2); 39 | if (isset($options['alias'][$table])) { 40 | $table = $options['alias'][$table]; 41 | } 42 | } 43 | if (!preg_match('/[,\'\"\*\(\)`.\s]/', $key)) { 44 | $key = '`' . $key . '`'; 45 | } 46 | if (isset($table)) { 47 | $key = '`' . $table . '`.' . $key; 48 | } 49 | return $key; 50 | } 51 | 52 | /** 53 | * 随机排序 54 | * @access protected 55 | * @return string 56 | */ 57 | protected function parseRand() 58 | { 59 | return 'rand()'; 60 | } 61 | 62 | } 63 | -------------------------------------------------------------------------------- /thinkphp/library/think/db/builder/Pgsql.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\builder; 13 | 14 | use think\db\Builder; 15 | 16 | /** 17 | * Pgsql数据库驱动 18 | */ 19 | class Pgsql extends Builder 20 | { 21 | 22 | /** 23 | * limit分析 24 | * @access protected 25 | * @param mixed $limit 26 | * @return string 27 | */ 28 | public function parseLimit($limit) 29 | { 30 | $limitStr = ''; 31 | if (!empty($limit)) { 32 | $limit = explode(',', $limit); 33 | if (count($limit) > 1) { 34 | $limitStr .= ' LIMIT ' . $limit[1] . ' OFFSET ' . $limit[0] . ' '; 35 | } else { 36 | $limitStr .= ' LIMIT ' . $limit[0] . ' '; 37 | } 38 | } 39 | return $limitStr; 40 | } 41 | 42 | /** 43 | * 字段和表名处理 44 | * @access protected 45 | * @param string $key 46 | * @param array $options 47 | * @return string 48 | */ 49 | protected function parseKey($key, $options = []) 50 | { 51 | $key = trim($key); 52 | if (strpos($key, '$.') && false === strpos($key, '(')) { 53 | // JSON字段支持 54 | list($field, $name) = explode('$.', $key); 55 | $key = $field . '->>\'' . $name . '\''; 56 | } elseif (strpos($key, '.')) { 57 | list($table, $key) = explode('.', $key, 2); 58 | if (isset($options['alias'][$table])) { 59 | $table = $options['alias'][$table]; 60 | } 61 | } 62 | if (isset($table)) { 63 | $key = $table . '.' . $key; 64 | } 65 | return $key; 66 | } 67 | 68 | /** 69 | * 随机排序 70 | * @access protected 71 | * @return string 72 | */ 73 | protected function parseRand() 74 | { 75 | return 'RANDOM()'; 76 | } 77 | 78 | } 79 | -------------------------------------------------------------------------------- /thinkphp/library/think/db/builder/Sqlite.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\builder; 13 | 14 | use think\db\Builder; 15 | 16 | /** 17 | * Sqlite数据库驱动 18 | */ 19 | class Sqlite extends Builder 20 | { 21 | 22 | /** 23 | * limit 24 | * @access public 25 | * @return string 26 | */ 27 | public function parseLimit($limit) 28 | { 29 | $limitStr = ''; 30 | if (!empty($limit)) { 31 | $limit = explode(',', $limit); 32 | if (count($limit) > 1) { 33 | $limitStr .= ' LIMIT ' . $limit[1] . ' OFFSET ' . $limit[0] . ' '; 34 | } else { 35 | $limitStr .= ' LIMIT ' . $limit[0] . ' '; 36 | } 37 | } 38 | return $limitStr; 39 | } 40 | 41 | /** 42 | * 随机排序 43 | * @access protected 44 | * @return string 45 | */ 46 | protected function parseRand() 47 | { 48 | return 'RANDOM()'; 49 | } 50 | 51 | /** 52 | * 字段和表名处理 53 | * @access protected 54 | * @param string $key 55 | * @param array $options 56 | * @return string 57 | */ 58 | protected function parseKey($key, $options = []) 59 | { 60 | $key = trim($key); 61 | if (strpos($key, '.')) { 62 | list($table, $key) = explode('.', $key, 2); 63 | if (isset($options['alias'][$table])) { 64 | $table = $options['alias'][$table]; 65 | } 66 | } 67 | if (isset($table)) { 68 | $key = $table . '.' . $key; 69 | } 70 | return $key; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /thinkphp/library/think/db/exception/BindParamException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | /** 17 | * PDO参数绑定异常 18 | */ 19 | class BindParamException extends DbException 20 | { 21 | 22 | /** 23 | * BindParamException constructor. 24 | * @param string $message 25 | * @param array $config 26 | * @param string $sql 27 | * @param array $bind 28 | * @param int $code 29 | */ 30 | public function __construct($message, $config, $sql, $bind, $code = 10502) 31 | { 32 | $this->setData('Bind Param', $bind); 33 | parent::__construct($message, $config, $sql, $code); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /thinkphp/library/think/db/exception/DataNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | class DataNotFoundException extends DbException 17 | { 18 | protected $table; 19 | 20 | /** 21 | * DbException constructor. 22 | * @param string $message 23 | * @param string $table 24 | * @param array $config 25 | */ 26 | public function __construct($message, $table = '', Array $config = []) 27 | { 28 | $this->message = $message; 29 | $this->table = $table; 30 | 31 | $this->setData('Database Config', $config); 32 | } 33 | 34 | /** 35 | * 获取数据表名 36 | * @access public 37 | * @return string 38 | */ 39 | public function getTable() 40 | { 41 | return $this->table; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /thinkphp/library/think/db/exception/ModelNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\db\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | class ModelNotFoundException extends DbException 17 | { 18 | protected $model; 19 | 20 | /** 21 | * 构造方法 22 | * @param string $message 23 | * @param string $model 24 | */ 25 | public function __construct($message, $model = '', Array $config = []) 26 | { 27 | $this->message = $message; 28 | $this->model = $model; 29 | 30 | $this->setData('Database Config', $config); 31 | } 32 | 33 | /** 34 | * 获取模型类名 35 | * @access public 36 | * @return string 37 | */ 38 | public function getModel() 39 | { 40 | return $this->model; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/ClassNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ClassNotFoundException extends \RuntimeException 15 | { 16 | protected $class; 17 | public function __construct($message, $class = '') 18 | { 19 | $this->message = $message; 20 | $this->class = $class; 21 | } 22 | 23 | /** 24 | * 获取类名 25 | * @access public 26 | * @return string 27 | */ 28 | public function getClass() 29 | { 30 | return $this->class; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/DbException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\Exception; 15 | 16 | /** 17 | * Database相关异常处理类 18 | */ 19 | class DbException extends Exception 20 | { 21 | /** 22 | * DbException constructor. 23 | * @param string $message 24 | * @param array $config 25 | * @param string $sql 26 | * @param int $code 27 | */ 28 | public function __construct($message, array $config, $sql, $code = 10500) 29 | { 30 | $this->message = $message; 31 | $this->code = $code; 32 | 33 | $this->setData('Database Status', [ 34 | 'Error Code' => $code, 35 | 'Error Message' => $message, 36 | 'Error SQL' => $sql, 37 | ]); 38 | 39 | $this->setData('Database Config', $config); 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/ErrorException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\Exception; 15 | 16 | /** 17 | * ThinkPHP错误异常 18 | * 主要用于封装 set_error_handler 和 register_shutdown_function 得到的错误 19 | * 除开从 think\Exception 继承的功能 20 | * 其他和PHP系统\ErrorException功能基本一样 21 | */ 22 | class ErrorException extends Exception 23 | { 24 | /** 25 | * 用于保存错误级别 26 | * @var integer 27 | */ 28 | protected $severity; 29 | 30 | /** 31 | * 错误异常构造函数 32 | * @param integer $severity 错误级别 33 | * @param string $message 错误详细信息 34 | * @param string $file 出错文件路径 35 | * @param integer $line 出错行号 36 | * @param array $context 错误上下文,会包含错误触发处作用域内所有变量的数组 37 | */ 38 | public function __construct($severity, $message, $file, $line, array $context = []) 39 | { 40 | $this->severity = $severity; 41 | $this->message = $message; 42 | $this->file = $file; 43 | $this->line = $line; 44 | $this->code = 0; 45 | 46 | empty($context) || $this->setData('Error Context', $context); 47 | } 48 | 49 | /** 50 | * 获取错误级别 51 | * @return integer 错误级别 52 | */ 53 | final public function getSeverity() 54 | { 55 | return $this->severity; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/HttpException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class HttpException extends \RuntimeException 15 | { 16 | private $statusCode; 17 | private $headers; 18 | 19 | public function __construct($statusCode, $message = null, \Exception $previous = null, array $headers = [], $code = 0) 20 | { 21 | $this->statusCode = $statusCode; 22 | $this->headers = $headers; 23 | 24 | parent::__construct($message, $code, $previous); 25 | } 26 | 27 | public function getStatusCode() 28 | { 29 | return $this->statusCode; 30 | } 31 | 32 | public function getHeaders() 33 | { 34 | return $this->headers; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/HttpResponseException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\Response; 15 | 16 | class HttpResponseException extends \RuntimeException 17 | { 18 | /** 19 | * @var Response 20 | */ 21 | protected $response; 22 | 23 | public function __construct(Response $response) 24 | { 25 | $this->response = $response; 26 | } 27 | 28 | public function getResponse() 29 | { 30 | return $this->response; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/PDOException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\exception\DbException; 15 | 16 | /** 17 | * PDO异常处理类 18 | * 重新封装了系统的\PDOException类 19 | */ 20 | class PDOException extends DbException 21 | { 22 | /** 23 | * PDOException constructor. 24 | * @param \PDOException $exception 25 | * @param array $config 26 | * @param string $sql 27 | * @param int $code 28 | */ 29 | public function __construct(\PDOException $exception, array $config, $sql, $code = 10501) 30 | { 31 | $error = $exception->errorInfo; 32 | 33 | $this->setData('PDO Error Info', [ 34 | 'SQLSTATE' => $error[0], 35 | 'Driver Error Code' => isset($error[1]) ? $error[1] : 0, 36 | 'Driver Error Message' => isset($error[2]) ? $error[2] : '', 37 | ]); 38 | 39 | parent::__construct($exception->getMessage(), $config, $sql, $code); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/RouteNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | use think\exception\HttpException; 15 | 16 | class RouteNotFoundException extends HttpException 17 | { 18 | 19 | public function __construct() 20 | { 21 | parent::__construct(404); 22 | } 23 | 24 | } 25 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/TemplateNotFoundException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class TemplateNotFoundException extends \RuntimeException 15 | { 16 | protected $template; 17 | 18 | public function __construct($message, $template = '') 19 | { 20 | $this->message = $message; 21 | $this->template = $template; 22 | } 23 | 24 | /** 25 | * 获取模板文件 26 | * @access public 27 | * @return string 28 | */ 29 | public function getTemplate() 30 | { 31 | return $this->template; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/ThrowableError.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ThrowableError extends \ErrorException 15 | { 16 | public function __construct(\Throwable $e) 17 | { 18 | 19 | if ($e instanceof \ParseError) { 20 | $message = 'Parse error: ' . $e->getMessage(); 21 | $severity = E_PARSE; 22 | } elseif ($e instanceof \TypeError) { 23 | $message = 'Type error: ' . $e->getMessage(); 24 | $severity = E_RECOVERABLE_ERROR; 25 | } else { 26 | $message = 'Fatal error: ' . $e->getMessage(); 27 | $severity = E_ERROR; 28 | } 29 | 30 | parent::__construct( 31 | $message, 32 | $e->getCode(), 33 | $severity, 34 | $e->getFile(), 35 | $e->getLine() 36 | ); 37 | 38 | $this->setTrace($e->getTrace()); 39 | } 40 | 41 | protected function setTrace($trace) 42 | { 43 | $traceReflector = new \ReflectionProperty('Exception', 'trace'); 44 | $traceReflector->setAccessible(true); 45 | $traceReflector->setValue($this, $trace); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /thinkphp/library/think/exception/ValidateException.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\exception; 13 | 14 | class ValidateException extends \RuntimeException 15 | { 16 | protected $error; 17 | 18 | public function __construct($error) 19 | { 20 | $this->error = $error; 21 | $this->message = is_array($error) ? implode("\n\r", $error) : $error; 22 | } 23 | 24 | /** 25 | * 获取验证错误信息 26 | * @access public 27 | * @return array|string 28 | */ 29 | public function getError() 30 | { 31 | return $this->error; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /thinkphp/library/think/log/driver/Test.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\log\driver; 13 | 14 | /** 15 | * 模拟测试输出 16 | */ 17 | class Test 18 | { 19 | /** 20 | * 日志写入接口 21 | * @access public 22 | * @param array $log 日志信息 23 | * @return bool 24 | */ 25 | public function save(array $log = []) 26 | { 27 | return true; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /thinkphp/library/think/model/Pivot.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\model; 13 | 14 | use think\Model; 15 | 16 | class Pivot extends Model 17 | { 18 | 19 | /** 20 | * 架构函数 21 | * @access public 22 | * @param array|object $data 数据 23 | * @param string $table 中间数据表名 24 | */ 25 | public function __construct($data = [], $table = '') 26 | { 27 | if (is_object($data)) { 28 | $this->data = get_object_vars($data); 29 | } else { 30 | $this->data = $data; 31 | } 32 | 33 | $this->table = $table; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /thinkphp/library/think/paginator/Collection.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\paginator; 13 | 14 | use Exception; 15 | use think\Paginator; 16 | 17 | /** 18 | * Class Collection 19 | * @package think\paginator 20 | * @method integer total() 21 | * @method integer listRows() 22 | * @method integer currentPage() 23 | * @method string render() 24 | * @method Paginator fragment($fragment) 25 | * @method Paginator appends($key, $value) 26 | * @method integer lastPage() 27 | * @method boolean hasPages() 28 | */ 29 | class Collection extends \think\Collection 30 | { 31 | 32 | /** @var Paginator */ 33 | protected $paginator; 34 | 35 | public function __construct($items = [], Paginator $paginator = null) 36 | { 37 | $this->paginator = $paginator; 38 | parent::__construct($items); 39 | } 40 | 41 | public static function make($items = [], Paginator $paginator = null) 42 | { 43 | return new static($items, $paginator); 44 | } 45 | 46 | public function toArray() 47 | { 48 | if ($this->paginator) { 49 | try { 50 | $total = $this->total(); 51 | } catch (Exception $e) { 52 | $total = null; 53 | } 54 | 55 | return [ 56 | 'total' => $total, 57 | 'per_page' => $this->listRows(), 58 | 'current_page' => $this->currentPage(), 59 | 'data' => parent::toArray() 60 | ]; 61 | } else { 62 | return parent::toArray(); 63 | } 64 | } 65 | 66 | public function __call($method, $args) 67 | { 68 | if ($this->paginator && method_exists($this->paginator, $method)) { 69 | return call_user_func_array([$this->paginator, $method], $args); 70 | } else { 71 | throw new Exception('method not exists:' . __CLASS__ . '->' . $method); 72 | } 73 | } 74 | } -------------------------------------------------------------------------------- /thinkphp/library/think/process/Utils.php: -------------------------------------------------------------------------------- 1 | 8 | // +---------------------------------------------------------------------- 9 | 10 | namespace think\process; 11 | 12 | class Utils 13 | { 14 | 15 | /** 16 | * 转义字符串 17 | * @param string $argument 18 | * @return string 19 | */ 20 | public static function escapeArgument($argument) 21 | { 22 | 23 | if ('' === $argument) { 24 | return escapeshellarg($argument); 25 | } 26 | $escapedArgument = ''; 27 | $quote = false; 28 | foreach (preg_split('/(")/i', $argument, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE) as $part) { 29 | if ('"' === $part) { 30 | $escapedArgument .= '\\"'; 31 | } elseif (self::isSurroundedBy($part, '%')) { 32 | // Avoid environment variable expansion 33 | $escapedArgument .= '^%"' . substr($part, 1, -1) . '"^%'; 34 | } else { 35 | // escape trailing backslash 36 | if ('\\' === substr($part, -1)) { 37 | $part .= '\\'; 38 | } 39 | $quote = true; 40 | $escapedArgument .= $part; 41 | } 42 | } 43 | if ($quote) { 44 | $escapedArgument = '"' . $escapedArgument . '"'; 45 | } 46 | return $escapedArgument; 47 | } 48 | 49 | /** 50 | * 验证并进行规范化Process输入。 51 | * @param string $caller 52 | * @param mixed $input 53 | * @return string 54 | * @throws \InvalidArgumentException 55 | */ 56 | public static function validateInput($caller, $input) 57 | { 58 | if (null !== $input) { 59 | if (is_resource($input)) { 60 | return $input; 61 | } 62 | if (is_scalar($input)) { 63 | return (string)$input; 64 | } 65 | throw new \InvalidArgumentException(sprintf('%s only accepts strings or stream resources.', $caller)); 66 | } 67 | return $input; 68 | } 69 | 70 | private static function isSurroundedBy($arg, $char) 71 | { 72 | return 2 < strlen($arg) && $char === $arg[0] && $char === $arg[strlen($arg) - 1]; 73 | } 74 | 75 | } -------------------------------------------------------------------------------- /thinkphp/library/think/process/exception/Faild.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\process\exception; 13 | 14 | 15 | use think\Process; 16 | 17 | class Failed extends \RuntimeException 18 | { 19 | 20 | private $process; 21 | 22 | public function __construct(Process $process) 23 | { 24 | if ($process->isSuccessful()) { 25 | throw new \InvalidArgumentException('Expected a failed process, but the given process was successful.'); 26 | } 27 | 28 | $error = sprintf('The command "%s" failed.' . "\nExit Code: %s(%s)", $process->getCommandLine(), $process->getExitCode(), $process->getExitCodeText()); 29 | 30 | if (!$process->isOutputDisabled()) { 31 | $error .= sprintf("\n\nOutput:\n================\n%s\n\nError Output:\n================\n%s", $process->getOutput(), $process->getErrorOutput()); 32 | } 33 | 34 | parent::__construct($error); 35 | 36 | $this->process = $process; 37 | } 38 | 39 | public function getProcess() 40 | { 41 | return $this->process; 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /thinkphp/library/think/process/exception/Timeout.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\process\exception; 13 | 14 | use think\Process; 15 | 16 | class Timeout extends \RuntimeException 17 | { 18 | 19 | const TYPE_GENERAL = 1; 20 | const TYPE_IDLE = 2; 21 | 22 | private $process; 23 | private $timeoutType; 24 | 25 | public function __construct(Process $process, $timeoutType) 26 | { 27 | $this->process = $process; 28 | $this->timeoutType = $timeoutType; 29 | 30 | parent::__construct(sprintf('The process "%s" exceeded the timeout of %s seconds.', $process->getCommandLine(), $this->getExceededTimeout())); 31 | } 32 | 33 | public function getProcess() 34 | { 35 | return $this->process; 36 | } 37 | 38 | public function isGeneralTimeout() 39 | { 40 | return $this->timeoutType === self::TYPE_GENERAL; 41 | } 42 | 43 | public function isIdleTimeout() 44 | { 45 | return $this->timeoutType === self::TYPE_IDLE; 46 | } 47 | 48 | public function getExceededTimeout() 49 | { 50 | switch ($this->timeoutType) { 51 | case self::TYPE_GENERAL: 52 | return $this->process->getTimeout(); 53 | 54 | case self::TYPE_IDLE: 55 | return $this->process->getIdleTimeout(); 56 | 57 | default: 58 | throw new \LogicException(sprintf('Unknown timeout type "%d".', $this->timeoutType)); 59 | } 60 | } 61 | } -------------------------------------------------------------------------------- /thinkphp/library/think/process/pipes/Pipes.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\process\pipes; 13 | 14 | abstract class Pipes 15 | { 16 | 17 | /** @var array */ 18 | public $pipes = []; 19 | 20 | /** @var string */ 21 | protected $inputBuffer = ''; 22 | /** @var resource|null */ 23 | protected $input; 24 | 25 | /** @var bool */ 26 | private $blocked = true; 27 | 28 | const CHUNK_SIZE = 16384; 29 | 30 | /** 31 | * 返回用于 proc_open 描述符的数组 32 | * @return array 33 | */ 34 | abstract public function getDescriptors(); 35 | 36 | /** 37 | * 返回一个数组的索引由其相关的流,以防这些管道使用的临时文件的文件名。 38 | * @return string[] 39 | */ 40 | abstract public function getFiles(); 41 | 42 | /** 43 | * 文件句柄和管道中读取数据。 44 | * @param bool $blocking 是否使用阻塞调用 45 | * @param bool $close 是否要关闭管道,如果他们已经到达 EOF。 46 | * @return string[] 47 | */ 48 | abstract public function readAndWrite($blocking, $close = false); 49 | 50 | /** 51 | * 返回当前状态如果有打开的文件句柄或管道。 52 | * @return bool 53 | */ 54 | abstract public function areOpen(); 55 | 56 | 57 | /** 58 | * {@inheritdoc} 59 | */ 60 | public function close() 61 | { 62 | foreach ($this->pipes as $pipe) { 63 | fclose($pipe); 64 | } 65 | $this->pipes = []; 66 | } 67 | 68 | /** 69 | * 检查系统调用已被中断 70 | * @return bool 71 | */ 72 | protected function hasSystemCallBeenInterrupted() 73 | { 74 | $lastError = error_get_last(); 75 | 76 | return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call'); 77 | } 78 | 79 | protected function unblock() 80 | { 81 | if (!$this->blocked) { 82 | return; 83 | } 84 | 85 | foreach ($this->pipes as $pipe) { 86 | stream_set_blocking($pipe, 0); 87 | } 88 | if (null !== $this->input) { 89 | stream_set_blocking($this->input, 0); 90 | } 91 | 92 | $this->blocked = false; 93 | } 94 | } -------------------------------------------------------------------------------- /thinkphp/library/think/response/Json.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\response; 13 | 14 | use think\Response; 15 | 16 | class Json extends Response 17 | { 18 | // 输出参数 19 | protected $options = [ 20 | 'json_encode_param' => JSON_UNESCAPED_UNICODE, 21 | ]; 22 | 23 | protected $contentType = 'application/json'; 24 | 25 | /** 26 | * 处理数据 27 | * @access protected 28 | * @param mixed $data 要处理的数据 29 | * @return mixed 30 | * @throws \Exception 31 | */ 32 | protected function output($data) 33 | { 34 | try { 35 | // 返回JSON数据格式到客户端 包含状态信息 36 | $data = json_encode($data, $this->options['json_encode_param']); 37 | 38 | if ($data === false) { 39 | throw new \InvalidArgumentException(json_last_error_msg()); 40 | } 41 | 42 | return $data; 43 | } catch (\Exception $e) { 44 | if ($e->getPrevious()) { 45 | throw $e->getPrevious(); 46 | } 47 | throw $e; 48 | } 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /thinkphp/library/think/response/Jsonp.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\response; 13 | 14 | use think\Request; 15 | use think\Response; 16 | 17 | class Jsonp extends Response 18 | { 19 | // 输出参数 20 | protected $options = [ 21 | 'var_jsonp_handler' => 'callback', 22 | 'default_jsonp_handler' => 'jsonpReturn', 23 | 'json_encode_param' => JSON_UNESCAPED_UNICODE, 24 | ]; 25 | 26 | protected $contentType = 'application/javascript'; 27 | 28 | /** 29 | * 处理数据 30 | * @access protected 31 | * @param mixed $data 要处理的数据 32 | * @return mixed 33 | * @throws \Exception 34 | */ 35 | protected function output($data) 36 | { 37 | try { 38 | // 返回JSON数据格式到客户端 包含状态信息 [当url_common_param为false时是无法获取到$_GET的数据的,故使用Request来获取] 39 | $var_jsonp_handler = Request::instance()->param($this->options['var_jsonp_handler'], ""); 40 | $handler = !empty($var_jsonp_handler) ? $var_jsonp_handler : $this->options['default_jsonp_handler']; 41 | 42 | $data = json_encode($data, $this->options['json_encode_param']); 43 | 44 | if ($data === false) { 45 | throw new \InvalidArgumentException(json_last_error_msg()); 46 | } 47 | 48 | $data = $handler . '(' . $data . ');'; 49 | return $data; 50 | } catch (\Exception $e) { 51 | if ($e->getPrevious()) { 52 | throw $e->getPrevious(); 53 | } 54 | throw $e; 55 | } 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /thinkphp/library/think/response/Redirect.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\response; 13 | 14 | use think\Request; 15 | use think\Response; 16 | use think\Session; 17 | use think\Url; 18 | 19 | class Redirect extends Response 20 | { 21 | 22 | protected $options = []; 23 | 24 | // URL参数 25 | protected $params = []; 26 | 27 | public function __construct($data = '', $code = 302, array $header = [], array $options = []) 28 | { 29 | parent::__construct($data, $code, $header, $options); 30 | $this->cacheControl('no-cache,must-revalidate'); 31 | } 32 | 33 | /** 34 | * 处理数据 35 | * @access protected 36 | * @param mixed $data 要处理的数据 37 | * @return mixed 38 | */ 39 | protected function output($data) 40 | { 41 | $this->header['Location'] = $this->getTargetUrl(); 42 | return; 43 | } 44 | 45 | /** 46 | * 重定向传值(通过Session) 47 | * @access protected 48 | * @param string|array $name 变量名或者数组 49 | * @param mixed $value 值 50 | * @return $this 51 | */ 52 | public function with($name, $value = null) 53 | { 54 | if (is_array($name)) { 55 | foreach ($name as $key => $val) { 56 | Session::flash($key, $val); 57 | } 58 | } else { 59 | Session::flash($name, $value); 60 | } 61 | return $this; 62 | } 63 | 64 | /** 65 | * 获取跳转地址 66 | * @return string 67 | */ 68 | public function getTargetUrl() 69 | { 70 | return (strpos($this->data, '://') || 0 === strpos($this->data, '/')) ? $this->data : Url::build($this->data, $this->params); 71 | } 72 | 73 | public function params($params = []) 74 | { 75 | $this->params = $params; 76 | return $this; 77 | } 78 | 79 | /** 80 | * 记住当前url后跳转 81 | */ 82 | public function remember() 83 | { 84 | Session::set('redirect_url', Request::instance()->url()); 85 | } 86 | 87 | /** 88 | * 跳转到上次记住的url 89 | */ 90 | public function restore() 91 | { 92 | if (Session::has('redirect_url')) { 93 | $this->data = Session::get('redirect_url'); 94 | Session::delete('redirect_url'); 95 | } 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /thinkphp/library/think/response/View.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\response; 13 | 14 | use think\Config; 15 | use think\Response; 16 | use think\View as ViewTemplate; 17 | 18 | class View extends Response 19 | { 20 | // 输出参数 21 | protected $options = []; 22 | protected $vars = []; 23 | protected $replace = []; 24 | protected $contentType = 'text/html'; 25 | 26 | /** 27 | * 处理数据 28 | * @access protected 29 | * @param mixed $data 要处理的数据 30 | * @return mixed 31 | */ 32 | protected function output($data) 33 | { 34 | // 渲染模板输出 35 | return ViewTemplate::instance(Config::get('template'), Config::get('view_replace_str')) 36 | ->fetch($data, $this->vars, $this->replace); 37 | } 38 | 39 | /** 40 | * 获取视图变量 41 | * @access public 42 | * @param string $name 模板变量 43 | * @return mixed 44 | */ 45 | public function getVars($name = null) 46 | { 47 | if (is_null($name)) { 48 | return $this->vars; 49 | } else { 50 | return isset($this->vars[$name]) ? $this->vars[$name] : null; 51 | } 52 | } 53 | 54 | /** 55 | * 模板变量赋值 56 | * @access public 57 | * @param mixed $name 变量名 58 | * @param mixed $value 变量值 59 | * @return $this 60 | */ 61 | public function assign($name, $value = '') 62 | { 63 | if (is_array($name)) { 64 | $this->vars = array_merge($this->vars, $name); 65 | return $this; 66 | } else { 67 | $this->vars[$name] = $value; 68 | } 69 | return $this; 70 | } 71 | 72 | /** 73 | * 视图内容替换 74 | * @access public 75 | * @param string|array $content 被替换内容(支持批量替换) 76 | * @param string $replace 替换内容 77 | * @return $this 78 | */ 79 | public function replace($content, $replace = '') 80 | { 81 | if (is_array($content)) { 82 | $this->replace = array_merge($this->replace, $content); 83 | } else { 84 | $this->replace[$content] = $replace; 85 | } 86 | return $this; 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /thinkphp/library/think/template/driver/File.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think\template\driver; 13 | 14 | use think\Exception; 15 | 16 | class File 17 | { 18 | /** 19 | * 写入编译缓存 20 | * @param string $cacheFile 缓存的文件名 21 | * @param string $content 缓存的内容 22 | * @return void|array 23 | */ 24 | public function write($cacheFile, $content) 25 | { 26 | // 检测模板目录 27 | $dir = dirname($cacheFile); 28 | if (!is_dir($dir)) { 29 | mkdir($dir, 0755, true); 30 | } 31 | // 生成模板缓存文件 32 | if (false === file_put_contents($cacheFile, $content)) { 33 | throw new Exception('cache write error:' . $cacheFile, 11602); 34 | } 35 | } 36 | 37 | /** 38 | * 读取编译编译 39 | * @param string $cacheFile 缓存的文件名 40 | * @param array $vars 变量数组 41 | * @return void 42 | */ 43 | public function read($cacheFile, $vars = []) 44 | { 45 | if (!empty($vars) && is_array($vars)) { 46 | // 模板阵列变量分解成为独立变量 47 | extract($vars, EXTR_OVERWRITE); 48 | } 49 | //载入模版缓存文件 50 | include $cacheFile; 51 | } 52 | 53 | /** 54 | * 检查编译缓存是否有效 55 | * @param string $cacheFile 缓存的文件名 56 | * @param int $cacheTime 缓存时间 57 | * @return boolean 58 | */ 59 | public function check($cacheFile, $cacheTime) 60 | { 61 | // 缓存文件不存在, 直接返回false 62 | if (!file_exists($cacheFile)) { 63 | return false; 64 | } 65 | if (0 != $cacheTime && $_SERVER['REQUEST_TIME'] > filemtime($cacheFile) + $cacheTime) { 66 | // 缓存是否在有效期 67 | return false; 68 | } 69 | return true; 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /thinkphp/library/traits/think/Instance.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace traits\think; 13 | 14 | use \think\Exception; 15 | 16 | trait Instance 17 | { 18 | protected static $instance = null; 19 | 20 | /** 21 | * @param array $options 22 | * @return static 23 | */ 24 | public static function instance($options = []) 25 | { 26 | if (is_null(self::$instance)) { 27 | self::$instance = new self($options); 28 | } 29 | return self::$instance; 30 | } 31 | 32 | // 静态调用 33 | public static function __callStatic($method, $params) 34 | { 35 | if (is_null(self::$instance)) { 36 | self::$instance = new self(); 37 | } 38 | $call = substr($method, 1); 39 | if (0 === strpos($method, '_') && is_callable([self::$instance, $call])) { 40 | return call_user_func_array([self::$instance, $call], $params); 41 | } else { 42 | throw new Exception("method not exists:" . $method); 43 | } 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /thinkphp/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fmsdwifull/tp5cms/e8a0177408ba87ce56d0cf9f2c8373e7618e6c4e/thinkphp/logo.png -------------------------------------------------------------------------------- /thinkphp/phpunit.xml: -------------------------------------------------------------------------------- 1 | 2 | 12 | 13 | 14 | ./tests/thinkphp/ 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | ./ 23 | 24 | tests 25 | vendor 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /thinkphp/start.php: -------------------------------------------------------------------------------- 1 | 10 | // +---------------------------------------------------------------------- 11 | 12 | namespace think; 13 | 14 | // ThinkPHP 引导文件 15 | // 加载基础文件 16 | require __DIR__ . '/base.php'; 17 | // 执行应用 18 | App::run()->send(); 19 | -------------------------------------------------------------------------------- /thinkphp/tpl/default_index.tpl: -------------------------------------------------------------------------------- 1 | *{ padding: 0; margin: 0; } div{ padding: 4px 48px;} a{color:#2E5CD5;cursor: pointer;text-decoration: none} a:hover{text-decoration:underline; } body{ background: #fff; font-family: "Century Gothic","Microsoft yahei"; color: #333;font-size:18px;} h1{ font-size: 100px; font-weight: normal; margin-bottom: 12px; } p{ line-height: 1.6em; font-size: 42px }

:)

ThinkPHP V5
十年磨一剑 - 为API开发设计的高性能框架

[ V5.0 版本由 七牛云 独家赞助发布 ]
'; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /thinkphp/tpl/dispatch_jump.tpl: -------------------------------------------------------------------------------- 1 | {__NOLAYOUT__} 2 | 3 | 4 | 5 | 跳转提示 6 | 16 | 17 | 18 |
19 |

提示信息

20 | 21 | 22 |

23 | 24 | 25 |

26 | 27 | 28 |

29 |

30 | 页面自动 跳转 等待时间: 31 |

32 |
33 | 46 | 47 | 48 | --------------------------------------------------------------------------------