<?php
// Created by Ardora www.webardora.net
//TIMELINE-borrar
$_SERVER['HTTP_REFERER']="introDatos.php";
session_start();
$slogin_noauthpage = 0;
$slogin_pagetitle = "";
include_once ("../stu1A/stu1A_lib.php");
session_cache_limiter('nocache,private');
$indi=$_GET['indi'];
$indi=(int)$indi;
$indi=$indi-1;
$nomeArquivo=$slogin_Username.'_'.$indi;
$pathTXT = "../ardoraWorkFiles/computertime/";
$datos_arquivo = file($pathTXT.$nomeArquivo.'.txt');
$txt1=$pathTXT.$nomeArquivo.'.txt';
unlink($txt1);
$file = simplexml_load_file("../ardoraWorkFiles/computertime/computertime.xml");
foreach ($file->event as $event) {
    if ($event["id"]==$nomeArquivo){
        $dom=dom_import_simplexml($event);
        $dom->parentNode->removeChild($dom);
    }
}
$file->asXML("../ardoraWorkFiles/computertime/computertime.xml");
header ("Location: index.php");
?>
