Просмотр файла download/new.php

Размер файла: 4.82Kb
<?php
#-----------------------------------------------------#
#          ********* WAP-MOTORS *********             #
#             Made by   :  VANTUZ                     #
#               E-mail  :  [email protected]         #
#                 Site  :  http://pizdec.ru           #
#             WAP-Site  :  http://visavi.net          #
#                  ICQ  :  36-44-66                   #
#  Вы не имеете право вносить изменения в код скрипта #
#-----------------------------------------------------#	
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";

echo '<img src="../images/img/partners.gif" alt=""> <b>Новые файлы</b><br><br>';

$dir = opendir ("."); 
while ($file = readdir ($dir)) {
if (is_dir($file)) {
if($file=="."||$file=="..") continue;
$a[]=$file;
}}  
closedir ($dir); 

$totaldir = count($a);

for ($i = 0; $i < $totaldir; $i++){
$dir = opendir ($a[$i]);
while ($file = readdir ($dir)) {
	
$filtime=filemtime ("$a[$i]/$file"); 
$filtime=$filtime+(3600*24*5); 

if($filtime>=$sitetime){	
if (( $file != ".")&&($file != "..")&&($file != ".htaccess")&&($file != "index.php")&&($file != "name.dat")&& !ereg (".txt$", "$file")&& !ereg (".JPG$", "$file")&& !ereg (".GIF$", "$file")) {

$downdir[]=$a[$i];
$downfile[]=$file;	
}
}} 
closedir ($dir);  
}

$total = count($downfile); 
if($total>0){
	
$start = (int)$_GET['start'];
if($start < 0 || $start > $total){$start = 0;}
if ($total < $start + $config_downlist){ $end = $total; }
else {$end = $start + $config_downlist; }
for ($d = $start; $d < $end; $d++){
	
	
$siz= formatsize(filesize("$downdir[$d]/$downfile[$d]")); 

echo'<div class=b>';

$filtime=filemtime ("$downdir[$d]/$downfile[$d]"); 
$filtime1=$filtime+(3600*24*1);
$filtime2=$filtime+(3600*24*3);

if($filtime1>=$sitetime){
echo '<img src="../images/img/new.gif" alt="">';}
elseif($filtime2>=$sitetime){
echo '<img src="../images/img/new1.gif" alt="">';}
else{
echo '<img src="../images/img/new2.gif" alt="">';}

echo ' <b><a href="down.php?action=ob&amp;did='.$downdir[$d].'&amp;fid='.$downfile[$d].'&amp;'.SID.'">'.$downfile[$d].'</a></b> ('.$siz.')</div><div>';

$te = file("../local/datadown/$downfile[$d].dat"); 
$u = explode("|",$te[0]);

$down_name=file_get_contents("$downdir[$d]/name.dat");

echo 'Категория: <a href="down.php?did='.$downdir[$d].'&amp;'.SID.'">'.$down_name.'</a><br>';
echo 'Cкачиваний: '.(int)$u[0].'<br>';

$filekomm = file("../local/datadown/$downfile[$d].dat");
$totalkomm = count($filekomm)-1;

echo'<a href="down.php?action=komm&amp;did='.$downdir[$d].'&amp;fid='.$downfile[$d].'&amp;'.SID.'">Комментарии</a> ('.(int)$totalkomm.')</div>';


}
}else{echo'<br><img src="../images/img/reload.gif" alt=""> <b>В течении 5-ти дней новых скриптов не было!</b><br>';}

echo'<hr>';
if ($start != 0) {echo '<a href="new.php?start='.($start - $config_downlist).'&amp;'.SID.'">&lt;-Назад</a> ';}else{echo'&lt;-Назад';}
echo ' | ';
if ($total > $start + $config_downlist) {echo ' <a href="new.php?start='.($start + $config_downlist).'&amp;'.SID.'">Далее-&gt;</a>';}else{echo'Далее-&gt;';}


if($total>0){

$ba=ceil($total/$config_downlist);
$ba2=$ba*$config_downlist-$config_downlist;

echo '<br><hr>Страницы:';
$asd=$start-($config_downlist*3);
$asd2=$start+($config_downlist*4);

if($asd<$total && $asd>0){echo ' <a href="new.php?start=0&amp;'.SID.'">1</a> ... ';}

for($i=$asd; $i<$asd2;){

if($i<$total && $i>=0){
$ii=floor(1+$i/$config_downlist);

if ($start==$i) {
echo ' <b>('.$ii.')</b>';
} else {
echo ' <a href="new.php?start='.$i.'&amp;'.SID.'">'.$ii.'</a>';
}}

$i=$i+$config_downlist;}
if($asd2<$total){echo ' ... <a href="new.php?start='.$ba2.'&amp;'.SID.'">'.$ba.'</a>';}
}



echo '<br><br><img src="../images/img/new.gif" alt=""> - Самая свежая загрузка<br>';
echo '<img src="../images/img/new1.gif" alt=""> - Более дня назад<br>';
echo '<img src="../images/img/new2.gif" alt=""> - Более 3 дней назад<br>';

echo '<br>Всего файлов: <b>'.(int)$total.'</b><br><br>';
echo '<img src="../images/img/panel.gif" alt=""> <a href="index.php?'.SID.'">К категориям</a><br>';
echo '<img src="../images/img/homepage.gif" alt=""> <a href="../index.php?'.SID.'">На главную</a>';
include_once"../themes/$config_themes/foot.php";
?>