Пример #1
0
function addall_js($arr)
{
    foreach ($arr as $i => $src) {
        addjs($src);
    }
}
include_once 'ressources/class.squid.inc';
include_once 'ressources/class.system.network.inc';
if (isset($_GET["websites-search"])) {
    WEBSITES_SEARCH();
    exit;
}
if (isset($_POST["DELETE"])) {
    DELETE_DOM();
    exit;
}
if (isset($_POST["delete_all"])) {
    DELETE_ALL();
    exit;
}
if (isset($_GET["addjs-silent"])) {
    addjs();
    exit;
}
function addjs()
{
    header("content-type: application/x-javascript");
    $tpl = new templates();
    $users = new usersMenus();
    if (!$users->CORP_LICENSE) {
        $error_no_licence = $tpl->javascript_parse_text("{error_no_licence}");
        echo "alert('{$error_no_licence}');";
        return;
    }
    $website = $_GET["website"];
    $add_new_cached_web_site = $tpl->javascript_parse_text("{add_new_cached_web_site}:{$website}");
    $t = time();