home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 2002 October / VPR0210A.ISO / OPENOFFICE / f_0275 / show.pl
Perl Script  |  2000-09-18  |  1KB  |  39 lines

  1. #!/usr/bin/perl
  2.  
  3. require "common.pl";
  4.  
  5. print "Content-type: text/html\n\n";
  6.  
  7. # get current and next picture
  8. $sCurrPic = join( "", common::File_read( "currpic.txt" ) );
  9. @aPictureArray = common::File_read( "picture.txt" );
  10.  
  11. # not last picture or wrong input ?
  12. if( abs( $sCurrPic ) > 0 )
  13. {
  14.     $nCurrPic = abs( $sCurrPic );
  15.     $nPictureArrayLen = @aPictureArray;
  16.     if( $nCurrPic < $nPictureArrayLen )
  17.     {
  18.         $sPictureName1 = ( split( ";", @aPictureArray[ $nCurrPic ] ) )[ 1 ];
  19.         $sPictureName2 = ( split( ";", @aPictureArray[ $nCurrPic + 1 ] ) )[ 1 ];
  20.     }
  21.     else
  22.     {
  23.         $sPictureName1 = ( split( ";", @aPictureArray[ $nCurrPic ] ) )[ 1 ];
  24.         $sPictureName2 = $sPictureName1;
  25.     }
  26. }
  27.  
  28. print "<HTML>";
  29.  
  30. print "<HEAD>";
  31.     print "<TITLE>$$1</TITLE>";
  32. print "</HEAD>";
  33.  
  34. print "<BODY bgcolor=\"white\">";
  35.     print "<P ALIGN=CENTER><IMG src=\"" . $sPictureName1 . "\" width=$$4 height=$$5 border=0>";
  36.     print "<P><IMG src=\"" . $sPictureName2 . "\" width=1 height=1 border=0>";
  37. print "</BODY>";
  38.  
  39. print "</HTML>";