Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 7545)
+++ trunk/MagicSoft/Mars/Changelog	(revision 7546)
@@ -24,4 +24,13 @@
        account, when dataset files are searched
 
+   * datacenter/db/*.php:
+     - moved user, host and pw of database to the include file db.php
+
+   * datacenter/db/index.html:
+     - fixed links
+
+   * datacenter/db/querymc.php,magicdefs.php:
+     - added some variables 
+
 
 
Index: trunk/MagicSoft/Mars/datacenter/db/culminating.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/culminating.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/culminating.php	(revision 7546)
@@ -134,5 +134,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -155,5 +155,5 @@
         printf(" <table>\n");
         printf("  <tr><td>\n");
-        PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
+        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
         printf("  </td></tr>\n");
         printf(" </table>\n");
@@ -161,10 +161,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -210,7 +210,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -251,5 +251,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     }
     else
@@ -260,10 +260,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/datacheck.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/datacheck.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/datacheck.php	(revision 7546)
@@ -271,5 +271,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -321,5 +321,5 @@
         printf("</td><td>\n");
 
-        PrintPullDown($db, "RunType",      "fRunTypeName",      "fRunTypeKEY", "Run Type");
+        PrintPullDown($host, $user, $pw, $db, "RunType",      "fRunTypeName",      "fRunTypeKEY", "Run Type");
 
         printf("  </td></tr>\n");
@@ -328,10 +328,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fRunNumber", "RunData", $db);
+            $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fRunNumber", "RunData", $db);
+            $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -380,7 +380,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -421,5 +421,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
     }
     else
@@ -431,5 +431,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db);
+            PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
@@ -438,7 +438,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
+                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
             else
-                PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
+                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php	(revision 7546)
@@ -228,5 +228,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -269,5 +269,5 @@
         printf("  </td></tr><tr><td>\n");
 
-        PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
+        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
 
         printf("  </td></tr>\n");
@@ -276,10 +276,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fDataSetNumber", "DataSets", $db);
+            $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fDataSetNumber", "DataSets", $db);
+            $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -333,7 +333,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -374,5 +374,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     }
     else
@@ -384,5 +384,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db);
+            PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
@@ -391,7 +391,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
             else
-                PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/db.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/db.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/db.php	(revision 7546)
@@ -1,3 +1,7 @@
 <?php
+
+$host="hercules.astro.uni-wuerzburg.de";
+$user="MAGIC";
+$pw="d99swMT!";
 
 $db="MyMagic";
Index: trunk/MagicSoft/Mars/datacenter/db/dbstatus.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/dbstatus.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/dbstatus.php	(revision 7546)
@@ -222,5 +222,5 @@
 
         if (empty($_GET["fAllFilesAvailStatus"]))
-            $_GET["fAllFilesAvailStatus"]="4";
+            $_GET["fAllFilesAvailStatus"]="7";
 
         if (empty($_GET["fCallisto"]))
@@ -228,5 +228,5 @@
 
         if (empty($_GET["fCallistoStatus"]))
-            $_GET["fCallistoStatus"]="4";
+            $_GET["fCallistoStatus"]="7";
 
         if (empty($_GET["fFillCallisto"]))
@@ -240,5 +240,5 @@
 
         if (empty($_GET["fStarStatus"]))
-            $_GET["fStarStatus"]="4";
+            $_GET["fStarStatus"]="7";
 
         if (empty($_GET["fFillStar"]))
@@ -249,5 +249,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -272,5 +272,5 @@
         printf(" <table>\n");
         printf("  <tr><td>\n");
-        PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
+        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
         printf("  </td><td>\n");
 
@@ -285,10 +285,10 @@
 
         if (empty($_GET["fStartDate"]))
-            $timemin = GetMin("fRunStart", "Sequences", $db);
+            $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
         else
             $timemin = $_GET["fStartDate"];
 
         if (empty($_GET["fStopDate"]))
-            $timemax = GetMax("fRunStart", "Sequences", $db);
+            $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
         else
             $timemax = $_GET["fStopDate"];
@@ -298,10 +298,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -318,5 +318,5 @@
 
         printf("<input class='Width' type='submit' value='Query Table'>&nbsp;&nbsp;&nbsp;\n");
-        printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"sequinfo.php\"'>&nbsp;&nbsp;&nbsp;\n");
+        printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"dbstatus.php\"'>&nbsp;&nbsp;&nbsp;\n");
         if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
             printf("<input class='Width' type='button' value='Get .txt' onClick='self.location.href=\"%s&fSendTxt=1\"'>&nbsp;&nbsp;&nbsp;\n", $_SERVER["REQUEST_URI"]);
@@ -331,7 +331,7 @@
     }
 
-    function PrintPage($html, $db, $needs)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $needs)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -375,4 +375,5 @@
     include ("include.php");
     include ("db.php");
+    include ("magicdefs.php");
 
     ini_set("display_errors", "On");
@@ -384,5 +385,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db);
+        PrintPage("0", $host, $user, $pw, $db);
     }
     else
@@ -394,5 +395,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db);
+            PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
@@ -401,7 +402,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db, $needs);
+                PrintPage("1", $host, $user, $pw, $db, $needs);
             else
-                PrintPage("2", $db, $needs);
+                PrintPage("2", $host, $user, $pw, $db, $needs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/findoffdata.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/findoffdata.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/findoffdata.php	(revision 7546)
@@ -392,5 +392,5 @@
     }
 
-    function PrintForm($_GET, $db, $limits, $rms, $alias)
+    function PrintForm($_GET, $host, $user, $pw, $db, $limits, $rms, $alias)
     {
         printf("<center>\n");
@@ -478,11 +478,11 @@
         printf(" <table><tr><td>\n");
 
-        PrintPullDown($db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
+        PrintPullDown($host, $user, $pw, $db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
         printf("  </td><td>\n");
-        PrintPullDown($db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
+        PrintPullDown($host, $user, $pw, $db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
         printf("  </td><td>\n");
-        PrintPullDown($db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
+        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
+        PrintPullDown($host, $user, $pw, $db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
         printf("  </td><td>\n");
         PrintStatusMenu("fStar",                "Star");
@@ -507,10 +507,10 @@
 
         if (empty($_GET["fStarStart"]))
-            $starmin = GetMin("fStar", "SequenceProcessStatus", $db);
+            $starmin = GetMin("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
         else
             $starmin = $_GET["fStarStart"];
 
         if (empty($_GET["fStarStop"]))
-            $starmax = GetMax("fStar", "SequenceProcessStatus", $db);
+            $starmax = GetMax("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
         else
             $starmax = $_GET["fStarStop"];
@@ -528,10 +528,10 @@
 
         if (empty($_GET["fStartDate"]))
-            $timemin = GetMin("fRunStart", "Sequences", $db);
+            $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
         else
             $timemin = $_GET["fStartDate"];
 
         if (empty($_GET["fStopDate"]))
-            $timemax = GetMax("fRunStart", "Sequences", $db);
+            $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
         else
             $timemax = $_GET["fStopDate"];
@@ -541,10 +541,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -604,7 +604,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs)
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs)
     {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -645,5 +645,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
     }
     else
@@ -655,5 +655,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db, $limits, $rms, $alias);
+            PrintForm($_GET, $host, $user, $pw, $db, $limits, $rms, $alias);
 
         if ($environment==0)
@@ -662,7 +662,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
-            else
-                PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
+                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
+            else
+                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/ganymed.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/ganymed.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/ganymed.php	(revision 7546)
@@ -42,5 +42,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -54,10 +54,10 @@
         if (empty($_GET["fRunMin"]))
             $min = "100";
-//            $min = GetMin("fDataSetNumber", "DataSets", $db);
+//            $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fDataSetNumber", "DataSets", $db);
+            $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -139,5 +139,5 @@
 */
 
