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
00035
00036 $_POST["username"] = "anonymous";
00037 $_POST["password"] = "anonymous";
00038
00039 require_once "include/inc.header.php";
00040
00041 $anon = ANONYMOUS_USER_ID;
00042
00043 if (empty($anon))
00044 {
00045 echo "<p>You enabled the public section feature without declaring a user account as 'anonymous'.";
00046 echo "<br/>Do the following:<ul>";
00047 echo "<li>Go to login.php and log in with a regular user account</li>";
00048 echo "<li>Remember the object_id of a user account designated for anonymous access (you may also add a new user)</li>";
00049 echo "<li>Username and password MUST BE 'anonymous','anonymous'</li>";
00050 echo "<li>Open your ilias.ini.php and enter the object_id to the directive 'ANONYMOUS_USER_ID'</li></ul></p>";
00051 exit();
00052 }
00053
00054 if (!$ilias->getSetting("pub_section"))
00055 {
00056 $ilias->auth->logout();
00057 session_destroy();
00058 ilUtil::redirect("login.php");
00059 }
00060
00061
00062
00063
00064 if ($_GET["reload"])
00065 {
00066 if (!empty($_GET["return_to"]))
00067 {
00068 $return_to = "&return_to=".rawurlencode($_GET["return_to"]);
00069 }
00070
00071 if ($_GET["inactive"])
00072 {
00073 echo "<script language=\"Javascript\">\ntop.location.href = \"./login.php?inactive=true".$return_to."\";\n</script>\n";
00074 }
00075 else
00076 {
00077 echo "<script language=\"Javascript\">\ntop.location.href = \"./login.php?expired=true".$return_to."\";\n</script>\n";
00078 }
00079
00080 exit();
00081 }
00082
00083
00084 if ($ilias->auth->getAuth())
00085 {
00086 ilUtil::redirect("start.php");
00087 }
00088 else
00089 {
00090 echo "ANONYMOUS user with the object_id ".ANONYMOUS_USER_ID." not found!";
00091 exit();
00092 }
00093 ?>