}
// Total visitors online
-$total = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_NUMROWS($result_admins);
+$total = GET_TOTAL_DATA("", "online", "id", "userid", true);
if (getConfig('mad_count') < $total) {
// Update counter
$content = array(
'guests' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='N'")),
'members' => TRANSLATE_COMMA(GET_TOTAL_DATA("N", "online", "id", "is_admin", true, " AND is_member='Y'")),
- 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", "online", "id", "is_admin", true))
+ 'admins' => TRANSLATE_COMMA(GET_TOTAL_DATA("Y", "online", "id", "is_admin", true)),
+ 'total' => TRANSLATE_COMMA($total)
);
// Output table
}
// Calculate sum (default) or count records of given criteria
-function GET_TOTAL_DATA ($search, $tableName, $lookFor, $whereStatement = "userid", $countRows = false, $add = "") {
+function GET_TOTAL_DATA ($search, $tableName, $lookFor = "id", $whereStatement = "userid", $countRows = false, $add = "") {
$ret = 0;
//* DEBUG: */ echo $search."/".$tableName."/".$lookFor."/".$whereStatement."/".$add."<br />\n";
if (empty($search)) {