ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilPaymentGUI.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 */
33 include_once "./payment/classes/class.ilPaymentBaseGUI.php";
34 include_once "./payment/classes/class.ilPaymentShoppingCartGUI.php";
35 
36 class ilPaymentGUI extends ilPaymentBaseGUI
37 {
38  var $ctrl;
39 
40  var $user_obj;
41 
43  {
44  global $ilCtrl;
45 
46  $this->ctrl =& $ilCtrl;
47 
48  $this->ilPaymentBaseGUI();
49  $this->setMainSection($this->BASE);
50 
51  // Get user object
52  $this->user_obj =& $user_obj;
53  }
57  function &executeCommand()
58  {
59  global $tree;
60 
61  $cmd = $this->ctrl->getCmd();
62 
63  switch ($this->ctrl->getNextClass($this))
64  {
65  case 'ilpaymentshoppingcartgui':
66  $this->setSection($this->SECTION_SHOPPING_CART);
67  $this->buildHeader();
68 
69  include_once './payment/classes/class.ilPaymentShoppingCartGUI.php';
70 
71  $pt =& new ilPaymentShoppingCartGUI($this->user_obj);
72 
73  $this->ctrl->forwardCommand($pt);
74  break;
75 
76  case 'ilpaymentbuyedobjectsgui':
77  $this->setSection($this->SECTION_BUYED_OBJECTS);
78  $this->buildHeader();
79 
80  include_once './payment/classes/class.ilPaymentBuyedObjectsGUI.php';
81 
82  $pt =& new ilPaymentBuyedObjectsGUI($this->user_obj);
83 
84  $this->ctrl->forwardCommand($pt);
85  break;
86 
87  case 'ilpurchasebillgui':
88  $this->setSection($this->SECTION_BUYED_OBJECTS);
89  $this->buildHeader();
90 
91  include_once './payment/classes/class.ilPurchaseBillGUI.php';
92 
93  $pt =& new ilPurchaseBillGUI($this->user_obj);
94 
95  $this->ctrl->forwardCommand($pt);
96  break;
97 
98 
99  case 'ilpurchasebmfgui':
100  $this->setSection($this->SECTION_BUYED_OBJECTS);
101  $this->buildHeader();
102 
103  include_once './payment/classes/class.ilPurchaseBMFGUI.php';
104 
105  $pt =& new ilPurchaseBMFGUI($this->user_obj);
106 
107  $this->ctrl->forwardCommand($pt);
108  break;
109 
110  default:
111  $this->__forwardToDefault();
112  break;
113  }
114  }
115 
117  {
118  $this->ctrl->redirectByClass('ilpaymentshoppingcartgui');
119 
120  return true;
121  }
122 
123 }
124 ?>