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

<?
$plan = $_POST["plan"];
$urlsite = $_POST["url"];
$desc=$_POST["description"];
$tx=$_POST["text"];
$cvet=$_POST["cvet"];

if($urlsite==NULL) {
}else{

$plan = limpiar($plan);
$urlsite = limpiar($urlsite);
$desc = limpiar($desc);
$tx = limpiar($tx);
$cvet = limpiar($cvet);
$t=time();

$query = "INSERT INTO tb_statlink (url, description, text, cvet, begindate, numdays) VALUES ('$urlsite', '$desc', '$tx', '$cvet', '$t', '$plan')";
mysql_query($query) or die(mysql_error());

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

}

?>

<form action="adminmain.php?p=linkadd" 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="30" name="description" autocomplete="off" value=""></td></tr>
<tr><th width="150">описание:</th>
<td><input type="text" size="25" maxlength="50" name="text" autocomplete="off" value=""></td></tr>
<tr><th width="150">выделить ( 1 - да, 0 - нет):</th>
<td><input type="text" size="25" maxlength="1" name="cvet" autocomplete="off" value="1"></td></tr>
<tr><th width="150">Кол-во дней показа:</th>
<td><input type="text" size="25" maxlength="100" name="plan" autocomplete="off" value="1"></td></tr>
</td></tr>
<tr><td></td><td>
<input type="submit" value="добавить" class="button"></td></tr>
</table>

</form>