"; $dayformat .= "%d-%02d-%02d"; $id = " id=\"id"; if (isset ($content["newstyle"]) && $content["newstyle"] > 0) { // new style. We switch display between a single list item // and a nested list according to whether there are one or more // items of content for a given day. $itemformat = ""; $itemformat .= "%s\n%s\n"; if (count($content["entries"]) == 1) { // just one item, no need for a sub-list. // print title beside the data, and content as body of list item // set the ID in the li tag for this date. $entry = current($content["entries"]); printf ($dayformat, $id . $entry["published"] . "\"", $year, $month, $day, $year, $month, $day); printf (": " . $itemformat, $year, $month, $day, $entry["published"], $entry["title"], $entry["description"]); } else { // multiple items for this date, use a sub-list. // print out the date for the list-item for this date // use the title as list-item 'header' for each content-item printf ($dayformat, '', $year, $month, $day, $year, $month, $day); printf (""); } printf ("\n"); } else { // old style, blob of text, no title or published ID $contentformat = ":%s"; printf ($dayformat, '',$year, $month, $day, $year, $month, $day); printf ($contentformat, $content); } } ?>

News

RSS 2.0 news feed "); if ($limitmonth || $limitday) { // limited display of news requested, eg to a day or month. #print "debug: $limitmonth $limitday $year $month"; // handle the limitmonth case. if (!$limitday && isset ($newsentries[$year][$month])) foreach ($newsentries[$year][$month] as $dkey => $text) { #printf ("debug: %d %d %d
", $year, $month, $day); #printf ("
  • %d-%02d-%02d:%s
  • ", $year, $month, $dkey, $text); displaydayentries ($newsentries[$year][$month][$dkey], $year, $month, $dkey); } // specific day case else if (isset ($newsentries[$year][$month][$day])) displaydayentries ($newsentries[$year][$month][$day], $year, $month, $day); else printf ("no news..."); // something wrong or user played with url.. } else { // general view of recent news. while ($displayed <= $newsdefaultdisplay && $limittimes > 0) { #printf ("debug: %d %d %d
    ", $year, $month, $day); if (isset ($newsentries[$year][$month][$day])) { displaydayentries ($newsentries[$year][$month][$day], $year, $month, $day); $displayed++; } $day--; /* skip through empty months */ if ($day == 0) { $day = 31; do { $month--; if ($month == 0) { $month = 12; $year--; } } while (!isset ($newsentries[$year][$month]) && $year > 2002); } # just in case $limittimes--; } } // if month was limited user got the whole months worth of news, // so find the next month with news, to link old news to.. if ($limitmonth > 0) { do { $month--; if ($month == 0) { $month = 12; $year--; } } while (!isset($newsentries[$year][$month]) && $year > 2002); } if (isset($newsentries[$year][$month])) printf ("

    Older news", $year,$month); ?>