<?php include "header.php" ?>
<!DOCTYPE html>
<html lang="en">

<head>
    
    
</head>
<body class="animated-banner">
    <!-- Start Main Body -->
    <div class="main-body">
        
             
     
        
    
        <!-- Start Calender -->
        <section class="section-padding doctor-calendar"  style="background-image: url(assets/images/6.jpg);background-attachment:fixed" >
            <div class="overlay overlay-bg-black"></div>
            <div class="pattern"></div>
            <div class="container">
                <div class="section-header">
                    <div class="section-heading">
                        <h3 class="text-custom-white fw-700">Appointment Submissions</h3>
                        <img src="assets/images/title-icon.png" class="mb-xl-20" alt="img">
                        <div class="section-description">
                            <p class="text-custom-white">
                                Stay Up to Date with Our Doctors' Availability Schedule. Book Your Appointment Today!
                            </p>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <div class="doctor-calendar-table table-responsive">
                        <h3 class="text-custom-black fw-700">Appointment Submissions</h3>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>S/N</th>
                                        <th>Appointment ID</th>
                                        <th>Name</th>
                                        <th>Phone</th>
                                        <th>Doctor</th>
                                        <th>Department</th>
                                        <th>Date</th>
                                        <th>Time</th>
                                        <th>Request</th>
                                        <th>Submitted On</th>
                                    </tr>
                                </thead>

                                <tbody>
                                    <?php foreach($appointments as $i): ?>
                                    <tr>
                                        <td>
                                            <span class="time"><?= $i['id']; ?></span>
                                        </td>
                                        <td>
                                            
                                            <span><?= $i['appointment_id']; ?></span>
                                        </td>
                                        <td>
                                            
                                            <span><?= $i['name']; ?></span>
                                        </td>
                                        <td>
                                           
                                            <span><?= $i['phone']; ?></span>
                                        </td>
                                        <td>
                                            <span><?= $i['doctor']; ?></span>
                                            </td>
                                        <td> 
                                            <span><?= $i['department']; ?></span>
                                        </td>
                                        <td>
                                           <span><?= formatDate($i['date']) ; ?></span>
                                        </td>
                                           <td>
                                            <span><?= $i['time']; ?></span>
                                        </td>
                                           <td>
                                            <span><?= $i['request']; ?></span>
                                        </td>
                                           <td>
                                            <span><?= formatDateTime($i['submitted_date']) ; ?></span>
                                        </td>
                                    </tr>
                            <?php endforeach; ?>
                                   
                                </tbody>
                            </table>



                        </div>
                    </div>
                </div>




                
            </div>
        </section>



         <!-- Start Calender -->
        <section class="section-padding doctor-calendar"  style="background-image: url(assets/images/6.jpg);background-attachment:fixed" >
            <div class="overlay overlay-bg-black"></div>
            <div class="pattern"></div>
            <div class="container">
                <div class="section-header">
                    <div class="section-heading">
                        <h3 class="text-custom-white fw-700">Users</h3>
                        <img src="assets/images/title-icon.png" class="mb-xl-20" alt="img">
                        <div class="section-description">
                            <p class="text-custom-white">
                                Stay Up to Date with Our Doctors' Availability Schedule. Book Your Appointment Today!
                            </p>
                        </div>
                    </div>
                </div>
                <div class="row">
                    <div class="col-12">
                        <div class="doctor-calendar-table table-responsive">

                        <h3 class="text-custom-black fw-700">Users</h3>
                            <table class="table">
                                <thead>
                                    <tr>
                                        <th>S/N</th>
                                        <th>Full Name</th>
                                        <th>Email Address</th>
                                        <th>Phone</th>
                                        <th>Role</th>
                                        <th>Registered On</th>
                                        
                                    </tr>
                                </thead>

                                <tbody>
                                <?php foreach($users as $i): ?>
                                    <tr>
                                        <td><span class="time"><?= $i['id']; ?></span>
                                        </td>
                                        <td>
                                            
                                            <span><?= $i['name']; ?></span>
                                        </td>
                                        <td>
                                            
                                            <span><?= $i['email']; ?></span>
                                        </td>
                                        <td>
                                           
                                            <span><?= $i['phone']; ?></span>
                                        </td>
                                        <td>
                                            <span><?= $i['role']; ?></span>
                                            </td>
                                        <td> 
                                            <span><?= formatDateTime($i['submitted_date']) ; ?></span>
                                        </td>
                                        
                                    </tr>

                                     <?php endforeach; ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>




                
            </div>
        </section>
        <!-- End Calender -->

        <!-- End Newsletter -->
        <!-- Start Footer -->
         <?php include "footer.php" ?>
    </div>

    <!-- /Place all Scripts Here -->
</body>
</html>
