init: import production code mss.nahaichuan.com (exclude Runtime/Uploads/backups/logs)
这个提交包含在:
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
namespace Super\Controller;
|
||||
use Think\Controller;
|
||||
use Think\Auth;
|
||||
//[1.1.41]
|
||||
class BaseController extends EmptyController {
|
||||
Public function _initialize() {
|
||||
$jurisdiction_user = session('jurisdiction_user');
|
||||
if (empty($jurisdiction_user)) {
|
||||
if (IS_AJAX) {
|
||||
$re['status'] = 0;
|
||||
$re['state'] = 0;
|
||||
$re['code'] = 0;
|
||||
$re['count'] = 0;
|
||||
$re['data'] = array();
|
||||
$re['msg'] = '您无权操作';
|
||||
$this->ajaxReturn($re);
|
||||
} else {
|
||||
session(null);
|
||||
echo '<script>top.window.location="'.$_SERVER ["SCRIPT_NAME"] .'/Retail/Login/index"</script>';
|
||||
exit;
|
||||
}
|
||||
}
|
||||
$Auth = new Auth;
|
||||
$res = $Auth->check($jurisdiction_user['id']);
|
||||
if ($res) {
|
||||
//checkSite();//检测该域名是否可用
|
||||
$this->checkwebset();
|
||||
if (!session('admin_userinfo')) {
|
||||
session(null);
|
||||
echo '<script>top.window.location="'.$_SERVER ["SCRIPT_NAME"] .'/Retail/Login/index"</script>';
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
if (IS_AJAX) {
|
||||
$re['status'] = 0;
|
||||
$re['state'] = 0;
|
||||
$re['code'] = 0;
|
||||
$re['count'] = 0;
|
||||
$re['data'] = array();
|
||||
$re['msg'] = '您无权操作';
|
||||
$this->ajaxReturn($re);
|
||||
} else {
|
||||
$this->diemsg(0,'您无权操作');
|
||||
}
|
||||
}
|
||||
}
|
||||
//禁止不动的失败提示的信息
|
||||
public function diemsg($status, $msg)
|
||||
{
|
||||
//成功为1,失败为0
|
||||
$this->error($msg);
|
||||
die();
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户