//Added for Functional Titles function title(){ global $checkFile; $data = new DB; $data1 = new DB; if (is_numeric($checkFile)) { $f = "".$this->getPageArea("title",$checkFile,"id").""; return $f; } elseif($this->id == MAINCAT && $this->q == ''){ $f = "".$this->getPageInfo('title',"id='1'").""; } else { if($this->title == ''){ if ($this->catid != MAINCAT) {$data->q("SELECT * FROM categories WHERE id = '".$this->id."' ") or die(mysql_error()); while($info = $data->nx()) {if (SITENAME == "") $f .= ""; else $f .= SITENAME." - "; $f .= "".$info['cat_name'] . ""; $data1->q("SELECT * FROM categories WHERE id = '".$info['parent_id']."' ") or die(mysql_error()); while($parinfo = $data1->nx()) { $f .= " - ".$parinfo['cat_name'] . " ";}}} else {$data->q("SELECT * FROM categories WHERE id = '".$maincatid."' ") or die(mysql_error()); while($info = $data->nx()) {if (SITENAME == "") $f .= ""; else $f .= SITENAME." - "; $f .= "$this->q ".$info['cat_name'] . " ";}} if ($this->catid == '0') $f .= SITENAME." - ".$this->q;} else{ $f .= $this->title; }} return $f; }