		<?php
		require('../config/config.php');

		$hotel_id = base64_decode($_GET["hotelid"]);
		$month = Date("m");
		$year= Date("y");

		$status = "<img src='../images/cross.jpg' width='20px'>";

		if(isset($_GET['dhid'])&&$_GET['dhid']!='')
		{
			try
			{

				//echo "Here : ".$_GET['dhid']."";
				$delHotelOb = new classHotel;
				$delHotelOb->setHotelID(base64_decode($_GET['dhid']));
				$delHotelOb->deleteHotel();
			}
			catch (MyException $e)
			{
				$error_message = $e->getUserMsg();
				die("$error_message");
			}
		}
		#################### Hotel Detail ##############################################

		if(isset ($hotel_id)&& (($hotel_id!='')))
		 {
			try
			{
				$hotelOb = new classHotel;
				$hotelOb->setHotelID($hotel_id);
				$hotelDataOb = $hotelOb->retrieveHotelByID();

			}
			catch (MyException $e)
			{
				$error_message = $e->getUserMsg();
				die("$error_message");
			}
		}

		try
		{
			$hotelOb = new classHotel;
			$hotelOb->setUserID($_SESSION['security']['user_id']);
			$hotelDataOb = $hotelOb->retrieveUserHotels();
		}
		catch (MyException $e)
		{
			$error_message = $e->getUserMsg();
			die("$error_message");
		}

		/*echo '<pre>';
		print_r($hotelDataOb);
		echo '</pre>';
		*/

		?>

		<!DOCTYPE HTML>
		<html>
		<head>
		<title>Travelexer - Hotels List</title>
		<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
			<meta name="description" content="Pakistan is a destination that has so much to offer in terms of its culture, nature, wild life, mountains, etc.  Search hotels, care rentals, places to eat, tour operators and whatever information you may require to visit and enjoy Pakistan.  We will guide you to places you would have never seen before.">
			<meta name="keywords" content="travelexer, travel, pakistan, explore pakistan, hotel, hotels, rent a car, travel to pakistan, travel in pakistan, tour pakistan, places to eat, cities pakistan, restaurants pakistan, places to eat in pakistan, adventures in pakistan, hotels in pakistan, save on hotels, search hotels in pakistan, search hotels, tours in pakistan, discover pakistan, pakistan travel guide, pakistan travel tips, pakistani cities, pakistan tourism guide, pakistan history, overview of Pakistani cities, Pakistan towns, pakistan mountains, pakistan hotel reservations, hotel rooms, car rentals, tours, restaurants, tour operators, transport, cities, fishing, wild life, polo, K2, visa information, country information, hunza, karachi, lahore, islamabad, swat, kaghan, skardu, balochistan, himalayas" />
			<meta name="author" content="Travelexer">
			<meta name="viewport" content="width=device-width, initial-scale=1.0">

			<link rel="shortcut icon" href="../img/favicon.png">

			<!-- GOOGLE FONTS -->
			<link href='http://fonts.googleapis.com/css?family=Roboto:400,300,100,500,700' rel='stylesheet' type='text/css'>
			<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,400,300,600' rel='stylesheet' type='text/css'>
			<!-- /GOOGLE FONTS -->
			<link rel="stylesheet" href="../css/bootstrap.css">
			<link rel="stylesheet" href="../css/font-awesome.css">
			<link rel="stylesheet" href="../css/icomoon.css">
			<link rel="stylesheet" href="../css/styles.css">
			<link rel="stylesheet" href="../css/mystyles.css">
				<link rel="stylesheet" href="../popUp/popUp.css">
				 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
			<script src="../js/modernizr.js"></script>
		</head>

		<body onload="myFunction(<?php echo $month;?>,<?php echo $year; ?>,<?php echo $hotel_id ?>)">

			<!-- FACEBOOK WIDGET -->
			<div id="fb-root"></div>
			
			<script>
				(function(d, s, id) {
					var js, fjs = d.getElementsByTagName(s)[0];
					if (d.getElementById(id)) return;
					js = d.createElement(s);
					js.id = id;
					js.src = "//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.0";
					fjs.parentNode.insertBefore(js, fjs);
				}(document, 'script', 'facebook-jssdk'));
			</script>

			<script>
		function validateForm(date,type,hid)
		{	
			if (date == "") {
				document.getElementById("TxtStatus").innerHTML = "";
				return;
			} else {
				if (window.XMLHttpRequest) {
					// code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp = new XMLHttpRequest();
				} else {
					// code for IE6, IE5
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange = function() {
					if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
						document.getElementById("TxtStatus").innerHTML = xmlhttp.responseText;
					}
				}
				
				xmlhttp.open("GET","check.php?q="+date+"&hids="+hid+"&type="+type,true);
				
				xmlhttp.send();
			}
		
		}


		function myFunction(mnth,year,hid) {
			mnth = <?php echo $month ; ?> ;
			year = <?php echo $year ; ?> ;
			hid = <?php echo $hotel_id ; ?>;
			if ( mnth  == "") {
				document.getElementById("txtHint").innerHTML = "";
				return;
			} else {
				if (window.XMLHttpRequest) {
					// code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp = new XMLHttpRequest();
				} else {
					// code for IE6, IE5
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange = function() {
					if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
						document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
					}
				}
			
				xmlhttp.open("GET","getuser.php?q="+mnth+"&hids="+hid+"&year="+year,true);
				xmlhttp.send();
			}
		}

		</script>	
			
			<script>
		function showUser(str,hid) {
			if (str == "") {
				document.getElementById("txtHint").innerHTML = "";
				return;
			} else {
				if (window.XMLHttpRequest) {
					// code for IE7+, Firefox, Chrome, Opera, Safari
					xmlhttp = new XMLHttpRequest();
				} else {
					// code for IE6, IE5
					xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
				}
				xmlhttp.onreadystatechange = function() {
					if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
						document.getElementById("txtHint").innerHTML = xmlhttp.responseText;
					}
				}
				hid = <?php echo $hotel_id ; ?>;
				xmlhttp.open("GET","getuser.php?q="+str+"&hids="+hid,true);
				xmlhttp.send();
			}
		}
		</script>
		
			
			<!-- /FACEBOOK WIDGET -->
			<div class="global-wrap">
			
				<header id="main-header">
				
					<div class="header-top">
						<div class="container">
							<div class="row">
								<div class="col-md-3">
									<a class="logo" href="../index.php">
										<img src="../img/logo-invert.png" alt="Travelexer - Hotels, Car Rentals, Restaurants, Tours in Pakistan" title="Travelexer - Hotels, Car Rentals, Restaurants, Tours in Pakistan" />
									</a>
								</div>
								<div class="col-md-3 col-md-offset-2">
									<form class="main-header-search">
										<div class="form-group form-group-icon-left">
											<i class="fa fa-search input-icon"></i>
											<input type="text" class="form-control">
										</div>
									</form>
								</div>
								<div class="col-md-4">
									<div class="top-user-area clearfix">
										<ul class="top-user-area-list list list-horizontal list-border">
											<li class="top-user-area-avatar">
												<?php
												if(isset($_SESSION['security']['user_id']))
												{
													
													?>
													<a href="client-overview.php"><?php echo 'Hi, '.$userOb->getFullNameByUserID($_SESSION['security']['user_id']);?></a>
													<?php
												}
												else
												{
													?>
													<a href="../reguser.php">Register</a>
													<?php
												}
												?>
											</li>
											<li>
												<?php
												if(isset($_SESSION['security']['user_id']))
												{
													?>
													<a href="../logout.php">Sign Out</a>
													<?php
												}
												else
												{
													?>
													<a href="../login.php">Sign In</a>
													<?php
												}
												?>
											
											</li>
											<!--<li class="nav-drop"><a href="#">PKR <i class="fa fa-angle-down"></i><i class="fa fa-angle-up"></i></a>
												<ul class="list nav-drop-menu">
													<li><a href="#">US<span class="right">$</span></a>
													</li>
													<li><a href="#">EUR<span class="right">€</span></a>
													</li>
													<li><a href="#">GBP<span class="right">£</span></a>
													</li>
													<li><a href="#">CAD<span class="right">$</span></a>
													</li>
													<li><a href="#">AUD<span class="right">A$</span></a>
													</li>
												</ul>
											</li>-->
											<li class="top-user-area-lang nav-drop">
												<a href="#">
													<img src="../img/flags/32/pk.png" alt="Image Alternative text" title="Image Title" /> PKR<i class="fa fa-angle-down"></i><i class="fa fa-angle-up"></i>
												</a>
												<ul class="list nav-drop-menu">
													<li>
														<a title="US$" href="#">
															<img src="../img/flags/32/us.png" alt="Image Alternative text" title="Image Title" /><span class="right">US</span>
														</a>
													</li>
													<li>
														<a title="GBP" href="#">
															<img src="../img/flags/32/uk.png" alt="Image Alternative text" title="Image Title" /><span class="right">GBP</span>
														</a>
													</li>
													<li>
														<a title="Euro" href="#">
															<img src="../img/flags/32/eu.png" alt="Image Alternative text" title="Image Title" /><span class="right">EUR</span>
														</a>
													</li>
													<li>
														<a title="CAD" href="#">
															<img src="../img/flags/32/ca.png" alt="Image Alternative text" title="Image Title" /><span class="right">CAD</span>
														</a>
													</li>
													<li>
														<a title="AUD" href="#">
															<img src="../img/flags/32/au.png" alt="Image Alternative text" title="Image Title" /><span class="right">AUD</span>
														</a>
													</li>
												</ul>
											</li>
										</ul>
									</div>
								</div>
							</div>
						</div>
					</div>
					
					<div class="container">
						<div class="nav">
							<ul class="slimmenu" id="slimmenu">
								<?php
								if(in_array('index.php',$array))
								{
									$active1='active';
								}
								elseif(in_array('hotel-search.php',$array))
								{
									$active2='active';
								}
								elseif(in_array('car-search.php',$array))
								{
									$active3='active';
								}
								elseif(in_array('tour-search.php',$array))
								{
									$active4='active';
								}
								elseif(in_array('destinations.php',$array))
								{
									$active5='active';
								}
								else
								{
									$active1='active';
								}
								?>
								<li class="<?php echo @$active1;?>"><a href="../index.php">Home</a></li>
								<li class="<?php echo @$active2;?>"><a href="../hotel-search.php">Hotels</a></li>
								<li class="<?php echo @$active3;?>"><a href="../car-search.php">Rent a Car</a></li><!--
								<li><a href="../eatery-search.php">Places to Eat</a></li>-->
								<li class="<?php echo @$active4;?>"><a href="../tour-search.php">Tours</a></li>
								<li class="<?php echo @$active5;?>"><a href="../destinations.php">Places to See</a></li>
							</ul>
						</div>
					</div>
					
				</header>
				
				<div class="container">
			<h1 class="page-title"></h1>
			</div>

				<div class="container">
				  <div class="row">
					  <div class="col-md-12">
						<h4>Hotel Reservation Chart</h4>
							<a href="client-hotel-preview.php?hotelid= <?php echo base64_decode($hotel_id); ?>   "> << Back </a>
					<div align="center" >   <h4>  Hotel Name : <b><?php echo $hotelDataOb[0]->hotel_name;?> </b> </h4> </div>
					   
						<table class="table table-bordered table-striped table-booking-history">
							<thead>
		<tr>
		<th></th> <div align="center" > 
			<?php
			//echo "Hptel ID = ".$ho;
			$month = Date("m");
			$year = Date("y");
			$hotelObClnder = new Calendar;
			$Emnth = $hotelObClnder->mnth_trsform($month);
			?>
			
				<small>

		 <form>
		  <select name="users" onchange="showUser(this.value)">
		  <option value="">Select Month:</option>
		  <option value="1">January</option>
		  <option value="2">February</option>
		  <option value="3">March</option>
		  <option value="4">April</option>
		  <option value="5">May</option>
		  <option value="6">June</option>
		  <option value="7">July</option>
		  <option value="8">August </option>
		  <option value="9">September</option>
		  <option value="10">October</option>
		  <option value="11">November</option>
		  <option value="12">December</option>
		  </select>
		</form> </small>
			<b>
		 
		 <div id="txtHint"><b>
		 
		 </b></div>
		 &nbsp &nbsp  &nbsp   </a>
		 
		 <div id="TxtStatus"><b></b></div> 
		  &nbsp &nbsp  &nbsp   
		 </b></div>
			<?php
		?>
							</tbody>
						</table>
					   
						<div class="gap">
						</div>
					  </div>
				  </div>
			  </div>
				
				<footer id="main-footer">
				  <div class="container">
						<div class="row row-wrap">
							<div class="col-md-3">
								<a class="logo" href="../index.php">
									<img src="../img/logo-invert.png" alt="Travelexer - Hotels, Car Rentals, Restaurants, Tours in Pakistan" title="Travelexer - Hotels, Car Rentals, Restaurants, Tours in Pakistan" />
								</a>
								<p class="mb20">Booking, reviews and advice on hotels, car rentals, places to eat, travel packages, and lots more, especially for tourists in Pakistan!</p>
								<ul class="list list-horizontal list-space">
									<li>
										<a class="fa fa-facebook box-icon-normal round animate-icon-bottom-to-top" href="#"></a>
									</li>
									<li>
										<a class="fa fa-twitter box-icon-normal round animate-icon-bottom-to-top" href="#"></a>
									</li>
									<li>
										<a class="fa fa-google-plus box-icon-normal round animate-icon-bottom-to-top" href="#"></a>
									</li>
									<li>
										<a class="fa fa-linkedin box-icon-normal round animate-icon-bottom-to-top" href="#"></a>
									</li>
									<li>
										<a class="fa fa-pinterest box-icon-normal round animate-icon-bottom-to-top" href="#"></a>
									</li>
								</ul>
							</div>

							<div class="col-md-3">
								<h4>Newsletter</h4>
								<form>
									<label>Enter your E-mail Address</label>
									<input type="text" class="form-control">
									<p class="mt5"><small>*We Never Send Spam</small>
									</p>
									<input type="submit" class="btn btn-primary" value="Subscribe">
								</form><a href="../success.php">success</a>
							</div>
							<div class="col-md-2">
								<ul class="list list-footer">
									<li><a href="../aboutus.php">About Us</a>
									</li>
									<li><a href="../faq.php">FAQs</a>
									</li>
									<li><a href="../feedback.php">Feedback</a>
									</li>
									<li><a href="../contactus.php">Contact Us</a>
									</li>
								</ul>
							</div>
							<div class="col-md-3">
								<ul class="list list-footer">
									<li><a href="../feedback.php">How it Works?</a>
									</li>
									<li><a href="../regclient.php">Add your Business</a>
									</li>
									<li><a href="../terms.php">Terms of Use</a>
									</li>
									<li><a href="../privacy.php">Privacy Policy</a>
									</li>
								</ul>
							</div>
							<div class="col-md-4">
								<h4>Have Questions?</h4>
								<h4 class="text-color">+92-322-615-5219</h4>
								<h4><a href="mailto:support@trevelexer.com" class="text-color">support@travelexer.com</a></h4>
								<p>9:00 am to 11:00 pm Dedicated Customer Support</p>
							</div>

						</div>
					</div>
				</footer>

				<script src="../js/jquery.js"></script>
				<script src="../js/bootstrap.js"></script>
				<script src="../js/slimmenu.js"></script>
				<script src="../js/bootstrap-datepicker.js"></script>
				<script src="../js/bootstrap-timepicker.js"></script>
				<script src="../js/nicescroll.js"></script>
				<script src="../js/dropit.js"></script>
				<script src="../js/ionrangeslider.js"></script>
				<script src="../js/icheck.js"></script>
				<script src="../js/fotorama.js"></script>
				<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false"></script>
				<script src="../js/typeahead.js"></script>
				<script src="../js/card-payment.js"></script>
				<script src="../js/magnific.js"></script>
				<script src="../js/owl-carousel.js"></script>
				<script src="../js/fitvids.js"></script>
				<script src="../js/tweet.js"></script>
				<script src="../js/countdown.js"></script>
				<script src="../js/gridrotator.js"></script>
				<script src="../js/custom.js"></script>
				<script src="../js/checks.js"></script> 
				<script src="../js/ajax.js"></script> 
				<script src="../popUp/popUp.js"></script> 
			</div>
		</body>
		</html>


