include("../include/irm.inc");
AuthCheck("8");
commonHeader("ITC Servers - Search Results");
# If phrase is only a contains search, add the % characters for the mysql query.
if ($phrasetype == "contains")
{
$newcontains = "%$contains%";
} else
{
$newcontains = $contains;
}
if ($geo != "") { $andquery = "and (geo LIKE '$geo')"; }
$tempquery = "SELECT * FROM computers WHERE ($field LIKE '$newcontains') ORDER BY $sort";
if($contains!="") {
PRINT "";
}
$query = "SELECT * FROM computers WHERE ($field LIKE '$newcontains') $andquery
ORDER BY $sort";
if ($field == "freetext") { $query = "SELECT * from computers WHERE (name LIKE '$newcontains') or (type LIKE '$newcontains') or (description LIKE '$newcontains') or (comments LIKE '$newcontains') or (service LIKE '$newcontains') or (a_notes LIKE '$newcontains') or (a_comments LIKE '$newcontains') ORDER BY $sort"; }
echo "\n";
computerListView($query, $sort, $phrasetype);
if($cfg_groups == 1)
{
PRINT "