http://www.wcm.at/vb2/showthread.php?threadid=99146
is zwar grafisch ned so ansprechend wie deins aber es funkt
hier no die volle index seite, dass du dir nix zammbasteln musst
PHP-Code:
<html>
<head>
<?php
include "config.php"; /* Hohlt Versions Daten */
?>
<title>- Image Script <?php echo $version; /* Gibt Version im Title aus */?> </title>
</head>
<body>
<p align="center">Image Script <?php echo $version; /* Gibt Version aus */?></p>
<p align="center"></p>
<?php
echo"
<table width=800 border=0 align=center>
<tr>
";
$counter=0;
$dp = opendir($path);
while ($file = readdir($dp))
{
$counter++;
if (!preg_match('/^\.{1,2}/', $file))
{
echo "
<td>
<div align=\"center\">
<a href=\"bildausgabe.php?pic="
. $file /* übergibt name als teil der Url */
. "\"" . /* " , onMouseOver=\"{window.status='Vollbild & Informationen zu " . $file . "'; return true;}\" */ ">
<img src=\"img/" . $file . "\" width=\"80\" height=\"60\" border=\"0\">
"
. $file
. "
</div>
</td>
";
if( $counter % 3 == 2 )
{
echo "</tr>\n";
}
}
}
closedir($dp);
echo"
</tr>
</table>
";
?>
</p>
</p>
<table width="25%" border="1" align="center" cellpadding="1" cellspacing="1">
<tr>
<td>Pfad:</td>
<td><?php echo $path; ?></td>
</tr>
<tr>
<td>Bilder:</td>
<td><?php echo $counter-2;?></td>
</tr>
<tr>
<td>Ordnergröße:</td>
<td>
<?PHP
function dirsize($dir) {
$dh = opendir($dir);
$size = 0;
while (($file = readdir($dh)) !== false)
if ($file != "." && $file != "..") {
$path = $dir."/".$file;
if (is_dir($path))
$size += dirsize($path);
elseif (is_file($path))
$size += filesize($path);
}
closedir($dh);
return $size;
}
$totalsize = round((dirsize($path) / 1048576), 2);
echo number_format($totalsize, 1, ',', ' ') . " MB";
?>
</td>
</tr>
<tr>
<td>Servergröße:</td>
<td>
<?php
$dfc = round((disk_free_space("i:") / 1048576), 2);
echo number_format($dfc, 1, ',', ' ') . " MB";
?>
</td>
</tr>
</table>
</body>
</html>