More double- to single-quotes rewritten
authorRoland Häder <roland@mxchange.org>
Tue, 17 Mar 2009 00:26:41 +0000 (00:26 +0000)
committerRoland Häder <roland@mxchange.org>
Tue, 17 Mar 2009 00:26:41 +0000 (00:26 +0000)
41 files changed:
inc/functions.php
inc/header.php
inc/libs/bonus_functions.php
inc/libs/doubler_functions.php
inc/libs/newsletter_functions.php
inc/libs/rallye_functions.php
inc/libs/register_functions.php
inc/libs/surfbar_functions.php
inc/mails/beg_mails.php
inc/mails/bonus_mails.php
inc/modules/admin/admin-inc.php
inc/modules/admin/overview-inc.php
inc/modules/admin/what-config_admins.php
inc/modules/admin/what-config_rallye_prices.php
inc/modules/admin/what-config_rewrite.php
inc/modules/admin/what-extensions.php
inc/modules/admin/what-list_holiday.php
inc/modules/admin/what-list_payouts.php
inc/modules/admin/what-list_primera.php
inc/modules/admin/what-list_rallyes.php
inc/modules/admin/what-list_sponsor.php
inc/modules/admin/what-list_surfbar_urls.php
inc/modules/admin/what-list_task.php
inc/modules/admin/what-list_user.php
inc/modules/admin/what-list_wernis.php
inc/modules/admin/what-theme_check.php
inc/modules/admin/what-usr_online.php
inc/modules/frametester.php
inc/modules/guest/what-active.php
inc/modules/guest/what-sponsor_login.php
inc/modules/guest/what-top10.php
inc/modules/member/what-mydata.php
inc/modules/member/what-payout.php
inc/modules/member/what-points.php
inc/modules/member/what-refback.php
inc/modules/member/what-reflist.php
inc/modules/member/what-stats.php
inc/modules/member/what-surfbar_list.php
inc/modules/member/what-transfer.php
inc/mysql-manager.php
inc/stylesheet.php

index 8a2ad0e162084d1993b525b9b2c694a59ef05d77..12d38f394d37a61351d89f82ff7e7706e95cd0b3 100644 (file)
@@ -263,47 +263,47 @@ function LOAD_TEMPLATE ($template, $return=false, $content=array()) {
        $date_time = MAKE_DATETIME(time(), "1");
 
        // Base directory
        $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
 
        // 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
        } elseif (strpos($template, "guest_") > -1) {
                // Guest template found
-               $MODE = "guest/";
+               $mode = "guest/";
        } elseif (strpos($template, "member_") > -1) {
                // Member template found
        } elseif (strpos($template, "member_") > -1) {
                // Member template found
-               $MODE = "member/";
+               $mode = "member/";
        } elseif (strpos($template, "install_") > -1) {
                // Installation template found
        } elseif (strpos($template, "install_") > -1) {
                // Installation template found
-               $MODE = "install/";
+               $mode = "install/";
        } elseif (strpos($template, "ext_") > -1) {
                // Extension template found
        } elseif (strpos($template, "ext_") > -1) {
                // Extension template found
-               $MODE = "ext/";
+               $mode = "ext/";
        } elseif (strpos($template, "la_") > -1) {
                // "Logical-area" template found
        } 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
        } 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 //
        ////////////////////////
                }
        }
 
        ////////////////////////
        // 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",
                // 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'])
                );
                        $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
        // 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?
        } // 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
        $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
 
        // 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
        } 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
        } 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
        } 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
                } 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
                }
        }
 
        // 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?
        } // END - if
 
        // Now does the final template exists?
index 642ef5508aea30b82cb61ba4f824536fa7e64630..f729ec3ed0926cad6ff7ac782986fcbaf74b859f 100644 (file)
@@ -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
                                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'));
 
                                // Add title decorations? (right)
                                if ((getConfig('enable_title_deco') == 'Y') && (getConfig('title_right') != "")) $TITLE .= " ".trim(getConfig('title_right'));
index eb59536d4b050422ba39218ca982ca6c5e4e9a66..4f66122397515b5008fe7a95a2ec55c8ff9c0c31 100644 (file)
@@ -153,7 +153,7 @@ function BONUS_MAKE_RANK_ROWS ($data, $type, $uid) {
                                array($type, $data, $rank), __FUNCTION__, __LINE__);
 
                        // Nothing found by default
                                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) {
 
                        // 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;
 }
 //
        return $OUT;
 }
 //
-function BONUS_POINTS_HANDLER ($MODE) {
+function BONUS_POINTS_HANDLER ($mode) {
        // Shall we add bonus points?
        if (getConfig('bonus_active') != 'Y') return;
 
        // 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
 
                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
                // Login bonus detected
                $points = getConfig('login_bonus');
        } else {
                // Direct points supplied
-               $points = $MODE;
+               $points = $mode;
        }
 
        // Subtract points from...
        }
 
        // Subtract points from...
index f08adfbccdf4810ff063ac6074df7efde12673c7..a5ab337851787127fcd52100af827005d06b79ed 100644 (file)
@@ -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)."'";
        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!
                $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');
        }
 
                $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
                        // 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
                        } // END - if
 
                        // Prepare data for the row template
@@ -97,7 +97,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__);
                        );
 
                        // Load template and switch color
                        );
 
                        // 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;
                }
 
                        $SW = 3 - $SW;
                }
 
@@ -113,7 +113,7 @@ LIMIT ".$limit, __FUNCTION__, __LINE__);
        }
 
        // Return template
        }
 
        // Return template
-       return LOAD_TEMPLATE($MODE."_doubler_list", true, $OUT);
+       return LOAD_TEMPLATE($mode."_doubler_list", true, $OUT);
 }
 
 //
 }
 
 //
index e44554ef0367efc048a767bbdf4ea207e5b90744..0f0e276de00f94475cf3c3c6b487af50451981cf 100644 (file)
@@ -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
        // 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 {
                        // 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
                }
        } 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");
                        SEND_EMAIL($to, $subject, $message, "Y");
                } else {
                        SEND_EMAIL($to, $subject, $message, "N");
index 0a11d0f1a4de60313f4e6ccb8dce6ea0b1537674..be5457cb612ef6583b562a5e7cddf0831762bb72 100644 (file)
@@ -135,7 +135,7 @@ function RALLYE_ADD_PRICES ($rallye, $mode='email') {
        switch($mode) {
                case 'email': $mode = "\n";     break;
                case 'html' : $mode = "<br />\n"; break;
        switch($mode) {
                case 'email': $mode = "\n";     break;
                case 'html' : $mode = "<br />\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__);
 
        // 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
                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."*<br />\n";
                if (($cnt > 0) && ($refpoints > $content['curr_points'])) { $_uid = $content['userid']; } else { $cnt = ''; }
                // List only users with at least one ref!
                //* DEBUG: */ echo "*".$cnt."/".$content['userid']."/".$content['curr_points']."/".$refpoints."*<br />\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'];
                $DATA['uid'][]     = $_uid;
                $DATA['ref'][]     = $cnt;
                $DATA['cpoints'][] = $content['curr_points'];
-       }
+       } // END - while
 
        // Free memory
        SQL_FREERESULT($result);
 
        // Sort whole array
 
        // 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;
 
        // 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 .= "<tr>
   <td class=\"switch_sw".$SW." bottom2\">&nbsp;&nbsp;".($idx+1).".</td>
                // Add row
                $OUT .= "<tr>
   <td class=\"switch_sw".$SW." bottom2\">&nbsp;&nbsp;".($idx+1).".</td>
@@ -244,7 +243,8 @@ LIMIT 1", array(bigintval($content['userid']), getConfig('ref_payout')), __FUNCT
                $OUT .= "</td>
 </tr>\n";
                $SW = 3 - $SW;
                $OUT .= "</td>
 </tr>\n";
                $SW = 3 - $SW;
-       }
+       } // END - for
+
        // Add footer
        $OUT .= LOAD_TEMPLATE("guest_rallye_footer", true);
 
        // 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')",
                        // 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
 
                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'];
                $users['uid'][]     = $content['userid'];
                $users['ref'][]     = abs($cnt - $content['refs']);
                $users['cpoints'][] = $refpoints - $content['curr_points'];
-       }
+       } // END - while
 
        // Free memory
        SQL_FREERESULT($result_user);
 
        // 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];
                // 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];
                        $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
                        $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",
 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);
 
        $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",
                //   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);
 
                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
                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
 
                if (!empty($DATA['info'][$idx])) {
                        // Take direct infos
@@ -614,7 +614,7 @@ function RALLYE_LIST_WINNERS ($rallye, $default=0) {
                $OUT .= "</td>
 </tr>\n";
                $SW = 3 - $SW;
                $OUT .= "</td>
 </tr>\n";
                $SW = 3 - $SW;
-       }
+       } // END - for
 
        // Add footer
        $OUT .= LOAD_TEMPLATE("guest_rallye_expired_footer", true);
 
        // 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();
 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)
        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
                        // 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;
                                $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?
        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  = "<select name=\"".$name."\" size=\"1\" class=\"admin_select\">
   <option value=\"\">{--SELECT_NONE--}</option>\n";
                foreach ($ral as $rallye) {
                $OUT  = "<select name=\"".$name."\" size=\"1\" class=\"admin_select\">
   <option value=\"\">{--SELECT_NONE--}</option>\n";
                foreach ($ral as $rallye) {
-                    $OUT .= "  <option value=\"".$rallye."\"";
+                       $OUT .= "  <option value=\"".$rallye."\"";
                        if ($default == $rallye) $OUT .= ' selected="selected"';
                        $OUT .= ">".$rallye."</option>\n";
                        if ($default == $rallye) $OUT .= ' selected="selected"';
                        $OUT .= ">".$rallye."</option>\n";
-               }
+               } // END - foreach
                $OUT .= "</select>\n";
        } else {
                // No rallye templates found
                $OUT .= "</select>\n";
        } else {
                // No rallye templates found
@@ -734,12 +733,13 @@ function RALLYE_GET_REFCOUNT ($uid, $old=0) {
                                                // Not interesting here...
                                                break;
                                        }
                                                // Not interesting here...
                                                break;
                                        }
