<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr valign="top">
    <td>
   <div style="padding-bottom:10px; padding-right:10px; text-align:left">
   <?php echo $text ?>
    </div>  
    
<?php
	$sql1 = "SELECT * FROM specscategories WHERE lang_id=1 AND publish='yes' ORDER BY priority";
	$result1 = mysql_query($sql1);
	while ($myrow=mysql_fetch_array($result1)) {
	$scatid=$myrow['id'];
	$sisid=$myrow['insert_id'];
			
	$result2 = mysql_query("SELECT * FROM specscategories WHERE lang_id='$lang' AND insert_id='$sisid'",$dbh);
	$myrow=mysql_fetch_array($result2);
	$scategory=$myrow['title'];
?>
            
           <div class="titles"><?php echo $scategory ?></div> 
                  
            <?php
			$sql3 = "SELECT * FROM specs WHERE lang_id=1 AND room_id='$pid' AND category_id='$sisid' ORDER BY priority";
			$result3 = mysql_query($sql3);
			while ($myrow=mysql_fetch_array($result3)) {
			$sid=$myrow['insert_id'];
			
			$result2 = mysql_query("SELECT * FROM specs WHERE lang_id='$lang' AND insert_id='$sid'",$dbh);
	        $myrow=mysql_fetch_array($result2);
	        $spec=$myrow['name'];
?>
                  <div> 
                    <?php echo $spec ?>
                  </div>
            <?php } ?>
<?php } ?>
    </td>
    <td>
<?php
$sql4 = "SELECT * FROM photos WHERE room_id='$pid' ORDER BY priority";
$result4 = mysql_query($sql4);
while ($myrow=mysql_fetch_array($result4)) {
$photoid=$myrow['id'];
$photo=$myrow['name'];
$ppriority=$myrow['priority'];
?>
<?php if ($photo=='') { 
$photo=$company1;
}?>
 <?php include 'photo.php';?>
<?php } ?>   
<div style="clear:both"></div>                
    </td>
  </tr>
</table>

<div style="margin-top:10px">
				<?php 
			$sql6 = "SELECT * FROM prices WHERE room_id='$pid'";
			$result6 = mysql_query($sql6);
			$nu_row6 = mysql_num_rows($result6);
?>
        <?php if  ($nu_row6>0) {?>
        
          <div>
          <strong><?php echo $pricelist ?></strong>
  </div>
        <table width="100%" border="0" cellspacing="1" cellpadding="4" class="text2">
        <tr valign="top"> 
          <?php
			$sql5 = "SELECT * FROM seasons WHERE lang_id=1 ORDER BY priority";
			$result5 = mysql_query($sql5);
	while ($myrow=mysql_fetch_array($result5)) {
			$seasonid=$myrow['insert_id'];
			$date1=$myrow['date1'];
			$date2=$myrow['date2'];
			$counts++;
			
			$result2 = mysql_query("SELECT * FROM seasons WHERE lang_id='$lang' AND insert_id='$seasonid'",$dbh);
	        $myrow=mysql_fetch_array($result2);
	        $season=$myrow['name'];
?>   
          <td width="80" bgcolor="#<?php echo $color2 ?>">
		 <b><?php echo $season ?></b> <br>
         <?php echo $date1 ?>
          <br>
         <?php echo $date2 ?>
          </td>
       <?php } ?>     
  </tr>
      </table>
<table width="100%" border="0" cellspacing="1" cellpadding="4" class="text2">
  <tr valign="top"> 
            <?php
			$sql7 = "SELECT * FROM seasons WHERE lang_id=1 ORDER BY priority";
			$result7 = mysql_query($sql7);
	while ($myrow=mysql_fetch_array($result7)) {
			$seasonid=$myrow['insert_id'];
?>              
          <td width="80" bgcolor="#<?php echo $color2 ?>">
		            
            <?php
			$sql8 = "SELECT * FROM prices WHERE room_id='$pid' AND season_id='$seasonid'";
			$result8 = mysql_query($sql8);
	while ($myrow=mysql_fetch_array($result8)) {
			$price=$myrow['price'];
?>
        <?php echo $price ?>
<?php } ?>
         </td>
           <?php } ?> 
  </tr>
</table> 
<hr>                
<?php } ?>
</div>

<div class="divbutton">
               <a href="reservation.php?rid=<?php echo $pid ?>" class="button"><?php echo $textbutton1 ?></a> 
               <?php if ($resurl!='') { ?>
               &nbsp; &nbsp;
               <a href="<?php echo $resurl ?>" class="button"><?php echo $textbutton2 ?></a> 
              <?php } ?>
            </div>