source: trunk/MagicSoft/Mars/datacenter/db/showplots.php@ 8555

Last change on this file since 8555 was 8555, checked in by Daniela Dorner, 17 years ago
*** empty log message ***
File size: 3.0 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 //number of tabs for calib*.root, signal*.root and star*.root
36 $calibtabs=11;
37 $signaltabs=12;
38 $startabs=18;
39
40 if (($type2=="calib" && $tabnum==($calibtabs+1))
41 || ($type2=="signal" && $tabnum==($signaltabs+1))
42 || ($type2=="star" && $tabnum==($startabs+1)))
43 {
44 $tabnum=1;
45 switch ($type2)
46 {
47 case "calib":
48 $type2="signal";
49 break;
50 case "signal":
51 $type2="star";
52 break;
53 case "star":
54 $type2="calib";
55 break;
56 }
57 $type=gettypename($type2);
58 $plot=getplotname($seq, $tabnum, $type, $type2);
59 }
60 if ($tabnum==0)
61 {
62 switch($type2)
63 {
64 case "calib":
65 $type2="star";
66 $tabnum=$startabs;
67 break;
68 case "signal":
69 $type2="calib";
70 $tabnum=$calibtabs;
71 break;
72 case "star":
73 $type2="signal";
74 $tabnum=$signaltabs;
75 break;
76 }
77 $type=gettypename($type2);
78 $plot=getplotname($seq, $tabnum, $type, $type2);
79 }
80 $next=$tabnum+1;
81 $prev=$tabnum-1;
82}
83printf("<form action='showplots.php' method='GET'>\n");
84printf("<table width='100%%' border='0'>\n");
85printf("<tr><td align='center'>\n");
86printf("<input type='text' name='seq' size='10' maxlength='10' value='%s'>\n", $seq);
87printf("<input type='text' name='type2' size='10' maxlength='10' value='%s'>\n", $type2);
88printf("<input type='text' name='tabnum' size='2' maxlenght='2' value='%s'>\n", $tabnum);
89printf("<input type='submit' value='Show Plot'><br>\n");
90if (!empty($seq))
91{
92 printf("<input type='submit' value='<< %d Prev Plot' name='prev'>\n", $prev);
93 printf("%s \n", $plot);
94 printf("<input type='submit' value='Next Plot %d >>' name='next'>\n", $next);
95}
96printf("</td>\n</tr>\n<tr>\n<td align='center'>\n");
97if (!empty($seq))
98 printf("<img src='%s'>", $plot);
99else
100 printf("You have to select a sequence.");
101printf("</td>\n</tr>\n</table>\n");
102printf("</form>\n");
103printf("</body>\n");
104printf("</html>\n");
105
106?>
Note: See TracBrowser for help on using the repository browser.