X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Ftask_functions.php;h=b1a98ecc8af91abb9cd3dba9f498ba06b8a07214;hp=95e0082d82f2b6ed3770d6ba8becb9c571e66bba;hb=c8d76610eb94093d4eed4fcd8a6cb72e74c8f6d8;hpb=f2aeaab0cd313b2eeb151642455ed558f6b186dc
diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php
index 95e0082d82..b1a98ecc8a 100644
--- a/inc/libs/task_functions.php
+++ b/inc/libs/task_functions.php
@@ -14,8 +14,6 @@
* $Date:: $ *
* $Tag:: 0.2.1-FINAL $ *
* $Author:: $ *
- * Needs to be in all Files and every File needs "svn propset *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009, 2010 by Mailer Developer Team *
@@ -65,7 +63,7 @@ function outputAdvancedOverview (&$result_main) {
// Init SQLs
initSqls();
- // Init contentn
+ // Init content
foreach (
array(
// Member accounts
@@ -101,7 +99,7 @@ function outputAdvancedOverview (&$result_main) {
} // END - if
// Unconfirmed accounts
- $value = countSumTotalData('UNCONFIRMED', 'user_data', 'userid', 'status', true);
+ $value = getTotalUnconfirmedUser();
if ($value > 0) {
$content['unconfirmed_members'] = '' . $value . '';
@@ -109,7 +107,7 @@ function outputAdvancedOverview (&$result_main) {
// And locked accounts
- $value = countSumTotalData('LOCKED', 'user_data', 'userid', 'status', true);
+ $value = getTotalLockedUser();
if ($value > 0) {
$content['locked_members'] = '' . $value . '';
} // END - if
@@ -210,11 +208,11 @@ function outputAdvancedOverview (&$result_main) {
} elseif (isExtensionActive('bonus')) {
$content['purged_bonus_mails'] = getMaskedMessage('ADMIN_EXTENSION_BONUS_OUTDATED', '0.1.8');
} else {
- $content['purged_bonus_mails'] = '{--ADMIN_EXTENSION_BONUS_404--}';
+ $content['purged_bonus_mails'] = '{--ADMIN_EXTENSION_BONUS_404--}';
}
} else {
- $content['purged_bonus_mails'] = '{--ADMIN_EXTENSION_AUTOPURGE_404--}';
- $content['purged_mails'] = '{--ADMIN_EXTENSION_AUTOPURGE_404--}';
+ $content['purged_bonus_mails'] = '{--ADMIN_EXTENSION_AUTOPURGE_404--}';
+ $content['purged_mails'] = '{--ADMIN_EXTENSION_AUTOPURGE_404--}';
}
//
@@ -239,10 +237,10 @@ function outputAdvancedOverview (&$result_main) {
// Check for more extensions
// @TODO These can be rewritten to filter
- if (getConfig('def_refid') > 0) $EXCLUDE_LIST .= ' AND d.userid != {?def_refid?}';
- if (isExtensionActive('beg')) $EXCLUDE_LIST .= ' AND d.userid != {?beg_userid?}';
- if (isExtensionActive('bonus')) $EXCLUDE_LIST .= ' AND d.userid != {?bonus_userid?}';
- if (isExtensionActive('doubler')) $EXCLUDE_LIST .= ' AND d.userid != {?doubler_userid?}';
+ if (getConfig('def_refid') > 0) $EXCLUDE_LIST .= ' AND d.`userid` != {?def_refid?}';
+ if (isExtensionActive('beg')) $EXCLUDE_LIST .= ' AND d.`userid` != {?beg_userid?}';
+ if (isExtensionActive('bonus')) $EXCLUDE_LIST .= ' AND d.`userid` != {?bonus_userid?}';
+ if (isExtensionActive('doubler')) $EXCLUDE_LIST .= ' AND d.`userid` != {?doubler_userid?}';
if (isExtensionInstalledAndNewer('holiday', '0.1.3')) {
// Recent ext-holiday found
$EXCLUDE_LIST .= " AND d.`holiday_active`='N'";
@@ -270,7 +268,7 @@ ORDER BY
// Check for accounts without referal
addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 ORDER BY `userid` ASC");
$DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NOREF--}';
- $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NOREF_TITLE--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NOREFERAL_TITLE--}';
$WHATs[] = 'list_user&mode=norefs';
}
@@ -336,17 +334,19 @@ ORDER BY
// Autopurge installed?
$lastOnline = '';
- if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
+ if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = ' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})';
} // END - if
addSql("SELECT
- ".$USE." AS points
+ " . $USE . " AS points
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
- `status`='CONFIRMED' AND ".$USE." > 0".$lastOnline."
+ `status`='CONFIRMED' AND
+ " . $USE . " > 0
+ " . $lastOnline . "
ORDER BY
`points` DESC,
`userid` ASC");
@@ -360,7 +360,7 @@ ORDER BY
// Autopurge installed?
$lastOnline = '';
- if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
+ if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = ' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})';
} // END - if
@@ -379,7 +379,7 @@ ORDER BY
$WHATs[] = 'list_beg';
$DESCRs[] = '{--ADMIN_TASK_LIST_BEG--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_BEG_TITLE--}';
- }
+ } // END - if
if (isExtensionActive('doubler')) {
// List waiting payouts
@@ -391,7 +391,7 @@ ORDER BY
$WHATs[] = 'list_doubler';
$DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL_TITLE--}';
- }
+ } // END - if
//
// All referal banner
@@ -549,7 +549,7 @@ ORDER BY
//
function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) {
// Init variables
- $OUT = ''; $SW = 2;
+ $OUT = '';
// Sadly this cannot be rewritten to a filter... :(
foreach (getSqls() as $sqls) {
@@ -558,34 +558,29 @@ function createExtraTaskRows ($WHATs, $DESCRs, $TITLEs) {
// Run SQL command, get line numbers and free memory
$result = SQL_QUERY($sql, __FUNCTION__, __LINE__);
- // Get rows
- $value = SQL_NUMROWS($result);
-
- // Free result
- SQL_FREERESULT($result);
-
// Prepare array for output
$content = array(
'row_descr' => $DESCRs[$key],
- 'row_sw' => $SW,
'bottom' => '',
);
// Rewrite CSS class if not last entry is reached
if ($key < (count($sqls) - 1)) $content['bottom'] = 'bottom';
- if (($value > 0) && (!empty($WHATs[$key]))) {
- if (empty($TITLEs[$key])) $TITLEs[$key] = '{--ADMIN_TASK_UNKNOWN_LIST_TITLE--}';
- $content['row_link'] = '' . $value . '';
+ if ((SQL_NUMROWS($result) > 0) && (!empty($WHATs[$key]))) {
+ if (empty($TITLEs[$key])) {
+ $TITLEs[$key] = '{--ADMIN_TASK_UNKNOWN_LIST_TITLE--}';
+ } // END - if
+ $content['row_link'] = '' . SQL_NUMROWS($result) . '';
} else {
$content['row_link'] = '0';
}
+ // Free result
+ SQL_FREERESULT($result);
+
// And insert the final string into extras template
$OUT .= loadTemplate('admin_overview_task_rows', true, $content);
-
- // Switch color
- $SW = 3 - $SW;
} // END- foreach
} // END - foreach