]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_sponsor_pay.php
More XHTML-fied and extended header added to templates
[mailer.git] / inc / modules / admin / what-list_sponsor_pay.php
index cd7a8e117e06dd15f5e89deda0fabd83cb4aaaa2..9f8a6e2779242e7a3796139e4438ecd25145468f 100644 (file)
  * -------------------------------------------------------------------- *
  * Kurzbeschreibung  : Auflisten/Aendern/Loeschen aller Buchungspakete  *
  * -------------------------------------------------------------------- *
- *                                                                      *
+ * $Revision:: 856                                                    $ *
+ * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 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                  *
@@ -52,12 +57,12 @@ if (REQUEST_ISSET_POST(('add'))) {
        if ((REQUEST_POST('pay_min_count') == 0) || (!REQUEST_ISSET_POST(('pay_min_count')))) REQUEST_UNSET_POST(('add'));
        if (!REQUEST_ISSET_POST(('pay_currency'))) REQUEST_UNSET_POST(('add'));
 
-} elseif ((REQUEST_ISSET_POST(('edit'))) || (REQUEST_ISSET_POST(('del'))) || (REQUEST_ISSET_POST(('change'))) || (REQUEST_ISSET_POST(('remove')))) {
+} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del')) || (REQUEST_ISSET_POST(('change'))) || (REQUEST_ISSET_POST(('remove')))) {
        // Check if at least one entry was selected
        if (!REQUEST_ISSET_POST(('id'))) {
                // Nothing selected for editing / deleting???
-               REQUEST_UNSET_POST(('edit'));
-               REQUEST_UNSET_POST(('del'));
+               REQUEST_UNSET_POST('edit');
+               REQUEST_UNSET_POST('del');
                REQUEST_UNSET_POST(('change'));
                REQUEST_UNSET_POST(('remove'));
        } elseif (REQUEST_ISSET_POST(('change'))) {
@@ -113,18 +118,18 @@ if (REQUEST_ISSET_POST(('add'))) {
                        ), __FILE__, __LINE__);
 
                // Payment type added!
-               $MSG = ADMIN_SPONSOR_PAYTYPE_ADDED_1.REQUEST_POST('pay_name').ADMIN_SPONSOR_PAYTYPE_ADDED_2;
+               $MSG = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ADDED'), REQUEST_POST('pay_name'));
        } else {
                // Free memory
                SQL_FREERESULT($result);
 
                // Entry does already exists
-               $MSG = ADMIN_SPONSOR_PAYTYPE_ALREADY_1.REQUEST_POST('pay_name').ADMIN_SPONSOR_PAYTYPE_ALREADY_2;
+               $MSG = sprintf(getMessage('ADMIN_SPONSOR_PAYTYPE_ALREADY'), REQUEST_POST('pay_name'));
        }
 
        // Output message
        LOAD_TEMPLATE("admin_settings_saved", false, $MSG);
-} elseif ((REQUEST_ISSET_POST(('edit'))) || (REQUEST_ISSET_POST(('del')))) {
+} elseif ((REQUEST_ISSET_POST('edit')) || (REQUEST_ISSET_POST('del'))) {
        // Load all data
        $OUT = ""; $SW = 2;
        foreach (REQUEST_POST('id') as $id => $sel) {
@@ -146,7 +151,7 @@ if (REQUEST_ISSET_POST(('add'))) {
                                'curr' => htmlspecialchars($curr)
                        );
 
-                       if (REQUEST_ISSET_POST(('edit'))) {
+                       if (REQUEST_ISSET_POST('edit')) {
                                // Edit entry
                                $OUT .= LOAD_TEMPLATE("admin_list_sponsor_pay_edit_row", true, $content);
                        } else {
@@ -160,13 +165,13 @@ if (REQUEST_ISSET_POST(('add'))) {
 
                // Switch colors
                $SW = 3 - $SW;
-       }
+       } // END - foreach
 
        // Remember content in constant
        define('__SPONSOR_ROWS', $OUT);
 
        // Load main template depending on mode (edit/delete)
-       if (REQUEST_ISSET_POST(('edit'))) {
+       if (REQUEST_ISSET_POST('edit')) {
                // Load main edit template
                LOAD_TEMPLATE("admin_list_sponsor_pay_edit");
        } else {
@@ -181,18 +186,18 @@ if (REQUEST_ISSET_POST(('add'))) {
        // Do we have some paytypes setup?
        if (SQL_NUMROWS($result) > 0) {
                // Prepare variables for listing
-               $SW = 2; $OUT = "";
+               $OUT = ""; $SW = 2;
 
                // List alle found payment types
-               while (list($id, $name, $rate, $min, $currency) = SQL_FETCHROW($result)) {
+               while ($content = SQL_FETCHARRAY($result)) {
                        // Remember data in array
                        $content = array(
                                'sw'       => $SW,
-                               'id'       => $id,
-                               'name'     => $name,
-                               'rate'     => TRANSLATE_COMMA($rate),
-                               'min'      => $min,
-                               'currency' => $currency
+                               'id'       => $content['id'],
+                               'name'     => $content['pay_name'],
+                               'rate'     => TRANSLATE_COMMA($content['pay_rate']),
+                               'min'      => $content['pay_min_count'],
+                               'currency' => $content['pay_currency']
                        );
 
                        // Add row
@@ -200,7 +205,7 @@ if (REQUEST_ISSET_POST(('add'))) {
 
                        // Switch colors
                        $SW = 3 - $SW;
-               }
+               } // END - while
 
                // Free memory
                SQL_FREERESULT($result);