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/index.php

    r7484 r7546  
    226226    }
    227227
    228     function PrintForm($_GET, $db)
     228    function PrintForm($_GET, $host, $user, $pw, $db)
    229229    {
    230230        printf("<center>\n");
     
    260260        printf(" <table>\n");
    261261        printf("  <tr><td>\n");
    262         PrintPullDown($db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
    263         printf("  </td><td>\n");
    264         PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
    265         printf("  </td><td>\n");
    266         PrintPullDown($db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
    267         printf("  </td><td>\n");
    268         PrintPullDown($db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
     262        PrintPullDown($host, $user, $pw, $db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
     263        printf("  </td><td>\n");
     264        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
     265        printf("  </td><td>\n");
     266        PrintPullDown($host, $user, $pw, $db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
     267        printf("  </td><td>\n");
     268        PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
    269269        printf("  </td></tr><tr><td>\n");
    270         PrintPullDown($db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
    271         printf("  </td><td>\n");
    272         PrintPullDown($db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
    273         printf("  </td><td>\n");
    274         PrintPullDown($db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
    275         printf("  </td><td>\n");
    276         PrintPullDown($db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
     270        PrintPullDown($host, $user, $pw, $db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
     271        printf("  </td><td>\n");
     272        PrintPullDown($host, $user, $pw, $db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
     273        printf("  </td><td>\n");
     274        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
     275        printf("  </td><td>\n");
     276        PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
    277277        printf("  </td></tr><tr><td>\n");
    278         PrintPullDown($db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
    279         printf("  </td><td>\n");
    280         PrintPullDown($db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
    281         printf("  </td><td>\n");
    282         PrintPullDown($db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
    283         printf("  </td><td>\n");
    284         PrintPullDown($db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
     278        PrintPullDown($host, $user, $pw, $db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
     279        printf("  </td><td>\n");
     280        PrintPullDown($host, $user, $pw, $db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
     281        printf("  </td><td>\n");
     282        PrintPullDown($host, $user, $pw, $db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
     283        printf("  </td><td>\n");
     284        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
    285285        printf("  </td></tr><tr><td>\n");
    286         PrintPullDown($db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
     286        PrintPullDown($host, $user, $pw, $db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
    287287        printf(" </td></tr></table>\n");
    288288        printf(" <p>\n");
    289289
    290290        if (empty($_GET["fStartDate"]))
    291             $timemin = GetMin("fRunStart", "RunData", $db);
     291            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
    292292        else
    293293            $timemin = $_GET["fStartDate"];
    294294
    295295        if (empty($_GET["fStopDate"]))
    296             $timemax = GetMax("fRunStart", "RunData", $db);
     296            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
    297297        else
    298298            $timemax = $_GET["fStopDate"];
     
    309309
    310310        if (empty($_GET["fRunMin"]))
    311             $min = GetMin("fRunNumber", "RunData", $db);
     311            $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
    312312        else
    313313            $min = $_GET["fRunMin"];
    314314
    315315        if (empty($_GET["fRunMax"]))
    316             $max = GetMax("fRunNumber", "RunData", $db);
     316            $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
    317317        else
    318318            $max = $_GET["fRunMax"];
     
    357357    }
    358358
    359     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
    360     {
    361         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     359    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
     360    {
     361        $db_id = mysql_connect($host, $user, $pw);
    362362        if ($db_id==FALSE)
    363363        {
     
    400400        header("Content-Disposition: attachment; filename=query-result.txt");
    401401
    402         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     402        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    403403    }
    404404    else
     
    409409
    410410        InitGet($_GET);
    411         PrintForm($_GET, $db);
     411        PrintForm($_GET, $host, $user, $pw, $db);
    412412
    413413        if ($environment==0)
    414414            printf("No query submitted yet.<BR>");
    415415        else
    416             PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     416            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    417417
    418418        echo (file_get_contents("index-footer.html"));
Note: See TracChangeset for help on using the changeset viewer.