'0') { $asbrc = mysql_fetch_array($rsbrc); $class_name = $asbrc[classification]; $class_name .= " "; } else { $class_name .= "Unknown "; } if(!empty($_GET[alpha_search])) { $cStart = $_GET[alpha_search]; $display_cStart = "($_GET[alpha_search])"; $cPageStart = $_GET[alpha_search]; $query[] = "yellow_classifications.classification like '$cStart%' "; } else { $cStart = ""; $query[] = "yellow_classifications.classification like '$cStart%' "; } $nbrargs++; } if(!empty($_GET[search_region])) { $Region = $_GET[search_region]; $qsbr = "select region_name from yellow_region2 where region_id = '$Region' "; $rsbr = mysql_query($qsbr) or die(mysql_error()); if(mysql_num_rows($rsbr) > '0') { $asbr = mysql_fetch_array($rsbr); $region_name = $asbr[region_name]; $region_name .= " "; } } if(!empty($query)) { $MyQuery = implode(" and ", $query); $MyQuery = " and ".$MyQuery; } //////////////////////////////////////////////////////////// ////////// order by //////////////////////////////////////////////////////////// $order = array(); if(!empty($_GET[orderby])) { $MyOrder = explode("|", $_GET[orderby]); // ,$ov ?????? while(list(,$ov) = each($MyOrder)) { if($ov == "DateAdded") { $order[] = " yellow_classifications.classification desc "; } if($ov == "address") { $order[] = " yellow_classifications.classification asc "; } } } else { if(!empty($_GET[p])) { $order[] = " yellow_classifications.classification desc "; } } if(count($order) > '0') { $MyOrder = implode(", ", $order); } if(empty($MyOrder)) { $MyOrder = " order by yellow_classifications.classification asc"; } else { $MyOrder = " order by yellow_classifications.PriorityLevel desc, $MyOrder"; } if(!empty($_GET[Start])) { $Start = $_GET[Start]; } else { $Start = '0'; } $ByPage = '20'; $ByPage100 = '100'; $aset[SiteTitle] = "US & Alaska Yellow Pages, 411 Search"; $aset[SiteDescription] = "The US & Alaska Yellow Pages, Business 411, Find Anything Anywhere."; //$aset[SiteKeywords] = ""; //$q1 = "select * from yellow_classifications, where $MyQuery $MyOrder limit $Start, $ByPage "; //$qnav = "select * from yellow_classifications where $MyQuery"; if(!empty($_GET[alpha_search])) { $cStart = $_GET[alpha_search]; $cPageStart = $_GET[alpha_search]; } if(!empty($_GET[cPageStart])) { $cStart = $_GET[cPageStart]; } $q1 = "select * from yellow_classifications where yellow_classifications.classification like '$cStart%' $MyOrder limit $Start, $ByPage "; $qnav = "select * from yellow_classifications where yellow_classifications.classification like '$cStart%' $MyOrder limit $Start, $ByPage100 "; $r1 = mysql_query($q1) or die(mysql_error()); $lrows = mysql_num_rows($r1); $first_time = 'true'; //if (empty($query)) //{ // $ListingTable = "





Sorry, must specify search criteria...


"; //} //else if($lrows > '0') if($lrows > '0') { //$ListingTable .= "\n"; //$ListingTable .= "\n\t"; while($a1 = mysql_fetch_array($r1)) { if ($first_time == 'true') { if ($class_name == '') { } else { // CLASSIFICATION //$first_time = 'false'; //$class_name = substr($class_name,0,44); $aset[SiteTitle] .= " - Business Classifications for: $region_name $class_name"; $aset[SiteDescription] .= " Business Classifications for: $region_name $class_name"; $ListingTable .= "

[$a1[CategoryName]] Click on a listing for more information...

\n"; $ListingTable .= "\n\t"; } //$ListingTable .= "\n\t"; } $ListingTable .= "\n\t"; $ListingTable .= "\n\n\n"; $first_time = 'false'; } $ListingTable .= "\n\t"; //$ListingTable .= "\n\t"; $rnav = mysql_query($qnav) or die(mysql_error()); $rows = mysql_num_rows($rnav); if ($rows > 100) { // Limit the number of rows the user can request for any query. $rows = 100; } if($rows > $ByPage) { // Fix for last cell / paging problem //$ListingTable .= "
Business Classifications for: $region_name $class_name $display_cStart
Click on a classification for a list of businesses...

\n\t"; $ListingTable .= "
"; $ListingTable .= "\n"; if ($first_row == "Y") { $first_row = "N"; //$ListingTable .= "\n\t"; } // Listing Row $ListingTable .= "\n\t"; $ListingTable .= "\n\t\n"; $ListingTable .= "\n\t\n"; $ListingTable .= "
"; $ListingTable .= "
$class_name
"; $ListingTable .= "
\n\n

"; //$ListingTable .= "
"; //$ListingTable .= ""; //--------------------- Alphabetic Search --------------------------------------------------- $ListingTable .= "
"; //if ($rows > $ByPage) //{ $ListingTable .= ""; //} //------------------------------------------------------------------------------------------- // Fix for last cell / paging problem //$ListingTable .= "

Additional pages...
| "; $ListingTable .= "

Additional pages...
| "; $pages = ceil($rows/$ByPage); for($i = 0; $i <= ($pages); $i++) { $PageStart = $ByPage*$i; $i2 = $i + 1; if($PageStart == $Start) { $links[] = " $i2\n\t "; } elseif($PageStart < $rows) { $links[] = " $i2\n\t "; } } $links2 = implode(" | ", $links); $ListingTable .= $links2; $ListingTable .= " |

Or, select from Classifications alphabetically...
| "; //$pages = ceil($rows/$ByPage); for($i = 0; $i <= 26; $i++) { $cPageStart = $alphabet[$i]; $c2 = $alphabet[$i]; if($cPageStart == $cStart) { $clinks[] = " $c2\n\t "; } else { $clinks[] = " $c2\n\t "; } } $clinks2 = implode(" | ", $clinks); $ListingTable .= $clinks2; $ListingTable .= "


\n"; } else { $ListingTable .= "
"; //$ListingTable .= "
Select from search results alphabetically... ($rows)
| "; $ListingTable .= "
End of Search Results

"; $ListingTable .= "
      
"; //--- begin alpha select if ($rows > $ByPage) { for($i = 0; $i <= 26; $i++) { $cPageStart = $alphabet[$i]; $c2 = $alphabet[$i]; if($cPageStart == $cStart) { $clinks[] = " $c2\n\t "; } else { //$clinks[] = " $c2\n\t "; $clinks[] = " $c2\n\t "; } } $clinks2 = implode(" | ", $clinks); $ListingTable .= "
Or, select from search results alphabetically...
"; $ListingTable .= $clinks2; } //--- end alpha select $ListingTable .= "

"; } } else { $ListingTable = "



Sorry, no results for this search.
$region_name $class_name $category $search_keyword $Street $City $ZipCode $Phone $display_cStart


Sugestions:

- Check your spelling
- Try more general words
- Try different words that mean the same thing
- Broaden your search by using fewer words
- Try a general United States Search


"; } mysql_free_result($r1); require_once("templates/HeaderTemplate.php"); require_once("templates/SearchTemplate.php"); require_once("templates/FooterTemplate.php"); //include ("end_caching.php"); // Now the script has run, generate a new cache file $fp = @fopen($cachefile, 'w'); // save the contents of output buffer to the file @fwrite($fp, ob_get_contents()); @fclose($fp); ob_end_flush(); ?>