PHP-Code:
<?
$i=0;
$extension = "txt";
$handle=opendir ('engine/accounts/');
while (false !== ($file = readdir ($handle))) {
$expl = explode(".",$file);
if ($expl[1] == $extension) {
$i = $i + 1;
include "engine/accounts/$file";
$key= $siege;
$array[$key] = $file;
}
}
closedir($handle);
if ($i > 0) {
sort($array);
while (list ($key, $val) = each ($array)) {
$expl = explode(".",$val);
include "engine/accounts/$val";
$val = substr($val,0,strlen($file)-4);
print "<tr><td width=280 valign=top><font
face=verdana size=1 color=999999><b>$val</b> <font color=red>($siege
Siege)</td><td width=200 valign=top><div align=right><a
href=\"index.php?a=superstar&wname=$val\"><font face=verdana size=1
color=999999><b>[Profil anzeigen]</A></td></tr>";
}
} else {
print "Datenbank ist leer!";
}
?>
relevanter code
PHP-Code:
include "engine/accounts/$file";
$key= $siege;
$array[$key] = $file;
}
}
closedir($handle);
if ($i > 0) {
sort($array);
Kommentar