コード例 #1
0
ファイル: config.php プロジェクト: ryukansent/Thesis-SideB
along with GLPI; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
--------------------------------------------------------------------------
*/
// ----------------------------------------------------------------------
// Original Author of file:
// Purpose of file:
// ----------------------------------------------------------------------
if (!defined('GLPI_ROOT')) {
    die("Sorry. You can't access directly to this file");
}
include_once GLPI_ROOT . "/config/based_config.php";
include_once GLPI_ROOT . "/inc/dbconnection.class.php";
include GLPI_ROOT . "/config/define.php";
setGlpiSessionPath();
startGlpiSession();
if (!file_exists(GLPI_CONFIG_DIR . "/config_db.php")) {
    nullHeader("DB Error", $CFG_GLPI["root_doc"]);
    if (!isCommandLine()) {
        echo "<div class='center'>";
        echo "<p>Error : GLPI seems to not be installed properly.</p>";
        echo "<p> config_db.php file is missing.</p>";
        echo "<p>Please restart the install process.</p>";
        echo "<p><a class='red' href='" . GLPI_ROOT . "'>Click here to proceed</a></p>";
        echo "</div>";
    } else {
        echo "Error : GLPI seems to not be installed properly.\n";
        echo "config_db.php file is missing.\n";
        echo "Please restart the install process.\n";
    }
    nullFooter();
コード例 #2
0
 /**
  * Destroy the current session
  *
  * @return nothing
  **/
 function destroySession()
 {
     startGlpiSession();
     // Unset all of the session variables.
     session_unset();
     // destroy may cause problems (no login / back to login page)
     $_SESSION = array();
     // write_close may cause troubles (no login / back to login page)
 }