X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Flibs%2Ftask_functions.php;h=8d9e24c187edba13d46f425116cfe3ff97d2cf4d;hb=bb3d322203724ae9026368c8da7bda02da01940e;hp=4d46c1d395bd859d39c0c590c0601c8ee84a096f;hpb=debaac55fafff501de5077f3672623c0d738a5b2;p=mailer.git diff --git a/inc/libs/task_functions.php b/inc/libs/task_functions.php index 4d46c1d395..8d9e24c187 100644 --- a/inc/libs/task_functions.php +++ b/inc/libs/task_functions.php @@ -10,10 +10,10 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Spezielle task-Funktionen * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * @@ -38,7 +38,7 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } @@ -53,19 +53,19 @@ if (!defined('__SECURITY')) { // @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(); // Chheck for new extensions and updates - $JOBS_DONE = OUTPUT_STANDARD_OVERVIEW($result_main); + $jobsDone = OUTPUT_STANDARD_OVERVIEW($result_main); // Init SQLs INIT_SQLS(); - if (!$JOBS_DONE) { + if (!$jobsDone) { // New extensions or updates found $value = GET_TOTAL_DATA(GET_CURRENT_ADMIN_ID(), "task_system", "id", "assigned_admin", true, " AND `status`='NEW' AND task_type='EXTENSION_UPDATE'"); @@ -82,7 +82,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // 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', "".$value.""); @@ -91,7 +91,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { } // 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', "".$value.""); @@ -100,7 +100,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { } // 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', "".$value.""); @@ -199,7 +199,7 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // // 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); @@ -212,17 +212,17 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // // 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', "".$value.""); } 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', "{--ADMIN_EXT_BONUS_404--}"); } @@ -234,35 +234,35 @@ function OUTPUT_ADVANCED_OVERVIEW (&$result_main) { // // 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', "".$value.""); } 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 @@ -275,7 +275,7 @@ ORDER BY d.userid"); $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'); @@ -283,7 +283,7 @@ ORDER BY d.userid"); $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"; @@ -295,7 +295,7 @@ ORDER BY d.userid"); $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"; @@ -303,7 +303,7 @@ ORDER BY d.userid"); $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"; @@ -311,7 +311,7 @@ ORDER BY d.userid"); $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"; @@ -319,7 +319,7 @@ ORDER BY d.userid"); $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"; @@ -327,16 +327,16 @@ ORDER BY d.userid"); $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 ??? @@ -344,8 +344,8 @@ ORDER BY d.userid"); } // 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')); } @@ -359,12 +359,12 @@ ORDER BY points DESC, userid"); $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')); } @@ -377,7 +377,7 @@ ORDER BY beg_points DESC, userid"); $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"; @@ -447,7 +447,7 @@ ORDER BY beg_points DESC, userid"); $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"; @@ -485,7 +485,7 @@ ORDER BY beg_points DESC, userid"); $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"; @@ -493,7 +493,7 @@ ORDER BY beg_points DESC, userid"); $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"; @@ -507,7 +507,7 @@ ORDER BY beg_points DESC, userid"); $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"; @@ -515,7 +515,7 @@ ORDER BY beg_points DESC, userid"); $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"; @@ -545,7 +545,7 @@ ORDER BY beg_points DESC, userid"); // 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) {