\n"); printf("\n\n"); printf("\n"); printf("show plots\n"); printf("\n"); printf("\n"); printf("\n"); $ds=0; if (!empty($_GET["ds"])) $ds=$_GET["ds"]; $tabnum=1; if (!empty($_GET["tabnum"])) $tabnum=$_GET["tabnum"]; $type2="calib"; if (!empty($_GET["type2"])) $type2=$_GET["type2"]; $plot=""; $nextseq=0; $prevseq=0; $seq=0; if (!empty($_GET["prevseq"]) && !empty($_GET["prev"])) $seq=$_GET["prevseq"]; if (!empty($_GET["nextseq"]) && !empty($_GET["next"])) $seq=$_GET["nextseq"]; $next=0; $prev=0; $numseq=0; if (!empty($ds)) { $num=sprintf("%08d",$ds); $num2=substr($num,0,5); $datasetfile="http://datacenter.astro.uni-wuerzburg.de/datasets/" . $num2 . "/dataset" . $num . ".txt"; $dataset=file_get_contents($datasetfile); $onpos=strpos($dataset, "SequencesOn:"); $offpos=strpos($dataset, "SequencesOff:"); $possource=strpos($dataset, "SourceName:"); $sequoff=""; if (!empty($offpos)) $sequoff=substr($dataset, $offpos+13, $possource-($offpos+13)); if (empty($offpos)) $offpos=$possource; $sequon=substr($dataset, $onpos+12, $offpos-($onpos+12)); $sequences=split(" ", trim($sequon)); if ($seq!=0 && !in_array($seq, $sequences)) $seq=0; foreach($sequences as $key => $sequ) { if ($seq==0) $seq=$sequ; if ($next==1) { $nextseq=$sequ; if ($prevseq!=0) break; $next=0; } if ($sequ==$seq) { $next=1; continue; } $prevseq=$sequ; } $numseq=count($sequences); if ($numseq==2) $nextseq=$prevseq; } $type=gettypename($type2); $plot=getplotname($seq, $tabnum, $type, $type2); printf("
\n"); printf("\n"); printf("\n\n\n\n\n
\n"); if (!empty($prevseq)) printf("%d  ", $prevseq); if ($numseq>1) printf("\n"); printf("\n", $ds); printf("\n", $type2); printf("\n", $tabnum); printf("\n", $prevseq); printf("\n", $nextseq); if ($numseq>1) printf("\n"); else printf("\n"); if (!empty($nextseq)) printf(" %d ", $nextseq); if ($numseq>0) { printf("  [ %d sequence", $numseq); if ($numseq>1) printf("s"); print(" ] \n"); } printf("
\n"); if (!empty($seq)) printf("%s ", $plot, $plot); else printf("You have to insert a dataset number in the first field."); printf("
\n"); printf("
\n"); printf("\n"); printf("\n"); ini_set("display_errors", "Off"); ?>