Index: branches/czw_branch/20101203/ippMonitor/Makefile.in
===================================================================
--- branches/czw_branch/20101203/ippMonitor/Makefile.in	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/Makefile.in	(revision 30586)
@@ -43,4 +43,6 @@
 $(DESTWWW)/ipp.stack.dat \
 $(DESTWWW)/ipp.stack.php \
+$(DESTWWW)/ipp.dvodb.dat \
+$(DESTWWW)/ipp.dvodb.php \
 $(DESTWWW)/phptest.php \
 $(DESTWWW)/site.php \
@@ -55,7 +57,9 @@
 $(DESTWWW)/czartool_labels.php \
 $(DESTWWW)/czartool_getplot.php \
+$(DESTWWW)/czartool_exposures.php \
 $(DESTWWW)/histogram.php \
 $(DESTWWW)/show_and_delete_image.php \
 $(DESTWWW)/scatterPlot.php \
+$(DESTWWW)/rawBurntoolState.php \
 $(DESTWWW)/plotHistogram.php \
 $(DESTWWW)/columns_in_db.php \
@@ -64,5 +68,8 @@
 $(DESTWWW)/warpProcessedExp.php \
 $(DESTWWW)/diskUsage.php \
-$(DESTWWW)/version.php
+$(DESTWWW)/version.php 
+
+
+
 
 DEFSRC = \
@@ -210,5 +217,12 @@
 $(DESTWWW)/exposureStatus.php \
 $(DESTWWW)/mopsStatus.php \
-$(DESTWWW)/gpc1MysqlProcessList.php
+$(DESTWWW)/gpc1MysqlProcessList.php \
+$(DESTWWW)/minidvodbRun.php \
+$(DESTWWW)/minidvodbCopy.php \
+$(DESTWWW)/minidvodbProcessed.php \
+$(DESTWWW)/addRunRun.php \
+$(DESTWWW)/addRunProcessed.php
+
+
 
 PICTURES = \
Index: branches/czw_branch/20101203/ippMonitor/def/addRunProcessed.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/addRunProcessed.d	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/def/addRunProcessed.d	(revision 30586)
@@ -0,0 +1,31 @@
+TABLE addRun, addProcessedExp
+TITLE Processed addRuns
+FILE  addRunProcessed.php
+MENU  ipp.dvodb.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+
+WHERE addRun.add_id = addProcessedExp.add_id
+
+#     field                   size  format  name         show    link to                  extras
+FIELD distinct(addRun.add_id),        5, %d,     add ID
+
+FIELD addRun.cam_id,          5, %d,     cam ID
+FIELD addRun.state,        5, %s,     state
+FIELD addProcessedExp.fault,        5, %d,     fault
+FIELD addProcessedExp.dtime_addstar,        5, %d,     addstar time
+
+FIELD addProcessedExp.path_base,        5, %s,     pathbase
+FIELD addRun.reduction,        5, %s,     reduction
+FIELD addRun.label,        5, %s,     label
+FIELD addRun.data_group,        5, %s,     data_group
+FIELD addRun.dvodb,        5, %s,     dvodb
+FIELD addProcessedExp.dvodb_path,        5, %s,     dvodb_path
+
+FIELD addRun.note,        5, %s,     note
+FIELD addRun.image_only,        5, %d,   image_only
+FIELD addRun.minidvodb,        5, %d,     minidvodb
+FIELD addRun.minidvodb_group,        5, %s,     minidvodb_group
+FIELD addRun.minidvodb_name,        5, %s,     minidvodb_name
+
+
Index: branches/czw_branch/20101203/ippMonitor/def/addRunRun.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/addRunRun.d	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/def/addRunRun.d	(revision 30586)
@@ -0,0 +1,27 @@
+TABLE addRun
+TITLE addRuns
+FILE  addRunRun.php
+MENU  ipp.dvodb.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+
+WHERE add_id >= 0
+
+#     field                   size  format  name         show    link to                  extras
+FIELD distinct(addRun.add_id),        5, %d,     add ID
+
+FIELD addRun.cam_id,          5, %d,     cam ID
+FIELD addRun.add_id,        5, %d,     add ID
+FIELD addRun.state,        5, %s,     state
+FIELD addRun.workdir,        5, %s,     workdir
+FIELD addRun.reduction,        5, %s,     reduction
+FIELD addRun.label,        5, %s,     label
+FIELD addRun.data_group,        5, %s,     data_group
+FIELD addRun.dvodb,        5, %s,     dvodb
+FIELD addRun.note,        5, %s,     note
+FIELD addRun.image_only,        5, %d,   image_only
+FIELD addRun.minidvodb,        5, %d,     minidvodb
+FIELD addRun.minidvodb_group,        5, %s,     minidvodb_group
+FIELD addRun.minidvodb_name,        5, %s,     minidvodb_name
+
+
Index: branches/czw_branch/20101203/ippMonitor/def/diffProcessedSkyfile_Images.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/diffProcessedSkyfile_Images.d	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/def/diffProcessedSkyfile_Images.d	(revision 30586)
@@ -11,4 +11,7 @@
 # IMAGE VAR basename filerule camera class_id
 IMAGE JPEG2 $diffSkyfile.path_base PPSUB.OUTPUT.JPEG2 GPC1 NONE
