2 /************************************************************************
3 * Mailer v0.2.1-FINAL Start: 10/19/2003 *
4 * =================== Last change: 08/26/2004 *
6 * -------------------------------------------------------------------- *
7 * File : what-order.php *
8 * -------------------------------------------------------------------- *
9 * Short description : Order mails here *
10 * -------------------------------------------------------------------- *
11 * Kurzbeschreibung : Hier koennen Ihre Mitglieder Mails buchen *
12 * -------------------------------------------------------------------- *
15 * $Tag:: 0.2.1-FINAL $ *
17 * Needs to be in all Files and every File needs "svn propset *
18 * svn:keywords Date Revision" (autoprobset!) at least!!!!!! *
19 * -------------------------------------------------------------------- *
20 * Copyright (c) 2003 - 2009 by Roland Haeder *
21 * Copyright (c) 2009, 2010 by Mailer Developer Team *
22 * For more information visit: http://www.mxchange.org *
24 * This program is free software; you can redistribute it and/or modify *
25 * it under the terms of the GNU General Public License as published by *
26 * the Free Software Foundation; either version 2 of the License, or *
27 * (at your option) any later version. *
29 * This program is distributed in the hope that it will be useful, *
30 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
31 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
32 * GNU General Public License for more details. *
34 * You should have received a copy of the GNU General Public License *
35 * along with this program; if not, write to the Free Software *
36 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, *
38 ************************************************************************/
40 // Some security stuff...
41 if (!defined('__SECURITY')) {
43 } elseif (!isMember()) {
44 redirectToIndexMemberOnlyModule();
47 // Add description as navigation point
48 addMenuDescription('member', __FILE__);
50 if ((!isExtensionActive('order')) && (!isAdmin())) {
51 loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('order'));
56 $whereStatement = " WHERE `visible`='Y'";
58 // Set undefined array elements
59 if (isAdmin()) $whereStatement = '';
61 // Count unconfirmed mails
62 $links = countSumTotalData(getMemberId(), 'user_links', 'id', 'userid', true);
64 // Do we have ext-holiday installed?
65 // @TODO Rewrite this to a filter
67 if ((isExtensionActive('holiday')) && (getExtensionVersion('holiday') >= '0.1.3')) {
68 // Fetch also holiday activation data
69 $HOLIDAY = 'holiday_active';
72 $result_mmails = SQL_QUERY_ESC("SELECT
73 `userid`, `receive_mails`, `mail_orders`, `".$HOLIDAY."`
75 `{?_MYSQL_PREFIX?}_user_data`
80 array(getMemberId()), __FILE__, __LINE__);
82 $mmails = SQL_NUMROWS($result_mmails);
83 list($DMY, $MAXI, $ORDERS, $HOLIDAY) = SQL_FETCHROW($result_mmails);
86 SQL_FREERESULT($result_mmails);
88 // Fix non-existent ext-holidy
89 if ($HOLIDAY == $DMY) $HOLIDAY = 'N';
91 $ALLOWED = $MAXI - $ORDERS;
92 if (getConfig('order_max_full') == 'MAX') $ALLOWED = $MAXI;
94 // Now check his points amount
95 $total = countSumTotalData(getMemberId(), 'user_points', 'points') - countSumTotalData(getMemberId(), 'user_data', 'used_points');;
97 if (($HOLIDAY == 'Y') && (getExtensionVersion('holiday') >= '0.1.3')) {
99 loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_ORDER_NOT_POSSIBLE'));
100 } elseif ((isPostRequestParameterSet('frametester')) && ($ALLOWED > 0) && (postRequestParameter('receiver') > 0)) {
101 // Continue with the frametester, we first need to store the data temporary in the pool
103 // First we would like to store the data and get it's pool position back...
104 $result = SQL_QUERY_ESC("SELECT `id`, `data_type`
106 `{?_MYSQL_PREFIX?}_pool`
110 `timestamp` > (UNIX_TIMESTAMP() - %s)
114 postRequestParameter('url'),
115 getConfig('url_tlock')
116 ), __FILE__, __LINE__);
118 $type = 'TEMP'; $id = '0';
119 if (SQL_NUMROWS($result) == 1) {
120 // Load id and mail type
121 list($id, $type) = SQL_FETCHROW($result);
125 SQL_FREERESULT($result);
127 if ($type == 'TEMP') {
128 // No entry found, so we need to check out the stats table as well... :)
129 // We have to add that suff here, now we continue WITHOUT checking and check the text and subject against some filters
131 if (getConfig('allow_url_in_text') == 'Y') {
132 // Test submitted text against some filters (length, URLs in text etc.)
133 if ((strpos(strtolower(postRequestParameter('text')), 'https://') > -1) || (strpos(strtolower(postRequestParameter('text')), 'http://') > -1) || (strpos(strtolower(postRequestParameter('text')), "www") > -1)) {
135 $URL = 'modules.php?module=login&what=order&code=' . getCode('URL_FOUND');
138 // Remove new-line and carriage-return characters
139 $TEST = str_replace("\n", '', str_replace("\r", '', postRequestParameter('text')));
141 // Text length within allowed length?
142 if (strlen($TEST) > getConfig('max_tlength')) {
144 $URL = 'modules.php?module=login&what=order&code=' . getCode('OVERLENGTH');
148 // Shall I test the subject line against URLs?
149 if (getConfig('allow_url_in_subject') == 'Y') {
150 // Check the subject line for issues
151 setPostRequestParameter('subject', str_replace("\\", '[nl]', substr(postRequestParameter('subject'), 0, 200)));
152 if ((strpos(strtolower(postRequestParameter('subject')), 'http://') > -1) || (strpos(strtolower(postRequestParameter('subject')), "www") > -1)) {
153 // URL in subject found
154 $URL = 'modules.php?module=login&what=order&code=' . getCode('SUBJ_URL');
158 // And shall I check that his URL is not in the black list?
159 if (getConfig('url_blacklist') == 'Y') {
160 // Ok, I do that for you know...
161 $result = SQL_QUERY_ESC("SELECT UNIX_TIMESTAMP(`timestamp`) AS tstamp FROM `{?_MYSQL_PREFIX?}_url_blacklist` WHERE `url`='%s' LIMIT 1",
162 array(postRequestParameter('url')), __FILE__, __LINE__);
164 if (SQL_NUMROWS($result) == 1) {
165 // Jupp, we got one listed
166 list($blist) = SQL_FETCHROW($result);
168 // Create redirect-URL
169 $URL = 'modules.php?module=login&what=order&code=' . getCode('BLIST_URL') . '&blist=' . $blist;
173 SQL_FREERESULT($result);
176 // Enougth receivers entered?
177 if ((postRequestParameter('receiver') < getConfig('order_min')) && (!isAdmin())) {
178 // Less than allowed receivers entered!
179 $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS3');
183 if (!isUrlValid(postRequestParameter('url'))) {
185 $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_URL');
188 // Probe for HTML extension
189 if (isExtensionActive('html_mail')) {
190 // HTML or regular text mail?
191 if (postRequestParameter('html') == 'Y') {
192 // Chek for valid HTML tags
193 setPostRequestParameter('text', checkHtmlTags(postRequestParameter('text')));
195 // Maybe invalid tags found?
196 if (!isPostRequestParameterSet('text')) $URL = 'modules.php?module=login&what=order&code=' . getCode('INVALID_TAGS')."&id=".$id;
198 // Remove any HTML code
199 setPostRequestParameter('text', str_replace('<', '{OPEN_HTML}', str_replace('>', '{CLOSE_HTML}', postRequestParameter('text'))));
202 } elseif (!isAdmin()) {
203 // He has already sent a mail within a specific time
204 $URL = 'modules.php?module=login&what=order&code=' . getCode('URL_TLOCK') . '&id=' . $id;
209 // Check if category and number of receivers is okay
211 if ((getConfig('order_multi_page') == 'Y') && (isPostRequestParameterSet('zip'))) {
212 // Choose recipients by ZIP code
213 $add = " AND d.zip LIKE '".bigintval(postRequestParameter('zip'))."{PER}'";
217 $result = SQL_QUERY_ESC("SELECT
220 `{?_MYSQL_PREFIX?}_user_cats` AS c
222 `{?_MYSQL_PREFIX?}_user_data` AS d
226 c.cat_id=%s AND c.userid != '%s' AND d.`status`='CONFIRMED' AND d.receive_mails > 0".$add."
230 bigintval(postRequestParameter('cat')),
232 getConfig('order_select'),
233 getConfig('order_mode'),
234 ), __FILE__, __LINE__);
236 // Do we enougth receivers left?
237 if (SQL_NUMROWS($result) >= postRequestParameter('receiver')) {
238 // Check for holiday extensions
240 if (getExtensionVersion('holiday') >= '0.1.3') {
241 // Include checking for users in holiday
245 // Load receivers from database
246 $TEST = array(); $cnt = '0';
247 while ($holidayContent = SQL_FETCHARRAY($result)) {
249 // Check for his holiday status
250 $result_holiday = SQL_QUERY_ESC("SELECT
253 `{?_MYSQL_PREFIX?}_user_holidays`
255 `userid`=%s AND `holiday_start` < UNIX_TIMESTAMP() AND `holiday_end` > UNIX_TIMESTAMP()
257 array($holidayContent['userid']), __FILE__, __LINE__);
258 if (SQL_NUMROWS($result_holiday) == 1) $holidayContent['userid'] = '0'; // Exclude user who are in holiday
261 SQL_FREERESULT($result_holiday);
264 if ($holidayContent['userid'] > 0) {
266 $TEST[] = $holidayContent['userid'];
272 SQL_FREERESULT($result);
274 // Implode array into string for the sending pool
275 $receiver = implode($TEST, ';');
277 // Count array for maximum sent
278 $content['target_send'] = count($TEST);
280 // Update receiver list
281 SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_user_data` SET `receive_mails`=`receive_mails`-1 WHERE `userid` IN (%s) LIMIT %s",
282 array(convertReceivers($receiver), $content['target_send']), __FILE__, __LINE__);
284 // Is calculated max receivers larger than wanted receivers then reset it
285 if ($content['target_send'] > postRequestParameter('receiver')) $content['target_send'] = bigintval(postRequestParameter('receiver'));
287 // Calculate used points
288 $USED = $content['target_send'] * getPaymentPoints(bigintval(postRequestParameter('type')));
290 // Fix empty zip code
291 if (!isPostRequestParameterSet('zip')) setPostRequestParameter('zip', 0);
293 // Check if he has enougth points for this order and selected more than 0 receivers
294 if (($USED > 0) && ($USED <= $total) && ($content['target_send'] > 0)) {
295 // Gettings points is okay, so we can add $USED later from
296 if (($id == '0') || ($type != 'TEMP')) {
299 if (isExtensionActive('html_mail')) {
300 // HTML extension is active
301 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`)
302 VALUES ('%s','%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s','%s','%s','%s','%s')",
305 postRequestParameter('subject'),
306 postRequestParameter('text'),
308 bigintval(postRequestParameter('type')),
309 postRequestParameter('url'),
310 bigintval(postRequestParameter('cat')),
311 $content['target_send'],
312 bigintval(postRequestParameter('zip')),
313 postRequestParameter('html')
314 ), __FILE__, __LINE__);
316 // No HTML extension is active
317 SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_pool` (`sender`, `subject`, `text`, `receivers`, `payment_id`, `data_type`, `timestamp`, `url`, `cat_id`, `target_send`, `zip`)
318 VALUES ('%s','%s','%s','%s','%s','TEMP',UNIX_TIMESTAMP(),'%s','%s','%s','%s')",
321 postRequestParameter('subject'),
322 postRequestParameter('text'),
324 bigintval(postRequestParameter('type')),
325 postRequestParameter('url'),
326 bigintval(postRequestParameter('cat')),
327 $content['target_send'],
328 bigintval(postRequestParameter('zip')),
329 ), __FILE__, __LINE__);
332 // Change current order
333 if (isExtensionActive('html_mail')) {
334 // HTML extension is active
335 SQL_QUERY_ESC("UPDATE
336 `{?_MYSQL_PREFIX?}_pool`
342 `timestamp`=UNIX_TIMESTAMP(),
352 postRequestParameter('subject'),
353 postRequestParameter('text'),
355 bigintval(postRequestParameter('type')),
356 postRequestParameter('url'),
357 bigintval(postRequestParameter('cat')),
358 $content['target_send'],
359 bigintval(postRequestParameter('zip')),
360 postRequestParameter('html'),
362 ), __FILE__, __LINE__);
364 // No HTML extension is active
365 SQL_QUERY_ESC("UPDATE
366 `{?_MYSQL_PREFIX?}_pool`
372 `timestamp`=UNIX_TIMESTAMP(),
381 postRequestParameter('subject'),
382 postRequestParameter('text'),
384 bigintval(postRequestParameter('type')),
385 postRequestParameter('url'),
386 bigintval(postRequestParameter('cat')),
387 $content['target_send'],
388 bigintval(postRequestParameter('zip')),
390 ), __FILE__, __LINE__);
394 // Do we need to get the id number?
396 // Order is placed as temporary. We need to get it's id for the frametester
397 $result = SQL_QUERY_ESC("SELECT `id` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `sender`=%s AND `subject`='%s' AND `payment_id`=%s AND `data_type`='TEMP' AND `timestamp`=UNIX_TIMESTAMP() LIMIT 1",
400 postRequestParameter('subject'),
401 bigintval(postRequestParameter('type'))
402 ), __FILE__, __LINE__);
405 list($id) = SQL_FETCHROW($result);
408 SQL_FREERESULT($result);
411 // id is received so we can redirect the user, used points will be added when he send's out the mail
412 $URL = 'modules.php?module=frametester&order=' . $id;
413 } elseif ($content['target_send'] == '0') {
414 // Not enougth receivers found which can receive mails
415 $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS2');
417 // No enougth points left!
418 $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_POINTS');
421 // Ordered more mails than he can send in this category
422 $URL = 'modules.php?module=login&what=order&code=' . getCode('NO_RECS_LEFT');
425 } elseif (postRequestParameter('receiver') == '0') {
426 // Not enougth receivers selected
427 $URL = 'modules.php?module=login&what=order&code=' . getCode('MORE_RECEIVERS1');
428 } elseif (($ALLOWED == '0') && (getConfig('order_max_full') == 'ORDER')) {
429 // No more mail orders allowed
430 loadTemplate('admin_settings_saved', false, getMessage('MEMBER_ORDER_ALLOWED_EXHAUSTED'));
431 } elseif (($links < getConfig('unconfirmed')) && ($mmails == 1)) {
432 // Display order form
433 $result_cats = SQL_QUERY("SELECT
436 `{?_MYSQL_PREFIX?}_cats`
439 `sort` ASC", __FILE__, __LINE__);
440 if (SQL_NUMROWS($result_cats) > 0) {
442 // Initialize array...
449 // Enable HTML checking
450 // @TODO Rewrite this to a filter
451 $HTML = ''; $HOLIDAY = false; $HOL_STRING = '';
452 if ((isExtensionActive('html_mail')) && (postRequestParameter('html') == 'Y')) $HTML = " AND `html`='Y'";
453 if (getExtensionVersion('holiday') >= '0.1.3') {
454 // Extension's version is fine
455 $HOLIDAY = true; $HOL_STRING = " AND `holiday_active`='N'";
458 // ... and begin loading stuff
459 while ($categoriesContent = SQL_FETCHARRAY($result_cats)) {
460 $categories['id'][] = bigintval($categoriesContent['id']);
461 $categories['name'][] = $categoriesContent['cat'];
463 // Select users in current category
464 $result_userids = SQL_QUERY_ESC("SELECT `userid` FROM `{?_MYSQL_PREFIX?}_user_cats` WHERE `cat_id`=%s AND `userid` != '%s' ORDER BY `userid` ASC",
465 array(bigintval($categoriesContent['id']), getMemberId()), __FILE__, __LINE__);
468 while (list($ucat) = SQL_FETCHROW($result_userids)) {
469 // Check for holiday system
472 // Check user's holiday status
473 $result_holiday = SQL_QUERY_ESC("SELECT
474 d.userid FROM `{?_MYSQL_PREFIX?}_user_data` AS d
476 `{?_MYSQL_PREFIX?}_user_holidays` AS h
481 d.receive_mails > 0 AND
482 d.`status`='CONFIRMED' AND
483 d.`holiday_active`='Y' AND
484 h.holiday_start < UNIX_TIMESTAMP() AND
485 h.holiday_end > UNIX_TIMESTAMP()
487 array(bigintval($ucat)), __FILE__, __LINE__);
489 // Is holiday is active?
490 $HOL_ACTIVE = (SQL_NUMROWS($result_holiday) == 1);
493 SQL_FREERESULT($result_holiday);
496 if ($HOL_ACTIVE === false) {
497 // Check if the user want's to receive mails?
498 $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",
499 array(bigintval($ucat)), __FILE__, __LINE__);
501 if ((SQL_NUMROWS($result_ver) == 1) && (isPostRequestParameterSet('zip')) && (getConfig('order_multi_page') == 'Y')) {
503 list($zip) = SQL_FETCHROW($result_ver);
504 if (substr($zip, 0, strlen(postRequestParameter('zip'))) == postRequestParameter('zip')) {
505 // Ok, ZIP part is found
510 $userid_cnt += SQL_NUMROWS($result_ver);
514 SQL_FREERESULT($result_ver);
519 SQL_FREERESULT($result_userids);
520 $categories['userids'][] = $userid_cnt;
524 SQL_FREERESULT($result_cats);
526 // Now we need to load the mail types...
527 $result = SQL_QUERY("SELECT `id`, `price`, `payment`, `mail_title` FROM `{?_MYSQL_PREFIX?}_payments` ORDER BY `payment` ASC", __FILE__, __LINE__);
530 if (SQL_NUMROWS($result) > 0) {
531 // Check for message id in URL
532 $message = getMessageFromErrorCode(getRequestParameter('code'));
534 if (!empty($message)) {
535 // We got system message so we drop it out to the user
536 loadTemplate('admin_settings_saved', false, $message);
539 // Load all email types...
540 while ($types[] = SQL_FETCHROW($result)) {
541 // Nothing to do here... ;-)
545 SQL_FREERESULT($result);
547 // Output user's points
548 $content['total'] = translateComma($total);
550 // Check how many mail orders he has placed today and how many he's allowed to send
551 switch (getConfig('order_max_full')) {
552 case 'MAX': // He is allowed to send as much as possible
553 $content['order_max_full'] = getMessage('MEMBER_ORDER_ALLOWED_MAX');
556 case 'ORDER': // He is allowed to send as much as he setup the receiving value
557 $content['order_max_full'] = sprintf(getMessage('MEMBER_ORDER_ALLOWED_RECEIVE'), $ALLOWED, $MAXI);
560 default: // Unknown/invalid
561 logDebugMessage(__FILE__, __LINE__, sprintf("Unknown order_mas_full config detected.", getConfig('order_max_full')));
562 $content['order_max_full'] = getMessage('MEMBER_ORDER_ALLOWED_UNKNOWN');
566 // Load final template
567 loadTemplate('member_order_points', false, $content);
575 // Check if we already have an order placed and make it editable
576 $result = SQL_QUERY_ESC("SELECT
577 `subject`, `text`, `payment_id`, `timestamp`, `url`, `target_send`, `cat_id`, `zip`
579 `{?_MYSQL_PREFIX?}_pool`
584 array(getMemberId()), __FILE__, __LINE__);
586 if (SQL_NUMROWS($result) == 1) {
588 $content = merge_array($content, SQL_FETCHARRAY($result));
590 // Fix max receivers when it is too much
591 if ((isset($categories['userids'][$content['cat_id']])) && ($content['target_send'] > $categories['userids'][$content['cat_id']])) {
593 $content['target_send'] = $categories['userids'][$content['cat_id']];
596 // Old order is grabbed
599 // Default output for that your members don't forget it...
600 $content['url'] = 'http://';
601 $content['target_send'] = getConfig('order_min');
602 $content['subject'] = '{--ORDER_DEFAULT_SUBJECT--}';
603 $content['text'] = '{--ORDER_DEFAULT_TEXT--}';
607 SQL_FREERESULT($result);
609 if ((isPostRequestParameterSet('data')) || ((getConfig('order_multi_page') != 'Y') && ((!isAdmin()) && (!isExtensionActive('html_mail'))))) {
610 // Pre-output categories
611 $content['category_selection'] = '';
612 foreach ($categories['id'] as $key => $value) {
613 $content['category_selection'] .= " <option value=\"".$value."\"";
614 if (($OLD_ORDER) && ($content['cat_id'] == $value)) $content['category_selection'] .= ' selected="selected"';
615 $content['category_selection'] .= ">".$categories['name'][$key]." (".$categories['userids'][$key]." {--USER_IN_CAT--})</option>\n";
619 $content['type_selection'] = '';
620 foreach ($types as $key => $value) {
621 $P = translateComma($types[$key][1]);
622 if (is_array($value)) {
623 // Output option line
624 $content['type_selection'] .= " <option value=\"".$types[$key][0]."\"";
625 if (($OLD_ORDER) && ($content['payment_id'] == $types[$key][0])) $content['type_selection'] .= ' selected="selected"';
626 $content['type_selection'] .= ">".$P." {--PER_MAIL--} - ".$types[$key][3]." - ".round($types[$key][2])." {--PAYMENT--}</option>\n";
630 // No content is default
631 $content['zip_content'] = '';
633 if (isPostRequestParameterSet('zip')) {
634 // Output entered ZIP code
635 $content['zip_content'] = loadTemplate('member_order-zip2', true, postRequestParameter('zip'));
639 if ((isExtensionActive('html_mail')) && (postRequestParameter('html') == 'Y')) {
640 // Extension is active so output valid HTML tags
641 $content['html_extension'] = loadTemplate('member_order-html_ext', true, addValidHtmlTags());
643 // Extension not active and/or class not uploaded
644 $content['html_extension'] = '<tr><td colspan="3"><input type="hidden" name="html" value="N" /></td></tr>';
647 // Output form for page 2
648 loadTemplate('member_order_page2', false, $content);
650 // Remember maybe entered ZIP code in constant
651 if (isExtensionActive('html_mail')) {
652 // Add some content when html extension is active
653 $content['html_extension'] = loadTemplate('member_order-html_intro', true);
655 // No HTML extension installed
656 $content['html_extension'] = '<tr><td colspan="3"><input type="hidden" name="html" value="N" /></td></tr>';
659 // Default is no ZIP code
660 $content['zip_content'] = '';
662 // Do we want ZIP code or not?
663 if ((getConfig('order_multi_page') == 'Y') || (isAdmin())) {
665 if (postRequestParameter('zip') > 0) {
667 'zip' => bigintval(postRequestParameter('zip'))
674 $content['zip_content'] = loadTemplate('member_order-zip1', true, $data);
677 // Output form for page 1 (ZIP code or HTML)
678 loadTemplate('member_order_page1', false, $content);
681 // No mail types defined
682 loadTemplate('admin_settings_saved', false, '<span class="member_failed">{--MEMBER_NO_PAYMENTS--}</span>');
686 loadTemplate('admin_settings_saved', false, '<span class="member_failed">{--MEMBER_NO_POINTS--}</span>');
689 // No cateogries are defined yet
690 loadTemplate('admin_settings_saved', false, '<span class="member_failed">{--MEMBER_NO_CATS--}</span>');
692 } elseif ($mmails == '0') {
693 // Please set more than 0 mails per day
694 loadTemplate('admin_settings_saved', false, getMessage('MEMBER_HAS_ZERO_MMAILS'));
696 // Please confirm some mails first
697 loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_LINKS_LEFT'), $links);
701 // Redirect to requested URL