X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-list_holiday.php;h=f2d29b272385a065fa3c245374427a6bb7e8b65d;hb=30ae22f62ae87c53a56baf0d134569ba91011111;hp=8f9fca1a31474cc61a1c90eeb03bf50e7d406e9c;hpb=357b2ca133fc1f89db74097955c366cb4bee6996;p=mailer.git diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 8f9fca1a31..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] ?>