Файл: rek_head.php
Строк: 27
<?php
echo '<div class="rek_head">';
//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)
{
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>';
?>