-                               }
+                               } // END - foreach
 
                                // Abort also here!
                                if ($cnt > 0) break;
 
                                // Abort also here!
                                if ($cnt > 0) break;
-                       }
-               }
+                       } // END - if
+               } // END - foreach
+
                //* DEBUG: */ echo "<pre>";
                //* DEBUG: */ print_r($GLOBALS['cache_array']['refsystem']);
                //* DEBUG: */ echo "</pre>";
                //* DEBUG: */ echo "<pre>";
                //* DEBUG: */ print_r($GLOBALS['cache_array']['refsystem']);
                //* DEBUG: */ echo "</pre>";
index 473aa9c255037852d6d0520c364c14801a9e3de2..575f193a548304c1a68b9e10089c61a0083aa855 100644 (file)
@@ -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
        $OUT = '';
 
        // Guests are mostly not interested in how many members has
index 30baabbc708c55935d605b0259540f2e50f8b9ad..131ab3b23ff406362b3c76f3c64eed0cb6e87c28 100644 (file)
@@ -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
        // 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'
        } // 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
        $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')));
 }
        //* DEBUG: */ DEBUG_LOG(__FUNCTION__, __LINE__, "+++".$salt."|".SURFBAR_GET_DATA('last_salt')."+++", false);
        return (($code == $check) && ($salt == SURFBAR_GET_DATA('last_salt')));
 }
index c8d1c964e8001a137c2e32b785f801a0bebca9fa..59f16516a34c1d27e48ea365422ecf47fd9257dd 100644 (file)
@@ -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()));
 
 // 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 ";
 
 // 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)";
        {
                // 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
        {
        }
         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";
        {
                // Okay, let's check for member accounts
                $sql .= " > 0 AND beg_ral_di_notify < beg_ral_en_notify";
-               $MODE = "di";
+               $mode = "di";
        }
         else
        {
        }
         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?
        $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
 
                // 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}");
 
                // 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",
 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) {
 
                        // 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
                                $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
                                SEND_EMAIL($content['email'], $subject, $message);
                        }
                } // END - while
index 041fd602f89d3a493e073d92fa4ba43867d36f3e..baddc4ad7a4340aeab1a56cb22151d1455bc7fa0 100644 (file)
@@ -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()));
 
 // 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 ";
 
 // 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)";
        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 = '';
        } 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";
        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 = '';
        } 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?
        $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
 
        // 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}');
 
        // 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",
 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) {
 
                        // 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
                                $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
                                SEND_EMAIL($content['email'], $subject, $message);
                        }
                } // END - while
