<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"> 
      <?php 
			include 'connect.php';
if ($submit) {
    
	$sql="DELETE FROM rooms WHERE id=$id";
	$result=mysql_query($sql);	
	
	$sql2="DELETE FROM roomprices WHERE room_id=$id";
	$result2=mysql_query($sql2);
	
	$sql3="DELETE FROM roomspecs WHERE room_id=$id";
	$result3=mysql_query($sql3);	
?>
<table width="700" border="1" cellspacing="0" cellpadding="0" align="center" class="webadmintext" bordercolor="#999999">
  <tr> 
    <td bgcolor="#666666" bordercolor="#666666"> 
      <div align="center" class="white">ΔΩΜΑΤΙΟ ΔΙΕΓΡΑΦΗ ΑΠΟ ΤΗΝ ΒΑΣΗ ΔΕΔΟΜΕΝΩΝ</div>
    </td>
  </tr>
  <tr> 
    <td bordercolor="#FFFFFF">&nbsp;</td>
  </tr>
  <tr> 
    <td bordercolor="#FFFFFF"> 
      <div align="center"> 
        <b><?php echo $name ?></b>
      </div>
    </td>
  </tr>
  <tr> 
    <td bordercolor="#FFFFFF">&nbsp; </td>
  </tr>
</table>
<meta http-equiv="refresh" content="0;URL=all-rooms.php">
<?php
} else {	
	
?>
<?php
	 	$result = mysql_query("SELECT * FROM  rooms  WHERE id=$id",$dbh);
			$myrow=mysql_fetch_array($result); 
			$name=$myrow['name'];
?>
<form name="forma" method="post" action="<?php echo $PHP_SELF ?>" enctype="multipart/form-data">
  <table width="700" border="1" cellspacing="0" cellpadding="0" align="center" class="webadmintext" bordercolor="#999999">
    <tr> 
      <td bgcolor="#666666" bordercolor="#666666"> 
        <div align="center" class="white">ΔΙΑΓΡΑΦΗ ΔΩΜΑΤΙΟΥ</div>
      </td>
    </tr>
    <tr> 
      <td bordercolor="#FFFFFF">&nbsp; </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF" bordercolor="#FFFFFF"> 
        <div align="center">ΔΙΑΓΡΑΦΗ 
          <b><?php echo $name ?></b>
          ? 
          <input type="hidden" name="id" value="<?php echo $id ?>">
          <input type="hidden" name="name" value="<?php echo $name ?>">
        </div>
      </td>
    </tr>
    <tr> 
      <td bgcolor="#FFFFFF" bordercolor="#FFFFFF">&nbsp;</td>
    </tr>
    <tr bgcolor="#666666"> 
      <td bgcolor="#666666" bordercolor="#666666"> 
        <table width="300" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td> 
              <div align="center"> 
                <input type="submit" name="submit" value="Delete" class="button">
              </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
<?php } ?>
</body>
</html>
