<?php 
$page_name="call_back"; 
include ('../common/library.php');
include ('../common/helper.php');    
include ('../template/header.php'); 
include ('../template/sidebar.php');
 
if(isset($_POST['delete'])){

	$delete_id  = $_POST['delete_id'];
  
	
	if($delete_id>0){
	$update = $conn->query("update call_back set status='Inactive' where id='".$delete_id."'");
	}
	
	if($update==true)
	{
   /* echo '<script>window.location.href = "customer_setup.php";</script>';*/
	$msg =  '<span style="color:green; font-weight:bold; font-size:18px;">Successfully Deleted.</span>';
	
	}
	else
	{
	$msg =  '<span style="color:red; font-weight:bold; font-size:18px;">Plesae Try Again!</span>';
   }
  }

 ?>

		
		<div class="main-panel">
			<div class="content">
				

                     <div class="row">
						<div class="col-md-12">
							<div class="card">
								<div class="card-header">
									<div class="d-flex align-items-center">
										<h4 class="card-title"><?=$msg?></h4>
										
									</div>
								</div>
								<div class="card-body">
									<!-- Modal -->
									

									<div class="table-responsive">
										<table id="add-row" class="display table table-striped table-hover" >
											<thead>
												<tr>
													<th>Id</th>
													<th>Name</th>
													<th>Phone</th>
													<th>Email</th>
													<th>Subject</th>
													<th>Message</th>
													
												</tr>
											</thead>
											<tfoot>																							
													<th></th>
													<th></th>
													<th></th>
													<th></th>
													<th></th>
													<th></th>
													
												</tr>
											</tfoot>
											<tbody>
											<?php
											 $select =$conn->query("select * from tblcontact where 1");
											 while($c_data = $select->fetch_assoc()){ ?>

												<tr>
												    <td><?=$c_data['contact_id']?></td>
													<td><?=$c_data['user_name']?></td>
													<td><?=$c_data['phone']?></td>
													<td><?=$c_data['user_email']?></td>
													<td><?=$c_data['subject']?></td>
													<td><?=$c_data['content']?></td>
													<td>
										
															

															
															
							
														</div>
													</td>
												</tr>
												<?php } ?>
												
											</tbody>
										</table>
									</div>
								</div>
							</div>
						</div>
					</div>


			</div>


<?php include('../template/footer.php');?>