48 $this->user_id = (int) $a_user_id;
49 $this->
id = (
string) $a_id;
52 if (!$this->user_id) {
53 $this->user_id = $ilUser->getId();
73 public function set($a_data)
94 return (
bool) $this->
getValue($a_option);
118 $this->
settings[$a_option] = $a_value;
149 $this->
delete(
false);
151 $query =
"INSERT INTO usr_form_settings (user_id,id,settings) " .
153 $this->db->quote($this->user_id,
'integer') .
", " .
154 $this->db->quote($this->
id,
'text') .
", " .
155 $this->db->quote(serialize($this->
settings),
'text') .
" " .
157 $this->db->manipulate(
$query);
169 $query =
"SELECT * FROM usr_form_settings" .
170 " WHERE user_id = " . $this->db->quote($this->user_id,
'integer') .
171 " AND id = " . $this->db->quote($this->
id,
'text');
174 if (
$res->numRows()) {
175 $this->has_stored_entry =
true;
190 public function delete($a_reset =
true)
192 $query =
"DELETE FROM usr_form_settings" .
193 " WHERE user_id = " . $this->db->quote($this->user_id,
'integer') .
194 " AND id = " . $this->db->quote($this->
id,
'text');
195 $this->db->manipulate(
$query);
208 $query =
"DELETE FROM usr_form_settings" .
209 " WHERE user_id = " . $ilDB->quote($a_user_id,
'integer');
210 $ilDB->manipulate(
$query);
219 $query =
"DELETE FROM usr_form_settings" .
220 " WHERE id = " .
$GLOBALS[
'ilDB']->quote($a_id,
'text');
230 $query =
"DELETE FROM usr_form_settings " .
231 'WHERE ' .
$GLOBALS[
'ilDB']->like(
'id',
'text', $a_prefix .
'%');
245 foreach ($a_form->
getItems() as $item) {
246 if (method_exists($item,
"getPostVar")) {
247 $field = $item->getPostVar();
249 if (method_exists($item,
"getDate")) {
250 $value = $item->getDate();
251 if ($value && !$value->isNull()) {
254 } elseif (method_exists($item,
"getChecked")) {
255 $value = $item->getChecked();
256 } elseif (method_exists($item,
"getMulti") && $item->getMulti()) {
257 $value = $item->getMultiValues();
258 } elseif (method_exists($item,
"getValue")) {
259 $value = $item->getValue();
274 foreach ($a_form->
getItems() as $item) {
275 if (method_exists($item,
"getPostVar")) {
276 $field = $item->getPostVar();
281 $_POST[$item->getPostVar()] = $value;
284 if (method_exists($item,
"setDate")) {
286 $item->setDate($date);
287 } elseif (method_exists($item,
"setChecked")) {
288 $item->setChecked((
bool) $value);
289 } elseif (method_exists($item,
"setValue")) {
290 $item->setValue($value);
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
foreach($_POST as $key=> $value) $res
Create styles array
The data for the language used.