X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Flibs%2Ftask_functions.php;h=b8258a4d0d13dca5cb7d4d0ac73a926cea83efee;hp=5f705a06b52fb653168ae7cf7a839569c769b63a;hb=63f159414369b5ea19a8ca75d8cd8033c45d8341;hpb=a454def0bfba8288ffc839d034c710f034cf4728 diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index 5f705a06b5..b8258a4d0d 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009 - 2011 by Mailer Developer Team * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -67,7 +67,7 @@ function outputAdvancedOverview (&$result_main) { foreach ( array( // Member accounts - 'confirmed_members','unconfirmed_members','locked_members','random_refid', + 'confirmed_members','unconfirmed_members','locked_members','random_refid','testers', // Tasks 'update_tasks','new_tasks','closed_tasks','your_tasks','deleted_tasks','solved_tasks', // Mail orders @@ -93,19 +93,17 @@ function outputAdvancedOverview (&$result_main) { // // Confirmed accounts $value = getTotalConfirmedUser(); - if ($value > 0) { $content['confirmed_members'] = '' . $value . ''; } // END - if // Unconfirmed accounts $value = getTotalUnconfirmedUser(); - if ($value > 0) { $content['unconfirmed_members'] = '' . $value . ''; } // END - if - // And locked accounts + // Locked accounts $value = getTotalLockedUser(); if ($value > 0) { $content['locked_members'] = '' . $value . ''; @@ -117,6 +115,14 @@ function outputAdvancedOverview (&$result_main) { if ($value > 0) { $content['random_refid'] = '' . $value . ''; } // END - if + + if (isExtensionInstalledAndNewer('user', '0.5.0')) { + // And tester accounts + $value = getTotalTesterUsers(); + if ($value > 0) { + $content['testers'] = '' . $value . ''; + } // END - if + } // END - if } // END - if // @@ -241,7 +247,7 @@ function outputAdvancedOverview (&$result_main) { // Both extensions must be there if ((isExtensionActive('autopurge')) && (isExtensionActive('user'))) { // Start finding them... - $EXCLUDE_LIST = ''; + $EXCLUDE_LIST = ' '; // Check for more extensions // @TODO These can be rewritten to filter @@ -253,28 +259,35 @@ function outputAdvancedOverview (&$result_main) { // Recent ext-holiday found $EXCLUDE_LIST .= " AND d.`holiday_active`='N'"; } // END - if + if (isExtensionInstalledAndNewer('user', '0.5.0')) { + // Exclude test accounts + $EXCLUDE_LIST = runFilterChain('user_exclusion_sql', $EXCLUDE_LIST); + } // END - if // Check for all accounts addSql("SELECT - d.userid, d.email, d.last_online + d.`userid`, + d.`email`, + d.`last_online` FROM `{?_MYSQL_PREFIX?}_user_data` AS d WHERE - d.`status`='CONFIRMED' AND + d.`status`='CONFIRMED' + " . runFilterChain('user_exclusion_sql', ' ') . " AND (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"); + d.`userid` ASC"); $WHATs[] = 'list_autopurge'; $DESCRs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE--}'; $TITLEs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE--}'; - } + } // END - if 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"); + addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `refid`=0 OR `refid` IS NULL ' . runFilterChain('user_exclusion_sql', ' ') . ' ORDER BY `userid` ASC'); $DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL--}'; $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NO_REFERRAL_TITLE--}'; $WHATs[] = 'list_user&do=norefs'; @@ -300,14 +313,6 @@ ORDER BY $TITLEs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL_TITLE--}'; } // END - if - if (isExtensionActive('primera')) { - // List new primera requests - addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_primera` ORDER BY `userid` ASC'); - $WHATs[] = 'list_primera'; - $DESCRs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL--}'; - $TITLEs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL_TITLE--}'; - } // END - if - if (isExtensionActive('holiday')) { // List holiday requests addSql('SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_holidays` ORDER BY `userid` ASC'); @@ -330,9 +335,9 @@ ORDER BY $add = runFilterChain('add_bonus_points_user_columns', ''); // Active rallye, so add more point columns, if not empty - $USE = '`turbo_bonus`'; + $pointsColumns = '`turbo_bonus`'; if (!empty($add)) { - $USE = '(0' . $add . ')'; + $pointsColumns = '(0' . $add . ')'; } // END - if // Init variable @@ -345,12 +350,12 @@ ORDER BY } // END - if addSql("SELECT - " . $USE . " AS `points` + " . $pointsColumns . " AS `points` FROM `{?_MYSQL_PREFIX?}_user_data` WHERE `status`='CONFIRMED' AND - " . $USE . " > 0 + " . $pointsColumns . " > 0 " . $lastOnline . " ORDER BY `points` DESC,