$value) { $unserialize[$key] = @iconv('windows-1256', 'UTF-8', $value); } $serialize = serialize($unserialize); return $serialize; } else { return @iconv('windows-1256', 'UTF-8', $item); } } if ($_SERVER['SERVER_ADDR']=='127.0.0.1') { $con = mysql_connect('localhost','root','MwkDncD@)j,s'); // dev } else { $con = mysql_connect('localhost','countryo_vendor','7%QMDGeBg,*a'); } $db = mysql_select_db('countryo_vendor'); $page = str_replace('p','',$_GET['page']) ; if($page==null) { $page=1; $npage=1; } else { if ($_GET['gp']==1) { $npage = ($page+1); } else { $npage = $page; } } //$page = ($page+1); // if ($start == null) { // // $start = 1; // // } // // if ($start == 1) { // // $sstart = 0; // // } // // else { // // // $sstart = $npage*$limit; // } // $queryl = "select * FROM options"; // // $resultl = mysql_query($queryl) or die("Query failed ".mysql_error()); // while ($rowl = mysql_fetch_array($resultl)) // { // $entries = stripslashes($rowl["entries"]); // } $limit = $_GET['sh']; if ($limit == null) { $limit = $entries; $limit = 15; } //echo $page; if ($page == 1) { $sstart = 0; } else { $sstart = ($page-1)*$limit; } $id = $_GET['id']; $sr = $_GET['sr']; $pcat = $_GET['pcat']; //$pcat = str_replace('-', ' ',$pcat); $pcat = str_replace('_', '-',$pcat); $pcat = str_replace('and', '&',$pcat); $pscat = str_replace("-"," ",$_GET['pscat']); //echo $pscat; if ($sr != null) { if ($sr=='num') { $query = "SELECT * FROM vendor WHERE LEFT(title,1) IN ('1','2','3','4','5','6','7','8','9','0') ORDER BY id DESC LIMIT $sstart , $limit"; } else { $query = "SELECT * FROM vendor WHERE LEFT(title,1) = '$sr' ORDER BY id DESC LIMIT $sstart , $limit"; } } elseif ($pcat != null) { if ($pscat != null) { $query = "SELECT * FROM vendor WHERE cat = '$pcat' and scat = '$pscat' ORDER BY id DESC LIMIT $sstart , $limit"; } else { $query = "SELECT * FROM vendor WHERE cat = '$pcat' ORDER BY id DESC LIMIT $sstart , $limit"; } } elseif ($pscat != null) { $query = "SELECT * FROM vendor WHERE scat = '$pscat' ORDER BY id DESC LIMIT $sstart , $limit"; } else { $query = "SELECT * FROM vendor ORDER BY rand() LIMIT $sstart, $limit"; } $search = $_POST["search"]; if ($search != NULL) { $query = "SELECT * FROM vendor WHERE title like '%$search%' LIMIT $limit"; } //echo $query; $query2 = "SELECT * FROM vendor"; $rc = mysql_query($query2) or die("Query failed 1".mysql_error()); $cnt = mysql_num_rows($rc); $result = mysql_query($query) or die("Query failed 2".mysql_error()); //echo $query; //SELECT * FROM recipe WHERE cat = 'Chicken' and scat = 'chicken soup' ORDER BY id DESC LIMIT 0 , 15 //SELECT * FROM recipe WHERE cat = 'Chicken' and scat = 'chicken soup' ORDER BY id DESC LIMIT 30 , 15 function GetRecipesNumInCat($cat) { $query = "SELECT cat FROM recipe where cat='$cat'"; $result2 = mysql_query($query) or die("Query failed ".mysql_error()); return mysql_numrows($result2); } function GetRecipesNumInSubCat($cat,$scat) { $query = "SELECT cat FROM recipe where cat='$cat' and scat='$scat'"; $result5 = mysql_query($query) or die("Query failed ".mysql_error()); return mysql_numrows($result5); } function ShortenText($text,$limit) { if (strlen($text) > $limit) { $text = $text." "; $text = substr($text,0,$limit); $text = substr($text,0,strrpos($text,' ')); $text = $text."..."; return convert_charset($text); } else { return convert_charset($text); } } ?> '.$pcat.' Recipes | '.$pcat.' Recipe | '.$pcat.' Food Recipes '; } elseif($pscat!=null) { echo ' '.$pscat.' Recipes | '.$pscat.' Recipe | '.$pscat.' Food Recipes '; } else { echo ' Online Grocery Shopping | Buy Cheap Food Online ship to your doorstep at OnlineGroceryFood.com '; } ?>

Keyword
Total Sites:
Site Category
Recipes Category
'; // // } // // else { // // echo '
Recipes Sub-Category
'; // // } // ?>
'; echo '
  • ' . $page . '
  • '; echo '
  • ' . ($page+1) . '
  • '; if ($cnt > 100) { echo '
  • ' . ($page+2) . '
  • '; echo '
  • >
  • '; } echo ' '; } else { $cp2 = str_replace("p1",'p'.($page+1),$cp); $cp3 = str_replace("p1",'p'.($page+2),$cp); $cp4 = str_replace("p1",'p'.($page+3),$cp); echo ''; } ?>
      

    0) { while ($rowf = mysql_fetch_array($resultf)) { $ct = $ct + $rowf['rating']; } $tmp = round(($ct / $tr),2); $kk = explode('.',$tmp); if ('.'.$kk[1]>0.5) { return $kk[0] . '.5'; } else { return $kk[0]; } } } while ($row = mysql_fetch_array($result)) { $title = stripslashes($row["title"]); if ($title!= null) { //http://news.onlinefoodgrocery.com/food-news/23/seafood_makes_big_splash_during_lent.html $old_pattern = array("/[^a-zA-Z0-9]/", "/_+/", "/_$/"); $new_pattern = array("_", "_", ""); $titleurl = strtolower(preg_replace($old_pattern, $new_pattern ,convert_charset($title))); //echo '' . ShortenText($title,54) . '
    ' . '

    '; //echo stripslashes($row["title"]); echo '' . ShortenText($title,54) . '
    '; $tt = getrating($title); $ad=0; if ($tt>0) { $k2= explode('.',$tt); for ($i = 1; $i <= 5; $i++) { if ($i <= $tt) { echo ''; } else { if ('.'.$k2[1]>= '.50' && $ad==0) { echo ''; $ad=1; } else { echo ''; } } } } else { echo ''; } echo '


    '; } } ?>
    '; echo '
  • ' . $page . '
  • '; echo '
  • ' . ($page+1) . '
  • '; if ($cnt > 100) { echo '
  • ' . ($page+2) . '
  • '; echo '
  • >
  • '; } echo ' '; } else { $cp2 = str_replace("p1",'p'.($page+1),$cp); $cp3 = str_replace("p1",'p'.($page+2),$cp); $cp4 = str_replace("p1",'p'.($page+3),$cp); echo ''; } ?>