<?php

if(core::ifPost("from")){
    if(proweb::deleteExcel(core::getPost("id"))){
        json::create("excel-proweb");

        historique::recRef("/proweb-historique-excel.html");
        historique::add(array(
            "idType" => historique::getIdRef("ACTION"),
            "idUser" => session::getId(),
            "idPage" => historique::getIdRef("/proweb-historique-excel.html"),
            "log" => "Suppression de ". core::getPost("file")
        ));

        alert::recSuccess("Suppression de ". core::getPost("file"));
    } else {
        alert::recError("Erreur lors de la suppression de ". core::getPost("file"));
    }
}

header("Location: /proweb-historique-excel.html");
exit();

