Ajout de la reserve de liens et du passage reserve -> liste

This commit is contained in:
Chouchen committed 2010-09-23 10:59:56 +00:00
1 parent 73e97a31be
commit cc14c740d3
7 files changed
+233 -178

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
<?
$reserve = $_POST['reserve'];
$doc = new DOMDocument;
$doc->load('../db/links.xml');
$xpath = new DOMXpath($doc);
// Buffering and deleting moved element
foreach($xpath->query('reserve/link[title = "'.$reserve.'"]') as $node) {
$buffer = $node;
$node->parentNode->removeChild($node);
}
$searchLabel = $xpath->query('label');
$lastLabel = $searchLabel->length -1;
$searchLabel->item($lastLabel)->appendChild($buffer);
$doc->save('../db/links.xml');