editpic.pl 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/usr/bin/env perl
  2. #
  3. # This file is part of the LibreOffice project.
  4. #
  5. # This Source Code Form is subject to the terms of the Mozilla Public
  6. # License, v. 2.0. If a copy of the MPL was not distributed with this
  7. # file, You can obtain one at http://mozilla.org/MPL/2.0/.
  8. #
  9. # This file incorporates work covered by the following license notice:
  10. #
  11. # Licensed to the Apache Software Foundation (ASF) under one or more
  12. # contributor license agreements. See the NOTICE file distributed
  13. # with this work for additional information regarding copyright
  14. # ownership. The ASF licenses this file to you under the Apache
  15. # License, Version 2.0 (the "License"); you may not use this file
  16. # except in compliance with the License. You may obtain a copy of
  17. # the License at http://www.apache.org/licenses/LICENSE-2.0 .
  18. #
  19. require "common.pl";
  20. print "Content-type: text/html\n\n";
  21. print "<HTML>\n";
  22. print "<HEAD>\n";
  23. print "<title>editpic.pl</title>";
  24. print "</HEAD>\n";
  25. print "<BODY>\n";
  26. $sCurrPic = join( "", common::File_read( "currpic.txt" ) );
  27. @aPictureArray = common::File_read( "picture.txt" );
  28. $nPictureArrayLen = @aPictureArray;
  29. print "<FORM action=\"savepic.pl\" method=get>\n";
  30. if( abs( $sCurrPic ) > 1 )
  31. {
  32. print "<INPUT type=submit name=\"Auswahl\" value=\"-\"></INPUT>\n";
  33. }
  34. else
  35. {
  36. print "<INPUT type=button value=\" \"></INPUT>\n";
  37. }
  38. print "<INPUT type=text name=\"CurrPic\" value=\"";
  39. print $sCurrPic;
  40. print "\" SIZE=3></INPUT>\n";
  41. if( abs( $sCurrPic ) < ( $nPictureArrayLen - 1 ) )
  42. {
  43. print "<INPUT type=submit name=\"Auswahl\" value=\"+\"></INPUT>\n";
  44. }
  45. else
  46. {
  47. print "<INPUT type=button value=\" \"></INPUT>\n";
  48. }
  49. print "<INPUT type=submit name=\"Auswahl\" value=\"$$2\"></INPUT>\n";
  50. print "</FORM>\n";
  51. print "</BODY>\n";
  52. print "</HTML>\n";