<!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
$color1 = mysql_real_escape_string(stripslashes($_REQUEST['color1']));
$color2 = mysql_real_escape_string(stripslashes($_REQUEST['color2']));
$color3 = mysql_real_escape_string(stripslashes($_REQUEST['color3']));	  
$color4 = mysql_real_escape_string(stripslashes($_REQUEST['color4']));	  
$color5 = mysql_real_escape_string(stripslashes($_REQUEST['color5']));	  

if  (isset($_POST['submit'])) {
	$sql="UPDATE colorcombi SET color1='$color1', color2='$color2', color3='$color3', color4='$color4', color5='$color5' WHERE id='1'";
	$result = mysql_query($sql);	
?>
<meta http-equiv="refresh" content="0;URL=colorcombi.php">
<?php
} else {	
			$result = mysql_query("SELECT * FROM colorcombi WHERE id='1'",$dbh);
			$myrow=mysql_fetch_array($result); 
			$id=$myrow['id'];
			$color1=$myrow['color1'];
			$color2=$myrow['color2'];
			$color3=$myrow['color3'];
			$color4=$myrow['color4'];
			$color5=$myrow['color5'];
?>

<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">
  <table width="100%" border="0" cellspacing="1" cellpadding="4" class="text">
          <tr>
            <td width="50">&nbsp;</td> 
            <td width="100">Χρώμα 1 
              <input type="hidden" name="id" value="<?php echo $id ?>">
            </td>
            <td width="200">background</td>
            <td width="200" bgcolor="#<?php echo $color1 ?>">&nbsp;</td>
            <td>
              <input type="text" name="color1" size="12" class="forms" value="<?php echo $color1 ?>" maxlength="6">
            </td>
          </tr>
          <tr>
            <td>&nbsp;</td> 
            <td>Χρώμα 2</td>
            <td>πίνακες</td>
            <td width="200" bgcolor="#<?php echo $color2 ?>">&nbsp;</td>
            <td>
              <input type="text" name="color2" size="12" class="forms" value="<?php echo $color2 ?>" maxlength="6">
            </td>
          </tr>
          <tr>
            <td>&nbsp;</td> 
            <td>Χρώμα 3</td>
            <td>mobile background</td>
            <td width="200" bgcolor="#<?php echo $color3 ?>">&nbsp;</td>
            <td>
              <input type="text" name="color3" size="12" class="forms" value="<?php echo $color3 ?>" maxlength="6">
            </td>
          </tr>
          <tr>
            <td>&nbsp;</td> 
            <td>Χρώμα 4</td>
            <td>mobile κείμενο</td>
            <td width="200" bgcolor="#<?php echo $color4 ?>">&nbsp;</td>
            <td>
              <input type="text" name="color4" size="12" class="forms" value="<?php echo $color4 ?>" maxlength="6">
            </td>
          </tr>
          <tr>
            <td>&nbsp;</td> 
            <td>Χρώμα 5</td>
            <td>έντονο χρώμα</td>
            <td width="200" bgcolor="#<?php echo $color5 ?>">&nbsp;</td>
            <td>
              <input type="text" name="color5" size="12" class="forms" value="<?php echo $color5 ?>" maxlength="6">
            </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></td>
  </tr>
</table><?php include 'menudown.php';?>
<?php } ?>
</body>
</html>
