]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/member/what-holiday.php
A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / modules / member / what-holiday.php
index 10c76eea900da06e9b223b983bca4cafac7010b6..7417a7dec32dbd3eaa1758c39664456d6edf632b 100644 (file)
@@ -46,7 +46,7 @@ if (!defined('__SECURITY')) {
 addYouAreHereLink('member', __FILE__);
 
 if ((!isExtensionActive('holiday')) && (!isAdmin())) {
-       displayMessage(generateExtensionInactiveNotInstalledMessage('holiday'));
+       displayMessage('{%pipe,generateExtensionInactiveNotInstalledMessage=holiday%}');
        return;
 } // END - if
 
@@ -98,7 +98,7 @@ if ((SQL_NUMROWS($result1) == 1) || (SQL_NUMROWS($result2) == 1)) {
                }
 
                // Display message and exit here
-               displayMessage(getMaskedMessage('MEMBER_HOLIDAY_ORDER', generateDateTime($stamp, 1)));
+               displayMessage('{%message,MEMBER_HOLIDAY_ORDER', generateDateTime($stamp, '1') . '%}');
                return;
        }
 } // END - if
@@ -119,7 +119,7 @@ if (isFormSent()) {
                unsetPostRequestParameter('ok');
        } else {
                // Everything went okay so let's store his request and send mails
-               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_holidays` (`userid`, `holiday_start`, `holiday_end`, `comments`) VALUES ('%s','%s','%s','%s')",
+               SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_holidays` (`userid`,`holiday_start`,`holiday_end`,`comments`) VALUES ('%s','%s','%s','%s')",
                        array(getMemberId(), $START, $content['holiday_end'], postRequestParameter('comments')), __FILE__, __LINE__);
 
                // Activate holiday system
@@ -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());
@@ -160,7 +160,7 @@ LIMIT 1",
 if (isPostRequestParameterSet('stop')) {
        // Okay, end the holiday here...
        $result = SQL_QUERY_ESC("SELECT
-       `holiday_active`, `holiday_activated`
+       `holiday_active`,`holiday_activated`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
@@ -175,7 +175,7 @@ LIMIT 1", array(getMemberId()), __FILE__, __LINE__);
                if (($content['holiday_active'] == 'Y') && (($content['holiday_activated'] + getConfig('holiday_lock')) < time())) {
                        // Load data
                        $result2 = SQL_QUERY_ESC("SELECT
-       `holiday_start`, `holiday_end`
+       `holiday_start`,`holiday_end`
 FROM
        `{?_MYSQL_PREFIX?}_user_holidays`
 WHERE
@@ -225,7 +225,7 @@ LIMIT 1",
                }
        } else {
                // User not found
-               displayMessage(getMaskedMessage('MEMBER_HOLIDAY_NOT_STOPPED_404', getMemberId()));
+               displayMessage('{--MEMBER_HOLIDAY_NOT_STOPPED_404--}');
        }
 
        // Free result
@@ -236,7 +236,7 @@ LIMIT 1",
 if ((!isFormSent()) && (!isPostRequestParameterSet('stop'))) {
        // Check if user is in holiday...
        $result = SQL_QUERY_ESC("SELECT
-       `holiday_active`, `holiday_activated`
+       `holiday_active`,`holiday_activated`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
@@ -252,7 +252,7 @@ LIMIT 1", array(getMemberId()), __FILE__, __LINE__);
                        case 'Y': // Display deactivation form
                                // Load starting and ending date
                                $result = SQL_QUERY_ESC("SELECT
-       `holiday_start`, `holiday_end`
+       `holiday_start`,`holiday_end`
 FROM
        `{?_MYSQL_PREFIX?}_user_holidays`
 WHERE