%@ Language=VBScript %>
<% Option Explicit %>
<%
Dim strPM, PM, Im1path, Im2path, LogoMain, FSYS , Logo
strPM = "SELECT * FROM PageMinder WHERE ID = 10"
Set PM = CreateObject("ADODB.RecordSet")
PM.Open strPM, objConn
Set FSYS = Server.CreateObject("Scripting.FileSystemObject")
Im1path = Server.MapPath ("pageminder") & "\" & PM("Image1")
Im2path = Server.MapPath ("pageminder") & "\" & PM("Image2")
If Layout("LogoSub") > "" Then
LogoMain = Server.MapPath ("logo") & "\" & Layout("LogoSub")
If FSYS.FileExists(LogoMain) Then Logo = Layout("LogoSub")
End If
If Logo = "" Then
LogoMain = Server.MapPath ("logo") & "\" & Layout("LogoMain")
If FSYS.FileExists(LogoMain) Then Logo = Layout("LogoMain")
End If
If Request.QueryString("mode") = "submit" Then
Dim strCnt, Cnt, MailGo, EM, strEM, cdoConfig, Msg
strEM = "SELECT Email FROM Restaurants"
Set EM = CreateObject("ADODB.RecordSet")
EM.Open strEM, objConn
strCnt = "SELECT * FROM Contacts WHERE 1 = 2"
Set Cnt = CreateObject("ADODB.RecordSet")
Cnt.Open strCnt, objConn, , adLockOptimistic
Cnt.AddNew
Cnt("Name") = Request.Form("Name")
Cnt("EMail") = Request.Form("Email")
Cnt("Company") = Request.Form("Company")
Cnt("Telephone") = Request.Form("Telephone")
Cnt("FAX") = Request.Form("Fax")
Cnt("Address") = Request.Form("Address")
Cnt("City") = Request.Form("City")
Cnt("State") = Request.Form("State")
Cnt("Zip") = Request.Form("Zip")
Cnt("Message") = Request.Form("Message")
Cnt("MessageDate") = Now()
Cnt.Update
Cnt.Close
Set Cnt = Nothing
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "mail.gudemangroup.com"
.Update
End With
Set MailGo = Server.CreateObject("CDO.Message")
Set MailGo.Configuration = cdoConfig
MailGo.To = EM("Email")
Msg = "You have received a new contact from the "& CoWeb &" web site.
"
Msg = Msg & "Name: " & Request.Form("Name") & "
"
Msg = Msg & "Comany: " & Request.Form("Company") & "
"
Msg = Msg & "Address: " & Request.Form("Address") & "
"
Msg = Msg & "City, State & Zip: " & Request.Form("City") & ", " & Request.Form("State") & " " & Request.Form("Zip") & "
"
Msg = Msg & "Telephone: " & Request.Form("Telephone") & "
"
Msg = Msg & "FAX: " & Request.Form("Fax") & "
"
Msg = Msg & "E-mail: " & Request.Form("Email") & "
"
Msg = Msg & "Message:
" & Request.Form("Message") & "
"
Msg = Msg & "This contact has been logged in your Site Administration for future management."
MailGo.HTMLBody = Msg
MailGo.From = "website@"& CoWeb &""
MailGo.Subject= "WebSite Contact Received"
MailGo.Send
Set MailGo = Nothing
Set cdoConfig = Nothing
EM.Close
Set EM = Nothing
Response.Cookies("nopop") = "True"
Response.Cookies("nopop").Expires = Date + 30
End If
%>
| bgcolor="white"<% Else %> width="15"><% End If %><% If Layout("TL") = "True" Then %> |
<% If Layout("TR") = "True" Then %> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
<% End If %>
<% If Layout("NavLoc") = "Horizontal" Then %>
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| bgcolor="white" <% End If %> width="15"><% If Layout("BL") = "True" Then %> |
bgcolor="white" <% End If %> width="15"><% If Layout("BR") = "True" Then %> |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||