Indexer
Auteur: Celerondude - 01 september 2004 - 15:03 - Gekeurd door: Dennisvb - Hits: 4366 - Aantal punten: 2.33 (3 stemmen)
Gewoon, een Indexer,
credits gaan naar Celeron Dude
Code:
<?php
error_reporting(E_ALL);
// begin config
$root='./'; // waar browsen. ./ betekent waar het script ook mag zijn
$rurl='./'; // url naar $root, ./ zal hetzelfde zijn
$burl='index.php?'; // basis url, de url om de indexer te accessen als je hem include in een ander script
$surl='index.php'; // absolute url ervan
$incl=0; // include je deze indexer in een andere pagina, 1 voor ja, 0 voor nee, dan laat hij de html tags enzo weg
$name='Directory Indexer v1.0'; // sitenaam, lijk me logisch
# css styles ######################################################
$css=<<<EOT
body,td{font-family:tahoma,verdana,arial;font-size:11px;line-height:15px;background-color:white;color:#666666;margin-left:20px;}
strong{font-size:12px;}
a:link{color:#0066CC;}
a:hover{color:#FF6600;}
a:visited{color:#003366;}
a:active{color:#9DCC00;}
table.itable{}
td.irows{height:20px;background:url("index.php?i=dots") repeat-x bottom}
EOT;
// einde config
function e($s){$p=strrpos($s,'.');return substr($s,$p+1,strlen($s));}
function s ($a,$c,$o='asc',$t=SORT_STRING){if(!isset($a[0][$c]))return $a;for ($i=0;$i<count($a);$i++)$temp[$i]=&$a[$i][$c];$o=($o=='asc')?SORT_ASC:SORT_DESC;array_multisort($temp,$o,$t,$a);return $a;}
if (isset($_GET['i']))
{
$i=trim ( $_GET['i'] );
$imgs['images']='R0lGODlhEAAQAPcAAP//////AP8A//8AAAD//wD/AAAA/wAAAPuBhP0RI7Crrr24vL25vn+CmJ6syZ6rxbfF4cbO3srO1oOk4WF4oo6fvpyuzqCvyqKxzKGwy6i30qa10KKxy6Oxy6Kwyb3M57G/2JyovqCswsTR6dDd9crW7NPe8tXg89Hb7uLs/uLr/Njh8eHp9wBe9YaZuYiauYeYtZWmw5mqxqCvyKi30KSyysXW8p+rvqu3ysPQ5tvo/eDr/dzm9uLs/OTt/Njg7eDn8+vy/gxn7Ku92LvO68TQ4uPu/t7p+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VpCgkBAQqkCJ4DJJRwUSp2SpwQqsWbdR2ft4YAy5+5i3Wm/47YBo3PpW+5oeQl0dnCBAxB8fRcWLHgDDYRuhl0Hin6OhwiSgF0KfBaFjw5rHxobExQVMEMGERIYNTQyMS9Ft0RBADs=';
$imgs['dots']='R0lGODlhAwABAJEAAAAAAP///2RkZP///yH5BAEAAAMALAAAAAADAAEAAAIC1FYAOw==';
if(isset($imgs[$i]))$d=&$imgs[$i];else$d=&$imgs['<x>'];
header('Content-type: image/gif');header('Content-Disposition: attachment; filename="'.$i.'"');print base64_decode($d);
}
else
{
ob_start('ob_gzhandler');
if(!$incl)print'<html><head><style type="text/css">'.$css.'</style></head><body>';
$sb=isset($_GET['s'])?$_GET['s']:0;
$so=isset($_GET['o'])?$_GET['o']:'asc';
$st=$sb==='s'||$sb==='m'?SORT_NUMERIC:SORT_STRING;
$d=isset($_GET['d'])?urldecode($_GET['d']):'';
$d=$d!==''&&$d!=='/'?trim($d,'/').'/':'';
$p=$root.$d;
$h=@opendir($p);
if(strstr($d,'../'))exit('Denied');
if(!$h)exit('Unable to open "'.$d.'". <a href="'.$burl.'">Go home.</a>');
$F=array();$D=array();
while(FALSE!==($f=readdir($h)))if($f[0]!=='.')if(is_dir($p.$f))$D[]=array('n'=>$f,'m'=>filemtime($p.$f),'s'=>filesize($p.$f),'t'=>'Directory');else$F[]=array('n'=>$f,'m'=>filemtime($p.$f),'t'=>e($f),'s'=>filesize($p.$f));
if($sb){$F=s($F,$sb,$so,$st);$D=s($D,$sb,$so,$st);}
print '<table class="itable" cellspacing="2"><tr><td colspan="5">';
print ($d!=='')?"<a href=\"$burl\"><strong>$name</strong></a> / ":"<strong>$name</strong> ";
if($d!==''){$t=explode('/',trim($d,'/'));for($i=0,$r=array(),$z='';($r[]=@$t[$i]),$z=@$t[$i];$i++) { print(implode('/',$r)!==trim($d,'/'))? ('<a href="'.$burl.'d='.implode('%2F',$r).'"><strong>'.$z.'</strong></a> / ' ):"<strong>$z</strong>";}}
$f=trim($d,'/');
print '</td></tr><tr><td class="irows"> </td>'
.'<td class="irows"><a href="'.$burl.'s=n&o='.($so=='asc'?'dsc':'asc').'&d='.urlencode($f).'">Name</a></td>'
.'<td class="irows"><a href="'.$burl.'s=s&o='.($so=='asc'?'dsc':'asc').'&d='.urlencode($f).'">Size</a></td>'
.'<td class="irows"><a href="'.$burl.'s=t&o='.($so=='asc'?'dsc':'asc').'&d='.urlencode($f).'">Type</a></td>'
.'<td class="irows" nowrap="nowrap"><a href="'.$burl.'s=m&o='.($so=='asc'?'dsc':'asc').'&d='.urlencode($f).'">Modified</a></td>';
for($i=0,$c='';($c=@$D[$i++]);){print '<tr><td><img src="'.$surl.'?i=dir" alt="'.$c['n'].'"/></td><td><a href="'.$burl.'d='.urlencode($d.$c['n']).'">'.$c['n'].'</td><td> </td><td> </td><td>'.date('m/d/Y h:i A',$c['m']).'</td></tr>';}
for($i=0,$c='';($c=@$F[$i++]);){print '<tr><td><img src="'.$surl.'?i='.$c['t'].'" alt="'.$c['n'].'"/></td><td><a href="'.$rurl.$d.$c['n'].'">'.$c['n'].'</td><td>'.number_format($c['s']/1024,1).'KB</td><td>'.$c['t'].'</td><td>'.date('m/d/Y h:i A',$c['m']).'</td></tr>';}
print '<tr><td colspan="5" class="irows" style="text-align:center;background-position:top;">Directory indexer by <a href="http://celerondude.com">CeleronDude</a></td></tr></table>';
if(!$incl)print'</body></html>';
}
?>
<?php
// begin config
$root = './' ; // waar browsen. ./ betekent waar het script ook mag zijn
$rurl = './' ; // url naar $root, ./ zal hetzelfde zijn
$burl = 'index.php?' ; // basis url, de url om de indexer te accessen als je hem include in een ander script
$surl = 'index.php' ; // absolute url ervan
$incl = 0 ; // include je deze indexer in een andere pagina, 1 voor ja, 0 voor nee, dan laat hij de html tags enzo weg
$name = 'Directory Indexer v1.0' ; // sitenaam, lijk me logisch
# css styles ######################################################
$css = <<<EOT
body,td{font-family:tahoma,verdana,arial;font-size:11px;line-height:15px;background-color:white;color:#666666;margin-left:20px;}
strong{font-size:12px;}
a:link{color:#0066CC;}
a:hover{color:#FF6600;}
a:visited{color:#003366;}
a:active{color:#9DCC00;}
table.itable{}
td.irows{height:20px;background:url("index.php?i=dots") repeat-x bottom}
EOT ;
// einde config
function s
( $a , $c , $o = 'asc' , $t = SORT_STRING
) { if ( ! isset ( $a [ 0 ] [ $c ] ) ) return $a ; for
( $i = 0 ; $i < count
( $a ) ; $i ++ ) $temp [ $i ] =& $a [ $i ] [ $c ] ; $o = ( $o == 'asc' ) ?SORT_ASC
: SORT_DESC
; array_multisort
( $temp , $o , $t , $a ) ; return
$a ; } {
$imgs [ 'images' ] = 'R0lGODlhEAAQAPcAAP//////AP8A//8AAAD//wD/AAAA/wAAAPuBhP0RI7Crrr24vL25vn+CmJ6syZ6rxbfF4cbO3srO1oOk4WF4oo6fvpyuzqCvyqKxzKGwy6i30qa10KKxy6Oxy6Kwyb3M57G/2JyovqCswsTR6dDd9crW7NPe8tXg89Hb7uLs/uLr/Njh8eHp9wBe9YaZuYiauYeYtZWmw5mqxqCvyKi30KSyysXW8p+rvqu3ysPQ5tvo/eDr/dzm9uLs/OTt/Njg7eDn8+vy/gxn7Ku92LvO68TQ4uPu/t7p+c/Y5tXe7Nfg7cvb8ejw++vw9+fs87LD2OHu/lem/vH3/lSp/uTx/vP5/snj9+33/qGoqPz+/v3+/lXSYAC1AH3GdS6qHnDIW1OmL+Hp173JqoGaKby9srurRv3slf7dbf7cc/7Xb/7QZ/3SdP7FVd6wUP7LaP6/SP68SeS7cv6vMP62QNycN+CoTN2nTfvt1fueGf6qL/6vN/6xOf65V+C/jP2XEv6eGvmeH/6gI/6iJOCSKM+WR9OZSvjEff6ZG8mCKrB/RNifWv2EAPeAAf6IAuR5BP6JCP6QEMuMSNKTTeC7kbBhEKxdEL9rFqlfFa5iGMR0I45aJsuQVNikcNuugNG8pvLk1v17AO1zAKlUBq5XCL5kE7NiFqBdHplZHrVuLr97PcB/Q690PbF9T9CYY9KujN25l6NJAJtK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( 'Content-type: image/gif' ) ; header
( 'Content-Disposition: attachment; filename="' . $i . '"' ) ; print
base64_decode ( $d ) ; }
else
{
if ( ! $incl ) print '<html><head><style type="text/css">' . $css . '</style></head><body>' ; $sb = isset ( $_GET [ 's' ] ) ?
$_GET [ 's' ] : 0 ; $so = isset ( $_GET [ 'o' ] ) ?
$_GET [ 'o' ] : 'asc' ; $st = $sb === 's' || $sb === 'm' ?SORT_NUMERIC: SORT_STRING;
$d = $d !== '' && $d !== '/' ?
trim ( $d , '/' ) . '/' : '' ; $p = $root . $d ;
if ( ! $h ) exit ( 'Unable to open "' . $d . '". <a href="' . $burl . '">Go home.</a>' ) ; while ( FALSE !== ( $f = readdir ( $h ) ) ) if ( $f [ 0 ] !== '.' ) if ( is_dir ( $p . $f ) ) $D [ ] = array ( 'n' => $f , 'm' => filemtime
( $p . $f ) , 's' => filesize
( $p . $f ) , 't' => 'Directory' ) ; else
$F [ ] = array ( 'n' => $f , 'm' => filemtime
( $p . $f ) , 't' => e
( $f ) , 's' => filesize
( $p . $f ) ) ; if ( $sb ) { $F = s( $F , $sb , $so , $st ) ; $D = s( $D , $sb , $so , $st ) ; }
print '<table class="itable" cellspacing="2"><tr><td colspan="5">' ; print ( $d !== '' ) ?
"<a href=\" $burl \" ><strong>$name </strong></a> / " : "<strong>$name </strong> " ; if ( $d !== '' ) { $t = explode ( '/' , trim ( $d , '/' ) ) ; for
( $i = 0 , $r = array ( ) , $z = '' ; ( $r [ ] =@ $t [ $i ] ) , $z =@ $t [ $i ] ; $i ++ ) { print ( implode ( '/' , $r ) !== trim ( $d , '/' ) ) ?
( '<a href="' . $burl . 'd=' . implode ( '%2F' , $r ) . '"><strong>' . $z . '</strong></a> / ' ) : "<strong>$z </strong>" ; } } print '</td></tr><tr><td class="irows"> </td>' . '<td class="irows"><a href="' . $burl . 's=n&o=' . ( $so == 'asc' ?
'dsc' : 'asc' ) . '&d=' . urlencode ( $f ) . '">Name</a></td>' . '<td class="irows"><a href="' . $burl . 's=s&o=' . ( $so == 'asc' ?
'dsc' : 'asc' ) . '&d=' . urlencode ( $f ) . '">Size</a></td>' . '<td class="irows"><a href="' . $burl . 's=t&o=' . ( $so == 'asc' ?
'dsc' : 'asc' ) . '&d=' . urlencode ( $f ) . '">Type</a></td>' . '<td class="irows" nowrap="nowrap"><a href="' . $burl . 's=m&o=' . ( $so == 'asc' ?
'dsc' : 'asc' ) . '&d=' . urlencode ( $f ) . '">Modified</a></td>' ; for ( $i = 0 , $c = '' ; ( $c =@ $D [ $i ++ ] ) ; ) { print '<tr><td><img src="' . $surl . '?i=dir" alt="' . $c [ 'n' ] . '"/></td><td><a href="' . $burl . 'd=' . urlencode ( $d . $c [ 'n' ] ) . '">' . $c [ 'n' ] . '</td><td> </td><td> </td><td>' . date ( 'm/d/Y h:i A' , $c [ 'm' ] ) . '</td></tr>' ; } for ( $i = 0 , $c = '' ; ( $c =@ $F [ $i ++ ] ) ; ) { print '<tr><td><img src="' . $surl . '?i=' . $c [ 't' ] . '" alt="' . $c [ 'n' ] . '"/></td><td><a href="' . $rurl . $d . $c [ 'n' ] . '">' . $c [ 'n' ] . '</td><td>' . number_format ( $c [ 's' ] / 1024 , 1 ) . 'KB</td><td>' . $c [ 't' ] . '</td><td>' . date ( 'm/d/Y h:i A' , $c [ 'm' ] ) . '</td></tr>' ; } print '<tr><td colspan="5" class="irows" style="text-align:center;background-position:top;">Directory indexer by <a href="http://celerondude.com">CeleronDude</a></td></tr></table>' ; if ( ! $incl ) print '</body></html>' ; }
?>
Download code (.txt)
Stemmen
Niet ingelogd.