]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_rallye_prices.php
A lot rewrites from double-quote to single-quote, some fixes for extension handling...
[mailer.git] / inc / modules / admin / what-config_rallye_prices.php
index 95031a59ed85ad16511639d802c22e685a9c0242..31e1b4d1a5ec23a4cf022854e3210514e0033129 100644 (file)
@@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 }
 
 // Add description as navigation point
-ADD_DESCR("admin", __FILE__);
+ADD_DESCR('admin', __FILE__);
 
 if (REQUEST_ISSET_GET(('rallye'))) {
        // Price submitted?
@@ -63,13 +63,13 @@ VALUES ('%s','%s','%s','%s')",
        REQUEST_POST('points'),
        REQUEST_POST('info')
 ), __FILE__, __LINE__);
-                               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PRICE_LEVEL_SAVED'));
+                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_LEVEL_SAVED'));
                        } else {
                                // Free memory
                                SQL_FREERESULT($result);
 
                                // Price level found!
-                               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_PRICE_ALREADY_FOUND'));
+                               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_PRICE_ALREADY_FOUND'));
                        }
                }
        } elseif (REQUEST_ISSET_POST('remove')) {
@@ -83,9 +83,9 @@ VALUES ('%s','%s','%s','%s')",
                        }
 
                        // Output message
-                       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_DELETED'));
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_DELETED'));
                } else {
-                       LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_NOT_DELETED'));
+                       LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_NOT_DELETED'));
                }
        } elseif (REQUEST_ISSET_POST('change')) {
                // Change entries
@@ -105,7 +105,7 @@ VALUES ('%s','%s','%s','%s')",
                }
 
                // Output message
-               LOAD_TEMPLATE("admin_settings_saved", false, getMessage('RALLYE_ENTRIES_CHANGED'));
+               LOAD_TEMPLATE('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_CHANGED'));
        }
 
        if (REQUEST_ISSET_POST('edit')) {
@@ -113,7 +113,7 @@ VALUES ('%s','%s','%s','%s')",
                $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
                if ($SEL > 0) {
                        // Make selected editable
-                       $OUT = ""; $SW = 2;
+                       $OUT = ''; $SW = 2;
                        foreach (REQUEST_POST('sel') as $id => $sel) {
                                // Load data to selected rallye
                                $result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE id=%s LIMIT 1",
@@ -145,14 +145,14 @@ VALUES ('%s','%s','%s','%s')",
                } else {
                        // Nothing selected
                        $content = sprintf(getMessage('RALLYE_NO_PRICES_SELECTED'), "<a href=\"{!URL!}/modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=".REQUEST_GET('rallye')."\">", "</a>");
-                       LOAD_TEMPLATE("admin_settings_saved", false, $content);
+                       LOAD_TEMPLATE('admin_settings_saved', false, $content);
                }
        } elseif (REQUEST_ISSET_POST('del')) {
                // Check if at last one line is selected
                $SEL = SELECTION_COUNT(REQUEST_POST('sel'));
                if ($SEL > 0) {
                        // List all prices
-                       $OUT = ""; $SW = 2;
+                       $OUT = ''; $SW = 2;
                        foreach (REQUEST_POST('sel') as $id => $sel) {
                                // Load data to selected rallye
                                $result = SQL_QUERY_ESC("SELECT rallye_id, price_level, points, info FROM `{!_MYSQL_PREFIX!}_rallye_prices` WHERE id=%s LIMIT 1",
@@ -185,7 +185,7 @@ VALUES ('%s','%s','%s','%s')",
                } else {
                        // Nothing selected
                        $content = RALLYE_NO_PRICES_SELECTED_1."<a href=\"{!URL!}/modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=".REQUEST_GET('rallye')."\">".RALLYE_NO_PRICES_SELECTED_2."</a>".RALLYE_NO_PRICES_SELECTED_3;
-                       LOAD_TEMPLATE("admin_settings_saved", false, $content);
+                       LOAD_TEMPLATE('admin_settings_saved', false, $content);
                }
        } else {
                // a rallye was selected, so check if there are already prices assigned...
@@ -194,7 +194,7 @@ VALUES ('%s','%s','%s','%s')",
 
                if (SQL_NUMROWS($result) > 0) {
                        // Load all prices for the selected rallye
-                       $OUT = ""; $SW = 2;
+                       $OUT = ''; $SW = 2;
                        while ($content = SQL_FETCHARRAY($result)) {
                                // Fix empty info
                                if (empty($content['info'])) $content['info'] = "---";
@@ -239,10 +239,10 @@ FROM `{!_MYSQL_PREFIX!}_rallye_data` AS d, `{!_MYSQL_PREFIX!}_admins` AS a
 WHERE d.admin_id=a.id 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)) {
                        $select = "<input type=\"checkbox\" name=\"sel[".$content['id']."]\" class=\"admin_normal\" value=\"1\">";
-                       if ($content['is_active'] == "Y") $select = "<div class=\"big\">".$content['id']."</div>";
+                       if ($content['is_active'] == 'Y') $select = "<div class=\"big\">".$content['id']."</div>";
 
                        // Prepare data for the row template
                        // @TODO Rewritings: aid->admin_id, alogin->login in template
@@ -271,7 +271,7 @@ WHERE d.admin_id=a.id ORDER BY start_time DESC", __FILE__, __LINE__);
                LOAD_TEMPLATE("admin_list_rallye_prices");
        } 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'));
        }
 }
 //