Index: /trunk/ippMonitor/raw/czartool_labels.php
===================================================================
--- /trunk/ippMonitor/raw/czartool_labels.php	(revision 39803)
+++ /trunk/ippMonitor/raw/czartool_labels.php	(revision 39804)
@@ -80,8 +80,9 @@
 
 $servers=array(
-        "addstar",
-        "addstarlap",
+        #"addstar",
+        #"addstarlap",
+	"ippqub:stdscience_ws",
         "cleanup",
-        "detrend",
+        #"detrend",
         "distribution",
         "pstamp",
@@ -270,10 +271,10 @@
       createTableColumnHeader("Status (sec behind master)");
       showReplicationsStatus($REPL_HOST_GPC1, $REPL_USER_GPC1, $REPL_PASSWORD_GPC1, $REPL_DBNAME_GPC1);
-
+      showReplicationsStatus($REPL_HOST_NEBULOUS_SECONDARY, $REPL_USER_NEBULOUS_SECONDARY, $REPL_PASSWORD_NEBULOUS_SECONDARY, $REPL_DBNAME_NEBULOUS_SECONDARY);
       # XXX EAM : problem showReplicationsStatus($REPL_HOST_NEBULOUS, $REPL_USER_NEBULOUS, $REPL_PASSWORD_NEBULOUS, $REPL_DBNAME_NEBULOUS);
       showReplicationsStatus($REPL_HOST_PSTAMP, $REPL_USER_PSTAMP, $REPL_PASSWORD_PSTAMP, $REPL_DBNAME_PSTAMP);
       showReplicationsStatus($REPL_HOST_IPPADMIN, $REPL_USER_IPPADMIN, $REPL_PASSWORD_IPPADMIN, $REPL_DBNAME_IPPADMIN);
       showReplicationsStatus($REPL_HOST_ISP, $REPL_USER_ISP, $REPL_PASSWORD_ISP, $REPL_DBNAME_ISP);
-      showReplicationsStatus($REPL_HOST_NEBULOUS_SECONDARY, $REPL_USER_NEBULOUS_SECONDARY, $REPL_PASSWORD_NEBULOUS_SECONDARY, $REPL_DBNAME_NEBULOUS_SECONDARY);
+##      showReplicationsStatus($REPL_HOST_NEBULOUS_SECONDARY, $REPL_USER_NEBULOUS_SECONDARY, $REPL_PASSWORD_NEBULOUS_SECONDARY, $REPL_DBNAME_NEBULOUS_SECONDARY);
       echo "</table>";
 
@@ -313,5 +314,5 @@
 
     // list the results
-    while (dbFetchInto($qry, $row)) {
+    while ($qry->fetchInto($row)) {
 
         echo "<tr>";
@@ -358,12 +359,12 @@
 
     // list the results
-    while (dbFetchInto($qry, $expType)) {
+    while ($qry->fetchInto($expType)) {
 
         $sql = "SELECT COUNT(*) FROM summitExp WHERE dateobs > '$date' AND exp_type = '$expType[0]'";
         $qry2 = $projectdb->query($sql);
-      dbFetchInto($qry2, $summit);
+        $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 = $projectdb->query($sql);
-      dbFetchInto($qry2, $mhpcc);
+        $qry2->fetchInto($mhpcc);
 
         echo "<tr>";
@@ -397,5 +398,5 @@
     $qry = $db->query($sql);
     if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
-    while (dbFetchInto($qry, $row)) {
+    while ($qry->fetchInto($row)) {
 
         $labels[] = $row[0];
@@ -621,5 +622,5 @@
     $qry = $db->query($sql);
     if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
-    dbFetchInto($qry, $row);
+    $qry->fetchInto($row);
 
     return $row[0];
@@ -655,5 +656,5 @@
     $qry = $db->query($sql);
     if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
-    dbFetchInto($qry, $row);
+    $qry->fetchInto($row);
 
     return $row[0];
@@ -673,5 +674,5 @@
     $qry = $db->query($sql);
     if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
-    dbFetchInto($qry, $row);
+    $qry->fetchInto($row);
 
     $pending = $row[0];
@@ -730,5 +731,5 @@
     $dates = ""; 
     $firstIn = true;
-    while (dbFetchInto($qry, $row)) {
+    while ($qry->fetchInto($row)) {
 
         if ($firstIn) {
@@ -887,5 +888,5 @@
     $qry = $db->query($sql);
     if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
-    dbFetchInto($qry, $row);
+    $qry->fetchInto($row);
 
     $alive = $row[0];
@@ -906,5 +907,5 @@
     $qry = $db->query($sql);
     if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
-    dbFetchInto($qry, $row);
+    $qry->fetchInto($row);
 
     return $row[0];
@@ -947,9 +948,13 @@
     }
     $res = $dbRepl->query('SHOW SLAVE STATUS');
-    while (dbFetchInto($res, $row)) {
+    while ($res->fetchInto($row)) {
         # Have a look for Last_Errno in http://dev.mysql.com/doc/refman/5.0/en/show-slave-status.html
         $errorStatusInMySql = $row[18];
 	$sec_behind = $row[32];
-        $replStatus = ($errorStatusInMySql==0?"OK ($sec_behind)":"<font color=\"red\">PROBLEM</font>");
+	if ($sec_behind===NULL) {
+	    $sec_behind = 99999999;
+	    $errorStatusInMySql = 999999999;
+	}   
+        $replStatus = ($errorStatusInMySql==0?"OK ($sec_behind)":"<font style=\"BACKGROUND-COLOR: yellow\"  color=\"red\">PROBLEM</font>");
         echo "<tr><td>$replDatabaseName</td><td>$replStatus</td></tr>";
         if ($errorStatusInMySql!=0) {
