<%dbdns="../"%>
<!--#include file="../inc/conn.asp"-->
<%
'cp.asp?aid=竖排几排&bid=产品个数&cid=标题字数&did=要不要标题&eid=推荐&fid=图片尺寸
'cid  一个中文字算两个字符
'did  0不要 1要
'eid  0不推荐 1推荐

aid=int(request.querystring("aid"))
bid=int(request.querystring("bid"))
cid=int(request.querystring("cid"))
did=int(request.querystring("did"))
eid=int(request.querystring("eid"))
fid=int(request.querystring("fid"))
if eid=1 then e=" and dlxf_key3=1"

cpviews="<table width=""100%"" border=0 cellspacing=0 cellpadding=5 align=center><tr align=center>"
set rs=server.createobject("adodb.recordset")
sql="select top "&bid&" * from dlxf_cp where dlxf_key=1 and dlxf_key1=1 and dlxf_key2=1"&e&" order by dlxf_id desc"
rs.open sql,conn,1,1
n=0
do while not rs.eof
n=n+1

cpviews=cpviews&"<td align=center><p style=""line-height:180%""><a href="&application("cityurl")&"cp_view.asp?id="&rs("dlxf_id")&" target=_blank><img src="&application("cityurl")&rs("dlxf_pic")&" border=0 width="&fid&" height="&fid&"></a>"
if did=1 then
cpviews=cpviews&"<br><strong><a href="&application("cityurl")&"cp_view.asp?id="&rs("dlxf_id")&" target=_blank class=black>"&LeftT(rs("dlxf_cpname"),cid)&"</a></strong>"
end if
cpviews=cpviews&"</td>"

if n mod aid=0 then
cpviews=cpviews&"</tr><tr align=center>"
end if

rs.movenext
loop
rs.close
set rs=nothing
cpviews=cpviews&"</tr></table>"
%>
document.write('<%=cpviews%>')