<?php
if(core::ifGet("actif")){
    if(core::getGet("actif") == "true"){
        core::addFileDebug();

        historique::recRef("/parametres.html");
        historique::add(array(
            "idType" => historique::getIdRef("ACTION"),
            "idUser" => session::getId(),
            "idPage" => historique::getIdRef("/parametres.html"),
            "log" => "Mode debug : Activation"
        ));

        alert::recSuccess("Le mode debug est activé");
    } else {
        core::removeFileDebug();

        historique::recRef("/parametres.html#parametres-debug");
        historique::add(array(
            "idType" => historique::getIdRef("ACTION"),
            "idUser" => session::getId(),
            "idPage" => historique::getIdRef("/parametres.html#parametres-debug"),
            "log" => "Mode debug : Désactivation"
        ));

        alert::recSuccess("Le mode debug est déactivé");
    }
}

header("Location: /parametres.html#parametres-debug");
exit();