<!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>

    <?php
$domain = mysql_real_escape_string(stripslashes($_REQUEST['domain']));
$firma = mysql_real_escape_string(stripslashes($_REQUEST['firma']));
$company = mysql_real_escape_string(stripslashes($_REQUEST['company']));
$company_en = mysql_real_escape_string(stripslashes($_REQUEST['company_en']));
$address = mysql_real_escape_string(stripslashes($_REQUEST['address']));	 
$address_en = mysql_real_escape_string(stripslashes($_REQUEST['address_en']));	  
$region = mysql_real_escape_string(stripslashes($_REQUEST['region']));	 
$region_en = mysql_real_escape_string(stripslashes($_REQUEST['region_en']));	
$field = mysql_real_escape_string(stripslashes($_REQUEST['field']));	 
$field_en = mysql_real_escape_string(stripslashes($_REQUEST['field_en']));	    
$sitemail = mysql_real_escape_string(stripslashes($_REQUEST['sitemail']));
$x = mysql_real_escape_string(stripslashes($_REQUEST['x']));
$y = mysql_real_escape_string(stripslashes($_REQUEST['y'])); 
$map = mysql_real_escape_string(stripslashes($_REQUEST['map']));
$holiday_id = mysql_real_escape_string(stripslashes($_REQUEST['holiday_id']));
$resurl = mysql_real_escape_string(stripslashes($_REQUEST['resurl']));
$site = mysql_real_escape_string(stripslashes($_REQUEST['site']));
$code = mysql_real_escape_string(stripslashes($_REQUEST['code']));
$promocode = mysql_real_escape_string(stripslashes($_REQUEST['promocode']));	 
$sitescript = mysql_real_escape_string(stripslashes($_REQUEST['sitescript']));
$sitescript2 = mysql_real_escape_string(stripslashes($_REQUEST['sitescript2']));	
$sitescript3 = mysql_real_escape_string(stripslashes($_REQUEST['sitescript3']));	
$mobile = mysql_real_escape_string(stripslashes($_REQUEST['mobile']));
$editor = mysql_real_escape_string(stripslashes($_REQUEST['editor']));
$sitepath = mysql_real_escape_string(stripslashes($_REQUEST['sitepath']));
			 	 
