IsLogin(); // 权限校验 $this->IsPower(); // 小导航 $this->view_type = input('view_type', 'home'); } /** * 列表 * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2016-12-06T21:31:53+0800 */ public function Index() { // 导航参数 $this->assign('view_type', $this->view_type); if($this->view_type == 'home') { // 模板列表 $this->assign('data_list', ThemeService::ThemeList()); // 默认主题 $theme = MyC('common_default_theme', 'default', true); $this->assign('theme', empty($theme) ? 'default' : $theme); return $this->fetch('index'); } else { return $this->fetch('upload'); } } /** * 模板切换保存 * @author Devil * @blog http://gong.gg/ * @version 1.0.0 * @datetime 2018-12-19T00:58:47+0800 */ public function Save() { return ConfigService::ConfigSave(input()); } /** * [Delete 删除] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2016-12-09T21:13:47+0800 */ public function Delete() { // 是否ajax if(!IS_AJAX) { return $this->error('非法访问'); } // 开始处理 return ThemeService::ThemeDelete(input()); } /** * [Upload 模板上传安装] * @author Devil * @blog http://gong.gg/ * @version 0.0.1 * @datetime 2017-05-10T16:27:09+0800 */ public function Upload() { // 是否ajax if(!IS_AJAX) { return $this->error('非法访问'); } // 开始处理 return ThemeService::ThemeUpload(input()); } } ?>