public function pageLoad($PAGE) {
$this->page = $PAGE;
if (file_exists(INCDIR .'/pages/si_'.strtolower($PAGE).'.php')) {
//I guess just include the file, er no this should return the html :$
require_once(INCDIR .'/pages/si_'.strtolower($PAGE).'.php');
$bob = new strtolower($PAGE).'class';
$return = $bob->getPagecontents();
return $return;
} else {
//check if the page exists
$query = 'SELECT * FROM `pages` WHERE `page` = \''.addslashes($PAGE).'\'';
$results = $this->mysql_query($query);
if (mysql_num_rows($results) == '0') {
//nothing returned, return false
//Temp set the page to $this->page
require_once(INCDIR .'/pages/si_404.php');
$bob = new fourohfourclass;
return $bob->getPagecontents();
} else {
$result = mysql_fetch_assoc($results);
return $result;
}
}
}