📄 con_shop_list.asp
字号:
<%
'****************************************************
' Web: http://www.aouoo.com , http://www.aouoo.net
' Copyright (C) 2007 Aouoo.com All Rights Reserved.
'****************************************************
sub shop_list()
dim price,price_now,discount,name,li
response.write vbcrlf&shop_bar_top("产品列表"&n_name,1,2) & _
vbcrlf&"<table border=0 width='100%'>"
li=0
sql="select top 6 id,name,smallimg,brand,price,discount,is_emoney,emoney from shop_product where hidden=1"&sql_var&" order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
if (li mod 2)=0 then response.write vbcrlf&"<tr valign=top>"
name=joekoe_cms.code_html(rs("name"),1,0)
price=fm_price(rs("price"),0)
discount=rs("discount")
price_now=fm_price(price*(discount/100),0)
discount=fm_discount(discount)
response.write vbcrlf&shop_list_type(rs("id"),name,rs("smallimg"),rs("brand"),price,price_now,discount,rs("is_emoney"),rs("emoney"))
if (li mod 2)>0 then response.write vbcrlf&"</tr>"
rs.movenext
li=li+1
loop
rs.close
response.write vbcrlf&"<tr><td colspan=2><a href='?action=more&c_id="&cid&"&s_id="&sid&"&taxis='>浏览更多产品...</a></td></tr>" & _
vbcrlf&"</table>" & _
vbcrlf&shop_bar_end("",0)
end sub
function shop_list_taxis_sql(n_taxis)
dim temp1
select case n_taxis
case "tim"
temp1="tim desc,id desc"
case "buy"
temp1="buy_counter desc,id desc"
case "price_high"
temp1="price desc,id desc"
case "price_low"
temp1="price,id desc"
case "counter"
temp1="counter desc,id desc"
case else
temp1="id desc"
end select
shop_list_taxis_sql=temp1
end function
sub shop_list_more(c_id)
dim pageurl,sql_add,li,price,price_now,discount,name
response.write vbcrlf&shop_bar_top("商 品 列 表"&n_name,1,1) & _
vbcrlf&"<table border=0 width='100%' bgcolor=#ffffff>"
li=0
pageurl="?action="&action&"&c_id="&cid&"&s_id="&sid&"&"
sql="select count(id) from shop_product where hidden=1 and c_id="&c_id&sql_var
set rs=joekoe_cms.exec(sql,1)
rssum=rs(0)
rs.close
call format_pagecute()
sql="select top "&nummer*viewpage&" id,name,smallimg,brand,price,discount,is_emoney,emoney from shop_product where hidden=1 and c_id="&c_id&sql_var&" order by "&shop_list_taxis_sql(taxis)
call joekoe_cms.exec("",-1)
rs.open sql,conn,1,1
if int(viewpage)>1 then
rs.move (viewpage-1)*nummer
end if
if int(viewpage*nummer)>int(rssum) then nums=nummer-(viewpage*nummer-rssum)
for i=1 to nums
if (li mod 2)=0 then response.write vbcrlf&"<tr valign=top>"
name=joekoe_cms.code_html(rs("name"),1,0)
price=fm_price(rs("price"),0)
discount=rs("discount")
price_now=fm_price(price*(discount/100),0)
discount=fm_discount(discount)
response.write vbcrlf&shop_list_type(rs("id"),name,rs("smallimg"),rs("brand"),price,price_now,discount,rs("is_emoney"),rs("emoney"))
if (li mod 2)>0 then response.write vbcrlf&"</tr>"
rs.movenext
li=li+1
next
rs.close
if (li mod 2)>0 then
response.write vbcrlf&"<td width='50%'></td></tr>"
end if
response.write vbcrlf&"</table>" & _
vbcrlf&shop_bar_end("",0)
call shop_pagecute(rssum,viewpage,thepages,pageurl,taxis)
end sub
sub shop_pagecute(n_rssum,n_viewpage,n_thepages,n_pageurl,n_taxis)
response.write vbcrlf&"<table border=0 cellspacing=1 cellpadding=0 width='100%' bgcolor='#990000'>" & _
vbcrlf&"<tr>" & _
vbcrlf&"<td height=25 bgcolor='#FF9900'> 共有<font class=pgcut>"&n_rssum&"</font>条记录,<font class=pgcut>"&n_viewpage&" / "&n_thepages&"</font>页 分页:"&jk_pagecute(nummer,n_thepages,n_viewpage,n_pageurl&"taxis="&n_taxis&"&",5,"#330000")&"</td>" & _
vbcrlf&"</tr>" & _
vbcrlf&"</table>"
end sub
'****************************************************
' Web: http://www.aouoo.com , http://www.aouoo.net
' Copyright (C) 2007 Aouoo.com All Rights Reserved.
'****************************************************
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -