多语言交友婚恋相亲平台开发,第九篇,也是后盾篇,从这篇开始,次要开始记录后盾的性能和的操作局部等。
如果有什么问题须要征询的,能够加我的扣 236-0248-666
这个是预览截图成果
网站设置
class SettingController extends AdminController {
/**
* 以后模块参数
*/
protected function _infoModule(){
return array(
'info' => array(
'name' => '网站设置',
'description' => '设置网站整体性能',
),
/* ‘menu’ => array(
array(
'name' => '站点信息',
'url' => U('Setting/site'),
'icon' => 'exclamation-circle',
),
array(
'name' => '手机设置',
'url' => U('Setting/mobile'),
'icon' => 'mobile',
),
array(
'name' => '模板设置',
'url' => U('Setting/tpl'),
'icon' => 'eye',
),
array(
'name' => '上传设置',
'url' => U('Setting/upload'),
'icon' => 'upload',
),
array(
'name' => '性能设置',
'url' => U('Setting/performance'),
'icon' => 'dashboard',
),
array(
'name' => '平安设置',
'url' => U('Setting/shield'),
'icon' => 'shield',
)
)*/
);
}
点击并拖拽以挪动
站点设置
public function site(){
if(!IS_POST){$breadCrumb = array('站点信息'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('站点配置胜利!');
}else{$this->error('站点配置失败');
}
}
}
public function mj(){if(!IS_POST){$breadCrumb = array('站点信息'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('站点配置胜利!');
}else{$this->error('站点配置失败');
}
}
}
public function yuny(){if(!IS_POST){$breadCrumb = array('站点信息'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('站点配置胜利!');
}else{$this->error('站点配置失败');
}
}
}
public function tequan(){if(!IS_POST){$breadCrumb = array('站点信息'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('站点配置胜利!');
}else{$this->error('站点配置失败');
}
}
}
public function gzh(){if(!IS_POST){$breadCrumb = array('站点信息'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('站点配置胜利!');
}else{$this->error('站点配置失败');
}
}
}
public function msetting(){if(!IS_POST){$breadCrumb = array('站点信息'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('站点配置胜利!');
}else{$this->error('站点配置失败');
}
}
}
点击并拖拽以挪动
手机设置
public function mobile(){
if(!IS_POST){$breadCrumb = array('模板设置'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('themesList',D('Config')->themesList());
$this->assign('tplList',D('Config')->tplList());
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('模板配置胜利!');
}else{$this->error('模板配置失败');
}
}
}
点击并拖拽以挪动
模板设置
public function tpl(){
if(!IS_POST){$breadCrumb = array('模板设置'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('themesList',D('Config')->themesList());
$this->assign('tplList',D('Config')->tplList());
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay();}else{if(D('Config')->saveData()){$this->success('模板配置胜利!');
}else{$this->error('模板配置失败');
}
}
}
点击并拖拽以挪动
性能设置
public function performance(){
$file = APP_PATH . 'Common/Conf/performance.php';
if(!IS_POST){$breadCrumb = array('性能设置'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',load_config($file));
$this->adminDisplay();}else{if(write_config($file, $_POST)){$this->success('性能配置胜利!');
}else{$this->error('性能配置失败');
}
}
}
/**
* 平安设置
*/
public function shield(){
$file = APP_PATH . 'Common/Conf/shield.php';
if(!IS_POST){$breadCrumb = array('平安设置'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',load_config($file));
$this->adminDisplay();}else{if(write_config($file, $_POST)){$this->success('平安配置胜利!');
}else{$this->error('平安配置失败');
}
}
}
点击并拖拽以挪动
领取设置
public function zhifu(){
if(!IS_POST){$breadCrumb = array('站点信息'=>U());
$this->assign('breadCrumb',$breadCrumb);
$this->assign('info',D('Config')->getInfo());
$this->adminDisplay('pay');
}else{if(D('Config')->saveData()){$this->success('站点配置胜利!');
}else{$this->error('站点配置失败');
}
}
}
点击并拖拽以挪动