Changeset 7578
- Timestamp:
- 03/08/06 04:26:20 (19 years ago)
- Location:
- trunk/MagicSoft/Mars
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/Changelog
r7577 r7578 18 18 19 19 -*-*- END OF LINE -*-*- 20 2006/03/0 6Daniela Dorner20 2006/03/08 Daniela Dorner 21 21 22 22 * datacenter/script/movingrawfiles: 23 23 - added moving of files, that are transferred via internet 24 24 - added removing of empty directories 25 26 * datacenter/db/ganymed.php: 27 - added links to ganymedplots 28 - added links to sequence.php (instead of links to starfiles) 29 - fixed bug in query 30 31 * datacenter/db/sequence.php: 32 - added links to plots from callisto and star 33 - fixed bug in query 34 35 * datacenter/db/sequinfo.php: 36 - added links to sequence.php 37 38 * datacenter/db/datasetinfo.php: 39 - added links to ganymed.php 40 41 * datacenter/db/tabs.php: 42 - added (includefile for names of tabs of statusdisplays) 43 25 44 26 45 -
trunk/MagicSoft/Mars/datacenter/db/datasetinfo.php
r7556 r7578 42 42 { 43 43 $query0 .= ", CONCAT('<A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/datasets/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/dataset', LPAD(CONCAT(DataSets.fDataSetNumber , '.txt'), 12,'0') , '\">f</A>' "; 44 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>')"; 44 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/' , LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'),5), '/', LEFT(LPAD(CONCAT(DataSets.fDataSetNumber, '.'), 9,'0'), 8), '\">g</A>'"; 45 $query0 .= ", ' <A&ws;HREF=\"ganymed.php?fDataSetNo=', DataSets.fDataSetNumber, '\">i</A>') "; 45 46 $query0 .= " as 'Links'"; 46 47 } -
trunk/MagicSoft/Mars/datacenter/db/ganymed.php
r7571 r7578 20 20 $query0 .= " LEFT JOIN Ganymed ON DataSets.fDataSetNumber=Ganymed.fDataSetNumber "; 21 21 22 $query0 .= " WHERE DataSets.fDataSetNumber between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ; 22 if (!empty($_GET["fRunMin"]) && !empty($_GET["fRunMax"])) 23 $query0 .= " WHERE DataSets.fDataSetNumber between " . $_GET["fRunMin"] . " and " . $_GET["fRunMax"] ; 23 24 if (!empty($_GET["fDataSetNo"])) 24 $query0 .= " AND DataSets.fDataSetNumber='" . $_GET["fDataSetNo"] . "'"; 25 $query0 .= " AND fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" "; 25 { 26 if (strpos($query0, " WHERE ")==FALSE) 27 $query0 .= " WHERE "; 28 else 29 $query0 .= " AND "; 30 $query0 .= " DataSets.fDataSetNumber='" . $_GET["fDataSetNo"] . "'"; 31 } 32 if (!empty($_GET["fSourceN"])) 33 { 34 if (strpos($query0, " WHERE ")==FALSE) 35 $query0 .= " WHERE "; 36 else 37 $query0 .= " AND "; 38 $query0 .= " fSourceName REGEXP \"^" . $_GET["fSourceN"] . "\" "; 39 } 26 40 $query0 .= " ORDER BY DataSets.fDataSetNumber "; 27 41 … … 117 131 return "there is an error -> tell Dani"; 118 132 } 119 /* 120 function GetSequences($datasetfile) 121 // function QueryRuns($type, $sequ, $db_id, $db) 122 { 123 printf(" <td align='left'>"); 124 printf(" to be done"); 125 printf(" </td>\n"); 126 printf(" <td> to be done "); 127 printf(" </td>\n"); 128 } 129 130 function QueryMissingFiles($sequ, $db_id, $db) 131 { 132 $query2 = "SELECT fSequenceFirst FROM SequencesSequenceProcessStatus "; 133 $query2 .= " WHERE fSequenceFirst=" . $sequ . " AND IsNull(fStar)"; 134 135 mysql_select_db($db); 136 $files = mysql_query($query2, $db_id); 137 $numfiles = mysql_num_rows($files); 138 printf(" <td align='left'>"); 139 for ($i=0 ; $i<$numfiles ; $i++) 140 { 141 $file=mysql_result($files, $i, 0); 142 if ($i!=0) 143 printf(", "); 144 printf(" %s ", $file); 145 } 146 printf(" </td>\n"); 147 } 148 */ 149 150 function PrintDataSetInfo($result0) 133 134 function PrintDataSetInfo($result0, $ganymedtabs) 151 135 { 152 136 $numres = mysql_num_rows($result0); … … 234 218 $sequences=split(" ", trim($sequon)); 235 219 foreach($sequences as $key => $sequ) 236 { 237 $sequno=sprintf("%08d",$sequ); 238 $sequno2=substr($sequno,0,4); 239 printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/star/%s/%s/\">%s</a> ", 240 $sequno2, $sequno, $sequ); 241 } 220 printf("<a href=\"sequence.php?fSequenceNo=%s&fAll=On\">%s</a> ", $sequ, $sequ); 242 221 printf("</td></tr>"); 243 222 … … 247 226 $sequences=split(" ", trim($sequoff)); 248 227 foreach($sequences as $key => $sequ) 249 { 250 $sequno=sprintf("%08d",$sequ); 251 $sequno2=substr($sequno,0,4); 252 printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/star/%s/%s/\">%s</a> ", 253 $sequno2, $sequno, $sequ); 254 } 228 printf("<a href=\"sequence.php?fSequenceNo=%s&fAll=On\">%s</a> ", $sequ, $sequ); 229 printf("</td></tr>"); 255 230 } 256 231 } 257 232 } 233 printf("<tr><td colspan=\"6\">\n Plots: "); 234 foreach($ganymedtabs as $key => $element) 235 if (!$key==0) 236 printf("<a href=\"http://www.astro.uni-wuerzburg.de/datacenter/ganymed/%s/%s/ganymed%s-tab%s.png\">%s</a> ", $num2, $num, $num, $key, $element); 237 238 printf("</td></tr>"); 258 239 259 240 if ($_GET["fAll"]=="On" && !is_null($ganymed)) … … 276 257 } 277 258 278 function PrintPage($html, $host, $user, $pw, $db )259 function PrintPage($html, $host, $user, $pw, $db, $ganymedtabs) 279 260 { 280 261 $db_id = mysql_connect($host, $user, $pw); … … 293 274 { 294 275 if ($html=="1" || $html=="2") 295 PrintDataSetInfo($result0 );276 PrintDataSetInfo($result0, $ganymedtabs); 296 277 else 297 278 PrintText($result0); … … 307 288 include ("include.php"); 308 289 include ("db.php"); 290 include ("tabs.php"); 309 291 310 292 ini_set("display_errors", "On"); … … 316 298 header("Content-Disposition: attachment; filename=query-result.txt"); 317 299 318 PrintPage("0", $host, $user, $pw, $db );300 PrintPage("0", $host, $user, $pw, $db, $ganymedtabs); 319 301 } 320 302 else … … 333 315 { 334 316 if (empty($_GET["fPrintTable"])) 335 PrintPage("1", $host, $user, $pw, $db );336 else 337 PrintPage("2", $host, $user, $pw, $db );317 PrintPage("1", $host, $user, $pw, $db, $ganymedtabs); 318 else 319 PrintPage("2", $host, $user, $pw, $db, $ganymedtabs); 338 320 } 339 321 -
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 -
trunk/MagicSoft/Mars/datacenter/db/sequinfo.php
r7556 r7578 56 56 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), 'star', LPAD(CONCAT(Sequences.fSequenceFirst , '.html'), 13,'0') , '\">sl</A>'"; 57 57 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/star/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/', LPAD(CONCAT(Sequences.fSequenceFirst, '/'), 9,'0'), '\">s</A>'"; 58 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>') "; 58 $query0 .= ", ' <A&ws;HREF=\"http://www.astro.uni-wuerzburg.de/datacenter/sequences/' , LEFT(LPAD(CONCAT(Sequences.fSequenceFirst, '.'), 9,'0'),4), '/sequence', LPAD(CONCAT(Sequences.fSequenceFirst , '.txt'), 12,'0') , '\">', 'f </A>' "; 59 $query0 .= ", ' <A&ws;HREF=\"sequence.php?fSequenceNo=', Sequences.fSequenceFirst , '&fAll=On\">i</A>') "; 59 60 $query0 .= " as 'Links'"; 60 61 }
Note:
See TracChangeset
for help on using the changeset viewer.