Example #1
0
} else {
    if (test_connect()) {
        echo "<h3>" . __('Database connection successful') . "</h3>";
        if (!isset($_POST["update_location"])) {
            $current_verison = "0.31";
            $config_table = "glpi_config";
            if (TableExists("glpi_configs")) {
                $config_table = "glpi_configs";
            }
            // Find 2 tables to manage databases before 0.78
            if (!TableExists($config_table)) {
                include "update_to_031.php";
                updateDbTo031();
                $tab = updateDbUpTo031();
            } else {
                $current_version = Config::getCurrentDBVersion();
                $tab = updateDbUpTo031();
            }
            echo "<div class='center'>";
            if (!empty($tab) && $tab["adminchange"]) {
                echo "<div class='center'> <h2>" . __("All users having administrators rights have have been updated to 'super-admin' rights with the creation of his new user type.") . "<h2></div>";
            }
            if (showLocationUpdateForm()) {
                switch ($current_version) {
                    case "0.31":
                    case "0.4":
                    case "0.41":
                    case "0.42":
                    case "0.5":
                    case "0.51":
                    case "0.51a":