index a0330bdc5638ef76c0572789a0ef1869561c3911..82b3c4202c8faf5a543e4200dbb8ccbb03c41e81 100644 (file)
@@ -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
 }
 
 // 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` != ''";
        $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`",
        $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
        if (SQL_NUMROWS($result) > 0) {
                // Load menu as selection
-               $OUT = "<select name=\"".$MODE."_menu";
+               $OUT = "<select name=\"".$mode."_menu";
                if ((!empty($defid)) || ($defid == "0")) $OUT .= "[".$defid."]";
                $OUT .= "\" size=\"1\" class=\"admin_select\">
        <option value=\"\">{--SELECT_NONE--}</option>\n";
                if ((!empty($defid)) || ($defid == "0")) $OUT .= "[".$defid."]";
                $OUT .= "\" size=\"1\" class=\"admin_select\">
        <option value=\"\">{--SELECT_NONE--}</option>\n";
@@ -712,8 +712,8 @@ function ADMIN_USER_PROFILE_LINK ($uid, $title="", $wht="list_user") {
 // Check "logical-area-mode"
 function ADMIN_CHECK_MENU_MODE () {
        // Set the global mode as the mode for all admins
 // Check "logical-area-mode"
 function ADMIN_CHECK_MENU_MODE () {
        // Set the global mode as the mode for all admins
-       $MODE = getConfig('admin_menu');
-       $ADMIN = $MODE;
+       $mode = getConfig('admin_menu');
+       $ADMIN = $mode;
 
        // Get admin id
        $aid = GET_CURRENT_ADMIN_ID();
 
        // Get admin id
        $aid = GET_CURRENT_ADMIN_ID();
@@ -737,10 +737,10 @@ function ADMIN_CHECK_MENU_MODE () {
        }
 
        // Check what the admin wants and set it when it's not the global mode
        }
 
        // Check what the admin wants and set it when it's not the global mode
-       if ($ADMIN != "global") $MODE = $ADMIN;
+       if ($ADMIN != "global") $mode = $ADMIN;
 
        // Return admin-menu's mode
 
        // Return admin-menu's mode
-       return $MODE;
+       return $mode;
 }
 
 // Change activation status
 }
 
 // Change activation status
index edcb2df8cd1d8e1227e0e1022aa0e6547162cddf..4501489c6c8edab780e2fea6f19c5b8bb2b47841 100644 (file)
@@ -386,7 +386,7 @@ function OUTPUT_SELECTED_TASKS ($POST, $result_tasks) {
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result_tasks)) {
                        // Init infos
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result_tasks)) {
                        // Init infos
-                       $content['infos'] = "---";
+                       $content['infos'] = '---';
 
                        // Generate assign link
                        $content['assigned_admin'] = GENERATE_AID_LINK($content['assigned_admin']);
 
                        // Generate assign link
                        $content['assigned_admin'] = GENERATE_AID_LINK($content['assigned_admin']);
index 4dab2a6ff87ad14b71a7ccb199999ad1fe23e4b0..6b203e594fdcee3fdee497e553bd778e26e36a08 100644 (file)
@@ -119,8 +119,8 @@ if ((REQUEST_ISSET_POST('edit')) && ($SEL > 0)) {
                SQL_FREERESULT($result);
 
                // Prepare variables
                SQL_FREERESULT($result);
 
                // Prepare variables
-               if (empty($act)) $act = "---";
-               if (empty($wht)) $wht = "---";
+               if (empty($act)) $act = '---';
+               if (empty($wht)) $wht = '---';
 
                // Get admin mode
                $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
 
                // Get admin mode
                $mode = constant('ADMINS_'.strtoupper($mode).'_MODE');
@@ -226,8 +226,8 @@ VALUES ('%s','%s','%s','%s')",
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result_acls)) {
                        // Prepare variables
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result_acls)) {
                        // Prepare variables
-                       if (empty($content['action_menu'])) $content['action_menu'] = "---";
-                       if (empty($content['what_menu']))   $content['what_menu']   = "---";
+                       if (empty($content['action_menu'])) $content['action_menu'] = '---';
+                       if (empty($content['what_menu']))   $content['what_menu']   = '---';
 
                        // Get mode
                        $content['access_mode'] = constant('ADMINS_'.strtoupper($content['access_mode']).'_MODE');
 
                        // Get mode
                        $content['access_mode'] = constant('ADMINS_'.strtoupper($content['access_mode']).'_MODE');
index 3723a4a1684a41ffb4a1d8fe5f8d42a54242b8c7..87b725d80d1f2ea238f42982714ce6cbe040a947 100644 (file)
@@ -160,7 +160,7 @@ VALUES ('%s','%s','%s','%s')",
                                list($rallye, $level, $points, $infos) = SQL_FETCHROW($result);
                                SQL_FREERESULT($result);
 
                                list($rallye, $level, $points, $infos) = SQL_FETCHROW($result);
                                SQL_FREERESULT($result);
 
-                               if (empty($infos)) $infos = "---";
+                               if (empty($infos)) $infos = '---';
 
                                // Prepare data for the row template
                                $content = array(
 
                                // Prepare data for the row template
                                $content = array(
@@ -197,7 +197,7 @@ VALUES ('%s','%s','%s','%s')",
                        $OUT = ''; $SW = 2;
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Fix empty info
                        $OUT = ''; $SW = 2;
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Fix empty info
-                               if (empty($content['info'])) $content['info'] = "---";
+                               if (empty($content['info'])) $content['info'] = '---';
 
                                // Prepare data for the row template
                                // @TODO Rewritings: level->price_level, infos->info in template
 
                                // Prepare data for the row template
                                // @TODO Rewritings: level->price_level, infos->info in template
index 2f731194ef0296f1b9f12aa554faeeec555c2fdd..d06af5e61232bca2cd3cfef5e4f584556b2930b5 100644 (file)
@@ -68,7 +68,7 @@ if (IS_FORM_SENT()) {
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Set title to three dashes when no title is supplied
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Set title to three dashes when no title is supplied
-               if (empty($content['title'])) $content['title'] = "---";
+               if (empty($content['title'])) $content['title'] = '---';
 
                // Already registered module?
                if (ereg($content['module'], getConfig('rewrite_skip'))) {
 
                // Already registered module?
                if (ereg($content['module'], getConfig('rewrite_skip'))) {
index 42ee66b7d77e47693277c7d6b87b66396df48f20..dfa59dcfafb71b78b24b8d7d48a3e447f4cfaf00 100644 (file)
@@ -133,7 +133,7 @@ if (REQUEST_ISSET_GET(('reg_ext'))) {
                                }
 
                                // Output row
                                }
 
                                // Output row
-                               $cssSelection = "---";
+                               $cssSelection = '---';
                                if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = ADD_SELECTION('yn', $css, "css", $ext_id);
 
                                // Prepare data for the row template
                                if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = ADD_SELECTION('yn', $css, "css", $ext_id);
 
                                // Prepare data for the row template
@@ -251,7 +251,7 @@ ORDER BY ext_name", __FILE__, __LINE__);
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result)) {
                        // Prepare CSS selection output
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result)) {
                        // Prepare CSS selection output
-                       $cssSelection = "---";
+                       $cssSelection = '---';
                        if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = TRANSLATE_YESNO($content['ext_css']);
 
                        // Prepare data for the row template
                        if (GET_EXT_VERSION('sql_patches') >= '0.0.6') $cssSelection = TRANSLATE_YESNO($content['ext_css']);
 
                        // Prepare data for the row template
index c883ed6c0c411cad6ef479f4024472e582947ab1..ce20c453c49c03073990d4f32e98b04fbff6f574 100644 (file)
@@ -57,7 +57,7 @@ if (SQL_NUMROWS($result) > 0) {
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Add three dashes to comment when it is empty
        $OUT = ''; $SW = 2;
        while ($content = SQL_FETCHARRAY($result)) {
                // Add three dashes to comment when it is empty
-               if (empty($content['comments'])) $content['comments'] = "---";
+               if (empty($content['comments'])) $content['comments'] = '---';
 
                // Prepare data for the row template
                $content = array(
 
                // Prepare data for the row template
                $content = array(
index 3202805bb136b97f6099a4b44aebc54d038d3295..90b60ed755b574599659f18647a74bdd58bcefba 100644 (file)
@@ -247,8 +247,8 @@ ORDER BY p.payout_timestamp DESC", __FILE__, __LINE__);
                                $content['target_bank'] = "<a href=\"".FRAMETESTER($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>";
                        } else {
                                // e-currency payout request
                                $content['target_bank'] = "<a href=\"".FRAMETESTER($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>";
                        } else {
                                // e-currency payout request
-                               if (empty($content['target_account'])) $content['target_account'] = "---";
-                               if (empty($content['target_bank']))    $content['target_bank']    = "---";
+                               if (empty($content['target_account'])) $content['target_account'] = '---';
+                               if (empty($content['target_bank']))    $content['target_bank']    = '---';
                        }
 
                        // Remember data in array for the template
                        }
 
                        // Remember data in array for the template
index 5c5f5e6242a1ce7bb25adcc1707ac561820a08aa..9b1c364f0cfb2293fc070895f6a7a58cd63c0dd1 100644 (file)
@@ -63,7 +63,7 @@ if (SQL_NUMROWS($result) > 0) {
                $content['primera_type']                = PRIMERA_TRANSFER_STATUS($content['primera_type']);
 
                // Fix empty message and status
                $content['primera_type']                = PRIMERA_TRANSFER_STATUS($content['primera_type']);
 
                // Fix empty message and status
-               if (empty($content['primera_api_message'])) $content['primera_api_message'] = "---";
+               if (empty($content['primera_api_message'])) $content['primera_api_message'] = '---';
                if (empty($content['primera_api_status']))  $content['primera_api_status']  = "OK";
 
                // Append it and switch colors
                if (empty($content['primera_api_status']))  $content['primera_api_status']  = "OK";
 
                // Append it and switch colors
index 39f72b7684c8900516d62a9eda6ff266d8926524..4ac5ba448b0e5a80d5189f24b0f61cfd12b49d88 100644 (file)
@@ -302,8 +302,8 @@ ORDER BY start_time DESC",
 
                        // Alter some variables
                        if (empty($content['alogin']))   $content['alogin']    = "???";
 
                        // Alter some variables
                        if (empty($content['alogin']))   $content['alogin']    = "???";
-                       if (empty($content['template'])) $content['template']  = "---";
-                       if (empty($content['descr']))    $content['descr']     = "---";
+                       if (empty($content['template'])) $content['template']  = '---';
+                       if (empty($content['descr']))    $content['descr']     = '---';
 
                        // Transfer data into array for the template
                        // @TODO Rewritings: aid->admin_id in template
 
                        // Transfer data into array for the template
                        // @TODO Rewritings: aid->admin_id in template
index 26e13668fc5f99d1c9ad2dbe9a0cf83b14bfbf84..71474a07df7a9e6cecea1d6662d12b6239901061 100644 (file)
@@ -59,7 +59,7 @@ WHERE id='%s' LIMIT 1",
 
                // Check if an entry is empty
                foreach ($DATA as $k => $v) {
 
                // Check if an entry is empty
                foreach ($DATA as $k => $v) {
-                       if (empty($v)) $DATA[$k] = "---";
+                       if (empty($v)) $DATA[$k] = '---';
                }
 
                // Check for sponsor's orders (only count)
                }
 
                // Check for sponsor's orders (only count)
index 4c43ec8495465fcb53599c99cb1cb190690810d6..895ad0e1fd8b7c94c66b34a0359a46ef8d85be20 100644 (file)
@@ -156,7 +156,7 @@ if (SQL_NUMROWS($result) > 0) {
                $content['status']      = SURFBAR_TRANSLATE_STATUS($content['status']);
                $content['registered']  = MAKE_DATETIME($content['registered'], 2);
                $content['last_locked'] = MAKE_DATETIME($content['last_locked'], 2);
                $content['status']      = SURFBAR_TRANSLATE_STATUS($content['status']);
                $content['registered']  = MAKE_DATETIME($content['registered'], 2);
                $content['last_locked'] = MAKE_DATETIME($content['last_locked'], 2);
-               if (empty($content['lock_reason'])) $content['lock_reason'] = "---";
+               if (empty($content['lock_reason'])) $content['lock_reason'] = '---';
 
                // Load row template
                $OUT .= LOAD_TEMPLATE("admin_list_surfbar_urls_row", true, $content);
 
                // Load row template
                $OUT .= LOAD_TEMPLATE("admin_list_surfbar_urls_row", true, $content);
index ea2c0ad3e4a45be7074731e82915a620940b002e..2b9dca7894842678c65eb644781e14c271ee1164 100644 (file)
@@ -134,7 +134,7 @@ ORDER BY userid DESC, task_type DESC, subject, task_created DESC", __FILE__, __L
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result_tasks)) {
                        // Init infos
                $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result_tasks)) {
                        // Init infos
-                       $content['infos'] = "---";
+                       $content['infos'] = '---';
 
                        // Generate link
                        $content['assigned_admin'] = GENERATE_AID_LINK($content['assigned_admin']);
 
                        // Generate link
                        $content['assigned_admin'] = GENERATE_AID_LINK($content['assigned_admin']);
index 105b541a3434e4d3b1f11c16625d4682aab9bfcf..0170beb178dbae78d0eabbc4518f314934954343 100644 (file)
@@ -95,7 +95,7 @@ if (!REQUEST_ISSET_GET(('sortby'))) { REQUEST_SET_GET('sortby', 'userid');
 if (!REQUEST_ISSET_GET('page'))   { REQUEST_SET_GET('page'  , "1");                 }
 
 // Set base URL
 if (!REQUEST_ISSET_GET('page'))   { REQUEST_SET_GET('page'  , "1");                 }
 
 // Set base URL
-$BASE = "[<a href=\"{!URL!}/modules.php?module=admin";
+$base = "[<a href=\"{!URL!}/modules.php?module=admin";
 
 if (REQUEST_ISSET_GET('uid')) {
        // Secure the user ID
 
 if (REQUEST_ISSET_GET('uid')) {
        // Secure the user ID
@@ -117,11 +117,11 @@ LIMIT 1",
                $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", 'userid', true);
 
                // Add links to the numbers
                $LINKS = GET_TOTAL_DATA($uid, "user_links", "id", 'userid', true);
 
                // Add links to the numbers
-               if ($LINKS > 0) $LINKS = $BASE."&amp;what=list_links&amp;uid=".$uid."\">".$LINKS."</a>]";
-               if ($DATA['refid'] > 0) $DATA['refid'] = $BASE."&amp;what=list_user&amp;uid=".$DATA['refid']."\">".$DATA['refid']."</a>]";
-               if (empty($DATA['last_module'])) $DATA['last_module'] = "---";
-               if ($REFS > 0) $REFS = $BASE."&amp;what=list_refs&amp;uid=".$uid."\">".$REFS."</a>]";
-               if ($CATS > 0) $CATS = $BASE."&amp;what=list_cats&amp;uid=".$uid."\">".$CATS."</a>]";
+               if ($LINKS > 0) $LINKS = $base."&amp;what=list_links&amp;uid=".$uid."\">".$LINKS."</a>]";
+               if ($DATA['refid'] > 0) $DATA['refid'] = $base."&amp;what=list_user&amp;uid=".$DATA['refid']."\">".$DATA['refid']."</a>]";
+               if (empty($DATA['last_module'])) $DATA['last_module'] = '---';
+               if ($REFS > 0) $REFS = $base."&amp;what=list_refs&amp;uid=".$uid."\">".$REFS."</a>]";
+               if ($CATS > 0) $CATS = $base."&amp;what=list_cats&amp;uid=".$uid."\">".$CATS."</a>]";
 
                // Calculate timestamp for birthday
                $stamp = mktime(0, 0, 0, $DATA['birth_month'], $DATA['birth_day'], $DATA['birth_year']);
 
                // Calculate timestamp for birthday
                $stamp = mktime(0, 0, 0, $DATA['birth_month'], $DATA['birth_day'], $DATA['birth_year']);
@@ -145,7 +145,7 @@ LIMIT 1",
                $DATA['status']            = TRANSLATE_STATUS($DATA['status']);
                $DATA['last_online']       = MAKE_DATETIME($DATA['last_online'], "0");
                $DATA['used_points']       = TRANSLATE_COMMA($DATA['used_points']);
                $DATA['status']            = TRANSLATE_STATUS($DATA['status']);
                $DATA['last_online']       = MAKE_DATETIME($DATA['last_online'], "0");
                $DATA['used_points']       = TRANSLATE_COMMA($DATA['used_points']);
-               if ($DATA['emails_sent'] > 0) $DATA['emails_sent'] = $BASE."&amp;what=email_details&amp;uid=".$uid."\">".TRANSLATE_COMMA($DATA['emails_sent'])."</a>]";
+               if ($DATA['emails_sent'] > 0) $DATA['emails_sent'] = $base."&amp;what=email_details&amp;uid=".$uid."\">".TRANSLATE_COMMA($DATA['emails_sent'])."</a>]";
                $DATA['joined']            = MAKE_DATETIME($DATA['joined'], "0");
                $DATA['last_update']       = MAKE_DATETIME($DATA['last_update'], "0");
                $DATA['last_profile_sent'] = MAKE_DATETIME($DATA['last_profile_sent'], "0");
                $DATA['joined']            = MAKE_DATETIME($DATA['joined'], "0");
                $DATA['last_update']       = MAKE_DATETIME($DATA['last_update'], "0");
                $DATA['last_profile_sent'] = MAKE_DATETIME($DATA['last_profile_sent'], "0");
@@ -154,13 +154,13 @@ LIMIT 1",
                $DATA['lock_timestamp']    = MAKE_DATETIME($DATA['lock_timestamp'], "2");
 
                // Is the lock reason not set?
                $DATA['lock_timestamp']    = MAKE_DATETIME($DATA['lock_timestamp'], "2");
 
                // Is the lock reason not set?
-               if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = "---";
+               if (!isset($DATA['lock_reason'])) $DATA['lock_reason'] = '---';
 
                // Nickname inclusion?
                // @TODO Rewrite these to filters
                if (EXT_IS_ACTIVE('nickname')) {
                        // Nickname not set or invalid? Then 
 
                // Nickname inclusion?
                // @TODO Rewrite these to filters
                if (EXT_IS_ACTIVE('nickname')) {
                        // Nickname not set or invalid? Then 
-                       if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = "---";
+                       if ((empty($DATA['nickname'])) || ($DATA['nickname'] == $uid)) $DATA['nickname'] = '---';
                } else {
                        // Extension not found
                        $DATA['nickname'] = getMessage('EXT_NICKNAME_404');
                } else {
                        // Extension not found
                        $DATA['nickname'] = getMessage('EXT_NICKNAME_404');
@@ -299,13 +299,13 @@ LIMIT 1",
 
                        // Get number of unconfirmed mails
                        $LINKS = GET_TOTAL_DATA($content['userid'], "user_links", "id", 'userid', true);
 
                        // Get number of unconfirmed mails
                        $LINKS = GET_TOTAL_DATA($content['userid'], "user_links", "id", 'userid', true);
-                       if ($LINKS > 0) $LINKS = $BASE."&amp;what=list_links&amp;uid=".$content['userid']."\">".TRANSLATE_COMMA($LINKS)."</a>]";
+                       if ($LINKS > 0) $LINKS = $base."&amp;what=list_links&amp;uid=".$content['userid']."\">".TRANSLATE_COMMA($LINKS)."</a>]";
 
                        // Set link to sent mails if present
 
                        // Set link to sent mails if present
-                       if ($content['emails_sent'] > 0) $content['emails_sent'] = $BASE."&amp;what=email_details&amp;uid=".$content['userid']."\">".TRANSLATE_COMMA($content['emails_sent'])."</a>]";
+                       if ($content['emails_sent'] > 0) $content['emails_sent'] = $base."&amp;what=email_details&amp;uid=".$content['userid']."\">".TRANSLATE_COMMA($content['emails_sent'])."</a>]";
 
                        // Add nickname
 
                        // Add nickname
-                       if (empty($content['nickname']) || $content['nickname'] == $content['userid']) $content['nickname'] = "---";
+                       if (empty($content['nickname']) || $content['nickname'] == $content['userid']) $content['nickname'] = '---';
 
                        // Calculate total points
                        $pointsTotal = GET_TOTAL_DATA($content['userid'], "user_points", "points")  - GET_TOTAL_DATA($content['userid'], "user_data", "used_points");
 
                        // Calculate total points
                        $pointsTotal = GET_TOTAL_DATA($content['userid'], "user_points", "points")  - GET_TOTAL_DATA($content['userid'], "user_data", "used_points");
@@ -331,7 +331,7 @@ LIMIT 1",
                        $content['status'] = TRANSLATE_STATUS($content['status']);
 
                        // Is the lock reason not set?
                        $content['status'] = TRANSLATE_STATUS($content['status']);
 
                        // Is the lock reason not set?
-                       if (!isset($content['lock_reason'])) $content['lock_reason'] = "---";
+                       if (!isset($content['lock_reason'])) $content['lock_reason'] = '---';
 
                        // Is the extension 'country' installed?
                        // @TODO Rewrite this into a filter
 
                        // Is the extension 'country' installed?
                        // @TODO Rewrite this into a filter
index ee70914f836cf508d6b4b8f7aca2a442b4bcde1d..750d989585cc3f6cae6b1464946b1cf8e79c0bc0 100644 (file)
@@ -63,7 +63,7 @@ if (SQL_NUMROWS($result) > 0) {
                $content['wernis_type']                 = WERNIS_TRANSFER_STATUS($content['wernis_type']);
 
                // Fix empty message and status
                $content['wernis_type']                 = WERNIS_TRANSFER_STATUS($content['wernis_type']);
 
                // Fix empty message and status
-               if (empty($content['wernis_api_message'])) $content['wernis_api_message'] = "---";
+               if (empty($content['wernis_api_message'])) $content['wernis_api_message'] = '---';
                if (empty($content['wernis_api_status']))  $content['wernis_api_status']  = "OK";
 
                // Append it and switch colors
                if (empty($content['wernis_api_status']))  $content['wernis_api_status']  = "OK";
 
                // Append it and switch colors
index 8d306e6765f01995ff3c2184d0b963d73fefb93a..eaaed34d57739f7f0a8e0e09abb77662d5e54876 100644 (file)
@@ -95,7 +95,7 @@ if (($response[count($response) - 1] == "[EOF]") && ($response[0] != "[EOF]")) {
                                // Trim every data line
                                foreach ($LANG_DUMMY as $k => $v) {
                                        $v = trim($v);
                                // Trim every data line
                                foreach ($LANG_DUMMY as $k => $v) {
                                        $v = trim($v);
-                                       if (substr($v, 3) == "") $v = "---";
+                                       if (substr($v, 3) == "") $v = '---';
                                        $LANG_DUMMY[$k] = $v;
                                        if ($v == "xx:xx") break;
                                        $LANG[] = $v;
                                        $LANG_DUMMY[$k] = $v;
                                        if ($v == "xx:xx") break;
                                        $LANG[] = $v;
index 88081d85906d8c016ed813fe6202f5a39cf587fa..ffb7f8618cd3041d0c6067ce7ecc8657d601a659 100644 (file)
@@ -68,8 +68,8 @@ if (EXT_IS_ACTIVE('online')) {
                $SW = 2;
                while ($content = SQL_FETCHARRAY($result)) {
                        // Fix empty action/what
                $SW = 2;
                while ($content = SQL_FETCHARRAY($result)) {
                        // Fix empty action/what
-                       if (empty($content['action'])) $content['action'] = "---";
-                       if (empty($content['what']))   $content['what']   = "---";
+                       if (empty($content['action'])) $content['action'] = '---';
+                       if (empty($content['what']))   $content['what']   = '---';
 
                        if ($content['is_admin'] == 'Y') {
                                // Is an administrator
 
                        if ($content['is_admin'] == 'Y') {
                                // Is an administrator
index a83c024353b029df817ac0b31cb48a66ed0611d6..58eec2b957a894baa0dfb5dc1c84b51620db053f 100644 (file)
@@ -42,7 +42,7 @@ if (!defined('__SECURITY')) {
        require($INC);
 }
 
        require($INC);
 }
 
-$MODE = 'guest';
+$mode = 'guest';
 
 if (REQUEST_ISSET_GET(('order'))) {
        // Order number placed, is he also logged in?
 
 if (REQUEST_ISSET_GET(('order'))) {
        // Order number placed, is he also logged in?
@@ -60,7 +60,7 @@ if (REQUEST_ISSET_GET(('order'))) {
                        REQUEST_SET_POST('url', $url);
 
                        // Mode is member
                        REQUEST_SET_POST('url', $url);
 
                        // Mode is member
-                       $MODE = 'member';
+                       $mode = 'member';
                } else {
                        // Matching line not found!
                        LOAD_URL('modules.php?module=index&amp;what=login');
                } else {
                        // Matching line not found!
                        LOAD_URL('modules.php?module=index&amp;what=login');
@@ -90,7 +90,7 @@ if ((REQUEST_ISSET_POST(('url'))) || (REQUEST_ISSET_GET(('url'))) || (REQUEST_IS
        switch ($frame)
        {
        case '':
        switch ($frame)
        {
        case '':
-               switch ($MODE)
+               switch ($mode)
                {
                case 'member':
                        // Build frameset
                {
                case 'member':
                        // Build frameset
index d567b306fb50fbb86c7de9b0dec7b8ca2fd06cb4..1ce76057be6581a207f1300a45fb97290172a299 100644 (file)
@@ -66,7 +66,7 @@ if (SQL_NUMROWS($result) > 0) {
        // At least one member was online so let's load them all
        $OUT = ''; $SW = 2;
        while (list($uid, $nick, $last) = SQL_FETCHROW($result)) {
        // At least one member was online so let's load them all
        $OUT = ''; $SW = 2;
        while (list($uid, $nick, $last) = SQL_FETCHROW($result)) {
-               $nick2 = "---";
+               $nick2 = '---';
                if (($nick != $uid) && (!empty($nick))) $nick2 = $nick;
 
                // Transfer data to array
                if (($nick != $uid) && (!empty($nick))) $nick2 = $nick;
 
                // Transfer data to array
@@ -74,26 +74,26 @@ if (SQL_NUMROWS($result) > 0) {
                        'sw'     => $SW,
                        'uid'    => $uid,
                        'nick'   => $nick2,
                        'sw'     => $SW,
                        'uid'    => $uid,
                        'nick'   => $nick2,
-                       'points' => TRANSLATE_COMMA(GET_TOTAL_DATA($uid, "user_points", "points") - GET_TOTAL_DATA($uid, "user_data", "used_points")),
-                       'last'   => MAKE_DATETIME($last, "2"),
+                       'points' => TRANSLATE_COMMA(GET_TOTAL_DATA($uid, 'user_points', 'points') - GET_TOTAL_DATA($uid, 'user_data', 'used_points')),
+                       'last'   => MAKE_DATETIME($last, '2'),
                );
 
                // Load template
                );
 
                // Load template
-               $OUT .= LOAD_TEMPLATE("guest_active_row", true, $content);
+               $OUT .= LOAD_TEMPLATE('guest_active_row', true, $content);
 
                // Switch colors
                $SW = 3 - $SW;
        }
 } else {
        // No member was online today! :-(
 
                // Switch colors
                $SW = 3 - $SW;
        }
 } else {
        // No member was online today! :-(
-       $OUT = LOAD_TEMPLATE("guest_active_none_row", true);
+       $OUT = LOAD_TEMPLATE('guest_active_none_row', true);
 }
 
 // Remember output in constant
 define('__ACTIVE_ROWS', $OUT);
 
 // Load template
 }
 
 // Remember output in constant
 define('__ACTIVE_ROWS', $OUT);
 
 // Load template
-LOAD_TEMPLATE("guest_active_table");
+LOAD_TEMPLATE('guest_active_table');
 
 //
 ?>
 
 //
 ?>
index e34b2f126b4a5fa13479545736a34de7d98e6fc8..1334c313588591a3ad3f4123d9479255a00ee2fb 100644 (file)
@@ -47,13 +47,13 @@ if (!defined('__SECURITY')) {
 // Add description as navigation point
 ADD_DESCR('guest', __FILE__);
 
 // Add description as navigation point
 ADD_DESCR('guest', __FILE__);
 
-$MODE = '';
+$mode = '';
 if (REQUEST_ISSET_GET(('mode'))) {
        // A "special" mode of the login system was requested
        switch (REQUEST_GET('mode'))
        {
 if (REQUEST_ISSET_GET(('mode'))) {
        // A "special" mode of the login system was requested
        switch (REQUEST_GET('mode'))
        {
-               case 'activate' : $MODE = 'activate';  break; // Activation link requested
-               case 'lost_pass': $MODE = 'lost_pass'; break; // Request new password
+               case 'activate' : $mode = 'activate';  break; // Activation link requested
+               case 'lost_pass': $mode = 'lost_pass'; break; // Request new password
        }
 } // END - if
 
        }
 } // END - if
 
@@ -123,7 +123,7 @@ WHERE id='%s' AND hash='%s' AND `status`='EMAIL' LIMIT 1",
 
        // Free memory
        SQL_FREERESULT($result);
 
        // Free memory
        SQL_FREERESULT($result);
-} elseif ($MODE == 'activate') {
+} elseif ($mode == 'activate') {
        // Send activation link again
        if (IS_FORM_SENT()) {
                // Check submitted data
        // Send activation link again
        if (IS_FORM_SENT()) {
                // Check submitted data
@@ -169,7 +169,7 @@ WHERE email='%s' AND (`status`='UNCONFIRMED' OR `status`='EMAIL') LIMIT 1",
                // Load form
                LOAD_TEMPLATE('guest_sponsor_activate');
        }
                // Load form
                LOAD_TEMPLATE('guest_sponsor_activate');
        }
-} elseif ($MODE == 'lost_pass') {
+} elseif ($mode == 'lost_pass') {
        // Send new password
        if (IS_FORM_SENT()) {
                // Check submitted data
        // Send new password
        if (IS_FORM_SENT()) {
                // Check submitted data
index baaf0082213b5c636f13f06a66c8532eaa56d52c..a48645aa82140fa16add6907eb0ad5fb210d1650 100644 (file)
@@ -65,7 +65,7 @@ LIMIT %s",
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
-       $content['nickname'] = "---";
+       $content['nickname'] = '---';
 
        // Get nickname
        if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
 
        // Get nickname
        if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
@@ -136,7 +136,7 @@ LIMIT %s",
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
-       $content['nickname'] = "---";
+       $content['nickname'] = '---';
 
        // Get nickname
        if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
 
        // Get nickname
        if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
@@ -206,7 +206,7 @@ LIMIT %s",
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
 $OUT = ''; $SW = 2; $cnt = 1;
 while ($content = SQL_FETCHARRAY($result)) {
        // Init nickname
-       $content['nickname'] = "---";
+       $content['nickname'] = '---';
 
        // Get nickname
        if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
 
        // Get nickname
        if (EXT_IS_ACTIVE('nickname')) $content['nickname'] = NICKNAME_GET_NICK($content['userid']);
index cc051262cb8a80d7888c6a1467f699a3ecb5aba4..60e8badbde48326589a15d8d1edd3ac9a8918983 100644 (file)
@@ -53,12 +53,12 @@ ADD_DESCR('member', __FILE__);
 define('UID_VALUE', getUserId()); $URL = '';
 
 // Detect what the member wants to do
 define('UID_VALUE', getUserId()); $URL = '';
 
 // Detect what the member wants to do
-$MODE = "show"; // Show his data
-if (REQUEST_ISSET_POST(('save')))   $MODE = "save";   // Save entered data
-if (REQUEST_ISSET_POST('edit'))    $MODE = "edit";   // Edit data
-if (REQUEST_ISSET_POST(('notify'))) $MODE = "notify"; // Switch off notification
+$mode = "show"; // Show his data
+if (REQUEST_ISSET_POST(('save')))   $mode = "save";   // Save entered data
+if (REQUEST_ISSET_POST('edit'))    $mode = "edit";   // Edit data
+if (REQUEST_ISSET_POST(('notify'))) $mode = "notify"; // Switch off notification
 
 
-switch ($MODE)
+switch ($mode)
 {
 case "show": // Show his data
        if (EXT_IS_ACTIVE('country', true)) {
 {
 case "show": // Show his data
        if (EXT_IS_ACTIVE('country', true)) {
@@ -207,15 +207,15 @@ case "save": // Save entered data
                $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40));
                if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) {
                        // Only on simple changes normal mode is active = no email or password changed
                $hash = generateHash(REQUEST_POST('pass1'), substr($DATA[1], 0, -40));
                if ((($hash == $DATA[1]) || (REQUEST_POST('pass1') == REQUEST_POST('pass2'))) && (REQUEST_ISSET_POST(('pass1')))) {
                        // Only on simple changes normal mode is active = no email or password changed
-                       $MODE = 'normal'; $AND = '';
+                       $mode = 'normal'; $AND = '';
 
                        // Did the user changed the password?
 
                        // Did the user changed the password?
-                       if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $MODE = 'pass'; }
+                       if ($hash != $DATA[1]) { $AND = ", password='".$hash."'"; $mode = 'pass'; }
 
                        // Or did he changed his password?
                        if (REQUEST_POST('addy') != $DATA[0]) {
                                // Jupp
 
                        // Or did he changed his password?
                        if (REQUEST_POST('addy') != $DATA[0]) {
                                // Jupp
-                               if ($MODE == 'normal') { $MODE = 'email'; } else { $MODE .= ";email"; }
+                               if ($mode == 'normal') { $mode = 'email'; } else { $mode .= ";email"; }
                                REQUEST_SET_POST('old_addy', $DATA[0]);
                        }
 
                                REQUEST_SET_POST('old_addy', $DATA[0]);
                        }
 
@@ -281,7 +281,7 @@ array(
                        }
 
                        // Get all modes ...
                        }
 
                        // Get all modes ...
-                       $modes = explode(';', $MODE);
+                       $modes = explode(';', $mode);
 
                        // ... and run them through
                        SEND_MODE_MAILS ('mydata', $modes);
 
                        // ... and run them through
                        SEND_MODE_MAILS ('mydata', $modes);
index b2ede1b71cbe5bffda0eafa51fe12b7b0c48b925..ab2147a05e14581e45d13b32d79502d38a1ede37 100644 (file)
@@ -123,8 +123,8 @@ ORDER BY p.payout_timestamp DESC",
                                        $content['target_bank'] = "<a href=\"".DEREFERER($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>";
                                } else {
                                        // e-currency payout request
                                        $content['target_bank'] = "<a href=\"".DEREFERER($content['url'])."\" target=\"_blank\">{--CLICK_HERE--}</a>";
                                } else {
                                        // e-currency payout request
-                                       if (empty($content['target_account'])) $content['target_account'] = "---";
-                                       if (empty($content['target_bank']))    $content['target_bank']    = "---";
+                                       if (empty($content['target_account'])) $content['target_account'] = '---';
+                                       if (empty($content['target_bank']))    $content['target_bank']    = '---';
                                }
 
                                // Prepare data for the template
                                }
 
                                // Prepare data for the template
index 86dc794f94694d8be72284f859e3e148b17277bf..b68ddb563ea2d14657f9ec60a1b9624a0f552ab4 100644 (file)
@@ -113,7 +113,7 @@ list($USED, $PAY) = SQL_FETCHROW($result);
 SQL_FREERESULT($result);
 
 // Initialize variables
 SQL_FREERESULT($result);
 
 // Initialize variables
-$CONFIRMED = "---"; $SENT = "---"; $RECEIVED = "---";
+$CONFIRMED = '---'; $SENT = '---'; $RECEIVED = '---';
 
 // Only user >= v0.1.2: Fetch confirmed mails counter
 if (GET_EXT_VERSION('user') >= '0.1.2') {
 
 // Only user >= v0.1.2: Fetch confirmed mails counter
 if (GET_EXT_VERSION('user') >= '0.1.2') {
@@ -126,11 +126,11 @@ if (GET_EXT_VERSION('user') >= '0.1.2') {
        SQL_FREERESULT($result);
 
        // Please update the user extension if you see 3 dashes
        SQL_FREERESULT($result);
 
        // Please update the user extension if you see 3 dashes
-       if (empty($SENT))     $SENT     = "---";
-       if (empty($RECEIVED)) $RECEIVED = "---";
+       if (empty($SENT))     $SENT     = '---';
+       if (empty($RECEIVED)) $RECEIVED = '---';
 } else {
        // Please update!
 } else {
        // Please update!
-       $CONFIRMED = "---";
+       $CONFIRMED = '---';
 }
 
 // If TLOCK is 0 add 3 zeros for floating
 }
 
 // If TLOCK is 0 add 3 zeros for floating
index 8d50527594bffbac65c384a35217f7f6e7b1e4e5..e7c5d50f62bc8614fd86624cfc2298dbcca63fb4 100644 (file)
@@ -130,7 +130,7 @@ if (SQL_NUMROWS($result) > 0) {
                        $refRow['points']  = TRANSLATE_COMMA($refRow['points']);
                        $refRow['refback'] = TRANSLATE_COMMA($refRow['refback']);
                        $refRow['status']  = TRANSLATE_STATUS($refRow['status']);
                        $refRow['points']  = TRANSLATE_COMMA($refRow['points']);
                        $refRow['refback'] = TRANSLATE_COMMA($refRow['refback']);
                        $refRow['status']  = TRANSLATE_STATUS($refRow['status']);
-                       if (empty($refRow['nickname'])) $refRow['nickname'] = "---";
+                       if (empty($refRow['nickname'])) $refRow['nickname'] = '---';
 
                        // Load row template
                        if ($deleted) {
 
                        // Load row template
                        if ($deleted) {
index 28763d0a5bd2d7f3b99f4298fc6f6c8e3c63f3f5..0ebafb38c36c80b710f6ada254b9cae9f8cc18a0 100644 (file)
@@ -73,7 +73,7 @@ if (SQL_NUMROWS($result) > 0) {
                        $refRow['status']      = TRANSLATE_STATUS($refRow['status']);
                        $refRow['unconfirmed'] = TRANSLATE_COMMA($refRow['unconfirmed']);
                        $refRow['clickrate']   = TRANSLATE_COMMA($refRow['clickrate'], true, 1);
                        $refRow['status']      = TRANSLATE_STATUS($refRow['status']);
                        $refRow['unconfirmed'] = TRANSLATE_COMMA($refRow['unconfirmed']);
                        $refRow['clickrate']   = TRANSLATE_COMMA($refRow['clickrate'], true, 1);
-                       if (empty($refRow['nickname'])) $refRow['nickname'] = "---";
+                       if (empty($refRow['nickname'])) $refRow['nickname'] = '---';
 
                        // Load row template
                        $rows .= LOAD_TEMPLATE("member_ref_list_row", true, $refRow);
 
                        // Load row template
                        $rows .= LOAD_TEMPLATE("member_ref_list_row", true, $refRow);
index 6f740bf7f212efdee773fdef491cd765d136897d..cc43347ac9a5dd4f935247c2c97622b0c88c5266 100644 (file)
@@ -63,7 +63,7 @@ if (SQL_NUMROWS($result) > 0) {
        $OUT = ''; $SW = 2;
        while ($data = SQL_FETCHARRAY($result)) {
                // Is the ZIP code set? If not, set dashes
        $OUT = ''; $SW = 2;
        while ($data = SQL_FETCHARRAY($result)) {
                // Is the ZIP code set? If not, set dashes
-               if (empty($data['zip'])) $data['zip'] =  "---";
+               if (empty($data['zip'])) $data['zip'] =  '---';
 
                // Prepare content for output
                $content = array(
 
                // Prepare content for output
                $content = array(
index a595660af2df42efce85d037f82fcb45bf6eae35..bf29e7f925bb9b3ef2426bda10cb59baad64ec6d 100644 (file)
@@ -83,7 +83,7 @@ if ((IS_FORM_SENT()) && (REQUEST_ISSET_POST(('action'))) && (REQUEST_ISSET_POST(
                $content['status']      = SURFBAR_TRANSLATE_STATUS($content['status']);
                if (empty($content['lock_reason'])) {
                        // Fixes some HTML problems with empty cells
                $content['status']      = SURFBAR_TRANSLATE_STATUS($content['status']);
                if (empty($content['lock_reason'])) {
                        // Fixes some HTML problems with empty cells
-                       $content['lock_reason'] = "---";
+                       $content['lock_reason'] = '---';
                } // END - if
 
                // Load row template
                } // END - if
 
                // Load row template
index 5838df644295390fd632f938cdbf87f5fe7d8c4a..bae3e46cca7319a36f8f86fd7d66f7356b923350 100644 (file)
@@ -58,13 +58,13 @@ list($opt_in) = SQL_FETCHROW($result);
 // Free memory
 SQL_FREERESULT($result);
 
 // Free memory
 SQL_FREERESULT($result);
 
-$MODE = '';
-if (REQUEST_ISSET_GET(('mode'))) $MODE = REQUEST_GET('mode');
+$mode = '';
+if (REQUEST_ISSET_GET(('mode'))) $mode = REQUEST_GET('mode');
 
 // Check for "faker"
 
 // Check for "faker"
-if (($opt_in == 'N') && ($MODE == "new")) $MODE = '';
+if (($opt_in == 'N') && ($mode == "new")) $mode = '';
 
 
-switch ($MODE)
+switch ($mode)
 {
 case "new": // Start new transfer
        // Get total points and subtract the balance amount from it = maximum transferable points
 {
 case "new": // Start new transfer
        // Get total points and subtract the balance amount from it = maximum transferable points
@@ -302,7 +302,7 @@ case "new": // Start new transfer
 case "list_in": // List only incoming transactions
 case "list_out": // List only outgoing transactions
        // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command
 case "list_in": // List only incoming transactions
 case "list_out": // List only outgoing transactions
        // As you can see I put list_in and list_out together. I now do a switch() again on it for the right SQL command
-       switch ($MODE)
+       switch ($mode)
        {
        case "list_in":
                $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
        {
        case "list_in":
                $sql = "SELECT trans_id, from_uid, points, reason, time_trans FROM `{!_MYSQL_PREFIX!}_user_transfers_in` WHERE userid=%s ORDER BY time_trans DESC LIMIT ".getConfig('transfer_max');
index 909b85dd9726e6b14e0ae53154abe221ba031028..e4ef99b7002818d881166f91de7c301e61aa6422 100644 (file)
@@ -353,7 +353,7 @@ function ADD_DESCR ($ACC_LVL, $FQFN, $return = false, $output = true) {
 }
 
 //
 }
 
 //
-function ADD_MENU ($MODE, $act, $wht) {
+function ADD_MENU ($mode, $act, $wht) {
        // Init some variables
        $main_cnt = 0;
        $AND = '';
        // Init some variables
        $main_cnt = 0;
        $AND = '';
@@ -361,7 +361,7 @@ function ADD_MENU ($MODE, $act, $wht) {
        $sub_what = '';
 
        // is the menu action valid?
        $sub_what = '';
 
        // is the menu action valid?
-       if (!VALIDATE_MENU_ACTION($MODE, $act, $wht, true)) {
+       if (!VALIDATE_MENU_ACTION($mode, $act, $wht, true)) {
                return getCode('MENU_NOT_VALID');
        } // END - if
 
                return getCode('MENU_NOT_VALID');
        } // END - if
 
@@ -372,10 +372,10 @@ function ADD_MENU ($MODE, $act, $wht) {
 
        // Load SQL data and add the menu to the output stream...
        $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
 
        // Load SQL data and add the menu to the output stream...
        $result_main = SQL_QUERY_ESC("SELECT title, action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE (`what`='' OR `what` IS NULL)".$AND." ORDER BY `sort`",
-               array($MODE), __FUNCTION__, __LINE__);
+               array($mode), __FUNCTION__, __LINE__);
        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
        if (SQL_NUMROWS($result_main) > 0) {
        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$main_action."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
        if (SQL_NUMROWS($result_main) > 0) {
-               OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$MODE."_menu\">");
+               OUTPUT_HTML("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"".$mode."_menu\">");
                // There are menus available, so we simply display them... :)
                while ($content = SQL_FETCHARRAY($result_main)) {
                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
                // There are menus available, so we simply display them... :)
                while ($content = SQL_FETCHARRAY($result_main)) {
                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$sub_what.":".$GLOBALS['what']."*<br />\n";
@@ -384,11 +384,11 @@ function ADD_MENU ($MODE, $act, $wht) {
                        $act = $content['action'];
 
                        // Load menu header template
                        $act = $content['action'];
 
                        // Load menu header template
-                       LOAD_TEMPLATE($MODE."_menu_title", false, $content);
+                       LOAD_TEMPLATE($mode."_menu_title", false, $content);
 
                        // Sub menu
                        $result_sub = SQL_QUERY_ESC("SELECT title AS sub_title, what AS sub_what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
 
                        // Sub menu
                        $result_sub = SQL_QUERY_ESC("SELECT title AS sub_title, what AS sub_what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what` != '' AND `what` IS NOT NULL ".$AND." ORDER BY `sort`",