-    function PrintDataSetInfo($result0, $db_id, $db)
+    function PrintDataSetInfo($result0)
     {
         $numres = mysql_num_rows($result0);
@@ -219,7 +219,7 @@
     }
 
-    function PrintPage($html, $db)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -236,5 +236,5 @@
         {
             if ($html=="1" || $html=="2")
-                PrintDataSetInfo($result0, $db_id, $db);
+                PrintDataSetInfo($result0);
             else
                 PrintText($result0);
@@ -259,5 +259,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db);
+        PrintPage("0", $host, $user, $pw, $db);
     }
     else
@@ -269,5 +269,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db);
+            PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
@@ -276,7 +276,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db);
+                PrintPage("1", $host, $user, $pw, $db);
             else
-                PrintPage("2", $db);
+                PrintPage("2", $host, $user, $pw, $db);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/include.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/include.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/include.php	(revision 7546)
@@ -1,57 +1,3 @@
 <?php
-/*
-function PrintTable($table)
-{
-    $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
-    if ($db_id==FALSE)
-    {
-            printf("mysql_connect returned the following error:<br>");
-            printf("%s<br>", mysql_error());
-            die("");
-    }
-    printf("%s<br>", $table);
-    printf("<table BORDER=\"1\">");
-
-    $query = "EXPLAIN ";
-    $query .= $table;
-    
-    $result = mysql_query($query);
-    $numrows = mysql_num_rows($result);
-    $numcols = mysql_num_fields($result);
-    printf("%d x %d<br>", $numrows, $numcols);
-
-    printf("<tr>");
-    for ($i=0; $i<$numrows; $i++)
-    {
-       $row = mysql_fetch_row($result);
-       printf("<th>%s</th> ", $row[0]);
-    }
-    printf("</tr>");
-    
-    $query = "SELECT * FROM ";
-    $query .= $table;
-    
-    $result = mysql_query($query);
-    
-    $numrows = mysql_num_rows($result);
-    $numcols = mysql_num_fields($result);
-    printf("%d x %d<br>", $numrows, $numcols);
-
-    while ($row = mysql_fetch_row($result))
-    {
-       printf("<tr>");
-       foreach ($row as $entry)
-       {
-     	   printf("<td>%s</td> ", $entry);
-       }
-       printf("</tr>");
-    }
-    printf("</table>");
-    
-    mysql_free_result($result);
-
-    mysql_close($db_id);
-}
-*/
 
 function EnumQuery($name)
