Bläddra i källkod

数据库备份

xurongyao 7 år sedan
förälder
incheckning
1236ff891f

+ 4 - 1
application/admin/controller/system/SystemDatabackup.php

@@ -59,6 +59,9 @@ class SystemDatabackup extends AuthController
      */
     public function repair(Request $request = null)
     {
-        return Json::successful($status==0 ? '禁用成功':'解禁成功');
+        $tables = $request->post('tables/a');
+        $db= new Backup();
+        $res = $db->repair($tables);
+        return Json::successful($res ? '修复成功':'修复失败');
     }
 }

+ 4 - 4
application/admin/view/system/system_databackup/index.php

@@ -55,10 +55,10 @@
             if(tables.length){
                 layList.basePost(layList.Url({a:'optimize'}),{tables:tables},function (res) {
                     layList.msg(res.msg);
-                    layList.reload();
+//                    layList.reload();
                 });
             }else{
-                layList.msg('请选择要封禁的会员');
+                layList.msg('请选择');
             }
         },
         repair:function () {
@@ -66,10 +66,10 @@
             if(tables.length){
                 layList.basePost(layList.Url({a:'repair'}),{tables:tables},function (res) {
                     layList.msg(res.msg);
-                    layList.reload();
+//                    layList.reload();
                 });
             }else{
-                layList.msg('请选择要封禁的会员');
+                layList.msg('请选择');
             }
         },