67 $this->
setEntryId($ilDB->nextID(
'il_bibl_entry'));
70 $ilDB->manipulate(
"INSERT INTO il_bibl_entry " .
"(data_id, id, type) VALUES (" .
71 $ilDB->quote($this->getBibliographicObjId(),
"integer") .
"," .
72 $ilDB->quote($this->getEntryId(),
"integer") .
"," .
73 $ilDB->quote($this->getType(),
"text") .
79 $id = $ilDB->nextID(
'il_bibl_attribute');
81 $ilDB->manipulate(
"INSERT INTO il_bibl_attribute " .
"(entry_id, name, value, id) VALUES (" .
82 $ilDB->quote($this->getEntryId(),
"integer") .
"," .
83 $ilDB->quote($attribute[
'name'],
"text") .
"," .
84 $ilDB->quote($attribute[
'value'],
"text") .
"," .
85 $ilDB->quote($id,
"integer") .
98 $set = $ilDB->query(
"SELECT * FROM il_bibl_entry " .
99 " WHERE id = ".$ilDB->quote($this->getEntryId(),
"integer")
101 while ($rec = $ilDB->fetchAssoc($set))
119 $ilDB->manipulate($up =
"UPDATE il_bibl_entry SET " .
" type = " .
120 $ilDB->quote($this->getType(),
"integer") .
121 " WHERE id = " . $ilDB->quote($this->getEntryId(),
"integer"));
127 $ilDB->manipulate($up =
"UPDATE il_bibl_attribute SET " .
128 " name = " . $ilDB->quote($attribute[
'name'],
"integer") .
"," .
129 " value = " . $ilDB->quote($attribute[
'value'],
"integer") .
"," .
130 " WHERE id = " . $ilDB->quote($attribute[
'id'],
"integer"));
142 $this->deleteOptions();
144 $ilDB->manipulate(
"DELETE FROM il_bibl_entry WHERE id = " . $ilDB->quote($this->getEntryId(),
"integer"));
145 $ilDB->manipulate(
"DELETE FROM il_bibl_attribute WHERE entry_id = " . $ilDB->quote($this->getEntryId(),
"integer"));
156 $all_attributes = array();
159 $set = $ilDB->query(
"SELECT * FROM il_bibl_attribute " .
160 " WHERE entry_id = ".$ilDB->quote($this->getEntryId(),
"integer")
162 while ($rec = $ilDB->fetchAssoc($set))
164 $all_attributes[$rec[
'name']] = $rec[
'value'];
167 if($this->file_type ==
"ris"){
174 $parsed_attributes = array();
175 foreach($all_attributes as $key => $value){
179 $value = preg_replace(
'!(http)(s)?:\/\/[a-zA-Z0-9.?&_/\-~\!\'\*()+,:;@=$#\[\]%]+!',
"<a href=\"\\0\" target=\"_blank\">\\0</a>",$value);
181 $parsed_attributes[strtolower($this->file_type .
'_' .
$type .
'_' . $key)] = $value;
183 return $parsed_attributes;
211 if(!$overviewModels[$this->file_type][$entryType]){
212 $entryType =
'default';
219 preg_match_all(
'/\[(.*?)\]/', $single_entry, $placeholders);
222 foreach($placeholders[1] as $key => $placeholder){
224 $cuts = explode(
'|', $placeholder);
229 $attribute_elements = explode(
'_', $cuts[1]);
230 $attribute_elements[1] = strtolower($this->
getType());
231 $cuts[1] = implode(
'_', $attribute_elements);
236 $single_entry = str_replace($placeholders[0][$key], $cuts[0] .
$attributes[$cuts[1]] . $cuts[2], $single_entry);
239 $first_sign_after_begin_emph_tag = strpos(strtolower($single_entry),
'<emph>') + 6;
240 $last_sign_after_end_emph_tag = strpos(strtolower($single_entry),
'</emph>');
241 $italic_text_length = $last_sign_after_end_emph_tag - $first_sign_after_begin_emph_tag;
244 if($last_sign_after_end_emph_tag){
245 $italic_text = substr($single_entry, $first_sign_after_begin_emph_tag, $italic_text_length);
248 $it_tpl =
new ilTemplate(
"tpl.bibliographic_italicizer.html",
true,
true,
"Modules/Bibliographic");
249 $it_tpl->setCurrentBlock(
"italic_section");
251 $it_tpl->setVariable(
'ITALIC_STRING', $italic_text);
252 $it_tpl->parseCurrentBlock();
255 $text_before_emph_tag = substr($single_entry, 0, $first_sign_after_begin_emph_tag - 6);
256 $text_after_emph_tag = substr($single_entry, $last_sign_after_end_emph_tag + 7);
257 $single_entry = $text_before_emph_tag . $it_tpl->get() . $text_after_emph_tag;
259 }
while($last_sign_after_end_emph_tag);
262 $single_entry = str_replace($placeholders[0][$key],
'', $single_entry);
266 $this->Overwiew = $single_entry;
274 return $this->Overwiew;
338 $set = $ilDB->query(
"SELECT id FROM il_bibl_entry ".
339 " WHERE data_id = ".$ilDB->quote($object_id,
"integer")
342 while ($rec = $ilDB->fetchAssoc($set))
344 $entries[][
'entry_id'] = $rec[
'id'];