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'], 'uid' => 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' => generateDateTime($content['last_online'], '3'), ); // Load row template and switch color $OUT .= LOAD_TEMPLATE("admin_list_holiday_row", true, $content); $SW = 3 - $SW; } // Free memory SQL_FREERESULT($result); // @TODO Rewrite this constant define('__HOLIDAY_ROWS', $OUT); // Load main template LOAD_TEMPLATE("admin_list_holiday"); } else { // No holiday requests found LOAD_TEMPLATE('admin_settings_saved', false, getMessage('HOLIDAY_ADMIN_NOTHING_FOUND')); } // ?>