// @TODO Move all extension-dependent queries into filters
function OUTPUT_ADVANCED_OVERVIEW (&$result_main) {
// Init variables/arrays
- $EXTRAS = "";
- $OUT = "";
+ $EXTRAS = '';
+ $OUT = '';
$WHATs = array();
$DESCRs = array();
$TITLEs = array();
// First check for all account status seperately
//
// Confirmed accounts
- $value = GET_TOTAL_DATA("CONFIRMED", "user_data", "userid", "status", true);
+ $value = GET_TOTAL_DATA("CONFIRMED", "user_data", 'userid', "status", true);
if ($value > 0) {
define('__CONFIRMED_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=list_user&status=confirmed\">".$value."</a>");
}
// Unconfirmed accounts
- $value = GET_TOTAL_DATA("UNCONFIRMED", "user_data", "userid", "status", true);
+ $value = GET_TOTAL_DATA("UNCONFIRMED", "user_data", 'userid', "status", true);
if ($value > 0) {
define('__UNCONFIRMED_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=chk_regs\">".$value."</a>");
}
// And locked accounts
- $value = GET_TOTAL_DATA("LOCKED", "user_data", "userid", "status", true);
+ $value = GET_TOTAL_DATA("LOCKED", "user_data", 'userid', "status", true);
if ($value > 0) {
define('__LOCKED_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=list_user&status=locked\">".$value."</a>");
//
// Autopurged mails
//
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
// Get auto-purged mails
$value = GET_TOTAL_DATA("DELETED", "pool", "id", "data_type", true);
//
// Autopurged bonus mails
//
- if (GET_EXT_VERSION("bonus") >= "0.1.8") {
+ if (GET_EXT_VERSION('bonus') >= '0.1.8') {
// Get auto-purged bonus mails
- $value = GET_TOTAL_DATA("DELETED", "bonus", "id", "data_type", true);
+ $value = GET_TOTAL_DATA("DELETED", 'bonus', "id", "data_type", true);
if ($value > 0) {
define('__MAIL_BONUS_AP_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=email_details\">".$value."</a>");
} else {
define('__MAIL_BONUS_AP_VALUE', "0");
}
- } elseif (EXT_IS_ACTIVE("bonus")) {
- define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8")));
+ } elseif (EXT_IS_ACTIVE('bonus')) {
+ define('__MAIL_BONUS_AP_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8')));
} else {
define('__MAIL_BONUS_AP_VALUE', "<span class=\"admin_note\">{--ADMIN_EXT_BONUS_404--}</span>");
}
//
// Sent bonus mails
//
- if (GET_EXT_VERSION("bonus") >= "0.1.8") {
+ if (GET_EXT_VERSION('bonus') >= '0.1.8') {
// Get sent bonus mails (but not notifications)
- $value = GET_TOTAL_DATA("SEND", "bonus", "id", "data_type", true, " AND is_notify='N'");
+ $value = GET_TOTAL_DATA("SEND", 'bonus', "id", "data_type", true, " AND is_notify='N'");
if ($value > 0) {
define('__MAIL_BONUS_SEND_VALUE', "<a href=\"{!URL!}/modules.php?module=admin&what=email_details\">".$value."</a>");
} else {
define('__MAIL_BONUS_SEND_VALUE', "0");
}
- } elseif (EXT_IS_ACTIVE("bonus")) {
- define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', "0.1.8")));
+ } elseif (EXT_IS_ACTIVE('bonus')) {
+ define('__MAIL_BONUS_SEND_VALUE', sprintf(getMessage('ADMIN_EXT_BONUS_OUTDATED', '0.1.8')));
} else {
define('__MAIL_BONUS_SEND_VALUE', getMessage('ADMIN_EXT_BONUS_404'));
}
- if (EXT_IS_ACTIVE("autopurge")) {
+ if (EXT_IS_ACTIVE('autopurge')) {
// Start finding them...
$since = getConfig('ap_inactive_since');
- $EXCLUDE_LIST = "";
+ $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 (EXT_IS_ACTIVE("beg")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
- if (EXT_IS_ACTIVE("bonus")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
- if (EXT_IS_ACTIVE("doubler")) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
- if (GET_EXT_VERSION("holiday") >= "0.1.3") $EXCLUDE_LIST .= " AND d.holiday_active='N'";
+ if (EXT_IS_ACTIVE('beg')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('beg_uid')."";
+ if (EXT_IS_ACTIVE('bonus')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('bonus_uid')."";
+ if (EXT_IS_ACTIVE('doubler')) $EXCLUDE_LIST .= " AND d.userid != ".getConfig('doubler_uid')."";
+ if (GET_EXT_VERSION('holiday') >= '0.1.3') $EXCLUDE_LIST .= " AND d.holiday_active='N'";
// Check for all accounts
ADD_SQL("SELECT DISTINCT d.userid, d.email, d.last_online
$TITLEs[] = getMessage('ADMIN_TASK_INACTIVE_AUTOPURGE_TITLE');
}
- if (GET_EXT_VERSION("sql_patches") >= "0.3.4") {
+ if (GET_EXT_VERSION('sql_patches') >= '0.3.4') {
// Check for accounts without referal
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_data` WHERE refid='0' ORDER BY userid");
$DESCRs[] = getMessage('ADMIN_TASK_LIST_ACCOUNT_NOREF');
$WHATs[] = "list_user&mode=norefs";
}
- if (EXT_IS_ACTIVE("payout")) {
+ if (EXT_IS_ACTIVE('payout')) {
// List new payout requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_payouts` WHERE `status`='NEW' ORDER BY userid");
$WHATs[] = "list_payouts";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_PAYOUTS_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("wernis")) {
+ if (EXT_IS_ACTIVE('wernis')) {
// List new wernis requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_wernis` ORDER BY userid");
$WHATs[] = "list_wernis";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_WERNIS_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("primera")) {
+ if (EXT_IS_ACTIVE('primera')) {
// List new primera requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_primera` ORDER BY userid");
$WHATs[] = "list_primera";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_PRIMERA_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("holiday")) {
+ if (EXT_IS_ACTIVE('holiday')) {
// List holiday requests
ADD_SQL("SELECT userid FROM `{!_MYSQL_PREFIX!}_user_holidays` ORDER BY userid");
$WHATs[] = "list_holiday";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_HOLIDAYS_TITLE');
}
- if (GET_EXT_VERSION("bonus") >= "0.8.7") {
+ if (GET_EXT_VERSION('bonus') >= '0.8.7') {
// List all notifications
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_bonus` WHERE is_notify='Y' ORDER BY timestamp DESC");
$WHATs[] = "list_notifications";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_NOTIFICATIONS_TITLE');
} // END - if
- if (GET_EXT_VERSION("bonus") >= "0.2.3") {
+ if (GET_EXT_VERSION('bonus') >= '0.2.3') {
// Active rallye
- if (GET_EXT_VERSION("bonus") >= "0.6.9") {
+ if (GET_EXT_VERSION('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";
+ 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 ???
}
// Autopurge installed?
- $lastOnline = "";
- if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
+ $lastOnline = '';
+ if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
}
$TITLEs[] = getMessage('ADMIN_TASK_LIST_BONUS_TITLE');
}
- if (GET_EXT_VERSION("beg") >= "0.1.2") {
+ if (GET_EXT_VERSION('beg') >= '0.1.2') {
// Begging rallye
// Autopurge installed?
- $lastOnline = "";
- if ((EXT_IS_ACTIVE("autopurge")) && (getConfig('autopurge_inactive') == "Y") && (getConfig('ap_inactive_since') > 0)) {
+ $lastOnline = '';
+ if ((EXT_IS_ACTIVE('autopurge')) && (getConfig('autopurge_inactive') == 'Y') && (getConfig('ap_inactive_since') > 0)) {
// Use last online timestamp to keep inactive members away from here
$lastOnline = sprintf(" AND last_online >= (UNIX_TIMESTAMP() - %s)", getConfig('ap_inactive_since'));
}
$TITLEs[] = getMessage('ADMIN_TASK_LIST_BEG_TITLE');
}
- if (EXT_IS_ACTIVE("doubler")) {
+ if (EXT_IS_ACTIVE('doubler')) {
// List waiting payouts
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_doubler` WHERE completed='N' ORDER BY `id`");
$WHATs[] = "list_doubler&mode=waiting&select=all";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_ENGINE_URLS_TITLE');
}
- if (EXT_IS_ACTIVE("sponsor")) {
+ if (EXT_IS_ACTIVE('sponsor')) {
// List all sponsors
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_sponsor_data` ORDER BY `id`");
$WHATs[] = "list_sponsor";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_SPONSOR_ORDERS_TITLE');
}
- if (EXT_IS_ACTIVE("country")) {
+ if (EXT_IS_ACTIVE('country')) {
// List country codes
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_countries` ORDER BY `id`");
$WHATs[] = "list_country";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_COUNTRY_TITLE');
}
- if (EXT_IS_ACTIVE("theme")) {
+ if (EXT_IS_ACTIVE('theme')) {
// List all themes
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_themes` ORDER BY `id`");
$WHATs[] = "theme_edit";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_THEME_ACTIVE_TITLE');
}
- if (EXT_IS_ACTIVE("admins")) {
+ if (EXT_IS_ACTIVE('admins')) {
// List all administrator logins
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_admins` ORDER BY `id`");
$WHATs[] = "admins_edit";
$TITLEs[] = getMessage('ADMIN_TASK_LIST_ADMINS_ALL_TITLE');
}
- if (EXT_IS_ACTIVE("surfbar")) {
+ if (EXT_IS_ACTIVE('surfbar')) {
// List all URLs in surfbar
ADD_SQL("SELECT id FROM `{!_MYSQL_PREFIX!}_surfbar_urls` ORDER BY `id`");
$WHATs[] = "list_surfbar_urls";
//
function TASK_CREATE_EXTRA_ROWS ($WHATs, $DESCRs, $TITLEs) {
// Init variables
- $OUT = ""; $SW = 2;
+ $OUT = ''; $SW = 2;
// Sadly this cannot be rewritten to a filter... :(
foreach (GET_SQLS() as $key => $sql) {