35 foreach(
$_GET as $k => $v)
39 $_GET[$k] = str_replace(array(
"\x00",
"\n",
"\r",
"\\",
"'",
'"',
"\x1a"),
"", $v);
54 $this->return_before_auth = $a_flag;
66 require_once(
"include/inc.get_pear.php");
67 require_once(
"include/inc.check_pear.php");
70 require_once
"./Services/Utilities/classes/class.ilUtil.php";
71 require_once
"classes/class.ilBenchmark.php";
77 $ilBench->start(
"Core",
"ElapsedTimeUntilFooter");
80 $ilBench->start(
"Core",
"HeaderInclude");
85 $ilBench->start(
"Core",
"HeaderInclude_IncludeFiles");
88 require_once
"PEAR.php";
90 require_once
"Auth/Auth.php";
105 @include_once
"HTML/Template/ITX.php";
106 if (class_exists(
"HTML_Template_ITX"))
108 include_once
"classes/class.ilTemplateHTMLITX.php";
112 include_once
"HTML/ITX.php";
113 include_once
"classes/class.ilTemplateITX.php";
116 require_once
"classes/class.ilTemplate.php";
119 require_once
"include/inc.db_session_handler.php";
120 require_once
"./Services/Database/classes/class.ilDB.php";
121 require_once
"./Services/AuthShibboleth/classes/class.ilShibboleth.php";
122 require_once
"classes/class.ilias.php";
123 require_once
'./Services/User/classes/class.ilObjUser.php';
124 require_once
"classes/class.ilFormat.php";
125 require_once
"./Services/Calendar/classes/class.ilDatePresentation.php";
126 require_once
"classes/class.ilSaxParser.php";
127 require_once
"./Services/Object/classes/class.ilObjectDefinition.php";
128 require_once
"./Services/Style/classes/class.ilStyleDefinition.php";
129 require_once
"./Services/Tree/classes/class.ilTree.php";
130 require_once
"./Services/Language/classes/class.ilLanguage.php";
131 require_once
"./Services/Logging/classes/class.ilLog.php";
132 require_once
"Services/Mail/classes/class.ilMailbox.php";
133 require_once
"classes/class.ilCtrl2.php";
134 require_once
"classes/class.ilConditionHandler.php";
135 require_once
"classes/class.ilBrowser.php";
136 require_once
"classes/class.ilFrameTargetInfo.php";
137 require_once
"Services/Navigation/classes/class.ilNavigationHistory.php";
138 require_once
"Services/Help/classes/class.ilHelp.php";
139 require_once
"include/inc.ilias_version.php";
142 require_once
"./Services/AccessControl/classes/class.ilAccessHandler.php";
143 require_once
"./Services/AccessControl/classes/class.ilRbacAdmin.php";
144 require_once
"./Services/AccessControl/classes/class.ilRbacSystem.php";
145 require_once
"./Services/AccessControl/classes/class.ilRbacReview.php";
148 require_once
"classes/class.ilObjectDataCache.php";
149 require_once
'Services/Tracking/classes/class.ilOnlineTracking.php';
152 require_once
"./Services/Locator/classes/class.ilLocatorGUI.php";
155 require_once
"classes/class.ilErrorHandling.php";
157 $ilBench->stop(
"Core",
"HeaderInclude_IncludeFiles");
168 if (version_compare(PHP_VERSION,
'5',
'>='))
172 require_once(
"include/inc.xml5compliance.php");
174 require_once(
"include/inc.xsl5compliance.php");
175 require_once(
"include/inc.php4compliance.php");
179 require_once(
"include/inc.php5compliance.php");
195 require_once(
"classes/class.ilIniFile.php");
196 $ilIliasIniFile =
new ilIniFile(
"./ilias.ini.php");
198 $ilIliasIniFile->read();
201 define(
"ILIAS_DATA_DIR",$ilIliasIniFile->readVariable(
"clients",
"datadir"));
202 define(
"ILIAS_WEB_DIR",$ilIliasIniFile->readVariable(
"clients",
"path"));
203 define(
"ILIAS_ABSOLUTE_PATH",$ilIliasIniFile->readVariable(
'server',
'absolute_path'));
206 define (
"ILIAS_LOG_DIR",$ilIliasIniFile->readVariable(
"log",
"path"));
207 define (
"ILIAS_LOG_FILE",$ilIliasIniFile->readVariable(
"log",
"file"));
208 define (
"ILIAS_LOG_ENABLED",$ilIliasIniFile->readVariable(
"log",
"enabled"));
209 define (
"ILIAS_LOG_LEVEL",$ilIliasIniFile->readVariable(
"log",
"level"));
212 define (
"PATH_TO_CONVERT",$ilIliasIniFile->readVariable(
"tools",
"convert"));
213 define (
"PATH_TO_ZIP",$ilIliasIniFile->readVariable(
"tools",
"zip"));
214 define (
"PATH_TO_MKISOFS",$ilIliasIniFile->readVariable(
"tools",
"mkisofs"));
215 define (
"PATH_TO_UNZIP",$ilIliasIniFile->readVariable(
"tools",
"unzip"));
216 define (
"PATH_TO_JAVA",$ilIliasIniFile->readVariable(
"tools",
"java"));
217 define (
"PATH_TO_HTMLDOC",$ilIliasIniFile->readVariable(
"tools",
"htmldoc"));
218 define (
"URL_TO_LATEX",$ilIliasIniFile->readVariable(
"tools",
"latex"));
219 define (
"PATH_TO_FOP",$ilIliasIniFile->readVariable(
"tools",
"fop"));
222 switch ($ilIliasIniFile->readVariable(
"tools",
"vscantype"))
225 define(
"IL_VIRUS_SCANNER",
"Sophos");
226 define(
"IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"scancommand"));
227 define(
"IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
231 define(
"IL_VIRUS_SCANNER",
"AntiVir");
232 define(
"IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"scancommand"));
233 define(
"IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
237 define(
"IL_VIRUS_SCANNER",
"ClamAV");
238 define(
"IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"scancommand"));
239 define(
"IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
243 define(
"IL_VIRUS_SCANNER",
"None");
247 $tz = $ilIliasIniFile->readVariable(
"server",
"timezone");
250 if (function_exists(
'date_default_timezone_set'))
252 date_default_timezone_set($tz);
255 define (
"IL_TIMEZONE", $ilIliasIniFile->readVariable(
"server",
"timezone"));
268 include_once
'classes/class.ilHTTPS.php';
271 if($https->isDetected())
273 $protocol =
'https://';
277 $protocol =
'http://';
279 $host = $_SERVER[
'HTTP_HOST'];
281 $rq_uri = $_SERVER[
'REQUEST_URI'];
285 if (is_int(
$pos = strpos($rq_uri,
"?")))
287 $rq_uri = substr($rq_uri, 0,
$pos);
290 if(!defined(
'ILIAS_MODULE'))
292 $path = pathinfo($rq_uri);
293 if(!
$path[
'extension'])
299 $uri = dirname($rq_uri);
305 $path = dirname($rq_uri);
311 $dirs = explode(
'/',$module);
315 $uri = dirname($uri);
332 if (!is_object($ilIliasIniFile))
334 die (
"Fatal Error: ilInitialisation::determineClient called without initialisation of ILIAS ini file object.");
338 if (
$_GET[
"client_id"] !=
"")
340 if (!defined(
"IL_PHPUNIT_TEST"))
348 $client_id = $ilIliasIniFile->readVariable(
"clients",
"default");
353 if (!defined(
"IL_PHPUNIT_TEST"))
355 define (
"CLIENT_ID",
$_COOKIE[
"ilClientId"]);
359 define (
"CLIENT_ID",
$_GET[
"client_id"]);
377 global $ilClientIniFile;
382 die (
"Fatal Error: ilInitialisation::initClientIniFile called without ILIAS_WEB_DIR.");
388 die (
"Fatal Error: ilInitialisation::initClientIniFile called without CLIENT_ID.");
391 $ini_file =
"./".ILIAS_WEB_DIR.
"/".CLIENT_ID.
"/client.ini.php";
394 require_once(
"classes/class.ilIniFile.php");
395 $ilClientIniFile =
new ilIniFile($ini_file);
396 $GLOBALS[
'ilClientIniFile'] =& $ilClientIniFile;
397 $ilClientIniFile->read();
400 if ($ilClientIniFile->ERROR !=
"")
406 define (
"SESSION_REMINDER_LEADTIME", 30);
407 define (
"DEBUG",$ilClientIniFile->readVariable(
"system",
"DEBUG"));
408 define (
"DEVMODE",$ilClientIniFile->readVariable(
"system",
"DEVMODE"));
409 define (
"SHOWNOTICES",$ilClientIniFile->readVariable(
"system",
"SHOWNOTICES"));
410 define (
"ROOT_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'ROOT_FOLDER_ID'));
411 define (
"SYSTEM_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'SYSTEM_FOLDER_ID'));
412 define (
"ROLE_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'ROLE_FOLDER_ID'));
413 define (
"MAIL_SETTINGS_ID",$ilClientIniFile->readVariable(
'system',
'MAIL_SETTINGS_ID'));
415 define (
"SYSTEM_MAIL_ADDRESS",$ilClientIniFile->readVariable(
'system',
'MAIL_SENT_ADDRESS'));
416 define (
"MAIL_REPLY_WARNING",$ilClientIniFile->readVariable(
'system',
'MAIL_REPLY_WARNING'));
418 define (
"MAXLENGTH_OBJ_TITLE",125);#$ilClientIniFile->readVariable(
'system',
'MAXLENGTH_OBJ_TITLE'));
419 define (
"MAXLENGTH_OBJ_DESC",$ilClientIniFile->readVariable(
'system',
'MAXLENGTH_OBJ_DESC'));
421 define (
"CLIENT_DATA_DIR",ILIAS_DATA_DIR.
"/".CLIENT_ID);
423 define (
"CLIENT_NAME",$ilClientIniFile->readVariable(
'client',
'name'));
425 $val = $ilClientIniFile->readVariable(
"db",
"type");
428 define (
"IL_DB_TYPE",
"mysql");
432 define (
"IL_DB_TYPE", $val);
442 global $ilClientIniFile;
444 if (!$ilClientIniFile->readVariable(
"client",
"access"))
446 if (is_file(
"./maintenance.html"))
453 die(
'<br /><p style="text-align:center;">The server is not '.
454 'available due to maintenance. We apologise for any inconvenience.</p>');
465 global
$ilDB, $ilClientIniFile;
468 require_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
470 $ilDB->initFromIniFile();
481 global $ilAppEventHandler;
484 require_once(
"./Services/EventHandling/classes/class.ilAppEventHandler.php");
486 $GLOBALS[
'ilAppEventHandler'] =& $ilAppEventHandler;
497 if(ini_get(
'session.save_handler') !=
'user')
499 ini_set(
"session.save_handler",
"user");
503 die(
"Please turn off Safe mode OR set session.save_handler to \"user\" in your php.ini");
512 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
520 $cookie_path =
$GLOBALS[
'COOKIE_PATH'];
524 $cookie_path = dirname( $_SERVER[
'PHP_SELF'] );
532 $cookie_path .= (!preg_match(
"/[\/|\\\\]$/", $cookie_path)) ?
"/" :
"";
534 if($cookie_path ==
"\\") $cookie_path =
'/';
536 $cookie_domain = $_SERVER[
'SERVER_NAME'];
538 define(
'IL_COOKIE_EXPIRE',0);
539 define(
'IL_COOKIE_PATH',$cookie_path);
540 define(
'IL_COOKIE_DOMAIN',
'');
541 define(
'IL_COOKIE_SECURE',
false);
545 if( version_compare(PHP_VERSION,
'5.2.0',
'>=') )
548 define(
'IL_COOKIE_HTTPONLY',
false);
549 session_set_cookie_params(
550 IL_COOKIE_EXPIRE,
IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE, IL_COOKIE_HTTPONLY
556 session_set_cookie_params(
557 IL_COOKIE_EXPIRE,
IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE
569 require_once(
"Services/Administration/classes/class.ilSetting.php");
574 define (
"ANONYMOUS_USER_ID", $ilSetting->get(
"anonymous_user_id"));
575 define (
"ANONYMOUS_ROLE_ID", $ilSetting->get(
"anonymous_role_id"));
576 define (
"SYSTEM_USER_ID", $ilSetting->get(
"system_user_id"));
577 define (
"SYSTEM_ROLE_ID", $ilSetting->get(
"system_role_id"));
578 define (
"USER_FOLDER_ID", 7);
581 define (
"RECOVERY_FOLDER_ID", $ilSetting->get(
"recovery_folder_id"));
584 define (
"IL_INST_ID", $ilSetting->get(
"inst_id",0));
587 define (
"SUFFIX_REPL_DEFAULT",
"php,php3,php4,inc,lang,phtml,htaccess");
588 define (
"SUFFIX_REPL_ADDITIONAL", $ilSetting->get(
"suffix_repl_additional"));
593 require_once(
'Services/Payment/classes/class.ilGeneralSettings.php');
603 $this->script = substr(strrchr($_SERVER[
"PHP_SELF"],
"/"),1);
604 $dirname = dirname($_SERVER[
"PHP_SELF"]);
605 $ilurl = @parse_url(ILIAS_HTTP_PATH);
608 $ilurl[
"path"] =
"/";
610 $subdir = substr(strstr($dirname,$ilurl[
"path"]),strlen($ilurl[
"path"]));
615 $num_subdirs = substr_count($subdir,
"/");
617 for ($i=1;$i<=$num_subdirs;$i++)
622 $this->updir = $updir;
633 $ilBench->start(
"Core",
"HeaderInclude_getStyleDefinitions");
635 $GLOBALS[
'styleDefinition'] =& $styleDefinition;
636 $styleDefinition->startParsing();
637 $ilBench->stop(
"Core",
"HeaderInclude_getStyleDefinitions");
646 global $styleDefinition;
648 if (isset(
$_GET[
'skin']) && isset(
$_GET[
'style']))
650 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
651 if ($styleDefinition->styleExists(
$_GET[
'skin'],
$_GET[
'style']) &&
660 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
664 $ilias->account->skin =
$_SESSION[
'skin'];
665 $ilias->account->prefs[
'style'] =
$_SESSION[
'style'];
672 global $ilUser,
$ilLog, $ilAuth;
676 $uid = $ilUser->checkUserId();
680 $ilUser->setId($uid);
684 #$rbacreview = new ilRbacReview();
685 #$GLOBALS['rbacreview'] =& $rbacreview;
686 #$_SESSION["RoleId"] = $rbacreview->assignedRoles($_SESSION["AccountId"]);
704 if (trim($ilSetting->get(
"locale") !=
""))
706 $larr = explode(
",", trim($ilSetting->get(
"locale")));
709 foreach ($larr as
$l)
718 setlocale(LC_ALL, $ls);
719 if (class_exists(
"Collator"))
721 $GLOBALS[
"ilCollator"] =
new Collator($first);
730 global $ilUser,
$ilLog, $ilAuth, $ilias;
733 $clientip = $ilUser->getClientIP();
734 if (trim($clientip) !=
"")
736 $clientip = preg_replace(
"/[^0-9.?*,:]+/",
"",$clientip);
737 $clientip = str_replace(
".",
"\\.",$clientip);
738 $clientip = str_replace(Array(
"?",
"*",
","), Array(
"[0-9]",
"[0-9]*",
"|"), $clientip);
739 if (!preg_match(
"/^".$clientip.
"$/", $_SERVER[
"REMOTE_ADDR"]))
742 $ilias->account->getLogin().
":".$_SERVER[
"REMOTE_ADDR"].
":".$message);
753 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
754 global $ilUser,
$ilLog, $ilAuth, $styleDefinition, $rbacreview, $ilias;
757 $exam_user_agent = $security->getExamUserAgent();
758 $exam_role_id = $security->getExamRoleId();
759 $exam_skin = $security->getExamSkin();
760 $user_agent = $_SERVER[
'HTTP_USER_AGENT'];
761 $is_user = $rbacreview->isAssigned($ilUser->getId(),$exam_role_id);
762 if ($exam_user_agent !=
"" && $is_user) {
763 if (preg_match(
"/" . $exam_user_agent .
"/",$user_agent))
765 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
766 if ($styleDefinition->styleExists($exam_skin, $exam_skin) &&
769 $ilUser->prefs[
'skin'] = $exam_skin;
770 $ilUser->prefs[
'style'] = $exam_skin;
771 $ilUser->skin = $exam_skin;
773 define (
'KIOSK_MODE',
true);
777 $ilLog ->logError(1,$ilias->account->getLogin().
":".$_SERVER[
"REMOTE_ADDR"].
":kiosk_mode_failure");
784 define (
'KIOSK_MODE',
false);
790 global $ilUser, $ilAuth;
793 $in_user_agreement =
false;
794 if (strtolower(
$_GET[
"cmdClass"]) ==
"ilstartupgui" &&
795 (strtolower(
$_GET[
"cmd"]) ==
"getacceptance" ||
796 (is_array(
$_POST[
"cmd"]) &&
797 key(
$_POST[
"cmd"]) ==
"getAcceptance")))
799 $in_user_agreement =
true;
804 if (!$ilUser->hasAcceptedUserAgreement() &&
805 $ilAuth->getAuth() &&
806 !$in_user_agreement &&
807 $ilUser->getId() != ANONYMOUS_USER_ID &&
808 $ilUser->checkTimeLimit())
810 if($ilAuth->supportsRedirects())
812 ilUtil::redirect(
"ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&target=".
$_GET[
"target"].
"&cmd=getAcceptance");
833 $_POST[
"username"] =
"anonymous";
834 $_POST[
"password"] =
"anonymous";
837 $oldSid = session_id();
841 $newSid = session_id();
842 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
843 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
845 if (ANONYMOUS_USER_ID ==
"")
847 die (
"Public Section enabled, but no Anonymous user found.");
849 if (!$ilAuth->getAuth())
851 die(
"ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID.
" not found!");
855 if (
$_GET[
"target"] !=
"")
860 include_once(
"Services/Init/classes/class.ilStartUpGUI.php");
874 #ilUtil::redirect(ILIAS_HTTP_PATH.
875 # "/goto.php?target=".$_GET["target"].$survey_parameter);
883 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
885 $_GET[
"cmd"] =
"frameset";
886 $jump_script =
"repository.php";
888 $script = $this->updir.$jump_script.
"?reloadpublic=1&cmd=".
$_GET[
"cmd"].
"&ref_id=".
$_GET[
"ref_id"];
892 echo
"<script language=\"Javascript\">\ntop.location.href = \"".$script.
"\";\n</script>\n".
893 'Please click <a href="'.$script.
'">here</a> if you are not redirected automatically.';
909 if (
$_GET[
"soap_pw"] !=
"")
911 $add =
"&soap_pw=".$_GET[
"soap_pw"].
"&ext_uid=".
$_GET[
"ext_uid"];
914 $script = $this->updir.
"login.php?target=".
$_GET[
"target"].
"&client_id=".
$_COOKIE[
"ilClientId"].
915 "&auth_stat=".$a_auth_stat.$add;
923 if (is_int(strpos($PHP_SELF,
"goto.php")) &&
$_GET[
"soap_pw"] ==
"" &&
924 $_GET[
"reloadpublic"] !=
"1")
926 $script = $this->updir.
"goto.php?target=".
$_GET[
"target"].
"&client_id=".CLIENT_ID.
930 echo
"<script language=\"Javascript\">\ntop.location.href = \"".$script.
"\";\n</script>\n".
931 'Please click <a href="'.$script.
'">here</a> if you are not redirected automatically.';
945 $ilBench->start(
"Core",
"HeaderInclude_initLanguage");
955 if (is_object($ilUser))
957 $_GET[
"lang"] = $ilUser->getPref(
"language");
962 if (isset(
$_POST[
'change_lang_to']) &&
$_POST[
'change_lang_to'] !=
"")
971 if (is_object($ilUser) && $ilUser->getId() != ANONYMOUS_USER_ID && $ilUser->getId() > 0)
973 $_SESSION[
'lang'] = $ilUser->getPref(
"language");
978 if (!in_array(
$_SESSION[
'lang'], $langs))
980 if (is_object($ilSetting) && $ilSetting->get(
"language") !=
"")
982 $_SESSION[
'lang'] = $ilSetting->get(
"language");
993 $ilBench->stop(
"Core",
"HeaderInclude_initLanguage");
997 if(is_object($rbacsystem))
999 $rbacsystem->initMemberView();
1009 global
$ilBench, $rbacsystem, $rbacadmin, $rbacreview;
1011 $ilBench->start(
"Core",
"HeaderInclude_initRBAC");
1013 $GLOBALS[
'rbacreview'] =& $rbacreview;
1016 $GLOBALS[
'rbacsystem'] =& $rbacsystem;
1019 $GLOBALS[
'rbacadmin'] =& $rbacadmin;
1023 $ilBench->stop(
"Core",
"HeaderInclude_initRBAC");
1031 function initILIAS($context =
"web")
1036 $ilTabs, $ilMainMenu, $rbacsystem, $ilNavigationHistory;
1043 if (version_compare(PHP_VERSION,
'5.3.0',
'>='))
1045 error_reporting((ini_get(
"error_reporting") & ~E_NOTICE) & ~E_DEPRECATED);
1049 error_reporting(ini_get(
'error_reporting') & ~E_NOTICE);
1058 $ilBench->start(
"Core",
"HeaderInclude_GetErrorHandler");
1062 $ilBench->stop(
"Core",
"HeaderInclude_GetErrorHandler");
1084 ilUtil::setCookie(
"ilClientId", $ilIliasIniFile->readVariable(
"clients",
"default"));
1085 if (CLIENT_ID !=
"" && CLIENT_ID != $ilIliasIniFile->readVariable(
"clients",
"default"))
1087 ilUtil::redirect(
"index.php?client_id=".$ilIliasIniFile->readVariable(
"clients",
"default"));
1091 echo (
"Client $c does not exist. ".
'Please <a href="./index.php">click here</a> to return to the default client.');
1098 if (DEVMODE && SHOWNOTICES)
1101 if (version_compare(PHP_VERSION,
'5.3.0',
'>='))
1103 error_reporting(E_ALL);
1107 error_reporting(E_ALL);
1114 && isset(
$_GET[
'username']) && strlen(
$_GET[
'username'])
1115 && isset(
$_GET[
'password']) && strlen(
$_GET[
'password'])
1128 include_once(
"./Services/Component/classes/class.ilPluginAdmin.php");
1130 $GLOBALS[
'ilPluginAdmin'] = $ilPluginAdmin;
1143 require_once
'./classes/class.ilHTTPS.php';
1146 $https->enableSecureCookies();
1147 $https->checkPort();
1155 include_once(
"./Services/Authentication/classes/class.ilAuthUtils.php");
1168 session_regenerate_id();
1173 $ilBench->start(
"Core",
"HeaderInclude_GetILIASObject");
1174 $ilias =
new ILIAS();
1176 $ilBench->stop(
"Core",
"HeaderInclude_GetILIASObject");
1181 if (function_exists(
"xdebug_start_trace"))
1189 $GLOBALS[
'ilObjDataCache'] =& $ilObjDataCache;
1199 require_once
"include/inc.debug.php";
1203 $ilBench->start(
"Core",
"HeaderInclude_getObjectDefinitions");
1205 $GLOBALS[
'objDefinition'] =& $objDefinition;
1207 $ilBench->stop(
"Core",
"HeaderInclude_getObjectDefinitions");
1210 $tree =
new ilTree(ROOT_FOLDER_ID);
1218 $ilBench->start(
"Core",
"HeaderInclude_Authentication");
1224 if (!defined(
"IL_PHPUNIT_TEST"))
1226 $oldSid = session_id();
1230 $newSid = session_id();
1231 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1232 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
1237 $ilias->setAuthError($ilErr->getLastError());
1238 $ilBench->stop(
"Core",
"HeaderInclude_Authentication");
1241 if ((isset(
$_GET[
"cmd"]) &&
$_GET[
"cmd"] ==
"force_login") || $this->script ==
"login.php")
1244 if(!isset(
$_GET[
'forceShoppingCartRedirect']))
1248 $ilias->setAuthError($ilErr->getLastError());
1252 if (!$ilias->getSetting(
"setup_ok"))
1254 die(
"Setup is not completed. Please run setup routine again.");
1258 $ilBench->start(
"Core",
"HeaderInclude_getCurrentUser");
1260 $ilias->account =& $ilUser;
1262 $ilBench->stop(
"Core",
"HeaderInclude_getCurrentUser");
1273 if (in_array($this->script,
1274 array(
"login.php",
"register.php",
"view_usr_agreement.php"))
1275 ||
$_GET[
"baseClass"] ==
"ilStartUpGUI")
1287 if (AUTH_CURRENT ==
AUTH_LOCAL && !$ilAuth->getAuth() && $this->script ==
"login.php" &&
$_POST[
"username"] !=
"")
1296 $ilias->setAuthError($ilErr->getLastError());
1312 #if (($ilAuth->getAuth() && $ilias->account->isCurrentUserActive()) ||
1313 # (defined("IL_PHPUNIT_TEST") && DEVMODE))
1315 if($ilAuth->getStatus() ==
'' &&
1316 $ilias->account->isCurrentUserActive() ||
1317 (defined(
"IL_PHPUNIT_TEST") && DEVMODE))
1320 $ilBench->start(
"Core",
"HeaderInclude_getCurrentUserAccountData");
1333 if ($this->script ==
"login.php" ||
1334 $_GET[
"baseClass"] ==
"ilStartUpGUI")
1340 require_once(
'Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1342 if( $security_settings->isPasswordChangeOnFirstLoginEnabled() &&
1343 null == $ilUser->getLastLogin() )
1345 $ilUser->resetLastPasswordChange();
1348 $ilUser->refreshLogin();
1352 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1354 if( $security_settings->getAccountSecurityMode() ==
1362 $_GET[
'limit'] =
$_SESSION[
'tbl_limit'] = (int) $ilUser->getPref(
'hits_per_page');
1370 if (isset(
$_GET[
'offset']) &&
$_GET[
'offset'] !=
"")
1375 $ilBench->stop(
"Core",
"HeaderInclude_getCurrentUserAccountData");
1378 $this->script !=
"login.php"
1379 and $this->script !=
"shib_login.php"
1380 and $this->script !=
"shib_logout.php"
1381 and $this->script !=
"error.php"
1382 and $this->script !=
"index.php"
1383 and $this->script !=
"view_usr_agreement.php"
1384 and $this->script !=
"register.php"
1385 and $this->script !=
"pwassist.php"
1386 and $this->script !=
"confirmReg.php"
1391 if ($ilAuth->getAuth() && !$ilUser->isCurrentUserActive())
1400 if (
$_GET[
"baseClass"] !=
"ilStartUpGUI")
1406 if(!$ilAuth->supportsRedirects())
1411 if ($ilSetting->get(
"pub_section") &&
1412 ($ilAuth->getStatus() ==
"" ||
1415 $_GET[
"reloadpublic"] !=
"1")
1421 if ($context ==
"web")
1424 $this->
goToLogin((
$_GET[
'auth_stat'] && !$ilAuth->getStatus()) ?
$_GET[
'auth_stat'] : $ilAuth->getStatus());
1438 else if(!$ilAuth->getAuth())
1440 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1443 if( $security->getAccountSecurityMode() ==
1446 if(isset(
$_POST[
'username']) &&
$_POST[
'username'] && $ilUser->getId() == 0)
1451 if(
$usr_id != ANONYMOUS_USER_ID )
1456 $max_attempts = $security->getLoginMaxAttempts();
1458 if( $login_attempts >= $max_attempts &&
1485 if ( !isset(
$_SESSION[
"locator_level"]) )
1493 $GLOBALS[
'ilias_locator'] =& $ilias_locator;
1494 $GLOBALS[
'ilLocator'] =& $ilLocator;
1497 $ilBench->start(
"Core",
"HeaderInclude_getStyleDefinitions");
1499 $GLOBALS[
'styleDefinition'] =& $styleDefinition;
1500 $styleDefinition->startParsing();
1501 $ilBench->stop(
"Core",
"HeaderInclude_getStyleDefinitions");
1508 $tpl->setVariable(
"LOCATION_STYLESHEET",$location_stylesheet);
1512 $GLOBALS[
'ilNavigationHistory'] =& $ilNavigationHistory;
1518 $GLOBALS[
'ilBrowser'] =& $ilBrowser;
1525 include_once
'classes/class.ilTabsGUI.php';
1530 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
1535 $GLOBALS[
'ilToolbar'] =& $ilToolbar;
1538 include_once
'./Services/MainMenu/classes/class.ilMainMenuGUI.php';
1540 $GLOBALS[
'ilMainMenu'] =& $ilMainMenu;
1546 include_once(
'./Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php');
1548 $scheduler->start();
1550 $ilBench->stop(
"Core",
"HeaderInclude");
1563 $ilTabs, $ilMainMenu, $rbacsystem, $ilNavigationHistory;
1576 $ilBench->start(
"Core",
"HeaderInclude_GetErrorHandler");
1580 $ilBench->stop(
"Core",
"HeaderInclude_GetErrorHandler");
1595 ilUtil::setCookie(
"ilClientId", $ilIliasIniFile->readVariable(
"clients",
"default"));
1596 echo (
"Client $c does not exist. Please reload this page to return to the default client.");
1607 include_once(
"./Services/Component/classes/class.ilPluginAdmin.php");
1609 $GLOBALS[
'ilPluginAdmin'] = $ilPluginAdmin;
1613 $GLOBALS[
'ilObjDataCache'] =& $ilObjDataCache;
1619 $tree =
new ilTree(ROOT_FOLDER_ID);
1623 $lng =
new ilLanguage($ilClientIniFile->readVariable(
"language",
"default"));
1630 $log =
new ilLog(ILIAS_LOG_DIR,ILIAS_LOG_FILE,CLIENT_ID,ILIAS_LOG_ENABLED,ILIAS_LOG_LEVEL);
1638 $ilBench->start(
"Core",
"HeaderInclude_GetILIASObject");
1639 $ilias =
new ILIAS();
1641 $ilBench->stop(
"Core",
"HeaderInclude_GetILIASObject");