<?php include("header.php");
 include("side.php");
 include("../db.php");

$sql=mysqli_query($conn,"SELECT * FROM `contact_enquiry` WHERE 1");

?>
            <div id="layoutSidenav_content">
                <main>
                    <div class="container-fluid">
                        <h2 class="mt-30 page-title">Customers</h2>
                        <ol class="breadcrumb mb-30">
                            <li class="breadcrumb-item"><a href="index.html">Dashboard</a></li>
                            <li class="breadcrumb-item active">Customers</li>
                        </ol>
                        <div class="row">
							<div class="col-lg-12 col-md-12">
								<div class="card card-static-2 mb-30">
									<div class="card-title-2">
										<h4>All Customers</h4>
									</div>
									<div class="card-body-table">
										<div class="table-responsive">
											<table class="table ucp-table table-hover" id="table_id">
												<thead>
													<tr>
														<th style="width:60px">ID</th>
														<th style="width:100px">Image</th>
														<th>Name</th>
														<th>Email</th>
														<th>Phone</th>
														<th>Message</th>
														<th>Action</th>
													</tr>
												</thead>
												<tbody>
												<?php $sn='1';	while ($row=mysqli_fetch_object($sql)) { ?>

													<tr>
														<td style="padding:8px 30px!important;"><?=$sn++;?></td>
														<td>
															<div class="cate-img-6">
																<img src=
																<?php if(!empty($row->image)) { echo '../uploads/'.$row->image; } else { echo 'images/avatar/img-1.jpg'; }  ?>
																>
															</div>
														</td>
														<td><?=$row->name;?></td>
														<td><?=$row->email;?></td>
														<td><?=$row->mobile;?></td>
														<td><?=$row->message;?></td>
														<td class="action-btns">
															
															<a href="delete.php?customer=<?=$row->id;?>" class="delete-btn" title="Edit"><i class="fas fa-trash-alt"></i></a>
														</td>
													</tr>
												<?php } ?>
													
												</tbody>
											</table>
										</div>
									</div>
								</div>
							</div>
                        </div>
                    </div>
                </main>
               <?php include("footer.php"); ?>