Changeset 8598 for trunk/MagicSoft/Mars/datacenter/db/showplots-ds.php
- Timestamp:
- 06/23/07 18:48:19 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/showplots-ds.php
r8533 r8598 4 4 5 5 include("plotinclude.php"); 6 //print header 6 7 printf("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">\n"); 7 8 printf("<html>\n<head>\n"); … … 12 13 printf("<body>\n"); 13 14 15 //init 14 16 $ds=0; 15 17 if (!empty($_GET["ds"])) … … 33 35 $numseq=0; 34 36 37 //check if dataset file is existing 35 38 if (!empty($ds)) 36 39 { 37 40 $num=sprintf("%08d",$ds); 38 41 $num2=substr($num,0,5); 39 $datasetfile="http://datacenter.astro.uni-wuerzburg.de/datasets/" . $num2 . "/dataset" . $num . ".txt"; 42 $datasetfile="../datasets/" . $num2 . "/dataset" . $num . ".txt"; 43 if (!file_exists($datasetfile)) 44 { 45 printf("Sorry, there's no file for dataset %s available.", $ds); 46 //set dataset and sequence numbers to 0 for next checks 47 $ds=0; 48 $seq=0; 49 } 50 } 51 52 //in case of a valid dataset 53 if (!empty($ds)) 54 { 55 //get sequences from dataset file 56 // alternative: query it from db 40 57 $dataset=file_get_contents($datasetfile); 41 58 $onpos=strpos($dataset, "SequencesOn:"); … … 53 70 if ($seq!=0 && !in_array($seq, $sequences)) 54 71 $seq=0; 72 73 //get next, current and previous sequence 55 74 foreach($sequences as $key => $sequ) 56 75 { … … 72 91 } 73 92 $numseq=count($sequences); 93 94 //in case a dataset consists of less than 3 sequences 74 95 if ($numseq==2) 75 96 $nextseq=$prevseq; 76 97 } 77 98 99 //get link for plot 78 100 $type=gettypename($type2); 79 101 $plot=getplotname($seq, $tabnum, $type, $type2); 80 102 103 //print form for choosing dataset and plots 81 104 printf("<form action='showplots-ds.php' method='GET'>\n"); 82 105 printf("<table width='100%%' border='0'>\n"); 83 printf("<tr><td align='center'>\n"); 106 printf("<tr><td valign='top'>\n"); 107 printf("<a href='http://db.astro.uni-wuerzburg.de'>home</a>\n</td><td align='center'>"); 84 108 if (!empty($prevseq)) 85 109 printf("%d ", $prevseq); … … 87 111 printf("<input type='submit' value='<< Prev Plot' name='prev'>\n"); 88 112 printf("<input type='text' name='ds' size='5' maxlength='5' value='%s'>\n", $ds); 89 printf("<input type='text' name='type2' size='6' maxlength='6' value='%s'>\n",$type2);113 PrintType2PullDown($type2); 90 114 printf("<input type='text' name='tabnum' size='2' maxlenght='2' value='%s'>\n", $tabnum); 91 115 printf("<input type='hidden' name='prevseq' size='2' maxlenght='2' value='%s'>\n", $prevseq); … … 104 128 print(" ] \n"); 105 129 } 106 printf("</td>\n</tr>\n<tr>\n<td align='center'>\n"); 130 printf("</td><td align='right'>\n"); 131 printf("<input class='Width' type='button' value='Reset' onClick='self.location.href=\"showplots-ds.php\"'>\n"); 132 printf("</td>\n</tr>\n<tr>\n<td align='center' colspan='3'>\n"); 107 133 if (!empty($seq)) 108 134 { … … 114 140 } 115 141 else 116 printf("You have to insert a dataset number in the first field.");142 printf("You have to insert a dataset number into the first field."); 117 143 printf("</td>\n</tr>\n</table>\n"); 118 144 printf("</form>\n");
Note:
See TracChangeset
for help on using the changeset viewer.