<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<!-- #BeginEditable "doctitle" -->

<title>Direct Booking</title>

<!-- #EndEditable -->

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

<link rel="stylesheet" href="allstyles.css" type="text/css">

<link rel="stylesheet" href="styles.css" type="text/css">

<script language="JavaScript">

<!--

function MM_openBrWindow(theURL,winName,features) { //v2.0

  window.open(theURL,winName,features);

}

//-->

</script>
<?php 
	  include 'includes/headcosmores.php';
?>

</head>

<script type="text/javascript">>

function blockdisplay(i) {

			  if (document.getElementById){

			    if (document.getElementById("blockdisplay"+i)) {

			      for ( j = 1; j < 1000; j++ ) {

			        if (document.getElementById('blockdisplay' + j)) {document.getElementById('blockdisplay' + j).style.display = 'none';}

				    else {j = 1000;}

			      }

			      if (i) {document.getElementById("blockdisplay"+i).style.display = 'block';}

			    }

			  }

			}

			</script>



<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" background="layout/back.gif">

<table width="734" border="0" cellspacing="0" cellpadding="0" align="center" class="txt" height="5">

  <tr>

    <td></td>

  </tr>

</table>

<table width="734" border="0" cellspacing="0" cellpadding="0" align="center" class="txt" height="1">

  <tr>

    <td bgcolor="#004C84"></td>

  </tr>

</table>

<table width="734" border="0" cellspacing="0" cellpadding="0" align="center" class="txt" height="1">

  <tr> 

    <td bgcolor="#004C84" width="1"></td>

    <td bgcolor="#FFFFFF" width="732" valign="top" align="center"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="732" height="231">

        <param name=movie value="flash/booking.swf">

        <param name=quality value=high>

        <embed src="flash/booking.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="732" height="231">

        </embed> 

      </object></td>

    <td bgcolor="#004C84" width="1"></td>

  </tr>

</table>

