Solved

SQL Update script not working

Posted on 2010-08-31
11
684 Views
Last Modified: 2012-05-10
Hi all, I have SQL script that is not working. I attached the entire code, what I need is for line 1050:    

DataC.Execute("INSERT INTO " & HDW_TABLENAME & " (" & qFields & ") VALUES(" & qValues & ")")

to be an UPDATE...not INSERT. Any help would be greatly appreciated!Thanks in advance

Thanks in advance!
Jon
<%@LANGUAGE="VBSCRIPT"%>
<%
  ' NOTE: There are a lot of configuration parameters in this fist section. Please read the
  '       comments located before each configuration parameters. Be sure to keep a copy of
  '       the original file before changing anything.


  ' Allowed files (extensions)
  Const C_ALLOWED_EXTENSIONS = "('jpg','gif','png','bmp','doc','pdf','ppt','pps','xls')"

  '*************************************************************************************************
  '** Possible values are "CDOSYS", "CDONTS", "ASPEmail", "ASPMail", "Jmail"  ' line #5            *
  '*************************************************************************************************
  Const C_MAIL_USE = "CDOSYS"
  
  
  '*************************************************************************************************
  '** If your email server is not your web server, then enter the address in the following line    *
  '** Note for Godaddy users: The mail server is "relay-hosting.secureserver.net"                  *
  '** Note for 1and1.com users: The mail server is "mrelay.perfora.net"                            *
  '** Note for 1and1.co.uk and 1and1.de users: The mail server is "mrvnet.kundenserver.de"         *
  '*************************************************************************************************
  Const SMTP_SERVER = "NJ-Exchange"     
  

  '*************************************************************************************************
  '** Authentication required? If yes, specify username and password                               *
  '*************************************************************************************************
  Const HDW_USE_AUTHENTICATION = False
  Const HDW_AUTH_USERNAME = ""
  Const HDW_AUTH_PASSWORD = ""


  '*************************************************************************************************
  '** Send emails? ... Save database? ... use the following two lines to enable disable features   *
  '*************************************************************************************************
  Const C_SEND_EMAILS = True
  Const C_SAVE_DATABASE = True
  
  
  '*************************************************************************************************
  '** send CC to another emails, separated by semicolon,                                           *
  '** example: Const HDW_SEND_CC_TO = "email-1@domain.com;email-2@domain.com"                      *
  '*************************************************************************************************
  Const HDW_SEND_CC_TO = ""
  

  '*************************************************************************************************
  '** send CC to the user with a "Thank you message"                                               *
  '** If enabled you MUST specify the name of the user's email field in the form                   *
  '*************************************************************************************************
  Const HDW_SEND_THANKYOU = True
  Const HDW_USER_EMAIL_FIELD_NAME = "email"
  Const HDW_INCLUDE_SUBMITTED_DATA = True
  Const HDW_THANKYOU_SUBJECT = "Thank you for your message."
  Const HDW_THANKYOU_MSG = "Thank you for your message. We will reply you as soon as possible."
  
  
  '*************************************************************************************************
  '** Email subject, you can change it here                                                        *
  '*************************************************************************************************
  Dim emailsubject
  emailsubject= "Form sent from " & Request.ServerVariables("SERVER_NAME")
  
  
  '*************************************************************************************************
  '** Use the email and/or subject entered by the user as FROM/SUBJECT.                            *
  '** IMPORTANT!!! You need to specify the name of the email/subject fields in your form.          *
  '*************************************************************************************************
  Const HDW_FROM_EMAIL_FIELD_NAME = ""
  Const HDW_SUBJECT_FIELD_NAME = ""
  

  '*************************************************************************************************
  '** Include extra fieds? (country, IP, referer, etc...)                                          *
  '*************************************************************************************************
  Const HDW_INCLUDE_EXTRA_FIELDS = True  

  
  '*************************************************************************************************  
  '** Exclude fields, add one AddExcludedField call for each excluded field                        *
  '*************************************************************************************************
  Dim excluded_fields(100), excluded_fields_count : excluded_fields_count = 0
  AddExcludedField "submit"
  AddExcludedField "Submit"
  AddExcludedField "hdcaptcha"
  AddExcludedField "hdwfail"
  AddExcludedField "sample_excluded_field" 
  
    
  '*************************************************************************************************
  '** Fix destination email. This helps to increate the form security                              *
  '** Example: Const HDW_FIX_DESTINATION_EMAIL = "email@sample.com"                                *
  '*************************************************************************************************
  Const HDW_FIX_DESTINATION_EMAIL = ""    


  '*************************************************************************************************
  '** Set this param to true to resend the info as GET parameters to the "Thank You" page.         *
  '*************************************************************************************************
  Const HDW_ENABLE_DEBUG_MESSAGES = False  

  
  '*************************************************************************************************
  '** Set this param to true to resend the info as GET parameters to the "Thank You" page.         *
  '*************************************************************************************************
  Const HOTDW_RESEND_PARAMS = False

  
  '*************************************************************************************************
  '** Some antivirus prevent the filesystem object. In that case you can disable it.               *
  '*************************************************************************************************
  Const USE_FILESYSTEM_OBJECT = True
  
  
  '*************************************************************************************************
  '** use HDW_ID autonumerical?                                                                    *
  '*************************************************************************************************  
  Dim USE_AUTO_NUMERICAL  
  USE_AUTO_NUMERICAL = True


%>
<!--METADATA TYPE="typelib"
      UUID="00000205-0000-0010-8000-00AA006D2EA4"
     NAME="ADODB Type Library"
