]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-order.php
More rewrites from double- to single-quote
[mailer.git] / inc / modules / member / what-order.php
index a5a58c6f15e3b7ec5d9ef0f88d3bdcde7af17a93..f6e64164522cb5c99a49704eafd919bfddff1e66 100644 (file)
@@ -376,7 +376,7 @@ array(
                                }
 
                                // ID is received so we can redirect the user, used points will be added when he send's out the mail
-                               $URL = "modules.php?module=frametester&order=".$id."";
+                               $URL = 'modules.php?module=frametester&order=' . $id;
                        } elseif ($MAX_SEND == 0) {
                                // Not enougth receivers found which can receive mails
                                $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS2');
@@ -389,13 +389,13 @@ array(
                        $URL = 'modules.php?module=login&what=order&msg=' . getCode('NO_RECS_LEFT');
                }
        }
-} elseif (REQUEST_POST('receiver') == "0") {
+} elseif (REQUEST_POST('receiver') == '0') {
        // Not enougth receivers selected
        $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS1');
 } elseif (($ALLOWED == 0) && (getConfig('order_max_full') == 'ORDER')) {
        // No more mail orders allowed
        LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
-} elseif (($links < getConfig('unconfirmed')) && ($mmails == "1")) {
+} elseif (($links < getConfig('unconfirmed')) && ($mmails == '1')) {
        // Display order form
        $result_cats = SQL_QUERY("SELECT id, cat FROM `{!_MYSQL_PREFIX!}_cats`".$whereStatement." ORDER BY `sort`", __FILE__, __LINE__);
        if (SQL_NUMROWS($result_cats) > 0) {
@@ -408,11 +408,12 @@ array(
                        );
 
                        // Enable HTML checking
+                       // @TODO Rewrite this to a filter
                        $HTML = ''; $HOLIDAY = false; $HOL_STRING = '';
-                       if ((EXT_IS_ACTIVE('html_mail')) && (REQUEST_POST('html') == 'Y')) $HTML = " AND html='Y'";
+                       if ((EXT_IS_ACTIVE('html_mail')) && (REQUEST_POST('html') == 'Y')) $HTML = " AND `html`='Y'";
                        if (GET_EXT_VERSION('holiday') >= '0.1.3') {
                                // Extension's version is fine
-                               $HOLIDAY = true; $HOL_STRING = " AND holiday_active='N'";
+                               $HOLIDAY = true; $HOL_STRING = " AND `holiday_active`='N'";
                        } // END - if
 
                        // ... and begin loading stuff
@@ -433,7 +434,7 @@ array(
                                                $result_holiday = SQL_QUERY_ESC("SELECT DISTINCT d.userid FROM `{!_MYSQL_PREFIX!}_user_data` AS d
 LEFT JOIN `{!_MYSQL_PREFIX!}_user_holidays` AS h
 ON d.userid=h.userid
-WHERE d.userid=%s AND d.receive_mails > 0 AND d.`status`='CONFIRMED' AND d.holiday_active='Y'
+WHERE d.userid=%s AND d.receive_mails > 0 AND d.`status`='CONFIRMED' AND d.`holiday_active`='Y'
 AND h.holiday_start < UNIX_TIMESTAMP() AND h.holiday_end > UNIX_TIMESTAMP()
 LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                                if (SQL_NUMROWS($result_holiday) == 1) {
@@ -581,16 +582,16 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                switch (getConfig('order_max_full'))
                                {
                                case 'MAX': // He is allowed to send as much as possible
-                                       define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOWED_MAX'));
+                                       define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_MAX'));
                                        break;
 
                                case 'ORDER': // He is allowed to send as much as he setup the receiving value
-                                       define('ORDER_MAX_VALUE', sprintf(getMessage('ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
+                                       define('ORDER_MAX_VALUE', sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI));
                                        break;
 
                                default: // Unknown/invalid
                                        DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
-                                       define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOWED_UNKNOWN'));
+                                       define('ORDER_MAX_VALUE', getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN'));
                                        break;
                                }
 
@@ -622,12 +623,12 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                SQL_FREERESULT($result);
 
                                // 01      2              21    12                                    2    23         443    3          3210
-                               if ((REQUEST_ISSET_POST(('data'))) || ((getConfig('order_multi_page') != "Y") && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE('html_mail'))))) {
+                               if ((REQUEST_ISSET_POST(('data'))) || ((getConfig('order_multi_page') != 'Y') && ((!IS_ADMIN()) && (!EXT_IS_ACTIVE('html_mail'))))) {
                                        // Pre-output categories
                                        $CAT = '';
                                        foreach ($CATS['id'] as $key => $value) {
                                                $CAT .= "      <option value=\"".$value."\"";
-                                               if (($OLD_ORDER) && ($content['cat'] == $value)) $CAT .= " selected=\"selected\"";
+                                               if (($OLD_ORDER) && ($content['cat'] == $value)) $CAT .= ' selected="selected"';
                                                $CAT .= ">".$CATS['name'][$key]." (".$CATS['uids'][$key]." {--USER_IN_CAT--})</option>\n";
                                        } // END - foreach
 
@@ -638,7 +639,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                                if (is_array($value)) {
                                                        // Output option line
                                                        $type .= "      <option value=\"".$typeS[$key][0]."\"";
-                                                       if (($OLD_ORDER) && ($payment == $typeS[$key][0])) $type .= " selected=\"selected\"";
+                                                       if (($OLD_ORDER) && ($payment == $typeS[$key][0])) $type .= ' selected="selected"';
                                                        $type .= ">".$P." {--PER_MAIL--} - ".$typeS[$key][3]." - ".round($typeS[$key][2])." {--PAYMENT--}</option>\n";
                                                } // END - if
                                        } // END - foreach