$val ){ $this->$key = $val; } $this->Generate(); exit; } if(!(ob_get_level()-1)){ ob_start(); } foreach(get_object_vars($this) as $key => $value){ $this->replacements[$key] = &$this->$key; } $this->replacements['pageContent'] = &$this->content; unset($this->replacements['breadcrumbs']); } function UpdateCache(){ $cache = var_export(get_object_vars($this),true); $filename = '/tmp/cache/pages/'.base64_encode($_SERVER['REQUEST_URI']); file_put_contents($filename,''); } function BuildMetaTags(){ if($this->gameName){ $sql = DB::Query("SELECT * FROM games.sections WHERE alias = '$this->section'"); $r = DB::FetchArray($sql); } $sql2 = DB::Query("SELECT * FROM mp3sections WHERE game = '$this->section'"); if (pg_num_rows($sql2) > 0){ while($r2 = pg_fetch_array($sql2)){ $mwords .= " $r2[name],"; } $cwords .= " $this->gameName mp3s, $this->gameName music"; } $sql2 = DB::Query("SELECT * FROM videos.fmvs WHERE section = '$this->section'"); if (pg_num_rows($sql2) > 0){ $cwords .= " $this->gameName fmvs, $this->gameName cutscenes, $this->gameName movies,"; } $sql2 = DB::Query("SELECT * FROM wcount WHERE section = '$this->section' AND count > 0"); if (pg_num_rows($sql2) > 0){ $cwords .= " $this->gameName wallpapers,"; } $sql2 = DB::Query("SELECT * FROM imgcount WHERE section = '$this->section' AND count > 0"); if (pg_num_rows($sql2) > 0){ $cwords .= " $this->gameName images,"; } $sql2 = DB::Query("SELECT * FROM trailers WHERE game = '$this->section'"); if (pg_num_rows($sql2) > 0){ $cwords .= " $this->gameName trailers,"; } $this->metatags = "description BlueLaguna.net provides users with $r[name] media including$cwords and media from other games in the RPG genre\">\n \n"; } public function Generate(){ //Fetch list of games $sql = DB::Query("SELECT alias, name FROM games.series WHERE type = 'n' UNION ALL SELECT alias, name FROM games.sections WHERE category='other' OR category='se'ORDER BY name"); while ($r=pg_fetch_array($sql)){ $this->replacements['gameList'] .= "
$this->information
"; } $temp = file_get_contents("/home/vhosts/bluelaguna.net/templates/$this->style/index.html"); foreach($this->replacements as $key=>$replacement){ $temp = str_replace('$'."$key",$replacement,$temp); } echo $temp; } function __get($var){ if($var == 'linkbox'){ $title = $_GLOBALS['title']; $pageurl = "http://bluelaguna.net/$_SERVER[REQUEST_URI]"; $link = ""; return $link; } else{ return $this->$var; } } private function __set($var, $val){ switch ($var) { case 'section': $this->$var = $val; //$this->SectionLinks(); break; case 'title': $this->$var = $val; if(!$this->h1){ $this->h1 = '