1#!/usr/bin/env perl 2# ************************************************************* 3# 4# Licensed to the Apache Software Foundation (ASF) under one 5# or more contributor license agreements. See the NOTICE file 6# distributed with this work for additional information 7# regarding copyright ownership. The ASF licenses this file 8# to you under the Apache License, Version 2.0 (the 9# "License"); you may not use this file except in compliance 10# with the License. You may obtain a copy of the License at 11# 12# http://www.apache.org/licenses/LICENSE-2.0 13# 14# Unless required by applicable law or agreed to in writing, 15# software distributed under the License is distributed on an 16# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17# KIND, either express or implied. See the License for the 18# specific language governing permissions and limitations 19# under the License. 20# 21# ************************************************************* 22 23require "common.pl"; 24 25print "Content-type: text/html\n\n"; 26print "<html>\n"; 27 28print "<head>\n"; 29print "<title>editpic.pl</title>"; 30print "</head>\n"; 31 32print "<body>\n"; 33 $sCurrPic = join( "", common::File_read( "currpic.txt" ) ); 34 @aPictureArray = common::File_read( "picture.txt" ); 35 $nPictureArrayLen = @aPictureArray; 36 print "<form action=\"savepic.pl\" method=get>\n"; 37 if( abs( $sCurrPic ) > 1 ) 38 { 39 print "<input type=submit name=\"Auswahl\" value=\"-\"></input>\n"; 40 } 41 else 42 { 43 print "<input type=button value=\" \"></input>\n"; 44 } 45 print "<input type=text name=\"CurrPic\" value=\""; 46 print $sCurrPic; 47 print "\" size=3></input>\n"; 48 if( abs( $sCurrPic ) < ( $nPictureArrayLen - 1 ) ) 49 { 50 print "<input type=submit name=\"Auswahl\" value=\"+\"></input>\n"; 51 } 52 else 53 { 54 print "<input type=button value=\" \"></input>\n"; 55 } 56 print "<input type=submit name=\"Auswahl\" value=\"$$2\"></input>\n"; 57 print "</form>\n"; 58print "</body>\n"; 59 60print "</html>\n"; 61