]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_sponsor.php
Rewrote 'we' word a little, rewrote mail order to use SQL_INSERTID() instead of anoth...
[mailer.git] / inc / modules / admin / what-edit_sponsor.php
index dacaab98c38e24be063411b5e729694d4128f4f1..8dff51a427e9c2bdca78fe76b3fd0c7695dea0b5 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
 
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAdmin())) {
-       die();
+       exit();
 } // END - if
 
 // Add description as navigation point
 addYouAreHereLink('admin', __FILE__);
 
-if ((isGetRequestElementSet('id')) && (isGetRequestElementSet('mode'))) {
+if ((isGetRequestElementSet('id')) && (isGetRequestElementSet('do'))) {
        // Check for selected sponsor
        $result_main = SQL_QUERY_ESC("SELECT
        `id`,`company`,`position`,`gender`,`surname`,`family`,
@@ -65,13 +65,13 @@ LIMIT 1",
                $content['warning_interval'] = createTimeSelections($content['warning_interval'], 'warning_interval', 'MWDh');
 
                // Init variables here
-               $TPL = sprintf("admin_edit_sponsor_%s", getRequestElement('mode'));
+               $TPL = sprintf("admin_edit_sponsor_%s", getRequestElement('do'));
                initSqls();
 
                // Sponsor was found
                if ((isFormSent()) || (isFormSent('edit'))) {
                        // Perform action on mode
-                       switch (getRequestElement('mode')) {
+                       switch (getRequestElement('do')) {
                                case 'add_points': // Add points
                                        if (bigintval(postRequestElement('points')) > 0) {
                                                // Replace german decimal comma with computer's decimal dot
@@ -128,8 +128,7 @@ LIMIT 1",
                                        } // END - if
 
                                        // Convert time selection
-                                       $content = array(); $id = 'warning_interval_ye'; $skip = false;
-                                       convertSelectionsToEpocheTime(postRequestArray(), $content, $id, $skip);
+                                       convertSelectionsToEpocheTimeInPostData('warning_interval_ye');
 
                                        // Save the sponsor
                                        handleSponsorRequest(postRequestArray());
@@ -146,8 +145,8 @@ LIMIT 1",
                                        break;
 
                                default: // Unknown mode
-                                       logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('mode')));
-                                       $message = '{%message,ADMIN_SPONSOR_INVALID_MODE=' . getRequestElement('mode') . '%}';
+                                       logDebugMessage(__FILE__, __LINE__, sprintf("Unknown mode %s detected.", getRequestElement('do')));
+                                       $message = '{%message,ADMIN_SPONSOR_INVALID_MODE=' . getRequestElement('do') . '%}';
                                        break;
                        }
 
@@ -163,7 +162,7 @@ LIMIT 1",
                        loadTemplate($TPL, false, $content);
                } else {
                        // Template not found
-                       displayMessage('{%message,ADMIN_SPONSOR_MODUS_TPL_404', getRequestElement('mode') . '%}');
+                       displayMessage('{%message,ADMIN_SPONSOR_MODUS_TPL_404', getRequestElement('do') . '%}');
                }
        } else {
                // Sponsor not found