Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 8248)
+++ trunk/MagicSoft/Mars/Changelog	(revision 8249)
@@ -18,4 +18,16 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2007/01/15 Daniela Dorner
+
+   * datacenter/db/sources.php, datacenter/db/sequinfo-aio.php, 
+     datacenter/db/runinfo-aio.php, datacenter/db/printtable.php,
+     datacenter/db/plotdb.php, datacenter/db/menu.php, 
+     datacenter/db/findoffdata.php, datacenter/db/builddatasets.php, 
+     datacenter/db/datasetinfo.php:
+     - fixed bug in init of $_GET
+
+
+
  2007/01/12 Stefan Ruegamer
 
Index: trunk/MagicSoft/Mars/datacenter/db/builddatasets.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/builddatasets.php	(revision 8249)
@@ -409,5 +409,5 @@
             $_GET["fOnlyOff"]=$first?"Off":"";
 
-        InitSequInfo($_GET);
+        InitFindOffData($_GET, $first);
     }
 
Index: trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/datasetinfo-aio.php	(revision 8249)
@@ -187,5 +187,5 @@
             $_GET["fSourceName"]=$first?"On":"";
 
-        InitDataSetInfo($_GET);
+        InitDataSetInfo($_GET, $first);
     }
 
Index: trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/findoffdata.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/findoffdata.php	(revision 8249)
@@ -286,5 +286,5 @@
             $_GET["fDataRate"]=$first?"On":"";
 
-        InitFindOffData($_GET);
+        InitFindOffData($_GET, $first);
     }
 
Index: trunk/MagicSoft/Mars/datacenter/db/menu.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/menu.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/menu.php	(revision 8249)
@@ -536,5 +536,5 @@
 }
 
-function InitFailInfo($_GET)
+function InitFailInfo($_GET, $first)
 {
     if (empty($_GET["fStartTime"]))
@@ -554,5 +554,5 @@
 }
 
-function InitInfo($_GET)
+function InitInfo($_GET, $first)
 {
     if (empty($_GET["fNumResults"]))
@@ -599,5 +599,5 @@
 }
 
-function InitRunStatus($_GET)
+function InitRunStatus($_GET, $first)
 {
    if (empty($_GET["fDataCheckDone"]))
@@ -638,9 +638,9 @@
 }
 
-function InitRunInfo($_GET)
-{
-    InitRunStatus($_GET);
-    InitInfo($_GET);
-    InitFailInfo($_GET);
+function InitRunInfo($_GET, $first)
+{
+    InitRunStatus($_GET, $first);
+    InitInfo($_GET, $first);
+    InitFailInfo($_GET, $first);
 
     if (empty($_GET["fFormatVersion"]))
@@ -693,5 +693,5 @@
 }
 
-function InitSequStatus($_GET)
+function InitSequStatus($_GET, $first)
 {
     if (empty($_GET["fSequenceFileWritten"]))
@@ -732,5 +732,5 @@
 }
 
-function InitStarInfo($_GET)
+function InitStarInfo($_GET, $first)
 {
     if (empty($_GET["fMeanNumberIslands"]))
@@ -763,7 +763,25 @@
     if (empty($_GET["fMaxHumidity"]))
         $_GET["fMaxHumidity"]="Off";
-}
-
-function InitCalInfo($_GET)
+
+    if (empty($_GET["fBrightnessMed"]))
+        $_GET["fBrightnessMed"]="Off";
+
+    if (empty($_GET["fBrightnessRMS"]))
+        $_GET["fBrightnessRMS"]="Off";
+
+    if (empty($_GET["fNumStarsMed"]))
+        $_GET["fNumStarsMed"]="Off";
+
+    if (empty($_GET["fNumStarsRMS"]))
+        $_GET["fNumStarsRMS"]="Off";
+
+    if (empty($_GET["fNumStarsCorMed"]))
+        $_GET["fNumStarsCorMed"]="Off";
+
+    if (empty($_GET["fNumStarsCorRMS"]))
+        $_GET["fNumStarsCorRMS"]="Off";
+}
+
+function InitCalInfo($_GET, $first)
 {
     if (empty($_GET["fUnreliableInner"]))
@@ -822,11 +840,11 @@
 }
 
