Index: trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php	(revision 7577)
+++ trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php	(revision 7578)
@@ -42,5 +42,6 @@
                 {
                     $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' ";
-                    $query0 .= ", '&nbsp;<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>')";
+                    $query0 .= ", '&nbsp;<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>'";
+                    $query0 .= ", '&nbsp;<A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>') ";
                     $query0 .= " as 'Links'";
                 }
Index: trunk/MagicSoft/Mars/datacenter/db/ganymed.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/ganymed.php	(revision 7577)
+++ trunk/MagicSoft/Mars/datacenter/db/ganymed.php	(revision 7578)
@@ -20,8 +20,22 @@
         $query0 .= " LEFT JOIN Ganymed ON DataSets.fDataSetNumber=Ganymed.fDataSetNumber ";
 
-        $query0 .= " WHERE DataSets.fDataSetNumber between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ;
+        if (!empty($_GET["fRunMin"]) && !empty($_GET["fRunMax"]))
+            $query0 .= " WHERE DataSets.fDataSetNumber between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ;
         if (!empty($_GET["fDataSetNo"]))
-            $query0 .= " AND DataSets.fDataSetNumber='" . $_GET["fDataSetNo"] . "'";
-        $query0 .= " AND fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" ";
+        {
+            if (strpos($query0, " WHERE ")==FALSE)
+                $query0 .= " WHERE ";
+            else
+                $query0 .= " AND ";
+            $query0 .= " DataSets.fDataSetNumber='" . $_GET["fDataSetNo"] . "'";
+        }
+        if (!empty($_GET["fSourceN"]))
+        {
+            if (strpos($query0, " WHERE ")==FALSE)
+                $query0 .= " WHERE ";
+            else
+                $query0 .= " AND ";
+            $query0 .= " fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" ";
+        }
         $query0 .= " ORDER BY DataSets.fDataSetNumber ";
 
@@ -117,36 +131,6 @@
         return "there is an error -> tell Dani";
     }
-/*
-    function GetSequences($datasetfile)
-//    function QueryRuns($type, $sequ, $db_id, $db)
-    {
-        printf(" <td align='left'>");
-        printf(" to be done");
-        printf(" </td>\n");
-        printf(" <td> to be done ");
-        printf(" </td>\n");
-     }
-
-    function QueryMissingFiles($sequ, $db_id, $db)
-    {
-        $query2  = "SELECT fSequenceFirst FROM SequencesSequenceProcessStatus ";
-        $query2 .= " WHERE fSequenceFirst=" . $sequ . " AND IsNull(fStar)";
-
-        mysql_select_db($db);
-        $files = mysql_query($query2, $db_id);
-        $numfiles = mysql_num_rows($files);
-        printf(" <td align='left'>");
-        for ($i=0 ; $i<$numfiles ; $i++)
-        {
-            $file=mysql_result($files, $i, 0);
-            if ($i!=0)
-                printf(", ");
-            printf(" %s ", $file);
-        }
-        printf(" </td>\n");
-     }
-*/
-
-    function PrintDataSetInfo($result0)
+
+    function PrintDataSetInfo($result0, $ganymedtabs)
     {
         $numres = mysql_num_rows($result0);
@@ -234,10 +218,5 @@
                     $sequences=split(" ", trim($sequon));
                     foreach($sequences as $key => $sequ)
-                    {
-                        $sequno=sprintf("%08d",$sequ);
-                        $sequno2=substr($sequno,0,4);
-                        printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/star/%s/%s/\">%s</a> ",
-                               $sequno2, $sequno, $sequ);
-                    }
+                        printf("<a href=\"sequence.php?fSequenceNo=%s&fAll=On\">%s</a> ", $sequ, $sequ);
                     printf("</td></tr>");
 
@@ -247,13 +226,15 @@
                         $sequences=split(" ", trim($sequoff));
                         foreach($sequences as $key => $sequ)
