/dev/adei/adei-blob

To get this branch, use:
bzr branch http://suren.me/webbzr/dev/adei/adei-blob

« back to all changes in this revision

Viewing changes to docs/samples/items.php

  • Committer: Nicholas Tan Jerome
  • Date: 2015-01-30 10:47:32 UTC
  • Revision ID: nicholas.jerome@kit.edu-20150130104732-e37pofkoamnvqkf6
added identifier and logic to handle blob array data.

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
 
$_GET['db_server'] = "virtual";
9
 
$_GET['db_name'] = "autogen";
10
 
$_GET['db_group'] = "-1";
11
 
 
12
 
try {
13
 
    $req = new GROUPRequest($_GET);
14
 
    $reader = $req->CreateReader();
15
 
    $list = $reader->GetItemList();
16
 
    unset($reader);
17
 
} catch (ADEIException $ex) {
18
 
    $error = xml_escape($ex->getMessage());
19
 
}
20
 
 
21
 
 
22
 
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
23
 
if ($error) echo "<result><Error>$error</Error></result>";
24
 
else {
25
 
    echo "<result>";
26
 
    foreach ($list as $value => $info) {
27
 
        $extra = "";
28
 
        if ($info['uid']) $extra .= " uid=\"{$info['uid']}\"";
29
 
 
30
 
        $name = xml_escape($info['name']);
31
 
        echo "<Value name=\"" . $name . "\"$extra value=\"" . $value . "\"/>";
32
 
    }
33
 
    echo "</result>";
34
 
}
35
 
 
36
 
?>
 
 
b'\\ No newline at end of file'