<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 GALLERY SET TITLE='$TITLE',  TITLEUK='$TITLEUK', IMAGE='$IMAGE', PUBLISH='$PUBLISH'   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="">Η ΑΛΛΑΓΗ ΣΤΟ GALLERY <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">
            <?php echo $subjecteng ?>
          </td>
                      
          <td align="left" width="246"> 
            <?php echo $subject ?>
          </td>
                      
          </tr>
                  </table>
                  
      <p>&nbsp;</p>
    </td>
  </tr>
</table>

<?php
} else {	
			$result = mysql_query("SELECT * FROM GALLERY  WHERE ID=$ID",$dbh);
			$myrow=mysql_fetch_array($result); 
			$TITLE=$myrow['TITLE'];
			$TITLEUK=$myrow['TITLEUK'];
			$IMAGE=$myrow['IMAGE'];
			$PUBLISH=$myrow['PUBLISH'];
		
?><BR>
<?php echo $ID ?>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="text">
  <tr> 
    <td width="240"><img src="../galleryimage/<?php echo $ID ?>.jpg"></td>
    <td width="360"><a href="gallery_image.php?ID=<?php echo $ID?>" >upload image</a></td>
  </tr>
</table>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="text">
  <tr> 
    <td width="240"><br>
<br>
<img src="../galleryimage/130/<?php echo $ID ?>.jpg"></td>
    <td width="360"><br>
      <br><a href="gallery_thumb.php?id=<?php echo $ID?>" >
      create thumb</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">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">Δημοσίευση</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"> 
        <input type="submit" name="submit" value="Submit">
      </td>
      <td width="368">&nbsp;</td>
    </tr>
  </table>

</form>
<?php } ?>

</body>
</html>
