Файл: my/us_wap.php
Строк: 155
<?php
define('GCMS',true);
define('ROOT','../');
require_once (ROOT.'system/power.php');
$sql = $db -> query("SELECT * FROM `users` WHERE `id` = '".$id."' LIMIT 1");
if ($sql -> num_rows > 0) {
$user = $sql -> fetch_assoc();
echo '<div class="but_razdel">
<span class="button_razdel" style="border-right: none;width: 15%;">id'.$user['id'].'</span>
<span class="button_razdel" style="border-left: none;border-right: none;width: 60%;">'.$func->famname($id,0).'</span>
<span class="button_razdel" style="border-left: none;width: 25%;">'.$func -> online($user['id'],true).'</span>
</div>';
$ban = $db -> query("SELECT * FROM `ban` WHERE `iduser` = '".$user['id']."' LIMIT 1");
if ($ban -> num_rows > 0) {
$ban = $ban -> fetch_assoc();
echo '<div class="fon">Наказан '.$func -> famname($ban['yaid']).' до '.$func -> times(date('d m Y H:i:s',$ban['bantime'])).'';
if($ban['text']>''){echo '</br>По причине: '.$ban['text'].'';}
echo '</div>';
}
//
if($user['foto']>0){
echo '<div class="fon"><a href="/downloads/foto/'.$user['foto'].'"/>'.$func->avatar($user['id'],148,128,1).'</a></div>';
}else{echo '<div class="fon">'.$func->avatar($user['id'],148,128,1).'</div>'; }
echo '<div class="levo"><a href="'.ROOT.'my/anks.php?id='.$id.'" class="levo_tuch"><img src="/i/0.png" alt=""/> Анкета</a></div>';
$count = $db -> dbcount('COUNT(`id`)','nuts',"`where`='frends' and `idwh`='".$user['id']."' and `time`<>'0'");
echo '<div class="levo"><a href="/my/friends.php?id='.$user['id'].'" class="levo_tuch"><img src="i/3.png" alt=""/> Друзья ('.$count.')</a></div>';
echo '<div class="levo"><a href="'.ROOT.'/albom/id'.$id.'" class="levo_tuch"><img src="/i/668.gif" alt=""/> Фото </a></div>';
$my = $db -> dbcount('COUNT(*)','files','`user` = '.$user['id'].' and `what`="load"');
echo '<div class="levo"><a href="'.ROOT.'/load/my_load.php?id='.$id.'" class="levo_tuch"><img src="/styles/gcms/images/obmen.png" alt=""/> Файлы ('.$my.')</a></div>';
$m_st = $db -> dbcount('count(`id`)','youtube',"`user` = '".$user['id']."'");
echo '<div class="levo"><a href="'.ROOT.'/youtube/my_video.php?id='.$id.'" class="levo_tuch"><img src="/styles/gcms/images/load/video.png" alt=""/> Видео ('.$m_st.')</a> </div>';
//
if(($ya['id']!=$user['id'] or $ya['level']>1)and($aut)){
if ($ya['id'] <> $user['id']){
if ($func->ignor($ya['id'],$user['id'])==false and $user['mail']==0)echo '<div class="levo"><a href="'.ROOT.'my/mail.php?act=write&id='.$id.'" class="levo_tuch">»Написать сообщение</a></div>';
if($func->ignor($user['id'],$ya['id'])==false and $func->ignor($ya['id'],$user['id'])==false and $func->friends($user['id'],$ya['id'])==false)echo '<div class="levo"><a href="'.ROOT.'my/friends.php?do=pri&id='.$id.'" class="levo_tuch">»Добавить в друзья</a></div>';
if ($func->friends($user['id'],$ya['id'])==false) {
if ($func->ignor($user['id'],$ya['id'])==false) {
echo '<div class="levo"><a href="'.ROOT.'my/ignors.php?do=zajav&id='.$id.'" class="levo_tuch">»Добавить в игнор</a></div>';
}else{
echo '<div class="levo"><a href="'.ROOT.'my/ignors.php?do=delfr&id='.$id.'" class="levo_tuch">»Удалить из игнора</a></div>';
}
}
if ($func->friends($user['id'],$ya['id'])==true) {
echo '<div class="levo"><a href="'.ROOT.'my/friends.php?do=delfr&id='.$id.'" class="levo_tuch">»Удалить из друзей</a></div>';
}
}
if ($ya['level'] > 3)echo '<div class="levo"><a href="'.ROOT.'sysadm/users.php?do=red&id='.$user['id'].'" class="levo_tuch">»Проверка</a></div>';
echo '<div class="levo"><a href="'.ROOT.'my/report.php?id='.$user['id'].'" class="levo_tuch">»Пожаловаться</a></div>';
}
if($func->ignor($ya['id'],$user['id'])==false and $nastr['stena']==1){
$count = $db -> dbcount('COUNT(`id`)','comes',"`idwh` = '".$id."' and `where`='stena'");
echo '<div class="new"><b>Стена:</b> '.$func->GetName($count,'Запись','Записи','Записей').'</div>';
if($aut){
if(($user['stenazap']==0)or($user['stenazap']==1 and $func->friends($user['id'],$ya['id'])==true)or($user['id']==$ya['id'])){
echo '<div class="podmenu"><form action="'.ROOT.'my/stena.php?id='.$id.'&mode=write_us" method="post">
<textarea cols="'.$ya['width'].'" rows="'.$ya['height'].'" name="text"></textarea><br/>
<input type="submit" value="Написать"/></form></div>';
}
}
if($count>0){
////------------------/////
$num = isset($ya['num']) ? $ya['num'] : 10;
$total = intval(($count - 1) / $num) + 1;
if (!isset($_GET['page']) || !is_numeric($_GET['page']) || $_GET['page'] < 1 )
{
$page = 1;
} elseif($_GET['page'] > $total)
{ $page = $total;
} else $page = intval(abs($_GET['page']));
$start = $page * $num - $num;
////------------------/////
$for = $db -> query("SELECT * FROM `comes` where `idwh` = '".$id."' and `where`='stena' order by `time` DESC LIMIT ".$start.",".$num);
while ($assoc = $for -> fetch_assoc()) {
echo '<div class="fon">
<table><tr valign="top"><td>'.$func->avatar($assoc['user']).'</td>
<td style="padding-left:5px;">'.$func->famname($assoc['user']).' <span class= "date">'.$func -> times(date('d m Y в H:i',$assoc['time'])).'</span><br/><br/>
'.$func -> tags($func -> smiles($assoc['text'])).'</td>
</tr></table></div>';
$comes = $db -> dbcount('COUNT(`id`)','comes',"`where`='comes_stena' and `idwh`='".$assoc['id']."'");
echo '<div class="zap">
<a class="zap_b" href="'.ROOT.'post'.$assoc['id'].'">'.$diz -> img('guest.png','Комментарии').' '.$func->kol($comes).'</a>';
if ($ya['level'] > 1 or $assoc['user']==$ya['id'])echo'<a class="zap_b" href="/my/stena.php?id='.$id.'&sid='.$assoc['id'].'&mode=del_zp&page='.$page.'">Удалить</a>';
$like = $db -> dbcount('COUNT(`id`)','reit',"`where`='comes' and `komy`='".$assoc['id']."'");
if($like>0)$like=$like=$func->kol($like); else $like=null;
echo'<a onclick="like_ok(like'.$assoc['id'].');" id="like'.$assoc['id'].'" data-id="'.$assoc['id'].'" data-ya="'.$ya['id'].'" data-mode="comes" class="zap_b">'.$diz -> img('like.png').' <span class="count_like">'.$like.'</span></a></div></div>';
}
$act = '/my/user.php?id='.$id;
echo $func -> next_prev($act,$page,$total);
}else echo '<div class="fon"/>Стена пока пуста.</div>';
////------------------/////
}
} else {
$diz -> head('Ошибка');
$diz -> title('Ошибка');
echo '<div class="fon">Пользователя с данным ID не существует или он был удалён!</div>';
}
echo '<div class="levo"><a href="'.ROOT.'index.php" class="levo_tuch">'.$diz -> img('home.png').' На главную</a></div>';
#####Копирайт#######
$diz -> out($msg);
?>