X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-del_holiday.php;h=39069e12b5034663c849a14079f6c4348a683bee;hb=4f7df133f736da124e6f7bd02008b9093f736451;hp=d38a768182a9bb18b7ec8de101a0d2b2f0016cf8;hpb=682edce003a1a91f66fb8e2212d7fdb591379843;p=mailer.git diff --git a/inc/modules/admin/what-del_holiday.php b/inc/modules/admin/what-del_holiday.php index d38a768182..39069e12b5 100644 --- a/inc/modules/admin/what-del_holiday.php +++ b/inc/modules/admin/what-del_holiday.php @@ -16,8 +16,8 @@ * $Author:: $ * * -------------------------------------------------------------------- * * Copyright (c) 2003 - 2009 by Roland Haeder * - * Copyright (c) 2009, 2010 by Mailer Developer Team * - * For more information visit: http://www.mxchange.org * + * Copyright (c) 2009 - 2012 by Mailer Developer Team * + * For more information visit: http://mxchange.org * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -41,16 +41,18 @@ if ((!defined('__SECURITY')) || (!isAdmin())) { } // END - if // Add description as navigation point -addMenuDescription('admin', __FILE__); +addYouAreHereLink('admin', __FILE__); // Shall I delete selected holidays??? if (ifPostContainsSelections()) { // Delete multiple holiday requests (for list_holiday) $count = '0'; - foreach (postRequestParameter('sel') as $id => $sel) { + foreach (postRequestElement('sel') as $id => $sel) { // Get the userid $result = SQL_QUERY_ESC("SELECT - `userid`, `holiday_start`, `holiday_end` + `userid`, + `holiday_start`, + `holiday_end` FROM `{?_MYSQL_PREFIX?}_user_holidays` WHERE @@ -77,8 +79,8 @@ WHERE LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Prepare loaded data for the - $content['holiday_start'] = generateDateTime($content['holiday_start'], 3); - $content['holiday_end'] = generateDateTime($content['holiday_end'] , 3); + $content['holiday_start'] = generateDateTime($content['holiday_start'], '3'); + $content['holiday_end'] = generateDateTime($content['holiday_end'] , '3'); // Send email to user $message = loadEmailTemplate('member_holiday_removed', $content, $content['userid']); @@ -89,20 +91,23 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__); // Free result SQL_FREERESULT($result); } // END - foreach - loadTemplate('admin_settings_saved', false, getMaskedMessage('ADMIN_HOLIDAY_MULTI_DELETE', $count)); -} elseif (isGetRequestParameterSet('userid')) { + + // Display final message + displayMessage('{%message,ADMIN_HOLIDAY_MULTI_DELETE=' . $count . '%}'); +} elseif (isGetRequestElementSet('userid')) { // Set default message $message = '{--ADMIN_HOLIDAY_SINGLE_404--}'; // Fetch data $result_load = SQL_QUERY_ESC("SELECT - `holiday_start` AS start, `holiday_end` AS `end` + `holiday_start` AS `start`, + `holiday_end` AS `end` FROM `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s LIMIT 1", - array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); + array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); if (SQL_NUMROWS($result_load) == 1) { // Load data $content = SQL_FETCHARRAY($result_load); @@ -112,11 +117,11 @@ LIMIT 1", `{?_MYSQL_PREFIX?}_user_holidays` WHERE `userid`=%s -LIMIT 1", array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); +LIMIT 1", array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__); // Send email to user - $message = loadEmailTemplate('member_holiday_removed', $content, getRequestParameter('userid')); - sendEmail(getRequestParameter('userid'), '{--ADMIN_HOLIDAY_REMOVED_SUBJECT--}', $message); + $message = loadEmailTemplate('member_holiday_removed', $content, getRequestElement('userid')); + sendEmail(getRequestElement('userid'), '{--ADMIN_HOLIDAY_REMOVED_SUBJECT--}', $message); // Set message $message = '{--ADMIN_HOLIDAY_SINGLE_DELETED--}'; @@ -126,7 +131,7 @@ LIMIT 1", array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__); SQL_FREERESULT($result_load); // Output message - loadTemplate('admin_settings_saved', false, $message); + displayMessage($message); } else { // Add member selection box addMemberSelectionBox();