ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
inc.setup_header.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
32 // remove notices from error reporting
33 error_reporting((ini_get("error_reporting") & ~E_NOTICE) & ~E_DEPRECATED);
34 
35 define("DEBUG",false);
36 set_include_path("./Services/PEAR/lib".PATH_SEPARATOR.ini_get('include_path'));
37 require_once "./include/inc.check_pear.php";
38 
39 //include files from PEAR
40 require_once "PEAR.php";
41 
42 // wrapper for php 4.3.2 & higher
43 
44 require_once "HTML/Template/ITX.php";
45 require_once "./Services/UICore/classes/class.ilTemplateHTMLITX.php";
46 require_once "./setup/classes/class.ilTemplate.php"; // modified class. needs to be merged with base template class
47 
48 require_once "./setup/classes/class.ilLanguage.php"; // modified class. needs to be merged with base language class
49 require_once "./Services/Logging/classes/class.ilLog.php";
50 require_once "./Services/Authentication/classes/class.ilSession.php";
51 require_once "./Services/Utilities/classes/class.ilUtil.php";
52 require_once "./Services/Init/classes/class.ilIniFile.php";
53 require_once "./Services/Database/classes/class.ilDB.php";
54 require_once "./setup/classes/class.ilSetupGUI.php";
55 require_once "./setup/classes/class.Session.php";
56 require_once "./setup/classes/class.ilClientList.php";
57 require_once "./setup/classes/class.ilClient.php";
58 require_once "./Services/FileSystem/classes/class.ilFile.php";
59 require_once "./setup/classes/class.ilCtrlStructureReader.php";
60 require_once "./Services/Xml/classes/class.ilSaxParser.php";
61 require_once "./include/inc.ilias_version.php";
62 include_once './Services/Logging/classes/public/class.ilLogLevel.php';
63 
64 // include error_handling
65 require_once "./Services/Init/classes/class.ilErrorHandling.php";
66 
68 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK,array($ilErr,'errorHandler'));
69 
70 // set ilias pathes
71 if($_SERVER['HTTPS'] == 'on')
72 {
73  define ("ILIAS_HTTP_PATH",substr("https://".$_SERVER["HTTP_HOST"].dirname($_SERVER["REQUEST_URI"]),0,-6));
74 }
75 else
76 {
77  define ("ILIAS_HTTP_PATH",substr("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["REQUEST_URI"]),0,-6));
78 }
79 
80 
81 // PHP is running in CGI mode?
82 if (isset($_SERVER["REDIRECT_STATUS"]) && !isset($_SERVER["FCGI_ROLE"]))
83 {
84  if ($_SERVER["PATH_TRANSLATED"] != "")
85  {
86  define ("ILIAS_ABSOLUTE_PATH",substr(dirname($_SERVER["PATH_TRANSLATED"]),0,-6));
87  }
88  else
89  {
90  define ("ILIAS_ABSOLUTE_PATH",substr(dirname($_SERVER["SCRIPT_FILENAME"]),0,-6));
91  }
92 }
93 else if ($_SERVER["SCRIPT_FILENAME"] != "")
94 {
95  define ("ILIAS_ABSOLUTE_PATH",substr(dirname($_SERVER["SCRIPT_FILENAME"]),0,-6));
96 }
97 else
98 {
99  // included this due to http://education2news.blogspot.com.es/2012/06/installing-ilias-424.html
100  define ('ILIAS_ABSOLUTE_PATH',str_replace("/setup/include", "", dirname(__FILE__)));
101 }
102 
103 // set default timezone
104 include_once './Services/Calendar/classes/class.ilTimeZone.php';
105 include_once './Services/Init/classes/class.ilIniFile.php';
106 $ini = new ilIniFile(ILIAS_ABSOLUTE_PATH.'/ilias.ini.php');
107 $ini->read();
109 define('IL_TIMEZONE',$tz);
110 
111 define ("TPLPATH","./templates/blueshadow");
112 
113 // init session
114 $sess = new Session();
115 
116 $lang = (isset($_GET["lang"])) ? $_GET["lang"] : $_SESSION["lang"];
117 
118 $_SESSION["lang"] = $lang;
119 
120 // init languages
122 
123 
124 
125 
126 
127 
128 
129 include_once './Services/Logging/classes/class.ilLoggingSetupSettings.php';
131 $logging_settings->init();
132 
133 include_once './Services/Logging/classes/public/class.ilLoggerFactory.php';
134 
135 $log = ilLoggerFactory::newInstance($logging_settings)->getComponentLogger('setup');
137 
138 // init template - in the main program please use ILIAS Template class
139 // instantiate main template
140 //$tpl = new ilTemplate("./setup/templates");
141 //$tpl->loadTemplatefile("tpl.main.html", true, true);
142 $tpl = new ilTemplate("tpl.main.html", true, true, "setup");
143 
144 // make instance of structure reader
146 $ilCtrlStructureReader->setErrorObject($ilErr);
147 
148 require_once "./Services/Utilities/classes/class.ilBenchmark.php";
150 $GLOBALS['ilBench'] = $ilBench;
151 
152 include_once("./Services/Database/classes/class.ilDBAnalyzer.php");
153 include_once("./Services/Database/classes/class.ilMySQLAbstraction.php");
154 include_once("./Services/Database/classes/class.ilDBGenerator.php");
155 
156 ?>
$logging_settings
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
$_GET["client_id"]
static newInstance(ilLoggingSettings $settings)
get new instance
$ilCtrlStructureReader
static initDefaultTimeZone(ilIniFile $ini)
Initialize default timezone from system settings.
$_SESSION["lang"]
Class ilCtrlStructureReader.
$GLOBALS['ilBench']
Logger settings for setup.
const ILIAS_ABSOLUTE_PATH
special template class to simplify handling of ITX/PEAR
"Manueller" Session-Fallback mit PHP4
performance measurement class
language handling
INIFile Parser.