Location: PHPKode > projects > PHPEcho CMS > blocks/userlist/index.php
<?php
/*  +--------------------------------------------
*   |
*   |     Product:       PHPEchoCMS
*   |     Author:        Anas Husseini
*   |     License:       GPL
*   |     Last updated:  19.03.07
*   |     For version:   2.0 
*   |     Desc:          Users List block
*   |        
*   +--------------------------------------------
*/

if( !@$BASE_LOAD )
{
    die('Application error.');
}

$block_content = "";
$block_display_name = $lang['017'];

$cur_users = query ("SELECT * FROM `".PREFIX."users` WHERE `online` = '1'", 1);

$num = mysql_num_rows($cur_users);
$ii = 1;

$block_content .= "<table><tr>";
$block_content .= "<td width='5%'><img src='modules/admin/images/users.png' valign='center'></td><td>";
$block_content .= "<b>".$lang['018'].$num.$lang['019']."</b><br><br>";

while ($user = mysql_fetch_array($cur_users))
{
	if ($ii < $num)
		$block_content .= $user['username'].", ";
	else                           
		$block_content .= $user['username'];
	$ii++;
}

$block_content .= "</td></tr></table>";
?>
Return current item: PHPEcho CMS