include("_sys_lib/i_conn.php"); //ini kondisi query .. klo user pilih kategori $skrip_sql="WHERE main_category='$_GET[main_cat]' "; if($_GET[cat]<>''){ $skrip_sql=$skrip_sql." AND category='$_GET[cat]'";} if($_GET[sub_cat]<>'') { $skrip_sql=$skrip_sql." AND sub_category='$_GET[sub_cat]'";} //script paging $halaman=$_GET[halaman]; $PHP_SELF=$_SERVER[PHP_SELF]; //<---counter atas--> START if (empty($halaman)) $halaman=1; $p[baris]=3; // Berapa baris data yang ingin ditampilkan $p[langkah]=10; // Coba aja kutak-katik, jadinya gimana :P $result=mysql_query("select count(*) from product $skrip_sql "); // Count data (SQL query) list($p[count]) = mysql_fetch_row($result); unset($result); // total halaman $p[total_halaman]=ceil($p[count]/$p[baris]); // filter halaman if ($halaman<=1) $halaman=1; elseif ($halaman>$p[total_halaman]) $halaman=$p[total_halaman]; // awal data yang diambil $p[mulai]=$halaman*$p[baris]-$p[baris]; //<---counter atas--> END ?>
![]() |
![]() ![]() |
![]() |
||||||||||
![]() |
![]() |
![]() |
||||||||||
![]() ![]()
![]() Product Search
Online Catalogue > Local Product (Ace Oldfields) if($_GET[cat]<>'') {?>> Paint Brush } if($_GET[sub_cat]<>'') {?>> }?>
//chusus buat nampilin deskripsi paint roller if($_GET[cat]=="Paint Roller"){?> At Ace Oldfields, we keep our commitment to excellent and consistent quality products. Therefore, despite the increasing costs, we still import the main components of our roller (fabric, adhesive and phenolic paper) from USA.
}?> $sql="SELECT * FROM product $skrip_sql ORDER BY id DESC limit $p[mulai],$p[baris]"; $com=mysql_query($sql); $total=mysql_num_rows($com); if($total<=0){ echo "No Product Available";} while($baris=mysql_fetch_array($com)){ ?> }?> if($p[count]>$p[baris]){ ?>
//tamabahan link kategori
$link_kategori="main_cat=".$_GET[main_cat];
if($_GET[cat]<>''){ $link_kategori=$link_kategori."&cat=".$_GET[cat];}
if($_GET[sub_cat]<>''){ $link_kategori=$link_kategori."&sub_cat=".$_GET[sub_cat];}
//akhir tambahan link kategori
echo "Next Product: ";
//sebelumnya
if ($halaman>1)
echo "
}?>
![]() ![]() |
||||||||||||
![]() |
![]() |
![]() |