24 define(
"LINKS_USER_ID",1);
25 define(
"LINKS_SESSION_ID",2);
26 define(
"LINKS_LOGIN",3);
29 define(
"LINKS_ERR_NO_NAME",1);
30 define(
"LINKS_ERR_NO_VALUE",2);
31 define(
"LINKS_ERR_NO_NAME_VALUE",3);
69 $this->webr_id = $a_obj_id;
79 $this->name = $a_name;
87 $this->value = $a_value;
128 $next_id = $ilDB->nextId(
'webr_params');
129 $query =
"INSERT INTO webr_params (param_id,webr_id,link_id,name,value) ".
131 $ilDB->quote($next_id,
'integer').
", ".
132 $ilDB->quote($this->
getObjId() ,
'integer').
", ".
133 $ilDB->quote($a_link_id ,
'integer').
", ".
134 $ilDB->quote($this->
getName() ,
'text').
", ".
135 $ilDB->quote($this->
getValue() ,
'integer').
142 function delete($a_param_id)
146 $query =
"DELETE FROM webr_params ".
147 "WHERE param_id = ".$ilDB->quote($a_param_id ,
'integer').
" ".
148 "AND webr_id = ".$ilDB->quote($this->
getObjId(),
'integer');
161 return $ilSetting->get(
'links_dynamic',
false) ?
true :
false;
168 if(!is_array($a_link_data))
175 foreach(
$params as $param_data)
177 if(!strpos($a_link_data[
'target'],
'?'))
179 $a_link_data[
'target'] .=
"?";
183 $a_link_data[
'target'] .=
"&";
185 $a_link_data[
'target'] .= ($param_data[
'name'].
"=");
186 switch($param_data[
'value'])
189 $a_link_data[
'target'] .= (urlencode($ilUser->getLogin()));
193 $a_link_data[
'target'] .= (session_id());
197 $a_link_data[
'target'] .= ($ilUser->getId());
214 $res = $ilDB->query(
"SELECT * FROM webr_params WHERE link_id = ".
215 $ilDB->quote((
int) $a_link_id ,
'integer'));
238 return $info.
'=USER_ID';
241 return $info.
'=SESSION_ID';
244 return $info.
'=LOGIN';
253 $query =
"DELETE FROM webr_params WHERE webr_id = ".
254 $ilDB->quote((
int) $a_webr_id ,
'integer');
268 return array(0 => $lng->txt(
'links_select_one'),