A lot rewrites from double-quote to single-quote, some fixes for extension handling...
[mailer.git] / inc / modules / admin / what-list_rallyes.php
index d00f43c71cfadcbf95ff8c16cb7991ee837fa896..b5e63e9de02d979c62a6e11e1d6c7592dfacc4ea 100644 (file)
@@ -43,10 +43,10 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 }
 
 // Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
 
-if (!REQUEST_ISSET_GET(('sub'))) REQUEST_SET_GET('sub', "");
-$message = "";
+if (!REQUEST_ISSET_GET('sub')) REQUEST_SET_GET('sub', '');
+$message = '';
 
 // Quick actions on a rallye
 if (REQUEST_ISSET_GET(('rallye'))) {
@@ -171,7 +171,7 @@ if (REQUEST_ISSET_POST('edit')) {
        $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
        if ($SEL > 0) {
                // Make all selected and deactivated rallyes editable
-               $OUT = ""; $SW = 2;
+               $OUT = ''; $SW = 2;
                foreach (REQUEST_POST('sel') as $id => $selected) {
                        // Load rallye basic data
                        $result = SQL_QUERY_ESC("SELECT title, descr, template, start_time, end_time, min_users, min_prices
@@ -220,14 +220,14 @@ LIMIT 1",
                LOAD_TEMPLATE("admin_edit_rallyes");
        } else {
                // Nothing selected to edit
-               LOAD_TEMPLATE("admin_settings_saved", false, LOAD_TEMPLATE("admin_list_rallye_noselect", true));
+               LOAD_TEMPLATE('admin_settings_saved', false, LOAD_TEMPLATE("admin_list_rallye_noselect", true));
        }
 } elseif ((REQUEST_GET('sub') == "users") && (REQUEST_GET('rallye') > 0)) {
        // List users and their refs before start and current
        $result = SQL_QUERY_ESC("SELECT userid, refs, curr_points FROM `{!_MYSQL_PREFIX!}_rallye_users` WHERE rallye_id=%s ORDER BY userid",
                array(bigintval(REQUEST_GET('rallye'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
-               $OUT = ""; $SW = 2;
+               $OUT = ''; $SW = 2;
                // @TODO Rewrite this constant
                define('__RALLYE_VALUE', REQUEST_GET('rallye'));
                while ($content = SQL_FETCHARRAY($result)) {
@@ -235,8 +235,8 @@ LIMIT 1",
                        $cnt = RALLYE_GET_REFCOUNT($content['userid'], $content['refs']);
 
                        // Init variables
-                       $bl = "";
-                       $br = "";
+                       $bl = '';
+                       $br = '';
 
                        // Output row
                        if (($content['curr_points'] > 0) && ($cnt > 0)) { $bl = "<strong>"; $br = "</strong>"; }
@@ -248,7 +248,7 @@ LIMIT 1",
                        } // END - if
 
                        // Get user points
-                       $points = GET_TOTAL_DATA($content['userid'], "user_points", "points", "userid", false, " AND ref_depth=1 LIMIT 1");
+                       $points = GET_TOTAL_DATA($content['userid'], "user_points", "points", 'userid', false, " AND ref_depth=1 LIMIT 1");
                        //* DEBUG: */ echo basename(__FILE__).":uid={$content['userid']},points={$points},opoints={$content['curr_points']}<br />\n";
 
                        // Prepare content
@@ -276,7 +276,7 @@ LIMIT 1",
                LOAD_TEMPLATE("admin_list_rallye_usr");
        } else {
                // No entries found?
-               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ADMIN_USERS_404'));
+               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ADMIN_USERS_404'));
        }
 } else {
        // Start listing rallyes
@@ -286,7 +286,7 @@ ORDER BY start_time DESC",
                __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // List found rallyes
-               $OUT = ""; $SW = 2;
+               $OUT = ''; $SW = 2;
                while ($content = SQL_FETCHARRAY($result)) {
                        // Load admin login
                        $content['alogin'] = GET_ADMIN_LOGIN($content['admin_id']);
@@ -332,14 +332,14 @@ ORDER BY start_time DESC",
                        // Is the rallye active or not?
                        switch ($content['is_active'])
                        {
-                       case "Y":
+                       case 'Y':
                                // Rallye is active so do not edit it!
                                $content['select'] = "<div class=\"big\">".$content['id']."</div>";
                                $content['active_title'] = getMessage('RALLYE_DEACTIVATE_NOW');
                                $content['active'] = 0;
                                break;
 
-                       case "N":
+                       case 'N':
                                $content['active_title'] = getMessage('RALLYE_ACTIVATE_NOW');
                                $content['active'] = "1";
                                break;
@@ -348,12 +348,12 @@ ORDER BY start_time DESC",
                        // Notification to members?
                        switch ($content['send_notify'])
                        {
-                       case "Y":
+                       case 'Y':
                                $content['notify_title'] = getMessage('RALLYE_STOP_NOTIFY_NOW');
                                $content['notify'] = 0;
                                break;
 
-                       case "N":
+                       case 'N':
                                $content['notify_title'] = getMessage('RALLYE_START_NOTIFY_NOW');
                                $content['notify'] = "1";
                                break;
@@ -362,12 +362,12 @@ ORDER BY start_time DESC",
                        // Auto-add of new joined members?
                        switch ($content['auto_add_new_user'])
                        {
-                       case "Y":
+                       case 'Y':
                                $content['auto_title'] = getMessage('RALLYE_STOP_AUTO_ADD_NOW');
                                $content['auto'] = 0;
                                break;
 
-                       case "N":
+                       case 'N':
                                $content['auto_title'] = getMessage('RALLYE_START_AUTO_ADD_NOW');
                                $content['auto'] = "1";
                                break;
@@ -386,7 +386,7 @@ ORDER BY start_time DESC",
                LOAD_TEMPLATE("admin_list_rallyes");
        } else {
                // No rallyes setup so far
-               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_NO_RALLYES_SETUP'));
+               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_NO_RALLYES_SETUP'));
        }
 }