]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-order.php
Even more rewrites to EL
[mailer.git] / inc / modules / member / what-order.php
index c360728d6a4ced1ca965ea09cf2ff280f2466675..1e3301a93989c3eef966b2f21c417466aa8a9a93 100644 (file)
@@ -99,7 +99,7 @@ $total = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTot
 
 if (($HOLIDAY == 'Y') && (isExtensionInstalledAndNewer('holiday', '0.1.3'))) {
        // Holiday is active!
-       loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE'));
+       loadTemplate('admin_settings_saved', false, '{--HOLIDAY_ORDER_NOT_POSSIBLE--}');
 } elseif ((isPostRequestParameterSet('frametester')) && ($ALLOWED > 0) && (postRequestParameter('receiver') > 0)) {
        // Continue with the frametester, we first need to store the data temporary in the pool
        //
@@ -110,12 +110,11 @@ FROM
 WHERE
        `sender`=%s AND
        `url`='%s' AND
-       `timestamp` > (UNIX_TIMESTAMP() - %s)
+       `timestamp` > (UNIX_TIMESTAMP() - {?url_tlock?})
 LIMIT 1",
                array(
                        getMemberId(),
-                       postRequestParameter('url'),
-                       getConfig('url_tlock')
+                       postRequestParameter('url')
                ), __FILE__, __LINE__);
 
        $type = 'TEMP'; $id = '0';
@@ -219,7 +218,9 @@ LIMIT 1",
                $add = '';
                if ((getConfig('order_multi_page') == 'Y') && (isPostRequestParameterSet('zip')) && (postRequestParameter('zip') != '')) {
                        // Choose recipients by ZIP code
-                       $add = " AND d.zip LIKE '".bigintval(postRequestParameter('zip'))."{PER}'";
+                       $add = sprintf(" AND d.zip LIKE '%s%%'",
+                               bigintval(postRequestParameter('zip'))
+                       );
                } // END - if
 
                // Check for userids
@@ -433,7 +434,7 @@ LIMIT 1",
        $url = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1');
 } elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) {
        // No more mail orders allowed
-       loadTemplate('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
+       loadTemplate('admin_settings_saved', false, '{--MEMBER_ORDER_ALLOWED_EXHAUSTED--}');
 } elseif (($links < getConfig('unconfirmed')) && ($mmails == 1)) {
        // Display order form
        $result_cats = SQL_QUERY("SELECT
@@ -616,9 +617,9 @@ LIMIT 1",
                                        // Pre-output categories
                                        $content['category_selection'] = '';
                                        foreach ($categories['id'] as $key => $value) {
-                                               $content['category_selection'] .= "      <option value=\"".$value."\"";
+                                               $content['category_selection'] .= '      <option value="' . $value . '"';
                                                if (($OLD_ORDER) && ($content['cat_id'] == $value)) $content['category_selection'] .= ' selected="selected"';
-                                               $content['category_selection'] .= ">".$categories['name'][$key]." (".$categories['userids'][$key]." {--USER_IN_CAT--})</option>\n";
+                                               $content['category_selection'] .= '>' . $categories['name'][$key]." (".$categories['userids'][$key] . ' {--USER_IN_CAT--})</option>';
                                        } // END - foreach
 
                                        // Mail type
@@ -627,9 +628,9 @@ LIMIT 1",
                                                $P = translateComma($types[$key][1]);
                                                if (is_array($value)) {
                                                        // Output option line
-                                                       $content['type_selection'] .= "      <option value=\"".$types[$key][0]."\"";
+                                                       $content['type_selection'] .= '      <option value="' . $types[$key][0] . '"';
                                                        if (($OLD_ORDER) && ($content['payment_id'] == $types[$key][0])) $content['type_selection'] .= ' selected="selected"';
-                                                       $content['type_selection'] .= ">".$P." {--PER_MAIL--} - ".$types[$key][3]." - ".round($types[$key][2])." {--PAYMENT--}</option>\n";
+                                                       $content['type_selection'] .= '>' . $P . ' {--PER_MAIL--} - ' . $types[$key][3] . ' - ' . round($types[$key][2]) . ' {--PAYMENT--}</option>';
                                                } // END - if
                                        } // END - foreach
 
@@ -697,7 +698,7 @@ LIMIT 1",
        }
 } elseif ($mmails == '0') {
        // Please set more than 0 mails per day
-       loadTemplate('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
+       loadTemplate('admin_settings_saved', false, '{--MEMBER_HAS_ZERO_MMAILS--}');
 } else {
        // Please confirm some mails first
        loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_LINKS_LEFT'), $links);