-                        {
-                            $sequno=sprintf("%08d",$sequ);
-                            $sequno2=substr($sequno,0,4);
-                            printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/star/%s/%s/\">%s</a> ",
-                                   $sequno2, $sequno, $sequ);
-                        }
+                            printf("<a href=\"sequence.php?fSequenceNo=%s&fAll=On\">%s</a> ", $sequ, $sequ);
+                        printf("</td></tr>");
                     }
                 }
             }
+            printf("<tr><td colspan=\"6\">\n Plots: ");
+            foreach($ganymedtabs as $key => $element)
+                if (!$key==0)
+                    printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/%s/%s/ganymed%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element);
+
+            printf("</td></tr>");
 
             if ($_GET["fAll"]=="On" && !is_null($ganymed))
@@ -276,5 +257,5 @@
     }
 
-    function PrintPage($html, $host, $user, $pw, $db)
+    function PrintPage($html, $host, $user, $pw, $db, $ganymedtabs)
     {
         $db_id = mysql_connect($host, $user, $pw);
@@ -293,5 +274,5 @@
         {
             if ($html=="1" || $html=="2")
-                PrintDataSetInfo($result0);
+                PrintDataSetInfo($result0, $ganymedtabs);
             else
                 PrintText($result0);
@@ -307,4 +288,5 @@
     include ("include.php");
     include ("db.php");
+    include ("tabs.php");
 
     ini_set("display_errors", "On");
@@ -316,5 +298,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $host, $user, $pw, $db);
+        PrintPage("0", $host, $user, $pw, $db, $ganymedtabs);
     }
     else
@@ -333,7 +315,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $host, $user, $pw, $db);
-            else
-                PrintPage("2", $host, $user, $pw, $db);
+                PrintPage("1", $host, $user, $pw, $db, $ganymedtabs);
+            else
+                PrintPage("2", $host, $user, $pw, $db, $ganymedtabs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/sequence.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sequence.php	(revision 7577)
+++ trunk/MagicSoft/Mars/datacenter/db/sequence.php	(revision 7578)
@@ -52,8 +52,23 @@
         $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst ";
 
-        $query0 .= " WHERE Sequences.fSequenceFirst between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ;
+
+        if (!empty($_GET["fRunMin"]) && !empty($_GET["fRunMax"]))
+            $query0 .= " WHERE Sequences.fSequenceFirst between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ;
         if (!empty($_GET["fSequenceNo"]))
-            $query0 .= " AND Sequences.fSequenceFirst='" . $_GET["fSequenceNo"] . "'";
-        $query0 .= " AND fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" ";
+        {
+            if (strpos($query0, " WHERE ")==FALSE)
+                $query0 .= " WHERE ";
+            else
+                $query0 .= " AND ";
+            $query0 .= " Sequences.fSequenceFirst='" . $_GET["fSequenceNo"] . "'";
+        }
+        if (!empty($_GET["fSourceN"]))
+        {
+            if (strpos($query0, " WHERE ")==FALSE)
+                $query0 .= " WHERE ";
+            else
+                $query0 .= " AND ";
+            $query0 .= " fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" ";
+        }
         $query0 .= " ORDER BY Sequences.fSequenceFirst ";
 
@@ -198,5 +213,5 @@
 
 
-    function PrintSequenceInfo($result0, $db_id, $db)
+    function PrintSequenceInfo($result0, $db_id, $db, $calibtabs, $signaltabs, $startabs)
     {
         $numres = mysql_num_rows($result0);
@@ -211,4 +226,6 @@
         {
             $firstrun=mysql_result($result0, $i, 0);
+            $num=sprintf("%08d",$firstrun);
+            $num2=substr($num,0,4);
             $lastrun=mysql_result($result0, $i, 1);
             $source=mysql_result($result0, $i, 2);
@@ -270,5 +287,5 @@
             printf(" <table BORDER=\"1\">");
             printf(" <tr BGCOLOR='#C0C0C0'>\n");
-            printf(" <th><u>Sequence#:</u> %s </th>", $firstrun);
+            printf(" <th>Sequence#: <a href=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/%s/sequence%s.txt\">%s</a> </th>", $num2, $num, $firstrun);
             printf(" </tr><tr BGCOLOR='#D0D0D0' ALIGN='left'>\n");
             printf(" <th> %s, %s, zd: %s&deg;-%s&deg;, %.2fmin ",
@@ -460,5 +477,30 @@
                     printf(" </tr>");
                     printf(" </table>");
+
+                    printf("</td></tr><tr><td>");
                 }
+
+
+                printf(" <table BORDER=\"1\">");
+                printf(" <tr BGCOLOR='#C0C0C0'>");
+                printf(" <th>plots</th>\n");
+                printf(" <tr><td>calib: ");
+                foreach($calibtabs as $key => $element)
+                    if (!$key==0)
+                        printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/%s/%s/calib%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element);
+                printf("</td></tr>");
+                printf(" <tr><td>signal: ");
+                foreach($signaltabs as $key => $element)
+                    if (!$key==0)
+                        printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/%s/%s/signal%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element);
+                printf("</td></tr>");
+                printf(" <tr><td>star: ");
+                foreach($startabs as $key => $element)
+                    if (!$key==0)
+                        printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/star/%s/%s/star%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element);
+                printf("</td></tr>");
+
+                printf(" </tr>");
+                printf(" </table>");
 
                 printf(" <table BORDER=\"1\">");
