<?php
if(core::ifGet("actif") AND core::ifGet("target")){
    $filter = [
        "debug",
        "sql",
        "submit",
        "email",
        "send-email"
    ];

    if(in_array(core::getGet("target"), $filter)){
        if(core::getGet("actif") == "true"){
            debug::addFile(core::getGet("target"));
        } else {
            debug::removeFile(core::getGet("target"));
        }
    }
}

header("Location: " . $_SERVER['HTTP_REFERER']);
exit();
