forked from bastoniyahya/TA-LMS-LSKK-STEI-ITB
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tampil_atk1.php
79 lines (70 loc) · 2.13 KB
/
tampil_atk1.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
<?php
error_reporting(0);
include 'include/koneksi.php';
?>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>N0</th>
<th>Kode Alat</th>
<th>Nama Alat</th>
<th>Kode Lab</th>
<th>Nama Lab</th>
<th>Type</th>
<th>Spesifikasi</th>
<th>Stok</th>
<th>Foto</th>
<th>Aksi</th>
</tr>
</thead>
<tbody>
<?php
include"../include/koneksi.php";
$per_page = 5;
$page_query = mysql_query("SELECT COUNT(*) FROM tb_atk");
$pages = ceil(mysql_result($page_query, 0) / $per_page);
$page = (isset($_GET['page'])) ? (int)$_GET['page'] : 1;
$start = ($page - 1) * $per_page;
$no=1;
$tampil = mysql_query("SELECT * FROM tb_atk LIMIT $start, $per_page");
while($data7=mysql_fetch_array($tampil)){
echo"<tr class='odd gradeU'>
<td valign='top'>$no</td>
<td valign='top'>$data7[kode_alat]</td>
<td valign='top'>$data7[nama_alat]</td>
<td valign='top'>$data7[kode_lab]</td>
<td valign='top'>$data7[nama_lab]</td>
<td valign='top' align='center'>$data7[tipe]</td>
<td valign='top' >$data7[spesifikasi]</td>
<td valign='top' '>$data7[stok]</td>
<td valign='top' ><img src=\"teknisi/img/foto_alat_atk/$data7[foto]\" width=\"150px\"></img></td>
<td><div class=\"btn-group \"><a href=\"detail_atk.php?Kode_Alat=$data7[kode_alat]\" target=\"_blank\" title=\"Detail\" role=\"button\" class=\"btn btn-warning\" ><i class=\"icon-info-sign\" ></i> </a>
<a HREF=\"demo.php?Kode_Alat=$data7[kode_alat]\"
onClick=\"popup = window.open('demo.php?Kode_Alat=$data7[kode_alat]', 'PopupPage', 'height=450,width=400,scrollbars=yes,resizable=yes'); return false\"
target=\"_blank\" role=\"button\" class=\"btn btn-warning\" title=\"Show QR Code\"><i class=\"icon-qrcode\" ></i>
</a>
</td>
</tr>";
$no++;
?>
<?php
}
?>
</tbody>
</table>
<div class="pagination pagination-small pagination-centered">
<ul>
<?php
if($pages >= 1 && $page <= $pages)
{
for($x=1; $x<=$pages; $x++)
{
if($x == $page)
echo ' <li class="active"><a href="/page'.$x.'">'.$x.'</a></li>';
else
echo ' <li><a href="?page='.$x.'">'.$x.'</a></li>';
}
}
?>
</ul>
</div>