Changeset 15404
- Timestamp:
- 04/21/13 02:02:30 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/dch/lightcurves.php
r15313 r15404 1 <html> 2 <head> 3 <meta name="Author" content="Daniela Dorner" /> 4 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 5 <title>QLA</title> 6 <link rel="StyleSheet" type="text/css" href="../style.css" /> 7 </head> 1 8 <?php 2 9 3 echo (file_get_contents("header.html")); 10 //echo (file_get_contents("header.html")); 11 12 include ("dates.php"); 4 13 5 14 if (!empty($_GET["bin"])) … … 7 16 else 8 17 $bin="1nights"; 9 $path="../lightcurves/".$_GET["source"]."/lightcurve".$bin;18 //$path="../lightcurves/".$_GET["source"]."/lightcurve".$bin; 10 19 11 20 $sources=array( … … 18 27 19 28 $ranges=array( 20 "005min" => " 5 min", 21 "010min" => "10 min", 22 "020min" => "20 min", 23 "040min" => "40 min", 24 "080min" => "80 min", 25 "160min" => "160 min", 26 "320min" => "320 min", 27 "0001nights" => "1 night", 28 "0002nights" => "2 nights", 29 "0004nights" => "4 nights", 30 "0008nights" => "8 nights", 31 "0016nights" => "16 nights", 29 "5min" => " 5 min", 30 "10min" => "10 min", 31 "20min" => "20 min", 32 "30min" => "30 min", 33 "40min" => "40 min", 34 "60min" => "60 min", 35 "80min" => "80 min", 36 "120min" => "120 min", 37 "180min" => "180 min", 38 "240min" => "240 min", 39 "300min" => "300 min", 40 // "0001nights" => "1 night", 41 // "0002nights" => "2 nights", 42 // "0004nights" => "4 nights", 43 // "0008nights" => "8 nights", 44 // "0016nights" => "16 nights", 32 45 ); 33 46 34 echo "<body>"; 35 echo "<form action='lightcurves.php' METHOD='GET'>\n"; 36 echo "<input type='submit' value='Show'> excess rates for "; 37 echo "source <select name='source' size='1'>"; 47 echo "<body>\n"; 48 echo "<form name='formular' action='lightcurves.php' METHOD='GET'>\n"; 49 echo "<input type='submit' value='Show'> result of Quick-Look-Analysis for "; 50 51 echo "source <select name='source' size='1'>\n"; 38 52 foreach ($sources as $key => $name) 39 53 { 40 54 if ($_GET["source"] == $key) 41 printf("<option value='%s' selected>%s</option> ", $key, $name);55 printf("<option value='%s' selected>%s</option>\n", $key, $name); 42 56 else 43 printf("<option value='%s'>%s</option> ", $key, $name);57 printf("<option value='%s'>%s</option>\n", $key, $name); 44 58 } 45 echo "</select> ";46 echo " for <select name='bin' size='1'> ";59 echo "</select>\n"; 60 echo " for <select name='bin' size='1'>\n"; 47 61 foreach ($ranges as $range => $name) 48 62 { 49 63 if ($_GET["bin"] == $range) 50 printf("<option value='%s' selected>%s</option> ", $range, $name);64 printf("<option value='%s' selected>%s</option>\n", $range, $name); 51 65 else 52 printf("<option value='%s'>%s</option> ", $range, $name);66 printf("<option value='%s'>%s</option>\n", $range, $name); 53 67 } 54 echo "</select>"; 55 echo "</form>"; 68 echo "</select>\n<br>\n"; 56 69 57 $numplots=7; 70 $date=GetDates($_GET["date"], "lightcurves"); 71 $date2=date("Ymd", strtotime($date)); 72 $path="../lightcurves/".date("Y/m/d", strtotime($date)); 58 73 59 if (file_exists($path."/lc.root")) 74 echo "</form>\n"; 75 76 $numplots=8; 77 78 $filename="lightcurve".$_GET["source"]."_".$_GET["bin"]."_all.root"; 79 $filename2="lightcurve".$_GET["source"]."_".$_GET["bin"]."_week.root"; 80 $filename3="lightcurve".$_GET["source"]."_".$_GET["bin"]."_".$date2.".root"; 81 $rootfile=$path."/".$filename2; 82 //echo $filename; 83 if (file_exists($rootfile)) 60 84 { 61 85 printf("<a href='%s'>more files</a>", $path); 62 86 echo "<table>"; 87 printf("<tr><th>Night %s</th><th>Last Week</th><th>All Nights</th></tr>\n", $date); 63 88 for ($i=1; $i<$numplots+1; $i++) 64 89 { 65 90 if (strpos($_GET["bin"], "night")) 66 printf("<tr><td><img src='%s/ lc.root-%d.png' alt='%d'></td></tr>", $path, $i, $i);91 printf("<tr><td><img src='%s/%s-%d.png' alt='%d'></td></tr>", $path, $filename, $i, $i); 67 92 else 68 printf("<tr><td><img src='%s/lc.root-%d.png' alt='%d'></td><td><img src='%s/lc.root-%d.png' alt='%d'></td></tr>", $path, $i, $i, $path, $i+$numplots, $i+$numplots); 93 { 94 printf("<tr>\n"); 95 printf("<td><img src='%s/%s-%d.png' alt='%d'></td>\n", $path, $filename3, $i, $i); 96 printf("<td><img src='%s/%s-%d.png' alt='%d'></td>\n", $path, $filename2, $i, $i); 97 printf("<td><img src='%s/%s-%d.png' alt='%d'></td>\n", $path, $filename, $i, $i); 98 printf("</tr>\n"); 99 } 69 100 } 70 101 echo "</table>"; 71 102 } 72 103 else 73 echo "<br> No files yet for " . $sources[$_GET["source"]] . " with " . $ranges[$_GET["bin"]].". <br>";104 echo "<br> No files available for " . $sources[$_GET["source"]] . " with " . $ranges[$_GET["bin"]]. " for night ".$date.". <br>"; 74 105 75 106 echo "</body>";
Note:
See TracChangeset
for help on using the changeset viewer.