<?
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']='Гонки'; // заголовок страницы

include_once '../sys/inc/thead.php';
title();
err();
aut();

if($user['id']==1 || $user['id']==3){
}
else
{
echo "Секретная зона! Доступна после авторизации";
include_once '../sys/inc/tfoot.php';
break;
}
$id=abs(intval($_GET['id']));
$mail=mysql_result(mysql_query("SELECT COUNT(*) FROM mail WHERE id_kont='$id' OR id_user='$id'"),0);
$k_page=k_page($mail, 50);
$page=page($k_page);
$start=50*$page-50;
$qu=mysql_query("SELECT * FROM mail WHERE id_kont='$id' OR id_user='$id' ORDER BY id ASC LIMIT $start, 50");
while($a=mysql_fetch_array($qu)){
echo mysql_result(mysql_query("SELECT nick FROM user WHERE id='$a[id_user]'"),0)." написал пользов. ".mysql_result(mysql_query("SELECT nick FROM user WHERE id='$a[id_kont]'"),0)." <br/> ".output_text($a[msg])."<hr/>";
}
if($k_page>1)str('?id='.$id.'&amp;',$k_page,$page);






include_once '../sys/inc/tfoot.php';
?>
