]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-payments.php
New functions introduced, several rewrites:
[mailer.git] / inc / modules / admin / what-payments.php
index 4204e12df11964fbaf561d064874b0d270a6e22b..0c2925958cc37c59d83322ae2cd6f7fc1238fd5b 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 10/19/2003 *
- * ===============                              Last change: 12/12/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 10/19/2003 *
+ * ===================                          Last change: 12/12/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-payments.php                                *
 // Some security stuff...
 if ((!defined('__SECURITY')) || (!isAdmin())) {
        die();
-}
+} // END - if
 
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
 if (((!isPostRequestElementSet(('t_wait'))) || (!isPostRequestElementSet(('payment')))) && (isGetRequestElementSet('do')) && (getRequestElement('do') == 'add')) {
        unsetPostRequestElement('ok');
-}
+} // END - if
 
 if (isFormSent()) {
        switch (getRequestElement('do')) {
@@ -74,13 +74,13 @@ if (isFormSent()) {
                                addSql("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`='".$id."' LIMIT 1");
                        }
                        break;
-       }
+       } // END - switch
 
        // Save settings
        if (countSqls() > 0) {
                // Run all queries
                runFilterChain('run_sqls');
-               $content = "<span class=\"admin_failed\">".SETTINGS_SAVED."</span>";
+               $content = "<span class=\"admin_failed\">{--SETTINGS_SAVED--}</span>";
        } else {
                // Nothing has changed!
                $content = "<span class=\"admin_failed\">{--SETTINGS_NOT_SAVED--}</span>";
@@ -140,7 +140,7 @@ if (isFormSent()) {
        loadTemplate('admin_edit_payments', false, $OUT);
 } else {
        // Referal levels
-       $result = SQL_QUERY("SELECT id, time, payment, mail_title, price FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY time", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT `id`, `time`, `payment`, `mail_title`, `price` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `time` ASC", __FILE__, __LINE__);
        if (SQL_NUMROWS($result) > 0) {
                // Make referal levels editable and deletable
                $OUT = ''; $SW = 2;
@@ -161,14 +161,14 @@ if (isFormSent()) {
                        // Load row template and switch colors
                        $OUT .= loadTemplate('admin_payments_list_row', true, $content);
                        $SW = 3 - $SW;
-               }
+               } // END - switch
 
                // Free memory
                SQL_FREERESULT($result);
 
                // Load main template
                loadTemplate('admin_list_payments', false, $OUT);
-       }
+       } // END - if
 
        // Form for adding new referal levels
        loadTemplate('admin_add_payment');