Index: trunk/ippMonitor/Makefile.in
===================================================================
--- trunk/ippMonitor/Makefile.in	(revision 30453)
+++ trunk/ippMonitor/Makefile.in	(revision 30454)
@@ -61,4 +61,5 @@
 $(DESTWWW)/show_and_delete_image.php \
 $(DESTWWW)/scatterPlot.php \
+$(DESTWWW)/rawBurntoolState.php \
 $(DESTWWW)/plotHistogram.php \
 $(DESTWWW)/columns_in_db.php \
Index: trunk/ippMonitor/def/diffProcessedSkyfile_Images.d
===================================================================
--- trunk/ippMonitor/def/diffProcessedSkyfile_Images.d	(revision 30453)
+++ trunk/ippMonitor/def/diffProcessedSkyfile_Images.d	(revision 30454)
@@ -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: trunk/ippMonitor/def/magicProcessedMasks_Images.d
===================================================================
--- trunk/ippMonitor/def/magicProcessedMasks_Images.d	(revision 30453)
+++ trunk/ippMonitor/def/magicProcessedMasks_Images.d	(revision 30454)
@@ -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: trunk/ippMonitor/def/rawBurntoolState.d
===================================================================
--- trunk/ippMonitor/def/rawBurntoolState.d	(revision 30454)
+++ trunk/ippMonitor/def/rawBurntoolState.d	(revision 30454)
@@ -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: trunk/ippMonitor/raw/ipp.load.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.load.dat	(revision 30453)
+++ trunk/ippMonitor/raw/ipp.load.dat	(revision 30454)
@@ -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: trunk/ippMonitor/raw/ipp.php
===================================================================
--- trunk/ippMonitor/raw/ipp.php	(revision 30453)
+++ trunk/ippMonitor/raw/ipp.php	(revision 30454)
@@ -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: trunk/ippMonitor/scripts/generate
===================================================================
--- trunk/ippMonitor/scripts/generate	(revision 30453)
+++ trunk/ippMonitor/scripts/generate	(revision 30454)
@@ -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+)|;
