} $out = $mapNodes[$indexName]; if ($out->getAttribute("parts")) { $outputIndexes->removeChild($out); $out = $output->createElement("region"); $outputIndexes->appendChild($out); } } else { $out = $output->createElement("region"); $outputIndexes->appendChild($out); } $out->setAttribute("date", $date); $out->setAttribute("local", "true"); $out->setAttribute("size", $size); $out->setAttribute("name", $indexName); $out->setAttribute("description", $description); //$mapNodes[$indexName] = $out; } closedir($dh); } } else { print $dir . " not a directory!\n"; } if ($local_file) { // header('Content-Type: text/xml'); // echo $output->asXML(); } $output->save($localFileName); } updateGoogleCodeIndexes(false);
<html> <head><title>OsmAnd Indexes</title></head> <?php $update = $_GET['update']; include 'update_googlecode_indexes.php'; updateGoogleCodeIndexes($update); $dom = new DomDocument(); $dom->load('indexes.xml'); $xpath = new DOMXpath($dom); ?> <body> <h1><?php echo "Table of multiindexes hosted on googlecode"; ?> </h1> <table border="1"> <?php $res = $xpath->query('//multiregion'); if ($res && $res->length > 0) { foreach ($res as $node) { echo "<tr><td>" . $node->getAttribute('name') . "</td><td>" . $node->getAttribute('date') . "</td><td>" . $node->getAttribute('size') . "</td><td>" . $node->getAttribute('parts') . "</td><td>" . $node->getAttribute('description') . "</td></tr>"; } } ?> </table> <h1><?php echo "Table of indexes hosted on googlecode"; ?> </h1> <table border="1"> <?php
<?php if (!file_exists("indexes.xml")) { include 'update_googlecode_indexes.php'; updateGoogleCodeIndexes(); } header('Content-type: application/xml'); header('Content-Disposition: attachment; filename="indexes.xml"'); readfile('indexes.xml');