]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-config_coupon.php
Updated copyright notice as there are changes in this year
[mailer.git] / inc / modules / admin / what-config_coupon.php
index 36118680ad409a554b917d4524ce62f56d4d5f33..b1737a4d65c073a79b2ea2bacce50ce5c94345f1 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 - 2013 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,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addYouAreHereLink('admin', __FILE__);
 
-if (isFormSent()) {
+if (isFormSent('save_config')) {
        // Replace German comma with computer's version
        convertCommaToDotInPostData('coupon_default_points');
 
@@ -51,24 +51,14 @@ if (isFormSent()) {
        adminSaveSettingsFromPostData();
 } else {
        // Add userid selection
-       $content['coupon_userid'] = addMemberSelectionBox(getConfig('coupon_userid'), false, true, true, 'coupon_userid');
-
-       // Init all other template entries
-       foreach (array('payment_method_ref', 'payment_method_direct', 'points_account_order', 'points_account_general', 'locked_points_mode_locked', 'locked_points_mode_unlocked') as $entry) {
-               $content['coupon_' . $entry] = '';
-       } // END - foreach
-
-       // Set current selections
-       foreach (array('payment_method', 'points_account', 'locked_points_mode') as $entry) {
-               $content['coupon_' . $entry . '_' . strtolower(getConfig('coupon_' . $entry))] = ' checked="checked"';
-       } // END - foreach
+       $content['coupon_userid'] = addMemberSelectionBox(getCouponUserid(), FALSE, TRUE, TRUE, 'coupon_userid');
 
        // Prepare some template data
        $content['coupon_default_time_selection']   = createConfigurationTimeSelections('coupon_default_time'  , 'WDh');
        $content['coupon_autopurge_time_selection'] = createConfigurationTimeSelections('coupon_autopurge_time', 'WDh');
 
        // Load template
-       loadTemplate('admin_config_coupon', false, $content);
+       loadTemplate('admin_config_coupon', FALSE, $content);
 }
 
 // [EOF]