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
00034 include_once "./payment/classes/class.ilPaymentVendors.php";
00035 include_once "./payment/classes/class.ilPaymentBaseGUI.php";
00036 include_once "./payment/classes/class.ilPaymentTrustees.php";
00037 include_once "./payment/classes/class.ilPaymentBillAdminGUI.php";
00038
00039
00040 class ilPaymentAdminGUI extends ilPaymentBaseGUI
00041 {
00042 var $ctrl;
00043
00044 var $user_obj;
00045
00046 function ilPaymentAdminGUI(&$user_obj)
00047 {
00048 global $ilCtrl;
00049
00050 $this->ctrl =& $ilCtrl;
00051
00052 $this->ilPaymentBaseGUI();
00053 $this->setMainSection($this->ADMIN);
00054
00055
00056 $this->user_obj =& $user_obj;
00057 }
00061 function &executeCommand()
00062 {
00063 global $tree,$ilTabs;
00064
00065 $cmd = $this->ctrl->getCmd();
00066 switch ($this->ctrl->getNextClass($this))
00067 {
00068 case 'ilpaymenttrusteegui':
00069 $this->setSection($this->SECTION_TRUSTEE);
00070 $this->buildHeader();
00071
00072 include_once './payment/classes/class.ilPaymentTrusteeGUI.php';
00073
00074 $pt =& new ilPaymentTrusteeGUI($this->user_obj);
00075
00076 $this->ctrl->forwardCommand($pt);
00077
00078 break;
00079
00080 case 'ilpaymentobjectgui':
00081 $this->setSection($this->SECTION_OBJECT);
00082 $this->buildHeader();
00083
00084 include_once './payment/classes/class.ilPaymentObjectGUI.php';
00085
00086 $po =& new ilPaymentObjectGUI($this->user_obj);
00087
00088 $this->ctrl->forwardCommand($po);
00089 break;
00090
00091 case 'ilpaymentstatisticgui':
00092 $this->setSection($this->SECTION_STATISTIC);
00093 $this->buildHeader();
00094
00095 include_once './payment/classes/class.ilPaymentStatisticGUI.php';
00096
00097 $ps =& new ilPaymentStatisticGUI($this->user_obj);
00098
00099 $this->ctrl->forwardCommand($ps);
00100 break;
00101
00102 case 'ilpaymentbilladmingui':
00103 $this->setSection($this->SECTION_OBJECT);
00104 $this->buildHeader();
00105
00106 include_once './payment/classes/class.ilPaymentBillAdminGUI.php';
00107
00108 $po =& new ilPaymentBillAdminGUI($this->user_obj,$_GET['pobject_id']);
00109
00110 $this->ctrl->forwardCommand($po);
00111 break;
00112
00113
00114 default:
00115 $this->__forwardToDefault();
00116 break;
00117 }
00118 }
00119
00120 function __forwardToDefault()
00121 {
00122
00123 if(ilPaymentVendors::_isVendor($this->user_obj->getId()) or
00124 ilPaymentTrustees::_hasStatisticPermission($this->user_obj->getId()))
00125 {
00126 $this->ctrl->redirectByClass('ilpaymentstatisticgui');
00127 }
00128 else if(ilPaymentTrustees::_hasObjectPermission($this->user_obj->getId()))
00129 {
00130 $this->ctrl->redirectByClass('ilpaymentobjectgui');
00131 }
00132
00133 echo 'No access to payment admin';
00134
00135 return false;
00136 }
00137
00138 }
00139 ?>