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");
196 require_once(
"classes/class.ilIniFile.php");
197 $ilIliasIniFile =
new ilIniFile(
"./ilias.ini.php");
199 $ilIliasIniFile->read();
202 define(
"ILIAS_DATA_DIR",$ilIliasIniFile->readVariable(
"clients",
"datadir"));
203 define(
"ILIAS_WEB_DIR",$ilIliasIniFile->readVariable(
"clients",
"path"));
204 define(
"ILIAS_ABSOLUTE_PATH",$ilIliasIniFile->readVariable(
'server',
'absolute_path'));
207 define (
"ILIAS_LOG_DIR",$ilIliasIniFile->readVariable(
"log",
"path"));
208 define (
"ILIAS_LOG_FILE",$ilIliasIniFile->readVariable(
"log",
"file"));
209 define (
"ILIAS_LOG_ENABLED",$ilIliasIniFile->readVariable(
"log",
"enabled"));
210 define (
"ILIAS_LOG_LEVEL",$ilIliasIniFile->readVariable(
"log",
"level"));
213 define (
"PATH_TO_CONVERT",$ilIliasIniFile->readVariable(
"tools",
"convert"));
214 define (
"PATH_TO_ZIP",$ilIliasIniFile->readVariable(
"tools",
"zip"));
215 define (
"PATH_TO_MKISOFS",$ilIliasIniFile->readVariable(
"tools",
"mkisofs"));
216 define (
"PATH_TO_UNZIP",$ilIliasIniFile->readVariable(
"tools",
"unzip"));
217 define (
"PATH_TO_JAVA",$ilIliasIniFile->readVariable(
"tools",
"java"));
218 define (
"PATH_TO_HTMLDOC",$ilIliasIniFile->readVariable(
"tools",
"htmldoc"));
219 define (
"URL_TO_LATEX",$ilIliasIniFile->readVariable(
"tools",
"latex"));
220 define (
"PATH_TO_FOP",$ilIliasIniFile->readVariable(
"tools",
"fop"));
223 switch ($ilIliasIniFile->readVariable(
"tools",
"vscantype"))
226 define(
"IL_VIRUS_SCANNER",
"Sophos");
227 define(
"IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"scancommand"));
228 define(
"IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
232 define(
"IL_VIRUS_SCANNER",
"AntiVir");
233 define(
"IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"scancommand"));
234 define(
"IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
238 define(
"IL_VIRUS_SCANNER",
"ClamAV");
239 define(
"IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"scancommand"));
240 define(
"IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable(
"tools",
"cleancommand"));
244 define(
"IL_VIRUS_SCANNER",
"None");
248 $tz = $ilIliasIniFile->readVariable(
"server",
"timezone");
251 if (function_exists(
'date_default_timezone_set'))
253 date_default_timezone_set($tz);
256 define (
"IL_TIMEZONE", $ilIliasIniFile->readVariable(
"server",
"timezone"));
269 include_once
'classes/class.ilHTTPS.php';
272 if($https->isDetected())
274 $protocol =
'https://';
278 $protocol =
'http://';
280 $host = $_SERVER[
'HTTP_HOST'];
282 $rq_uri = $_SERVER[
'REQUEST_URI'];
286 if (is_int($pos = strpos($rq_uri,
"?")))
288 $rq_uri = substr($rq_uri, 0, $pos);
291 if(!defined(
'ILIAS_MODULE'))
293 $path = pathinfo($rq_uri);
294 if(!
$path[
'extension'])
300 $uri = dirname($rq_uri);
306 $path = dirname($rq_uri);
312 $dirs = explode(
'/',$module);
316 $uri = dirname($uri);
333 if (!is_object($ilIliasIniFile))
335 die (
"Fatal Error: ilInitialisation::determineClient called without initialisation of ILIAS ini file object.");
339 if (
$_GET[
"client_id"] !=
"")
342 if (!defined(
"IL_PHPUNIT_TEST"))
350 $client_id = $ilIliasIniFile->readVariable(
"clients",
"default");
355 if (!defined(
"IL_PHPUNIT_TEST"))
357 define (
"CLIENT_ID",
$_COOKIE[
"ilClientId"]);
361 define (
"CLIENT_ID",
$_GET[
"client_id"]);
379 global $ilClientIniFile;
384 die (
"Fatal Error: ilInitialisation::initClientIniFile called without ILIAS_WEB_DIR.");
390 die (
"Fatal Error: ilInitialisation::initClientIniFile called without CLIENT_ID.");
393 $ini_file =
"./".ILIAS_WEB_DIR.
"/".CLIENT_ID.
"/client.ini.php";
396 require_once(
"classes/class.ilIniFile.php");
397 $ilClientIniFile =
new ilIniFile($ini_file);
398 $GLOBALS[
'ilClientIniFile'] =& $ilClientIniFile;
399 $ilClientIniFile->read();
402 if ($ilClientIniFile->ERROR !=
"")
408 define (
"SESSION_REMINDER_LEADTIME", 30);
409 define (
"DEBUG",$ilClientIniFile->readVariable(
"system",
"DEBUG"));
410 define (
"DEVMODE",$ilClientIniFile->readVariable(
"system",
"DEVMODE"));
411 define (
"SHOWNOTICES",$ilClientIniFile->readVariable(
"system",
"SHOWNOTICES"));
412 define (
"ROOT_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'ROOT_FOLDER_ID'));
413 define (
"SYSTEM_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'SYSTEM_FOLDER_ID'));
414 define (
"ROLE_FOLDER_ID",$ilClientIniFile->readVariable(
'system',
'ROLE_FOLDER_ID'));
415 define (
"MAIL_SETTINGS_ID",$ilClientIniFile->readVariable(
'system',
'MAIL_SETTINGS_ID'));
417 define (
"SYSTEM_MAIL_ADDRESS",$ilClientIniFile->readVariable(
'system',
'MAIL_SENT_ADDRESS'));
418 define (
"MAIL_REPLY_WARNING",$ilClientIniFile->readVariable(
'system',
'MAIL_REPLY_WARNING'));
420 define (
"MAXLENGTH_OBJ_TITLE",125);#$ilClientIniFile->readVariable(
'system',
'MAXLENGTH_OBJ_TITLE'));
421 define (
"MAXLENGTH_OBJ_DESC",$ilClientIniFile->readVariable(
'system',
'MAXLENGTH_OBJ_DESC'));
423 define (
"CLIENT_DATA_DIR",ILIAS_DATA_DIR.
"/".CLIENT_ID);
425 define (
"CLIENT_NAME",$ilClientIniFile->readVariable(
'client',
'name'));
427 $val = $ilClientIniFile->readVariable(
"db",
"type");
430 define (
"IL_DB_TYPE",
"mysql");
434 define (
"IL_DB_TYPE", $val);
444 global $ilClientIniFile;
446 if (!$ilClientIniFile->readVariable(
"client",
"access"))
448 if (is_file(
"./maintenance.html"))
455 die(
'<br /><p style="text-align:center;">The server is not '.
456 'available due to maintenance. We apologise for any inconvenience.</p>');
467 global
$ilDB, $ilClientIniFile;
470 require_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
472 $ilDB->initFromIniFile();
483 global $ilAppEventHandler;
486 require_once(
"./Services/EventHandling/classes/class.ilAppEventHandler.php");
488 $GLOBALS[
'ilAppEventHandler'] =& $ilAppEventHandler;
499 if(ini_get(
'session.save_handler') !=
'user')
501 ini_set(
"session.save_handler",
"user");
505 die(
"Please turn off Safe mode OR set session.save_handler to \"user\" in your php.ini");
514 include_once
'Services/Authentication/classes/class.ilAuthFactory.php';
522 $cookie_path =
$GLOBALS[
'COOKIE_PATH'];
526 $cookie_path = dirname( $_SERVER[
'PHP_SELF'] );
534 $cookie_path .= (!preg_match(
"/[\/|\\\\]$/", $cookie_path)) ?
"/" :
"";
536 if($cookie_path ==
"\\") $cookie_path =
'/';
538 $cookie_domain = $_SERVER[
'SERVER_NAME'];
540 define(
'IL_COOKIE_EXPIRE',0);
541 define(
'IL_COOKIE_PATH',$cookie_path);
542 define(
'IL_COOKIE_DOMAIN',
'');
543 define(
'IL_COOKIE_SECURE',
false);
547 if( version_compare(PHP_VERSION,
'5.2.0',
'>=') )
550 define(
'IL_COOKIE_HTTPONLY',
false);
551 session_set_cookie_params(
552 IL_COOKIE_EXPIRE,
IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE, IL_COOKIE_HTTPONLY
558 session_set_cookie_params(
559 IL_COOKIE_EXPIRE,
IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE
571 require_once(
"Services/Administration/classes/class.ilSetting.php");
576 define (
"ANONYMOUS_USER_ID", $ilSetting->get(
"anonymous_user_id"));
577 define (
"ANONYMOUS_ROLE_ID", $ilSetting->get(
"anonymous_role_id"));
578 define (
"SYSTEM_USER_ID", $ilSetting->get(
"system_user_id"));
579 define (
"SYSTEM_ROLE_ID", $ilSetting->get(
"system_role_id"));
580 define (
"USER_FOLDER_ID", 7);
583 define (
"RECOVERY_FOLDER_ID", $ilSetting->get(
"recovery_folder_id"));
586 define (
"IL_INST_ID", $ilSetting->get(
"inst_id",0));
589 define (
"SUFFIX_REPL_DEFAULT",
"php,php3,php4,inc,lang,phtml,htaccess");
590 define (
"SUFFIX_REPL_ADDITIONAL", $ilSetting->get(
"suffix_repl_additional"));
595 require_once(
'Services/Payment/classes/class.ilGeneralSettings.php');
605 $this->script = substr(strrchr($_SERVER[
"PHP_SELF"],
"/"),1);
606 $dirname = dirname($_SERVER[
"PHP_SELF"]);
607 $ilurl = @parse_url(ILIAS_HTTP_PATH);
610 $ilurl[
"path"] =
"/";
612 $subdir = substr(strstr($dirname,$ilurl[
"path"]),strlen($ilurl[
"path"]));
617 $num_subdirs = substr_count($subdir,
"/");
619 for ($i=1;$i<=$num_subdirs;$i++)
624 $this->updir = $updir;
635 $ilBench->start(
"Core",
"HeaderInclude_getStyleDefinitions");
637 $GLOBALS[
'styleDefinition'] =& $styleDefinition;
638 $styleDefinition->startParsing();
639 $ilBench->stop(
"Core",
"HeaderInclude_getStyleDefinitions");
648 global $styleDefinition;
650 if (isset(
$_GET[
'skin']) && isset(
$_GET[
'style']))
652 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
653 if ($styleDefinition->styleExists(
$_GET[
'skin'],
$_GET[
'style']) &&
662 include_once(
"./Services/Style/classes/class.ilObjStyleSettings.php");
666 $ilias->account->skin =
$_SESSION[
'skin'];
667 $ilias->account->prefs[
'style'] =
$_SESSION[
'style'];
679 $uid = $ilUser->checkUserId();
683 $ilUser->setId($uid);
687 #$rbacreview = new ilRbacReview();
688 #$GLOBALS['rbacreview'] =& $rbacreview;
689 #$_SESSION["RoleId"] = $rbacreview->assignedRoles($_SESSION["AccountId"]);
708 if (trim($ilSetting->get(
"locale") !=
""))
710 $larr = explode(
",", trim($ilSetting->get(
"locale")));
713 foreach ($larr as $l)
722 setlocale(LC_ALL, $ls);
723 if (class_exists(
"Collator"))
725 $GLOBALS[
"ilCollator"] =
new Collator($first);
737 $clientip = $ilUser->getClientIP();
738 if (trim($clientip) !=
"")
740 $clientip = preg_replace(
"/[^0-9.?*,:]+/",
"",$clientip);
741 $clientip = str_replace(
".",
"\\.",$clientip);
742 $clientip = str_replace(Array(
"?",
"*",
","), Array(
"[0-9]",
"[0-9]*",
"|"), $clientip);
743 if (!preg_match(
"/^".$clientip.
"$/", $_SERVER[
"REMOTE_ADDR"]))
746 $ilias->account->getLogin().
":".$_SERVER[
"REMOTE_ADDR"].
":".$message);
759 $in_user_agreement =
false;
760 if (strtolower(
$_GET[
"cmdClass"]) ==
"ilstartupgui" &&
761 (strtolower(
$_GET[
"cmd"]) ==
"getacceptance" ||
762 (is_array(
$_POST[
"cmd"]) &&
763 key(
$_POST[
"cmd"]) ==
"getAcceptance")))
765 $in_user_agreement =
true;
770 if (!$ilUser->hasAcceptedUserAgreement() &&
771 $ilAuth->getAuth() &&
772 !$in_user_agreement &&
773 $ilUser->getId() != ANONYMOUS_USER_ID &&
774 $ilUser->checkTimeLimit())
776 if($ilAuth->supportsRedirects())
778 ilUtil::redirect(
"ilias.php?baseClass=ilStartUpGUI&cmdClass=ilstartupgui&target=".
$_GET[
"target"].
"&cmd=getAcceptance");
799 $_POST[
"username"] =
"anonymous";
800 $_POST[
"password"] =
"anonymous";
803 $oldSid = session_id();
807 if(IS_PAYMENT_ENABLED)
809 $newSid = session_id();
810 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
811 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
814 if (ANONYMOUS_USER_ID ==
"")
816 die (
"Public Section enabled, but no Anonymous user found.");
818 if (!$ilAuth->getAuth())
820 die(
"ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID.
" not found!");
824 if (
$_GET[
"target"] !=
"")
829 include_once(
"Services/Init/classes/class.ilStartUpGUI.php");
843 #ilUtil::redirect(ILIAS_HTTP_PATH.
844 # "/goto.php?target=".$_GET["target"].$survey_parameter);
852 $_GET[
"ref_id"] = ROOT_FOLDER_ID;
854 $_GET[
"cmd"] =
"frameset";
855 $jump_script =
"repository.php";
857 $script = $this->updir.$jump_script.
"?reloadpublic=1&cmd=".
$_GET[
"cmd"].
"&ref_id=".
$_GET[
"ref_id"];
861 echo
"<script language=\"Javascript\">\ntop.location.href = \"".$script.
"\";\n</script>\n".
862 'Please click <a href="'.$script.
'">here</a> if you are not redirected automatically.';
878 if (
$_GET[
"soap_pw"] !=
"")
880 $add =
"&soap_pw=".$_GET[
"soap_pw"].
"&ext_uid=".
$_GET[
"ext_uid"];
883 $script = $this->updir.
"login.php?target=".
$_GET[
"target"].
"&client_id=".
$_COOKIE[
"ilClientId"].
884 "&auth_stat=".$a_auth_stat.$add;
892 if (is_int(strpos($PHP_SELF,
"goto.php")) &&
$_GET[
"soap_pw"] ==
"" &&
893 $_GET[
"reloadpublic"] !=
"1")
895 $script = $this->updir.
"goto.php?target=".
$_GET[
"target"].
"&client_id=".CLIENT_ID.
899 echo
"<script language=\"Javascript\">\ntop.location.href = \"".$script.
"\";\n</script>\n".
900 'Please click <a href="'.$script.
'">here</a> if you are not redirected automatically.';
914 $ilBench->start(
"Core",
"HeaderInclude_initLanguage");
924 if (is_object($ilUser))
926 $_GET[
"lang"] = $ilUser->getPref(
"language");
931 if (isset(
$_POST[
'change_lang_to']) &&
$_POST[
'change_lang_to'] !=
"")
940 if (is_object($ilUser) && $ilUser->getId() != ANONYMOUS_USER_ID && $ilUser->getId() > 0)
942 $_SESSION[
'lang'] = $ilUser->getPref(
"language");
947 if (!in_array(
$_SESSION[
'lang'], $langs))
949 if (is_object($ilSetting) && $ilSetting->get(
"language") !=
"")
951 $_SESSION[
'lang'] = $ilSetting->get(
"language");
962 $ilBench->stop(
"Core",
"HeaderInclude_initLanguage");
966 if(is_object($rbacsystem))
968 $rbacsystem->initMemberView();
978 global
$ilBench, $rbacsystem, $rbacadmin, $rbacreview;
980 $ilBench->start(
"Core",
"HeaderInclude_initRBAC");
982 $GLOBALS[
'rbacreview'] =& $rbacreview;
985 $GLOBALS[
'rbacsystem'] =& $rbacsystem;
988 $GLOBALS[
'rbacadmin'] =& $rbacadmin;
992 $ilBench->stop(
"Core",
"HeaderInclude_initRBAC");
1000 function initILIAS($context =
"web")
1005 $ilTabs, $ilMainMenu, $rbacsystem, $ilNavigationHistory;
1012 if (version_compare(PHP_VERSION,
'5.4.0',
'>='))
1017 error_reporting(((ini_get(
"error_reporting") & ~E_NOTICE) & ~E_DEPRECATED) & ~E_STRICT);
1019 elseif (version_compare(PHP_VERSION,
'5.3.0',
'>='))
1021 error_reporting((ini_get(
"error_reporting") & ~E_NOTICE) & ~E_DEPRECATED);
1025 error_reporting(ini_get(
'error_reporting') & ~E_NOTICE);
1034 $ilBench->start(
"Core",
"HeaderInclude_GetErrorHandler");
1038 $ilBench->stop(
"Core",
"HeaderInclude_GetErrorHandler");
1060 ilUtil::setCookie(
"ilClientId", $ilIliasIniFile->readVariable(
"clients",
"default"));
1061 if (CLIENT_ID !=
"" && CLIENT_ID != $ilIliasIniFile->readVariable(
"clients",
"default"))
1063 ilUtil::redirect(
"index.php?client_id=".$ilIliasIniFile->readVariable(
"clients",
"default"));
1067 echo (
"Client $c does not exist. ".
'Please <a href="./index.php">click here</a> to return to the default client.');
1074 if (DEVMODE && SHOWNOTICES)
1080 if (version_compare(PHP_VERSION,
'5.3.0',
'>='))
1082 error_reporting(E_ALL);
1086 error_reporting(E_ALL);
1093 && isset(
$_GET[
'username']) && strlen(
$_GET[
'username'])
1094 && isset(
$_GET[
'password']) && strlen(
$_GET[
'password'])
1107 include_once(
"./Services/Component/classes/class.ilPluginAdmin.php");
1109 $GLOBALS[
'ilPluginAdmin'] = $ilPluginAdmin;
1122 require_once
'./classes/class.ilHTTPS.php';
1125 $https->enableSecureCookies();
1126 $https->checkPort();
1134 include_once(
"./Services/Authentication/classes/class.ilAuthUtils.php");
1147 session_regenerate_id();
1152 $ilBench->start(
"Core",
"HeaderInclude_GetILIASObject");
1153 $ilias =
new ILIAS();
1155 $ilBench->stop(
"Core",
"HeaderInclude_GetILIASObject");
1160 if (function_exists(
"xdebug_start_trace"))
1168 $GLOBALS[
'ilObjDataCache'] =& $ilObjDataCache;
1178 require_once
"include/inc.debug.php";
1182 $ilBench->start(
"Core",
"HeaderInclude_getObjectDefinitions");
1184 $GLOBALS[
'objDefinition'] =& $objDefinition;
1186 $ilBench->stop(
"Core",
"HeaderInclude_getObjectDefinitions");
1189 $tree =
new ilTree(ROOT_FOLDER_ID);
1197 $ilBench->start(
"Core",
"HeaderInclude_Authentication");
1203 if (!defined(
"IL_PHPUNIT_TEST"))
1205 $oldSid = session_id();
1209 if(IS_PAYMENT_ENABLED)
1211 $newSid = session_id();
1212 include_once
'./Services/Payment/classes/class.ilPaymentShoppingCart.php';
1213 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
1218 $ilias->setAuthError($ilErr->getLastError());
1219 $ilBench->stop(
"Core",
"HeaderInclude_Authentication");
1222 if ((isset(
$_GET[
"cmd"]) &&
$_GET[
"cmd"] ==
"force_login") || $this->script ==
"login.php")
1225 if(!isset(
$_GET[
'forceShoppingCartRedirect']))
1229 $ilias->setAuthError($ilErr->getLastError());
1233 if (!$ilias->getSetting(
"setup_ok"))
1235 die(
"Setup is not completed. Please run setup routine again.");
1239 $ilBench->start(
"Core",
"HeaderInclude_getCurrentUser");
1241 $ilias->account =& $ilUser;
1243 $ilBench->stop(
"Core",
"HeaderInclude_getCurrentUser");
1254 if (in_array($this->script,
1255 array(
"login.php",
"register.php",
"view_usr_agreement.php"))
1256 ||
$_GET[
"baseClass"] ==
"ilStartUpGUI")
1268 if (AUTH_CURRENT ==
AUTH_LOCAL && !$ilAuth->getAuth() && $this->script ==
"login.php" &&
$_POST[
"username"] !=
"")
1277 $ilias->setAuthError($ilErr->getLastError());
1293 #if (($ilAuth->getAuth() && $ilias->account->isCurrentUserActive()) ||
1294 # (defined("IL_PHPUNIT_TEST") && DEVMODE))
1296 if($ilAuth->getStatus() ==
'' &&
1297 $ilias->account->isCurrentUserActive() ||
1298 (defined(
"IL_PHPUNIT_TEST") && DEVMODE))
1301 $ilBench->start(
"Core",
"HeaderInclude_getCurrentUserAccountData");
1314 if ($this->script ==
"login.php" ||
1315 $_GET[
"baseClass"] ==
"ilStartUpGUI")
1321 require_once(
'Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1323 if( $security_settings->isPasswordChangeOnFirstLoginEnabled() &&
1324 null == $ilUser->getLastLogin() )
1326 $ilUser->resetLastPasswordChange();
1329 $ilUser->refreshLogin();
1333 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1335 if( $security_settings->getAccountSecurityMode() ==
1343 $_GET[
'limit'] =
$_SESSION[
'tbl_limit'] = (int) $ilUser->getPref(
'hits_per_page');
1351 if (isset(
$_GET[
'offset']) &&
$_GET[
'offset'] !=
"")
1356 $ilBench->stop(
"Core",
"HeaderInclude_getCurrentUserAccountData");
1359 $this->script !=
"login.php"
1360 and $this->script !=
"shib_login.php"
1361 and $this->script !=
"shib_logout.php"
1362 and $this->script !=
"error.php"
1363 and $this->script !=
"index.php"
1364 and $this->script !=
"view_usr_agreement.php"
1365 and $this->script !=
"register.php"
1366 and $this->script !=
"chat.php"
1367 and $this->script !=
"pwassist.php"
1368 and $this->script !=
"confirmReg.php"
1373 if ($ilAuth->getAuth() && !$ilUser->isCurrentUserActive())
1382 if (
$_GET[
"baseClass"] !=
"ilStartUpGUI")
1388 if(!$ilAuth->supportsRedirects())
1393 if ($ilSetting->get(
"pub_section") &&
1394 ($ilAuth->getStatus() ==
"" ||
1397 $_GET[
"reloadpublic"] !=
"1")
1403 if ($context ==
"web")
1406 $this->
goToLogin((
$_GET[
'auth_stat'] && !$ilAuth->getStatus()) ?
$_GET[
'auth_stat'] : $ilAuth->getStatus());
1420 else if(!$ilAuth->getAuth())
1422 require_once(
'./Services/PrivacySecurity/classes/class.ilSecuritySettings.php');
1425 if( $security->getAccountSecurityMode() ==
1428 if(isset(
$_POST[
'username']) &&
$_POST[
'username'] && $ilUser->getId() == 0)
1433 if(
$usr_id != ANONYMOUS_USER_ID )
1438 $max_attempts = $security->getLoginMaxAttempts();
1440 if( $login_attempts >= $max_attempts &&
1467 if ( !isset(
$_SESSION[
"locator_level"]) )
1475 $GLOBALS[
'ilias_locator'] =& $ilias_locator;
1476 $GLOBALS[
'ilLocator'] =& $ilLocator;
1479 $ilBench->start(
"Core",
"HeaderInclude_getStyleDefinitions");
1481 $GLOBALS[
'styleDefinition'] =& $styleDefinition;
1482 $styleDefinition->startParsing();
1483 $ilBench->stop(
"Core",
"HeaderInclude_getStyleDefinitions");
1487 $tpl->setVariable(
"LOCATION_STYLESHEET",$location_stylesheet);
1491 $GLOBALS[
'ilNavigationHistory'] =& $ilNavigationHistory;
1497 $GLOBALS[
'ilBrowser'] =& $ilBrowser;
1504 include_once
'classes/class.ilTabsGUI.php';
1509 include_once
'./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php';
1514 $GLOBALS[
'ilToolbar'] =& $ilToolbar;
1517 include_once
'./Services/MainMenu/classes/class.ilMainMenuGUI.php';
1519 $GLOBALS[
'ilMainMenu'] =& $ilMainMenu;
1525 include_once(
'./Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php');
1527 $scheduler->start();
1529 $ilBench->stop(
"Core",
"HeaderInclude");
1542 $ilTabs, $ilMainMenu, $rbacsystem, $ilNavigationHistory;
1555 $ilBench->start(
"Core",
"HeaderInclude_GetErrorHandler");
1559 $ilBench->stop(
"Core",
"HeaderInclude_GetErrorHandler");
1574 ilUtil::setCookie(
"ilClientId", $ilIliasIniFile->readVariable(
"clients",
"default"));
1575 echo (
"Client $c does not exist. Please reload this page to return to the default client.");
1586 include_once(
"./Services/Component/classes/class.ilPluginAdmin.php");
1588 $GLOBALS[
'ilPluginAdmin'] = $ilPluginAdmin;
1592 $GLOBALS[
'ilObjDataCache'] =& $ilObjDataCache;
1598 $tree =
new ilTree(ROOT_FOLDER_ID);
1602 $lng =
new ilLanguage($ilClientIniFile->readVariable(
"language",
"default"));
1609 $log =
new ilLog(ILIAS_LOG_DIR,ILIAS_LOG_FILE,CLIENT_ID,ILIAS_LOG_ENABLED,ILIAS_LOG_LEVEL);
1617 $ilBench->start(
"Core",
"HeaderInclude_GetILIASObject");
1618 $ilias =
new ILIAS();
1620 $ilBench->stop(
"Core",
"HeaderInclude_GetILIASObject");