<!DOCTYPE html>
<html lang="en">
<?php
	include('include/session.php');
	include('include/function.php');
	include('include/db.php');
	error_reporting(0);
	$slide=8;
?>
<head>
	<meta charset="UTF-8">
	<title><?php if($lang==1){ show_web(10,"site_title");} else{ echo show_web(11,"site_title"); } ?></title>
	<meta name="description" content="<?php if($lang==1){ show_web(10,"site_description");} else{ echo show_web(11,"site_description"); } ?>" />
    <meta name="keywords" content="<?php if($lang==1){ show_web(10,"site_keyword");} else{ echo show_web(11,"site_keyword"); } ?>" />
	
	<meta name="description" content="" />
    <meta name="keywords" content="" />

	<?php include('include/head.php'); ?>
	<?php include('include/script-scroll.php'); ?>
</head>
<body>
		<?php include('include/slide.php'); ?>
	<div id="main">
		<div class="container">
			<?php
				if($lang==1){
			 		include('include/left-en.php'); 
			 	}else{
			 		include('include/left-gm.php');
			 	}
			 ?>

			<div class="main-right">
				<?php include('include/top-place.php'); ?>
				<div class="main-right-content c-d">
					<div class="titile-welcome">
						<table width="100%" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td>
									<?php
										if($lang==1){
											include('include/search-hotel-en.php');
										}else{
											include('include/search-hotel-gm.php');
										}
									?>
								</td>
								<td>
									<?php
										if($lang==1){
											include('include/category-en.php');
										}
										else{
											include('include/category-gm.php');
										}
									?>
								</td>
							</tr>
						</table>
						<span class="b-down"></span>
					</div>
					<div class="main-right-body clearfix">
					<?php
						if(!empty($_GET['detail']) AND !empty($_GET['country'])){
							$detail=$_GET['detail'];
							$country=$_GET['country'];
						}
						$result=$Con->query("SELECT * FROM tbl_hotel WHERE hotel_or_id= {$detail} AND language_id={$lang} AND country_id={$country} ");
						$row=mysqli_fetch_object($result);
					?>
						
						<h2 style="text-transform: uppercase;" ><?php echo $row->hotel_name;?></h2>
						<?php echo $row->descriptioin;?>
						<div id="book_price">
							<!--<div class="price">Price From <br> <span>$800.00</span> </div>-->
							<?php if($lang==1){ ?>
							<div class="book_text"><a href="booking-hotel.php?hotel=<?php echo $detail."&country=".$country;?>">book now</a></div>
							<?php }else{ ?>
							<div class="book_text"><a href="booking-hotel.php?hotel=<?php echo $detail."&country=".$country;?>">jetzt buchen</a></div>
							<?php } ?>
						</div>
						<div class="slideshow">
							<ul id="imageGallery">
						<?php
							$result1=$Con->query("SELECT * FROM tbl_hotel_photo WHERE hotel_or_id={$detail} ORDER BY order_by");
							while($row1=mysqli_fetch_object($result1)){
						?>
							
								<li data-thumb="userfiles/hotel/thum/<?php echo $row1->photo_thum;?>" >
									<img src="userfiles/hotel/<?php echo $row1->photo;?>" alt="<?php echo $row1->photo;?>" />
								</li>
						<?php } ?>
							</ul>
						</div>
						<?php
							$result2=$Con->query("SELECT * FROM tbl_hotel_submenu WHERE hotel_id={$detail} AND language_id={$lang} ");
							while($row2=mysqli_fetch_object($result2)){								
						?>
						<div class="toggle-title">
							<a href="#con-<?php echo $row2->submenu_id; ?>" class="toggl"><?php echo $row2->title;?><i class="fa fa-chevron-down pull-right"></i></a>
						</div>	
						<div class="toggle-content" id="con-<?php echo $row2->submenu_id;?>">
							<?php echo $row2->description; ?>
						</div>
						<?php } ?>
						
					</div>
					<?php if($lang==1){?>
					<div class="titile-welcome relate">ADD-ON SUGGESTIONS</div>
					<?php }else{ ?>
					<div class="titile-welcome relate">ADD-ON VORSCHLÄGE</div>
					<?php } ?>
					<div class="main-right-body">
						<div class="tour clearfix" id="tour">

						<?php																				
							$result=$Con->query("SELECT * FROM tbl_tour WHERE language_id={$lang} AND country_id={$country} ORDER BY rand() LIMIT 8");
							while($row=mysqli_fetch_object($result)){
								$tour=$row->tour_name_id;
								$country=$row->country_id;
						?>
							<div class="tour-block">
						        <div class="tour-title" >
						        	<?php
						        		$title=$row->tour_name;
							          	$leng=strlen($title);
							          	if($leng>=37){
						        	?>
							         <a href="tour-detail.php?detail=<?php echo $tour.'&country='.$country;?>" rel="tooltip" title="<?php echo $title;?>">
							          <span class="tour-title"  >
							          	<?php
							          			$trim=substr($title,0,35);
							          			$space=explode(" ",$trim);
							          			$word=$space[count($space)-1];
							          			echo rtrim($trim,$word);
							          			echo"...";
							          		
							          		}else{							          		
							          	?>
							          </span>							          
							         </a>
							        <a href="tour-detail.php?detail=<?php echo $tour.'&country='.$country;?>"> 
							        <span class="tour-title"><?php echo $title; } ?></span></a>
						        </div>
						        <div class="tour-img">
						         	<a href="tour-detail.php?detail=<?php echo $tour.'&country='.$country;?>"><img src="userfiles/tour/<?php echo $row->photo;?>"  height="120" width="180" alt="<?php echo $title; ?>"></a>
						        </div>
						    </div>
						<?php } ?>
					</div>
				</div>
			</div>
			</div><!--/main-right-->
			<?php include ('include/destination.php'); ?>
			<?php include('include/travel-style.php'); ?>
		</div><!--/container-->
	</div><!--/main-->
	
	<?php include('include/script.php'); ?>
</body>
</html>