Файл: inc/ya.php
Строк: 35
<?php
$pc = mysql_result(mysql_query("select count(*) from `u_click`"), 0);
$bc = mysql_result(mysql_query("select count(*) from `go`"), 0);
$ac = $pc + $bc;
$desc = mysql_fetch_assoc(mysql_query("select * from `rek` where `ok`>NOW() order by `id` desc limit 1"));
$data = mysql_query("SELECT * FROM `rek` WHERE `ok`>NOW() AND `id` <> '".$desc['id']."' ORDER BY RAND() LIMIT 15");
$rmq=mysql_query("select * from `rek` where `ok`>NOW()");
$imr=mysql_num_rows($rmq);
if ($imr > 0) {
echo '<div class="title">Реклама<span class="click"><a href="/stats">Переходы: '.$pers.' ';
if ($ac > 0){
echo '(+'.$ac.')';
}
echo '</a></span></div>';
echo '<div class="forlink"><a href="/go/'.$desc['id'].'" class="links" target="_blank"><img src="http://www.google.com/s2/favicons?domain='.$desc['url'].'" alt=""> <font color="'.win($desc['color']).'">'.win($desc['name']).'</font><span class="count">'.$desc['go'].'</span><div class="chi">'.win($desc['comm']).'</div></a></div>';
while ($row = mysql_fetch_assoc($data)){
echo '<div class="forlink"><a href="/go/'.$row['id'].'" class="links" target="_blank"><img src="http://www.google.com/s2/favicons?domain='.$row['url'].'" alt=""><font color="'.win($row['color']).'"> '.win($row['name']).'</font><span class="count">'.$row['go'].'</span><div class="chi">'.win($row['comm']).'</div></a></div>
';
}
} else {
echo '<div class="title">Реклама</div><div class="menu">Нет рекламы.</div>';
}
?>