AUTH_ALL) { if ( ($auth_level_req == AUTH_REG) && (!$userdata['session_logged_in']) ) { message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']); } if ($userdata['user_level'] != ADMIN) { if ( $auth_level_req == AUTH_ADMIN ) { message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']); } if ( ($auth_level_req == AUTH_MOD) && ($userdata['user_level'] != MOD) ) { message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']); } } } //$importal_wide = ($board_config['wide_blocks_portal'] == 1) ? true : false; define('PORTAL_INIT', true); include($phpbb_root_path . 'includes/functions_portal.' . $phpEx); portal_config_init($portal_config); if(isset($_GET['page'])) { $layout = intval($_GET['page']); } else { $layout = $portal_config['default_portal']; } $sql = "SELECT template, forum_wide, view, groups FROM " . CMS_LAYOUT_TABLE . " WHERE lid = '" . $layout . "'"; if( !($layout_result = $db->sql_query($sql,false,true)) ) { message_die(CRITICAL_ERROR, "Could not query portal layout information", "", __LINE__, __FILE__, $sql); } $layout_row = $db->sql_fetchrow($layout_result); $layout_template = $layout_row['template']; $importal_wide = ($layout_row['forum_wide'] == 0) ? false : true; if ($userdata['user_id'] == ANONYMOUS) { $lview = in_array($layout_row['view'], array(0,1)); } else { switch($userdata['user_level']) { case USER: $lview = in_array($layout_row['view'], array(0,2)); break; case MOD: $lview = in_array($layout_row['view'], array(0,2,3)); break; case ADMIN: $lview = in_array($layout_row['view'], array(0,1,2,3,4)); break; default: $lview = in_array($layout_row['view'], array(0)); } } $not_group_allowed = false; if(!empty($layout_row['groups'])) { $not_group_allowed = true; $group_content = explode(",",$layout_row['groups']); for ($i = 0; $i < count($group_content); $i++) { if(in_array(intval($group_content[$i]), portal_groups($userdata['user_id']))) { $not_group_allowed = false; } } } if( ($layout_template == '') || (!$lview) || ($not_group_allowed) ) { $layout = $portal_config['default_portal']; $sql = "SELECT template, forum_wide FROM " . CMS_LAYOUT_TABLE . " WHERE lid = '" . $layout . "'"; if( !($layout_result = $db->sql_query($sql, false, 'cms_')) ) { message_die(CRITICAL_ERROR, "Could not query portal layout information", "", __LINE__, __FILE__, $sql); } $layout_row = $db->sql_fetchrow($layout_result); $layout_template = $layout_row['template']; $importal_wide = ($layout_row['forum_wide'] == 0) ? false : true; } // Start output of page $page_title = $board_config['sitename']; //define('SHOW_ONLINE', true); include($phpbb_root_path . 'includes/page_header.' . $phpEx); // Tell the template class which template to use. $template->set_filenames(array('body' => 'layout/' . $layout_template)); if ( ($userdata['user_level'] == ADMIN) || ($userdata['user_cms_level'] >= CMS_CONTENT_MANAGER)) { $cms_acp_url = '

'; $cms_acp_url .= '' . $lang['CMS_ACP'] . ''; $cms_acp_url .= '
'; } else { $cms_acp_url = ''; } //include($phpbb_root_path . 'includes/mini_cal/mini_cal.' . $phpEx); // Start Blocks portal_parse_blocks($layout); $template->pparse('body'); include($phpbb_root_path . 'includes/page_tail.' . $phpEx); ?>