13 if(!isset(self::$_instance))
31 $res = $this->db->query(
'SELECT * FROM payment_settings');
33 $this->setting = array();
34 while(
$row = $this->db->fetchAssoc(
$res))
36 $this->setting[
$row[
"keyword"]] = $row[
"value"];
45 public function get($a_key)
47 return $this->setting[$a_key];
54 $res = $ilDB->queryF(
'
55 SELECT * FROM payment_settings
57 array(
'text'), array($a_scope));
60 while(
$row = $this->db->fetchAssoc(
$res))
62 $settings[
$row[
"keyword"]] = $row[
"value"];
75 public function set($a_key, $a_val, $a_scope = null)
82 $res = $ilDB->queryF(
'
83 SELECT scope FROM payment_settings
85 array(
'text'), array($a_key));
88 $a_scope =
$row[
'scope'];
95 $ilDB->insert(
"payment_settings", array(
96 "keyword" => array(
"text", $a_key),
97 "value" => array(
"clob", $a_val),
98 "scope" => array(
"text", $a_scope)));
100 self::$_instance->setting[$a_key] = $a_val;
105 public function delete($a_key)
110 DELETE FROM payment_settings
112 array(
'text'), array($a_key));
117 if(!isset(self::$_instance))
122 return self::$_instance->setting[
'shop_enabled'];
127 self::set(
'mail_use_placeholders',$a_mail_use_placeholders);
132 # $res = $ilDB->manipulateF('UPDATE payment_settings
133 # SET mail_use_placeholders = %s',
134 # array('integer'), array($a_mail_use_placeholders));
140 if(!isset(self::$_instance))
145 return self::$_instance->setting[
'mail_use_placeholders'];
150 self::set(
'mail_billing_text',$a_mail_billing_text);
154 # $ilDB->update('payment_settings',
155 # array('mail_billing_text' => array('clob', $a_mail_billing_text)),
156 # array('settings_id' => array('integer',1)));
161 if(!isset(self::$_instance))
166 return self::$_instance->setting[
'mail_billing_text'];
172 if(!isset(self::$_instance))
177 return self::$_instance->setting[
'use_shop_specials'];