\r\n"; echo "\r\n"; echo "\t\r\n"; echo "\t\t". $strPageTitle ."\r\n"; echo "\t\t". $strMetaLink ."\r\n"; echo "\t\t". $strDescription ."\r\n"; echo "\t\ten-us\r\n"; echo "\t\thttp://blogs.law.harvard.edu/tech/rss\r\n"; echo "\t\tCopyright ". date("Y") ." Rutgers, The State University of New Jersey. All Rights Reserved.\r\n"; echo "\t\t\r\n"; echo "\t\t". date(DATE_RSS) ."\r\n"; //echo "\t\t20\r\n"; $blnWeHaveEvents = false; foreach ($arrEVENTS as $arrEVENT) { $strEventName = $arrEVENT["Name"]; if (strlen($strEventName) > 0) { //We have a potential event $strEventName = remove_ampersand($strEventName); $strEventURL = $arrEVENT["URL"]; $dtmEventFirstDay = $arrEVENT["FirstDate"]; $dtmEventLastDay = $arrEVENT["LastDate"]; if (strlen($dtmEventLastDay) == 0) { $dtmEventLastDay = $dtmEventFirstDay; } $dtmEventFirstDay = date_create($dtmEventFirstDay); $dtmEventLastDay = date_create($dtmEventLastDay); $strFullDate = format_two_dates($dtmEventFirstDay, $dtmEventLastDay); $strFullDate = str_replace("–", "-", $strFullDate); $intDaysToEvent = date_diff(date_create(date("n/j/Y")), $dtmEventLastDay); $intDaysToEvent = $intDaysToEvent->format('%R%a'); if ($intDaysToEvent >= 0) { //Event has not passed: show it $blnWeHaveEvents = true; $strItemSubject = $strFullDate .": ". htmlentities($strEventName); $strItemURL = htmlentities($strEventURL); $dtmRFC822BeginDate = date(DATE_RSS, date_format($dtmEventFirstDay, 'U')); $dtmRFC822EndDate = date(DATE_RSS, date_format($dtmEventLastDay, 'U')); $dtmRFC822Date = date(DATE_RSS); echo "\t\t\r\n"; echo "\t\t\t". $strItemSubject ."\r\n"; if (strlen($strItemURL) > 0) { echo "\t\t\t". $strItemURL ."\r\n"; echo "\t\t\t". $strItemURL ."\r\n"; } echo "\t\t\t". $dtmRFC822BeginDate ."\r\n"; echo "\t\t\t". $dtmRFC822EndDate ."\r\n"; echo "\t\t\t". $dtmRFC822Date ."\r\n"; echo "\t\t\r\n"; } } } echo "\t\r\n"; echo "\r\n";