]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-payments.php
More HTML rewrites
[mailer.git] / inc / modules / admin / what-payments.php
index b7d7f33b394a9eca55b64b98c3db1f7917c367d3..0c2925958cc37c59d83322ae2cd6f7fc1238fd5b 100644 (file)
 // 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');