001.
<?php
002.
003.
require_once
(
'../../database/server.php'
);
004.
005.
?>
006.
<!DOCTYPE html>
007.
<html lang=
"en"
>
008.
<head>
009.
<meta charset=
"UTF-8"
>
010.
<meta http-equiv=
"X-UA-Compatible"
content=
"IE=edge"
>
011.
<meta name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
012.
<title>ผู้ดูแลระบบ</title>
013.
014.
</head>
015.
<body>
016.
017.
<?php
include_once
(
'../../includes/navbar_sidebar.php'
) ?>
018.
<div
class
=
"content"
>
019.
<div
class
=
"container-fluid"
>
020.
<div
class
=
"row"
>
021.
<div
class
=
"col-12"
>
022.
<div
class
=
"card shadow "
>
023.
<div
class
=
"card-header border-0"
>
024.
<h4>
025.
<a><i
class
=
"fas fa-user-cog"
> ผู้ดูแลระบบ</i>
026.
027.
<button type=
"button"
class
=
"btn btn-primary btn-submit "
data-bs-toggle=
"modal"
data-bs-target=
"#addModal"
>
028.
<i
class
=
"fas fa-plus"
> เพิ่มข้อมูล</i>
029.
</button>
030.
</a>
031.
</h4>
032.
</div>
033.
<!--
end
card-header -->
034.
035.
<!-- Modal Create-->
036.
<?php
include
(
'formCreate.php'
); ?>
037.
038.
<!-- Modal Edit-->
039.
<?php
include
(
'formEdit.php'
); ?>
040.
041.
<!-- Modal
Delete
-->
042.
<?php
include
(
'formDelete.php'
); ?>
043.
044.
<div
class
=
"table-responsive"
>
045.
<div
class
=
"card-body"
>
046.
<table id=
"dataTables"
class
=
"table table-hover "
>
047.
<thead>
048.
<tr>
049.
<th>รูปภาพ</th>
050.
<th>ชื่อ</th>
051.
<th>นามสกุล</th>
052.
<th>อีเมล</th>
053.
<th>ชื่อผู้ใช้</th>
054.
<th>สิทธิ์</th>
055.
<th>สร้าง</th>
056.
<th>ล่าสุด</th>
057.
<th>แก้ไข</th>
058.
<th>จัดการ</th>
059.
</tr>
060.
</thead>
061.
<tbody>
062.
<?php
063.
$sql
=
"SELECT `id`, `username`, `password`, `firstname`, `lastname`, `email`, `image`, `created_at`, `updated_at`, `updated_dt`, `status` FROM `user` WHERE status='admin'; "
;
064.
065.
$result
=
$mysqli
->query(
$sql
);
066.
while
(
$row
=
$result
->fetch_array(MYSQLI_ASSOC))
067.
{
068.
?>
069.
070.
<tr>
071.
<td><img src=
"../../assets/imgUser/<?php echo $row["
image
"];?>"
alt=
"Image"
width=
"50"
hight=
"50"
></td>
072.
<td
class
=
"text-left"
><?php
echo
$row
[
"firstname"
]; ?></td>
073.
<td
class
=
"text-left"
><?php
echo
$row
[
"lastname"
]; ?></td>
074.
<td
class
=
"text-left"
><?php
echo
$row
[
"email"
]; ?></td>
075.
<td
class
=
"text-left"
><?php
echo
$row
[
"username"
]; ?></td>
076.
<td
class
=
"text-left"
><?php
echo
$row
[
"status"
]; ?></td>
077.
<td
class
=
"text-left"
><?php
echo
$row
[
"created_at"
]; ?></td>
078.
<td
class
=
"text-left"
><?php
echo
$row
[
"updated_at"
]; ?></td>
079.
<td
class
=
"text-left"
><?php
echo
$row
[
"updated_dt"
]; ?></td>
080.
<td>
081.
<div
class
=
"btn-group"
role=
"group"
aria-label=
"Basic mixed styles example"
>
082.
<button type=
"button"
class
=
"btn btn-warning fas fa-edit fa-1x editmodal"
></button>
083.
<button type=
"button"
class
=
"btn btn-danger fas fa-trash fa-1x deletemodal"
></button>
084.
</div>
085.
</td>
086.
</tr>
087.
<?php } ?>
088.
</tbody>
089.
</table>
090.
</div>
091.
<!--
end
card-body -->
092.
</div>
093.
<!--
end
table-responsive -->
094.
</div>
095.
<!--
end
card shadow -->
096.
</div>
097.
<!--
end
col-12 -->
098.
</div>
099.
<!--
end
row -->
100.
</div>
101.
<!--
end
container-fluid -->
102.
<?php
include_once
(
'../../includes/footer.php'
) ?>
103.
</div>
104.
<!--
end
content -->
105.
</body>
106.
</html>