]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-del_holiday.php
www is out-dated
[mailer.git] / inc / modules / admin / what-del_holiday.php
index 2c8ae73b5558c82c4846ff346d1aa9058df8cb8e..71455b15efe2d8fbcee62bf56d600f1a76da66b9 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * 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 *
@@ -47,10 +47,10 @@ addYouAreHereLink('admin', __FILE__);
 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 +77,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,8 +89,10 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
                // Free result
                SQL_FREERESULT($result);
        } // END - foreach
-       displayMessage(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--}';
 
@@ -102,7 +104,7 @@ FROM
 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 +114,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--}';