<ul class="breadcrumb">
    <li><a href="<?= site_url('admin/dashboard') ?>">Home</a></li>
    <li class="active"><?php echo $breadcum ?></li> 
</ul>
<div class="page-content-wrap">                
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">
                <?php if ($this->session->flashdata('EnquirySuccess')) { ?>  
                    <div class="alert alert-success"> <?= $this->session->flashdata('EnquirySuccess') ?></div>
                <?php } ?>
                <div class="panel-heading">
                    <h3 class="panel-title">Manage Enquiry</h3>                                   
                </div>
                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table datatable_simple">
                            <thead>
                                <tr>
                                    <th>Full Name</th>         
                                    <th>Email</th>     
                                    <th>Phone No</th>                                                                         
                                    <th>Location</th>                                                                         
                                    <th>Read Status</th>
                                    <th>Action</th>   
                                </tr>
                            </thead>
                            <tbody>   
                                <?php                                
                                    foreach ($enquiry_data as $enquiry) {
                                        $province_name = $this->common_model->getSingleFieldFromAnyTable('province_name', 'province_id', $enquiry['location_id'], 'tbl_province');
                                        ?>
                                        <tr id="trow">

                                            <td><?php echo (isset($enquiry['full_name'])) ? $enquiry['full_name'] : '-'; ?></td>
                                            <td><?php echo (isset($enquiry['email_id'])) ? $enquiry['email_id'] : '-'; ?></td>
                                            <td><?php echo (isset($enquiry['phone_no'])) ? $enquiry['phone_no'] : '-'; ?></td>
                                            <td><?php echo $province_name ?></td>
                                            <td><?php echo (isset($enquiry['read_status'])) && $enquiry['read_status'] == 'read' ? "<span class='label label-success'>Read" : "<span class='label label-danger'>Unread"; ?></td>                                              
                                            <td>
                                                <a data-height="800" style="float: contour;" data-width="790" class="fancybox fancybox.iframe btn btn-default btn-rounded btn-condensed btn-sm" href="<?= base_url() . 'admin/enquiry-view/' . $enquiry['client_id']; ?>"><span class="fa fa-eye" title="view"></span></a> 

                                                <a href="javascript:" data-href="<?= base_url() . 'admin/enquiry-delete/' . $enquiry['client_id'] ?>" class="btn btn-danger btn-rounded btn-condensed btn-sm delete"><span class="fa fa-times" title="delete"></span></a>
                                            </td> 
                                        </tr>                                          
                                <?php } ?>   
                            </tbody>
                        </table>
                    </div>                                
                </div>
            </div>                                                
        </div>
    </div>
</div>
