Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

51 lines
2.5 KiB

  1. <!--
  2. save configuration in filename specified by Form("savename")
  3. QueryString : as necessary for updcnfg.asp invocation, typically updates everything
  4. -->
  5. <!--#include virtual="/aspsamp/samples/adovbs.inc"-->
  6. <!--#include virtual="/scripts/raid/cache.asp"-->
  7. <!--#include virtual="/scripts/raid/updcnfg.asp"-->
  8. <%
  9. ForWriting = 2
  10. Set FileSys = Server.CreateObject("Scripting.FileSystemObject")
  11. Set SaveStream = FileSys.OpenTextFile( Server.MapPath("/scripts/raid/" & Session("Config") ), ForWriting, TRUE )
  12. SaveStream.WriteLine( "<%" )
  13. SaveStream.WriteLine( "Session(" & chr(34) & "FieldList" & chr(34) & ") =" & chr(34) & Session("FieldList") & chr(34) )
  14. SaveStream.WriteLine( "Session(" & chr(34) & "FieldSort" & chr(34) & ") =" & chr(34) & Session("Fieldsort") & chr(34) )
  15. SaveStream.WriteLine( "Session(" & chr(34) & "BugID" & chr(34) & ") =" & chr(34) & Session("BugID") & chr(34) )
  16. if iT > 0 then
  17. SaveStream.WriteLine( "Dim flt(" & iT-1 & ",3)" )
  18. for i = 0 to iT - 1
  19. SaveStream.WriteLine "flt(" & i & ",0) = " & chr(34) & FltArray(i,0) & chr(34)
  20. SaveStream.WriteLine "flt(" & i & ",1) = " & chr(34) & FltArray(i,1) & chr(34)
  21. SaveStream.WriteLine "flt(" & i & ",2) = " & chr(34) & FltArray(i,2) & chr(34)
  22. SaveStream.WriteLine "flt(" & i & ",3) = " & chr(34) & FltArray(i,3) & chr(34)
  23. next
  24. SaveStream.WriteLine( "Session(" & chr(34) & "FltArray" & chr(34) & ") = " & "flt" )
  25. else
  26. SaveStream.WriteLine( "Session(" & chr(34) & "FltArray" & chr(34) & ") = " & "null" )
  27. end if
  28. SaveStream.WriteLine( "Session(" & chr(34) & "Filter" & chr(34) & ") = " & chr(34) & Session("Filter") & chr(34) )
  29. SaveStream.WriteLine( "Session(" & chr(34) & "Config" & chr(34) & ") = " & chr(34) & Session("Config") & chr(34) )
  30. SaveStream.WriteLine( "Session(" & chr(34) & "DBSOURCE" & chr(34) & ") = " & Session("DBSOURCE") )
  31. SaveStream.WriteLine( chr(37) & ">" )
  32. rem SaveStream.WriteLine( "Response.Status = " & chr(34) & "302 redirect" & chr(34) )
  33. rem SaveStream.WriteLine( "Response.AddHeader " & chr(34) & "Location" & chr(34) & "," & chr(34) & "/scripts/raid/raid.asp" & chr(34) )
  34. Set InStream = FileSys.OpenTextFile( Server.MapPath("/scripts/raid/raid.asp" ) )
  35. Do Until InStream.AtEndOfStream
  36. SaveStream.WriteLine( InStream.ReadLine )
  37. loop
  38. InStream.Close
  39. SaveStream.Close
  40. rem Response.Status = "302 redirect"
  41. rem Response.AddHeader "Location" , "/scripts/raid/raid1.asp"
  42. %>