Ignore:
Timestamp:
02/28/06 20:23:38 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/datacenter/db/querymc.php

    r7521 r7546  
    131131
    132132        if (empty($_GET["fParticleType"]))
    133             $_GET["fProjectName"]="Off";
    134 
    135     }
    136 
    137     function PrintForm($_GET, $db)
     133            $_GET["fParticleTypeName"]="Off";
     134
     135    }
     136
     137    function PrintForm($_GET, $host, $user, $pw, $db)
    138138    {
    139139        printf("<center>\n");
     
    154154        printf(" <table>\n");
    155155        printf("  <tr><td>\n");
    156         PrintPullDown($db, "ParticleType",     "fParticleTypeName",     "fParticleTypeKEY", "particle type");
     156        PrintPullDown($host, $user, $pw, $db, "ParticleType",     "fParticleTypeName",     "fParticleTypeKEY", "particle type");
    157157        printf(" </td></tr></table>\n");
    158158        printf(" <p>\n");
     
    160160/*
    161161        if (empty($_GET["fStartDate"]))
    162             $timemin = GetMin("fRunStart", "RunData", $db);
     162            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
    163163        else
    164164            $timemin = $_GET["fStartDate"];
    165165
    166166        if (empty($_GET["fStopDate"]))
    167             $timemax = GetMax("fRunStart", "RunData", $db);
     167            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
    168168        else
    169169            $timemax = $_GET["fStopDate"];
     
    174174
    175175        if (empty($_GET["fRunMin"]))
    176             $min = GetMin("fRunNumber", "MCRunData", $db);
     176            $min = GetMin("fRunNumber", "MCRunData", $host, $user, $pw, $db);
    177177        else
    178178            $min = $_GET["fRunMin"];
    179179
    180180        if (empty($_GET["fRunMax"]))
    181             $max = GetMax("fRunNumber", "MCRunData", $db);
     181            $max = GetMax("fRunNumber", "MCRunData", $host, $user, $pw, $db);
    182182        else
    183183            $max = $_GET["fRunMax"];
     
    224224    }
    225225
    226     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
    227     {
    228 //        $db_id = mysql_connect("localhost", "hercules", "d99swMT!");
    229         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     226    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
     227    {
     228        $db_id = mysql_connect($host, $user, $pw);
    230229        if ($db_id==FALSE)
    231230        {
     
    268267        header("Content-Disposition: attachment; filename=query-result.txt");
    269268
    270         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     269        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    271270    }
    272271    else
     
    277276
    278277        InitGet($_GET);
    279         PrintForm($_GET, $db);
     278        PrintForm($_GET, $host, $user, $pw, $db);
    280279
    281280        if ($environment==0)
    282281            printf("No query submitted yet.<BR>");
    283282        else
    284             PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     283            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    285284
    286285        echo (file_get_contents("index-footer.html"));
Note: See TracChangeset for help on using the changeset viewer.