+
+# if no query restrictions are supplied, we want to limit the query or it is extremely long running:
+UNRESTRICTED AND diffRun.diff_id = 0
 
 # XXX need to get camera from lookup
Index: branches/czw_branch/20101203/ippMonitor/def/magicProcessedMasks_Images.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/magicProcessedMasks_Images.d	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/def/magicProcessedMasks_Images.d	(revision 30586)
@@ -11,5 +11,6 @@
 ARGS  ARG7 magicRun.magic_id=$magicRun.magic_id
 ARGS  ARG7 camera=GPC1
-ARGS  ARG7 basename=$magicRun.workdir/$magicRun.exp_id/$magicRun.exp_id.mgc.$magicRun.magic_id.verify/$magicRun.exp_id
+#ARGS  ARG7 basename=$magicRun.workdir/$magicRun.exp_id/$magicRun.exp_id.mgc.$magicRun.magic_id.verify/$magicRun.exp_id
+ARGS  ARG7 basename=$magicMask.path_base
 
 #        field                   size  format  name           show     link to         extras
@@ -25,4 +26,5 @@
 FIELD    magicMask.fault,	 5,   %d,     Fault
 FIELD    magicRun.workdir, 	 5,   %s,     Label, none
+FIELD    magicMask.path_base, 	 5,   %s,     Label, none
 
 TAIL PHP insert_image ('MAGIC.ORIGINAL.PNG', 'width=49%');
