|
|
|
<%
if Request.Form("firstname") <> "" then
QRY1 = "WHERE DoctorInfo.firstname LIKE '%" & Request.Form("firstname") & "%'"
end if
if Request.Form("lastname") <> "" then
if QRY1 = "" then
QRY1 = "WHERE DoctorInfo.lastname LIKE '%" & Request.form("lastname") & "%'"
else
QRY1 = QRY1 & " AND DoctorInfo.lastname LIKE '%" & Request.Form("lastname") & "%'"
end if
end if
if Request.Form("address") <> "" then
if QRY1 = "" then
QRY1 = "WHERE DoctorInfo.address LIKE '%" & Request.Form("address") & "%'"
else
QRY1 = QRY1 & " AND DoctorInfo.address LIKE '%" & Request.Form("address") & "%'"
end if
end if
if Request.Form("city") <> "" then
if QRY1 = "" then
QRY1 = "WHERE DoctorInfo.city LIKE '%" & Request.Form("city") & "%'"
else
QRY1 = QRY1 & " AND DoctorInfo.city LIKE '%" & Request.Form("city") & "%'"
end if
end if
if Request.Form("state") <> "" then
if QRY1 = "" then
QRY1 = "WHERE state.state LIKE '%" & Request.Form("state") & "%'"
else
QRY1 = QRY1 & " AND state.state LIKE '%" & Request.Form("state") & "%'"
end if
end if
if Request.Form("pareacode") <> "" then
if QRY1 = "" then
QRY1 = "WHERE DoctorInfo.pAreaCode LIKE '%" & Request.Form("pareacode") & "%'"
else
QRY1 = QRY1 & " AND DoctorInfo.pAreaCode LIKE '%" & Request.Form("pareacode") & "%'"
end if
end if
if Request.Form("zipcode") <> "" then
if QRY1 = "" then
QRY1 = "WHERE DoctorInfo.zipcode LIKE '%" & Request.Form("zipcode") & "%'"
else
QRY1 = QRY1 & " AND DoctorInfo.zipcode LIKE '%" & Request.Form("zipcode") & "%'"
end if
end if
if len(Request.Form("pareacode1"))=3 then
QRY1 = "WHERE DoctorInfo.pAreaCode='" & Request.Form("pareacode1") & "' AND " & "doctorinfo.lastname LIKE '%" & Request.Form("lastname") & "%'"
end if
QRY = "SELECT DoctorInfo.DefaultDoc, DoctorInfo.PlanID, DoctorInfo.DoctorID, DoctorInfo.LastName"
QRY = QRY & ", DoctorInfo.FirstName, DoctorInfo.Title, DoctorInfo.image, DoctorInfo.MiddleName, DoctorInfo.Phone"
QRY = QRY & ", DoctorInfo.VasectomyPos, DoctorInfo.ReversalPos, DoctorInfo.City, DoctorInfo.StateID, DoctorInfo.ZipCode"
QRY = QRY & ", DoctorInfo.PAreaCode, DoctorInfo.Address, DoctorInfo.Address2, DoctorInfo.VasectomyPos, DoctorInfo.ReversalPos"
QRY = QRY & ", DoctorInfo.DefaultDoc, DoctorInfo.fax, State.State, State.StateLC"
QRY = QRY & " FROM DoctorInfo INNER JOIN State ON DoctorInfo.StateID=State.StateID " & QRY1
QRY = QRY & " ORDER BY DoctorInfo.PlanID, DoctorInfo.DefaultDoc DESC, DoctorInfo.image DESC"
'Response.Write(qry)
rs.CursorLocation = 3
rs.CursorType = 3
rs.Open QRY, application("vasectomy")
if rs.eof = false then
rs.movefirst
if Request.Form("page") = "" then
pageNumber = 1
else
pageNumber = cint(Request.Form("page"))
end if
recordcnt = rs.RecordCount
pageCnt = rs.PageCount
rs.PageSize = 10
rs.CacheSize = 10
if CInt( pageNumber ) > CInt( pageCnt ) then
pageNumber = PageCnt
end if
if cint(pageNumber) > cint(pageCnt) then
pageNumber = pageCnt
end if
if pageNumber <= 0 then
pageNumber = 1
end if
if recordCnt > 0 then
' Set Starting Page
Rs.AbsolutePage = pageNumber
Start = Rs.AbsolutePosition
' Check If We Are On The Last Page
if CInt( pageNumber ) = CInt( pageCnt ) then
Finish = recordCnt
else
Finish = Start + ( Rs.PageSize - 1 )
end if
end if%>
A directory of Urologists in the <%=AreaCode%> Area Code region. |
|
<%
for index = 1 to rs.PageSize
if rs.EOF = true then
exit for
end if%>
<%
if rs.fields("PlanID") < 5 then
moretxt = "MAP & MORE"%>
<%if rs.Fields("image") <> "" or rs.fields("planid") < 4 then%>)">" name="<%=image%>" width="75" border=0><%end if%> |
<%
Response.Write(rs.fields("firstname"))
if rs.fields("middlename") = "" then
Response.Write(" ")
else
Response.Write(" " & rs.Fields("middlename") & " ")
end if
Response.write(rs.fields("lastname") & ", " & rs.fields("title"))%> |
<%=rs.fields("address")%> <%=rs.fields("address2")%> |
)"><%=moretxt%> INFORMATION<%str=vasrevbox()%> |
<%=rs.fields("city")%>, <%=rs.fields("state")%> <%=rs.fields("zipcode")%> |
READ )">BIO/PROFILE PAGE |
<%
else
moretxt = "MORE "%>
|
<%=rs.fields("firstname")%> <%=rs.fields("middlename")%> <%=rs.fields("lastname")%>
<%IF not isnull(rs.fields("title")) then
Response.Write(", " & title)
end if%>
|
<%=rs.fields("address")%> <%=rs.fields("address2")%> |
|
<%=rs.fields("city")%>, <%=rs.fields("state")%> <%=rs.fields("zipcode")%> |
|
<%end if%>
ph: (<%=rs.fields("pAreacode")%>) <%=rs.fields("phone")%> |
|
|
|
|
<%
rs.movenext
next%>
<%else%>
Sorry, No listings found. Please try again |
<%end if%>
|