$url = ''; $id = '0';
-// Count unconfirmed mails
-$links = getTotalUnconfirmedMails(getMemberId());
-
$ALLOWED = getUserData('receive_mails') - getUserData('mail_orders');
if (getConfig('order_max_full') == 'MAX') $ALLOWED = getUserData('receive_mails');
// Continue with the frametester, we first need to store the data temporary in the pool
//
// First we would like to store the data and get it's pool position back...
- $result = SQL_QUERY_ESC("SELECT `id`, `data_type`
+ $result = SQL_QUERY_ESC("SELECT `id`,`data_type`
FROM
`{?_MYSQL_PREFIX?}_pool`
WHERE
$url = '';
if (getConfig('allow_url_in_text') == 'Y') {
// Test submitted text against some filters (length, URLs in text etc.)
- if ((strpos(strtolower(postRequestParameter('text')), 'https://') > -1) || (strpos(strtolower(postRequestParameter('text')), 'http://') > -1) || (strpos(strtolower(postRequestParameter('text')), "www") > -1)) {
+ if ((isInStringIgnoreCase('https://', postRequestParameter('text'))) || (isInStringIgnoreCase('http://', postRequestParameter('text'))) || (isInStringIgnoreCase('www', postRequestParameter('text')))) {
// URL found
$url = 'modules.php?module=login&what=order&code=' . getCode('URL_FOUND');
} // END - if
if (getConfig('allow_url_in_subject') == 'Y') {
// Check the subject line for issues
setPostRequestParameter('subject', str_replace("\\", '[nl]', substr(postRequestParameter('subject'), 0, 200)));
- if ((strpos(strtolower(postRequestParameter('subject')), 'http://') > -1) || (strpos(strtolower(postRequestParameter('subject')), "www") > -1)) {
+ if ((isInStringIgnoreCase('https://', postRequestParameter('subject'))) || (isInStringIgnoreCase('http://', postRequestParameter('subject'))) || (isInStringIgnoreCase('www', postRequestParameter('subject')))) {
// URL in subject found
$url = 'modules.php?module=login&what=order&code=' . getCode('SUBJECT_URL');
} // END - if
} elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) {
// No more mail orders allowed
displayMessage('{--MEMBER_ORDER_ALLOWED_EXHAUSTED--}');
-} elseif ($links < getConfig('unconfirmed')) {
+} elseif (getTotalUnconfirmedMails(getMemberId()) < getConfig('unconfirmed')) {
// Show only enabled categories to the user ...
$whereStatement = " WHERE `visible`='Y'";
// Display order form
$result_cats = SQL_QUERY("SELECT
- `id`, `cat`
+ `id`,`cat`
FROM
`{?_MYSQL_PREFIX?}_cats`
".$whereStatement."
SQL_FREERESULT($result_cats);
// Now we need to load the mail types...
- $result = SQL_QUERY("SELECT `id`, `price`, `payment`, `mail_title` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `payment` ASC", __FILE__, __LINE__);
+ $result = SQL_QUERY("SELECT `id`,`price`,`payment`,`mail_title` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `payment` ASC", __FILE__, __LINE__);
$types = array();
if (!SQL_HASZERONUMS($result)) {
// Check if we already have an order placed and make it editable
$result = SQL_QUERY_ESC("SELECT
- `subject`, `text`, `payment_id`, `timestamp`, `url`, `target_send`, `cat_id`, `zip`
+ `subject`,`text`,`payment_id`,`timestamp`,`url`,`target_send`,`cat_id`,`zip`
FROM
`{?_MYSQL_PREFIX?}_pool`
WHERE
}
} else {
// Please confirm some mails first
- displayMessage('<span class="notice">{%message,MEMBER_ORDER_LINKS_LEFT=' . $links . '%}</span>', $links);
+ displayMessage('<span class="notice">{%message,MEMBER_ORDER_LINKS_LEFT=' . getTotalUnconfirmedMails(getMemberId()) . '%}</span>');
}
if (!empty($url)) {