ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
$
_
a
b
c
e
f
g
h
i
j
l
m
n
p
r
s
t
u
w
+
Functions
_
a
b
c
e
f
g
h
i
m
n
p
r
s
t
u
w
Variables
+
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
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
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
j
k
l
m
n
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
Typedefs
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Modules
Pages
class.ilChatroomConverter.php
Go to the documentation of this file.
1
<?php
2
/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
10
class
ilChatroomConverter
11
{
12
public
function
backupHistoryToXML
()
13
{
14
global
$DIC
;
15
16
$res
= $DIC->database()->query(
"
17
SELECT chat_id, room_id
18
FROM chat_room_messages
19
GROUP BY chat_id, room_id
20
"
);
21
22
$chat_room_id_comb =
array
();
23
24
while
(
$row
= $DIC->database()->fetchAssoc(
$res
)) {
25
$chat_room_id_comb[] =
array
(
$row
[
'chat_id'
],
$row
[
'room_id'
]);
26
}
27
28
foreach
($chat_room_id_comb as $combination) {
29
$res
= $DIC->database()->queryF(
30
"
31
SELECT *
32
FROM chat_room_messages
33
WHERE chat_id = %s
34
AND room_id = %s"
,
35
array
(
'integer'
,
'integer'
),
36
array
($combination[0], $combination[1])
37
);
38
39
$xml
=
new
SimpleXMLElement
(
'<entries />'
);
40
$xml
->addAttribute(
'chat_id'
, $combination[0]);
41
$xml
->addAttribute(
'room_id'
, $combination[1]);
42
43
while
(
$row
= $DIC->database()->fetchAssoc(
$res
)) {
44
$child =
$xml
->addChild(
'entry'
,
$row
[
'message'
]);
45
$child->addAttribute(
'timestamp'
,
$row
[
'commit_timestamp'
]);
46
}
47
48
$xml
->asXML();
49
}
50
}
51
}
SimpleXMLElement
$DIC
global $DIC
Definition:
saml.php:7
$xml
$xml
Definition:
metadata.php:240
$res
foreach($_POST as $key=> $value) $res
Definition:
save_question_post_data.php:15
array
Create styles array
The data for the language used.
Definition:
40duplicateStyle.php:19
ilChatroomConverter
Class ilChatroomConverter.
Definition:
class.ilChatroomConverter.php:10
$row
$row
Definition:
10autofilter-selection-1.php:74
ilChatroomConverter\backupHistoryToXML
backupHistoryToXML()
Definition:
class.ilChatroomConverter.php:12
Modules
Chatroom
classes
class.ilChatroomConverter.php
Generated on Sat Apr 19 2025 19:01:20 for ILIAS by
1.8.13 (using
Doxyfile
)