-->
<%
  Server.ScriptTimeout = 1000000000
  Response.Expires = 0
  Response.Buffer = True
  Const SMTP_PORT = 25
  Const HDW_F2M_EMAIL = "hdwemail"
  Const HDW_F2M_OK = "hdwok"
  Const HDW_F2M_NO_OK = "hdwnook"
  Const HDW_F2M_UPLOADFOLDER = "hdwuploadfolder"
  Dim localpath, fixedColumns
  fixedColumns = Array ("Country","IP","Referer","Server Time","Browser","User Agent")
  localpath = Server.MapPath("Form2Mail.asp.mdb")
  localpath = Left(localpath, Len(localpath)-Len("Form2Mail.asp.mdb") )
  Dim fso, MyFile
  Dim Attachments, globalbuffer
  Attachments = False  ' Do not modify this
  Dim countryname(212)
  Dim emailaddress, fromaddress, body, item, getStr, uploadfolder
  Dim csvFile(100), postedFields(1000,2)
  Dim cPostedFields, CSVString
  cPostedFields = 0
  uploadfolder= Request(HDW_F2M_UPLOADFOLDER)
  Dim HDW_TABLENAME
  Const HDW_TABLENAME_ITEM = "hdwtablename"
  SetCountryNames  

  ' To Email Address
  If (InStr(1,Request.ServerVariables("CONTENT_TYPE"), "multipart/form-data", 1) <= 0) Then 
      emailaddress = Request(HDW_F2M_EMAIL)
      HDW_TABLENAME = Request(HDW_TABLENAME_ITEM)
  End If    
  emailaddress = Replace(emailaddress,"+","@")

  ' From Email Address
  fromaddress = emailaddress

  body ="<strong>SUBMITTED INFORMATION</strong><br />" &_
        "<strong>***************************</strong><br />"

  getStr = ""

  If C_SAVE_DATABASE Then Set fso = CreateObject("Scripting.FileSystemObject")

  If (InStr(1,Request.ServerVariables("CONTENT_TYPE"), "multipart/form-data", 1) <= 0) Then
     Dim name
     for i = 1 to Request.Form.Count
       for each name in Request.Form
         if (Request.Form(name) is Request.Form(i)) AND (notInThisArray(name)) then
           body = body & "<strong>"&name&":</strong> "&Request.Form(name)&"<br /><br />"
           getStr = getStr & "&"&name&"="&Server.URLEncode(Request.Form(name))
           AddPostedField name, Request.Form(name)
         end if
       next
     next
     for i = 1 to Request.QueryString.Count
       for each name in Request.QueryString
         if (Request.QueryString(name) is Request.QueryString(i)) AND (notInThisArray(name)) then
           body = body & "<strong>"&name&":</strong> "&Request.QueryString(name)&"<br /><br />"
           getStr = getStr & "&"&name&"="&Server.URLEncode(Request.QueryString(name))
           AddPostedField name, Request.QueryString(name)
         end if
       next
     next
     uploadfolder = localpath & "saved_forms\" & uploadfolder & "_" & Left(getHashOfString(Request.ServerVariables("SERVER_NAME")),4)
     If C_SAVE_DATABASE Then CreateFiles
     If HDW_FIX_DESTINATION_EMAIL <> "" Then emailaddress = HDW_FIX_DESTINATION_EMAIL
     If (HDW_FROM_EMAIL_FIELD_NAME <> "") Then fromaddress = Request(HDW_FROM_EMAIL_FIELD_NAME)
     If (HDW_SUBJECT_FIELD_NAME <> "") Then emailsubject = Request(HDW_SUBJECT_FIELD_NAME)
  Else
    Dim UploadRequest, byteCount, RequestBin, keys, i, shortuploadfolder, tfname
    Set UploadRequest = CreateObject("Scripting.Dictionary")
    byteCount = Request.TotalBytes
    RequestBin = Request.BinaryRead(byteCount)
    BuildUploadRequest  RequestBin
    Attachments = True
    keys = UploadRequest.Keys

    uploadfolder = UploadRequest.Item(HDW_F2M_UPLOADFOLDER).Item("Value")
    shortuploadfolder = uploadfolder & "_" & Left(getHashOfString(Request.ServerVariables("SERVER_NAME")),4)
    uploadfolder = localpath & "saved_forms\" & shortuploadfolder
    If C_SAVE_DATABASE Then CreateFiles

    For i = 0 To UploadRequest.Count -1
      If Not (UploadRequest.Item(keys(i)).Exists("FileName")) Then
          If (keys(i) <> HDW_F2M_OK) And (keys(i) <> HDW_F2M_NO_OK) And (keys(i) <> HDW_F2M_EMAIL) And notInThisArray(keys(i)) Then
             body = body & "<strong>"&keys(i)&":</strong> "&UploadRequest.Item(keys(i)).Item("Value")&"<br /><br />"
             getStr = getStr & "&"&keys(i)&"="&Server.URLEncode(UploadRequest.Item(keys(i)).Item("Value"))
             AddPostedField keys(i), UploadRequest.Item(keys(i)).Item("Value")
          End If
      Else
          If notInThisArray(keys(i)) Then
          	 If (Not isValidFile(UploadRequest.Item(keys(i)).Item("FileName"))) And (UploadRequest.Item(keys(i)).Item("FileName") <> "") Then
          	 	  Response.Redirect UploadRequest.Item(HDW_F2M_NO_OK).Item("Value")
          	 	  Response.End
          	 End If

          	 tfname = Replace(CStr(Date),"/","-") & "_" & Replace(CStr(Time),":","_")&"-" & UploadRequest.Item(keys(i)).Item("FileName")
          	 If UploadRequest.Item(keys(i)).Item("FileName") <> "" Then UploadRequest.Item(keys(i)).Item("Value").saveToFile ( uploadfolder & "\uploads\" & tfname)

             body = body & "<strong>"&keys(i)&":</strong> "&UploadRequest.Item(keys(i)).Item("FileName")&"<br /><br />"
             getStr = getStr & "&"&keys(i)&"="&Server.URLEncode(UploadRequest.Item(keys(i)).Item("FileName"))
             AddPostedField keys(i), "http://" & Request.ServerVariables("HTTP_HOST") & "/HDWASPForm2Database/saved_forms/" & shortuploadfolder & "/uploads/" & tfname
          End If
      End If      
    Next
    emailaddress = UploadRequest.Item(HDW_F2M_EMAIL).Item("Value")
    HDW_TABLENAME = UploadRequest.Item(HDW_TABLENAME_ITEM).Item("Value")
    emailaddress = Replace(emailaddress,"+","@")
    If HDW_FIX_DESTINATION_EMAIL <> "" Then emailaddress = HDW_FIX_DESTINATION_EMAIL
    fromaddress = emailaddress    
    If (HDW_FROM_EMAIL_FIELD_NAME <> "") Then fromaddress = UploadRequest.Item(HDW_FROM_EMAIL_FIELD_NAME).Item("Value")
    If (HDW_SUBJECT_FIELD_NAME <> "") Then emailsubject = UploadRequest.Item(HDW_SUBJECT_FIELD_NAME).Item("Value")
  End If


  getStr = "hdw=1" & getStr



  If C_SAVE_DATABASE Then SaveToDatabase

  If C_SEND_EMAILS Then
      If HDW_INCLUDE_EXTRA_FIELDS Then 
          body  = body & "<strong>SUPPORT INFORMATION</strong><br />" &_
                "<strong>***************************</strong><br />" &_
                "<strong>Country:</strong> " &getCountryID(Request.ServerVariables("REMOTE_HOST"))&"<br />" &_
                "<strong>User IP:</strong> "&Request.ServerVariables("REMOTE_ADDR")&"<br />" &_
                "<strong>User Host:</strong> "&Request.ServerVariables("REMOTE_HOST")&"<br />" &_
                "<strong>Referer:</strong> "&Request.ServerVariables("HTTP_REFERER")&"<br />" &_
                "<strong>Server Time:</strong> "&Date & " "& Time&"<br />" &_
                "<strong>Browser:</strong> "&ckbrowser(Request.ServerVariables("HTTP_USER_AGENT"))&"<br />" &_
                "<strong>User Agent:</strong> "&Request.ServerVariables("HTTP_USER_AGENT")&"<br /><br />" &_
                "<hr />Delivered by HotDreamweaver Form 2 Database and Mail Script"
      Else
          body  = body & _
                "<hr />Delivered by HotDreamweaver Form 2 Database and Mail Script"      
      End If
      
      If HDW_SEND_THANKYOU Then
          Dim thk_msg, thk_email
          thk_msg = HDW_THANKYOU_MSG
          If HDW_INCLUDE_SUBMITTED_DATA Then thk_msg = thk_msg & "<br /><br />" & body   
          If Not Attachments Then thk_email = Request.Form(HDW_USER_EMAIL_FIELD_NAME) Else thk_email = UploadRequest.Item(HDW_USER_EMAIL_FIELD_NAME).Item("Value")  
          If (thk_email = fromaddress) Then
              SendMail thk_email,emailaddress,HDW_THANKYOU_SUBJECT,thk_msg      
          Else 
              SendMail thk_email,fromaddress,HDW_THANKYOU_SUBJECT,thk_msg      
          End If
      End If      
      
      SendMail emailaddress, fromaddress, emailsubject, body
  End If


  If Attachments Then
    If (InStr(UploadRequest.Item(HDW_F2M_OK).Item("Value"),"?") > 0) And (getStr <> "") Then getStr = "&" & getStr Else getStr = "?" & getStr
    If Not HOTDW_RESEND_PARAMS Then getStr = ""
    Response.Redirect UploadRequest.Item(HDW_F2M_OK).Item("Value") & getStr
  Else
  	If (InStr(Request(HDW_F2M_OK),"?") > 0) And (getStr <> "") Then getStr = "&" & getStr Else getStr = "?" & getStr
  	If Not HOTDW_RESEND_PARAMS Then getStr = ""
    Response.Redirect Request(HDW_F2M_OK) & getStr
  End If


%>
<%

  Function SendMail (var_ToAddress, var_FromAddress, var_Subject, var_Message)

      Dim  smtp, objMail, i, j, value, iBp, Flds, Binary
      Dim objStream
      Dim Stm
      Dim buffer

      ' Send the email
      If C_MAIL_USE = "CDOSYS" Then
          Set objMail = Server.CreateObject("CDO.Message")
          'objMail.MailFormat = 1
          objMail.Configuration.Fields.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

          objMail.Configuration.Fields.Item _
              ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = SMTP_SERVER
          objMail.Configuration.Fields.Item _
              ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = SMTP_PORT

          If HDW_USE_AUTHENTICATION Then
              objMail.Configuration.Fields.Item _
                  ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1          
              objMail.Configuration.Fields.Item _
                  ("http://schemas.microsoft.com/cdo/configuration/sendusername") = HDW_AUTH_USERNAME
              objMail.Configuration.Fields.Item _ 
                  ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = HDW_AUTH_PASSWORD
          End If          

          objMail.Configuration.Fields.Update

          objMail.To = var_ToAddress
          objMail.From = var_FromAddress
          objMail.Subject = var_Subject
          objMail.HTMLBody = var_Message
          If (HDW_SEND_CC_TO <> "") Then objMail.CC = HDW_SEND_CC_TO
          If Attachments Then
            For i = 0 To UploadRequest.Count -1
              If (UploadRequest.Item(keys(i)).Exists("FileName")) Then

                  Set iBp = objMail.Attachments.Add
                  Set Flds = iBp.Fields
                  With Flds
                     .Item("urn:schemas:mailheader:content-type") = "binary; name="&UploadRequest.Item(keys(i)).Item("FileName")
                     .Item("urn:schemas:mailheader:content-transfer-encoding") = "base64"
                     .Update
                  End With

                  Set Stm = iBp.GetDecodedContentStream

                  Set value = UploadRequest.Item(keys(i)).Item("Value")
                  On Error Resume Next
                  Stm.Write (value.Read)
                  value.Position = 0 

                  Stm.Flush
                  Set Stm = Nothing
              End If
            Next
          End If

          On Error Resume Next
          objMail.Send

          Set objMail = Nothing
          If Err.Number = 0 Then SendMail = True   
          If (Err.Number <> 0) And (HDW_ENABLE_DEBUG_MESSAGES) Then
              Response.Write Err.Description
              Response.End
          End If          
      End If

      If (C_MAIL_USE = "CDONTS") Or ((C_MAIL_USE = "CDOSYS") AND (Err.Number <> 0)) Then
          Set objMail = Server.CreateObject("CDONTS.NewMail")
          objMail.MailFormat = 0
          objMail.BodyFormat = 0
          objMail.To = var_ToAddress
          If (HDW_SEND_CC_TO <> "") Then objMail.CC = HDW_SEND_CC_TO
          objMail.From = var_FromAddress
          objMail.Subject = var_Subject
          objMail.Body = var_Message
          If Attachments Then
            For i = 0 To UploadRequest.Count -1
              If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                  UploadRequest.Item(keys(i)).Item("Value").saveToFile (localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName"))
                  objMail.AttachFile localpath&"_uploadedfile-"&UploadRequest.Item(keys(i)).Item("FileName"), UploadRequest.Item(keys(i)).Item("FileName")
              End If
            Next
          End If

          objMail.Send
          Set objMail = Nothing
          If Err.Number = 0 Then SendMail = True Else SendMail = False
          
          If (Err.Number <> 0) And (HDW_ENABLE_DEBUG_MESSAGES) Then
              Response.Write Err.Description
              Response.End
          End If          

          If (Attachments) And (USE_FILESYSTEM_OBJECT) Then
            For i = 0 To UploadRequest.Count -1
              If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                  Set fso = CreateObject("Scripting.FileSystemObject")
                  Set MyFile = fso.GetFile( localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName") )
                  MyFile.Delete
              End If
            Next
          End If


      ElseIf (C_MAIL_USE = "ASPEmail") Then
          Set objMail = Server.CreateObject("Persits.MailSender")
          objMail.Host = SMTP_SERVER
          objMail.From = var_FromAddress
          objMail.FromName = var_FromAddress
          objMail.AddAddress var_ToAddress, var_ToAddress
          If HDW_USE_AUTHENTICATION Then
              objMail.Username = HDW_AUTH_USERNAME
              objMail.Password = HDW_AUTH_PASSWORD
          End If    
           If Attachments Then
             For i = 0 To UploadRequest.Count -1
               If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                   UploadRequest.Item(keys(i)).Item("Value").saveToFile (localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName"))
                   objMail.AddAttachment localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName")
               End If
             Next
           End If
          If (HDW_SEND_CC_TO <> "") Then objMail.AddCC HDW_SEND_CC_TO 
          objMail.Subject = var_Subject
          objMail.Body = var_Message
          objMail.IsHTML  = true
          objMail.Send

          If (Attachments) And (USE_FILESYSTEM_OBJECT) Then
            For i = 0 To UploadRequest.Count -1
              If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                  Set fso = CreateObject("Scripting.FileSystemObject")
                  Set MyFile = fso.GetFile( localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName") )
                  MyFile.Delete
              End If
            Next
          End If
          SendMail = True

      ElseIf (C_MAIL_USE = "ASPMail") Then
          set objMail = Server.CreateObject("SMTPsvg.Mailer")
          objMail.RemoteHost = SMTP_SERVER
          objMail.FromAddress = var_FromAddress
          objMail.FromName = var_FromAddress
          objMail.AddRecipient  var_ToAddress, var_ToAddress
          If (HDW_SEND_CC_TO <> "") Then objMail.AddCC HDW_SEND_CC_TO, HDW_SEND_CC_TO 
          If Attachments Then
            For i = 0 To UploadRequest.Count -1
              If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                 UploadRequest.Item(keys(i)).Item("Value").saveToFile (localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName"))
                 objMail.AddAttachment localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName")
              End If
            Next
          End If

          objMail.Subject = var_Subject
          objMail.BodyText = var_Message
          objMail.ContentType   = "text/html"
          objMail.SendMail

          If (Attachments) And (USE_FILESYSTEM_OBJECT) Then
            For i = 0 To UploadRequest.Count -1
              If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                  Set fso = CreateObject("Scripting.FileSystemObject")
                  Set MyFile = fso.GetFile( localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName") )
                  MyFile.Delete
              End If
            Next
          End If
          SendMail = True

      ElseIf (C_MAIL_USE = "Jmail") Then
          set objMail = Server.CreateObject("JMail.SMTPMail")
          objMail.ServerAddress  = SMTP_SERVER
          objMail.Sender  = var_FromAddress
          objMail.AddRecipient var_ToAddress
          If (HDW_SEND_CC_TO <> "") Then objMail.CC = HDW_SEND_CC_TO
           If Attachments Then
             For i = 0 To UploadRequest.Count -1
               If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                   UploadRequest.Item(keys(i)).Item("Value").saveToFile (localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName"))
                   objMail.AddAttachment localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName")
               End If
             Next
           End If

          objMail.Subject = var_Subject
          objMail.HTMLBody = var_Message
          objMail.Execute

          If (Attachments) And (USE_FILESYSTEM_OBJECT) Then
            For i = 0 To UploadRequest.Count -1
              If (UploadRequest.Item(keys(i)).Exists("FileName")) Then
                  Set fso = CreateObject("Scripting.FileSystemObject")
                  Set MyFile = fso.GetFile( localpath&"saved_forms\"&UploadRequest.Item(keys(i)).Item("FileName") )
                  MyFile.Delete
              End If
            Next
          End If
          SendMail = True
      End If

  End Function

%>
<%
Sub BuildUploadRequest(RequestBin)
	'Get the boundary
	Dim PosBeg, PosEnd, boundary, boundaryPos, Pos, Name, PosFile, PosBound, FileName, i, Value, gd, tmp
	Dim ContentType
	PosBeg = 1
	PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(13)))
	boundary = MidB(RequestBin,PosBeg,PosEnd-PosBeg)
	boundaryPos = InstrB(1,RequestBin,boundary)
	'Get all data inside the boundaries
	Do until (boundaryPos=InstrB(RequestBin,boundary & getByteString("--")))
		'Members variable of objects are put in a dictionary object
		Dim UploadControl
		Set UploadControl = CreateObject("Scripting.Dictionary")
		'Get an object name
		Pos = InstrB(BoundaryPos,RequestBin,getByteString("Content-Disposition"))
		Pos = InstrB(Pos,RequestBin,getByteString("name="))
		PosBeg = Pos+6
		PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(34)))
		Name = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))
		PosFile = InstrB(BoundaryPos,RequestBin,getByteString("filename="))
		PosBound = InstrB(PosEnd,RequestBin,boundary)
		'Test if object is of file type
		If  PosFile<>0 AND (PosFile<PosBound) Then
			'Get Filename, content-type and content of file
			PosBeg = PosFile + 10
			PosEnd =  InstrB(PosBeg,RequestBin,getByteString(chr(34)))
			FileName = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))
			'Add filename to dictionary object
			UploadControl.Add "FileName", CleanFileName(FileName)
			Pos = InstrB(PosEnd,RequestBin,getByteString("Content-Type:"))
			If Pos = 0 Then
			  PosEnd = PosEnd+1
			  ' Esto es por el problema de las machintosh con los
			  ' PDF que se esta tragando el context type
			Else
			  PosBeg = Pos+14
			  PosEnd = InstrB(PosBeg,RequestBin,getByteString(chr(13)))
			  'Add content-type to dictionary object
			  ContentType = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))
			  UploadControl.Add "ContentType",ContentType
			End If

			'Get content of object
			PosBeg = PosEnd+4
			tmp = PosBeg-1
			PosEnd = InstrB(PosBeg,RequestBin,boundary)-2
			Value = MidB(RequestBin,PosBeg,PosEnd-PosBeg)

			Set gd = CreateObject("ADODB.Stream")
            gd.Type = 1 ' adTypeBinary
            gd.Open
            gd.Write RequestBin
            gd.Flush
            gd.Position=tmp

            Set globalbuffer = CreateObject("ADODB.Stream")
            globalbuffer.Type = 1 ' adTypeBinary
            globalbuffer.Open
            On Error Resume Next
            globalbuffer.Write gd.Read(PosEnd-PosBeg)
            globalbuffer.Flush
            globalbuffer.Position=0

			 UploadControl.Add "Value" , globalbuffer
		Else
			'Get content of object
			Pos = InstrB(Pos,RequestBin,getByteString(chr(13)))
			PosBeg = Pos+4
			PosEnd = InstrB(PosBeg,RequestBin,boundary)-2
			Value = getString(MidB(RequestBin,PosBeg,PosEnd-PosBeg))

			UploadControl.Add "Value" , Value
		End If
		'Add content to dictionary object

		'Add dictionary object to main dictionary
	If Not UploadRequest.Exists(name) Then
     	    UploadRequest.Add name, UploadControl
     	Else
     	    ' este nuevo cambio es por los select tipo multiple,
     	    ' que la version original no se los tragaba
     	    UploadRequest.Item(name).Item("Value") = UploadRequest.Item(name).Item("Value") + ";"+Value
     	End If
		'Loop to next object
		BoundaryPos=InstrB(BoundaryPos+LenB(boundary),RequestBin,boundary)
	Loop

