Create style class GlossaryLink, link, IntLink.
20 {
22
23 $set =
$ilDB->query(
"SELECT * FROM object_data WHERE type = 'sty'");
24 while ($rec =
$ilDB->fetchAssoc($set))
25 {
26 $set2 =
$ilDB->query(
"SELECT * FROM style_char WHERE ".
27 "style_id = ".
$ilDB->quote($rec[
"obj_id"],
"integer").
" AND ".
28 "characteristic = ".$ilDB->quote($a_class, "text")." AND ".
29 "type = ".$ilDB->quote($a_type, "text"));
30 if (!
$ilDB->fetchAssoc($set2))
31 {
32 $q = "INSERT INTO style_char (style_id, type, characteristic, hide)".
33 " VALUES (".
34 $ilDB->quote($rec[
"obj_id"],
"integer").
",".
35 $ilDB->quote($a_type,
"text").
",".
36 $ilDB->quote($a_class,
"text").
",".
37 $ilDB->quote($a_hide,
"integer").
")";
38 $ilDB->manipulate($q);
39
40 $set3 =
$ilDB->query(
"SELECT * FROM style_parameter WHERE ".
41 "style_id = ".
$ilDB->quote($rec[
"obj_id"],
"integer").
" AND ".
42 "type = ".$ilDB->quote($a_type, "text")." AND ".
43 "class = ".$ilDB->quote($a_orig_class, "text")." AND ".
44 "tag = ".$ilDB->quote($a_tag, "text")
45 );
46 while ($rec3 =
$ilDB->fetchAssoc($set3))
47 {
48 $spid =
$ilDB->nextId(
"style_parameter");
49 $q = "INSERT INTO style_parameter (id, style_id, type, class, tag, parameter, value)".
50 " VALUES (".
51 $ilDB->quote($spid,
"integer").
",".
52 $ilDB->quote($rec[
"obj_id"],
"integer").
",".
53 $ilDB->quote($rec3[
"type"],
"text").
",".
54 $ilDB->quote($a_class,
"text").
",".
55 $ilDB->quote($a_tag,
"text").
",".
56 $ilDB->quote($rec3[
"parameter"],
"text").
",".
57 $ilDB->quote($rec3[
"value"],
"text").
58 ")";
59 $ilDB->manipulate($q);
60 }
61 }
62 }
63 }