Файл: selemege.tk/style/themes/web/navigation.php
Строк: 173
<?
if (isset($user)){
/*
=================================
Страничка
=================================
*/
echo '<a href="/info.php?"><span class="link_title">Моя стр</span></a>';
/*
=================================
МЕНЮ
=================================
*/
echo '<a href="/umenu.php?"><span class="link_title">Мое меню</span></a>';
/*
=================================
Почта
=================================
*/
$k_new=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail`
LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]'
WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` IS NULL OR `users_konts`.`type` = 'common' OR `users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
$k_new_fav=mysql_result(mysql_query("SELECT COUNT(`mail`.`id`) FROM `mail`
LEFT JOIN `users_konts` ON `mail`.`id_user` = `users_konts`.`id_kont` AND `users_konts`.`id_user` = '$user[id]'
WHERE `mail`.`id_kont` = '$user[id]' AND (`users_konts`.`type` = 'favorite') AND `mail`.`read` = '0'"),0);
if ($k_new!=0 && $k_new_fav==0){
echo' <object width="1" height="1" align="center">
<param name="movie"
value="/chat_sound.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#F00000">
<embed src="/chat_sound.swf"
quality="high"
bgcolor="#FFFFFF"
width="1"
height="1"
align="center"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go
/getflashplayer">
</object>';
echo "<a href='/new_mess.php'><span class='link_title'><img src='/style/icons/new_mess.gif' alt='S'/> Почта (<font color="#ff0000">+$k_new</font>)</span></a>";
}else{
echo "<a href='/konts.php'><span class='link_title'>Почта</span></a>";
}
/*
=================================
Лента
=================================
*/
$lenta = mysql_result(mysql_query("SELECT COUNT(*) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0' "),0);
echo "<a href='/user/tape/index.php'><span class='link_title'>Лента";
$k_l = $lenta;
if($k_l>0)echo " <font color="#ff0000">(+$k_l)</font>";
echo "</span></a>";
/*
=================================
Журнал
=================================
*/
$jurnal = mysql_result(mysql_query("SELECT COUNT(*) FROM `jurnal` WHERE `id_kont` = '$user[id]' AND `read` = '0' "),0);
echo "<a href='/jurnal.php'><span class='link_title'>Журнал";
$k_l = $jurnal;
if($k_l>0)echo " <font color="#ff0000">(+$k_l)</font>";
echo "</span></a>";
/*
=================================
Гости
=================================
*/
$new_g=mysql_result(mysql_query("SELECT COUNT(*) FROM `my_guests` WHERE `id_ank` = '$user[id]' AND `read`='1'"),0);
if($new_g!=0){
echo "<a href='/user/myguest/'><span class='link_title'>Гости <span class='count'><font color="#ff0000">$new_g</span></span></a>";
}
/*
=================================
Обсуждения
=================================
*/
$discuss = mysql_result(mysql_query("SELECT COUNT(`count`) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0' "),0); // Обсуждения
$k_l = $discuss;
echo "<a href='/user/discussions/index.php'><span class='link_title'>Обсуждения";
if($k_l>0)echo " <font color="#ff0000">(+$k_l)</font>";
echo "</span></a>";
/*
=================================
Уведомления
=================================
*/
$k_notif = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
$k_l = $k_notif;
if($k_l>0){
echo "<a href='/user/notification/index.php'><span class='link_title'>Уведомления";
echo " <font color="#ff0000">(+$k_l)</font>";
echo "</span></a>";
}
/*
=================================
Друзья
=================================
*/
$k_f = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$user[id]' LIMIT 1"), 0);
if ($k_f>0)
echo "<a href='/user/frends/new.php'><span class='link_title'>Друзья (<font color='red'>+$k_f</font>)</span></a>";
else
echo '<a href="/user/frends/?id='.$user['id'].'"><span class="link_title">Друзья</span></a>';
/*
=================================
TV
=================================
*/
echo '<a href="/TV.php?"><span class="link_title">TV</span></a>';
/*
=================================
VIP услуги
=================================
*/
echo '<a href="/user/money/index.php?"><span class="link_title">VIP услуги</span></a>';
/*
=================================
Обновить
=================================
*/
echo '<a href="'.htmlspecialchars($_SERVER['REQUEST_URI']).'"><span class="link_title">Обновить</span></a>';
}elseif ($_SERVER['PHP_SELF'] != '/aut.php' && $_SERVER['PHP_SELF'] != '/reg.php'){
echo '<script src="//ulogin.ru/js/ulogin.js"></script>';
$tUlogin = '<div id="uLogin" data-ulogin="display=panel;fields=first_name,last_name,city,sex,photo,photo_big;providers=vkontakte,odnoklassniki,mailru,facebook,yandex;hidden;redirect_uri=http%3A%2F%2F'.$_SERVER['HTTP_HOST'].'/user/connect/loginAPI.php"></div>';
echo '<a href="#user" rel="facebox"><span class="link_title">Авторизация/Регистрация</span></a>';
echo '<div id="user" style="display:none;">';
echo '<div class="mess">
Войти через:<br />' . $tUlogin;
echo '</div>';
echo "<div class = 'foot'>Авторизация</div>";
echo "<form class='mess' method='post' action='/login.php'>
Логин:<br /><input type='text' name='nick' maxlength='32' /><br />
Пароль:<br /><input type='password' name='pass' maxlength='32' /><br />
<label><input type='checkbox' name='aut_save' value='1' /> Запомнить меня</label><br />
<input type='submit' value='Войти' /> <a href='/pass.php'>Забыли пароль?</a> <br />
</form><br />";
echo "<div class = 'foot'>Регистрация</div>";
echo "<form class='mess' method='post' action='/reg.php?$passgen'>n";
echo "Выберите ник [A-zА-я0-9 -_]:<br /><input type='text' name='nick' maxlength='32' /><br />n";
echo "Регистрируясь, Вы автоматически соглашаетесь с <a href='/rules.php'>правилами</a> сайта<br />n";
echo "<input type='submit' value='Продолжить' />n";
echo "</form><br />n";
echo'</div>';
}