OcsServer::showStatistics($_SESSION["ocs_update"]['statistics'], true);
        unset($_SESSION["ocs_update"]);
        $display_list = false;
        echo "<div class='center b'><br>";
        echo "<a href='" . $_SERVER['PHP_SELF'] . "'>" . $LANG['buttons'][13] . "</a></div>";
    }
}
if (!isset($_POST["update_ok"])) {
    if (!isset($_GET['check'])) {
        $_GET['check'] = 'all';
    }
    if (!isset($_GET['start'])) {
        $_GET['start'] = 0;
    }
    OcsServer::manageDeleted($_SESSION["ocsservers_id"]);
    if ($display_list) {
        OcsServer::showComputersToUpdate($_SESSION["ocsservers_id"], $_GET['check'], $_GET['start']);
    }
} else {
    if (count($_POST['toupdate']) > 0) {
        $_SESSION["ocs_update_count"] = 0;
        foreach ($_POST['toupdate'] as $key => $val) {
            if ($val == "on") {
                $_SESSION["ocs_update"]['computers'][] = $key;
                $_SESSION["ocs_update_count"]++;
            }
        }
    }
    glpi_header($_SERVER['PHP_SELF']);
}
commonFooter();