'; echo ''; echo ''; echo 'Wind River Events http://www.windriver.com Wind River Events '.gmdate('D, d M Y H:i:s \G\M\T').' en-US hourly 1 http://www.windriver.com'; $lang = "home"; $events = lcms_get_items_events("$DOCUMENT_ROOT/events/events.xml", 'event'); if (lcms_not_null($events)) { for ($i = 0; $i < count($events); $i++) { // required $lang_ = $events[$i]->getValueByPath('/lang'); $exp = $events[$i]->getValueByPath('/exp'); $home = $events[$i]->getValueByPath('/home'); if(event_show($exp)){ $href = $events[$i]->getValueByPath('/href'); $title = $events[$i]->getValueByPath('/title'); // optional $target = (lcms_not_null($events[$i]->getValueByPath('/target'))) ? $events[$i]->getValueByPath('/target') : '_self'; if ($target != '_blank') $href = WS_ROOT . $href; // prepend absolute root unless it's an external link $content = (lcms_not_null($events[$i]->getValueByPath('/content'))) ? $events[$i]->getValueByPath('/content') : ''; echo ""; echo '<![CDATA['.$title.']]>'; echo ''.$href.''; echo 'Wind River Events'; echo ''.$href.''; echo ''; $occurrences_root = $events[$i]->getElementByName('occurrences'); if (lcms_not_null($occurrences_root)) { $occurrences = $occurrences_root->getElementsByName('occurrence'); if (lcms_not_null($occurrences)) { foreach ($occurrences as $occ) { $date = (lcms_not_null($occ->getValueByPath('/date'))) ? $occ->getValueByPath('/date') . ': ' : ''; $location = (lcms_not_null($occ->getValueByPath('/location'))) ? $occ->getValueByPath('/location') . '
' : ''; echo ''; } } // end occurrences } // end if (occurrences_root) echo '
'; echo '
'; } } } function event_show($exp_){ //date_default_timezone_set('America/Los_Angeles'); $exp_date = $exp_; $todays_date = date("Y-m-d"); $today = strtotime($todays_date); list($m,$d,$y) = explode('-', $exp_date); $exp_date = $y . "-" . $m . "-" . $d; $expiration_date = strtotime($exp_date); if ($expiration_date > $today) { return true; } else { return false; } } echo '
'; ?>