<% if (!function_exists("array_sum")) exit("
Error: PHP ".PHP_VERSION." is too old for BBClone."); elseif (is_readable("constants.php")) require_once("constants.php"); else return; foreach (array($BBC_CONFIG_FILE, $BBC_LIB_PATH."selectlang.php", $BBC_LAST_FILE) as $i) { if (is_readable($i)) require_once($i); else exit(bbc_msg($i)); } function getTotalOnline() { global $_, $BBC_DETAILED_STAT_FIELDS, $BBC_MAXVISIBLE, $bbc_html, $last; $total = 0; $fields_title = array( "browser" => $_['dstat_browser'], "dns" => $_['dstat_dns'], "ext" => $_['dstat_extension'], "id" => $_['dstat_id'], "ip" => $_['dstat_ip'], "os" => $_['dstat_os'], "page" => $_['dstat_last_page'], "prx_ip" => $_['dstat_prx'], "referer" => $_['dstat_from'], "search" => $_['dstat_search'], "time" => $_['dstat_time'], "visits" => $_['dstat_visits'], ); $fields = explode(",", str_replace(" ", "", $BBC_DETAILED_STAT_FIELDS)); $nb_access = isset($last['traffic']) ? count($last['traffic']) : 0; for ($k = $nb_access - 1; $k >= max(0, $nb_access - $BBC_MAXVISIBLE); $k--) { $hex = $bbc_html->connect_code_color($last['traffic'][$k]); if ($hex == "#e5f2f7"){ $total += 1; } } return $total; } print "There are currently "; $mytotal = getTotalOnline(); print $mytotal; if ($mytotal == 1) print " user"; else print " users"; print " online."; %>