View file Autoindex ffmpeg/index.php

File size: 5.88Kb
<?php
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")."GMT");
$mt=microtime(1);
include('setup.php');
include('func.php');
if($zip)
{include('zip.php');}
$p=intval(@$_GET['p']);
$sort=intval(@$_GET['sort']);
if($sort>1 or $sort<0)
$sort=1;
$p=1;
$dir=htmlspecialchars((@$_GET['dir']));
while(substr($dir,0,1)=='/')
$dir=substr($dir,1,strlen($dir));
if(strstr($dir,'..') or !is_dir('load/'.$dir)or strstr($dir,'http://') or strstr($dir,'ftp://'))
$dir='';
else
{
ob_start();
}
header('Content-type:text/html; charset=utf-8');
echo '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>';
echo '<meta http-equiv="Content-Type" content="text/html; charset=utf-8">';
echo "<link rel='shortcut icon' href='/ico.ico'>";

echo "<title>$sites</title>";
echo'<link rel="stylesheet" href="./style.css" type="text/css"/>
</head><body>';
echo "<div class='copy'><center><b>$djkang</b></center></div>";
echo "<div class='mes'>";
if(!$dir)
{print '';}
else
{
$dir_exp=explode('/',$dir);
print '<div class="mes">'.transdir($dir_exp[count($dir_exp)-1]).'</div>';
}
echo "</div>";
echo "</div><div class='in'><div class='menu1'><div class='text'>";
$glob_dir=glob('load/'.$dir.'/*',GLOB_ONLYDIR);
if($glob_dir)
include("ads/ad1.php");
print '<br>';
include("ads/ad2.php");
print'<hr>';
{
$count=count($glob_dir);
$countstr=ceil($count/$dirstr);
$page=intval(@$_GET['page']);
if($sort)
usort($glob_dir, 'sortnew');
$start = $page * $dirstr;
if($start>=$count or $start<0)
$start=0;
$end = $start + $dirstr;
if($end>=$count)
$end = $count;
for($i=$start; $i<$end; $i++)
{
$dirt=str_replace('load/','',$glob_dir[$i]);
$dir_exp=explode('/',$dirt);
$count=countf($dirt);
if($p and file_exists('load'.$dirt.'/folder.gif'))
$ico= '<img src="load'.$dirt.'/folder.gif" width="50" height="70" alt="" />'; 
else $ico= '<img src="ext/nav.png" alt="">';
if($p and file_exists('load/'.$dirt.'/folder.gif'))
$ico= '<img src="load/'.$dirt.'/folder.gif" width="50" height="70" alt="" />'; 
else $ico= '<img src="ext/nav.gif" alt="">';
print $ico.'<a href="index.php?dir='.$dirt.'">'.transdir($dir_exp[count($dir_exp)-1]).'</a><br />';
}
}
include("ads/ad3.php");
print '<hr>';
$glob_file=glob('load/'.$dir.'/*.{'.$allfile.'}',GLOB_BRACE);
if($glob_file)
{
if($sort)
usort($glob_file, 'sortnew');
$count=count($glob_file);
$countstr=ceil($count/$filestr);
$page=intval(@$_GET['page']);
$start = $page * $filestr;
if($start>=$count or $start<0)
$start=0;
$end = $start + $filestr;
if($end>=$count)
$end = $count;
for($i=$start; $i<$end; $i++)
{
$name=translit($glob_file[$i]);
$filesize=filesize($glob_file[$i]);
if($filesize>1024)
$filesize=round($filesize/1024, 2).' Kb';
else
$filesize.=' b';
if(r($glob_file[$i])=='jar') $dthumb= '<img src="ext/jar.gif" alt="">';
if(r($glob_file[$i])=='3gp') $dthumb= '<img src="ext/3gp.gif" alt="">';
if(r($glob_file[$i])=='mp4') $dthumb= '<img src="ext/mp4.gif" alt="">';
if(r($glob_file[$i])=='zip') $dthumb= '<img src="ext/zip.gif" alt="">';
if(r($glob_file[$i])=='sis') $dthumb= '<img src="ext/sis.gif" alt="">';
if(r($glob_file[$i])=='sisx') $dthumb= '<img src="ext/sisx.gif" alt="">';
if(r($glob_file[$i])=='apk') $dthumb= '<img src="ext/apk.gif" alt="">';
if(r($glob_file[$i])=='nth') $dthumb= '<img src="ext/nth.gif" alt="">';
if(r($glob_file[$i])=='thm') $dthumb= '<img src="ext/thm.gif" alt="">';
if(r($glob_file[$i])=='mp3') $dthumb= '<img src="ext/mp3.gif" alt="">';
if(r($glob_file[$i])=='wav') $dthumb= '<img src="ext/wav.gif" alt="">';
if(r($glob_file[$i])=='mid') $dthumb= '<img src="ext/mid.gif" alt="">';
if(r($glob_file[$i])=='exe') $dthumb= '<img src="ext/exe.gif" alt="">';

$basename=basename($glob_file[$i]);
if((r($glob_file[$i])=='jpg' or r($glob_file[$i])=='gif' or r($glob_file[$i])=='png') and $p)
$thumb= '<img src="pic.php?file='.$glob_file[$i].'" alt="" /><br />';
if((r($glob_file[$i])=='3gp' or r($glob_file[$i])=='mp4' or r($glob_file[$i])=='avi') and $p)
$thumb= '<img src="pre.php?file='.$glob_file[$i].'" alt="" /><br />';

if((r($glob_file[$i])=='nth' or r($glob_file[$i])=='thm') and $p)

$thumb= '<img src="theme.php?file='.$glob_file[$i].'" alt="" /><br />';

if($p and file_exists('skrin/'.$basename.'.gif'))
{
$thumb= '<img src="pic.php?file=skrin/'.$basename.'.gif" alt="" /><br />';
else $thumb=$dthumb;
}
elseif($p and file_exists('skrin/'.$basename.'.jpg'))
{
print '<img src="pic.php?file=skrin/'.$basename.'.jpg" alt="" /><br />';
}
elseif($p and file_exists('skrin/'.$basename.'.png'))
{
print '<img src="pic.php?file=skrin/'.$basename.'.png" alt="" /><br />';
}

print $thumb.'<a href="file.php?p='.$p.'&amp;file='.$glob_file[$i].'">'.$name.'</a> ['.$filesize.']<br />';
echo "<hr/>";
$dirkomm=str_replace('/', 'D', str_replace('.', 'T', $glob_file[$i]));
if(!file_exists('komm/'.$dirkomm))
$countkomm=0;
else
$countkomm=count(file('komm/'.$dirkomm));
}
}
if($countstr>1)
{
print nav_page($countstr,$page,$dir,$p,$sort,'index');
}
echo "</div>";
$dir_exp=explode('/',$dir);
if($dir)
print '<div class="kin"><div style="text-align: left"><b>Back to:</b>
<b>|</b>';
if(($countj=count(explode('/',$dir)))>1)
{
$j=explode('/',$dir);
for($i=0; $i<=$countj; $i++)
{
$u=@$j[count($j)-2];
if($u)
{
unset($j[count($j)-1]);
$g[$i]= '<a href="index.php?dir='.join('/', $j).'">'.transdir($u).'</a><b>|</b></div>';
}
}
for($i=count(@$g)-1; $i>=0; $i--)
print $g[$i];
print '';
}
if($zip)
{include('zipf.php');}
echo "</div>";
echo "<div class='mes'><div class='mes'><img src='home.gif' alt=''/> <a href='$cs'>Home</a><br/></div></div><center>";
print '<br>';
include('banner.php');
echo "<div class='copy'>&copy; $c</div></a>
</center></body></html>";
?>
<div class="mes"><center>
<?php
echo "Crazy fun 4m";
 include("./online.php");
 ?></center>