From aa63aed07428a99ea09002c8d072990677700080 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Tue, 17 Mar 2009 00:26:41 +0000 Subject: [PATCH] More double- to single-quotes rewritten --- inc/functions.php | 42 +++++----- inc/header.php | 8 +- inc/libs/bonus_functions.php | 8 +- inc/libs/doubler_functions.php | 12 +-- inc/libs/newsletter_functions.php | 6 +- inc/libs/rallye_functions.php | 74 +++++++++--------- inc/libs/register_functions.php | 2 +- inc/libs/surfbar_functions.php | 4 +- inc/mails/beg_mails.php | 14 ++-- inc/mails/bonus_mails.php | 14 ++-- inc/modules/admin/admin-inc.php | 16 ++-- inc/modules/admin/overview-inc.php | 2 +- inc/modules/admin/what-config_admins.php | 8 +- .../admin/what-config_rallye_prices.php | 4 +- inc/modules/admin/what-config_rewrite.php | 2 +- inc/modules/admin/what-extensions.php | 4 +- inc/modules/admin/what-list_holiday.php | 2 +- inc/modules/admin/what-list_payouts.php | 4 +- inc/modules/admin/what-list_primera.php | 2 +- inc/modules/admin/what-list_rallyes.php | 4 +- inc/modules/admin/what-list_sponsor.php | 2 +- inc/modules/admin/what-list_surfbar_urls.php | 2 +- inc/modules/admin/what-list_task.php | 2 +- inc/modules/admin/what-list_user.php | 26 +++---- inc/modules/admin/what-list_wernis.php | 2 +- inc/modules/admin/what-theme_check.php | 2 +- inc/modules/admin/what-usr_online.php | 4 +- inc/modules/frametester.php | 6 +- inc/modules/guest/what-active.php | 12 +-- inc/modules/guest/what-sponsor_login.php | 10 +-- inc/modules/guest/what-top10.php | 6 +- inc/modules/member/what-mydata.php | 18 ++--- inc/modules/member/what-payout.php | 4 +- inc/modules/member/what-points.php | 8 +- inc/modules/member/what-refback.php | 2 +- inc/modules/member/what-reflist.php | 2 +- inc/modules/member/what-stats.php | 2 +- inc/modules/member/what-surfbar_list.php | 2 +- inc/modules/member/what-transfer.php | 10 +-- inc/mysql-manager.php | 76 +++++++++---------- inc/stylesheet.php | 8 +- 41 files changed, 219 insertions(+), 219 deletions(-) diff --git a/inc/functions.php b/inc/functions.php index 8a2ad0e162..12d38f394d 100644 --- a/inc/functions.php +++ b/inc/functions.php @@ -263,47 +263,47 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { $date_time = MAKE_DATETIME(time(), "1"); // Base directory - $BASE = sprintf("%stemplates/%s/html/", constant('PATH'), GET_LANGUAGE()); - $MODE = ''; + $basePath = sprintf("%stemplates/%s/html/", constant('PATH'), GET_LANGUAGE()); + $mode = ''; // Check for admin/guest/member templates if (strpos($template, "admin_") > -1) { // Admin template found - $MODE = "admin/"; + $mode = "admin/"; } elseif (strpos($template, "guest_") > -1) { // Guest template found - $MODE = "guest/"; + $mode = "guest/"; } elseif (strpos($template, "member_") > -1) { // Member template found - $MODE = "member/"; + $mode = "member/"; } elseif (strpos($template, "install_") > -1) { // Installation template found - $MODE = "install/"; + $mode = "install/"; } elseif (strpos($template, "ext_") > -1) { // Extension template found - $MODE = "ext/"; + $mode = "ext/"; } elseif (strpos($template, "la_") > -1) { // "Logical-area" template found - $MODE = "la/"; + $mode = "la/"; } else { // Test for extension $test = substr($template, 0, strpos($template, "_")); if (EXT_IS_ACTIVE($test)) { // Set extra path to extension's name - $MODE = $test."/"; + $mode = $test."/"; } } //////////////////////// // Generate file name // //////////////////////// - $FQFN = $BASE.$MODE.$template.".tpl"; + $FQFN = $basePath.$mode.$template.".tpl"; - if ((!empty($GLOBALS['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($MODE == "guest/") || ($MODE == "member/") || ($MODE == "admin/"))) { + if ((!empty($GLOBALS['what'])) && ((strpos($template, "_header") > 0) || (strpos($template, "_footer") > 0)) && (($mode == "guest/") || ($mode == "member/") || ($mode == "admin/"))) { // Select what depended header/footer template file for admin/guest/member area $file2 = sprintf("%s%s%s_%s.tpl", - $BASE, - $MODE, + $basePath, + $mode, $template, SQL_ESCAPE($GLOBALS['what']) ); @@ -318,7 +318,7 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) { // Does the special template exists? if (!FILE_READABLE($FQFN)) { // Reset to default template - $FQFN = $BASE.$template.".tpl"; + $FQFN = $basePath.$template.".tpl"; } // END - if // Now does the final template exists? @@ -819,34 +819,34 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID='0') { $DATA['email'] = $email; // Base directory - $BASE = sprintf("%stemplates/%s/emails/", constant('PATH'), GET_LANGUAGE()); + $basePath = sprintf("%stemplates/%s/emails/", constant('PATH'), GET_LANGUAGE()); // Check for admin/guest/member templates if (strpos($template, "admin_") > -1) { // Admin template found - $FQFN = $BASE."admin/".$template.".tpl"; + $FQFN = $basePath."admin/".$template.".tpl"; } elseif (strpos($template, "guest_") > -1) { // Guest template found - $FQFN = $BASE."guest/".$template.".tpl"; + $FQFN = $basePath."guest/".$template.".tpl"; } elseif (strpos($template, "member_") > -1) { // Member template found - $FQFN = $BASE."member/".$template.".tpl"; + $FQFN = $basePath."member/".$template.".tpl"; } else { // Test for extension $test = substr($template, 0, strpos($template, "_")); if (EXT_IS_ACTIVE($test)) { // Set extra path to extension's name - $FQFN = $BASE.$test."/".$template.".tpl"; + $FQFN = $basePath.$test."/".$template.".tpl"; } else { // No special filename - $FQFN = $BASE.$template.".tpl"; + $FQFN = $basePath.$template.".tpl"; } } // Does the special template exists? if (!FILE_READABLE($FQFN)) { // Reset to default template - $FQFN = $BASE.$template.".tpl"; + $FQFN = $basePath.$template.".tpl"; } // END - if // Now does the final template exists? diff --git a/inc/header.php b/inc/header.php index 642ef5508a..f729ec3ed0 100644 --- a/inc/header.php +++ b/inc/header.php @@ -71,10 +71,10 @@ if (($GLOBALS['header_sent'] != "1") && ($GLOBALS['header_sent'] != "2")) { if ((getConfig('enable_mod_title') == 'Y') || ((empty($GLOBALS['what'])) && (empty($GLOBALS['action']))) || ($GLOBALS['module'] == 'admin')) $TITLE .= " ".trim(getConfig('title_middle'))." ".ADD_MODULE_TITLE($GLOBALS['module']); // Add title from what file - $MODE = ''; - if ($GLOBALS['module'] == "login") $MODE = 'member'; - elseif ($GLOBALS['module'] == 'index') $MODE = 'guest'; - if ((!empty($MODE)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".GET_MOD_DESCR($MODE, $GLOBALS['what']); + $mode = ''; + if ($GLOBALS['module'] == "login") $mode = 'member'; + elseif ($GLOBALS['module'] == 'index') $mode = 'guest'; + if ((!empty($mode)) && (getConfig('enable_what_title') == 'Y')) $TITLE .= " ".trim(getConfig('title_middle'))." ".GET_MOD_DESCR($mode, $GLOBALS['what']); // Add title decorations? (right) if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != "")) $TITLE .= " ".trim(getConfig('title_right')); diff --git a/inc/libs/bonus_functions.php b/inc/libs/bonus_functions.php index eb59536d4b..4f66122397 100644 --- a/inc/libs/bonus_functions.php +++ b/inc/libs/bonus_functions.php @@ -153,7 +153,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) { array($type, $data, $rank), __FUNCTION__, __LINE__); // Nothing found by default - $userid = "---"; $points = "---"; + $userid = '---'; $points = '---'; // Are you one of them? if (SQL_NUMROWS($result_users) == 1) { @@ -189,7 +189,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) { return $OUT; } // -function BONUS_POINTS_HANDLER ($MODE) { +function BONUS_POINTS_HANDLER ($mode) { // Shall we add bonus points? if (getConfig('bonus_active') != 'Y') return; @@ -199,12 +199,12 @@ function BONUS_POINTS_HANDLER ($MODE) { UPDATE_CONFIG('bonus_mode', "JACKPOT"); } // END - if - if ($MODE == "login_bonus") { + if ($mode == "login_bonus") { // Login bonus detected $points = getConfig('login_bonus'); } else { // Direct points supplied - $points = $MODE; + $points = $mode; } // Subtract points from... diff --git a/inc/libs/doubler_functions.php b/inc/libs/doubler_functions.php index f08adfbccd..a5ab337851 100644 --- a/inc/libs/doubler_functions.php +++ b/inc/libs/doubler_functions.php @@ -50,11 +50,11 @@ function DOUBLER_GENERATE_TABLE ($uid="0", $done='N', $ref='N', $sort="ASC") { if ($uid > 0) { // Load entries only from a single user $add = " AND userid='".bigintval($uid)."'"; - $MODE = 'member'; $COLS = "4"; $DT_MODE = "2"; + $mode = 'member'; $COLS = "4"; $DT_MODE = "2"; $NOT_FOUND = getMessage('DOUBLER_MEMBER_NO_ENTRIES_FOUND'); } else { // Guest mode! - $MODE = 'guest'; $COLS = "3"; $DT_MODE = "3"; + $mode = 'guest'; $COLS = "3"; $DT_MODE = "3"; $NOT_FOUND = getMessage('DOUBLER_GUEST_NO_ENTRIES_FOUND'); } @@ -83,8 +83,8 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); // Rewrite userid/refid only if admin is in if (IS_ADMIN()) { // Set links to admin area - if ($content['userid'] > 0) { $content['userid'] = ADMIN_USER_PROFILE_LINK($content['userid']); } else { $content['userid'] = "---"; } - if ($content['refid'] > 0) { $content['refid'] = ADMIN_USER_PROFILE_LINK($content['refid']); } else { $content['refid'] = "---"; } + if ($content['userid'] > 0) { $content['userid'] = ADMIN_USER_PROFILE_LINK($content['userid']); } else { $content['userid'] = '---'; } + if ($content['refid'] > 0) { $content['refid'] = ADMIN_USER_PROFILE_LINK($content['refid']); } else { $content['refid'] = '---'; } } // END - if // Prepare data for the row template @@ -97,7 +97,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); ); // Load template and switch color - $OUT .= LOAD_TEMPLATE($MODE."_doubler_list_rows", true, $content); + $OUT .= LOAD_TEMPLATE($mode."_doubler_list_rows", true, $content); $SW = 3 - $SW; } @@ -113,7 +113,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__); } // Return template - return LOAD_TEMPLATE($MODE."_doubler_list", true, $OUT); + return LOAD_TEMPLATE($mode."_doubler_list", true, $OUT); } // diff --git a/inc/libs/newsletter_functions.php b/inc/libs/newsletter_functions.php index e44554ef03..0f0e276de0 100644 --- a/inc/libs/newsletter_functions.php +++ b/inc/libs/newsletter_functions.php @@ -153,11 +153,11 @@ function NL_INSERT_URLS ($text) { } // -function SEND_NEWSLETTER ($to, $subject, $message, $MODE) { +function SEND_NEWSLETTER ($to, $subject, $message, $mode) { // Send mail away as HTML if (REQUEST_POST('auto_urls') == 'Y') { // Automatically insert URLs into newsletter - if ((EXT_IS_ACTIVE('html_mail')) && ($MODE == 'html')) { + if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) { // Send HTML mail SEND_EMAIL($to, $subject, HTML_INSERT_URLS($message), "Y"); } else { @@ -166,7 +166,7 @@ function SEND_NEWSLETTER ($to, $subject, $message, $MODE) { } } else { // Regular send-out - if ((EXT_IS_ACTIVE('html_mail')) && ($MODE == 'html')) { + if ((EXT_IS_ACTIVE('html_mail')) && ($mode == 'html')) { SEND_EMAIL($to, $subject, $message, "Y"); } else { SEND_EMAIL($to, $subject, $message, "N"); diff --git a/inc/libs/rallye_functions.php b/inc/libs/rallye_functions.php index 0a11d0f1a4..be5457cb61 100644 --- a/inc/libs/rallye_functions.php +++ b/inc/libs/rallye_functions.php @@ -135,7 +135,7 @@ function RALLYE_ADD_PRICES ($rallye, $mode='email') { switch($mode) { case 'email': $mode = "\n"; break; case 'html' : $mode = "
\n"; break; - } + } // END - switch // Load prices $result_prices = SQL_QUERY("SELECT price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id='".$rallye."' ORDER BY price_level", __FUNCTION__, __LINE__); @@ -205,7 +205,7 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT if (empty($refpoints)) $refpoints = 0; // Init userid for list - $_uid = "---"; + $_uid = '---'; // List only users with at least one ref! //* DEBUG: */ echo "*".$cnt."/".$content['userid']."/".$content['curr_points']."/".$refpoints."*
\n"; if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_uid = $content['userid']; } else { $cnt = ''; } @@ -214,21 +214,20 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT $DATA['uid'][] = $_uid; $DATA['ref'][] = $cnt; $DATA['cpoints'][] = $content['curr_points']; - } + } // END - while // Free memory SQL_FREERESULT($result); // Sort whole array - array_pk_sort($DATA, array("ref", "cpoints"), 0, 1, true); + array_pk_sort($DATA, array('ref', 'cpoints'), 0, 1, true); // Generate table $OUT = LOAD_TEMPLATE("guest_rallye_header", true); $SW = 2; - for ($idx = 0; $idx < $prices; $idx++) - { - if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = "---"; - if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = "---"; + for ($idx = 0; $idx < $prices; $idx++) { + if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = '---'; + if (empty($DATA['ref'][$idx])) $DATA['ref'][$idx] = '---'; // Add row $OUT .= "   ".($idx+1).". @@ -244,7 +243,8 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT $OUT .= " \n"; $SW = 3 - $SW; - } + } // END - for + // Add footer $OUT .= LOAD_TEMPLATE("guest_rallye_footer", true); @@ -285,11 +285,11 @@ function RALLYE_AUTOADD_USER ($uid) { // Add userid and his ref count to table SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_rallye_users` (rallye_id, userid, refs) VALUES ('%s','%s','0')", - array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__); - } else { - // Free memory - SQL_FREERESULT($result); - } + array(bigintval($id), bigintval($uid)), __FUNCTION__, __LINE__); + } // END - if + + // Free memory + SQL_FREERESULT($result); if ($notify == 'Y') { // Transfer all neccessary data to the global $DATA array @@ -528,7 +528,7 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND $users['uid'][] = $content['userid']; $users['ref'][] = abs($cnt - $content['refs']); $users['cpoints'][] = $refpoints - $content['curr_points']; - } + } // END - while // Free memory SQL_FREERESULT($result_user); @@ -544,9 +544,9 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND // We only need to check one element in $users, see above while() block if (isset($users['uid'][$k])) { $prices['uid'][$k] = $users['uid'][$k]; - if (empty($prices['uid'][$k])) $prices['uid'][$k] = "---"; + if (empty($prices['uid'][$k])) $prices['uid'][$k] = '---'; $prices['ref'][$k] = $users['ref'][$k]; - if (empty($prices['ref'][$k])) $prices['ref'][$k] = "---"; + if (empty($prices['ref'][$k])) $prices['ref'][$k] = '---'; $prices['cpoints'][$k] = $users['cpoints'][$k]; } // END - if } // END - foreach @@ -559,7 +559,7 @@ WHERE d.`status`='CONFIRMED' AND d.max_mails > 0 AND d.mails_confirmed >= %s AND function RALLYE_LIST_WINNERS ($rallye, $default=0) { // First check how many prices are set $result_prices = SQL_QUERY_ESC("SELECT id FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE rallye_id=%s ORDER BY price_level", - array(bigintval($rallye)), __FUNCTION__, __LINE__); + array(bigintval($rallye)), __FUNCTION__, __LINE__); $prices = SQL_NUMROWS($result_prices); SQL_FREERESULT($result_prices); @@ -574,16 +574,16 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) { // active = 1: account is still confirmed // active = 0: account is deleted or locked $result_active = SQL_QUERY_ESC("SELECT COUNT(userid) FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s AND `status`='CONFIRMED' LIMIT 1", - array(bigintval($DATA['uid'][$idx])), __FUNCTION__, __LINE__); + array(bigintval($DATA['uid'][$idx])), __FUNCTION__, __LINE__); list($active) = SQL_FETCHROW($result_active); SQL_FREERESULT($result_active); - if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = "---"; + if (empty($DATA['uid'][$idx])) $DATA['uid'][$idx] = '---'; if ((empty($DATA['ref'][$idx])) || ($DATA['ref'][$idx] == 0) || ($active == 0) || ("".round($DATA['cpoints'][$idx])."" == "0") || (empty($DATA['cpoints'][$idx]))) { // Allow valid and active users with at least one ref to get points - $DATA['ref'][$idx] = "---"; - $DATA['uid'][$idx] = "---"; - } + $DATA['ref'][$idx] = '---'; + $DATA['uid'][$idx] = '---'; + } // END - if if (!empty($DATA['info'][$idx])) { // Take direct infos @@ -614,7 +614,7 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) { $OUT .= " \n"; $SW = 3 - $SW; - } + } // END - for // Add footer $OUT .= LOAD_TEMPLATE("guest_rallye_expired_footer", true); @@ -676,20 +676,19 @@ VALUES ('NEW','RALLYE_PURGED','{--RALLYE_ADMIN_PURGED--}: %s','{--RALLYE_ADMIN_P function RALLYE_TEMPLATE_SELECTION ($name="template", $default="") { // Check templates directory $OUT = ''; $ral = array(); - $BASE = sprintf("%stemplates/%s/html/rallye/", constant('PATH'), GET_LANGUAGE()); - $dir = opendir($BASE); + $basePath = sprintf("%stemplates/%s/html/rallye/", constant('PATH'), GET_LANGUAGE()); + $dir = opendir($basePath) or mxchange_die(sprintf("Cannot open dir %s.", $basePath)); while ($read = readdir($dir)) { // If it is no dir (so a file) - if (!isDirectory($BASE.$read)) { + if (!isDirectory($basePath.$read)) { // Accept only templates matching with rallye_????.tpl.xx - if (eregi("^rallye_.*\.tpl", $read)) - { + if (eregi("^rallye_.*\.tpl", $read)) { $read = substr($read, 7, strpos($read, ".") - 7); // Accept only template names between 1 and 255 chars length if ((strlen($read) < 256) && (!empty($read))) $ral[] = $read; - } - } - } + } // END - if + } // END - if + } // END - while closedir($dir); // Do we have found templates which we can link with the new rallye? @@ -699,10 +698,10 @@ function RALLYE_TEMPLATE_SELECTION ($name="template", $default="") { $OUT = "\n"; } else { // No rallye templates found @@ -734,12 +733,13 @@ function RALLYE_GET_REFCOUNT ($uid, $old=0) { // Not interesting here... break; } - } + } // END - foreach // Abort also here! if ($cnt > 0) break; - } - } + } // END - if + } // END - foreach + //* DEBUG: */ echo "
";
 		//* DEBUG: */ print_r($GLOBALS['cache_array']['refsystem']);
 		//* DEBUG: */ echo "
