Просмотр файла zagruzki2_0/java/index.php

Размер файла: 2.32Kb
<?
//    TxtWAP v.1.2//
//        by mr.Magister//
//       for Либерти Crew//
//      wap: http://Lwap.Ru//
//e-mail: [email protected]//
//            icq: 230-363-915               //

include("../header.php");
include("../function_translit.php");   //подключаем транслит
$shop = file("../shop.TXT");
include("../config.php");                  //в конфиге-скока ссылок на странице
  //заголовки и всякая шняга


if (!isset($page)) {$page = 0;}
$total = 0;


if(!($dp = opendir("./"))) die ("Cannot open ./");
$file_array = array(); 
while ($file = readdir ($dp))
{
if(substr($file,0,1) != '.' and $file != "config.php" and $file != "index.php" and $file != "chitalka.php" and $file != "header.php")  //какие файлы не выводить на экран
{
$file_array[] =  $file;
}
}
$file_count = count ($file_array);
sort ($file_array);
$total_pages = ceil($file_count/$conf["items_per_page"]);//cкока всего страниц с округлением (ред. Маг)
$pageof = $page + 1;//так надо (ред. Маг)
?> 

<p mode="nowrap">
<small>
<? 
echo "$magazin";
if ($file_count > 0)
{
$first_record = $page * $conf["items_per_page"];
$last_record = $first_record + $conf["items_per_page"];

while (list($fileIndexValue, $file_name) = each ($file_array))
{

if (($fileIndexValue >= $first_record) AND ($fileIndexValue < $last_record))
{

                                $file_name_tr =  tsdecode($file_name);//юзаем транслит (прим. Мага)

echo "<a href=\"$file_name?translit=1\">$file_name_tr</a><br/>"; // заюзали :)
$total = $total + filesize($file_name);
}
}

if (($file_count > 0) AND ($last_record < $file_count))
{
// следующая страница
$next_page = $page + 1;
echo "<a href=\"".$_SERVER["PHP_SELF"]."?page=$next_page&amp;translit=1\">&#x0421;&#x043B;&#x0435;&#x0434;.</a>&nbsp;";
}

if (($file_count > 0) AND ($page != 0))
{
// предыдущая страница
$prev_page = $page -1;
echo "<a href=\"".$_SERVER["PHP_SELF"]."?page=$prev_page&amp;translit=1\">&#x041F;&#x0440;&#x0435;&#x0434;.</a>";
}




echo "<br/>&#x0412;&#x0441;&#x0435;&#x0433;&#x043E;:&nbsp;<b>$file_count</b><br/>";



}
closedir($dp);
?>
= <a href="../">&#x0432; &#x0440;&#x0430;&#x0437;&#x0434;&#x0435;&#x043B;</a><br/>
= <a href="/index.php">&#1053;&#1072; &#1075;&#1083;&#1072;&#1074;&#1085;&#1091;&#1102;</a><br/>
</small>

</p>
<? include("../footer.php"); ?>