"; $xml = GetCartoon($cartoonId); $xsl = 'Cartoon.xsl'; print XMLtoHTML($xml, $xsl); loadFormCartoon($cartoonId, $name, $content, $submitted, $correctSubmitted); echo "
"; $xsl = 'Reactions.xsl'; } else { $ar_crumbs[1][0] = "Alle cartoons"; $ar_crumbs[1][1] = "http://www.centrumbredevoort.nl/Cartoon/index.php?cartoonId=all"; if ($cartoonId == "all") { if ($year != "") { $ar_crumbs[1][0] = "Alle cartoons (".$year.")"; $ar_crumbs[1][1] = "http://www.centrumbredevoort.nl/Cartoon/index.php?year=".$year."&cartoonId=all"; define(YEAR, $year); define($lastYearId, true); } loadBreadCrumbs($ar_crumbs); loadSubNavigation($ar_navi, 1); $xml = GetAllCartoonYears(); echo "

"; echo "   |  "; loadXML($xml); echo "
"; $xml = GetAllCartoons(YEAR); $xsl = 'AllCartoons.xsl'; } else { $ar_crumbs[1][0] = "Alle cartoons (".$year.")"; $ar_crumbs[1][1] = "http://www.centrumbredevoort.nl/Cartoon/index.php?year=".$year."&cartoonId=all"; $title = GetCartoonTitle($cartoonId); $ar_crumbs[2][0] = $title; loadBreadCrumbs($ar_crumbs); loadSubNavigation($ar_navi, 1); echo "

"; $xml = GetCartoon($cartoonId); $xsl = 'Cartoon.xsl'; print XMLtoHTML($xml, $xsl); loadFormCartoon($cartoonId, $name, $content, $submitted, $correctSubmitted); echo "
"; $xsl = 'Reactions.xsl'; } } //deal with Laatste collectie (collection name) function startElement($parser, $name, $attrs) { //echo $name; } function endElement($parser, $name) { //echo $name; } function printYearMenu($parser, $data) { //make menu with links to year pages if ($lastYearIdentified == false) { define(YEAR, $data); define($lastYearIdentified, true); } echo "".$data."  |  "; } function loadXML($x) { $xml_parser = xml_parser_create(); // use case-folding so we are sure to find the tag in $map_array xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true); xml_set_element_handler($xml_parser, "startElement", "endElement"); xml_set_character_data_handler($xml_parser, "printYearMenu"); if (!xml_parse($xml_parser, $x)) { die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser))); } xml_parser_free($xml_parser); } if ($xml == "") echo "no valid xml file"; else if ($xsl == "") echo "no valid xsl file"; else { //echo $xml; if ($scanIcons) { $html = XMLtoHTML($xml, $xsl); print textToSmilie($html); $scanIcons = false; } else { print XMLtoHTML($xml, $xsl); } print "

"; } //-------------------------------------- loadHTMLBodyMainAreaEnd(); loadHTMLBodyEnd(PAGE_CARTOON, "../"); ?>