Gönderen: 16-Eylül-2007 Saat 22:46 | Kayıtlı IP
|
|
|
İlginiz için tekrar teşekkür ederim. Kolay gelsin, şansınız açık olsun.
Aşağıdaki dosya form doldurulan search.asp
<%@ Language=VBScript Codepage=1254 %> <% KullAdi=Request.Querystring("KullAdi") KullAdi=Replace(KullAdi,"'","") %> <% Session.TimeOut=20 Kullanici=Session("Kullanici") UId=Session.Contents("UId") If Kullanici="" Then Response.Redirect "index.asp" else End If %> <html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> <title>ARAMA SAYFASI</title> <!--#include file="top.htm"--> <br> <center> <table border="0" width="85%" cellpadding="0" bgcolor="#FFFFFF" style="border-collapse: collapse;
margin-top: 6" bordercolor="#DDE4AB" cellspacing="0"> <tr> <form action="arama.asp?KullAdi=<%=Kullanici%>" method="post"> <td width="45" align="right"> <font face="Tahoma" size="2" class="stilim">Cinsiyet:</font></td> <td width="80"> <SELECT id=select1 name=Cinsiyeti style="HEIGHT: 104; WIDTH: 104; text-align:left" size="1" class="stilim"> <option selected value="*">Bay</option> <option>Bayan</option> </SELECT></td> <td width="45" align="right"> <font face="Tahoma" size="2" class="stilim">Yaş:</font></td> <td width="56"> <SELECT id=select6 name=DTarihi style="HEIGHT: 76; WIDTH: 76; text-align:left" size="1"
class="stilim"> <option selected value="*">15-20</option> <option>21-25</option> <option>26-30</option> <option>31-35</option> <option>36-40</option> <option>41-45</option> <option>46-50</option> <option>51-55</option> <option>56-60</option> <option>61-65</option> <option>66-99</option> </SELECT></td> <td width="45" align="right"> <font face="Tahoma" size="2" class="stilim">Eğitim:</font></td> <td width="80"> <SELECT id=select5 name=Tahsil style="HEIGHT: 104; WIDTH: 104; text-align:left" size="1" class="stilim"> <option selected value="*">Farketmez</option> <option>ilkokul</option> <option>ortaokul</option> <option>lise</option> <option>üniversite</option> </SELECT></td> <td width="70" align="center"><input type="submit" value="ARA" name="B1"> </td> </form> </tr> </table> </center> <br> <center> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"
bordercolor="#111111" width="50%" id="AutoNumber6"> <tr> <td width="100%"> <p align="center"><form method="post" action="Kullanici.asp?KullAdi=<%=Kullanici%>"> <p align="center"> <input type="submit" name="Submit72" value="Ana Sayfa" class="Input"> </p> </form> </td> </tr> </table> </center> </body> </html>
ARAMAYI YAPAN DOSYA AŞAĞIDAKİ:
<%@ Language=VBScript Codepage=1254 %> <% KullAdi=Request.Querystring("KullAdi") KullAdi=Replace(KullAdi,"'","") %> <% Session.TimeOut=20 Kullanici=Session("Kullanici") UId=Session.Contents("UId") If Kullanici="" Then Response.Redirect "index.asp" else End If %>
<% DB="DBQ=" & Server.Mappath("data/TabloMesaj.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" Set Baglanti = Server.CreateObject("ADODB.Connection") Baglanti.Open DB Okundumu="Hayır" Kullanicilar="SELECT * FROM TblKisi WHERE Gorunsun='Evet'" MesajAl="SELECT *FROM TblMesaj WHERE UId='"&UId&"' AND Okundumu='Hayır';" Set RSMesaj=Baglanti.Execute (MesajAl) If RSMesaj.EOF OR RSMesaj.BOF Then Sayac="0" Else Sayac=0 While Not RSMesaj.EOF Sayac=Sayac+1 RSMesaj.MoveNext Wend End If MesajSay="SELECT *FROM TblMesaj WHERE UId='"&UId&"'" Set RSMSay=Baglanti.Execute (MesajSay) If RSMSay.EOF OR RSMSay.BOF Then ToplMesaj="0" Else ToplMesaj=0 While Not RSMSay.EOF ToplMesaj=ToplMesaj+1 RSMSay.MoveNext Wend End If %>
<html> <head> <meta name="GENERATOR" content="Microsoft FrontPage 5.0"> <meta name="ProgId" content="FrontPage.Editor.Document"> <meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> <title>ARKADAŞ ARAMA</title>
<script language="JavaScript"> function newWindow(mypage,myname,w,h,features) { if(screen.width){ var winl = (screen.width-w)/2; var wint = (screen.height-h)/2; }else{winl = 0;wint =0;} if (winl < 0) winl = 0; if (wint < 0) wint = 0; var settings = 'height=' + h + ','; settings += 'width=' + w + ','; settings += 'top=' + wint + ','; settings += 'left=' + winl + ','; settings += features; win = window.open(mypage,myname,settings); win.window.focus(); } </script>
<!--#include file="top.htm"-->
<% DTarihi=Request.Form("DTarihi") Cinsiyeti=Request.Form("Cinsiyeti") if Cinsiyeti="*" then Cinsiyeti="" Sehir=Request.Form("Sehir") if Sehir="*" then Sehir="" Tahsil=Request.Form("Tahsil") if Tahsil="*" then Tahsil="" DB="DBQ=" & Server.Mappath("data/TabloMesaj.mdb") & ";Driver={Microsoft Access Driver (*.mdb)};" Set Baglanti = Server.CreateObject("ADODB.Connection") Baglanti.Open DB
if DTarihi="15-20" then ss="Select * from tbluye where DTarihi between '15' and '20' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="21-25" then ss="Select * from tbluye where DTarihi between '21' and '25' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="26-30" then ss="Select * from tbluye where DTarihi between '26' and '30' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="31-35" then ss="Select * from tbluye where DTarihi between '31' and '35' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="36-40" then ss="Select * from tbluye where DTarihi between '36' and '40' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="41-45" then ss="Select * from tbluye where DTarihi between '41' and '45' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="46-50" then ss="Select * from tbluye where DTarihi between '46' and '50' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="51-55" then ss="Select * from tbluye where DTarihi between '51' and '55' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="56-60" then ss="Select * from tbluye where DTarihi between '56' and '60' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="61-65" then ss="Select * from tbluye where DTarihi between '61' and '65' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else if DTarihi="66-99" then ss="Select * from tbluye where DTarihi between '66' and '99' and Cinsiyeti Like
'%"&Cinsiyeti&"' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" else ss="SELECT * FROM TblUye WHERE Cinsiyeti Like '%"&Cinsiyeti&"' AND DTarihi Like
'%"&DTarihi&"%' AND Tahsil Like '%"&Tahsil&"%' order by DTarihi" end if end if end if end if end if end if end if end if end if end if end if Set rs2 = server.CreateObject("ADODB.Recordset") rs2.Open ss, Baglanti, 1,3 %>
<% If rs2.BOF and rs2.EOF Then%> <h3 align="center">Kayıt Bulunamadı!</h3>
<%ELSE%> <% rs2.pagesize=20 dim sayfa, maxsayfa maxsayfa= rs2.recordcount / rs2.pagesize if maxsayfa > Int(maxsayfa) then maxsayfa = Int(maxsayfa) +1 sayfa=request("sayfa") + 0 if sayfa>maxsayfa then sayfa=maxsayfa if sayfa<1 then sayfa=1 rs2.absolutepage=sayfa dim sayacs sayacs=0 %>
<div align="center"> <table width="85%" cellspacing="0" cellpadding="0" style="border-collapse: collapse"
bordercolor="#111111" border="0" bgcolor="#EEF2F7"> <tr> <td> <font class="stilim"> <p align="center"> <% Call SayfalariYaz %></p> </font> </td> </tr> </table> </div>
<div align="center"> <table bordercolor="#C0C0C0" style="border-collapse: collapse" cellpadding="0" cellspacing="0"
bgcolor="#FFFFFF" border="2" width="85%"> <TR> <td width="3%" bgcolor="#FFCCCC" align="center"><img border="0" src="foto/foto2.jpg"></td> <td width="17%" bgcolor="#FFCCCC" align="center"><font class="stilim">Nick</font></td> <td width="7%" bgcolor="#FFCCCC" align="center"><font class="stilim">Cinsiyet</font></td> <td width="5%" bgcolor="#FFFFFF" align="center"><font class="stilim">Yaş</font></td> <td width="5%" bgcolor="#FFCCCC" align="center"><font class="stilim">Boy</font></td> <td width="5%" bgcolor="#FFCCCC" align="center"><font class="stilim">Kilo</font></td> <td width="10%" bgcolor="#FFCCCC" align="center"><font class="stilim">Eğitim</font></td> <td width="20%" bgcolor="#FFCCCC" align="center"><font class="stilim">Şehir</font></td> <td width="14%" bgcolor="#FFCCCC" align="center"><p align="center"><font
class="stilim">Mesaj</font></td> </tr>
<%do while not rs2.eof if sayacs >= rs2.pagesize then exit do sayacs = sayacs + 1 %>
<% if rs2("cinsiyeti")="Bay" then%> <tr valign="top"> <td width="3%" background="bay.jpg" align="center" height="30" valign="middle"> <% if rs2("filename")<>"" then %> <center><img src="foto/24.jpg"></a></center> <%else%> <%end if%> </td> <td width="17%" background="bay.jpg" align="center" height="30" valign="middle"><font
class="stilim"><a href="#" title="Üyeyi Daha İyi Tanı"
onClick="MM_openBrWindow('Profil.asp?KullAdi=<%=rs2("Kull Adi")%>','Profil','scrollbars=yes,width=700
,height=550')"><%=rs2("KullAdi")%></a></fo nt></td> <td width="7%" background="images/bay.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Cinsiyeti")%></font>&l t;/td> <td width="5%" background="images/bay.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("DTarihi")%></font>< /td> <td width="5%" background="images/bay.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Boy")%></font></td& gt; <td width="5%" background="images/bay.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Kilo")%></font></td > <td width="10%" background="images/bay.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Tahsil")%></font></ td> <td width="20%" background="images/bay.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Sehir")%></font></t d> <td width="13%" background="images/bay.jpg" align="center" height="30" valign="middle"> <p align="center">
<% if kullanici<>rs2("KullAdi") then %> <font class="stilim"><a
href="getmes.asp?Kullanici=<%=rs2("KullAdi")%>&Gon deren=<%=Kullanici%>&GidUid=<%=rs2("UId")%>"
style="text-decoration: none">Mesaj Gönder</a></font></td></tr> <% end if %> <% end if %>
<% if rs2("cinsiyeti")="Bayan" then%> <tr valign="top"> <td width="3%" background="bayan.jpg" align="center" height="30" valign="middle"> <% if rs2("filename")<>"" then %> <center><img src="foto/24.jpg"></center> <%else%> <%end if%></td> <td width="17%" background="images/bayan.jpg" align="center" height="30" valign="middle"><font
class="stilim"><a href="#" title="Üyeyi Daha İyi Tanı"
onClick="MM_openBrWindow('Profil.asp?KullAdi=<%=rs2("Kull Adi")%>','Profil','scrollbars=yes,width=700
,height=550')"><%=rs2("KullAdi")%></a></fo nt></td> <td width="7%" background="images/bayan.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Cinsiyeti")%></font>&l t;/td> <td width="5%" background="images/bayan.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("DTarihi")%></font>< /td> <td width="5%" background="images/bayan.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Boy")%></font></td& gt; <td width="5%" background="images/bayan.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Kilo")%></font></td > <td width="10%" background="images/bayan.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Tahsil")%></font></ td> <td width="20%" background="images/bayan.jpg" align="center" height="30" valign="middle"><font
class="stilim"><%=rs2("Sehir")%></font></t d> <td width="13%" background="images/bayan.jpg" align="center" height="30" valign="middle"> <p align="center">
<% if kullanici<>rs2("KullAdi") then %> <font class="stilim"><a
href="getmes.asp?Kullanici=<%=rs2("KullAdi")%>&Gon deren=<%=Kullanici%>&GidUid=<%=rs2("UId")%>"
style="text-decoration: none">Mesaj Gönder</a></font></td></tr> <% end if %> <% end if %>
<% rs2.movenext loop %>
</tr> </table> </div>
<div align="center"> <table width="85%" cellspacing="0" cellpadding="0" style="border-collapse: collapse"
bordercolor="#111111" border="0" bgcolor="#EEF2F7"> <tr> <td> <font class="stilim"> <p align="center"> <% Call SayfalariYaz %> </p> </font> </td> </tr> </table> </div>
<%=rs2.pagesize * (sayfa - 1) + 1 %> - <% =rs2.pagesize * (sayfa - 1) + sayacs %> <% rs2.close baglanti.close set baglanti=nothing %>
<% end if %>
<br> <% Sub SayfalariYaz() dim i if MaxSayfa <= 1 then exit sub if sayfa <> 1 then Response.Write "<font size='3' color='green'><a href=""?Sayfa=" & sayfa - 1 & """ class='leftmenu'
onFocus='this.blur()'><< Geri </a></font>" Else End If for i=1 to MaxSayfa if sayfa = i then response.write "<font size='3' color='red' class='stilim'>" & "<b>" & " " & i & "</b>"&"</font>" else response.write (" <a href=""?Sayfa="& "" & i & " "" class='leftmenu' onFocus='this.blur()'>" & " " &
i &"</a>") end if next if Sayfa <> MaxSayfa then Response.Write "<font size='3' color='green'><a href=""?Sayfa=" & sayfa + 1 & """
class='leftmenu' onFocus='this.blur()'> İleri >></a></font>" else Response.Write "<font size='2' color='red' class='stilim'> Son >|</font>" end if End Sub %> </body></html>
__________________ Serpil
|