28 $this->pm_id = $a_pm_id;
37 $this->pm_id = $a_pm_id;
46 $this->pm_title = $a_pm_title;
55 $this->pm_enabled = $a_pm_enabled;
64 $this->save_usr_adr = $a_save_usr_adr;
75 $res = $ilDB->query(
'SELECT count(pm_id) cnt FROM payment_paymethods');
83 $res = $this->db->queryF(
'SELECT * FROM payment_paymethods WHERE pm_id = %s',
84 array(
'integer'), array($this->
getPmId()));
87 while(
$row = $this->db->fetchAssoc(
$res))
98 $res = $this->db->query(
'SELECT * FROM payment_paymethods');
99 $paymethods = array();
101 while(
$row = $this->db->fetchAssoc(
$res))
103 $paymethods[$counter][
'pm_id'] =
$row[
'pm_id'];
104 $paymethods[$counter][
'pm_title'] =
$row[
'pm_title'];
105 $paymethods[$counter][
'pm_enabled'] =
$row[
'pm_enabled'];
106 $paymethods[$counter][
'save_usr_adr'] =
$row[
'save_usr_adr'];
116 $res = $ilDB->queryF(
'SELECT pm_enabled FROM payment_paymethods WHERE pm_id = %s',
117 array(
'integer'), array($a_id));
121 return (
int)
$row[
'pm_enabled'];
129 $res = $ilDB->manipulateF(
'UPDATE payment_paymethods SET pm_enabled = 0
131 array(
'integer'), array($a_id));
138 $res = $ilDB->manipulateF(
'UPDATE payment_paymethods SET pm_enabled = 1
140 array(
'integer'), array($a_id));
147 $res = $ilDB->manipulateF(
'UPDATE payment_paymethods SET pm_enabled = %s',
148 array(
'integer'), array(
'0'));
156 $res = $ilDB->manipulateF(
'UPDATE payment_paymethods SET save_usr_adr = 0
158 array(
'integer'), array($a_id));
165 $res = $ilDB->manipulateF(
'UPDATE payment_paymethods SET save_usr_adr = 1
167 array(
'integer'), array($a_id));
174 $res = $ilDB->queryF(
'SELECT save_usr_adr FROM payment_paymethods WHERE pm_id = %s',
175 array(
'integer'), array($a_id));
179 return (
int)
$row[
'save_usr_adr'];
186 $res = $ilDB->queryF(
'SELECT pm_id FROM payment_paymethods WHERE pm_title = %s',
187 array(
'text'), array($a_pm_title));
190 return (
int)
$row[
'pm_id'];
196 $res = $ilDB->queryF(
'SELECT pm_title FROM payment_paymethods WHERE pm_id = %s',
197 array(
'integer'), array($a_pm_id));
200 return $row[
'pm_title'];
213 case 'PAY_METHOD_BILL':
return $lng->txt(
'pays_bill');
219 case 'PAY_METHOD_BMF':
return $lng->txt(
'pays_bmf');
225 case 'PAY_METHOD_PAYPAL':
return $lng->txt(
'pays_paypal');
231 case 'PAY_METHOD_EPAY':
return $lng->txt(
'pays_epay');
233 case 'PAY_METHOD_NOT_SPECIFIED':
return $lng->txt(
'paya_pay_method_not_specified');
236 return $lng->txt(
'paya_pay_method_not_specified');
248 $res = $ilDB->query(
'SELECT * FROM payment_paymethods WHERE pm_enabled = 1');
255 $options[
'all'] = $lng->txt(
'pay_all');
257 case 'not_specified':
258 $options[0] = $lng->txt(
'paya_pay_method_not_specified');
263 while(
$row = $ilDB->fetchAssoc(
$res))
277 $res = $ilDB->queryf(
'SELECT * FROM payment_paymethods WHERE pm_enabled = %s',
278 array(
'integer'), array(1));
280 while(
$row = $ilDB->fetchAssoc(
$res))