Changeset 8421 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
04/19/07 22:51:59 (18 years ago)
Author:
Daniela Dorner
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars
Files:
1 added
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/Changelog

    r8419 r8421  
    1919                                                 -*-*- END OF LINE -*-*-
    2020
     21 2007/04/12 Daniela Dorner
     22
     23   * datacenter/db/showplots-ds.php:
     24     - added (script to plot all plots of a data set)
     25
     26   * datacenter/db/showplots.php:
     27     - added 'previous' and 'next' button
     28
     29   * datacenter/db/plotinclude.php, datacenter/db/showplots.php:
     30     - moved two function from showplots.php to plotinclude.php, as they
     31       are also used in showplots-ds.php
     32
     33   * datacenter/db/builddatasets.php, datacenter/db/datasetinfo-aio.php
     34     datacenter/db/indes-header.html, datacenter/db/indes.html,
     35     datacenter/db/menu.js, datacenter/db/reference.html,
     36     datacenter/db/regexp.html, datacenter/db/runinfo-aio.html,
     37     datacenter/db/sequinfo-aio.html:
     38     - adapted paths of images and mars.css
     39
     40   * datacenter/db/index.html:
     41     - added link to showplots-ds.php
     42
     43
     44
    2145 2007/04/18 Thomas Bretz
    2246
  • trunk/MagicSoft/Mars/datacenter/db/index.html

    r8420 r8421  
    5252<li><A HREF="plotdb.php">Plots</A>: plot values from the database yourself online</li>
    5353<li><A HREF="showplots.php">All plots of one sequence</A>: click through all calib, signal and star plot of one sequence</li>
     54<li><A HREF="showplots-ds.php">All plots of one dataset</A>: click through all sequences of one dataset (all plots of calib, signal and star can be viewed)</li>
    5455</ul>
    5556<p>
  • trunk/MagicSoft/Mars/datacenter/db/plotinclude.php

    r8402 r8421  
    11<?php
    22
     3//arrays and functions for plot.php and plotdb.php
    34include("include.php");
    45include("magicdefs.php");
     
    120121}
    121122
     123//functions for showplots.php and showplots2.php
     124function gettypename($type2)
     125{
     126    switch ($type2)
     127    {
     128    case "calib":
     129        $type="callisto";
     130        break;
     131    case "signal":
     132        $type="callisto";
     133        break;
     134    case "star":
     135        $type="star";
     136        break;
     137    }
     138    return $type;
     139}
     140
     141function getplotname($seq, $tabnum, $type, $type2)
     142{
     143    $seqlong=str_pad($seq, 8, "0", STR_PAD_LEFT);
     144    $seqshort=substr($seqlong, 0, 4);
     145    $plot  = "http://datacenter.astro.uni-wuerzburg.de/";
     146    $plot .= $type . "/" . str_pad( $seqshort, 4, "0", STR_PAD_LEFT);
     147    $plot .= "/" . $seqlong . "/" . $type2 . $seqlong . "-tab" . $tabnum . ".png";
     148    return $plot;
     149}
    122150
    123151?>
  • trunk/MagicSoft/Mars/datacenter/db/runinfo-aio.php

    r8403 r8421  
    236236            printf("1000000000");
    237237        printf("'>\n");
    238         printf("<img id='allbutton' src='../minus.png' alt='-' onclick=\"showhide('all')\"> <b>Menu</b>&nbsp;&nbsp;&nbsp;&nbsp;\n");
    239         printf("&nbsp;&nbsp;<img id='infobutton'   src='../plus.png' alt='+' onClick=\"showhide('info');showhide('info2')\"> RunInfo    \n");
    240         printf("&nbsp;&nbsp;<img id='statbutton'   src='../plus.png' alt='+' onClick=\"showhide('stat');showhide('fail')\">  StatusInfo \n");
    241         printf("&nbsp;&nbsp;<img id='rangesbutton' src='../plus.png' alt='+' onClick=\"showhide('ranges')\">                 Ranges     \n");
     238        printf("<img id='allbutton' src='minus.png' alt='-' onclick=\"showhide('all')\"> <b>Menu</b>&nbsp;&nbsp;&nbsp;&nbsp;\n");
     239        printf("&nbsp;&nbsp;<img id='infobutton'   src='plus.png' alt='+' onClick=\"showhide('info');showhide('info2')\"> RunInfo    \n");
     240        printf("&nbsp;&nbsp;<img id='statbutton'   src='plus.png' alt='+' onClick=\"showhide('stat');showhide('fail')\">  StatusInfo \n");
     241        printf("&nbsp;&nbsp;<img id='rangesbutton' src='plus.png' alt='+' onClick=\"showhide('ranges')\">                 Ranges     \n");
    242242
    243243        printf(" <div id='all' style='display:block'>");
  • trunk/MagicSoft/Mars/datacenter/db/sequinfo-aio.php

    r8333 r8421  
    285285            printf("1000000000");
    286286        printf("'>\n");
    287         printf("<img id='allbutton' src='../minus.png' alt='-' onclick='showhide(\"all\")'> <b>Menu</b>&nbsp;&nbsp;&nbsp;&nbsp; \n");
    288         printf("&nbsp;&nbsp;<img id='infobutton'   src='../plus.png' alt='+' onClick='showhide(\"info\");showhide(\"info2\")'> SequInfo   \n");
    289         printf("&nbsp;&nbsp;<img id='statbutton'   src='../plus.png' alt='+' onClick='showhide(\"stat\");showhide(\"fail\")'>  StatusInfo \n");
    290         printf("&nbsp;&nbsp;<img id='calbutton'    src='../plus.png' alt='+' onClick='showhide(\"cal\")'>                      CalInfo    \n");
    291         printf("&nbsp;&nbsp;<img id='starbutton'   src='../plus.png' alt='+' onClick='showhide(\"star\")'>                     StarInfo   \n");
    292         printf("&nbsp;&nbsp;<img id='limitsbutton' src='../plus.png' alt='+' onClick='showhide(\"limits\")'>                   Limits     \n");
    293         printf("&nbsp;&nbsp;<img id='rangesbutton' src='../plus.png' alt='+' onClick='showhide(\"ranges\")'>                   Ranges     \n");
     287        printf("<img id='allbutton' src='minus.png' alt='-' onclick='showhide(\"all\")'> <b>Menu</b>&nbsp;&nbsp;&nbsp;&nbsp; \n");
     288        printf("&nbsp;&nbsp;<img id='infobutton'   src='plus.png' alt='+' onClick='showhide(\"info\");showhide(\"info2\")'> SequInfo   \n");
     289        printf("&nbsp;&nbsp;<img id='statbutton'   src='plus.png' alt='+' onClick='showhide(\"stat\");showhide(\"fail\")'>  StatusInfo \n");
     290        printf("&nbsp;&nbsp;<img id='calbutton'    src='plus.png' alt='+' onClick='showhide(\"cal\")'>                      CalInfo    \n");
     291        printf("&nbsp;&nbsp;<img id='starbutton'   src='plus.png' alt='+' onClick='showhide(\"star\")'>                     StarInfo   \n");
     292        printf("&nbsp;&nbsp;<img id='limitsbutton' src='plus.png' alt='+' onClick='showhide(\"limits\")'>                   Limits     \n");
     293        printf("&nbsp;&nbsp;<img id='rangesbutton' src='plus.png' alt='+' onClick='showhide(\"ranges\")'>                   Ranges     \n");
    294294
    295295        printf(" <div id='all' style='display:block'>");
  • trunk/MagicSoft/Mars/datacenter/db/showplots.php

    r8273 r8421  
    11<?php
    22
    3 function gettypename($type2)
    4 {
    5     switch ($type2)
    6     {
    7     case "calib":
    8         $type="callisto";
    9         break;
    10     case "signal":
    11         $type="callisto";
    12         break;
    13     case "star":
    14         $type="star";
    15         break;
    16     }
    17     return $type;
    18 }
    19 
    20 function nexttype2($type2)
    21 {
    22     switch ($type2)
    23     {
    24     case "calib":
    25         $type2="signal";
    26         break;
    27     case "signal":
    28         $type2="star";
    29         break;
    30     case "star":
    31         $type2="calib";
    32         break;
    33     }
    34     return $type2;
    35 }
    36 
    37 function getplotname($seq, $tabnum, $type, $type2)
    38 {
    39     $seqlong=str_pad($seq, 8, "0", STR_PAD_LEFT);
    40     $seqshort=substr($seqlong, 0, 4);
    41     $plot  = "http://vela.astro.uni-wuerzburg.de/datacenter/";
    42     $plot .= $type . "/" . str_pad( $seqshort, 4, "0", STR_PAD_LEFT);
    43     $plot .= "/" . $seqlong . "/" . $type2 . $seqlong . "-tab" . $tabnum . ".png";
    44     return $plot;
    45 }
     3include("plotinclude.php");
    464
    475printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
     
    6220if (!empty($_GET["type2"]))
    6321    $type2=$_GET["type2"];
     22$next=0;
     23$prev=0;
    6424
    6525if (!empty($seq))
    6626{
     27    if (!empty($_GET["next"]))
     28        $tabnum=$tabnum+1;
     29    if (!empty($_GET["prev"]))
     30        $tabnum=$tabnum-1;
    6731    $type=gettypename($type2);
    6832    $plot=getplotname($seq, $tabnum, $type, $type2);
    6933
    7034    //be careful: this has to be adapted in case tabs are removed or new tabs are added
    71     if (($type2=="calib" && $tabnum==12) || ($type2=="signal" && $tabnum==11) || ($type2=="star" && $tabnum==15))
     35    if (($type2=="calib" && $tabnum==12) || ($type2=="signal" && $tabnum==11) || ($type2=="star" && $tabnum==19))
    7236    {
    7337        $tabnum=1;
    74         $type2=nexttype2($type2);
     38        switch ($type2)
     39        {
     40        case "calib":
     41            $type2="signal";
     42            break;
     43        case "signal":
     44            $type2="star";
     45            break;
     46        case "star":
     47            $type2="calib";
     48            break;
     49        }
    7550        $type=gettypename($type2);
    7651        $plot=getplotname($seq, $tabnum, $type, $type2);
    7752    }
    78     $tabnum=$tabnum+1;
     53    if ($tabnum==0)
     54    {
     55        switch($type2)
     56        {
     57        case "calib":
     58            $type2="star";
     59            $tabnum=18;
     60            break;
     61        case "signal":
     62            $type2="calib";
     63            $tabnum=11;
     64            break;
     65        case "star":
     66            $type2="signal";
     67            $tabnum=10;
     68            break;
     69        }
     70        $type=gettypename($type2);
     71        $plot=getplotname($seq, $tabnum, $type, $type2);
     72    }
     73    $next=$tabnum+1;
     74    $prev=$tabnum-1;
    7975}
    8076printf("<form action='showplots.php' method='GET'>\n");
    8177printf("<table width='100%%' border='0'>\n");
    82 printf("<tr><td>\n");
     78printf("<tr><td align='center'>\n");
    8379printf("<input type='text' name='seq' size='10' maxlength='10' value='%s'>\n", $seq);
    8480printf("<input type='text' name='type2' size='10' maxlength='10' value='%s'>\n", $type2);
    8581printf("<input type='text' name='tabnum' size='2' maxlenght='2' value='%s'>\n", $tabnum);
    86 printf("<input type='submit' value='Show Plot'>\n");
    87 printf("plot: %s<br>", $plot);
    88 printf("</td>\n</tr>\n<tr>\n<td>\n");
     82printf("<input type='submit' value='Show Plot'><br>\n");
     83if (!empty($seq))
     84{
     85    printf("<input type='submit' value='<< %d Prev Plot' name='prev'>\n", $prev);
     86    printf("%s \n", $plot);
     87    printf("<input type='submit' value='Next Plot %d >>' name='next'>\n", $next);
     88}
     89printf("</td>\n</tr>\n<tr>\n<td align='center'>\n");
    8990if (!empty($seq))
    9091    printf("<img src='%s'>", $plot);
Note: See TracChangeset for help on using the changeset viewer.