savepic.asp 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <%
  2. Option Explicit
  3. Response.Expires = 0
  4. Response.Buffer = True
  5. %>
  6. <!--
  7. * This file is part of the LibreOffice project.
  8. *
  9. * This Source Code Form is subject to the terms of the Mozilla Public
  10. * License, v. 2.0. If a copy of the MPL was not distributed with this
  11. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  12. *
  13. * This file incorporates work covered by the following license notice:
  14. *
  15. * Licensed to the Apache Software Foundation (ASF) under one or more
  16. * contributor license agreements. See the NOTICE file distributed
  17. * with this work for additional information regarding copyright
  18. * ownership. The ASF licenses this file to you under the Apache
  19. * License, Version 2.0 (the "License"); you may not use this file
  20. * except in compliance with the License. You may obtain a copy of
  21. * the License at http://www.apache.org/licenses/LICENSE-2.0 .
  22. -->
  23. <!-- #include file = "common.inc" -->
  24. <%
  25. ' get new picture
  26. Dim sCurrPic,aPictureArray, nUpper, nCurrPic
  27. aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
  28. nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2)
  29. sCurrPic = Request( "CurrPic" )
  30. ' check if + or - was pressed
  31. select case Request( "Auswahl" )
  32. case "+"
  33. if isNumeric( sCurrPic ) then
  34. sCurrPic = CStr( CLng( sCurrPic ) + 1 )
  35. end if
  36. case "-"
  37. if isNumeric( sCurrPic ) then
  38. sCurrPic = CStr( CLng( sCurrPic ) - 1 )
  39. end if
  40. end select
  41. ' save picture name
  42. if isNumeric( sCurrPic ) then
  43. if (CInt( sCurrPic ) > 0) and ( CInt( sCurrPic ) <= nUpper ) then
  44. call File_writeVirtual( "currpic.txt", ".", sCurrPic )
  45. end if
  46. end if
  47. ' return to edit page
  48. Response.Redirect( "./editpic.asp" )
  49. %>