Файл: user/info/wap.php
Строк: 154
<?
/*------------------------статус форма-----------------------*/
if (isset($user) && isset($_GET['status']))
{
if ($user['id'] == $ank['id'])
{
echo '<div class="main">Новый статус</div>';
echo '<div class="mess">Введите текст:';
echo '<form action="/info.php?id=' . $ank['id'] . '" method="post" name="message">';
echo "$tPanel<textarea type="text" name="status" value=""/></textarea><br /> ";
echo "<input class="submit" style='' type="submit" value="Установить" />";
echo "</form>";
echo '</div>';
echo '<a class="link" href="/info.php"><i class="fas fa-angle-left"></i> На страницу</a>';
include_once 'sys/inc/tfoot.php';
exit;
}
}
/*-----------------------------------------------------------*/
echo "<div class='main'>";
echo group($ank['id']) . "";
echo "<span class='nick'>".user::nick($ank['id'])."</span>";
echo medal($ank['id']) . " ";
echo " <span style='background: #d7eaf3; color: #88a2af; padding: 1px 10px; border-radius: 3px; font-size: 12px;'>$ank[rating]%</span> ";
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]' title='Заблокировать'><i style='color: #c53d3d;' class='fas fa-ban'></i></a>";
echo '<span style="float:right;color: #A5ABAD;">';
if ($ank['date_last'] > $time-600){
echo 'Online';
} else {
echo "Offline";
}
echo '</span>';
echo "</div>";
?>
<style>
.ava img{
width: 100px;
height: 100px;
border-radius: 3px;
}
.nick a{
color:#A5ABAD;
}
.nick a:hover{
color:#A5ABAD;
}
</style>
<?
echo '<table class="mess"><td width="23%">';
echo '<div class="ava">';
echo avatar($ank['id'], true, 128, false);
echo '</div></td><td>';
if (isset($user) && $ank['id']==$user['id']){
echo "<a class='dv' href='?id=$ank[id]&status'><i class='fas fa-edit'></i> Новый статус</a>";
echo '<a class="dv" href="/settings/"><i class="fas fa-sliders-h"></i> Настройки</a>';
echo '<a class="dv" href="/menu.php"><i class="fas fa-user"></i> Меню профиля</a>';
}
//Действие
//Сообщение
if (isset($user) && $ank['id']!=$user['id']){
echo "<a class='dv' href="/mail.php?id=$ank[id]" title='Отправить сообщение'><i class='fas fa-envelope'></i> Отправить сообщение</a>";
//Друзья
if ($frend_new==0 && $frend==0){
echo "<a class='dv' href='/user/frends/create.php?add=".$ank['id']."' title='Добавить в друзья'><i class='fas fa-user-plus'></i> Добавить в друзья</a>";
}elseif ($frend_new==1){
echo "<a class='dv' href='/user/frends/create.php?otm=$ank[id]' title='Отменить заявку'><i class='fas fa-user-minus'></i> Отменить заявку</a>";
}elseif ($frend==2){
echo "<a class='dv' href='/user/frends/create.php?del=$ank[id]' title='Удалить из друзей'><i class='fas fa-user-times'></i> Удалить из друзей</a>";
}
//Подарок
echo "<a class='dv' href="/user/gift/categories.php?id=$ank[id]" title='Отправить подарок'><i class='fas fa-gift'></i> Отправить подарок</a>";
}
//----------------
echo '</table>';
//Подарки
$k_p = mysql_result(mysql_query("SELECT COUNT(id) FROM `gifts_user` WHERE `id_user` = '$ank[id]' AND `status` = '1'"),0);
$width = ($webbrowser == 'web' ? '40' : '40'); // Размер подарков при выводе в браузер
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 style="margin-top:10px;margin-bottom:10px;border-top: 1px #ececec solid;" class="mess">';
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 "<a style='border-top: 1px #ececec solid;' class='link' href='/user/info/anketa.php?id=$ank[id]'><span class='ico'><i class='fa fa-address-book'></i></span> Анкета</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'] . '"><span class="ico"><i class="fa fa-users"></i></span> Друзья <span class="c">' . $k_fr . '/';
$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 "$i</span></a>";
//Фото
echo "<a class='link' href='/foto/$ank[id]/'><span class='ico'><i class='fa fa-camera'></i></span> Фотографии";
echo "<span class='c'>" . mysql_result(mysql_query("SELECT COUNT(*) FROM `gallery_foto` WHERE `id_user` = '$ank[id]'"),0) . "</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]'><span class='ico'><i class='fas fa-address-book'></i></span> Блоги <span class='c'>$kol_dnev</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]/'><span class='ico'><i class='fas fa-folder'></i></span> Файлы ";
echo "<span class='c'>" . 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>";
//Статусы
echo '<a class="link" href="/user/status/index.php?id=' . $ank['id'] . '"><span class="ico"><i class="fas fa-edit"></i></span> Статусы <span class="c">' . $k_p . '</span></a>';
//Подарки
echo '<a class="link" href="/user/gift/index.php?id=' . $ank['id'] . '"><span class="ico"><i class="fa fa-gift"></i></span> Подарки <span class="c">' . $k_p . '</span></a>';
if (isset($user) && $ank['id']!=$user['id']){
echo '<div style="margin-top:6px;"></div>';
}
//Статус
include 'status.php';
?>