Просмотр файла bw_download_0.2/downloads/index.php

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

$surl = 'http://cx65-75.iplot.ru'; // Ссылка на главную страницу

$r = '---<br/>'; // Разделитель

Header('Content-type:application/xhtml+xml;charset=UTF-8');Header('Cache-Control: no-cache, must-revalidate');

@$folder=$_GET['dir'];
@$n=$_GET['n'];
if($n=='') $n=0;

$zag='Загрузки!'; // Загаловок вашего раздела с загрузками

print '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=utf-8"><title>'.$zag.'</title></head><body><p align="left" mode="nowrap"><small>';

print '<a href="http://www.waptrader.ru/click.php?1976">Бесплатные загрузки</a><br/>
<a href="http://click.realsex.in/in.php?s=badwhite">Бесплатная эротика</a><br/>';

print "$r";

$tsize=0;
$cnt=0;
$ns=0;
if($folder)
  {
if(strstr($folder,'..'))
die('</small></body></html>');
$dir=opendir($folder);
}
else
$dir=opendir('.');
while($file=readdir($dir))
{
if($file!='.' and $file!='..' and $file!='.htaccess' and $file!='index.php' and $file!='online.dat' and $file!='file')
{
if($cnt<$n)
{
$cnt++;
continue;
}
if($ns<10)
{
if($folder and strpos($file,'-'))

$fname=strstr($file,'-');
else
$fname=$file;
$fname=strtr($fname,array('x'=>'*','_'=>' ','A'=>'А','B'=>'Б','V'=>'В','G'=>'Г','D'=>'Д','E'=>'Е','YO'=>'Ё','Yo'=>'Ё','ZH'=>'Ж','Zh'=>'Ж','Z'=>'З','I'=>'И','J'=>'Й','K'=>'К','L'=>'Л','M'=>'М','N'=>'Н','O'=>'О','P'=>'П','R'=>'Р','S'=>'С','T'=>'Т','U'=>'У','F'=>'Ф','H'=>'Х','C'=>'Ц','CH'=>'Ч','Ch'=>'Ч','Sh'=>'Ш','SH'=>'Ш','W'=>'В','Q'=>'Ь','Y'=>'Ы','YE'=>'Э','Ye'=>'Э','YU'=>'Ю','Yu'=>'Ю','Ya'=>'Я','YA'=>'Я','a'=>'а','b'=>'б','v'=>'в','g'=>'г','d'=>'д','e'=>'е','yo'=>'ё','zh'=>'ж','z'=>'з','i'=>'и','j'=>'й','k'=>'к','l'=>'л','m'=>'м','n'=>'н','o'=>'о','p'=>'п','r'=>'р','s'=>'с','t'=>'т','u'=>'у','f'=>'ф','h'=>'х','c'=>'ц','ch'=>'ч','sh'=>'ш','w'=>'в','q'=>'ь','y'=>'ы','ye'=>'э','yu'=>'ю','ya'=>'я'));
if($folder)
{
$str=filesize($folder.'/'.$file);
$file=$folder.'/'.$file;
}
else
$str=filesize($file);
$size=round($str/1024,1);
if(strpos($file,'.'))
{
$fname=strtok($fname,'.');
print '<img src="file/file.png" localsrc="59" alt=""/><a href="'.$file.'">'.$fname.'</a> ['.$size.'kB]<br/>';
$ns++;
$tsize=$tsize+$str;
}
else
{
print '<img src="file/dir.gif" alt=""/><a href="?dir='.$file.'">'.$fname.'</a><br />';
$ns++;
}
}
$cnt++;
}
}
closedir($dir);
if(!$ns<10 and $ns+$n!=$cnt)
print '<a href="index.php?dir='.$folder.'&amp;n='.($ns+$n).'">Далее&#187;</a><br />';
if($n!=0)
print '<a href="index.php?dir='.$folder.'&amp;n='.($n-10).'">&#171;Назад</a><br/>';
print "$r";
$tsize=round($tsize/1024,1);
$stran=round($cnt/10);
if(($cnt-$stran*10)>0) $stran++;
print 'Cтpaницa '.(($n+10)/10).' из '.$stran.'<br/>';
$data = 'online.dat';
function online($show=""){global $data;
$time=time();
$past_time=time()-300;$readdata=@fopen($data,"r") or die("Ошибка!");$data_array=file($data);@fclose($readdata);if (getenv('HTTP_X_FORWARDED_FOR'))$user = getenv('HTTP_X_FORWARDED_FOR');else
$user = getenv('REMOTE_ADDR');$agent = getenv('HTTP_USER_AGENT');$d=count($data_array);for($i=0;$i<$d;$i++){list($live_agent,$live_user,$last_time)=explode("::","$data_array[$i]");if($live_user!=""&&$last_time!=""&&$live_agent!=""):if($last_time<$past_time):
$live_user="";
$last_time="";$live_agent="";endif;if($live_user!=""&&$last_time!=""&&$live_agent!=""){if($user==$live_user&&$agent==$live_agent){$online_array[]="$agent::$user::$time\r\n";}
else
$online_array[]="$live_agent::$live_user::$last_time";
}
endif;
}if(isset($online_array)):foreach($online_array as $i=>$str)
{if($str=="$agent::$user::$time\r\n")
{
$ok=$i;
break;
}
}foreach($online_array as $j=>$str){if($ok==$j) { $online_array[$ok]="$agent::$user::$time\r\n"; break;}}endif;$writedata=@fopen($data,"w") or die("Ошибка!");@flock($writedata,2);if($online_array=="") $online_array[]="$agent::$user::$time\r\n";
foreach($online_array as $str)fputs($writedata,"$str");@flock($writedata,3);
@fclose($writedata);$readdata=@fopen($data,"r") or die("Ошибка!");
$data_array=@file($data);@fclose($readdata);$online=count($data_array);
if($show!="")
return $online;
}
print 'На сайте: <b>'.online(1).'</b> чел.<br>';
print "$r";
if($folder)
print '<a href="index.php">Начало</a><br/>';
else
print '<a href="..">Начало</a><br/>';
print '<a href="'.$surl.'">На главную</a><br/>';
print "$r";
print 'by <a href="http://b-w.wen.ru"><b>BAD-WHITE</b></a><br/>';

print "$r";
print '<a href="http://banners.su/click.php?id=31751"><img src="http://banners.su/banner.php?id=31751" alt="banners.su"/></a><br/><a href="http://top.mobixi.ru/in.php?id=1219"><img  src="http://top.mobixi.ru/count.php?id=1219&view=lite" alt="IxI-Top"/></a><br/><a href="http://mabilkin.ru/rating/html/index.php?id=10"><img src="http://mabilkin.ru/rating/image.php?id=10" alt="MaBiLKiN"/></a><br/>';


print '</small></body></html>';

?>