/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk

« back to all changes in this revision

Viewing changes to services/server.php

  • Committer: Suren A. Chilingaryan
  • Date: 2008-07-31 12:58:19 UTC
  • Revision ID: csa@dside.dyndns.org-20080731125819-y5bd48hlpqwut9j3
Provide a single 'list' service in place of multiple listing services

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
require("../adei.php");
3
 
 
4
 
header("Content-type: text/xml");
5
 
header("Cache-Control: no-cache, must-revalidate");
6
 
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
7
 
 
8
 
 
9
 
try {
10
 
    $req = new REQUEST($_GET);
11
 
    $list = $req->GetServerList();
12
 
} catch (ADEIException $ex) {
13
 
    $ex->logInfo(NULL, $req);
14
 
    $error = xml_escape($ex->getInfo());
15
 
}
16
 
 
17
 
 
18
 
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
19
 
if ($error) echo "<result><Error>$error</Error></result>";
20
 
else {
21
 
    echo "<result>";
22
 
    foreach ($list as $db) {
23
 
        echo "<Value value=\"{$db['db_server']}\" name=\"{$db['db_server_name']}\"/>";
24
 
    }
25
 
    echo "</result>";
26
 
}
27
 
 
28
 
?>
 
 
b'\\ No newline at end of file'