File size: 3.05Kb
<?php
ini_set('display_errors', 'off');
header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
print '<?xml version="1.0" encoding="utf-8"?>';
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">";
include "../ini.php";
$login = autorize();
if($login['fsize'] == "medium") { $fsize1 = ""; $fsize2 = ""; }
elseif($login['fsize'] == "small") { $fsize1 = "<small>"; $fsize2 = "</small>"; }
elseif($login['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
print "<title>Исходящие</title><link rel=\"StyleSheet\" type=\"text/css\" href=\"../style/0".$s.".css\"></head><body>";
print "<div style=\"text-align: center\">
<div class=\"contur_rek\"><div class=\"header_rek\">".$fsize1."Исходящие".$fsize2."</div></div></div>";
print "<div style=\"text-align: left\"><div class=\"contur\"><div class=\"header\">";
if($login) {
if(empty($start)) $start = 0;
if($start < 0) $start = 0;
$pnumber = 5;
$tot = @mysql_query("select count(*) from `".$px.$ltable."` where from_user='".$login['login']."' and ci='$ci';");
$lets = @mysql_query("select * from `".$px.$ltable."` where from_user='".$login['login']."' and ci='$ci' order by time desc limit ".$start.",".$pnumber.";");
//если запросы успешны
if($tot && $lets) {
$total = @mysql_fetch_array($tot);
$count = $total['count(*)'];
while($data = @mysql_fetch_array($lets))
{
$from=htmlspecialchars($data['from_user'], ENT_QUOTES);
$to=htmlspecialchars($data['to_user'], ENT_QUOTES);
$time=htmlspecialchars($data['time'], ENT_QUOTES);
$subject=htmlspecialchars($data['subject'], ENT_QUOTES);
$letter=htmlspecialchars($data['letter'], ENT_QUOTES);
$new=htmlspecialchars($data['new'], ENT_QUOTES);
$id_letter=htmlspecialchars($data['id'], ENT_QUOTES);
$time = date("d.m.Y H:i", $time);
print "".$fsize1."<a href=\"view.php?s=$s&ci=$ci&id=$id&pass=$pass&id_letter=$id_letter\">$subject <span style=\"color:#FAA134;\">[$time]</span></a><br/>".$fsize2."";
}
}
print "</div></div></div>";
if($start > 0)
print "<br/></div><div class=\"smain\">".$fsize1."<a href=\"?s=$s&ci=$ci&id=$id&pass=$pass&room=$room&start=".($start-$pnumber)."\">Предыдущие</a>".$fsize2."";
if($count > $start + $pnumber)
print "".$fsize1."<a href=\"?s=$s&ci=$ci&id=$id&pass=$pass&room=$room&start=".($start+$pnumber)."\"><br/>Следующие</a>".$fsize2."";
print "</div>";
print "<div style=\"text-align: center\">
<div class=\"contur_rek\"><div class=\"header_rek\">".$fsize1."<a href=\"../enter.php?s=$s&ci=$ci&id=$id&pass=$pass\">Прихожая</a>".$fsize2."</div></div></div>";
} else { print "Ошибка авторизации!"; }
print '</body></html>';
//разрываем соединение
@mysql_close();
ob_end_flush();
?>