<%
metin=filtre(trim(request.querystring("arama")))
if metin="" then
Response.Redirect "Default.asp"
Response.End
End if%>
<title><%=metin%> İndir</title>
<td class="blok" height="23"><strong> Arama Sonuçları</strong></td>
</tr>
<tr>
<td class="talt">
<%
Set ara = Server.CreateObject("adodb.recordset")
sql="Select kimlik,adi,aciklama,tarih from Programlar where onay=1 and adi like '%" & metin & "%' or aciklama like '%" & metin & "%' ORDER BY Tarih DESC"
ara.open sql,conn,1,3
Session("flood")=dateadd("n",+0,now())
if ara.eof then
Response.Write "<table width=""100%"" border=""0""><tr><td> </td></tr><tr><td height=""25"" align=""center"">Hiç kayıt bulunamadı..</td></tr><tr><td> </td></tr></table>"
else
sayfa = Request.QueryString("sayfa")
If sayfa="" Then sayfa=1
ara.pagesize = listeleara 'Sayfada kac adet veri bulunacak
ara.absolutepage = sayfa
sayfa_sayisi = ara.pagecount
for i=1 to ara.pagesize
if ara.eof then exit for
%>
<br />
<table width="97%" class="tablo" border="1" align="center" cellspacing="0" cellpadding="0">
<tr>
<td class="katarka" height="23"> <strong><a href="indir.asp?id=<%=ara("kimlik")%>" title="<%=ara("adi")%> programını indir.."><%=ara("adi")%></a></strong></td>
</tr>
<tr>
<td> <img src="Img/miniok.gif" /> <%= ara("aciklama") %></td>
</tr>
</table>
<%
ara.movenext
Next
%>
<br />
<div align="center">
<table border="0" width="97%" class="tablo">
<tr>
<td height="23" class="katarka">
<center><strong>
<%
onceki=cint(sayfa) - 1
sonraki=cint(sayfa) + 1
if onceki < 1 then
Response.write ""
else
Response.write "<a href=""?arama="&metin&"&sayfa=" & onceki & """>« Geri </a>"
end if
for x = 1 to sayfa_sayisi
if x = cint(sayfa ) then
response.write " [ "&x&" ] "
else
response.Write " <a href=?arama="&metin&"&sayfa=" & x & ">[ " & x & " ]</a> "
end if
next
if sonraki > sayfa_sayisi then
Response.Write ""
else
Response.write " <a href=""?arama="&metin&"&sayfa=" & sonraki & """""> ileri »</a>"
end if
end if
%></strong>
</center> arama sayfasına ek...
1
●539
- 24-12-2008, 23:28:26Arkadaşlar aranılan kelımelerı verıtabanına eklemeyı ve son arananları lıstelemeyı nasıl yapabılırım..arama sayfasının kodları boyle..