<?php
	include("../pages/vars.php");
	include("../pages/db.php");
	include("password.php");
	
	session_start();
	$s_secure = $_SESSION['s_secure'];			
	$admin_access = "no";
	$msg = "gverdi dablokilia";

if($s_secure == $u_secure && isset($_SESSION['s_secure']))
{
	$admin_access = "yes";
	$msg = "";
	//
	if($_SERVER['REQUEST_METHOD'] == "POST" && $cur_id != "")
	{
		$msg = "informacia ganaxlebulia";
		mysql_query("UPDATE banners_info SET img = '$t2', url = '$t3', title = '$t4', width = '$t5', height = '$t6', border = '$t7', style = '$t8', view = '$t9', click = '$t10', start_date = '$t11', end_date = '$t12',  status = '$status' WHERE id = '$cur_id'");
	}
	else
	{
		// $msg = "informacia ganaxlebulia";
	}

	if($cur_id != "")
	{
		$result = mysql_query("SELECT * FROM banners_info WHERE id = '$cur_id'", $db);
		if($myrow = mysql_fetch_array($result))
		{
			$admin_access = "yes";
			// $msg = "";
			// $ = $myrow[''];
			$s1 = $myrow['id'];
			$status = $myrow['status'];
			$s2 = $myrow['img'];
			$s3 = $myrow['url'];
			$s4 = $myrow['title'];
			$s5 = $myrow['width'];
			$s6 = $myrow['height'];
			$s7 = $myrow['border'];
			$s8 = $myrow['style'];
			$s9 = $myrow['view'];
			$s10 = $myrow['click'];
			$s11 = $myrow['start_date'];
			$s12 = $myrow['end_date'];
		}
	}
	else
	{
		// $msg = "gverdi dablokilia";
	}
}
?>
<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Georgiansms.com | Admin</title>
<link rel="shortcut icon" href="../js_css/favicon.ico">
<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/admin.js"></script>
<form name="form1" action="<?=$_SERVER['REQUEST_URI']?>" method="POST">
<table border="0" width="597" id="table1" cellspacing="0" cellpadding="0">
	<tr>
		<td width="120" class="geo" align="right">&nbsp;</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo">&nbsp;</td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><b>admin zona (baneri)</b>&nbsp;</td>
	<tr>
<?php
	if($admin_access == "yes")
	{
?>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><a href="admin_book.php?u_secure=<?=$u_secure?>" class="eng">Back</a>&nbsp;</td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo">&nbsp;</td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">statusi</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo">
		<select name="status" class="in_eng">
		<option class="onew" value="0"<? if($status=="0"){echo(" selected ");} ?>>Hidden</option>
		<option class="oact" value="1"<? if($status=="1"){echo(" selected ");} ?>>Active</option>
		</select></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">nomeri</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="cur_id" class="in_eng" size="5" maxlength="2" value="<?=$s1?>" readonly></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">suraTi</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t2" class="in_eng" size="50" maxlength="250" value="<?=$s2?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">gza</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t3" class="in_eng" size="50" maxlength="250" value="<?=$s3?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">dasaxeleba</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t4" class="in_eng" size="50" maxlength="250" value="<?=$s4?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">sigrZe</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t5" class="in_eng" size="10" maxlength="4" value="<?=$s5?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">simaRle</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t6" class="in_eng" size="10" maxlength="4" value="<?=$s6?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">CarCo</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t7" class="in_eng" size="5" maxlength="1" value="<?=$s7?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">stili</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t8" class="in_eng" size="50" maxlength="50" value="<?=$s8?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">Cveneba</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t9" class="in_eng" size="10" maxlength="10" value="<?=$s9?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">kliki</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t10" class="in_eng" size="10" maxlength="10" value="<?=$s10?>"><input type="hidden" name="u_secure" class="in_eng" size="10" value="<?=$u_secure?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">dasawyisis dro</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t11" class="in_eng" size="12" maxlength="10" value="<?=$s11?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">damTavrebis dro</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="text" name="t12" class="in_eng" size="12" maxlength="10" value="<?=$s12?>"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">moqmedeba</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo"><input type="submit" value="Change banner" class="bu_eng3" style="cursor:hand;"></td>
	</tr>
	<tr>
		<td width="120" class="geo" align="right">&nbsp;</td>
		<td width="10">&nbsp;</td>
		<td width="467" class="geo">&nbsp;</td>
	</tr>
<?php
	}
?>
	<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>