\n";
echo $fsize2;
}else{
echo $fsize1;
$zap = mysql_query ("select count(who) as num from zapiski;");
$usm = mysql_fetch_array($zap);
$num = $usm["num"];
if(!isset($s))$s=0;
$mx=round(($num/10)+0.45);
if($s>$mx)$s=$mx;
if($s==0)$s=1;
$ot=(($s-1)*10)+1;
$do=$s*10;
if($do>$num)$do=$num;
$o=$ot-1;
$n=$ot;
if($do==0)$n=$o;
echo "Показывает $n-$do из $num
\n";
echo $divide;
$r = mysql_query ("select * from zapiski order by date desc limit $o,$do");
for ($i=$ot;$i<=$do;$i++){
$arr = mysql_fetch_array($r);
echo "→Kto: ".$arr["who"]."*
Komu: ".$arr["towhom"]."*
Tarix: ".$arr["date"]."*
Movzu: ".$arr["topic"]."*
Mesaji: ".$arr["message"]."**
";
}
$next=$s+1;
$prev=$s-1;
if ($num>$do) {
$ot=(($next-1)*10)+1;
$do=$next*10;
if($do>$num)$do=$num;
echo ">>$ot-$do>>
\n";
}
if($s>1) {
$ot=(($prev-1)*10)+1;
$do=$prev*10;
echo "<<$ot-$do<<
\n";
}
echo $fsize2;
}
break;
//чтение записок
?>