fooRequestElementBar() functions renamed, adding of request parameters added:
[mailer.git] / inc / modules / admin / what-del_holiday.php
index a61324a..86fbe69 100644 (file)
@@ -1,7 +1,7 @@
 <?php
 /************************************************************************
- * MXChange v0.2.1                                    Start: 07/24/2004 *
- * ================                             Last change: 08/09/2004 *
+ * Mailer v0.2.1-FINAL                                Start: 07/24/2004 *
+ * ===================                          Last change: 08/09/2004 *
  *                                                                      *
  * -------------------------------------------------------------------- *
  * File              : what-del_holiday.php                             *
@@ -44,15 +44,11 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 // Add description as navigation point
 addMenuDescription('admin', __FILE__);
 
-// Check for selected holidays
-$SUM = '0';
-if (isPostRequestElementSet('sel')) $SUM = countPostSelection();
-
 // Shall I delete selected holidays???
-if ($SUM > 0) {
+if (countPostSelection() > 0) {
        // Delete multiple holiday requests (for list_holiday)
        $cnt = '0';
-       foreach (postRequestElement('sel') as $id => $sel) {
+       foreach (postRequestParameter('sel') as $id => $sel) {
                // Get the userid
                $result = SQL_QUERY_ESC("SELECT
        `userid`, `holiday_start`, `holiday_end`
@@ -94,8 +90,8 @@ LIMIT 1", array(bigintval($id)), __FILE__, __LINE__);
                        $cnt++;
                }
        }
-       loadTemplate('admin_settings_saved', false, sprintf(getMessage('HOLIDAY_ADMIN_MULTI_DEL'), $cnt));
-} elseif (isGetRequestElementSet('userid')) {
+       loadTemplate('admin_settings_saved', false, getMaskedMessage('HOLIDAY_ADMIN_MULTI_DEL', $cnt));
+} elseif (isGetRequestParameterSet('userid')) {
        // Set default message
        $message = getMessage('HOLIDAY_ADMIN_SINGLE_404');
 
@@ -107,7 +103,7 @@ FROM
 WHERE
        `userid`=%s
 LIMIT 1",
-               array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
+               array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
        if (SQL_NUMROWS($result_load) == 1) {
                // Load data
                $content = SQL_FETCHARRAY($result_load);
@@ -117,11 +113,11 @@ LIMIT 1",
        `{?_MYSQL_PREFIX?}_user_holidays`
 WHERE
        `userid`=%s
-LIMIT 1", array(bigintval(getRequestElement('userid'))), __FILE__, __LINE__);
+LIMIT 1", array(bigintval(getRequestParameter('userid'))), __FILE__, __LINE__);
 
                // Send email to user
-               $message = loadEmailTemplate('member_holiday_removed', $content, getRequestElement('userid'));
-               sendEmail(getRequestElement('userid'), getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message);
+               $message = loadEmailTemplate('member_holiday_removed', $content, getRequestParameter('userid'));
+               sendEmail(getRequestParameter('userid'), getMessage('HOLIDAY_ADMIN_REMOVED_SUBJ'), $message);
 
                // Set message
                $message = getMessage('HOLIDAY_ADMIN_SINGLE_DELETED');