/** * Alters the dom to enclose the specified nodes with the micro-update * livepress mark tag. * * @access private * * @param array $nodes List of nodes to be enclosed. * @param DOMNode $parent_node Parent node where the nodes will be enclosed. * @param DOMDocument $dom The DOM where the nodes belongs. * @param array $current_ids All the current used ids on updates. * @param DOMNode $ref_node The nodes will be inserted before this one. */ private function enclose_nodes_by_chunk_mark_tag($nodes, $parent_node, $dom, $current_ids, $ref_node = null) { $chunk_mark = $dom->createElement(self::$chunks_tag); $chunk_id = $this->next_post_update_id($current_ids); $chunk_mark->setAttribute('id', $chunk_id); // Useful for one-line oEmbeds $chunk_mark->appendChild($dom->createTextNode("\n")); foreach ($nodes as $node) { $chunk_mark->appendChild($node); } // Useful for one-line oEmbeds $chunk_mark->appendChild($dom->createTextNode("\n")); $output = $dom->SaveXML($chunk_mark); $chunks_class = self::$chunks_class; if (preg_match('/\\[livepress_metainfo.+has_avatar.*\\]/s', $output)) { $chunks_class .= " " . self::$add_to_chunks_class_when_avatar; } $chunk_mark->setAttribute('class', $chunks_class); if ($ref_node) { $parent_node->insertBefore($chunk_mark, $ref_node); } else { $parent_node->appendChild($chunk_mark); } }
$XmlRoot->appendChild($Item = $XmlDoc->createElement('addressvegas')); $Item->appendChild($XmlDoc->createCDATASection(sprintf($URLTemplate, 'IanseoVegas.php'))); $XmlRoot->appendChild($Item = $XmlDoc->createElement('addresstowin')); $Item->appendChild($XmlDoc->createCDATASection('http://localhost:8888/ianseo/Modules/Boinx/Ianseoxtowin.xml')); $XmlRoot->appendChild($Item = $XmlDoc->createElement('danagetiming')); $Item->appendChild($XmlDoc->createCDATASection(sprintf($URLTemplate, '../DanageDisplay/Timing.php'))); $XmlRoot->appendChild($Item = $XmlDoc->createElement('roundrobinscore')); $Item->appendChild($XmlDoc->createCDATASection(sprintf($URLTemplate, 'IanseoScoresRR.php'))); $XmlRoot->appendChild($Item = $XmlDoc->createElement('roundrobinrank')); $Item->appendChild($XmlDoc->createCDATASection(sprintf($URLTemplate, 'IanseoQualRR.php'))); // We'll be outputting a XML // It will be called boinxianseo.xml header('Cache-Control: no-store, no-cache, must-revalidate'); header('Content-type: text/xml; charset=' . PageEncode); header('Content-Disposition: attachment; filename="boinxianseo.xml"'); echo $XmlDoc->SaveXML(); die; } chdir('Layers'); $Layers = glob('*.qtz'); if (!empty($_GET['Layer']) and in_array($_GET['Layer'], $Layers)) { // We'll be outputting a boix layer header('Content-type: application/x-quartzcomposer'); // It will be called boinxianseo.xml header('Content-Disposition: attachment; filename="' . stripslashes($_GET['Layer']) . '"'); readfile(stripslashes($_GET['Layer'])); die; } require_once 'Common/Fun_FormatText.inc.php'; $PAGE_TITLE = get_text('TitleTourMenu', 'Tournament'); include 'Common/Templates/head.php';
function XML() { global $CFG; $XmlDoc = new DOMDocument('1.0', 'UTF-8'); $XmlRoot = $XmlDoc->createElement('FileList'); $XmlRoot->setAttribute('Count', $this->count()); $XmlDoc->appendChild($XmlRoot); foreach ($this->Files as $detail) { $FileNode = $XmlDoc->createElement('File'); $XmlRoot->appendChild($FileNode); $tmpNode = $XmlDoc->createElement('Name', str_replace("//", "/", str_replace($CFG->DOCUMENT_PATH, "", $detail))); $FileNode->appendChild($tmpNode); if ($this->boolShowSize) { $tmpNode = $XmlDoc->createElement('Size', filesize($detail)); $FileNode->appendChild($tmpNode); } if ($this->boolShowMD5) { $tmpNode = $XmlDoc->createElement('MD5', md5_file($detail)); $FileNode->appendChild($tmpNode); } } return $XmlDoc->SaveXML(); }