本文整理汇总了PHP中admin::cache_menu方法的典型用法代码示例。如果您正苦于以下问题:PHP admin::cache_menu方法的具体用法?PHP admin::cache_menu怎么用?PHP admin::cache_menu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类admin
的用法示例。
在下文中一共展示了admin::cache_menu方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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);
$userid = $r['userid'];
示例2: basename
$filename = basename($filestr);
}
$menuid = 1;
include tpl('webpage_edit', $module);
}
break;
case 'group':
if ($submit) {
$name or msg('请填写新组名称');
preg_match("/^[a-z0-9]{1,}\$/", $item) or msg('新组标识应为数字和字母的组合');
$name = addslashes($name);
$url = '?moduleid=3&file=webpage&item=' . $item;
$db->query("INSERT INTO {$DT_PRE}admin (userid,title,url,style) VALUES('{$_userid}','{$name}','{$url}','#FF0000')");
require_once DT_ROOT . '/admin/admin.class.php';
$do = new admin();
$do->cache_menu($_userid);
msg('添加成功<script type="text/javascript">window.parent.frames[0].location.reload();</script>', $url);
} else {
$name = '新组名称';
$item = 'new';
include tpl('webpage_group', $module);
}
break;
case 'order':
$do->order($listorder);
dmsg('排序成功', $forward);
break;
case 'html':
$all = isset($all) && $all ? 1 : 0;
$one = isset($one) && $one ? 1 : 0;
if (!isset($num)) {
示例3: dalert
}
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')));
}
$username = isset($username) ? $username : $_username;