Файл: online/riwar/Riwar.ru/panel/mail.php
Строк: 14
<?php
$title = 'Мейл шпион';
require_once ('../system/function.php');
require_once ('../system/header.php');
if(!$user['id'] or $user['level'] < 2) {
header('Location: '.$HOME.'/');
exit();}
if($user['level'] >= 3) { echo '<div class="head1">'.$title.'</div>';
if (empty($user['max'])) $user['max']=20;
$max = $user['max'];
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `message` WHERE `komy`!='".$user['id']."' and `kto`!='".$user['id']."' and `kto`!='1'"),0);
$k_page = k_page($k_post,$max);
$page = page($k_page);
$start = $max*$page-$max;
$message = mysql_query("SELECT * FROM `message` WHERE `komy`!='".$user['id']."' and `kto`!='".$user['id']."' and `kto`!='1' ORDER BY `time` DESC LIMIT $start, $max");
while($a = mysql_fetch_assoc($message)){
$kto = $a['kto'] ;
$komy = $a['komy'] ;
echo '<div class="player">Кто '.nick($a['kto']).'<br> Kому '.nick($a['komy']).' ('.vremja($a['time']).')
<br>'.$a['text'].'<div class="separ5"></div></div>';
}
}
if ($k_page>1) echo str('/panel/mail.php?',$k_page,$page); // Вывод страниц
//-----Подключаем низ-----//
require_once ('../system/footer.php');
?>