Index: branches/czw_branch/20101203/ippMonitor/def/minidvodbCopy.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/minidvodbCopy.d	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/def/minidvodbCopy.d	(revision 30586)
@@ -0,0 +1,19 @@
+TABLE minidvodbCopy 
+TITLE Minidvodb Copies
+FILE  minidvodbCopy.php
+MENU  ipp.dvodb.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+
+WHERE minidvodbcopy_id >= 0
+
+#     field                   size  format  name         show    link to                  extras
+FIELD distinct(minidvodbCopy.minidvodbcopy_id),        5, %d,     Minidvodb Copy ID
+FIELD minidvodbCopy.minidvodb_id,        5, %d,     Minidvodb ID
+FIELD minidvodbCopy.minidvodb_rsync_path,          25, %s,     rsync path
+FIELD minidvodbCopy.destination_host,       5, %s,     destinatin host
+FIELD minidvodbCopy.fault,    5, %s,     Fault
+FIELD minidvodbCopy.state,          5, %s,     State
+FIELD minidvodbCopy.epoch,          5, %T,    Epoch
+FIELD minidvodbCopy.dtime,        5, %d,     dtime
+
Index: branches/czw_branch/20101203/ippMonitor/def/minidvodbProcessed.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/minidvodbProcessed.d	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/def/minidvodbProcessed.d	(revision 30586)
@@ -0,0 +1,23 @@
+TABLE minidvodbRun, minidvodbProcessed 
+TITLE Processed minidvodbs
+FILE  minidvodbProcessed.php
+MENU  ipp.dvodb.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+
+WHERE minidvodbRun.minidvodb_id = minidvodbProcessed.minidvodb_id
+
+#     field                   size  format  name         show    link to                  extras
+FIELD distinct(minidvodbRun.minidvodb_id),        5, %d,     Minidvodb ID
+
+FIELD minidvodbRun.minidvodb_name,          5, %s,     minidvodb_name
+FIELD minidvodbRun.minidvodb_group,       5, %s,     minidvodb_group
+FIELD minidvodbProcessed.merge_order,        5, %d,     Merge Order
+FIELD minidvodbProcessed.dtime_resort,        5, %d,     resort time
+FIELD minidvodbProcessed.dtime_relphot,        5, %d,     relphot time
+FIELD minidvodbProcessed.dtime_merge,        5, %d,     dvomerge time
+FIELD minidvodbProcessed.mergedvodb_path,          25, %s,     mergedvodb_path
+FIELD state,          5, %s,    State
+FIELD minidvodbProcessed.fault,        5, %d,     Fault
+FIELD epoch,        5, %T,     epoch
+
Index: branches/czw_branch/20101203/ippMonitor/def/minidvodbRun.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/minidvodbRun.d	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/def/minidvodbRun.d	(revision 30586)
@@ -0,0 +1,18 @@
+TABLE minidvodbRun 
+TITLE minidvodb Runs
+FILE  minidvodbRun.php
+MENU  ipp.dvodb.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+
+WHERE minidvodb_id >= 0
+
+#     field                   size  format  name         show    link to                  extras
+FIELD distinct(minidvodbRun.minidvodb_id),        5, %d,     Minidvodb ID
+FIELD minidvodbRun.minidvodb_name,          5, %s,     minidvodb_name
+FIELD minidvodbRun.minidvodb_group,       5, %s,     minidvodb_group
+FIELD minidvodbRun.minidvodb_path,    25, %s,     minidvodb_path
+FIELD minidvodbRun.mergedvodb_path,          25, %s,     mergedvodb_path
+FIELD state,          5, %s,    State
+FIELD creation_date,        5, %T,     epoch
+
Index: branches/czw_branch/20101203/ippMonitor/def/mopsStatus.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/mopsStatus.d	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/def/mopsStatus.d	(revision 30586)
@@ -1,3 +1,3 @@
-TABLE rawExp LEFT JOIN chipRun using(exp_id) LEFT JOIN camRun using(chip_id) LEFT JOIN fakeRun using(cam_id) LEFT JOIN warpRun using(fake_id) LEFT JOIN diffInputSkyfile AS diffInput ON diffInput.warp1 = warp_id LEFT JOIN diffRun AS diffInputRun ON diffInput.diff_id = diffInputRun.diff_id LEFT JOIN diffInputSkyfile AS diffTemplate ON diffTemplate.warp2 = warp_id LEFT JOIN diffRun AS diffTemplateRun ON diffTemplate.diff_id = diffTemplateRun.diff_id LEFT JOIN publishRun ON stage_id=diffInput.diff_id
+TABLE rawExp LEFT JOIN chipRun using(exp_id) LEFT JOIN camRun using(chip_id) LEFT JOIN fakeRun using(cam_id) LEFT JOIN warpRun using(fake_id) LEFT JOIN diffInputSkyfile AS diffInput ON diffInput.warp1 = warp_id LEFT JOIN diffRun AS diffInputRun ON diffInput.diff_id = diffInputRun.diff_id LEFT JOIN diffInputSkyfile AS diffTemplate ON diffTemplate.warp2 = warp_id LEFT JOIN diffRun AS diffTemplateRun ON diffTemplate.diff_id = diffTemplateRun.diff_id LEFT JOIN publishRun ON stage_id=diffInput.diff_id AND (client_id=1 OR client_id=5) LEFT JOIN publishRun AS pubRun2 ON pubRun2.stage_id=diffTemplate.diff_id AND (pubRun2.client_id=1 OR pubRun2.client_id=5) LEFT JOIN magicDSRun ON magicDSRun.magic_ds_id=camRun.magicked
 TITLE MOPS Status
 FILE mopsStatus.php
@@ -10,14 +10,15 @@
 OP OP1 ($row[8]>$row[9]?$row[8]. "(1)":($row[9]!=0?$row[9]. "(2)":"0"))
 # $diffInput.diff_id+$diffTemplate.diff_id
-OP OP2 $row[8]+$row[9]
-#  "[".$diffInput.diff_id."]:[".$tdiff_id."]"
+# PUB ID
+OP OP2 ($row[12]>$row[13]?$row[12]. "(I)":($row[13]!=0?$row[13]. "(T)":"0"))
+#($row[13]>$row[14])
 
 #     field                    width format  name          show         link to                   extras
-FIELD dateobs, 		       15,   %T,     Date Obs
+FIELD dateobs, 		       13,   %T,     Date Obs
 FIELD exp_name, 	       5,    %s,     Exp Name
 FIELD rawExp.exp_id, 	       5,    %d,     Exp ID
 FIELD chipRun.data_group,      5,    %s,     Data grp
 FIELD chip_id, 		       5,    %d,     Chip ID (Stage 1)
-FIELD cam_id, 		       5,    %d,     Cam ID (Stage 2)
+FIELD camRun.cam_id AS camID, 		       5,    %d,     Cam ID (Stage 2)
 FIELD fake_id, 		       5,    %d,     Fake ID (Stage 3)
 FIELD warp_id, 		       5,    %d,     Warp ID (Stage 4)
@@ -25,13 +26,16 @@
 FIELD diffTemplate.diff_id AS tdiff_id,    5,    %d,     tdiff_id, none
 FIELD *,		       5,    %s,     Diff ID (Stage 5),		op=OP1
