ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
studip_referrer.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
11 /* ILIAS Version 4.0.2 */
12 
13 if(file_exists("./ilias.ini.php")){
14  require_once("./Services/Init/classes/class.ilIniFile.php");
15  $ilIliasIniFile = new ilIniFile("./ilias.ini.php");
16  $ilIliasIniFile->read();
17  $serverSettings = $ilIliasIniFile->readGroup("server");
18  if ($serverSettings["studip"] != 1)
19  {
20  echo 'Option "studip" in ilias.ini.php is not enabled. You need to add studip = "1" to the server section.';
21  exit();
22  }
23 
24  if (isset($_GET['sess_id']))
25  {
26  setcookie('PHPSESSID',$_GET['sess_id']);
27  $_COOKIE['PHPSESSID'] = $_GET['sess_id'];
28  }
29 
30  if (isset($_GET['client_id']))
31  {
32  setcookie('ilClientId',$_GET['client_id']);
33  $_COOKIE['ilClientId'] = $_GET['client_id'];
34  }
35 
36  require_once "./include/inc.header.php";
37 
38  $jump_to = 'index.php';
39 
40  // redirect to specified page
41  $redirect = false;
42  switch($_GET['target'])
43  {
44  case 'start':
45  switch($_GET['type'])
46  {
47  case 'lm':
48  $_GET['baseClass'] = 'ilLMPresentationGUI';
49  $jump_to = 'ilias.php';
50  break;
51  case 'tst':
52  $_GET['cmd'] = 'infoScreen';
53  $_GET['baseClass'] = 'ilObjTestGUI';
54  $jump_to = 'ilias.php';
55  break;
56  case 'sahs':
57  $jump_to = 'ilias.php?baseClass=ilSAHSPresentationGUI&ref_id='.$_GET['ref_id'];
58  $redirect = true;
59  break;
60  case 'htlm':
61  $_GET['baseClass'] = 'ilHTLMPresentationGUI';
62  $jump_to = 'ilias.php';
63  break;
64  case 'glo':
65  $_GET['baseClass'] = 'ilGlossaryPresentationGUI';
66  $jump_to = 'ilias.php';
67  break;
68  default:
69  unset($jump_to);
70  }
71  break;
72  case 'new':
73  $_POST['new_type'] = $_GET['type'];
74  $_POST['cmd']['create'] = 'add';
75  $_GET['cmd'] = 'post';
76  $_GET[ilCtrl::IL_RTOKEN_NAME] = $ilCtrl->getRequestToken();
77  $_GET['baseClass'] = 'ilRepositoryGUI';
78  $jump_to = 'ilias.php';
79  break;
80  case 'edit':
81  switch($_GET['type'])
82  {
83  case 'lm':
84  $_GET['baseClass'] = 'ilLMEditorGUI';
85  $jump_to = 'ilias.php';
86  break;
87  case 'tst':
88  $_GET['cmd'] = '';
89  $_GET['baseClass'] = 'ilObjTestGUI';
90  $jump_to = 'ilias.php';
91  break;
92  case 'sahs':
93  $_GET['baseClass'] = 'ilSAHSEditGUI';
94  $jump_to = 'ilias.php';
95  break;
96  case 'htlm':
97  $_GET['baseClass'] = 'ilHTLMEditorGUI';
98  $jump_to = 'ilias.php';
99  break;
100  case 'glo':
101  $_GET['baseClass'] = 'ilGlossaryEditorGUI';
102  $jump_to = 'ilias.php';
103  break;
104  default:
105  unset($jump_to);
106  }
107  break;
108  case 'login':
109  break;
110  default:
111  unset($jump_to);
112  }
113  if ($redirect)
114  {
115  header("Location: ".$jump_to);
116  exit();
117  }
118  elseif(isset($jump_to))
119  {
120  include($jump_to);
121  }
122 }
123 ?>