PHPize Online / SQLize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Copy Clear
Copy Format Clear
<?php @include 'config.php'; session_start(); if (!isset($_SESSION['admin_name'])) { header('location:login_form.php'); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Equipment Reservation</title> <!-- Boxicons --> <link href='https://unpkg.com/boxicons@2.0.9/css/boxicons.min.css' rel='stylesheet'> <!-- custom css file link --> <link rel="stylesheet" href="css/dashboard.css"> <!-- Font Awesome --> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer" /> </head> <body> <!-- SIDEBAR --> <section id="sidebar"> <a href="#" class="brand"> <i class='bx bx-run'></i> <span class="text">GoFit</span> </a> <ul class="side-menu top"> <li> <a href="admin_dashboard.php"> <i class='bx bxs-dashboard'></i> <span class="text">Dashboard</span> </a> </li> <li> <a href="admin_member.php"> <i class='bx bxs-group'></i> <span class="text">Members</span> </a> </li> <li> <a href="admin_class.php"> <i class='bx bxs-calendar'></i> <span class="text">Classes & Events</span> </a> </li> <li class="active"> <a href="admin_equipment.php"> <i class='bx bx-dumbbell'></i> <span class="text">Equipment</span> </a> </li> </ul> <ul class="side-menu"> <li> <a href="logout.php" class="logout"> <i class='bx bxs-log-out-circle'></i> <span class="text">Logout</span> </a> </li> </ul> </section> <!-- SIDEBAR --> <!-- CONTENT --> <section id="content"> <nav> <i class='bx bx-menu'></i> <h1>Welcome admin, <span><?php echo $_SESSION['admin_name'] ?></span>!</h1> </nav> <!-- MAIN --> <main> <div class="head-title"> <div class="left"> <h1>Equipment Reservation</h1> <ul class="breadcrumb"> <li> <a href="admin_dashboard.php">Home</a> </li> <li><i class='bx bx-chevron-right'></i></li> <li> <a class="" href="admin_equipment.php">Equipment</a> </li> <li><i class='bx bx-chevron-right'></i></li> <li> <a class="active" href="admin_memberReservation.php">Equipment Reservation</a> </li> </ul> <br> </div> </div> <div> </div> <?php if (isset($_GET['msg'])) { $msg = $_GET['msg']; echo '<div class="success-msg"> <i class="fa fa-check"></i> ' . $msg . ' </div>'; } ?> <div class="table-data"> <div class="class"> <div class="title"> <h3>Equipment Reservation List</h3> </div> <table> <thead> <tr> <th>ID</th> <th>Name</th> <th>Email Address</th> <th>Contact Number</th> <th>Equipment</th> <th>Date</th> <th>Start Time</th> <th>End Time</th> <th>Action</th> </tr> </thead> <tbody> <?php include 'config.php'; $sql = "SELECT * FROM reservation INNER JOIN equipment ON reservation.equipment_name = equipment_id"; $result = mysqli_query($conn, $sql); while ($row = mysqli_fetch_assoc($result)) { ?> <tr> <td><?php echo $row['reservation_id'] ?></td> <td><?php echo $row['member_name'] ?></td> <td><?php echo $row['member_email'] ?></td> <td><?php echo $row['contact_number'] ?></td> <td><?php echo $row['equipment_name'] ?></td> <td><?php echo $row['date'] ?></td> <td><?php echo $row['start_time'] ?></td> <td><?php echo $row['end_time'] ?></td> <td> <a href="admin_editReservation.php?id=<?php echo $row['reservation_id'] ?>" class="link-dark"><i class="fa-solid fa-pen-to-square fs-5 me-3"></i></a> <a href="admin_deleteReservation.php?id=<?php echo $row['reservation_id'] ?>" class="link-dark"><i class="fa-solid fa-trash fs-5"></i></a> </td> </tr> <?php } ?> </tbody> </tbody> </table> </div> </div> </main> <!-- MAIN --> </section> <!-- CONTENT --> <script src="app.js"></script> </body> </html>
Show:  
Copy Clear