-#FIELD *,		       5,    %d,     Diff ID (Stage 5),		op=OP2
-FIELD camRun.magicked, 	       5,    %d,     Cam Magicked (Stage 6)
-FIELD publishRun.pub_id,       5,    %d,     Pub ID (Stage 7)
+FIELD camRun.magicked, 	       5,    %d,     Magick ID (Stage 6)
+FIELD magicDSRun.magic_ds_id,       5,    %d, DestreakID (Stage 7)
+FIELD publishRun.pub_id AS pubId1,       5,    %d,     pubId1, none
+FIELD pubRun2.pub_id AS pubId2,       5,    %d,     pubId2, none
+FIELD *,	     		10, %s, Pub ID, op=OP2
 FIELD filter, 		       5,    %s,     Filter
 FIELD object, 		       15,    %s,     Object
+FIELD obs_mode, 	       5,    %s,     Obs Mode
 FIELD comment, 		       40,    %s,     Comment
 
-FIELD diffInput.diff_id AS ddiffId,       5,    %s,     ddiffId,	none
-FIELD diffTemplate.diff_id AS tdiffId,    5,    %s,     tdiffId, 	none
+#FIELD diffInput.diff_id AS ddiffId,       5,    %s,     ddiffId,	none
+#FIELD diffTemplate.diff_id AS tdiffId,    5,    %s,     tdiffId, 	none
 
 MODE summary
