Index: trunk/MagicSoft/Mars/Changelog
===================================================================
--- trunk/MagicSoft/Mars/Changelog	(revision 9498)
+++ trunk/MagicSoft/Mars/Changelog	(revision 9499)
@@ -18,4 +18,11 @@
 
                                                  -*-*- END OF LINE -*-*-
+
+ 2009/08/21 Daniela Dorner
+
+   * datacenter/db/menu.php:
+     - added functions needed for mcinfo.php
+
+
 
  2009/08/20 Daniela Dorner
Index: trunk/MagicSoft/Mars/datacenter/db/menu.php
===================================================================
--- trunk/MagicSoft/Mars/datacenter/db/menu.php	(revision 9498)
+++ trunk/MagicSoft/Mars/datacenter/db/menu.php	(revision 9499)
@@ -615,4 +615,20 @@
     if (empty($_GET["fRunMax"]))
         $max = GetMax("fMCRunNumber", "MCRunData", $host, $user, $pw, $db);
+    else
+        $max = $_GET["fRunMax"];
+
+    printf("Runs&nbsp;from&nbsp;<input name=\"fRunMin\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"%s\">\n", $min);
+    printf("to&nbsp;<input name=\"fRunMax\" type=\"text\" size=\"8\" maxlength=\"8\" value=\"%s\">&nbsp;&nbsp;&nbsp;\n", $max);
+}
+
+function PrintMCRunRangeMenu($host,$user,$pw,$db)
+{
+    if (empty($_GET["fRunMin"]))
+        $min = GetMin("fCorsikaRunNumber", "MCCorsikaRunData", $host, $user, $pw, $db);
+    else
+        $min = $_GET["fRunMin"];
+
+    if (empty($_GET["fRunMax"]))
+        $max = GetMax("fCorsikaRunNumber", "MCCorsikaRunData", $host, $user, $pw, $db);
     else
         $max = $_GET["fRunMax"];
@@ -1531,4 +1547,5 @@
 }
 
+// cta mc stuff
 function InitCTAMCRunStatus($first)
 {
@@ -1591,4 +1608,80 @@
 }
 
+//other MC stuff
+function InitMCRunStatus($_GET, $first)
+{
+    if (empty($_GET["fCorsikaFileAvail"]))
+        $_GET["fCorsikaFileAvail"]="On";
+
+    if (empty($_GET["fCorsikaFileAvailStatus"]))
+        $_GET["fCorsikaFileAvailStatus"]="0";
+
+    if (empty($_GET["fCorsikaInputCreated"]))
+        $_GET["fCorsikaInputCreated"]="Off";
+
+    if (empty($_GET["fCorsikaInputCreatedStatus"]))
+        $_GET["fCorsikaInputCreatedStatus"]="0";
+
+}
+
+function InitMCRunInfo($_GET, $first)
+{
+    if (empty($_GET["fNumResults"]))
+        $_GET["fNumResults"]="50";
+
+    if (empty($_GET["fNumEvents"]))
+        $_GET["fNumEvents"]="On";
+
+    InitMCRunStatus($_GET, $first);
+    InitInfo($_GET, $first);
+    InitFailInfo($_GET, $first);
+
+    if (empty($_GET["fParticleTypeName"]))
+        $_GET["fParticleTypeName"]="On";
+
+    if (empty($_GET["fAtmosphericModelName"]))
+        $_GET["fAtmosphericModelName"]="Off";
+
+    if (empty($_GET["fNumEvents"]))
+        $_GET["fNumEvents"]=$first?"On":"";
+
+    if (empty($_GET["fZenithDistanceMin"]))
+        $_GET["fZenithDistanceMin"]="On";
+
+    if (empty($_GET["fZenithDistanceMax"]))
+        $_GET["fZenithDistanceMax"]="On";
+
+    if (empty($_GET["fAzimuthMin"]))
+        $_GET["fAzimuthMin"]="On";
+
+    if (empty($_GET["fAzimuthMax"]))
+        $_GET["fAzimuthMax"]="On";
+
+    if (empty($_GET["fEnergyMin"]))
+        $_GET["fEnergyMin"]="On";
+
+    if (empty($_GET["fEnergyMax"]))
+        $_GET["fEnergyMax"]="On";
+
+    if (empty($_GET["fImpactMax"]))
+        $_GET["fImpactMax"]="On";
+
+    if (empty($_GET["fViewConeMax"]))
+        $_GET["fViewConeMax"]="On";
+
+    if (empty($_GET["fEnergySlope"]))
+        $_GET["fEnergySlope"]="On";
+
+    if (empty($_GET["fNumReUseShower"]))
+        $_GET["fNumReUseShower"]="Off";
+
+    if (empty($_GET["fStartingAltitude"]))
+        $_GET["fStartingAltitude"]="On";
+
+    if (empty($_GET["fMirrorDiameter"]))
+        $_GET["fMirrorDiameter"]="On";
+
+}
+
 
 ?>