if  (isset($_POST['submit'])) {
$sql="UPDATE siteinfo SET  domain='$domain', firma='$firma', company='$company', company_en='$company_en', address='$address', address_en='$address_en', field='$field', field_en='$field_en', region='$region', region_en='$region_en', 
sitemail='$sitemail', x='$x', y='$y', map='$map', holiday_id='$holiday_id', resurl='$resurl', site='$site', code='$code', promocode='$promocode', 
sitescript='$sitescript', sitescript2='$sitescript2', sitescript3='$sitescript3', mobile='$mobile', editor='$editor', sitepath='$sitepath' WHERE id='1'";
	$result = mysql_query($sql);	
?>
<meta http-equiv="refresh" content="0;URL=siteinfo.php">
<?php
} else {	
			$result = mysql_query("SELECT * FROM siteinfo WHERE id='1'",$dbh);
			$myrow=mysql_fetch_array($result); 
			$domain=$myrow['domain'];
			$firma=$myrow['firma'];
			$company=$myrow['company'];
			$company_en=$myrow['company_en'];
			$address=$myrow['address'];
			$address_en=$myrow['address_en'];
			$field=$myrow['field'];
			$field_en=$myrow['field_en'];
			$region=$myrow['region'];
			$region_en=$myrow['region_en'];
			$sitemail=$myrow['sitemail'];
			$x=$myrow['x'];
            $y=$myrow['y'];
			$map=$myrow['map'];
			$holiday_id=$myrow['holiday_id'];
			$resurl=$myrow['resurl'];
			$site=$myrow['site'];
			$code=$myrow['code'];
			$promocode=$myrow['promocode'];
			$sitescript=$myrow['sitescript'];
			$sitescript2=$myrow['sitescript2'];
			$sitescript3=$myrow['sitescript3'];
			$mobile=$myrow['mobile'];
			$editor=$myrow['editor'];
			$sitepath=$myrow['sitepath'];
?>

<table width="980" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td>
    
    <form name="forma" method="post" action="<?php echo htmlentities($_SERVER['PHP_SELF']); ?>" enctype="multipart/form-data">

<div><img src="img/frame-edit.png" width="180" height="37" alt=""></div>
<div class="frame">
  <table width="100%" border="0" cellspacing="0" cellpadding="4">
          <tr bgcolor="#F2F2F2">
            <td width="20"><img src="img/ic1.png" alt=""></td> 
            <td width="200" class="titles">
            Domain name</td>
            <td> www.
              <input type="text" name="domain" class="forms" size="50" value="<?php echo $domain ?>" maxlength="100">
            </td>
          </tr>
          <tr class="lines">
            <td></td>
            <td></td>
            <td></td>
          </tr>
          <tr bgcolor="#F2F2F2">
            <td><img src="img/ic3.png" alt=""></td>
            <td class="titles">Company</td>
            <td><input type="text" name="firma" class="forms" size="40" value="<?php echo $firma ?>" maxlength="50"></td>
          </tr>
          <tr>
            <td><img src="img/el.png" width="16" height="16" alt=""></td> 
            <td>Εταιρία  </td>
            <td> 
              <input type="text" name="company" class="forms" size="100" value="<?php echo $company ?>" maxlength="100">
            </td>
          </tr>
          <tr>
            <td><img src="img/en.png" width="16" height="16" alt=""></td> 
            <td>Εταιρία </td>
            <td> 
              <input type="text" name="company_en" class="forms" size="100" value="<?php echo $company_en ?>" maxlength="100">
            </td>
          </tr>
          <tr class="lines">
            <td></td>
            <td></td>
            <td></td>
          </tr>
           <tr bgcolor="#F2F2F2">
             <td><img src="img/ic4.png" alt=""></td>
             <td class="titles">Στοιχεία επικοινωνίας</td>
             <td>&nbsp;</td>
           </tr>
          <tr>
            <td><img src="img/el.png" width="16" height="16" alt=""></td> 
            <td>Διεύθυνση  </td>
            <td> 
              <textarea name="address" class="mceEditor" rows="6"><?php echo $address ?></textarea>
              </td>
          </tr>
          <tr>
            <td><img src="img/en.png" width="16" height="16" alt=""></td> 
            <td>Διεύθυνση </td>
            <td> 
              <textarea name="address_en" class="mceEditor" rows="6"><?php echo $address_en ?></textarea>
            </td>
          </tr>
          <tr>
            <td><img src="img/el.png" width="16" height="16" alt=""></td> 
            <td>Περιοχή  </td>
            <td> 
              <input type="text" name="region" class="forms" size="100" value="<?php echo $region ?>">
              </td>
          </tr>
          <tr>
            <td><img src="img/en.png" width="16" height="16" alt=""></td> 
            <td>Περιοχή </td>
            <td> 
              <input type="text" name="region_en" class="forms" size="100" value="<?php echo $region_en ?>">
            </td>
          </tr>
          <tr>
            <td><img src="img/el.png" width="16" height="16" alt=""></td>
            <td>Πεδίο</td>
            <td><textarea name="field" class="mceEditor" rows="4"><?php echo $field ?></textarea></td>
          </tr>
          <tr>
            <td><img src="img/en.png" width="16" height="16" alt=""></td>
            <td>Πεδίο</td>
            <td><textarea name="field_en" class="mceEditor" rows="4"><?php echo $field_en ?></textarea></td>
          </tr>
          <tr>
            <td>&nbsp;</td> 
            <td>E-mail επικοινωνίας</td>
            <td> 
              <input type="text" name="sitemail" class="forms" size="100" value="<?php echo $sitemail ?>">
              </td>
          </tr>
          <tr class="lines">
            <td></td>
            <td></td>
            <td></td>
          </tr>
           <tr bgcolor="#F2F2F2">
            <td><img src="img/ic5.png" alt=""></td>
            <td bgcolor="#F2F2F2" class="titles">Στοιχεία website</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td> 
            <td>Χάρτης Google</td>
            <td>
            X
<input type="text" name="x" class="forms" size="25" value="<?php echo $x ?>">
&nbsp; &nbsp;
Y
<input type="text" name="y" class="forms" size="25" value="<?php echo $y ?>">
<hr>
            <textarea name="map" cols="100" rows="6" class="forms"><?php echo $map ?></textarea></td>
          </tr>
          <tr>
            <td bgcolor="#F2F2F2">&nbsp;</td>
            <td bgcolor="#F2F2F2"><strong>Codes</strong></td>
            <td bgcolor="#F2F2F2">&nbsp;</td>
          </tr>
          <tr>
            <td bgcolor="#F2F2F2">&nbsp;</td>
            <td colspan="2" bgcolor="#F2F2F2">
            <hr>
            <table width="100%" border="0" cellspacing="1" cellpadding="4">
              <tr>
                <td>Code 1</td>
                <td>Code 2</td>
                <td>Code 3</td>
              </tr>
              <tr>
                <td><textarea name="sitescript" cols="55" rows="8" class="forms"><?php echo $sitescript ?></textarea></td>
                <td><textarea name="sitescript2" cols="55" rows="8" class="forms"><?php echo $sitescript2 ?></textarea></td>
                <td><textarea name="sitescript3" cols="55" rows="8" class="forms"><?php echo $sitescript3 ?></textarea></td>
              </tr>
            </table>
            <hr>
            </td>
            </tr>
          <tr>
            <td>&nbsp;</td>
            <td>Html editor</td>
            <td>
              
              <select name="editor" class="forms">
                <option value="0">0 κανένα</option>
                <option value="1">1 simple</option>
                <option value="2">2 advanced</option>
                <option value="<?php echo $editor ?>" selected><?php echo $editor ?></option>
              </select></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>Mobile version</td>
            <td><select name="mobile" class="forms">
              <option value="0">0 no</option>
              <option value="1">1 yes</option>
              <option value="<?php echo $mobile ?>" selected><?php echo $mobile ?></option>
            </select></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td><strong>Publish website</strong></td>
            <td>
        <select name="sitepath" class="forms">
        <?php if ($sitepath=="/") { ?>
        <option value="/" selected>publish</option>
        <option value="">unpublished</option>
        <?php }else{?> 
        <option value="" selected>unpublished</option>
        <option value="/">publish</option>
        <?php } ?>
        </select>
            </td>
          </tr>
          <tr bgcolor="#F2F2F2">
            <td><img src="img/ic2.png" alt=""></td>
            <td class="titles">Συνδέσεις</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>Holiday nr.</td>
            <td><input type="text" name="holiday_id" class="forms" size="20" value="<?php echo $holiday_id ?>" maxlength="11"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>Online booking  link</td>
            <td><input type="text" name="resurl" class="forms" size="100" value="<?php echo $resurl ?>"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>Cosmores site nr.</td>
            <td><input type="text" name="site" class="forms" size="20" value="<?php echo $site ?>" maxlength="11"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>Cosmores code</td>
            <td><input type="text" name="code" class="forms" size="100" value="<?php echo $code ?>"></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>Promo code</td>
            <td><input type="text" name="promocode" class="forms" size="100" value="<?php echo $promocode ?>"></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>
</div>
</form></td>
  </tr>
</table><?php include 'menudown.php';?>
<?php } ?>
</body>
</html>
