A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / modules / admin / what-payments.php
index f403fa672b010ea233478e6949eb9934fdd432c5..cc14ac4569c55fd39dfc3cec9a8604a17e15136f 100644 (file)
@@ -50,7 +50,7 @@ if (((!isPostRequestParameterSet('t_wait')) || (!isPostRequestParameterSet('paym
 if (isFormSent()) {
        switch (getRequestParameter('do')) {
                case 'add':
-                       addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (`time`, `payment`, `mail_title`, `price`) VALUES ('".postRequestParameter('t_wait')."','".postRequestParameter('payment')."','".postRequestParameter('title')."','".postRequestParameter('price')."')");
+                       addSql("INSERT INTO `{?_MYSQL_PREFIX?}_payments` (`time`,`payment`,`mail_title`,`price`) VALUES ('".postRequestParameter('t_wait')."','".postRequestParameter('payment')."','".postRequestParameter('title')."','".postRequestParameter('price')."')");
                        if (countSumTotalData(postRequestParameter('t_wait'), 'payments', 'id', 'time', true) == 1) {
                                // Re-init the array here
                                initSqls();
@@ -81,12 +81,12 @@ if (isFormSent()) {
        }
 
        // Output template
-       loadTemplate('admin_settings_saved', false, $content);
+       displayMessage($content);
 } elseif ((isFormSent('delete')) && (ifPostContainsSelections())) {
        // Delete entries here
        $OUT = '';
        foreach (postRequestParameter('sel') as $id => $value) {
-               $result = SQL_QUERY_ESC("SELECT `id`, `time`, `mail_title` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT `id`,`time`,`mail_title` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
                        array(bigintval($id)), __FILE__, __LINE__);
                $content = SQL_FETCHARRAY($result);
 
@@ -103,7 +103,7 @@ if (isFormSent()) {
        // Edit entries
        $OUT = '';
        foreach (postRequestParameter('sel') as $id => $value) {
-               $result = SQL_QUERY_ESC("SELECT `id`, `time`, `payment`, `mail_title`, `price` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT `id`,`time`,`payment`,`mail_title`,`price` FROM `{?_MYSQL_PREFIX?}_payments` WHERE `id`=%s LIMIT 1",
                        array(bigintval($id)), __FILE__, __LINE__);
                $content = SQL_FETCHARRAY($result);
 
@@ -118,7 +118,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` ASC", __FILE__, __LINE__);
+       $result = SQL_QUERY("SELECT `id`,`time`,`payment`,`mail_title`,`price` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `time` ASC", __FILE__, __LINE__);
        if (!SQL_HASZERONUMS($result)) {
                // Make referal levels editable and deletable
                $OUT = '';