Ajout du passage liste -> reserve
parent
cc14c740d3
commit
b5943a0668
@ -0,0 +1,18 @@
|
||||
<?
|
||||
$reserve = $_POST['reserve'];
|
||||
|
||||
$doc = new DOMDocument;
|
||||
$doc->load('../db/links.xml');
|
||||
|
||||
$xpath = new DOMXpath($doc);
|
||||
|
||||
// Buffering and deleting moved element
|
||||
foreach($xpath->query('label/link[title = "'.$reserve.'"]') as $node) {
|
||||
$buffer = $node;
|
||||
$node->parentNode->removeChild($node);
|
||||
}
|
||||
|
||||
$searchLabel = $xpath->query('reserve');
|
||||
|
||||
$searchLabel->item(0)->appendChild($buffer);
|
||||
$doc->save('../db/links.xml');
|
Binary file not shown.
After Width: | Height: | Size: 3.2 KiB |
Loading…
Reference in New Issue