editpic.asp 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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. Dim aPictureArray, nPic, nUpper
  26. aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
  27. nPic = File_readVirtual( "currpic.txt", "." )
  28. nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2)
  29. %>
  30. <HTML>
  31. <HEAD>
  32. </HEAD>
  33. <BODY>
  34. <FORM action="savepic.asp" method=get>
  35. <%
  36. if isNumeric(nPic) then
  37. if (CInt( nPic ) >= CInt( (UBound(aPictureArray ) - 1 ) / 2 )) then
  38. nPic = nUpper
  39. end if
  40. else
  41. nPic = nUpper
  42. end if
  43. if CInt( nPic ) > 1 then
  44. %>
  45. <INPUT type=submit name="Auswahl" value="-"></INPUT>
  46. <%
  47. else
  48. %>
  49. <INPUT type=button value=" "></INPUT>
  50. <%
  51. end if
  52. %>
  53. <INPUT type=text name="CurrPic" value="<% = nPic %>" SIZE=3></INPUT>
  54. <%
  55. if CInt( nPic ) < CInt( nUpper ) then
  56. %>
  57. <INPUT type=submit name="Auswahl" value="+"></INPUT>
  58. <%
  59. else
  60. %>
  61. <INPUT type=button value=" "></INPUT>
  62. <%
  63. end if
  64. %>
  65. <INPUT type=submit name="Auswahl" value="$$2"></INPUT>
  66. </FORM>
  67. </BODY>
  68. </HTML>