	<input type="hidden" id="baseurl" value="<?php echo base_url(); ?>" >
	<!----Banner Start---->
	<div class="fd_bread_wrapper">
		<div class="container">
			<div class="row">
				<div class="col-lg-12">
					<div class="fd_bread">
						<h1 class="fd_page_title"><span>reservation</span></h1>
						<nav aria-label="breadcrumb">
						  <ol class="breadcrumb">
							<li class="breadcrumb-item"><a href="<?php echo base_url(); ?>">Home</a></li>
							<li class="breadcrumb-item active" aria-current="page">reservation</li>
						  </ol>
						</nav>
					</div>
				</div>
			</div>
		</div>
	</div>
	
<!----Booking Section Start---->
<?php if($this->hs->getwebsettings('booking_section') == 1){  ?>
<?php if(!empty($all_tables)){ ?>
	<div class="fd_booking_wrapper fd_reserve_booking_table">
		<div class="container">
			<div class="row justify-content-center">
				<div class="col-lg-12">
					<div class="fd_heading text-center btm_marger50">
						<?php if($this->hs->getwebsettings('bookingheading_show') == 1){  ?>
						<h2><?php echo $this->hs->getwebsettings('bookingheading_text'); ?></h2>
					  <?php } ?>
						  <?php if($this->hs->getwebsettings('bookingtitle_show') == 1){  ?>
						<h1><?php echo $this->hs->getwebsettings('bookingtitle_text'); ?></h1>
						<?php } ?>
					</div>
				</div>
				<!----Booking Table Section Start--->
				 
				<div class="col-lg-12 col-md-12">
				<div class="fd_book_table_wrapper">
					<div class="fd_table_head">open table booking
						<div class="swiper-button-next13"><i class="fa fa-chevron-left" aria-hidden="true"></i></div>
						<div class="swiper-button-prev13"><i class="fa fa-chevron-right" aria-hidden="true"></i></div>
					</div>
						<div class="fd_book_table_slider swiper-container">
							<div class="swiper-wrapper">
								<div class="swiper-slide">
									<div class="fd_table_box">
										<ul>
										<?php   
										$count_table =0;
											foreach($all_tables as $tabledetails){	$count_table++;		
										    $tabid = $tabledetails->table_id;
											$current_date = date('d-M-Y');
											$check_bookedtable = $this->Data_access_model->select_data('reservation_date','hs_reservation_details',array('booked_table' =>  $tabid ,'reservation_date' =>$current_date,));
										
										    if($check_bookedtable->num_rows() > 0){  ?>
										
											 <li class="table_booked"><img src="<?php echo base_url().$tabledetails->table_image; ?> " alt="" >
											<span class="table_no"><?php echo "Booked"; ?></span></a>	
											</li>
											
										<?php }else{ ?>
											<li onclick="booktable_id(<?php echo $tabledetails->table_id; ?>)"><a href="javascript:;" ><img src="<?php echo base_url().$tabledetails->table_image; ?> " alt="" >
											<span class="table_no"><?php echo $tabledetails->table_name; ?></span></a>	
											</li>
										<?php
										  }	
                                                   if($count_table == 12){
													echo '</ul></div></div><div class="swiper-slide">
													<div class="fd_table_box"><ul>';
													$count_table =0;
												}  					
											}
									   
										?>
										</ul>
									</div>									
								</div>
								 
							</div>
						</div>	
					</div>
				</div>

			</div>
		</div>
	</div>
	
	<!----Booking Section Start---->
<?php if($this->hs->getwebsettings('booking_section') == 1){  ?> 
	<div class="fd_booking_wrapper space_manage" id="booking_form">
		<div class="container">
			<div class="row">
				<div class="col-lg-12">
					<div class="fd_heading text-center btm_marger50">
					  <?php if($this->hs->getwebsettings('bookingheading_show') == 1){  ?>
						<h2><?php echo $this->hs->getwebsettings('bookingheading_text'); ?></h2>
					  <?php } ?>
						  <?php if($this->hs->getwebsettings('bookingtitle_show') == 1){  ?>
						<h1><?php echo $this->hs->getwebsettings('bookingtitle_text'); ?></h1>
						<?php } ?>
					</div>
				</div>
				<div class="col-lg-8">
					<div class="fd_booking_form">
					 <?php if($this->hs->getwebsettings('bookingformheading_show') == 1){  ?>
			 			<h3><?php echo $this->hs->getwebsettings('bookingformheading_text'); ?> </h3>
					 <?php } ?>
						<div class="row">
							<div class="col-lg-4">
							<input type="hidden" name="btable_id" id="btable_id">
								<div class="fd_input_group">
									<label>date</label>
									<div class="input-group">
									  <input class="form-control datepicker" placeholder="Date" id="b_date" name="b_date"/><span class="input-group-icon"><img src="<?php echo base_url(); ?>themeassets/images/svg/calendr.svg" alt="" ></span>
									</div>
								</div>
								<div class="fd_input_group">
									<label>Occasion (Optional)</label>
									<select class=" cusom_select" id="b_occasion" name="b_occasion">
									 <option value="">Occasion</option>
									 <?php if(!empty($all_occasion)){ 
									      foreach($all_occasion as $occasion_list){
									  ?>
									 
									  <option value="<?php echo $occasion_list->occasion_id; ?>"><?php echo $occasion_list->occasion_name; ?></option>
									 <?php } } ?>
									   <option value="0">Other</option>
									</select>
								</div>
								<div class="fd_input_group">
									<label>name</label>
									<div class="input-group">
									  <input type="text" class="form-control" placeholder="Name" id="b_name" name="b_name" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_name',$_SESSION['userid']); } ?>" <?php if(isset($_SESSION['userid'])){ echo "disabled"; } ?>/>
									</div>
								</div>
							</div>
							<div class="col-lg-4">
								<div class="fd_input_group">
									<label>time</label>
									<div class="input-group">
									  <input class="form-control timepicker" placeholder="Time" id="b_time" name="b_time"><span class="input-group-icon"><img src="<?php echo base_url(); ?>themeassets/images/svg/time.svg" alt="" ></span>
									</div>
								</div>
								<div class="fd_input_group">
									<label>Preferred Food (Optional)</label>
									<select class=" cusom_select" id="b_preferredfood" name="b_preferredfood[]">
									  <option value="0" selected>Select Food</option>
									  <?php if(!empty($all_products)){ 
									      foreach($all_products as $food_list){
									  ?>
									  <option value="<?php echo $food_list->prod_id; ?>"><?php echo $food_list->prod_name; ?></option>
									  <?php } } ?>
									  
									</select>
								</div>
								<div class="fd_input_group">
									<label>Email</label>
									<div class="input-group">
									  <input class="form-control" placeholder="Email" type="text" name="b_email" id="b_email" value="<?php if(isset($_SESSION['userid'])){ echo $this->hs->get_userdetails('user_email',$_SESSION['userid']); } ?>" <?php if(isset($_SESSION['userid'])){ echo "disabled"; } ?>/>
									</div>
								</div>
							</div>
							<div class="col-lg-4">
							
								<div class="fd_input_group">
								<label>people</label>
									<div class="input-group">
									 <select class=" cusom_select" id="no_of_people" name="no_of_people">
									  <option value="0">Select No of People</option>
									  <?php $i =1; 
									     for($i =1;$i<=100;$i++){ ?>
									  
									  <option value="<?php echo $i; ?>"><?php echo $i; ?>  People</option>
									 
									<?php } ?>
									</select>
									</div>
								</div>
								<div class="fd_input_group">
									<label>Message (Optional)</label>
									<textarea class="form-control" placeholder="Message" id="b_msg" name="b_msg"></textarea>
								</div>
							</div>
							<div class="col-lg-8">
								<div class="book_form_note">Please Submit your reservation details and we will contact you to confirm your booking</div>
							</div>
							<div class="col-lg-4">
								<div class="fd_btn_wrapper">
								<?php if($this->hs->getwebsettings('bookingbutton_show') == 1){  ?>
									<a onclick="table_booking()" class="fd_btn"><?php echo $this->hs->getwebsettings('bookingbutton_text'); ?></a>
								<?php } ?>
								</div>
							</div>
						</div>		
					</div>
				</div>
				<div class="col-lg-4">
					<div class="fd_book_img">
							<?php  $booksec_img = $this->hs->getwebsettings('bookingsection_img');
							if(!empty($booksec_img)){ ?>
						<img src="<?php echo base_url().$booksec_img; ?>" alt="" class="img-fluid"/>
							<?php }else{  ?>
							<img src="<?php echo base_url(); ?>themeassets/images/book_img.jpg" alt="" class="img-fluid"/>
							<?php } ?>
					</div>
				</div>
			</div>
		</div>
	</div>
	
<?php
	  }
 }	
}  
?>
	