source: tags/Mars-V1.2/datacenter/db/showplots.php

Last change on this file was 8421, checked in by Daniela Dorner, 18 years ago
*** empty log message ***
File size: 2.8 KB
Line 
1<?php
2
3include("plotinclude.php");
4
5printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
6printf("<html>\n<head>\n");
7printf("<meta http-equiv='content-type' content='text/html; charset=ISO-8859-1'>\n");
8printf("<title>show plots</title>\n");
9printf("<link rel='stylesheet' type='text/css' href='lamouette.css'>\n");
10printf("</head>\n");
11printf("<body>\n");
12
13$seq=0;
14if (!empty($_GET["seq"]))
15 $seq=$_GET["seq"];
16$tabnum=1;
17if (!empty($_GET["tabnum"]))
18 $tabnum=$_GET["tabnum"];
19$type2="calib";
20if (!empty($_GET["type2"]))
21 $type2=$_GET["type2"];
22$next=0;
23$prev=0;
24
25if (!empty($seq))
26{
27 if (!empty($_GET["next"]))
28 $tabnum=$tabnum+1;
29 if (!empty($_GET["prev"]))
30 $tabnum=$tabnum-1;
31 $type=gettypename($type2);
32 $plot=getplotname($seq, $tabnum, $type, $type2);
33
34 //be careful: this has to be adapted in case tabs are removed or new tabs are added
35 if (($type2=="calib" && $tabnum==12) || ($type2=="signal" && $tabnum==11) || ($type2=="star" && $tabnum==19))
36 {
37 $tabnum=1;
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 }
50 $type=gettypename($type2);
51 $plot=getplotname($seq, $tabnum, $type, $type2);
52 }
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;
75}
76printf("<form action='showplots.php' method='GET'>\n");
77printf("<table width='100%%' border='0'>\n");
78printf("<tr><td align='center'>\n");
79printf("<input type='text' name='seq' size='10' maxlength='10' value='%s'>\n", $seq);
80printf("<input type='text' name='type2' size='10' maxlength='10' value='%s'>\n", $type2);
81printf("<input type='text' name='tabnum' size='2' maxlenght='2' value='%s'>\n", $tabnum);
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");
90if (!empty($seq))
91 printf("<img src='%s'>", $plot);
92else
93 printf("You have to select a sequence.");
94printf("</td>\n</tr>\n</table>\n");
95printf("</form>\n");
96printf("</body>\n");
97printf("</html>\n");
98
99?>
Note: See TracBrowser for help on using the repository browser.