<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Web management</title>
<link rel="stylesheet" href="styles.css" type="text/css">
<?php include 'codes.php';?>
</head>
<body text="#000000" style="margin:0">
      <?php
$id = mysql_real_escape_string(stripslashes($_REQUEST['id']));
$season = mysql_real_escape_string(stripslashes($_REQUEST['season']));
$season_en = mysql_real_escape_string(stripslashes($_REQUEST['season_en']));
$season_de = mysql_real_escape_string(stripslashes($_REQUEST['season_de']));
$date1 = mysql_real_escape_string(stripslashes($_REQUEST['date1']));	  
$date2 = mysql_real_escape_string(stripslashes($_REQUEST['date2']));	  

if  (isset($_POST['submit'])) {
	$sql="UPDATE seasons SET  season='$season', season_en='$season_en', season_de='$season_de', season_fr='$season_fr', season_it='$season_it', season_es='$season_es', season_ru='$season_ru', season_zh='$season_zh', date1='$date1', date2='$date2' WHERE id='$id'";
	$result = mysql_query($sql);	
?>
<meta http-equiv="refresh" content="0;URL=all-rooms.php?">
<?php
} else {	
			$result = mysql_query("SELECT * FROM seasons WHERE id='$id'",$dbh);
			$myrow=mysql_fetch_array($result); 
			$season=$myrow['season'];
			$season_en=$myrow['season_en'];
			$season_de=$myrow['season_de'];
			$season_fr=$myrow['season_fr'];
            $season_it=$myrow['season_it'];
            $season_es=$myrow['season_es'];
            $season_ru=$myrow['season_ru'];
			$season_zh=$myrow['season_zh'];
			$date1=$myrow['date1'];
			$date2=$myrow['date2'];
?>

<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><div><img src="img/frame-edit.png" width="180" height="37" alt=""></div>
<div class="frame">

<form name="forma" method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" enctype="multipart/form-data">
  <input type="hidden" name="id" value="<?php echo $id ?>">
  <table width="100%" border="0" cellspacing="0" cellpadding="4" class="text">
  <?php if ($lang1==1) { ?>
    <tr>
      <td width="20"><img src="img/lang1.png" width="16" height="16" alt=""></td> 
      <td width="200">Τίτλος 
        </td>
      <td> 
        <input type="text" name="season" size="100" value="<?php echo $season ?>" class="forms">
        </td>
    </tr>
    <?php } ?>
    <?php if ($lang2==1) { ?>
    <tr>
      <td><img src="img/lang2.png" width="16" height="16" alt=""></td> 
      <td>Τίτλος </td>
      <td> 
        <input type="text" name="season_en" size="100" value="<?php echo $season_en ?>" class="forms">
        </td>
      </tr>
      <?php } ?>
    <?php if ($lang3==1) { ?>
    <tr>
      <td><img src="img/lang3.png" width="16" height="16" alt=""></td>
      <td>Τίτλος </td>
      <td><input type="text" name="season_de" size="100" value="<?php echo $season_de ?>" class="forms"></td>
    </tr>
      <?php } ?>
    <?php if ($lang4==1) { ?>
    <tr>
      <td><img src="img/lang4.png" width="16" height="16" alt=""></td>
      <td>Τίτλος </td>
      <td><input type="text" name="season_fr" size="100" value="<?php echo $season_fr ?>" class="forms"></td>
    </tr>
      <?php } ?>
    <?php if ($lang5==1) { ?>
    <tr>
      <td><img src="img/lang5.png" width="16" height="16" alt=""></td>
      <td>Τίτλος </td>
      <td><input type="text" name="season_it" size="100" value="<?php echo $season_it ?>" class="forms"></td>
    </tr>
      <?php } ?>
    <?php if ($lang6==1) { ?>
    <tr>
      <td><img src="img/lang6.png" width="16" height="16" alt=""></td>
      <td>Τίτλος </td>
      <td><input type="text" name="season_es" size="100" value="<?php echo $season_es ?>" class="forms"></td>
    </tr>
      <?php } ?>
    <?php if ($lang7==1) { ?>
    <tr>
      <td><img src="img/lang7.png" width="16" height="16" alt=""></td>
      <td>Τίτλος </td>
      <td><input type="text" name="season_ru" size="100" value="<?php echo $season_ru ?>" class="forms"></td>
    </tr>
      <?php } ?>
      <?php if ($lang8==1) { ?>
    <tr>
      <td><img src="img/lang8.png" width="16" height="16" alt=""></td>
      <td>Τίτλος </td>
      <td><input type="text" name="season_zh" size="100" value="<?php echo $season_zh ?>" class="forms"></td>
    </tr>
      <?php } ?>
    <tr>
      <td width="20">&nbsp;</td>
      <td width="200">Ημερομηνίες 1</td>
      <td><input type="text" name="date1" class="forms" size="40" value="<?php echo $date1 ?>"></td>
    </tr>
    <tr>
      <td>&nbsp;</td>
      <td>Ημερομηνίες 2</td>
      <td><input type="text" name="date2" class="forms" size="40" value="<?php echo $date2 ?>"></td>
    </tr>
    </table>

  <div align="center" style="padding:5px">
   <input type="submit" name="submit" value="Καταχώρηση" class="button">
        <input type="reset" name="reset" value="Επαναφορά" class="button">  </div>
</form>  
</div>
<div align="right"><a href="all-seasons.php" class="links">μεταφορά στην Λίστα</a></div></td>
  </tr>
</table><?php include 'menudown.php';?>
<?php } ?>
</body>
</html>
