ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
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 if (version_compare(PHP_VERSION, '5.3.0', '>='))
34 {
35  error_reporting((ini_get("error_reporting") & ~E_NOTICE) & ~E_DEPRECATED);
36 }
37 else
38 {
39  error_reporting(ini_get('error_reporting') & ~E_NOTICE);
40 }
41 
42 define("DEBUG",false);
43 set_include_path("./Services/PEAR/lib".PATH_SEPARATOR.ini_get('include_path'));
44 require_once "./include/inc.check_pear.php";
45 
46 //include files from PEAR
47 require_once "PEAR.php";
48 
49 // wrapper for php 4.3.2 & higher
50 
51 @include_once "HTML/Template/ITX.php"; // new implementation
52 if (class_exists("HTML_Template_ITX"))
53 {
54  include_once "./classes/class.ilTemplateHTMLITX.php";
55 }
56 else
57 {
58  include_once "HTML/ITX.php"; // old implementation
59  include_once "./classes/class.ilTemplateITX.php";
60 }
61 require_once "./setup/classes/class.ilTemplate.php"; // modified class. needs to be merged with base template class
62 
63 require_once "./setup/classes/class.ilLanguage.php"; // modified class. needs to be merged with base language class
64 require_once "./Services/Logging/classes/class.ilLog.php";
65 require_once "./Services/Utilities/classes/class.ilUtil.php";
66 require_once "./classes/class.ilIniFile.php";
67 require_once "./Services/Database/classes/class.ilDB.php";
68 require_once "./setup/classes/class.ilSetupGUI.php";
69 require_once "./setup/classes/class.Session.php";
70 require_once "./setup/classes/class.ilClientList.php";
71 require_once "./setup/classes/class.ilClient.php";
72 require_once "./classes/class.ilFile.php";
73 require_once "./setup/classes/class.ilCtrlStructureReader.php";
74 require_once "./classes/class.ilSaxParser.php";
75 require_once "./include/inc.ilias_version.php";
76 
77 // include error_handling
78 require_once "./classes/class.ilErrorHandling.php";
79 
81 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK,array($ilErr,'errorHandler'));
82 
83 // set ilias pathes
84 if($_SERVER['HTTPS'] == 'on')
85 {
86  define ("ILIAS_HTTP_PATH",substr("https://".$_SERVER["HTTP_HOST"].dirname($_SERVER["REQUEST_URI"]),0,-6));
87 }
88 else
89 {
90  define ("ILIAS_HTTP_PATH",substr("http://".$_SERVER["HTTP_HOST"].dirname($_SERVER["REQUEST_URI"]),0,-6));
91 }
92 
93 
94 // PHP is running in CGI mode?
95 if (isset($_SERVER["REDIRECT_STATUS"]) && !isset($_SERVER["FCGI_ROLE"]))
96 {
97  define ("ILIAS_ABSOLUTE_PATH",substr(dirname($_SERVER["PATH_TRANSLATED"]),0,-6));
98 }
99 else
100 {
101  define ("ILIAS_ABSOLUTE_PATH",substr(dirname($_SERVER["SCRIPT_FILENAME"]),0,-6));
102 }
103 
104 define ("TPLPATH","./templates/blueshadow");
105 
106 // init session
107 $sess = new Session();
108 
109 $lang = (isset($_GET["lang"])) ? $_GET["lang"] : $_SESSION["lang"];
110 
111 $_SESSION["lang"] = $lang;
112 
113 // init languages
115 
116 // init log
117 $log = new ilLog(ILIAS_ABSOLUTE_PATH,"ilias.log","SETUP",false);
119 
120 // init template - in the main program please use ILIAS Template class
121 // instantiate main template
122 //$tpl = new ilTemplate("./setup/templates");
123 //$tpl->loadTemplatefile("tpl.main.html", true, true);
124 $tpl = new ilTemplate("tpl.main.html", true, true, "setup");
125 
126 // make instance of structure reader
128 $ilCtrlStructureReader->setErrorObject($ilErr);
129 
130 require_once "./classes/class.ilBenchmark.php";
132 $GLOBALS['ilBench'] = $ilBench;
133 
134 include_once("./Services/Database/classes/class.ilDBAnalyzer.php");
135 include_once("./Services/Database/classes/class.ilMySQLAbstraction.php");
136 include_once("./Services/Database/classes/class.ilDBGenerator.php");
137 
138 ?>