Index: trunk/ippMonitor/Makefile.in
===================================================================
--- trunk/ippMonitor/Makefile.in	(revision 28494)
+++ trunk/ippMonitor/Makefile.in	(revision 28496)
@@ -52,4 +52,5 @@
 $(DESTWWW)/czartool_labels.php \
 $(DESTWWW)/czartool_servers.php \
+$(DESTWWW)/czartool_summit.php \
 $(DESTWWW)/histogram.php \
 $(DESTWWW)/show_and_delete_image.php \
Index: trunk/ippMonitor/raw/czartool_summit.php
===================================================================
--- trunk/ippMonitor/raw/czartool_summit.php	(revision 28496)
+++ trunk/ippMonitor/raw/czartool_summit.php	(revision 28496)
@@ -0,0 +1,108 @@
+<?php
+include 'ipp.php';
+include 'site.php';
+
+$ID = checkID ();
+
+// require an explicit project
+if (! $ID['proj']) { projectform ($ID); }
+
+$db = dbconnect($ID['proj']);
+
+if ($ID['menu']) {$myMenu = $ID['menu'];}
+else {$myMenu = "ipp.czartool.dat";}
+
+menu($myMenu, 'Czartool', 'ipp.css', $ID['link'], $ID['proj']);
+
+$pass = $ID['pass'];
+$proj = $ID['proj'];
+$menu = $ID['menu'];
+
+$userSelection = $_GET[selection];
+
+if ($userSelection == "") {$userSelection = $_POST['state'];}
+if ($userSelection == "") {$userSelection = "new";}
+
+$debug = 0;
+
+$PATH = getenv("PATH");
+putenv("PATH=$BINDIR:$PATH");
+
+$LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
+putenv("LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH");
+
+
+$today = date("Y-m-d");                         // 03.10.01
+showSummitData($today);
+//showSummitData("2009-10-01");
+
+// set up the form
+echo "<form action=\"czartool_summit.php\" method=\"POST\">\n";
+echo "<input type=\"hidden\" name=\"pass\" value=\"$pass\">\n";
+echo "<input type=\"hidden\" name=\"proj\" value=\"$proj\">\n";
+echo "<input type=\"hidden\" name=\"menu\" value=\"$menu\">\n";
+echo "</form>\n";
+
+menu_end();
+
+
+###########################################################################
+#
+# Checks summitExp table agains rawExp table 
+#
+###########################################################################
+function showSummitData($date) {
+
+    echo "<p> Status of data since $date </p>";
+
+    $db = dbconnect($ID['proj']);
+
+    $sql = "SELECT DISTINCT exp_type FROM summitExp WHERE dateobs > '$date'";
+
+    $qry = $db->query($sql);
+    if (dberror($qry)) {
+        echo "<b>error reading newExp table</b><br>\n";
+        echo "<br><small><b> table query : $sql </b></small><br>\n";
+        menu_end();
+    }
+
+    // set up the table
+    echo "<table class=list>\n";
+    echo "<tr><td></td>\n";
+    write_header_cell ("list", "Exposure type");
+    write_header_cell ("list", "At summit");
+    write_header_cell ("list", "Registered at MHPCC");
+
+    $msg = "No science images taken since $date";
+
+    // list the results
+    while ($qry->fetchInto($expType)) {
+
+        $sql = "SELECT COUNT(*) FROM summitExp WHERE dateobs > '$date' AND exp_type = '$expType[0]'";
+        $qry2 = $db->query($sql);
+        $qry2->fetchInto($summit);
+        $sql = "SELECT COUNT(*) FROM summitExp JOIN rawExp ON summitExp.exp_name = rawExp.exp_name WHERE summitExp.dateobs > '$date' AND summitExp.exp_type = '$expType[0]'";
+        $qry2 = $db->query($sql);
+        $qry2->fetchInto($mhpcc);
+
+        $class = "list";
+        echo "<tr><td></td>\n";
+        
+        if ($expType[0] == "OBJECT") {
+            if ($summit[0] == $mhpcc[0]) $msg = "All science exposures taken since $date have been registered at MHPCC";  
+            else $msg = "Warning: Not all science exposures taken since $date have been registered at MHPCC";
+        }
+
+        write_table_cell ($class, '%s', "", $expType[0]);
+        write_table_cell ($class, '%d', "", $summit[0]);
+        write_table_cell ($class, '%d', $link, $mhpcc[0]);
+        echo "</tr>\n";
+    }
+
+    echo "</table>\n";
+
+    echo "<p> $msg </p>";
+
+}
+
+
Index: trunk/ippMonitor/raw/ipp.czartool.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.czartool.dat	(revision 28494)
+++ trunk/ippMonitor/raw/ipp.czartool.dat	(revision 28496)
@@ -2,4 +2,5 @@
 
 menutop   | menutop      | plain   | &nbsp;                       | 
+menulink  | menuselect 	 | link    | Last night's data         	  | czartool_summit.php  
 menulink  | menuselect 	 | link    | Check labels             	  | czartool_labels.php  
 menulink  | menuselect 	 | link    | Check servers             	  | czartool_servers.php                         
