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

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