本文整理匯總了PHP中admin::cache_right方法的典型用法代碼示例。如果您正苦於以下問題:PHP admin::cache_right方法的具體用法?PHP admin::cache_right怎麽用?PHP admin::cache_right使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類admin
的用法示例。
在下文中一共展示了admin::cache_right方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: array
}
if (isset($roles['template'])) {
$right = array();
$right['title'] = '模板管理';
$right['url'] = '?file=template';
$do->add($userid, $right, $admin);
$right = array();
$right['title'] = '風格管理';
$right['url'] = '?file=skin';
$do->add($userid, $right, $admin);
$right = array();
$right['title'] = '標簽向導';
$right['url'] = '?file=tag';
$do->add($userid, $right, $admin);
}
$do->cache_right($userid);
$do->cache_menu($userid);
}
msg('管理員添加成功,下一步請分配權限和管理麵板', '?file=' . $file . '&id=' . $userid . '&tm=' . ($DT_TIME + 5));
}
msg($do->errmsg);
} else {
isset($username) or $username = '';
include tpl('admin_add');
}
break;
case 'edit':
if ($submit) {
$admin = $admin == 1 ? 1 : 2;
if ($do->set_admin($username, $admin, $role, $aid)) {
$r = $do->get_one($username);
示例2: msg
msg('您無權限訪問後台', $MODULE[2]['linkurl'] . 'logout.php?forward=' . urlencode(DT_PATH));
}
if ($user['userid'] != $CFG['founderid']) {
if ($DT['admin_week'] && !check_period(',' . $DT['admin_week']) || $DT['admin_hour'] && !check_period($DT['admin_hour'])) {
set_cookie('auth', '');
dalert('未被允許的管理時間', $MODULE[2]['linkurl'] . 'logout.php?forward=' . urlencode(DT_PATH));
}
}
if ($CFG['authadmin'] == 'cookie') {
set_cookie($secretkey, $user['userid']);
} else {
$_SESSION[$secretkey] = $user['userid'];
}
require DT_ROOT . '/admin/admin.class.php';
$admin = new admin();
$admin->cache_right($user['userid']);
$admin->cache_menu($user['userid']);
if ($DT['login_log']) {
$do->login_log($username, $password, $user['passsalt'], 1);
}
dheader($forward);
} else {
if ($DT['login_log']) {
$do->login_log($username, $password, $user['passsalt'], 1, $do->errmsg);
}
msg($do->errmsg);
}
} else {
if (strpos($DT_URL, DT_PATH) === false) {
dheader(DT_PATH . basename(get_env('self')));
}