<%if request("busca") = "" then%>
| Visualizando todos os tópicos cadastrados |
| Comentários |
Titulo |
<%dim ObjAdoConn, StrSQL, RS
StrSQL = "SELECT * from tbs_forumP where status = 1 order by id desc"
Conecta ObjAdoConn, StrSQL, RS
if not RS.EOF then
indx = 0
do Until RS.EOF
%>
|
<%dim ObjAdoConnR, StrSQLR, RSR
StrSQLR = "SELECT count(*) as total from tbs_forumR where status = 1 and id_forumP = '"& sBDTratarNumero(rs("id"))&"'"
Conecta ObjAdoConnR, StrSQLR, RSR
if not RSR.EOF then
response.write(RSR("total"))
else
response.write("0")
end if
Desconecta ObjAdoConnR, RSR
%>
|
<%=RS("titulo")%> |
|
" class="links">Ver Comentários
|
<%
RS.MoveNext()
loop
else
end if
Desconecta ObjAdoConn, RS
%>
<%else%>
| Resultado da busca em todos os tópicos. |
|
<%dim ObjAdoConnBT, StrSQLBT, RSBT
busca = sBDTratarString(request("busca"))
StrSQLBT = "SELECT count(*) as total from tbs_forumP where status = 1 and titulo like '%"& busca &"%'"
Conecta ObjAdoConnBT, StrSQLBT, RSBT
response.Write("Foram achados "& RSBT("total")&" relacionados a sua busca.")
Desconecta ObjAdoConnBT, RSBT
%>
|
| Comentários |
Titulo |
<%dim ObjAdoConnB, StrSQLB, RSB, busca
busca = sBDTratarString(request("busca"))
StrSQLB = "SELECT * from tbs_forumP where status = 1 and titulo like '%"& busca &"%'"
Conecta ObjAdoConnB, StrSQLB, RSB
if not RSB.EOF then
indx = 0
do Until RSB.EOF
%>
|
<%dim ObjAdoConnRBR, StrSQLRBR, RSRBR
StrSQLRBR= "SELECT count(*) as total from tbs_forumR where status = 1 and id_forumP = '"& sBDTratarNumero(RSB("id"))&"'"
Conecta ObjAdoConnRBR, StrSQLRBR, RSRBR
if not RSRBR.EOF then
response.write(RSRBR("total"))
else
response.write("0")
end if
Desconecta ObjAdoConnRBR, RSRBR
%>
|
<%=RSB("titulo")%>
|
|
" class="links">Ver Comentários
|
<%
RSB.MoveNext()
loop
else
end if
Desconecta ObjAdoConnB, RSB
%>
<%end if%>
|