Просмотр файла zagruzki2_0/poly/WAV/Raznxe/index.php

Размер файла: 3.27Kb
<?
	
	if((@$src)and(@$nw)and(@$nh))// если заданы все характеристики по ссылке
{
$dl=strlen($src);
$list=substr($src,$dl-3,3);
 if($list=="jpg")// если jpg графика
  {
  $tip=100; // сжатие JPG
  $imold=imageCreateFromJPEG($src);
  $size=getImageSize($src);
  $ow=$size[0];
  $oh=$size[1];
  $image=imageCreate($nw,$nh);
  ImageCopyresized($image,$imold,0,0,0,0,$nw,$nh,$ow,$oh);
  header("Content-type: image/jpg");
  imagejpeg($image,"",$tip);
  }
  if($list=="gif")// если gif графика
     {
	 $imold=imageCreateFromGIF($src);
     $size=getImageSize($src);
     $ow=$size[0];
     $oh=$size[1];
     $image=imageCreate($nw,$nh);
     ImageCopyresized($image,$imold,0,0,0,0,$nw,$nh,$ow,$oh);
     header("Content-type: image/gif");
     imagegif($image);
	 }
	 if($list=="png")// если png графика
         {
	     $imold=imageCreateFromPNG($src);
         $size=getImageSize($src);
         $ow=$size[0];
         $oh=$size[1];
         $image=imageCreate($nw,$nh);
         ImageCopyresized($image,$imold,0,0,0,0,$nw,$nh,$ow,$oh);
         header("Content-type: image/png");
         imagePNG($image);
	     }
}

include("../../../header.php");
$shop = file("../../../shop.TXT");
include("../../../config.php");
include("../../../function_translit.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 != "index.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;//так надо (ред. Маг)
?> 
<onevent type="onenterforward"><refresh><setvar name="p" value=""/></refresh></onevent>  
<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))
{
$translit_file = tsdecode($file_name);//делаем транслит (прим. Мага)


echo "<a href=\"$file_name\">$translit_file</a> (". round(filesize($file_name)/1024,1) . "kb)<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=$translit\">&#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=$translit\">&#x041F;&#x0440;&#x0435;&#x0434;.</a>";
}




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



}
closedir($dp);
?>
= <a href="../?translit=1">&#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>

<? echo $banners; //вставляем баннеры и др. из конфига ?> 

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