"; } $current = 0; // homepage if($type == "home-news") { foreach($rss->channel->item as $item) { if($current < $numitems) { // output html echo '
  • '; echothmb($item,' class="media-object" style="width:72px;height:auto;" '); echo '
    '; echo '

    '; echo turncate($item->description,$maxchars); echo readmore($readmore,$readmoretext,$item->link); echo '

    '; echo '
    '; echo '
  • '; } $current++; } } else if ($type =='home-events'){ //date_default_timezone_set('UTC'); foreach($rss->events->event as $item) { if($current < $numitems) { $monthname = $item->start->monthname; $dayofmonth = $item->start->day; $dayofweek = $item->start->dayname; $guid = $item->guid; $recId = $item->recurrenceId; $calPath = $item->calendar->encodedPath; $baseURL = 'http://calendar.msm.edu/'; $imageDir = 'pubcaldav'; $link = $baseURL.'/cal/event/eventView.do?b=de&calPath='.$calPath.'&guid='.$guid.'&recurrenceId='.$recId; echo '
    '; echo '
    '; echo ''.getMonthAbbreviation($monthname).''; echo ''.$dayofmonth.''; echo '
    '; echo '
    '; if($item->xproperties->{'X-BEDEWORK-THUMB-IMAGE'}->values != null) { $image = $item->xproperties->{'X-BEDEWORK-THUMB-IMAGE'}->values->text; echo ''; } echo '
    '; echo '
    '; echo '

    '.$item->summary.'

    '; echo turncate($item->description,$maxchars); //echo $item->location->address; echo readmore($readmore,$readmoretext,$link); echo '
    '; echo '
    '; echo '
    '; } $current++; } } // plain listing else { foreach($rss->channel->item as $item) { if($current < $numitems) { echo '
  • '; echo '

    '.$item->title.'

    '.$item->description.'

    '; echo '
  • '; } $current++; } } ?>