| 1 | <?php
|
|---|
| 2 |
|
|---|
| 3 | include("plotinclude.php");
|
|---|
| 4 |
|
|---|
| 5 | printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n");
|
|---|
| 6 | printf("<html>\n<head>\n");
|
|---|
| 7 | printf("<meta http-equiv='content-type' content='text/html; charset=ISO-8859-1'>\n");
|
|---|
| 8 | printf("<title>show plots</title>\n");
|
|---|
| 9 | printf("<link rel='stylesheet' type='text/css' href='lamouette.css'>\n");
|
|---|
| 10 | printf("</head>\n");
|
|---|
| 11 | printf("<body>\n");
|
|---|
| 12 |
|
|---|
| 13 | $seq=0;
|
|---|
| 14 | if (!empty($_GET["seq"]))
|
|---|
| 15 | $seq=$_GET["seq"];
|
|---|
| 16 | $tabnum=1;
|
|---|
| 17 | if (!empty($_GET["tabnum"]))
|
|---|
| 18 | $tabnum=$_GET["tabnum"];
|
|---|
| 19 | $type2="calib";
|
|---|
| 20 | if (!empty($_GET["type2"]))
|
|---|
| 21 | $type2=$_GET["type2"];
|
|---|
| 22 | $next=0;
|
|---|
| 23 | $prev=0;
|
|---|
| 24 |
|
|---|
| 25 | if (!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 | }
|
|---|
| 76 | printf("<form action='showplots.php' method='GET'>\n");
|
|---|
| 77 | printf("<table width='100%%' border='0'>\n");
|
|---|
| 78 | printf("<tr><td align='center'>\n");
|
|---|
| 79 | printf("<input type='text' name='seq' size='10' maxlength='10' value='%s'>\n", $seq);
|
|---|
| 80 | printf("<input type='text' name='type2' size='10' maxlength='10' value='%s'>\n", $type2);
|
|---|
| 81 | printf("<input type='text' name='tabnum' size='2' maxlenght='2' value='%s'>\n", $tabnum);
|
|---|
| 82 | printf("<input type='submit' value='Show Plot'><br>\n");
|
|---|
| 83 | if (!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 | }
|
|---|
| 89 | printf("</td>\n</tr>\n<tr>\n<td align='center'>\n");
|
|---|
| 90 | if (!empty($seq))
|
|---|
| 91 | printf("<img src='%s'>", $plot);
|
|---|
| 92 | else
|
|---|
| 93 | printf("You have to select a sequence.");
|
|---|
| 94 | printf("</td>\n</tr>\n</table>\n");
|
|---|
| 95 | printf("</form>\n");
|
|---|
| 96 | printf("</body>\n");
|
|---|
| 97 | printf("</html>\n");
|
|---|
| 98 |
|
|---|
| 99 | ?>
|
|---|