<?
$mistake=0;
if($folder)
{
if(!setcookie("ordner",$folder,time()+(3600*24*31*12)))$mistake=1;
}
?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Explorer</title>
<meta http-equiv="expires" content="0">
<meta http-EQUIV="pragma" content="no-cache">
<style type="text/css">
BODY,P,TD,body,p,td { font-family:Verdana,Verdana,Verdana; font-size:9pt; }
A:link { TEXT-DECORATION:none }
A:visited { TEXT-DECORATION:none }
A:active { TEXT-DECORATION:none }
A:hover { COLOR: #de0000;TEXT-DECORATION:none }
</style>
</head>
<BODY vLink="#0000FF" aLink="#ff0000" link="#0000FF" bgColor="#E8E8E8" text="#000000"> <br>
<table align="center" width="600" border="0" cellpadding="4" cellspacing="1">
<?
if($mistake==1)print "<tr><td colspan=3><u>Hinweis:</u><br>-> Ihr Brwoser unterstützt keine Cookies. Bitte aktivieren Sie diese !</td></tr>";
$filter=array("html","gif","jpg");
$strSelFolder = stripslashes($folder);
if($strSelFolder=='') {
$strSelFolder="/";
}
echo "<p>Aktueller Pfad: <b>$strSelFolder</b></p>";
chdir($strSelFolder);
$cdir=dir($strSelFolder);
while($entry=$cdir->read())
{
if(!ereg("^.$",$entry))
{
if(is_dir($entry))
{
echo "<tr>\n";
echo "<td colspan=3 bgcolor=\"#ffffff\">\n";
echo "<img src=\"folder.gif\" alt=\"folder\" title=\"folder\"> <a href=\"tree.php3?folder=";
if(ereg("^..$",$entry))
{
echo urlencode(substr($strSelFolder,0,strrpos($strSelFolder,"/")));
}
else
{
echo urlencode($strSelFolder);
strlen($strSelFolder)==1 ? $sep="":$sep="/";
echo $sep;
echo urlencode($entry);
}
echo "\">$entry</a><br>";
echo "</td>\n";
echo "</tr>\n";
}
}
}
$cdir->rewind();
while($entry=$cdir->read())
{
if(!is_dir($entry))
{
$tmp=split("[.]",$entry);
for($i=0;$i<count($filter);$i++)
{
if($filter[$i]==$tmp[1])
{
echo "<tr>\n";
echo "<td bgcolor=\"#ffffff\"><img src=\"file.gif\" alt=\"file\" title=\"file\"> $entry</td>\n";
echo "<td bgcolor=\"#ffffff\" align=\"right\">".filesize($entry)." Byte</td>\n";
echo "<td bgcolor=\"#ffffff\">".date("D, j F Y, H:i:s",filemtime($entry))."</td>\n";
echo "</tr>\n";
break;
}
}
}
}
?>
<tr>
<td align="right" colspan=3>Filter:
<?
for($i=0;$i<count($filter);$i++)
{
print $filter[$i];
if($i!=count($filter)-1)print ", ";
}
?>
</td>
</tr>
</table>
</body>
</html>