<div class="page-titles">
    <ol class="breadcrumb">
        <li class="breadcrumb-item"><a href="javascript:void(0)">Home</a></li>
        <li class="breadcrumb-item active"><a href="javascript:void(0)">Properties Enquiries List</a></li>
    </ol>
</div>
<!-- row -->
<div class="row">
    <div class="col-12">
        <div class="card">
            <div class="card-header">
                <h4 class="card-title">Properties Enquiries List</h4>
            </div>
            <div class="card-body">
                <div class="table-responsive">
                    <table class="display table" style="min-width: 850px">
                        <thead>
                            <tr>
                                <th>Name</th>
                                <th>Email </th>
                                <th>Mobile No</th>
                                <th>Address</th>
                                <th>Check In</th>
                                <th>Check Out</th>
                                <th>Guest</th>
                                <th>Enquiry Date</th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php if ($enquiries_count > 0) { ?>
                                <?php foreach ($enquiries_list as $ev) { ?>
                                    <tr>
                                        <td><?php echo $ev['name']; ?></td>
                                        <td><?php echo $ev['email']; ?></td>
                                        <td><?php echo $ev['phone']; ?></td>
                                        <td><?php echo $ev['address']; ?></td>
                                        <td><?php echo date('d,M Y', strtotime($ev['checkin'])); ?></td>
                                        <td><?php echo date('d,M Y', strtotime($ev['checkout'])); ?></td>
                                        <td><?php echo $ev['adults']; ?></td>
                                        <td><?php echo !empty($ev['added_date']) ? date('d,M Y h:s A', strtotime($ev['added_date'])) : ''; ?></td>
                                    </tr>
                                <?php } ?>
                            <?php } else { ?>
                                <tr>
                                    <td colspan="8" class="text-center">No Records Found</td>
                                </tr>
                            <?php } ?>
                        </tbody>
                    </table>
                </div>

                <?php if ($enquiries_count > 0) { ?>
                    <div class="col-lg-12">
                        <p class="mb-2 me-3">
                            <?= $enquiries_pagination->displayLinks(ADMIN_URL . 'enquiries'); ?>
                        </p>
                    </div>
                <?php } ?>
            </div>
        </div>
    </div>
</div>