Changeset 18247 for trunk/pstamp/web/request.php
- Timestamp:
- Jun 20, 2008, 3:08:02 PM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/web/request.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/web/request.php
r18238 r18247 1 1 <?php 2 2 3 // prototype postage stamp server web interface 4 3 5 // A php program that generates a postage stamp request form 4 6 5 // There are two modes on the form List Images simply lists the input images that match6 // th e image selection critera7 // There are two modes on the form List Images simply lists the input images 8 // that match the image selection critera 7 9 8 10 // When make stamps is selected when the page is posted, a postage stamp request is queued. … … 12 14 // The mode for the page is given by $request_id != 0 13 15 14 $COMMAND_DIR = "/export/data0/bills/src/ipp/pstamp/scripts"; 16 // XXX This is just a prototype for testing purposes. 17 18 19 // BEGIN Local configuration 20 21 $COMMAND_DIR = "/export/data0/bills/psconfig/debug.linrh64/bin"; 15 22 $dsroot = "/export/data1/datastore/dsroot"; 23 $dbname = "simtest"; 24 25 // END Local configuration 26 // (actually there is a little bit more in $COMMAND_DIR/pstamp_runcommand.sh ) 16 27 17 28 // Initialize variables … … 213 224 global $rvar_id, $rvar_class_id; 214 225 global $command_line; 215 226 global $dbname; 227 228 $making_stamps = 1; 216 229 $cmd = "pstamp_runcommand.sh pstamp_webrequest.pl"; 217 230 218 $making_stamps = 1;231 // NOTE: If it is used, -list_uri must be the first argument to pstamp_webrequest.pl 219 232 220 233 if ($list_checked) { 221 $cmd .= " -list ";234 $cmd .= " -list_uri"; 222 235 $making_stamps = 0; 223 236 } else if ($get_checked) { 224 237 $making_stamps = 0; 225 238 $cmd .= " -get_image"; 239 } 240 241 if ($dbname) { 242 $cmd .= " --dbname $dbname"; 226 243 } 227 244 … … 291 308 292 309 if (($rvar_img_type == "raw") || ($rvar_img_type == "chip")) { 293 if (! $rvar_class_id ) {294 throw new Exception("must specify Class ID with Image Type $rvar_img_type.");295 }296 if ( $rvar_class_id = "all") {310 # if (! $rvar_class_id ) { 311 # throw new Exception("must specify Class ID with Image Type $rvar_img_type."); 312 # } 313 if ((!$rvar_class_id) || ($rvar_class_id = "all")) { 297 314 $cmd .= " null"; 298 315 } else { … … 402 419 403 420 $command_line = "pstamp_runcommand.sh pstamp_listjobs.pl $request_id"; 421 global $dbname; 422 if ($dbname) { 423 $command_line .= " --dbname $dbname"; 424 } 425 404 426 run_command($command_line); 405 427 if ($jobFinished) { … … 429 451 global $output_array; 430 452 global $outFileset; 453 global $dbname; 431 454 432 455 $command_line = "pstamp_runcommand.sh pstamptool -listreq -req_id $request_id -simple"; 456 if ($dbname) { 457 $command_line .= " -dbname $dbname"; 458 } 433 459 run_command($command_line); 434 460 if ($command_status == 0) {
Note:
See TracChangeset
for help on using the changeset viewer.