@@ -193,7 +139,7 @@
 }
 
-function PrintPullDown($db, $table, $name, $index, $descr)
-{
-    $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+function PrintPullDown($host, $user, $pw, $db, $table, $name, $index, $descr)
+{
+    $db_id = mysql_connect($host, $user, $pw);
     if ($db_id==FALSE)
     {
@@ -250,7 +196,7 @@
 }
 
-function GetMin($field, $table, $db)
-{
-    $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+function GetMin($field, $table, $host, $user, $pw, $db)
+{
+    $db_id = mysql_connect($host, $user, $pw);
     if ($db_id==FALSE)
     {
@@ -275,7 +221,7 @@
 }
 
-function GetMax($field, $table, $db)
-{
-    $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+function GetMax($field, $table, $host, $user, $pw, $db)
+{
+    $db_id = mysql_connect($host, $user, $pw);
     if ($db_id==FALSE)
     {
@@ -299,55 +245,4 @@
     return $max;
 }
-/*
-function GetMin()
-{
-    $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
-    if ($db_id==FALSE)
-    {
-            printf("mysql_connect returned the following error:<br>");
-            printf("%s<br>", mysql_error());
-            die("");
-    }
-
-    $query  = "SELECT MIN(fRunNumber) FROM MyMagic.RunData";
-    $result = mysql_query($query);
-    if (!$result)
-        return "0";
-
-    $row = mysql_fetch_row($result);
-
-    $min = $row[0];
-
-    mysql_free_result($result);
-    mysql_close($db_id);
-
-    return $min;
-}
-
-function GetMax()
-{
-    $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
-    if ($db_id==FALSE)
-    {
-            printf("mysql_connect returned the following error:<br>");
-            printf("%s<br>", mysql_error());
-            die("");
-    }
-
-    $query  = "SELECT MAX(fRunNumber) FROM MyMagic.RunData";
-    $result = mysql_query($query);
-    if (!$result)
-        return "0";
-
-    $row = mysql_fetch_row($result);
-
-    $max = $row[0];
-
-    mysql_free_result($result);
-    mysql_close($db_id);
-
-    return $max;
-}
-*/
 
 function PrintText($result0)
Index: trunk/MagicSoft/Mars/datacenter/db/index.html
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/index.html	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/index.html	(revision 7546)
@@ -45,5 +45,5 @@
 (<!--<A HREF="http://www.astro.uni-wuerzburg.de/~dorner/analysis/datasets.html">comments</A>, 
 -->
- <A HREF="http://www.astro.uni-wuerzburg.de/datacenter/datasets/">dataset files</A>)</li>
+<A HREF="http://www.astro.uni-wuerzburg.de/datacenter/datasets/">dataset files</A>)</li>
 <li><A HREF="ganymed.php">Results of the Automatic Analysis</A> 
 </ul>
@@ -63,5 +63,5 @@
 <li><A HREF="statussps.php">Sequence Process Status</A>: querying only the information from the table SequenceProcessStatus </li>
 <li><A HREF="printtable.php?fTable=MarsVersion">Mars Versions in the DC</A>: querying all information from the table MarsVersions </li>
-<li><A HREF="dbstatus.php?fAllFilesAvailStatus=0&fCallisto=On&fCallistoStatus=4&fStar=On&fStarStatus=4&fFillCallistoStatus=0&fFillStarStatus=0&fSourceName=On&fSourceKEY=0&fSourceN=&fStartDate=0000-00-00&fStopDate=2010-10-04&fRunMin=3340&fRunMax=64713&fNumResults=20">Processing status</A> (a simplified version of sequinfo.php)</li>
+<li><A HREF="dbstatus.php?fAllFilesAvailStatus=0&fCallisto=On&fCallistoStatus=7&fStar=On&fStarStatus=7&fFillCallistoStatus=0&fFillStarStatus=0&fSourceName=On&fSourceKEY=0&fSourceN=&fStartDate=0000-00-00&fStopDate=2010-10-04&fRunMin=3340&fRunMax=64713&fNumResults=20">Processing status</A> (a simplified version of sequinfo.php)</li>
 </ul>
 Some very simple queries:<p>
Index: trunk/MagicSoft/Mars/datacenter/db/index.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/index.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/index.php	(revision 7546)
@@ -226,5 +226,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -260,39 +260,39 @@
         printf(" <table>\n");
         printf("  <tr><td>\n");
-        PrintPullDown($db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
+        PrintPullDown($host, $user, $pw, $db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
+        PrintPullDown($host, $user, $pw, $db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
+        PrintPullDown($host, $user, $pw, $db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
+        PrintPullDown($host, $user, $pw, $db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
         printf(" </td></tr></table>\n");
         printf(" <p>\n");
 
         if (empty($_GET["fStartDate"]))
-            $timemin = GetMin("fRunStart", "RunData", $db);
+            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemin = $_GET["fStartDate"];
 
         if (empty($_GET["fStopDate"]))
-            $timemax = GetMax("fRunStart", "RunData", $db);
+            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemax = $_GET["fStopDate"];
@@ -309,10 +309,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fRunNumber", "RunData", $db);
+            $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fRunNumber", "RunData", $db);
+            $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -357,7 +357,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -400,5 +400,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     }
     else
@@ -409,10 +409,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/magicdefs.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/magicdefs.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/magicdefs.php	(revision 7546)
@@ -65,4 +65,5 @@
      "fTestFlagName"                     => CheckWhere("fTestFlagKEY",                     $_GET),
      "fLightConditionsName"              => CheckWhere("fLightConditionsKEY",              $_GET),
+     "fParticleTypeName"                 => CheckWhere("fParticleTypeKEY",                 $_GET),
     );
 
@@ -83,4 +84,5 @@
      "fTestFlagName"                     => CheckGroup("fTestFlagKEY",                     $_GET),
      "fLightConditionsName"              => CheckGroup("fLightConditionsKEY",              $_GET),
+     "fParticleTypeName"                 => CheckGroup("fParticleTypeKEY",                 $_GET),
     );
 
@@ -260,4 +262,5 @@
      "fEMin"                            => "Emin",
      "fEMax"                            => "Emax",
+     "fParticleTypeName"                => "Particle",
      "fStartTime"                       => "Process",
      "fFailedTime"                      => "Failed",
@@ -369,4 +372,5 @@
          "fTestFlagName"                     => $fromtable . ".fTestFlagKEY",
          "fLightConditionsName"              => $fromtable . ".fLightConditionsKEY",
+         "fParticleTypeName"                 => $fromtable . ".fParticleTypeKEY",
         );
 
@@ -500,9 +504,10 @@
          "Max(fZenithDistance)"              => "'ZdMax'",
 //         "COUNT(*)"                          => "'Sequ'",
-         "fStartTime"                       => "fStartTime",
-         "fFailedTime"                      => "fFailedTime",
-         "fReturnCode"                      => "fReturnCode",
-         "fFailedCode"                      => "fFailedCode",
-         "fFailedCodeAdd"                   => "fFailedCodeAdd",
+         "fStartTime"                        => "fStartTime",
+         "fFailedTime"                       => "fFailedTime",
+         "fReturnCode"                       => "fReturnCode",
+         "fFailedCode"                       => "fFailedCode",
+         "fFailedCodeAdd"                    => "fFailedCodeAdd",
+         "fParticleTypeName"                 => "ParticleType.fParticleTypeName",
         );
 
@@ -532,4 +537,5 @@
          "fTestFlagName"                     => " LEFT JOIN TestFlag                     ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY",
          "fLightConditionsName"              => " LEFT JOIN LightConditions              ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY",
+         "fParticleTypeName"                 => " LEFT JOIN ParticleType                 ON " . $fromtable . ".fParticleTypeKEY=ParticleType.fParticleTypeKEY ",
         );
 
Index: trunk/MagicSoft/Mars/datacenter/db/printtable.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/printtable.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/printtable.php	(revision 7546)
@@ -10,5 +10,5 @@
     }
 
-    function PrintPage($html, $db, $limits, $rms)
+    function PrintPage($html, $host, $user, $pw, $db, $limits, $rms)
     {
         if (empty($_GET["fTable"]))
@@ -19,5 +19,5 @@
         }
 
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -67,5 +67,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $limits, $rms);
+        PrintPage("0", $host, $user, $pw, $db, $limits, $rms);
     }
     else
@@ -80,5 +80,5 @@
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $limits, $rms);
+            PrintPage("1", $host, $user, $pw, $db, $limits, $rms);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/querycal.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/querycal.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/querycal.php	(revision 7546)
@@ -102,5 +102,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -138,10 +138,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -182,7 +182,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -223,5 +223,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
     }
     else
