Файл: index.php
Строк: 52
<?php
include_once($_SERVER["DOCUMENT_ROOT"]."/style/head.php");
echo '<div class="title_red">Проплаченная реклама</div>';
$c=mysql_query("SELECT * FROM `transitions`");
$c=mysql_num_rows($c);
$cn=mysql_num_rows(mysql_query("SELECT * FROM `transitions` WHERE `d`='".date(d)."'"));
$q = mysql_query('SELECT `id`,`url`,`name`,`color`,`bold`,`italic` FROM `wapkassa` WHERE `work` > ' . time() . ' ORDER BY RAND() LIMIT 6') or die('DB: ' . mysql_error());
if (mysql_num_rows($q) > 0) {
while ($link = mysql_fetch_assoc($q)) {
$cou=mysql_query("SELECT * FROM `transitions` WHERE `url`='".$link['id']."'");
$cou=mysql_num_rows($cou);
echo '<div class="link"><a ' . (($link['color'] || $link['bold'] || $link['italic']) ? 'style="' . ($link['bold'] ? 'font-weight:bold;' : '') . ($link['italic'] ? 'font-style:italic;' : '') . ($link['color'] ? 'color:' . $link['color'] : '') . '" ' : '') . ' href="url'.$link['id'].'" target="_blank"><img src="http://www.google.com/s2/favicons?domain='.$link['url'].'"> ' . $link['name'] . ' <span style="float: right;">['.$cou.']</span></a></div>';
}
}
echo '<div class="info_bottom">Всего кликов ['.$c.'] | Новые клики <font color="#a4e169">[+'.$cn.']</font></div>';
echo '<div class="title_black">Покупка рекламы</div>';
echo '<div class="text_center"><table width="100%"><tbody><tr><td><table><tbody><tr><td class="pay"><img src="/style/ico/wap_kassa.png"></td><td>WapKassa<br>Цены от 0.5 руб.</td></tr></tbody></table></td><td>
<a href="/rek" style="float: right;" class="wap_kassa">Купить рекламу</a></td></tr></tbody></table></div>
<div class="text_bottom"><table width="100%"><tbody><tr><td><table><tbody><tr><td class="pay"><img src="/style/ico/free_cod.png"></td><td>Подарочный код<br>Бесплатная публикация рекламы</td></tr></tbody></table></td><td>
<a href="/free_cod" style="float: right;" class="free_cod">Использовать</a></td></tr></tbody></table></div>
';
echo '<div class="title_black">Нас рекомендуют</div>';
$sql = mysql_query("SELECT * FROM `otz` ORDER BY `id` DESC LIMIT 5");
while($mess = mysql_fetch_assoc($sql))
{
echo '<div class="text_center"><table><tbody><tr><td class="otz"><img src="/style/ico/bal_'.output($mess['po']).'.png"></td><td>'.output($mess['name']).' | '.output(times($mess['date'])).'<br>';
if($mess['po']==pol){
echo ''.output($mess['text']).'';
}else{
echo ''.output($mess['text']).'';
}
echo '<br><small>IP: '.output($mess['ip']).'</small></td></tr></tbody></table></div>';
}
if(mysql_result(mysql_query("SELECT COUNT(id) FROM `otz`"), 0)==0){
echo '<div class="err">Отзывов пока еще нет</div>';
}
echo '<div class="link"><a href="/otz"><img src="/style/ico/menu.png"> Отзывы ['.mysql_num_rows(mysql_query("SELECT * FROM `otz` WHERE `id`")).']</a></div>';
include_once($_SERVER["DOCUMENT_ROOT"]."/style/foot.php");
?>