Файл: selemege.tk/user/info/wap.php
Строк: 468
<?
/*
=======================================
Dcms-Social
Автор: Искатель
---------------------------------------
Этот скрипт распостроняется по лицензии
движка Dcms-Social.
При использовании указывать ссылку на
оф. сайт http://dcms-social.ru
---------------------------------------
Контакты
ICQ: 587863132
http://dcms-social.ru
=======================================
*/
/*------------------------статус форма-----------------------*/
if (isset($user) && isset($_GET['status']))
{
if ($user['id'] == $ank['id'])
{
echo '<div class="main">Статус [512 символов]</div>';
echo '<form action="/info.php?id=' . $ank['id'] . '" method="post">';
echo "$tPanel<textarea type="text" style='' name="status" value=""/></textarea><br /> ";
echo "<input class="submit" style='' type="submit" value="Установить" />";
echo " <a href='/info.php?id=$ank[id]'>Отмена</a><br />";
echo "</form>";
include_once 'sys/inc/tfoot.php';
exit;
}
}
/*-----------------------------------------------------------*/
if ($ank['group_access']>1)echo "<div class='err'>$ank[group_name]</div>";
echo "<div class='nav1'>";
echo group($ank['id']) . " $ank[nick] ";
echo medal($ank['id']) . " " . online($ank['id']) . " ";
if ((user_access('user_ban_set') || user_access('user_ban_set_h') || user_access('user_ban_unset')) && $ank['id'] != $user['id'])
echo "<a href='/adm_panel/ban.php?id=$ank[id]'><font color=red>[Бан]</font></a>";
echo "</div>";
include_once H.'user/info/sp_para/my_sp.php';
//----- Аватар
echo "<table style='width:100%' cellspacing='1' cellpadding='1'><tr>";
echo "<td class='main'>";////дивы можно свои
?><div class='nav2'><div style='position:relative;display:inline-block;'><?
avatar_ank($ank['id']);
$zn=mysql_fetch_array(mysql_query("SELECT * FROM `zna4ki_pok` WHERE `id_user` = '$ank[id]' AND `time` > '$time' LIMIT 1"));
if ($zn['time'] >= $time)echo "<img style='position:absolute;bottom: -10px; right: -25%;' src='/user/zna4ki/zna/$zn[id_zn].png'>";
?></div><br /><?
echo "</td>";
echo "<td class='main'>";////дивы можно свои
include 'info_avatar.php';
echo "</td>";
echo "</tr></table>";
echo "<div class='nav2'>";
if($ank['rating']>=2 && $ank['rating']<=10)echo "<img src='/stars/1.png'></img> ";
if($ank['rating']>=11 && $ank['rating']<=20)echo " <img src='/stars/2.png'></img> ";
if($ank['rating']>=21 && $ank['rating']<=30)echo " <img src='/stars/3.png'></img> ";
if($ank['rating']>=31 && $ank['rating']<=40)echo " <img src='/stars/4.png'></img> ";
if($ank['rating']>=41 && $ank['rating']<=50)echo " <img src='/stars/5.png'></img> ";
if($ank['rating']>=51 && $ank['rating']<=60)echo " <img src='/stars/6.png'></img> ";
if($ank['rating']>=61 && $ank['rating']<=70)echo "<img src='/stars/7.png'></img> ";
if($ank['rating']>=71 && $ank['rating']<=80)echo " <img src='/stars/8.png'></img> ";
if($ank['rating']>=81 && $ank['rating']<=90)echo " <img src='/stars/9.png'></img> ";
if($ank['rating']>=91 && $ank['rating']<=100)echo " <img src='/stars/10.png'></img> ";
if($ank['rating']>=101 && $ank['rating']<=500)echo " <img src='/stars/11.png'></img> ";
if($ank['rating']>=501 && $ank['rating']<=100000)echo " <img src='/stars/12.png'></img> ";
echo "</div>";
//----- Конец
if (isset($user) && isset($_GET['like']) && $user['id']!=$ank['id'] && mysql_result(mysql_query("SELECT COUNT(*) FROM `status_like` WHERE `id_status` = '$status[id]' AND `id_user` = '$user[id]' LIMIT 1"),0)==0){
mysql_query("INSERT INTO `status_like` (`id_user`, `id_status`) values('$user[id]', '$status[id]')");
}
if ($status['id'] || $ank['id'] == $user['id'])
{
echo "<div class='st_1'></div>";
echo "<div class='st_2'>";
if ($status['id'])
{
echo output_text($status['msg']) . ' <font style="font-size:11px; color:gray;">' . vremja($status['time']) . '</font>';
if ($ank['id']==$user['id'])echo " [<a href='?id=$ank[id]&status'><img src='/style/icons/edit.gif' alt='*'> нов</a>]";
echo '<br />';
}
else if ($ank['id']==$user['id'])
{
echo "Ваш статус [<a href='?id=$ank[id]&status'><img src='/style/icons/edit.gif' alt='*'> ред</a>]";
}
echo "</div>";
// Если статус установлен
if ($status['id'])
{
echo " <a href='/user/status/komm.php?id=$status[id]'><img src='/style/icons/bbl4.png' alt=''/> " . mysql_result(mysql_query("SELECT COUNT(*) FROM `status_komm` WHERE `id_status` = '$status[id]'"),0) . " </a> ";
$l=mysql_result(mysql_query("SELECT COUNT(*) FROM `status_like` WHERE `id_status` = '$status[id]'"),0);if (isset($user) && $user['id']!=$ank['id'] && mysql_result(mysql_query("SELECT COUNT(*) FROM `status_like` WHERE `id_status` = '$status[id]' AND `id_user` = '$user[id]' LIMIT 1"),0)==0)
{
echo " <a href='/info.php?id=$ank[id]&like'><img src='/style/icons/like.gif' alt='*'/> Класс!</a> • ";
$like = $l;
}
else if(isset($user) && $user['id']!=$ank['id'])
{
echo " <img src='/style/icons/like.gif' alt=''/> Вы и ";
$like = $l-1;
}
else
{
echo " <img src='/style/icons/like.gif' alt=''/> ";
$like = $l;
}
echo "<a href='/user/status/like.php?id=$status[id]'> $like чел. </a>";
}
/* Общее колличество статусов */
$st = mysql_result(mysql_query("SELECT COUNT(*) FROM `status` WHERE `id_user` = '$ank[id]'"),0);
if ($st > 0)
{
echo "<br /> → <a href='/user/status/index.php?id=$ank[id]'>Все статусы</a> (" . $st . ")";
}
}
echo "</div>";
/*
========================================
Подарки
========================================
*/
$k_p = mysql_result(mysql_query("SELECT COUNT(id) FROM `gifts_user` WHERE `id_user` = '$ank[id]' AND `status` = '1'"),0);
$width = ($webbrowser == 'web' ? '60' : '45'); // Размер подарков при выводе в браузер
if ($k_p > 0)
{
$q = mysql_query("SELECT id,id_gift,status FROM `gifts_user` WHERE `id_user` = '$ank[id]' AND `status` = '1' ORDER BY `id` DESC LIMIT 5");
echo '<div class="nav2">';
while ($post = mysql_fetch_assoc($q))
{
$gift = mysql_fetch_assoc(mysql_query("SELECT id FROM `gift_list` WHERE `id` = '$post[id_gift]' LIMIT 1"));
echo '<a href="/user/gift/gift.php?id=' . $post['id'] . '"><img src="/sys/gift/' . $gift['id'] . '.png" style="max-width:' . $width . 'px;" alt="Подарок" /></a> ';
}
echo '</div>';
echo '<div class="nav2">';
echo '→ <a href="/user/gift/index.php?id=' . $ank['id'] . '">Все подарки</a> (' . $k_p . ')';
echo '</div>';
}
/*
*/
echo '<div class="nav2">';
//////////vip-podarki
include_once "gifts_vip/count.php";
//////////vip-podarki
//////////vip-podarki
echo '<td class="p_t"><img src="/gifts_vip/vip.gif" alt="ico" class="icon"/><a href="/gifts_vip/index.php?id='.$ank['id'].'"> Подарить ViP подарок</a></td><br />';
//////////vip-podarki
if (isset($user) && $user['id']!=$ank['id'])echo "»<a href="/podmign.php?id=$ank[id]">Подмигнуть</a><br />n";
echo '</div>';
/*
*/
echo "<div class='nav1'>";
include_once H.'plugins/user_garem/garem.php';
echo "</div>";
/*
*/
echo "<div class='nav1'>";
include H.'gangs/info.php';
echo "</div>";
/*
*/
echo "<div class='nav2'>";
echo "<small>Награды/<a href="rank.php?id=$ank[id]" title="Все">Награды</a></small>n";
$k_p=mysql_result(mysql_query("SELECT COUNT(*) FROM `rank` WHERE `id_user` = $ank[id] ",$db), 0);
echo " ($k_p)<br />";$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `rank` WHERE `id_user` = '$ank[id]' LIMIT 1"), 0);if ($k_post==0)
{
echo '<sub> Oбитатель '.$ank['nick'].' не награждался</sub>';
}$q = mysql_query("SELECT * FROM `rank` WHERE `id_user` = '$ank[id]' ORDER BY time DESC LIMIT 4");
while ($f = mysql_fetch_array($q))
{
$a = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$f[ot_id]' LIMIT 1"));
echo"<img src='/rank/".$f['id_rank'].".gif' width='20' height='35' alt='' class='icon'/></hr>";
}
echo "</div>";
echo "<div class='main2'>";
if ($user['level']==10){
echo "<img src=''style/icons/pod.gif' alt='' class='icon'/><a href="medals/rank.php?id=$ank[id]&pod=1">Наградить юзера</a><br />";}
echo "</div>";
/*
========================================
Анкета
========================================
*/
echo "<div class='nav1'>";
echo "<img src='/style/icons/anketa.gif' alt='*' /> <a href='/user/info/anketa.php?id=$ank[id]'>Анкета</a> ";
if (isset($user) && $user['id']==$ank['id'])
{
echo "[<img src='/style/icons/edit.gif' alt='*' /> <a href='/user/info/edit.php'>ред</a>]";
}
echo "</div>";
/*
========================================
Гости
========================================
*/
if (isset($user) && $user['id'] == $ank['id'])
{
echo '<div class="nav2">';
$new_g = mysql_result(mysql_query("SELECT COUNT(*) FROM `my_guests` WHERE `id_ank` = '$user[id]' AND `read`='1'"),0);
echo '<img src="/style/icons/guests.gif" alt="*" /> ';
if($new_g != 0)
{
echo "<a href='/user/myguest/index.php'><font color='red'>Гости +$new_g</font></a> ";
}
else
{
echo "<a href='/user/myguest/index.php'>Гости</a> ";
}
echo ' | ';
$ocenky = mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_rating` WHERE `avtor` = '$ank[id]' AND `read`='1'"),0);
if($ocenky != 0)
{
echo "<a href='/user/info/ocenky.php'><font color='red'>Оценки +$ocenky</font></a> ";
}
else
{
echo "<a href='/user/info/ocenky.php'>Оценки</a> ";
}
echo "</div>";
}
/*
========================================
Друзья
========================================
*/
$k_f = mysql_result(mysql_query("SELECT COUNT(id) FROM `frends_new` WHERE `to` = '$ank[id]' LIMIT 1"), 0);
$k_fr = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` WHERE `user` = '$ank[id]' AND `i` = '1'"), 0);
$res = mysql_query("select `frend` from `frends` WHERE `user` = '$ank[id]' AND `i` = '1'");
echo '<div class="nav2">';
echo '<img src="/style/icons/druzya.png" alt="*" /> ';
echo '<a href="/user/frends/?id=' . $ank['id'] . '">Друзья</a> (' . $k_fr . '</b>/';
$i = 0;
while ($k_fr = mysql_fetch_array($res))
{
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$k_fr[frend]' && `date_last` > '".(time()-600)."'"),0) != 0)
$i++;
}
echo "<span style='color:green'><a href='/user/frends/online.php?id=".$ank['id']."'>$i</a></span>)";
if ($k_f>0 && $ank['id'] == $user['id'])echo " <a href='/user/frends/new.php'><font color='red'>+$k_f</font></a>";
echo "</div>";
if (isset($user) && $user['id'] == $ank['id'])
{
echo "<div class='nav2'>";
/*
========================================
Уведомления
========================================
*/
if (isset($user) && $user['id']==$ank['id']){
$k_notif = mysql_result(mysql_query("SELECT COUNT(`read`) FROM `notification` WHERE `id_user` = '$user[id]' AND `read` = '0'"), 0); // Уведомления
if($k_notif > 0)
{
echo "<img src='/style/icons/notif.png' alt='*' /> ";
echo "<a href='/user/notification/index.php'><font color='red'>Уведомления</font></a> ";
echo "<font color="red">+$k_notif</font> ";
echo "<br />";
}
}
/*
========================================
Обсуждения
========================================
*/
if (isset($user) && $user['id']==$ank['id']){
echo "<img src='/style/icons/chat.gif' alt='*' /> ";
$new_g=mysql_result(mysql_query("SELECT COUNT(*) FROM `discussions` WHERE `id_user` = '$user[id]' AND `count` > '0'"),0);
if($new_g!=0)
{
echo "<a href='/user/discussions/index.php'><font color='red'>Обсуждения</font></a> ";
echo "<font color="red">+$new_g</font> ";
}else{
echo "<a href='/user/discussions/index.php'>Обсуждения</a> ";
}
echo "<br />";
}
/*
========================================
Лента
========================================
*/
if ($user['id']==$ank['id'])
{
$k_l=mysql_result(mysql_query("SELECT COUNT(*) FROM `tape` WHERE `id_user` = '$user[id]' AND `read` = '0'"),0);
if($k_l!=0)
{
$color = "<font color='red'>";
$color2 = "</font>";
}
else
{
$color = null;
$color2 = null;
}
echo "<img src='/style/icons/lenta.gif' alt='*' /> <a href='/user/tape/'>".$color."Лента".$color2."</a> ";
if($k_l!=0)echo "<font color="red">+$k_l</font>";
echo "<br />";
}
echo "</div>";
}
echo "<div class='nav1'>";
/*
========================================
Фото
========================================
*/
echo "<img src='/style/icons/foto.png' alt='*' /> ";
echo "<a href='/foto/$ank[id]/'>Фотографии</a> ";
echo "(" . mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]'"),0) . ")<br />";
/*
========================================
Файлы
========================================
*/
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `user_files` WHERE `id_user` = '$ank[id]' AND `osn` = '1'"), 0)==0)
{
mysql_query("INSERT INTO `user_files` (`id_user`, `name`, `osn`) values('$ank[id]', 'Файлы', '1')");
}
$dir_osn = mysql_fetch_assoc(mysql_query("SELECT * FROM `user_files` WHERE `id_user` = '$ank[id]' AND `osn` = '1' LIMIT 1"));
echo "<img src='/style/icons/files.gif' alt='*' /> ";
echo "<a href='/user/personalfiles/$ank[id]/$dir_osn[id]/'>Файлы</a> ";
echo "(" . mysql_result(mysql_query("SELECT COUNT(*) FROM `user_files` WHERE `id_user` = '$ank[id]' AND `osn` > '1'"),0) . "/" . mysql_result(mysql_query("SELECT COUNT(*) FROM `obmennik_files` WHERE `id_user` = '$ank[id]'"),0) . ")<br />";
/*
========================================
Музыка
========================================
*/
$k_music=mysql_result(mysql_query("SELECT COUNT(*) FROM `user_music` WHERE `id_user` = '$ank[id]'"),0);
echo "<img src='/style/icons/play.png' alt='*' width='16'/> ";
echo "<a href='/user/music/index.php?id=$ank[id]'>Музыка</a> ";
echo "(" . $k_music . ")";
echo "</div>";/*
========================================
Дневники
========================================
*/
echo "<div class='nav2'>";
$kol_dnev=mysql_result(mysql_query("SELECT COUNT(*) FROM `notes` WHERE `id_user` = '".$ank['id']."'"),0);
echo "<img src='/style/icons/zametki.gif' alt='*' /> ";
echo "<a href='/plugins/notes/user.php?id=$ank[id]'>Дневники</a> ($kol_dnev)<br />";
/*
========================================
Закладки
========================================
*/
$forum=mysql_result(mysql_query("SELECT COUNT(id_user) FROM `forum_zakl` WHERE `id_user` = '" . $ank['id'] . "'"),0);
$people=mysql_result(mysql_query("SELECT COUNT(id_user) FROM `mark_people` WHERE `id_user` = '" . $ank['id'] . "'"),0);
$files=mysql_result(mysql_query("SELECT COUNT(id_user) FROM `mark_files` WHERE `id_user` = '" . $ank['id'] . "'"),0);
$foto=mysql_result(mysql_query("SELECT COUNT(id_user) FROM `mark_foto` WHERE `id_user` = '" . $ank['id'] . "'"),0);
$notes=mysql_result(mysql_query("SELECT COUNT(id_user) FROM `mark_notes` WHERE `id_user` = '" . $ank['id'] . "'"),0);
$zakladki = $people + $files + $foto + $notes + $forum;
echo "<img src='/style/icons/fav.gif' alt='*' /> ";
echo "<a href='/user/bookmark/index.php?id=$ank[id]'>Закладки</a> ($zakladki)<br />";
/*
========================================
Отзывы
========================================
*/
echo "<img src='/style/my_menu/who_rating.png' alt='*' /> <a href='/user/info/who_rating.php?id=$ank[id]'>Отзывы</a>
(".mysql_result(mysql_query("SELECT COUNT(*) FROM `user_voice2` WHERE `id_kont` = '".$ank['id']."'"),0).")<br />";
echo "</div>";
/*
========================================
Сообщение
========================================
*/
if (isset($user) && $ank['id']!=$user['id']){
echo "<div class='nav1'>";
echo " <a href="/mail.php?id=$ank[id]"><img src='/style/icons/pochta.gif' alt='*' /> Сообщение</a><br />";/*
========================================
В друзья
========================================
*/
if ($frend_new==0 && $frend==0){
echo "<img src='/style/icons/druzya.png' alt='*'/> <a href='/user/frends/create.php?add=".$ank['id']."'>Добавить в друзья</a><br />";
}elseif ($frend_new==1){
echo "<img src='/style/icons/druzya.png' alt='*'/> <a href='/user/frends/create.php?otm=$ank[id]'>Отклонить заявку</a><br />";
}elseif ($frend==2){
echo "<img src='/style/icons/druzya.png' alt='*'/> <a href='/user/frends/create.php?del=$ank[id]'>Удалить из друзей</a><br />";
}
/*
========================================
В закладки
========================================
*/
echo '<img src="/style/icons/fav.gif" alt="*" /> ';
if ( mysql_result(mysql_query("SELECT COUNT(*) FROM `mark_people` WHERE `id_user` = '" . $user['id'] . "' AND `id_people` = '" . $ank['id'] . "' LIMIT 1"),0) == 0)
echo '<a href="?id=' . $ank['id'] . '&fav=1">В закладки</a><br />';
else
echo '<a href="?id=' . $ank['id'] . '&fav=0">Удалить из закладок</a><br />';
echo "</div>";
echo "<div class='nav2'>";
/*
========================================
Монеты перевод
========================================
*/
echo "<img src='/style/icons/uslugi.gif' alt='*' /> <a href="/user/money/translate.php?id=$ank[id]">Перевести $sMonet[0]</a><br />";
/*
========================================
Сделать подарок
========================================
*/
echo "<img src='/style/icons/present.gif' alt='*' /> <a href="/user/gift/categories.php?id=$ank[id]">Сделать подарок</a><br />";echo "</div>";
}
/****действия******/
echo "<div class='main'>";
echo "<img src='/activity/icon.png' alt='*' /> ";
echo "<a href='/activity/?id=$ank[id]'>Действия</a> ";
echo "(" . mysql_result(mysql_query("SELECT COUNT(*) FROM `activity_user` WHERE `ank` = '$ank[id]'"),0) . ")<br />";
echo "</div>";
/*
*/
/***ограбление***/
echo"<div class='main_menu'>n";
if ($user['id']!=$ank['id'])echo '<a href="/vor/grab.php?id='.$ank['id'].'">Ограбить пользователя</a>';
echo "</div>n";
/*
*/
/*********дни рождения************/
$nap = mysql_query("SELECT * FROM `frends` WHERE `user` = '$user[id]'");
$den = date("d");
$mes = date("m");
$count = 0;
while ($fr = mysql_fetch_array($nap)){
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$fr[frend]' AND `ank_d_r` = '$den' OR `ank_d_r` = '".($den+1)."' AND `ank_m_r` = '$mes'"),0) != 0) $count++;
}
if ($count>0){
$nap = mysql_query("SELECT * FROM `frends` WHERE `user` = '$user[id]'");
$c_s = 0;
while ($fr = mysql_fetch_array($nap)){
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$fr[frend]' AND `ank_d_r` = '$den' AND `ank_m_r` = '$mes'"),0) != 0) $c_s++;
}
if ($c_s>0){
echo "<img src="/styleicons/cake.png" alt=""/><b> Сегодня день рождения вашего друга</b><br />";
$fren = mysql_query("SELECT * FROM `frends` WHERE `user` = '$user[id]'");
while ($post = mysql_fetch_array($fren)){
$frend = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$post[frend]' AND `ank_d_r` = '$den' AND `ank_m_r` = '$mes' "));
echo " <a href='/info.php?id=$frend[id]'>$frend[nick]</a>. ";
}}
$nap = mysql_query("SELECT * FROM `frends` WHERE `user` = '$user[id]'");
$c_z = 0;
while ($fr = mysql_fetch_array($nap)){
if(mysql_result(mysql_query("SELECT COUNT(*) FROM `user` WHERE `id` = '$fr[frend]' AND `ank_d_r` = '".($den+1)."' AND `ank_m_r` = '$mes'"),0) != 0) $c_z++;
}
if ($c_z>0){
echo "<img src="/styleicons/cake.png" alt=""/><b> Завтра день рождения вашего друга </b><br />";
$fren = mysql_query("SELECT * FROM `frends` WHERE `user` = '$user[id]'");
while ($post = mysql_fetch_array($fren)){
$frend = mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$post[frend]' AND `ank_d_r` = '".($den+1)."' AND `ank_m_r` = '$mes' "));
echo " <a href='/info.php?id=$frend[id]'>$frend[nick]</a>. ";
}}
}
/********конец*********/
/*
========================================
Настройки
========================================
*/
if (isset($user) && $ank['id']==$user['id']){
echo "<div class='main'>";
echo "<img src='/style/icons/uslugi.gif' alt='*' /> <a href="/user/money/index.php">Дополнительные услуги</a><br /> ";
echo "<img src='/style/icons/settings.png' alt='*' /> <a href="/user/info/settings.php">Мои настройки</a> | <a href="/umenu.php">Меню</a>";
echo "</div>";
}
/*
========================================
Стена
========================================
*/
echo "<div class='foot'>";
echo "<img src='/style/icons/stena.gif' alt='*' /> ";
if (isset($user) && $user['wall']==0)
echo "<a href='/info.php?id=$ank[id]&wall=1'>Стена</a>";
elseif (isset($user))
echo "<a href='/info.php?id=$ank[id]&wall=0'>Стена</a>";
else
echo "Стена";
echo "</div>";
if ($user['wall']==0){
include_once H.'user/stena/index.php';
}
/*
========================================
The End
========================================
*/
?>