X-Git-Url: https://git.mxchange.org/?p=mailer.git;a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_holiday.php;h=51bb307ccc5b793778efcbf456b260db9cf64a99;hp=8f9fca1a31474cc61a1c90eeb03bf50e7d406e9c;hb=49acdb7a7adbcf25a8e8683b5581bfcec72b23bd;hpb=357b2ca133fc1f89db74097955c366cb4bee6996 diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 8f9fca1a31..51bb307ccc 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -1,7 +1,7 @@ 0) -{ +if (!ifSqlHasZeroNumRows($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 = sqlFetchArray($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); + sqlFreeResult($result); // 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] ?>