Select a Subcategory of .


'$MyExp2' "; } if(!empty($_GET[search_country])) { $query[] = "yellow_agents.country = '$_GET[search_country]' "; } if(!empty($_GET[search_state])) { $query[] = "yellow_agents.state = '$_GET[search_state]' "; } if(!empty($_GET[search_city])) { $query[] = "yellow_agents.city = '$_GET[search_city]' "; } if(!empty($_GET[search_kw])) { $query[] = " (yellow_posts.resume like '%$_GET[search_kw]%' or yellow_posts.CompanyName like '%$_GET[search_kw]%') "; } if(!empty($_GET[zip])) { $query[] = " (yellow_agents.zipcode like '%$_GET[zip]%') "; } if(!empty($query)) { $MyQuery = implode(" and ", $query); $MyQuery = " and ".$MyQuery; } //////////////////////////////////////////////////////////// ////////// order by //////////////////////////////////////////////////////////// $order = array(); if(!empty($_GET[orderby])) { $MyOrder = explode("|", $_GET[orderby]); while(list(,$ov) = each($MyOrder)) { if($ov == "DateAdded") { $order[] = " yellow_agents.RegDate desc "; } if($ov == "address") { $order[] = " yellow_agents.address asc "; } } } else { if(!empty($_GET[p])) { $order[] = " yellow_agents.RegDate desc "; } } if(count($order) > '0') { $MyOrder = implode(", ", $order); } if($aset[Sitefee]=="0") { if(empty($MyOrder)) { $MyOrder = " order by yellow_agents.AgentID desc, yellow_agents.RegDate desc"; } else { $MyOrder = " order by yellow_agents.AgentID desc, $MyOrder, yellow_agents.RegDate desc"; } } if(!empty($_GET[Start])) { $Start = $_GET[Start]; } else { $Start = '0'; } $ByPage = '20'; if($aset[Sitefee]=="1") { $q1 = "select * from yellow_agents, yellow_categories,yellow_subcat,yellow_posts where yellow_posts.CategoryID = yellow_categories.CategoryID and yellow_agents.AccountStatus = 'active' and yellow_posts.AgentID=yellow_agents.AgentID and yellow_posts.SubCategoryID = yellow_subcat.subcatid $MyQuery $MyOrder limit $Start, $ByPage "; $qnav = "select * from yellow_agents, yellow_posts, yellow_categories where yellow_posts.CategoryID = yellow_categories.CategoryID and yellow_agents.AccountStatus = 'active' and yellow_posts.AgentID=yellow_agents.AgentID $MyQuery"; } else { /*$q1 = "select * from yellow_agents, yellow_priority, yellow_categories,yellow_subcat where yellow_agents.CategoryID = yellow_categories.CategoryID and yellow_agents.PriorityLevel = yellow_priority.PriorityLevel and yellow_agents.AccountStatus = 'active' and yellow_agents.SubCategoryID = yellow_subcat.subcatid $MyQuery $MyOrder limit $Start, $ByPage "; $qnav = "select * from yellow_agents, yellow_priority, yellow_categories where yellow_agents.CategoryID = yellow_categories.CategoryID and yellow_agents.PriorityLevel = yellow_priority.PriorityLevel and yellow_agents.AccountStatus = 'active' $MyQuery";*/ $q1 = "select * from yellow_agents, yellow_categories,yellow_subcat,yellow_posts where yellow_posts.CategoryID = yellow_categories.CategoryID and yellow_agents.AccountStatus = 'active' and yellow_posts.SubCategoryID = yellow_subcat.subcatid and yellow_posts.AgentID=yellow_agents.AgentID $MyQuery $MyOrder limit $Start, $ByPage "; $qnav = "select * from yellow_agents, yellow_categories,yellow_posts where yellow_posts.CategoryID = yellow_categories.CategoryID and yellow_agents.AccountStatus = 'active' and yellow_posts.AgentID=yellow_agents.AgentID $MyQuery"; } $r1 = mysql_query($q1) or die(mysql_error()); $lrows = mysql_num_rows($r1); if($lrows > '0') { $ListingTable .= "\n"; $ListingTable .= ""; while($a1 = mysql_fetch_array($r1)) { $rate="SELECT avg(rated) as abcde FROM yellow_rating WHERE mediaid ='".$a1[PostID]."' GROUP BY mediaid"; $rank=""; $rateq=mysql_query($rate)or die($rate); $rateline=mysql_fetch_array($rateq); $count=1; while($count<=round($rateline[abcde])) { // echo 1; $rank.= ""; $count=$count+1; } $ListingTable .= "\n\t"; /* $ListingTable .= "
TitleAddedAd Expires PriceRating
"; $ListingTable .= "\n"; $ListingTable .= ""; /* if(!empty($a1[logo])) { $MyImage = $a1[logo]; $ListingTable .= ""; } else { $ListingTable .= ""; } */ //$ListingTable .= "\n\t"; $ShortDesc = substr($a1[resume], 0, 100); $ListingTable .= "\n\n"; $ListingTable .= "\n\n"; } $rnav = mysql_query($qnav) or die(mysql_error()); $rows = mysql_num_rows($rnav); if($rows > $ByPage) { $ListingTable .= "
".$a1[CompanyName]."
$ShortDesc...
".date('m-d-y',$a1[PostDate])."".date('m-d-y',$a1[ExpireDate])." Rs. ".$a1[Price]." ".$rank." 
"; // paginate($totalresults, $pageresults, $linksnumber, $pagenumber, $previoustext, $nexttext, $firsttext, $lasttext, $link, $link_contain_page = false) // echo paginate($results_amount['count'], $config['count_directory'], 30, $listing_page, $lang['previous'], $lang['next'], $lang['first'], $lang['last'], getCategoryURL($path,$lang['category']).$page_suffix, true); $ListingTable .= ""; // $linkspaginate = "search.php?s=".$_GET[s]; //$linkspaginate = "search.php?Start=".$Start."&c=".$_GET[c]."&s=".$_GET[s]."&search_city=".$_GET[search_city]."&search_state=".$_GET[search_state]."&search_country=".$_GET[search_country]."&search_kw=".$_GET[search_kw]; //$ListingTable .= paginate($rows, $ByPage, 5, $pages, Previous, Next, First, Last,$linkspaginate, false); $ListingTable .= "
| "; $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 .= "|

\n"; } } else { $ListingTable = "

No results were found!
"; } } require_once("templates/SearchTemplate.php"); $aset[SiteTitle]=$maincatname; require_once("templates/FooterTemplate.php"); ?>