X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-order.php;h=1b7b283a805bca9cda0b9f4bebd54ce4d82f1160;hp=54c841fe089437da886e28d5956e6543cec2b95a;hb=2bda7ccdfd87b065a61ff976b5f9e98e46f73591;hpb=3f9420de85c0433e17903809464f9e203c47deba diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 54c841fe08..1b7b283a80 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -118,7 +118,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", // 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)) { // URL found! - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_URL_FOUND'); + $URL = "modules.php?module=login&what=order&msg=".getCode('URL_FOUND'); } // END - if // Remove new-line and carriage-return characters @@ -127,7 +127,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", // Text length within allowed length? if (strlen($TEST) > getConfig('max_tlength')) { // Text is too long! - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_OVERLENGTH'); + $URL = "modules.php?module=login&what=order&msg=".getCode('OVERLENGTH'); } // END - if } // END - if @@ -137,7 +137,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", 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)) { // URL in subject found - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_SUBJ_URL'); + $URL = "modules.php?module=login&what=order&msg=".getCode('SUBJ_URL'); } // END - if } // END - if @@ -152,7 +152,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", list($blist) = SQL_FETCHROW($result); // Create redirect-URL - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_BLIST_URL')."&blist=".$blist; + $URL = "modules.php?module=login&what=order&msg=".getCode('BLIST_URL')."&blist=".$blist; } // END - if // Free result @@ -162,13 +162,13 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", // Enougth receivers entered? if ((REQUEST_POST('receiver') < getConfig('order_min')) && (!IS_ADMIN())) { // Less than allowed receivers entered! - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_MORE_RECEIVERS3'); + $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS3'); } // END - if // Validate URL if (!VALIDATE_URL(REQUEST_POST('url'))) { // URL is invalid! - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_INVALID_URL'); + $URL = "modules.php?module=login&what=order&msg=".getCode('INVALID_URL'); } // END - if // Probe for HTML extension @@ -179,7 +179,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", REQUEST_SET_POST('text', HTML_CHECK_TAGS(REQUEST_POST('text'))); // Maybe invalid tags found? - if (!REQUEST_ISSET_POST(('text'))) $URL = "modules.php?module=login&what=order&msg=".constant('CODE_INVALID_TAGS')."&id=".$id; + 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')))); @@ -187,7 +187,7 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", } } elseif (!IS_ADMIN()) { // He has already sent a mail within a specific time - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_URL_TLOCK')."&id=".$id; + $URL = "modules.php?module=login&what=order&msg=".getCode('URL_TLOCK')."&id=".$id; } // Still no error? @@ -379,19 +379,19 @@ array( $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=".constant('CODE_MORE_RECEIVERS2'); + $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_RECEIVERS2'); } else { // No enougth points left! - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_MORE_POINTS'); + $URL = "modules.php?module=login&what=order&msg=".getCode('MORE_POINTS'); } } else { // Ordered more mails than he can send in this category - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_NO_RECS_LEFT'); + $URL = "modules.php?module=login&what=order&msg=".getCode('NO_RECS_LEFT'); } } } elseif (REQUEST_POST('receiver') == "0") { // Not enougth receivers selected - $URL = "modules.php?module=login&what=order&msg=".constant('CODE_MORE_RECEIVERS1'); + $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')); @@ -481,7 +481,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $MSG = ""; switch (REQUEST_GET('msg')) { - case constant('CODE_URL_TLOCK'): + case getCode('URL_TLOCK'): $result = SQL_QUERY_ESC("SELECT timestamp FROM `{!_MYSQL_PREFIX!}_pool` WHERE id=%s LIMIT 1", array(bigintval(REQUEST_GET('id'))), __FILE__, __LINE__); @@ -508,47 +508,47 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); {--MEMBER_LAST_TLOCK--}: ".$LORDER; break; - case constant('CODE_OVERLENGTH'): + case getCode('OVERLENGTH'): $MSG = getMessage('MEMBER_TEXT_OVERLENGTH'); break; - case constant('CODE_URL_FOUND'): + case getCode('URL_FOUND'): $MSG = getMessage('MEMBER_TEXT_CONTAINS_URL'); break; - case constant('CODE_SUBJ_URL'): + case getCode('SUBJ_URL'): $MSG = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break; - case constant('CODE_BLIST_URL'): + case getCode('BLIST_URL'): $MSG = "{--MEMBER_URL_BLACK_LISTED--}
\n{--MEMBER_BLIST_TIME--}: ".MAKE_DATETIME(REQUEST_GET('blist'), "0"); break; - case constant('CODE_NO_RECS_LEFT'): + case getCode('NO_RECS_LEFT'): $MSG = getMessage('MEMBER_SELECTED_MORE_RECS'); break; - case constant('CODE_INVALID_TAGS'): + case getCode('INVALID_TAGS'): $MSG = getMessage('MEMBER_HTML_INVALID_TAGS'); break; - case constant('CODE_MORE_POINTS'): + case getCode('MORE_POINTS'): $MSG = getMessage('MEMBER_MORE_POINTS_NEEDED'); break; - case constant('CODE_MORE_RECEIVERS1'): + case getCode('MORE_RECEIVERS1'): $MSG = getMessage('MEMBER_ENTER_MORE_RECEIVERS'); break; - case constant('CODE_MORE_RECEIVERS2'): + case getCode('MORE_RECEIVERS2'): $MSG = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); break; - case constant('CODE_MORE_RECEIVERS3'): + case getCode('MORE_RECEIVERS3'): $MSG = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min')); break; - case constant('CODE_INVALID_URL'): + case getCode('INVALID_URL'): $MSG = getMessage('MEMBER_ENTER_INVALID_URL'); break;