function ob_out() { global $_SGLOBAL, $_SCONFIG, $_SC; $content = ob_get_contents(); $preg_searchs = $preg_replaces = $str_searchs = $str_replaces = array(); if ($_SCONFIG['allowrewrite']) { $preg_searchs[] = "/\\<a href\\=\"space\\.php\\?(uid|do)+\\=([a-z0-9\\=\\&]+?)\"/ie"; $preg_searchs[] = "/\\<a href\\=\"space.php\"/i"; $preg_searchs[] = "/\\<a href\\=\"network\\.php\\?ac\\=([a-z0-9\\=\\&]+?)\"/ie"; $preg_searchs[] = "/\\<a href\\=\"network.php\"/i"; $preg_replaces[] = 'rewrite_url(\'space-\',\'\\2\')'; $preg_replaces[] = '<a href="space.html"'; $preg_replaces[] = 'rewrite_url(\'network-\',\'\\1\')'; $preg_replaces[] = '<a href="network.html"'; } if ($_SCONFIG['linkguide']) { $preg_searchs[] = "/\\<a href\\=\"http\\:\\/\\/(.+?)\"/ie"; $preg_replaces[] = 'iframe_url(\'\\1\')'; } if ($_SGLOBAL['inajax']) { $preg_searchs[] = "/([-\t\v-\f-])+/"; $preg_replaces[] = ' '; $str_searchs[] = ']]>'; $str_replaces[] = ']]>'; } if ($preg_searchs) { $content = preg_replace($preg_searchs, $preg_replaces, $content); } if ($str_searchs) { $content = trim(str_replace($str_searchs, $str_replaces, $content)); } obclean(); if ($_SGLOBAL['inajax']) { xml_out($content); } else { if ($_SCONFIG['headercharset']) { @header('Content-Type: text/html; charset=' . $_SC['charset']); } echo $content; if (D_BUG) { @(include_once S_ROOT . './source/inc_debug.php'); } } }
die("Storage class file not found: '{$storage_class_path}'"); } $storage = new $storage_class(array($CONF['configs']['current'], "")); $storage->loadData(); header('Content-Type: text/xml'); xml_out('<?xml version="1.0" ?>'); xml_out('<root>'); xml_out('<pages>'); foreach ($storage->getPagesList() as $page) { xml_out("<page name=\"{$page}\" />"); } xml_out('</pages>'); xml_out('<datalist>'); foreach ($storage->getDatasources() as $type_name => $datasources) { foreach ($datasources as $ds) { xml_out("<data type=\"{$type_name}\" id=\"{$ds->id}\">"); foreach ($ds->content as $line) { $txt = "<item "; foreach ($line as $name => $val) { $val = htmlentities($val); $txt .= "{$name}=\"{$val}\" "; } $txt .= "/>"; xml_out($txt); } xml_out("</data>"); } } xml_out('</datalist>'); xml_out('</root>');