<% dim fYName dim fYEmail dim fFName dim fFEmail dim fComments dim fSender dim fBCC dim fTDStyleClass dim strMessage dim viewForm dim strSiteURL dim strSiteTitle dim strSiteTagline dim strSiteMessage dim styleInput dim styleTextarea fSender = "admin@criminaldefenseutah.com" fBCC = "" fTDStyleClass = "formtext" strSiteTitle = "KEITH C. BARNES, Attorney At Law" strSiteTagline = "Offering Criminal Defense Legal Services in Cedar City & Southern Utah" strSiteMessage = "KEITH C. BARNES, Attorney At Law is a high quality criminal defense lawyer working in Cedar City and Southern Utah." 'For multiple line messages, uncomment and fill in/duplicate the line below 'strSiteMessage = strSiteMessage & vbCrLf & vbCrLf & "" strSiteURL = "http://" & Request.ServerVariables("SERVER_name") styleInput = "width:240px" styleTextarea = "width:240px;height:100px" strMessage = "" viewForm = "yes" %> Send This Site To A Friend | Utah Criminal Defense Lawyer Keith C. Barnes, Attorney at Law
Criminal Defense Lawyer in Cedar City and Southern Utah | Keith C. Barnes, Attorney At Law

<% 'CUT AND PASTE ALL OF THE BELOW INTO THE LAYOUT'S CONTENT AREA FOR THE SITE IN QUESTION %> <%If Len(Request.Form("submit")) > 0 Then If Len(Request.Form("YName")) > 0 Then fYName = Request.Form("YName") Else strMessage = strMessage & "[»] You did not enter your name.
" End If If Len(Request.Form("YEmail")) > 0 Then fYEmail = Request.Form("YEmail") If Instr(fYEmail, "@") = 0 Or Instr(fYEmail, ".") = 0 Or Instr(fYEmail, " ") > 0 Or Len(fYEmail) < 7 Then strMessage = strMessage & "[»] Your email address appears to be invalid.
" End If Else strMessage = strMessage & "[»] You did not enter your email address.
" End If If Len(Request.Form("FName")) > 0 Then fFName = Request.Form("FName") Else strMessage = strMessage & "[»] You did not enter your friend's name.
" End If If Len(Request.Form("FEmail")) > 0 Then fFEmail = Request.Form("FEmail") If Instr(fFEmail, "@") = 0 Or Instr(fFEmail, ".") = 0 Or Instr(fFEmail, " ") > 0 Or Len(fFEmail) < 7 Then strMessage = strMessage & "[»] Your friend's email address appears to be invalid." End If Else strMessage = strMessage & "[»] You did not enter your friend's email address." End If If Len(Request.Form("Comments")) > 0 Then fComments = Request.Form("Comments") End If If Len(strMessage) = 0 Then On Error Resume Next Set objCDONTS = Server.CreateObject("CDONTS.NewMail") objCDONTS.From = fSender objCDONTS.To = fFEmail If Len(fBCC) > 0 Then objCDONTS.BCC = fBCC End If objCDONTS.Subject = fYName & " has sent you a site referral for " & strSiteTitle & ": " & strSiteURL strBody = fYName & " sent you this referral at:" & vbCrLf strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "Date: " & FormatDateTime(Date, 1) & vbCrLf strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "Time: " & FormatDateTime(Now, 3) & vbCrLf strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "Your Friend's Name: " & fYName & vbCrLf & vbCrLf strBody = strBody & "Your Friend's Email: " & fYEmail & vbCrLf & vbCrLf If Len(fComments) > 0 Then strBody = strBody & "Your Friend's Comments: " & fComments & vbCrLf End If strBody = strBody & "-----------------------" & vbCrLf strBody = strBody & "About " & strSiteTitle & vbCrLf strBody = strBody & "-----------------------" & vbCrLf & vbCrLf strBody = strBody & strSiteMessage & vbCrLf & vbCrLf strBody = strBody & "To find out more, visit us online today at " & strSiteURL & " !" & vbCrLf & vbCrLf strBody = strBody & UCase(strSiteTitle) & vbCrLf strBody = strBody & strSiteTagline & vbCrLf strBody = strBody & strSiteURL & vbCrLf & vbCrLf strBody = strBody & "-----------------------" & vbCrLf & vbCrLf objCDONTS.Body = strBody objCDONTS.Send Set objCDONTS = Nothing %>

Thank you! Your submission was successful!

You submitted the following information on <%= FormatDateTime(Date, 1) %> at <%= FormatDateTime(Now, 3) %>:

Your Name: <%= fYName %>

Your Email: <%= fYEmail %>

Your Friend's Name: <%= fFName %>

Your Friend's Email: <%= fFEmail %> <% If Len(fComments) > 0 Then %>

Your Comments: <%= fComments %> <% End If %>


Your email will contain the following message:

Welcome to <%= strSiteTitle %>! <%= strSiteTagline %>

<%= strSiteMessage %>

To find out more, visit us online today at <%= strSiteURL %>!

Thank you for referring our site! We appreciate your interest in letting others know about our services.

Please click here to return to our homepage and continue browsing!

<% Else %>

Your submission was not successful.

The following information was missing:

<%= strMessage %>

<% End If Else %>

Thanks for letting others know about our services!

To use this form, simply fill out the fields below completely and add your comments to the email that will be sent to your contact.
<% End If %> <% If Len(Request.Form("submit")) > 0 And Len(strMessage) > 0 Or Len(Request.Form("submit")) = 0 Then %>

PLEASE NOTE: The message will not be sent without all form fields being completed.

Your Name:

Your E-mail Address:

Your Friend's Name:

Your Friend's E-mail Address:

     Your Comments: (optional)

<% End If %>

Send This Site To A Friend