%
bottomtextfile = "bottomtext.inc"
set fs=Server.CreateObject("Scripting.FileSystemObject")
strpathinfo = Request.ServerVariables("PATH_INFO")
strphysicalpath = server.MapPath(strpathinfo)
set path = fs.GetFile(strphysicalpath)
set rootfolder = path.parentfolder
lastslashpos = instrrev(rootfolder,"\")
reqpath = left(rootfolder, lastslashpos)
bottomtextfilepath = reqpath & bottomtextfile
if fs.FileExists(bottomtextfilepath) then
temp_bottom_text_str=""
set fname=fs.OpenTextFile(bottomtextfilepath,1)
do while fname.AtEndOfStream = false
temp_bottom_text_str= temp_bottom_text_str & fname.ReadLine
loop
htmltextindex = temp_bottom_text_str
else
htmltextindex=htmltextindex
end if
name=Request.Form("name")
email=Request.Form("email")
phone=Request.Form("phone")
comments=Request.Form("comments")
submit_contact=Request.Form("submit_contact")
email_check=ValidateEmail(email)
'Response.Write "email_check=" & email_check
if email_check="True" and submit_contact="true" then
''''''''''''send email''''''''''''''''''''''''
contactfieldtitle1_temp = replace(contactfieldtitle1," ","%20")
contactfieldtitle2_temp = replace(contactfieldtitle2," ","%20")
contactfieldtitle3_temp = replace(contactfieldtitle3," ","%20")
contactfieldtitle4_temp = replace(contactfieldtitle4," ","%20")
contactfield1_temp = replace(name," ","%20")
contactfield2_temp = replace(email," ","%20")
contactfield3_temp = replace(phone," ","%20")
contactfield4_temp = replace(comments," ","%20")
send_str="siteid=" & siteid & "&mailvar=" & mailvar & "&contactfieldtitle1=" & contactfieldtitle1_temp & "&contactfieldtitle2=" & contactfieldtitle2_temp & "&contactfieldtitle3=" & contactfieldtitle3_temp & "&contactfieldtitle4=" & contactfieldtitle4_temp & "&contactfield1=" & contactfield1_temp & "&contactfield2=" & contactfield2_temp & "&contactfield3=" & contactfield3_temp & "&contactfield4=" & contactfield4_temp
Set xmlhttp = CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.Open "POST", "http://" & hosting_internal_serverip & "/builder/contact.asp", False
xmlhttp.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
xmlhttp.send send_str
If xmlhttp.Status = 200 Then ' Response from server was success
xmlresponse=xmlhttp.responseText
'Response.Write xmlresponse
end if
errormsg="success"
else
errormsg="proper_email"
end if
Function ValidateEmail(Expression)
Dim objRegExp
Set objRegExp = New RegExp
objRegExp.Pattern = "^[\w\.-]+@[\w\.-]+\.[a-zA-Z]+$"
ValidateEmail = objRegExp.Test(Expression)
End Function
%>
<%if len(contact_browsertitle)> 0 then%>
<%=contact_browsertitle%>
<%else%>
<%=htmltitleindex%>
<%end if %>
<%=namevar%>
<%=sloganvar%>
<%if contactformvisible="true" then%>
<%end if %>
<%if mappath<>"none" and len(mappath)> 0 then%>
<%end if %>
<%if refenabled="yes" then %>
<%end if %>
<%if tmenabled="yes" then%>
<%end if %>