From ed5640d8b587fbcfed7dd7967f3de04b37a76f26 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 11:06:44 +0200 Subject: Adding upstream version 4:7.4.7. Signed-off-by: Daniel Baumann --- sd/res/webview/savepic.asp | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 sd/res/webview/savepic.asp (limited to 'sd/res/webview/savepic.asp') diff --git a/sd/res/webview/savepic.asp b/sd/res/webview/savepic.asp new file mode 100644 index 000000000..9a9f32cd1 --- /dev/null +++ b/sd/res/webview/savepic.asp @@ -0,0 +1,56 @@ +<% + Option Explicit + Response.Expires = 0 + Response.Buffer = True +%> + + + + +<% + ' get new picture + Dim sCurrPic,aPictureArray, nUpper, nCurrPic + + aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" ) + nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2) + + sCurrPic = Request( "CurrPic" ) + + ' check if + or - was pressed + select case Request( "Auswahl" ) + case "+" + if isNumeric( sCurrPic ) then + sCurrPic = CStr( CLng( sCurrPic ) + 1 ) + end if + case "-" + if isNumeric( sCurrPic ) then + sCurrPic = CStr( CLng( sCurrPic ) - 1 ) + end if + end select + + ' save picture name + if isNumeric( sCurrPic ) then + if (CInt( sCurrPic ) > 0) and ( CInt( sCurrPic ) <= nUpper ) then + call File_writeVirtual( "currpic.txt", ".", sCurrPic ) + end if + end if + + ' return to edit page + Response.Redirect( "./editpic.asp" ) +%> -- cgit v1.2.3