-
Notifications
You must be signed in to change notification settings - Fork 14
/
FieldTemplates.php
executable file
·65 lines (58 loc) · 3.03 KB
/
FieldTemplates.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
<?php
/****************************************************************************************//**
* \file FieldTemplates.php *
* \brief Returns an XML response, containing the schema for the Admin field templates call *
This file is part of the Basic Meeting List Toolbox (BMLT).
Find out more at: http://bmlt.magshare.org
BMLT is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
BMLT is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this code. If not, see <http://www.gnu.org/licenses/>.
********************************************************************************************/
// The caller can request compression. Not all clients can deal with compressed replies.
if (isset($_GET['compress_xml']) || isset($_POST['compress_xml'])) {
if (zlib_get_coding_type() === false) {
ob_start("ob_gzhandler");
} else {
header('Content-Type:application/xml; charset=UTF-8');
ob_start();
}
} else {
header('Content-Type:application/xml; charset=UTF-8');
ob_start();
}
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
xmlns:xsn="http://<?php echo $_SERVER['SERVER_NAME'] ?>"
targetNamespace="http://<?php echo $_SERVER['SERVER_NAME'] ?>">
<xs:element name="field_templates">
<xs:complexType>
<xs:sequence>
<xs:element name="field_template" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="key" type="xs:string"/>
<xs:element name="field_prompt" type="xs:string"/>
<xs:element name="lang_enum" type="xs:string"/>
<xs:element name="visibility" type="xs:integer"/>
<xs:choice minOccurs="0" maxOccurs="1">
<xs:element name="data_string" type="xs:string"/>
<xs:element name="data_bigint" type="xs:integer"/>
<xs:element name="data_double" type="xs:float"/>
<xs:element name="data_longtext" type="xs:string"/>
<xs:element name="data_blob" type="xs:string"/>
</xs:choice>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema><?php ob_end_flush(); ?>