Index: /trunk/ippMonitor/raw/czartool_labels.php
===================================================================
--- /trunk/ippMonitor/raw/czartool_labels.php	(revision 30391)
+++ /trunk/ippMonitor/raw/czartool_labels.php	(revision 30392)
@@ -66,5 +66,4 @@
 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<br>Use <a href=\"$link\"> $plotTypeLink</a> plots <br/><a href=\"http://ipp004.ifa.hawaii.edu/clusterMonitor/top.html\">Who uses the cluster?</a><br><a href=\"http://ipp004.ifa.hawaii.edu/ippMetrics\">IPP Metrics</a><br/><a href=\"http://svn.pan-starrs.ifa.hawaii.edu/trac/ipp/wiki/PS1_IPP_CzarLogs\">Czar log pages</a><br><a href=\"czartool_exposures.php?pass=$pass&proj=$proj\">Exposure summary</a></p>";
 
-
 // deal with reverts: turn on or off if requested and pass current revert state for this stage onto labels table later
 if ($selectedRevertStage && $selectedRevertMode) turnRevertsOnOff($czardb, $selectedRevertStage, $selectedRevertMode);
@@ -182,5 +181,5 @@
             echo "<td> \n";
               $today = date("Y-m-d");
-              showSummitData($gpc1db, $today);
+              createSummitDataTable($gpc1db, $today);
             echo "</td>\n";
           echo "</tr>\n";
@@ -189,6 +188,21 @@
     echo "</tr>\n";
 
-
     # 4th row
+    echo "<tr>\n";
+      echo "<td> \n";
+        echo "<table>\n";
+          echo "<tr valign=top>\n";
+            echo "<td> \n";
+              if ($selectedServer && !$serverCmd) showServerStatus($selectedServer);
+            echo "</td>\n";
+            echo "<td>\n";
+              createDatesTable($czardb);
+            echo "</td>\n";
+          echo "</tr>\n";
+        echo "</table>\n";
+      echo "</td> \n";
+    echo "</tr>\n";
+
+    # 5th row
     echo "<tr>\n";
       echo "<td>\n";
@@ -206,4 +220,5 @@
                 showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1);
                 showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS);
+
               echo "</table>";
             echo "</td>\n";
@@ -213,20 +228,4 @@
     echo "</tr>\n";
 
-    # 5th row
-    echo "<tr>\n";
-      echo "<td> \n";
-        echo "<table>\n";
-          echo "<tr valign=top>\n";
-            echo "<td> \n";
-              # server output
-              if ($selectedServer && !$serverCmd) showServerStatus($selectedServer);
-            echo "</td>\n";
-            echo "<td>\n";
-            echo "</td>\n";
-          echo "</tr>\n";
-        echo "</table>\n";
-      echo "</td> \n";
-    echo "</tr>\n";
-
   echo "</table>\n";
 
@@ -236,8 +235,8 @@
 ###########################################################################
 #
-# Checks summitExp table agains rawExp table 
-#
-###########################################################################
-function showSummitData($gpc1db, $date) {
+# Creates a table of summitExp against rawExp
+#
+###########################################################################
+function createSummitDataTable($gpc1db, $date) {
 
     $sql = "SELECT DISTINCT exp_type FROM summitExp WHERE dateobs > '$date'";
@@ -590,4 +589,57 @@
 ###########################################################################
 #
+# Populates a tables with the current dates listed in the server_dates table 
+#
+###########################################################################
+function createDatesTable($db) {
+
+    $class = "list";
+    echo "<table class=$class>\n";
+    echo "<tr><td></td>\n";
+    write_header_cell($class, "Server");
+    write_header_cell($class, "Dates");
+    echo "</tr>\n";
+
+    createServerDateRow($db, "stdscience");
+    createServerDateRow($db, "registration");
+
+    echo "</table>\n";
+}
+
+
+###########################################################################
+#
+# Checks the status of all the pantasks servers 
+#
+###########################################################################
+function createServerDateRow($db, $server) {
+
+    $sql = "SELECT date FROM server_dates WHERE server LIKE '$server' ORDER BY date";
+    if ($debug) {echo "$sql<br>";}
+
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+    $dates = ""; 
+    $firstIn = true;
+    while ($qry->fetchInto($row)) {
+
+        if ($firstIn) {
+
+            $dates = $row[0];
+            $firstIn = false;
+        }
+        else $dates = $dates . ", " . $row[0];
+    }
+
+    $class = "list";
+    echo "<tr><td></td>\n";
+    write_table_cell($class, '%s', "", $server);
+    write_table_cell($class, '%s', "", $dates);
+    echo "</tr>\n";
+
+}
+
+###########################################################################
+#
 # Checks the status of all the pantasks servers 
 #
@@ -633,6 +685,6 @@
             ."&plottype=".$plotType;
 
-        $link = ""; # TODO removed links temporarily
-            write_table_cell($class, '%s', $link, $server);
+        #$link = ""; # TODO removed links temporarily
+        write_table_cell($class, '%s', $link, $server);
         write_table_cell($class, '%s', "", $alive ? "yes" : "NO");
 
