]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-list_holiday.php
New function isValidUserid() introduced, more rewrites to EL:
[mailer.git] / inc / modules / admin / what-list_holiday.php
index 2947ae11293a95b7e4d63dc0960a9af0d141e643..9845488bc92f2d809b57a9d6b0807c6e8775521e 100644 (file)
@@ -46,11 +46,16 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 addMenuDescription('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
-FROM `{?_MYSQL_PREFIX?}_user_holidays` AS h
-LEFT JOIN `{?_MYSQL_PREFIX?}_user_data` AS d
-ON h.userid=d.userid
-ORDER BY h.userid", __FILE__, __LINE__);
+$result = SQL_QUERY("SELECT
+       h.id, h.userid, h.holiday_start, h.holiday_end, h.comments, d.status, d.last_online
+FROM
+       `{?_MYSQL_PREFIX?}_user_holidays` AS h
+LEFT JOIN
+       `{?_MYSQL_PREFIX?}_user_data` AS d
+ON
+       h.userid=d.userid
+ORDER BY
+       h.userid ASC", __FILE__, __LINE__);
 
 if (SQL_NUMROWS($result) > 0) {
        // List all holiday requests
@@ -61,20 +66,20 @@ if (SQL_NUMROWS($result) > 0) {
 
                // Prepare data for the row template
                $content = array(
-                       'sw'       => $SW,
-                       'id'       => $content['id'],
-                       'userid'      => generateUserProfileLink($content['userid']),
-                       'start'    => generateDateTime($content['holiday_start'], 3),
-                       'end'      => generateDateTime($content['holiday_end'], 3),
-                       'comments' => wordwrap($content['comments'], 15),
-                       'status'   => translateUserStatus($content['status']),
-                       'last_online'     => generateDateTime($content['last_online'], 3),
+                       'sw'          => $SW,
+                       'id'          => $content['id'],
+                       '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);
                $SW = 3 - $SW;
-       }
+       } // END - while
 
        // Free memory
        SQL_FREERESULT($result);