Index: trunk/pstamp/web/request.php
===================================================================
--- trunk/pstamp/web/request.php	(revision 18238)
+++ trunk/pstamp/web/request.php	(revision 18247)
@@ -1,8 +1,10 @@
 <?php 
 
+// prototype postage stamp server web interface
+
 // A php program that generates a postage stamp request form
 
-// There are two modes on the form List Images simply lists the input images that match
-// the image selection critera
+// There are two modes on the form List Images simply lists the input images
+// that match the image selection critera
 
 // When make stamps is selected when the page is posted, a postage stamp request is queued.
@@ -12,6 +14,15 @@
 // The mode for the page is given by $request_id != 0
 
-$COMMAND_DIR = "/export/data0/bills/src/ipp/pstamp/scripts";
+// XXX This is just a prototype for testing purposes. 
+
+
+// BEGIN Local configuration
+
+$COMMAND_DIR = "/export/data0/bills/psconfig/debug.linrh64/bin";
 $dsroot = "/export/data1/datastore/dsroot";
+$dbname = "simtest";
+
+// END Local configuration 
+//      (actually there is a little bit more in $COMMAND_DIR/pstamp_runcommand.sh )
 
 // Initialize variables
@@ -213,15 +224,21 @@
     global $rvar_id, $rvar_class_id;
     global $command_line;
-
+    global $dbname;
+
+    $making_stamps = 1;
     $cmd = "pstamp_runcommand.sh pstamp_webrequest.pl";
 
-    $making_stamps = 1;
+    // NOTE: If it is used, -list_uri must be the first argument to pstamp_webrequest.pl 
     
     if ($list_checked) {
-        $cmd .= " -list";
+        $cmd .= " -list_uri";
         $making_stamps = 0;
     } else if ($get_checked) {
         $making_stamps = 0;
         $cmd .= " -get_image";
+    }
+
+    if ($dbname) {
+        $cmd .= " --dbname $dbname";
     }
 
@@ -291,8 +308,8 @@
 
     if (($rvar_img_type == "raw") || ($rvar_img_type == "chip")) {
-        if (! $rvar_class_id ) {
-            throw new Exception("must specify Class ID with Image Type $rvar_img_type.");
-        }
-        if ($rvar_class_id = "all") {
+#        if (! $rvar_class_id ) {
+#            throw new Exception("must specify Class ID with Image Type $rvar_img_type.");
+#        }
+        if ((!$rvar_class_id) || ($rvar_class_id = "all")) {
             $cmd .= " null";
         } else {
@@ -402,4 +419,9 @@
 
     $command_line = "pstamp_runcommand.sh pstamp_listjobs.pl $request_id";
+    global $dbname;
+    if ($dbname) {
+        $command_line .= " --dbname $dbname";
+    }
+
     run_command($command_line);
     if ($jobFinished) {
@@ -429,6 +451,10 @@
     global $output_array;
     global $outFileset;
+    global $dbname;
 
     $command_line = "pstamp_runcommand.sh pstamptool -listreq -req_id $request_id -simple";
+    if ($dbname) {
+        $command_line .= " -dbname $dbname";
+    }
     run_command($command_line);
     if ($command_status == 0) {
