<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
</head>


<body bgcolor="#FFFFFF" text="#000000">
<?php 
			$dbh=mysql_connect("localhost","olympicv","olym8y");
			mysql_select_db("olympicv_olympic",$dbh);
	
if ($submit) {
	$sql="UPDATE BOOKING  SET TITLE='$TITLE', TITLEUK='$TITLEUK', ADDRESS='$ADDRESS' , ADDRESSUK='$ADDRESSUK' , COUNTRY='$COUNTRY' , COUNTRYUK='$COUNTRYUK' , PHONE='$PHONE' , EMAIL='$EMAIL' , FAX='$FAX' , MENU='$MENU' , IMAGE='$IMAGE' , PUBLISH='$PUBLISH' , URL='$URL'   WHERE ID='$ID'";
	$result = mysql_query($sql);	
?><br>
<table width="560" border="1" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF" bordercolor="#CC0000" align="center" class="ttext">
  <tr> 
    <td bgcolor="#CCCCCC" bordercolor="#CCCCCC">
      <div align="center" class="">Η ΑΛΛΑΓΗ ΣΤΟ BOOKING <b></b>ΕΓΙΝΕ</div>
    </td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF" bordercolor="#FFFFFF">
      <p>&nbsp;
      <table width="511" border="0" cellspacing="0" cellpadding="5" align="center" class="ttext">
        <tr> 
                      
          <td width="53" align="center" valign="top">
          
          </td>
                      
          <td align="left" width="246"> 
            <?php echo $TITLE ?>
          </td>
                      
          </tr>
                  </table>
                  
      <p>&nbsp;</p>
    </td>
  </tr>
</table>

<?php
} else {	
			$result = mysql_query("SELECT * FROM BOOKING  WHERE ID=$ID",$dbh);
			$myrow=mysql_fetch_array($result); 
			$TITLE=$myrow['TITLE'];
			$URL=$myrow['URL'];
			$TITLEUK=$myrow['TITLEUK'];
			$ADDRESS=$myrow['ADDRESS'];
			$ADDRESSUK=$myrow['ADDRESSUK'];
			$COUNTRY=$myrow['COUNTRY'];
			$COUNTRYUK=$myrow['COUNTRYUK'];
			$PHONE=$myrow['PHONE'];
			$EMAIL=$myrow['EMAIL'];
			$FAX=$myrow['FAX'];
			$IMAGE=$myrow['IMAGE'];
			$PUBLISH=$myrow['PUBLISH'];
			$MENU=$myrow['MENU'];
?><table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="text">
  <tr> 
    <td width="240"><img src="../bookingimage/<?php echo $ID?>.jpg"></td>
    <td width="360"><a href="booking_image.php?ID=<?php echo $ID?>" >upload image</a></td>
  </tr>
</table>



<form name="newproductform1" method="post" action="<?php echo $PHP_SELF ?>" enctype="multipart/form-data">
  <table width="560" border="0" cellspacing="0" cellpadding="0" align="center" class="ttext">
    <tr> 
      <td width="192">TITLE 
        <input type="hidden" name="ID" value="<?php echo $ID?>">
      </td>
      <td width="368"> 
        <input type="text" name="TITLE"  maxlength="254" value="<?php echo $TITLE ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">TITLE (english)</td>
      <td width="368"> 
        <input type="text" name="TITLEUK"  maxlength="254" value="<?php echo $TITLEUK ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">URL</td>
      <td width="368"> 
        <input type="text" name="URL"  maxlength="254" value="<?php echo $URL ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">ADDRESS</td>
      <td width="368"> 
        <input type="text" name="ADDRESS"  maxlength="254" value="<?php echo $ADDRESS ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">ADDRESS (english)</td>
      <td width="368"> 
        <input type="text" name="ADDRESSUK"  maxlength="254" value="<?php echo $ADDRESSUK ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">COUNTRY</td>
      <td width="368"> 
        <input type="text" name="COUNTRY"  maxlength="254" value="<?php echo $COUNTRY ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">COUNTRY (english)</td>
      <td width="368"> 
        <input type="text" name="COUNTRYUK"  maxlength="254" value="<?php echo $COUNTRYUK ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">PHONE</td>
      <td width="368"> 
        <input type="text" name="PHONE"  maxlength="254" value="<?php echo $PHONE ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">EMAIL</td>
      <td width="368"> 
        <input type="text" name="EMAIL"  maxlength="254" value="<?php echo $EMAIL ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">FAX</td>
      <td width="368"> 
        <input type="text" name="FAX"  maxlength="254" value="<?php echo $FAX ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">MENU</td>
      <td width="368"> 
        <input type="text" name="MENU"  maxlength="254" value="<?php echo $MENU ?>">
      </td>
    </tr>
	<tr> 
      <td width="192">Δημοσίευση</td>
      <td width="368"> 
        <?php if ($PUBLISH!=no) { ?>
        <select name="PUBLISH">
          <option value="yes" selected>yes</option>
          <option value="no">no</option>
        </select>
        <?php }else{?>
        <select name="PUBLISH">
          <option value="yes">yes</option>
          <option value="no" selected>no</option>
        </select>
        <?php } ?>
      </td>
    </tr>
    <tr> 
      <td width="192">IMAGE</td>
      <td width="368"> 
        <?php if ($IMAGE!=no) { ?>
        <select name="IMAGE">
          <option value="yes" selected>yes</option>
          <option value="no">no</option>
        </select>
        <?php }else{?>
        <select name="IMAGE">
          <option value="yes">yes</option>
          <option value="no" selected>no</option>
        </select>
        <?php } ?>
      </td>
    </tr>
    <tr> 
      <td width="192"> 
        <input type="submit" name="submit" value="Submit">
      </td>
      <td width="368">&nbsp;</td>
    </tr>
  </table>

</form>
<?php } ?>

</body>
</html>
