<?

/************************************************************************/
/* XChat Version 0.9.8                                                  */
/* ==================================================================== */
/* 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.       */
/************************************************************************/

if (eregi("block-4nChat2.php", $PHP_SELF)) {
    Header("Location: index.php");
    die();
}

  global $cookie, $prefix, $currentlang;

  $showusers = true;
  $modulename = "XChat";

  $basepath   = "modules/$modulename";

  if(file_exists("$basepath/language/block-".$currentlang.".php")) {
        include("$basepath/language/block-".$currentlang.".php");
  }
  else {
        include("$basepath/language/block-$language.php");
  }


  require "$basepath/inc/config.php";

  # some cleaning
  $tstamp = time();
  $tstamp -= $usertime;
  $q=mysql_query("delete from ".$prefix."_4nchatuser where last < ".$tstamp);


  $result = mysql_query("select * FROM $prefix"._4nchatuser." WHERE uid >='1' order by uid");
  $nummembers = mysql_num_rows($result);

  $content = "<center><table width=100% border=0>";
  $content .= "<tr><td>"._PRE."</td></tr>";
  $content .= "<tr><td>$nummembers "._CHATTER.".</td></tr>";
  $content .= "<tr><td</td></tr>";
  $content .= "<tr><td><a href=\"modules.php?op=modload&name=4nChat\">"._LETSCHAT."</a></td></tr>";

  $content .= "</table>";

?>