Index: /trunk/pstamp/web/request.php
===================================================================
--- /trunk/pstamp/web/request.php	(revision 17891)
+++ /trunk/pstamp/web/request.php	(revision 17892)
@@ -13,5 +13,5 @@
 
 $COMMAND_DIR = "/export/data0/bills/src/ipp/pstamp/scripts";
-//$STAMPS_DIR = "/export/data1/bills/pstamp/work/stamps";
+$dsroot = "/export/data1/datastore/dsroot";
 
 // Initialize variables
@@ -346,10 +346,17 @@
             $fileName = basename($path);
             if ($state == "stop") {
-                // this job is done, list the url as a link
-                echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">";
-                echo $fileName;
-                echo "</a>";
-                echo "&nbsp;&nbsp;&nbsp; request_id: $last_request_id &nbsp;&nbsp;";
-                echo "job_id: $job_id &nbsp;&nbsp;&nbsp; state: $state";
+                global $dsroot;
+                $fullpath = "$dsroot" . "$path";
+                if (file_exists($fullpath)) {
+                    // this job is done, list the url as a link
+                    echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">";
+                    echo $fileName;
+                    echo "</a>";
+                    echo "&nbsp;&nbsp;&nbsp; request_id: $last_request_id &nbsp;&nbsp;";
+                    echo "job_id: $job_id &nbsp;&nbsp;&nbsp; state: $state";
+                } else {
+                    echo "request_id: $last_request_id  job_id: $job_id failed";
+                    echo "   $fullpath";
+                }
             } else {
                 // TODO: refine this output
@@ -392,14 +399,17 @@
     if ($jobFinished) {
         global $outFileset;
-        $parse_error = "/var/www/html/ds/dsroot/$outFileset/parse_error";
+        global $dsroot;
+        $parse_error = "$dsroot/$outFileset/parse_error";
         #echo "reading $parse_error\n";
         // readfile( $parse_error );
-        $fhandle = fopen($parse_error, "r");
-        if ($fhandle) {
-            $contents = fread($fhandle, 1024);
-            if ($contents) {
-                global $last_request_id;
-                global $error_line;
-                $error_line = "Request $last_request_id: $contents\n";
+        if (file_exists($parse_error)) {
+            $fhandle = fopen($parse_error, "r");
+            if ($fhandle) {
+                $contents = fread($fhandle, 1024);
+                if ($contents) {
+                    global $last_request_id;
+                    global $error_line;
+                    $error_line = "Request $last_request_id: $contents\n";
+                }
             }
         }
@@ -457,5 +467,5 @@
 
 <H1 align=center>
-Postage Stamp Request Form
+Postage Stamp Request
 </h1>
 
@@ -485,11 +495,9 @@
 <td>
 &nbsp;<b>Select Images By:</b>&nbsp;&nbsp;&nbsp;
-<input type=radio name="select_by" value="exposure_id" <?php echo $exp_checked; ?> >Exposure ID
+<input type=radio name="select_by" value="exposure_id" <?php echo $exp_checked; ?> >Exposure Name
 &nbsp;
 <input type=radio name="select_by" value="db_id" <?php echo $file_checked; ?> >Database ID
 &nbsp;
-<!--
 <input type=radio name="select_by" value="coord" <?php echo $coord_checked; ?> >Coordinates
--->
 </td>
 </tr>
@@ -517,5 +525,5 @@
 
 <td>
-&nbsp;<b>ID:</b>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
+&nbsp;<b>ID/Name:</b>&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <input type="text" name="id" value= <?php echo $rvar_id; ?> >
 &nbsp;&nbsp;&nbsp;&nbsp;
@@ -547,5 +555,5 @@
 <td width=20% > </td>
 <!-- user tag input text -->
-<td>&nbsp;<b>Stamp Name:</b>&nbsp;<input type="text" name="user_tag" size=60 value=<?php echo $rvar_user_tag; ?> ></td>
+<td>&nbsp;<b>Stamp Name:</b>&nbsp;<input type="text" name="user_tag" size=20 value=<?php echo $rvar_user_tag; ?> ></td>
 </tr>
 
@@ -575,5 +583,5 @@
             &nbsp;
             &nbsp;
-            <input type="text" name="RA" size=15  value= <?php echo $rvar_RA; ?> >
+            <input type="text" name="RA" size=10  value= <?php echo $rvar_RA; ?> >
         </td>
         <td>
@@ -581,5 +589,5 @@
             DEC:
             &nbsp;
-            <input type="text" name="DEC" size=15 value="<?php echo $rvar_DEC;?>" >
+            <input type="text" name="DEC" size=10 value="<?php echo $rvar_DEC;?>" >
         </td>
         <td>
@@ -591,6 +599,5 @@
             &nbsp;
             &nbsp;
-            &nbsp;
-            <input type="text" name="dRA" size=15  value= <?php echo $rvar_dRA; ?> >
+            <input type="text" name="dRA" size=10  value= <?php echo $rvar_dRA; ?> >
         </td>
         <td>
@@ -598,5 +605,5 @@
             dDEC:
             &nbsp;
-            <input type="text" name="dDEC" size=15 value="<?php echo $rvar_dDEC;?>" >
+            <input type="text" name="dDEC" size=10 value="<?php echo $rvar_dDEC;?>" >
         </td>
     </tr>
@@ -611,5 +618,5 @@
             &nbsp;
             &nbsp;
-            <input type="text" name="X" size=15  value= <?php echo $rvar_X; ?> >
+            <input type="text" name="X" size=10  value= <?php echo $rvar_X; ?> >
         </td>
         <td>
@@ -619,5 +626,5 @@
             &nbsp;
             &nbsp;
-            <input type="text" name="Y" size=15 value="<?php echo $rvar_Y;?>" >
+            <input type="text" name="Y" size=10 value="<?php echo $rvar_Y;?>" >
         </td>
         <td>
@@ -629,5 +636,5 @@
             &nbsp;
             &nbsp;
-            <input type="text" name="W" size=15  value= <?php echo $rvar_W; ?> >
+            <input type="text" name="W" size=10  value= <?php echo $rvar_W; ?> >
         </td>
         <td>
@@ -635,5 +642,5 @@
             height:
             &nbsp;
-            <input type="text" name="H" size=15 value="<?php echo $rvar_H;?>" >
+            <input type="text" name="H" size=10 value="<?php echo $rvar_H;?>" >
         </td>
     </tr>
@@ -643,9 +650,9 @@
 
 
-<!-- next row of the main table just contains the Submit button -->
+<!-- next row of the main table contains the Submit button and the Mode radio buttons -->
 
 <tr align=center width=100% height=50>
   <td>
-  <table width=40%>
+  <table width=80%>
   <tr>
 
