Support WU
A-Z Index

Admission InformationMaster of Arts in Teaching

2007 / 2008

parse('/www/www.willamette.edu/soe/admission/mat/important_dates/index.xml'); function by_date ($a, $b) { $a_date = strtotime($a->eventDate->nodeValue); $b_date = strtotime($b->eventDate->nodeValue); if ($a_date == $b_date) return 0; return ($a_date < $b_date) ? -1 : 1; } function get_object_by_id ($events = array(), $id = 0) { for ($i = 0; $i < count($events); $i ++) { if ($events[$i]->attributes['id'] == $id) { return $events[$i]; } } return NULL; } if (is_array($dates->firstChild->childNodes)) { $event_list = $dates->firstChild->childNodes; uasort($event_list, 'by_date'); $last_month = ''; foreach ($event_list as $id => $event) { $this_date = strtotime($event->eventDate->nodeValue); $event_str=$event->eventDate->nodeValue; if ($this_date >= mktime()) { print ' '; $last_month = date("F", $this_date); } } } ?>
' . ((date("F", $this_date) == $last_month) ? date("j", $this_date) : date("F j", $this_date)) . ' ' . ((!empty($event->text->nodeValue) && !empty($event->title->nodeValue)) ? $event->title->nodeValue . '
' : '') . ((!empty($event->href->nodeValue)) ? '' : '') . ((!empty($event->text->nodeValue)) ? $event->text->nodeValue : $event->title->nodeValue) . ((!empty($event->href->nodeValue)) ? '' : ''); if (count($event->related->childNodes) == 1) { $related = get_object_by_id ($event_list, $event->related->firstChild->nodeValue); print ' [related to the ' . (($this_date > strtotime($related->eventDate->nodeValue)) ? 'past ' : 'upcoming ') . strtolower(preg_replace('/^[^ ]+ /i', '', $related->title->nodeValue)) . ' on ' . date("F j, Y", strtotime($related->eventDate->nodeValue)) . ']'; } else if (count($event->related->childNodes) > 1) { print '
    '; foreach ($event->related->childNodes as $related_event) { $related = get_object_by_id ($event_list, $related_event->nodeValue); print '
  • ' . date("F j", strtotime($related->eventDate->nodeValue)) . ': ' . preg_replace('/^[^ ]+ /i', '', $related->title->nodeValue) . '
  • '; } print '
'; } print '