Просмотр файла who.php

Размер файла: 1.1Kb
<?


include"header.php";



print '<div class="ten">В гостевой:</div>';

$xfile = @file("besucher.txt");
$xfile = array_reverse($xfile);
$p = 150;

if ($npage == ""){$npage = "1";}
$first = count($xfile) - ($p * ($npage - 1));
$second = count($xfile) - ($p * $npage) + 1;
if ($second < 1) {$second = 1;}
$npages = (int)(count($xfile) / $p);
if ($news_limiter>((int) ($npages*$p))) $npages = $npages+1;
if ($npage <= $npages and $npage>1) $gline_rew = "<a href=\"guest.php?npage=".($npage-1)."\">prev</a>";
if ($npages > 1 and $npage<$npages) $gline_next = "<a href=\"guest.php?npage=".($npage+1)."\">next</a>";
$line = "";

for ($p = 1; $p <= $npages; $p++) {
if ($p != $npage) { $line .= "<a href=\"guest.php?npage=$p\"> $p </a>|";}
if ($p == $npage) { $line .= "| $p |<br/>"; }
}

print $line;

for ($i = $first-1; $i >= $second-1; $i--) {
$ii = $i;
$ii++;
$udata = explode("&&",$xfile[$i]);
print "$udata[1]<br/>";
}

print $gline_rew."".$gline_next."
";print'<div class="ten">
<a href="/index.php">&#169;MOBCITY.ORG.RU</a></div>
</body>
</html>';

?>