/adei/ui

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

« back to all changes in this revision

Viewing changes to services/item.php

  • Committer: Suren A. Chilingaryan
  • Date: 2008-04-02 10:23:22 UTC
  • Revision ID: csa@dside.dyndns.org-20080402102322-okib92sicg2dx3o3
Initial import

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
try {
 
9
    $req = new GROUPRequest($_GET);
 
10
    $reader = $req->CreateReader();
 
11
    $list = $reader->GetItemList();
 
12
    unset($reader);
 
13
} catch (ADEIException $ex) {
 
14
    $error = xml_escape($ex->getMessage());
 
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 $value => $info) {
 
23
        $name = xml_escape($info['name']);
 
24
        echo "<Value name=\"" . $name . "\" value=\"" . $value . "\"/>";
 
25
    }
 
26
    echo "</result>";
 
27
}
 
28
 
 
29
?>
 
 
b'\\ No newline at end of file'