Файл: user/info/status.php
Строк: 46
<?
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']){
/*
?>
<style>
.status {
display: none;
}
.status1 {
display: none;
}
</style>
<?
if ($ank['id']==$user['id']){
?><a style="margin-top:6px;text-align: center; color: #4691b3;" class="link" href="#" onclick="$('.status').toggle();return false;"><i class="fas fa-edit"></i> Обновить свой статус</a><?
echo '<div class="status">';
echo '<div class="main">';
echo '<form action="/info.php" method="post" name="message">';
echo '<textarea placeholder="Что у вас нового?" maxlength="140" type="text" name="status" id="msg"></textarea>';
echo '<table>';
echo '<td><input class="submit" type="submit" value="Отправить" /></td>';
?><td width="1"><a href="#" onclick="$('.smile').toggle();return false;"><i style="color: #757577; font-size: 18px;" class="far fa-smile"></i></a></td><?
echo '</table>';
echo '</form></div>';
include ('ajax/smile.php');
echo '</div>';
}
*/
echo '<div style="margin-top:6px;"></div>';
if ($status['id']){
echo '<div style="border-top: 1px solid #e8e8e8;border-bottom:none;" class="mess">';
echo output_text($status['msg']) .'';
echo '</div>';
}
//Если статус установлен
if ($status['id']){
echo '<div class="mess">';
echo "<a href='/user/status/komm.php?id=$status[id]'><span style='font-size: 12px; color: #67676e;'><i class='far fa-comment-alt'></i> " . mysql_result(mysql_query("SELECT COUNT(*) FROM `status_komm` WHERE `id_status` = '$status[id]'"),0) . "</span></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'><i class='fas fa-heart'></i></a> ";
$like = $l;
}
else if(isset($user) && $user['id']!=$ank['id']){
echo " <span style='font-size: 12px; color: #67676e;'><i class='fas fa-heart'></i> Вы и</span> ";
$like = $l-1;
}else{
echo " <i class='fas fa-heart'></i> ";
$like = $l;
}
echo "<a href='/user/status/like.php?id=$status[id]'> <span style='font-size: 12px; color: #67676e;'>$like чел.</span></a>";
echo '<span style="float:right;font-size: 12px; color: #67676e;"><i class="far fa-clock"></i> ' . vremja($status['time']) . '</span>';
}
echo '</span>';
echo '</div>';
}