set_total($sqlcount);
$result = $paging->get_results($sql);
$result02 = $paging->get_results($sql);
$result03 = $paging->get_results($sqlcat);
$resultProductLine = mysql_query($sql) or die($sql);
$rsProductLine = mysql_fetch_array($resultProductLine);
/**********************************PAGE***************************/
$count_query = $sqlcount;
$result222 = mysql_query($count_query) or die($count_query);
//echo $count_query."
";
$myrowaaa = mysql_fetch_array($result222);
$total = $myrowaaa[0];
if ($total == '') { $total == "null";}
$scale=9;
$page = $_REQUEST['page'] ;
if ($page == ''){
$page=1;
}
if($page != 'all')
{
$cpage = intval($page);
$totalpage = intval($total/$scale);
if ($totalpage*$scale != $total)
$totalpage = $totalpage + 1;
if ($cpage ==1) {
$cline = 0 ;
} else {
$cline = ($cpage*$scale) - $scale ;
}
$limit=$cline+$scale;
if ($limit >= $total)
$limit=$total;
$scale1 = $limit - $cline;
$limit_portion = "LIMIT $cline,$scale1 ";
} else
{
$totalpage = ceil($total/$scale);
$limit_portion = "";
}
$limit_portion = " ".$limit_portion;
/***************************************************************/
$kwbrand = ucwords(strtolower($rs['Brand']));
$kwbrand = eregi_replace("Htc","HTC",$kwbrand);
$kwbrand = eregi_replace("Lg","LG",$kwbrand);
$kwitem = ucwords(strtolower($rs['ItemName']));
$kwitem = eregi_replace("Htc","HTC",$kwitem);
$kwitem = eregi_replace("Lg","LG",$kwitem);
$kw01 = ucwords(strtolower($rsProductLine['ProductLine']));
$kw02 = $kwitem.",".$kwbrand;
$kw02 = strtolower($kw02);
$kwitem ='';
while($rskw = mysql_fetch_array($result02)) {
$kwitem = $kwitem.','.strtolower($rskw['ItemName']);
}
$kwitem = eregi_replace(",,",",",$kwitem);
$kwitem = eregi_replace(", ",",",$kwitem);
$kwitembrand ='';
while($rskwbrand = mysql_fetch_array($result03)) {
$kwitembrand = $kwitembrand.','.strtolower($rskwbrand['Brand']);
}
?>
Home > Specials and Promotions | ||