<%@LANGUAGE="VBSCRIPT"%> <% 'Make a transaction dispatcher instance Dim tNGs: Set tNGs = new tNG_dispatcher tNGs.Init "" %> <% ' Start trigger Dim formValidation: Set formValidation = new tNG_FormValidation formValidation.Init tNGs.prepareValidation formValidation ' End trigger %> <% 'start Trigger_SendEmail trigger 'remove this line if you want to edit the code by hand Function Trigger_SendEmail (ByRef tNG) Dim emailObj: Set emailObj = new tNG_Email emailObj.Init tNG emailObj.setFrom "{KT_defaultSender}" emailObj.setTo "tedwardson@sescor.net" emailObj.setCC "" emailObj.setBCC "" emailObj.setSubject "sescor.net contact us" 'WriteContent method emailObj.setContent "{Name}
" & vbNewLine & "{Phone}
" & vbNewLine & "{Email}
" & vbNewLine & "{Comments}" emailObj.setEncoding "ISO-8859-1" emailObj.setFormat "HTML/Text" emailObj.setImportance "Normal" Set Trigger_SendEmail = emailObj.Execute() End Function 'end Trigger_SendEmail trigger %> <% ' Make an insert transaction instance Dim ins_contacts: Set ins_contacts = new tNG_insert ins_contacts.init MM_sescorsql_STRING tNGs.addTransaction ins_contacts ' Register triggers ins_contacts.registerTrigger Array("STARTER", "Trigger_Default_Starter", 1, "POST", "KT_Insert1") ins_contacts.registerTrigger Array("BEFORE", "Trigger_Default_FormValidation", 10, formValidation) ins_contacts.registerTrigger Array("END", "Trigger_Default_Redirect", 99, "thanks.asp") ins_contacts.registerTrigger Array("AFTER", "Trigger_SendEmail", 40) ' Add columns ins_contacts.setTable "contacts" ins_contacts.addColumn "Name", "STRING_TYPE", "POST", "Name", "" ins_contacts.addColumn "Phone", "STRING_TYPE", "POST", "Phone", "" ins_contacts.addColumn "Email", "STRING_TYPE", "POST", "Email", "" ins_contacts.addColumn "Comments", "STRING_TYPE", "POST", "Comments", "" ins_contacts.addColumn "submitdate", "STRING_TYPE", "POST", "submitdate", "" ins_contacts.setPrimaryKey "id", "NUMERIC_TYPE", "", "" %> <% 'Execute all the registered transactions tNGs.executeTransactions %> <% 'Get the transaction recordset Dim rscontacts Dim rscontacts_numRows Set rscontacts = tNGs.getRecordset("contacts") rscontacts_numRows = 0 %> State Environmental Services
Home Page
609.298.8838   New Jersey's Septic Experts since 1983.
Commercial Services & Products   Residentail Services & Products   Septic System Frequently Asked Questions
<% Response.Write tNGs.displayValidationRules()%>
sescor sescor sescor
sescor sescor
Contact Us
sescor sescor

  <% Response.Write tNGs.getErrorMsg() %>

" size="32" /> <%=(tNGs.displayFieldHint("Name"))%> <%=(tNGs.displayFieldError("contacts", "Name"))%>
" size="32" /> <%=(tNGs.displayFieldHint("Phone"))%> <%=(tNGs.displayFieldError("contacts", "Phone"))%>
" size="32" /> <%=(tNGs.displayFieldHint("Email"))%> <%=(tNGs.displayFieldError("contacts", "Email"))%>
<%=(tNGs.displayFieldHint("Comments"))%> <%=(tNGs.displayFieldError("contacts", "Comments"))%>
" />

 

© State Environmental Services, Inc.