X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fmember%2Fwhat-holiday.php;h=2583ca37a076e2b4d593864581626f1ae536462c;hp=edf15eec6c3a8939a7355753546f536b5894f907;hb=330dbb3e2b34450cd1665497506455e195a0a166;hpb=0ddf8f6c578aa2c1ff1db9fb8eb0b93a1e247b73 diff --git a/inc/modules/member/what-holiday.php b/inc/modules/member/what-holiday.php index edf15eec6c..2583ca37a0 100644 --- a/inc/modules/member/what-holiday.php +++ b/inc/modules/member/what-holiday.php @@ -16,7 +16,7 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * + * Copyright (c) 2009 - 2011 by Mailer Developer Team * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -43,10 +43,10 @@ if (!defined('__SECURITY')) { } // Add description as navigation point -addMenuDescription('member', __FILE__); +addYouAreHereLink('member', __FILE__); if ((!isExtensionActive('holiday')) && (!isAdmin())) { - loadTemplate('admin_settings_saved', false, generateExtensionInactiveNotInstalledMessage('holiday')); + displayMessage(generateExtensionInactiveNotInstalledMessage('holiday')); return; } // END - if @@ -76,7 +76,7 @@ ORDER BY LIMIT 1", array(getMemberId()), __FILE__, __LINE__); if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { - // Mail order found! + // Mail order found $content = merge_array($content, SQL_FETCHARRAY($result1)); $content = merge_array($content, SQL_FETCHARRAY($result2)); @@ -98,7 +98,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) { } // Display message and exit here - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_HOLIDAY_ORDER', generateDateTime($stamp, 1))); + displayMessage('{%message,MEMBER_HOLIDAY_ORDER', generateDateTime($stamp, '1') . '%}'); return; } } // END - if @@ -139,7 +139,7 @@ LIMIT 1", $content['end_day'] = bigintval(postRequestParameter('end_day')); $content['end_month'] = $GLOBALS['month_descr'][postRequestParameter('end_month')]; $content['end_year'] = bigintval(postRequestParameter('end_year')); - $content['comments'] = secureString(postRequestParameter('comments')); + $content['comments'] = postRequestParameter('comments'); // Send mail to member $message = loadEmailTemplate('member_holiday_request', $content, getMemberId()); @@ -152,7 +152,7 @@ LIMIT 1", createNewTask('{--ADMIN_HOLIDAY_SUBJECT--}', $message, 'HOLIDAY_REQUEST', getMemberId()); // Display message - loadTemplate('admin_settings_saved', false, '{--HOLIDAY_IS_ACTIVATED_NOW--}'); + displayMessage('{--MEMBER_HOLIDAY_IS_ACTIVATED_NOW--}'); } } // END - if @@ -211,21 +211,21 @@ LIMIT 1", sendAdminNotification('{--ADMIN_HOLIDAY_DEAC_SUBJECT--}', 'admin_holiday_deactivated', $content, getMemberId()); // Display message to user - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_DEACTIVATED_NOW--}'); + displayMessage('{--MEMBER_HOLIDAY_DEACTIVATED_NOW--}'); } else { // Display message to user - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_CANNOT_DEACTIVATE--}'); + displayMessage('{--MEMBER_HOLIDAY_CANNOT_DEACTIVATE--}'); } // Free result SQL_FREERESULT($result2); } elseif ($content['holiday_active'] == 'Y') { // To fast! - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_LOCKED--}'); + displayMessage('{--MEMBER_HOLIDAY_LOCKED--}'); } } else { // User not found - loadTemplate('admin_settings_saved', false, getMaskedMessage('MEMBER_HOLIDAY_NOT_STOPPED_404', getMemberId())); + displayMessage('{--MEMBER_HOLIDAY_NOT_STOPPED_404--}'); } // Free result @@ -248,8 +248,7 @@ LIMIT 1", array(getMemberId()), __FILE__, __LINE__); // Check for lock if (($content['holiday_activated'] + getConfig('holiday_lock')) < time()) { // User can deactivate his holiday request - switch ($content['holiday_active']) - { + switch ($content['holiday_active']) { case 'Y': // Display deactivation form // Load starting and ending date $result = SQL_QUERY_ESC("SELECT @@ -281,7 +280,8 @@ SET `holiday_active`='N' WHERE `userid`=%s -LIMIT 1", array(getMemberId()), __FILE__, __LINE__); +LIMIT 1", + array(getMemberId()), __FILE__, __LINE__); redirectToUrl('modules.php?module=login&what=holiday'); return; } @@ -308,10 +308,10 @@ LIMIT 1", array(getMemberId()), __FILE__, __LINE__); // Output form loadTemplate('member_holiday_form', false, $content); break; - } + } // END - switch } else { // To fast! - loadTemplate('admin_settings_saved', false, '{--MEMBER_HOLIDAY_LOCKED--}'); + displayMessage('{--MEMBER_HOLIDAY_LOCKED--}'); } } // END - if