home *** CD-ROM | disk | FTP | other *** search
/ PC World 2003 March / PCWorld_2003-03_cd.bin / Software / Vyzkuste / openoffice / f_0214 / savepic.asp
Text File  |  2000-09-18  |  975b  |  40 lines

  1. <%
  2.     Option Explicit
  3.     Response.Expires = 0
  4.     Response.Buffer = True
  5. %>
  6.  
  7. <!-- #include file = "common.inc" -->
  8.  
  9. <%
  10.     ' get new picture
  11.     Dim sCurrPic,aPictureArray, nUpper, nCurrPic
  12.  
  13.     aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
  14.     nUpper = CInt( (UBound(aPictureArray) - 1 ) / 2)
  15.  
  16.     sCurrPic = Request( "CurrPic" )
  17.  
  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
  29.  
  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
  36.  
  37.     ' return to edit page
  38.     Response.Redirect( "./editpic.asp" )
  39. %>
  40.