xref: /aoo41x/main/sd/res/webview/savepic.asp (revision 5b501c92)
1 <%
2     Option Explicit
3     Response.Expires = 0
4     Response.Buffer = True
5 %>
6 <!--***********************************************************
7  *
8  * Licensed to the Apache Software Foundation (ASF) under one
9  * or more contributor license agreements.  See the NOTICE file
10  * distributed with this work for additional information
11  * regarding copyright ownership.  The ASF licenses this file
12  * to you under the Apache License, Version 2.0 (the
13  * "License"); you may not use this file except in compliance
14  * with the License.  You may obtain a copy of the License at
15  *
16  *   http://www.apache.org/licenses/LICENSE-2.0
17  *
18  * Unless required by applicable law or agreed to in writing,
19  * software distributed under the License is distributed on an
20  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21  * KIND, either express or implied.  See the License for the
22  * specific language governing permissions and limitations
23  * under the License.
24  *
25  ***********************************************************-->
26 
27 <!-- #include file = "common.inc" -->
28 
29 <%
30     ' get new picture
31     Dim sCurrPic,aPictureArray, nUpper, nCurrPic
32 
33     aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
34     nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2)
35 
36     sCurrPic = Request( "CurrPic" )
37 
38     ' check if + or - was pressed
39     select case Request( "Auswahl" )
40         case "+"
41             if isNumeric( sCurrPic ) then
42                 sCurrPic = CStr( CLng( sCurrPic ) + 1 )
43             end if
44         case "-"
45             if isNumeric( sCurrPic ) then
46                 sCurrPic = CStr( CLng( sCurrPic ) - 1 )
47             end if
48     end select
49 
50     ' save picture name
51 	if isNumeric( sCurrPic ) then
52 		if (CInt( sCurrPic ) > 0) and ( CInt( sCurrPic ) <= nUpper ) then
53 			call File_writeVirtual( "currpic.txt", ".", sCurrPic )
54 		end if
55 	end if
56 
57     ' return to edit page
58     Response.Redirect( "./editpic.asp" )
59 %>
60