-
Notifications
You must be signed in to change notification settings - Fork 1
/
ShowProductDetail.php
52 lines (40 loc) · 1.26 KB
/
ShowProductDetail.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
49
50
51
52
<div class='produk-headline'>
<?php
$QProduct=mysql_query("SELECT b.ISBN, b.judul, b.fileGambar, b.harga, b.deskripsi, b.nomorEdisi, b.copyright,
p.namaPenerbit
FROM buku b, penerbit p
WHERE
b.IDPenerbit=p.IDPenerbit
AND b.ISBN='".addslashes($_GET['id'])."'") OR DIE (mysql_error());
$i=0;
$r=mysql_fetch_array($QProduct);
$ISBN=$r['ISBN'];
$Judul=$r['judul'];
$Penerbit=$r['namaPenerbit'];
$NomorEdisi=$r['nomorEdisi'];
$Copyright=$r['copyright'];
//FUNGSI html_entity_decode() MENGAKTIFKAN FUNGSI HTML YANG TELAH DI PARSE PADA INSERT PRODUCT DI HALAMAN ADMIN
$Deskripsi=html_entity_decode($r['deskripsi']);
$FileGambar='dashboard/img/thumb_'.$r['fileGambar'];
$Harga=number_format($r['harga'],2,",",".");
echo "
<h3>$Judul</h3>";
if(file_exists($FileGambar)){
echo "<span class='img.alignleft'><img align='left' src='$FileGambar' alt='$judul' width='200'\></span";
}
else {
echo "<span class='img.alignleft'><img align='left' src='dashboard/img/photo_not_available.jpg' width='200'></span>";
}
echo "<p>$Deskripsi </p>
<p>
<pre>
<b>Penerbit: $Penerbit </b>
<b>Nomor Edisi: $NomorEdisi </b>
<b>Copyright: $Copyright </b>
<b>Harga Rp $Harga </b>
</pre>
</p>
";
$i++;
?>
</div>