<%
'strSQL1="select PP.PropertyID,PP.WhatIsIt,PP.SummaryLocation,PS.PropertySectionName,PD.PropertyDistrictsName from Properties PP,PropertySections PS, PropertyDistricts PD where PP.PropertySectionID=PS.PropertySectionID and PP.PropertyDistrictsID=PD.PropertyDistrictsID order by PropertyID desc"
Dim strSQL1
strSQL1="select distinct PP.PropertySectionID, PS.PropertySectionName from Properties PP,PropertySections PS where PP.PropertySectionID=PS.PropertySectionID and PP.List = 'on' order by PropertySectionID asc"
Dim objRSSection
Set objRSSection=Server.CreateObject("ADODB.Recordset")
objRSSection.Open strSQL1, objConn
Do While not objRSSection.EOF
dim SectionID
SectionID= objRSSection("PropertySectionID")
Dim strSQL2
strSQL2="select distinct PP.PropertyDistrictsID, PD.PropertyDistrictsName from Properties PP, PropertyDistricts PD where PP.PropertyDistrictsID = PD.PropertyDistrictsID and PP.PropertySectionID = " & SectionID & " and PP.List = 'on' order by PP.PropertyDistrictsID asc"
Dim objRSDistrict
Set objRSDistrict=Server.CreateObject("ADODB.Recordset")
objRSDistrict.Open strSQL2, objConn
Response.Write "| "
response.write objRSSection("PropertySectionName")
'response.write SectionID
Response.Write " | "
Do While not objRSDistrict.EOF
response.write "| "
response.write objRSDistrict("PropertyDistrictsName") & " | "
objRSDistrict.MoveNext
Loop
objRSSection.MoveNext
Loop
%>
|
<%if strType <> "" and strDistrict <> "" then%>
<%elseif strStatus="success" then%>
<%else%>
<%end if%>
|
<%
'Default allAdverts
Dim strGetAdvert,objRSGetAdvert
strGetAdvert="SELECT * from adverts where advertActive='yes' and sectionID = '36'"
Set objRSGetAdvert=Server.CreateObject("ADODB.Recordset")
objRSGetAdvert.Open strGetAdvert, objConn
response.write ""
objRSGetAdvert.Close
set objRSGetAdvert= nothing
%>
<%
'Section specific adverts
Dim strGetAdvert9,objRSGetAdvert9
strGetAdvert9="SELECT * from adverts where advertActive='yes' and sectionID = '" & section & "'"
Set objRSGetAdvert9=Server.CreateObject("ADODB.Recordset")
objRSGetAdvert9.Open strGetAdvert9, objConn
response.write ""
objRSGetAdvert9.Close
set objRSGetAdvert9= nothing
%>
|