<?php
// Created by Ardora www.webardora.net
//POLAROID-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 ("cfg.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;
$ima=$item->getElementsByTagName("ima")->item(0)->nodeValue;
$htm=$item->getElementsByTagName("htm")->item(0)->nodeValue;
$jobs[]=array("dat"=>$dat,"tit"=>$tit,"des"=>$des,"ima"=>$ima,"htm"=>$htm,"usu"=>basename($filename,".xml"));
}}}; echo json_encode($jobs);}
?>
