-
Notifications
You must be signed in to change notification settings - Fork 1
/
tampil_buku_user.php
128 lines (96 loc) · 3.39 KB
/
tampil_buku_user.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<?php
session_start();
$_SESSION['buku']=$_POST["id"];
if(isset($_POST["id"]))
{ include 'koneksi/koneksi.php';
$output = '';
$query = "SELECT * FROM buku WHERE id = '".$_POST["id"]."'";
$datanya = mysqli_query($conn, $query);
$output .= '
<div class="table-responsive">
<table class="table table-bordered" style="color:black;">';
while($data = mysqli_fetch_array($datanya))
{
if($data['fisik']=="tersedia" || $data['lokasi'] !="tidak ada") {
$output .= '
<tr>
<td colspan="2" align="center" width="70%" heigth="50%" >
<a href="proses/sampul/'.$data["foto"].' "><img src="proses/sampul/'.$data['foto'].'" width="240" heigth="320"></a>
</td>
</tr>
<tr>
<td align="center" colspan="2"> '.$data['judul'].'</td>
</tr>
<tr>
<td align="center" colspan="2"> '."Oleh : ".$data['pengarang'].' </td>
</tr>
<tr>
<td align="center" colspan="2"> '.$data['tahun'].' </td>
</tr>
<tr>
<td align="center" colspan="2"> '."Buku Fisik : ".$data['fisik'].' </td>
</tr>
<tr>
<td align="center" colspan="2"> '."Stok : ".$data['stok'].' </td>
</tr>
<tr>
<td align="center" colspan="2"> '."Lokasi : ".$data['lokasi'].' </td>
</tr>
<tr>
<td colspan="2">'."Deskripsi :".' </td>
</tr>
<tr>
<td colspan="2">'.$data['deskripsi'].' </td>
</tr>
<tr>
<td>
<a href="proses/ebook/'.$data['ebook'].'">
<button class="buku-popup-baca">Download</button>
</a>
</td>
<td>
<a href="proses/pinjam.php?=id='.$data['id'].'">
<button class="buku-popup-baca">Pinjam</button>
</a>
</td>
</tr>
';
}else{
$output .= '
<tr>
<td align="center" width="70%" heigth="50%" >
<a href="proses/sampul/'.$data["foto"].' "><img src="proses/sampul/'.$data['foto'].'" width="240" heigth="320"></a>
</td>
</tr>
<tr>
<td align="center"> '.$data['judul'].'</td>
</tr>
<tr>
<td align="center"> '."Oleh : ".$data['pengarang'].' </td>
</tr>
<tr>
<td align="center"> '.$data['tahun'].' </td>
</tr>
<tr>
<td align="center"> '."Buku Fisik : ".$data['fisik'].' </td>
</tr>
<tr>
<td>'."Deskripsi :".' </td>
</tr>
<tr>
<td>'.$data['deskripsi'].' </td>
</tr>
<tr>
<td>
<a href="proses/ebook/'.$data['ebook'].'">
<button class="buku-popup-baca">Download</button>
</a>
</td>
</tr>
';
}
}
$output .= "</table></div>";
echo $output;
}
?>