0) { $nastranu2=$nastranu; if ($nastranu>$pocet) { $nastranu=$pocet; $strana=1; } } else { $nastranu=10; $nastranu2 = 10; } $stran=$pocet/$nastranu; $stran2=$stran; settype ($stran2, "integer"); if ($stran!=$stran2) { $stran=$stran2+1; } if ($strana>0) { if ($strana==$stran) { $nastranu=$pocet-($stran-1)*$nastranu; } } else { $strana=1; } $blemc=$nastranu*$strana; if ($blemc>$pocet) { $strana=$stran; } if ($strana>1) { $pocet=$pocet-($strana-1)*$nastranu; } for ($i = 1; $i <= $nastranu; $i++) { $soubor="guests/guest.$pocet"; readfile ($soubor); if ($pocet==1) { $i = $nastranu; } $pocet--; } echo ("Number of messages: $bla
"); echo ("
"); if ($stran>1) { echo ("
page of $stran
"); } else { echo (" "); } echo ("
Messages on page:
"); echo ("
"); readfile ("writeqb.html"); ?>