Exemple #1
0
 }
 // Override cfg_features by session value
 foreach ($CFG_GLPI['user_pref_field'] as $field) {
     if (!isset($_SESSION["glpi{$field}"]) && isset($CFG_GLPI[$field])) {
         $_SESSION["glpi{$field}"] = $CFG_GLPI[$field];
     }
 }
 if ((!isset($CFG_GLPI["version"]) || trim($CFG_GLPI["version"]) != GLPI_VERSION) && !isset($_GET["donotcheckversion"])) {
     loadLanguage();
     if (isCommandLine()) {
         echo $LANG['update'][88] . "\n";
     } else {
         nullHeader("UPDATE NEEDED", $CFG_GLPI["root_doc"]);
         echo "<div class='center'>";
         echo "<table class='tab_check'>";
         $error = commonCheckForUseGLPI();
         echo "</table><br>";
         if (!$error) {
             if (!isset($CFG_GLPI["version"]) || trim($CFG_GLPI["version"]) < GLPI_VERSION) {
                 echo "<form method='post' action='" . $CFG_GLPI["root_doc"] . "/install/update.php'>";
                 echo "<p class='red'>" . $LANG['update'][88] . "</p>";
                 echo "<input type='submit' name='from_update' value=\"" . $LANG['install'][4] . "\" class='submit'>";
                 echo "</form>";
             } else {
                 if (trim($CFG_GLPI["version"]) > GLPI_VERSION) {
                     echo "<p class='red'>" . $LANG['update'][89] . "</p>";
                 }
             }
         } else {
             echo "<form action='" . $CFG_GLPI["root_doc"] . "/index.php' method='post'>";
             echo "<input type='submit' name='submit' class='submit' value=\"" . $LANG['install'][27] . "\">";
Exemple #2
0
function step1($update)
{
    global $LANG, $CFG_GLPI;
    $error = 0;
    echo "<h3>" . $LANG['install'][5] . "</h3>";
    echo "<table class='tab_check'>";
    $error = commonCheckForUseGLPI();
    echo "</table>";
    switch ($error) {
        case 0:
            echo "<form action='install.php' method='post'>";
            echo "<input type='hidden' name='update' value='" . $update . "'>";
            echo "<input type='hidden' name='language' value='" . $_SESSION['glpilanguage'] . "'>";
            echo "<p class='submit'><input type='hidden' name='install' value='Etape_1'>";
            echo "<input type='submit' name='submit' class='submit' value=\"" . $LANG['install'][26] . "\">";
            echo "</p></form>";
            break;
        case 1:
            echo "<h3>" . $LANG['install'][25] . "</h3>";
            echo "<form action='install.php' method='post'>";
            echo "<p class='submit'><input type='hidden' name='install' value='Etape_1'>";
            echo "<input type='hidden' name='update' value='" . $update . "'>";
            echo "<input type='hidden' name='language' value='" . $_SESSION['glpilanguage'] . "'>";
            echo "<input type='submit' name='submit' class='submit' value=\"" . $LANG['install'][26] . "\">";
            echo "</p></form> &nbsp;&nbsp;";
            echo "<form action='install.php' method='post'>";
            echo "<input type='hidden' name='update' value='" . $update . "'>";
            echo "<input type='hidden' name='language' value='" . $_SESSION['glpilanguage'] . "'>";
            echo "<p class='submit'><input type='hidden' name='install' value='Etape_0'>";
            echo "<input type='submit' name='submit' class='submit' value=\"" . $LANG['install'][27] . "\">";
            echo "</p></form>";
            break;
        case 2:
            echo "<h3>" . $LANG['install'][25] . "</h3>";
            echo "<form action='install.php' method='post'>";
            echo "<input type='hidden' name='update' value='" . $update . "'>";
            echo "<p class='submit'><input type='hidden' name='install' value='Etape_0'>";
            echo "<input type='submit' name='submit' class='submit' value=\"" . $LANG['install'][27] . "\">";
            echo "</p></form>";
            break;
    }
}