]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_rallye_prices.php
Fixed missing message after saving new settings
[mailer.git] / inc / modules / admin / what-config_rallye_prices.php
index 86b94a69d333ef7645da324985bb66676ebda158..ce08c0b4c845d1f1d8bae7a664637b8bb85bde99 100644 (file)
@@ -18,6 +18,7 @@
  * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
+ * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
  * For more information visit: http://www.mxchange.org                  *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -46,13 +47,13 @@ addMenuDescription('admin', __FILE__);
 
 if (isGetRequestParameterSet('rallye')) {
        // Price submitted?
-       if (isPostRequestParameterSet('add')) {
+       if (isFormSent('add')) {
                if ((isPostRequestParameterSet(('level'))) && ((isPostRequestParameterSet('points')) || (isPostRequestParameterSet(('info'))))) {
                        // Submitted data is valid, but maybe we already have this price level?
                        $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_rallye_prices` WHERE `rallye_id`=%s AND `price_level`='%s' LIMIT 1",
                        array(bigintval(getRequestParameter('rallye')), bigintval(postRequestParameter('level'))), __FILE__, __LINE__);
 
-                       if (SQL_NUMROWS($result) == '0') {
+                       if (SQL_HASZERONUMS($result)) {
                                // Ok, new price level entered!
                                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_rallye_prices` (rallye_id, price_level, points, info)
 VALUES ('%s','%s','%s','%s')",
@@ -71,7 +72,7 @@ VALUES ('%s','%s','%s','%s')",
                                loadTemplate('admin_settings_saved', false, getMessage('RALLYE_PRICE_ALREADY_FOUND'));
                        }
                }
-       } elseif (isPostRequestParameterSet('remove')) {
+       } elseif (isFormSent('remove')) {
                // Check if at last one line is selected
                if (countPostSelection() > 0) {
                        // Delete selected entries
@@ -85,7 +86,7 @@ VALUES ('%s','%s','%s','%s')",
                } else {
                        loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_NOT_DELETED'));
                }
-       } elseif (isPostRequestParameterSet('change')) {
+       } elseif (isFormSent('change')) {
                // Change entries
                foreach (postRequestParameter('level') as $id => $level) {
                        // Secure id
@@ -115,7 +116,7 @@ LIMIT 1",
                loadTemplate('admin_settings_saved', false, getMessage('RALLYE_ENTRIES_CHANGED'));
        }
 
-       if (isPostRequestParameterSet('edit')) {
+       if (isFormSent('edit')) {
                // Check if at last one line is selected
                if (countPostSelection() > 0) {
                        // Make selected editable
@@ -153,7 +154,7 @@ LIMIT 1",
                        $content = '{--RALLYE_NO_PRICES_SELECTED_1--}<a href="{%url=modules.php?module=admin&amp;what=config_rallye_prices&amp;rallye=' . getRequestParameter('rallye') . '%}">{--RALLYE_NO_PRICES_SELECTED_2--}</a>{--RALLYE_NO_PRICES_SELECTED_3--}';
                        loadTemplate('admin_settings_saved', false, $content);
                }
-       } elseif (isPostRequestParameterSet('del')) {
+       } elseif (isFormSent('del')) {
                // Check if at last one line is selected
                if (countPostSelection() > 0) {
                        // List all prices
@@ -234,7 +235,7 @@ LIMIT 1",
        }
 
        // Add form for adding new price level
-       if (!isPostRequestParameterSet('edit')) {
+       if (!isFormSent('edit')) {
                loadTemplate('admin_add_rallye_prices', false, getRequestParameter('rallye'));
        } // END - if
 } else {