<!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
$domain = mysql_real_escape_string(stripslashes($_REQUEST['domain']));
$firma = mysql_real_escape_string(stripslashes($_REQUEST['firma']));
$editor = mysql_real_escape_string(stripslashes($_REQUEST['editor']));
$mobile = mysql_real_escape_string(stripslashes($_REQUEST['mobile']));
$company = mysql_real_escape_string(stripslashes($_REQUEST['company']));
$company_en = mysql_real_escape_string(stripslashes($_REQUEST['company_en']));
$location = mysql_real_escape_string(stripslashes($_REQUEST['location']));	 
$location_en = mysql_real_escape_string(stripslashes($_REQUEST['location_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']));	  
$tel = mysql_real_escape_string(stripslashes($_REQUEST['tel']));	 
$tel_en = mysql_real_escape_string(stripslashes($_REQUEST['tel_en']));	  
$fax = mysql_real_escape_string(stripslashes($_REQUEST['fax']));	 
$sitemail = mysql_real_escape_string(stripslashes($_REQUEST['sitemail']));
$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']));
$sitescript = mysql_real_escape_string(stripslashes($_REQUEST['sitescript']));
$sitescript2 = mysql_real_escape_string(stripslashes($_REQUEST['sitescript2']));	
$sitescript3 = mysql_real_escape_string(stripslashes($_REQUEST['sitescript3']));				 	 

if  (isset($_POST['submit'])) {
	$sql="UPDATE siteinfo SET  domain='$domain', firma='$firma', company='$company', company_en='$company_en', address='$address', address_en='$address_en',region='$region', region_en='$region_en', tel='$tel', tel_en='$tel_en', fax='$fax', 
sitemail='$sitemail', map='$map', holiday_id='$holiday_id', resurl='$resurl', site='$site', code='$code', mobile='$mobile', sitescript='$sitescript', sitescript2='$sitescript2', sitescript3='$sitescript3', editor='$editor' 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'];
			$company_de=$myrow['company_de'];
			$activity=$myrow['activity'];
			$activity_en=$myrow['activity_en'];
			$activity_de=$myrow['activity_de'];
			$location=$myrow['location'];
			$location_en=$myrow['location_en'];
			$location_de=$myrow['location_de'];
			$address=$myrow['address'];
			$address_en=$myrow['address_en'];
			$address_de=$myrow['address_de'];
			$region=$myrow['region'];
			$region_en=$myrow['region_en'];
			$region_de=$myrow['region_de'];
			$tel=$myrow['tel'];
			$tel_en=$myrow['tel_en'];
			$tel_de=$myrow['tel_de'];
			$fax=$myrow['fax'];
			$sitemail=$myrow['sitemail'];
			$map=$myrow['map'];
			$holiday_id=$myrow['holiday_id'];
			$resurl=$myrow['resurl'];
			$site=$myrow['site'];
			$code=$myrow['code'];
			$mobile=$myrow['mobile'];
			$sitescript=$myrow['sitescript'];
			$sitescript2=$myrow['sitescript2'];
			$sitescript3=$myrow['sitescript3'];
			$editor=$myrow['editor'];
?>

<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" class="text">
          <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/lang1.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/lang2.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/lang1.png" width="16" height="16" alt=""></td> 
            <td>Διεύθυνση  </td>
            <td> 
              <textarea name="address" class="mceEditor" rows="4"><?php echo $address ?></textarea>
              </td>
          </tr>
          <tr>
            <td><img src="img/lang2.png" width="16" height="16" alt=""></td> 
            <td>Διεύθυνση </td>
            <td> 
              <textarea name="address_en" class="mceEditor" rows="4"><?php echo $address_en ?></textarea>
            </td>
          </tr>
          <tr>
            <td><img src="img/lang1.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/lang2.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/lang1.png" width="16" height="16" alt=""></td> 
            <td>Τηλέφωνα, Fax  </td>
            <td> 
              <textarea name="tel" rows="3" class="mceEditor"><?php echo $tel ?></textarea>
              </td>
          </tr>
          <tr>
            <td><img src="img/lang2.png" width="16" height="16" alt=""></td> 
            <td>Τηλέφωνα, Fax </td>
            <td> 
              <textarea name="tel_en" rows="3" class="mceEditor"><?php echo $tel_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><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>1 Code-header</td>
                <td>2 Code-body</td>
                <td>3 Code-footer</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 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>
        </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>
