Файл: vkollektive2014/page.php
Строк: 431
<?
include 'connect.php';
include 'core/browser.php';
$location = '(Смотрит страничку)';
if(!$u['id']){
header ("Location: /registration.php?err=1");
exit;
}
include 'core/refresh_friends.php';
include 'core/page_ava.php';
require('core/bb_code.php');
if(isset($_GET['id'])){
$id=num($_GET['id']);
$req = mysql_query("SELECT * FROM `users` WHERE `id` = '$id' LIMIT 1");
if (mysql_num_rows($req)) {
$user = mysql_fetch_assoc($req);
}
}
if(empty($user['id'])){
if($u['id']){
$req = mysql_query("SELECT * FROM `users` WHERE `id` = '".$u['id']."' LIMIT 1");
$user = mysql_fetch_assoc($req);
} else {
header ("Location: index.php");
exit;
}
}
refresh_friends($user['id']);
$f = mysql_result(mysql_query("SELECT COUNT(*) FROM `friends` WHERE `user` = '".$user['id']."'"), 0);
$fo = mysql_result(mysql_query("SELECT COUNT(*) FROM `friends` WHERE `user` = '".$user['id']."' and `online` > '".(time()-$system['online_time'])."'"), 0);
$title = $title.' | '.$user['login'].'';
include 'head.php';
if($user['anketa_bday'].$user['anketa_bmonth']==date("j").date("n"))
{
echo "<div class='div'>";
echo "<b>Поздравление от лица администраии:</b><br />От всей души поздравляем вас с этим замечательным днём, который бывает только один раз в году с днем рождения и желаем чтобы Вы всегда были счастливым, здоровым и любимым человеком, чтобы вас всегда окружали те люди, которые вас уважают и приносят хорошее настроение!";
echo "</div>";
}
echo '<div class="block_tab"><span class="tab_activ">Профиль</span><a href="stat.php?act=view&id='.$user['id'].'"><span class="tab_item"><font color="black">Статистика</font></a></span></div>';
echo '</div><div class="title">'. ico($user['sex'],$user['admin']) .' <b>';
echo GradientText("$user[login]", "$user[ncolor]", "$user[ncolor2]"); echo '</b> '. online($user['online']) .'';
if($user['rating']>=1000 && $user['rating']<=1999)echo "<img src='ico/b.png' alt='' class='icon'</a>n";
if($user['rating']>=2000 && $user['rating']<=2999)echo "<img src='ico/s.png' alt='' class='icon'</a>n";
if($user['rating']>=3000)echo "<img src='ico/z.png' alt='' class='icon'</a>n";
echo '' . cake($user['cake']) . '';
$vip = mysql_fetch_array(mysql_query("SELECT * FROM `vip_users` WHERE `id_user` = '".$user['id']."'"));
if((int)$vip['id'] > 0){ echo " <img src='/style/vip_icons/{$vip['icon']}.gif' />n"; }
###
########
###
if (@$u['id'] != $user['id']) {
if ($user['online'] > (time() - $system['online_time'])) {
echo '<font color="black">';
echo ' '.$user['location'].'';
echo '</font>';
}
}
echo '</div>';
# getbrowser_($user['us_browser']);
if($user['delete'] == 1) {
$count = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `users_ban_post` WHERE `user` = '".$user['id']."'"), 0);
error('Этот аккаунт был заморожен за нарушение </font><a href="/rules.php">условий использования сервиса </br>
<a href = "user_ban.php?id='.$user['id'].'">Нарушения</a> ('.$count.') ');
if($u['admin'] >= 1 and $u['id'] != $user['id']){
echo '<div class="cred">';
echo '<select onChange="document.location=this.options[this.selectedIndex].value">';
echo '<option value="?">- Не выбрано -</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=edit_users&id='.$user['id'].'">Редактировать</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=delete_off&id='.$user['id'].'">Разморозить</option>';
echo '<option value="search_ip.php?&id='.$user['id'].'">Клоны</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=shpion_users_in&id='.$user['id'].'">Входящие сообщения</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=shpion_users_out&id='.$user['id'].'">Исходящие сообщения</option>';
echo '</select></br>';
if($user['id'] == 1) {
echo ' IP: 66.666.66.666</br>';
echo ' Браузер: Opera </br>';
} else {
$ip = $user[ip];
echo ' IP: '.$ip.'</br>';
$ua = $user[ua];
echo ' Браузер: '.$ua.'</br>';
}
}
echo '</div>';
include 'foot.php';
exit;
}
if(ban($user['id'])){
$ban = mysql_fetch_assoc(mysql_query("SELECT * FROM `users_ban` WHERE `user` = '".$user['id']."' ORDER BY `time` DESC"));
$message = checkout($ban['message']);
echo '<div class = "nav">
<span style="color:green;">До конца бана осталось : </span>'.kikt($ban['time_ban']).'<br/>
<span style="color:green;">Заблокировал : </span><a href = "/'.$ban['admin'].'">'.login($ban['admin']).'</a><br/>
<span style="color:green;">Комментарий : </span>'.links($message).' </br>
<span style="color:green;">Дата : </span>'.vremya($ban['time']).'<br/>
<span style="color:green;"> Причина : </span>';
if($ban['who'] == 1) {echo 'Грубость и оскорбления';}
if($ban['who'] == 2) {echo 'Нецензурная лексика';}
if($ban['who'] == 3) {echo 'СПАМ, реклама';}
if($ban['who'] == 4) {echo 'Разжигание ненависти';}
if($ban['who'] == 5) {echo 'Флуд, Оффтопик';}
if($ban['who'] == 6) {echo 'Некорректное название темы';}
if($ban['who'] == 7) {echo 'Бессмысленная тема';}
if($ban['who'] == 8) {echo 'Намеки на ДП';}
if($ban['who'] == 9) {echo 'ДП';}
if($ban['who'] == 10) {echo 'Педофилия';}
if($ban['who'] >=11 && $ban['who'] <=0) {echo 'Иное';}
echo '</br></div>';
if($u['admin'] >= 1 and $u['id'] != $user['id']){
echo '<div class="cred">';
echo '<select onChange="document.location=this.options[this.selectedIndex].value">';
echo '<option value="?">- Не выбрано -</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=edit_users&id='.$user['id'].'">Редактировать</option>';
echo '<option value="adminka.php?act=delban_users&id='.$user['id'].'">Разбанить</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=delete&id='.$user['id'].'">Заморозить</option>';
if($u['admin'] <= 2 ) echo '<option value="search_ip.php?&id='.$user['id'].'">Клоны</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=shpion_users_in&id='.$user['id'].'">Входящие сообщения</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=shpion_users_out&id='.$user['id'].'">Исходящие сообщения</option>';
echo '</select></br>';
if($user['id'] == 1) {
echo ' IP: 66.666.66.666</br>';
echo ' Браузер: Opera</br>';
} else {
$ip = $user[ip];
echo ' IP: '.$ip.'</br>';
$ua = $user[ua];
echo ' Браузер: '.$ua.'</br>';
}
echo '</div>';
}
include 'foot.php';
exit;
}
$req = mysql_query("SELECT * FROM `microblog_messages` WHERE `user` = '".$user['id']."' AND `main` = '1' LIMIT 1");
if (mysql_num_rows($req)) {
echo '<div class="div">';
$microblog = mysql_fetch_assoc($req);
if (iconv_strlen($microblog['message'], 'UTF-8') > 50) {
$microblog['message'] = iconv_substr($microblog['message'], 0, 50, 'UTF-8');
$microblog['message']=''.$microblog['message'].'...';
}
$message = checkout($microblog['message']);
echo '<div class="status">';
echo '<b>'.$message.'</b>';
echo '<br/><small><span style="font-weight:bold;color:#209143"></span><small>Создан:'.vremya($microblog['time']).'</small> | <a href="microblog.php?act=view&id='.$microblog['id'].'&show=comm"> Коммент.: ['.$microblog['comm'].'] »</a>
</small></div><div class="status-img"></div>';
} else {
if($user['id'] == $u['id']) {
echo '<div class="div">';
echo '<div class="status"><a href = "microblog.php?act=new">Что у вас нового</a>?Создайте статус!</div><div class="status-img"></div>';
}
}
echo '</div><div class="div">';
echo page_ava($user['id'],125);
$zn=mysql_fetch_array(mysql_query ("SELECT * FROM `zna4ki_pok` WHERE `id_user` = '$user[id]' AND `time` > '".time()."' LIMIT 1")); if ($zn['time'] >= time())echo "<div class='zna4'><img src='/user/zna4ki/img_pic/$zn[id_zn].png' width='50' height='50'></small></div>";
echo '</br>';
$likes = '';
if (@$u['id'] && $u['id'] != $user['id']) {
$req = mysql_query("SELECT * FROM `users_likes` WHERE `user` = '" . $user['id'] . "' and `outuser` = '" . $u['id'] . "' LIMIT 1");
if (mysql_num_rows($req) == 0) {
if (@$_GET['likes']) {
mysql_query("INSERT INTO `users_likes` SET
`user` = '" . $user['id'] . "',
`outuser` = '" . $u['id'] . "',
`time` = '" . time() . "'
");
$user['likes']++;
mysql_query("UPDATE `users` SET
`likes` = '" . $user['likes'] . "'
WHERE `id` = '" . $user['id'] . "'
");
if ($u['sex'] == 'm') {
$action[0] = 'Отметил';
$action[1] = 'ему';
} else {
$action[0] = 'Отметила';
$action[1] = 'ей';
}
$text = $action[0] . ' что Вы ' . $action[1] . ' понравились.';
mysql_query("INSERT INTO `jurnal` SET
`user` = '" . $user['id'] . "',
`outuser` = '" . $u['id'] . "',
`text` = '$text',
`time` = '" . time() . "',
`new` = '1'
");
} else {
$likes = '<a href = "page.php?id=' . $user['id'] . '&likes=1"> <font color = "red">[+1]</font></a>';
}
}
}
$rat = $user['rating'] / 100;
echo '<img src="ico/like_now.png"> Понравился(ась): <font color="green">' . $user['likes'] . ' </font> ' . $likes . ' <img src = "ico/rating.png" title = ""> '.$rat.' | <img src = "ico/balanse.png" title = "Деньги"> '.$user['money'].'';
echo '</div>';
# echo"<div class='div'>- <a href='http://vkollektive.net/photo.php?act=add'><b>Изменить фотографию</b></a></div>";
if($u['admin'] >= 1 and $u['id'] != $user['id']){
echo '<div class="cred">';
echo '<select onChange="document.location=this.options[this.selectedIndex].value">';
echo '<option value="?">- Не выбрано -</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=edit_users&id='.$user['id'].'">Редактировать</option>';
echo '<option value="adminka.php?act=ban_users&id='.$user['id'].'">Забанить</option>';
if($u['admin'] <= 2 )echo '<option value="adminka.php?act=delete&id='.$user['id'].'">Заморозить</option>';
echo '<option value="search_ip.php?&id='.$user['id'].'">Клоны</option>';
# if($u['admin'] <= 2 )echo '<option value="adminka.php?act=shpion_users_in&id='.$user['id'].'">Входящие сообщения</option>';
# if($u['admin'] <= 2 )echo '<option value="adminka.php?act=shpion_users_out&id='.$user['id'].'">Исходящие сообщения</option>';
echo '</select></br>';
if($user['id'] == 1) {
echo ' IP: 66.666.66.666</br>';
echo ' Браузер: Opera</br>';
} else {
$ip = $user[ip];
echo ' IP: '.$ip.'</br>';
$ua = $user[ua];
echo ' Браузер: '.$ua.'</br>';
}
echo '</div>';
}
# echo '<div class="nav">';
# echo '<b>Подарки</b> | <a href = "gifts.php?act=list&id='.$user['id'].'">Все подарки</a> ';
# echo '</div>';
echo '<div class="gifts">';
$c_gifts = mysql_result(mysql_query("SELECT COUNT(*) FROM `gifts_users` WHERE `user` = '".$user['id']."'"), 0);
if($c_gifts > 0){
$result = mysql_query("SELECT * FROM `gifts_users` WHERE `user` = '".$user['id']."' ORDER BY `time` DESC LIMIT 0, 4");
while($gift = mysql_fetch_assoc($result)){
echo '<a href = "gifts.php?act=view&id='.$gift['id'].'"><img src = "gifts/'.$gift['gift'].'.gif" width = "37px"></a>';}}
else {echo '<img src="ico/gift.png"> Нет подарков';}
echo '</div>';
$req = mysql_query("SELECT * FROM `garems_users` WHERE `id` = '".$user['id']."' LIMIT 1");
if(mysql_num_rows($req)){
$garem_user = mysql_fetch_assoc($req);
if($garem_user['garem']){
echo '<div class="nav"><img src="ico/garems.png"> В гареме у <a href = "/page.php?id='.$garem_user['garem'].'">'.login($garem_user['garem']).'</a></div>';
}
}
if($u['id'] == $user['id']){
$req = mysql_query("SELECT * FROM `duels_list` WHERE (`user1` = '".$user['id']."' or `user2` = '".$user['id']."') and `time_end` > '".time()."' LIMIT 1");
if(mysql_num_rows($req)){
$duel = mysql_fetch_assoc($req);
if($duel['user1'] == $user['id']) $protiv = $duel['user2']; else $protiv = $duel['user1'];
echo '<div class = "nav"><img src = "ico/duels.gif"> Сейчас на <a href = "duels.php?act=view&id='.$user['id'].'">дуэли</a> против <a href = "/page.php?id=' . $protiv . '">'.login($protiv).'</a></div>';
}
###
$zenat = mysql_num_rows(mysql_query("SELECT * FROM `braks` WHERE `user`='".$user[id]."' AND `status`='1' LIMIT 1"));
$nakom = mysql_num_rows(mysql_query("SELECT * FROM `braks` WHERE `nakom`='".$user[id]."' AND `status`='1' LIMIT 1"));
if($zenat > 0){
$kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `braks` WHERE `user`='".$user[id]."' AND `status`='1'"));
$name_kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '$kto[nakom]'"));
echo '<div class="div"><img src="ico/heart.png" alt="!"/> В браке c: <a href="/page.php?id='.$name_kto['id'].'">';
if ($name_kto['anketa_name']!=NULL){echo " $name_kto[login]";}
else{
echo " $name_kto[login]";
}
echo' </a></div>';
}
if($nakom > 0){
$kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `braks` WHERE `nakom`='".$user[id]."' AND `status`='1'"));
$name_kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '$kto[user]'"));
echo '<div class="div"><img src="ico/heart.png" alt="!"/> В браке c: <a href="/page.php?id='.$name_kto['id'].'">';
if ($name_kto['anketa_name']!=NULL){echo " $name_kto[anketa_name]";}
else{
echo " $name_kto[login]";
}
}
###
$count_photo = mysql_result(mysql_query("SELECT COUNT(*) FROM `users_photo` WHERE `user` = '".$user['id']."'"), 0);
echo '</div>';
$wall = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `wall` WHERE `wall` = '".$user['id']."'"), 0);
$cgarems = mysql_result(mysql_query("SELECT COUNT(*) FROM `garems_users` WHERE `garem` = '".$user['id']."'"), 0);
$cduels = mysql_result(mysql_query("SELECT COUNT(*) FROM `duels_list` WHERE `user1` = '".$user['id']."' OR `user2` = '".$user['id']."'"), 0);
$cgifts = mysql_result(mysql_query("SELECT COUNT(*) FROM `gifts_users` WHERE `user` = '".$user['id']."'"), 0);
$cmicroblog = mysql_result(mysql_query("SELECT COUNT(*) FROM `microblog_messages` WHERE `user` = '".$user['id']."'"), 0);
$cdiary = mysql_result(mysql_query("SELECT COUNT(*) FROM `diary_messages` WHERE `user` = '".$user['id']."'"), 0);
$cphotos = mysql_result(mysql_query("SELECT COUNT(*) FROM `photos_albums` WHERE `user` = '".$user['id']."'"), 0);
$cphotos2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `photos_photo` WHERE `user` = '".$user['id']."'"), 0);
if($fa) $fa = '<font color = "red">(+'.$fa.')</font>'; else $fa = '';
if($j) $j = '<font color = "red">('.$j.')</font>'; else $j = '';
if($u['count_mail']) $mn = '(+'.$u['count_mail'].')'; else $mn = '';
echo '<div class="div"><a href = "/profile.php?id=' . $user['id'] . '"><img src="ico/anketa.png" alt="!"/> Анкета</a></div>';
echo '<div class="div"><img src="ico/guest.png" alt="!"/> <a href = "guestbook.php?id='.$user['id'].'"> Гостевая </a> ['.$wall.']</div>';
echo '<div class="div"><img src = "ico/10.gif"> <a href = "friends.php"> Друзья </a> ['.$f.' | <font color = "green">'.$fo.'</font>] '.$fa.'</div>';
echo '<div class="div"><img src="ico/foto.png"> <a href = "photos.php"> Альбомы </a> ['.$cphotos.' | '.$cphotos2.']</div>';
echo '<div class="div"><img src="ico/notes.png" alt="!"/> <a href = "diary.php?act=view&id='.$user['id'].'"> Дневник </a> ['.$cdiary.']</div>';
$mcomms=mysql_result(mysql_query("SELECT COUNT(*) FROM `soo_users` WHERE `id_user` = '$user[id]'"),0);
echo '<div class="div"><img src="ico/comm.png" alt="" /> <a href="soo/user.php?id='.$user['id'].'"> Cообщества </a>['.$mcomms.']</div>';
echo '<div class="div"><img src="ico/status.png"> <a href = "microblog.php"> Статусы </a> ['.$cmicroblog.']</div>';
echo '<div class="div"><img src="ico/gift.png"> <a href = "gifts.php?act=list&id='.$user['id'].'"> Подарки </a> ['.$cgifts.']</div>';
echo '<div class="div"><img src="ico/duels.gif"> <a href = "duels.php?act=view&id='.$user['id'].'"> Дуэли </a> ['.$cduels.']</div>';
echo '<div class="div"><img src="ico/garems.png"> <a href = "garems.php?act=view&id='.$user['id'].'"> Гарем </a> ['.$cgarems.']</div>';
# echo '<div class="div"><img src="ico/games.png" alt="!"/> <a href = "/my_game.php?id='.$user['id'].'"> Игры</a></div>';
$all_ref = mysql_num_rows(mysql_query("SELECT * FROM `ref` WHERE `id` = '".$user['id']."'"));
echo '<div class="div"><img src="ico/10.gif"> <a href = "/ref.php?act=view"> Рефералы </a>['.$all_ref.']</div>';
echo '<div class="div"><img src="ico/settings.gif"> <a href = "settings.php"> Настройки</a></div>';
echo '<div class="div"><img src= "ico/office.png"> <a href = "user_dop.php"> Дополнительные услуги </a></div>';
} else {
$req = mysql_query("SELECT * FROM `duels_list` WHERE (`user1` = '".$user['id']."' or `user2` = '".$user['id']."') and `time_end` > '".time()."' LIMIT 1");
if(mysql_num_rows($req)){
$duel = mysql_fetch_assoc($req);
if($duel['user1'] == $user['id']) $protiv = $duel['user2']; else $protiv = $duel['user1'];
echo '<div class = "nav"><img src = "ico/duels.gif"> Сейчас на <a href = "duels.php?act=view&id='.$user['id'].'">дуэли</a> против <a href = "/page.php?id=' . $protiv . '">'.login($protiv).'</a></div>';
}
###
$zenat = mysql_num_rows(mysql_query("SELECT * FROM `braks` WHERE `user`='".$user[id]."' AND `status`='1' LIMIT 1"));
$nakom = mysql_num_rows(mysql_query("SELECT * FROM `braks` WHERE `nakom`='".$user[id]."' AND `status`='1' LIMIT 1"));
if($zenat > 0){
$kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `braks` WHERE `user`='".$user[id]."' AND `status`='1'"));
$name_kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '$kto[nakom]'"));
echo '<div class="div"><img src="ico/heart.png" alt="!"/> В браке c: <a href="/page.php?id='.$name_kto['id'].'">';
if ($name_kto['anketa_name']!=NULL){echo " $name_kto[login]";}
else{
echo " $name_kto[login]";
}
echo' </a></div>';
}
if($nakom > 0){
$kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `braks` WHERE `nakom`='".$user[id]."' AND `status`='1'"));
$name_kto = mysql_fetch_assoc(mysql_query("SELECT * FROM `users` WHERE `id` = '$kto[user]'"));
echo '<div class="div"><img src="ico/heart.png" alt="!"/> В браке c: <a href="/page.php?id='.$name_kto['id'].'">';
if ($name_kto['anketa_name']!=NULL){echo " $name_kto[login]</div>";}
}
### ' . $user['login'] . '
$privfrends = mysql_num_rows(mysql_query("SELECT * FROM `friends` WHERE `user` = '".$u['id']."' and friend = '".$user['id']."' LIMIT 1"));
if($user['priv_mypage']){
if($user['priv_mypage'] == 1) {
if($privfrends) $access = true; else$access = false;
}
if($user['priv_mypage'] == 2) {
$access = false;
}
} else { $access = true; }
if($access == true){
$cgifts = mysql_result(mysql_query("SELECT COUNT(*) FROM `gifts_users` WHERE `user` = '".$user['id']."'"), 0);
$wall = mysql_result(mysql_query("SELECT COUNT(`id`) FROM `wall` WHERE `wall` = '".$user['id']."'"), 0);
$cphotos = mysql_result(mysql_query("SELECT COUNT(*) FROM `photos_albums` WHERE `user` = '".$user['id']."'"), 0);
$cphotos2 = mysql_result(mysql_query("SELECT COUNT(*) FROM `photos_photo` WHERE `user` = '".$user['id']."'"), 0);
$cdiary = mysql_result(mysql_query("SELECT COUNT(*) FROM `diary_messages` WHERE `user` = '".$user['id']."'"), 0);
$cmicroblog = mysql_result(mysql_query("SELECT COUNT(*) FROM `microblog_messages` WHERE `user` = '".$user['id']."'"), 0);
$cgarems = mysql_result(mysql_query("SELECT COUNT(*) FROM `garems_users` WHERE `garem` = '".$user['id']."'"), 0);
$cduels = mysql_result(mysql_query("SELECT COUNT(*) FROM `duels_list` WHERE `user1` = '".$user['id']."' OR `user2` = '".$user['id']."'"), 0);
echo '<div class="div"><a href = "/profile.php?id=' . $user['id'] . '"><img src="ico/anketa.png" alt="!"/> Анкета</a></div>';
echo '<div class="div"><img src="ico/guest.png" alt="!"/> <a href = "guestbook.php?id='.$user['id'].'"> Гостевая </a> ['.$wall.']</div>';
echo '<div class="div"><img src = "ico/10.gif"> <a href = "friends.php?id='.$user['id'].'"> Друзья </a> ['.$f.' | <font color = "green">'.$fo.'</font>)</div>';
echo '<div class="div"><img src="ico/foto.png"> <a href = "photos.php?id='.$user['id'].'"> Альбомы </a> ['.$cphotos.' | '.$cphotos2.']</div>';
echo '<div class="div"><img src="ico/notes.png" alt="!"/> <a href = "diary.php?act=view&id='.$user['id'].'"> Дневник </a> ['.$cdiary.']</div>';
$mcomms=mysql_result(mysql_query("SELECT COUNT(*) FROM `soo_users` WHERE `id_user` = '$user[id]'"),0);
echo '<div class="div"><img src="ico/comm.png" alt="" /> <a href="soo/user.php?id='.$user['id'].'"> Cообщества </a>['.$mcomms.']</div>';
echo '<div class="div"><img src="ico/status.png"> <a href = "microblog.php?id='.$user['id'].'"> Статусы </a> ['.$cmicroblog.']</div>';
echo '<div class="div"><img src="ico/gift.png"> <a href = "gifts.php?act=list&id='.$user['id'].'"> Подарки </a> ['.$cgifts.']</div>';
echo '<div class="div"><img src="ico/duels.gif"> <a href = "duels.php?act=view&id='.$user['id'].'"> Дуэли </a> ['.$cduels.']</div>';
echo '<div class="div"><img src="ico/garems.png"> <a href = "garems.php?act=view&id='.$user['id'].'"> Гарем </a> ['.$cgarems.']</div>';
# echo '<div class="div"><img src="ico/games.png" alt="!"/> <a href = "/my_game.php?id='.$user['id'].'"> Игры</a></div>';
$all_ref = mysql_num_rows(mysql_query("SELECT * FROM `ref` WHERE `id` = '".$user['id']."'"));
echo '<div class="div"><img src="ico/10.gif"> <a href = "ref.php?act=view&id='.$user['id'].'"> Рефералы </a>['.$all_ref.']</div>';
} else {
echo '<div class="title">Пользователь ограничивает круг лиц, которые могут просматривать эту информацию.</div>';
}
echo '</div>';
echo '<div class="div">';
# $user_lenta = mysql_num_rows(mysql_query("SELECT * FROM `lenta_user` WHERE `user` = '".$u['id']."' and lenta_user = '".$user['id']."' LIMIT 1"));
#if($user_lenta)
# echo '<img src="ico/feed.png" alt="!"/> <a href = "chit_add.php?id='.$user['id'].'">Добавить в ленту</a><font color="red"> NEW</font></br>';
#else echo '<img src="ico/feed.png" alt="!"/> <a href = "chit_del.php?id='.$user['id'].'">Удалить из ленты</a><font color="red"> NEW</font></br>';
#
echo '<img src="ico/heart.png" alt="!"/> <a href = "flirt.php?id='.$user['id'].'">Сделать действие</a></br>';
#
echo '<img src="ico/mail.png"> <a href = "mail.php?act=write&id='.$user['id'].'">Написать сообщение</a><br/>';
$myfriend = mysql_num_rows(mysql_query("SELECT * FROM `friends` WHERE `user` = '".$u['id']."' and friend = '".$user['id']."' LIMIT 1"));
if($myfriend)
#
echo ' <img src = "ico/10.gif"><a href = "friends.php?act=delete&id='.$user['id'].'">Убрать из друзей</a><br/>';
#
else echo '<img src = "ico/10.gif"> <a href = "friends.php?act=adding&id='.$user['id'].'">Добавить в друзья</a><br/>';
###
/*
$lenta = mysql_num_rows(mysql_query("SELECT * FROM `users` WHERE `user` = '".$u['id']."' and lenta = '".$user['id']."' LIMIT 1"));
if($lenta)
echo ' <img src = "ico/lenta.png"><a href = "chit_add.php?act=delete&id='.$user['id'].'">Подписатся на новости</a><br/>';
else echo '<img src = "ico/lenta.png"> <a href = "chit_del.php?act=adding&id='.$user['id'].'">Отписатся от новостей</a><br/>';
#####
*/
echo '<img src="ico/gift.png"> <a href = "gifts.php?iduser='.$user['id'].'">Подарить подарок</a><br/>';
# echo '<img src = "ico/rating.png"> <a href = "rating_plus.php?id='.$user['id'].'">Повысить рейтинг</a><font color="red"> NEW</font><br/>';
# echo '<img src = "ico/rating.png"> <a href = "money_perevod.php?id='.$user['id'].'">Перевод монет</a><br/>';
if(!$duel['id']) {
$req = mysql_query("SELECT * FROM `duels_list` WHERE (`user1` = '".$u['id']."' or `user2` = '".$u['id']."') and `time_end` > '".time()."' LIMIT 1");
if(!mysql_num_rows($req)){
echo '<img src = "ico/duels.gif"> <a href = "duels.php?act=add&id='.$user['id'].'">Вызвать на дуэль</a></br>';
}
}
if($garem_user['garem'] != $u['id'] && $user['sex'] != $u['sex']) echo '<img src="ico/garems.png"> <a href = "garems.php?act=add&id='.$user['id'].'">Украсть в гарем</a></br>';
}
echo '</div>';
include 'foot.php';
?>