<div class="body-content">

                        <div class="row">

                            <div class="col-md-12 col-lg-12">

                                <div class="card mb-4">

                                    <div class="card-header">

                                        <div class="d-flex justify-content-between align-items-center">

                                            <div>

                                                <h6 class="fs-17 font-weight-600 mb-0">Clients Enquiries</h6>

                                            </div>

                                            

                                        </div>

                                    </div>

                                    

                                    <div class="card-body">

                                    <table class="table display table-bordered table-striped table-hover enable-disable">



                    <thead bgcolor="#666666" style="color:#FFF;"><tr><th>S.No.</th><th>Date</th><th>User</th><th>Subject</th><th>Message</th><th>Action</th></tr></thead>



                    <tbody>



                        <?php $i=1;foreach($enqs as $dep){?>



                        <tr><td><?php echo $i;?></td>



                            <td><?php echo date("d M'y h:i a",strtotime($dep->enq_datetime));?></td>



                            <td><?php echo $dep->enq_name;?><br/>
                            <i class="fa fa-phone"></i> <?php echo $dep->enq_phone;?><br/>
                            <i class="fa fa-envelope"></i> <?php echo $dep->enq_mail;?></td>



                            <td><?php echo $dep->enq_subject;?></td>



                            <td><?php echo $dep->enq_msg;?><br/>
                            <b class="text-danger"><?php echo $dep->enq_reply;?></b></td>



            



                            


                            <td>
                            <a href="" class="btn btn-primary reply_box btn-sm"  data-toggle="modal" data-target="#depo_modal" id="<?php echo $dep->enq_id;?>"><i class="fa fa-eye"></i> Reply</a>
                            
                            <a class="btn btn-sm btn-danger enq_delete" title="delete"  href="#" id="<?php echo $dep->enq_id;?>"><i class="fa fa-trash"></i></a></td></tr>



                        <?php $i++;}?>



                    </tbody>



                </table>


<div class="modal fade" id="depo_modal" role="dialog">

            <div class="modal-dialog modal-sm">

              <div class="modal-content">

                <div class="modal-header">

                  <h5 class="modal-title text-warning">Client Enquiry Reply</h5>

                  <button type="button" class="close" data-dismiss="modal">&times;</button>

                </div>

                <div class="modal-body reply_div">

                </div>

              </div>

            </div>

        </div>
                

      </div>

                    				</div>

                                </div>

                            

                            </div>

                        </div>

                    </div><!--/.body content-->

                </div><!--/.main content-->

                

            </div><!--/.wrapper-->

        </div>

        <!--Global script(used by all pages)-->

        <script>



	$(document).ready(function(){

$(".reply_box").click(function(e){e.preventDefault();
						var id=$(this).attr("id");
						$(".depo_div").html('<h5>Fetching Details...</h5>');
						$.ajax({
							 type: "POST",
							 url: '<?php echo base_url();?>swadmin/ajax_reply_view',
							 data: {id:id},
							 success: function(res){
								 	$(".reply_div").html(res);
								}
							 });
					});

		$(".enq_delete").click(function(e){e.preventDefault();



		if (!confirm("Sure you want to delete?")){



				  return false;



				}



			var id=$(this).attr("id");



			$(this).closest("tr").remove();



			$.ajax({



							 type: "POST",



							 url: '<?php echo base_url();?>swadmin/enq_delete',



							 data: {id:id},



							 success: function(response){



								 //alert(response);



							 }



							 });



		});



	});



</script>

        

        <script src="<?php echo base_url();?>adminassets/plugins/metisMenu/metisMenu.min.js"></script>

        <script src="<?php echo base_url();?>adminassets/plugins/perfect-scrollbar/dist/perfect-scrollbar.min.js"></script>

        <!-- Third Party Scripts(used by this page)-->

        <script src="<?php echo base_url();?>adminassets/plugins/sparkline/sparkline.min.js"></script>

        <!--Page Active Scripts(used by this page)-->

        

        <script src="<?php echo base_url();?>adminassets/plugins/datatables/dataTables.min.js"></script>

        <script src="<?php echo base_url();?>adminassets/plugins/datatables/dataTables.bootstrap4.min.js"></script>

        <!--Page Active Scripts(used by this page)-->

        <script src="<?php echo base_url();?>adminassets/plugins/datatables/data-basic.active.js"></script>

        <!--Page Scripts(used by all page)-->

        <script src="<?php echo base_url();?>adminassets/dist/js/sidebar.js"></script>

    </body>

</html>