Файл: inc/rek_head.php
Строк: 34
<?php
//echo Plus1BannerAsker::create()->setSite(2780)->fetchCode();
$realtime = time();
$realtime = num($realtime);
$req = mysql_query("SELECT * FROM `reklama` WHERE `active` = '1' AND `position` = '1' ORDER BY `mesto` ASC");
if (mysql_num_rows($req) > 0)
{
echo '<div class="rek_head">';
while
($res = mysql_fetch_array($req))
{
$name = html($res['name']);
if (!empty ($res['font'])) {$name = '<strong>' . $name . '</strong>';}
if (!empty ($res['color'])) {$name = '<span style="color:#' . html($res['color']) . '">' . $name . '</span>';}
if ($res['redir'] == 1){$reklama = '<a href="' . $home . '/go.php?id=' . num($res['id']) . '">' . $name . '</a><br/>';}
else {$reklama = '<a href="'.$res['link'].'">' . $name . '</a><br/>';}
if (($res['day'] != 0 && $realtime >= ($res['time'] + $res['day'] * 3600 * 24)) || ($res['count_link'] != 0 && $res['count'] >= $res['count_link']))
{mysql_query("UPDATE `reklama` SET `active` = '2' WHERE `id` = '" . num($res['id']) . "'");}
echo $reklama;
}
echo '</div>';
}
if ($_SESSION['admin'] == $adminlogin or $_SESSION['pwd'] == $setup['password']) {echo '<div class="rmenu"><div align="right"><a href="/wpanel/panel.php">Админка</a></div></div>';}
?>