X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Flibs%2Ftask_functions.php;h=f067f2e4ebcaca546ed04590ede935f82e60080d;hb=62d8f6d89c35bebe15b8f716a5629f14d95f3078;hp=27e73d663e00ab887bf4e7f802569551d3415e3c;hpb=b3ac0295ae2be81269cc35b15565adeb08b90d63;p=mailer.git
diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php
index 27e73d663e..f067f2e4eb 100644
--- a/inc/libs/task_functions.php
+++ b/inc/libs/task_functions.php
@@ -14,10 +14,9 @@
* $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 *
* For more information visit: http://www.mxchange.org *
* *
* This program is free software; you can redistribute it and/or modify *
@@ -64,7 +63,7 @@ function outputAdvancedOverview (&$result_main) {
// Init SQLs
initSqls();
- // Init contentn
+ // Init content
foreach (
array(
// Member accounts
@@ -93,14 +92,14 @@ 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'] = '' . $value . '';
} // END - if
// Unconfirmed accounts
- $value = countSumTotalData('UNCONFIRMED', 'user_data', 'userid', 'status', true);
+ $value = getTotalUnconfirmedUser();
if ($value > 0) {
$content['unconfirmed_members'] = '' . $value . '';
@@ -108,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
@@ -207,13 +206,13 @@ function outputAdvancedOverview (&$result_main) {
$content['purged_bonus_mails'] = '' . $value . '';
} // 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'] = '{--ADMIN_EXT_BONUS_404--}';
+ $content['purged_bonus_mails'] = '{--ADMIN_EXTENSION_BONUS_404--}';
}
} else {
- $content['purged_bonus_mails'] = '{--ADMIN_EXT_AUTOPURGE_404--}';
- $content['purged_mails'] = '{--ADMIN_EXT_AUTOPURGE_404--}';
+ $content['purged_bonus_mails'] = '{--ADMIN_EXTENSION_AUTOPURGE_404--}';
+ $content['purged_mails'] = '{--ADMIN_EXTENSION_AUTOPURGE_404--}';
}
//
@@ -227,25 +226,22 @@ function outputAdvancedOverview (&$result_main) {
$content['send_bonus_mails'] = '' . $value . '';
} // 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'] = '{--ADMIN_EXTENSION_BONUS_404--}';
}
if (isExtensionActive('autopurge')) {
// Start finding them...
- $since = getConfig('ap_inactive_since');
$EXCLUDE_LIST = '';
- if (getConfig('def_refid') > 0) {
- $EXCLUDE_LIST = " AND d.userid != ".getConfig('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 (isValidUserId(getDefRefid())) $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'";
} // END - if
@@ -257,22 +253,22 @@ FROM
`{?_MYSQL_PREFIX?}_user_data` AS d
WHERE
d.`status`='CONFIRMED' AND
- d.joined < (UNIX_TIMESTAMP() - ".$since.") AND
- d.last_online < (UNIX_TIMESTAMP() - ".$since.") AND
- d.ap_notified < (UNIX_TIMESTAMP() - ".$since.")
+ 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?})
".$EXCLUDE_LIST."
ORDER BY
d.userid ASC");
$WHATs[] = 'list_autopurge';
- $DESCRs[] = getMessage('ADMIN_TASK_INACTIVE_AUTOPURGE');
- $TITLEs[] = getMessage('ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_INACTIVE_AUTOPURGE--}';
+ $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[] = getMessage('ADMIN_TASK_LIST_ACCOUNT_NOREF');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_ACCOUNT_NOREF_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NOREF--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_ACCOUNT_NOREFERAL_TITLE--}';
$WHATs[] = 'list_user&mode=norefs';
}
@@ -280,49 +276,49 @@ ORDER BY
// List new payout requests
addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` WHERE `status`='NEW' ORDER BY `userid` ASC");
$WHATs[] = 'list_payouts';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_WAITING');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_WAITING_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_PAYOUTS_WAITING--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_PAYOUTS_WAITING_TITLE--}';
addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_payouts` ORDER BY `userid` ASC");
$WHATs[] = 'list_payouts';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE--}';
}
if (isExtensionActive('wernis')) {
// List new wernis requests
addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_wernis` ORDER BY `userid` ASC");
$WHATs[] = 'list_wernis';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_WERNIS_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_WERNIS_ALL_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_WERNIS_ALL_TITLE--}';
}
if (isExtensionActive('primera')) {
// List new primera requests
addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_primera` ORDER BY `userid` ASC");
$WHATs[] = 'list_primera';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_PRIMERA_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_PRIMERA_ALL_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_PRIMERA_ALL_TITLE--}';
}
if (isExtensionActive('holiday')) {
// List holiday requests
addSql("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_holidays` ORDER BY `userid` ASC");
$WHATs[] = 'list_holiday';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_HOLIDAYS');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_HOLIDAYS_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_HOLIDAYS--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_HOLIDAYS_TITLE--}';
}
if (isExtensionInstalledAndNewer('bonus', '0.8.7')) {
// List all notifications
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_bonus` WHERE `is_notify`='Y' ORDER BY `timestamp` DESC");
$WHATs[] = 'list_notifications';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_NOTIFICATIONS');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_NOTIFICATIONS_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_NOTIFICATIONS--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_NOTIFICATIONS_TITLE--}';
} // END - if
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`';
@@ -338,31 +334,33 @@ 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");
$WHATs[] = 'list_bonus';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_BONUS');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_BONUS_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_BONUS--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_BONUS_TITLE--}';
}
- if ((isExtensionActive('beg')) && (getExtensionVersion('beg') >= '0.1.2')) {
+ if (isExtensionInstalledAndNewer('beg', '0.1.2')) {
// Begging rallye
// 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,160 +377,160 @@ ORDER BY
`beg_points` DESC,
`userid` ASC");
$WHATs[] = 'list_beg';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_BEG');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_BEG_TITLE');
- }
+ $DESCRs[] = '{--ADMIN_TASK_LIST_BEG--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_BEG_TITLE--}';
+ } // END - if
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';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_WAITING');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_WAITING_TITLE--}';
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_doubler` ORDER BY `id` ASC");
$WHATs[] = 'list_doubler';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_DOUBLER_ALL_TITLE');
- }
+ $DESCRs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_DOUBLER_ALL_TITLE--}';
+ } // END - if
//
// All referal banner
//
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` ORDER BY `id` ASC");
$WHATs[] = 'refbanner';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ALL_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_REFBANNER_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_REFBANNER_ALL_TITLE--}';
//
// All activated referal banner
//
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_refbanner` WHERE `visible`='Y' ORDER BY `id` ASC");
$WHATs[] = 'refbanner';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ACTIVE');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_REFBANNER_ACTIVE_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_REFBANNER_ACTIVE--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_REFBANNER_ACTIVE_TITLE--}';
//
// All extensions
//
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` ORDER BY `id` ASC");
$WHATs[] = 'extensions';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ALL_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_EXTENSIONS_ALL_TITLE--}';
//
// All activated extensions
//
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_extensions` WHERE `ext_active`='Y' ORDER BY `id` ASC");
$WHATs[] = 'extensions&active=Y';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ACTIVE');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_EXTENSIONS_ACTIVE_TITLE');
+ $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[] = getMessage('ADMIN_TASK_LIST_ENGINE');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_TITLE');
+ $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[] = getMessage('ADMIN_TASK_UNLOCK_ENGINE');
- $TITLEs[] = getMessage('ADMIN_TASK_UNLOCK_ENGINE_TITLE');
+ $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[] = getMessage('ADMIN_TASK_LIST_ENGINE_SAFES');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_SAFES_TITLE');
+ $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[] = getMessage('ADMIN_TASK_LIST_ENGINE_URLS');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_URLS_TITLE');
+ $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");
$WHATs[] = 'list_sponsor';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_TITLE--}';
// List confirmed sponsor accounts
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='CONFIRMED' ORDER BY `id` ASC");
$WHATs[] = 'list_sponsor';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_CONFIRMED');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_CONFIRMED_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_CONFIRMED--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_CONFIRMED_TITLE--}';
// List unconfirmed sponsor accounts
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='UNCONFIRMED' ORDER BY `id` ASC");
$WHATs[] = 'list_sponsor';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_UNCONFIRMED_TITLE--}';
// List locked sponsor accounts
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='LOCKED' ORDER BY `id` ASC");
$WHATs[] = 'list_sponsor';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_LOCKED');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_LOCKED_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_LOCKED--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_LOCKED_TITLE--}';
// List waiting sponsor accounts to be approved
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_data` WHERE `status`='PENDING' ORDER BY `id` ASC");
$WHATs[] = 'unlock_sponsor';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_PENDING');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_PENDING--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_PENDING_TITLE--}';
// Waiting payments
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_sponsor_orders` WHERE `pay_status`='PENDING' ORDER BY `id` ASC");
$WHATs[] = 'list_sponsor_pays';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SPONSOR_ORDERS--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE--}';
} // END - if
if (isExtensionActive('country')) {
// List country codes
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_countries` ORDER BY `id` ASC");
$WHATs[] = 'list_country';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_COUNTRY');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_COUNTRY_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_COUNTRY--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_COUNTRY_TITLE--}';
} // END - if
if (isExtensionActive('theme')) {
// List all themes
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` ORDER BY `id` ASC");
$WHATs[] = 'theme_edit';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_THEME_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_THEME_ALL_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_THEME_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_THEME_ALL_TITLE--}';
// List active themes
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_themes` WHERE `theme_active`='Y' ORDER BY `id` ASC");
$WHATs[] = 'theme_edit';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_THEME_ACTIVE');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_THEME_ACTIVE_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_THEME_ACTIVE--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_THEME_ACTIVE_TITLE--}';
} // END - if
if (isExtensionActive('admins')) {
// List all administrator logins
addSql("SELECT `id` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC");
$WHATs[] = 'admins_edit';
- $DESCRs[] = getMessage('ADMIN_TASK_LIST_ADMINS_ALL');
- $TITLEs[] = getMessage('ADMIN_TASK_LIST_ADMINS_ALL_TITLE');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_ADMINS_ALL--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_ADMINS_ALL_TITLE--}';
} // END - if
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');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_ALL--}';
+ $TITLEs[] = '{--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');
+ $DESCRs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_PENDING--}';
+ $TITLEs[] = '{--ADMIN_TASK_LIST_SURFBAR_URLS_PENDING_TITLE--}';
} // END - if
// Generate extra overview rows
@@ -551,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) {
@@ -560,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] = getMessage('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