Index: branches/czw_branch/20101203/ippMonitor/def/rawBurntoolState.d
===================================================================
--- branches/czw_branch/20101203/ippMonitor/def/rawBurntoolState.d	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/def/rawBurntoolState.d	(revision 30586)
@@ -0,0 +1,19 @@
+TABLE rawImfile
+TITLE Burntool States
+FILE  rawBurntoolState.php
+MENU  ipp.load.dat
+
+#        field        size format  name           show          link to   extras
+FIELD    exp_id,      	      5,  %d,     Exp ID,        value
+FIELD    exp_name,    	     10,  %s,     Exp Name
+FIELD    dateobs,            19, %T,      Date/Time
+FIELD    exp_type,            8,  %s,     Type    
+FIELD    obs_mode,            8, %s,     obs mode
+FIELD    burntool_state,     10,  %s,     Burntool State
+FIELD    fault,               5,  %d,     Fault
+FIELD    count(exp_id) as n,  7,  %d,     count
+
+MODE  summary
+GROUP exp_id
+GROUP burntool_state
+GROUP fault
Index: branches/czw_branch/20101203/ippMonitor/raw/czartool_exposures.php
===================================================================
--- branches/czw_branch/20101203/ippMonitor/raw/czartool_exposures.php	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/raw/czartool_exposures.php	(revision 30586)
@@ -0,0 +1,541 @@
+<?php
+include 'ipp.php';
+include 'site.php';
+
+$ID = checkID();
+
+if (! $ID['proj']) { projectform ($ID); }
+$gpc1db = dbconnect($ID['proj']);
+
+$PATH = getenv("PATH");
+putenv("PATH=$BINDIR:$PATH");
+
+$LD_LIBRARY_PATH = getenv("LD_LIBRARY_PATH");
+putenv("LD_LIBRARY_PATH=$LIBDIR:$LD_LIBRARY_PATH");
+
+if ($ID['menu']) {$myMenu = $ID['menu'];}
+else {$myMenu = "ipp.imfiles.dat";}
+
+menu($myMenu, 'Czartool on '.$lastUpdateTime, 'ipp.css', $ID['link'], $ID['proj']);
+
+$pass = $ID['pass'];
+$proj = $ID['proj'];
+$menu = $ID['menu'];
+
+$today = date("Y-m-d");
+
+echo "</p>";
+echo "<p  align=\"center\"> Current status of all exposures taken $today UTC </p>"; 
+
+createTableForThisSurvey($gpc1db, $today, "");
+
+menu_end();
+
+###########################################################################
+#
+# Generates a table for the provided survey 
+#
+###########################################################################
+function createTableForThisSurvey($db, $date, $surveyStr) {
+
+    $conditions = "FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id) 
+        LEFT JOIN warpImfile USING (warp_id) 
+        WHERE dateobs LIKE '$date%'
+        AND comment NOT LIKE '%calcite%'
+        AND comment NOT LIKE '%focus%'
+        AND comment NOT LIKE '%pointing%'
+        AND comment NOT LIKE '%stare%'
+        AND comment LIKE '%$surveyStr%'
+        AND exp_type = 'OBJECT'";
+
+    $sql = "SELECT COUNT(DISTINCT exp_id) " . $conditions;
+
+    $qry = $db->query($sql);
+    $qry->fetchInto($count);
+
+    if ($surveyStr == "") $surveyText = "all surveys"; 
+    else $surveyText = "$surveyStr survey";
+
+    echo "<p  align=\"center\"> Found " . $count[0] . " exposures for $surveyText </p>";
+
+    $chipDist = array(); getChipDist($db, $date, $surveyStr, &$chipDist);
+    $camDist = array(); getCamDist($db, $date, $surveyStr, &$camDist);
+    $warpDist = array(); getWarpDist($db, $date, $surveyStr, &$warpDist);
+    $stackDist = array(); getStackDist($db, $date, $surveyStr, &$stackDist);
+    $stack_hash = array(); getStackProduced($db, $date, $surveyStr, &$stack_hash);
+
+    $wsDiffProduced = array();
+    $ww1DiffProduced = array();
+    getWSDiffDist($db, $date, $surveyStr, &$wsDiffProduced, &$ww1DiffProduced);
+
+    $wsDiffDist = array();
+    $ww1DiffDist = array();
+    getWSAndWW1DiffDist($db, $date, $surveyStr, &$wsDiffDist, &$ww1DiffDist, $wsDiffProduced);
+
+    $ww2DiffDist = array(); getWW2DiffDist($db, $date, $surveyStr, &$ww2DiffDist);
+    $ssDiffDist = array(); getSSDiffDist($db, $date, $surveyStr, &$ssDiffDist);
+
+    $ww2DiffProduced = array(); getWW2DiffProduced($db, $date, $surveyStr, &$ww2DiffProduced);
+    $ssDiffProduced = array(); getSSDiffProduced($db, $date, $surveyStr, &$ssDiffProduced); 
+
+    $class = "list";
+    echo "<table class=$class >\n";
+    echo "<tr><td></td>\n";
+    write_header_cell($class, "");
+    write_header_cell($class, "");
+    write_header_cell($class, "");
+    write_header_cell($class, "");
+    write_header_cell($class, "Raw");
+    write_header_cell($class, "Chip");
+    write_header_cell($class, "Camera");
+    write_header_cell($class, "Warp");
+    write_header_cell($class, "Stack");
+    write_header_cell($class, "Warp-Stack Diff");
+    write_header_cell($class, "Warp-Warp1 Diff");
+    write_header_cell($class, "Warp-Warp2 Diff");
+    write_header_cell($class, "Stack-Stack Diff");
+    echo "<tr><td></td>\n";
+    write_header_cell($class, "Exp ID");
+    write_header_cell($class, "Exp Name");
+    write_header_cell($class, "Filter");
+    write_header_cell($class, "Comment");
+    write_header_cell($class, "state");
+    write_header_cell($class, "state/dist?");
+    write_header_cell($class, "state/dist?");
+    write_header_cell($class, "state/dist?");
+    write_header_cell($class, "total/dist");
+    write_header_cell($class, "total/dist");
+    write_header_cell($class, "total/dist");
+    write_header_cell($class, "total/dist");
+    write_header_cell($class, "total/dist");
+
+    $sql = 
+        "SELECT
+        exp_id,
+        exp_name, 
+        filter, 
+        comment, 
+        rawExp.state, 
+        chipRun.state, 
+        camRun.state, 
+        warpRun.state, 
+        COUNT(skycell_id) 
+            $conditions 
+            GROUP BY exp_name;"; 
+            //echo "$sql<br>";
+
+            if ($debug) {echo "$sql<br>";}
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n"; return;}
+
+    // loop through results in order to make html table
+    while ($qry->fetchInto($row)) {
+
+        $exp_id = $row[0];
+        $exp_name = $row[1];
+        $filter = preg_replace("/([a-z]{1})\.[0-9]+/", "$1", $row[2]);
+        $comment = $row[3];
+        $rawExp = $row[4];
+        $chipState = $row[5];
+        $camState = $row[6];
+        $warpState = $row[7];
+
+        echo "<tr><td></td>\n";
+
+        // chip
+        if (!$chipDist[$exp_id]) $chipDistStr = "N";
+        else $chipDistStr = $chipDist[$exp_id];
+
+        // cam
+        if (!$camDist[$exp_id]) $camDistStr = "N";
+        else $camDistStr = $camDist[$exp_id];
+
+        // warp
+        if (!$warpDist[$exp_id]) $warpDistStr = "N";
+        else $warpDistStr = $warpDist[$exp_id];
+
+        // stack
+        if (!$stack_hash[$exp_id] && !$stackDist[$exp_id]) $stackDistStr = "";
+        else $stackDistStr = $stack_hash[$exp_id] . "/" . $stackDist[$exp_id];
+
+        // WS diff
+        if (!$wsDiffProduced[$exp_id] && !$wsDiffDist[$exp_id]) $wsDistStr = "";
+        else $wsDistStr = $wsDiffProduced[$exp_id] . "/" . $wsDiffDist[$exp_id];
+
+        // WW1 diff
+        if (!$ww1DiffProduced[$exp_id] && !$ww1DiffDist[$exp_id]) $ww1DistStr = "";
+        else $ww1DistStr = $ww1DiffProduced[$exp_id] . "/" . $ww1DiffDist[$exp_id];
+
+        // WW2 dist
+        if (!$ww2DiffProduced[$exp_id] && !$ww2DiffDist[$exp_id]) $ww2DistStr = "";
+        else $ww2DistStr =  $ww2DiffProduced[$exp_id] . "/" . $ww2DiffDist[$exp_id];
+
+        // SS dist
+        if (!$ssDiffProduced[$exp_id] && !$ssDiffDist[$exp_id]) $ssDistStr = "";
+        else $ssDistStr = $ssDiffProduced[$exp_id] . "/" . $ssDiffDist[$exp_id];
+
+        write_table_cell($class, '%s', "", $exp_id);
+        write_table_cell($class, '%s', "", $exp_name);
+        write_table_cell($class, '%s', "", $filter);
+        write_table_cell($class, '%s', "", $comment);
+        write_table_cell($class, '%s', "", $rawExp);
+        write_table_cell($class, '%s', "", "$chipState/$chipDistStr");
+        write_table_cell($class, '%s', "", "$camState/$camDistStr");
+        write_table_cell($class, '%s', "", "$warpState/$warpDistStr");
+        write_table_cell($class, '%s', "", $stackDistStr);
+        write_table_cell($class, '%s', "", $wsDistStr);
+        write_table_cell($class, '%s', "", $ww1DistStr);
+        write_table_cell($class, '%s', "", $ww2DistStr);
+        write_table_cell($class, '%s', "", $ssDistStr);
+
+        echo "</tr>\n";
+    }
+
+    echo "</table>\n";
+}
+
+
+###########################################################################
+#
+# Gets count of chips distributed 
+#
+###########################################################################
+function getChipDist($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(stage_id) 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN distRun ON chip_id = stage_id 
+        AND stage = 'chip' 
+        WHERE dateobs like '$date%' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id;
+    ";
+
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = "Y";
+        else $hash[$row[0]] = "N";
+    }
+}
+
+###########################################################################
+#
+# Gets count of cams distributed
+#
+###########################################################################
+function getCamDist($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(stage_id) 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN distRun ON cam_id = stage_id 
+        WHERE dateobs like '$date%' 
+        AND stage = 'camera' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id;
+    ";
+
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = "Y";
+        else $hash[$row[0]] = "N";
+    }
+}
+
+###########################################################################
+#
+# Gets count of warps distributed
+#
+###########################################################################
+function getWarpDist($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(stage_id) 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id)
+        LEFT JOIN distRun ON warp_id = stage_id 
+        WHERE dateobs like '$date%' 
+        AND stage = 'warp' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id;
+    ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = "Y";
+        else $hash[$row[0]] = "N";
+    }
+}
+
+###########################################################################
+#
+# Gets count of stacks distributed
+#
+###########################################################################
+function getStackDist($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(stage_id) 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id) 
+        LEFT JOIN stackInputSkyfile USING (warp_id) 
+        LEFT JOIN distRun ON stack_id = stage_id 
+        WHERE dateobs like '$date%' 
+        AND stage = 'stack' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id;
+    ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = $row[2];
+    }
+}
+
+###########################################################################
+#
+# Gets count of stacks produced
+#
+###########################################################################
+function getStackProduced($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(stack_id) 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id) 
+        LEFT JOIN stackInputSkyfile USING (warp_id) 
+        LEFT JOIN stackRun USING (stack_id) 
+        WHERE dateobs like '$date%' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id;
+    ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = $row[2];
+    }
+}
+
+###########################################################################
+#
+# Gets count of WS and WW1 diffs distributed
+#
+###########################################################################
+function getWSAndWW1DiffDist($db, $date, $surveyStr, $hash1, $hash2, $wsDiffProduced) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(diff_id), stack1 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id) 
+        LEFT JOIN diffInputSkyfile ON warp_id = warp1 
+        LEFT JOIN distRun ON stage_id = diff_id AND stage = 'diff' 
+        WHERE dateobs like '$date%' 
+        AND exp_type = 'OBJECT' GROUP BY exp_id;
+    ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) {
+
+            if ($wsDiffProduced[$row[0]] != null)
+                $hash1[$row[0]] = $row[2];
+            else 
+                $hash2[$row[0]] = $row[2];
+        }
+    }
+}
+
+###########################################################################
+#
+# Gets count of WW2 diffs distributed
+#
+###########################################################################
+function getWW2DiffDist($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(diff_id) 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id) 
+        LEFT JOIN diffInputSkyfile ON warp_id = warp2 
+        LEFT JOIN distRun ON stage_id = diff_id AND stage = 'diff' 
+        WHERE dateobs like '$date%' 
+        AND comment LIKE '%$surveyStr%'
+        AND exp_type = 'OBJECT' 
+        GROUP BY exp_id
+        ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = $row[2];
+    }
+}
+
+###########################################################################
+#
+# Gets count of SS diffs distributed
+#
+###########################################################################
+function getSSDiffDist($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(diff_id) 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id) 
+        LEFT JOIN stackInputSkyfile USING (warp_id) 
+        LEFT JOIN diffInputSkyfile ON stack_id = stack1 
+        LEFT JOIN distRun ON stage_id = diff_id AND stage = 'diff' 
+        WHERE dateobs like '$date%' 
+        AND exp_type = 'OBJECT'
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id;
+    ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = $row[2];
+    }
+}
+
+###########################################################################
+#
+# Gets count of WW2 diffs produced
+#
+###########################################################################
+function getWW2DiffProduced($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT rawExp.exp_id, COUNT(warp2), diff_mode 
+        FROM rawExp, chipRun, camRun, fakeRun, warpRun, diffInputSkyfile, diffRun  
+        WHERE rawExp.exp_id = chipRun.exp_id 
+        AND chipRun.chip_id = camRun.chip_id 
+        AND camRun.cam_id = fakeRun.cam_id 
+        AND fakeRun.fake_id = warpRun.fake_id 
+        AND diffInputSkyfile.warp2 = warpRun.warp_id 
+        AND diffInputSkyfile.diff_id = diffRun.diff_id 
+        AND dateobs like '$date%' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id, diff_mode
+        ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        $hash[$row[0]] = $row[1];
+    }
+}
+
+###########################################################################
+#
+# Gets count of SS diffs produced
+#
+###########################################################################
+function getSSDiffProduced($db, $date, $surveyStr, $hash) {
+
+    $sql = "
+        SELECT exp_id, rawExp.state, COUNT(stack1), diff_mode 
+        FROM rawExp 
+        LEFT JOIN chipRun USING (exp_id) 
+        LEFT JOIN camRun USING (chip_id) 
+        LEFT JOIN fakeRun USING (cam_id) 
+        LEFT JOIN warpRun USING (fake_id) 
+        LEFT JOIN stackInputSkyfile USING (warp_id) 
+        LEFT JOIN diffInputSkyfile ON stack_id = stack1 
+        LEFT JOIN diffRun USING (diff_id) 
+        WHERE dateobs like '$date%' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id, diff_mode;
+    ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] > 0) $hash[$row[0]] = $row[2];
+    }
+}
+
+###########################################################################
+#
+# Gets count of WS diffs distributed
+#
+###########################################################################
+function getWSDiffDist($db, $date, $surveyStr, $hash1, $hash2) {
+
+    $sql = "
+        SELECT rawExp.exp_id, COUNT(warp1), diff_mode 
+        FROM rawExp, chipRun, camRun, fakeRun, warpRun, diffInputSkyfile, diffRun  
+        WHERE rawExp.exp_id = chipRun.exp_id 
+        AND chipRun.chip_id = camRun.chip_id 
+        AND camRun.cam_id = fakeRun.cam_id 
+        AND fakeRun.fake_id = warpRun.fake_id 
+        AND diffInputSkyfile.warp1 = warpRun.warp_id 
+        AND diffInputSkyfile.diff_id = diffRun.diff_id 
+        AND dateobs like '$date%' 
+        AND exp_type = 'OBJECT' 
+        AND comment LIKE '%$surveyStr%'
+        GROUP BY exp_id, diff_mode
+        ";
+    $qry = $db->query($sql);
+    if (dberror($qry)) {echo "<b>error with $sql </b><br>\n";}
+    $hash = array();
+    while ($qry->fetchInto($row)) {
+
+        if ($row[2] == 2) $hash1[$row[0]] = $row[1];
+        else  $hash2[$row[0]] = $row[1];
+    }
+}
+
+
+
Index: branches/czw_branch/20101203/ippMonitor/raw/czartool_labels.php
===================================================================
--- branches/czw_branch/20101203/ippMonitor/raw/czartool_labels.php	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/raw/czartool_labels.php	(revision 30586)
@@ -64,6 +64,5 @@
 include 'version.php';
 echo "</p>";
