<%pagina = 15%> Salarium, o seu site de Remuneração e Benefícios.

Home>Fórum>Todos os Tópicos

Busca:
<%if request("busca") = "" then%> <%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 %> <% RS.MoveNext() loop else end if Desconecta ObjAdoConn, RS %>
Visualizando todos os tópicos cadastrados
Comentários Titulo
<%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
<%else%> <%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 %> <% RSB.MoveNext() loop else end if Desconecta ObjAdoConnB, RSB %>
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 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
<%end if%>