Index: /trunk/ippMonitor/raw/czartool_labels.php
===================================================================
--- /trunk/ippMonitor/raw/czartool_labels.php	(revision 29071)
+++ /trunk/ippMonitor/raw/czartool_labels.php	(revision 29072)
@@ -39,5 +39,7 @@
 if ($selectedStage == "") { $selectedStage = "all_stages"; }
 
-echo "<p  align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a></p>";
+$nsStatus = getNightlyScienceStatus($czardb);
+echo "<p  align=\"center\"> Current status of the IPP as of $lastUpdateTime (faults are shown in parentheses). <br>Documentation can be found <a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/Processing\">here</a> and cluster load monitored <a href=\"http://ganglia.pan-starrs.ifa.hawaii.edu/?r=hour&s=descending&c=IPP%2520Production\">here</a><br>Current nightly science status: $nsStatus</p>";
+
 
 // deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later
@@ -366,4 +368,21 @@
 ###########################################################################
 #
+# Returns current nightly science status 
+#
+###########################################################################
+function getNightlyScienceStatus($db) {
+
+    $sql = "SELECT status FROM nightlyscience";
+    if ($debug) {echo "$sql<br>";}
+
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+    $qry->fetchInto($row);
+
+    return $row[0];
+}
+
+###########################################################################
+#
 # Returns whether this stage is reverting or not
 #
