Файл: user/status/like.php
Строк: 67
<?
include_once '../../sys/inc/start.php';
include_once '../../sys/inc/compress.php';
include_once '../../sys/inc/sess.php';
include_once '../../sys/inc/home.php';
include_once '../../sys/inc/settings.php';
include_once '../../sys/inc/db_connect.php';
include_once '../../sys/inc/ipua.php';
include_once '../../sys/inc/fnc.php';
include_once '../../sys/inc/user.php';
$set['title']='Like к статусу';
include_once '../../sys/inc/thead.php';
title();
if (mysql_result(mysql_query("SELECT COUNT(*) FROM `status` WHERE `id` = '".intval($_GET['id'])."' LIMIT 1",$db), 0)==0){header("Location: index.php?".SID);exit;}
// Статус
$status=mysql_fetch_assoc(mysql_query("SELECT * FROM `status` WHERE `id` = '".intval($_GET['id'])."' LIMIT 1"));
// Автор
$anketa=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $status[id_user] LIMIT 1"));
err();
aut(); // форма авторизации
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `status_like` WHERE `id_status` = '".intval($_GET['id'])."'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$q=mysql_query("SELECT * FROM `status_like` WHERE `id_status` = '".intval($_GET['id'])."' ORDER BY `id` DESC LIMIT $start, $set[p_str]");
echo "<table class='post'>n";
if ($k_post==0)
{
echo "<div class='mess'>n";
echo "За статус еще не голосовалиn";
echo "</div>";
}
while ($post = mysql_fetch_assoc($q))
{
//Сообщения
$ank=mysql_fetch_assoc(mysql_query("SELECT * FROM `user` WHERE `id` = $post[id_user] LIMIT 1"));
echo '<div style="margin-bottom:10px;border-radius:3px;" class="mess">';
echo '<span style="float: left; margin: -3px 5px 0px 0px;">';
echo "<a href='?id=$news[id]&response=$ank[id]'>". avatar($ank['id']). "</a>";
echo '</span>' . group($ank['id'])." <a href='/info.php?id=$ank[id]'>$ank[nick]</a> ";
echo "".online($post['id'])."</br>";
echo "Лайк поставлен ".vremja($post['time'])."";
$status=mysql_fetch_assoc(mysql_query("SELECT * FROM `status` WHERE `id_user` = '$ank[id]' AND `pokaz` = '1' LIMIT 1"));
if ($status['id']){
echo '<div class="st_1"></div>';
echo '<div class="st_2">';
echo "<a href='/user/status/komm.php?id=$status[id]'>".output_text($status['msg'])."</a>";
echo "</div>";
}
echo "</div>";
}
echo "</table>n";
if ($k_page>1)str("like.php?id=".intval($_GET['id']).'&',$k_page,$page); // Вывод страниц
include_once '../../sys/inc/tfoot.php';
?>