Changeset 17892
- Timestamp:
- Jun 3, 2008, 9:36:40 AM (18 years ago)
- File:
-
- 1 edited
-
trunk/pstamp/web/request.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/pstamp/web/request.php
r16977 r17892 13 13 14 14 $COMMAND_DIR = "/export/data0/bills/src/ipp/pstamp/scripts"; 15 //$STAMPS_DIR = "/export/data1/bills/pstamp/work/stamps";15 $dsroot = "/export/data1/datastore/dsroot"; 16 16 17 17 // Initialize variables … … 346 346 $fileName = basename($path); 347 347 if ($state == "stop") { 348 // this job is done, list the url as a link 349 echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">"; 350 echo $fileName; 351 echo "</a>"; 352 echo " request_id: $last_request_id "; 353 echo "job_id: $job_id state: $state"; 348 global $dsroot; 349 $fullpath = "$dsroot" . "$path"; 350 if (file_exists($fullpath)) { 351 // this job is done, list the url as a link 352 echo "<a href=\"http:$path\" target=\"_blank\" type=\"image/fits\">"; 353 echo $fileName; 354 echo "</a>"; 355 echo " request_id: $last_request_id "; 356 echo "job_id: $job_id state: $state"; 357 } else { 358 echo "request_id: $last_request_id job_id: $job_id failed"; 359 echo " $fullpath"; 360 } 354 361 } else { 355 362 // TODO: refine this output … … 392 399 if ($jobFinished) { 393 400 global $outFileset; 394 $parse_error = "/var/www/html/ds/dsroot/$outFileset/parse_error"; 401 global $dsroot; 402 $parse_error = "$dsroot/$outFileset/parse_error"; 395 403 #echo "reading $parse_error\n"; 396 404 // readfile( $parse_error ); 397 $fhandle = fopen($parse_error, "r"); 398 if ($fhandle) { 399 $contents = fread($fhandle, 1024); 400 if ($contents) { 401 global $last_request_id; 402 global $error_line; 403 $error_line = "Request $last_request_id: $contents\n"; 405 if (file_exists($parse_error)) { 406 $fhandle = fopen($parse_error, "r"); 407 if ($fhandle) { 408 $contents = fread($fhandle, 1024); 409 if ($contents) { 410 global $last_request_id; 411 global $error_line; 412 $error_line = "Request $last_request_id: $contents\n"; 413 } 404 414 } 405 415 } … … 457 467 458 468 <H1 align=center> 459 Postage Stamp Request Form469 Postage Stamp Request 460 470 </h1> 461 471 … … 485 495 <td> 486 496 <b>Select Images By:</b> 487 <input type=radio name="select_by" value="exposure_id" <?php echo $exp_checked; ?> >Exposure ID497 <input type=radio name="select_by" value="exposure_id" <?php echo $exp_checked; ?> >Exposure Name 488 498 489 499 <input type=radio name="select_by" value="db_id" <?php echo $file_checked; ?> >Database ID 490 500 491 <!--492 501 <input type=radio name="select_by" value="coord" <?php echo $coord_checked; ?> >Coordinates 493 -->494 502 </td> 495 503 </tr> … … 517 525 518 526 <td> 519 <b>ID :</b> 527 <b>ID/Name:</b> 520 528 <input type="text" name="id" value= <?php echo $rvar_id; ?> > 521 529 … … 547 555 <td width=20% > </td> 548 556 <!-- user tag input text --> 549 <td> <b>Stamp Name:</b> <input type="text" name="user_tag" size= 60 value=<?php echo $rvar_user_tag; ?> ></td>557 <td> <b>Stamp Name:</b> <input type="text" name="user_tag" size=20 value=<?php echo $rvar_user_tag; ?> ></td> 550 558 </tr> 551 559 … … 575 583 576 584 577 <input type="text" name="RA" size=1 5value= <?php echo $rvar_RA; ?> >585 <input type="text" name="RA" size=10 value= <?php echo $rvar_RA; ?> > 578 586 </td> 579 587 <td> … … 581 589 DEC: 582 590 583 <input type="text" name="DEC" size=1 5value="<?php echo $rvar_DEC;?>" >591 <input type="text" name="DEC" size=10 value="<?php echo $rvar_DEC;?>" > 584 592 </td> 585 593 <td> … … 591 599 592 600 593 594 <input type="text" name="dRA" size=15 value= <?php echo $rvar_dRA; ?> > 601 <input type="text" name="dRA" size=10 value= <?php echo $rvar_dRA; ?> > 595 602 </td> 596 603 <td> … … 598 605 dDEC: 599 606 600 <input type="text" name="dDEC" size=1 5value="<?php echo $rvar_dDEC;?>" >607 <input type="text" name="dDEC" size=10 value="<?php echo $rvar_dDEC;?>" > 601 608 </td> 602 609 </tr> … … 611 618 612 619 613 <input type="text" name="X" size=1 5value= <?php echo $rvar_X; ?> >620 <input type="text" name="X" size=10 value= <?php echo $rvar_X; ?> > 614 621 </td> 615 622 <td> … … 619 626 620 627 621 <input type="text" name="Y" size=1 5value="<?php echo $rvar_Y;?>" >628 <input type="text" name="Y" size=10 value="<?php echo $rvar_Y;?>" > 622 629 </td> 623 630 <td> … … 629 636 630 637 631 <input type="text" name="W" size=1 5value= <?php echo $rvar_W; ?> >638 <input type="text" name="W" size=10 value= <?php echo $rvar_W; ?> > 632 639 </td> 633 640 <td> … … 635 642 height: 636 643 637 <input type="text" name="H" size=1 5value="<?php echo $rvar_H;?>" >644 <input type="text" name="H" size=10 value="<?php echo $rvar_H;?>" > 638 645 </td> 639 646 </tr> … … 643 650 644 651 645 <!-- next row of the main table just contains the Submit button-->652 <!-- next row of the main table contains the Submit button and the Mode radio buttons --> 646 653 647 654 <tr align=center width=100% height=50> 648 655 <td> 649 <table width= 40%>656 <table width=80%> 650 657 <tr> 651 658
Note:
See TracChangeset
for help on using the changeset viewer.
