Changeset 8182


Ignore:
Timestamp:
10/31/06 18:22:33 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8179 r8182  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20
     21 2006/10/31 Daniela Dorner
     22
     23   * datacenter/db/menu.php
     24     - added PrintStarRangeMenu (inputs to query range for the
     25       timestamp when Star has been done)
     26     - changed PrintFailedMenu (ReturnCode and FailedCode were labeled
     27       wrongly)
     28
     29   * datacenter/db/magicdefs.php
     30     - added fRunTimeLimit
     31     - shortened alias of fSkyBrightnessMed
     32
     33   * datacenter/db/builddatasets.php
     34     - added (website to build datasets)
     35
     36   * datacenter/db/include.php
     37     - exchanged \" by '
     38     - added function CheckBox2 for $_POST
     39     - added argument $form to function PrintMagicTable ($form
     40       indicates if a second <form> and the according checkboxes and
     41       inputs for $_POST are needed)
     42     - added checkboxes in function PrintMagicTable for 2 additional
     43       columns needed in builddatasets.php
     44
     45   * datacenter/db/culminating.php, datacenter/db/datacheck.php,
     46     datacenter/db/datasetinfo.php, datacenter/db/datasetinfo-aio.php,
     47     datacenter/db/dbstatus.php, datacenter/db/findoffdata.php,
     48     datacenter/db/index.php, datacenter/db/opticaldata.php,
     49     datacenter/db/printtable.php, datacenter/db/querycal.php,
     50     datacenter/db/querymc.php, datacenter/db/queryrbk.php,
     51     datacenter/db/queryseq.php, datacenter/db/querystar.php,
     52     datacenter/db/runinfo-aio.php, datacenter/db/runinfo.php,
     53     datacenter/db/sequinfo-aio.php, datacenter/db/sequinfo.php,
     54     datacenter/db/sources.php, datacenter/db/statusrps.php,
     55     datacenter/db/statussps.php, datacenter/db/statussbs.php:
     56     - changed call of function PrintMagicTable according to changes
     57       in include.php
     58
     59
    2060
    2161 2006/10/31 Thomas Bretz
  • trunk/MagicSoft/Mars/datacenter/db/include.php

    r8123 r8182  
    2424        $checked = "";
    2525
    26     printf("    <input type=\"checkbox\" name=\"%s\" value=\"On\" %s>%s\n", $name, $checked, $text);
     26    printf("    <input type='checkbox' name='%s' value='On' %s>%s\n", $name, $checked, $text);
    2727    printf("<BR>");
    2828
    29     printf(" <select name=\"%s\">\n", $var);
     29    printf(" <select name='%s'>\n", $var);
    3030
    3131    $status = array
     
    4040    {
    4141        if ($stat==$i)
    42             printf("<option value=\"%d\" selected>%s</option>\n", $i, $status[$i]);
     42            printf("<option value='%d' selected>%s</option>\n", $i, $status[$i]);
    4343        else
    44             printf("<option value=\"%d\">%s</option>\n", $i, $status[$i]);
     44            printf("<option value='%d'>%s</option>\n", $i, $status[$i]);
    4545    }
    4646
     
    7878        $checked = "";
    7979
    80     printf("    <input type=\"checkbox\" name=\"%s\" value=\"On\" %s>%s\n", $name, $checked, $text);
     80    printf("    <input type='checkbox' name='%s' value='On' %s>%s\n", $name, $checked, $text);
    8181    printf("<BR>");
    8282
    83     printf(" <select name=\"%s\">\n", $var);
     83    printf(" <select name='%s'>\n", $var);
    8484
    8585    $status = array
     
    9898    {
    9999        if ($stat==$i)
    100             printf("<option value=\"%d\" selected>%s</option>\n", $i, $status[$i]);
     100            printf("<option value='%d' selected>%s</option>\n", $i, $status[$i]);
    101101        else
    102             printf("<option value=\"%d\">%s</option>\n", $i, $status[$i]);
     102            printf("<option value='%d'>%s</option>\n", $i, $status[$i]);
    103103    }
    104104
     
    144144        $checked = "";
    145145
    146     printf("    <input type=\"checkbox\" name=\"%s\" value=\"On\" %s><A HREF=\"printtable.php?fTable=%s\">%s</A>\n", $name, $checked, $table, $descr);
     146    printf("    <input type='checkbox' name='%s' value='On' %s><A HREF='printtable.php?fTable=%s'>%s</A>\n", $name, $checked, $table, $descr);
    147147
    148148    printf("   <BR>\n");
    149149
    150     printf("   <select name=\"%s\" size=\"1\" class=\"Width\">\n", $index);
     150    printf("   <select name='%s' size='1' class='Width'>\n", $index);
    151151
    152152    if (empty($_GET[$index]) || $_GET[$index]==0)
    153         printf("    <option value=\"0\" selected>--- ALL ---</option>\n");
    154     else
    155         printf("    <option value=\"0\">--- ALL ---</option>\n");
     153        printf("    <option value='0' selected>--- ALL ---</option>\n");
     154    else
     155        printf("    <option value='0'>--- ALL ---</option>\n");
    156156
    157157    if (!empty($_GET[$index]) && $_GET[$index]==-1)
    158         printf("    <option value=\"-1\" selected>--- GROUP BY ---</option>\n");
    159     else
    160         printf("    <option value=\"-1\">--- GROUP BY ---</option>\n");
     158        printf("    <option value='-1' selected>--- GROUP BY ---</option>\n");
     159    else
     160        printf("    <option value='-1'>--- GROUP BY ---</option>\n");
    161161
    162162    while ($row = mysql_fetch_row($result))
    163163    {
    164164        if (!empty($_GET[$index]) && $_GET[$index]==$row[0])
    165             printf("    <option value=\"%s\" selected>%s</option>\n", $row[0], $row[1]);
     165            printf("    <option value='%s' selected>%s</option>\n", $row[0], $row[1]);
    166166        else
    167             printf("    <option value=\"%s\">%s</option>\n", $row[0], $row[1]);
     167            printf("    <option value='%s'>%s</option>\n", $row[0], $row[1]);
    168168    }
    169169    printf("   </select>\n");
     
    258258        $checked = "";
    259259
    260     printf("    <td><input type=\"checkbox\" name=\"%s\" value=\"On\" %s>%s</td>\n", $value, $checked, $text);
     260    printf("    <td><input type='checkbox' name='%s' value='On' %s>%s</td>\n", $value, $checked, $text);
     261}
     262
     263function Checkbox2($val, $set, $text)
     264{
     265    $value=$val.$set;
     266    switch ($set)
     267    {
     268    case  "ON":
     269        if (!isset($_POST["submit"]) && ereg(" ".$val." ", $_GET["Set"]))
     270            $_POST[$value]="On";
     271        break;
     272    case "Off":
     273        if (!isset($_POST["submit"]) && ereg(" ".$val." ", $_GET["Set2"]))
     274            $_POST[$value]="On";
     275        break;
     276    }
     277
     278    if ($_POST[$value]=="On")
     279        $checked = "checked";
     280    else
     281        $checked = "";
     282
     283    printf("    <td><input type='checkbox' name='%s' value='On' %s>%s</td>\n", $value, $checked, $text);
    261284}
    262285
     
    400423}
    401424
    402 function PrintMagicTable($result0, $alias, $rightalign, $limitsmean, $limitsmin, $limitsmax, $_GET)
     425function PrintMagicTable($result0, $alias, $rightalign, $limitsmean, $limitsmin, $limitsmax, $form, $_GET)
    403426{
    404427    $col   = FALSE;
     
    418441
    419442    printf("\n<center>\n");
     443    if ($form)
     444        printf("<form method='POST'>");
    420445    if (empty($_GET["fPrintTable"]))
    421446        printf("<p>%s<P>\n", $menu);
    422     printf("<table BORDER=\"0\">\n");
     447    printf("<table BORDER='0'>\n");
    423448    while ($row0 = mysql_fetch_assoc($result0))
    424449    {
     
    427452            printf(" <tr BGCOLOR='#C0C0C0'>\n");
    428453            $first = FALSE;
     454            if ($form)
     455                printf("<td>ON</td><td>Off</td>");
    429456            foreach ($row0 as $key => $element)
    430457            {
     
    455482        $col = !$col;
    456483
     484        if ($form)
     485        {
     486//            printf("<td>%s</td>",$row0["Sequ"]."ON");
     487//            printf("<td>%s</td>",$row0["Sequ"]."Off");
     488            CheckBox2($row0["Sequ"], "ON","");
     489            CheckBox2($row0["Sequ"], "Off","");
     490        }
    457491        foreach ($row0 as $key => $element)
    458492        {
    459493            if (empty($rightalign[$key]))
    460                 printf("  <td align=\"left\">");
     494                printf("  <td align='left'>");
    461495            else
    462                 printf("  <td align=\"right\">");
     496                printf("  <td align='right'>");
    463497
    464498            //determine color of text in cell
     
    551585        printf("%s\n", $menu);
    552586    printf("<P>\n");
    553     printf("</center>\n");
    554     printf("</td>\n");
    555     printf("</tr>\n");
     587
     588    if (!$form)
     589    {
     590        printf("</center>\n");
     591        printf("</td>\n");
     592        printf("</tr>\n");
     593    }
    556594}
    557595
Note: See TracChangeset for help on using the changeset viewer.