From: Roland Häder Date: Tue, 10 Mar 2009 21:52:48 +0000 (+0000) Subject: Refactured old lost code X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0f90798a066b2d0e1fa376136b1bdfc7ca52f519;p=mailer.git Refactured old lost code --- diff --git a/inc/modules/guest/action-online.php b/inc/modules/guest/action-online.php index 3dd9737ab6..b398f9f035 100644 --- a/inc/modules/guest/action-online.php +++ b/inc/modules/guest/action-online.php @@ -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 diff --git a/inc/mysql-manager.php b/inc/mysql-manager.php index 43a2e1d37b..fd67f992d2 100644 --- a/inc/mysql-manager.php +++ b/inc/mysql-manager.php @@ -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."
\n"; if (empty($search)) {