加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
admin.php 1.93 KB
一键复制 编辑 原始数据 按行查看 历史
耀盟同城分类信息系统 提交于 2023-09-25 12:40 . 23-09-25
<?php
/**
* YmCms 优盟多元化内容管理系统 v1 [ YMPHP framework ]
*
* @copyright Copyright (c) 2021 - 2023, You Meng, Inc.
* @License This is NOT a freeware, use is subject to license terms
* @link https://www.youmengcms.com
* @Author Xiao Yao <790213952@qq.com>
*/
define('IN_ADMINCP', TRUE);
define('NOROBOT', TRUE);
define('ADMINSCRIPT', basename(__FILE__));
define('CURSCRIPT', 'admin');
define('HOOKTYPE', 'hookscript');
define('APPTYPEID', 0);
require './system/common.php';
require './system/function/function_admincp.php';
$admincp = new ymcore_admincp();
$admincp->core = & $ymSystem;
$admincp->init();
$admincp_actions_founder = array( 'founder', 'module', 'login', 'upgrade');
$admincp_actions_normal = array('index', 'members', 'setting','app', 'wechat', 'marketing', 'siteCity', 'treasurer', 'channel', 'tongcheng', 'miniProgram', 'api');
$action = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('action'));
$operation = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('operation'));
$do = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('do'));
$frames = preg_replace('/[^\[A-Za-z0-9_\]]/', '', getgpc('frames'));
lang('admincp');
$lang = & $_G['lang']['admincp'];
$page = max(1, intval(getgpc('page')));
$isfounder = $admincp->isfounder;
//var_dump(in_array($action, $admincp_actions_normal),$action, $admincp_actions_normal);die();
if(empty($action) || $frames != null) {
$admincp->show_admincp_main();
}
elseif($action == 'logout') {
$admincp->do_admin_logout();
dheader("Location: ./".ADMINSCRIPT);
}
elseif(in_array($action, $admincp_actions_normal) || ($admincp->isfounder && in_array($action, $admincp_actions_founder))) {
if($admincp->allow($action, $operation, $do) || $action == 'index') {
require $admincp->admincpfile($action);
} else {
cpheader();
cpmsg('抱歉,您无权使用此功能', '', 'error');
}
}
else {
cpmsg('抱歉,您无权使用此功能', '', 'error');
}
?>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化