<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="UPDATE rooms SET name='$name', name_en='$name_en', name_de='$name_de', description='$description', description_en='$description_en', description_de='$description_de', image='$image', imagebig='$imagebig', panor='$panor', publish='$publish', priority='$priority' WHERE id='$id'";
	$result = mysql_query($sql);	
?>
<table width="600" 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"> 
        <?php echo $name ?>
      </div>
    </td>
  </tr>
  <tr> 
    <td bordercolor="#FFFFFF">&nbsp; </td>
  </tr>
</table>
<meta http-equiv="refresh" content="0;URL=edit-room.php?id=<?php echo $id ?>">
<?php
} else {	
			$result = mysql_query("SELECT * FROM rooms WHERE id=$id",$dbh);
			$myrow=mysql_fetch_array($result); 
			$roomid=$myrow['id'];
			$name=$myrow['name'];
			$name_en=$myrow['name_en'];
		    $name_de=$myrow['name_de'];
			$description=$myrow['description'];
			$description_en=$myrow['description_en'];
			$description_de=$myrow['description_de'];
			$image=$myrow['image'];
			$imagebig=$myrow['imagebig'];
			$panor=$myrow['panor'];
			$publish=$myrow['publish'];
			$priority=$myrow['priority'];
?>
<form name="forma" method="post" action="<?php echo $PHP_SELF ?>" enctype="multipart/form-data">
  <table width="600" 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"> 
        <table width="100%" border="0" cellspacing="1" cellpadding="2" class="webadmintext" bgcolor="#F2F2F2">
          <tr> 
            <td width="30%">Τύπος - ελληνικά* 
              <input type="hidden" name="id" value="<?php echo $id ?>">
            </td>
            <td> 
              <input type="text" name="name" value="<?php echo $name ?>" class="forms" size="60">
            </td>
          </tr>
          <tr> 
            <td width="30%">Τύπος - αγγλικά*</td>
            <td> 
              <input type="text" name="name_en" value="<?php echo $name_en ?>" class="forms" size="60">
            </td>
          </tr>
          <tr> 
            <td width="30%">Τύπος - γερμανικά</td>
            <td> 
              <input type="text" name="name_de" class="forms" size="60" value="<?php echo $name_de ?>">
            </td>
          </tr>
          <tr> 
            <td width="30%">Περιγραφή - ελληνικά</td>
            <td> 
              <textarea name="description" class="forms" cols="60" rows="4"><?php echo $description ?></textarea>
            </td>
          </tr>
          <tr> 
            <td width="30%">Περιγραφή - αγγλικά</td>
            <td> 
              <textarea name="description_en" class="forms" cols="60" rows="4"><?php echo $description_en ?></textarea>
            </td>
          </tr>
          <tr> 
            <td width="30%">Περιγραφή - γερμανικά</td>
            <td> 
              <textarea name="description_de" class="forms" cols="60" rows="4"><?php echo $description_de ?></textarea>
            </td>
          </tr>
          <tr> 
            <td width="30%">Εικόνα</td>
            <td> 
              <?php if ($image!=no) { ?>
              <select name="image" class="forms">
                <option value="yes" selected>yes</option>
                <option value="no">no</option>
              </select>
              <?php }else{?>
              <select name="image" class="forms">
                <option value="yes">yes</option>
                <option value="no" selected>no</option>
              </select>
              <?php } ?>
            </td>
          </tr>
          <tr> 
            <td width="30%">Μεγάλη εικόνα</td>
            <td> 
              <?php if ($imagebig!=no) { ?>
              <select name="imagebig" class="forms">
                <option value="yes" selected>yes</option>
                <option value="no">no</option>
              </select>
              <?php }else{?>
              <select name="imagebig" class="forms">
                <option value="yes">yes</option>
                <option value="no" selected>no</option>
              </select>
              <?php } ?>
            </td>
          </tr>
          <tr> 
            <td width="30%">Panoramic - 360</td>
            <td> 
              <?php if ($panor!=no) { ?>
              <select name="panor" class="forms">
                <option value="yes" selected>yes</option>
                <option value="no">no</option>
              </select>
              <?php }else{?>
              <select name="panor" class="forms">
                <option value="yes">yes</option>
                <option value="no" selected>no</option>
              </select>
              <?php } ?>
            </td>
          </tr>
          <tr> 
            <td width="30%">Δημοσίευση στο site?</td>
            <td> 
              <?php if ($publish!=no) { ?>
              <select name="publish" class="forms">
                <option value="yes" selected>yes</option>
                <option value="no">no</option>
              </select>
              <?php }else{?>
              <select name="publish" class="forms">
                <option value="yes">yes</option>
                <option value="no" selected>no</option>
              </select>
              <?php } ?>
            </td>
          </tr>
          <tr> 
            <td width="30%">Αριθμός προτεραιότητας</td>
            <td> 
              <input type="text" name="priority" maxlength="11" value="<?php echo $priority ?>" class="forms" size="20">
            </td>
          </tr>
        </table>
      </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="Καταχώρηση" class="button">
              </div>
            </td>
            <td> 
              <div align="center"> 
                <input type="reset" name="Submit2" value="Επαναφορά" class="button">
              </div>
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</form>
<table width="600" border="0" cellspacing="0" cellpadding="4" align="center" class="webadmintext">
  <tr> 
    <td width="50%"><img src="../roomimages/<?php echo $roomid ?>.jpg"></td>
    <td><a href="room_image.php?id=<?php echo $roomid?>" class="webadminlinks">εισάγετε 
      εικόνα</a> (ΠΛΑΤΟΣ 150 pixels)</td>
  </tr>
  <tr> 
    <td width="50%"><img src="../roomimages2/<?php echo $roomid ?>.jpg"></td>
    <td><a href="room_image2.php?id=<?php echo $roomid?>" class="webadminlinks">εισάγετε 
      μεγάλη εικόνα</a> (ΠΛΑΤΟΣ max. 500 pixels - ΥΨΟΣ max. 400 pixels)</td>
  </tr>
  <tr> 
    <td width="50%"><img src="../panoramicrooms/<?php echo $roomid ?>.jpg" height="50"></td>
    <td><a href="panoramicroom_image.php?id=<?php echo $roomid?>" class="webadminlinks">εισάγετε 
      εικόνα 360</a> (ΠΛΑΤΟΣ min. 600 pixels - ΥΨΟΣ 300 pixels)</td>
  </tr>
</table>

<?php } ?>
<table width="600" 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>
