ILIAS
release_5-0 Revision 5.0.0-1144-gc4397b1f870
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
class.ilXHTMLPage.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
16
class
ilXHTMLPage
17
{
18
var
$id
= 0;
19
var
$content
=
""
;
20
26
function
ilXHTMLPage
($a_id = 0)
27
{
28
if
($a_id > 0)
29
{
30
$this->
setId
($a_id);
31
$this->
read
();
32
}
33
}
34
40
function
getId
()
41
{
42
return
$this->id
;
43
}
44
50
function
setId
($a_id)
51
{
52
$this->
id
= $a_id;
53
}
54
60
function
getContent
()
61
{
62
return
$this->content
;
63
}
64
70
function
setContent
($a_content)
71
{
72
$this->content = $a_content;
73
}
74
78
function
read
()
79
{
80
global
$ilDB
;
81
82
$set = $ilDB->query(
"SELECT * FROM xhtml_page WHERE id = "
.
83
$ilDB->quote($this->getId(),
"integer"
));
84
if
($rec = $ilDB->fetchAssoc($set))
85
{
86
$this->
setContent
($rec[
"content"
]);
87
}
88
}
89
93
function
_lookupContent
($a_id)
94
{
95
global
$ilDB
;
96
97
$set = $ilDB->query(
"SELECT content FROM xhtml_page WHERE id = "
.
98
$ilDB->quote($a_id,
"integer"
));
99
if
($rec = $ilDB->fetchAssoc($set))
100
{
101
return
$rec[
"content"
];
102
}
103
}
104
108
function
_lookupSavedContent
($a_id)
109
{
110
global
$ilDB
;
111
112
$set = $ilDB->query(
"SELECT save_content FROM xhtml_page WHERE id = "
.
113
$ilDB->quote($a_id,
"integer"
));
114
if
($rec = $ilDB->fetchAssoc($set))
115
{
116
return
$rec[
"save_content"
];
117
}
118
}
119
123
function
save
()
124
{
125
global
$ilDB
;
126
127
if
($this->
getId
() > 0)
128
{
129
$old_content =
ilXHTMLPage::_lookupContent
($this->
getId
());
130
$ilDB->update(
"xhtml_page"
, array(
131
"content"
=> array(
"clob"
, $this->
getContent
()),
132
"save_content"
=> array(
"clob"
, $old_content)
133
), array (
134
"id"
=> array(
"integer"
, $this->
getId
())
135
));
136
}
137
else
138
{
139
$this->
setId
($ilDB->nextId(
"xhtml_page"
));
140
$ilDB->insert(
"xhtml_page"
, array(
141
"id"
=> array(
"integer"
, $this->
getId
()),
142
"content"
=> array(
"clob"
, $this->
getContent
())
143
));
144
}
145
}
146
150
function
undo
()
151
{
152
global
$ilDB
;
153
154
if
($this->
getId
() > 0)
155
{
156
$content =
ilXHTMLPage::_lookupContent
($this->
getId
());
157
$save_content =
ilXHTMLPage::_lookupSavedContent
($this->
getId
());
158
$ilDB->update(
"xhtml_page"
, array(
159
"content"
=> array(
"clob"
, $save_content),
160
"save_content"
=> array(
"clob"
, $content)
161
), array (
162
"id"
=> array(
"integer"
, $this->
getId
())
163
));
164
}
165
}
166
170
function
clear
()
171
{
172
global
$ilDB
;
173
174
if
($this->
getId
() > 0)
175
{
176
$this->
setContent
(
""
);
177
$this->
save
();
178
}
179
}
180
181
}
182
?>
ilXHTMLPage\getId
getId()
Get page ID.
Definition:
class.ilXHTMLPage.php:40
ilXHTMLPage\$id
$id
Definition:
class.ilXHTMLPage.php:18
ilXHTMLPage\read
read()
Read page data from database.
Definition:
class.ilXHTMLPage.php:78
ilXHTMLPage\getContent
getContent()
Get content of page.
Definition:
class.ilXHTMLPage.php:60
ilXHTMLPage\save
save()
Save the page.
Definition:
class.ilXHTMLPage.php:123
ilXHTMLPage\$content
$content
Definition:
class.ilXHTMLPage.php:19
ilXHTMLPage\ilXHTMLPage
ilXHTMLPage($a_id=0)
Constructor.
Definition:
class.ilXHTMLPage.php:26
ilXHTMLPage
XHTML Page class.
Definition:
class.ilXHTMLPage.php:16
ilXHTMLPage\undo
undo()
Undo last change.
Definition:
class.ilXHTMLPage.php:150
ilXHTMLPage\_lookupSavedContent
_lookupSavedContent($a_id)
Lookup Saved Content.
Definition:
class.ilXHTMLPage.php:108
ilXHTMLPage\_lookupContent
_lookupContent($a_id)
Lookup Content.
Definition:
class.ilXHTMLPage.php:93
$ilDB
global $ilDB
Definition:
storeScorm2004.php:16
ilXHTMLPage\setContent
setContent($a_content)
Set content of page.
Definition:
class.ilXHTMLPage.php:70
ilXHTMLPage\setId
setId($a_id)
Set page ID.
Definition:
class.ilXHTMLPage.php:50
ilXHTMLPage\clear
clear()
Clear page.
Definition:
class.ilXHTMLPage.php:170
Services
XHTMLPage
classes
class.ilXHTMLPage.php
Generated on Mon Mar 31 2025 19:00:55 for ILIAS by
1.8.13 (using
Doxyfile
)