<?

$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `dnev` WHERE `id_user` = '$ank[id]'"),0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$lim=" LIMIT $start, $set[p_str]";
$q=mysql_query("SELECT * FROM `dnev` WHERE `id_user` = '$ank[id]' ORDER BY `time` DESC  LIMIT 1");

if (mysql_num_rows($q)==0) 
{

include_once 'incadd.php';

echo "Всем привет я новичок!\n";


}
while ($dnev = mysql_fetch_assoc($q))

{

include_once 'incadd.php';

echo "$dnev[name] <font color='#ffffff'>".vremja($dnev[time])."</font>\n";

}
?>