-
Notifications
You must be signed in to change notification settings - Fork 1
/
ShowProduct.php
48 lines (35 loc) · 995 Bytes
/
ShowProduct.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
<?php
$p = new Paging;
$batas = 16;
$posisi = $p->cariPosisi($batas);
//FILTER VARIABLE GET
if(!is_numeric(isset($_GET['halaman'])) AND !is_numeric($_GET['halaman']))
{
echo '<meta http-equiv="refresh" content="0;url=index.php">';
exit;
}
echo "<table align='center'>";
$i=0;
$kolom=4;
if($i>=$kolom){
echo "
<tr>
";
$i=0;
}
echo "<td align='center' width='150'>
if(file_exists($FileGambar)){
echo "<a href='?v=show_product_detail&id=$ISBN'><img src='$FileGambar' alt='$Judul' width='100' height='150'\></a><br />";
}
echo "</table>";
$jmldata = mysql_num_rows(mysql_query("SELECT ISBN, judul, fileGambar, harga
FROM buku"));
$jmlhalaman = $p->jumlahHalaman($jmldata, $batas);
$linkHalaman = $p->navHalaman($hal, $jmlhalaman);
echo "<div id=paging>Hal: $linkHalaman</div><br>";
if($_GET['halaman']>$jmlhalaman)
{
echo '<meta http-equiv="refresh" content="0;url=index.php">';
exit;
}
?>