View file birh.php

File size: 1.11Kb
<?
error_reporting(0);
session_start();
$title="Ссылка\n";
include ("header.php");
include ("func/aut.php");
echo $div["header"];
echo "<b>wmTRAF,cn</b><br/>";
echo $div["end"];
echo $div["ten"];
$n=$autorize['id'];
$file_name = "birka/$n.log"; //file with links
$sim=10; //how much links on page
if(!isset($_GET['p']))$p=0; else $p = $_GET['p'];
$file=file($file_name);
$all=count($file);
$obsum = $all - $p * $sim;
$nasum = $obsum - $sim;
$end='0';
echo "Дата || Откуда || Куда || Сколько || Тип<br/>";
for($i=$obsum; $i>$nasum; $i--)
{
if(!isset($file[$i])) {$end='1';} else {$file[$i]=str_replace("\n","<br/>",$file[$i]);
echo "$file[$i]";
$read.=$file[$i]; }
}
if($end=='1') $read.="<br/>";
$read=str_replace("&","&amp;",$read);//$read=iconv("Windows-1251", "UTF-8", $read); echo $read;
$echo .="---";
$echo .= '<br/><a href="'.$PHP_SELF.'?'.session_name().'='.session_id().'&amp;p='.($p+1).'&amp;id='.$n.'">След</a>';$echo .= ' ';
$echo .= '<br/><a href="'.$PHP_SELF.'?'.session_name().'='.session_id().'&amp;p='.($p-1).'&amp;id='.$n.'">Пред</a>';


echo $div["end"];
include ("footer.php");
?>