<?

$id=intval($_GET['id']);
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `wall_love` WHERE `id_msg` = '$id'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
if ($k_post==0)echo'<div class="err">Запись не нравится никому</div>';
$q = mysql_query("SELECT * FROM `wall_love` WHERE `id_msg` = '$id' ORDER BY `id` DESC  LIMIT $start, $set[p_str]");
$ins = mysql_fetch_array($q);
$walid = mysql_fetch_array(mysql_query("SELECT * FROM `us_wall` WHERE `id` = '$ins[id_msg]'"));
$query = mysql_query("SELECT * FROM `wall_love` WHERE `id_msg` = '$id' ORDER BY `id` DESC  LIMIT $start, $set[p_str]");
while ($post = mysql_fetch_array($query))
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$post[uid]' LIMIT 1"));
echo'<div class="block">';
echo ''.on_k($post['uid']).' <a class="" href=?user='.$post['uid'].'>'.nc($post['uid']).'</a>';
echo " ".med($post['uid'])."";
echo "</br>".vremja($post['time'])."</div>";
}

if ($k_page>1)str("?like&id=$id&amp;",$k_page,$page); // Вывод страниц
include_once 'inc/foot.php';
?>