ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
goto.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2001 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
36 //var_dump ($_SESSION);
37 //var_dump ($_COOKIE);
38 
39 // this should bring us all session data of the desired
40 // client
41 if (isset($_GET["client_id"]))
42 {
43  setcookie("ilClientId",$_GET["client_id"]);
44  $_COOKIE["ilClientId"] = $_GET["client_id"];
45 }
46 
47 require_once "./include/inc.header.php";
48 
49 // special handling for direct navigation request
50 require_once "./Services/Navigation/classes/class.ilNavigationHistoryGUI.php";
52 $nav_hist->handleNavigationRequest();
53 
54 $r_pos = strpos($_GET["target"], "_");
55 $rest = substr($_GET["target"], $r_pos+1);
56 
57 $target_arr = explode("_", $_GET["target"]);
60 $target_ref_id = $target_arr[2]; // optional for pages
61 
62 
63 // if anonymous and goto is not granted: go to login page
64 include_once("Services/Init/classes/class.ilStartUpGUI.php");
65 if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID && !ilStartUpGUI::_checkGoto($_GET["target"]))
66 {
67  ilUtil::redirect("login.php?target=".$_GET["target"]."&cmd=force_login&lang=".$ilUser->getCurrentLanguage());
68 }
69 
70 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
71 //
72 // FOR NEW OBJECT TYPES:
73 // PLEASE USE DEFAULT IMPLEMENTATION ONLY
74 //
75 // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
76 
77 switch($target_type)
78 {
79  // exception, must be kept for now
80  case "pg":
81  require_once("./Modules/LearningModule/classes/class.ilLMPageObjectGUI.php");
83  break;
84 
85  // exception, must be kept for now
86  case "st":
87  require_once("./Modules/LearningModule/classes/class.ilStructureObjectGUI.php");
89  break;
90 
91  // exception, must be kept for now
92  case "git":
93  require_once("./Modules/Glossary/classes/class.ilGlossaryTermGUI.php");
96  break;
97 
98  // please migrate to default branch implementation
99  case "glo":
100  require_once("./Modules/Glossary/classes/class.ilObjGlossaryGUI.php");
102  break;
103 
104  // please migrate to default branch implementation
105  case "lm":
106  case "dbk":
107  require_once("./Modules/LearningModule/classes/class.ilObjContentObjectGUI.php");
109  break;
110 
111  // please migrate to default branch implementation
112  case "htlm":
113  require_once("./Modules/HTMLLearningModule/classes/class.ilObjFileBasedLMGUI.php");
115  break;
116 
117  // please migrate to default branch implementation
118  case "frm":
119  require_once("./Modules/Forum/classes/class.ilObjForumGUI.php");
120  $target_thread = $target_arr[2];
121  $target_posting = $target_arr[3];
122  ilObjForumGUI::_goto($target_id, $target_thread, $target_posting);
123  break;
124 
125  // please migrate to default branch implementation
126  case "exc":
127  require_once("./Modules/Exercise/classes/class.ilObjExerciseGUI.php");
129  break;
130 
131  // please migrate to default branch implementation
132  case "tst":
133  require_once("./Modules/Test/classes/class.ilObjTestGUI.php");
135  break;
136 
137  // please migrate to default branch implementation
138  case "qpl":
139  require_once("./Modules/TestQuestionPool/classes/class.ilObjQuestionPoolGUI.php");
141  break;
142 
143  // please migrate to default branch implementation
144  case "spl":
145  require_once("./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPoolGUI.php");
147  break;
148 
149  // please migrate to default branch implementation
150  case "svy":
151  require_once("./Modules/Survey/classes/class.ilObjSurveyGUI.php");
152  if (array_key_exists("accesscode", $_GET))
153  {
154  ilObjSurveyGUI::_goto($target_id, $_GET["accesscode"]);
155  }
156  else
157  {
159  }
160  break;
161 
162  // please migrate to default branch implementation
163  case "webr":
164  require_once("./Modules/WebResource/classes/class.ilObjLinkResourceGUI.php");
166  break;
167 
168  // please migrate to default branch implementation
169  case "chat":
170  require_once("./Modules/Chat/classes/class.ilObjChatGUI.php");
172  break;
173 
174  // please migrate to default branch implementation
175  case "sahs":
176  require_once("./Modules/ScormAicc/classes/class.ilObjSAHSLearningModuleGUI.php");
178  break;
179 
180  // please migrate to default branch implementation
181  case "cat":
182  require_once("./Modules/Category/classes/class.ilObjCategoryGUI.php");
184  break;
185 
186  // please migrate to default branch implementation
187  case "crs":
188  require_once("Modules/Course/classes/class.ilObjCourseGUI.php");
190  break;
191 
192  // please migrate to default branch implementation
193  case "grp":
194  require_once("./Modules/Group/classes/class.ilObjGroupGUI.php");
196  break;
197 
198  // please migrate to default branch implementation
199  case 'fold':
200  require_once("./Modules/Folder/classes/class.ilObjFolderGUI.php");
202  break;
203 
204  // please migrate to default branch implementation
205  case "file":
206  require_once("./Modules/File/classes/class.ilObjFileGUI.php");
208  break;
209 
210  // please migrate to default branch implementation
211  case "mcst":
212  require_once("./Modules/MediaCast/classes/class.ilObjMediaCastGUI.php");
214  break;
215 
216  // please migrate to default branch implementation
217  case 'icrs':
218  require_once 'Modules/ILinc/classes/class.ilObjiLincCourseGUI.php';
220  break;
221 
222  // please migrate to default branch implementation
223  case 'root':
224  require_once('./Modules/RootFolder/classes/class.ilObjRootFolderGUI.php');
226  break;
227 
228 
229  //
230  // default implementation (should be used by all new object types)
231  //
232  default:
233  $class_name = "ilObj".$objDefinition->getClassName($target_type)."GUI";
234  $location = $objDefinition->getLocation($target_type);
235  if (is_file($location."/class.".$class_name.".php"))
236  {
237  include_once($location."/class.".$class_name.".php");
238  call_user_func(array($class_name, "_goto"), $rest);
239  }
240  break;
241 }
242 ?>