<%@ language="vbscript"%> <%'option explicit %> <% Dim rs Dim rs1 Dim strsql Dim strsql1 Dim catalogueshowname Dim catalogueshowdate Dim Products Dim Markets Dim Companyname Dim salutation Dim fname Dim lname Dim Designation Dim Address1 Dim Address2 Dim Address3 Dim Telephone Dim Fax Dim Email Dim Website Dim Products1 Dim Productspromoted Dim Amount Dim DDNo Dim DDDate Dim Bank Dim strname Dim mailconfirm Dim var_cscode var_cscode = Request.Form("cscode") 'Intialised Companyname=replace(Request.Form("Companyname"),"'","''") Salutation=Request.Form("Executive") fname=Replace(Request.Form("fname"),"'","''") lname=Replace(Request.Form("lname"),"'","''") Designation=Replace(Request.Form("Designation"),"'","''") Address1=Replace(Request.Form("Address1"),"'","''") Address2=Replace(Request.Form("Address2"),"'","''") Address3=Replace(Request.Form("Address3"),"'","''") Telephone=Request.Form("txttelcountrycode") & "-" & Request.form("txttelareacode") & "-" & Request.Form("Telephone") Fax=Request.Form("txtfaxcountrycode") & "-" & Request.form("txtfaxareacode") & "-" &Request.Form("Fax") Email=Request.Form("Email") Website=Request.Form("Website") Products1=Replace(Request.Form("Products1"),"'","''") Productspromoted=Replace(Request.Form("Productspromoted"),"'","''") Amount=Request.Form("Amount") DDNo=Request.Form("DDNo") DDDate=Request.Form("DDDate") Bank=Replace(Request.Form("Bank"),"'","''") Set rs=server.CreateObject("adodb.recordset") set rs1=server.CreateObject("adodb.recordset") strsql="select catalogueshowname, products, markets from catalogueshows_master where catalogueshowcode = " & var_cscode & "" strsql1="select convert(char(10),catalogueshowdate,103) catalogueshowdate from catalogueshows_schedule where catalogueshowscode = " & var_cscode & "" on error resume next' rs.Open strsql,objconn if err.number <> 0 then Response.Redirect "/inc/commoninc/error.asp?errorno=err.number" Response.End end if on error goto 0 on error resume next rs1.Open strsql1,objconn if err.number <> 0 then Response.Redirect "/inc/commoninc/error.asp?errorno=err.number" Response.End end if on error goto 0 'Variables intialized catalogueshowname=rs("catalogueshowname") Catalogueshowdate=rs1("catalogueshowdate") Products=rs("Products") Markets=rs("Markets") strname ="" strname=strname & "Catalogueshowname:" & " " & catalogueshowname & vbcrlf strname=strname & "ApproxDates:" & " " & catalogueshowdate & vbcrlf strname=strname & "Products:" & " " & Products & vbcrlf strname=strname & "Markets:" & " " & Markets & vbcrlf strname=strname & "companyname:" & " " & Companyname & vbcrlf strname=strname & "Name: " & Salutation & " " & fname & " " & lname & "(" & Designation & ")" & vbcrlf strname=strname & "Address:" & Address1 & ", " & Address2 & ", " & Address3 & vbcrlf strname=strname & "Telephone: " & telephone & " Fax: " & fax & vbcrlf strname=strname & "E-Mail:" & " " & Email & vbcrlf strname=strname & "Website:" & " " & website & vbcrlf strname=strname & "Products Manufactured:" & " " & Products1 & vbcrlf strname=strname & "Products Promoted:" & " " & Productspromoted & vbcrlf strname=strname & "DD Amount:" & " " & Amount & vbcrlf strname=strname & "DDNumber:" & " " & DDNo & vbcrlf strname=strname & "DDDate:" & " " & DDDate & vbcrlf strname=strname & "Bank:" & " " & Bank& vbcrlf If Request.ServerVariables("Request_Method") <> "POST" Then %> <%Else on error resume next Set Mailer = Server.CreateObject("SoftArtisans.SMTPMail") if err.number <> 0 then Response.Redirect "/inc/commoninc/error.asp?errorno=err.number" Response.End end if on error goto 0 Mailer.FromName = fname & " " & lname Mailer.FromAddress =Email mailer.addrecipient Application("adminname"), application("adminemail") 'mailer.addrecipient "ITPO Administrator", "Rajnishm@hclcomnet.co.in" '--- Body of text Mailer.bodytext =strname '--- Sets Subject line for the message mailer.subject = "Participant Registration for Catalogue Shows Abroad" '--- Set the Remote Host (SMTP) Host that we'll send this mail thru. '--- We set a condition to verify that Remote Host is correct. strMailHost = Application("smtpserverip") ' strMailHost = "172.28.64.31" if strMailHost = "mailhost.xyz.com" then mailconfirm = "Error: You need to change the mailhost to your SMTP server address" 'Response.Write "

Error: You need to change the mailhost to your SMTP server address

" else Mailer.RemoteHost = strMailHost end if on error resume next if Mailer.SendMail then if err.number <> 0 then Response.Redirect "/inc/commoninc/error.asp?errorno=err.number" Response.End end if on error goto 0 'Response.Write "

Your Question has been sent to the Administrator
" mailconfirm = "Your Registration has been sent to the Administrator" on error resume next else if err.number <> 0 then Response.Redirect "/inc/commoninc/error.asp?errorno=err.number" Response.End end if on error goto 0 'Response.Write "

Mail failure. Check mail host server name and tcp/ip connection...
" mailconfirm = "Mail failure. Check mail host server name and tcp/ip connection..." end if set Mailer = nothing End IF %> Catalogue Show Registration - <%=Application("Title")%>
Home>Calendar>Program Calendar>Catalogue Shows  
Preliminary Application for participation in
Catalogue Shows Abroad
Name of Program <%=rs("catalogueshowname")%>
Approx Dates (dd/mm/yyyy) <%do while not rs1.EOF %> <%if not rs1.EOF then rs1.MoveNext end if loop%>
Products <%=rs("Products")%>
Markets <%=rs("Markets")%>
Company Details
Company Name <%=Request.Form("Companyname")%>
Contact Executive <%=trim(Request.Form("Executive"))%> <%=Request.Form("fname")%>  <%=Request.Form("lname")%>
Designation <%=Request.Form("Designation")%>
Contact Address <%=Request.Form("Address1")%> <%if trim(Request.Form("Address2")) <> "" then Response.write ", " & Request.Form("Address2") end if%> <%if trim(Request.Form("Address3")) <> "" then Response.write ", " & Request.Form("Address3") end if%>
Phone(s) <%=Telephone%>
Fax <%if trim(Fax) <> "--" then%> <%=Fax%> <%end if%>
Email <%=Request.Form("Email")%>
Website URL <%=Request.Form("Website")%>
Other Details
Products Manufactured <%=Request.Form("Products1")%>
Products to be promoted during the programme <%=Request.Form("Productspromoted")%>
Demand Draft Details
Amount remitted by Draft <%=Request.Form("Amount")%>
Draft Number <%=Request.Form("DDNo")%>
Draft Date <%=Request.Form("DDDate")%>
Bank Name <%=Request.Form("Bank")%>
Note
1. Please print the form and send along with the Demand Draft

2. <%=mailconfirm%>