X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-order.php;h=f6e64164522cb5c99a49704eafd919bfddff1e66;hb=6e008d188bf9c7f8d4edc2a8799c61940eee48e7;hp=47b7729e04f8b38248b667e2bf57ba6137b85abb;hpb=e01fcf1ca8ddeb72af76465df3ef72301a1cdae7;p=mailer.git diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 47b7729e04..f6e6416452 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -10,10 +10,10 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : Hier koennen Ihre Mitglieder Mails buchen * * -------------------------------------------------------------------- * - * $Revision:: 856 $ * - * $Date:: 2009-03-06 20:24:32 +0100 (Fr, 06. March 2009) $ * + * $Revision:: $ * + * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * - * $Author:: stelzi $ * + * $Author:: $ * * Needs to be in all Files and every File needs "svn propset * * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * @@ -38,37 +38,37 @@ // Some security stuff... if (!defined('__SECURITY')) { - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; + $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), '/inc') + 4) . '/security.php'; require($INC); } elseif (!IS_MEMBER()) { - LOAD_URL("modules.php?module=index"); -} elseif ((!EXT_IS_ACTIVE("order")) && (!IS_ADMIN())) { - addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), "order"); + LOAD_URL('modules.php?module=index'); +} elseif ((!EXT_IS_ACTIVE('order')) && (!IS_ADMIN())) { + addFatalMessage(__FILE__, __LINE__, getMessage('EXTENSION_PROBLEM_EXT_INACTIVE'), 'order'); return; } // Add description as navigation point -ADD_DESCR("member", __FILE__); +ADD_DESCR('member', __FILE__); -$URL = ""; $id = 0; +$URL = ''; $id = 0; $whereStatement = " WHERE `visible`='Y'"; // Set undefined array elements -if (!REQUEST_ISSET_GET(('msg'))) REQUEST_SET_GET('msg' , ""); -if (!REQUEST_ISSET_POST(('zip'))) REQUEST_SET_POST('zip' , ""); -if (!REQUEST_ISSET_POST(('html'))) REQUEST_SET_POST('html' , ""); -if (!REQUEST_ISSET_POST(('receiver'))) REQUEST_SET_POST('receiver', ""); -if (IS_ADMIN()) $whereStatement = ""; +if (!REQUEST_ISSET_GET('msg')) REQUEST_SET_GET('msg' , ''); +if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip' , ''); +if (!REQUEST_ISSET_POST('html')) REQUEST_SET_POST('html' , ''); +if (!REQUEST_ISSET_POST('receiver')) REQUEST_SET_POST('receiver', ''); +if (IS_ADMIN()) $whereStatement = ''; // Minimum mails / order 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"; -if (GET_EXT_VERSION("holiday") >= "0.1.3") { +$HOLIDAY = 'userid'; +if (GET_EXT_VERSION('holiday') >= '0.1.3') { // Fetch also holiday activation data $HOLIDAY = "holiday_active"; } // END - if @@ -84,14 +84,14 @@ SQL_FREERESULT($result_mmails); if ($HOLIDAY == $DMY) $HOLIDAY='N'; $ALLOWED = $MAXI - $ORDERS; -if (getConfig('order_max_full') == "MAX") $ALLOWED = $MAXI; +if (getConfig('order_max_full') == 'MAX') $ALLOWED = $MAXI; // Now check his points amount -$TOTAL = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");; +$total = GET_TOTAL_DATA(getUserId(), "user_points", "points") - GET_TOTAL_DATA(getUserId(), "user_data", "used_points");; -if (($HOLIDAY == "Y") && (GET_EXT_VERSION("holiday") >= "0.1.3")) { +if (($HOLIDAY == 'Y') && (GET_EXT_VERSION('holiday') >= '0.1.3')) { // Holiday is active! - LOAD_TEMPLATE("admin_settings_saved", false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE')); + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE')); } elseif ((REQUEST_ISSET_POST(('frametester'))) && ($ALLOWED > 0) && (REQUEST_POST('receiver') > 0)) { // Continue with the frametester, we first need to store the data temporary in the pool // @@ -113,36 +113,36 @@ WHERE sender=%s AND url='%s' AND timestamp > (UNIX_TIMESTAMP() - %s) LIMIT 1", 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") { + $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)) { // URL found! - $URL = "modules.php?module=login&what=order&msg=".getCode('URL_FOUND'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_FOUND'); } // END - if // Remove new-line and carriage-return characters - $TEST = str_replace("\n", "", str_replace("\r", "", REQUEST_POST('text'))); + $TEST = str_replace("\n", '', str_replace("\r", '', REQUEST_POST('text'))); // Text length within allowed length? if (strlen($TEST) > getConfig('max_tlength')) { // Text is too long! - $URL = "modules.php?module=login&what=order&msg=".getCode('OVERLENGTH'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('OVERLENGTH'); } // END - if } // END - if // Shall I test the subject line against URLs? - if (getConfig('test_subj') == "Y") { + 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)) { // URL in subject found - $URL = "modules.php?module=login&what=order&msg=".getCode('SUBJ_URL'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('SUBJ_URL'); } // END - if } // END - if // And shall I check that his URL is not in the black list? - if (getConfig('url_blacklist') == "Y") { + 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__); @@ -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=".getCode('BLIST_URL')."&blist=".$blist; + $URL = 'modules.php?module=login&what=order&msg=' . getCode('BLIST_URL')."&blist=".$blist; } // END - if // Free result @@ -162,24 +162,24 @@ 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=".getCode('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=".getCode('INVALID_URL'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('INVALID_URL'); } // END - if // Probe for HTML extension - if (EXT_IS_ACTIVE("html_mail")) { + if (EXT_IS_ACTIVE('html_mail')) { // HTML or regular text mail? - if (REQUEST_POST('html') == "Y") { + if (REQUEST_POST('html') == 'Y') { // Chek for valid HTML tags 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=".getCode('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,23 +187,23 @@ 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=".getCode('URL_TLOCK')."&id=".$id; + $URL = 'modules.php?module=login&what=order&msg=' . getCode('URL_TLOCK')."&id=".$id; } // Still no error? if (empty($URL)) { // Check if category and number of receivers is okay - $ADD = ""; - if ((getConfig('order_multi_page') == "Y") && (REQUEST_ISSET_POST(('zip')))) { + $add = ''; + if ((getConfig('order_multi_page') == 'Y') && (REQUEST_ISSET_POST('zip'))) { // Choose recipients by ZIP code - $ADD = " AND d.zip LIKE '".bigintval(REQUEST_POST('zip'))."{PER}'"; + $add = " AND d.zip LIKE '".bigintval(REQUEST_POST('zip'))."{PER}'"; } // END - if // Check for userids $result = SQL_QUERY_ESC("SELECT DISTINCT c.userid FROM `{!_MYSQL_PREFIX!}_user_cats` AS c LEFT JOIN `{!_MYSQL_PREFIX!}_user_data` AS d ON c.userid=d.userid -WHERE c.cat_id=%s AND c.userid != '%s' AND d.`status`='CONFIRMED' AND d.receive_mails > 0".$ADD." +WHERE c.cat_id=%s AND c.userid != '%s' AND d.`status`='CONFIRMED' AND d.receive_mails > 0".$add." ORDER BY d.%s %s", array( bigintval(REQUEST_POST('cat')), @@ -216,7 +216,7 @@ ORDER BY d.%s %s", if (SQL_NUMROWS($result) >= REQUEST_POST('receiver')) { // Check for holiday extensions $HOLIDAY = false; - if (GET_EXT_VERSION("holiday") >= "0.1.3") { + if (GET_EXT_VERSION('holiday') >= '0.1.3') { // Include checking for users in holiday $HOLIDAY = true; } // END - if @@ -246,14 +246,14 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME SQL_FREERESULT($result); // Implode array into string for the sending pool - $RECEIVER = implode($TEST, ";"); + $RECEIVER = implode($TEST, ';'); // Count array for maximum sent $MAX_SEND = count($TEST); // Update receiver list SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_user_data` SET receive_mails=receive_mails-1 WHERE userid IN (%s) LIMIT %s", - array(str_replace(";", ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__); + array(str_replace(';', ", ", $RECEIVER), $MAX_SEND), __FILE__, __LINE__); // Is calculated max receivers larger than wanted receivers then reset it if ($MAX_SEND > REQUEST_POST('receiver')) $MAX_SEND = REQUEST_POST('receiver'); @@ -262,16 +262,16 @@ WHERE userid=%s AND holiday_start < UNIX_TIMESTAMP() AND holiday_end > UNIX_TIME $USED = $MAX_SEND * GET_PAY_POINTS(bigintval(REQUEST_POST('type'))); // Fix empty zip code - if (!REQUEST_ISSET_POST(('zip'))) REQUEST_SET_POST('zip', "0"); + if (!REQUEST_ISSET_POST('zip')) REQUEST_SET_POST('zip', "0"); // Check if he has enougth points for this order and selected more than 0 receivers - if (($USED > 0) && ($USED <= $TOTAL) && ($MAX_SEND > 0)) { + 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")) { // New order $id = 0; - if (EXT_IS_ACTIVE("html_mail")) { + if (EXT_IS_ACTIVE('html_mail')) { // HTML extension is active SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_pool` (sender, subject, text, receivers, payment_id, data_type, timestamp, url, cat_id, target_send, zip, html_msg) VALUES ('%s','%s','%s','%s','%s','TEMP','%s','%s','%s','%s','%s','%s')", @@ -307,7 +307,7 @@ array( } } else { // Change current order - if (EXT_IS_ACTIVE("html_mail")) { + if (EXT_IS_ACTIVE('html_mail')) { // HTML extension is active SQL_QUERY_ESC("UPDATE `{!_MYSQL_PREFIX!}_pool` SET subject='%s', @@ -376,30 +376,30 @@ 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'); + $URL = 'modules.php?module=login&what=order&msg=' . getCode('MORE_RECEIVERS2'); } else { // No enougth points left! - $URL = "modules.php?module=login&what=order&msg=".getCode('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=".getCode('NO_RECS_LEFT'); + $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")) { + $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")) { + LOAD_TEMPLATE('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED')); +} 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) { - if ($TOTAL > 0) { + if ($total > 0) { // Initialize array... $CATS = array( 'id' => array(), @@ -408,11 +408,12 @@ array( ); // Enable HTML checking - $HTML = ""; $HOLIDAY = false; $HOL_STRING = ""; - if ((EXT_IS_ACTIVE("html_mail")) && (REQUEST_POST('html') == "Y")) $HTML = " AND html='Y'"; - if (GET_EXT_VERSION("holiday") >= "0.1.3") { + // @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 (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) { @@ -450,7 +451,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $result_ver = SQL_QUERY_ESC("SELECT zip FROM `{!_MYSQL_PREFIX!}_user_data` WHERE userid=%s".$HTML." AND receive_mails > 0 AND `status`='CONFIRMED' LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); - if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST(('zip'))) && (getConfig('order_multi_page') == "Y")) { + if ((SQL_NUMROWS($result_ver) == 1) && (REQUEST_ISSET_POST('zip')) && (getConfig('order_multi_page') == 'Y')) { list($zip) = SQL_FETCHROW($result_ver); SQL_FREERESULT($result_ver); if (substr($zip, 0, strlen(REQUEST_POST('zip'))) == REQUEST_POST('zip')) { @@ -478,7 +479,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); $typeS = array(); if (SQL_NUMROWS($result) > 0) { // Check for message ID in URL - $MSG = ""; + $message = ''; switch (REQUEST_GET('msg')) { case getCode('URL_TLOCK'): @@ -503,53 +504,53 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); // Finally contruct the message // @TODO Rewrite this old lost code to a template - $MSG = "{--MEMBER_URL_TIME_LOCK--}
{--CONFIG_URL_TLOCK--} ".$STD." + $message = "{--MEMBER_URL_TIME_LOCK--}
{--CONFIG_URL_TLOCK--} ".$STD." {--_HOURS--}, ".$MIN." {--_MINUTES--} {--_AND--} ".$SEC." {--_SECONDS--}
{--MEMBER_LAST_TLOCK--}: ".$LORDER; break; case getCode('OVERLENGTH'): - $MSG = getMessage('MEMBER_TEXT_OVERLENGTH'); + $message = getMessage('MEMBER_TEXT_OVERLENGTH'); break; case getCode('URL_FOUND'): - $MSG = getMessage('MEMBER_TEXT_CONTAINS_URL'); + $message = getMessage('MEMBER_TEXT_CONTAINS_URL'); break; case getCode('SUBJ_URL'): - $MSG = getMessage('MEMBER_SUBJ_CONTAINS_URL'); + $message = getMessage('MEMBER_SUBJ_CONTAINS_URL'); break; case getCode('BLIST_URL'): - $MSG = "{--MEMBER_URL_BLACK_LISTED--}
\n{--MEMBER_BLIST_TIME--}: ".MAKE_DATETIME(REQUEST_GET('blist'), "0"); + $message = "{--MEMBER_URL_BLACK_LISTED--}
\n{--MEMBER_BLIST_TIME--}: ".MAKE_DATETIME(REQUEST_GET('blist'), "0"); break; case getCode('NO_RECS_LEFT'): - $MSG = getMessage('MEMBER_SELECTED_MORE_RECS'); + $message = getMessage('MEMBER_SELECTED_MORE_RECS'); break; case getCode('INVALID_TAGS'): - $MSG = getMessage('MEMBER_HTML_INVALID_TAGS'); + $message = getMessage('MEMBER_HTML_INVALID_TAGS'); break; case getCode('MORE_POINTS'): - $MSG = getMessage('MEMBER_MORE_POINTS_NEEDED'); + $message = getMessage('MEMBER_MORE_POINTS_NEEDED'); break; case getCode('MORE_RECEIVERS1'): - $MSG = getMessage('MEMBER_ENTER_MORE_RECEIVERS'); + $message = getMessage('MEMBER_ENTER_MORE_RECEIVERS'); break; case getCode('MORE_RECEIVERS2'): - $MSG = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); + $message = getMessage('MEMBER_NO_MORE_RECEIVERS_FOUND'); break; case getCode('MORE_RECEIVERS3'): - $MSG = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min')); + $message = sprintf(getMessage('MEMBER_ENTER_MORE_MIN_RECEIVERS'), getConfig('order_min')); break; case getCode('INVALID_URL'): - $MSG = getMessage('MEMBER_ENTER_INVALID_URL'); + $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... @@ -557,13 +558,13 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); default: DEBUG_LOG(__FILE__, __LINE__, sprintf("Unknown error code %s detected.", REQUEST_GET('msg'))); - $MSG = sprintf(getMessage('UNKNOWN_CODE'), REQUEST_GET('msg')); + $message = sprintf(getMessage('UNKNOWN_CODE'), REQUEST_GET('msg')); break; } - if (!empty($MSG)) { + if (!empty($message)) { // We got system message so we drop it out to the user - LOAD_TEMPLATE("admin_settings_saved", false, $MSG); + LOAD_TEMPLATE('admin_settings_saved', false, $message); } // END - if // Load all email types... @@ -575,30 +576,30 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); SQL_FREERESULT($result); // Output user's points - $TOTAL = TRANSLATE_COMMA($TOTAL); + $total = TRANSLATE_COMMA($total); // Check how many mail orders he has placed today and how many he's allowed to send switch (getConfig('order_max_full')) { - case "MAX": // He is allowed to send as much as possible - define('ORDER_MAX_VALUE', getMessage('ORDER_ALLOWED_MAX')); + case 'MAX': // He is allowed to send as much as possible + 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)); + case 'ORDER': // He is allowed to send as much as he setup the receiving value + 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; } // Load final template - LOAD_TEMPLATE("member_order_points", false, $TOTAL); + LOAD_TEMPLATE("member_order_points", false, $total); // Reset variables - $OLD_ORDER = false; $subject = ""; $text = ""; $target = ""; + $OLD_ORDER = false; $subject = ''; $text = ''; $target = ''; // 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 FROM `{!_MYSQL_PREFIX!}_pool` WHERE sender=%s AND data_type='TEMP' LIMIT 1", @@ -622,23 +623,23 @@ 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 = ""; + $CAT = ''; foreach ($CATS['id'] as $key => $value) { $CAT .= "