 |

<%
Dim Rec, RecImage, SQL, PropertyID, PropertyTypeID, SaleRent
PropertyID = trim(request.QueryString("PropertyID"))
PropertyTypeID = trim(request.QueryString("PropertyTypeID"))
SaleRent = trim(request.QueryString("SaleRent"))
Set Rec = Server.CreateObject("ADODB.Recordset")
Set RecImage = Server.CreateObject("ADODB.Recordset")
Rec.cursorlocation=aduseclient
Rec.CacheSize = 5
SQL = " SELECT Property.Name, PropertyType.SaleRent, Property.Status, PropertyType.PropertyTypeName, Property.PropertyID "
SQL = SQL & " FROM PropertyType INNER JOIN Property ON PropertyType.PropertyTypeID = Property.PropertyTypeID "
If PropertyTypeID <> "" Then
If SaleRent <> "" Then
SQL = SQL & " WHERE Property.PropertyTypeID="&PropertyTypeID&" AND Property.Status='Online' AND PropertyType.SaleRent='"&SaleRent&"' "
Else
SQL = SQL & " WHERE Property.PropertyTypeID="&PropertyTypeID&" AND Property.Status='Online' "
End If
ElseIf SaleRent <> "" AND PropertyTypeID = "" Then
SQL = SQL & " WHERE Property.Status='Online' AND PropertyType.SaleRent='"&SaleRent&"' "
Else
SQL = SQL & " WHERE Property.Status='Online' "
End If
Rec.Open SQL, oConn, 3, 3, 1
If Not Rec.EOF Then
On Error Resume Next
If Request.QueryString("page") = "" Then
intCurrentPage = 1
Else
intCurrentPage = CInt(Request.QueryString("page"))
End If
Rec.PageSize = 6
If Rec.PageCount > 0 then
Rec.AbsolutePage = intCurrentPage
Else
intCurrentPage = 0
End If
Session("CurrentPropertyPage") = intCurrentPage
totalRecord = Rec.RecordCount
' response.write totalRecord
End If
%>
|
 |
Property for <%=SaleRent%>: <%If PropertyTypeName <> "" Then%><%=PropertyTypeName%><%Else%>All<%End If%> |
 |
|
<%If Rec.PageCount > 1 then%>
|
<% For intCount = 1 to Rec.PageCount
If intCount = 1 then
'Response.Write " | "
End If
If intCount = intCurrentPage then
Response.Write "" & intCount & "" & " "
Else
Response.Write "" & intCount & " "
End If
Next%>
|
<%
If intCurrentPage <> 1 then
Response.Write " "
Else
Response.Write " "
End If
%>
|
<%If intCurrentPage <> Rec.PageCount then
Response.Write " "
Else
Response.Write " "
End If
%>
|
<%End If%>
|
 |
<%
Record_Count = 0
Do While Rec.AbsolutePage = intCurrentPage And Not Rec.EOF
PropertyID = trim(Rec("PropertyID"))
SQL = " SELECT * FROM Images WHERE PropertyID = "&PropertyID&" Order by ImageID ASC "
RecImage.Open SQL, oConn
If Not RecImage.EOF Then
ImageName = trim(RecImage("ImageFile"))
Else
ImageName = ""
End If
RecImage.Close
%>
<% If (Record_Count mod 3) = 0 Then %>
<% End If %>
|
|
<% Record_Count = Record_Count + 1 %>
<%
If (Record_Count mod 3) = 0 Then
%>
<%
End If
%>
<%
Rec.MoveNext
Loop
%>
<%
If (Record_Count) = 0 Then
%>
|
<%
End If
%>
|
 |
|
Please <%If SaleRent = "Rent" Then%>contact us<%Else%>contact us<%End If%> for more information. |
<%If Rec.PageCount > 1 then%>
|
<% For intCount = 1 to Rec.PageCount
If intCount = 1 then
'Response.Write " | "
End If
If intCount = intCurrentPage then
Response.Write "" & intCount & "" & " "
Else
Response.Write "" & intCount & " "
End If
Next%>
|
<%
If intCurrentPage <> 1 then
Response.Write " "
Else
Response.Write " "
End If
%>
|
<%If intCurrentPage <> Rec.PageCount then
Response.Write " "
Else
Response.Write " "
End If
%>
|
<%End If%>
|
|
|
|