Файл: public_html/index.php
Строк: 146
<?php
include_once($_SERVER["DOCUMENT_ROOT"]."/style/head.php");
echo'<title>'.$sett['title'].'</title>';
$news = mysql_query("SELECT * FROM `news` ORDER BY `time` DESC"); $sql_count++;
echo '<div id="raz"><img src="style/images/icon.png"> Последняя новость</div>';
if (mysql_num_rows($news) == TRUE)
{
$news = mysql_fetch_array($news);
$count_comment_news = mysql_result(mysql_query("SELECT COUNT(*) FROM `news_comment` WHERE `id_news` = '".$news['id']."'"),0); $sql_count++;
echo'<div id="news">
<img src="style/images/news.gif" alt="news"/> <b>'.output($news['name']).'</b><br />';
echo' '.output($news['about']).'<br />';
echo'<small>Новость создана: '.output(times($news['time'])).' </small>';
?>
<p> <a href="/KommNews/<?=$news['id']?>/"> <img src="style/images/comments.png" alt=""/> Комментарии (<?=$count_comment_news?>)</a></p>
</div>
<?
}
else
{
echo '<div id="news">Новости не созданы</div>'; }
?>
<?php
$c=mysql_query("SELECT * FROM `transitions`");
$c=mysql_num_rows($c);
$cn=mysql_num_rows(mysql_query("SELECT * FROM `transitions` WHERE `date`='".date(d)."'"));
echo '<div id="links"><a href="/rekl"><img src="style/images/1shop.png" alt="1shop"/> Купить рекламу <small>0р.50к./сутки</small></a></div><div id="raz"><img src="style/images/adv.gif"> <span class="count">клики: <b>'.$c.'/<font color="red">+'.$cn.'</font></b></span></div>';
$rmq=mysql_query('SELECT * FROM `worldkassa` WHERE `expire`>NOW() ORDER BY RAND(), `payment` ASC LIMIT 10')or die('DB: '.mysql_error());
$imr=mysql_num_rows($rmq);
if($imr>0){
while($link=mysql_fetch_assoc($rmq)){
$cou=mysql_query("SELECT * FROM `transitions` WHERE `url`='".$link['id']."'");
$cou=mysql_num_rows($cou);
echo'<div id="links"><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'.htmlspecialchars($link['id']).'" target="_blank"><img src="http://www.google.com/s2/favicons?
domain='.htmlspecialchars($link['url']).'" alt="'.htmlspecialchars($link['url']).'"/> '.htmlspecialchars($link['name']).' <div class="count"> '.$cou.'</div></a>
</div>';
};
}else{
echo'<div class="error">Нет оплаченной рекламы!</div>';
};
echo '<div id="raz"><img src="style/images/icon.png"> Сайты</div>';
echo'<div id="con">Активные:<div class="count">'; include_once($_SERVER["DOCUMENT_ROOT"]."/system/active.php"); echo'</div></div>';
echo'<div id="con">Неактивные:<div class="count">'; include_once($_SERVER["DOCUMENT_ROOT"]."/system/noactive.php"); echo'</div></div>';
echo '<div id="raz"><img src="style/images/icon.png"> Информация</div><div id="links"><a href="info"><img src="style/images/2info.png"> Полезная информация</a></div>';
$count = mysql_result(mysql_query("SELECT COUNT(*) FROM `news`"),0); $sql_count++;
echo' <div id="links"> <a href="/News"> <img src="style/images/img1.png" alt=""/> Новости сети <span class="count"><b>'.$count.'</b></span> </a></div>';
echo '<div id="links"><a href="otz"><img src="/style/images/3otz.png"> Отзывы <span class="count"><b><font color="green">'.mysql_num_rows(mysql_query("SELECT * FROM `otz` WHERE `po`='pol'")).'</b></font> / <b><font color="maroon">'.mysql_num_rows(mysql_query("SELECT * FROM `otz` WHERE `po`='otr'")).'</b></font> / <b><font color="blue">'.mysql_num_rows(mysql_query("SELECT * FROM `otz` WHERE `po`='bez'")).'</b></font></span></a></div>';
echo'<div id="cont"><center><span class="loop"><a href="/info/contacts">Контакты</a></span> <span class="loop"><a href="/help">Тикеты</a></span></center></div>
<div id="raz"><img src="/style/images/icon.png" alt=""/> Pассказать о странице:</div><div class="opacity"><script type="text/javascript" src="//yandex.st/share/share.js" charset="utf-8"></script><div align="center" class="yashare-auto-init" data-yashareL10n="ru" data-yashareType="none" data-yashareQuickServices="yaru,gplus,vkontakte,facebook,twitter,odnoklassniki,moimir,moikrug,lj,friendfeed,surfingbird"></div></div></div>';
echo'<hr>';
include_once($_SERVER["DOCUMENT_ROOT"]."/modules/admin/counter");
include_once($_SERVER["DOCUMENT_ROOT"]."/style/foot.php");
echo'</div>';
?>