IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jun 20, 2008, 3:08:02 PM (18 years ago)
Author:
bills
Message:

more tweaks.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/pstamp/web/request.php

    r18238 r18247  
    11<?php
    22
     3// prototype postage stamp server web interface
     4
    35// A php program that generates a postage stamp request form
    46
    5 // There are two modes on the form List Images simply lists the input images that match
    6 // the image selection critera
     7// There are two modes on the form List Images simply lists the input images
     8// that match the image selection critera
    79
    810// When make stamps is selected when the page is posted, a postage stamp request is queued.
     
    1214// The mode for the page is given by $request_id != 0
    1315
    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";
    1522$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 )
    1627
    1728// Initialize variables
     
    213224    global $rvar_id, $rvar_class_id;
    214225    global $command_line;
    215 
     226    global $dbname;
     227
     228    $making_stamps = 1;
    216229    $cmd = "pstamp_runcommand.sh pstamp_webrequest.pl";
    217230
    218     $making_stamps = 1;
     231    // NOTE: If it is used, -list_uri must be the first argument to pstamp_webrequest.pl
    219232   
    220233    if ($list_checked) {
    221         $cmd .= " -list";
     234        $cmd .= " -list_uri";
    222235        $making_stamps = 0;
    223236    } else if ($get_checked) {
    224237        $making_stamps = 0;
    225238        $cmd .= " -get_image";
     239    }
     240
     241    if ($dbname) {
     242        $cmd .= " --dbname $dbname";
    226243    }
    227244
     
    291308
    292309    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")) {
    297314            $cmd .= " null";
    298315        } else {
     
    402419
    403420    $command_line = "pstamp_runcommand.sh pstamp_listjobs.pl $request_id";
     421    global $dbname;
     422    if ($dbname) {
     423        $command_line .= " --dbname $dbname";
     424    }
     425
    404426    run_command($command_line);
    405427    if ($jobFinished) {
     
    429451    global $output_array;
    430452    global $outFileset;
     453    global $dbname;
    431454
    432455    $command_line = "pstamp_runcommand.sh pstamptool -listreq -req_id $request_id -simple";
     456    if ($dbname) {
     457        $command_line .= " -dbname $dbname";
     458    }
    433459    run_command($command_line);
    434460    if ($command_status == 0) {
Note: See TracChangeset for help on using the changeset viewer.