]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-order.php
Rewrote a lot parts to extract 'payments' table (+ handling) into own extension:
[mailer.git] / inc / modules / member / what-order.php
index d17dc594c24b2c05fecd3b62545f711a2c45bc3a..0cc9a78a8c293836a71eee34f7189fd54bc65dcd 100644 (file)
@@ -124,7 +124,7 @@ LIMIT 1",
                } // END - if
 
                // And shall I check that his URL is not in the black list?
-               if (isUrlBlacklisted(postRequestElement('url'))) {
+               if ((isExtensionActive('blacklist')) && (isUrlBlacklisted(postRequestElement('url')))) {
                        // Create redirect-URL
                        $data['url'] = 'modules.php?module=login&what=order&code=' . getCode('BLIST_URL') . '&blist=' . $GLOBALS['blacklist_data'][postRequestElement('url')]['timestamp'];
                } // END - if
@@ -172,9 +172,9 @@ LIMIT 1",
                $result = SQL_QUERY_ESC("SELECT
        `c`.`userid`
 FROM
-       `{?_MYSQL_PREFIX?}_user_cats` AS c
+       `{?_MYSQL_PREFIX?}_user_cats` AS `c`
 INNER JOIN
-       `{?_MYSQL_PREFIX?}_user_data` AS d
+       `{?_MYSQL_PREFIX?}_user_data` AS `d`
 ON
        `c`.`userid`=`d`.`userid`
 WHERE
@@ -245,7 +245,7 @@ LIMIT 1",
                        } // END - if
 
                        // Calculate used points
-                       $usedPoints = $content['target_send'] * getPaymentData(bigintval(postRequestElement('mail_type')));
+                       $usedPoints = $content['target_send'] * getPaymentPrice(bigintval(postRequestElement('mail_type')));
 
                        // Fix empty zip code
                        if (!isPostRequestElementSet('zip')) {
@@ -488,9 +488,9 @@ ORDER BY
                                                $result_holiday = SQL_QUERY_ESC("SELECT
        COUNT(`d`.`userid`) AS `cnt`
 FROM
-       `{?_MYSQL_PREFIX?}_user_data` AS d
+       `{?_MYSQL_PREFIX?}_user_data` AS `d`
 LEFT JOIN
-       `{?_MYSQL_PREFIX?}_user_holidays` AS h
+       `{?_MYSQL_PREFIX?}_user_holidays` AS `h`
 ON
        `d`.`userid`=`h`.`userid`
 WHERE
@@ -636,13 +636,13 @@ LIMIT 1",
                                        $content['category_selection'] = generateCategoryOptionsList(((isExtensionActive('html_mail')) && (isPostRequestElementSet('html'))) ? postRequestElement('html') : 'N', getMemberId());
 
                                        // Mail type
-                                       $content['type_selection'] = '';
+                                       $content['payment_selection'] = '';
                                        foreach ($payments as $key => $value) {
                                                if (is_array($value)) {
                                                        // Output option line
-                                                       $content['type_selection'] .= '      <option value="' . $payments[$key]['id'] . '"';
-                                                       if (($OLD_ORDER) && ($content['payment_id'] == $payments[$key]['id'])) $content['type_selection'] .= ' selected="selected"';
-                                                       $content['type_selection'] .= '>{%pipe,translateComma=' . $payments[$key]['price'] . '%} {--PER_MAIL--} - ' . $payments[$key]['mail_title'] . ' - ' . round($payments[$key]['payment']) . ' {--PAYMENT--}</option>';
+                                                       $content['payment_selection'] .= '      <option value="' . $payments[$key]['id'] . '"';
+                                                       if (($OLD_ORDER) && ($content['payment_id'] == $payments[$key]['id'])) $content['payment_selection'] .= ' selected="selected"';
+                                                       $content['payment_selection'] .= '>{%pipe,translateComma=' . $payments[$key]['price'] . '%} {--PER_MAIL--} - ' . $payments[$key]['mail_title'] . ' - ' . round($payments[$key]['payment']) . ' {--PAYMENT--}</option>';
                                                } // END - if
                                        } // END - foreach