exit();
require("../poe/main.php"); //Database name & passwords
require("../poe/commonfunc.php"); //Commonly used functions
$link =mysql_connect("localhost","$dbuser_name","$dbuser_password")
or die("msql con failed");
mysql_select_db ("oldmanmurray_com",$link)
or die("db con failed 1");
switch ($what) {
case "search":
$searchfor=stripquote($searchfor);
$searchfor=eregi_replace("_"," ",$searchfor);
$tquery="select articles.*,art_type.type_desc,art_type.path from articles,art_type where articles.art_type!=8 and articles.art_type=art_type.art_type and (title like '%$searchfor%' or short_desc like '%$searchfor%' or rawdesc like '%$searchfor%') order by activated desc";
$trestype="fulllist";
break;
}
$filename = $omm_template;
$fp = @fopen($filename, "r");
$filecontents = fread ($fp, 9999);
fclose ($fp);
if (strcmp($tquery,"")!=0 and strcmp($searchfor,"")!=0) {
$curdt=date('YmdHis');
$sfixed=strtolower($searchfor);
$tsq="insert searches (searchedfor, searchedon) values ('".$sfixed."',$curdt)";
$tres = mysql_query($tsq) or die("$tsq
Invalid query: " . mysql_error());
$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 |