Will bei mir im Forum einen Dateiupload machen wo Leute Bilder und Dateien in ein bestimmtes Verzeichnis hochladen können.
Meine Frage ist ob man in ein Thema das vollende script einstellen kann damit die Daten direkt angezeigt werden ohne diese noch erneut zu verknüpfen.
Oder gibt es eine andere Möglichkeit.
Code: Alles auswählen
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Dateiliste</title>
<style type="text/css">
.farbe1{
background-color: #F5F5F5;
}
.farbe2{
background-color: #E5E5E5;
}
.klein{
font-family: Tahoma;
font-size: 11px;
width: 90px;
text-align: center;
padding:0px;
}
</style>
</head>
<body>
<div align=center>
<?php
// Dateiliste-Script von Homepage-Total.de
// Hier Bitte das Passwort ändern
$pw="";
if(@$_POST["inputpw"]!=$pw){
echo "<form action=\"?\" method=\"post\">";
echo "<p>Passwort: <input type=\"password\" name=\"inputpw\"> (passwort) ";
echo "<input type=\"submit\" value=\"login\"></form>";
}
else {
?>
<table width="420" cellPadding="4" cellSpacing="1" style="background-color: #D5D5D5;">
<tr>
<td>
<b>Ordner - Inhalt</b> - <small>Anzeigen durch anklicken!</small>
</td>
</tr>
<tr>
<td class=farbe1>
<table border="0" width="100%" cellPadding="2" cellSpacing="1" style="background-color: #000000;">
<tr>
<th width="1%" class=farbe2>#</th>
<th class=farbe1>Dateiname</td>
<th class=farbe2>Änderung</th>
<th width="1%" class=farbe1>Bytes</th>
</tr>
<?php
// Dateinamen werden eingelesen und in einer Tabelle mit Link angezeigt
$verz=opendir ("verzeichnis/");
$i = 1;
$byte = 0;
while ($file = readdir($verz)) {
$datei = "verzeichnis/".$file;
$aa = filesize($datei);
$byte = $byte + $aa;
$zeit = filemtime($datei);
if($file != "." && $file != "..") {
echo "<tr><th class=farbe2>" . $i . "</th>";
echo "<td class=farbe1> <a href=\"verzeichnis/" . $file . "\" target=\"_blank\">" . $file . "</a> </td>";
echo "<td class=\"klein farbe2\"> " . gmdate("d.m.y H:i", $zeit) . " </td>";
echo "<td class=farbe1> $aa </td></tr>\n";
$i++;
}
}
closedir($verz);
?>
</table>
</td>
</tr>
<tr>
<td style="text-align: right;">
<?php
// Speicherplatz Info wird ausgegeben
echo "Gesamt: $byte Bytes = <b>". round($byte / 1024 ,2)."</b> KB";
?>
</td>
</tr>
</table>
<?php
}
?>
</div>
</body>
</html>
Kann mir da einer Helfen??
Gruß
Schrainer