<? include('checkcookie.php'); ?>
<h3>Добавление рекламы во фрейме</h3>
<br><br>

<?
$plan = $_POST["plan"];
$urlsite = $_POST["url"];
$text=$_POST["text"];

if($urlsite==NULL)
{
}else{
	$t=time();
	$t=$t+$plan*24*3600;

	$query = "INSERT INTO tb_frameads (link, text, enddate) VALUES ('$urlsite', '$text', '$t')";
	mysql_query($query) or die(mysql_error());

	echo "Добавлено...";
}

?>

<form action="adminmain.php?p=frameadsadd" method="POST">

<table>
<tr><th width="150">URL сайта(с http://)</th>
<td><input type="text" size="25" maxlength="100" name="url" autocomplete="off" value=""></td></tr>
<tr><th width="150">Текст ссылки</th>
<td><input type="text" size="25" maxlength="255" name="text" autocomplete="off" value=""></td></tr>
<tr><th width="150">Кол-во дней показа:</th>
<td><input type="text" size="25" maxlength="100" name="plan" autocomplete="off" value="1"></td></tr>
<tr><td></td><td>
<input type="submit" value="добавить" class="button"></td></tr>
</table>

</form>