<? require 'header.php'; ?>
<div class="menucenter">
<?
$sql=mysql_query("SELECT * FROM tb_advban200 WHERE play = '0' ORDER by id DESC"); //один запрос
if(mysql_num_rows($sql)==0)
{
echo "<div class=error>Баннеров в ротаторе не заказано!</div>";
}else{
echo "<center>";
while($row=mysql_fetch_assoc($sql))
{
$urlsite=$row["urlsite"];
$urlpic=$row["urlpic"];
$bd=$row["begindate"];
$plan=$row["numdays"];
$ed=$bd+$plan*86400;
$enddate=date("d.m.Y H:i:s", $ed);
echo "<a href=\"$urlsite\" target=\"_blank\"><img src=\"$urlpic\" width=200 height=300></a><br>Показ заказан до $enddate<br><br>";
}
echo "<hr></center>";
}
echo "<small><center><a href=\"advertise.php?adv=banner200\">Заказать баннер</a>";
?>
<? require 'footer.php'; ?>
