% '@Language=VBScript %> <% 'Option Explicit %> <'''html>
|
<% if qu<>"" then %>
ARAMA SONUÇLARI
<% call searchpages end if sub SearchPages dim cnindex set cnindex=createobject("adodb.connection") cnindex.open "provider=msidxs; data source=web" set rsindex=createobject("adodb.recordset") rsindex.pagesize=10 on error resume next rsindex.open "SELECT rank, DOCTITLE, path, FILENAME FROM SCOPE() " & _ "WHERE ( " & _ "( (FREETEXT('" & qu & "') > 0) AND " & _ "(path NOT LIKE '%[_]vti[_]%') ) AND ( " & _ "(FILENAME LIKE '%.asp%') OR " & _ "(FILENAME LIKE '%.htm%') OR " & _ "(FILENAME LIKE '%.doc') OR " & _ "(FILENAME LIKE '%.xls') OR " & _ "(FILENAME LIKE '%.xml') OR " & _ "(FILENAME LIKE '%.txt') ) ) " & _ "ORDER BY Rank DESC", cnindex,1,3 if err.number>0 then response.write "Geçerli bir metin aramayi denemelisiniz." err.clear exit sub end if on error goto 0 if rsindex.eof then response.write "Sayfa bulunamadi." exit sub end if maxpage=CLng((rsindex.recordcount-1)/rsindex.pagesize)+1 if maxpage>10 then maxpage=10 if pg>maxpage then pg=maxpage rsindex.absolutepage=pg call PageNumbers %>
<% end sub sub PageNumbers '''if maxpage<=1 then exit sub %>
|