End Sub

'String to byte string conversion
Function getByteString(StringStr)
 Dim i, char
 For i = 1 to Len(StringStr)
 	char = Mid(StringStr,i,1)
	getByteString = getByteString & chrB(AscB(char))
 Next
End Function

'Byte string to string conversion
Function getString(StringBin)
 Dim intCount
 getString =""
 For intCount = 1 to LenB(StringBin)
	getString = getString & chr(AscB(MidB(StringBin,intCount,1)))
 Next
End Function

Function CleanFileName (fname)
  CleanFileName = Right(fname, Len(fname) - InStrRev(fname,"\"))
End Function

  Function getCountryID(ip)
      Dim cip
      cip = IPAddress2IPNumber(ip)
      On Error Resume Next
      Dim conn, index, rs
      Set conn = Server.CreateObject("ADODB.Connection")
      conn.open ("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("Form2Mail.asp.mdb") & ";Persist Security Info=False")
      Set rs = conn.Execute("SELECT country FROM iptocountry WHERE ip1<="&cip&" AND ip2>="&cip)
      If rs.EOF Then getCountryID = "LOCAL; INTRANET OR UNKNOWN" Else getCountryID = countryname(rs.Fields.Item("country"))
  End Function

  Function IPAddress2IPNumber(IPaddress)
    Dim i, pos, PrevPos, num
    If IPaddress = "" Then
      IPAddress2IPNumber = 0
    Else
      For i = 1 To 4
          pos = InStr(PrevPos + 1, IPaddress, ".", 1)
          If i = 4 Then pos = Len(IPaddress) + 1
          num = Int(Mid(IPaddress, PrevPos + 1, pos - PrevPos - 1))
          PrevPos = pos
          IPAddress2IPNumber = ((num Mod 256) * (256 ^ (4 - i))) + IPAddress2IPNumber
      Next
    End If
  End Function

  Function ereg(find,str)
      if Instr(1, str, find, 1) <> 0 Then
          ereg = True
      Else
          ereg = False
      End If
  End Function

  Function ckbrowser(user_agent)
      Dim browser
 	  if((ereg("Netscape", user_agent))) Then
 	    browser = "Netscape"
 	  elseif(ereg("Firefox", user_agent)) Then
 	    browser = "Firefox"
      elseif(ereg("Safari", user_agent)) Then
        browser = "Safari"
      elseif(ereg("SAFARI", user_agent)) Then
        browser = "SAFARI"
      elseif(ereg("MSIE", user_agent)) Then
        browser = "MSIE"
      elseif(ereg("Lynx", user_agent)) Then
        browser = "Lynx"
      elseif(ereg("Opera", user_agent)) Then
        browser = "Opera"
      elseif(ereg("Gecko", user_agent)) Then
        browser = "Mozilla"
      elseif(ereg("WebTV", user_agent)) Then
        browser = "WebTV"
      elseif(ereg("Konqueror", user_agent)) Then
        browser = "Konqueror"
      else
        browser = "bot"
      End If
      ckbrowser = browser
  End Function

  ' country list

  Sub SetCountryNames
      countryname(0)  = "UNKNOWN"
      countryname(1)  = "AFGHANISTAN"
      countryname(2)  = "ALBANIA"
      countryname(3)  = "ALGERIA"
      countryname(4)  = "AMERICAN SAMOA"
      countryname(5)  = "ANDORRA"
      countryname(6)  = "ANGOLA"
      countryname(7)  = "ANTIGUA AND BARBUDA"
      countryname(8)  = "ARGENTINA"
      countryname(9)  = "ARMENIA"
      countryname(10) = "AUSTRALIA"
      countryname(11) = "AUSTRIA"
      countryname(12) = "AZERBAIJAN"
      countryname(13) = "BAHAMAS"
      countryname(14) = "BAHRAIN"
      countryname(15) = "BANGLADESH"
      countryname(16) = "BARBADOS"
      countryname(17) = "BELARUS"
      countryname(18) = "BELGIUM"
      countryname(19) = "BELIZE"
      countryname(20) = "BENIN"
      countryname(21) = "BERMUDA"
      countryname(22) = "BHUTAN"
      countryname(23) = "BOLIVIA"
      countryname(24) = "BOSNIA AND HERZEGOVINA"
      countryname(25) = "BOTSWANA"
      countryname(26) = "BRAZIL"
      countryname(27) = "BRITISH INDIAN OCEAN TERRITORY"
      countryname(28) = "BRUNEI DARUSSALAM"
      countryname(29) = "BULGARIA"
      countryname(30) = "BURKINA FASO"
      countryname(31) = "BURUNDI"
      countryname(32) = "CAMBODIA"
      countryname(33) = "CAMEROON"
      countryname(34) = "CANADA"
      countryname(35) = "CAPE VERDE"
      countryname(36) = "CAYMAN ISLANDS"
      countryname(37) = "CENTRAL AFRICAN REPUBLIC"
      countryname(38) = "CHAD"
      countryname(39) = "CHILE"
      countryname(40) = "CHINA"
      countryname(41) = "COLOMBIA"
      countryname(42) = "COMOROS"
      countryname(43) = "CONGO"
      countryname(44) = "COOK ISLANDS"
      countryname(45) = "COSTA RICA"
      countryname(46) = "COTE D'IVOIRE"
      countryname(47) = "CROATIA"
      countryname(48) = "CUBA"
      countryname(49) = "CYPRUS"
      countryname(50) = "CZECH REPUBLIC"
      countryname(51) = "DENMARK"
      countryname(52) = "DJIBOUTI"
      countryname(53) = "DOMINICAN REPUBLIC"
      countryname(54) = "EAST TIMOR"
      countryname(55) = "ECUADOR"
      countryname(56) = "EGYPT"
      countryname(57) = "EL SALVADOR"
      countryname(58) = "EQUATORIAL GUINEA"
      countryname(59) = "ERITREA"
      countryname(60) = "ESTONIA"
      countryname(61) = "ETHIOPIA"
      countryname(62) = "FALKLAND ISLANDS (MALVINAS)"
      countryname(63) = "FAROE ISLANDS"
      countryname(64) = "FIJI"
      countryname(65) = "FINLAND"
      countryname(66) = "FRANCE"
      countryname(67) = "FRENCH POLYNESIA"
      countryname(68) = "GABON"
      countryname(69) = "GAMBIA"
      countryname(70) = "GEORGIA"
      countryname(71) = "GERMANY"
      countryname(72) = "GHANA"
      countryname(73) = "GIBRALTAR"
      countryname(74) = "GREECE"
      countryname(75) = "GREENLAND"
      countryname(76) = "GRENADA"
      countryname(77) = "GUADELOUPE"
      countryname(78) = "GUAM"
      countryname(79) = "GUATEMALA"
      countryname(80) = "GUINEA"
      countryname(81) = "GUINEA-BISSAU"
      countryname(82) = "HAITI"
      countryname(83) = "HOLY SEE(VATICAN CITY STATE)"
      countryname(84) = "HONDURAS"
      countryname(85) = "HONG KONG"
      countryname(86) = "HUNGARY"
      countryname(87) = "ICELAND"
      countryname(88) = "INDIA"
      countryname(89) = "INDONESIA"
      countryname(90) = "IRAQ"
      countryname(91) = "IRELAND"
      countryname(92) = "ISLAMIC REPUBLIC OF IRAN"
      countryname(93) = "ISRAEL"
      countryname(94) = "ITALY"
      countryname(95) = "JAMAICA"
      countryname(96) = "JAPAN"
      countryname(97) = "JORDAN"
      countryname(98) = "KAZAKHSTAN"
      countryname(99) = "KENYA"
      countryname(100) = "KIRIBATI"
      countryname(101) = "KUWAIT"
      countryname(102) = "KYRGYZSTAN"
      countryname(103) = "LAO PEOPLE'S DEMOCRATIC REPUBLIC"
      countryname(104) = "LATVIA"
      countryname(105) = "LEBANON"
      countryname(106) = "LESOTHO"
      countryname(107) = "LIBERIA"
      countryname(108) = "LIBYAN ARAB JAMAHIRIYA"
      countryname(109) = "LIECHTENSTEIN"
      countryname(110) = "LITHUANIA"
      countryname(111) = "LUXEMBOURG"
      countryname(112) = "MACAO"
      countryname(113) = "MADAGASCAR"
      countryname(114) = "MALAWI"
      countryname(115) = "MALAYSIA"
      countryname(116) = "MALDIVES"
      countryname(117) = "MALI"
      countryname(118) = "MALTA"
      countryname(119) = "MARTINIQUE"
      countryname(120) = "MAURITANIA"
      countryname(121) = "MAURITIUS"
      countryname(122) = "MEXICO"
      countryname(123) = "MONACO"
      countryname(124) = "MONGOLIA"
      countryname(125) = "MOROCCO"
      countryname(126) = "MOZAMBIQUE"
      countryname(127) = "MYANMAR"
      countryname(128) = "NAMIBIA"
      countryname(129) = "NAURU"
      countryname(130) = "NEPAL"
      countryname(131) = "NETHERLANDS"
      countryname(132) = "NETHERLANDS ANTILLES"
      countryname(133) = "NEW CALEDONIA"
      countryname(134) = "NEW ZEALAND"
      countryname(135) = "NICARAGUA"
      countryname(136) = "NIGER"
      countryname(137) = "NIGERIA"
      countryname(138) = "NORTHERN MARIANA ISLANDS"
      countryname(139) = "NORWAY"
      countryname(140) = "OMAN"
      countryname(141) = "PAKISTAN"
      countryname(142) = "PALAU"
      countryname(143) = "PALESTINIAN TERRITORY"
      countryname(144) = "PANAMA"
      countryname(145) = "PAPUA NEW GUINEA"
      countryname(146) = "PARAGUAY"
      countryname(147) = "PERU"
      countryname(148) = "PHILIPPINES"
      countryname(149) = "POLAND"
      countryname(150) = "PORTUGAL"
      countryname(151) = "PUERTO RICO"
      countryname(152) = "QATAR"
      countryname(153) = "REPUBLIC OF KOREA"
      countryname(154) = "REPUBLIC OF MOLDOVA"
      countryname(155) = "REUNION"
      countryname(156) = "ROMANIA"
      countryname(157) = "RUSSIAN FEDERATION"
      countryname(158) = "RWANDA"
      countryname(159) = "SAMOA"
      countryname(160) = "SAN MARINO"
      countryname(161) = "SAO TOME AND PRINCIPE"
      countryname(162) = "SAUDI ARABIA"
      countryname(163) = "SENEGAL"
      countryname(165) = "SERBIA AND MONTENEGRO"
      countryname(166) = "SEYCHELLES"
      countryname(167) = "SIERRA LEONE"
      countryname(168) = "SINGAPORE"
      countryname(169) = "SLOVAKIA"
      countryname(170) = "SLOVENIA"
      countryname(171) = "SOLOMON ISLANDS"
      countryname(172) = "SOMALIA"
      countryname(173) = "SOUTH AFRICA"
      countryname(174) = "SPAIN"
      countryname(175) = "SRI LANKA"
      countryname(176) = "SUDAN"
      countryname(177) = "SURINAME"
      countryname(178) = "SWAZILAND"
      countryname(179) = "SWEDEN"
      countryname(180) = "SWITZERLAND"
      countryname(181) = "SYRIAN ARAB REPUBLIC"
      countryname(182) = "TAIWAN"
      countryname(183) = "TAJIKISTAN"
      countryname(184) = "THAILAND"
      countryname(185) = "THE DEMOCRATIC REPUBLIC OF THE CONGO"
      countryname(186) = "THE FORMER YUGOSLAV REPUBLIC OF MACEDONIA"
      countryname(187) = "TOGO"
      countryname(188) = "TOKELAU"
      countryname(189) = "TONGA"
      countryname(190) = "TRINIDAD AND TOBAGO"
      countryname(191) = "TUNISIA"
      countryname(192) = "TURKEY"
      countryname(193) = "TURKMENISTAN"
      countryname(194) = "TUVALU"
      countryname(195) = "UGANDA"
      countryname(196) = "UKRAINE"
      countryname(197) = "UNITED ARAB EMIRATES"
      countryname(198) = "UNITED KINGDOM"
      countryname(199) = "UNITED REPUBLIC OF TANZANIA"
      countryname(200) = "UNITED STATES"
      countryname(201) = "URUGUAY"
      countryname(202) = "UZBEKISTAN"
      countryname(203) = "VANUATU"
      countryname(204) = "VENEZUELA"
      countryname(205) = "VIET NAM"
      countryname(206) = "VIRGIN ISLANDS"
      countryname(207) = "WESTERN SAHARA"
      countryname(208) = "YEMEN"
      countryname(209) = "ZAMBIA"
      countryname(210) = "ZIMBABWE"
  End Sub

  Sub AddExcludedField(value)
     excluded_fields_count = excluded_fields_count + 1
     excluded_fields(excluded_fields_count) = value
  End Sub

  Function notInThisArray(value)
    Dim i, found
    found = False
    For i = 1 To excluded_fields_count
       If (excluded_fields(i)=value) Then found = True
    Next
    notInThisArray = Not found
  End Function

  Sub AddPostedField (name, value)
     cPostedFields = cPostedFields + 1
     postedFields(cPostedFields,1) = name
     postedFields(cPostedFields,2) = value
  End Sub

  Sub CreateFiles
     If Not fso.FolderExists(uploadfolder) Then fso.CreateFolder(uploadfolder)
     If Not fso.FolderExists(uploadfolder&"\uploads") Then fso.CreateFolder(uploadfolder&"\uploads")
  End Sub
  
  Function FieldExists(tbl, field)
     Dim k, fExists
     k = 0
     fExists = false
     While (k < tbl.Columns.Count) And (Not fExists)
       If (UCase(tbl.Columns.Item(k)) = UCase(field)) Then fExists = True
       k = k + 1
     WEnd
     FieldExists = fExists
  End Function

  Sub SaveToDatabase
    %><!--#include file="config.inc.asp" --><%
    If (HDW_DATABASE_TYPE = "MSSQL") Then USE_AUTO_NUMERICAL = False
    Dim cat, tbl
    Set cat = Server.CreateObject ("ADOX.Catalog")  
    Set cat.ActiveConnection = DataC
 

    ' look for the table to know if it already exists
    Dim i, FoundTable
    i = 0
    FoundTable = false
    While (i < cat.Tables.Count) And (Not FoundTable)
        If UCase(cat.Tables(i).Name) = UCase(HDW_TABLENAME) Then FoundTable = True
        i = i + 1
    WEnd

    ' create (if needed) and select table
    If Not FoundTable Then
        If (HDW_DATABASE_TYPE = "MSSQL") Then
            DataC.Execute ("CREATE TABLE  " & HDW_TABLENAME & " (" & HDW_MAIN_FIELD & " INTEGER NOT NULL);")
            Response.Write "This action was needed to create the table. Please refresh (F5) this page to complete the submission."
            Response.End
        Else
            Set tbl = Server.CreateObject ("ADOX.Table")
            With tbl
                .Name = HDW_TABLENAME
                Set .ParentCatalog = cat
                .Columns.Append HDW_MAIN_FIELD, adInteger
                If USE_AUTO_NUMERICAL Then .Columns(HDW_MAIN_FIELD).Properties("AutoIncrement") = True
            End With
            cat.Tables.Append tbl   
        End If 
    Else
        Set tbl = cat.Tables(HDW_TABLENAME)
    End If
    
    ' if the main autoincrement field does not exists, then create it
    If Not FieldExists(tbl, HDW_MAIN_FIELD) Then
        tbl.Columns.Append HDW_MAIN_FIELD, adInteger
        If USE_AUTO_NUMERICAL Then tbl.Columns(HDW_MAIN_FIELD).Properties("AutoIncrement") = True
    End If 
    
    ' Add the remaining posted fields
    For i = 1 to cPostedFields
        If Not FieldExists(tbl,postedFields(i,1)) Then 
            If (HDW_DATABASE_TYPE = "MSSQL") Then
                DataC.Execute ("ALTER TABLE " & HDW_TABLENAME & "  ADD [" & postedFields(i,1) & "] VARCHAR(1000) DEFAULT ''")
            Else
                tbl.Columns.Append postedFields(i,1), adLongVarWChar
            End If    
        End If    
    Next  
    
    ' Add the fixed fields
    If (HDW_INCLUDE_EXTRA_FIELDS) Then
        If (HDW_DATABASE_TYPE = "MSSQL") Then
            If Not FieldExists(tbl, "hdw_Country") Then DataC.Execute ("ALTER TABLE  " & HDW_TABLENAME & " ADD hdw_Country VARCHAR(1000) DEFAULT ''")       
            If Not FieldExists(tbl, "hdw_IP") Then  DataC.Execute ("ALTER TABLE " & HDW_TABLENAME & "  ADD hdw_IP VARCHAR(1000) DEFAULT ''")
            If Not FieldExists(tbl, "hdw_ServerTime") Then  DataC.Execute ("ALTER TABLE " & HDW_TABLENAME & "  ADD hdw_ServerTime VARCHAR(1000) DEFAULT ''")        
            If Not FieldExists(tbl, "hdw_Referer") Then  DataC.Execute ("ALTER TABLE " & HDW_TABLENAME & "  ADD hdw_Referer VARCHAR(1000) DEFAULT ''")
            If Not FieldExists(tbl, "hdw_Browser") Then  DataC.Execute ("ALTER TABLE " & HDW_TABLENAME & "  ADD hdw_Browser VARCHAR(1000) DEFAULT ''")        
            If Not FieldExists(tbl, "hdw_UserAgent") Then  DataC.Execute ("ALTER TABLE  " & HDW_TABLENAME & " ADD hdw_UserAgent VARCHAR(1000) DEFAULT ''")                
        Else
            If Not FieldExists(tbl, "hdw_Country") Then tbl.Columns.Append "hdw_Country", adLongVarWChar
            If Not FieldExists(tbl, "hdw_IP") Then tbl.Columns.Append "hdw_IP", adLongVarWChar
            If Not FieldExists(tbl, "hdw_ServerTime") Then tbl.Columns.Append "hdw_ServerTime", adLongVarWChar
            If Not FieldExists(tbl, "hdw_Referer") Then tbl.Columns.Append "hdw_Referer", adLongVarWChar
            If Not FieldExists(tbl, "hdw_Browser") Then tbl.Columns.Append "hdw_Browser", adLongVarWChar
            If Not FieldExists(tbl, "hdw_UserAgent") Then tbl.Columns.Append "hdw_UserAgent", adLongVarWChar
        End If    
    End If
    
    Set cat = Nothing
    Set tbl = Nothing
    
    Dim qFields, qValues
    ' generate and execute the insert query
    For i = 1 to cPostedFields
        ' postedFields(i,1) contiene el field
        qFields = qFields & "["&postedFields(i,1)&"],"
        ' postedFields(i,2) contiene el value
        qValues = qValues & "'"&Replace(postedFields(i,2), "'", "''")&"',"
    Next  
    
    ' estos campos se salvan siempre:
    '   te da el country
    '   te da el IP
    '  te da el referer
    '      te da la fecha
    '   te da el useragent
    '  te da el browser

    If Not USE_AUTO_NUMERICAL Then qFields = qFields & "HDW_ID," 

    If Not USE_AUTO_NUMERICAL Then
        Dim xd
        xd = Date
        Randomize
        qValues = qValues & "" & Hour(Time) & Minute(Time) & Second(Time) & Int((999 - 100 + 1) * Rnd + 999) & ","        
    End If

    If (HDW_INCLUDE_EXTRA_FIELDS) Then      
        qFields = qFields & "hdw_Country,"
        qFields = qFields & "hdw_IP,"
        qFields = qFields & "hdw_ServerTime,"
        qFields = qFields & "hdw_Referer,"
        qFields = qFields & "hdw_Browser,"
        qFields = qFields & "hdw_UserAgent,"    
    
        qValues = qValues & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''")&"',"
        qValues = qValues & "'"&Replace(Request.ServerVariables("REMOTE_ADDR"),"''","''")&"',"
        qValues = qValues & "'"&Replace(Date & " "& Time,"''","''")&"',"
        qValues = qValues & "'"&Replace(Request.ServerVariables("HTTP_REFERER"),"''","''")&"',"
        qValues = qValues & "'"&Replace(ckbrowser(Request.ServerVariables("HTTP_USER_AGENT")),"''","''")&"',"
        qValues = qValues & "'"&Replace(Replace(Request.ServerVariables("HTTP_USER_AGENT"),",",";"),"''","''")&"',"
    End If
    
    qFields = Left(qFields, Len(qFields)-1)
    qValues = Left(qValues, Len(qValues)-1)
    DataC.Execute("INSERT INTO " & HDW_TABLENAME & " (" & qFields & ") VALUES(" & qValues & ")")
    

    If IsObject(DataC) Then DataC.Close
  End Sub

  Function isValidFile (str)
     Dim ext
     ext = "'" & UCase(Right(str, Len(str)-InStrRev(str,"."))) & "'"
     isValidFile = (InStr(UCase(C_ALLOWED_EXTENSIONS),ext) > 0)
  End Function

%><SCRIPT LANGUAGE=JavaScript RUNAT=SERVER>

var state = new Array (0x67452301,0xefcdab89,0x98badcfe,0x10325476);
var count = new Array (0,0);
var buffer = new Array (64);
var finals = null;

var padding = new Array (
     0x80, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
  );

function init ()
{
  state = new Array (0x67452301,0xefcdab89,0x98badcfe,0x10325476);
  count = new Array (0,0);
  buffer = new Array (64);
  result = true;
}

function rotate_left (x, n)
{
  return (x << n) | (x >>> (32 - n));
}

function uadd2 (a, b)
{
   var xaa, xbb;
   xaa = (a & 0xffffffff);
   xbb = (b & 0xffffffff);
   xaa += xbb;
   return (xaa & 0xffffffff);
}

function uadd3 (a, b, c)
{
  return uadd2(uadd2(a, b), c);
}

function uadd (a, b, c, d)
{
  return uadd2(uadd3(a, b, c), d);
}

function FF (a, b, c, d, x, s, ac)
{
  a = uadd(a, ((b & c) | (~b & d)), x, ac);
  return uadd(rotate_left(a, s), b);
}

function GG (a, b, c, d, x, s, ac)
{
  a = uadd(a, ((b & d) | (c & ~d)), x, ac);
  return uadd(rotate_left(a, s), b);
}

function HH (a, b, c, d, x, s, ac)
{
  a = uadd(a, (b ^ c ^ d), x, ac);
  return uadd(rotate_left(a, s) , b);
}

function II (a, b, c, d, x, s, ac)
{
  a = uadd(a, (c ^ (b | ~d)), x, ac);
  return uadd(rotate_left(a, s), b);
}

function Decode (bufferdec, len, shift)
{
   var out = new Array (16);
   var i, j;
   for (i = j = 0; j < len; i++, j += 4)
   {
     out[i] = ( (bufferdec[j + shift] & 0xff)) |
           (( (bufferdec[j + 1 + shift] & 0xff)) << 8) |
           (( (bufferdec[j + 2 + shift] & 0xff)) << 16) |
           (( (bufferdec[j + 3 + shift] & 0xff)) << 24);
   }
   return out;
}

function Transform (buffer1, shift)
{
  var
      a = state[0],
      b = state[1],
      c = state[2],
      d = state[3],
      x = new Array();

  x = Decode(buffer1, 64, shift);

  /* Round 1 */
  a = FF (a, b, c, d, x[ 0],   7, 0xd76aa478); /* 1 */
  d = FF (d, a, b, c, x[ 1],  12, 0xe8c7b756); /* 2 */
  c = FF (c, d, a, b, x[ 2],  17, 0x242070db); /* 3 */
  b = FF (b, c, d, a, x[ 3],  22, 0xc1bdceee); /* 4 */
  a = FF (a, b, c, d, x[ 4],   7, 0xf57c0faf); /* 5 */
  d = FF (d, a, b, c, x[ 5],  12, 0x4787c62a); /* 6 */
  c = FF (c, d, a, b, x[ 6],  17, 0xa8304613); /* 7 */
  b = FF (b, c, d, a, x[ 7],  22, 0xfd469501); /* 8 */
  a = FF (a, b, c, d, x[ 8],   7, 0x698098d8); /* 9 */
  d = FF (d, a, b, c, x[ 9],  12, 0x8b44f7af); /* 10 */
  c = FF (c, d, a, b, x[10],  17, 0xffff5bb1); /* 11 */
  b = FF (b, c, d, a, x[11],  22, 0x895cd7be); /* 12 */
  a = FF (a, b, c, d, x[12],   7, 0x6b901122); /* 13 */
  d = FF (d, a, b, c, x[13],  12, 0xfd987193); /* 14 */
  c = FF (c, d, a, b, x[14],  17, 0xa679438e); /* 15 */
  b = FF (b, c, d, a, x[15],  22, 0x49b40821); /* 16 */

  /* Round 2 */
  a = GG (a, b, c, d, x[ 1],   5, 0xf61e2562); /* 17 */
  d = GG (d, a, b, c, x[ 6],   9, 0xc040b340); /* 18 */
  c = GG (c, d, a, b, x[11],  14, 0x265e5a51); /* 19 */
  b = GG (b, c, d, a, x[ 0],  20, 0xe9b6c7aa); /* 20 */
  a = GG (a, b, c, d, x[ 5],   5, 0xd62f105d); /* 21 */
  d = GG (d, a, b, c, x[10],   9,  0x2441453); /* 22 */
  c = GG (c, d, a, b, x[15],  14, 0xd8a1e681); /* 23 */
  b = GG (b, c, d, a, x[ 4],  20, 0xe7d3fbc8); /* 24 */
  a = GG (a, b, c, d, x[ 9],   5, 0x21e1cde6); /* 25 */
  d = GG (d, a, b, c, x[14],   9, 0xc33707d6); /* 26 */
  c = GG (c, d, a, b, x[ 3],  14, 0xf4d50d87); /* 27 */
  b = GG (b, c, d, a, x[ 8],  20, 0x455a14ed); /* 28 */
  a = GG (a, b, c, d, x[13],   5, 0xa9e3e905); /* 29 */
  d = GG (d, a, b, c, x[ 2],   9, 0xfcefa3f8); /* 30 */
  c = GG (c, d, a, b, x[ 7],  14, 0x676f02d9); /* 31 */
  b = GG (b, c, d, a, x[12],  20, 0x8d2a4c8a); /* 32 */

  /* Round 3 */
  a = HH (a, b, c, d, x[ 5],   4, 0xfffa3942); /* 33 */
  d = HH (d, a, b, c, x[ 8],  11, 0x8771f681); /* 34 */
  c = HH (c, d, a, b, x[11],  16, 0x6d9d6122); /* 35 */
  b = HH (b, c, d, a, x[14],  23, 0xfde5380c); /* 36 */
  a = HH (a, b, c, d, x[ 1],   4, 0xa4beea44); /* 37 */
  d = HH (d, a, b, c, x[ 4],  11, 0x4bdecfa9); /* 38 */
  c = HH (c, d, a, b, x[ 7],  16, 0xf6bb4b60); /* 39 */
  b = HH (b, c, d, a, x[10],  23, 0xbebfbc70); /* 40 */
  a = HH (a, b, c, d, x[13],   4, 0x289b7ec6); /* 41 */
  d = HH (d, a, b, c, x[ 0],  11, 0xeaa127fa); /* 42 */
  c = HH (c, d, a, b, x[ 3],  16, 0xd4ef3085); /* 43 */
  b = HH (b, c, d, a, x[ 6],  23,  0x4881d05); /* 44 */
  a = HH (a, b, c, d, x[ 9],   4, 0xd9d4d039); /* 45 */
  d = HH (d, a, b, c, x[12],  11, 0xe6db99e5); /* 46 */
  c = HH (c, d, a, b, x[15],  16, 0x1fa27cf8); /* 47 */
  b = HH (b, c, d, a, x[ 2],  23, 0xc4ac5665); /* 48 */

  /* Round 4 */
  a = II (a, b, c, d, x[ 0],   6, 0xf4292244); /* 49 */
  d = II (d, a, b, c, x[ 7],  10, 0x432aff97); /* 50 */
  c = II (c, d, a, b, x[14],  15, 0xab9423a7); /* 51 */
  b = II (b, c, d, a, x[ 5],  21, 0xfc93a039); /* 52 */
  a = II (a, b, c, d, x[12],   6, 0x655b59c3); /* 53 */
  d = II (d, a, b, c, x[ 3],  10, 0x8f0ccc92); /* 54 */
  c = II (c, d, a, b, x[10],  15, 0xffeff47d); /* 55 */
  b = II (b, c, d, a, x[ 1],  21, 0x85845dd1); /* 56 */
  a = II (a, b, c, d, x[ 8],   6, 0x6fa87e4f); /* 57 */
  d = II (d, a, b, c, x[15],  10, 0xfe2ce6e0); /* 58 */
  c = II (c, d, a, b, x[ 6],  15, 0xa3014314); /* 59 */
  b = II (b, c, d, a, x[13],  21, 0x4e0811a1); /* 60 */
  a = II (a, b, c, d, x[ 4],   6, 0xf7537e82); /* 61 */
  d = II (d, a, b, c, x[11],  10, 0xbd3af235); /* 62 */
  c = II (c, d, a, b, x[ 2],  15, 0x2ad7d2bb); /* 63 */
  b = II (b, c, d, a, x[ 9],  21, 0xeb86d391); /* 64 */

  state[0] += a;
  state[1] += b;
  state[2] += c;
  state[3] += d;
}


function Update3 (buffer3, offset, length)
{
   var index, partlen, i, start;

   finals = null;

   if ((length - offset)> buffer3.length)
     length = buffer3.length - offset;

   index = (count[0] >>> 3) & 0x3f;

   if ((count[0] += (length << 3)) < (length << 3))
     count[1]++;

   count[1] += length >>> 29;

   partlen = 64 - index;

   if (length >= partlen)
   {

     for (i = 0; i < partlen; i++)
       buffer[i + index] = buffer3[i + offset];

     Transform(buffer, 0);

     for (i = partlen; (i + 63) < length; i+= 64)
	   Transform(buffer3, i);

     index = 0;
    } else
       i = 0;

    if (i < length)
    {
      start = i;
      for (; i < length; i++)
	    buffer[index + i - start] = buffer3[i + offset];
    }
}

function Update2 (bufferu2, length)
{
  Update3(bufferu2, 0, length);
}

function Update (s)
{
  var len = s.length;
  var chars = new Array (len);
  for (i = 0; (i < len); i++)
    chars[i] = s.charCodeAt (i) ;
  Update2(chars, chars.length);
}

function Encode (input, len)
{
  var i, j;
  var out = new Array (len);

  for (i = j = 0; j  < len; i++, j += 4)
  {
    out[j] = (input[i] & 0xff);
    out[j + 1] = ((input[i] >>> 8) & 0xff);
    out[j + 2] = ((input[i] >>> 16) & 0xff);
    out[j + 3] = ((input[i] >>> 24) & 0xff);
  }

  return out;
}

function Final ()
{
   var bits =new Array();
   var index, padlen;

   bits = Encode(count, 8);

   index =  ((count[0] >>> 3) & 0x3f);
   padlen = (index < 56) ? (56 - index) : (120 - index);

   Update3(padding, 0, padlen);

   Update3(bits, 0, 8);

   return Encode(state, 16);
}

function asHex1 (hash)
{
   var buf = "";
   var i;

   for (i = 0; i < hash.length; i++)
   {
     if ((hash[i] & 0xff) < 0x10)
       buf = buf+ "0";

     var x = new Number (hash[i] & 0xff);
     var c = x.toString (16);

     buf = buf + c;
   }

   return buf;
}

function asHex ()
{
   return asHex1(Final());
}


// This is the funtion that you should use....
function getHashOfString (str)
{
   init();
   Update(str);
   return asHex();
}
</SCRIPT>

Open in new window

0
Comment
Question by:Jon DeVito
  • 6
  • 3
  • 2
11 Comments
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 33573210
jondevito,

May I ask what is the error message that you are getting?

What looks a little out of place to me is:
qValues = qValues & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''")&"',"

If you are trying to get SQL server to replace single quotes with two single quotes, then note that you have to do like this:

qValues = qValues & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''''")&"',"

If that doesn't resolve the issue, please advise what the error message is.

Thanks!
0
 
LVL 59

Expert Comment

by:Kevin Cross
ID: 33573215
It may be easier to see the change in a code block by the way!
qValues = qValues & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''''")&"',"

Open in new window

0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33573316
FYI, in rows 1040 to 1045, as mwvisa1 has pointed out, the replace is not correct; all those lines are replacing 2-single-quotes with 2-single-quotes for no net change.

Replace the fragment identified by the first line in the code box up to the INSERT.
The only thing missing now is the WHERE clause!  I am not sure where to get that from.
    Dim qFields, qValues, qUpdateStatement

    ' generate and execute the insert query

    For i = 1 to cPostedFields

        ' postedFields(i,1) contiene el field

        qFields = qFields & "["&postedFields(i,1)&"],"

        ' postedFields(i,2) contiene el value

        qValues = qValues & "'"&Replace(postedFields(i,2), "'", "''")&"',"

		qUpdateStatement = qUpdateStatement & "["&postedFields(i,1)&"]= '"&Replace(postedFields(i,2), "'", "''")&"',"

    Next  

    

    ' estos campos se salvan siempre:

    '   te da el country

    '   te da el IP

    '  te da el referer

    '      te da la fecha

    '   te da el useragent

    '  te da el browser



    If Not USE_AUTO_NUMERICAL Then 

		qFields = qFields & "HDW_ID," 

        Dim xd, tmpAutoNumerical

        xd = Date

        Randomize

		tmpAutoNumerical = "" & Hour(Time) & Minute(Time) & Second(Time) & Int((999 - 100 + 1) * Rnd + 999) & ","

        qValues = qValues & tmpAutoNumerical

		qUpdateStatement = qUpdateStatement & "[HDW_ID]= " & tmpAutoNumerical & ","

    End If



    If (HDW_INCLUDE_EXTRA_FIELDS) Then      

        qFields = qFields & "hdw_Country,"

        qFields = qFields & "hdw_IP,"

        qFields = qFields & "hdw_ServerTime,"

        qFields = qFields & "hdw_Referer,"

        qFields = qFields & "hdw_Browser,"

        qFields = qFields & "hdw_UserAgent,"    

    

        qValues = qValues & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''")&"',"

        qValues = qValues & "'"&Replace(Request.ServerVariables("REMOTE_ADDR"),"''","''")&"',"

        qValues = qValues & "'"&Replace(Date & " "& Time,"''","''")&"',"

        qValues = qValues & "'"&Replace(Request.ServerVariables("HTTP_REFERER"),"''","''")&"',"

        qValues = qValues & "'"&Replace(ckbrowser(Request.ServerVariables("HTTP_USER_AGENT")),"''","''")&"',"

        qValues = qValues & "'"&Replace(Replace(Request.ServerVariables("HTTP_USER_AGENT"),",",";"),"''","''")&"',"



		qUpdateStatement = qUpdateStatement & "hdw_Country= "    & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_IP= "         & "'"&Replace(Request.ServerVariables("REMOTE_ADDR"),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_ServerTime= " & "'"&Replace(Date & " "& Time,"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_Referer= "    & "'"&Replace(Request.ServerVariables("HTTP_REFERER"),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_Browser= "    & "'"&Replace(ckbrowser(Request.ServerVariables("HTTP_USER_AGENT")),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_UserAgent= "  & "'"&Replace(Replace(Request.ServerVariables("HTTP_USER_AGENT"),",",";"),"''","''")&"',"

    End If

    

    qFields = Left(qFields, Len(qFields)-1)

    qValues = Left(qValues, Len(qValues)-1)

    qUpdateStatement = Left(qUpdateStatement, Len(qUpdateStatement)-1)

    ' DataC.Execute("INSERT INTO " & HDW_TABLENAME & " (" & qFields & ") VALUES(" & qValues & ")")

    DataC.Execute("UPDATE " & HDW_TABLENAME & " SET " & qUpdateStatement

Open in new window

0
 
LVL 3

Author Comment

by:Jon DeVito
ID: 33573351
Thanks for the responses, mwvisa, it tries to create a new record so it says that it can't because it will create duplicate values.

cyberkiwi, lines 1040-1045 aren't being used because the value to call those will be false.

I made this change & I get:

Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC SQL Server Driver][SQL Server]Incorrect syntax near ','.
Line 1061
which is:
    DataC.Execute("UPDATE " & HDW_TABLENAME & " SET " & qUpdateStatement)    

0
 
LVL 58

Expert Comment

by:cyberkiwi
ID: 33573376
Just to make sure we're on the right track, can you try this?

Response.Write "UPDATE " & HDW_TABLENAME & " SET " & qUpdateStatement
Response.End
    DataC.Execute("UPDATE " & HDW_TABLENAME & " SET " & qUpdateStatement)

What does it show?
Have you sorted out what the WHERE statement should look like?  Without it, ALL the records of the table are being updated to those same values...
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 3

Author Comment

by:Jon DeVito
ID: 33573438
UPDATE Users SET [AccountId]= '123Testing',[FullName]= '123 Testing',[Email]= 'jon@foo.com',[ActiveUser]= 'True',[MM_update]= 'form1',[MM_recordId]= '{7372BCB4-8AD7-41BB-8899-961FE354D8FD}',[hdwuploadfolder]= 'uploads',[hdwtablename]= 'Users',[hdwok]= '/Contact_User_TY.asp',[hdwemail]= 'Jon.com',[hdwnook]= '/Contact_User_No.asp',[HDW_ID]= 2318231585,

I'm trying it with a static Where statement for now, I'll work on the variable once we get it updating.
0
 
LVL 3

Author Comment

by:Jon DeVito
ID: 33573445
The WHERE should be MM_recordId
0
 
LVL 58

Accepted Solution

by:
cyberkiwi earned 500 total points
ID: 33573479
Thank you.
There was an extra comma here

            qUpdateStatement = qUpdateStatement & "[HDW_ID]= " & tmpAutoNumerical

The fix (missing end bracket) and the fix (extra comma) as well as the WHERE clause should all be in the code below.

Response.Write and Response.End are great stuff!
It that above is a real email address, and it is not yours that you won't mind showing on the web unprotected, I would suggest you click on Request Attention and get a moderator to blank it out or make it xxxx@yyyy.com...
    Dim qFields, qValues, qUpdateStatement, qUpdateWhere

    ' generate and execute the insert query

    For i = 1 to cPostedFields

        ' postedFields(i,1) contiene el field

        qFields = qFields & "["&postedFields(i,1)&"],"

        ' postedFields(i,2) contiene el value

        qValues = qValues & "'"&Replace(postedFields(i,2), "'", "''")&"',"

        if postedFields(i,1) = "MM_recordId" Then

			qUpdateWhere = " WHERE ["&postedFields(i,1)&"]= '"&Replace(postedFields(i,2), "'", "''")&"'"

		Else

			qUpdateStatement = qUpdateStatement & "["&postedFields(i,1)&"]= '"&Replace(postedFields(i,2), "'", "''")&"',"

		End If

    Next  

    

    ' estos campos se salvan siempre:

    '   te da el country

    '   te da el IP

    '  te da el referer

    '      te da la fecha

    '   te da el useragent

    '  te da el browser



    If Not USE_AUTO_NUMERICAL Then 

		qFields = qFields & "HDW_ID," 

        Dim xd, tmpAutoNumerical

        xd = Date

        Randomize

		tmpAutoNumerical = "" & Hour(Time) & Minute(Time) & Second(Time) & Int((999 - 100 + 1) * Rnd + 999) & ","

        qValues = qValues & tmpAutoNumerical

		qUpdateStatement = qUpdateStatement & "[HDW_ID]= " & tmpAutoNumerical

    End If



    If (HDW_INCLUDE_EXTRA_FIELDS) Then      

        qFields = qFields & "hdw_Country,"

        qFields = qFields & "hdw_IP,"

        qFields = qFields & "hdw_ServerTime,"

        qFields = qFields & "hdw_Referer,"

        qFields = qFields & "hdw_Browser,"

        qFields = qFields & "hdw_UserAgent,"    

    

        qValues = qValues & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''")&"',"

        qValues = qValues & "'"&Replace(Request.ServerVariables("REMOTE_ADDR"),"''","''")&"',"

        qValues = qValues & "'"&Replace(Date & " "& Time,"''","''")&"',"

        qValues = qValues & "'"&Replace(Request.ServerVariables("HTTP_REFERER"),"''","''")&"',"

        qValues = qValues & "'"&Replace(ckbrowser(Request.ServerVariables("HTTP_USER_AGENT")),"''","''")&"',"

        qValues = qValues & "'"&Replace(Replace(Request.ServerVariables("HTTP_USER_AGENT"),",",";"),"''","''")&"',"



		qUpdateStatement = qUpdateStatement & "hdw_Country= "    & "'"&Replace(getCountryID(Request.ServerVariables("REMOTE_HOST")),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_IP= "         & "'"&Replace(Request.ServerVariables("REMOTE_ADDR"),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_ServerTime= " & "'"&Replace(Date & " "& Time,"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_Referer= "    & "'"&Replace(Request.ServerVariables("HTTP_REFERER"),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_Browser= "    & "'"&Replace(ckbrowser(Request.ServerVariables("HTTP_USER_AGENT")),"''","''")&"',"

		qUpdateStatement = qUpdateStatement & "hdw_UserAgent= "  & "'"&Replace(Replace(Request.ServerVariables("HTTP_USER_AGENT"),",",";"),"''","''")&"',"

    End If

    

    qFields = Left(qFields, Len(qFields)-1)

    qValues = Left(qValues, Len(qValues)-1)

    qUpdateStatement = Left(qUpdateStatement, Len(qUpdateStatement)-1)

    ' DataC.Execute("INSERT INTO " & HDW_TABLENAME & " (" & qFields & ") VALUES(" & qValues & ")")

    DataC.Execute("UPDATE " & HDW_TABLENAME & " SET " & qUpdateStatement & qUpdateWhere)

Open in new window

0
 
LVL 3

Author Comment

by:Jon DeVito
ID: 33573536
Thanks for letting me know about the address.

It looks very close

UPDATE Users SET [AccountId]= '123Testing',[FullName]= '123 Testing',[Email]= 'jon@xxx.com',[ActiveUser]= 'True',[MM_update]= 'form1',[hdwuploadfolder]= 'uploads',[hdwtablename]= 'Users',[hdwok]= '/Contact_User_TY.asp',[hdwemail]= 'Jon+AmieeLynn.com',[hdwnook]= '/Contact_User_No.asp',[HDW_ID]= 234081703 WHERE [MM_recordId]= '{7372BCB4-8AD7-41BB-8899-961FE354D8FD}'

The WHERE should say WHERE ID = .......... not MM_recordID
0
 
LVL 3

Author Comment

by:Jon DeVito
ID: 33573599
I found how to change the ID. Looks like its working! Let me run a few tests, I'll let you know in a few mins. Thanks again!!!
0
 
LVL 3

Author Closing Comment

by:Jon DeVito
ID: 33574564
Worked perfectly, thanks again for all of the help!!!
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
This article is the result of a quest to better understand Task Scheduler 2.0 and all the newer objects available in vbscript in this version over  the limited options we had scripting in Task Scheduler 1.0.  As I started my journey of knowledge I f…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now