Nextrek
Diff Revisions
758
vs
782
for /legal-map/ajax/openArticle.php
|
@@ -1,4 +1,5 @@ |
1 |
1 |
|
<?php |
|
2 |
+ |
require_once("SimpleXMLExtended.php"); |
2 |
3 |
|
|
3 |
4 |
|
if (file_exists(dirname(__FILE__)."/../articoli/".$_REQUEST["html"])) { |
4 |
5 |
|
$d = new DOMDocument; |
|
@@ -12,6 +13,20 @@ |
12 |
13 |
|
} |
13 |
14 |
|
|
14 |
15 |
|
echo $mock->saveHTML(); |
|
16 |
+ |
|
|
17 |
+ |
if (isset($_REQUEST["popup"])) { |
|
18 |
+ |
$xmlRoot; |
|
19 |
+ |
if (file_exists(dirname(__FILE__)."/../itinerari/".$_COOKIE["lm-session"].".xml")) { |
|
20 |
+ |
$xmlRoot = simplexml_load_file(dirname(__FILE__)."/../itinerari/".$_COOKIE["lm-session"].".xml", 'SimpleXMLExtended'); |
|
21 |
+ |
|
|
22 |
+ |
$articoloNodo = $xmlRoot->xpath('//articolo[@articoloId="'.$_REQUEST["padreArt"].'"]')[0]; |
|
23 |
+ |
$articoloPopup = $articoloNodo->addChild("articolopopup"); |
|
24 |
+ |
$articoloPopup->addCData($d->getElementsByTagName('title')->item(0)->textContent); |
|
25 |
+ |
|
|
26 |
+ |
$xmlRoot->saveXML(dirname(__FILE__)."/../itinerari/".$_COOKIE["lm-session"].".xml"); |
|
27 |
+ |
} |
|
28 |
+ |
} |
|
29 |
+ |
|
15 |
30 |
|
} else { |
16 |
31 |
|
header($_SERVER['SERVER_PROTOCOL'] . ' 404 File Not Found', true, 404); |
17 |
32 |
|
echo "<b>File Not Found</b>"; |