01.
<?php
02.
session_start();
03.
include
"conn.php"
;
04.
$Mem_ID
=
$_SESSION
[
'ses_user_id'
];
05.
$Mem_Name
=
$_SESSION
[
'ses_user_name'
];
06.
07.
?>
08.
<!DOCTYPE html>
09.
<html>
10.
<head>
11.
<title><?php
echo
$title
; ?></title>
12.
</head>
13.
<body>
14.
<form action=
"chk_product.php"
method=
"get"
accept-charset=
"utf-8"
>
15.
<div align=
"center"
><h1 style=
"color: gray"
>ยินดีต้อนรับ <?php
echo
$Mem_Name
; ?></h1></div>
16.
17.
<?php
18.
$query
= mysqli_query(
$conn
,
"select * from product"
);
19.
20.
?>
21.
<div align=
"center"
><h1>Booth</h1></div>
22.
<table border=
"1"
align=
"center"
>
23.
<tr align=
"center"
>
24.
<th>ลำดับ</th>
25.
<th>รูปภาพ</th>
26.
<th>ชื่อบูธ</th>
27.
<th>ราคา</th>
28.
<th>จำนวนของที่มี</th>
29.
<th>จำนวนของที่เหลือ</th>
30.
<th>เลือก</th>
31.
32.
</tr>
33.
<?php
34.
$n
= 1;
35.
while
(
$result
= mysqli_fetch_assoc(
$query
))
36.
{
37.
?>
38.
<tr align=
"center"
>
39.
<td> <?php
echo
$n
++; ?> </td>
40.
<td> <img src=
"<?php echo $result['Pro_Pic']; ?>"
style=
"width: 200px;height: 150px;"
> </td>
41.
<td> <?php
echo
$result
[
'Pro_Name'
]; ?> </td>
42.
<td> <?php
echo
$result
[
'Pro_Price'
]; ?> </td>
43.
<td> <?php
echo
$result
[
'Pro_Storage'
]; ?> </td>
44.
<td> <?php
echo
$result
[
'Pro_Available'
]; ?> </td>
45.
<td> <input type=
"checkbox"
name=
"use[]"
value=
"<?php echo $result['Pro_ID']; ?>"
> </td>
46.
47.
</tr>
48.
<?php
49.
}
50.
?>
51.
</table>
52.
<div align=
"center"
>
53.
<input type=
"submit"
value=
"submit"
style=
"width: 150px;height: 30px;"
>
54.
<input type=
"reset"
value=
"Cancel"
>
55.
<input type=
"button"
value=
"Logout"
onclick=
"window.location = 'logout.php'"
>
56.
</div>
57.
</form>
58.
59.
</body>
60.
</html>