<?php  
if(isset($_POST["hotel_name"])){
	$hnm=$_POST["hotel_name"];
include("buda_connect.php");

$stmt=$pdo->prepare("select hotel_id,hname,country,city,ltown_city,lstreet_vil,paddress,email from hotel where hotel_id=:Id");
if($stmt){


$stmt->bindParam(":Id",$hnm);
if($stmt->execute())
{
	$hD=$stmt->fetch();
	
?><center>


 <table  class="pic" id="ta" border =1 ><tr><td id="img"  colspan="4"> <font size=2 style="Times new roman"><b> IMAGE SHOWING <?php echo $hD["hname"]." ROOM ";?></b></td></tr> 
<?php

	  

 
$img=$pdo->prepare("select imgname,	directory from images where hotelid=:Id");


$img->bindParam(":Id",$hnm);
if($img->execute()){
 

	$H=0;
	$gD=0;
	while($mg=$img->fetch()){

if($gD==0){
	?>
	<tr>
	<?php
}
?>
<td align="bottom"  height=120px > <?php echo $mg["imgname"];?><br/><img border=0 id="emg" src="<?php echo $mg["directory"];?>" onclick=" $('#imgDialog').show();$('#divpicfulview').show();document.getElementById('imgD').src=this.src;$('#divpicfulview').empty();$.post('retrieve_hotel_image_full_view.php',{hotel_name:'<?php echo $hD["hotel_id"];?>'},function(data){$('#divpicfulview').html(data).show();})"  /> </td><?php

  $gD++;
if($gD==4){
	?>

	 </tr> 
	 <?php

	$gD=0;
}
 $H++;

 }
if($H<=0){
	 
	?><tr><td>
	No image found1!..
    </td></tr></table>
    <?php
 
}
else { 
	?>
 </table></center>
    <?php
}
}
}
}
else{

	?><tr><td>
	<?php
	print_r($stmt->ErrorInfo());
	?>
    </td></tr></table>
    <?php


}

}

 ?>










  