]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_holiday.php
ext-admins must be checked here, first admin had never 'allow'
[mailer.git] / inc / modules / admin / what-list_holiday.php
index 772b46616b6af198532cd96d6809e765d101eef5..da009cb1fe416eaa97ff1bc559ea47be621f9336 100644 (file)
@@ -45,15 +45,21 @@ addYouAreHereLink('admin', __FILE__);
 
 // Start listing holiday requests
 $result = SQL_QUERY("SELECT
-       h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online
+       h.`id`,
+       h.`userid`,
+       h.`holiday_start`,
+       h.`holiday_end`,
+       h.`comments`,
+       d.`status`,
+       d.`last_online`
 FROM
-       `{?_MYSQL_PREFIX?}_user_holidays` AS h
+       `{?_MYSQL_PREFIX?}_user_holidays` AS `h`
 LEFT JOIN
-       `{?_MYSQL_PREFIX?}_user_data` AS d
+       `{?_MYSQL_PREFIX?}_user_data` AS `d`
 ON
-       h.userid=d.userid
+       h.`userid`=d.`userid`
 ORDER BY
-       h.userid ASC", __FILE__, __LINE__);
+       h.`userid` ASC", __FILE__, __LINE__);
 
 if (!SQL_HASZERONUMS($result)) {
        // List all holiday requests
@@ -65,23 +71,22 @@ if (!SQL_HASZERONUMS($result)) {
                        'userid'      => $content['userid'],
                        'start'       => generateDateTime($content['holiday_start'], 3),
                        'end'         => generateDateTime($content['holiday_end'], 3),
-                       'comments'    => wordwrap($content['comments'], 15),
                        'status'      => $content['status'],
                        'last_online' => generateDateTime($content['last_online'], 3),
                );
 
                // Load row template and switch color
-               $OUT .= loadTemplate('admin_list_holiday_row', true, $content);
+               $OUT .= loadTemplate('admin_list_holiday_row', TRUE, $content);
        } // END - while
 
        // Free memory
        SQL_FREERESULT($result);
 
        // Load main template
-       loadTemplate('admin_list_holiday', false, $OUT);
+       loadTemplate('admin_list_holiday', FALSE, $OUT);
 } else {
        // No holiday requests found
-       displayMessage('{--ADMIN_HOLIDAY_NOTHING_FOUND--}');
+       displayMessage('{--ADMIN_LIST_HOLIDAY_404--}');
 }
 
 // [EOF]