<?php 
$www_dir = realpath(dirname(__FILE__));
include_once ("$www_dir/functions.php");
include_once ("$www_dir/conf.php");
include_once ("$www_dir/lang/" . $board_config->lang . "/common.lang.php");
include_once ("$www_dir/classes/forums.class.php");
$SBBForums = new SBBForums();
$SBBstats = $SBBForums->GetStats();

echo $SBBstats["cnttopics"] . " Topics<br />"; 
echo $SBBstats["cntposts"] . " Posts<br />";
echo $SBBstats["cntmembers"] . " Members<br />";
echo "Newest Member: " . $SBBstats["latest_member"]->user . "<br />";
echo "Link to Member: " . ($board_config->seo ? "$main_path/sbb-user" . $SBBstats["latest_member"]->id . adddescr2link($SBBstats["latest_member"]->user) . ".html" : "$main_script?todo=showprofile&amp;uid=" . $SBBstats["latest_member"]->id) . "<br />";

echo "Online: ";

if ($SBBstats["onlineguests"] &&  $SBBstats["whoisonline"]) {
  echo $SBBstats["onlineguests"] . " " . lang("guests") . ", " . implode(", ",$SBBstats["whoisonline"]);
} elseif ($SBBstats["onlineguests"]) {
  echo $SBBstats["onlineguests"] . " " . lang("guests");
} elseif ($SBBstats["whoisonline"]) {
  echo implode(", ",$SBBstats["whoisonline"]);
} else {
  echo "none";
}


?>