File size: 6.22Kb
<?
include_once 'sys/inc/start.php';
include_once 'sys/inc/compress.php';
include_once 'sys/inc/sess.php';
include_once 'sys/inc/home.php';
include_once 'sys/inc/settings.php';
include_once 'sys/inc/db_connect.php';
include_once 'sys/inc/ipua.php';
include_once 'sys/inc/fnc.php';
include_once 'sys/inc/user.php';
include_once 'sys/inc/icons.php'; // Иконки главного меню
include_once 'sys/inc/thead.php';
title();
err();
if (!$set['web'])
{
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
$ank = get_user($ank['id']);
if (isset($user))
{
?><div class="grey"><table style="width:100%" cellspacing="0" cellpadding="0"><tr>
<td style="vertical-align:top;" width="10%">
<?
echo '<div class="imgmini">';
echo avatar($ank['id'], true, 128, false);
echo '</div>';
?>
</td>
<td style="vertical-align:top;" width="90%">
<?
echo group($ank['id']) . " $ank[nick] ";
echo medal($ank['id']) . " " . online($ank['id']) . " <br/>";
?> <a href="/online.php" title="онлайн">
Онлайн
<?=mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `date_last` > ".(time()-600).""), 0)?>
</a>
+<?=mysql_result(mysql_query("SELECT COUNT(*) FROM `guests` WHERE `date_last` > ".(time()-600)." AND `pereh` > '0'"), 0)?>
гостей <?
echo '<br/> <span style="font-size:11px;"><a href="/info.php">Моя страница</a> <a href="/umenu.php">Кабинет</a>
<a href="/exit.php">Выход</a></span>';
?>
</td>
</tr></table></div>
<?
}
else
{
}
if (isset($user)) {
echo "<div class='bmenu'>\n";
echo 'Новости сайта ';
echo '<span style="float:right;"><a href="?news_read">Скрыть</a></span>';
echo '</div>';
}
$q = mysql_query("SELECT * FROM `news` WHERE `main_time` > '".time()."' ORDER BY `id` DESC LIMIT 1");
if (mysql_num_rows($q) == 1 && !$set['web'] && $user['news_read'] == 0)
{
$news = mysql_fetch_assoc($q);
echo '<div class="news">';
echo '<a href="/news/news.php?id=' . $news['id'] . '"><b>' . text($news['title']) . '</b></a>
<span style="float:right;font-size:11px;color:959595;"> '.vremja($news['time']).' </span> <br/> ';
echo output_text($news['msg']) . '<br />';
if ($news['link']!=NULL)
echo '<a href="' .htmlentities($news['link'], ENT_QUOTES, 'UTF-8').'">Подробности</a><br />';
echo user::nick($news['id_user'],1,1,1).'';
echo ' <span style="float:right;"><img src="/style/themes/vkwap/ico/bubble.png"/> ' . mysql_result(mysql_query("SELECT COUNT(*) FROM `news_komm` WHERE `id_news` = '$news[id]'"),0) . '</span>';
echo '</div>';
}
echo "<div class='bmenu'>\n";
echo 'Лучшие фото сайта';
echo '</div>';
echo '<div class="white">';
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` "),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
$set['p_str'] = 4;
if ($k_post == 0)
{
echo '<div class="grey">';
echo 'Рейтинг пустой';
echo '</div>';
}
$q = mysql_query("SELECT * FROM `gallery_foto` ORDER BY `rating` DESC LIMIT $start, $set[p_str]");
echo '<table>';
echo '<tr>';
while ($post = mysql_fetch_assoc($q))
{
$ank2 = mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = '$post[id_user]' LIMIT 1"));
echo '<td style="
vertical-align:top;margin:2px;"><center>';
echo "<a href='/foto/foto0/$post[id].$post[ras]' title='Скачать оригинал'>
<img style='margin:1px;height:65px;width:100%;' src='/foto/foto0/$post[id].$post[ras]'/></a>";
echo '</center></td>';
}
echo '</tr>';
echo '</table>';
echo '</div>';
echo "<div class='bmenu'>\n";
echo 'Разделы сайта';
echo '</div>';
?>
<div class="white">
<table cellspacing="0" cellpadding="0" width="100%" ><tr>
<td width="30%"><center><a href="/guest/" class="imenu">
<img src="/style/themes/vkwap/img/guestbook.png" height="45px;"><br/><center>Гостевая</center>
<?include_once H."guest/count.php";?>
</a></center></td>
<td class="white" width="1%"></td>
<td width="38%"><center><a href="/forum/" class="imenu">
<img src="/style/themes/vkwap/img/forum.png" height="45px;"> <br/><center>Форум</center>
<?include_once H."forum/count.php";?>
</a></center></td>
<td class="white" width="1%"></td>
<td width="30%"><center><a href="/obmen/" class="imenu">
<img src="/style/themes/vkwap/img/loads.png" height="45px;"> <br/><center>Загрузки </center>
<?include_once H."obmen/count.php";?>
</a></center></td></tr></table>
<table style="margin-top:10px;" cellspacing="0" cellpadding="0" width="100%" ><tr>
<td width="30%"><center><a href="/groups/" class="imenu">
<img src="/style/themes/vkwap/img/groups.png" height="45px;"><br/><center>Группы</center> 255
</a></center></td>
<td class="white" width="1%"></td>
<td width="38%"><center><a href="/user/love/" class="imenu">
<img src="/style/themes/vkwap/img/heart.png" height="45px;"> <br/><center>Знакомства</center>
<?include_once H."/user/love/count.php";?>
</a></center></td>
<td class="white" width="1%"></td>
<td width="30%"><center><a href="/plugins/notes/" class="imenu">
<img src="/style/themes/vkwap/img/blog.png" height="45px;"> <br/><center>Дневники</center>
<?include_once H."/plugins/notes/count.php";?>
</a></center></td></tr></table>
<table style="margin-top:10px;margin-bottom:10px;" cellspacing="0" cellpadding="0" width="100%" ><tr>
<td width="30%"><center><a href="/foto/" class="imenu">
<img src="/style/themes/vkwap/img/photo.png" height="45px;"><br/><center>Фото</center>
<?include_once H."foto/count.php";?>
</a></center></td>
<td class="white" width="1%"></td>
<td width="38%"><center><a href="/user/users.php" class="imenu">
<img src="/style/themes/vkwap/img/peoples.png" height="45px;"> <br/><center>Обитатели</center>
</a></center></td>
<td class="white" width="1%"></td>
<td width="30%"><center><a href="/plugins/rules/" class="imenu">
<img src="/style/themes/vkwap/img/asite.png" height="45px;"> <br/><center>О сайте</center>
</a></center></td></tr></table>
</div>
<?
}
else
{
// главная web темы
include_once 'style/themes/' . $set['set_them'] . '/index.php';
}
include_once 'sys/inc/tfoot.php';
?>