I am trying to make a user listing...
It works.. sort of. It will list the members, then have numerous colums with usernames of like 30/100..
If you want a demonstrationof whats wrong, go to
http://sanctimonia.no-ip.com/userlist.php
Also, there is a level 1 in front of the level 14. (me)..why?
<HTML>
<HEAD><TITLE>Member Listing</TITLE><style>
a:link { text-decoration: none; color: lightblue; },
a:visited { text-decoration: none; color: white; },
a:active { text-decoration: none; },
a:hover { text-decoration: <B>; color: lightblue; }
</style></HEAD>
<BODY BACKGROUND="24.jpg"><font color=Black><Font size=4><Center>
Registered User Listing</Center><BR>
<Font color=red><B>Red:</B></Font> Administrator<BR>
<?
echo '<BR><BR>';
echo '<table border=1 cellpadding=0 cellspacing=1 style=border-collapse: collapse bordercolor=gray width=270 id=AutoNumber1>';
echo '<tr>';
echo '<td width=30>';
echo '<font color=Black>';
echo '#';
echo '</td>';
echo '<td width=170>';
echo '<font color=Black>';
echo 'Username';
echo '</td>';
echo '<td width=70>';
echo '<font color=Black>';
echo 'Current Level';
echo '</td>';
echo '</tr>';
echo '</table>';
$num = "1";
$filename = "../../RPG/userlist.txt";
$fp = fopen($filename, "r");
$file_contents = fread($fp, filesize($filename));
fclose($fp);
$line = explode("*", $file_contents); //now $line is the list of info
foreach ($line as $qw) { // for each line
$qw = explode("†", $qw); // we get user and filename (qw[0] , right?)
$acc[$qw[0]]=@file($qw[0]); //this load from file a value and put it in associative array, using name as index
}
arsort ($acc); //after all we will sort for desc value
reset ($acc); // and point to the first entry;
while (list ($chi, $val) = each ($acc)) {
$color = '<font color=black>';
$endcolor = '</font>';
if($num == '1') {
$color = '<font color=orange><B>';
$endcolor = '</B></FONT>';
}
if($chi == 'Admin' or $chi == 'Administrator' or $chi == 'Firebird'){
$color = '<B><font color=red>.:*<Font color=White> ';
$endcolor = ' <font color=red>*:.</font></B>';
}
echo '<table border=1 cellpadding=0 cellspacing=1 style=border-collapse: collapse bordercolor=gray width=270 id=AutoNumber1>';
echo '<tr>';
echo '<td width=30>';
echo '<font color=black>';
echo $num;
echo '</td>';
echo '<td width=170>';
echo $color;
echo $chi;
echo $endcolor;
echo '</td>';
echo '<td width=70>';
echo '<font color=black>';
$filename2 = "C:/Xitami/webpages/RPGTEST/USERS/";
$filename2 .= $chi;
$fp = fopen($filename2, "r");
$file_contents = fread($fp, filesize($filename2));
fclose($fp);
$line = explode("¥", $file_contents); //now $line is the list of info
foreach ($line as $qw) { // for each line
$qw = explode(":", $qw); // we get user and filename (qw[0] , right?)
$acc[$qw[0]]=@file($qw[0]); //this load from file a value and put it in associative array, using name as index
echo $qw[6];
}
echo '</td>';
echo '</tr>';
echo '</table>';
$num++;
}
?>
<BR><BR><BR><BR><BR><BR><BR><Font size=2><Center>
<A Href=mailto:Firebird3k@shaw.ca>Contact WebMaster</A></center>