]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-order.php
Still a bit silly but seems to work
[mailer.git] / inc / modules / member / what-order.php
index 5c4f57833a2e9c0b354904df434f9f96742f0b7f..64b56b595079acf79936c0153961ab907af05a85 100644 (file)
@@ -43,7 +43,7 @@ if (!defined('__SECURITY')) {
 } elseif (!IS_MEMBER()) {
        redirectToUrl('modules.php?module=index');
 } elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) {
-       addFatalMessage(__FILE__, __LINE__, sprintf(getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'order'));
+       addFatalMessage(__FILE__, __LINE__, generateExtensionInactiveMessage('order'));
        return;
 }
 
@@ -64,7 +64,7 @@ if (IS_ADMIN()) $whereStatement = '';
 define('__MIN_VALUE', getConfig('order_min'));
 
 // Count unconfirmed mails
-$links = GET_TOTAL_DATA(getUserId(), "user_links", "id", 'userid', true);
+$links = GET_TOTAL_DATA(getUserId(), "user_links", 'id', 'userid', true);
 
 // Does the user has more than 0 mails per day set?
 $HOLIDAY = 'userid';
@@ -101,7 +101,7 @@ FROM `{!_MYSQL_PREFIX!}_pool`
 WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
        array(getUserId(), REQUEST_POST('url'), getConfig('url_tlock')), __FILE__, __LINE__);
 
-       $type = "TEMP"; $id = 0;
+       $type = 'TEMP'; $id = 0;
        if (SQL_NUMROWS($result) == 1) {
                // Load id and mail type
                list($id, $type) = SQL_FETCHROW($result);
@@ -110,13 +110,13 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
        // Free result
        SQL_FREERESULT($result);
 
-       if ($type == "TEMP") {
+       if ($type == 'TEMP') {
                // No entry found, so we need to check out the stats table as well... :)
                // We have to add that suff here, now we continue WITHOUT checking and check the text and subject against some filters
                $URL = '';
                if (getConfig('test_text') == 'Y') {
                        // Test submitted text against some filters (length, URLs in text etc.)
-                       if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) {
+                       if ((strpos(strtolower(REQUEST_POST('text')), "https://") > -1) || (strpos(strtolower(REQUEST_POST('text')), 'http://') > -1) || (strpos(strtolower(REQUEST_POST('text')), "www") > -1)) {
                                // URL found!
                                $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_FOUND');
                        } // END - if
@@ -135,7 +135,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
                if (getConfig('test_subj') == 'Y') {
                        // Check the subject line for issues
                        REQUEST_SET_POST('subject', str_replace("\\", "[nl]", substr(REQUEST_POST('subject'), 0, 200)));
-                       if ((strpos(strtolower(REQUEST_POST('subject')), "http://") > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) {
+                       if ((strpos(strtolower(REQUEST_POST('subject')), 'http://') > -1) || (strpos(strtolower(REQUEST_POST('subject')), "www") > -1)) {
                                // URL in subject found
                                $URL = 'modules.php?module=login&what=order&msg=' . getCode('SUBJ_URL');
                        } // END - if
@@ -145,7 +145,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
                if (getConfig('url_blacklist') == 'Y') {
                        // Ok, I do that for you know...
                        $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{!_MYSQL_PREFIX!}_url_blacklist` WHERE `url`='%s' LIMIT 1",
-                       array(REQUEST_POST('url')), __FILE__, __LINE__);
+                               array(REQUEST_POST('url')), __FILE__, __LINE__);
 
                        if (SQL_NUMROWS($result) == 1) {
                                // Jupp, we got one listed
@@ -182,12 +182,12 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1",
                                if (!REQUEST_ISSET_POST(('text'))) $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_TAGS')."&id=".$id;
                        } else {
                                // Remove any HTML code
-                               REQUEST_SET_POST('text', str_replace("<", "{OPEN_HTML}", str_replace(">", "{CLOSE_HTML}", REQUEST_POST('text'))));
+                               REQUEST_SET_POST('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', REQUEST_POST('text'))));
                        }
                }
        } elseif (!IS_ADMIN()) {
                // He has already sent a mail within a specific time
-               $URL = 'modules.php?module=login&amp;what=order&amp;msg=' . getCode('URL_TLOCK')."&amp;id=".$id;
+               $URL = 'modules.php?module=login&amp;what=order&amp;msg=' . getCode('URL_TLOCK') . '&amp;id=' . $id;
        }
 
        // Still no error?
@@ -268,7 +268,7 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME
                        if (($USED > 0) && ($USED <= $total) && ($MAX_SEND > 0)) {
                                // Gettings points is okay, so we can add $USED later from
                                $TIME = time();
-                               if (($id == '0') || ($type != "TEMP")) {
+                               if (($id == '0') || ($type != 'TEMP')) {
                                        // New order
                                        $id = 0;
                                        if (EXT_IS_ACTIVE('html_mail')) {
@@ -553,7 +553,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                                $message = getMessage('MEMBER_ENTER_INVALID_URL');
                                                break;
 
-                                       case "": // When no error code is included in the URL we do not need to output an error message as well...
+                                       case '': // When no error code is included in the URL we do not need to output an error message as well...
                                                break;
 
                                        default:
@@ -616,7 +616,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__);
                                        $OLD_ORDER = true;
                                } else {
                                        // Default output for that your members don't forget it...
-                                       $url = "http://";
+                                       $url = 'http://';
                                }
 
                                // Free result