"; diff --git a/inc/libs/register_functions.php b/inc/libs/register_functions.php index 473aa9c255..575f193a54 100644 --- a/inc/libs/register_functions.php +++ b/inc/libs/register_functions.php @@ -110,7 +110,7 @@ function REGISTER_OUTPUT_REQUIRE_CHECK (&$array) { } // -function REGISTER_ADD_CATEGORY_TABLE ($MODE, $return=false) { +function REGISTER_ADD_CATEGORY_TABLE ($mode, $return=false) { $OUT = ''; // Guests are mostly not interested in how many members has diff --git a/inc/libs/surfbar_functions.php b/inc/libs/surfbar_functions.php index 30baabbc70..131ab3b23f 100644 --- a/inc/libs/surfbar_functions.php +++ b/inc/libs/surfbar_functions.php @@ -352,7 +352,7 @@ function SURFBAR_MEMBER_DISPLAY_ACTION_FORM ($action, $urlData) { // Is the lock reason empty? if (empty($urlData['lock_reason'])) { // Fix it to three dashes - $urlData['lock_reason'] = "---"; + $urlData['lock_reason'] = '---'; } // END - if // Include fields only for action 'edit' @@ -959,7 +959,7 @@ function SURFBAR_CHECK_VALIDATION_CODE ($urlId, $check, $salt) { $code = SURFBAR_GENERATE_VALIDATION_CODE($urlId, $salt); // Return result of checking hashes and salts - //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "---".$code."|".$check."---", false); + //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, '---'.$code."|".$check.'---', false); //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "+++".$salt."|".SURFBAR_GET_DATA('last_salt')."+++", false); return (($code == $check) && ($salt == SURFBAR_GET_DATA('last_salt'))); } diff --git a/inc/mails/beg_mails.php b/inc/mails/beg_mails.php index c8d1c964e8..59f16516a3 100644 --- a/inc/mails/beg_mails.php +++ b/inc/mails/beg_mails.php @@ -49,7 +49,7 @@ if ($GLOBALS['output_mode'] == 1) return; // Create timemark from saved month $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time())); -$sql = ''; $MODE = ''; +$sql = ''; $mode = ''; // Shall I sent activation or deactivation mail? $sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (beg_ral_notify "; @@ -60,7 +60,7 @@ case 'Y': // Begging rallye is activated { // Okay, let's check for member accounts $sql .= "= 0 OR (beg_ral_notify > 0 AND beg_ral_en_notify < beg_ral_di_notify)"; - $MODE = "en"; + $mode = "en"; } else { @@ -74,7 +74,7 @@ case 'N': // Begging rallye is deactivated { // Okay, let's check for member accounts $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify"; - $MODE = "di"; + $mode = "di"; } else { @@ -107,10 +107,10 @@ if (!empty($sql)) { $result_main = SQL_QUERY($sql, __FILE__, __LINE__); if (SQL_NUMROWS($result_main) > 0) { // Normal notification mails or bonus mails? - $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE('bonus'))); + $sentBonusMails = ((getConfig('beg_notify_bonus') > 0) && ($mode == "en") && (EXT_IS_ACTIVE('bonus'))); // Generate subject line - $subject = constant('BEG_RALLYE_'.strtoupper($MODE).'_NOTIFY'); + $subject = constant('BEG_RALLYE_'.strtoupper($mode).'_NOTIFY'); // Load message body for bonus mails $message = LOAD_EMAIL_TEMPLATE("beg_en_notify_body", '', "{PER}uid{PER}"); @@ -123,7 +123,7 @@ if (!empty($sql)) { SET beg_ral_notify='%s', beg_ral_%s_notify='%s' WHERE userid=%s LIMIT 1", - array(time(), $MODE, time(), $content['userid']), __FILE__, __LINE__); + array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__); // Load email template and send it to the user! if ($sentBonusMails === true) { @@ -131,7 +131,7 @@ LIMIT 1", $UIDs[] = $content['userid']; } else { // Send normal notification mail to the members - $message = LOAD_EMAIL_TEMPLATE('beg_' . $MODE . '_notify', array(), $content['userid']); + $message = LOAD_EMAIL_TEMPLATE('beg_' . $mode . '_notify', array(), $content['userid']); SEND_EMAIL($content['email'], $subject, $message); } } // END - while diff --git a/inc/mails/bonus_mails.php b/inc/mails/bonus_mails.php index 041fd602f8..baddc4ad7a 100644 --- a/inc/mails/bonus_mails.php +++ b/inc/mails/bonus_mails.php @@ -49,7 +49,7 @@ if ($GLOBALS['output_mode'] == 1) return; // Create timemark from saved month $mark = mktime(0, 0, 0, getConfig('last_month'), date("d", time()), date('Y', time())); -$sql = ''; $MODE = ''; +$sql = ''; $mode = ''; // Shall I sent activation or deactivation mail? $sql = "SELECT userid, email FROM `{!_MYSQL_PREFIX!}_user_data` WHERE (bonus_ral_notify "; @@ -59,7 +59,7 @@ case 'Y': // Active rallye is activated if (getConfig('bonus_en_notify') == 'Y') { // Okay, let's check for member accounts $sql .= "= 0 OR (bonus_ral_notify > 0 AND bonus_ral_en_notify < bonus_ral_di_notify)"; - $MODE = "en"; + $mode = "en"; } else { // Do not notify! $sql = ''; @@ -70,7 +70,7 @@ case 'N': // Active rallye is deactivated if (getConfig('bonus_di_notify') == 'Y') { // Okay, let's check for member accounts $sql .= " > 0 AND bonus_ral_di_notify < bonus_ral_en_notify"; - $MODE = "di"; + $mode = "di"; } else { // Do not notify! $sql = ''; @@ -83,10 +83,10 @@ if (!empty($sql)) { $sql .= ") AND `status`='CONFIRMED' ORDER BY last_online ASC"; // Normal notification mails or bonus mails? - $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($MODE == "en") && (EXT_IS_ACTIVE('bonus'))); + $sentBonusMails = ((getConfig('bonus_notify_points') > 0) && ($mode == "en") && (EXT_IS_ACTIVE('bonus'))); // Generate subject line - $subject = constant('BONUS_RALLYE_'.strtoupper($MODE).'_NOTIFY'); + $subject = constant('BONUS_RALLYE_'.strtoupper($mode).'_NOTIFY'); // Load message body for bonus mails $message = LOAD_EMAIL_TEMPLATE('bonus_en_notify_body', '', '{PER}uid{PER}'); @@ -102,7 +102,7 @@ if (!empty($sql)) { SET bonus_ral_notify='%s', bonus_ral_%s_notify='%s' WHERE userid=%s LIMIT 1", - array(time(), $MODE, time(), $content['userid']), __FILE__, __LINE__); + array(time(), $mode, time(), $content['userid']), __FILE__, __LINE__); // Load email template and send it to the user! if ($sentBonusMails === true) { @@ -110,7 +110,7 @@ LIMIT 1", $UIDs[] = $content['userid']; } else { // Send normal notification mail to the members - $message = LOAD_EMAIL_TEMPLATE('bonus_' . $MODE . '_notify', array(), $content['userid']); + $message = LOAD_EMAIL_TEMPLATE('bonus_' . $mode . '_notify', array(), $content['userid']); SEND_EMAIL($content['email'], $subject, $message); } } // END - while diff --git a/inc/modules/admin/admin-inc.php b/inc/modules/admin/admin-inc.php index a0330bdc56..82b3c4202c 100644 --- a/inc/modules/admin/admin-inc.php +++ b/inc/modules/admin/admin-inc.php @@ -520,14 +520,14 @@ function ADD_MEMBER_SELECTION_BOX ($def="0", $add_all=false, $return=false, $non } // Create a menu selection box for given menu system -function ADMIN_MENU_SELECTION ($MODE, $default="", $defid="") { +function ADMIN_MENU_SELECTION ($mode, $default="", $defid="") { $wht = "`what` != ''"; - if ($MODE == "action") $wht = "(`what`='' OR `what` IS NULL) AND action !='login'"; + if ($mode == "action") $wht = "(`what`='' OR `what` IS NULL) AND action !='login'"; $result = SQL_QUERY_ESC("SELECT %s, title FROM `{!_MYSQL_PREFIX!}_admin_menu` WHERE ".$wht." ORDER BY `sort`", - array($MODE), __FUNCTION__, __LINE__); + array($mode), __FUNCTION__, __LINE__); if (SQL_NUMROWS($result) > 0) { // Load menu as selection - $OUT = "