Вход Регистрация
Файл: my/lenta.php
Строк: 19
<?php


require'../config.php';

aut();
head();
echo 
text;

if (empty(
$user['max_pr'])) $user['max_pr']=5;
$max $user['max_pr'];
$k_post=$db->sql_fetchfield($db->sql_query("select count(*) as num from lenta where to_id = '".$user['id']."'"),0);
$k_page=k_page($k_post,$max);
$page=page($k_page);
$start=$max*$page-$max;

$r $db->sql_query ("Select * from lenta where to_id = '".$user['id']."' order by time desc LIMIT $start$max");
$k $db->sql_numrows($r);
if ( 
$k == )
{
echo 
'Сообщений пока нет :(<br />';
}

$post_k=$start+1;
while(
$a = @$db->sql_fetchrow($r)){
if (
$a['readin'] == 0){$db->sql_query ("Update lenta set readin = '1' WHERE id ='".$a['id']."'");
echo 
links.' <img src="'.H.'img/new.gif" alt="" /> ';
}else echo 
links.'';
if (
$a['user_id']==0)echo '<b>'.nik($a['user']).'</b> ('.times($a['time']).')<br />'.div;
else echo 
'<b>'.nik($a['user_id']).'</b> ('.times($a['time']).')<br />'.div;
echo 
antir(text($a['msg']))."<br/>";



echo 
"<hr />";
}
############## 

##############
if ($k_page>1){
echo 
"<dl><dt></dt></dl>";
str('lenta?mod=in&amp;',$k_page,$page); // Вывод страниц
echo "<br /><dl><dt></dt></dl><br />";
}








echo 
div;
echo 
gb.'<a href="'.H.'index?">На Главную</a>'.div;
foot();
?>
Онлайн: 0
Реклама