ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilInitialisation.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4// needed for slow queries, etc.
5if(!isset($GLOBALS['ilGlobalStartTime']) || !$GLOBALS['ilGlobalStartTime'])
6{
7 $GLOBALS['ilGlobalStartTime'] = microtime();
8}
9
10include_once "Services/Context/classes/class.ilContext.php";
11
28{
32 protected static function removeUnsafeCharacters()
33 {
34 // Remove unsafe characters from GET parameters.
35 // We do not need this characters in any case, so it is
36 // feasible to filter them everytime. POST parameters
37 // need attention through ilUtil::stripSlashes() and similar functions)
38 if (is_array($_GET))
39 {
40 foreach($_GET as $k => $v)
41 {
42 // \r\n used for IMAP MX Injection
43 // ' used for SQL Injection
44 $_GET[$k] = str_replace(array("\x00", "\n", "\r", "\\", "'", '"', "\x1a"), "", $v);
45
46 // this one is for XSS of any kind
47 $_GET[$k] = strip_tags($_GET[$k]);
48 }
49 }
50 }
51
55 protected static function requireCommonIncludes()
56 {
57 // pear
58 require_once("include/inc.get_pear.php");
59 require_once("include/inc.check_pear.php");
60 require_once "PEAR.php";
61
62 // ilTemplate
64 {
65 // HTML_Template_IT support
66 @include_once "HTML/Template/ITX.php"; // new implementation
67 if (class_exists("HTML_Template_ITX"))
68 {
69 include_once "./Services/UICore/classes/class.ilTemplateHTMLITX.php";
70 }
71 else
72 {
73 include_once "HTML/ITX.php"; // old implementation
74 include_once "./Services/UICore/classes/class.ilTemplateITX.php";
75 }
76 require_once "./Services/UICore/classes/class.ilTemplate.php";
77 }
78
79 // really always required?
80 require_once "./Services/Utilities/classes/class.ilUtil.php";
81 require_once "./Services/Utilities/classes/class.ilFormat.php";
82 require_once "./Services/Calendar/classes/class.ilDatePresentation.php";
83 require_once "include/inc.ilias_version.php";
84
85 self::initGlobal("ilBench", "ilBenchmark", "./Services/Utilities/classes/class.ilBenchmark.php");
86 }
87
93 protected static function includePhp5Compliance()
94 {
95 // php5 downward complaince to php 4 dom xml and clone method
96 if (version_compare(PHP_VERSION,'5','>='))
97 {
98 include_once 'Services/Authentication/classes/class.ilAuthFactory.php';
100 {
101 require_once("include/inc.xml5compliance.php");
102 }
103 require_once("include/inc.xsl5compliance.php");
104 }
105 }
106
114 protected static function initIliasIniFile()
115 {
116 require_once("./Services/Init/classes/class.ilIniFile.php");
117 $ilIliasIniFile = new ilIniFile("./ilias.ini.php");
118 $ilIliasIniFile->read();
119 self::initGlobal('ilIliasIniFile', $ilIliasIniFile);
120
121 // initialize constants
122 define("ILIAS_DATA_DIR",$ilIliasIniFile->readVariable("clients","datadir"));
123 define("ILIAS_WEB_DIR",$ilIliasIniFile->readVariable("clients","path"));
124 define("ILIAS_ABSOLUTE_PATH",$ilIliasIniFile->readVariable('server','absolute_path'));
125
126 // logging
127 define ("ILIAS_LOG_DIR",$ilIliasIniFile->readVariable("log","path"));
128 define ("ILIAS_LOG_FILE",$ilIliasIniFile->readVariable("log","file"));
129 define ("ILIAS_LOG_ENABLED",$ilIliasIniFile->readVariable("log","enabled"));
130 define ("ILIAS_LOG_LEVEL",$ilIliasIniFile->readVariable("log","level"));
131 define ("SLOW_REQUEST_TIME",$ilIliasIniFile->readVariable("log","slow_request_time"));
132
133 // read path + command for third party tools from ilias.ini
134 define ("PATH_TO_CONVERT",$ilIliasIniFile->readVariable("tools","convert"));
135 define ("PATH_TO_FFMPEG",$ilIliasIniFile->readVariable("tools","ffmpeg"));
136 define ("PATH_TO_ZIP",$ilIliasIniFile->readVariable("tools","zip"));
137 define ("PATH_TO_MKISOFS",$ilIliasIniFile->readVariable("tools","mkisofs"));
138 define ("PATH_TO_UNZIP",$ilIliasIniFile->readVariable("tools","unzip"));
139 define ("PATH_TO_GHOSTSCRIPT",$ilIliasIniFile->readVariable("tools","ghostscript"));
140 define ("PATH_TO_JAVA",$ilIliasIniFile->readVariable("tools","java"));
141 define ("PATH_TO_HTMLDOC",$ilIliasIniFile->readVariable("tools","htmldoc"));
142 define ("URL_TO_LATEX",$ilIliasIniFile->readVariable("tools","latex"));
143 define ("PATH_TO_FOP",$ilIliasIniFile->readVariable("tools","fop"));
144
145 // read virus scanner settings
146 switch ($ilIliasIniFile->readVariable("tools", "vscantype"))
147 {
148 case "sophos":
149 define("IL_VIRUS_SCANNER", "Sophos");
150 define("IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable("tools", "scancommand"));
151 define("IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable("tools", "cleancommand"));
152 break;
153
154 case "antivir":
155 define("IL_VIRUS_SCANNER", "AntiVir");
156 define("IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable("tools", "scancommand"));
157 define("IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable("tools", "cleancommand"));
158 break;
159
160 case "clamav":
161 define("IL_VIRUS_SCANNER", "ClamAV");
162 define("IL_VIRUS_SCAN_COMMAND", $ilIliasIniFile->readVariable("tools", "scancommand"));
163 define("IL_VIRUS_CLEAN_COMMAND", $ilIliasIniFile->readVariable("tools", "cleancommand"));
164 break;
165
166 default:
167 define("IL_VIRUS_SCANNER", "None");
168 break;
169 }
170
171 $tz = $ilIliasIniFile->readVariable("server","timezone");
172 if ($tz != "")
173 {
174 if (function_exists('date_default_timezone_set'))
175 {
176 date_default_timezone_set($tz);
177 }
178 }
179 define ("IL_TIMEZONE", $ilIliasIniFile->readVariable("server","timezone"));
180 }
181
185 protected static function buildHTTPPath()
186 {
187 include_once './Services/Http/classes/class.ilHTTPS.php';
188 $https = new ilHTTPS();
189
190 if($https->isDetected())
191 {
192 $protocol = 'https://';
193 }
194 else
195 {
196 $protocol = 'http://';
197 }
198 $host = $_SERVER['HTTP_HOST'];
199
200 $rq_uri = strip_tags($_SERVER['REQUEST_URI']);
201
202 // security fix: this failed, if the URI contained "?" and following "/"
203 // -> we remove everything after "?"
204 if (is_int($pos = strpos($rq_uri, "?")))
205 {
206 $rq_uri = substr($rq_uri, 0, $pos);
207 }
208
209 if(!defined('ILIAS_MODULE'))
210 {
211 $path = pathinfo($rq_uri);
212 if(!$path['extension'])
213 {
214 $uri = $rq_uri;
215 }
216 else
217 {
218 $uri = dirname($rq_uri);
219 }
220 }
221 else
222 {
223 // if in module remove module name from HTTP_PATH
224 $path = dirname($rq_uri);
225
226 // dirname cuts the last directory from a directory path e.g content/classes return content
227
229
230 $dirs = explode('/',$module);
231 $uri = $path;
232 foreach($dirs as $dir)
233 {
234 $uri = dirname($uri);
235 }
236 }
237
238 return define('ILIAS_HTTP_PATH',ilUtil::removeTrailingPathSeparators($protocol.$host.$uri));
239 }
240
245 protected static function determineClient()
246 {
247 global $ilIliasIniFile;
248
249 // check whether ini file object exists
250 if (!is_object($ilIliasIniFile))
251 {
252 self::abortAndDie("Fatal Error: ilInitialisation::determineClient called without initialisation of ILIAS ini file object.");
253 }
254
255 // set to default client if empty
256 if ($_GET["client_id"] != "")
257 {
258 $_GET["client_id"] = ilUtil::stripSlashes($_GET["client_id"]);
259 if (!defined("IL_PHPUNIT_TEST"))
260 {
261 ilUtil::setCookie("ilClientId", $_GET["client_id"]);
262 }
263 }
264 else if (!$_COOKIE["ilClientId"])
265 {
266 // to do: ilias ini raus nehmen
267 $client_id = $ilIliasIniFile->readVariable("clients","default");
268 ilUtil::setCookie("ilClientId", $client_id);
269 }
270 if (!defined("IL_PHPUNIT_TEST"))
271 {
272 define ("CLIENT_ID", $_COOKIE["ilClientId"]);
273 }
274 else
275 {
276 define ("CLIENT_ID", $_GET["client_id"]);
277 }
278 }
279
292 protected static function initClientIniFile()
293 {
294 global $ilIliasIniFile;
295
296 // check whether ILIAS_WEB_DIR is set.
297 if (ILIAS_WEB_DIR == "")
298 {
299 self::abortAndDie("Fatal Error: ilInitialisation::initClientIniFile called without ILIAS_WEB_DIR.");
300 }
301
302 // check whether CLIENT_ID is set.
303 if (CLIENT_ID == "")
304 {
305 self::abortAndDie("Fatal Error: ilInitialisation::initClientIniFile called without CLIENT_ID.");
306 }
307
308 $ini_file = "./".ILIAS_WEB_DIR."/".CLIENT_ID."/client.ini.php";
309
310 // get settings from ini file
311 require_once("./Services/Init/classes/class.ilIniFile.php");
312 $ilClientIniFile = new ilIniFile($ini_file);
313 $ilClientIniFile->read();
314
315 // invalid client id / client ini
316 if ($ilClientIniFile->ERROR != "")
317 {
318 $c = $_COOKIE["ilClientId"];
319 $default_client = $ilIliasIniFile->readVariable("clients","default");
320 ilUtil::setCookie("ilClientId", $default_client);
321 if (CLIENT_ID != "" && CLIENT_ID != $default_client)
322 {
323 $mess = array("en" => "Client does not exist.",
324 "de" => "Mandant ist ungültig.");
325 self::redirect("index.php?client_id=".$default_client, null, $mess);
326 }
327 else
328 {
329 self::abortAndDie("Fatal Error: ilInitialisation::initClientIniFile initializing client ini file abborted with: ". $ilClientIniFile->ERROR);
330 }
331 }
332
333 self::initGlobal("ilClientIniFile", $ilClientIniFile);
334
335 // set constants
336 define ("SESSION_REMINDER_LEADTIME", 30);
337 define ("DEBUG",$ilClientIniFile->readVariable("system","DEBUG"));
338 define ("DEVMODE",$ilClientIniFile->readVariable("system","DEVMODE"));
339 define ("SHOWNOTICES",$ilClientIniFile->readVariable("system","SHOWNOTICES"));
340 define ("ROOT_FOLDER_ID",$ilClientIniFile->readVariable('system','ROOT_FOLDER_ID'));
341 define ("SYSTEM_FOLDER_ID",$ilClientIniFile->readVariable('system','SYSTEM_FOLDER_ID'));
342 define ("ROLE_FOLDER_ID",$ilClientIniFile->readVariable('system','ROLE_FOLDER_ID'));
343 define ("MAIL_SETTINGS_ID",$ilClientIniFile->readVariable('system','MAIL_SETTINGS_ID'));
344
345 // this is for the online help installation, which sets OH_REF_ID to the
346 // ref id of the online module
347 define ("OH_REF_ID",$ilClientIniFile->readVariable("system","OH_REF_ID"));
348
349 define ("SYSTEM_MAIL_ADDRESS",$ilClientIniFile->readVariable('system','MAIL_SENT_ADDRESS')); // Change SS
350 define ("MAIL_REPLY_WARNING",$ilClientIniFile->readVariable('system','MAIL_REPLY_WARNING')); // Change SS
351
352 // see ilObject::TITLE_LENGTH, ilObject::DESC_LENGTH
353 // define ("MAXLENGTH_OBJ_TITLE",125);#$ilClientIniFile->readVariable('system','MAXLENGTH_OBJ_TITLE'));
354 // define ("MAXLENGTH_OBJ_DESC",$ilClientIniFile->readVariable('system','MAXLENGTH_OBJ_DESC'));
355
356 define ("CLIENT_DATA_DIR",ILIAS_DATA_DIR."/".CLIENT_ID);
357 define ("CLIENT_WEB_DIR",ILIAS_ABSOLUTE_PATH."/".ILIAS_WEB_DIR."/".CLIENT_ID);
358 define ("CLIENT_NAME",$ilClientIniFile->readVariable('client','name')); // Change SS
359
360 $val = $ilClientIniFile->readVariable("db","type");
361 if ($val == "")
362 {
363 define ("IL_DB_TYPE", "mysql");
364 }
365 else
366 {
367 define ("IL_DB_TYPE", $val);
368 }
369
370 return true;
371 }
372
376 protected static function handleMaintenanceMode()
377 {
378 global $ilClientIniFile;
379
380 if (!$ilClientIniFile->readVariable("client","access"))
381 {
382 $mess = array("en" => "The server is not available due to maintenance.".
383 " We apologise for any inconvenience.",
384 "de" => "Der Server ist aufgrund von Wartungsarbeiten nicht verfügbar.".
385 " Wir bitten um Verständnis.");
386 $mess_id = "init_error_maintenance";
387
388 if (ilContext::hasHTML() && is_file("./maintenance.html"))
389 {
390 self::redirect("./maintenance.html", $mess_id, $mess);
391 }
392 else
393 {
394 $mess = self::translateMessage($mess_id, $mess);
395 self::abortAndDie($mess);
396 }
397 }
398 }
399
404 protected static function initDatabase()
405 {
406 // build dsn of database connection and connect
407 require_once("./Services/Database/classes/class.ilDBWrapperFactory.php");
409 $ilDB->initFromIniFile();
410 $ilDB->connect();
411
412 self::initGlobal("ilDB", $ilDB);
413 }
414
420 public static function setSessionHandler()
421 {
422 if(ini_get('session.save_handler') != 'user')
423 {
424 ini_set("session.save_handler", "user");
425 }
426
427 require_once "Services/Authentication/classes/class.ilSessionDBHandler.php";
428 $db_session_handler = new ilSessionDBHandler();
429 if (!$db_session_handler->setSaveHandler())
430 {
431 self::abortAndDie("Please turn off Safe mode OR set session.save_handler to \"user\" in your php.ini");
432 }
433
434 // Do not accept external session ids
435 if (!ilSession::_exists(session_id()) && !defined('IL_PHPUNIT_TEST'))
436 {
437 session_regenerate_id();
438 }
439 }
440
444 protected static function setCookieParams()
445 {
446 global $ilSetting;
447
448 include_once 'Services/Authentication/classes/class.ilAuthFactory.php';
450 {
451 $cookie_path = '/';
452 }
453 elseif ($GLOBALS['COOKIE_PATH'])
454 {
455 // use a predefined cookie path from WebAccessChecker
456 $cookie_path = $GLOBALS['COOKIE_PATH'];
457 }
458 else
459 {
460 $cookie_path = dirname( $_SERVER['PHP_SELF'] );
461 }
462
463 /* if ilias is called directly within the docroot $cookie_path
464 is set to '/' expecting on servers running under windows..
465 here it is set to '\'.
466 in both cases a further '/' won't be appended due to the following regex
467 */
468 $cookie_path .= (!preg_match("/[\/|\\\\]$/", $cookie_path)) ? "/" : "";
469
470 if($cookie_path == "\\") $cookie_path = '/';
471
472 include_once './Services/Http/classes/class.ilHTTPS.php';
473 $cookie_secure = !$ilSetting->get('https', 0) && ilHTTPS::getInstance()->isDetected();
474
475 define('IL_COOKIE_EXPIRE',0);
476 define('IL_COOKIE_PATH',$cookie_path);
477 define('IL_COOKIE_DOMAIN','');
478 define('IL_COOKIE_SECURE', $cookie_secure); // Default Value
479
480 // session_set_cookie_params() supports 5th parameter
481 // only for php version 5.2.0 and above
482 if( version_compare(PHP_VERSION, '5.2.0', '>=') )
483 {
484 // PHP version >= 5.2.0
485 define('IL_COOKIE_HTTPONLY',true); // Default Value
486 session_set_cookie_params(
487 IL_COOKIE_EXPIRE, IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE, IL_COOKIE_HTTPONLY
488 );
489 }
490 else
491 {
492 // PHP version < 5.2.0
493 session_set_cookie_params(
494 IL_COOKIE_EXPIRE, IL_COOKIE_PATH, IL_COOKIE_DOMAIN, IL_COOKIE_SECURE
495 );
496 }
497 }
498
504 protected static function initSettings()
505 {
506 global $ilSetting;
507
508 self::initGlobal("ilSetting", "ilSetting",
509 "Services/Administration/classes/class.ilSetting.php");
510
511 // check correct setup
512 if (!$ilSetting->get("setup_ok"))
513 {
514 self::abortAndDie("Setup is not completed. Please run setup routine again.");
515 }
516
517 // set anonymous user & role id and system role id
518 define ("ANONYMOUS_USER_ID", $ilSetting->get("anonymous_user_id"));
519 define ("ANONYMOUS_ROLE_ID", $ilSetting->get("anonymous_role_id"));
520 define ("SYSTEM_USER_ID", $ilSetting->get("system_user_id"));
521 define ("SYSTEM_ROLE_ID", $ilSetting->get("system_role_id"));
522 define ("USER_FOLDER_ID", 7);
523
524 // recovery folder
525 define ("RECOVERY_FOLDER_ID", $ilSetting->get("recovery_folder_id"));
526
527 // installation id
528 define ("IL_INST_ID", $ilSetting->get("inst_id",0));
529
530 // define default suffix replacements
531 define ("SUFFIX_REPL_DEFAULT", "php,php3,php4,inc,lang,phtml,htaccess");
532 define ("SUFFIX_REPL_ADDITIONAL", $ilSetting->get("suffix_repl_additional"));
533
535 {
537 }
538
539 // payment setting
540 require_once('Services/Payment/classes/class.ilPaymentSettings.php');
541 define('IS_PAYMENT_ENABLED', ilPaymentSettings::_isPaymentEnabled());
542 }
543
547 protected static function initStyle()
548 {
549 global $styleDefinition, $ilPluginAdmin;
550
551 // load style definitions
552 self::initGlobal("styleDefinition", "ilStyleDefinition",
553 "./Services/Style/classes/class.ilStyleDefinition.php");
554
555 // add user interface hook for style initialisation
556 $pl_names = $ilPluginAdmin->getActivePluginsForSlot(IL_COMP_SERVICE, "UIComponent", "uihk");
557 foreach ($pl_names as $pl)
558 {
559 $ui_plugin = ilPluginAdmin::getPluginObject(IL_COMP_SERVICE, "UIComponent", "uihk", $pl);
560 $gui_class = $ui_plugin->getUIClassInstance();
561 $gui_class->modifyGUI("Services/Init", "init_style", array("styleDefinition" => $styleDefinition));
562 }
563
564 $styleDefinition->startParsing();
565 }
566
570 public static function initUserAccount()
571 {
575 global $ilUser;
576
577 // get user id
578 if (!ilSession::get("AccountId"))
579 {
580 ilSession::set("AccountId", $ilUser->checkUserId());
581 ilSession::set('orig_request_target', '');
582 $ilUser->hasToAcceptTermsOfServiceInSession(true);
583 }
584
585 $uid = ilSession::get("AccountId");
586 if($uid)
587 {
588 $ilUser->setId($uid);
589 $ilUser->read();
590 }
591 else
592 {
593 if(is_object($GLOBALS['ilLog']))
594 {
595 $GLOBALS['ilLog']->logStack();
596 }
597 self::abortAndDie("Init user account failed");
598 }
599 }
600
604 protected static function initLocale()
605 {
606 global $ilSetting;
607
608 if (trim($ilSetting->get("locale") != ""))
609 {
610 $larr = explode(",", trim($ilSetting->get("locale")));
611 $ls = array();
612 $first = $larr[0];
613 foreach ($larr as $l)
614 {
615 if (trim($l) != "")
616 {
617 $ls[] = $l;
618 }
619 }
620 if (count($ls) > 0)
621 {
622 setlocale(LC_ALL, $ls);
623 if (class_exists("Collator"))
624 {
625 $GLOBALS["ilCollator"] = new Collator($first);
626 }
627 }
628 }
629 }
630
636 public static function goToPublicSection($a_auth_stat = "")
637 {
638 global $ilAuth;
639
640 if (ANONYMOUS_USER_ID == "")
641 {
642 self::abortAndDie("Public Section enabled, but no Anonymous user found.");
643 }
644
645 // logout and end previous session
646 if($a_auth_stat == AUTH_EXPIRED ||
647 $a_auth_stat == AUTH_IDLED)
648 {
650 }
651 else
652 {
654 }
655 $ilAuth->logout();
656 session_unset();
657 session_destroy();
658
659 // new session and login as anonymous
661 session_start();
662 $_POST["username"] = "anonymous";
663 $_POST["password"] = "anonymous";
665
666 // authenticate (anonymous)
667 $oldSid = session_id();
668 $ilAuth->start();
669 if (IS_PAYMENT_ENABLED)
670 {
671 $newSid = session_id();
672 if($oldSid != $newSid)
673 {
674 include_once './Services/Payment/classes/class.ilPaymentShoppingCart.php';
675 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
676 }
677 }
678
679 if (!$ilAuth->getAuth())
680 {
681 self::abortAndDie("ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID." not found!");
682 }
683
684 self::initUserAccount();
685
686 $mess_id = "init_error_authentication_fail";
687 $mess = array("en" => "Authentication failed.",
688 "de" => "Authentifizierung fehlgeschlagen.");
689
690 // if target given, try to go there
691 if ($_GET["target"] != "")
692 {
693 // when we are already "inside" goto.php no redirect is needed
694 $current_script = substr(strrchr($_SERVER["PHP_SELF"], "/"), 1);
695 if($current_script == "goto.php")
696 {
697 return;
698 }
699
700 // goto will check if target is accessible or redirect to login
701 self::redirect("goto.php?target=".$_GET["target"], $mess_id, $mess);
702 }
703
704 // we do not know if ref_id of request is accesible, so redirecting to root
705 $_GET["ref_id"] = ROOT_FOLDER_ID;
706 $_GET["cmd"] = "frameset";
707 self::redirect("ilias.php?baseClass=ilrepositorygui&reloadpublic=1&cmd=".
708 $_GET["cmd"]."&ref_id=".$_GET["ref_id"], $mess_id, $mess);
709 }
710
716 protected static function goToLogin($a_auth_stat = "")
717 {
718 global $ilAuth;
719
720 // close current session
721 if($a_auth_stat == AUTH_EXPIRED ||
722 $a_auth_stat == AUTH_IDLED)
723 {
725 }
726 else
727 {
729 }
730 $ilAuth->logout();
731 session_unset();
732 session_destroy();
733
734 $add = "";
735 if ($_GET["soap_pw"] != "")
736 {
737 $add = "&soap_pw=".$_GET["soap_pw"]."&ext_uid=".$_GET["ext_uid"];
738 }
739
740 $script = "login.php?target=".$_GET["target"]."&client_id=".$_COOKIE["ilClientId"].
741 "&auth_stat=".$a_auth_stat.$add;
742
743 self::redirect($script, "init_error_authentication_fail",
744 array("en" => "Authentication failed.",
745 "de" => "Authentifizierung fehlgeschlagen."));
746 }
747
751 protected static function initLanguage()
752 {
753 global $ilUser, $ilSetting, $rbacsystem;
754
755 if (!ilSession::get("lang"))
756 {
757 if ($_GET['lang'])
758 {
759 $_GET['lang'] = $_GET['lang'];
760 }
761 else
762 {
763 if (is_object($ilUser))
764 {
765 $_GET['lang'] = $ilUser->getPref('language');
766 }
767 }
768 }
769
770 if (isset($_POST['change_lang_to']) && $_POST['change_lang_to'] != "")
771 {
772 $_GET['lang'] = ilUtil::stripSlashes($_POST['change_lang_to']);
773 }
774
775 // prefer personal setting when coming from login screen
776 // Added check for ilUser->getId > 0 because it is 0 when the language is changed and the terms of service should be displayes (Helmut Schottm��ller, 2006-10-14)
777 if (is_object($ilUser) && $ilUser->getId() != ANONYMOUS_USER_ID && $ilUser->getId() > 0)
778 {
779 ilSession::set('lang', $ilUser->getPref('language'));
780 }
781
782 ilSession::set('lang', (isset($_GET['lang']) && $_GET['lang']) ? $_GET['lang'] : ilSession::get('lang'));
783
784 // check whether lang selection is valid
785 require_once "./Services/Language/classes/class.ilLanguage.php";
787 if (!in_array(ilSession::get('lang'), $langs))
788 {
789 if (is_object($ilSetting) && $ilSetting->get('language') != '')
790 {
791 ilSession::set('lang', $ilSetting->get('language'));
792 }
793 else
794 {
795 ilSession::set('lang', $langs[0]);
796 }
797 }
798 $_GET['lang'] = ilSession::get('lang');
799
800 $lng = new ilLanguage(ilSession::get('lang'));
801 self::initGlobal('lng', $lng);
802
803 if(is_object($rbacsystem))
804 {
805 $rbacsystem->initMemberView();
806 }
807 }
808
812 protected static function initAccessHandling()
813 {
814 self::initGlobal("rbacreview", "ilRbacReview",
815 "./Services/AccessControl/classes/class.ilRbacReview.php");
816
817 require_once "./Services/AccessControl/classes/class.ilRbacSystem.php";
818 $rbacsystem = ilRbacSystem::getInstance();
819 self::initGlobal("rbacsystem", $rbacsystem);
820
821 self::initGlobal("rbacadmin", "ilRbacAdmin",
822 "./Services/AccessControl/classes/class.ilRbacAdmin.php");
823
824 self::initGlobal("ilAccess", "ilAccessHandler",
825 "./Services/AccessControl/classes/class.ilAccessHandler.php");
826
827 require_once "./Services/AccessControl/classes/class.ilConditionHandler.php";
828 }
829
833 protected static function initLog()
834 {
835 require_once "./Services/Logging/classes/class.ilLog.php";
836 try
837 {
838 $log = new ilLog(ILIAS_LOG_DIR,ILIAS_LOG_FILE,CLIENT_ID,ILIAS_LOG_ENABLED,ILIAS_LOG_LEVEL);
839 }
840 catch(ilLogException $e)
841 {
842 self::abortAndDie($e->getMessage());
843 }
844 self::initGlobal("ilLog", $log);
845 // deprecated
846 self::initGlobal("log", $log);
847 }
848
856 protected static function initGlobal($a_name, $a_class, $a_source_file = null)
857 {
858 if($a_source_file)
859 {
860 include_once $a_source_file;
861 $GLOBALS[$a_name] = new $a_class;
862 }
863 else
864 {
865 $GLOBALS[$a_name] = $a_class;
866 }
867 }
868
874 protected static function abortAndDie($a_message)
875 {
876 if(is_object($GLOBALS['ilLog']))
877 {
878 $GLOBALS['ilLog']->write("Fatal Error: ilInitialisation - ".$a_message);
879 }
880 die($a_message);
881 }
882
886 protected static function handleDevMode()
887 {
888 if(defined(SHOWNOTICES) && SHOWNOTICES)
889 {
890 // no further differentiating of php version regarding to 5.4 neccessary
891 // when the error reporting is set to E_ALL anyway
892
893 // remove notices from error reporting
894 if (version_compare(PHP_VERSION, '5.3.0', '>='))
895 {
896 error_reporting(E_ALL);
897 }
898 else
899 {
900 error_reporting(E_ALL);
901 }
902 }
903
904 include_once "include/inc.debug.php";
905 }
906
907 protected static $already_initialized;
908
912 public static function initILIAS()
913 {
914 if (self::$already_initialized)
915 {
916 return;
917 }
918
919 self::$already_initialized = true;
920
921 global $tree;
922
924
926 {
928
929 if (ilContext::hasUser())
930 {
932
934 {
936 }
937 }
938
939 // init after Auth otherwise breaks CAS
941
942 // language may depend on user setting
944 $tree->initLangCode();
945
947 {
948 include_once('./Services/WebServices/ECS/classes/class.ilECSTaskScheduler.php');
950
951 self::initHTML();
952 }
953 }
954 }
955
959 protected static function initCore()
960 {
961 global $ilErr;
962
963 // remove notices from error reporting
964 if (version_compare(PHP_VERSION, '5.4.0', '>='))
965 {
966 // Prior to PHP 5.4.0 E_ALL does not include E_STRICT.
967 // With PHP 5.4.0 and above E_ALL >DOES< include E_STRICT.
968
969 error_reporting(((ini_get("error_reporting") & ~E_NOTICE) & ~E_DEPRECATED) & ~E_STRICT);
970 }
971 elseif (version_compare(PHP_VERSION, '5.3.0', '>='))
972 {
973 error_reporting((ini_get("error_reporting") & ~E_NOTICE) & ~E_DEPRECATED);
974 }
975 else
976 {
977 error_reporting(ini_get('error_reporting') & ~E_NOTICE);
978 }
979 // breaks CAS: must be included after CAS context isset in AuthUtils
980 //self::includePhp5Compliance();
981
983
984
985 // error handler
986 self::initGlobal("ilErr", "ilErrorHandling",
987 "./Services/Init/classes/class.ilErrorHandling.php");
988 $ilErr->setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr, 'errorHandler'));
989
990 // :TODO: obsolete?
991 PEAR::setErrorHandling(PEAR_ERROR_CALLBACK, array($ilErr, "errorHandler"));
992
993 // workaround: load old post variables if error handler 'message' was called
994 include_once "Services/Authentication/classes/class.ilSession.php";
995 if (ilSession::get("message"))
996 {
997 $_POST = ilSession::get("post_vars");
998 }
999
1001
1003
1004
1005 // deprecated
1006 self::initGlobal("ilias", "ILIAS", "./Services/Init/classes/class.ilias.php");
1007 }
1008
1012 protected static function initClient()
1013 {
1014 global $https, $ilias;
1015
1017
1019
1020
1021 // --- needs client ini
1022
1023 $ilias->client_id = CLIENT_ID;
1024
1025 if (DEVMODE)
1026 {
1028 }
1029
1030 self::initLog();
1031
1033
1035
1036
1037 // --- needs database
1038
1039 self::initGlobal("ilAppEventHandler", "ilAppEventHandler",
1040 "./Services/EventHandling/classes/class.ilAppEventHandler.php");
1041
1042 // there are rare cases where initILIAS is called twice for a request
1043 // example goto.php is called and includes ilias.php later
1044 // we must prevent that ilPluginAdmin is initialized twice in
1045 // this case, since this won't get the values out of plugin.php the
1046 // second time properly
1047 if (!is_object($GLOBALS["ilPluginAdmin"]))
1048 {
1049 self::initGlobal("ilPluginAdmin", "ilPluginAdmin",
1050 "./Services/Component/classes/class.ilPluginAdmin.php");
1051 }
1052
1054
1056
1057
1058 // --- needs settings
1059
1061
1063 {
1064 // $https
1065 self::initGlobal("https", "ilHTTPS", "./Services/Http/classes/class.ilHTTPS.php");
1066 $https->enableSecureCookies();
1067 $https->checkPort();
1068 }
1069
1070
1071 // --- object handling
1072
1073 self::initGlobal("ilObjDataCache", "ilObjectDataCache",
1074 "./Services/Object/classes/class.ilObjectDataCache.php");
1075
1076 // needed in ilObjectDefinition
1077 require_once "./Services/Xml/classes/class.ilSaxParser.php";
1078
1079 self::initGlobal("objDefinition", "ilObjectDefinition",
1080 "./Services/Object/classes/class.ilObjectDefinition.php");
1081
1082 // $tree
1083 require_once "./Services/Tree/classes/class.ilTree.php";
1084 $tree = new ilTree(ROOT_FOLDER_ID);
1085 self::initGlobal("tree", $tree);
1086 unset($tree);
1087
1088 self::initGlobal("ilCtrl", "ilCtrl",
1089 "./Services/UICore/classes/class.ilCtrl.php");
1090
1092 }
1093
1097 protected static function initUser()
1098 {
1099 global $ilias, $ilAuth, $ilUser;
1100
1102 {
1103 // allow login by submitting user data
1104 // in query string when DEVMODE is enabled
1105 if( DEVMODE
1106 && isset($_GET['username']) && strlen($_GET['username'])
1107 && isset($_GET['password']) && strlen($_GET['password'])
1108 ){
1109 $_POST['username'] = $_GET['username'];
1110 $_POST['password'] = $_GET['password'];
1111 }
1112 }
1113
1114 // $ilAuth
1115 require_once "Auth/Auth.php";
1116 require_once "./Services/AuthShibboleth/classes/class.ilShibboleth.php";
1117 include_once("./Services/Authentication/classes/class.ilAuthUtils.php");
1119 $ilias->auth = $ilAuth;
1120
1121 // $ilUser
1122 self::initGlobal("ilUser", "ilObjUser",
1123 "./Services/User/classes/class.ilObjUser.php");
1124 $ilias->account =& $ilUser;
1125
1127
1128
1129 // force login
1130 if ((isset($_GET["cmd"]) && $_GET["cmd"] == "force_login"))
1131 {
1132 $ilAuth->logout();
1133
1134 // we need to do this for the session statistics
1135 // could we use session_destroy() instead?
1136 // [this is done after every $ilAuth->logout() call elsewhere]
1138
1139 // :TODO: keep session because of cart content?
1140 if(!isset($_GET['forceShoppingCartRedirect']))
1141 {
1142 $_SESSION = array();
1143 }
1144 else
1145 {
1146 ilSession::set("AccountId", "");
1147 }
1148 }
1149
1150 }
1151
1157 public static function authenticate()
1158 {
1159 global $ilAuth, $ilias, $ilErr;
1160
1161 $current_script = substr(strrchr($_SERVER["PHP_SELF"], "/"), 1);
1162
1163 if(self::blockedAuthentication($current_script))
1164 {
1165 return;
1166 }
1167
1168 $oldSid = session_id();
1169
1170 $ilAuth->start();
1171 $ilias->setAuthError($ilErr->getLastError());
1172
1173 if(IS_PAYMENT_ENABLED)
1174 {
1175 // cart is "attached" to session, has to be updated
1176 $newSid = session_id();
1177 if($oldSid != $newSid)
1178 {
1179 include_once './Services/Payment/classes/class.ilPaymentShoppingCart.php';
1180 ilPaymentShoppingCart::_migrateShoppingCart($oldSid, $newSid);
1181 }
1182 }
1183
1184 if($ilAuth->getAuth() && $ilAuth->getStatus() == '')
1185 {
1186 self::initUserAccount();
1187
1188 self::handleAuthenticationSuccess();
1189 }
1190 else
1191 {
1192 if (!self::showingLoginForm($current_script))
1193 {
1194 // :TODO: should be moved to context?!
1195 $mandatory_auth = ($current_script != "shib_login.php"
1196 && $current_script != "shib_logout.php"
1197 && $current_script != "error.php"
1198 && $current_script != "chat.php"
1199 && $current_script != "index.php"); // #10316
1200
1201 if($mandatory_auth)
1202 {
1203 self::handleAuthenticationFail();
1204 }
1205 }
1206 }
1207 }
1208
1212 protected static function handleAuthenticationSuccess()
1213 {
1217 global $ilUser;
1218
1219 require_once 'Services/Tracking/classes/class.ilOnlineTracking.php';
1220 ilOnlineTracking::updateAccess($ilUser);
1221 }
1222
1226 protected static function handleAuthenticationFail()
1227 {
1232 global $ilAuth, $ilSetting;
1233
1234 // #10608
1236 {
1237 throw new Exception("Authentication failed.");
1238 }
1239
1240 $status = $ilAuth->getStatus();
1241
1242 if($ilSetting->get('pub_section') &&
1243 ($status == '' || $status == AUTH_EXPIRED || $status == AUTH_IDLED) &&
1244 $_GET['reloadpublic'] != '1'
1245 )
1246 {
1247 self::goToPublicSection($status);
1248 }
1249 else
1250 {
1251 self::goToLogin($status);
1252 }
1253 }
1254
1258 protected static function initHTML()
1259 {
1260 global $ilUser;
1261
1262 if(ilContext::hasUser())
1263 {
1264 // load style definitions
1265 // use the init function with plugin hook here, too
1267 }
1268
1269 // $tpl
1270 $tpl = new ilTemplate("tpl.main.html", true, true);
1271 self::initGlobal("tpl", $tpl);
1273 {
1278 global $ilUser, $ilCtrl;
1279
1280 require_once 'Services/User/classes/class.ilUserRequestTargetAdjustment.php';
1281 $request_adjuster = new ilUserRequestTargetAdjustment($ilUser, $ilCtrl);
1282 $request_adjuster->adjust();
1283 }
1284
1285 // load style sheet depending on user's settings
1286 $location_stylesheet = ilUtil::getStyleSheetLocation();
1287 $tpl->setVariable("LOCATION_STYLESHEET",$location_stylesheet);
1288
1289 require_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
1290
1291 self::initGlobal("ilNavigationHistory", "ilNavigationHistory",
1292 "Services/Navigation/classes/class.ilNavigationHistory.php");
1293
1294 self::initGlobal("ilBrowser", "ilBrowser",
1295 "./Services/Utilities/classes/class.ilBrowser.php");
1296
1297 self::initGlobal("ilHelp", "ilHelpGUI",
1298 "Services/Help/classes/class.ilHelpGUI.php");
1299
1300 self::initGlobal("ilToolbar", "ilToolbarGUI",
1301 "./Services/UIComponent/Toolbar/classes/class.ilToolbarGUI.php");
1302
1303 self::initGlobal("ilLocator", "ilLocatorGUI",
1304 "./Services/Locator/classes/class.ilLocatorGUI.php");
1305
1306 self::initGlobal("ilTabs", "ilTabsGUI",
1307 "./Services/UIComponent/Tabs/classes/class.ilTabsGUI.php");
1308
1309 if(ilContext::hasUser())
1310 {
1311 // $ilMainMenu
1312 include_once './Services/MainMenu/classes/class.ilMainMenuGUI.php';
1313 $ilMainMenu = new ilMainMenuGUI("_top");
1314 self::initGlobal("ilMainMenu", $ilMainMenu);
1315 unset($ilMainMenu);
1316
1317
1318 // :TODO: tableGUI related
1319
1320 // set hits per page for all lists using table module
1321 $_GET['limit'] = (int) $ilUser->getPref('hits_per_page');
1322 ilSession::set('tbl_limit', $_GET['limit']);
1323
1324 // the next line makes it impossible to save the offset somehow in a session for
1325 // a specific table (I tried it for the user administration).
1326 // its not posssible to distinguish whether it has been set to page 1 (=offset = 0)
1327 // or not set at all (then we want the last offset, e.g. being used from a session var).
1328 // So I added the wrapping if statement. Seems to work (hopefully).
1329 // Alex April 14th 2006
1330 if (isset($_GET['offset']) && $_GET['offset'] != "") // added April 14th 2006
1331 {
1332 $_GET['offset'] = (int) $_GET['offset']; // old code
1333 }
1334 }
1335 else
1336 {
1337 // several code parts rely on ilObjUser being always included
1338 include_once "Services/User/classes/class.ilObjUser.php";
1339 }
1340 }
1341
1347 protected static function getCurrentCmd()
1348 {
1349 $cmd = $_REQUEST["cmd"];
1350 if(is_array($cmd))
1351 {
1352 return array_shift(array_keys($cmd));
1353 }
1354 else
1355 {
1356 return $cmd;
1357 }
1358 }
1359
1365 protected static function blockedAuthentication($a_current_script)
1366 {
1367 if($a_current_script == "register.php" ||
1368 $a_current_script == "pwassist.php" ||
1369 $a_current_script == "confirmReg.php" ||
1370 $a_current_script == "il_securimage_play.php" ||
1371 $a_current_script == "il_securimage_show.php")
1372 {
1373 return true;
1374 }
1375
1376 if($_REQUEST["baseClass"] == "ilStartUpGUI")
1377 {
1378 $cmd_class = $_REQUEST["cmdClass"];
1379
1380 if($cmd_class == "ilaccountregistrationgui" ||
1381 $cmd_class == "ilpasswordassistancegui")
1382 {
1383 return true;
1384 }
1385
1387 if($cmd == "showTermsOfService" || $cmd == "showClientList" ||
1388 $cmd == 'showAccountMigration' || $cmd == 'migrateAccount' ||
1389 $cmd == 'processCode')
1390 {
1391 return true;
1392 }
1393 }
1394
1395 // #12884
1396 if(($a_current_script == "goto.php" && $_GET["target"] == "impr_0") ||
1397 $_GET["baseClass"] == "ilImprintGUI")
1398 {
1399 return true;
1400 }
1401
1402 return false;
1403 }
1404
1410 protected static function showingLoginForm($a_current_script)
1411 {
1412 if($a_current_script == "login.php")
1413 {
1414 return true;
1415 }
1416
1417 if($_REQUEST["baseClass"] == "ilStartUpGUI" &&
1418 self::getCurrentCmd() == "showLogin")
1419 {
1420 return true;
1421 }
1422
1423 return false;
1424 }
1425
1433 protected static function translateMessage($a_message_id, array $a_message_static = null)
1434 {
1435 global $ilDB, $lng, $ilSetting, $ilClientIniFile, $ilUser;
1436
1437 // current language
1438 if(!$lng)
1439 {
1440 $lang = "en";
1441 if($ilUser)
1442 {
1443 $lang = $ilUser->getLanguage();
1444 }
1445 else if($_REQUEST["lang"])
1446 {
1447 $lang = (string)$_REQUEST["lang"];
1448 }
1449 else if($ilSetting)
1450 {
1451 $lang = $ilSetting->get("language");
1452 }
1453 else if($ilClientIniFile)
1454 {
1455 $lang = $ilClientIniFile->readVariable("language", "default");
1456 }
1457 }
1458 else
1459 {
1460 $lang = $lng->getLangKey();
1461 }
1462
1463 $message = "";
1464 if($ilDB && $a_message_id)
1465 {
1466 if(!$lng)
1467 {
1468 require_once "./Services/Language/classes/class.ilLanguage.php";
1469 $lng = new ilLanguage($lang);
1470 }
1471
1472 $lng->loadLanguageModule("init");
1473 $message = $lng->txt($a_message_id);
1474 }
1475 else if(is_array($a_message_static))
1476 {
1477 if(!isset($a_message_static[$lang]))
1478 {
1479 $lang = "en";
1480 }
1481 $message = $a_message_static[$lang];
1482 }
1483
1484 return utf8_decode($message);
1485 }
1486
1494 protected static function redirect($a_target, $a_message_id, $a_message_static)
1495 {
1496 // #12739
1497 if(defined("ILIAS_HTTP_PATH") &&
1498 !stristr($a_target, ILIAS_HTTP_PATH))
1499 {
1500 $a_target = ILIAS_HTTP_PATH."/".$a_target;
1501 }
1502
1504 {
1505 ilUtil::redirect($a_target);
1506 }
1507 else
1508 {
1509 $message = self::translateMessage($a_message_id, $a_message_static);
1510
1511 // user-directed linked message
1513 {
1514 $link = self::translateMessage("init_error_redirect_click",
1515 array("en" => 'Please click to continue.',
1516 "de" => 'Bitte klicken um fortzufahren.'));
1517 $mess = $message.
1518 '<br /><a href="'.$a_target.'">'.$link.'</a>';
1519 }
1520 // plain text
1521 else
1522 {
1523 // not much we can do here
1524 $mess = $message;
1525
1526 if(!trim($mess))
1527 {
1528 $mess = self::translateMessage("init_error_redirect_info",
1529 array("en" => 'Redirect not supported by context.',
1530 "de" => 'Weiterleitungen werden durch Kontext nicht unterstützt.')).
1531 ' ('.$a_target.')';
1532 }
1533 }
1534
1535 self::abortAndDie($mess);
1536 }
1537 }
1538}
1539
1540?>
const AUTH_EXPIRED
Returned if session has expired.
Definition: Auth.php:34
const AUTH_IDLED
Returned if session exceeds idle time.
Definition: Auth.php:30
const PEAR_ERROR_CALLBACK
Definition: PEAR.php:35
global $tpl
Definition: ilias.php:8
$_GET["client_id"]
setErrorHandling($mode=null, $options=null)
Sets how errors generated by this object should be handled.
Definition: PEAR.php:335
const IL_COMP_SERVICE
_initAuth()
initialises $ilAuth
static usesTemplate()
Uses template engine.
static doAuthentication()
Try authentication.
static supportsRedirects()
Are redirects supported?
static hasUser()
Based on user authentication?
static getType()
Get context type.
static hasHTML()
Has HTML output.
static usesHTTP()
Uses HTTP aka browser.
static initClient()
Init client.
const CONTEXT_SOAP
static getWrapper($a_type, $a_inactive_mysqli=null)
static start()
Start task scheduler for each server instance.
HTTPS.
static getInstance()
Get https instance.
INIFile Parser.
ILIAS Initialisation Utility Class perform basic setup: init database handler, load configuration fil...
static blockedAuthentication($a_current_script)
Block authentication based on current request.
static initDatabase()
initialise database object $ilDB
static initILIAS()
ilias initialisation
static initLocale()
Init Locale.
static removeUnsafeCharacters()
Remove unsafe characters from GET.
static buildHTTPPath()
builds http path
static requireCommonIncludes()
get common include code files
static initClientIniFile()
This method provides a global instance of class ilIniFile for the client.ini.php file in variable $il...
static getCurrentCmd()
Extract current cmd from request.
static initClient()
Init client-based objects (level 1)
static initCore()
Init core objects (level 0)
static includePhp5Compliance()
This is a hack for authentication.
static redirect($a_target, $a_message_id, $a_message_static)
Redirects to target url if context supports it.
static goToPublicSection($a_auth_stat="")
go to public section
static goToLogin($a_auth_stat="")
go to login
static initLanguage()
$lng initialisation
static determineClient()
This method determines the current client and sets the constant CLIENT_ID.
static authenticate()
Try authentication.
static translateMessage($a_message_id, array $a_message_static=null)
Translate message if possible.
static initLog()
Init log instance.
static setSessionHandler()
set session handler to db
static handleDevMode()
Prepare developer tools
static showingLoginForm($a_current_script)
Is current view the login form?
static initUser()
Init user / authentification (level 2)
static initGlobal($a_name, $a_class, $a_source_file=null)
Initialize global instance.
static abortAndDie($a_message)
Exit.
static setCookieParams()
set session cookie params for path, domain, etc.
static initSettings()
initialise $ilSettings object and define constants
static handleMaintenanceMode()
handle maintenance mode
static initAccessHandling()
$ilAccess and $rbac... initialisation
static initIliasIniFile()
This method provides a global instance of class ilIniFile for the ilias.ini.php file in variable $ilI...
static initStyle()
provide $styleDefinition object
language handling
ILIAS Log exception class.
logging
Definition: class.ilLog.php:19
Handles display of the main menu.
static getPluginObject($a_ctype, $a_cname, $a_slot_id, $a_pname)
Get Plugin Object.
Database Session Handling.
static _exists($a_session_id)
Check whether session exists.
static set($a_var, $a_val)
Set a value.
static setClosingContext($a_context)
set closing context (for statistics)
const SESSION_CLOSE_LOGIN
static _destroy($a_session_id, $a_closing_context=null, $a_expired_at=null)
Destroy session.
static get($a_var)
Get a value.
const SESSION_CLOSE_PUBLIC
const SESSION_CLOSE_EXPIRE
special template class to simplify handling of ITX/PEAR
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...
Class ilUserAccountMaintenanceEnforcement.
static setCookie($a_cookie_name, $a_cookie_value='', $a_also_set_super_global=true, $a_set_cookie_invalid=false)
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
http redirect to other script
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
static removeTrailingPathSeparators($path)
$_POST['username']
Definition: cron.php:12
$_COOKIE["ilClientId"]
Definition: cron.php:11
$GLOBALS['ct_recipient']
< a tabindex="-1" style="border-style: none;" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = './securimage_show.php?sid=' + Math.random(); this.blur(); return false">< img src="./images/refresh.png" alt="Reload Image" height="32" width="32" onclick="this.blur()" align="bottom" border="0"/></a >< br/>< strong > Enter Code *if($_SERVER['REQUEST_METHOD']=='POST' &&@ $_POST['do']=='contact') $_SESSION['ctform']['success']
global $ilCtrl
Definition: ilias.php:18
$client_id
const ILIAS_MODULE
Definition: payment.php:15
global $lng
Definition: privfeed.php:40
global $ilSetting
Definition: privfeed.php:40
$cmd
Definition: sahs_server.php:35
$path
Definition: index.php:22
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
const IL_COOKIE_PATH
Definition: index.php:6
global $ilDB
global $ilIliasIniFile
global $ilUser
Definition: imgupload.php:15
global $https
Definition: imgupload.php:15
$dirs
const ILIAS_WEB_DIR
const ILIAS_ABSOLUTE_PATH