<?php 
		include("connection/conn.php");
		if($_SESSION['adminuser']==''){
			header("location:index.php");
			exit();
		}
       	$adjacents = 3;
		$select_1="select * from bookings order by cid desc";
		$query_1=mysqli_query($link,$select_1);
		$total_pages=mysqli_num_rows($query_1);
		$path="dat=$dat&dat1=$dat1&centername=$centername";
		$targetpage="manage-booking.php"; 	   
		$limit=20; 								
		$page=$_GET['page'];
		if($page){
			$start=($page - 200) * $limit; 
		}		
		else
		{
			$start=0;		
		}
		$sql="select * from bookings order by cid desc LIMIT $start, $limit";
		$result=mysqli_query($link,$sql);
		$count=mysqli_num_rows($result);
		if($page==200) 
		$page=2000;					              
		$prev=$page-1;							
		$next=$page+1;							
		$lastpage=ceil($total_pages/$limit);		
		$lpm1=$lastpage-1;		
	// Export Data In CSV Format	
	
?>
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Administrator | Manage Contact</title>
		<link href="css/bootstrap.css" rel="stylesheet" />
		<link href="css/style.css" rel="stylesheet" />
		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
		<link href='http://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
	</head>
	
	<body>
		<div id="wrapper">
			<?php
				include("top-header.php");
				include("right-sec.php");
			?>
			<div id="page-wrapper" >
				<div id="page-inner">
					<div class="row">
						<div class="col-md-12">
							<h3 class="page-header">
								Manage Booking Section<small></small>
							</h3>
							
							<div class="table-sec">
								<table>
								
									<tr>
										<th>Id</th>
										<th>Name</th>
										<th>Mobile</th>
										<th>Email ID</th>
										<th>services</th>
										<th>booking-date</th>					
										<th>booking-time</th>
										<th>Date</th>			
										<th>Status</a></th>
									</tr>
									<?php
									  $i=1;
									  while($find=mysqli_fetch_array($result)){
										$color = (($i%2) == 0)?"#e7f3ff":"#FFFFFF";
										
								?>
									<tr>
										<td><?php echo $i;?></td>
										
										<td><?php echo $find['name'];?></td>
										<td><?php echo $find['mobile'];?></td>
										<td><?php echo $find['email'];?></td>
										<td><?php echo $find['services'];?></td>
										<td> <?php echo $find['book_date'];?></td>
										<td> <?php echo $find['book_time'];?></td>
											<td> <?php echo $find['date'];?></td>
										<td>
											<ul class="table-ul">
												
												
												
												<li><a href="delete-Booking.php?id=<?php echo $find['cid'];?>" onclick="return confirm('are you sure delete this?');"><i class="delete fa fa-trash"></i></a></li>
											</ul>
										</td>
									</tr>
									  <?php $i++; } ?>
									
								</table>
							</div>
						</div>
					</div> 
				</div>
			</div>
			<footer class="footer-sec">
				<div class="container">
					<div class="row">
						<div class="col-md-12">
							<p class="text-center">All right reserved. Template Design by: <a href="">SPADENT HOSPITAL</a></p>
						</div>
					</div>
				</div>
			</footer>
		</div>
		
		
		<!-- jQuery Js -->
		<script src="js/jquery-1.10.2.js"></script>
		<script src="js/bootstrap.min.js"></script>
		<script src="js/jquery.metisMenu.js"></script>
		<script src="js/custom-scripts.js"></script>
	</body>
</html>
