1 (edited by 2008-08-03 14:00:51)

Topic: [HACK] Display a User List

Name: Display a User List
Author: JubbaG & DaForce & RDF
CuteNews Compatibility: 1.3.6 - * (no incompatibility reported yet)
Description: Show a list of users on your site.
Instructions:
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>';
}
?>