• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

index.php

Go to the documentation of this file.
00001 <?php
00002 /*
00003         +-----------------------------------------------------------------------------+
00004         | ILIAS open source                                                           |
00005         +-----------------------------------------------------------------------------+
00006         | Copyright (c) 1998-2001 ILIAS open source, University of Cologne            |
00007         |                                                                             |
00008         | This program is free software; you can redistribute it and/or               |
00009         | modify it under the terms of the GNU General Public License                 |
00010         | as published by the Free Software Foundation; either version 2              |
00011         | of the License, or (at your option) any later version.                      |
00012         |                                                                             |
00013         | This program is distributed in the hope that it will be useful,             |
00014         | but WITHOUT ANY WARRANTY; without even the implied warranty of              |
00015         | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               |
00016         | GNU General Public License for more details.                                |
00017         |                                                                             |
00018         | You should have received a copy of the GNU General Public License           |
00019         | along with this program; if not, write to the Free Software                 |
00020         | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. |
00021         +-----------------------------------------------------------------------------+
00022 */
00023 
00024 
00034 // jump to setup if ILIAS3 is not installed
00035 if (!file_exists(getcwd()."/ilias.ini.php"))
00036 {
00037     header("Location: ./setup/setup.php");
00038         exit();
00039 }
00040 
00041 // start correct client
00042 // if no client_id is given, default client is loaded (in class.ilias.php)
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 // display client selection list if enabled
00054 if (!isset($_GET["client_id"]) and !isset($_GET["cmd"]) and $ilias->ini_ilias->readVariable("clients","list"))
00055 {
00056         // catch reload
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         // reset cookie
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 // check correct setup
00087 if (!$ilias->getSetting("setup_ok"))
00088 {
00089         echo "setup is not completed. Please run setup routine again.";
00090         exit();
00091 }
00092 
00093 // Specify your start page in ilias.ini.php
00094 $start = $ilias->ini->readVariable("server", "start");
00095 
00096 // if no start page was given, ILIAS defaults to the standard login page
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 // catch reload
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 ?>

Generated on Fri Dec 13 2013 09:06:36 for ILIAS Release_3_4_x_branch .rev 46804 by  doxygen 1.7.1