Changeset 7546 for trunk/MagicSoft


Ignore:
Timestamp:
02/28/06 20:23:38 (19 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
25 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r7545 r7546  
    2424       account, when dataset files are searched
    2525
     26   * datacenter/db/*.php:
     27     - moved user, host and pw of database to the include file db.php
     28
     29   * datacenter/db/index.html:
     30     - fixed links
     31
     32   * datacenter/db/querymc.php,magicdefs.php:
     33     - added some variables
     34
    2635
    2736
  • trunk/MagicSoft/Mars/datacenter/db/culminating.php

    r7484 r7546  
    134134    }
    135135
    136     function PrintForm($_GET, $db)
     136    function PrintForm($_GET, $host, $user, $pw, $db)
    137137    {
    138138        printf("<center>\n");
     
    155155        printf(" <table>\n");
    156156        printf("  <tr><td>\n");
    157         PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
     157        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
    158158        printf("  </td></tr>\n");
    159159        printf(" </table>\n");
     
    161161
    162162        if (empty($_GET["fRunMin"]))
    163             $min = GetMin("fSequenceFirst", "Sequences", $db);
     163            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    164164        else
    165165            $min = $_GET["fRunMin"];
    166166
    167167        if (empty($_GET["fRunMax"]))
    168             $max = GetMax("fSequenceFirst", "Sequences", $db);
     168            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    169169        else
    170170            $max = $_GET["fRunMax"];
     
    210210    }
    211211
    212     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
    213     {
    214         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     212    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
     213    {
     214        $db_id = mysql_connect($host, $user, $pw);
    215215        if ($db_id==FALSE)
    216216        {
     
    251251        header("Content-Disposition: attachment; filename=query-result.txt");
    252252
    253         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     253        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    254254    }
    255255    else
     
    260260
    261261        InitGet($_GET);
    262         PrintForm($_GET, $db);
     262        PrintForm($_GET, $host, $user, $pw, $db);
    263263
    264264        if ($environment==0)
    265265            printf("No query submitted yet.<BR>");
    266266        else
    267             PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     267            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    268268
    269269        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/datacheck.php

    r7527 r7546  
    271271    }
    272272
    273     function PrintForm($_GET, $db)
     273    function PrintForm($_GET, $host, $user, $pw, $db)
    274274    {
    275275        printf("<center>\n");
     
    321321        printf("</td><td>\n");
    322322
    323         PrintPullDown($db, "RunType",      "fRunTypeName",      "fRunTypeKEY", "Run Type");
     323        PrintPullDown($host, $user, $pw, $db, "RunType",      "fRunTypeName",      "fRunTypeKEY", "Run Type");
    324324
    325325        printf("  </td></tr>\n");
     
    328328
    329329        if (empty($_GET["fRunMin"]))
    330             $min = GetMin("fRunNumber", "RunData", $db);
     330            $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
    331331        else
    332332            $min = $_GET["fRunMin"];
    333333
    334334        if (empty($_GET["fRunMax"]))
    335             $max = GetMax("fRunNumber", "RunData", $db);
     335            $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
    336336        else
    337337            $max = $_GET["fRunMax"];
     
    380380    }
    381381
    382     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs)
    383     {
    384         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     382    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs)
     383    {
     384        $db_id = mysql_connect($host, $user, $pw);
    385385        if ($db_id==FALSE)
    386386        {
     
    421421        header("Content-Disposition: attachment; filename=query-result.txt");
    422422
    423         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
     423        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
    424424    }
    425425    else
     
    431431        InitGet($_GET);
    432432        if (empty($_GET["fPrintTable"]))
    433             PrintForm($_GET, $db);
     433            PrintForm($_GET, $host, $user, $pw, $db);
    434434
    435435        if ($environment==0)
     
    438438        {
    439439            if (empty($_GET["fPrintTable"]))
    440                 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
     440                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
    441441            else
    442                 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
     442                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $checkenumgroup, $needs);
    443443        }
    444444
  • trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php

    r7527 r7546  
    228228    }
    229229
    230     function PrintForm($_GET, $db)
     230    function PrintForm($_GET, $host, $user, $pw, $db)
    231231    {
    232232        printf("<center>\n");
     
    269269        printf("  </td></tr><tr><td>\n");
    270270
    271         PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
     271        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
    272272
    273273        printf("  </td></tr>\n");
     
    276276
    277277        if (empty($_GET["fRunMin"]))
    278             $min = GetMin("fDataSetNumber", "DataSets", $db);
     278            $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
    279279        else
    280280            $min = $_GET["fRunMin"];
    281281
    282282        if (empty($_GET["fRunMax"]))
    283             $max = GetMax("fDataSetNumber", "DataSets", $db);
     283            $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
    284284        else
    285285            $max = $_GET["fRunMax"];
     
    333333    }
    334334
    335     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
    336     {
    337         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     335    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
     336    {
     337        $db_id = mysql_connect($host, $user, $pw);
    338338        if ($db_id==FALSE)
    339339        {
     
    374374        header("Content-Disposition: attachment; filename=query-result.txt");
    375375
    376         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     376        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    377377    }
    378378    else
     
    384384        InitGet($_GET);
    385385        if (empty($_GET["fPrintTable"]))
    386             PrintForm($_GET, $db);
     386            PrintForm($_GET, $host, $user, $pw, $db);
    387387
    388388        if ($environment==0)
     
    391391        {
    392392            if (empty($_GET["fPrintTable"]))
    393                 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     393                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    394394            else
    395                 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     395                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    396396        }
    397397
  • trunk/MagicSoft/Mars/datacenter/db/db.php

    r7484 r7546  
    11<?php
     2
     3$host="hercules.astro.uni-wuerzburg.de";
     4$user="MAGIC";
     5$pw="d99swMT!";
    26
    37$db="MyMagic";
  • trunk/MagicSoft/Mars/datacenter/db/dbstatus.php

    r7527 r7546  
    222222
    223223        if (empty($_GET["fAllFilesAvailStatus"]))
    224             $_GET["fAllFilesAvailStatus"]="4";
     224            $_GET["fAllFilesAvailStatus"]="7";
    225225
    226226        if (empty($_GET["fCallisto"]))
     
    228228
    229229        if (empty($_GET["fCallistoStatus"]))
    230             $_GET["fCallistoStatus"]="4";
     230            $_GET["fCallistoStatus"]="7";
    231231
    232232        if (empty($_GET["fFillCallisto"]))
     
    240240
    241241        if (empty($_GET["fStarStatus"]))
    242             $_GET["fStarStatus"]="4";
     242            $_GET["fStarStatus"]="7";
    243243
    244244        if (empty($_GET["fFillStar"]))
     
    249249    }
    250250
    251     function PrintForm($_GET, $db)
     251    function PrintForm($_GET, $host, $user, $pw, $db)
    252252    {
    253253        printf("<center>\n");
     
    272272        printf(" <table>\n");
    273273        printf("  <tr><td>\n");
    274         PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
     274        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
    275275        printf("  </td><td>\n");
    276276
     
    285285
    286286        if (empty($_GET["fStartDate"]))
    287             $timemin = GetMin("fRunStart", "Sequences", $db);
     287            $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
    288288        else
    289289            $timemin = $_GET["fStartDate"];
    290290
    291291        if (empty($_GET["fStopDate"]))
    292             $timemax = GetMax("fRunStart", "Sequences", $db);
     292            $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
    293293        else
    294294            $timemax = $_GET["fStopDate"];
     
    298298
    299299        if (empty($_GET["fRunMin"]))
    300             $min = GetMin("fSequenceFirst", "Sequences", $db);
     300            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    301301        else
    302302            $min = $_GET["fRunMin"];
    303303
    304304        if (empty($_GET["fRunMax"]))
    305             $max = GetMax("fSequenceFirst", "Sequences", $db);
     305            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    306306        else
    307307            $max = $_GET["fRunMax"];
     
    318318
    319319        printf("<input class='Width' type='submit' value='Query Table'>&nbsp;&nbsp;&nbsp;\n");
    320         printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"sequinfo.php\"'>&nbsp;&nbsp;&nbsp;\n");
     320        printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"dbstatus.php\"'>&nbsp;&nbsp;&nbsp;\n");
    321321        if (strchr($_SERVER["REQUEST_URI"], '?')!=FALSE)
    322322            printf("<input class='Width' type='button' value='Get .txt' onClick='self.location.href=\"%s&fSendTxt=1\"'>&nbsp;&nbsp;&nbsp;\n", $_SERVER["REQUEST_URI"]);
     
    331331    }
    332332
    333     function PrintPage($html, $db, $needs)
    334     {
    335         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     333    function PrintPage($html, $host, $user, $pw, $db, $needs)
     334    {
     335        $db_id = mysql_connect($host, $user, $pw);
    336336        if ($db_id==FALSE)
    337337        {
     
    375375    include ("include.php");
    376376    include ("db.php");
     377    include ("magicdefs.php");
    377378
    378379    ini_set("display_errors", "On");
     
    384385        header("Content-Disposition: attachment; filename=query-result.txt");
    385386
    386         PrintPage("0", $db);
     387        PrintPage("0", $host, $user, $pw, $db);
    387388    }
    388389    else
     
    394395        InitGet($_GET);
    395396        if (empty($_GET["fPrintTable"]))
    396             PrintForm($_GET, $db);
     397            PrintForm($_GET, $host, $user, $pw, $db);
    397398
    398399        if ($environment==0)
     
    401402        {
    402403            if (empty($_GET["fPrintTable"]))
    403                 PrintPage("1", $db, $needs);
     404                PrintPage("1", $host, $user, $pw, $db, $needs);
    404405            else
    405                 PrintPage("2", $db, $needs);
     406                PrintPage("2", $host, $user, $pw, $db, $needs);
    406407        }
    407408
  • trunk/MagicSoft/Mars/datacenter/db/findoffdata.php

    r7527 r7546  
    392392    }
    393393
    394     function PrintForm($_GET, $db, $limits, $rms, $alias)
     394    function PrintForm($_GET, $host, $user, $pw, $db, $limits, $rms, $alias)
    395395    {
    396396        printf("<center>\n");
     
    478478        printf(" <table><tr><td>\n");
    479479
    480         PrintPullDown($db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
     480        PrintPullDown($host, $user, $pw, $db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
    481481        printf("  </td><td>\n");
    482         PrintPullDown($db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
     482        PrintPullDown($host, $user, $pw, $db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
    483483        printf("  </td><td>\n");
    484         PrintPullDown($db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
     484        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
    485485        printf("  </td></tr><tr><td>\n");
    486         PrintPullDown($db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
     486        PrintPullDown($host, $user, $pw, $db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
    487487        printf("  </td><td>\n");
    488488        PrintStatusMenu("fStar",                "Star");
     
    507507
    508508        if (empty($_GET["fStarStart"]))
    509             $starmin = GetMin("fStar", "SequenceProcessStatus", $db);
     509            $starmin = GetMin("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
    510510        else
    511511            $starmin = $_GET["fStarStart"];
    512512
    513513        if (empty($_GET["fStarStop"]))
    514             $starmax = GetMax("fStar", "SequenceProcessStatus", $db);
     514            $starmax = GetMax("fStar", "SequenceProcessStatus", $host, $user, $pw, $db);
    515515        else
    516516            $starmax = $_GET["fStarStop"];
     
    528528
    529529        if (empty($_GET["fStartDate"]))
    530             $timemin = GetMin("fRunStart", "Sequences", $db);
     530            $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
    531531        else
    532532            $timemin = $_GET["fStartDate"];
    533533
    534534        if (empty($_GET["fStopDate"]))
    535             $timemax = GetMax("fRunStart", "Sequences", $db);
     535            $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
    536536        else
    537537            $timemax = $_GET["fStopDate"];
     
    541541
    542542        if (empty($_GET["fRunMin"]))
    543             $min = GetMin("fSequenceFirst", "Sequences", $db);
     543            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    544544        else
    545545            $min = $_GET["fRunMin"];
    546546
    547547        if (empty($_GET["fRunMax"]))
    548             $max = GetMax("fSequenceFirst", "Sequences", $db);
     548            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    549549        else
    550550            $max = $_GET["fRunMax"];
     
    604604    }
    605605
    606     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs)
     606    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs)
    607607    {
    608         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     608        $db_id = mysql_connect($host, $user, $pw);
    609609        if ($db_id==FALSE)
    610610        {
     
    645645        header("Content-Disposition: attachment; filename=query-result.txt");
    646646
    647         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
     647        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
    648648    }
    649649    else
     
    655655        InitGet($_GET);
    656656        if (empty($_GET["fPrintTable"]))
    657             PrintForm($_GET, $db, $limits, $rms, $alias);
     657            PrintForm($_GET, $host, $user, $pw, $db, $limits, $rms, $alias);
    658658
    659659        if ($environment==0)
     
    662662        {
    663663            if (empty($_GET["fPrintTable"]))
    664                 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
    665             else
    666                 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
     664                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
     665            else
     666                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $limits, $rms, $needs);
    667667        }
    668668
  • trunk/MagicSoft/Mars/datacenter/db/ganymed.php

    r7520 r7546  
    4242    }
    4343
    44     function PrintForm($_GET, $db)
     44    function PrintForm($_GET, $host, $user, $pw, $db)
    4545    {
    4646        printf("<center>\n");
     
    5454        if (empty($_GET["fRunMin"]))
    5555            $min = "100";
    56 //            $min = GetMin("fDataSetNumber", "DataSets", $db);
     56//            $min = GetMin("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
    5757        else
    5858            $min = $_GET["fRunMin"];
    5959
    6060        if (empty($_GET["fRunMax"]))
    61             $max = GetMax("fDataSetNumber", "DataSets", $db);
     61            $max = GetMax("fDataSetNumber", "DataSets", $host, $user, $pw, $db);
    6262        else
    6363            $max = $_GET["fRunMax"];
     
    139139*/
    140140
    141     function PrintDataSetInfo($result0, $db_id, $db)
     141    function PrintDataSetInfo($result0)
    142142    {
    143143        $numres = mysql_num_rows($result0);
     
    219219    }
    220220
    221     function PrintPage($html, $db)
    222     {
    223         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     221    function PrintPage($html, $host, $user, $pw, $db)
     222    {
     223        $db_id = mysql_connect($host, $user, $pw);
    224224        if ($db_id==FALSE)
    225225        {
     
    236236        {
    237237            if ($html=="1" || $html=="2")
    238                 PrintDataSetInfo($result0, $db_id, $db);
     238                PrintDataSetInfo($result0);
    239239            else
    240240                PrintText($result0);
     
    259259        header("Content-Disposition: attachment; filename=query-result.txt");
    260260
    261         PrintPage("0", $db);
     261        PrintPage("0", $host, $user, $pw, $db);
    262262    }
    263263    else
     
    269269        InitGet($_GET);
    270270        if (empty($_GET["fPrintTable"]))
    271             PrintForm($_GET, $db);
     271            PrintForm($_GET, $host, $user, $pw, $db);
    272272
    273273        if ($environment==0)
     
    276276        {
    277277            if (empty($_GET["fPrintTable"]))
    278                 PrintPage("1", $db);
     278                PrintPage("1", $host, $user, $pw, $db);
    279279            else
    280                 PrintPage("2", $db);
     280                PrintPage("2", $host, $user, $pw, $db);
    281281        }
    282282
  • trunk/MagicSoft/Mars/datacenter/db/include.php

    r7527 r7546  
    11<?php
    2 /*
    3 function PrintTable($table)
    4 {
    5     $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
    6     if ($db_id==FALSE)
    7     {
    8             printf("mysql_connect returned the following error:<br>");
    9             printf("%s<br>", mysql_error());
    10             die("");
    11     }
    12     printf("%s<br>", $table);
    13     printf("<table BORDER=\"1\">");
    14 
    15     $query = "EXPLAIN ";
    16     $query .= $table;
    17    
    18     $result = mysql_query($query);
    19     $numrows = mysql_num_rows($result);
    20     $numcols = mysql_num_fields($result);
    21     printf("%d x %d<br>", $numrows, $numcols);
    22 
    23     printf("<tr>");
    24     for ($i=0; $i<$numrows; $i++)
    25     {
    26        $row = mysql_fetch_row($result);
    27        printf("<th>%s</th> ", $row[0]);
    28     }
    29     printf("</tr>");
    30    
    31     $query = "SELECT * FROM ";
    32     $query .= $table;
    33    
    34     $result = mysql_query($query);
    35    
    36     $numrows = mysql_num_rows($result);
    37     $numcols = mysql_num_fields($result);
    38     printf("%d x %d<br>", $numrows, $numcols);
    39 
    40     while ($row = mysql_fetch_row($result))
    41     {
    42        printf("<tr>");
    43        foreach ($row as $entry)
    44        {
    45            printf("<td>%s</td> ", $entry);
    46        }
    47        printf("</tr>");
    48     }
    49     printf("</table>");
    50    
    51     mysql_free_result($result);
    52 
    53     mysql_close($db_id);
    54 }
    55 */
    562
    573function EnumQuery($name)
     
    193139}
    194140
    195 function PrintPullDown($db, $table, $name, $index, $descr)
    196 {
    197     $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     141function PrintPullDown($host, $user, $pw, $db, $table, $name, $index, $descr)
     142{
     143    $db_id = mysql_connect($host, $user, $pw);
    198144    if ($db_id==FALSE)
    199145    {
     
    250196}
    251197
    252 function GetMin($field, $table, $db)
    253 {
    254     $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     198function GetMin($field, $table, $host, $user, $pw, $db)
     199{
     200    $db_id = mysql_connect($host, $user, $pw);
    255201    if ($db_id==FALSE)
    256202    {
     
    275221}
    276222
    277 function GetMax($field, $table, $db)
    278 {
    279     $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     223function GetMax($field, $table, $host, $user, $pw, $db)
     224{
     225    $db_id = mysql_connect($host, $user, $pw);
    280226    if ($db_id==FALSE)
    281227    {
     
    299245    return $max;
    300246}
    301 /*
    302 function GetMin()
    303 {
    304     $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
    305     if ($db_id==FALSE)
    306     {
    307             printf("mysql_connect returned the following error:<br>");
    308             printf("%s<br>", mysql_error());
    309             die("");
    310     }
    311 
    312     $query  = "SELECT MIN(fRunNumber) FROM MyMagic.RunData";
    313     $result = mysql_query($query);
    314     if (!$result)
    315         return "0";
    316 
    317     $row = mysql_fetch_row($result);
    318 
    319     $min = $row[0];
    320 
    321     mysql_free_result($result);
    322     mysql_close($db_id);
    323 
    324     return $min;
    325 }
    326 
    327 function GetMax()
    328 {
    329     $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
    330     if ($db_id==FALSE)
    331     {
    332             printf("mysql_connect returned the following error:<br>");
    333             printf("%s<br>", mysql_error());
    334             die("");
    335     }
    336 
    337     $query  = "SELECT MAX(fRunNumber) FROM MyMagic.RunData";
    338     $result = mysql_query($query);
    339     if (!$result)
    340         return "0";
    341 
    342     $row = mysql_fetch_row($result);
    343 
    344     $max = $row[0];
    345 
    346     mysql_free_result($result);
    347     mysql_close($db_id);
    348 
    349     return $max;
    350 }
    351 */
    352247
    353248function PrintText($result0)
  • trunk/MagicSoft/Mars/datacenter/db/index.html

    r7518 r7546  
    4545(<!--<A HREF="http://www.astro.uni-wuerzburg.de/~dorner/analysis/datasets.html">comments</A>,
    4646-->
    47  <A HREF="http://www.astro.uni-wuerzburg.de/datacenter/datasets/">dataset files</A>)</li>
     47<A HREF="http://www.astro.uni-wuerzburg.de/datacenter/datasets/">dataset files</A>)</li>
    4848<li><A HREF="ganymed.php">Results of the Automatic Analysis</A>
    4949</ul>
     
    6363<li><A HREF="statussps.php">Sequence Process Status</A>: querying only the information from the table SequenceProcessStatus </li>
    6464<li><A HREF="printtable.php?fTable=MarsVersion">Mars Versions in the DC</A>: querying all information from the table MarsVersions </li>
    65 <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>
     65<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>
    6666</ul>
    6767Some very simple queries:<p>
  • 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"));
  • trunk/MagicSoft/Mars/datacenter/db/magicdefs.php

    r7527 r7546  
    6565     "fTestFlagName"                     => CheckWhere("fTestFlagKEY",                     $_GET),
    6666     "fLightConditionsName"              => CheckWhere("fLightConditionsKEY",              $_GET),
     67     "fParticleTypeName"                 => CheckWhere("fParticleTypeKEY",                 $_GET),
    6768    );
    6869
     
    8384     "fTestFlagName"                     => CheckGroup("fTestFlagKEY",                     $_GET),
    8485     "fLightConditionsName"              => CheckGroup("fLightConditionsKEY",              $_GET),
     86     "fParticleTypeName"                 => CheckGroup("fParticleTypeKEY",                 $_GET),
    8587    );
    8688
     
    260262     "fEMin"                            => "Emin",
    261263     "fEMax"                            => "Emax",
     264     "fParticleTypeName"                => "Particle",
    262265     "fStartTime"                       => "Process",
    263266     "fFailedTime"                      => "Failed",
     
    369372         "fTestFlagName"                     => $fromtable . ".fTestFlagKEY",
    370373         "fLightConditionsName"              => $fromtable . ".fLightConditionsKEY",
     374         "fParticleTypeName"                 => $fromtable . ".fParticleTypeKEY",
    371375        );
    372376
     
    500504         "Max(fZenithDistance)"              => "'ZdMax'",
    501505//         "COUNT(*)"                          => "'Sequ'",
    502          "fStartTime"                       => "fStartTime",
    503          "fFailedTime"                      => "fFailedTime",
    504          "fReturnCode"                      => "fReturnCode",
    505          "fFailedCode"                      => "fFailedCode",
    506          "fFailedCodeAdd"                   => "fFailedCodeAdd",
     506         "fStartTime"                        => "fStartTime",
     507         "fFailedTime"                       => "fFailedTime",
     508         "fReturnCode"                       => "fReturnCode",
     509         "fFailedCode"                       => "fFailedCode",
     510         "fFailedCodeAdd"                    => "fFailedCodeAdd",
     511         "fParticleTypeName"                 => "ParticleType.fParticleTypeName",
    507512        );
    508513
     
    532537         "fTestFlagName"                     => " LEFT JOIN TestFlag                     ON " . $fromtable . ".fTestFlagKEY=TestFlag.fTestFlagKEY",
    533538         "fLightConditionsName"              => " LEFT JOIN LightConditions              ON " . $fromtable . ".fLightConditionsKEY=LightConditions.fLightConditionsKEY",
     539         "fParticleTypeName"                 => " LEFT JOIN ParticleType                 ON " . $fromtable . ".fParticleTypeKEY=ParticleType.fParticleTypeKEY ",
    534540        );
    535541
  • trunk/MagicSoft/Mars/datacenter/db/printtable.php

    r7484 r7546  
    1010    }
    1111
    12     function PrintPage($html, $db, $limits, $rms)
     12    function PrintPage($html, $host, $user, $pw, $db, $limits, $rms)
    1313    {
    1414        if (empty($_GET["fTable"]))
     
    1919        }
    2020
    21         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     21        $db_id = mysql_connect($host, $user, $pw);
    2222        if ($db_id==FALSE)
    2323        {
     
    6767        header("Content-Disposition: attachment; filename=query-result.txt");
    6868
    69         PrintPage("0", $db, $limits, $rms);
     69        PrintPage("0", $host, $user, $pw, $db, $limits, $rms);
    7070    }
    7171    else
     
    8080            printf("No query submitted yet.<BR>");
    8181        else
    82             PrintPage("1", $db, $limits, $rms);
     82            PrintPage("1", $host, $user, $pw, $db, $limits, $rms);
    8383
    8484        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/querycal.php

    r7507 r7546  
    102102    }
    103103
    104     function PrintForm($_GET, $db)
     104    function PrintForm($_GET, $host, $user, $pw, $db)
    105105    {
    106106        printf("<center>\n");
     
    138138
    139139        if (empty($_GET["fRunMin"]))
    140             $min = GetMin("fSequenceFirst", "Sequences", $db);
     140            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    141141        else
    142142            $min = $_GET["fRunMin"];
    143143
    144144        if (empty($_GET["fRunMax"]))
    145             $max = GetMax("fSequenceFirst", "Sequences", $db);
     145            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    146146        else
    147147            $max = $_GET["fRunMax"];
     
    182182    }
    183183
    184     function PrintPage($html, $db, $alias, $rightalign, $checkwhere)
    185     {
    186         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     184    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere)
     185    {
     186        $db_id = mysql_connect($host, $user, $pw);
    187187        if ($db_id==FALSE)
    188188        {
     
    223223        header("Content-Disposition: attachment; filename=query-result.txt");
    224224
    225         PrintPage("0", $db, $alias, $rightalign, $checkwhere);
     225        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
    226226    }
    227227    else
     
    232232
    233233        InitGet($_GET);
    234         PrintForm($_GET, $db);
     234        PrintForm($_GET, $host, $user, $pw, $db);
    235235
    236236        if ($environment==0)
    237237            printf("No query submitted yet.<BR>");
    238238        else
    239             PrintPage("1", $db, $alias, $rightalign, $checkwhere);
     239            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
    240240
    241241        echo (file_get_contents("index-footer.html"));
  • 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"));
  • trunk/MagicSoft/Mars/datacenter/db/queryrbk.php

    r7484 r7546  
    3232    }
    3333
    34     function PrintPage($html, $db)
     34    function PrintPage($html, $host, $user, $pw, $db)
    3535    {
    36         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     36        $db_id = mysql_connect($host, $user, $pw);
    3737        if ($db_id==FALSE)
    3838        {
     
    8989        header("Content-Disposition: attachment; filename=query-result.txt");
    9090
    91         PrintPage("0", $db);
     91        PrintPage("0", $host, $user, $pw, $db);
    9292    }
    9393    else
     
    102102            printf("No query submitted yet.<BR>");
    103103        else
    104             PrintPage("1", $db);
     104            PrintPage("1", $host, $user, $pw, $db);
    105105
    106106        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/queryseq.php

    r7484 r7546  
    190190    }
    191191
    192     function PrintForm($_GET, $db)
     192    function PrintForm($_GET, $host, $user, $pw, $db)
    193193    {
    194194        printf("<center>\n");
     
    216216        printf(" <table>\n");
    217217        printf("  <tr><td>\n");
    218         PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
    219         printf("  </td><td>\n");
    220         PrintPullDown($db, "TriggerTable", "fTriggerTableName", "fTriggerTableKEY", "Trigger Table");
    221         printf("  </td><td>\n");
    222         PrintPullDown($db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
     218        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
     219        printf("  </td><td>\n");
     220        PrintPullDown($host, $user, $pw, $db, "TriggerTable", "fTriggerTableName", "fTriggerTableKEY", "Trigger Table");
     221        printf("  </td><td>\n");
     222        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
    223223        printf("  </td></tr><tr><td>\n");
    224         PrintPullDown($db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
    225         printf("  </td><td>\n");
    226         PrintPullDown($db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
    227         printf("  </td><td>\n");
    228         PrintPullDown($db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
     224        PrintPullDown($host, $user, $pw, $db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
     225        printf("  </td><td>\n");
     226        PrintPullDown($host, $user, $pw, $db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
     227        printf("  </td><td>\n");
     228        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
    229229        printf("  </td></tr><tr><td>\n");
    230         PrintPullDown($db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
    231         printf("  </td><td>\n");
    232         PrintPullDown($db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
    233         printf("  </td><td>\n");
    234         PrintPullDown($db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");
     230        PrintPullDown($host, $user, $pw, $db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
     231        printf("  </td><td>\n");
     232        PrintPullDown($host, $user, $pw, $db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
     233        printf("  </td><td>\n");
     234        PrintPullDown($host, $user, $pw, $db, "ManuallyChanged", "fManuallyChangedName", "fManuallyChangedKEY", "Manually changed");
    235235        printf("  </td></tr>\n");
    236236        printf(" </table>\n");
     
    238238
    239239        if (empty($_GET["fStartDate"]))
    240             $timemin = GetMin("fRunStart", "RunData", $db);
     240            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
    241241        else
    242242            $timemin = $_GET["fStartDate"];
    243243
    244244        if (empty($_GET["fStopDate"]))
    245             $timemax = GetMax("fRunStart", "RunData", $db);
     245            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
    246246        else
    247247            $timemax = $_GET["fStopDate"];
     
    251251
    252252        if (empty($_GET["fRunMin"]))
    253             $min = GetMin("fSequenceFirst", "Sequences", $db);
     253            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    254254        else
    255255            $min = $_GET["fRunMin"];
    256256
    257257        if (empty($_GET["fRunMax"]))
    258             $max = GetMax("fSequenceFirst", "Sequences", $db);
     258            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    259259        else
    260260            $max = $_GET["fRunMax"];
     
    301301    }
    302302
    303     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
    304     {
    305         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     303    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup)
     304    {
     305        $db_id = mysql_connect($host, $user, $pw);
    306306        if ($db_id==FALSE)
    307307        {
     
    342342        header("Content-Disposition: attachment; filename=query-result.txt");
    343343
    344         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     344        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    345345    }
    346346    else
     
    351351
    352352        InitGet($_GET);
    353         PrintForm($_GET, $db);
     353        PrintForm($_GET, $host, $user, $pw, $db);
    354354
    355355        if ($environment==0)
    356356            printf("No query submitted yet.<BR>");
    357357        else
    358             PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
     358            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup);
    359359
    360360        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/querystar.php

    r7504 r7546  
    7575    }
    7676
    77     function PrintForm($_GET, $db)
     77    function PrintForm($_GET, $host, $user, $pw, $db)
    7878    {
    7979        printf("<center>\n");
     
    103103
    104104        if (empty($_GET["fRunMin"]))
    105             $min = GetMin("fSequenceFirst", "Sequences", $db);
     105            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    106106        else
    107107            $min = $_GET["fRunMin"];
    108108
    109109        if (empty($_GET["fRunMax"]))
    110             $max = GetMax("fSequenceFirst", "Sequences", $db);
     110            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    111111        else
    112112            $max = $_GET["fRunMax"];
     
    147147    }
    148148
    149     function PrintPage($html, $db, $alias, $rightalign, $checkwhere)
    150     {
    151         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     149    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere)
     150    {
     151        $db_id = mysql_connect($host, $user, $pw);
    152152        if ($db_id==FALSE)
    153153        {
     
    188188        header("Content-Disposition: attachment; filename=query-result.txt");
    189189
    190         PrintPage("0", $db, $alias, $rightalign, $checkwhere);
     190        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
    191191    }
    192192    else
     
    197197
    198198        InitGet($_GET);
    199         PrintForm($_GET, $db);
     199        PrintForm($_GET, $host, $user, $pw, $db);
    200200
    201201        if ($environment==0)
    202202            printf("No query submitted yet.<BR>");
    203203        else
    204             PrintPage("1", $db, $alias, $rightalign, $checkwhere);
     204            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere);
    205205
    206206        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/runinfo.php

    r7527 r7546  
    319319    }
    320320
    321     function PrintForm($_GET, $db)
     321    function PrintForm($_GET, $host, $user, $pw, $db)
    322322    {
    323323        printf("<center>\n");
     
    372372        printf(" <table>\n");
    373373        printf("  <tr><td>\n");
    374         PrintPullDown($db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
    375         printf("  </td><td>\n");
    376         PrintPullDown($db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
    377         printf("  </td><td>\n");
    378         PrintPullDown($db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
    379         printf("  </td><td>\n");
    380         PrintPullDown($db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
     374        PrintPullDown($host, $user, $pw, $db, "RunType",     "fRunTypeName",     "fRunTypeKEY", "Run type");
     375        printf("  </td><td>\n");
     376        PrintPullDown($host, $user, $pw, $db, "Source",      "fSourceName",      "fSourceKEY", "Source Name");
     377        printf("  </td><td>\n");
     378        PrintPullDown($host, $user, $pw, $db, "HvSettings",  "fHvSettingsName",  "fHvSettingsKEY", "HV Settings");
     379        printf("  </td><td>\n");
     380        PrintPullDown($host, $user, $pw, $db, "L1TriggerTable", "fL1TriggerTableName", "fL1TriggerTableKEY", "L1 Trigger Table");
    381381        printf("  </td></tr><tr><td>\n");
    382         PrintPullDown($db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
    383         printf("  </td><td>\n");
    384         PrintPullDown($db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
    385         printf("  </td><td>\n");
    386         PrintPullDown($db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
    387         printf("  </td><td>\n");
    388         PrintPullDown($db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
     382        PrintPullDown($host, $user, $pw, $db, "TestFlag",  "fTestFlagName",  "fTestFlagKEY", "Test Flag");
     383        printf("  </td><td>\n");
     384        PrintPullDown($host, $user, $pw, $db, "Project",     "fProjectName",     "fProjectKEY", "Project Name");
     385        printf("  </td><td>\n");
     386        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable",  "fDiscriminatorThresholdTableName",  "fDiscriminatorThresholdTableKEY", "DT Table");
     387        printf("  </td><td>\n");
     388        PrintPullDown($host, $user, $pw, $db, "L2TriggerTable", "fL2TriggerTableName", "fL2TriggerTableKEY", "L2 Trigger Table");
    389389        printf("  </td></tr><tr><td>\n");
    390         PrintPullDown($db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
    391         printf("  </td><td>\n");
    392         PrintPullDown($db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
    393         printf("  </td><td>\n");
    394         PrintPullDown($db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
    395         printf("  </td><td>\n");
    396         PrintPullDown($db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
     390        PrintPullDown($host, $user, $pw, $db, "ExcludedFDA", "fExcludedFDAName", "fExcludedFDAKEY", "Exclusions");
     391        printf("  </td><td>\n");
     392        PrintPullDown($host, $user, $pw, $db, "LightConditions",  "fLightConditionsName",  "fLightConditionsKEY", "Light Conditions");
     393        printf("  </td><td>\n");
     394        PrintPullDown($host, $user, $pw, $db, "CalibrationScript",  "fCalibrationScriptName",  "fCalibrationScriptKEY", "Cal Script");
     395        printf("  </td><td>\n");
     396        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",  "fTriggerDelayTableName",  "fTriggerDelayTableKEY", "Trigger Delay Table");
    397397        printf("  </td></tr><tr><td>\n");
    398         PrintPullDown($db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
     398        PrintPullDown($host, $user, $pw, $db, "MagicNumber", "fMagicNumberName", "fMagicNumberKEY", "Magic Number");
    399399        printf(" </td></tr></table>\n");
    400400
     
    402402
    403403        if (empty($_GET["fStartDate"]))
    404             $timemin = GetMin("fRunStart", "RunData", $db);
     404            $timemin = GetMin("fRunStart", "RunData", $host, $user, $pw, $db);
    405405        else
    406406            $timemin = $_GET["fStartDate"];
    407407
    408408        if (empty($_GET["fStopDate"]))
    409             $timemax = GetMax("fRunStart", "RunData", $db);
     409            $timemax = GetMax("fRunStart", "RunData", $host, $user, $pw, $db);
    410410        else
    411411            $timemax = $_GET["fStopDate"];
     
    427427
    428428        if (empty($_GET["fRunMin"]))
    429             $min = GetMin("fRunNumber", "RunData", $db);
     429            $min = GetMin("fRunNumber", "RunData", $host, $user, $pw, $db);
    430430        else
    431431            $min = $_GET["fRunMin"];
    432432
    433433        if (empty($_GET["fRunMax"]))
    434             $max = GetMax("fRunNumber", "RunData", $db);
     434            $max = GetMax("fRunNumber", "RunData", $host, $user, $pw, $db);
    435435        else
    436436            $max = $_GET["fRunMax"];
     
    477477    }
    478478
    479     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
     479    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
    480480    {
    481         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     481        $db_id = mysql_connect($host, $user, $pw);
    482482        if ($db_id==FALSE)
    483483        {
     
    519519        header("Content-Disposition: attachment; filename=query-result.txt");
    520520
    521         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     521        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    522522    }
    523523    else
     
    529529        InitGet($_GET);
    530530        if (empty($_GET["fPrintTable"]))
    531             PrintForm($_GET, $db);
     531            PrintForm($_GET, $host, $user, $pw, $db);
    532532
    533533        if ($environment==0)
     
    536536        {
    537537            if (empty($_GET["fPrintTable"]))
    538                 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     538                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    539539            else
    540                 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     540                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    541541        }
    542542
  • trunk/MagicSoft/Mars/datacenter/db/sequence.php

    r7507 r7546  
    7474    }
    7575
    76     function PrintForm($_GET, $db)
     76    function PrintForm($_GET, $host, $user, $pw, $db)
    7777    {
    7878        printf("<center>\n");
     
    8686
    8787        if (empty($_GET["fRunMin"]))
    88             $min = GetMin("fSequenceFirst", "Sequences", $db);
     88            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    8989        else
    9090            $min = $_GET["fRunMin"];
    9191
    9292        if (empty($_GET["fRunMax"]))
    93             $max = GetMax("fSequenceFirst", "Sequences", $db);
     93            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    9494        else
    9595            $max = $_GET["fRunMax"];
     
    510510    }
    511511
    512     function PrintPage($html, $db)
    513     {
    514         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     512    function PrintPage($html, $host, $user, $pw, $db)
     513    {
     514        $db_id = mysql_connect($host, $user, $pw);
    515515        if ($db_id==FALSE)
    516516        {
     
    550550        header("Content-Disposition: attachment; filename=query-result.txt");
    551551
    552         PrintPage("0", $db);
     552        PrintPage("0", $host, $user, $pw, $db);
    553553    }
    554554    else
     
    560560        InitGet($_GET);
    561561        if (empty($_GET["fPrintTable"]))
    562             PrintForm($_GET, $db);
     562            PrintForm($_GET, $host, $user, $pw, $db);
    563563
    564564        if ($environment==0)
     
    567567        {
    568568            if (empty($_GET["fPrintTable"]))
    569                 PrintPage("1", $db);
     569                PrintPage("1", $host, $user, $pw, $db);
    570570            else
    571                 PrintPage("2", $db);
     571                PrintPage("2", $host, $user, $pw, $db);
    572572        }
    573573
  • trunk/MagicSoft/Mars/datacenter/db/sequinfo.php

    r7527 r7546  
    403403    }
    404404
    405     function PrintForm($_GET, $db)
     405    function PrintForm($_GET, $host, $user, $pw, $db)
    406406    {
    407407        printf("<center>\n");
     
    520520        printf(" <table>\n");
    521521        printf("  <tr><td>\n");
    522         PrintPullDown($db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
    523         printf("  </td><td>\n");
    524         PrintPullDown($db, "L1TriggerTable",              "fL1TriggerTableName",              "fL1TriggerTableKEY",              "L1Trigger Table");
    525         printf("  </td><td>\n");
    526         PrintPullDown($db, "L2TriggerTable",              "fL2TriggerTableName",              "fL2TriggerTableKEY",              "L2Trigger Table");
    527         printf("  </td><td>\n");
    528         PrintPullDown($db, "TriggerDelayTable",           "fTriggerDelayTableName",           "fTriggerDelayTableKEY",           "Trigger Delay Table");
     522        PrintPullDown($host, $user, $pw, $db, "Source",                      "fSourceName",                      "fSourceKEY",                      "Source Name");
     523        printf("  </td><td>\n");
     524        PrintPullDown($host, $user, $pw, $db, "L1TriggerTable",              "fL1TriggerTableName",              "fL1TriggerTableKEY",              "L1Trigger Table");
     525        printf("  </td><td>\n");
     526        PrintPullDown($host, $user, $pw, $db, "L2TriggerTable",              "fL2TriggerTableName",              "fL2TriggerTableKEY",              "L2Trigger Table");
     527        printf("  </td><td>\n");
     528        PrintPullDown($host, $user, $pw, $db, "TriggerDelayTable",           "fTriggerDelayTableName",           "fTriggerDelayTableKEY",           "Trigger Delay Table");
    529529        printf("  </td></tr><tr><td>\n");
    530         PrintPullDown($db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
    531         printf("  </td><td>\n");
    532         PrintPullDown($db, "Project",                     "fProjectName",                     "fProjectKEY",                     "Project Name");
    533         printf("  </td><td>\n");
    534         PrintPullDown($db, "HvSettings",                  "fHvSettingsName",                  "fHvSettingsKEY",                  "HV Settings");
    535         printf("  </td><td>\n");
    536         PrintPullDown($db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
     530        PrintPullDown($host, $user, $pw, $db, "LightConditions",             "fLightConditionsName",             "fLightConditionsKEY",             "Light Conditions");
     531        printf("  </td><td>\n");
     532        PrintPullDown($host, $user, $pw, $db, "Project",                     "fProjectName",                     "fProjectKEY",                     "Project Name");
     533        printf("  </td><td>\n");
     534        PrintPullDown($host, $user, $pw, $db, "HvSettings",                  "fHvSettingsName",                  "fHvSettingsKEY",                  "HV Settings");
     535        printf("  </td><td>\n");
     536        PrintPullDown($host, $user, $pw, $db, "DiscriminatorThresholdTable", "fDiscriminatorThresholdTableName", "fDiscriminatorThresholdTableKEY", "DT Table");
    537537        printf("  </td></tr><tr><td>\n");
    538         PrintPullDown($db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
    539         printf("  </td><td>\n");
    540         PrintPullDown($db, "TestFlag",                    "fTestFlagName",                    "fTestFlagKEY",                    "Test Flag");
     538        PrintPullDown($host, $user, $pw, $db, "ManuallyChanged",             "fManuallyChangedName",             "fManuallyChangedKEY",             "Manually changed");
     539        printf("  </td><td>\n");
     540        PrintPullDown($host, $user, $pw, $db, "TestFlag",                    "fTestFlagName",                    "fTestFlagKEY",                    "Test Flag");
    541541        printf("  </td></tr>\n");
    542542        printf(" </table>\n");
     
    544544
    545545        if (empty($_GET["fStartDate"]))
    546             $timemin = GetMin("fRunStart", "Sequences", $db);
     546            $timemin = GetMin("fRunStart", "Sequences", $host, $user, $pw, $db);
    547547        else
    548548            $timemin = $_GET["fStartDate"];
    549549
    550550        if (empty($_GET["fStopDate"]))
    551             $timemax = GetMax("fRunStart", "Sequences", $db);
     551            $timemax = GetMax("fRunStart", "Sequences", $host, $user, $pw, $db);
    552552        else
    553553            $timemax = $_GET["fStopDate"];
     
    557557
    558558        if (empty($_GET["fRunMin"]))
    559             $min = GetMin("fSequenceFirst", "Sequences", $db);
     559            $min = GetMin("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    560560        else
    561561            $min = $_GET["fRunMin"];
    562562
    563563        if (empty($_GET["fRunMax"]))
    564             $max = GetMax("fSequenceFirst", "Sequences", $db);
     564            $max = GetMax("fSequenceFirst", "Sequences", $host, $user, $pw, $db);
    565565        else
    566566            $max = $_GET["fRunMax"];
     
    614614    }
    615615
    616     function PrintPage($html, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
     616    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs)
    617617    {
    618         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     618        $db_id = mysql_connect($host, $user, $pw);
    619619        if ($db_id==FALSE)
    620620        {
     
    655655        header("Content-Disposition: attachment; filename=query-result.txt");
    656656
    657         PrintPage("0", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     657        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    658658    }
    659659    else
     
    665665        InitGet($_GET);
    666666        if (empty($_GET["fPrintTable"]))
    667             PrintForm($_GET, $db);
     667            PrintForm($_GET, $host, $user, $pw, $db);
    668668
    669669        if ($environment==0)
     
    672672        {
    673673            if (empty($_GET["fPrintTable"]))
    674                 PrintPage("1", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     674                PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    675675            else
    676                 PrintPage("2", $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
     676                PrintPage("2", $host, $user, $pw, $db, $alias, $rightalign, $checkwhere, $checkgroup, $checkstatusgroup, $needs);
    677677        }
    678678
  • trunk/MagicSoft/Mars/datacenter/db/sources.php

    r7484 r7546  
    8787    }
    8888
    89     function PrintPage($html, $db, $alias, $rightalign)
     89    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign)
    9090    {
    91         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     91        $db_id = mysql_connect($host, $user, $pw);
    9292        if ($db_id==FALSE)
    9393        {
     
    128128        header("Content-Disposition: attachment; filename=query-result.txt");
    129129
    130         PrintPage("0", $db, $alias, $rightalign);
     130        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign);
    131131    }
    132132    else
     
    142142            printf("No query submitted yet.<BR>");
    143143        else
    144             PrintPage("1", $db, $alias, $rightalign);
     144            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign);
    145145
    146146        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/statusrps.php

    r7527 r7546  
    121121    }
    122122
    123     function PrintForm($_GET, $db)
     123    function PrintForm($_GET, $host, $user, $pw, $db)
    124124    {
    125125        printf("<center>\n");
     
    146146
    147147        if (empty($_GET["fRunMin"]))
    148             $min = GetMin("fRunNumber", "RunProcessStatus", $db);
     148            $min = GetMin("fRunNumber", "RunProcessStatus", $host, $user, $pw, $db);
    149149        else
    150150            $min = $_GET["fRunMin"];
    151151
    152152        if (empty($_GET["fRunMax"]))
    153             $max = GetMax("fRunNumber", "RunProcessStatus", $db);
     153            $max = GetMax("fRunNumber", "RunProcessStatus", $host, $user, $pw, $db);
    154154        else
    155155            $max = $_GET["fRunMax"];
     
    190190    }
    191191
    192     function PrintPage($html, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
    193     {
    194         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     192    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
     193    {
     194        $db_id = mysql_connect($host, $user, $pw);
    195195        if ($db_id==FALSE)
    196196        {
     
    231231        header("Content-Disposition: attachment; filename=query-result.txt");
    232232
    233         PrintPage("0", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     233        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
    234234    }
    235235    else
     
    240240
    241241        InitGet($_GET);
    242         PrintForm($_GET, $db);
     242        PrintForm($_GET, $host, $user, $pw, $db);
    243243
    244244        if ($environment==0)
    245245            printf("No query submitted yet.<BR>");
    246246        else
    247             PrintPage("1", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     247            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
    248248
    249249        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/statussbs.php

    r7527 r7546  
    100100    }
    101101
    102     function PrintForm($_GET, $db)
     102    function PrintForm($_GET, $host, $user, $pw, $db)
    103103    {
    104104        printf("<center>\n");
     
    122122
    123123        if (empty($_GET["fRunMin"]))
    124             $min = GetMin("fDate", "SequenceBuildStatus", $db);
     124            $min = GetMin("fDate", "SequenceBuildStatus", $host, $user, $pw, $db);
    125125        else
    126126            $min = $_GET["fRunMin"];
    127127
    128128        if (empty($_GET["fRunMax"]))
    129             $max = GetMax("fDate", "SequenceBuildStatus", $db);
     129            $max = GetMax("fDate", "SequenceBuildStatus", $host, $user, $pw, $db);
    130130        else
    131131            $max = $_GET["fRunMax"];
     
    166166    }
    167167
    168     function PrintPage($html, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
    169     {
    170         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     168    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
     169    {
     170        $db_id = mysql_connect($host, $user, $pw);
    171171        if ($db_id==FALSE)
    172172        {
     
    207207        header("Content-Disposition: attachment; filename=query-result.txt");
    208208
    209         PrintPage("0", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     209        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
    210210    }
    211211    else
     
    216216
    217217        InitGet($_GET);
    218         PrintForm($_GET, $db);
     218        PrintForm($_GET, $host, $user, $pw, $db);
    219219
    220220        if ($environment==0)
    221221            printf("No query submitted yet.<BR>");
    222222        else
    223             PrintPage("1", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     223            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
    224224
    225225        echo (file_get_contents("index-footer.html"));
  • trunk/MagicSoft/Mars/datacenter/db/statussps.php

    r7527 r7546  
    110110    }
    111111
    112     function PrintForm($_GET, $db)
     112    function PrintForm($_GET, $host, $user, $pw, $db)
    113113    {
    114114        printf("<center>\n");
     
    135135
    136136        if (empty($_GET["fRunMin"]))
    137             $min = GetMin("fSequenceFirst", "SequenceProcessStatus", $db);
     137            $min = GetMin("fSequenceFirst", "SequenceProcessStatus", $host, $user, $pw, $db);
    138138        else
    139139            $min = $_GET["fRunMin"];
    140140
    141141        if (empty($_GET["fRunMax"]))
    142             $max = GetMax("fSequenceFirst", "SequenceProcessStatus", $db);
     142            $max = GetMax("fSequenceFirst", "SequenceProcessStatus", $host, $user, $pw, $db);
    143143        else
    144144            $max = $_GET["fRunMax"];
     
    179179    }
    180180
    181     function PrintPage($html, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
    182     {
    183         $db_id = mysql_connect("hercules.astro.uni-wuerzburg.de", "MAGIC", "d99swMT!");
     181    function PrintPage($html, $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs)
     182    {
     183        $db_id = mysql_connect($host, $user, $pw);
    184184        if ($db_id==FALSE)
    185185        {
     
    220220        header("Content-Disposition: attachment; filename=query-result.txt");
    221221
    222         PrintPage("0", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     222        PrintPage("0", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
    223223    }
    224224    else
     
    229229
    230230        InitGet($_GET);
    231         PrintForm($_GET, $db);
     231        PrintForm($_GET, $host, $user, $pw, $db);
    232232
    233233        if ($environment==0)
    234234            printf("No query submitted yet.<BR>");
    235235        else
    236             PrintPage("1", $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
     236            PrintPage("1", $host, $user, $pw, $db, $alias, $rightalign, $checkstatusgroup, $checkwhere, $needs);
    237237
    238238        echo (file_get_contents("index-footer.html"));
Note: See TracChangeset for help on using the changeset viewer.