@@ -510,5 +552,5 @@
     }
 
-    function PrintPage($html, $host, $user, $pw, $db)
+    function PrintPage($html, $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs)
     {
         $db_id = mysql_connect($host, $user, $pw);
@@ -527,5 +569,5 @@
         {
             if ($html=="1" || $html=="2")
-                PrintSequenceInfo($result0, $db_id, $db);
+                PrintSequenceInfo($result0, $db_id, $db, $calibtabs, $signaltabs, $startabs);
             else
                 PrintText($result0);
@@ -541,4 +583,5 @@
     include ("include.php");
     include ("db.php");
+    include ("tabs.php");
 
     ini_set("display_errors", "On");
@@ -550,5 +593,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $host, $user, $pw, $db);
+        PrintPage("0", $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs);
     }
     else
@@ -567,7 +610,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $host, $user, $pw, $db);
+                PrintPage("1", $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs);
             else
-                PrintPage("2", $host, $user, $pw, $db);
+                PrintPage("2", $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/sequinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sequinfo.php	(revision 7577)
+++ trunk/MagicSoft/Mars/datacenter/db/sequinfo.php	(revision 7578)
@@ -56,5 +56,6 @@
                         $query0 .= ", '&nbsp;<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'star', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">sl</A>'";
                         $query0 .= ", '&nbsp;<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">s</A>'";
-                        $query0 .= ", '&nbsp;<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>') ";
+                        $query0 .= ", '&nbsp;<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' ";
+                        $query0 .= ", '&nbsp;<A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>') ";
                         $query0 .= " as 'Links'";
                     }
Index: trunk/MagicSoft/Mars/datacenter/db/tabs.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/tabs.php	(revision 7578)
+++ trunk/MagicSoft/Mars/datacenter/db/tabs.php	(revision 7578)
@@ -0,0 +1,11 @@
+<?php
+
+$ganymedtabs = array ("0", "PreCut", "FSOff", "PostCut", "VsSize", "HillasExt", "HilSrc", "ImgPar", "NewPar", "HistOff", "FS", "Hist", "MHPhi", "OnTime");
+
+$startabs = array ("0", "Rate", "EffOnTime", "Cleaned", "UsedPix", "MHHillas", "MHHillasExt", "MHHillasSrc", "MHImagePar", "MHNewImagePar", "MHMuonPar", "MHWeather", "MHPointing", "Curents", "MeanRms");
+
+$calibtabs = array ("0", "Ped", "PedExtr", "Time", "Charge", "FitCharge", "Conversion", "AbsTime", "Defect", "RelTimes");
+
+$signaltabs = array ("0", "PedFLG", "PedRmsFLG", "Extrac'd", "Conv", "Unsuitable", "PedRms", "Interpol'd", "Times", "PulsePos");
+
+?>
