Here is the code to helpsend.asp. Yes, the employee is no longer with
the company, so I have to attempt to get into his thought processes.
<% Response.Buffer = True
On Error Resume Next
Function URLDecode(strToDecode)
strIn = strToDecode
strOut = ""
intPos = InStr(strIn, "+")
Do While intPos
strLeft = ""
strRight = ""
If intPos > 1 Then strLeft = Left(strIn, intPos - 1)
If intPos < Len(strIn) Then strRight = Mid(strIn, intPos + 1)
strIn = strLeft & " " & strRight
intPos = InStr(strIn, "+")
intLoop = intLoop + 1
Loop
intPos = InStr(strIn, "%")
Do While intPos
If intPos > 1 Then strOut = strOut & Left(strIn, intPos -1)
strOut = strOut & Chr(CInt("&H" & Mid(strIn, intPos + 1, 2)))
If intPos > (Len(strIn) - 3) Then
strIn = ""
Else
strIn = Mid(strIn, intPos + 3)
End If
intPos = InStr(strIn, "%")
Loop
URLDecode = strOut & strIn
End Function
Set objResult = Server.CreateObject("Scripting.Dictionary")
strQuery = Request.Form
intSep = InStr(strQuery, "&")
Do While intSep
strKey = ""
strValue = ""
strNVPair = Left(strQuery, intSep - 1)
strQuery = Mid(strQuery, intSep + 1)
intEqu = InStr(strNVPair, "=")
If intEqu > 1 Then strKey = URLDecode(Left(strNVPair, intEqu - 1))
If intEqu < Len(strNVPair) Then strValue = URLDecode(Mid(strNVPair,
intEqu + 1))
objResult.Add strKey, strValue
strErrorName = strKey
intSep = InStr(strQuery, "&")
Loop
strKey = ""
strValue = ""
intEqu = InStr(strQuery, "=")
If intEqu > 1 Then strKey = URLDecode(Left(strQuery, intEqu - 1))
If intEqu < Len(strNVPair) Then strValue = URLDecode(Mid(strQuery,
intEqu + 1))
objResult.Add strKey, strValue
Dim strToEmail
strToEmail = "-----------------------------" & vbNewLine & "Help Page
Feedback"
strToEmail = strToEmail & vbNewLine & "-----------------------------" &
vbNewLine & vbNewLine
strKeysArray = objResult.Keys
strItemsArray = objResult.Items
For intLoop = 0 To objResult.Count - 1
strThisKey = strKeysArray(intLoop)
strThisItem = strItemsArray(intLoop)
strToEmail = strToEmail & strThisKey & " = " & strThisItem & vbNewLine
Next
strSendToEmail = Request.QueryString("sendto")
Set mailer = Server.CreateObject("ASPMAIL.ASPMailCtrl.1")
temp = mailer.SendMail("somemailserver.com", strSendToEmail, "ACC Site
Visitor", "Comments about the site", strToEmail)
If Err.Number = 0 then
Response.Redirect("help-page.asp")
Else
If Err.Number = 457 Then
Response.Write("The form that is being submitted uses the same name
for ")
Response.Write("more than one form element, please contact <a
href='" & strSendToEmail & "'>")
Response.Write( strSendToEmail & "</a> to have this error fixed." &
vbNewLine )
Else
Response.Write("<DIV>Error Number: '" & Err.Number & "'<BR>")
Response.Write("Error Description: '" & Err.Description & "'<P>")
Response.Write("Key Name: '" & strErrorName & "'<BR>")
Response.Write("<B>There was a problem processing your form. Click
the back button and try it again please.<BR><BIG>Mills
Publishing</BIG></B></DIV>")
End If
End If
%>
*** Sent via Developersdex
http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!