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