4 include_once(
"./Services/COPage/classes/class.ilPageObject.php");
34 $this->title = $a_title;
74 $this->order_nr = $a_val;
84 return $this->order_nr;
97 $set = $ilDB->query(
"SELECT MAX(order_nr) m FROM usr_ext_profile_page WHERE ".
98 " user_id = ".$ilDB->quote($a_user_id,
"integer"));
99 $rec = $ilDB->fetchAssoc($set);
101 return (
int) $rec[
"m"];
113 $id = $ilDB->nextId(
"usr_ext_profile_page");
115 $query =
"INSERT INTO usr_ext_profile_page (".
121 $ilDB->quote($this->
getId(),
"integer")
122 .
",".$ilDB->quote($this->
getTitle(),
"text")
123 .
",".$ilDB->quote($this->
getUserId(),
"integer")
124 .
",".$ilDB->quote($this->
getOrderNr(),
"integer")
126 $ilDB->manipulate(
$query);
137 function update($a_validate =
true, $a_no_history =
false)
142 $query =
"UPDATE usr_ext_profile_page SET ".
143 " title = ".$ilDB->quote($this->
getTitle(),
"text").
144 ",user_id = ".$ilDB->quote($this->
getUserId(),
"integer").
145 ",order_nr = ".$ilDB->quote($this->
getOrderNr(),
"integer").
146 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
147 $ilDB->manipulate(
$query);
160 $query =
"SELECT * FROM usr_ext_profile_page WHERE id = ".
161 $ilDB->quote($this->
getId(),
"integer");
162 $set = $ilDB->query(
$query);
163 $rec = $ilDB->fetchAssoc($set);
184 include_once(
"./Services/COPage/classes/class.ilInternalLink.php");
188 $query =
"DELETE FROM usr_ext_profile_page".
189 " WHERE id = ".$ilDB->quote($this->
getId(),
"integer");
190 $ilDB->manipulate(
$query);
229 $set = $ilDB->query($q =
"SELECT $a_prop FROM usr_ext_profile_page WHERE ".
230 " id = ".$ilDB->quote($a_id,
"integer")
232 $rec = $ilDB->fetchAssoc($set);
233 return $rec[$a_prop];
246 $set = $ilDB->query(
"SELECT * FROM usr_ext_profile_page WHERE ".
247 " user_id = ".$ilDB->quote($a_user_id,
"integer").
248 " ORDER BY order_nr");
250 while ($rec = $ilDB->fetchAssoc($set))
269 foreach ($pages as $p)
271 $ilDB->manipulate(
"UPDATE usr_ext_profile_page SET ".
272 " order_nr = ".$ilDB->quote($cnt,
"integer").
273 " WHERE id = ".$ilDB->quote($p[
"id"],
"integer")