Файл: pages/user.php
Строк: 124
<?
include_once '../inc/conn.php';
include_once '../function.php';
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '".my_esc($_GET['id'])."'"));
if(!$ank){header("Location: /");exit;}else{
$set['title']= ' '.htmlspecialchars($ank['name']).'';
include_once'../inc/head.php';if (isset($user)){
{{}}}if(isset($_GET['like']) && ($user['id']!=$ank['id'])) {if($user['like_time'] < time()-60*60*24){
mysql_query("UPDATE `user` SET `like_time`= '".time()."' WHERE `id` ='".$user['id']."'");
mysql_query("UPDATE `user` SET `likes`= '".($ank['likes']+1)."' WHERE `id` ='".$ank['id']."'");
$msg = '<b>Лайк:</b> <i>'.$user['name'].'</i> поставил лайк на вашей стр.';
mysql_query("INSERT INTO `jurnal`(`user`,`msg`,`time`,`chek`) VALUES('".$ank['id']."','$msg','".time()."','1')");msg_game('Ваш лайк успешно поставлен!');
}else{err_game('Лайкать можно только раз в 24ч.');}}echo "<div class='kmenu'>n";
if($ank['sila']>=0 && $ank['sila']<=1500)echo " <img src='img/status_1.png' alt='*' /> n";
if($ank['sila']>=1501 && $ank['sila']<=3000)echo " <img src='img/status_2.png' alt='*' /> n";
if($ank['sila']>=3001 && $ank['sila']<=7000)echo " <img src='img/status_3.png' alt='*' /> n";
if($ank['sila']>=7001)echo " <img src='img/status_4.png' alt='*' /> n";echo "</div></div>n"; echo "<div class='umenu'>n";
if(mysql_result(mysql_query('SELECT COUNT(*) FROM `user` WHERE `id`="'.$ank['id'].'" ORDER BY `sila` DESC LIMIT 10 '),0) != '0'){
echo"<img src='img/vtop10.png' alt='top10' align='right' >";}echo '<div class="fon_kach">';
if ($ank['sila']>=0 && $ank['sila']<=1500)echo " <img src='img/stadia_1.png' alt='*' /> n";
if ($ank['sila']>=1501 && $ank['sila']<=3000)echo " <img src='img/stadia_2.png' alt='*' /> n";
if($ank['sila']>=3001 && $ank['sila']<=7000)echo " <img src='img/stadia_3.png' alt='*' /> n";
if($ank['sila']>=7001)echo " <img src='img/stadia_4.png' alt='*' /> n";if($ank['date'] < (time()-600)) $tut='';elseif($ank['date'] < (time()-60))
{$tut='<span class="cGrey">*</span>';}else{$tut='';}echo"</div>";
echo" <br/> <b>".($ank['date']<=time()-600?"<span class='cRed'> Не играет</span>":"<span class='cDGreen'> В игре</span>")." ".$tut."</b> ";
echo "".($ank['status']==2?" <i><span class='cModer'> Модер</span></i>":null)."".($ank['status']==3?" <i><span class='cAdmin'> Создатель</span></i>":null)."";
echo '</div></div>'; if ($user['id']!=$ank['id']){
}else{{}}
if($ank['sila']>=0 && $ank['sila']<=1500) $work = 'Грузчик';
if($ank['sila']>=1501 && $ank['sila']<=3000) $work = 'Охранник в магаз.';
if($ank['sila']>=3001 && $ank['sila']<=7000) $work = 'Банк. охранник';
if($ank['sila']>=7001) $work = 'Телохранитель';
echo '<div class="umenu"> <img src="img/sila.png" alt="*" /> Сила : '.($ank['sila']/100).'%<br/>
<img src="img/medal.png" alt="*" /> Медалей : '.number_format($ank['medals']).'<br/>
<img src="img/work.png" alt="*" /> Проф : '.$work.'<br/></div>';
echo '<div class="umenu"> '.($user['like_time'] < time()-60*60*24 ?'<a href ="/like_'.$ank['id'].'"><img src="img/like.png" alt="*" /></a>':'<img src="img/likeoff.png" alt="*" />').' <b> '.number_format($ank['likes']).' </b></div>';
if ($user['id']!=$ank['id']){echo '<div class="kmenu">';
echo "".($user['atack_time'] < time() ?'<img src="img/fights.png">':'<img src="img/fightsoff.png">')." <a href='/armrestling_".$ank['id']."'> Побороться</a></div>";
}else{}
echo'<div class="umenu"> <span class="cGrey"><small>ID качка: '.$ank['id'].'<br/>Дата рег.: '.vremja($ank['date_reg']).'<br/>
</small></span>';if($ank['date']<=time()-600){
echo'<span class="cGrey"><small>Посл. вход: '.vremja($ank['date']).'</small></span>';}
echo'</div>';}
if ($user['id']!=$ank['id'])
{}
include_once '../inc/foot.php';
?>