%@LANGUAGE="VBSCRIPT"%>
<%
Dim MM_editAction
MM_editAction = CStr(Request.ServerVariables("SCRIPT_NAME"))
If (Request.QueryString <> "") Then
MM_editAction = MM_editAction & "?" & Server.HTMLEncode(Request.QueryString)
End If
' boolean to abort record edit
Dim MM_abortEdit
MM_abortEdit = false
%>
<%
' *** Mail form as Text format NTS ***
If (CStr(Request("FX_sendForm")) = "catalogue form") Then
names = ""
top = "\r\n"
body = "\r\n"
exclude = "button,button.x,button.y,FX_sendForm,MM_insert,MM_update"
reqArray = split(CStr(Request.Form),"&")
For i=0 To UBound(reqArray)
name = Left(reqArray(i),InStr(reqArray(i),"=")-1)
if (InStr(exclude,name) = 0) Then
if (InStr(names,name & ",") = 0) Then
body = body & UCase(name) & ": " & CStr(Request.Form(name)) & "\r\n"
names = names & name & ","
End If
End If
Next
bottom = "\r\n"
message = Replace(top & body & bottom, "\r\n", vbCrLf)
' send all
set objCDO = Server.CreateObject("CDONTS.NewMail")
objCDO.From = CStr(Request.Form("text8"))
objCDO.To = "art@patrickwalshe.com"
objCDO.Cc = ""
objCDO.Bcc = ""
objCDO.Subject = "request"
objCDO.Body = message
objCDO.Send
set objCDO = Nothing
' redirecting
body = Server.URLEncode(Replace(body, "\r\n", "
"))
redirect = "/index.html"
If (redirect <> "") Then Response.Redirect(redirect) End If
End If
%>
<%=MM_editAction%>