<?php
// Created by Ardora www.webardora.net
//COMENTARIOS-ardoraAjaxJson
//bajo licencia Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)
//para otros usos contacte con el autor
$_SERVER['HTTP_REFERER'] = "introDatos.php";session_start();$slogin_noauthpage=0;$slogin_pagetitle="";
include_once ("../usuariosDemostracion/usuariosDemostracion_lib.php");
session_cache_limiter("nocache,private");ini_set("memory_limit", "80M");
if($_POST["action"]=="all"){
$xml = simplexml_load_file("../ardoraWorkFiles/chuviaIdeas/chuviaIdeas.xml");
$data = array();foreach($xml -> children() as $note) {$data[] = array("id" => (string) $note -> id, "father" => (string) $note -> father, "usr" => (string) $note -> usr, "comment" => (string) $note -> comment, "dt" => (string) $note -> dt);
}echo json_encode($data);}
if ($_POST["action"] == "getDataUser") {$autor = trim($_POST["author"]);$type=dameValor($autor, "TIP");$userName=dameValor($autor, "NOM");
$course=dameValor($autor, "CUR");$group=dameValor($autor, "GRU");echo json_encode(array("type"=>$type, "userName"=>$userName, "course"=>$course, "group"=>$group));}
?>
