ASP老手请进,关于分行问题.
各位高手哥哥姐姐们,小弟有难处了,5~~~~~~~~
下面的代码是显示首页产品的,可是不管多少产品都是显示一行,有谁能够帮我改一下这段代码,让产品可以显示多行
如果需要其他文件可以加我QQ:182532191
小弟在次先谢谢了!!!
<%
Set Rs = server.createobject("adodb.recordset")
Rs.source = "SELECT * FROM Products where LPutout=true ORDER BY id DESC"
Rs.open Rs.source,conn,1,1
Response.Write"<table width='99%' border='0' cellspacing='0' cellpadding='0' class='Index-Center4'>"
if Rs.BOF then
response.write "<tr><td align='center'>暂无产品信息!</tr></td>"
else
Response.Write"<tr>"
for i=1 to 15
if Rs.EOF or Rs.BOF then exit for
Response.Write"<td width='165'>"
'=========
set RsTrue = server.createobject("adodb.recordset")
RsTrue.open "select GroupLevel from Nweb_UGroup where GroupID='"&Rs("GroupID")&"'",conn,1,1
GroupLevel=RsTrue("GroupLevel")
RsTrue.Close
set RsTrue=nothing
if Session("GroupLevel")="" then Session("GroupLevel")=0
LPattern=Rs("LPattern")
Select Case Rs("Exclusive")
Case "<"
if Session("GroupLevel") < GroupLevel then
LPattern="Images/NoRight.gif"
end if
Case "="
if Session("GroupLevel") <> GroupLevel then
LPattern="Images/NoRight.gif"
end if
End Select
'=========
LName=Rs("LName")
if len(LName)>10 then LName=left(LName,10)&"…"
Response.Write"<table align=center border='0' cellpadding='0' cellspacing='5'><tr><td align='center' width='165' height='165' style='text-decoration: underline; border: 1px solid #CCCCCC;'><a href='ProductsView.asp?id="&Rs("id")&"' target='_blank'><img src="&LPattern&" border=0 width=140 height=140 onload=javascript:DrawImage(this);></a></td></tr><tr><td height=28><img src=Images/Arrow-Index-Products.gif width=14 height=12 align=absmiddle> <a href='ProductsView.asp?id="&Rs("id")&"' target='_blank'>"&LName&"</a></td></tr></table>"
Rs.movenext
next
end if
Response.Write"</tr>"
Response.Write"</table>"
Rs.Close
set Rs=nothing
%>
下面的代码是显示首页产品的,可是不管多少产品都是显示一行,有谁能够帮我改一下这段代码,让产品可以显示多行
如果需要其他文件可以加我QQ:182532191
小弟在次先谢谢了!!!
<%
Set Rs = server.createobject("adodb.recordset")
Rs.source = "SELECT * FROM Products where LPutout=true ORDER BY id DESC"
Rs.open Rs.source,conn,1,1
Response.Write"<table width='99%' border='0' cellspacing='0' cellpadding='0' class='Index-Center4'>"
if Rs.BOF then
response.write "<tr><td align='center'>暂无产品信息!</tr></td>"
else
Response.Write"<tr>"
for i=1 to 15
if Rs.EOF or Rs.BOF then exit for
Response.Write"<td width='165'>"
'=========
set RsTrue = server.createobject("adodb.recordset")
RsTrue.open "select GroupLevel from Nweb_UGroup where GroupID='"&Rs("GroupID")&"'",conn,1,1
GroupLevel=RsTrue("GroupLevel")
RsTrue.Close
set RsTrue=nothing
if Session("GroupLevel")="" then Session("GroupLevel")=0
LPattern=Rs("LPattern")
Select Case Rs("Exclusive")
Case "<"
if Session("GroupLevel") < GroupLevel then
LPattern="Images/NoRight.gif"
end if
Case "="
if Session("GroupLevel") <> GroupLevel then
LPattern="Images/NoRight.gif"
end if
End Select
'=========
LName=Rs("LName")
if len(LName)>10 then LName=left(LName,10)&"…"
Response.Write"<table align=center border='0' cellpadding='0' cellspacing='5'><tr><td align='center' width='165' height='165' style='text-decoration: underline; border: 1px solid #CCCCCC;'><a href='ProductsView.asp?id="&Rs("id")&"' target='_blank'><img src="&LPattern&" border=0 width=140 height=140 onload=javascript:DrawImage(this);></a></td></tr><tr><td height=28><img src=Images/Arrow-Index-Products.gif width=14 height=12 align=absmiddle> <a href='ProductsView.asp?id="&Rs("id")&"' target='_blank'>"&LName&"</a></td></tr></table>"
Rs.movenext
next
end if
Response.Write"</tr>"
Response.Write"</table>"
Rs.Close
set Rs=nothing
%>