<!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['tour'])){
						    $get_id=$_GET['tour'];	
						    $en=substr($get_id,0,2);
						    $gm=substr($get_id,2,2);
						    if($lang==1){
						    	$result3=$Con->query("SELECT * FROM tbl_travel WHERE travel_id={$en}");
								$row3=mysqli_fetch_object($result3);
						    }
						    else{
							$result3=$Con->query("SELECT * FROM tbl_travel WHERE travel_id={$gm}");
							$row3=mysqli_fetch_object($result3);
						}
						?>
						
						<h2><?php echo $row3->category; ?></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-travelstyle.php?book=<?php echo $get_id;?>">book now</a></div>
							<?php 
								}
								else{
							?>
							<div class="book_text"><a href="booking-travelstyle.php?book=<?php echo $get_id;?>">jetzt buchen</a></div>
							<?php } ?>
						</div>
						<div class="slideshow">
							<ul id="imageGallery">
							<?php
								if($en==19) {
									$photo_id=2;
								}
								elseif ($en==21) {
									$photo_id=3;
								}
								elseif ($en==17) {
									$photo_id=4;
								}
								elseif ($en==11) {
									$photo_id=5;
								}
								elseif ($en==13) {
									$photo_id=6;
								}
								elseif($en==15){
									$photo_id=7;
								}
								elseif ($en==23) {
									$photo_id=8;
								}
								elseif ($en==25) {
									$photo_id=9;
								}
								else{
									$en='';
								}
								$result4=$Con->query("SELECT * FROM tbl_travel_photo WHERE travel_or_id={$photo_id} ORDER BY order_by ASC");
								while($row4=mysqli_fetch_object($result4)){
							?>
								<li data-thumb="userfiles/travel/thum/<?php echo $row4->photo_thum;?>" >
									<img src="userfiles/travel/<?php echo $row4->photo;?>" alt="<?php echo $row4->photo;?>" />
								</li>
								<?php } ?>								
							</ul>
						</div>
						<?php
							if($lang==1){								
								$result5=$Con->query("SELECT tbl_travel.travel_id,tbl_travel.language_id,tbl_travel_submenu.travel_id,tbl_travel_submenu.description,tbl_travel_submenu.t_travel_id,tbl_travel_submenu.title FROM tbl_travel INNER JOIN tbl_travel_submenu ON tbl_travel.travel_id=tbl_travel_submenu.travel_id WHERE  tbl_travel_submenu.travel_id={$en}");
							}else{												
							$result5=$Con->query("SELECT tbl_travel.travel_id,tbl_travel.language_id,tbl_travel_submenu.travel_id,tbl_travel_submenu.description,tbl_travel_submenu.t_travel_id,tbl_travel_submenu.title FROM tbl_travel INNER JOIN tbl_travel_submenu ON tbl_travel.travel_id=tbl_travel_submenu.travel_id WHERE   tbl_travel_submenu.travel_id={$gm}");
						}
							while($row5=mysqli_fetch_object($result5)){
								$id=$row5->t_travel_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								
							$result=$Con->query("SELECT * FROM tbl_tour WHERE  language_id={$lang}  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 $row->tour_name;?>">
							          <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>