<?PHP
/************************************************************************/
/* Code created by XT-Wax at
www.RaveNuke.com */
/* Please keep all copyright info in file... Thanks */
/* Copyright (c) 2007 by XT-Wax */
/* http://www.RaveNuke.com */
/* Email suggestions and tweeks to this block:
webmaster@ravenuke.com */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/* Free to use and distribute, but Copyright must stay in code. Thanks. */
/* */
/************************************************************************/
/* Download this block and other scripts from http://ravenuke.com */
/* */
/* This block is designeed to work with Live Chat which can be */
/* downloaded at http://nukecoder.com (Thanks for this awesome chat) */
/* */
/************************************************************************/
if ( !defined('BLOCK_FILE') ) {
Header('Location: ../index.php');
die();
}
$content = '';
global $admin, $user, $cookie, $prefix, $user_prefix, $db, $dbi, $anonymous, $name, $lang, $sql;
//Function to call number of chatters in chat room
$count = 'SELECT COUNT(username) FROM '.$prefix.'_live_online WHERE timestamp>\''.(time() - 60).'\' ORDER BY username ASC';
$count_results = $db->sql_query($count);
list($chat_user_count) = $db->sql_fetchrow($count_results);
$content .="<center>Number of Chatters:<br>("; // <--- Change "Number of Chatters:" here iF you like
$content .=$chat_user_count;
$content .=")</center>";
//Function to call current users in chat
$user_display = 'SELECT username FROM '.$prefix.'_live_online WHERE timestamp>\''.(time() - 60).'\' ORDER BY username ASC LIMIT 0,50';
$results = $db->sql_query($user_display);
$content .="<br /><center><strong>Who's Chatting:</strong><br /><br /> "; // <--- Change "Who's Chatting:" here iF you like
if ($db->sql_numrows($result)) {
while (list($username) = $db->sql_fetchrow($result)) {
$content .= '<div align=center>* '.$username.'</div>';
}
} else {
$content .= 'No Ones Chatting';
}
$content .="</center>";
//Link to Live_Chat module... Change address if needed
$content .= "<BR><center><a href='modules.php?name=Live_Chat'>JOIN CHAT NOW</a></center>"; // <---- Change "Live_Chat" to your module name IF changed name
//Please retain below info
$content .= "<BR><BR><center><font size=\"0\">Powered By</font></center>";
$content .= "<center><a href=\"http://www.RaveNuke.com/index.php\"><font size=\"0\">www.RaveNuke.com</font></a></center>";
?>