X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fmodules%2Fadmin%2Fwhat-list_holiday.php;h=f827ab7842e12f431ad39497ed5f3b9f890838ea;hb=f5ebd83b36f343022977241bd9b570051ece4b0f;hp=713b45fcf497d2fc52ffee346a2e625c70c5ffa1;hpb=6c763653e88b9d10627e651ca59c7201d4b7d62b;p=mailer.git diff --git a/inc/modules/admin/what-list_holiday.php b/inc/modules/admin/what-list_holiday.php index 713b45fcf4..f827ab7842 100644 --- a/inc/modules/admin/what-list_holiday.php +++ b/inc/modules/admin/what-list_holiday.php @@ -1,7 +1,7 @@ 0) -{ +if (SQL_NUMROWS($result) > 0) { // List all holiday requests - $SW = 2; $OUT = ""; - while (list($id, $uid, $start, $end, $comments, $status, $last) = SQL_FETCHROW($result)) - { + $OUT = ''; $SW = 2; + while ($content = SQL_FETCHARRAY($result)) { // Add three dashes to comment when it is empty - if (empty($comments)) $comments = "---"; + if (empty($content['comments'])) $content['comments'] = '---'; // 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' => 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), ); // Load row template and switch color - $OUT .= LOAD_TEMPLATE("admin_list_holiday_row", true, $content); + $OUT .= loadTemplate('admin_list_holiday_row', true, $content); $SW = 3 - $SW; } // 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, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND')); } -// + +// [EOF] ?>