include("conn-web/cw.php");
/*if ($_REQUEST["catid"]<>""){
$sqlcat2="select * from 15cup_ar_category_2013 where category='$_REQUEST[catid]'";
$qrycat2=mysqli_query($connect,$sqlcat2) or die(mysql_error());
$rowcat2=mysqli_fetch_array($qrycat2);
$cid=$rowcat2[catid];
}*/
/*$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$link1="http://www.bindalgems.com/productsearch1.php?catid=1";
$link1_1="www.bindalgems.com/wholesale-silver-jewelry.php";
$link2="http://www.bindalgems.com/productsearch1.php?catid=2";
$link2_2="www.bindalgems.com/productsearch1.php?catid=2";
if($actual_link==$link1||$actual_link==$link1_1){
header('Location:http://www.bindalgems.com/gemstone-wholesale-india.php');
}
if($actual_link==$link2||$actual_link==$link2_2){
header('Location:http://www.bindalgems.com/wholesale-silver-jewelry.php');
}*/
if ($_REQUEST["catid"]<>""){
$cid=$_REQUEST['catid'];
}
if ($_REQUEST["subid"]<>""){
$pcatid=$_REQUEST['subid'];
}
if ($_REQUEST["spcatid"]<>""){
$spcatid=$_REQUEST['spcatid'];
}
if($cid<>"" && $pcatid<>"" && $spcatid<>""){
$dd1="subcat_id='".$pcatid."' and cat_id='".$cid."' and cat_id1='".$spcatid."'";
}elseif($cid<>"" && $pcatid<>""){
$dd1="subcat_id='".$pcatid."' and cat_id='".$cid."'";
}elseif($cid<>""){
$dd1="cat_id='".$cid."' ";
}else{
$dd1="cat_id!=''";
}
// Pagging
$rpp = 12; // results per page
$adjacents = 2;
$page = intval($_GET["page"]);
if($page<=0) $page = 1;
//page url
$reload = "productsearch1.php?catid=".$_REQUEST['catid']."&subid=".$_REQUEST['subid']."&spcatid=".$_REQUEST['spcatid']."";
// select appropriate results from DB:
$sql = "select * from 15cup_ar_indexpg_2013 where (".$dd1." ) order by id desc";
$result = mysqli_query($connect,$sql);
// count total number of appropriate listings:
$tcount = mysqli_num_rows($result);
// count number of pages:
$tpages = ($tcount) ? ceil($tcount/$rpp) : 1; // total pages, last page number
$count = 0;
$i = ($page-1)*$rpp;
$sqlcat="select * from 15cup_ar_category_2013 where catid='$cid'";
$qrycat=mysqli_query($connect,$sqlcat) or die(mysql_error());
$rowcat=mysqli_fetch_array($qrycat);
$category=$rowcat['category'];
$sqlpcat="select * from 15cup_ar_category_2013 where catid='".$_REQUEST['subid']."'";
$qrypcat=mysqli_query($connect,$sqlpcat) or die(mysql_error());
$rowpcat=mysqli_fetch_array($qrypcat);
$pcategory=$rowpcat['category'];
$sqlpcat1="select * from 15cup_ar_category_2013 where catid='".$_REQUEST['spcatid']."'";
$qrypcat1=mysqli_query($connect,$sqlpcat1) or die(mysql_error());
$rowpcat1=mysqli_fetch_array($qrypcat1);
$spcategory=$rowpcat1['category'];
//$_REQUEST['catid']=$cid;
if($_REQUEST['catid']==1){ $cat_link="gemstone-wholesale-india.php";}
elseif($_REQUEST['catid']==2){ $cat_link="wholesale-silver-jewelry.php";}
elseif($_REQUEST['catid']==257){ $cat_link="latest-gemstone-silver-jewelry.php";}
else{$cat_link="";}
?>
if($_REQUEST['subid']!="" && $_REQUEST['catid']!="" && $_REQUEST['spcatid']!=""){?>
}
else if($_REQUEST['subid']!="" && $_REQUEST['catid']!=""){?>
}
else if($_REQUEST['catid']!=""){?>
}?>
include("left.php");?>
if($_REQUEST['catid']!="" && $_REQUEST['subid']!="" && $_REQUEST['spcatid']!=""){?>
}elseif($_REQUEST['catid']!="" && $_REQUEST['subid']!=""){?>
}elseif($_REQUEST['catid']!=""){?>
}?>
$j=1;
if(mysqli_num_rows($result)>0){
while(($count<$rpp) && ($i<$tcount)) {
mysqli_data_seek($result,$i);
$rsranking = mysqli_fetch_array($result);
if($j<4){
$divclass="pdiv1 pdivmargin";
}else{
$divclass="pdiv1";
}
?>
Product Code:
$i++;
$j++;
if($j==5){
$j=1;}
$count++;
}} else { echo "
Product Not Found In This Category!";}?>
include("footer1.php");?>
include("footer.php");?>