73 $this->auto_generated = $a_status;
93 $this->title = $a_val;
113 $this->type = $a_val;
133 $this->description = $a_val;
156 $settings = $this->
getConfig()->getSettings();
159 if (is_array($a_value))
160 $a_value = serialize($a_value);
162 $a_value = unserialize($a_value);
166 $this->setting[$a_setting] = array(
179 unset($this->setting[$a_setting]);
187 $this->setting = array();
206 $this->hidden_tab[$a_tab_id] = $a_tab_id;
214 $this->hidden_tab = array();
256 $set = $ilDB->query(
"SELECT * FROM adm_settings_template WHERE ".
257 " id = ".$ilDB->quote($this->getId(),
"integer")
259 $rec = $ilDB->fetchAssoc($set);
268 $set = $ilDB->query(
"SELECT * FROM adm_set_templ_value WHERE ".
269 " template_id = ".$ilDB->quote($this->getId(),
"integer")
271 while ($rec = $ilDB->fetchAssoc($set))
274 $rec[
"value"], $rec[
"hide"]);
278 $set = $ilDB->query(
"SELECT * FROM adm_set_templ_hide_tab WHERE ".
279 " template_id = ".$ilDB->quote($this->getId(),
"integer")
281 while ($rec = $ilDB->fetchAssoc($set))
294 $this->
setId($ilDB->nextId(
"adm_settings_template"));
297 $ilDB->insert(
"adm_settings_template", array(
298 "id" => array(
"integer", $this->
getId()),
299 "title" => array(
"text", $this->
getTitle()),
300 "type" => array(
"text", $this->
getType()),
322 $ilDB->update(
"adm_settings_template", array(
323 "title" => array(
"text", $this->
getTitle()),
324 "type" => array(
"text", $this->
getType()),
329 "id" => array(
"integer", $this->
getId()),
333 $ilDB->manipulate(
"DELETE FROM adm_set_templ_value WHERE "
334 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
336 $ilDB->manipulate(
"DELETE FROM adm_set_templ_hide_tab WHERE "
337 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
355 $ilDB->manipulate(
"INSERT INTO adm_set_templ_value ".
356 "(template_id, setting, value, hide) VALUES (".
357 $ilDB->quote($this->getId(),
"integer").
",".
358 $ilDB->quote($s,
"text").
",".
359 $ilDB->quote($set[
"value"],
"text").
",".
360 $ilDB->quote($set[
"hide"],
"integer").
374 $ilDB->manipulate(
"INSERT INTO adm_set_templ_hide_tab ".
375 "(template_id, tab_id) VALUES (".
376 $ilDB->quote($this->getId(),
"integer").
",".
377 $ilDB->quote($tab_id,
"text").
389 $ilDB->manipulate(
"DELETE FROM adm_settings_template WHERE "
390 .
" id = ".$ilDB->quote($this->getId(),
"integer")
392 $ilDB->manipulate(
"DELETE FROM adm_set_templ_value WHERE "
393 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
395 $ilDB->manipulate(
"DELETE FROM adm_set_templ_hide_tab WHERE "
396 .
" template_id = ".$ilDB->quote($this->getId(),
"integer")
410 if($a_include_auto_generated)
412 $set = $ilDB->query(
"SELECT * FROM adm_settings_template ".
413 " WHERE type = ".$ilDB->quote($a_type,
"text").
418 $set = $ilDB->query(
"SELECT * FROM adm_settings_template ".
419 " WHERE type = ".$ilDB->quote($a_type,
"text").
420 'AND auto_generated = '.$ilDB->quote(0,
'integer').
' '.
426 $settings_template = array();
427 while ($rec = $ilDB->fetchAssoc($set))
429 $settings_template[] = $rec;
431 return $settings_template;
444 $set = $ilDB->query(
"SELECT $a_prop FROM adm_settings_template WHERE ".
445 " id = ".$ilDB->quote($a_id,
"integer")
447 $rec = $ilDB->fetchAssoc($set);
448 return $rec[$a_prop];
476 if(substr($a_title_desc, 0, 3) ==
'il_')
478 return $GLOBALS[
'lng']->txt($a_title_desc);
480 return $a_title_desc;