exit;
}
if (isset($_GET["add-www-js"])) {
    add_www_js();
    exit;
}
if (isset($_GET["add-www-tab"])) {
    add_www_tab();
    exit;
}
if (isset($_GET["add-www-popup"])) {
    add_www_import();
    exit;
}
if (isset($_POST["categorize"])) {
    categorize();
    exit;
}
if (isset($_POST["www-delete"])) {
    www_delete();
    exit;
}
main_page();
function main_js()
{
    if (!isset($_SESSION["uid"])) {
        echo "alert('No Session!!!');";
        die;
    }
    $page = CurrentPageName();
    $users = new usersMenus();
$DisableLocalStatisticsTasks = $sock->GET_INFO("DisableLocalStatisticsTasks");
if (!is_numeric($DisableLocalStatisticsTasks)) {
    $DisableLocalStatisticsTasks = 0;
}
if ($DisableLocalStatisticsTasks == 1) {
    die;
}
if ($argv[1] == "--last7-days") {
    categorize_last7days();
    die;
}
if ($argv[1] == "--repair") {
    repair();
    die;
}
categorize($argv[1]);
function categorize($day = null)
{
    $unix = new unix();
    $pidfile = "/etc/artica-postfix/pids/" . basename(__FILE__) . ".{$day}." . __FUNCTION__ . ".pid";
    $pid = @file_get_contents($pidfile);
    if ($unix->process_exists($pid, basename(__FILE__))) {
        if ($GLOBALS["VERBOSE"]) {
            echo "Already executed pid {$pid}\n";
        }
        return;
    }
    if ($day == null) {
        return;
    }
    if (system_is_overloaded()) {