當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Toolbox::commonCheckForUseGLPI方法代碼示例

本文整理匯總了PHP中Toolbox::commonCheckForUseGLPI方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbox::commonCheckForUseGLPI方法的具體用法?PHP Toolbox::commonCheckForUseGLPI怎麽用?PHP Toolbox::commonCheckForUseGLPI使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Toolbox的用法示例。


在下文中一共展示了Toolbox::commonCheckForUseGLPI方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: step1

function step1($update)
{
    global $CFG_GLPI;
    $error = 0;
    echo "<h3>" . __s('Checking of the compatibility of your environment with the execution of GLPI') . "</h3>";
    echo "<table class='tab_check'>";
    $error = Toolbox::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=\"" . __('Continue') . "\">";
            echo "</p>";
            Html::closeForm();
            break;
        case 1:
            echo "<h3>" . __('Do you want to continue?') . "</h3>";
            echo "<div class='submit'><form action='install.php' method='post' class='inline'>";
            echo "<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=\"" . __('Continue') . "\">";
            Html::closeForm();
            echo "&nbsp;&nbsp;";
            echo "<form action='install.php' method='post' class='inline'>";
            echo "<input type='hidden' name='update' value='" . $update . "'>";
            echo "<input type='hidden' name='language' value='" . $_SESSION['glpilanguage'] . "'>";
            echo "<input type='hidden' name='install' value='Etape_0'>";
            echo "<input type='submit' name='submit' class='submit' value=\"" . __('Try again') . "\">";
            Html::closeForm();
            echo "</div>";
            break;
        case 2:
            echo "<h3>" . __('Do you want to continue?') . "</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=\"" . __('Try again') . "\">";
            echo "</p>";
            Html::closeForm();
            break;
    }
}
開發者ID:paisdelconocimiento,項目名稱:glpi-smartcities,代碼行數:46,代碼來源:install.php

示例2: _e

             Html::nullFooter();
         }
         exit;
     }
 }
 // Check version
 if ((!isset($CFG_GLPI["version"]) || trim($CFG_GLPI["version"]) != GLPI_VERSION) && !isset($_GET["donotcheckversion"])) {
     Session::loadLanguage();
     if (isCommandLine()) {
         _e('The version of the database is not compatible with the version of the installed files. An update is necessary.');
         echo "\n";
     } else {
         Html::nullHeader("UPDATE NEEDED", $CFG_GLPI["root_doc"]);
         echo "<div class='center'>";
         echo "<table class='tab_cadre'>";
         $error = Toolbox::commonCheckForUseGLPI();
         echo "</table><br>";
         if ($error) {
             echo "<form action='" . $CFG_GLPI["root_doc"] . "/index.php' method='post'>";
             echo "<input type='submit' name='submit' class='submit' value=\"" . __s('Try again') . "\">";
             Html::closeForm();
         }
         if ($error < 2) {
             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'>" . __('The version of the database is not compatible with the version of the installed files. An update is necessary.') . "</p>";
                 echo "<input type='submit' name='from_update' value=\"" . _sx('button', 'Upgrade') . "\"\n                      class='submit'>";
                 Html::closeForm();
             } else {
                 if (trim($CFG_GLPI["version"]) > GLPI_VERSION) {
                     echo "<p class='red'>" . __('You are trying to use GLPI with outdated files compared to the version of the database. Please install the correct GLPI files corresponding to the version of your database.') . "</p>";
開發者ID:jose-martins,項目名稱:glpi,代碼行數:31,代碼來源:config.php


注:本文中的Toolbox::commonCheckForUseGLPI方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。