xref: /trunk/main/sd/res/webview/savepic.asp (revision cdf0e10c)
1*cdf0e10cSrcweir<%
2*cdf0e10cSrcweir    Option Explicit
3*cdf0e10cSrcweir    Response.Expires = 0
4*cdf0e10cSrcweir    Response.Buffer = True
5*cdf0e10cSrcweir%>
6*cdf0e10cSrcweir
7*cdf0e10cSrcweir<!-- #include file = "common.inc" -->
8*cdf0e10cSrcweir
9*cdf0e10cSrcweir<%
10*cdf0e10cSrcweir    ' get new picture
11*cdf0e10cSrcweir    Dim sCurrPic,aPictureArray, nUpper, nCurrPic
12*cdf0e10cSrcweir
13*cdf0e10cSrcweir    aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
14*cdf0e10cSrcweir    nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2)
15*cdf0e10cSrcweir
16*cdf0e10cSrcweir    sCurrPic = Request( "CurrPic" )
17*cdf0e10cSrcweir
18*cdf0e10cSrcweir    ' check if + or - was pressed
19*cdf0e10cSrcweir    select case Request( "Auswahl" )
20*cdf0e10cSrcweir        case "+"
21*cdf0e10cSrcweir            if isNumeric( sCurrPic ) then
22*cdf0e10cSrcweir                sCurrPic = CStr( CLng( sCurrPic ) + 1 )
23*cdf0e10cSrcweir            end if
24*cdf0e10cSrcweir        case "-"
25*cdf0e10cSrcweir            if isNumeric( sCurrPic ) then
26*cdf0e10cSrcweir                sCurrPic = CStr( CLng( sCurrPic ) - 1 )
27*cdf0e10cSrcweir            end if
28*cdf0e10cSrcweir    end select
29*cdf0e10cSrcweir
30*cdf0e10cSrcweir    ' save picture name
31*cdf0e10cSrcweir	if isNumeric( sCurrPic ) then
32*cdf0e10cSrcweir		if (CInt( sCurrPic ) > 0) and ( CInt( sCurrPic ) <= nUpper ) then
33*cdf0e10cSrcweir			call File_writeVirtual( "currpic.txt", ".", sCurrPic )
34*cdf0e10cSrcweir		end if
35*cdf0e10cSrcweir	end if
36*cdf0e10cSrcweir
37*cdf0e10cSrcweir    ' return to edit page
38*cdf0e10cSrcweir    Response.Redirect( "./editpic.asp" )
39*cdf0e10cSrcweir%>
40