4
header("Content-Type: text/html; charset=UTF-8");
5
header("Cache-Control: no-cache, must-revalidate");
6
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
11
<style type="text/css">
20
border: 1px solid #C0C0C0;
21
text-decoration: none;
24
border: 1px #007000 solid;
32
function data_link(&$req, $grname, $format, $from, $to) {
36
$props["experiment"] = "$from-$to";
37
$props["window"] = "0";
38
$props["format"] = $format;
40
if ($FORMATS[$format]["title"]) $title = $FORMATS[$format]["title"];
41
else $title = $format;
42
if ($FORMATS[$format]["extension"]) $ext = $FORMATS[$format]["extension"];
46
// $props["filename"] = preg_replace("/[^\w\d]/", "_", $grname) . "__" . round($from) . "_" . round($to) . "." . $ext;
48
$query = $req->GetQueryString($props);
50
echo "<a href=\"services/getdata.php?$query\">" . $title . "</a>";
54
$req = new SOURCERequest();
55
} catch (ADEIException $e) {
61
$list = $req->GetSourceList(REQUEST::LIST_ALL);
62
?><div class="header"><?
63
foreach ($list as $sreq) {
64
?><a href="download.php?<?echo $sreq->GetQueryString();?>"><?echo $sreq->props['db_server'];?>.<?echo $sreq->props['db_name'];?></a> <?
66
?><a href="csvmerge.php">Merge Groups</a></div><?
70
?><h3>Server: <?echo $req->props['db_server'];?>, DataBase: <?echo $req->props['db_name'];?></h3><?
73
//$props = array("db_server"=>"katrin", "db_name"=>"HS");
74
$reader = $req->CreateReader();
75
$groups = $reader->GetGroupList(READER::NEED_INFO);
77
$list = $req->GetGroupList();
78
foreach ($list as $gid => $greq) {
79
$group = $groups[$gid];
80
?><div style="background-color: grey">
81
<h3><?echo $group["name"];?></h3>
82
<?echo $group["comment"];?>
85
$first = $group["first"];
86
$last = $group["last"];
88
$first = floor($first);
91
$first_day = $first - ($first % 86400);
92
if ($last%86400) $last_day = $last + 86400 - ($last % 86400);
93
else $last_day = $last - ($last % 86400);
96
for ($i=$first_day; $i<$last_day; $i += 86400) {
97
echo date("d.m.Y", $i) . "(";
101
foreach ($EXPORT_FORMATS as $format => $fattr) {
102
if ($first_flag) $first_flag = 0;
105
data_link($greq, $group["name"], $format, ($i>$first)?$i:$first, (($i + 86400)>$last)?$last:($i + 86400));
114
foreach ($EXPORT_FORMATS as $format => $fname) {
115
if ($first_flag) $first_flag = 0;
118
data_link($greq, $group["name"], $format, $first, $last);
126
(*) the GMT days are used
b'\\ No newline at end of file'