Файл: user/info/wap.php
Строк: 222
<?
/*-----------------------статус форма-----------------------*/
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;
}
}
/*-----------------------------------------------------------*/
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>";
echo '<table class="mess">';
echo '<td style="width:100px;">';
echo avatar($ank['id'], true, 128, false);
echo '</td>';
echo '<td>';
if ($ank['ank_name']!=NULL)
echo "<font color='green'>Имя:</font> $ank[ank_name]</br>";
else
echo "<font color='green'>Имя:</font> Не заполнено</br>";
echo "<font color='green'>Посещение:</font> ".vremja($ank['date_last'])."";
echo '</td>';
echo '</table>';
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="mess">';
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>';
}
if (isset($user) && $ank['id']==$user['id']){
echo '<table style="text-align:center;" cellspacing="0" cellpadding="0">';
echo '<td><a class="link" href="/umenu.php"><img src="/style/icons/fav.gif"> Меню</a></td>';
echo '<td><a class="link" href="/user/info/settings.php"><img src="/style/icons/settings.png"> Настройки</a></td>';
echo '<td><a class="link" href="/user/money/"><img src="/style/icons/uslugi.gif"> Услуги</a></td>';
echo '</table>';
}
//Сообщение
if (isset($user) && $ank['id']!=$user['id']){
echo '<table style="text-align:center;" cellspacing="0" cellpadding="0">';
echo "<td><a class='link' href="/mail.php?id=$ank[id]"><img src='/style/icons/mail.gif' alt='*' /> Написать</a></td>";
//В друзья
if ($frend_new==0 && $frend==0){
echo "<td><a class='link' href='/user/frends/create.php?add=".$ank['id']."'><img src='/style/icons/druzya.png' alt='*'/> Дружить</a><td>";
}elseif ($frend_new==1){
echo "<td><a class='link' href='/user/frends/create.php?otm=$ank[id]'><img src='/style/icons/druzya.png' alt='*'/> Отменить заявку</a><td>";
}elseif ($frend==2){
echo "<td><a class='link' href='/user/frends/create.php?del=$ank[id]'><img src='/style/icons/druzya.png' alt='*'/> Из друзей</a><td>";
}
//Подарок
echo "<td><a class='link' href="/user/gift/categories.php?id=$ank[id]"><img src='/style/icons/present.gif' alt='*' /> Подарок</a><td>";
echo '</table>';
}
//Анкета
echo "<a class='link' href='/user/info/anketa.php?id=$ank[id]'><img src='/style/icons/anketa.gif' alt='*' /> Анкета</a>";
//Друзья
$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 '<a class="link" href="/user/frends/?id=' . $ank['id'] . '"><img src="/style/icons/druzya.png" alt="*" /> Друзья <span class="count">' . $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 "On:<span style='color:green'>$i</span>";
echo '</span></a>';
//Фото
echo "<a class='link' href='/foto/$ank[id]/'><img src='/style/icons/foto.png' alt='*' /> Фотографии ";
echo "<span class='count'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]'"),0) . "</span></a>";
//Файлы
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 "<a class='link' href='/user/personalfiles/$ank[id]/$dir_osn[id]/'><img src='/style/icons/files.gif' alt='*' /> Файлы ";
echo "<span class='count'>" . 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) . "</span></a>";
//Музыка
$k_music=mysql_result(mysql_query("SELECT COUNT(*) FROM `user_music` WHERE `id_user` = '$ank[id]'"),0);
echo "<a class='link' href='/user/music/index.php?id=$ank[id]'><img src='/style/icons/mp3.png' alt='*' width='16'/> Музыка ";
echo "<span class='count'>" . $k_music . "</span></a>";
//Дневники
$kol_dnev=mysql_result(mysql_query("SELECT COUNT(*) FROM `notes` WHERE `id_user` = '".$ank['id']."'"),0);
echo "<a class='link' href='/plugins/notes/user.php?id=$ank[id]'><img src='/style/icons/zametki.gif' alt='*' /> Дневники <span class='count'>$kol_dnev</span></a>";
//Закладки
$zakladki =mysql_result(mysql_query("SELECT COUNT(`id`)FROM `bookmarks` WHERE `id_user`='".$ank['id']."'"),0);;
echo "<a class='link' href='/user/bookmark/index.php?id=$ank[id]'><img src='/style/icons/fav.gif' alt='*' /> Закладки <span class='count'>$zakladki</span></a>";
//Закладки
if (isset($user) && $ank['id']!=$user['id']){
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 class="link" href="?id=' . $ank['id'] . '&fav=1"><img src="/style/icons/fav.gif"> Добавить в закладки</a>';
else
echo '<a class="link" href="?id=' . $ank['id'] . '&fav=0"><img src="/style/icons/fav.gif"> Удалить из закладок</a>';
}
?>