<html>
<head>
<title>Web management</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
<link rel="stylesheet" href="../styles.css" type="text/css">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="10"> 
<table width="700" border="1" cellspacing="0" cellpadding="0" align="center" class="webadmintext" bordercolor="#999999" bgcolor="#FFFFFF">
  <tr> 
    <td bgcolor="#666666" bordercolor="#666666" height="15"> 
      <div align="center" class="white"> ΔΩΜΑΤΙΑ</div>
    </td>
  </tr>
  <tr> 
    <td bgcolor="#FFFFFF" bordercolor="#FFFFFF"> 
      <table width="100%" border="0" cellspacing="1" cellpadding="2" class="webadmintext" bgcolor="#FFFFFF">
        <tr valign="top"> 
          <td width="10">ΑΡ.</td>
          <td>ΤΥΠΟΣ ΔΩΜΑΤΙΟΥ</td>
          <td width="60">&nbsp;</td>
          <td width="60">&nbsp;</td>
        </tr>
      </table>
    </td>
  </tr>
  <tr> 
    <td bordercolor="#FFFFFF" bgcolor="#FFFFFF"> 
      <?php 
			include 'connect.php';
			$sql = "SELECT * FROM rooms ORDER BY priority";
			$result = mysql_query($sql);
	while ($myrow=mysql_fetch_array($result)) {
			$id=$myrow['id'];
			$name=$myrow['name'];
			$priority=$myrow['priority'];
?>
      <table width="100%" border="0" cellspacing="1" cellpadding="2" class="webadmintext" bgcolor="#FFFFFF">
        <tr valign="top"> 
          <td width="10" bgcolor="#F2F2F2"> 
            <?php echo $priority   ?>
          </td>
          <td bgcolor="#F2F2F2"> <b> 
            <?php echo $name ?>
            </b> </td>
          <td width="150"> 
            <div align="center"><a href="all-roomprices.php?roomid=<?php echo $id?>&room=<?php echo $name?>" class="webadminlinks">τιμές</a><br>
              <?php 
             $nu_row = '0';
              $zero='0';
			include 'connect.php';
			$sql4 = "SELECT * FROM roomspecs WHERE room_id='$id'";
			$result4 = mysql_query($sql4);
			$nu_row = mysql_num_rows($result4);
?>
              <?php 
	if  ( ( $nu_row==$zero)) {
	?>
              <?php } else {?>
              <a href="all-roomspecs.php?roomid=<?php echo $id ?>&room=<?php echo $name ?>" class="webadminlinks"> 
              χαρακτηριστικά</a> 
              [<?php echo $nu_row ?>]
              <?php } ?>
              <?php 
             $nu_row2 = '0';
              $zero='0';
			include 'connect.php';
			$sql5 = "SELECT * FROM photos WHERE room_id='$id'";
			$result5 = mysql_query($sql5);
			$nu_row2 = mysql_num_rows($result5);
?>
              <?php 
	if  ( ( $nu_row2==$zero)) {
	?>
              <?php } else {?>
              <a href="all-roomphotos.php?roomid=<?php echo $id ?>&room=<?php echo $name ?>" class="webadminlinks"> 
              photos</a> 
              [<?php echo $nu_row2 ?>]
              <?php } ?>
            </div>
          </td>
          <td bgcolor="#F2F2F2" width="2">&nbsp; </td>
          <td width="100"> 
            <?php 
		  $nu_row1 = '0';
              $zero='0';
			include 'connect.php';
			$sql3 = "SELECT * FROM seasons";
			$result3 = mysql_query($sql3);
			$nu_row1 = mysql_num_rows($result3);
	while ($myrow=mysql_fetch_array($result3)) {
			$seasonid=$myrow['id'];
?>
            <?php }?>
            <?php 
             $nu_row = '0';
              $zero='0';
			include 'connect.php';
			$sql4 = "SELECT * FROM roomprices WHERE room_id=$id";
			$result4 = mysql_query($sql4);
			$nu_row = mysql_num_rows($result4);
?>
            <?php 
	if  ( ( $nu_row>=$nu_row1)) {
	?>
            <div align="center">---</div>
		   <?php } else {?>
		    <div align="center"><a href="new-roomprice.php?roomid=<?php echo $id?>&room=<?php echo $name?>" class="webadminlinks">προσθήκη 
              τιμής</a></div>
            
            
			<?php }?>
          </td>
          <td width="60" bgcolor="#F2F2F2"> 
            <div align="center"><a href="edit-room.php?id=<?php echo $id?>" class="webadminlinks">ΑΛΛΑΓΗ</a></div>
          </td>
          <td width="60" bgcolor="#F2F2F2"> 
            <div align="center"><a href="delete-room.php?id=<?php echo $id?>" class="webadminlinks">ΔΙΑΓΡΑΦΗ</a></div>
          </td>
        </tr>
      </table>
      <?php			
	}
?>
    </td>
  </tr>
</table>
<table width="700" border="0" cellspacing="0" cellpadding="4" align="center">
  <tr>
    <td>
      <div align="center"> <a href="javascript:history.go(-1);"><img src="back.gif" alt="πίσω" border="0"></a> 
        &nbsp; <a href="#top"><img src="top.gif" border="0" alt="πάνω"></a> 
      </div>
    </td>
  </tr>
</table>
</body>
</html>
