home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 December / Chip_2000-12_cd1.bin / tema / starof / f_0195 / savepic.asp
Text File  |  2000-02-22  |  975b  |  39 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
  12.  
  13.     aPictureArray = File_getDataVirtual( csFilePicture, ".", ";" )
  14.  
  15.     sCurrPic = Request( "CurrPic" )
  16.  
  17.     ' check if + or - was pressed
  18.     select case Request( "Auswahl" )
  19.         case "+"
  20.             if isNumeric( sCurrPic ) then
  21.                 sCurrPic = CStr( CLng( sCurrPic ) + 1 )
  22.             end if
  23.         case "-"
  24.             if isNumeric( sCurrPic ) then
  25.                 sCurrPic = CStr( CLng( sCurrPic ) - 1 )
  26.             end if
  27.     end select
  28.  
  29.     ' save picture name
  30.     if isNumeric( sCurrPic ) then
  31.         if (CInt( sCurrPic ) > 0) and (CInt( sCurrPic ) <= (UBound(aPictureArray ) -1 ) / 2 ) then
  32.             call File_writeVirtual( "currpic.txt", ".", sCurrPic )
  33.         end if
  34.     end if
  35.  
  36.     ' return to edit page
  37.     Response.Redirect( "./editpic.asp" )
  38. %>
  39.