<% SQL = "Select ID, Name from ContentSections where Restricted not like '%" & session("usertype") & "%' AND Active = 1 order by DisplayOrder" set rsSections = CreateRecordset(objDB, SQL) SQL = "Select ID, SectionID, Name from ContentSubsections where Restricted not like '%" & session("usertype") & "%' AND Active = 1 order by SectionID, DisplayOrder" set rsSubsections = CreateRecordset(objDB, SQL) SQL = "Select ID, Name from DistributorContentSections where Active = 1 AND DistributorID = '" & session("DistributorID") & "' order by DisplayOrder" set rsDistributorSections = CreateRecordset(objDB, SQL) SQL = "Select ID, SectionID, Name from DistributorContentSubsections where Active = 1 AND DistributorID = '" & session("DistributorID") & "' order by SectionID, DisplayOrder" set rsDistributorSubsections = CreateRecordset(objDB, SQL) %> <% while not rsSections.eof rsSubsections.filter = "SectionID = '" & rsSections("ID") & "'" %> <% if rsSubsections.recordcount > 0 AND sectionID = rsSections("ID") then while not rsSubsections.eof %> <% rsSubsections.movenext wend end if %> <% rsSections.movenext wend while not rsDistributorSections.eof rsDistributorSubsections.filter = "SectionID = '" & rsDistributorSections("ID") & "'" %> <% if rsDistributorSubsections.recordcount > 0 AND sectionID = rsDistributorSections("ID") then while not rsDistributorSubsections.eof %> <% rsDistributorSubsections.movenext wend end if %> <% rsDistributorSections.movenext wend %> <% if session("regionID") <> "0" and session("regionID") <> "" then %> <% if section = "Manage Leads" then %> <% end if %> <% end if %> <% if session("primaryuser") then %> <% if section = "Manage Leads" then %> <% end if %> <% end if %>
&subsectionID=<%= rsSubsections("ID") %>"><%= rsSubsections("Name") %>
&subsectionID=<%= rsDistributorSubsections("ID") %>"><%= rsDistributorSubsections("Name") %>
Not Processed By Distributor
Processed Leads
Processed Leads
<% rsSubsections.close set rsSubsections = nothing rsSections.close set rsSections = nothing rsDistributorSubsections.close set rsDistributorSubsections = nothing rsDistributorSections.close set rsDistributorSections = nothing %>