-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></p>";
-
+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
@@ -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,22 @@
     echo "</tr>\n";
 
-
     # 4th row
+    echo "<tr>\n";
+      echo "<td> \n";
+        echo "<table>\n";
+          echo "<tr valign=top>\n";
+            echo "<td> \n";
+              # storage plot
+              echo "<img src=\"czartool_getplot.php?type=s\"><br>";
+            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";
@@ -196,6 +211,5 @@
           echo "<tr valign=top>\n";
             echo "<td> \n";
-              # storage plot
-              echo "<img src=\"czartool_getplot.php?type=s\"><br>";
+              if ($selectedServer && !$serverCmd) showServerStatus($selectedServer);
             echo "</td>\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");
 
Index: branches/czw_branch/20101203/ippMonitor/raw/ipp.dvodb.dat
===================================================================
--- branches/czw_branch/20101203/ippMonitor/raw/ipp.dvodb.dat	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/raw/ipp.dvodb.dat	(revision 30586)
@@ -0,0 +1,13 @@
+input     | ipp.menu.dat 
+
+menutop   | menutop      | plain   | &nbsp;   |   
+   
+menulink  | menuselect 	 | link    | addRun Runs                | addRunRun.php            
+menulink  | menuselect 	 | link    | addRun ProcessedExp        | addRunProcessed.php            
+
+menutop   | menutop      | plain   | &nbsp;   |
+             
+menulink  | menuselect   | link    | minidvodbRun              | minidvodbRun.php
+menulink  | menuselect 	 | link    | minidvodbProcessed         | minidvodbProcessed.php            
+menulink  | menuselect 	 | link    | minidvodbCopy               | minidvodbCopy.php            
+
Index: branches/czw_branch/20101203/ippMonitor/raw/ipp.dvodb.php
===================================================================
--- branches/czw_branch/20101203/ippMonitor/raw/ipp.dvodb.php	(revision 30586)
+++ branches/czw_branch/20101203/ippMonitor/raw/ipp.dvodb.php	(revision 30586)
@@ -0,0 +1,17 @@
+<?php 
+
+include 'ipp.php';
+
+$ID = checkID ();
+
+// require an explicit project
+if (! $ID['proj']) { projectform ($ID); }
+
+menu('ipp.dvodb.dat', 'addstar and dvoDB steps', 'ipp.css', $ID['link'], $ID['proj']);
+
+// document body
+echo "dvoDB<br>\n";
+
+menu_end();
+
+?>
Index: branches/czw_branch/20101203/ippMonitor/raw/ipp.load.dat
===================================================================
--- branches/czw_branch/20101203/ippMonitor/raw/ipp.load.dat	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/raw/ipp.load.dat	(revision 30586)
@@ -23,2 +23,4 @@
 menulink  | menuselect 	 | link    | New Imfile                   | newImfile.php                    
 menulink  | menuselect 	 | link    | Raw Imfile                   | rawImfile.php                    
