0) { // 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 = "---"; // 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"), ); // Load row template and switch color $OUT .= LOAD_TEMPLATE("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 { // No holiday requests found LOAD_TEMPLATE("admin_settings_saved", false, HOLIDAY_ADMIN_NOTHING_FOUND); } // ?>