<!DOCTYPE html>
<html lang="en">
<?php
	include('include/session.php');
	include('include/function.php');
	include('include/db.php');
	$slide=7;
?>
<head>
	<meta charset="UTF-8">
	<title><?php if($lang==1){ show_web(28,"site_title");} else{ echo show_web(29,"site_title"); } ?></title>
	<meta name="description" content="<?php if($lang==1){ show_web(28,"site_description");} else{ echo show_web(29,"site_description"); } ?>" />
    <meta name="keywords" content="<?php if($lang==1){ show_web(28,"site_keyword");} else{ echo show_web(29,"site_keyword"); } ?>" />
	<?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){															
								?>
									<select class="search" style="width: 770px;" onChange="window.location.href=this.value">
										<option class="combobox combobox_title">Prefer Country</option>
			                            <option class="combobox" value="index.php">CAMBODIA</option>
			                            <option class="combobox" value="vietnam.php">VIETNAM</option>
			                            <option class="combobox" value="laos.php">LAOS</option>
			                            <option class="combobox" value="thailand.php">THAILAND</option>
			                            <option class="combobox" value="myanmar.php">MYANMAR</option>	
			                    <?php
			                     	}			                     
			                     else{
			                     ?>		                            
			                        </select>			                    
			                    	<select class="search" style="width: 770px;" onChange="window.location.href=this.value">
			                        	<option class="combobox combobox_title">LIEBER NACH LÄNDERN</option>
			                  		    <option class="combobox" value="index.php">KAMBODHA</option>
			                            <option class="combobox" value="vietnam.php">VIETNAM</option>
			                            <option class="combobox" value="laos.php">LAOS</option>
			                            <option class="combobox" value="thailand.php">THAILAND</option>
			                            <option class="combobox" value="myanmar.php">MYANMAR</option>
			                    <?php			                     
			                     } 
			                    ?>			                            
			                        </select>			                    
								</td>
							</tr>
						</table>
						<span class="b-down"></span>
					</div>
					<div class="main-right-body clearfix">
						<?php	
							if(!empty($_GET['detail'])){
						    $get_id=$_GET['detail'];}							
							$result3=$Con->query("SELECT * FROM tbl_tour WHERE tour_name_id={$get_id} AND language_id={$lang}");
							$row3=mysqli_fetch_object($result3);
						?>
						
						<h2><?php echo $row3->tour_name; ?></h2>
						<?php echo $row3->description;?>
						<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.php?book=<?php echo $get_id;?>">book now</a></div>
							<?php 
								}
								else{
							?>
							<div class="book_text"><a href="booking.php?book=<?php echo $get_id;?>">jetzt buchen</a></div>
							<?php } ?>
						</div>
						<div class="slideshow">
							<ul id="imageGallery">
							<?php 
								$result4=$Con->query("SELECT * FROM tbl_tour_photo WHERE tour_name_id={$get_id} ORDER BY order_by ASC");
								while($row4=mysqli_fetch_object($result4)){
							?>
								<li data-thumb="userfiles/tour/thum/<?php echo $row4->photo_thum;?>" >
									<img src="userfiles/tour/<?php echo $row4->photo;?>" alt="<?php echo $row4->photo;?>" />
								</li>
								<?php } ?>								
							</ul>
						</div>
						<?php
							$result5=$Con->query("SELECT * FROM tbl_tour_submenu WHERE  tour_name_id={$get_id} AND language_id={$lang} ORDER BY order_by");
							while($row5=mysqli_fetch_object($result5)){
								$id=$row5->sub_id;
						?>
						<div class="toggle-title">
							<a href="#con-<?php echo $id;?>" class="toggl"><?php echo $row5->title;?><i class="fa fa-chevron-down pull-right"></i></a>
						</div>	
						<div class="toggle-content" id="con-<?php echo $id;?>">
							<?php echo $row5->description; ?>
						</div>
						<?php } ?>
						
					</div>
					<?php
					if($lang==1){
						echo "<div class='titile-welcome relate'>ADD-ON SUGGESTIONS</div>";
					}
					else{
						echo "<div class='titile-welcome relate'>ADD-ON VORSCHLÄGE</div>";
					}
					?>							
					
					<div class="main-right-body">
						<div class="tour clearfix" id="tour">

						<?php	
							if(!empty($_GET['country'])){
								$country=$_GET['country'];
							}
							$result=$Con->query("SELECT * FROM tbl_tour WHERE tour_name_id<>{$get_id} AND 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" >
							         <a href="tour-detail.php?detail=<?php echo $tour.'&country='.$country;?>" rel="tooltip" title="<?php echo $row->tour_name;?>">
							          <span class="tour-title"  >
							          	<?php
							          		$title=$row->tour_name;
							          		$leng=strlen($title);
							          		if($leng>=37){
							          			$trim=substr($title,0,35);
							          			$space=explode(" ",$trim);
							          			$word=$space[count($space)-1];
							          			echo rtrim($trim,$word);
							          			echo"...";
							          		}
							          		else{
							          			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><!--/main-right-->
			<?php include ('include/destination.php'); ?>
			<?php include('include/travel-style.php'); ?>
		</div><!--/container-->
	</div><!--/main-->
	
	<?php include('include/script.php'); ?>
</body>
</html>