Invalid query: " . mysql_error()); $tcont=""; $result = mysql_query($tquery) or die("Invalid query: " . mysql_error()); if (mysql_num_rows($result)==0) { $tcont=$tcont."

No articles found!

"; } else { while ($row=mysql_fetch_object($result)) { switch ($trestype){ case "fulllist": $ttitle="OMM Search: $searchfor"; $tcont=$tcont.""; $rawdesc=$row->rawdesc; $pos=strpos(strtolower($rawdesc),strtolower($searchfor)); if ($pos === false) { $rawdesc=substr($rawdesc,0,300); } else { $rawdesc=substr($rawdesc,max($pos-150,0),300); $rawdesc=eregi_replace($searchfor,"".strtoupper($searchfor)."",$rawdesc); } $tcont=$tcont.""; } } } $tcont=$tcont."
[$row->activated] path$row->id.html>$row->title"; if ($row->page>1) { $tcont=$tcont." (pg $row->page of $row->total_pages)"; } $tcont=$tcont."
$rawdesc


"; $filecontents = ereg_replace("##CONTENT##", "$tcont",$filecontents); $filecontents = ereg_replace("##TITLE##", $ttitle,$filecontents); $filecontents = ereg_replace("##editmenu##", "",$filecontents); print $filecontents; } else { $filecontents = ereg_replace("##CONTENT##", "",$filecontents); $filecontents = ereg_replace("##TITLE##", "OMM Archives",$filecontents); $filecontents = ereg_replace("##editmenu##", "",$filecontents); print $filecontents; } ?>