X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-order.php;h=f891d0609fa8f7d36799e234691f702d188df50f;hb=1c62a6c2a4ed2bb170e0f1888899625e67a27947;hp=1b1dd1984c29df084f31ad63e4dd97a93faa967c;hpb=6c0abc9f643c69610fe87be0ddb1a5dab95c6d39;p=mailer.git diff --git a/inc/modules/member/what-order.php b/inc/modules/member/what-order.php index 1b1dd1984c..f891d0609f 100644 --- a/inc/modules/member/what-order.php +++ b/inc/modules/member/what-order.php @@ -14,8 +14,6 @@ * $Date:: $ * * $Tag:: 0.2.1-FINAL $ * * $Author:: $ * - * Needs to be in all Files and every File needs "svn propset * - * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * * Copyright (c) 2009, 2010 by Mailer Developer Team * @@ -122,7 +120,7 @@ LIMIT 1", } // END - if // And shall I check that his URL is not in the black list? - if (getConfig('url_blacklist') == 'Y') { + if (isUrlBlaskEnabled()) { // 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(postRequestParameter('url')), __FILE__, __LINE__); @@ -173,7 +171,7 @@ LIMIT 1", } // END - if } elseif (!isAdmin()) { // He has already sent a mail within a specific time - $url = 'modules.php?module=login&what=order&code=' . getCode('URL_TLOCK') . '&id=' . $id; + $url = 'modules.php?module=login&what=order&code=' . getCode('URL_TIME_LOCK') . '&id=' . $id; } // Still no error? @@ -203,12 +201,10 @@ WHERE d.receive_mails > 0 ".$add." ORDER BY - d.%s %s", + d.{?order_select?} {?order_mode?}", array( bigintval(postRequestParameter('cat')), - getMemberId(), - getConfig('order_select'), - getConfig('order_mode'), + getMemberId() ), __FILE__, __LINE__); // Do we enougth receivers left? @@ -250,7 +246,10 @@ LIMIT 1", // Update receiver list SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `receive_mails`=`receive_mails`-1 WHERE `userid` IN (%s) LIMIT %s", - array(convertReceivers($receiver), $content['target_send']), __FILE__, __LINE__); + array( + convertReceivers($receiver), + $content['target_send'] + ), __FILE__, __LINE__); // Is calculated max receivers larger than wanted receivers then reset it if ($content['target_send'] > postRequestParameter('receiver')) $content['target_send'] = bigintval(postRequestParameter('receiver')); @@ -388,11 +387,11 @@ LIMIT 1", // No enougth points left! $url = 'modules.php?module=login&what=order&code=' . getCode('MORE_POINTS'); } - } else { + } else { // Ordered more mails than he can send in this category $url = 'modules.php?module=login&what=order&code=' . getCode('NO_RECS_LEFT'); } - } + } // END - if } elseif (postRequestParameter('receiver') == '0') { // Not enougth receivers selected $url = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1'); @@ -466,7 +465,7 @@ LIMIT 1", array(bigintval($ucat)), __FILE__, __LINE__); // Fetch entry - list($cnt) = SQL_FETCHROW($result); + list($cnt) = SQL_FETCHROW($result_holiday); // Free memory SQL_FREERESULT($result_holiday); @@ -527,7 +526,7 @@ LIMIT 1", SQL_FREERESULT($result); // Output user's points - $content['total'] = translateComma($total); + $content['total'] = $total; // Check how many mail orders he has placed today and how many he's allowed to send switch (getConfig('order_max_full')) { @@ -580,7 +579,7 @@ LIMIT 1", } else { // Default output for that your members don't forget it... $content['url'] = 'http://'; - $content['target_send'] = getConfig('order_min'); + $content['target_send'] = '{?order_min?}'; $content['subject'] = '{--ORDER_DEFAULT_SUBJECT--}'; $content['text'] = '{--ORDER_DEFAULT_TEXT--}'; } @@ -600,12 +599,11 @@ LIMIT 1", // Mail type $content['type_selection'] = ''; foreach ($types as $key => $value) { - $P = translateComma($types[$key][1]); if (is_array($value)) { // Output option line $content['type_selection'] .= ' '; } // END - if } // END - foreach @@ -661,15 +659,15 @@ LIMIT 1", } } else { // No mail types defined - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_PAYMENTS--}'); + loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_PAYMENTS--}'); } } else { // No points left - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_POINTS--}'); + loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_POINTS--}'); } } else { // No cateogries are defined yet - loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_CATEGORIES--}'); + loadTemplate('admin_settings_saved', false, '{--MEMBER_NO_CATEGORIES--}'); } } else { // Please confirm some mails first