0) { $where = $where + "and Category clike '%$category%' "; $querynumber = $querynumber + 1; } if($category != "" && $querynumber == 0) { $where = "Category clike '%$category%' "; $querynumber = $querynumber + 1; } if($country != "" && $querynumber == 0) { $where = "Country clike '$country' "; $querynumber = $querynumber + 1; } if($country != "" && $querynumber > 0) { $where = $where + "and Country clike '$country' "; $querynumber = $querynumber + 1; } if($searchtag != "" && $searchtagvalue != "" && $querynumber > 0) { $where = $where + "and $searchtag clike '%$searchtagvalue%' "; $querynumber = $querynumber + 1; } if($searchtag != "" && $searchtagvalue != "" && $querynumber == 0) { $where = "$searchtag clike '%$searchtagvalue%' "; $querynumber = $querynumber + 1; } if ($keywordsvalue != "" && $querynumber > 0) { $where = $where + "and (Keywords clike '%$kwvarray[0]%' "; $querynumber = $querynumber + 1; } if ($keywordsvalue != "" && $querynumber == 0) { $where = "( Keywords clike '%$kwvarray[0]%' "; $querynumber = $querynumber + 1; } $kwvpos = 1; while($kwvpos < $kwvnumber) { $where = $where + "or Keywords clike '%$kwvarray[$kwvpos]%' "; $kwvpos = $kwvpos + 1; } if($keywordsvalue != "") { $where = $where + ")"; } if (msqlQuery($sock,"$query $where $order") < 0) { echo("Error : $ERRMSG\n"); exit(1); } $res = msqlStoreResult(); $row = msqlFetchRow($res); $count = msqlNumRows($res); echo(""); if($count > 0) { echo(""); } else { echo(""); } echo("
                       
"); if($service == "") { $servicename = ""; } if($service == "W") { $servicename = "white pages"; } if($service == "Y") { $servicename = "yellow pages"; } if($service == "H") { $servicename = "home pages"; } $categoryarray = split($category,"/"); if($categoryarray[0] == "PUB" ) { $categoryarray[0] = "publications"; } if($categoryarray[0] == "MAG" ) { $categoryarray[0] = "magazines"; } if($categoryarray[0] == "ORG" ) { $categoryarray[0] = "organizations"; } if($categoryarray[0] == "WEB" ) { $categoryarray[0] = "web sources"; } $numcategory = # $categoryarray; if($service == "") { echo("$file / search results
"); } if($service != "") { echo("$file / "); echo("$categoryarray[0]"); $arraypos = 1; while($arraypos < $numcategory) { echo(" / $categoryarray[$arraypos]"); $arraypos = $arraypos + 1; } echo(" / $servicename"); } echo("
"); if($service == "") { echo("search criteria
"); if ($category != "") { echo("category - $category
"); } if ($searchtag != "") { echo("$searchtag - $searchtagvalue
"); } if ($keywordsvalue != "") { echo("keywords - $keywordsvalue"); } } if ($endno > $count) { $endno = $count; } echo("
$startno - $endno of $count results found $count results found

"); while (# $row > 0 ) { if ($intvalue < $startno || $intvalue > $endno) { $intvalue = $intvalue + 1; $row = msqlFetchRow($res); } else { $fullcategory = $category; if($row[16] == "H") { $bullit = "bluhmpgblt.gif"; } if($row[16] == "Y") { $bullit = "ylwhmpgblt.gif"; } if($row[16] == "W") { $bullit = "whthmpgblt.gif"; } $categoryname = $row[0]; if($row[0] == "PUB" ) { $categoryname = "publications"; } if($row[0] == "MAG" ) { $categoryname = "magazines"; } if($row[0] == "ORG" ) { $categoryname = "organizations"; } if($row[0] == "WEB" ) { $categoryname = "web sources"; } printf(""); if($row[22] != "") { printf("",$row[13],$row[22]); } else { echo(" "); } printf(" ", $bullit); if($row[0] == "") { printf("", $row[1]); } if($row[0] != "") { printf("",$categoryname); } if($row[0] != "") {printf("", $row[1]); } if($row[25] !="" && $file == "calendar") { printf("",$row[25]); } if($row[26] !="" && $file == "calendar") {printf("",$row[26]); } if($row[2] !="" && $file == "sources") {printf("",$row[2]); } if($row[2] !="" && $file == "vendors") {printf("",$row[2]); } if($row[2] !="" && $file == "calendar") {printf("",$row[2]); } if($row[24] !="" && $file == "sources") {printf("",$row[24]); } if($row[3] !="") {printf("", $row[3]); } if($row[4] != "" || $row[5] != "" || $row[6] != "") { printf("", $row[4], $row[5], $row[6]); } if($row[7] != "") { printf("",$row[7]); } if($row[9] != "") {printf("", $row[8],$row[9] ); } if($row[11] != "") {printf("", $row[10],$row[11] ); } if($row[12] != "" && ($row[16] == "Y" || $row[16] == "H")) {printf("",$row[12],$row[12]); } if($row[14] != "" && ($row[16] == "Y" || $row[16] == "H")) {printf("", $row[14]); } if($row[13] != "" && $row[16] == "H") { printf("", $row[13],$row[13]); } printf("
           
 
name %s
category %s
  name %s
event date %s
location %s
publisher/affiliation %s
contact %s
sponsor %s
author %s
address %s
  city/state/zip %s, %s %s
  country %s
  phone %s %s
  fax %s %s
  email %s
  description %s
  website %s

"); $row = msqlFetchRow($res); $intvalue = $intvalue + 1; } } > "); while( $xstart <= $count) { echo(""); if($xstart + 10 < $count) { $xend = $xstart + 9; } else { $xend = $count; } $xurl="/pages/gotmarbleresults.msql?start=$xstart&end=$xend&file=$file"; if ($category != "") { $xcategory=urlEncode($category); $xurl = $xurl + "&category=$xcategory"; } if ($country != "") { $xcountry=urlEncode($country); $xurl = $xurl + "&country=$xcountry"; } if( $name != "" ) { $xname=urlEncode($name); $xurl = $xurl + "&name=$xname"; } if( $service != "" ) { $xservice=urlEncode($service); $xurl = $xurl + "&service=$xservice"; } if( $keywordsvalue != "" ) { $xkeywordsvalue = urlEncode($keywordsvalue); $xurl = $xurl + "&$keywordsvalue=$xkeywordsvalue"; } if( $searchtag != "" ) { $xsearchtag=urlEncode($searchtag); $xurl = $xurl + "&searchtag=$xsearchtag"; } if( $searchtagvalue != "" ) { $xsearchtagvalue = urlEncode($searchtagvalue); $xurl = $xurl + "&searchtagvalue=$xsearchtagvalue"; } echo(""); if( $startno != $xstart ) { echo("$pageno"); } else { echo(" $pageno "); } $pageno = $pageno + 1; $xstart = $xstart + 10; echo(""); if( $pageno == 21 || $pageno == 41 || $pageno == 61 || $pageno == 81 || $pageno == 101 || $pageno == 121 || $pageno == 141 || $pageno == 161 || $pageno == 181 || $pageno == 201 ) { echo(""); } } echo("

"); if($file == "calendar") { $newsearch = "calendarsrch.html"; } else { $newsearch = "$file"+"rch.msql"; } echo("

"); >