<% @Language = "VBScript" %> <% Response.buffer = true %> <% ' create table ContactUser ' ( ' id int not null identity, ' name varchar(255) not null, ' email varchar(255) not null, ' company varchar(255), ' phone varchar(255) not null, ' support char(1) not null, ' created datetime ' ); Dim submit, text, FROM, SUBJECT, TO_EMAIL, message FROM = "info@newmediabc.com" TO_EMAIL = "lynda@newmediabc.com" 'TO_EMAIL = "karn@earthgaming.com" SUBJECT = "NMBC Signup" 'submit = Request.Form ("submit") submit = Request.Form ("temp") if (len(submit) > 0) then ms1 = "  " me1 = "" Set regEx = New RegExp regEx.Pattern = "^\S+@\S+\.\S+$" messageName = "" messageEmail = "" messagePhone = "" if (len(Request.Form("name")) = 0) then messageName = ms1 & "Required" & me1 end if if (regEx.Test(Request.Form("email")) = false) then messageEmail = ms1 & "Invalid" & me1 end if if (len(Request.Form("phone")) = 0) then messagePhone = ms1 & "Required" & me1 end if if (len(messageName) = 0) AND (len(messageEmail) = 0) AND (len(messagePhone) = 0) then support = "Yes" supportCol = "Y" if (Request.Form("support") <> "Yes") then support = "No" supportCol = "N" end if text = "Name: " & Request.Form("name") & vbCrLf & _ "Email: " & Request.Form("email") & vbCrLf & _ "Company: " & Request.Form("company") & vbCrLf & _ "Phone: " & Request.Form("phone") & vbCrLf & _ "Support: " & support & vbCrLf & vbCrLf Call sendTextHTMLMail (TO_EMAIL, SUBJECT, text, "", FROM) Call sendTextHTMLMail ("karn@earthgaming.com", SUBJECT, text, "", FROM) ' Opening database connection set Connection = Server.CreateObject("adodb.connection") ' Connection.Open "nmbc", "nmbc", "sysnmbc" Connection.Open "SQL10SFN343", "SQL10SFN343", "pishgalen79" If Err.Number <> 0 then Response.Write "err.Number = " & err.Number & ", err.source = " & err.source Else Set aRS = CreateObject("ADODB.Recordset") sql = "select * from ContactUser; " aRS.Open sql, Connection, 1, 3 dtNow = Date dtTime = Time dtNow = DateAdd ("H", Hour(dtTime), dtNow) dtNow = DateAdd ("N", Minute(dtTime), dtNow) dtNow = DateAdd ("S", Second(dtTime), dtNow) aRS.AddNew aRS.Fields("name") = getSafeVars (Request.Form("name")) aRS.Fields("email") = getSafeVars (Request.Form("email")) aRS.Fields("company") = getSafeVars (Request.Form("company")) aRS.Fields("phone") = getSafeVars (Request.Form("phone")) aRS.Fields("support") = getSafeVars (supportCol) aRS.Fields("created") = dtNow aRS.Update aRS.Close Set aRS = Nothing End If Connection.Close Response.Redirect ("thank_you.html") end if end if ' ***************************************************************** FUNCTION sendTextHTMLMail (email, subject, text, html, from) Set objSendMail = CreateObject("CDONTS.NewMail") with objSendMail .From = "info@newmediabc.com" .To = email .Subject = subject .Body = text .BodyFormat = 1 .MailFormat = 1 .Send End With Set objSendMail = Nothing END FUNCTION ' ***************************************************************** Function getSafeVars (input) ' input = Request.Form (input) input = Trim (input) input = Replace (input, "'", "''") getSafeVars = input End Function ' ***************************************************************** %> New Media BC | Digital Media Centre | Support
Digital Media Centre Presentation
Play PresentationProject OverviewOur PartnersYour SupportContact Us
Your Support
We need your voice.

I know that together, we can make this happen. A strategic investment now will return dividends for years to come. If you believe in this vision and want to take action, please call or email your local MP and say "I believe that Canada can be a world leader in digital media. I'm lending my support to help build a World Centre for Digital Media and I hope that you will too. It's important to my business, my industry and my future."

Please feel free to contact me with any questions you have. lynda@newmediabc.com

Lynda Brown, President, New Media BC

Yes, I support this initiative
Name: <%=messageName%>
" size="38">
Email address: <%=messageEmail%>
" size="38">
Company (optional):
" size="38">
Phone: <%=messagePhone%>
" size="25">
NMBC Logos

This initiative is being championed by industry associations across the country. By working together, we're driving a
legacy project that will benefit the entire Canadian digital media industry.