/adei/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/adei/trunk
1 by Suren A. Chilingaryan
Initial import
1
<?php
2
3
header("Content-type: application/json");
4
header("Cache-Control: no-cache, must-revalidate");
5
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
6
115 by Suren A. Chilingaryan
Further drawing improvements: legend, gaps, source tree
7
//$_POST['props'] = '{"xslt": "legend", "time_format": "text", "db_server": "katrin", "db_name": "hauptspektrometer", "db_group": "0", "control_group": "0", "db_mask": "0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56", "experiment": "0-0", "window": "0", "width": 854, "height": 719, "aggregation": null, "interpolate": null, "show_marks": null, "show_gaps": null, "virtual": null, "srctree": null, "pageid": null, "module": "graph", "format": null, "resample": null, "mask_mode": null, "custom": null, "xmin": "1183593600", "xmax": "1190332800", "ymin": 0, "ymax": 900, "x": "1185099906.9767441861", "y": 141.25560538116588}';
8
1 by Suren A. Chilingaryan
Initial import
9
10
try {
49 by Suren A. Chilingaryan
Services: create all classes using REQUEST create calls
11
    $req = new DATARequest();
115 by Suren A. Chilingaryan
Further drawing improvements: legend, gaps, source tree
12
    $encoding = $req->GetResponseEncoding(REQUEST::ENCODING_XML);
13
    $xslt = $req->GetProp('xslt');
14
    
49 by Suren A. Chilingaryan
Services: create all classes using REQUEST create calls
15
    $draw = $req->CreatePlotter();
1 by Suren A. Chilingaryan
Initial import
16
    $legend = $draw->Legend();
24 by Suren A. Chilingaryan
Logger subsystem
17
} catch(ADEIException $ex) {
115 by Suren A. Chilingaryan
Further drawing improvements: legend, gaps, source tree
18
    if (!$req) $req = new REQUEST();
19
    $ex->logInfo(NULL, $draw?$draw:$req);
24 by Suren A. Chilingaryan
Logger subsystem
20
    $error = $ex->getInfo();
1 by Suren A. Chilingaryan
Initial import
21
}
22
115 by Suren A. Chilingaryan
Further drawing improvements: legend, gaps, source tree
23
$req->CreateResponse($legend, $error);
1 by Suren A. Chilingaryan
Initial import
24
25
?>