X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_holiday.php;h=f2d29b272385a065fa3c245374427a6bb7e8b65d;hp=6ad367aac8d33a5e19161628b1752938c3b71172;hb=30ae22f62ae87c53a56baf0d134569ba91011111;hpb=7f104f6fe558bb56b4205241435a2357c2feece1 diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 6ad367aac8..f2d29b2723 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 - $SW = 2; $OUT = ""; - while (list($id, $uid, $start, $end, $comments, $status, $last) = SQL_FETCHROW($result)) - { - // Add three dashes to comment when it is empty - if (empty($comments)) $comments = "---"; - + $OUT = ''; + while ($content = SQL_FETCHARRAY($result)) { // Prepare data for the row template $content = array( - 'sw' => $SW, - 'id' => $id, - 'uid' => ADMIN_USER_PROFILE_LINK($uid), - 'start' => MAKE_DATETIME($start, "3"), - 'end' => MAKE_DATETIME($end, "3"), - 'comments' => wordwrap($comments, 15), - 'status' => TRANSLATE_STATUS($status), - 'last' => MAKE_DATETIME($last, "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 .= LOAD_TEMPLATE("admin_list_holiday_row", true, $content); - $SW = 3 - $SW; - } + $OUT .= loadTemplate('admin_list_holiday_row', true, $content); + } // END - while // Free memory SQL_FREERESULT($result); - define('__HOLIDAY_ROWS', $OUT); // Load main template - LOAD_TEMPLATE("admin_list_holiday"); -} - else -{ + loadTemplate('admin_list_holiday', false, $OUT); +} else { // No holiday requests found - LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_ADMIN_NOTHING_FOUND); + loadTemplate('admin_settings_saved', false, '{--ADMIN_HOLIDAY_NOTHING_FOUND--}'); } -// + +// [EOF] ?>