#12007/1/14 11:06:14
首页调用推荐产品,想,调用为一行四个产品,十二个产品结束调用,即首页调用三行推荐产品.
麻烦谁帮我看看,改一下.谢谢了.
-------------------------------------------------------
<TABLE cellPadding=0 align=left border=0 cellspace="0">
<TBODY>
<TR>
<TD id=demo1 vAlign=center>
<table width='100%' cellpadding='0' cellspacing='8' border='0' align='center'>
<tr valign='top'>
<%
Const New_img=1
set rs_Product=server.createobject("adodb.recordset")
sqltext="select top 12 * from Product where Passed=True and Elite=true order by UpdateTime and id desc"
rs_Product.open sqltext,conn,1,1
do while not rs_Product.eof
%>
<td align='center'>
<TABLE width=100% border=0 align=center cellPadding=0 cellSpacing=0>
<TR>
<TD align="center" >
<a href='ProductShow.asp?ID=<%=rs_Product("ID")%>' target=_blank title='<%=rs_Product("title")%>'>
<img src="<%if rs_Product("DefaultPicUrl")="" then%>Img/nopic.gif<%else%><%=rs_Product("DefaultPicUrl")%><%end if%>" alt="<%=rs_Product("title")%>" width="115" height="100" border="0"></a></TD>
</TR>
<TR>
<TD height="20" align="center">
<a href='ProductShow.asp?ID=<%=rs_Product("ID")%>' target=_blank title='<%=rs_Product("title")%>'><%=cutstr(rs_Product("title"),8)%></a> </TD>
</TR>
</TABLE>
</td><%
rs_Product.MoveNext
if (ii mod 4=0) and ii>=4 then
%>
</tr>
</table>
<%
end if
if ii>=12 then exit do end if
rs.movenext
loop
rs.close
%>
</TD>
<TD id=demo2 vAlign=top></TD></TR></TBODY></TABLE>