Go to the documentation of this file.00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00034
00035 if (!file_exists(getcwd()."/ilias.ini.php"))
00036 {
00037 header("Location: ./setup/setup.php");
00038 exit();
00039 }
00040
00041
00042
00043 if (isset($_GET["client_id"]))
00044 {
00045 setcookie("ilClientId",$_GET["client_id"]);
00046 $_COOKIE["ilClientId"] = $_GET["client_id"];
00047 }
00048
00049 require_once "include/inc.get_pear.php";
00050 require_once "include/inc.check_pear.php";
00051 require_once "include/inc.header.php";
00052
00053
00054 if (!isset($_GET["client_id"]) and !isset($_GET["cmd"]) and $ilias->ini_ilias->readVariable("clients","list"))
00055 {
00056
00057 if ($_GET["reload"])
00058 {
00059 if ($_GET["inactive"])
00060 {
00061 echo "<script language=\"Javascript\">\ntop.location.href = \"./login.php?inactive=true\";\n</script>\n";
00062 }
00063 else
00064 {
00065 echo "<script language=\"Javascript\">\ntop.location.href = \"./login.php?expired=true\";\n</script>\n";
00066 }
00067 }
00068
00069 include_once "./include/inc.client_list.php";
00070 exit();
00071 }
00072
00073 if ($_GET["cmd"] == "login")
00074 {
00075 $ilias->auth->logout();
00076 session_destroy();
00077
00078
00079 $client_id = $_COOKIE["ilClientId"];
00080 setcookie("ilClientId","");
00081 $_COOKIE["ilClientId"] = "";
00082
00083 ilUtil::redirect("login.php?client_id=".$client_id."&lang=".$_GET['lang']);
00084 }
00085
00086
00087 if (!$ilias->getSetting("setup_ok"))
00088 {
00089 echo "setup is not completed. Please run setup routine again.";
00090 exit();
00091 }
00092
00093
00094 $start = $ilias->ini->readVariable("server", "start");
00095
00096
00097 if ($start == "")
00098 {
00099 $start = "login.php";
00100 }
00101
00102 if ($ilias->getSetting("pub_section"))
00103 {
00104 $start = "nologin.php";
00105 }
00106
00107 $connector = "?";
00108
00109
00110 if ($_GET["reload"])
00111 {
00112 if ($_GET["inactive"])
00113 {
00114 $start .= "?reload=true&inactive=true";
00115 }
00116 else
00117 {
00118 $start .= "?reload=true";
00119 }
00120 $connector = "&";
00121 }
00122
00123 ilUtil::redirect($start.$connector."return_to=".rawurlencode($_GET["return_to"]));
00124 ?>