X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Flibs%2Ftask_functions.php;h=5f705a06b52fb653168ae7cf7a839569c769b63a;hb=ccd86939ba30aba70497c73264333f2fe4d786e8;hp=6698aba4a0eeca1942afd6b02c48e6c4b0314b91;hpb=9ee99fa4396228a11373b8529b24411a48e51891;p=mailer.git
diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php
index 6698aba4a0..5f705a06b5 100644
--- a/inc/libs/task_functions.php
+++ b/inc/libs/task_functions.php
@@ -17,7 +17,7 @@
* -------------------------------------------------------------------- *
* Copyright (c) 2003 - 2009 by Roland Haeder *
* Copyright (c) 2009 - 2011 by Mailer Developer Team *
- * For more information visit: http://www.mxchange.org *
+ * For more information visit: http://mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -67,7 +67,7 @@ function outputAdvancedOverview (&$result_main) {
foreach (
array(
// Member accounts
- 'confirmed_members','unconfirmed_members','locked_members',
+ 'confirmed_members','unconfirmed_members','locked_members','random_refid',
// Tasks
'update_tasks','new_tasks','closed_tasks','your_tasks','deleted_tasks','solved_tasks',
// Mail orders
@@ -102,16 +102,23 @@ function outputAdvancedOverview (&$result_main) {
$value = getTotalUnconfirmedUser();
if ($value > 0) {
- $content['unconfirmed_members'] = '' . $value . '';
+ $content['unconfirmed_members'] = '' . $value . '';
} // END - if
-
// And locked accounts
$value = getTotalLockedUser();
if ($value > 0) {
$content['locked_members'] = '' . $value . '';
} // END - if
+ if (isExtensionInstalledAndNewer('user', '0.3.4')) {
+ // And random refid
+ $value = getTotalRandomRefidUser();
+ if ($value > 0) {
+ $content['random_refid'] = '' . $value . '';
+ } // END - if
+ } // END - if
+
//
// Unassigned tasks
//
@@ -206,13 +213,13 @@ function outputAdvancedOverview (&$result_main) {
$content['purged_bonus_mails'] = '' . $value . '';
} // END - if
} elseif (isExtensionActive('bonus')) {
- $content['purged_bonus_mails'] = getMaskedMessage('ADMIN_EXTENSION_BONUS_OUTDATED', '0.1.8');
+ $content['purged_bonus_mails'] = '{%message,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--}';
}
//
@@ -226,12 +233,13 @@ function outputAdvancedOverview (&$result_main) {
$content['send_bonus_mails'] = '' . $value . '';
} // END - if
} elseif (isExtensionActive('bonus')) {
- $content['send_bonus_mails'] = getMaskedMessage('ADMIN_EXTENSION_BONUS_OUTDATED', '0.1.8');
+ $content['send_bonus_mails'] = '{%message,ADMIN_EXTENSION_BONUS_OUTDATED=0.1.8%}';
} else {
$content['send_bonus_mails'] = '{--ADMIN_EXTENSION_BONUS_404--}';
}
- if (isExtensionActive('autopurge')) {
+ // Both extensions must be there
+ if ((isExtensionActive('autopurge')) && (isExtensionActive('user'))) {
// Start finding them...
$EXCLUDE_LIST = '';
@@ -253,9 +261,9 @@ FROM
`{?_MYSQL_PREFIX?}_user_data` AS d
WHERE
d.`status`='CONFIRMED' AND
- d.joined < (UNIX_TIMESTAMP() - {?ap_inactive_since?}) AND
- d.last_online < (UNIX_TIMESTAMP() - {?ap_inactive_since?}) AND
- d.ap_notified < (UNIX_TIMESTAMP() - {?ap_inactive_since?})
+ (UNIX_TIMESTAMP() - d.`joined`) >= {?ap_inactive_since?} AND
+ (UNIX_TIMESTAMP() - d.`last_online`) >= {?ap_inactive_since?} AND
+ (UNIX_TIMESTAMP() - d.`ap_notified`) >= {?ap_inactive_since?}
".$EXCLUDE_LIST."
ORDER BY
d.userid ASC");
@@ -264,13 +272,13 @@ ORDER BY
$TITLEs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE--}';
}
- if (isExtensionInstalledAndNewer('sql_patches', '0.3.4')) {
- // 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_NOREFERAL_TITLE--}';
- $WHATs[] = 'list_user&mode=norefs';
- }
+ if ((isExtensionInstalledAndNewer('sql_patches', '0.3.4')) && (isExtensionActive('user'))) {
+ // Check for accounts without referral
+ addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 OR `refid` IS NULL ORDER BY `userid` ASC");
+ $DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL_TITLE--}';
+ $WHATs[] = 'list_user&do=norefs';
+ } // END - if
if (isExtensionActive('payout')) {
// List new payout requests
@@ -282,7 +290,7 @@ ORDER BY
$WHATs[] = 'list_payouts';
$DESCRs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE--}';
- }
+ } // END - if
if (isExtensionActive('wernis')) {
// List new wernis requests
@@ -290,7 +298,7 @@ ORDER BY
$WHATs[] = 'list_wernis';
$DESCRs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL_TITLE--}';
- }
+ } // END - if
if (isExtensionActive('primera')) {
// List new primera requests
@@ -298,7 +306,7 @@ ORDER BY
$WHATs[] = 'list_primera';
$DESCRs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL_TITLE--}';
- }
+ } // END - if
if (isExtensionActive('holiday')) {
// List holiday requests
@@ -306,7 +314,7 @@ ORDER BY
$WHATs[] = 'list_holiday';
$DESCRs[] = '{--ADMIN_TASK_LIST_HOLIDAYS--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_HOLIDAYS_TITLE--}';
- }
+ } // END - if
if (isExtensionInstalledAndNewer('bonus', '0.8.7')) {
// List all notifications
@@ -316,31 +324,28 @@ ORDER BY
$TITLEs[] = '{--ADMIN_TASK_LIST_NOTIFICATIONS_TITLE--}';
} // END - if
- if (isExtensionInstalledAndNewer('bonus', '0.2.3')) {
- // Active rallye
- if (isExtensionInstalledAndNewer('bonus', '0.6.9')) {
- // Add more bonus points here
- $USE = '(0';
- if (getConfig('bonus_click_yn') == 'Y') $USE .= ' + `turbo_bonus`';
- if (getConfig('bonus_login_yn') == 'Y') $USE .= ' + `login_bonus`';
- if (getConfig('bonus_order_yn') == 'Y') $USE .= ' + `bonus_order`';
- if (getConfig('bonus_stats_yn') == 'Y') $USE .= ' + `bonus_stats`';
- if (getConfig('bonus_ref_yn') == 'Y') $USE .= ' + `bonus_ref`';
- $USE .= ')';
- } else {
- // Old version ???
- $USE = 'turbo_bonus';
- }
+ // Both extensions must be there
+ if ((isExtensionInstalledAndNewer('bonus', '0.2.3')) && (isExtensionActive('user'))) {
+ // Get more columns
+ $add = runFilterChain('add_bonus_points_user_columns', '');
- // Autopurge installed?
+ // Active rallye, so add more point columns, if not empty
+ $USE = '`turbo_bonus`';
+ if (!empty($add)) {
+ $USE = '(0' . $add . ')';
+ } // END - if
+
+ // Init variable
$lastOnline = '';
- if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getApInactiveSince() > 0)) {
+
+ // Autopurge installed?
+ if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
} // END - if
addSql("SELECT
- " . $USE . " AS points
+ " . $USE . " AS `points`
FROM
`{?_MYSQL_PREFIX?}_user_data`
WHERE
@@ -355,14 +360,17 @@ ORDER BY
$TITLEs[] = '{--ADMIN_TASK_LIST_BONUS_TITLE--}';
}
- if (isExtensionInstalledAndNewer('beg', '0.1.2')) {
- // Begging rallye
+ // Again both extensions must be there
+ if ((isExtensionInstalledAndNewer('beg', '0.1.2')) && (isExtensionActive('user'))) {
+ // ----- Begging rallye -----
- // Autopurge installed?
+ // Init variable
$lastOnline = '';
- if ((isExtensionActive('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getApInactiveSince() > 0)) {
+
+ // Autopurge installed?
+ if ((isExtensionActive('autopurge')) && (isAutopurgeInactiveEnabled()) && (getApInactiveSince() > 0)) {
// Use last online timestamp to keep inactive members away from here
- $lastOnline = ' AND `last_online` >= (UNIX_TIMESTAMP() - {?ap_inactive_since?})';
+ $lastOnline = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
} // END - if
addSql("SELECT
@@ -384,7 +392,7 @@ ORDER BY
if (isExtensionActive('doubler')) {
// List waiting payouts
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` WHERE `completed`='N' ORDER BY `id` ASC");
- $WHATs[] = 'list_doubler&mode=waiting&select=all';
+ $WHATs[] = 'list_doubler&do=waiting&select=all';
$DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE--}';
addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` ORDER BY `id` ASC');
@@ -394,7 +402,7 @@ ORDER BY
} // END - if
//
- // All referal banner
+ // All referral banner
//
addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `id` ASC');
$WHATs[] = 'refbanner';
@@ -402,7 +410,7 @@ ORDER BY
$TITLEs[] = '{--ADMIN_TASK_LIST_REFBANNER_ALL_TITLE--}';
//
- // All activated referal banner
+ // All activated referral banner
//
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `visible`='Y' ORDER BY `id` ASC");
$WHATs[] = 'refbanner';
@@ -425,32 +433,6 @@ ORDER BY
$DESCRs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ACTIVE--}';
$TITLEs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ACTIVE_TITLE--}';
- if (isExtensionActive('engine')) {
- // List all export accounts
- addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_accounts` ORDER BY `id` ASC');
- $WHATs[] = 'list_engine';
- $DESCRs[] = '{--ADMIN_TASK_LIST_ENGINE--}';
- $TITLEs[] = '{--ADMIN_TASK_LIST_ENGINE_TITLE--}';
-
- // List all pending accounts
- addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_accounts` WHERE `status`='UNCONFIRMED' ORDER BY `id` ASC");
- $WHATs[] = 'unlock_engine';
- $DESCRs[] = '{--ADMIN_TASK_UNLOCK_ENGINE--}';
- $TITLEs[] = '{--ADMIN_TASK_UNLOCK_ENGINE_TITLE--}';
-
- // List all safes
- addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_safe` ORDER BY `id` ASC');
- $WHATs[] = 'list_engine&mode=safe';
- $DESCRs[] = '{--ADMIN_TASK_LIST_ENGINE_SAFES--}';
- $TITLEs[] = '{--ADMIN_TASK_LIST_ENGINE_SAFES_TITLE--}';
-
- // List all export URLs
- addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_engine_urls` ORDER BY `id` ASC');
- $WHATs[] = 'engine_urls';
- $DESCRs[] = '{--ADMIN_TASK_LIST_ENGINE_URLS--}';
- $TITLEs[] = '{--ADMIN_TASK_LIST_ENGINE_URLS_TITLE--}';
- } // END - if
-
if (isExtensionActive('sponsor')) {
// List all sponsors
addSql('SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` ORDER BY `id` ASC');