Arkadaşlar bir sorum olucak şu döngüye sayfalama ve sıralama
ilk kayıt 1-2-3-4-5- son kayıt şeklinde bir düzenleme yapabilirmisiniz acil gerekli teşekkürler...
---------------------BAĞLANTI.ASP-------------------------------
<%
session.lcID = 1055
session.codepage = 1254
yol = server.mappath("../db/db.mdb")
baglanti = "provider=microsoft.jet.oledb.4.0; data source="&yol&";"
Function kayitSeti(SQL)
Set kayitSet = server.CreateObject("adodb.recordset")
kayitSet.open SQL,baglanti,1,3
Set kayitSeti = kayitSet
End Function
Function mesajGoster(mesaj)
with response
.write "<script language=javascript>"
.write "alert('"&mesaj&"');"
.write "</script>"
.write "<script language=javascript>"
.write "history.go(-1)"
.write "</script>"
End with
End Function
Function popupClose()
with response
.write "<script language=javascript>"
.write "opener.document.location.reload();"
.write "</script>"
.write "<script language=javascript>"
.write "window.close();"
.write "</script>"
End with
End function
%>
----------------------LİSTELE.ASP--------------------------------
<!--#include file="bolumler_baglanti.asp"-->
<table border="1" width="99%" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium" valign="top">
<table border="1" width="99%" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium" width="167" valign="top"><!--#include file = "sol.asp"-->
</td>
<td style="border-style: none; border-width: medium" width="718">
<%
set sonList = server.createobject("adodb.recordset")
sonList_S = ("SELECT TOP 12 * from urunler ")
sonList.open sonList_S,baglanti,1,3
%>
<table border="0" width="100%" cellspacing="1" cellpadding="2">
<%
sonList.pagesize = sonList.recordcount
for sayi1 = 1 to sonList.pagesize
if sonList.eof then exit for
set menuler = server.createobject("adodb.recordset")
menuler_S = ("SELECT * from menuler WHERE id = "&sonList("menuId")&"")
menuler.open menuler_S,baglanti,1,3
set kategoriOku = server.createobject("adodb.recordset")
kategoriOku_S = ("SELECT * from urunkategoriler WHERE id = "&sonList("kategoriId")&"")
kategoriOku.open kategoriOku_S,baglanti,1,3
%>
<tr bgcolor="#f4f4f4" style="cursor:hand;">
<%
if NOT sonList.eof and NOT sonList.absoluteposition > sonList.pagesize then
%>
<td align="center" width="25%">
<table border="1" width="100%" style="border:1px dotted #C0C0C0; ">
<tr>
<td style="border-style: none; border-width: medium"></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
<table border="1" width="100%" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium" colspan="3">
<p align="center">
<img src="urunResimler/<%=sonList("resim1")%>" width="150" height="150" /></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
Ürün Kodu</td>
<td style="border-style: none; border-width: medium">
:</td>
<td style="border-style: none; border-width: medium">
<%=sonList("urunKod")%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<%
sonList.movenext
end if
if NOT sonList.eof and NOT sonList.absoluteposition > sonList.pagesize then
set menuler = server.createobject("adodb.recordset")
menuler_S = ("SELECT * from menuler WHERE id = "&sonList("menuId")&"")
menuler.open menuler_S,baglanti,1,3
set kategoriOku = server.createobject("adodb.recordset")
kategoriOku_S = ("SELECT * from urunkategoriler WHERE id = "&sonList("kategoriId")&"")
kategoriOku.open kategoriOku_S,baglanti,1,3
set sehirOku = server.createobject("adodb.recordset")
sehirOku_S = ("SELECT * from iller WHERE id = "&sonList("il")&"")
sehirOku.open sehirOku_S,baglanti,1,3
%>
<td align="center" width="25%">
<table border="1" width="100%" style="border:1px dotted #C0C0C0; ">
<tr>
<td style="border-style: none; border-width: medium"></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
<table border="1" width="100%" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium" colspan="3">
<p align="center">
<img src="urunResimler/<%=sonList("resim1")%>" width="150" height="150" /></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
Ürün Kodu</td>
<td style="border-style: none; border-width: medium">
:</td>
<td style="border-style: none; border-width: medium">
<%=sonList("urunKod")%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<%
sonList.movenext
end if
if NOT sonList.eof and NOT sonList.absoluteposition > sonList.pagesize then
set menuler = server.createobject("adodb.recordset")
menuler_S = ("SELECT * from menuler WHERE id = "&sonList("menuId")&"")
menuler.open menuler_S,baglanti,1,3
set kategoriOku = server.createobject("adodb.recordset")
kategoriOku_S = ("SELECT * from urunKategoriler WHERE id = "&sonList("kategoriId")&"")
kategoriOku.open kategoriOku_S,baglanti,1,3
set sehirOku = server.createobject("adodb.recordset")
sehirOku_S = ("SELECT * from iller WHERE id = "&sonList("il")&"")
sehirOku.open sehirOku_S,baglanti,1,3
%>
<td align="center" width="25%">
<table border="1" width="100%" style="border:1px dotted #C0C0C0; ">
<tr>
<td style="border-style: none; border-width: medium"></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
<table border="1" width="100%" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium" colspan="3">
<p align="center">
<img src="urunResimler/<%=sonList("resim1")%>" width="150" height="150" /></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
Ürün Kodu</td>
<td style="border-style: none; border-width: medium">
:</td>
<td style="border-style: none; border-width: medium">
<%=sonList("urunKod")%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<%
sonList.movenext
end if
if NOT sonList.eof and NOT sonList.absoluteposition > sonList.pagesize then
set menuler = server.createobject("adodb.recordset")
menuler_S = ("SELECT * from menuler WHERE id = "&sonList("menuId")&"")
menuler.open menuler_S,baglanti,1,3
set kategoriOku = server.createobject("adodb.recordset")
kategoriOku_S = ("SELECT * from urunKategoriler WHERE id = "&sonList("kategoriId")&"")
kategoriOku.open kategoriOku_S,baglanti,1,3
set sehirOku = server.createobject("adodb.recordset")
sehirOku_S = ("SELECT * from iller WHERE id = "&sonList("il")&"")
sehirOku.open sehirOku_S,baglanti,1,3
%>
<td align="center" width="25%">
<table border="1" width="100%" style="border:1px dotted #C0C0C0; ">
<tr>
<td style="border-style: none; border-width: medium"></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
<table border="1" width="100%" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium" colspan="3">
<p align="center">
<img src="urunResimler/<%=sonList("resim1")%>" width="150" height="150" /></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
Ürün Kodu</td>
<td style="border-style: none; border-width: medium">
:</td>
<td style="border-style: none; border-width: medium">
<%=sonList("urunKod")%></td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<%
end if
if NOT sonList.eof and NOT sonList.absoluteposition > sonList.pagesize then
sonList.movenext
end if
next
%>
</tr>
</table>
<p align="center">
</p>
</td></tr></table><%
' menuler.close
' kategoriOku.close
' sonList.close
%></td>
</tr>
</table>
Sayfa Döngü ve Sıralama
2
●750
- 26-03-2010, 09:17:25Buyrun Çözümü yazayım!
<%
id=request("id")
sf=request.querystring("sf")
if sf="" Then
sf =1
end if
%>
<table>
<tr>
<%
kategorim = 5
Set ObjCatDri = Server.CreateObject("ADODB.Recordset")
sor = "Select * FROM urunler WHERE kategoriId LIKE '"&request("id")&"'"
ObjCatDri.Open sor,baglanti,1,3
KacarliSira = 4
KacTane = 10000
ObjCatDri.pagesize = 16
ObjCatDri.absolutepage = sf
sayfa = ObjCatDri.pagecount
for i=1 to ObjCatDri.pagesize
if ObjCatDri.eof then exit for
%>
<td style="border-style: none; border-width: medium">
<table border="1" width="100%" style="border-width: 0px">
<tr>
<td style="border-style: none; border-width: medium" colspan="3">
<p align="center">
<img src="urunResimler/<%=ObjCatDri("resim1")%>" width="150" height="150" /></td>
</tr>
<tr>
<td style="border-style: none; border-width: medium">
Ürün Kodu</td>
<td style="border-style: none; border-width: medium">
:</td>
<td style="border-style: none; border-width: medium">
<%=ObjCatDri("urunKod")%></td>
</tr>
</table>
</td>
<%
If i mod KacarliSira =0 Then
Response.Write "</tr><tr>"
End If
ObjCatDri.movenext
Next
ObjCatDri.close
set ObjCatDri = Nothing
%>
</tr></table>
<br>
<%
Response.Write "Sayfalar: "
for y=1 to sayfa
if CINT(TRIM(sf))=CINT(TRIM
) then%>
<b>[<%response.write "" & y %>]</b>
<%
else
response.write " <a href='kategori_icerik.asp?=kategoriIcerik&id="&id& "&sf=" & y & "'> "& y &".</a>"
end if
Next
%></td>