BMLT Root Server
GetMeetingLocationInfo.php
Go to the documentation of this file.
1 <?php
2 /****************************************************************************************//**
3 * \file GetMeetingLocationInfo.php *
4 * \brief Returns an XML response, containing the scema for the location info structure. *
5 
6  This file is part of the Basic Meeting List Toolbox (BMLT).
7 
8  Find out more at: https://bmlt.app
9 
10  BMLT is free software: you can redistribute it and/or modify
11  it under the terms of the MIT License.
12 
13  BMLT is distributed in the hope that it will be useful,
14  but WITHOUT ANY WARRANTY; without even the implied warranty of
15  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  MIT License for more details.
17 
18  You should have received a copy of the MIT License along with this code.
19  If not, see <https://opensource.org/licenses/MIT>.
20 ********************************************************************************************/
21 
22 // The caller can request compression. Not all clients can deal with compressed replies.
23 if (isset($_GET['compress_xml']) || isset($_POST['compress_xml'])) {
24  if (zlib_get_coding_type() === false) {
25  ob_start("ob_gzhandler");
26  } else {
27  header('Content-Type:application/xml; charset=UTF-8');
28  ob_start();
29  }
30 } else {
31  header('Content-Type:application/xml; charset=UTF-8');
32  ob_start();
33 }
34 echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; ?>
35 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
36  elementFormDefault="qualified"
37  xmlns:xsn="http://<?php echo $_SERVER['SERVER_NAME'] ?>"
38  targetNamespace="http://<?php echo $_SERVER['SERVER_NAME'] ?>">
39  <xs:element name='locationInfo'>
40  <xs:complexType>
41  <xs:sequence>
42  <xs:element ref='xsn:search_average'/>
43  <xs:element ref='xsn:search_center'/>
44  </xs:sequence>
45  </xs:complexType>
46  </xs:element>
47  <xs:element name='search_average'>
48  <xs:complexType>
49  <xs:sequence>
50  <xs:element ref='xsn:location'/>
51  <xs:element ref='xsn:radius'/>
52  </xs:sequence>
53  </xs:complexType>
54  </xs:element>
55  <xs:element name='search_center'>
56  <xs:complexType>
57  <xs:sequence>
58  <xs:element ref='xsn:location'/>
59  <xs:element ref='xsn:radius'/>
60  </xs:sequence>
61  </xs:complexType>
62  </xs:element>
63  <xs:element name='location'>
64  <xs:complexType>
65  <xs:sequence>
66  <xs:element ref='xsn:latitude'/>
67  <xs:element ref='xsn:longitude'/>
68  </xs:sequence>
69  </xs:complexType>
70  </xs:element>
71  <xs:element name='latitude' type='xs:decimal'/>
72  <xs:element name='longitude' type='xs:decimal'/>
73  <xs:element name='radius'>
74  <xs:complexType>
75  <xs:sequence>
76  <xs:element ref='xsn:miles'/>
77  <xs:element ref='xsn:kilometers'/>
78  </xs:sequence>
79  </xs:complexType>
80  </xs:element>
81  <xs:element name='miles' type='xs:decimal'/>
82  <xs:element name='kilometers' type='xs:decimal'/>
83 </xs:schema><?php ob_end_flush(); ?>
84 
$_GET['switcher']