<?php
	include("vars.php");
	include("db.php");
	

if($_SERVER['REQUEST_METHOD'] == "POST")
{//1
	if($your_email && $password1 && $user_ip)
	{//2
		$msg = "arasworia eleqtronuli fosta an paroli";
		$result = mysql_query("SELECT * FROM register WHERE email = '$your_email' AND password = '$password1' AND account_status = '1'",$db);
		if($myrow = mysql_fetch_array($result))
		{////

			$randomt = rand(5,8888)*date('Ydms');
			$randomt .= $password1;
			$randomt = md5($randomt);
			session_start();
			$_SESSION['s_secure'] = $randomt;
			$_SESSION['user_id'] = $myrow['id'];
			//echo($random);
			header("Location: book.php?u_event=book&u_secure=".$randomt);
		}////
	}//2
	else
	{//2
		$msg = "ar Sedis";
	}//2
}//1
mysql_close();
?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title></title>
<link href="../js_css/iframe.css" rel="stylesheet">
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#1AB9F1">
<script language="javascript" src="../js_css/javascript.js"></script>
<form name="form1" action="<?=$_SERVER['REQUEST_URI']?>" method="POST">
<table border="0" width="297" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td height="19" colspan="3" width="297">
		<img border="0" src="../img/title/address_book.jpg" width="196" height="19"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;</td>
		<td width="10">&nbsp;</td>
		<td width="167" class="geo">&nbsp;</td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;eleqtronuli fosta</td>
		<td width="10">&nbsp;</td>
		<td width="167" class="geo"><input type=text class="in_eng" name="your_email" size="25" value="" maxlength="35">&nbsp;</td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;paroli</td>
		<td width="10">&nbsp;</td>
		<td width="167" class="eng"><input type=password class="in_eng" name="password1" size="25" value="" maxlength="15">&nbsp;</td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;<a href="forgotten.php" class="link_geo4" target="_self">Semaxsene paroli</a></td>
		<td width="10">&nbsp;</td>
		<td width="167" class="geo">&nbsp;<input type=button class="bu_geo3" name="send" value="Sesvla" style="cursor:hand;" onclick="address_book();">&nbsp;</td>
	</tr>
	<tr>
		<td height="19" colspan="3" width="297" class="geo" align="center">&nbsp;</td>
	</tr>
	<tr>
		<td height="19" colspan="3" width="297" class="geo" align="center">&nbsp;<?=@$msg?></td>
	</tr>
</table>
</form>
</body>

</html>