bzr branch
http://darksoft.org/webbzr/adei/trunk
1
by Suren A. Chilingaryan
Initial import |
1 |
<?php
|
502
by Suren A. Chilingaryan
Support real-time export mode for status displays |
2 |
ADEI::RequireClass("export"); |
1
by Suren A. Chilingaryan
Initial import |
3 |
|
4 |
try { |
|
49
by Suren A. Chilingaryan
Services: create all classes using REQUEST create calls |
5 |
$req = new DATARequest(); |
502
by Suren A. Chilingaryan
Support real-time export mode for status displays |
6 |
|
7 |
$rt_flags = 0; |
|
8 |
if (isset($_GET["rt"])) { |
|
9 |
switch($_GET["rt"]) { |
|
10 |
case "skip_headers": |
|
11 |
$rt_flags = EXPORT::RT_SKIP_HEADERS; |
|
12 |
break; |
|
13 |
case "full": |
|
14 |
default: |
|
15 |
$rt_flags = EXPORT::RT_FULL; |
|
16 |
||
17 |
$props = &$req->props; |
|
18 |
||
19 |
if (!isset($props['experiment'])) |
|
20 |
$props['experiment'] = "*-*"; |
|
21 |
||
22 |
if ($props['window'] == "-1") |
|
23 |
$props['window'] = "31536000,-1"; |
|
24 |
}
|
|
25 |
}
|
|
26 |
||
49
by Suren A. Chilingaryan
Services: create all classes using REQUEST create calls |
27 |
$export = $req->CreateExporter(); |
502
by Suren A. Chilingaryan
Support real-time export mode for status displays |
28 |
|
29 |
if ($rt_flags) { |
|
30 |
$export->SetRealTimeMode($rt_flags); |
|
31 |
}
|
|
32 |
||
356
by Suren A. Chilingaryan
Support cache parameter in getdata service |
33 |
if (isset($_GET["cache"])) { |
34 |
$export->SetCacheMode(true); |
|
35 |
}
|
|
502
by Suren A. Chilingaryan
Support real-time export mode for status displays |
36 |
|
1
by Suren A. Chilingaryan
Initial import |
37 |
$export->Export(); |
24
by Suren A. Chilingaryan
Logger subsystem |
38 |
} catch(ADEIException $ex) { |
54
by Suren A. Chilingaryan
Misc. interface fixes |
39 |
header("Content-type: text/plain"); |
25
by Suren A. Chilingaryan
Various LOGGER and ZEUSReader fixes |
40 |
$ex->logInfo(NULL, $export); |
24
by Suren A. Chilingaryan
Logger subsystem |
41 |
echo "ERROR: " . $ex->getInfo(); |
502
by Suren A. Chilingaryan
Support real-time export mode for status displays |
42 |
echo "\n"; |
1
by Suren A. Chilingaryan
Initial import |
43 |
}
|
44 |
||
45 |
?>
|