X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=inc%2Fmodules%2Fadmin%2Fwhat-list_holiday.php;h=1ad61cb96ef952c4b98d57711a880330b956f977;hb=cd7d344ea7007cfa20413acd3e03e50f0ab86d86;hp=4db1e7553ffcba80d4bed4c31deb4a854a0e78b9;hpb=5bdeaf8b452206598b6c6cd4f941145b11a0eccc;p=mailer.git diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 4db1e7553f..1ad61cb96e 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), + '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); + displayMessage('{--ADMIN_LIST_HOLIDAY_404--}'); } -// + +// [EOF] ?>