37 public static function _lookup($a_type, $a_setting, $a_user = 0, $a_block_id = 0)
42 $set = $ilDB->query(sprintf(
"SELECT * FROM il_block_setting WHERE type = %s ".
43 "AND user_id = %s AND setting = %s AND block_id = %s",
44 $ilDB->quote($a_type,
"text"),
45 $ilDB->quote($a_user,
"integer"),
46 $ilDB->quote($a_setting,
"text"),
47 $ilDB->quote($a_block_id,
"integer")));
48 if ($rec = $ilDB->fetchAssoc($set))
62 public static function _write($a_type, $a_setting, $a_value, $a_user = 0, $a_block_id = 0)
66 $ilDB->manipulate(sprintf(
"DELETE FROM il_block_setting WHERE type = %s AND user_id = %s AND block_id = %s AND setting = %s",
67 $ilDB->quote($a_type,
"text"),
68 $ilDB->quote($a_user,
"integer"),
69 $ilDB->quote((
int) $a_block_id,
"integer"),
70 $ilDB->quote($a_setting,
"text")));
71 $ilDB->manipulate(sprintf(
"INSERT INTO il_block_setting (type, user_id, setting, block_id, value) VALUES (%s,%s,%s,%s,%s)",
72 $ilDB->quote($a_type,
"text"),
73 $ilDB->quote($a_user,
"integer"),
74 $ilDB->quote($a_setting,
"text"),
75 $ilDB->quote((
int) $a_block_id,
"integer"),
76 $ilDB->quote($a_value,
"text")));
87 if ($detail ===
false)
110 public static function _lookupNr($a_type, $a_user = 0, $a_block_id = 0)
121 public static function _writeNumber($a_type, $a_value, $a_user = 0, $a_block_id = 0)
130 public static function _lookupSide($a_type, $a_user = 0, $a_block_id = 0)
141 public static function _writeSide($a_type, $a_value, $a_user = 0, $a_block_id = 0)
156 $ilDB->manipulate(
"DELETE FROM il_block_setting WHERE user_id = ".
157 $ilDB->quote($a_user,
"integer"));
171 $ilDB->manipulate(
"DELETE FROM il_block_setting WHERE block_id = ".
172 $ilDB->quote($a_block_id,
"integer").
173 " AND type = ".$ilDB->quote($a_block_type,
"text"));