]> git.mxchange.org Git - mailer.git/commitdiff
Refactured old lost code
authorRoland Häder <roland@mxchange.org>
Tue, 10 Mar 2009 21:52:48 +0000 (21:52 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 10 Mar 2009 21:52:48 +0000 (21:52 +0000)
inc/modules/guest/action-online.php
inc/mysql-manager.php

index 3dd9737ab6c15ba8608c423d4937f50b21791d2f..b398f9f035cb3fda7814c3318a18aae5d6956eb3 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 }
 
 // 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
@@ -57,7 +57,8 @@ if (getConfig('mad_count') < $total) {
 $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
index 43a2e1d37b6c2c97777bcf6ca9318b60be3ad36b..fd67f992d23631974049b99507d7ef71088ccb31 100644 (file)
@@ -1058,7 +1058,7 @@ function REMOVE_RECEIVER (&$receivers, $key, $uid, $pool_id, $stats_id="", $bonu
 }
 
 // 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)) {