Файл: region_clean/outbox.php
Строк: 109
<?
#######################################
## Mod By KoT (borispol) [76-75-072] ##
#######################################
require_once "start.php";
require_once "sid.php";
header("Cache-Control: no-cache");
if ($ver == "wml") header ("Content-type:text/vnd.wap.wml; charset=utf-8");
else header("Content-Type:text/html; charset=UTF-8");
require_once "inc.php";
$link = connect_db();
list($row, $id, $ps, $fsize1, $fsize2) = check_login($link);
require_once "version.php";
if (isset($rm)) $takep2="&rm=$rm&ref=$ref";
else $takep2="&ref=$ref";
$r = mysql_query("select count(readd) as num from zapiski where (idwho = '".$id."')and(insend ='1')");
$a = mysql_fetch_array($r);
$num = $a["num"];
if ($num == 0) {
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<card id="error" title="Отправленные" ontimer="chatmail.php?$ses$takep2"><timer value="10"/>n
<p align="center">n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Нет писем</title>
<META HTTP-EQUIV="Refresh" CONTENT="2; URL=chatmail.php?$ses$takep2">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="center">";
echo "<div class = 'd1'>Исходящие</div>n";
}
echo $fsize1;
echo 'У тебя нет отправленных писем!<br/>';
echo $fsize2;
include_once 'foot.php';
mysql_close($link);
exit;
}
if (!isset($s)) $s = 1;
$mx = round(($num/10) + 0.45);
if ($s > $mx) $s = $mx;
if ($s == 0) $s = 1;
if ($ver == "wml") {
echo $xml;
echo $dtd;
echo "<wml>n
<head><meta http-equiv="Cache-Control" content="no-cache" forua="true"/></head>n
<card id="outbox" title="Отправленные">n
<do type="accept" name="send" label="Прихожая"><go href="enter.php?$ses$takep2"/></do>n
<p>n";
} else {
echo "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><link rel="stylesheet" type="text/css" href="css/$css.css"/>
<title>Входящие</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/></head><body>
<div align="left">";
echo "<div class = 'd1'><a href="inbox.php?$ses">Входящие</a>/Исходящие</div>n";
}
$ot = (($s - 1) * 10) + 1;
$do = $s * 10;
if ($do > $num) $do = $num;
$o = $ot - 1;
$n = $ot;
if ($do == 0) $n = $o;
echo $fsize1;
echo "<div class = 'd1'>Нажми на [X] рядом с ником для удаления.</div>n";
echo "$n-$do из $num<br/><br/>n";
echo $fsize2;
$r = mysql_query ("Select who,topic,date,klu4,readd,towhom from zapiski WHERE (idwho = '".$id."')and(insend ='1') order by time desc LIMIT $o,$do");
for ($i = $ot; $i <= $do; $i++) {
$a = mysql_fetch_array($r);
$fromw = $a ["who"];
$towhom = $a ["towhom"];
$topic = $a ["topic"];
$date = $a ["date"];
$klu4 = $a ["klu4"];
$read = $a ["readd"];
echo $fsize1;
echo "<a href="delmsg.php?$ses&im=$klu4&s=$s&mod=delall&insend=1$takep2">[Х]</a>n";
if ($read == 1) echo "| <a href="send.php?$ses&im=$klu4&s=$s$takep2">$towhom ($topic)</a>[$date]<br/>n";
else echo "| <b><a href="send.php?$ses&im=$klu4&s=$s$takep2">$towhom ($topic)</a>[$date]</b><br/>n";
echo $fsize2;
}
mysql_close($link);
$next = $s + 1;
$prev = $s - 1;
if ($num > $do) {
$ot = (($next - 1) * 10) + 1;
$do = $next * 10;
if ($do > $num) $do=$num;
echo $fsize1;
echo "<br/><a href="outbox.php?$ses&s=$next$takep2">>>$ot-$do>></a><br/><br/>n";
echo $fsize2;
}
if ($s > 1) {
$ot = (($prev - 1) * 10) + 1;
$do = $prev * 10;
echo $fsize1;
echo "<br/><a href="outbox.php?$ses&s=$prev$takep2"><<$ot-$do<<</a><br/><br/>n";
echo $fsize2;
}
echo $fsize1;
echo "<br/><div class = 'd1'><a href="chatmail.php?$ses$takep2">Твои письма</a><br/>n";
if (isset($rm)) echo "<a href="chat.php?$ses&rm=$rm$takep">В чат</a><br/>";
echo "<a href="enter.php?$ses&ref=$ref">Прихожая</a></div>n";
echo $fsize2;
include_once "foot.php";
?>