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 $rep_ref_id = $_SESSION["il_rep_ref_id"];
00076
00077 $ilias->auth->logout();
00078 session_destroy();
00079
00080
00081 $client_id = $_COOKIE["ilClientId"];
00082 setcookie("ilClientId","");
00083 $_COOKIE["ilClientId"] = "";
00084
00085 ilUtil::redirect("login.php?client_id=".$client_id."&lang=".$_GET['lang'].
00086 "&rep_ref_id=".$rep_ref_id);
00087 }
00088
00089
00090 if (!$ilias->getSetting("setup_ok"))
00091 {
00092 echo "setup is not completed. Please run setup routine again.";
00093 exit();
00094 }
00095
00096
00097 $start = $ilias->ini->readVariable("server", "start");
00098
00099
00100 if ($start == "")
00101 {
00102 $start = "login.php";
00103 }
00104
00105 if ($ilias->getSetting("pub_section"))
00106 {
00107 $start = "nologin.php";
00108 }
00109
00110 $connector = "?";
00111
00112
00113 if ($_GET["reload"])
00114 {
00115 if ($_GET["inactive"])
00116 {
00117 $start .= "?reload=true&inactive=true";
00118 }
00119 else
00120 {
00121 $start .= "?reload=true";
00122 }
00123 $connector = "&";
00124 }
00125
00126 ilUtil::redirect($start.$connector."return_to=".rawurlencode($_GET["return_to"]));
00127 ?>