// 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
// 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
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
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
// 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
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'))));
}
} 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?
$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'));
$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__);
{--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--}<br />\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;