home *** CD-ROM | disk | FTP | other *** search
/ ftp.americansys.com / 2014.06.ftp.americansys.com.tar / ftp.americansys.com / spamcrusherenterprise.exe / web / procaddrbook.asp < prev    next >
Text File  |  2004-04-02  |  2KB  |  68 lines

  1. <html>
  2.     <head>
  3.         <title>Spam Crusher</title>
  4.         <meta http-equiv="Content-Language" content="en-us">
  5.         <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
  6.         <meta name="ProgId" content="FrontPage.Editor.Document">
  7.         <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
  8.     </head>
  9.     <body>
  10.         <script LANGUAGE="VBScript" RUNAT="Server">
  11.         </script>
  12.         
  13.  
  14.         <p><img border="0" src="smflaglogo.jpg" align="middle"><font size="5">Spam 
  15.         Crusher Enterprise</font></p>
  16.  
  17.  
  18.         <p align="center"><font size="5">Processing...</font></p>
  19.  
  20.  
  21.         <%
  22.     EOLN = chr(13) + chr(10)
  23.  
  24.     PostData = ""
  25.     Dim biData
  26.     biData = Request.BinaryRead(Request.TotalBytes)
  27.     'Careful! It's binary! So, let's change it into
  28.     'something a bit more manageable.
  29.     For nIndex = 1 to LenB(biData)
  30.         PostData = PostData & Chr(AscB(MidB(biData,nIndex,1)))
  31.     Next
  32.  
  33.     ContentType = Request.ServerVariables("HTTP_CONTENT_TYPE")
  34.     ctArray = Split(ContentType, ";")
  35.     bArray = Split(Trim(ctArray(1)), "=")
  36.     Boundary = Trim(bArray(1))
  37.     'Now use that to split up all the variables!
  38.     FormData = Split(PostData, Boundary)
  39.     
  40.     
  41.     InfoEnd = InStr(FormData(1), EOLN & EOLN)
  42.     If InfoEnd > 0 Then
  43.         'Get info for this field, minus stuff at the end
  44.         VarInfo = Mid(FormData(1), 3, InfoEnd - 3)
  45.         'Get value for this field, being sure to skip
  46.         'CrLf pairs at the start and the CrLf at the end
  47.         FileContents = Mid(FormData(1), InfoEnd + 4, Len(FormData(1)) - InfoEnd - 7)
  48.         'Is this a file?
  49.     End If
  50.  
  51.     '*** FileContents contains the file data
  52.  
  53.     EOLN = chr(13) + chr(10)
  54.     Set SpamCrusher = Server.CreateObject("SpamCrusherEnterprise.SpamCrusherEnte.1")
  55.     SpamCrusher.SetCurrentUser(Session("UserId"))
  56.  
  57.     Error = ""
  58.     Error = SpamCrusher.ImportAddressBook(FileContents)
  59.     SpamCrusher.Logoff()
  60.  
  61.     Response.Write(FileContents)
  62.  
  63.     Response.Redirect("friends.asp")
  64.  
  65.     Response.Write("")
  66. %>          
  67.     </body>
  68. </html>