Error
You cannot run SimpleViewerAdmin, because you should have installed at least PHP 4.1 or above.
'); } // Check for XML support. $xmlError = true; foreach (get_loaded_extensions() as $k => $v) { if ($v == 'xml') { $xmlError = false; } } if ($xmlError) { $_SESSION['reqFit'] = false; die('You cannot run SimpleViewerAdmin, because you need to have PHP compiled with native XML support.
'); } } // }}} // {{{ Configuration // Open the XML file for reading. if (!($fileHandle = @fopen('SimpleViewerConfig.xml', 'r'))) { die("Can't read file: " . 'SimpleViewerConfig.xml'); } // Read the XML file. $data = ''; while ($chunk = @fread($fileHandle, 4096)) { $data .= $chunk; } // Initialize the SAX parser. $xmlParser = @xml_parser_create(); // Control the parser behaviour. @xml_parser_set_option($xmlParser, XML_OPTION_CASE_FOLDING, false); @xml_parser_set_option($xmlParser, XML_OPTION_SKIP_WHITE, true); // Container arrays. $elementArray = array(); $frequencyArray = array(); // Parse the XML file. if (!xml_parse_into_struct($xmlParser, $data, $elementArray, $frequencyArray)) { die('XML Parser error: ' . xml_error_string(xml_get_error_code($xmlParser))); } // All done, clean up! @xml_parser_free($xmlParser); // Global configuration container. $simpleViewer = array(); // Parse the configuration attributes. foreach ($elementArray[0]['attributes'] as $k => $v) { $simpleViewer[$k] = $v; } // After parsing the configuration data, init a basic XML template. $simpleViewer['basicXMLTemplate'] = '