/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/mask.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
 
 
9
try {
 
10
    $req = new GROUPRequest($_GET);
 
11
    $reader = $req->CreateReader();
 
12
 
 
13
    $items = $reader->GetItemList();
 
14
    foreach (array_keys($items) as $i) {
 
15
        if ($i) $all .= "," . $i;
 
16
        else $all = $i;
 
17
    }
 
18
    unset($items);
 
19
    
 
20
    $list = $reader->GetMaskList();
 
21
    unset($reader);
 
22
} catch (ADEIException $ex) {
 
23
    $error = xml_escape($ex->getMessage());
 
24
}
 
25
echo "<?xml version=\"1.0\"?>\n";
 
26
if ($error) echo "<result><Error>$error</Error></result>";
 
27
else {
 
28
    echo "<result>";
 
29
    echo "<Value name=\"" . _("All") . "\" value=\"$all\"/>";
 
30
    foreach ($list as $value => $db) {
 
31
        echo "<Value name=\"" . $db['name'] . "\" value=\"" . $value . "\"/>";
 
32
    }
 
33
    echo "<Value name=\"" . _("Standalone Item") . "\" value=\"-1\"/>";
 
34
    echo "</result>";
 
35
}
 
36
 
 
37
?>
 
 
b'\\ No newline at end of file'