ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
index.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
13// jump to setup if ILIAS3 is not installed
14if (!file_exists(getcwd()."/ilias.ini.php"))
15{
16 header("Location: ./setup/setup.php");
17 exit();
18}
19
20// BEGIN WebDAV: Block WebDAV Requests from Microsoft WebDAV MiniRedir client.
21// We MUST block WebDAV requests on the root page of the Web-Server
22// in order to make the "Microsoft WebDAV MiniRedir" client work with ILIAS
23// WebDAV.
24// Important: If this index.php page is NOT at the root of your Web-Server, you
25// MUST create an index page at the root of your Web-Server with the same
26// blocking behaviour. If you don't implement this, the "Microsoft WebDAV
27// MiniRedir" client will not work with ILIAS.
28// You can copy the file rootindex.php for this.
29
30// Block WebDAV Requests from Microsoft WebDAV MiniRedir client.
31if ($_SERVER['REQUEST_METHOD'] == 'PROPFIND'
32|| $_SERVER['REQUEST_METHOD'] == 'OPTIONS')
33{
34 $status = '404 Not Found';
35 header("HTTP/1.1 $status");
36 header("X-WebDAV-Status: $status", true);
37 exit;
38}
39// END WebDAV: Block WebDAV Requests from Microsoft WebDAV MiniRedir client.
40
41
42// start correct client
43// if no client_id is given, default client is loaded (in class.ilias.php)
44if (isset($_GET["client_id"]))
45{
46 $cookie_domain = $_SERVER['SERVER_NAME'];
47 $cookie_path = dirname( $_SERVER['PHP_SELF'] );
48
49 /* if ilias is called directly within the docroot $cookie_path
50 is set to '/' expecting on servers running under windows..
51 here it is set to '\'.
52 in both cases a further '/' won't be appended due to the following regex
53 */
54 $cookie_path .= (!preg_match("/[\/|\\\\]$/", $cookie_path)) ? "/" : "";
55
56 if($cookie_path == "\\") $cookie_path = '/';
57
58 $cookie_domain = ''; // Temporary Fix
59
60 setcookie("ilClientId", $_GET["client_id"], 0, $cookie_path, $cookie_domain);
61
62 $_COOKIE["ilClientId"] = $_GET["client_id"];
63}
64
65require_once("Services/Init/classes/class.ilInitialisation.php");
67
68$ilCtrl->initBaseClass("ilStartUpGUI");
69$ilCtrl->setTargetScript("ilias.php");
70$ilCtrl->callBaseClass();
71$ilBench->save();
72
73?>
$_GET["client_id"]
static initILIAS()
ilias initialisation
$_COOKIE["ilClientId"]
Definition: cron.php:11
global $ilBench
Definition: ilias.php:18
global $ilCtrl
Definition: ilias.php:18
exit
Definition: login.php:54