include("conn-web/cw.php");
$dd1=" arrival=1";
// Pagging
$rpp = 12; // results per page
$adjacents = 2;
$page = intval($_GET["page"]);
if($page<=0) $page = 1;
//page url
$reload = "newarrival.php?";
// 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'];
?>
include("left1.php");?>
$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 "
New Arrival Products not found!";}?>
include("footer1.php");?>
include("footer.php");?>