本文整理汇总了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 " ";
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;
}
}
示例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>";