Changeset 7578 for trunk/MagicSoft/Mars/datacenter/db/sequence.php
- Timestamp:
- 03/08/06 04:26:20 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/datacenter/db/sequence.php
r7546 r7578 52 52 $query0 .= " LEFT JOIN Star ON Sequences.fSequenceFirst=Star.fSequenceFirst "; 53 53 54 $query0 .= " WHERE Sequences.fSequenceFirst between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ; 54 55 if (!empty($_GET["fRunMin"]) && !empty($_GET["fRunMax"])) 56 $query0 .= " WHERE Sequences.fSequenceFirst between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ; 55 57 if (!empty($_GET["fSequenceNo"])) 56 $query0 .= " AND Sequences.fSequenceFirst='" . $_GET["fSequenceNo"] . "'"; 57 $query0 .= " AND fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" "; 58 { 59 if (strpos($query0, " WHERE ")==FALSE) 60 $query0 .= " WHERE "; 61 else 62 $query0 .= " AND "; 63 $query0 .= " Sequences.fSequenceFirst='" . $_GET["fSequenceNo"] . "'"; 64 } 65 if (!empty($_GET["fSourceN"])) 66 { 67 if (strpos($query0, " WHERE ")==FALSE) 68 $query0 .= " WHERE "; 69 else 70 $query0 .= " AND "; 71 $query0 .= " fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" "; 72 } 58 73 $query0 .= " ORDER BY Sequences.fSequenceFirst "; 59 74 … … 198 213 199 214 200 function PrintSequenceInfo($result0, $db_id, $db )215 function PrintSequenceInfo($result0, $db_id, $db, $calibtabs, $signaltabs, $startabs) 201 216 { 202 217 $numres = mysql_num_rows($result0); … … 211 226 { 212 227 $firstrun=mysql_result($result0, $i, 0); 228 $num=sprintf("%08d",$firstrun); 229 $num2=substr($num,0,4); 213 230 $lastrun=mysql_result($result0, $i, 1); 214 231 $source=mysql_result($result0, $i, 2); … … 270 287 printf(" <table BORDER=\"1\">"); 271 288 printf(" <tr BGCOLOR='#C0C0C0'>\n"); 272 printf(" <th> <u>Sequence#:</u> %s </th>", $firstrun);289 printf(" <th>Sequence#: <a href=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/%s/sequence%s.txt\">%s</a> </th>", $num2, $num, $firstrun); 273 290 printf(" </tr><tr BGCOLOR='#D0D0D0' ALIGN='left'>\n"); 274 291 printf(" <th> %s, %s, zd: %s°-%s°, %.2fmin ", … … 460 477 printf(" </tr>"); 461 478 printf(" </table>"); 479 480 printf("</td></tr><tr><td>"); 462 481 } 482 483 484 printf(" <table BORDER=\"1\">"); 485 printf(" <tr BGCOLOR='#C0C0C0'>"); 486 printf(" <th>plots</th>\n"); 487 printf(" <tr><td>calib: "); 488 foreach($calibtabs as $key => $element) 489 if (!$key==0) 490 printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/%s/%s/calib%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element); 491 printf("</td></tr>"); 492 printf(" <tr><td>signal: "); 493 foreach($signaltabs as $key => $element) 494 if (!$key==0) 495 printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/callisto/%s/%s/signal%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element); 496 printf("</td></tr>"); 497 printf(" <tr><td>star: "); 498 foreach($startabs as $key => $element) 499 if (!$key==0) 500 printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/star/%s/%s/star%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element); 501 printf("</td></tr>"); 502 503 printf(" </tr>"); 504 printf(" </table>"); 463 505 464 506 printf(" <table BORDER=\"1\">"); … … 510 552 } 511 553 512 function PrintPage($html, $host, $user, $pw, $db )554 function PrintPage($html, $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs) 513 555 { 514 556 $db_id = mysql_connect($host, $user, $pw); … … 527 569 { 528 570 if ($html=="1" || $html=="2") 529 PrintSequenceInfo($result0, $db_id, $db );571 PrintSequenceInfo($result0, $db_id, $db, $calibtabs, $signaltabs, $startabs); 530 572 else 531 573 PrintText($result0); … … 541 583 include ("include.php"); 542 584 include ("db.php"); 585 include ("tabs.php"); 543 586 544 587 ini_set("display_errors", "On"); … … 550 593 header("Content-Disposition: attachment; filename=query-result.txt"); 551 594 552 PrintPage("0", $host, $user, $pw, $db );595 PrintPage("0", $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs); 553 596 } 554 597 else … … 567 610 { 568 611 if (empty($_GET["fPrintTable"])) 569 PrintPage("1", $host, $user, $pw, $db );612 PrintPage("1", $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs); 570 613 else 571 PrintPage("2", $host, $user, $pw, $db );614 PrintPage("2", $host, $user, $pw, $db, $calibtabs, $signaltabs, $startabs); 572 615 } 573 616
Note:
See TracChangeset
for help on using the changeset viewer.