@@ -232,10 +232,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkwhere);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/querymc.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/querymc.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/querymc.php	(revision 7546)
@@ -131,9 +131,9 @@
 
         if (empty($_GET["fParticleType"]))
-            $_GET["fProjectName"]="Off";
-
-    }
-
-    function PrintForm($_GET, $db)
+            $_GET["fParticleTypeName"]="Off";
+
+    }
+
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -154,5 +154,5 @@
         printf(" <table>\n");
         printf("  <tr><td>\n");
-        PrintPullDown($db, "ParticleType",     "fParticleTypeName",     "fParticleTypeKEY", "particle type");
+        PrintPullDown($host, $user, $pw, $db, "ParticleType",     "fParticleTypeName",     "fParticleTypeKEY", "particle type");
         printf(" </td></tr></table>\n");
         printf(" <p>\n");
@@ -160,10 +160,10 @@
 /*
         if (empty($_GET["fStartDate"]))
-            $timemin = GetMin("fRunStart", "RunData", $db);
+            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemin = $_GET["fStartDate"];
 
         if (empty($_GET["fStopDate"]))
-            $timemax = GetMax("fRunStart", "RunData", $db);
+            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemax = $_GET["fStopDate"];
@@ -174,10 +174,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fRunNumber", "MCRunData", $db);
+            $min = GetMin("fRunNumber", "MCRunData", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fRunNumber", "MCRunData", $db);
+            $max = GetMax("fRunNumber", "MCRunData", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -224,8 +224,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
-    {
-//        $db_id = mysql_connect("localhost", "hercules", "d99swMT!");
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -268,5 +267,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     }
     else
@@ -277,10 +276,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/queryrbk.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/queryrbk.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/queryrbk.php	(revision 7546)
@@ -32,7 +32,7 @@
     }
 
-    function PrintPage($html, $db)
+    function PrintPage($html, $host, $user, $pw, $db)
     {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -89,5 +89,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db);
+        PrintPage("0", $host, $user, $pw, $db);
     }
     else
@@ -102,5 +102,5 @@
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db);
+            PrintPage("1", $host, $user, $pw, $db);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/queryseq.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/queryseq.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/queryseq.php	(revision 7546)
@@ -190,5 +190,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -216,21 +216,21 @@
         printf(" <table>\n");
         printf("  <tr><td>\n");
-        PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "TriggerTable", "fTriggerTableName", "fTriggerTableKEY", "Trigger Table");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
+        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "TriggerTable", "fTriggerTableName", "fTriggerTableKEY", "Trigger Table");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
+        PrintPullDown($host, $user, $pw, $db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");
+        PrintPullDown($host, $user, $pw, $db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");
         printf("  </td></tr>\n");
         printf(" </table>\n");
@@ -238,10 +238,10 @@
 
         if (empty($_GET["fStartDate"]))
-            $timemin = GetMin("fRunStart", "RunData", $db);
+            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemin = $_GET["fStartDate"];
 
         if (empty($_GET["fStopDate"]))
-            $timemax = GetMax("fRunStart", "RunData", $db);
+            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemax = $_GET["fStopDate"];
@@ -251,10 +251,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -301,7 +301,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -342,5 +342,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     }
     else
@@ -351,10 +351,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/querystar.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/querystar.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/querystar.php	(revision 7546)
@@ -75,5 +75,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -103,10 +103,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -147,7 +147,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -188,5 +188,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
     }
     else
@@ -197,10 +197,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkwhere);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/runinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/runinfo.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/runinfo.php	(revision 7546)
@@ -319,5 +319,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -372,29 +372,29 @@
         printf(" <table>\n");
         printf("  <tr><td>\n");
-        PrintPullDown($db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
+        PrintPullDown($host, $user, $pw, $db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
+        PrintPullDown($host, $user, $pw, $db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
+        PrintPullDown($host, $user, $pw, $db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
+        PrintPullDown($host, $user, $pw, $db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
         printf(" </td></tr></table>\n");
 
@@ -402,10 +402,10 @@
 
         if (empty($_GET["fStartDate"]))
-            $timemin = GetMin("fRunStart", "RunData", $db);
+            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemin = $_GET["fStartDate"];
 
         if (empty($_GET["fStopDate"]))
-            $timemax = GetMax("fRunStart", "RunData", $db);
+            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
         else
             $timemax = $_GET["fStopDate"];
@@ -427,10 +427,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fRunNumber", "RunData", $db);
+            $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fRunNumber", "RunData", $db);
+            $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -477,7 +477,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
     {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -519,5 +519,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     }
     else
@@ -529,5 +529,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db);
+            PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
@@ -536,7 +536,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
             else
-                PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/sequence.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sequence.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/sequence.php	(revision 7546)
@@ -74,5 +74,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -86,10 +86,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -510,7 +510,7 @@
     }
 
-    function PrintPage($html, $db)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -550,5 +550,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db);
+        PrintPage("0", $host, $user, $pw, $db);
     }
     else
@@ -560,5 +560,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db);
+            PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
@@ -567,7 +567,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db);
+                PrintPage("1", $host, $user, $pw, $db);
             else
-                PrintPage("2", $db);
+                PrintPage("2", $host, $user, $pw, $db);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/sequinfo.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sequinfo.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/sequinfo.php	(revision 7546)
@@ -403,5 +403,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -520,23 +520,23 @@
         printf(" <table>\n");
         printf("  <tr><td>\n");
-        PrintPullDown($db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "L1TriggerTable",              "fL1TriggerTableName",              "fL1TriggerTableKEY",              "L1Trigger Table");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "L2TriggerTable",              "fL2TriggerTableName",              "fL2TriggerTableKEY",              "L2Trigger Table");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "TriggerDelayTable",           "fTriggerDelayTableName",           "fTriggerDelayTableKEY",           "Trigger Delay Table");
+        PrintPullDown($host, $user, $pw, $db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "L1TriggerTable",              "fL1TriggerTableName",              "fL1TriggerTableKEY",              "L1Trigger Table");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "L2TriggerTable",              "fL2TriggerTableName",              "fL2TriggerTableKEY",              "L2Trigger Table");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",           "fTriggerDelayTableName",           "fTriggerDelayTableKEY",           "Trigger Delay Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "Project",                     "fProjectName",                     "fProjectKEY",                     "Project Name");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "HvSettings",                  "fHvSettingsName",                  "fHvSettingsKEY",                  "HV Settings");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
+        PrintPullDown($host, $user, $pw, $db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "Project",                     "fProjectName",                     "fProjectKEY",                     "Project Name");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "HvSettings",                  "fHvSettingsName",                  "fHvSettingsKEY",                  "HV Settings");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
         printf("  </td></tr><tr><td>\n");
-        PrintPullDown($db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
-        printf("  </td><td>\n");
-        PrintPullDown($db, "TestFlag",                    "fTestFlagName",                    "fTestFlagKEY",                    "Test Flag");
+        PrintPullDown($host, $user, $pw, $db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
+        printf("  </td><td>\n");
+        PrintPullDown($host, $user, $pw, $db, "TestFlag",                    "fTestFlagName",                    "fTestFlagKEY",                    "Test Flag");
         printf("  </td></tr>\n");
         printf(" </table>\n");
@@ -544,10 +544,10 @@
 
         if (empty($_GET["fStartDate"]))
-            $timemin = GetMin("fRunStart", "Sequences", $db);
+            $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
         else
             $timemin = $_GET["fStartDate"];
 
         if (empty($_GET["fStopDate"]))
-            $timemax = GetMax("fRunStart", "Sequences", $db);
+            $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
         else
             $timemax = $_GET["fStopDate"];
@@ -557,10 +557,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "Sequences", $db);
+            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "Sequences", $db);
+            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -614,7 +614,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
     {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -655,5 +655,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     }
     else
@@ -665,5 +665,5 @@
         InitGet($_GET);
         if (empty($_GET["fPrintTable"]))
-            PrintForm($_GET, $db);
+            PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
@@ -672,7 +672,7 @@
         {
             if (empty($_GET["fPrintTable"]))
-                PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
             else
-                PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
+                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
         }
 
Index: trunk/MagicSoft/Mars/datacenter/db/sources.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/sources.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/sources.php	(revision 7546)
@@ -87,7 +87,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign)
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign)
     {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -128,5 +128,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign);
     }
     else
@@ -142,5 +142,5 @@
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/statusrps.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/statusrps.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/statusrps.php	(revision 7546)
@@ -121,5 +121,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -146,10 +146,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fRunNumber", "RunProcessStatus", $db);
+            $min = GetMin("fRunNumber", "RunProcessStatus", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fRunNumber", "RunProcessStatus", $db);
+            $max = GetMax("fRunNumber", "RunProcessStatus", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -190,7 +190,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -231,5 +231,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     }
     else
@@ -240,10 +240,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/statussbs.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/statussbs.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/statussbs.php	(revision 7546)
@@ -100,5 +100,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -122,10 +122,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fDate", "SequenceBuildStatus", $db);
+            $min = GetMin("fDate", "SequenceBuildStatus", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fDate", "SequenceBuildStatus", $db);
+            $max = GetMax("fDate", "SequenceBuildStatus", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -166,7 +166,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -207,5 +207,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     }
     else
@@ -216,10 +216,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
 
         echo (file_get_contents("index-footer.html"));
Index: trunk/MagicSoft/Mars/datacenter/db/statussps.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/statussps.php	(revision 7545)
+++ trunk/MagicSoft/Mars/datacenter/db/statussps.php	(revision 7546)
@@ -110,5 +110,5 @@
     }
 
-    function PrintForm($_GET, $db)
+    function PrintForm($_GET, $host, $user, $pw, $db)
     {
         printf("<center>\n");
@@ -135,10 +135,10 @@
 
         if (empty($_GET["fRunMin"]))
-            $min = GetMin("fSequenceFirst", "SequenceProcessStatus", $db);
+            $min = GetMin("fSequenceFirst", "SequenceProcessStatus", $host, $user, $pw, $db);
         else
             $min = $_GET["fRunMin"];
 
         if (empty($_GET["fRunMax"]))
-            $max = GetMax("fSequenceFirst", "SequenceProcessStatus", $db);
+            $max = GetMax("fSequenceFirst", "SequenceProcessStatus", $host, $user, $pw, $db);
         else
             $max = $_GET["fRunMax"];
@@ -179,7 +179,7 @@
     }
 
-    function PrintPage($html, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
-    {
-        $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
+    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
+    {
+        $db_id = mysql_connect($host, $user, $pw);
         if ($db_id==FALSE)
         {
@@ -220,5 +220,5 @@
         header("Content-Disposition: attachment; filename=query-result.txt");
 
-        PrintPage("0", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
+        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     }
     else
@@ -229,10 +229,10 @@
 
         InitGet($_GET);
-        PrintForm($_GET, $db);
+        PrintForm($_GET, $host, $user, $pw, $db);
 
         if ($environment==0)
             printf("No query submitted yet.<BR>");
         else
-            PrintPage("1", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
+            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
 
         echo (file_get_contents("index-footer.html"));