-function InitSequInfo($_GET)
-{
-    InitInfo($_GET);
-    InitSequStatus($_GET);
-    InitFailInfo($_GET);
-    InitCalInfo($_GET);
-    InitStarInfo($_GET);
+function InitSequInfo($_GET, $first)
+{
+    InitInfo($_GET, $first);
+    InitSequStatus($_GET, $first);
+    InitFailInfo($_GET, $first);
+    InitCalInfo($_GET, $first);
+    InitStarInfo($_GET, $first);
 
     if (empty($_GET["fRunTime/60"]))
@@ -855,5 +873,5 @@
 }
 
-function InitDataSetStatus($_GET)
+function InitDataSetStatus($_GET, $first)
 {
     if (empty($_GET["fDataSetInserted"]))
@@ -882,8 +900,8 @@
 }
 
-function InitDataSetInfo($_GET)
-{
-    InitDataSetStatus($_GET);
-    InitFailInfo($_GET);
+function InitDataSetInfo($_GET, $first)
+{
+    InitDataSetStatus($_GET, $first);
+    InitFailInfo($_GET, $first);
 
     if (empty($_GET["fNumResults"]))
@@ -927,7 +945,7 @@
 }
 
-function InitFindOffData($_GET)
-{
-    InitSequInfo($_GET);
+function InitFindOffData($_GET, $first)
+{
+    InitSequInfo($_GET, $first);
 
     if (empty($_GET["fArrTimeLimitMean"]))
@@ -961,12 +979,106 @@
         $_GET["fPSFLimitRms"]="";
 
-    if (empty($_GET["fUnsInLimitMean"]))
-        $_GET["fUnsInLimitMean"]="";
-
-    if (empty($_GET["fZdMinLimitMean"]))
-        $_GET["fZdMinLimitMean"]="";
-
-    if (empty($_GET["fZdMaxLimitMean"]))
-        $_GET["fZdMaxLimitMean"]="";
+    if (empty($_GET["fUnsInLimit1"]))
+        $_GET["fUnsInLimit1"]="";
+
+    if (empty($_GET["fUnsInLimit2"]))
+        $_GET["fUnsInLimit2"]="";
+
+    if (empty($_GET["fIsoInLimit1"]))
+        $_GET["fIsoInLimit1"]="";
+
+    if (empty($_GET["fIsoInLimit2"]))
+        $_GET["fIsoInLimit2"]="";
+
+    if (empty($_GET["fIMCLimit1"]))
+        $_GET["fIMCLimit1"]="";
+
+    if (empty($_GET["fIMCLimit2"]))
+        $_GET["fIMCLimit2"]="";
+
+    if (empty($_GET["fZdMinLimit1"]))
+        $_GET["fZdMinLimit1"]="";
+
+    if (empty($_GET["fZdMinLimit2"]))
+        $_GET["fZdMinLimit2"]="";
+
+    if (empty($_GET["fZdMaxLimit1"]))
+        $_GET["fZdMaxLimit1"]="";
+
+    if (empty($_GET["fZdMaxLimit2"]))
+        $_GET["fZdMaxLimit2"]="";
+
+    if (empty($_GET["fMuonCalLimitMean"]))
+        $_GET["fMuonCalLimitMean"]="";
+
+    if (empty($_GET["fMuonCalLimitRms"]))
+        $_GET["fMuonCalLimitRms"]="";
+
+    if (empty($_GET["fInhomLimitMean"]))
+        $_GET["fInhomLimitMean"]="";
+
+    if (empty($_GET["fInhomLimitRms"]))
+        $_GET["fInhomLimitRms"]="";
+
+    if (empty($_GET["fNumIslLimitMean"]))
+        $_GET["fNumIslLimitMean"]="";
+
+    if (empty($_GET["fNumIslLimitRms"]))
+        $_GET["fNumIslLimitRms"]="";
+
+    if (empty($_GET["fSkyBrightLimitMean"]))
+        $_GET["fSkyBrightLimitMean"]="";
+
+    if (empty($_GET["fSkyBrightLimitRms"]))
+        $_GET["fSkyBrightLimitRms"]="";
+
+    if (empty($_GET["fNumStarsLimit1"]))
+        $_GET["fNumStarsLimit1"]="";
+
+    if (empty($_GET["fNumStarsLimit2"]))
+        $_GET["fNumStarsLimit2"]="";
+
+    if (empty($_GET["fNumStarsCorLimit1"]))
+        $_GET["fNumStarsCorLimit1"]="";
+
+    if (empty($_GET["fNumStarsCorLimit2"]))
+        $_GET["fNumStarsCorLimit2"]="";
+
+    if (empty($_GET["fMuonNumLimit1"]))
+        $_GET["fMuonNumLimit1"]="";
+
+    if (empty($_GET["fMuonNumLimit2"]))
+        $_GET["fMuonNumLimit2"]="";
+
+    if (empty($_GET["fRelTimeMinLimit1"]))
+        $_GET["fRelTimeMinLimit1"]="";
+
+    if (empty($_GET["fRelTimeMinLimit2"]))
+        $_GET["fRelTimeMinLimit2"]="";
+
+    if (empty($_GET["fRelTimeMaxLimit1"]))
+        $_GET["fRelTimeMaxLimit1"]="";
+
+    if (empty($_GET["fRelTimeMaxLimit2"]))
+        $_GET["fRelTimeMaxLimit2"]="";
+
+    if (empty($_GET["fRunTimeLimit1"]))
+        $_GET["fRunTimeLimit1"]="";
+
+    if (empty($_GET["fRunTimeLimit2"]))
+        $_GET["fRunTimeLimit2"]="";
+
+    if (empty($_GET["fPulsePosLimit1"]))
+        $_GET["fPulsePosLimit1"]="";
+
+    if (empty($_GET["fPulsePosLimit2"]))
+        $_GET["fPulsePosLimit2"]="";
+
+    if (empty($_GET["fMaxHumLimit1"]))
+        $_GET["fMaxHumLimit1"]="";
+
+    if (empty($_GET["fMaxHumLimit2"]))
+        $_GET["fMaxHumLimit2"]="";
+
 }
 
Index: trunk/MagicSoft/Mars/datacenter/db/plotdb.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/plotdb.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/plotdb.php	(revision 8249)
@@ -19,4 +19,10 @@
 
         printf("</select>\n");
+
+        if (empty($_GET[$_GET[$column."Col".$num]."Start".$num]))
+            $_GET[$_GET[$column."Col".$num]."Start".$num]=0;
+        if (empty($_GET[$_GET[$column."Col".$num]."Stop".$num]))
+            $_GET[$_GET[$column."Col".$num]."Stop".$num]=0;
+
         printf(" from&nbsp;<input name='%sStart%s' type='text' size='6' maxlength='6' value='%s'>", $_GET[$column."Col".$num], $num, $_GET[$_GET[$column."Col".$num]."Start".$num]);
         printf(" to&nbsp;<input name='%sStop%s' type='text' size='6' maxlength='6' value='%s'><br>\n", $_GET[$column."Col".$num], $num, $_GET[$_GET[$column."Col".$num]."Stop".$num]);
@@ -30,4 +36,38 @@
 
     include("plotinclude.php");
+
+    //init
+    if (empty($_GET["plot"]))
+        $_GET["plot"]=0;
+    if (empty($_GET["primstart"]))
+        $_GET["primstart"]=0;
+    if (empty($_GET["primstop"]))
+        $_GET["primstop"]=0;
+    if (empty($_GET["prim"]))
+        $_GET["prim"]=0;
+    if (empty($_GET["fSequenceFirstCol"]))
+        $_GET["fSequenceFirstCol"]=0;
+    if (empty($_GET["fSequenceFirstCol2"]))
+        $_GET["fSequenceFirstCol2"]=0;
+    if (empty($_GET["fRunNumberCol"]))
+        $_GET["fRunNumberCol"]=0;
+    if (empty($_GET["fRunNumberCol2"]))
+        $_GET["fRunNumberCol2"]=0;
+    if (empty($_GET["fDataSetNumberCol"]))
+        $_GET["fDataSetNumberCol"]=0;
+    if (empty($_GET["fDataSetNumberCol2"]))
+        $_GET["fDataSetNumberCol2"]=0;
+    if (empty($_GET["0Start"]))
+        $_GET["0Start"]=0;
+    if (empty($_GET["0Stop"]))
+        $_GET["0Stop"]=0;
+    if (empty($_GET["0Start2"]))
+        $_GET["0Start2"]=0;
+    if (empty($_GET["0Stop2"]))
+        $_GET["0Stop2"]=0;
+    if (empty($_GET["Set"]))
+        $_GET["Set"]=0;
+    if (empty($_GET["Set2"]))
+        $_GET["Set2"]=0;
 
     printf("<center>\n<table cellpadding='0'>\n");
Index: trunk/MagicSoft/Mars/datacenter/db/printtable.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/printtable.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/printtable.php	(revision 8249)
@@ -74,5 +74,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $host, $user, $pw, $db, $limits, $rms);
+        PrintPage("0", $host, $user, $pw, $db, "", "");
     }
     else
@@ -87,5 +87,5 @@
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $host, $user, $pw, $db, $limits, $rms);
+            PrintPage("1", $host, $user, $pw, $db, "", "");
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php	(revision 8249)
@@ -222,5 +222,5 @@
             $_GET["fSequenceNo"]="";
 
-        InitRunInfo($_GET);
+        InitRunInfo($_GET, $first);
     }
 
Index: trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php	(revision 8249)
@@ -272,5 +272,5 @@
             $_GET["fOnlyOff"]=$first?"Off":"";
 
-        InitSequInfo($_GET);
+        InitFindOffData($_GET, $first);
     }
 
Index: trunk/MagicSoft/Mars/datacenter/db/sources.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sources.php	(revision 8248)
+++ trunk/MagicSoft/Mars/datacenter/db/sources.php	(revision 8249)
@@ -49,4 +49,7 @@
         if (empty($_GET["fOff"]))
             $_GET["fOff"]="Off";
+
+        if (empty($_GET["fTest"]))
+            $_GET["fTest"]="Off";
 
         if (empty($_GET["fLinks"]))