-                               array($MODE, $content['action']), __FUNCTION__, __LINE__);
+                               array($mode, $content['action']), __FUNCTION__, __LINE__);
 
                        // Get number of rows
                        $ctl = SQL_NUMROWS($result_sub);
 
                        // Get number of rows
                        $ctl = SQL_NUMROWS($result_sub);
@@ -408,7 +408,7 @@ function ADD_MENU ($MODE, $act, $wht) {
 
                                        // Full file name for checking menu
                                        //* DEBUG: */ echo __LINE__.":!!!!".$content['sub_what']."!!!<br />\n";
 
                                        // Full file name for checking menu
                                        //* DEBUG: */ echo __LINE__.":!!!!".$content['sub_what']."!!!<br />\n";
-                                       $INC = sprintf("inc/modules/%s/what-%s.php", $MODE, $content['sub_what']);
+                                       $INC = sprintf("inc/modules/%s/what-%s.php", $mode, $content['sub_what']);
                                        if (INCLUDE_READABLE($INC)) {
                                                if ((!empty($wht)) && (($wht == $content['sub_what']))) {
                                                        $OUT = "<strong>";
                                        if (INCLUDE_READABLE($INC)) {
                                                if ((!empty($wht)) && (($wht == $content['sub_what']))) {
                                                        $OUT = "<strong>";
@@ -444,20 +444,20 @@ function ADD_MENU ($MODE, $act, $wht) {
 
                                        // Add regular menu row or bottom row?
                                        if ($cnt < $ctl) {
 
                                        // Add regular menu row or bottom row?
                                        if ($cnt < $ctl) {
-                                               LOAD_TEMPLATE($MODE."_menu_row", false, $content);
+                                               LOAD_TEMPLATE($mode."_menu_row", false, $content);
                                        } else {
                                        } else {
-                                               LOAD_TEMPLATE($MODE."_menu_bottom", false, $content);
+                                               LOAD_TEMPLATE($mode."_menu_bottom", false, $content);
                                        }
                                }
                        } else {
                                // This is a menu block... ;-)
                                $GLOBALS['block_mode'] = true;
                                        }
                                }
                        } else {
                                // This is a menu block... ;-)
                                $GLOBALS['block_mode'] = true;
-                               $INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $MODE, $content['action']);
+                               $INC_BLOCK = sprintf("inc/modules/%s/action-%s.php", $mode, $content['action']);
                                if (FILE_READABLE($INC_BLOCK)) {
                                        // Load include file
                                        if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML("<tr>
 
                                if (FILE_READABLE($INC_BLOCK)) {
                                        // Load include file
                                        if ((!EXT_IS_ACTIVE($content['action'])) || ($content['action'] == 'online')) OUTPUT_HTML("<tr>
 
-  <td class=\"".$MODE."_menu_whats\">");
+  <td class=\"".$mode."_menu_whats\">");
                                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
                                        LOAD_INC($INC_BLOCK);
                                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
                                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
                                        LOAD_INC($INC_BLOCK);
                                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
@@ -469,7 +469,7 @@ function ADD_MENU ($MODE, $act, $wht) {
                        $main_cnt++;
                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
                        if (SQL_NUMROWS($result_main) > $main_cnt) {
                        $main_cnt++;
                        //* DEBUG: */ echo __LINE__."/".$main_cnt."/".$content['action']."/".$content['sub_what'].":".$GLOBALS['what']."*<br />\n";
                        if (SQL_NUMROWS($result_main) > $main_cnt) {
-                               OUTPUT_HTML("<tr><td class=\"".$MODE."_menu_seperator\"></td></tr>");
+                               OUTPUT_HTML("<tr><td class=\"".$mode."_menu_seperator\"></td></tr>");
                        } // END - if
                }
 
                        } // END - if
                }
 
@@ -543,11 +543,11 @@ function IS_ADMIN ($admin="") {
 }
 
 // Generates a list of "max receiveable emails per day"
 }
 
 // Generates a list of "max receiveable emails per day"
-function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
+function ADD_MAX_RECEIVE_LIST ($mode, $default = "", $return = false) {
        $OUT = '';
        $result = false;
 
        $OUT = '';
        $result = false;
 
-       switch ($MODE) {
+       switch ($mode) {
                case 'guest':
                        // Guests (in the registration form) are not allowed to select 0 mails per day.
                        $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value",
                case 'guest':
                        // Guests (in the registration form) are not allowed to select 0 mails per day.
                        $result = SQL_QUERY("SELECT value, comment FROM `{!_MYSQL_PREFIX!}_max_receive` WHERE value > 0 ORDER BY value",
@@ -561,7 +561,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
                        break;
 
                default: // Invalid!
                        break;
 
                default: // Invalid!
-                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid mode %s detected.", $MODE));
+                       DEBUG_LOG(__FUNCTION__, __LINE__, sprintf("Invalid mode %s detected.", $mode));
                        break;
        }
 
                        break;
        }
 
@@ -578,7 +578,7 @@ function ADD_MAX_RECEIVE_LIST ($MODE, $default = "", $return = false) {
                define('__MAX_RECEIVE_OPTIONS', $OUT);
 
                // Load template
                define('__MAX_RECEIVE_OPTIONS', $OUT);
 
                // Load template
-               $OUT = LOAD_TEMPLATE($MODE."_receive_table", true);
+               $OUT = LOAD_TEMPLATE($mode."_receive_table", true);
        } else {
                // Maybe the admin has to setup some maximum values?
                debug_report_bug("Nothing is being done here?");
        } else {
                // Maybe the admin has to setup some maximum values?
                debug_report_bug("Nothing is being done here?");
@@ -679,14 +679,14 @@ function IS_MEMBER () {
 }
 
 // Validate the given menu action
 }
 
 // Validate the given menu action
-function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
+function VALIDATE_MENU_ACTION ($mode, $act, $wht, $UPDATE=false) {
        // Is the cache entry there and we shall not update?
        // Is the cache entry there and we shall not update?
-       if ((isset($GLOBALS['cache_array']['action_valid'][$MODE][$act][$wht])) && ($UPDATE === false)) {
+       if ((isset($GLOBALS['cache_array']['action_valid'][$mode][$act][$wht])) && ($UPDATE === false)) {
                // Count cache hit
                incrementConfigEntry('cache_hits');
 
                // Then use this cache
                // Count cache hit
                incrementConfigEntry('cache_hits');
 
                // Then use this cache
-               return $GLOBALS['cache_array']['action_valid'][$MODE][$act][$wht];
+               return $GLOBALS['cache_array']['action_valid'][$mode][$act][$wht];
        } // END - if
 
        // By default nothing is valid
        } // END - if
 
        // By default nothing is valid
@@ -694,21 +694,21 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
 
        // Look in all menus or only unlocked
        $add = '';
 
        // Look in all menus or only unlocked
        $add = '';
-       if ((!IS_ADMIN()) && ($MODE != 'admin')) $add = " AND `locked`='N'";
+       if ((!IS_ADMIN()) && ($mode != 'admin')) $add = " AND `locked`='N'";
 
 
-       //* DEBUG: */ echo __LINE__.":".$MODE."/".$act."/".$wht."*<br />\n";
-       if (($MODE != 'admin') && ($UPDATE === true)) {
+       //* DEBUG: */ echo __LINE__.":".$mode."/".$act."/".$wht."*<br />\n";
+       if (($mode != 'admin') && ($UPDATE === true)) {
                // Update guest or member menu
                $sql = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$add." LIMIT 1",
                // Update guest or member menu
                $sql = SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_%s_menu` SET counter=counter+1 WHERE `action`='%s' AND `what`='%s'".$add." LIMIT 1",
-                       array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
+                       array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
        } elseif (($wht != "overview") && (!empty($wht))) {
                // Other actions
                $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$add." ORDER BY action DESC LIMIT 1",
        } elseif (($wht != "overview") && (!empty($wht))) {
                // Other actions
                $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND `what`='%s'".$add." ORDER BY action DESC LIMIT 1",
-                       array($MODE, $act, $wht), __FUNCTION__, __LINE__, false);
+                       array($mode, $act, $wht), __FUNCTION__, __LINE__, false);
        } else {
                // Admin login overview
                $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (`what`='' OR `what` IS NULL)".$add." ORDER BY action DESC LIMIT 1",
        } else {
                // Admin login overview
                $sql = SQL_QUERY_ESC("SELECT id, what FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `action`='%s' AND (`what`='' OR `what` IS NULL)".$add." ORDER BY action DESC LIMIT 1",
-                       array($MODE, $act), __FUNCTION__, __LINE__, false);
+                       array($mode, $act), __FUNCTION__, __LINE__, false);
        }
 
        // Run SQL command
        }
 
        // Run SQL command
@@ -725,14 +725,14 @@ function VALIDATE_MENU_ACTION ($MODE, $act, $wht, $UPDATE=false) {
        SQL_FREERESULT($result);
 
        // Set cache entry
        SQL_FREERESULT($result);
 
        // Set cache entry
-       $GLOBALS['cache_array']['action_valid'][$MODE][$act][$wht] = $ret;
+       $GLOBALS['cache_array']['action_valid'][$mode][$act][$wht] = $ret;
 
        // Return result
        return $ret;
 }
 
 //
 
        // Return result
        return $ret;
 }
 
 //
-function GET_MOD_DESCR($MODE, $wht, $column="what") {
+function GET_MOD_DESCR($mode, $wht, $column="what") {
        // Fix empty "what"
        if (empty($wht)) {
                $wht = "welcome";
        // Fix empty "what"
        if (empty($wht)) {
                $wht = "welcome";
@@ -744,7 +744,7 @@ function GET_MOD_DESCR($MODE, $wht, $column="what") {
 
        // Look for title
        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1",
 
        // Look for title
        $result = SQL_QUERY_ESC("SELECT title FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE %s='%s' LIMIT 1",
-               array($MODE, $column, $wht), __FUNCTION__, __LINE__);
+               array($mode, $column, $wht), __FUNCTION__, __LINE__);
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
 
        // Is there an entry?
        if (SQL_NUMROWS($result) == 1) {
@@ -890,17 +890,17 @@ function countModuleHit($mod) {
 }
 
 // Get action value from mode (admin/guest/member) and what-value
 }
 
 // Get action value from mode (admin/guest/member) and what-value
-function GET_ACTION ($MODE, &$wht) {
+function GET_ACTION ($mode, &$wht) {
        // Init status
        $ret = '';
 
        // Init status
        $ret = '';
 
-       //* DEBUG: */ echo __LINE__."=".$MODE."/".$wht."/".$GLOBALS['action']."=<br />";
-       if ((empty($wht)) && ($MODE != 'admin')) {
+       //* DEBUG: */ echo __LINE__."=".$mode."/".$wht."/".$GLOBALS['action']."=<br />";
+       if ((empty($wht)) && ($mode != 'admin')) {
                $wht = "welcome";
                if (getConfig('index_home') != "") $wht = getConfig('index_home');
        } // END - if
 
                $wht = "welcome";
                if (getConfig('index_home') != "") $wht = getConfig('index_home');
        } // END - if
 
-       if ($MODE == 'admin') {
+       if ($mode == 'admin') {
                // Action value for admin area
                if (REQUEST_ISSET_GET('action')) {
                        // Use from request!
                // Action value for admin area
                if (REQUEST_ISSET_GET('action')) {
                        // Use from request!
@@ -919,11 +919,11 @@ function GET_ACTION ($MODE, &$wht) {
        //* DEBUG: */ echo __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />\n";
 
        // Does the module have a menu?
        //* DEBUG: */ echo __FUNCTION__."(<font color=\"#0000aa\">".__LINE__."</font>): ret=".$ret."<br />\n";
 
        // Does the module have a menu?
-       if (MODULE_HAS_MENU($MODE)) {
+       if (MODULE_HAS_MENU($mode)) {
                // Rewriting modules to menu
                // Rewriting modules to menu
-               switch ($MODE) {
-                       case 'index': $MODE = 'guest';  break;
-                       case "login": $MODE = 'member'; break;
+               switch ($mode) {
+                       case 'index': $mode = 'guest';  break;
+                       case "login": $mode = 'member'; break;
                } // END - switch
 
                // Guest and member menu is "main" as the default
                } // END - switch
 
                // Guest and member menu is "main" as the default
@@ -931,7 +931,7 @@ function GET_ACTION ($MODE, &$wht) {
 
                // Load from database
                $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
 
                // Load from database
                $result = SQL_QUERY_ESC("SELECT action FROM `{!_MYSQL_PREFIX!}_%s_menu` WHERE `what`='%s' LIMIT 1",
-                       array($MODE, $wht), __FUNCTION__, __LINE__);
+                       array($mode, $wht), __FUNCTION__, __LINE__);
                if (SQL_NUMROWS($result) == 1) {
                        // Load action value and pray that this one is the right you want... ;-)
                        list($ret) = SQL_FETCHROW($result);
                if (SQL_NUMROWS($result) == 1) {
                        // Load action value and pray that this one is the right you want... ;-)
                        list($ret) = SQL_FETCHROW($result);
@@ -939,7 +939,7 @@ function GET_ACTION ($MODE, &$wht) {
 
                // Free memory
                SQL_FREERESULT($result);
 
                // Free memory
                SQL_FREERESULT($result);
-       } elseif ((GET_EXT_VERSION('sql_patches') == "") && ($MODE != 'admin')) {
+       } elseif ((GET_EXT_VERSION('sql_patches') == "") && ($mode != 'admin')) {
                // No sql_patches installed, but maybe we need to register an admin?
                if (isAdminRegistered()) {
                        // Redirect
                // No sql_patches installed, but maybe we need to register an admin?
                if (isAdminRegistered()) {
                        // Redirect
index 5b0888977cfd6e49c7a6b80a10f343a09000dfa6..42d018ed4bdb198bf27b0749b844ac7eb05d1875 100644 (file)
@@ -61,17 +61,17 @@ if (($GLOBALS['output_mode'] == "1") || (getConfig('css_php') == "DIRECT")) {
        // Output inclusion lines
        foreach ($STYLES as $value) {
                // Only include found CSS files (to reduce 404 requests)
        // Output inclusion lines
        foreach ($STYLES as $value) {
                // Only include found CSS files (to reduce 404 requests)
-               $BASE = sprintf("%stheme/%s/css/", constant('PATH'), GET_CURR_THEME());
-               $FQFN = $BASE.$value;
+               $basePath = sprintf("%stheme/%s/css/", constant('PATH'), GET_CURR_THEME());
+               $FQFN = $basePath . $value;
 
                // Do include only existing files and whose are not empty
                if ((FILE_READABLE($FQFN)) && (filesize($FQFN) > 0)) {
                        switch (getConfig('css_php')) {
 
                // Do include only existing files and whose are not empty
                if ((FILE_READABLE($FQFN)) && (filesize($FQFN) > 0)) {
                        switch (getConfig('css_php')) {
-                               case "DIRECT":
+                               case 'DIRECT':
                                        OUTPUT_HTML("<link rel=\"stylesheet\" type=\"text/css\" href=\"{!URL!}/theme/".GET_CURR_THEME()."/".$value."\" />");
                                        break;
 
                                        OUTPUT_HTML("<link rel=\"stylesheet\" type=\"text/css\" href=\"{!URL!}/theme/".GET_CURR_THEME()."/".$value."\" />");
                                        break;
 
-                               case "FILE":
+                               case 'FILE':
                                        OUTPUT_HTML(READ_FILE($FQFN));
                                        break;
                        } // END - switch
                                        OUTPUT_HTML(READ_FILE($FQFN));
                                        break;
                        } // END - switch