]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/task_functions.php
New function isValidUserid() introduced, more rewrites to EL:
[mailer.git] / inc / libs / task_functions.php
index 27e73d663e00ab887bf4e7f802569551d3415e3c..4b85d3da37d46554f8ee81278a61b72668b6fde8 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -93,7 +94,7 @@ function outputAdvancedOverview (&$result_main) {
        // First check for all account status seperately
        //
        // Confirmed accounts
-       $value = countSumTotalData('CONFIRMED', 'user_data', 'userid', 'status', true);
+       $value = getTotalConfirmedUser();
 
        if ($value > 0) {
                $content['confirmed_members'] = '<a href="{%url=modules.php?module=admin&amp;what=list_user&amp;status=confirmed%}">' . $value . '</a>';
@@ -207,13 +208,13 @@ function outputAdvancedOverview (&$result_main) {
                                $content['purged_bonus_mails'] = '<a href="{%url=modules.php?module=admin&amp;what=email_details%}">' . $value . '</a>';
                        } // END - if
                } elseif (isExtensionActive('bonus')) {
-                       $content['purged_bonus_mails'] = getMaskedMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8');
+                       $content['purged_bonus_mails'] = getMaskedMessage('ADMIN_EXTENSION_BONUS_OUTDATED', '0.1.8');
                } else {
-                       $content['purged_bonus_mails'] = '<span class="admin_note">{--ADMIN_EXT_BONUS_404--}</span>';
+                       $content['purged_bonus_mails'] = '<span class="admin_note">{--ADMIN_EXTENSION_BONUS_404--}</span>';
                }
        } else {
-               $content['purged_bonus_mails'] = '<span class="admin_note">{--ADMIN_EXT_AUTOPURGE_404--}</span>';
-               $content['purged_mails'] = '<span class="admin_note">{--ADMIN_EXT_AUTOPURGE_404--}</span>';
+               $content['purged_bonus_mails'] = '<span class="admin_note">{--ADMIN_EXTENSION_AUTOPURGE_404--}</span>';
+               $content['purged_mails'] = '<span class="admin_note">{--ADMIN_EXTENSION_AUTOPURGE_404--}</span>';
        }
 
        //
@@ -227,9 +228,9 @@ function outputAdvancedOverview (&$result_main) {
                        $content['send_bonus_mails'] = '<a href="{%url=modules.php?module=admin&amp;what=email_details%}">' . $value . '</a>';
                } // END - if
        } elseif (isExtensionActive('bonus')) {
-               $content['send_bonus_mails'] = getMaskedMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8');
+               $content['send_bonus_mails'] = getMaskedMessage('ADMIN_EXTENSION_BONUS_OUTDATED', '0.1.8');
        } else {
-               $content['send_bonus_mails'] = getMessage('ADMIN_EXT_BONUS_404');
+               $content['send_bonus_mails'] = getMessage('ADMIN_EXTENSION_BONUS_404');
        }
 
        if (isExtensionActive('autopurge')) {
@@ -237,15 +238,15 @@ function outputAdvancedOverview (&$result_main) {
                $since = getConfig('ap_inactive_since');
                $EXCLUDE_LIST = '';
                if (getConfig('def_refid') > 0) {
-                       $EXCLUDE_LIST = " AND d.userid != ".getConfig('def_refid')."";
+                       $EXCLUDE_LIST = ' AND d.userid != {?def_refid?}';
                } // END - if
 
                // Check for more extensions
                // @TODO These can be rewritten to filter
-               if (isExtensionActive('beg'))                  $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_userid')."";
-               if (isExtensionActive('bonus'))                $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_userid')."";
-               if (isExtensionActive('doubler'))              $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_userid')."";
-               if ((isExtensionActive('holiday')) && (getExtensionVersion('holiday') >= '0.1.3')) {
+               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'";
                } // END - if
@@ -322,7 +323,7 @@ ORDER BY
 
        if (isExtensionInstalledAndNewer('bonus', '0.2.3')) {
                // Active rallye
-               if (getExtensionVersion('bonus') >= '0.6.9') {
+               if (isExtensionInstalledAndNewer('bonus', '0.6.9')) {
                        // Add more bonus points here
                        $USE = '(0';
                        if (getConfig('bonus_click_yn') == 'Y') $USE .= ' + `turbo_bonus`';
@@ -357,7 +358,7 @@ ORDER BY
                $TITLEs[] = getMessage('ADMIN_TASK_LIST_BONUS_TITLE');
        }
 
-       if ((isExtensionActive('beg')) && (getExtensionVersion('beg') >= '0.1.2')) {
+       if (isExtensionInstalledAndNewer('beg', '0.1.2')) {
                // Begging rallye
 
                // Autopurge installed?
@@ -523,13 +524,13 @@ ORDER BY
 
        if (isExtensionActive('surfbar')) {
                // List all URLs in surfbar
-               addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` ORDER BY `id` ASC");
+               addSql("SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` ORDER BY `url_id` ASC");
                $WHATs[]  = 'list_surfbar_urls';
                $DESCRs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_ALL');
                $TITLEs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_ALL_TITLE');
 
                // List all pending URLs in surfbar
-               addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE `status`='PENDING' ORDER BY `id` ASC");
+               addSql("SELECT `url_id` FROM `{?_MYSQL_PREFIX?}_surfbar_urls` WHERE `url_status`='PENDING' ORDER BY `url_id` ASC");
                $WHATs[]  = 'unlock_surfbar_urls';
                $DESCRs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING');
                $TITLEs[] = getMessage('ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE');