Index: trunk/MagicSoft/Mars/datacenter/db/include.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/include.php	(revision 7527)
+++ 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)
