]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_bonus.php
RevBomb patch applied (thanks to profi-concept)
[mailer.git] / inc / modules / admin / what-config_bonus.php
index eacf938ace1f6b4002ed56fcb9cc0d3dbf3b3f01..aac6eefb9a664aef1b3d2d91905e2c614e8b7e16 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Einstellen der Turbo-Klick-Verguetungen          *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. Mär 2009)              $ *
+ * $Tag:: 0.2.1-FINAL                                                 $ *
+ * $Author:: stelzi                                                   $ *
+ * Needs to be in all Files and every File needs "svn propset           *
+ * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2008 by Roland Haeder                           *
  * For more information visit: http://www.mxchange.org                  *
@@ -40,33 +45,34 @@ if ((!defined('__SECURITY')) || (!IS_ADMIN())) {
 // Add description as navigation point
 ADD_DESCR("admin", __FILE__);
 
-if (isset($_POST['ok'])) {
+if (IS_FORM_SENT()) {
        // Replace german decimal commas to computer decimal dots
-       $_POST['login_bonus']         = REVERT_COMMA($_POST['login_bonus']        );
-       $_POST['turbo_bonus']         = REVERT_COMMA($_POST['turbo_bonus']        );
-       $_POST['bonus_ref']           = REVERT_COMMA($_POST['bonus_ref']          );
-       $_POST['bonus_order']         = REVERT_COMMA($_POST['bonus_order']        );
-       $_POST['bonus_notify_points'] = REVERT_COMMA($_POST['bonus_notify_points']);
+       REQUEST_POST('login_bonus')         = REVERT_COMMA(REQUEST_POST('login_bonus')        );
+       REQUEST_POST('turbo_bonus')         = REVERT_COMMA(REQUEST_POST('turbo_bonus')        );
+       REQUEST_POST('bonus_ref')           = REVERT_COMMA(REQUEST_POST('bonus_ref')          );
+       REQUEST_POST('bonus_order')         = REVERT_COMMA(REQUEST_POST('bonus_order')        );
+       REQUEST_SET_POST('bonus_notify_points', REVERT_COMMA(REQUEST_POST('bonus_notify_points')));
 
        // Generate string for saving ranks
-       $_POST['turbo_rates'] = ""; $RATES = array();
-       foreach ($_POST['rate'] as $rate) {
+       REQUEST_SET_POST('turbo_rates', "");
+       $RATES = array();
+       foreach (REQUEST_POST('rate') as $rate) {
                $rate = trim(REVERT_COMMA($rate));
-               if (isset($rate)) $RATES[] = $rate;
+               if (!empty($rate)) $RATES[] = $rate;
        }
-       $_POST['turbo_rates'] = trim(implode(";", $RATES));
-       unset($_POST['rate']);
+       REQUEST_SET_POST('turbo_rates', trim(implode(";", $RATES)));
+       REQUEST_UNSET_POST(('rate'));
 
        // Automatically calculate bonus points for ranks 2 and 3 when not set
-       if (empty($_POST['turbo_rates'])) $_POST['turbo_rates'] = "".round(getConfig('turbo_bonus') / 2).";".round(getConfig('turbo_bonus') / 4)."";
+       if (!REQUEST_ISSET_POST(('turbo_rates'))) REQUEST_SET_POST('turbo_rates', "".round(getConfig('turbo_bonus') / 2).";".round(getConfig('turbo_bonus') / 4)."");
 
        // Save data
-       ADMIN_SAVE_SETTINGS($_POST);
+       ADMIN_SAVE_SETTINGS_POST();
 
        // Remember new settings
-       $_CONFIG['bonus_active']    = $_POST['bonus_active'];
-       $_CONFIG['bonus_en_notify'] = $_POST['bonus_en_notify'];
-       $_CONFIG['bonus_di_notify'] = $_POST['bonus_di_notify'];
+       setConfigEntry('bonus_active'   , REQUEST_POST('bonus_active'));
+       setConfigEntry('bonus_en_notify', REQUEST_POST('bonus_en_notify'));
+       setConfigEntry('bonus_di_notify', REQUEST_POST('bonus_di_notify'));
 } else {
        // Prepare contants for the template
        define('__LOGIN_VALUE' , TRANSLATE_COMMA(getConfig('login_bonus')        , false));