Файл: index.php
Строк: 167
<?
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';
if (isset($user))$ank['id']=$user['id'];
if (isset($_GET['id']))$ank['id']=intval($_GET['id']);
if ($ank['id']==0)
{
$ank=get_user($ank['id']);
$set['title']='wwe';
include_once 'sys/inc/thead.php';
aut();
title();
if(isset($_SESSION['refer']) && $_SESSION['refer']!=NULL && otkuda($_SESSION['refer']))
echo "<div class='foot'>«<a href='$_SESSION[refer]'>".otkuda($_SESSION['refer'])."</a><br />n</div>n";
include_once 'sys/inc/tfoot.php';
exit;
}
$ank=get_user($ank['id']);
if(!$ank){header("Location: /index.php?".SID);exit;}
$ank['rating']=intval(@mysql_result(mysql_query("SELECT SUM(`rating`) FROM `user_voice2` WHERE `id_kont` = '$ank[id]'"),0));
include_once 'sys/inc/thead.php';
title();
if (!$set['web'])
include_once 'sys/inc/rekl_main.php'; // реклама
include_once 'sys/inc/news_main.php'; // новости
echo "<div class='block_hr'><img src='/1.png'> <a href='/info.php?id=$ank[id]'>Моя Страница</a>|";
echo "<a href='/anketa.php'>Моя анкета</a><br /></div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/avatar.php'>Мой аватар</a></div>n";
$k_fr = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `user` = '$ank[id]' AND `i` = '1'"), 0);
echo '<div class="block_hr"><img src="/1.png"> <a href="frend.php?id='.$ank['id'].'">Мои Друзья</a> ';
$zoz = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE `to` = '$user[id]'"), 0);
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `frends_new` WHERE `to` = '$user[id]' LIMIT 1"), 0) > 0)
{
echo '<a href="/frend_new.php"><span style="color:blue">+'.$zoz.'</span></a>';
}
echo '</div>';
$foto = mysql_num_rows( mysql_query( "SELECT `id` FROM `gallery` WHERE `id_user` = '$ank[id]'" ) );
echo "<div class='block_hr'><img src='/1.png'> <a href='/foto/$ank[id]/'>Мои Фотографии</a></div>";
if (isset($ank) && $ank['id']==$user['id'])echo '<div class="block_hr"><img src="/1.png"> <a class="icolink" href="/mail.php">Моя почта</a>';
$knm=mysql_result(mysql_query("SELECT COUNT(*) FROM `mail` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
if (isset($ank) && $ank['id']==$user['id'])if ($knm>0)echo " <span style='color: #0000ff; font-size: small'>+$knm</span>";
echo "</div>";
echo "<div class='block_hr'><img src='/1.png'> <a href='/jurnal.php'>Мой Журнал</a> ";
$nj=mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = '$user[id]' AND `read` = '0'"), 0);
if ($nj>0)echo "<font color=blue>+$nj</font>";
echo "</div>";
$links = mysql_result(mysql_query("SELECT COUNT(*) FROM `favorites` WHERE `id_user`='".$user['id']."'"), 0);
echo '<div class="block_hr"><img src="/1.png"> <a href="link.php">Мои Заладки</a></div>';
echo "<div class='block_hr'><img src='/1.png'> <a href="guests.php" title="Мои гости">Мои гости</a></div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/news/'>Мои Новости</a></div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/group/group_my.php?id=".$user['id']."'>Мои Групы</a></div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/settings.php'>Настройки</a></div>n";
if (user_access('adm_panel_show'))echo "<div class='block_hr'><img src='/1.png'> <a href='/adm_panel/'>Админка</a></div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/secure.php'>Смена пароля</a></div>n";
echo '<div class="block_hr"><img src="/1.png"> <font color=blue>Мой рейтинг:</font> '.$user['rating'].'</div>';
echo '<div class="block_hr"><img src="/1.png"> <font color=blue>Мои баллы:</font> '.$user['balls'].'</div>';
echo "<div class='block_hr'><img src='/1.png'> <a href='/chat/'>ЧаТ</a>n";
@include H.'chat/count.php';
echo "</div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/forum/'>Форум</a>n";
@include H.'forum/count.php';
echo "</div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/obmen/'>Обменник</a>n";
@include H.'obmen/count.php';
echo "</div>n";
echo "<div class='block_hr'><img src='/1.png'> <a href='/exit.php'>Выйти</a></div>n";
echo '<div class="foot">';
echo "<center>© 2011 <b>Вконтакте.ру</b> - советуй друзьям! <img src="/images/01_Smile1.gif" alt=""/></center></a>n";
echo "</div>n";
include_once 'sys/inc/22foot.php';
?>