PS:非开发人员请不要随意执行任何SQL语句,操作可能导致将整个系统数据库被删除。
+diff --git a/application/admin/controller/Sqlconsole.php b/application/admin/controller/Sqlconsole.php new file mode 100644 index 000000000..d46ede252 --- /dev/null +++ b/application/admin/controller/Sqlconsole.php @@ -0,0 +1,74 @@ +IsLogin(); + + // 权限校验 + $this->IsPower(); + } + + /** + * [Index 首页] + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2017-02-26T19:13:29+0800 + */ + public function Index() + { + return $this->fetch(); + } + + /** + * sql执行 + * @author Devil + * @blog http://gong.gg/ + * @version 0.0.1 + * @datetime 2016-12-15T11:03:30+0800 + */ + public function Implement() + { + // 是否ajax请求 + if(!IS_AJAX) + { + return $this->error('非法访问'); + } + + // 开始处理 + return SqlconsoleService::Implement(input()); + } +} +?> \ No newline at end of file diff --git a/application/admin/view/default/sqlconsole/index.html b/application/admin/view/default/sqlconsole/index.html new file mode 100644 index 000000000..a5ecf9613 --- /dev/null +++ b/application/admin/view/default/sqlconsole/index.html @@ -0,0 +1,61 @@ +{{include file="public/header" /}} + + +
PS:非开发人员请不要随意执行任何SQL语句,操作可能导致将整个系统数据库被删除。
+