% Response.Buffer = true %>
![[ search ]](../skinz/images<%=customcolours%>/t_search.gif) |
<%
'Response.Write("session(""look_for"")[" & session("look_for") & "] ")
'Response.Write("Request.Form(""searchfor"")[" & Request.Form("searchfor") & "] ")
'Response.Write("Request.QueryString(""listby"")[" & Request.QueryString("listby") & "] ")
'allow for a clearing for the session("look_for")
if (Request.QueryString("listby") = "") and ((Request.QueryString("clearall") = "yes") or (Request.Form("searchfor") = "")) then
session("look_for") = ""
end if
'allow for a quick search from the nav bar
if Request.QueryString("quick") <> "" then
dim quicksearch
quicksearch = true
session("look_for") = Request.QueryString("quick")
end if
'lets them resort the results
if Trim(Request.Form("searchfor")) = "" then
session("look_for") = session("look_for")
else
session("look_for") = Trim(Request.Form("searchfor"))
end if
%>
 |
Looking for that certain mod? You know you saw it some where, right?
Try a LvL search, its no luck dip search this one, every mod listed is here somewhere:
<% if Request.QueryString("submitted") then %>
| mod name |
game type |
author |
updated |
website |
posts |
<%
set tigCON = Server.CreateObject("ADODB.Connection")
tigCON.Open(DSN)
' set up the query to list the news by date Desc
query = "SELECT " & _
"mods_login.id AS id, " & _
"mods_login.name AS author, " & _
"mods_login.email AS author_email, " & _
"mods_list.nmb_comments AS nmb_comments, " & _
"mods_list.game_type AS type, " & _
"mods_list.datestamp AS datestamp, " & _
"mods_list.website AS website, " & _
"mods_list.name AS mod_name, " & _
"mods_list.info AS info " & _
"FROM mods_list INNER JOIN " & _
"mods_login ON " & _
"mods_list.id_login = mods_login.id " & _
"WHERE mods_list.active = 1 AND ("
if quicksearch then
'only want to search type of level field
query = query & "(mods_list.datestamp like '%" & SQLSafe(session("look_for")) & "%')) "
else
query = query & "(mods_login.name like '%" & SQLSafe(session("look_for")) & "%') or "
query = query & "(mods_login.email like '%" & SQLSafe(session("look_for")) & "%') or "
query = query & "(mods_list.game_type like '%" & SQLSafe(session("look_for")) & "%') or "
query = query & "(mods_list.name like '%" & SQLSafe(session("look_for")) & "%') or "
query = query & "(mods_list.website like '%" & SQLSafe(session("look_for")) & "%')) "
end if
if Request.QueryString("listby") = "title" then
query = query & " order by mods_list.name"
elseif Request.QueryString("listby") = "author" then
query = query & " order by mods_login.name"
elseif Request.QueryString("listby") = "type" then
query = query & " order by mods_list.game_type"
elseif Request.QueryString("listby") = "date" then
query = query & " order by mods_list.datestamp desc"
elseif Request.QueryString("listby") = "comments" then
query = query & " order by mods_list.nmb_comments desc"
elseif Request.QueryString("listby") = "site" then
query = query & " order by mods_list.website"
else
query = query & " order by mods_list.name"
end if
'Response.Write("Query = [" & query & "] ")
set tigRS = tigCON.Execute(query)
' make sure we have see if there is no records
if (tigRS.EOF) Then
%>
| your search for <%=session("look_for")%>
has returned no results, have a look over the search tips below for some pointers |
<%
end if
i = 1
dim t_c, t_id, t_w
do while not tigRS.EOF
if i mod 2 then
bgcolor = ""
else
bgcolor = " bgcolor="& bgcolourCustom &""
end if
t_id = tigRS("id")
t_w = tigRS("website")
t_c = tigRS("nmb_comments")
%>
| ><%=tigRS("mod_name")%> |
><%=tigRS("type")%> |
>"><%=tigRS("author")%> |
><%=realdateshort(tigRS("datestamp"))%> |
><%=replace(replace(t_w,"http://",""),"ftp://","")%> |
><%=tigRS("nmb_comments")%> |
<%
i = i + 1
if i mod 5 = 0 then
Response.Flush
end if
tigRS.MoveNext
loop
tigRS.close
tigCON.close
%>
<% end if %>
 |
| search tips: |
 |
* Getting no results? try part of a word only (less is more here).
* A 'blank' search will return every mod, are you sure you want to do this?
* You can use '_' as a single letter wild card.
* You can search by mod name or authors name or authors email or type of mod, but not
all at once (you will get no results)
* CTF will return all mods that have CTF in there *game type* description.
* A serach for RA, CTF will return nothing (unless there is a RA, CTF mod :]).
* A serach for the letter 'e' will return every mod with an 'e' in its name,
email, website or game type (a lot of them)
|
|
 |
|