仿3.0商城首页调用
作者:cmscn 日期:2005-12-16
sub main_center_shop(cs_tnum,cs_cnum)
dim tmp1,tmp_topic,tmp_url,tmp_gm,price_now,price,discount,disc
tmp1=vbcrlf&"<tr align=center>"
sql="select top "&cs_tnum&" id,name,smallimg,price,discount from shop_product where hidden=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
tmp_topic=rs(1)
price=rs("price")
discount=rs("discount")
price_now=price*(discount/100)
if discount=100 then
disc="不打折"
else
disc="打折"
end if
tmp_url="shop_view.asp?id="&rs(0)
tmp_gm="shop_bag.asp?id="&rs(0)
tmp1=tmp1&vbcrlf&"<td>" & _
vbcrlf&"<TABLE cellSpacing=0 cellPadding=0 width=175 border=0>" & _
vbcrlf&"<TBODY><TR>" & _
vbcrlf&"<TD width=7><IMG src='skin/M_IMG/SHOP/22_1.gif' border=0></TD>" & _
vbcrlf&"<TD width=* background=skin/M_IMG/SHOP/22_2.gif><IMG height=1 src='skin/M_IMG/SHOP/kong.gif' width=1 border=0></TD>" & _
vbcrlf&"<TD width=7><IMG src='skin/M_IMG/SHOP/22_3.gif' border=0></TD>" & _
vbcrlf&"</TR><TR>" & _
vbcrlf&"<TD background=skin/M_IMG/SHOP/22_4.gif><IMG src='skin/M_IMG/SHOP/22_4.gif' border=0></TD>" & _
vbcrlf&"<TD vAlign=top align=middle bgColor=#ffffff><TABLE cellSpacing=0 cellPadding=0 width='100%' border=0>" & _
vbcrlf&"<TBODY><TR>" & _
vbcrlf&"<TD width=5><IMG height=22 src='skin/M_IMG/SHOP/01_1.gif' width=5 border=0></TD>" & _
vbcrlf&"<TD width=* background=skin/M_IMG/SHOP/01_2.gif><IMG src='skin/M_IMG/SHOP/22_arrow.gif' align=absMiddle border=0> <a href='"&tmp_url&"' target=_blank>"&joekoe_cms.code_html(tmp_topic,1,cs_cnum)&"</a></TD>" & _
vbcrlf&"<TD width=5><IMG height=22 src='skin/M_IMG/SHOP/01_3.gif' width=5 border=0></TD>" & _
vbcrlf&"</TR></TBODY></TABLE></TD><TD background=skin/M_IMG/SHOP/22_6.gif><IMG src='skin/M_IMG/SHOP/22_6.gif' border=0></TD>" & _
vbcrlf&"</TR><TR><TD background=skin/M_IMG/SHOP/22_7.gif></TD><TD style='PADDING-BOTTOM: 5px; PADDING-TOP: 5px' vAlign=top align=middle bgColor=#ffffff><TABLE cellSpacing=2 cellPadding=0 width='100%' border=0>" & _
vbcrlf&"<TBODY><TR><TD align=middle>"&pic_fk(rs("smallimg"),1,tmp_url)&"</TD>" & _
vbcrlf&"</TR><TR><TD align=middle><TABLE cellSpacing=2 cellPadding=0 border=0><TBODY>" & _
vbcrlf&"<TR><TD>市场价:<STRIKE>"&rs("price")&"元<FONT class=gray>/个</FONT></STRIKE></TD>" & _
vbcrlf&"</TR><TR><TD>会员价:"&price_now&"元<FONT class=gray>/个</FONT></TD>" & _
vbcrlf&"</TR><TR><TD>折扣:"&disc&"</TD></TR></TBODY></TABLE></TD>" & _
vbcrlf&"</TR><TR><TD align=middle><a href='"&tmp_url&"' target=_blank> <IMG src='skin/M_IMG/SHOP/btn_view.gif' width='68' height='22' border=0></a> <a href='"&tmp_gm&"' target=_blank><IMG src='skin/M_IMG/SHOP/btn_buy.gif' border=0></a></TD>" & _
vbcrlf&"</TR></TBODY></TABLE></TD><TD background=skin/M_IMG/SHOP/22_8.gif></TD>" & _
vbcrlf&"</TR><TR><TD height=7><IMG src='skin/M_IMG/SHOP/22_9.gif' border=0></TD>" & _
vbcrlf&"<TD background=skin/M_IMG/SHOP/22_10.gif><IMG src='skin/M_IMG/SHOP/22_10.gif' border=0></TD>" & _
vbcrlf&"<TD><IMG src='skin/M_IMG/SHOP/22_11.gif' border=0></TD></TR>" & _
vbcrlf&"</TBODY></TABLE>" & _
vbcrlf&"</td>"
rs.movenext
loop
rs.close
tmp1=tmp1&vbcrlf&"</tr>"
tmp1="<table border=0 cellspacing=0 cellpadding=2 width='100%'>"&tmp1&vbcrlf&"</table>"
response.write vbcrlf&"<table cellspacing=1 cellpadding=4 class=table>" & _
vbcrlf&"<tr class=bg_td><td align=center>"&tmp1&"</td></tr>" & _
vbcrlf&"</table>"&ukong
end sub
[file=attachments/month_200512/16_151237_da3gSHOP.rar]Click to Download[/file]
评论: 3 | 引用: 0 | 查看次数: 737
发表评论