<?php
// Created by Ardora www.webardora.net
//STICKY-ardoraPublic
//bajo licencia Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)
//para otros usos contacte con el autor
session_cache_limiter("nocache,private");date_default_timezone_set("Europe/Madrid");include_once("cfg2.php");$folderN="../".xmlDir;
if($_POST["action"]=="getJob"){$jobs=array();$files=glob($folderN."*xml");if (is_array($files)) {foreach($files as $filename) {$xml_file=new DomDocument("1.0","UTF-8");$xml_file->load($filename, LIBXML_NOBLANKS);$items=$xml_file->getElementsByTagName("item");
foreach($items as $item){$dat=$item->getElementsByTagName("dat")->item(0)->nodeValue;$tit=$item->getElementsByTagName("tit")->item(0)->nodeValue;$des=$item->getElementsByTagName("des")->item(0)->nodeValue;$cBo=$item->getElementsByTagName("cBo")->item(0)->nodeValue;$cBa=$item->getElementsByTagName("cBa")->item(0)->nodeValue;
$jobs[]=array("dat"=>$dat,"tit"=>$tit,"des"=>$des,"cBo"=>$cBo,"cBa"=>$cBa,"usu"=>basename($filename,".xml"));}}};echo json_encode($jobs);}
?>
