/dev/trunk

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

« back to all changes in this revision

Viewing changes to services/legend.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: application/json");
 
5
header("Cache-Control: no-cache, must-revalidate");
 
6
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
 
7
 
 
8
 
 
9
try {
 
10
    $draw = new DRAW();
 
11
    $legend = $draw->Legend();
 
12
} catch(ADEIException $e) {
 
13
    $error = $e->getMessage();
 
14
}
 
15
 
 
16
 
 
17
 
 
18
if ($error) {
 
19
    echo json_encode(array("error" => $error));
 
20
} else {
 
21
    if ($draw) {
 
22
        echo json_encode(array_merge(array(
 
23
            "error" => 0,
 
24
        ), $legend));
 
25
    } else {
 
26
        echo json_encode(array("error" => 0));
 
27
    }
 
28
}
 
29
 
 
30
 
 
31
?>
 
 
b'\\ No newline at end of file'