<%
else
Dim dirdb
Dim dir
Set dirdb = New Database
dirdb.ShowNotFound = false
campo = request("field")
strSQL = "select * from data inner join categories on data.cat = categories.category where "&campo&" like '%" + request("search") + "%' and aproved=1 order by id desc"
if campo = "all" then
strSQL = "select * from data inner join categories on data.cat = categories.category where (name like '%" + request("search") + "%' or description like '%" + request("search") + "%' or title like '%" + request("search") + "%' or country like '%" + request("search") + "%') and aproved=1 order by id desc"
end if
dirdb.Query = strSQL
dir = dirdb.GetRecordArray(15)
Dim rowCounter
on error resume next
if dirdb.TotalRecords > 0 then
For rowCounter = 0 To UBound(dir,2)
%>
<%=dir(1, rowCounter)%>
<%=dir(2, rowCounter)%>
<%=dir(3, rowCounter)%>
Category:<%=dir(4, rowCounter)%>
Date:<%=dir(5, rowCounter)%>
Email:<%=dir(12, rowCounter)%>
Country:<%=dir(7, rowCounter)%>
Remarks:<%=dir(6, rowCounter)%>
Date Added:<%=dir(9, rowCounter)%>
<% next end if%>
<% if dirdb.TotalRecords > 0 then out dirdb.GetPagingHTML()%> <% end if Set dir = nothing Set dirdb = nothing %>