<?phpsession_start();include ('includes/functions.php');include ('includes/core.php');include('includes/rating_functions.php');$pages = array( 'play', 'mostplayed', 'newest', 'browse', 'login', 'signup', 'myaccount', 'logout', 'search', 'addtofavorites', 'memberlist', 'links', 'showprofile', 'fineprint', 'userlist', 'contact', 'taf', 'testnews', 'showcomments');$action = $_GET['action'] ? $_GET['action'] : 'base_home';if(!$action) { define('PAGENAME', 'Home'); }if($action == 'play') { define('PAGENAME', 'Playing '.htmlentities($_GET['name'])); }if($action == 'mostplayed') { define('PAGENAME', 'Most Played Games'); }if($action == 'newest') { define('PAGENAME', 'Newest Games'); }if($action == 'browse') { define('PAGENAME', 'Browsing '.htmlentities($_GET['name']).' Games'); }if($action == 'login') { define('PAGENAME', 'Login'); }if($action == 'signup') { define('PAGENAME', 'Signup'); }if($action == 'myaccount') { define('PAGENAME', 'My Account'); }if($action == 'logout') { define('PAGENAME', 'Logout'); }if($action == 'search') { define('PAGENAME', 'Search'); }if($action == 'addtofavorites') { define('PAGENAME', 'Add to favorites'); }if($action == 'memberlist') { define('PAGENAME', 'Member List'); }if($action == 'links') { define('PAGENAME', 'Links'); }if($action == 'showprofile') { define('PAGENAME', 'Viewing Profile'); }if($action == 'fineprint') { define('PAGENAME', 'Fine Print'); }if($action == 'userlist') { define('PAGENAME', 'userlist'); }if($action == 'contact') { define('PAGENAME', 'Contact Us'); }if($action == 'taf') { define('PAGENAME', 'TAF'); }if($action == 'testnews') { define('PAGENAME', 'testnews'); }if($action == 'showcomments') { define('PAGENAME', 'Show Comments'); }include ('templates/'.$template.'/header.php');if(ereg('[^0-9a-zA-Z_]', $action)){ exit('Invalid format!'); }if($action == 'admin'){ include ('pages/admin/index.php');}else{ if(in_array($action, $pages)){ include ('pages/'.$action.'.php'); }else{ include ('pages/base_home.php'); } }include ('templates/'.$template.'/footer.php');?>
<?phpinclude ("js/rating_update.php");?>
<?phpif(!defined('PAGENAME')){ $title = 'Home';}else{ $title = PAGENAME;}echo '<title>'.$sitename.' - '.$title.'</title>';include ('js/rating_update.php');?>
<?phpunset($_SESSION['userid']);echo '<h2>Logged Out!</h2><p>You have now logged out, <a href="'.$domain.'">Click here</a> to return to the index.</p>';?>