0) { // List all holiday requests $OUT = ''; $SW = 2; while ($content = SQL_FETCHARRAY($result)) { // Add three dashes to comment when it is empty if (empty($content['comments'])) $content['comments'] = '---'; // Prepare data for the row template $content = array( 'sw' => $SW, '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 .= loadTemplate('admin_list_holiday_row', true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); // Load main template loadTemplate('admin_list_holiday', false, $OUT); } else { // No holiday requests found loadTemplate('admin_settings_saved', false, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND')); } // [EOF] ?>