X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_holiday.php;h=f69f814f289bd3341bad83afef0175fc07e144c4;hb=8ce32e702f3caa76b8d446902948e83e1e6854c8;hp=7bb54804fd8b7b722c271ca4e27aecefa692eeaa;hpb=263a089d8a499e0e26d0af9e7aa7639f88b8ca60;p=mailer.git diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 7bb54804fd..f69f814f28 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -1,7 +1,7 @@ 0) { +if (!SQL_HASZERONUMS($result)) { // List all holiday requests - $OUT = ''; $SW = 2; + $OUT = ''; while ($content = SQL_FETCHARRAY($result)) { - // Add three dashes to comment when it is empty - if (empty($content['comments'])) $content['comments'] = '---'; - // 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), + '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); @@ -82,7 +81,7 @@ if (SQL_NUMROWS($result) > 0) { loadTemplate('admin_list_holiday', false, $OUT); } else { // No holiday requests found - loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND')); + displayMessage('{--ADMIN_HOLIDAY_NOTHING_FOUND--}'); } // [EOF]