<?
include 'config.php';
include 'func.php';
head();
aut();
ban();    

mysql_query("UPDATE `profile` SET `online` = 'besedka' WHERE `id` = '".$id_session."'");

echo head . '<b>Журанал сайта:</b>' . div;

   
$all = mysql_result(mysql_query("SELECT count(*) FROM `jurnal`"), 0);
if($all){
$onpage = 10;
$allpage = ceil($all/$onpage);
$this_page = (isset($_GET['p'])) ? intval($_GET['p']) : 1 ;
if($this_page < 1 || $this_page > $allpage)$this_page = 1;
$start = $this_page*$onpage - $onpage;
if($all>0)
{
$result = mysql_query("SELECT * FROM jurnal  order by id desc limit ".$start.",".$onpage."");

while($msg = mysql_fetch_assoc($result)){

echo link2 . '<b>' . date2($msg['date']) . ':</b> ' . $msg['msg'] . div;
}

echo link1 . '<b>Страницы:</b> ';
navigation($allpage,"jurnal.php?p={p}",1,1);
echo div;
}


} else { 
    
    echo link2 . 'Событий нет...' . div;
    
}

navig();
foot();
?>