<table width="734" border="0" cellspacing="0" cellpadding="0" align="center" class="txt" height="100%">

  <tr>

    <td bgcolor="#004C84" width="1" height="22"></td>

    <td bgcolor="#FFFFFF" width="732" valign="middle" align="center" background="layout/backcenter.gif" height="22"> 

      <div align="right"><a href="direct_gr.php"><img src="image/gr_flag.jpg" width="28" height="18" border="0"></a>&nbsp;&nbsp;</div>

    </td>

    <td bgcolor="#004C84" width="1" height="22"></td>

  </tr>

  <tr> 

    <td bgcolor="#004C84" width="1"></td>

    <td bgcolor="#FFFFFF" width="732" valign="top" align="center" background="layout/backcenter.gif"> 

      <p>&nbsp;</p>

      <table width="710" border="0" cellspacing="0" cellpadding="0" align="center">

        <tr> 

          <td width="600" valign="top"> 

            <table width="500" border="0" cellspacing="0" cellpadding="0" align="right" class="text">

              <tr> 

                <td valign="top" align="center"> 

                  <?php 

		  $nu_row = '0';

              $zero='0';

	if  ($Submit) {

	

		$emailPattern = '/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i';

	if (!preg_match($emailPattern, $email)){

	?>

                  <table width="311" border="0" cellspacing="0" cellpadding="0" align="center" class="text">

                    <tr> 

                      <td valign="top" align="center"><br>

                        <br>

                        <br>

                        <a href="direct.php" class="texlink1">Try again</a><br>

                        Please review the email address you entered. There seems 

                        to be a problem</td>

                    </tr>

                  </table>

                  <?php

	}else  {

	

	  		$dbh=mysql_connect("localhost","olympicv","olym8y");

			mysql_select_db("olympicv_olympic",$dbh);

			$result = mysql_query("SELECT * FROM codes_table WHERE id=$id",$dbh);

			$myrow=mysql_fetch_array($result); 

					$codes=$myrow['code'];

					

					if (($codes==$code1) & ($codes!='')) { 

	

			  function make_seed() {

				    list($usec, $sec) = explode(' ', microtime());

				    return (float) $sec + ((float) $usec * 100000);

				}

				srand(make_seed());

				$code = rand();

			

			function preprocessHeaderField($value)

{

  $ret = str_replace("\r", "", $value);

  $ret = str_replace("\n", "", $ret);

  $find = array("/bcc\:/i",

                "/Content\-Type\:/i",

                "/Mime\-Type\:/i",

                "/cc\:/i",

                "/to\:/i");

  $ret = preg_replace($find,

                      "",

                      $ret);

  return $ret;

}

$email=preprocessHeaderField($email);





			$to="info@olympicvillas.com";

			$from="Marinet Webserver <webserver@marinet.gr>";

			$reply=$email;

			$reply=substr($reply, 0, 50);

			$headers="From: $from\nReply-To: $reply";

			$subject="Another request from olympicvillas  Server";

			$message="Nέο μήνυμα από τον Webserver (direct booking!)

Διαθέσιμα στοιχεία : 

Seleted Option: $list_choice

Real name:$realname 

Χώρα: $Country_Name

Τηλέφωνο/fax: $Phone_Fax_Number

E-mail :   $email

Σχόλιο:

________________________________

$comments



________________________________



Best regards

olympicvillas  Web Server 

Marinet Mail Service";

mail ($to,$subject, $message,$headers);

?>

                  <?php 

	



			$to="$email";

			$from="Marinet Webserver <webserver@marinet.gr>";

			$reply="info@olympicvillas.com";

			$headers="From: $from\nReply-To: $reply";

			$subject="Greetings from Ollympic villas Hotel";

			$message="



________________________________

Thank you for your email, we will contact you as soon as possible



Best regards

olympicvillas  Web Server 

Marinet Mail Service";

mail ($to,$subject, $message,$headers);

?>

                  <?php 

			$dbh=mysql_connect("localhost","olympicv","olym8y");

			mysql_select_db("olympicv_olympic",$dbh);

			$sql27 = "SELECT * FROM  ADDRESSBOOK WHERE email='$email'";

			$result27 = mysql_query($sql27);

			$nu_row = mysql_num_rows($result27);

?>

                  <br>

                  <?php 

	if  ( ( $nu_row==$zero)) {

	?>

                  <?php if ($flag=='yes') {











			$dbh=mysql_connect("localhost","olympicv","olym8y");

			mysql_select_db("olympicv_olympic",$dbh);

			$sql = "INSERT INTO ADDRESSBOOK (list_choice, realname, Country_Name, Phone_Fax_Number, email, comments, type, code ) VALUES ('$list_choice','$realname', '$Country_Name', '$Phone_Fax_Number', '$email', '$comments', '$type' , '$code')";

			$result = mysql_query($sql);

?>

                  <?php }



                                             }    else {    }?>

                  <br>

                  <br>

                  <p align="center"><br>

                    Thank you for contacting us<br>

                    If you don't receice shortly an email from olympic villas 

                    booking<br>

                    please check again the given email address : 

                    <?php echo $email ?>

                    <br>

                  </p>

                  <?php } else { ?>

                  <table width="500" border="0" cellspacing="0" cellpadding="0" align="center" class="text">

                    <tr> 

                      <td valign="top" align="center"><a href="direct.php" class="texlink1">Try 

                        again</a><br>

                        typing the correct image data </td>

                    </tr>

                  </table>

                  <?php  }  ?>

                  <?php 

	}

	} else { ?>

                  <form name="form1" method="post" action="<?php echo $PHP_SELF ?>">

                    <table width="100%" border="0" cellspacing="2" cellpadding="0" class="text">

                      <tr valign="top"> 

                        <td colspan="2"> 

                          <div align="center"><font color="#000033">Please select 

                            one of the options...</font><br>

                            <select name="list_choice" class="forma">

                              <option SELECTED>Please confirm availability for 

                              the following dates 

                              <option>Please notify availability and rates for 

                              the following dates 

                              <option>Please book the following dates for me 

                              <option>Other, please tell us ... 

                            </select>

                            <br>

                            <br>

                          </div>

                        </td>

                      </tr>

                      <tr> 

                        <td width="44%" valign="top"><img src="image/curvarow.gif" align="absmiddle"><font face="Arial" color="#000033"> 

                          Please enter your name...</font> <br>

                          <input type="text" name="realname" min="60" maxlength="60" align="BOTTOM" size=20 class="forma">

                          <br>

                          <br>

                          <img src="image/curvarow.gif" align="absmiddle"> <font color="#000000"><font color="#000033"> 

                          Your &quot;e-mail&quot; address</font></font><font face="Arial" size=-1 color="#000000"><b> 

                          </b></font><font color="#000000"><font color="#FF0000">(required)</font></font><br>

                          <input type="text" name="email" min="60" maxlength="60" align="BOTTOM" size=20 class="forma">

                          <br>

                          <br>

                          <font color="#000000"><font color="#000033"><img src="image/curvarow.gif" align="absmiddle"> 

                          Your &quot;Phone / Fax Number&quot;</font></font><font face="Arial" size=-1 color="#000000"><b> 

                          </b></font><br>

                          <input type="text" name="Phone_Fax_Number" min="60" maxlength="95" align="BOTTOM" size=20 class="forma">

                          <br>

                          <br>

                          <img src="image/curvarow.gif" align="absmiddle"> <font color="#000000"><font color="#000033">Your 

                          Country</font> </font><br>

                          <input type="text" name="Country_Name" min="60" maxlength="60" align="BOTTOM" size=20 class="forma">

                          <br>

                          <font face="Arial" size=-1> Please click on the Send 

                          button only once.<br>

                          <br>

                          </font></td>

                        <td width="56%" valign="top"> 

                          <p><img src="image/curvarow.gif" align="absmiddle"> 

                            <font color="#000033">Please remember to include :</font><b><br>

                            </b><font face="Arial" size=-1>Your <i>POSTAL ADDRESS</i> 

                            below for MAIL </font><br>

                            <img src="image/curvarow.gif" align="absmiddle"> <font face="Arial" color="#000033">also 

                            please notify:</font><br>

                            <i>arrival date AND number of nights AND persons</i> 

                            to stay<br>

                            <textarea wrap=1 name="comments" rows=12 cols=35 class="forma">

MAIL ADDRESS and/or

Dates, Persons and Nights to stay :

</textarea>

                            <br>

                            <input type="hidden" name="type" value="direct booking">

                            For newsletters & special offers please check here 

                            <input type="checkbox" name="flag" value="yes" checked>

                        </td>

                      </tr>

                      <tr> 

                        <td colspan="2" valign="top">Type the following Image 

                          Data 

                          <?

global $data;

$data = mt_rand(100000,1000000);

        ?>

                          <?php 

	  			$dbh=mysql_connect("localhost","olympicv","olym8y");

			mysql_select_db("olympicv_olympic",$dbh);

			$sql = "INSERT INTO  codes_table ( code ) VALUES ( '$data')";

			$result = mysql_query($sql);



			$result = mysql_query("SELECT * FROM codes_table WHERE code=$data",$dbh);

			$myrow=mysql_fetch_array($result); 

					$id=$myrow['id'];

			?>

                          <input type="hidden" name="id" value="<?php echo $id ?>">

                          <img src=dynamicimage.php?dt=<? global $data; echo base64_encode($data);?> border="1" align="absmiddle"> 

                          : 

                          <input type="text" name="code1"  size="20" class="txt" >

                        </td>

                      </tr>

                      <tr> 

                        <td width="44%" valign="top"> 

                          <input type="submit"  value="Send Request" name="Submit" class="forma" onClick="MM_validateForm('email','','RisEmail');return document.MM_returnValue">

                          &nbsp;&nbsp;&nbsp; 

                          <input type="reset" value="Clear" name="reset" class="forma">

                        </td>

                        <td width="56%" valign="top">&nbsp;</td>

                      </tr>

                      <tr valign="top" align="center"> 

                        <td colspan="2"> 

                          <div align="center"><img src="image/dotline.gif" height="4"></div>

                        </td>

                      </tr>

                    </table>

                  </FORM>

                  <?php } ?>

                </td>

              </tr>

              <tr> 

                <td valign="top" align="center"> 

                  <div align="left"><a href="where_en.php" class="texlink">Alternative 

                    Booking</a></div>

                </td>

              </tr>

            </table>

          </td>

          <td width="160" valign="top" align="right"> 

            <table width="160" border="0" cellspacing="0" cellpadding="0" class="txt">

              <tr> 

                <td width="186" valign="top" align="right"> 

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" height="4">

                    <tr> 

                      <td valign="top" align="right"> <a href="index1_en.php" class="link">General 

                        info </a></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" align="center">

                    <tr> 

                      <td bgcolor="#FFDEDE"><img src="layout/linesm.gif" width="186" height="7"></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" height="4">

                    <tr> 

                      <td valign="top" align="right"> <a href="accommodation_en.php" class="link">Accomodation 

                        types</a> </td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" align="center">

                    <tr> 

                      <td bgcolor="#FFDEDE"><img src="layout/linesm.gif" width="186" height="7"></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" height="4">

                    <tr> 

                      <td valign="top" align="right"> <a href="direct_en.php" class="link">Booking</a></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" align="center">

                    <tr> 

                      <td bgcolor="#FFDEDE"><img src="layout/linesm.gif" width="186" height="7"></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" height="4">

                    <tr> 

                      <td valign="top" align="right"> <a href="images_en.php" class="link">Image 

                        gallery </a></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" align="center">

                    <tr> 

                      <td bgcolor="#FFDEDE"><img src="layout/linesm.gif" width="186" height="7"></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" height="4">

                    <tr> 

                      <td valign="top" align="right"> <a href="guestbook_en.php" class="link">Guestbook</a></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" align="center">

                    <tr> 

                      <td bgcolor="#FFDEDE"><img src="layout/linesm.gif" width="186" height="7"></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" height="4">

                    <tr> 

                      <td valign="top" align="right"> <a href="links_en.php" class="link">Useful 

                        Links </a></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" align="center">

                    <tr> 

                      <td bgcolor="#FFDEDE"><img src="layout/linesm.gif" width="186" height="7"></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" height="4">

                    <tr> 

                      <td valign="top" align="right"> <a href="contact_en.php" class="link">Contact</a></td>

                    </tr>

                  </table>

                  <table width="186" border="0" cellspacing="0" cellpadding="0" class="txt" align="center">

                    <tr> 

                      <td bgcolor="#FFDEDE"><img src="layout/linesm.gif" width="186" height="7"></td>

                    </tr>

                  </table>

                </td>

              </tr>

            </table>

            <p align="center"><a href="#"><img src="images/map.JPG" width="170" onClick="MM_openBrWindow('map.htm','','width=511,height=529')" border="0"></a></p>

            <p align="center" class="texlink" onClick="MM_openBrWindow('map.htm','','width=511,height=529')"><a href="#" class="texlink">click 

              to enlarge</a></p>

          </td>

        </tr>

      </table>

    </td>

    <td bgcolor="#004C84" width="1"></td>

  </tr>

  <tr>

    <td bgcolor="#004C84" width="1"></td>

    <td bgcolor="#FFFFFF" width="732" valign="bottom" align="center" background="layout/backcenter.gif" height="20">

      <div align="right"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" width="160" height="20">

          <param name=movie value="images/FLASH%20MARINET.swf">

          <param name=quality value=high>

          <embed src="images/FLASH%20MARINET.swf" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="160" height="20">

          </embed> 

        </object></div>

    </td>

    <td bgcolor="#004C84" width="1"></td>

  </tr>

</table>





</body>

</html>



