home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 October / PCWorld_2004-10_cd.bin / akce / openoffice / f_0132 / editpic.pl
Perl Script  |  2002-12-12  |  1KB  |  41 lines

  1. #!/usr/bin/perl
  2.  
  3. require "common.pl";
  4.  
  5. print "Content-type: text/html\n\n";
  6. print "<HTML>\n";
  7.  
  8. print "<HEAD>\n";
  9. print "<title>editpic.pl</title>";
  10. print "</HEAD>\n";
  11.  
  12. print "<BODY>\n";
  13.     $sCurrPic = join( "", common::File_read( "currpic.txt" ) );
  14.     @aPictureArray = common::File_read( "picture.txt" );
  15.     $nPictureArrayLen = @aPictureArray;
  16.     print "<FORM action=\"savepic.pl\" method=get>\n";
  17.         if( abs( $sCurrPic ) > 1 )
  18.         {
  19.             print "<INPUT type=submit name=\"Auswahl\" value=\"-\"></INPUT>\n";
  20.         }
  21.         else
  22.         {
  23.             print "<INPUT type=button value=\" \"></INPUT>\n";
  24.         }
  25.         print "<INPUT type=text name=\"CurrPic\" value=\"";
  26.         print $sCurrPic;
  27.         print "\" SIZE=3></INPUT>\n";
  28.         if( abs( $sCurrPic ) < ( $nPictureArrayLen - 1 ) )
  29.         {
  30.             print "<INPUT type=submit name=\"Auswahl\" value=\"+\"></INPUT>\n";
  31.         }
  32.         else
  33.         {
  34.             print "<INPUT type=button value=\" \"></INPUT>\n";
  35.         }
  36.         print "<INPUT type=submit name=\"Auswahl\" value=\"$$2\"></INPUT>\n";
  37.     print "</FORM>\n";
  38. print "</BODY>\n";
  39.  
  40. print "</HTML>\n";
  41.