深圳天健地产李文成:程序中产品显示方法

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/20 02:38:04
''======================================产品展示
if request("cpid")<>"" then
sql1="select * from SMT_cp where SMT_key=1 and SMT_key1=1 and SMT_key2=1 and SMT_yp_id="&id&" and SMT_sortid="&request("cpid")&" order by SMT_id desc"
else
sql1="select * from SMT_cp where SMT_key=1 and SMT_key1=1 and SMT_key2=1 and SMT_yp_id="&id&" order by SMT_id desc"
end if
rs1.open sql1,conn,1,1
if not rs1.eof then
''分页的实现
listnum=5
Rs1.pagesize=listnum
page=Request("page")
if (page-Rs1.pagecount) > 0 then
page=Rs1.pagecount
elseif page = "" or page < 1 then
page = 1
end if
Rs1.absolutepage=page
''编号的实现
j=rs1.recordcount
j=j-(page-1)*listnum
i=0
do while not rs1.eof and i<listnum
cocp=cocp&"<table width=100% border=0 cellspacing=0 cellpadding=5><tr><td width=120 align=center>"
cocp=cocp&"<a href=../../product_view.asp?id="&rs1("SMT_id")&" target=_blank><img src=../../"&rs1("SMT_pic")&" width=80 style=""border:1px #000000 solid""></a><br><br>"
cocp=cocp&"<font color=#000000><a href=../../product_view.asp?id="&rs1("SMT_id")&" target=_blank>"&rs1("SMT_cpname")&"</a></font>"
cocp=cocp&"</td></tr></table>"
rs1.movenext
i=i+1
j=j-1
loop
filename="production.asp?id="&request("id")&"&cpid="&request("cpid")&""
if page=1 then
else
upfy11="<a href="&filename&">|<<</a> <a href="&filename&"&page="&page-1&"><<</a> <a href="&filename&"&page="&page-1&">["&page-1&"]</a>"
end if
if Rs1.pagecount=1 then
else
upfy22="["&page&"]"
end if
if Rs1.pagecount-page <> 0 then
upfy33="<a href="&filename&"&page="&page+1&">["&page+1&"]</a> <a href="&filename&"&page="&page+1&">>></a> <a href="&filename&"&page="&Rs1.pagecount&">>>|</a>"
end if
cocp=cocp&"<br><table width=100% border=0 cellspacing=0 cellpadding=5><tr><td align=right height=50>"
cocp=cocp&"<strong>"&page&"/"&Rs1.pagecount&"</strong> 页 "&upfy11&" "&upfy22&" "&upfy33&""
cocp=cocp&" </td></tr></table>"
end if
rs1.close

问大家一个问题,上面这段代码现在是以竖排显示,怎样才能改成横排显示