<?php
    
/**
     *    Online Users Module for Mambo portal
     *
     *    23-12-2001
      *
     *    Copyright (C) 2001 - 2002 Emir Sakic
     *    Distributed under the terms of the GNU General Public License
     *    This software may be used without warranty provided and these statements are left intact.
     *    This source is available at http://www.superbosna.com/mambo_hacks
     *
     *    Mambo is Copyright (C) 2000-2001 Miro Construct Pty Ltd
     *    Source is available at http://sourceforge.net/projects/mambo
     *    Site Name: Mambo Open Source Edition Version 3.0.5 - 3.0.7
     *    File Name: onlinemodule.php
     *    Developer: Emir Sakic - saka@hotmail.com
     *    Date: 23/12/2001
     *     Version #: 1.1
     *    Comments: This script displays list of online registrated users on your Mambo portal and forum.
     *            It's designed as Mambo component. You will need to add an entry into the
     *            components database table. Then upload this script and you can place this
     *            module as any other Mambo component throught control panel.
     *            Demo can be viewed at http://www.superbosna.com
    **/

    
$query2 "SELECT * FROM session where (guest=0 and (usertype is NULL OR usertype='user')) OR usertype='forum'";
    
$result2=$database->openConnectionWithReturn($query2);

    
$content="";

    
// Use mysql_fetch_row to retrieve the results
    
for ($count 1$row mysql_fetch_row ($result2); ++$count)
    {
        if (
$row[5] == 'forum') {
            
$content.="$row[0] - forum<br>";
        } else {
            
$content.="$row[0]<br>";
        }
    }
?>