master
elf 11 months ago
parent 33c51f857a
commit b9e77e368f

@ -1107,3 +1107,7 @@ function getMarketLevel()
return A("Market","Event")->getConfig('LevelConfig');
}
function isOutPaySite() {
return $_SERVER['HTTP_HOST'] == 'tg.jianghuifa.cn';
}

@ -44,8 +44,14 @@ class AdminController extends Controller {
}
}
$rule = strtolower(MODULE_NAME.'/'.CONTROLLER_NAME.'/'.ACTION_NAME);
if ($rule == 'admin/spend/listsmime') {
var_dump($_SERVER['HTTP_HOST']);
$outPayRules = [
'admin/spend/listsmime'
];
if (in_array($rule, $outPayRules) && !isOutPaySite()) {
die('地址错误');
}
if (isOutPaySite() && !in_array($rule, $outPayRules)) {
redirect(U("admin/spend/listsmime"));
}
// 检测系统权限
if(!IS_ROOT){

Loading…
Cancel
Save