diff --git a/README.md b/README.md index 1ddb7e5..12af549 100644 --- a/README.md +++ b/README.md @@ -2,13 +2,13 @@ > TaoLer是一个简单迅捷的轻论坛系统,适用于个人或组织区域型信息交流发布平台。 - * 官网:https://www.aieok.com - * 前台:http://bbs.aieok.com - * 后台:http://adm.aieok.com + * 官网:https://www.aieok.com:8443 + * 前台:http://bbs.aieok.com:888 + * 后台:http://adm.aieok.com:888 * 账号:test * 密码:test123 - * 版本:TaoLer 1.7.20 - * 日期:2021.7.20 + * 版本:TaoLer 1.7.23 + * 日期:2021.7.22 #### 项目地址 diff --git a/app/admin/controller/Upgrade.php b/app/admin/controller/Upgrade.php index 8c93bcd..8da49fd 100644 --- a/app/admin/controller/Upgrade.php +++ b/app/admin/controller/Upgrade.php @@ -199,7 +199,7 @@ class Upgrade extends AdminController $upRes = $setConf->setConfig('taoler',$value); $result = $upRes->getData(); if($result['code'] == -1){ - return json(['code'=>-1,'msg'=>$result['msg']]); + return json(['code'=>-1,'msg'=>'代码写入成功,但'.$result['msg']]); } return json(['code'=>0,'msg'=>'升级成功']); diff --git a/app/admin/view/databackup/index.html b/app/admin/view/databackup/index.html new file mode 100644 index 0000000..2d7c00b --- /dev/null +++ b/app/admin/view/databackup/index.html @@ -0,0 +1,130 @@ +{extend name="public:base" /} + +{block name="body"} +
+
+
+ +
+ +
+
+
+ +
+
+ + +
+
+
+ +{/block} + +{block name="js"} + +{/block} diff --git a/app/admin/view/database/index.html b/app/admin/view/database/index.html index 9123e22..edb33f8 100644 --- a/app/admin/view/database/index.html +++ b/app/admin/view/database/index.html @@ -21,8 +21,8 @@ @@ -82,7 +82,7 @@ - //总帐信息 + //信息 table.render({ elem: '#LAY-app-content-database' ,url: "{:url('admin/Database/index')}" //进列表接口 @@ -92,7 +92,7 @@ ,{field:'id', title:'ID', width:80, fixed: 'left', unresize: true, sort: true} ,{field: 'time', title: '备份时间',width: 180} ,{field: 'name', title: '备份名', minWidth: 200} - ,{title: '操作', width: 150, align: 'center', fixed: 'right', toolbar: '#tao-database'} + ,{title: '操作', width: 100, align: 'center', toolbar: '#tao-database'} ]] ,page: true ,limit: 15 @@ -135,7 +135,7 @@ var tr = $(obj.tr); layer.open({ type: 2 - ,title: '编辑支出' + ,title: '下载' ,content: "{:url('Database/down')}" + '?id='+ data.id ,area: ['420px', '460px'] ,btn: ['确定', '取消'] diff --git a/app/admin/view/set/system/server.html b/app/admin/view/set/system/server.html index 6c134f8..b976307 100644 --- a/app/admin/view/set/system/server.html +++ b/app/admin/view/set/system/server.html @@ -47,11 +47,11 @@
diff --git a/app/admin/view/set/system/website.html b/app/admin/view/set/system/website.html index 60aba3d..3584800 100644 --- a/app/admin/view/set/system/website.html +++ b/app/admin/view/set/system/website.html @@ -246,11 +246,24 @@ }); form.on('submit(set_system_config)', function(data){ - console.log(data); var field = data.field; - $.post("{:url('admin/set/config')}",field); - - layer.msg(JSON.stringify(data.field)); + $.post("{:url('admin/set/config')}",field,function(res){ + if(res.code == 0){ + layer.msg(res.msg,{ + icon:6, + tiye:2000 + },function(){ + location.reload(); + }); + } else { + layer.open({ + title:"设置失败", + content:res.msg, + icon:5, + anim:6 + }); + } + }); return false; }); diff --git a/app/common/lib/SetConf.php b/app/common/lib/SetConf.php index 4a13d48..f36bdb9 100644 --- a/app/common/lib/SetConf.php +++ b/app/common/lib/SetConf.php @@ -54,7 +54,7 @@ class SetConf catch (\Exception $e) { // 这是进行异常捕获 //$e->getMessage(); - return json(['code'=>-1,'msg'=>$fileurl . '无写入权限']); + return json(['code'=>-1,'msg'=> $file . '无写入权限']); } return json(['code'=>0,'msg'=>'配置修改成功']); diff --git a/app/install/controller/Index.php b/app/install/controller/Index.php index f98057f..e9b5f67 100644 --- a/app/install/controller/Index.php +++ b/app/install/controller/Index.php @@ -11,7 +11,7 @@ class Index extends BaseController { // 检测是否安装过 protected function initialize(){ - if(file_exists('../install.lock')){ + if(file_exists('./install.lock')){ echo ""; die(); } @@ -197,23 +197,30 @@ return [ ]; php; // 创建数据库链接配置文件 - $fp = fopen("../config/database.php","w"); - $res = fwrite($fp, $db_str); - fclose($fp); - if(!$res){ - echo '数据库配置文件创建失败!'; - } + $database = '../config/database.php'; + if (file_exists($database)) { + if(is_writable($database)){ + $fp = fopen($database,"w"); + $resf = fwrite($fp, $db_str); + fclose($fp); + if(!$resf){ + $res = json(['code' => -1,'msg'=>'数据库配置文件创建失败!']); + } + } else { + $res = json(['code' => -1,'msg'=>'config/database.php 无写入权限']); + } + } } //安装上锁 - file_put_contents('../install.lock', 'lock'); + file_put_contents('./install.lock', 'lock'); Session::clear(); - return json(['code' => 0,'msg'=>'安装成功','url'=>(string) url('success/complete')]); - } else { - return '请求失败!'; + $res = json(['code' => 0,'msg'=>'安装成功','url'=>(string) url('success/complete')]); + } else { + $res = json(['code' => -1,'msg'=>'请求失败']); } - + return $res; } } \ No newline at end of file diff --git a/app/install/view/index/test.html b/app/install/view/index/test.html index 07d6c2f..76c6e39 100644 --- a/app/install/view/index/test.html +++ b/app/install/view/index/test.html @@ -26,8 +26,8 @@ - - =7) || ($php_version['0']>=5 && $php_version['1']>=3)): ?> √ + + =7) && $php_version['1']>1): ?> √ × @@ -41,22 +41,22 @@ 当前配置 是否符合 - - ./runtime + + app 可写 - 可写 + 可写 不可写 - - √ + + × - ./config + config 可写 可写 @@ -70,21 +70,49 @@ - ./app + data 可写 - 可写 + 可写 不可写 - - √ + + × - ./view + public + 可写 + + 可写 + 不可写 + + + + √ + × + + + + + runtime + 可写 + + 可写 + 不可写 + + + + √ + × + + + + + view 可写 可写 @@ -97,34 +125,6 @@ - - ./install - 可写 - - 可写 - 不可写 - - - - √ - × - - - - - ./app - 可写 - - 可写 - 不可写 - - - - √ - × - - -
上一步 diff --git a/app/middleware/Install.php b/app/middleware/Install.php index ac755c6..3281125 100644 --- a/app/middleware/Install.php +++ b/app/middleware/Install.php @@ -7,7 +7,7 @@ class Install { public function handle($request, \Closure $next) { - if(!file_exists('../install.lock')){ + if(!file_exists('./install.lock')){ return redirect('/install/index'); //header('Location:'.Request::domain().'/install.php'); } diff --git a/config/taoler.php b/config/taoler.php index e01681c..fe0ad5b 100644 --- a/config/taoler.php +++ b/config/taoler.php @@ -7,14 +7,14 @@ return [ //应用名,此项不可更改 'appname' => 'TaoLer', //版本配置 - 'version' => '1.7.22', + 'version' => '1.7.23', //加盐 'salt' => 'taoler', //数据库备份目录 'databasebackdir' => app()->getRootPath() .'data/', //配置 'config' =>[ - 'area_show' => 1, + 'area_show' => 0, 'email_notice' => 1, ] diff --git a/config/view.php b/config/view.php index f1bdd81..2caf977 100644 --- a/config/view.php +++ b/config/view.php @@ -4,7 +4,7 @@ // +---------------------------------------------------------------------- use think\facade\Db; //如果网站安装从数据库查询选择的模板 - if(file_exists('../install.lock')){ + if(file_exists('./install.lock')){ $template = Db::name('system')->where('id',1)->value('template'); } else { $template = ''; @@ -29,4 +29,9 @@ return [ 'taglib_begin' => '{', // 标签库标签结束标记 'taglib_end' => '}', + //模板输出替换 + 'tpl_replace_string' => [ + '__STATIC__'=>'/static/layui', + '__JS__' => '/static/res/', + ] ]; diff --git a/public/install.lock b/public/install.lock new file mode 100644 index 0000000..19104f1 --- /dev/null +++ b/public/install.lock @@ -0,0 +1 @@ +lock \ No newline at end of file diff --git a/public/static/admin/modules/webset.js b/public/static/admin/modules/webset.js index d1d4475..d26cffc 100644 --- a/public/static/admin/modules/webset.js +++ b/public/static/admin/modules/webset.js @@ -14,7 +14,7 @@ layui.define(['table', 'form'], function(exports){ {field: 'days',title: '天数'}, {field: 'score',title: '积分'}, {field: 'ctime',title: '时间'}, - {title: '操作', width: 150, align:'center', fixed: 'right', toolbar: '#sign-rule-button'} + {title: '操作', width: 150, align:'center', toolbar: '#sign-rule-button'} ]] ,page: true @@ -128,7 +128,7 @@ layui.define(['table', 'form'], function(exports){ {field: 'nick',title: '认证'}, {field: 'rules',title: '权限'}, {field: 'ctime',title: '时间'}, - {title: '操作', width: 150, align:'center', fixed: 'right', toolbar: '#vip-rule-button'} + {title: '操作', width: 150, align:'center', toolbar: '#vip-rule-button'} ]] ,page: true diff --git a/public/static/res/css/global.css b/public/static/res/css/global.css index 0060c0c..e83ba46 100644 --- a/public/static/res/css/global.css +++ b/public/static/res/css/global.css @@ -28,7 +28,7 @@ i{font-style: normal;} .site-menu{position: fixed; top: 0px; bottom: 0; min-height: 0; overflow-y: auto; overflow-x: hidden; z-index: 10001; left: -300px; background-color: #fff; transition: all .3s;} /* 头部伸缩菜单栏 */ - .site-tree-mobile-top{display: block!important; position: fixed; z-index: 16666668; top: 2px; left: 20px; width: 57px; height: 57px; line-height: 57px; border-radius: 2px; text-align: center; color: #e2e2e2;} + .site-tree-mobile-top{display: block!important; position: fixed; z-index: 16666668; top: 2px; left: 10px; width: 57px; height: 57px; line-height: 57px; border-radius: 2px; text-align: center; color: #e2e2e2;} .site-home .site-tree-mobile-top{display: none!important;} .site-mobile .site-tree-mobile-top{display: none !important;} .site-mobile .site-menu{left: 0;} diff --git a/view/taoler/index/public/menu.html b/view/taoler/index/public/menu.html index ab6c6a3..40e312f 100644 --- a/view/taoler/index/public/menu.html +++ b/view/taoler/index/public/menu.html @@ -2,30 +2,30 @@