"; foreach ($pref['frontpage'] as $fk=>$fp) { if (in_array($fk,$class_list)) { $location = ((strpos($fp, 'http') === FALSE) ? e_BASE : '').$fp.$query; echo "Redirecting to: ".$location."
"; break; } } } if (!$location) { // Try and use the 'old' method (this bit can go later) echo "Using OLD METHOD
"; if (ADMIN) { $location = ((strpos($pref['frontpage'][e_UC_ADMIN], 'http') === FALSE) ? e_BASE : '').$pref['frontpage'][e_UC_ADMIN].$query; } elseif (USER) { // This is the key bit - what to do for a 'normal' logged in user // We have USERCLASS_LIST - comma separated. Also e_CLASS_REGEXP foreach ($class_list as $fp_class) { $inclass = false; if (!$inclass && check_class($fp_class['userclass_id'])) { $location = ((strpos($pref['frontpage'][$fp_class['userclass_id']], 'http') === FALSE) ? e_BASE : '').$pref['frontpage'][$fp_class['userclass_id']].$query; $inclass = true; } } $location = $location ? $location : ((strpos($pref['frontpage'][e_UC_MEMBER], 'http') === FALSE) ? e_BASE : '').$pref['frontpage'][e_UC_MEMBER].$query; } else { $location = ((strpos($pref['frontpage'][e_UC_GUEST], 'http') === FALSE) ? e_BASE : '').$pref['frontpage'][e_UC_GUEST].$query; } } if (!trim($location)) $location = 'news.php'; // handle redirect and include front page methods ($pref['frontpage_method'] looks as if not used) if(isset($pref['frontpage_method']) && $pref['frontpage_method'] == "include") { if($location == "news.php") { require_once("news.php"); } elseif ($location == PLUGINS_DIRECTORY."forum/forum.php") { require_once($PLUGINS_DIRECTORY."forum/forum.php"); } elseif (preg_match('/^page\.php\?([0-9]*)$/', $location)) { $e_QUERY = preg_match('/^page\.php\?([0-9]*)$/', $location); require_once("page.php"); } else { header("Location: {$location}"); exit(); } } else { list($page,$str) = explode("?",$location."?"); // required to prevent infinite looping when queries are used on index.php. if($page == "index.php") // Welcome Message is the front-page. { require_once(HEADERF); require_once(FOOTERF); exit; } else { // redirect to different frontpage. header("Location: {$location}"); } exit(); } ?>