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
|
<?php
ADEI::RequireClass("export");
try {
$req = new DATARequest();
$rt_flags = 0;
if (isset($_GET["rt"])) {
switch($_GET["rt"]) {
case "skip_headers":
$rt_flags = EXPORT::RT_SKIP_HEADERS;
break;
case "full":
default:
$rt_flags = EXPORT::RT_FULL;
$props = &$req->props;
if (!isset($props['experiment']))
$props['experiment'] = "*-*";
if ($props['window'] == "-1")
$props['window'] = "31536000,-1";
}
}
$export = $req->CreateExporter();
if ($rt_flags) {
$export->SetRealTimeMode($rt_flags);
}
if (isset($_GET["cache"])) {
$export->SetCacheMode(true);
}
$export->Export();
} catch(ADEIException $ex) {
header("Content-type: text/plain");
$ex->logInfo(NULL, $export);
echo "ERROR: " . $ex->getInfo();
echo "\n";
}
?>
|