get_value('public_user'); $page_manager =& load_class(SYSTEM_PATH."/modules/page_content", "Page_Manager"); $seo_page_name = $input->request->get_value('query'); if ($seo_page_name) { $a = strrev($seo_page_name); if (substr($a, 0, 1) == "/") { $a = substr($a, 1); $seo_page_name = strrev($a); } // find page by name $seo_page = $page_manager->page_dao->get_page_by_seo_page_name($seo_page_name); $input->request->set_value('page_id', $seo_page['page_id']); } if (!$input->request->get_value('page_id')) { $input->request->set_value('page_id', $config->get_item('home_page_id')); } $page = $page_manager->get_page_by_id($input->request->get_value('page_id')); $parent_page = $page_manager->get_parent_page($page); $nav_pages = $page_manager->page_dao->get_public_navigation_pages_level_1(); if ($page['login_required'] || $parent_page['login_required']) { if (!$public_user) { header("Location: ".$config->get_item('url')."/"); exit(); } if (!$public_user['page_id']) { header("Location: ".$config->get_item('url')."/"); exit(); } $private_pages = array($page['page_id'], $parent_page['page_id']); if (!in_array($public_user['page_id'], $private_pages)) { header("Location: ".$config->get_item('url')."/"); exit(); } } if ($input->request->get_value('action') == 'logout') { $_SERVER['PHP_AUTH_USER'] = null; $_SERVER['PHP_AUTH_PW'] = null; header("Location: ".$config->get_item('url')."/"); exit(); } include(SYSTEM_PATH."/controllers/public.page.controller.php"); $data = array("section"=>$section,"title"=>stripslashes($page['page_title'])); include(SYSTEM_PATH."/templates/global/public.header.php"); ?> display_public_page($page); ?>