Topic: [HACK] Display a User List
$matches[1] Display a User List
$matches[1] JubbaG & DaForce & RDF
$matches[1] 1.3.6 - * (no incompatibility reported yet)
$matches[1] Show a list of users on your site.
$matches[1]
Don't forget to modify the path To CuteNews if needed.
<?php
//CHANGE PATH//
$file = file("cutenews/data/users.db.php");
/////////////////////
foreach ($file as $line)
{
if(eregi("</?",$line)) continue;
$array = explode("|",$line); //$array[0] contains date joined, 1 = level, 2 = name, 3 = password hash, 4 = nickname, 5 = email, 6 = posts
switch($array[1]){
case 1: $array[1] = "Administrator"; break;
case 2: $array[1] = "Editor"; break;
case 3: $array[1] = "Journalist"; break;
case 4: $array[1] = "Commenter"; break;
}
echo '<table width="800" border="1" cellspacing="0" cellpadding="0"><tr style="text-align:center;"><td width="200">';
//This is where we output username
echo $array[4];
echo '</td><td width="200">';
echo $array[1];
echo '</td><td width="200">';
echo $array[5];
echo '</td><td width="200">';
echo $array[6];
echo '</td></tr></table>';
}
?>