Файл: rayb.me/panel/hmail.php
Строк: 27
<?
require_once '../system/func.php';
if($user['access'] < 1) {
header('location:/');
exit;
}
require_once '../system/header.php';
if($user['access'] >= 1) {
echo "<center>Mail spion</center>
<center><font color='gren'>";
echo DB::result(DB::Query("SELECT COUNT(*) FROM `mail`"),0).' сообщений</font></center>';
$set['p_str'] = 10;
$k_post = DB::result(DB::Query("select count(*) from `mail`"),0);
$k_page = k_page($k_post,$set['p_str']);
$page = page($k_page);
$start = $set['p_str']*$page-$set['p_str'];
if($k_post == 0) msg("Сообщений не найдено.");
$mail = DB::Query("SELECT * FROM `mail` ORDER BY `time` DESC LIMIT ".$start.", ".$set['p_str']."");
while($um = mysqli_fetch_assoc($mail)){
$in = mysqli_fetch_assoc(DB::Query("select * from `users` where `id` = '".$um['in']."' limit 1"));
$out = mysqli_fetch_assoc(DB::Query("select * from `users` where `id` = '".$um['out']."' limit 1"));
echo "<div class='block'>";
echo "id Mail: ".$um['id'];
echo '<span style="float:right;font-size: 9px; color:grey;pading:0px;margin:0px;">';
echo time_last($um['time']);
echo '</span><br/>';
echo "Кто: <a href='/profile/".$um['in']."'>".$in['login']."</a><br/>";
echo "Text: ".text_msg($um['text'])."<br/>";
echo "Кому: <a href='/profile/".$um['out']."'>".$out['login']."</a> ";
echo "<a href='/panel/Hmailp.php?sms=".$um['id']."'>[Подробней]</a>";
echo "</div>";
echo "<hr>";
}
if($k_post > 10) str('?',$k_page,$page);
}
require_once '../system/footer.php';