home *** CD-ROM | disk | FTP | other *** search
/ ftp.americansys.com / 2014.06.ftp.americansys.com.tar / ftp.americansys.com / spamcrusherenterprise.exe / web / importaccounts.asp < prev    next >
Text File  |  2004-05-28  |  2KB  |  67 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. <!--#include FILE="timeout.asp"-->
  14.  
  15.         <p><img border="0" src="smflaglogo.jpg" align="middle"><font size="5">Spam 
  16.         Crusher Enterprise</font></p>
  17.  
  18.  
  19.         <p align="center"><font size="5">Processing...</font></p>
  20.  
  21.  
  22.         <%
  23.     EOLN = chr(13) + chr(10)
  24.  
  25.     PostData = ""
  26.     Dim biData
  27.     biData = Request.BinaryRead(Request.TotalBytes)
  28.     'Careful! It's binary! So, let's change it into
  29.     'something a bit more manageable.
  30.     For nIndex = 1 to LenB(biData)
  31.         PostData = PostData & Chr(AscB(MidB(biData,nIndex,1)))
  32.     Next
  33.  
  34.     ContentType = Request.ServerVariables("HTTP_CONTENT_TYPE")
  35.     ctArray = Split(ContentType, ";")
  36.     bArray = Split(Trim(ctArray(1)), "=")
  37.     Boundary = Trim(bArray(1))
  38.     'Now use that to split up all the variables!
  39.     FormData = Split(PostData, Boundary)
  40.     
  41.     
  42.     InfoEnd = InStr(FormData(1), EOLN & EOLN)
  43.     If InfoEnd > 0 Then
  44.         'Get info for this field, minus stuff at the end
  45.         VarInfo = Mid(FormData(1), 3, InfoEnd - 3)
  46.         'Get value for this field, being sure to skip
  47.         'CrLf pairs at the start and the CrLf at the end
  48.         FileContents = Mid(FormData(1), InfoEnd + 4, Len(FormData(1)) - InfoEnd - 7)
  49.         'Is this a file?
  50.     End If
  51.  
  52.     '*** FileContents contains the file data
  53.  
  54.     EOLN = chr(13) + chr(10)
  55.     Set SpamCrusher = Server.CreateObject("SpamCrusherEnterprise.SpamCrusherEnte.1")
  56.     SpamCrusher.SetCurrentUser(Session("UserId"))
  57.  
  58.     Error = ""
  59.     Error = SpamCrusher.ImportMailboxes(FileContents)
  60.     SpamCrusher.Logoff()
  61.  
  62.     Response.Redirect("accounts.asp")
  63.  
  64.     Response.Write("")
  65. %>          
  66.     </body>
  67. </html>