Location: PHPKode > projects > FunGamez > includes/page.php
<?php

class PAGE
{
   function name()
   {
      If ( isset($_GET['name']) ) return $_GET['name'];
	  If ( !isset($_GET['name']) ) return 'home';
   }
   function checkvalidity($checkname)
   {
      If ( file_exists('./pages/'.$checkname.'.php') ) return true;
	  If ( !file_exists('./pages/'.$checkname.'.php') ) return false;
   }
   function requireslogin($checkname)
   {
      If ( eregi('//REQLOGIN//', file_get_contents('./pages/'.$checkname.'.php')) ) return true;
	  If ( !eregi('//REQLOGIN//', file_get_contents('./pages/'.$checkname.'.php')) ) return false;
   }
   function load($pagename)
   {
      global $page,$user,$db,$text;
      include('./pages/'.$pagename.'.php');
	  If ( !isset($_GET['ajaxload']) ) echo str_replace('[BODY]', $text, file_get_contents('./includes/style/design.html'));
	  If ( isset($_GET['ajaxload']) ) echo $text;
   }
}

$page = new PAGE();

?>
Return current item: FunGamez