51 $this->user_id = (int) $a_user_id;
52 $this->
id = (string) $a_id;
55 if (!$this->user_id) {
56 $this->user_id =
$ilUser->getId();
76 public function set($a_data)
97 return (
bool) $this->
getValue($a_option);
121 $this->
settings[$a_option] = $a_value;
144 return array_key_exists($a_option, (array) $this->
settings);
152 $this->
delete(
false);
154 $query =
"INSERT INTO usr_form_settings (user_id,id,settings) " .
156 $this->db->quote($this->user_id,
'integer') .
", " .
157 $this->db->quote($this->
id,
'text') .
", " .
158 $this->db->quote(serialize($this->
settings),
'text') .
" " .
160 $this->db->manipulate(
$query);
172 $query =
"SELECT * FROM usr_form_settings" .
173 " WHERE user_id = " . $this->db->quote($this->user_id,
'integer') .
174 " AND id = " . $this->db->quote($this->
id,
'text');
177 if (
$res->numRows()) {
178 $this->has_stored_entry =
true;
193 public function delete($a_reset =
true)
195 $query =
"DELETE FROM usr_form_settings" .
196 " WHERE user_id = " . $this->db->quote($this->user_id,
'integer') .
197 " AND id = " . $this->db->quote($this->
id,
'text');
198 $this->db->manipulate(
$query);
212 $ilDB = $DIC[
'ilDB'];
213 $query =
"DELETE FROM usr_form_settings" .
214 " WHERE user_id = " .
$ilDB->quote($a_user_id,
'integer');
224 $query =
"DELETE FROM usr_form_settings" .
225 " WHERE id = " .
$GLOBALS[
'DIC'][
'ilDB']->quote($a_id,
'text');
235 $query =
"DELETE FROM usr_form_settings " .
236 'WHERE ' .
$GLOBALS[
'DIC'][
'ilDB']->like(
'id',
'text', $a_prefix .
'%');
250 foreach ($a_form->
getItems() as $item) {
251 if (method_exists($item,
"getPostVar")) {
252 $field = $item->getPostVar();
254 if (method_exists($item,
"getDate")) {
255 $value = $item->getDate();
256 if ($value && !$value->isNull()) {
259 } elseif (method_exists($item,
"getChecked")) {
260 $value = $item->getChecked();
261 } elseif (method_exists($item,
"getMulti") && $item->getMulti()) {
262 $value = $item->getMultiValues();
263 } elseif (method_exists($item,
"getValue")) {
264 $value = $item->getValue();
279 foreach ($a_form->
getItems() as $item) {
280 if (method_exists($item,
"getPostVar")) {
281 $field = $item->getPostVar();
286 $_POST[$item->getPostVar()] = $value;
289 if (method_exists($item,
"setDate")) {
291 $item->setDate($date);
292 } elseif (method_exists($item,
"setChecked")) {
293 $item->setChecked((
bool) $value);
294 } elseif (method_exists($item,
"setValue")) {
295 $item->setValue($value);
foreach($_POST as $key=> $value) $res
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.