+menutop   | menutop      | plain   | &nbsp;                       | 
+menulink  | menuselect 	 | link    | Burntool State               | rawBurntoolState.php                         
Index: branches/czw_branch/20101203/ippMonitor/raw/ipp.menu.dat
===================================================================
--- branches/czw_branch/20101203/ippMonitor/raw/ipp.menu.dat	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/raw/ipp.menu.dat	(revision 30586)
@@ -23,4 +23,5 @@
 menutop   | menutop      | link    | Stack Steps                  | ipp.stack.php
 menutop   | menutop      | link    | Distribution                 | ipp.dist.php
+menutop   | menutop      | link    | dvoDB                        | ipp.dvodb.php
 menutop   | menutop      | link    | Calibration                  | ipp.cal.php
 menutop   | menutop      | link    | Plots              	  | ipp.plots.php
Index: branches/czw_branch/20101203/ippMonitor/raw/ipp.php
===================================================================
--- branches/czw_branch/20101203/ippMonitor/raw/ipp.php	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/raw/ipp.php	(revision 30586)
@@ -390,7 +390,7 @@
   if ($sortKey == "") {
     if ($_SERVER[REQUEST_METHOD] == 'GET') { 
-      $sortKey = $_GET['rsort']; 
+      $sortVal = $_GET['rsort']; 
     } else {
-      $sortKey = $_POST['rsort'];
+      $sortVal = $_POST['rsort'];
     }
     if ($sortVal != "") {
@@ -529,4 +529,7 @@
     $value = $_POST[$htmlkey];
   }
+  # a search restriction may include an SQL wild-card.  we have to mangle these so that the http 
+  # does not get converted to a special character
+  $value = preg_replace ('|%|', '%25', $value);
   if ($value != "") {
     if ($line) {
Index: branches/czw_branch/20101203/ippMonitor/scripts/generate
===================================================================
--- branches/czw_branch/20101203/ippMonitor/scripts/generate	(revision 30118)
+++ branches/czw_branch/20101203/ippMonitor/scripts/generate	(revision 30586)
@@ -58,5 +58,5 @@
         if ($key eq "FIELD") {
             ($field, $width, $format, $name, $show, $link, $extras) = split (/,\s+/, $value, 7);
-            if (! $name) { die "table $ARGV[0] missing required elements\n"; }
+            if (! $name) { die "table $ARGV[0] missing required elements: $value\n"; }
             if ($field =~ m|\S+\s+as\s+\S+|) {
                 ($fieldreal) = $field =~ m|\S+\s+as\s+(\S+)|;
