<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <% option Explicit Response.Expires =0 'minutes session.Timeout =120 'minutes 'Session("CurrPage")="contactslistall23.asp" %> <% dim objConn,StrConn,objRS dim objConn2,StrConn2,objRS2,objRS3 dim Tot_Nocontants, seminarid,NoAddressesFound,jobtitle,btype,certificate,regno seminarid= "080" 'on error resume next %>

<% FillAddresses() response.Write("") response.Write("") %>
  Sno     Regno   Payment Company   Title     First name     Middle name     Last name     Attention     Position     Business Type     Certificate     Address     P.O.Box     City     Zip/Postal Code     Country     Phone     Mobile     Fax     Email    Payment Type   Reg. Date  

        No of Registered: <%=NoAddressesFound%>


<% Sub Replace2Quotesbyone(MyStr) If MyStr = "" THEN MyStr = " " else MyStr = Replace(MyStr, "''", "'") End If End Sub Sub FillAddresses() dim strQ dim ContactId,regdate,regfromopt,strRegFrom,NoSeminar_Attend dim title,firstname,middlename,lastname,attention,company,address,pobox,city,zippostalcode,country dim tel_ext,tel,mobile_ext,mobile,fax_ext,fax,email,website,ContactActive,payment dim StrItem,strdays,strworkshop,workshop,bypeId,days dim businesstype(8) 'on error resume next businesstype(1)="Architect" businesstype(2)="Consultant" businesstype(3)="Developer" businesstype(4)="Governmental" businesstype(5)="Engineering" businesstype(6)="Supplier" businesstype(7)="Building Owner" businesstype(8)="Other" NoAddressesFound=0 strdays="" Set objConn = Server.CreateObject("ADODB.Connection") StrConn="Provider=Microsoft.Jet.OLEDB.4.0;" & "Data Source=" & server.MapPath("data/maillist.mdb") & ";" StrConn=StrConn & "Jet OLEDB:Database Password=123" objConn.Open StrConn SET objRS=Server.CreateObject("ADODB.Recordset") objRS.CursorLocation =aduseclient objRS.CursorType =adopenstatic objRS.LockType =adLockreadonly SET objRS3=Server.CreateObject("ADODB.Recordset") objRS3.CursorLocation =aduseclient objRS3.CursorType =adopenstatic objRS3.LockType =adLockreadonly strQ="select * from seminars_attend " strQ=strQ & " where seminarid=" & cint(SeminarId) strQ=strQ & " order by regno desc" objRS3.Open strQ, objConn, , ,adCmdText objRS3.ActiveConnection =nothing if objRS3.eof=true then Response.Write "No Registrations Found." objRS3.Close set objRS3 = nothing ' set objRS = nothing objConn.Close set objConn = nothing exit sub end if strQ="select * from contacts" objRS.Open strQ, objConn, , ,adCmdText objRS.ActiveConnection =nothing do while not objRS3.EOF ContactId=objRS3("contactid") payment="" :if not isnull(objRS3("payment")) then payment=trim(objRS3("payment")) regno="" :if not isnull(objRS3("regno")) then regno=trim(objRS3("regno")) certificate="" :if not isnull(objRS3("certificate")) then certificate=trim(objRS3("certificate")) strdays="" :if not isnull(objRS3("days")) then strdays=trim(objRS3("days")) select case strdays case "010","E1000" days="Conf" case "001","E0100" days="Conf" case "011","E1100" days="Conf" end select workshop="" :if not isnull(objRS3("workshop")) then workshop=trim(objRS3("workshop")) strworkshop="" select case workshop case "ws1" strworkshop="Day1" case "ws2" strworkshop="Day2" case "ws3" strworkshop="Day1 - No Certificate" end select regdate="":if not isnull(objRS3("regdate")) then regdate=trim(objRS3("regdate")) ' 'Get details from Contacts table objRS.Filter = adFilterNone objRS.Filter ="id=" & ContactId if objRS.RecordCount > 0 then ContactActive="":if not isnull(objRS("active")) then ContactActive=trim(objRS("active")) if ContactActive="1" then NoAddressesFound=NoAddressesFound+1 '============================ title="":if not isnull(objRS("title")) then title=trim(server.HTMLEncode(objRS("title"))) firstname="":if not isnull(objRS("firstname")) then firstname=trim(server.HTMLEncode(objRS("firstname"))) middlename="":if not isnull(objRS("middlename")) then middlename=trim(server.HTMLEncode(objRS("middlename"))) lastname="":if not isnull(objRS("lastname")) then lastname=trim(server.HTMLEncode(objRS("lastname"))) attention="":if not isnull(objRS("attention")) then attention=trim(server.HTMLEncode(objRS("attention"))) company="":if not isnull(objRS("company")) then company=trim(server.HTMLEncode(objRS("company"))) jobtitle="":if not isnull(objRS("jobtitle")) then jobtitle=trim(server.HTMLEncode(objRS("jobtitle"))) btype="":if not isnull(objRS("businesstype")) then btype=trim(objRS("businesstype")) if len(btype)="1" then bypeId=cint(btype) if bypeId>0 and bypeId<=8 then btype=businesstype(bypeId) end if address="":if not isnull(objRS("address")) then address=trim(server.HTMLEncode(objRS("address"))) pobox="":if not isnull(objRS("pobox")) then pobox=trim(objRS("pobox")) city="":if not isnull(objRS("city")) then city=trim(objRS("city")) zippostalcode="":if not isnull(objRS("zippostalcode")) then zippostalcode=trim(objRS("zippostalcode")) country="":if not isnull(objRS("country")) then country=trim(objRS("country")) tel_ext="":if not isnull(objRS("tel_ext")) then tel_ext=trim(objRS("tel_ext")) tel="":if not isnull(objRS("tel")) then tel=trim(objRS("tel")) mobile_ext="":if not isnull(objRS("mobile_ext")) then mobile_ext=trim(objRS("mobile_ext")) mobile="":if not isnull(objRS("mobile")) then mobile=trim(objRS("mobile")) fax_ext="":if not isnull(objRS("fax_ext")) then fax_ext=trim(objRS("fax_ext")) fax="":if not isnull(objRS("fax")) then fax=trim(objRS("fax")) email="":if not isnull(objRS("email")) then email=trim(server.HTMLEncode(objRS("email"))) website="":if not isnull(objRS("website")) then website=trim(server.HTMLEncode(objRS("website"))) 'regdate="":if not isnull(objRS("regdate")) then regdate=trim(objRS("regdate")) 'StrItem=Right(" " & Trim(cStr(NoAddressesFound)), 3) & "." StrItem=Right(" " & Trim(cStr(ContactId)), 3) & "." 'StrItem= Trim(cStr(NoAddressesFound)) 'Response.Write "" & StrItem & "" Response.Write " " & NoAddressesFound & "" Response.Write " " & regno & "" Response.Write " " & payment & "" Response.Write " " & company & "" Response.Write " " & title & "" Response.Write " " & firstname & "" Response.Write " " & middlename & "" Response.Write " " & lastname & "" Response.Write " " & attention & "" Response.Write " " & jobtitle & "" Response.Write " " & btype & "" Response.Write " " & certificate & "" Response.Write " " & address & "" Response.Write " " & pobox & "" Response.Write " " & city & "" Response.Write " " & zippostalcode & "" Response.Write " " & country & "" Response.Write " (" & tel_ext & ") " & tel & "" Response.Write " (" & mobile_ext & ") " & mobile & "" Response.Write " (" & fax_ext & ") " & fax & "" 'response.Write(jobtitle & "
") Response.Write " 
" & email & "" Response.Write " " & workshop & "" 'Response.Write " " & days & "" Response.Write " " & regdate & "" '============================ end if end if objRS3.MoveNext loop objRS3.Close set objRS3 = nothing objRS.Close set objRS = nothing objConn.Close set objConn = nothing end sub %>