updated sidebar, setting, user query pagr

This commit is contained in:
Juthatip McDevitt 2024-06-17 23:08:36 -05:00
parent 21bbb2f370
commit 49e3e9eb63
3 changed files with 43 additions and 43 deletions

View file

@ -19,8 +19,8 @@
<li class="nav-item" id="dashboard">
<a class="nav-link text-white" href="dashboard.php">Dashboard</a>
</li>
<li class="nav-item" id="rooms">
<a class="nav-link text-white" href="rooms.php">Rooms</a>
<li class="nav-item" id="accomm">
<a class="nav-link text-white" href="accomm.php">Accommodation</a>
</li>
<li class="nav-item" id="user_query">
<a class="nav-link text-white" href="user_query.php">User Query</a>

View file

@ -7,7 +7,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings | Midtown Hotel</title>
<title>Admin Dashboard-settings | Midtown Hotel</title>
<?php require('components/link.php')?>
</head>
<body>

View file

@ -51,7 +51,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>User Query | Midtown Hotel</title>
<title>Admin Dashboard-user Query | Midtown Hotel</title>
<?php require('components/link.php')?>
<style>
.btn-seen{
@ -90,47 +90,47 @@
<a href="?del=all" class='btn-cancle'>Delete All</a>
</div>
<div class="table-responsive-md" style="height: 450px; overflow-y: scroll;">
<table class="table table-hover border">
<thead class="sticky-top">
<tr style="background-color: #D3D3D3;">
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col" width="20%">Subject</th>
<th scope="col" width="30%">Message</th>
<th scope="col">Date</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<?php
$q = "SELECT * FROM `user_query` ORDER BY `sr_no` DESC";
$data = mysqli_query($con, $q);
$i = 1;
<table class="table table-hover border">
<thead class="sticky-top">
<tr style="background-color: #D3D3D3;">
<th scope="col">#</th>
<th scope="col">Name</th>
<th scope="col">Email</th>
<th scope="col" width="20%">Subject</th>
<th scope="col" width="30%">Message</th>
<th scope="col">Date</th>
<th scope="col">Status</th>
</tr>
</thead>
<tbody>
<?php
$q = "SELECT * FROM `user_query` ORDER BY `sr_no` DESC";
$data = mysqli_query($con, $q);
$i = 1;
while($row = mysqli_fetch_assoc($data)){
$seen = '';
if($row['seen'] != 1){
$seen = "<a href='?seen=$row[sr_no]' class='btn-seen'>Read</a>";
while($row = mysqli_fetch_assoc($data)){
$seen = '';
if($row['seen'] != 1){
$seen = "<a href='?seen=$row[sr_no]' class='btn-seen'>Read</a>";
}
$seen.="<a href='?del=$row[sr_no]' class='btn-cancle mx-1'>Delete</a>";
echo<<<query
<tr>
<td>$i</td>
<td>$row[name]</td>
<td>$row[email]</td>
<td>$row[subject]</td>
<td>$row[message]</td>
<td>$row[date]</td>
<td>$seen</td>
</tr>
query;
$i++;
}
$seen.="<a href='?del=$row[sr_no]' class='btn-cancle mx-1'>Delete</a>";
echo<<<query
<tr>
<td>$i</td>
<td>$row[name]</td>
<td>$row[email]</td>
<td>$row[subject]</td>
<td>$row[message]</td>
<td>$row[date]</td>
<td>$seen</td>
</tr>
query;
$i++;
}
?>
</tbody>
</table>
?>
</tbody>
</table>
</div>
</div>
</div>