]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_doubler.php
Updated copyright year.
[mailer.git] / inc / modules / admin / what-config_doubler.php
index 6738249233865bb73a84d7c0e865568ab2341c19..e40339be5273f99aa4930975b409abd542132dcf 100644 (file)
@@ -16,8 +16,8 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * Copyright (c) 2009 - 2016 by Mailer Developer Team                   *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -43,24 +43,13 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addYouAreHereLink('admin', __FILE__);
 
-if (isFormSent()) {
-       // Replace commata with decimal dot
-       setPostRequestParameter('doubler_charge', convertCommaToDot(postRequestParameter('doubler_charge')));
-       setPostRequestParameter('doubler_ref'   , convertCommaToDot(postRequestParameter('doubler_ref')));
-       setPostRequestParameter('doubler_min'   , convertCommaToDot(postRequestParameter('doubler_min')));
-       setPostRequestParameter('doubler_max'   , convertCommaToDot(postRequestParameter('doubler_max')));
-       setPostRequestParameter('doubler_left'  , convertCommaToDot(postRequestParameter('doubler_left')));
+if (isFormSent('save_config')) {
+       // Replace german decimal comma with computer decimal dot
+       convertCommaToDotInPostDataArray(array('doubler_charge', 'doubler_ref', 'doubler_min', 'doubler_max', 'doubler_left'));
 
        // Save settings
        adminSaveSettingsFromPostData();
 } else {
-       // Init all Y/N selections
-       foreach (array('jackpot','own','sent_all') as $entry) {
-               $content[$entry . '_y'] = '';
-               $content[$entry . '_n'] = '';
-               $content[$entry . '_' . strtolower(getConfig('doubler_' . $entry))] = ' checked="checked"';
-       } // END - foreach
-
        // Init other selections
        foreach (array('send_mode_direct','send_mode_reset') as $entry) {
                $content[$entry] = '';
@@ -72,11 +61,11 @@ if (isFormSent()) {
        } // END - foreach
 
        // Transfer options
-       $content['form_selection'] = addMemberSelectionBox(getConfig('doubler_userid'), false, true, true, 'doubler_userid');
+       $content['doubler_userid'] = addMemberSelectionBox(getDoublerUserid(), FALSE, TRUE, TRUE, 'doubler_userid');
 
        // Number of rows to display (option lines!!!)
        foreach (array('new','pay','old') as $entry) {
-               $content['display_' . $entry] = generateOptionList(
+               $content['display_' . $entry] = generateOptions(
                        '/ARRAY/',
                        array(
                                5,
@@ -103,7 +92,7 @@ if (isFormSent()) {
        $content['timeout_selection'] = createConfigurationTimeSelections('doubler_timeout', 'WDh');
 
        // Load template
-       loadTemplate('admin_config_doubler', false, $content);
+       loadTemplate('admin_config_doubler', FALSE, $content);
 }
 
 // [EOF]