01.
<table
class
=
"table table-striped table-bordered table-info"
>
02.
<thead>
03.
</div>
04.
<th scope=
"col"
>No.</th>
05.
<th scope=
"col"
>Part</th>
06.
<th scope=
"col"
>Dis.</th>
07.
<th scope=
"col"
>Branch</th>
08.
<th scope=
"col"
>QTY.</th>
09.
<th scope=
"col"
>เบิก</th>
10.
<th scope=
"col"
></th>
11.
<th scope=
"col"
>คงเหลือ</th>
12.
13.
14.
15.
</tr>
16.
</thead>
17.
<?php
18.
if
(mysqli_num_rows(
$query
) <1){
19.
?>
20.
<tr>
21.
<td colspan=
"8"
><div align=
"center"
>ไม่พบข้อมูล</div></td>
22.
23.
</tr>
24.
<?php
25.
}
else
{
26.
while
(
$result
=mysqli_fetch_array(
$query
,MYSQLI_ASSOC))
27.
{
28.
?>
29.
<tbody>
30.
<form action=
"#"
method=
"post"
onSubmit=
"return fncSubmit( this );"
>
31.
<tr>
32.
<tr>
33.
<td><?php
echo
$result
[
"id"
];?></div></td>
34.
<td><?php
echo
$result
[
"Part"
];?></td>
35.
<td><?php
echo
$result
[
"Dis"
];?></td>
36.
<td><?php
echo
$result
[
"Branch"
];?></div></td>
37.
<td><?php
echo
$result
[
"QTY"
];?></td>
38.
<td><input type=
"hidden"
name=
"id"
value=
"<?php echo $result["
id
"];?>"
size=
"2"
>
39.
<select id=
"txtQty"
name=
"txtQty"
>
40.
<?php
for
(
$qty
=0;
$qty
<=20;
$qty
++)
41.
{
42.
?>
43.
<option value=
"<?php echo $qty;?>"
><?php
echo
$qty
;?></option>
44.
<?php
45.
}
46.
47.
?>
48.
49.
<td><input type=
"submit"
id=
"request"
name=
"request"
class
=
"btn btn-info btn-sm"
value=
"เบิกวัสดุ"
></td>
50.
<td><?php
echo
$result
[
"QTY_NOW"
];?></td>
51.
52.
53.
</select>
54.
</td>
55.
</form>
56.
</tr>
57.
<?php
58.
}
59.
}
60.
?>
61.
</table>
62.
<center>
63.
<br>
64.
Total <?php
echo
$num_rows
;?> Record : <?php
echo
$num_pages
;?> Page :
65.
<?php
66.
if
(
$prev_page
)
67.
{
68.
echo
" <a href='$_SERVER[SCRIPT_NAME]?Page=$prev_page&txtKeyword=$strKeyword'><< Back</a> "
;
69.
}
70.
71.
for
(
$i
=1;
$i
<=
$num_pages
;
$i
++){
72.
if
(
$i
!=
$page
)
73.
{
74.
echo
"[ <a href='$_SERVER[SCRIPT_NAME]?Page=$i&txtKeyword=$strKeyword'>$i</a> ]"
;
75.
}
76.
else
77.
{
78.
echo
"<b> $i </b>"
;
79.
}
80.
}
81.
if
(
$page
!=
$num_pages
)
82.
{
83.
echo
" <a href ='$_SERVER[SCRIPT_NAME]?Page=$next_page&txtKeyword=$strKeyword'>Next>></a> "
;
84.
}
85.
if
(
$page
!=
$num_pages
)
86.
{
87.
echo
" <a href ='$_SERVER[SCRIPT_NAME]?Page=$next_page&txtKeyword=$strKeyword'>Next>></a> "
;
88.
}
89.
mysqli_close(
$conn
);
90.
?>
91.
<script src=
"node_modules\jquery\dist\jquery.min.js"
></script>
92.
<script src=
"node_modules\bootstrap\dist\js\bootstrap.min.js"
></script>
93.
<script src=
"node_modules\popper.js\dist\umd\popper.min.js"
></script>
94.
95.
</body>
96.
</center>
97.
</html>