Index: /trunk/www/dch/lightcurves.php
===================================================================
--- /trunk/www/dch/lightcurves.php	(revision 15313)
+++ /trunk/www/dch/lightcurves.php	(revision 15313)
@@ -0,0 +1,77 @@
+<?php
+
+echo (file_get_contents("header.html"));
+
+if (!empty($_GET["bin"]))
+    $bin=$_GET["bin"];
+else
+    $bin="1nights";
+$path="../lightcurves/".$_GET["source"]."/lightcurve".$bin;
+
+$sources=array(
+               "1"  => "Mrk421",
+               "2"  => "Mrk501",
+               "5"  => "Crab",
+               "7"  => "1ES 1959+650",
+               "11" => "IC 310",
+               );
+
+$ranges=array(
+              "005min" => " 5 min",
+              "010min" => "10 min",
+              "020min" => "20 min",
+              "040min" => "40 min",
+              "080min" => "80 min",
+              "160min" => "160 min",
+              "320min" => "320 min",
+              "0001nights" => "1 night",
+              "0002nights" => "2 nights",
+              "0004nights" => "4 nights",
+              "0008nights" => "8 nights",
+              "0016nights" => "16 nights",
+              );
+
+echo "<body>";
+echo "<form action='lightcurves.php' METHOD='GET'>\n";
+echo "<input type='submit' value='Show'> excess rates for ";
+echo "source <select name='source' size='1'>";
+foreach ($sources as $key => $name)
+{
+    if ($_GET["source"] == $key)
+        printf("<option value='%s' selected>%s</option>", $key, $name);
+    else
+        printf("<option value='%s'>%s</option>", $key, $name);
+}
+echo "</select>";
+echo " for <select name='bin' size='1'>";
+foreach ($ranges as $range => $name)
+{
+    if ($_GET["bin"] == $range)
+        printf("<option value='%s' selected>%s</option>", $range, $name);
+    else
+        printf("<option value='%s'>%s</option>", $range, $name);
+}
+echo "</select>";
+echo "</form>";
+
+$numplots=7;
+
+if (file_exists($path."/lc.root"))
+{
+    printf("<a href='%s'>more files</a>", $path);
+    echo "<table>";
+    for ($i=1; $i<$numplots+1; $i++)
+    {
+        if (strpos($_GET["bin"], "night"))
+            printf("<tr><td><img src='%s/lc.root-%d.png' alt='%d'></td></tr>", $path, $i, $i);
+        else
+            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);
+    }
+    echo "</table>";
+}
+else
+    echo "<br> No files yet for " . $sources[$_GET["source"]] . " with " . $ranges[$_GET["bin"]]. ". <br>";
+
+echo "</body>";
+echo "</html>";
+?>
