本文整理汇总了PHP中Administration::get_role_allocated_to_pages方法的典型用法代码示例。如果您正苦于以下问题:PHP Administration::get_role_allocated_to_pages方法的具体用法?PHP Administration::get_role_allocated_to_pages怎么用?PHP Administration::get_role_allocated_to_pages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Administration
的用法示例。
在下文中一共展示了Administration::get_role_allocated_to_pages方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: header
// header('Location: ?page=logout'); //change yoursite.com to the name of you site!!
} else {
if ($_SESSION['last_activity'] < time() - $_SESSION['expire_time']) {
//have we expired?
//redirect to logout.php
header('Location: ?page=logout');
//change yoursite.com to the name of you site!!
} else {
//if we haven't expired:
$_SESSION['last_activity'] = time();
//this was the moment of last activity.
}
$level = 1;
$symbol_menu['role_id'] = 1;
$symbol_menu['page_name'] = $_GET['page'];
$menu_array = $new->get_role_allocated_to_pages($symbol_menu);
$page_value = $_GET['page'];
if ($level == 1) {
$page = isset($_GET['page']) ? $_GET['page'] : 'index';
} else {
if (is_array($menu_array)) {
if ($menu_array['status'] == 0) {
if ($page_value == "index") {
$page = isset($_GET['page']) ? $_GET['page'] : 'error_page';
} else {
?>
<script language="JavaScript" type="text/javascript">
setTimeout("location.href = '?page=error_page'",2000); // milliseconds, so 10 seconds = 10000ms
</script>
<?php
}