当前位置: 首页>>代码示例>>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;未经允许,请勿转载。