33 if(!isset(self::$_instance))
57 $query =
"SELECT * FROM payment_settings";
58 $result = $this->db->getrow($query);
65 $this->settings_id = $a_settings_id;
69 return $this->settings_id;
74 return $this->settings[$a_type];
84 $query =
"UPDATE payment_settings ";
85 $query .=
"SET currency_unit = '', ";
86 $query .=
"currency_subunit = '', ";
87 $query .=
"address = '', ";
88 $query .=
"bank_data = '', ";
89 $query .=
"add_info = '', ";
90 $query .=
"vat_rate = '', ";
91 $query .=
"pdf_path = '', ";
92 $query .=
"topics_sorting_type = 1, ";
93 $query .=
"topics_sorting_direction = 'asc', ";
94 $query .=
"topics_allow_custom_sorting = 0, ";
95 $query .=
"max_hits = 20, ";
96 $query .=
"shop_enabled = 0 ";
97 $query .=
"WHERE settings_id = '" . $this->
getSettingsId() .
"'";
99 $this->db->query($query);
110 $query =
"UPDATE payment_settings ";
111 $query .=
"SET currency_unit = " . $ilDB->quote($a_values[
"currency_unit"]) .
", ";
112 $query .=
"currency_subunit = " . $ilDB->quote($a_values[
"currency_subunit"]) .
", ";
113 $query .=
"address = " . $ilDB->quote($a_values[
"address"]) .
", ";
114 $query .=
"bank_data = " . $ilDB->quote($a_values[
"bank_data"]) .
", ";
115 $query .=
"add_info = " . $ilDB->quote($a_values[
"add_info"]) .
", ";
116 $query .=
"vat_rate = " . $ilDB->quote($a_values[
"vat_rate"]) .
", ";
117 $query .=
"pdf_path = " . $ilDB->quote($a_values[
"pdf_path"]) .
", ";
118 $query .=
"topics_allow_custom_sorting = " . $ilDB->quote($a_values[
"topics_allow_custom_sorting"]) .
", ";
119 $query .=
"topics_sorting_type = " . $ilDB->quote($a_values[
"topics_sorting_type"]) .
", ";
120 $query .=
"topics_sorting_direction = " . $ilDB->quote($a_values[
"topics_sorting_direction"]) .
", ";
121 $query .=
"max_hits = " . $ilDB->quote($a_values[
"max_hits"]) .
", ";
122 $query .=
"shop_enabled = " . $ilDB->quote($a_values[
"shop_enabled"]) .
" ";
123 $query .=
"WHERE settings_id = '" . $this->
getSettingsId() .
"'";
125 $this->db->query($query);
129 $query =
"INSERT INTO payment_settings
131 currency_unit = ".$ilDB->quote($a_values[
"currency_unit"]).
",
132 currency_subunit = ".$ilDB->quote($a_values[
"currency_subunit"]).
",
133 address = ".$ilDB->quote($a_values[
"address"]).
",
134 bank_data = ".$ilDB->quote($a_values[
"bank_data"]).
",
135 add_info = ".$ilDB->quote($a_values[
"add_info"]).
",
136 vat_rate = ".$ilDB->quote($a_values[
"vat_rate"]).
",
137 pdf_path = ".$ilDB->quote($a_values[
"pdf_path"]).
",
138 topics_allow_custom_sorting = ".$ilDB->quote($a_values[
"topics_allow_custom_sorting"]).
",
139 topics_sorting_type = ".$ilDB->quote($a_values[
"topics_sorting_type"]).
",
140 topics_sorting_direction = ".$ilDB->quote($a_values[
"topics_sorting_direction"]).
",
141 shop_enabled = ".$ilDB->quote($a_values[
"shop_enabled"]).
",
142 max_hits = ".$ilDB->quote($a_values[
"topics_sorting_direction"]);
143 $this->db->query($query);
157 $query =
"SELECT * FROM payment_settings";
158 $result = $this->db->getrow($query);
170 $data[
"topics_allow_custom_sorting"] =
$result->topics_allow_custom_sorting;
171 $data[
"topics_sorting_type"] =
$result->topics_sorting_type;
172 $data[
"topics_sorting_direction"] =
$result->topics_sorting_direction;
177 $this->settings =
$data;