Gönderen: 01-Ocak-2013 Saat 19:46 | Kayıtlı IP
|
|
|
iyi gunler.aşağıda gönderdiğim kodlarda ürünler alt alta listeleniyor.Ben yan yana 2 ve ya 3 tane listelenip daha sonra alta otomatik eklenmesini istiyorum.Şu anda alt alta listeleniyor. yardımlarınızı rica ediyorum. Alt alta listelenmesini sağlayan Kodlar aşağıdadır.
<html><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1254"> <html><!-- This code is optimized by the w3compiler from Port80 Software: BUY w3compiler to remove this comment from your optimized files at www.w3compiler.com! --><head><meta http-equiv="Content-Type" content="text/html; charset=windows-1254"></head><link rel="stylesheet" type="text/css" href="stil.css"><% Set bag = Server.CreateObject("ADODB.Connection") bag.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("../db/urun.mdb") if dur="normal" or dur="" then %><%kat=request("urunid") set gencbeyin_siparisayrinti = Server.CreateObject("ADODB.RecordSet") SQL_gencbeyin_siparisayrinti = "Select * from kategoriler where ad='"&request("kat")&"'" gencbeyin_siparisayrinti.open SQL_gencbeyin_siparisayrinti,bag,1,3 %><title></title> <div align="center"> <div align="center"><font size="2"></font> <% if gencbeyin_siparisayrinti.eof then %> <% else for m=1 to gencbeyin_siparisayrinti.recordcount if gencbeyin_siparisayrinti.eof then exit for if m mod 2=0 then bg="white" else bg="re" end if%> <% if gencbeyin_siparisayrinti("resim")<>"" then%> <img src="<%=gencbeyin_siparisayrinti("resim")%>"> <%end if%> <% gencbeyin_siparisayrinti.movenext next gencbeyin_siparisayrinti.close set gencbeyin_siparisayrinti = Nothing end if %> <% end if %> <p> <link rel="stylesheet" type="text/css" href="stil.css"></style> <body bgcolor="white" topmargin="0"> <p align="center"><% Const adOpenStatic = 3 Const adLockReadOnly = 1 Const adCmdText = &H0001 PAGE_SIZE =50 Dim strhit Dim cnnara Dim rstara Dim strDBPath Dim strSQL Dim strara Dim iPageCurrent Dim iPageCount Dim iRecordCount Dim I strhit = Request.ServerVariables("hit") strara = Request("kat") if strara="" then response.write "Yanlış Kategori girişi"end if If Request.QueryString("sayfa") = ""Then iPageCurrent = 1 Else iPageCurrent = CInt(Request.QueryString("sayfa")) End If %><% If strara <> ""Then strDBPath = Server.MapPath("../db/urun.mdb") Set cnnara = Server.CreateObject("ADODB.Connection") cnnara.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source="& strDBPath & ";" strSQL = "SELECT urun,uretici,aciklama,kategori,resim,id,fiyat,indirimli,taks itli,katealt,stok,pb,bayifiyat "_ & "FROM defter "_ & "WHERE kategori LIKE '%"& Replace(strara, "'", "''") & "%' "_ & "OR katealt LIKE '%"& Replace(strara, "'", "''") & "%' "_ & "ORDER BY id;" Set rstara = Server.CreateObject("ADODB.Recordset") rstara.PageSize = "30" rstara.CacheSize = "30" rstara.Open strSQL, cnnara, adOpenStatic, adLockReadOnly, adCmdText iRecordCount = rstara.RecordCount iPageCount = rstara.PageCount If iRecordCount = 0 Then %><span class="ara"><font size="1" face="Verdana"><b><br><%= strara %></b>; </font></span><span class="headinghome"><font size="1" face="Verdana">Kategorisinde Henüz Ürün Yok!</font></span><font size="1" face="Verdana"> </font></p><p align="center"><font size="1" face="Verdana"></font><span class="ara"><font size="1" face="Verdana"><% Else rstara.AbsolutePage = iPageCurrent %></font></span></p><div align="center"><center> <table border="0" cellspacing="2" style="border-collapse:collapse" bordercolor="white" width="100%" cellpadding="2"> <tr bgcolor="#0059b3"> <td width="50%" bgcolor="#999999" bordercolor="#F0F0F0"><span class="ara"><font color="white" size="1" face="Verdana"><%= strara %> kategorisinde <%= iRecordCount %> ürün var</font></span></td> <td width="50%" bgcolor="#999999" bordercolor="#F0F0F0"><p align="center"><font color="white"><span class="ara"><font size="1" face="Verdana"><%= iPageCount %> sayfanın <%= iPageCurrent %>. sayfası görüntüleniyor.</font></ span><font face="Verdana" size="1"> </font></font></td> </tr> <tr bgcolor="#ebffd7"> <td colspan="2" bgcolor="#ebffd7" background="img/index_29.gif"><font size="2"><strong>Alt Kategoriler:</strong> </font><font size="3"> <% Set bag = Server.CreateObject("ADODB.Connection") bag.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ="& Server.MapPath("../db/urun.mdb") if dur="normal" or dur="" then %> <%kat=request("kat")
set uyeler = Server.CreateObject("ADODB.RecordSet") SQL_uyeler = "Select * from altkategoriler where ad='"&kat&"'" uyeler.open SQL_uyeler,bag,1,3 %> <% if uyeler.eof then %> <% else for m=1 to uyeler.recordcount if uyeler.eof then exit for if m mod 2=0 then bg="white" else bg="re" end if %> <a href="default.asp?gb=altkate&kat=<%= strara %>&kata=<%=uyeler("alt")%>"><%=uyeler("al t")%></a> || <% uyeler.movenext next uyeler.close set uyeler = Nothing end if %> <% end if %> </td> </tr> </table> </center></div><hr width="100%" size="1" color="black"> <div align="center"> </div> <table width="100%" border="0" cellspacing="2" cellpadding="3" align="center"> <tr bgcolor="#0099FF"> <td width="688" height="14" bgcolor="#000080"><font face="Verdana" color="white"> <b>Ürün</b></font& gt;</td> <td width="247" height="14" bgcolor="#000080"><font face="Verdana" color="white"><b>Fiyat</b></font></t d> <td width="60" bgcolor="#000080"><font face="Verdana" color="white"><b>Stok</b></font></td > </tr> <% Do While Not rstara.EOF And rstara.AbsolutePage = iPageCurrent %> <tr bgcolor="#E6EBF0"> <td height="25" bgcolor="#F0F0F0"><font face="Verdana"> <font color="#666666"><a href="default.asp?gb=urun&id=<%= rstara.Fields("id").Value %>"><img width="50" height="60" src="<%=rstara.Fields("resim").Value%>" border="0"><%= rstara.Fields("uretici").Value %> | <%= rstara.Fields("urun").Value %></a></font></font></td> <td bgcolor="#F0F0F0"><div align="center"><font face="Verdana"><b><font color="#666666"> <%if rstara.Fields("indirimli").Value =0 then %> <%= rstara.Fields("fiyat").Value %> </font></a><font color="#666666"> <% if rstara.Fields("pb").Value="TL" then response.Write "YTL" else response.Write rstara.Fields("pb").Value%></font></a></b& gt;</font> + KDV<font face="Verdana"><b><font color="#666666"> <%else %> <strike> <%= rstara.Fields("fiyat").Value %> </font></a><font color="#666666"> <% if rstara.Fields("pb").Value="TL" then response.Write "YTL" else response.Write rstara.Fields("pb").Value%></font></a></b& gt;</font> + KDV</strike><font face="Verdana"><b><font color="#666666"> </font></a></b></font> <table width="100%" border="1" align="center" cellpadding="0" cellspacing="00" bordercolor="black"> <tr> <td bordercolor="#ebffd7" bgcolor="#ebffd7"><table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" bordercolor="#999999"> <tr> <td bgcolor="#ebffd7"><div align="center"><font face="Verdana"><b><font color="red"><img src="indirimli.gif" width="73" height="22" border="0"><br/><%= rstara.Fields("indirimli").Value %></font></b></font> <font face="Verdana"><b><font color="#666666"> <% if rstara.Fields("pb").Value="TL" then response.Write "YTL" else response.Write rstara.Fields("pb").Value%> </font></b></font> +KDV</div></td> </tr> </table></td> </tr> </table> <%end if%> <% if session("tip")="bayii" then%> <br> <font color="red"><strong><em>Bayii Fiyatı:</em></strong></font><br/>< ;em><strong><font face="Verdana"><font color="#666666"><%= rstara.Fields("bayifiyat").Value %></font></a><font face="Verdana" color="#666666"><b> <% if rstara.Fields("pb").Value="TL" then response.Write "YTL" else response.Write rstara.Fields("pb").Value%> </b></a></font>+ KDV</font> <%end if%>
</strong></em></div> <div align="center"></div></td> <td width="60" bgcolor="#F0F0F0"><div align="center"><font face="Verdana"><b> <%if rstara.Fields("stok").Value>0 then %> </b></font> <table width="25" height="5" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#00CC00"><div align="center"><font face="Verdana"><b><font size="1" face="Verdana">var</font></b></font>< ;/div></td> </tr> </table> <font face="Verdana"><b> <%else%> </b></font> <table width="25" height="5" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#FF0000"><div align="center"><font face="Verdana"><b><font color="#FFFFFF" size="1">yok</font></b></font></div& gt;</td> </tr> </table> <font face="Verdana"><b> <%end if%> <%if rstara.Fields("stok").Value>0 then %> <%else%> <%end if%> </b></font></div></td> </tr> <% rstara.MoveNext Loop %> </table> <div align="center"></div> <hr width="100%" size="1" color="black"> <div align="center"><br> Sayfalar: <font face="Verdana"><span class="headinghome"><font size="1"> <% If iPageCurrent > 1 Then %> </font></span><font size="1"> <% %> </font></font><font size="1" face="Verdana" color="navy"> <% End If For I = 1 To iPageCount If I = iPageCurrent Then %> <%= I %> <% Else %> <span class="headinghome"><a href="default.asp?gb=kate&kat=<%=Request.querystring( "kat")%>&sayfa=<%= I %>"><font face="Verdana"><%= I %></font></a></span> <% End If Next If iPageCurrent < iPageCount Then %> <% End If %> </font><font face="Verdana" size="1"> <% End If rstara.Close Set rstara = Nothing cnnara.Close Set cnnara = Nothing End If %> </font> </div> <div align="center"><center></center></div>
|