⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 con_shop.asp

📁 打开目录ads文件夹 找到top_ads.js文件 用记事本打开后就可以看到: -------------------------------------- var head_ads_tx
💻 ASP
字号:
<!-- #include file="skin.asp" -->
<!-- #include file="jk_nsort.asp" -->
<!-- #include file="jk_keyes.asp" -->
<!-- #include file="joekoe_pay.asp" -->
<!-- #include file="../style/data_sort_shop.asp" -->
<%
dim n_name
cid=0
sid=0
n_sort="shop"
index_url="shop"
tit_fir=format_menu(index_url)
m_channel=index_url
web_img_m="m_"&m_channel
web_img_h="h_"&m_channel

sub shop_load()
  response.write joekoe_cms.js_put("style/con_shop.js",0)
end sub

sub shop_end()
  if isarray(sort_dim) then erase sort_dim
end sub

sub shop_left()
  dim tmp
  tmp=tmp&vbcrlf&"<tr><td align=center height=30>&nbsp;"&img_skin("label_"&m_channel&"_bag")&"&nbsp;<a href='shop_bag.asp'>购 物 车</a></td></tr>" & _
          vbcrlf&"<tr><td align=center>&nbsp;"&img_skin("label_"&m_channel&"_pay")&"&nbsp;<a href='shop_pay.asp'>收 银 台</a></td></tr>" & _
          vbcrlf&"<tr><td align=center height=30>&nbsp;"&img_skin("label_"&m_channel&"_order")+"&nbsp;<a href='shop_order.asp'>订单查询</a></td></tr>" & _
          vbcrlf&"<tr><td align=center height=30>&nbsp;"&img_skin("label_"&m_channel&"_pay")+"&nbsp;<a href='shop_price.asp' class=red>商城报价</a></td></tr>"
  call shop_bar_top("商城订购",tmp,3,1)
end sub

sub shop_left_nsort(ltype)
    call shop_bar_top("产品分类",nsort_left_type("shop_list.asp?",ltype),2,0)
end sub

sub shop_cs_name()
  if cname<>"" then
    n_name=cname
    if sname<>"" then
      n_name=n_name&"→"&sname
    end if
  end if
  if n_name<>"" then
    n_name="("&n_name&")"
  end if
end sub

sub shop_good(sqlvar)
  dim price,price_now,discount,name,remark_1,tmp
  sql="select top 1 id,name,smallimg,brand,remark_1,price,discount,is_emoney,emoney from shop_product where hidden=1 and isgood=1"&sqlvar&" order by id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    name=joekoe_cms.code_html(rs("name"),1,0)
    remark_1=joekoe_cms.code_html(rs("remark_1"),2,0)
    price=fm_price(rs("price"),0)
    discount=rs("discount")
    price_now=fm_price(price*(discount/100),0)
    discount=fm_discount(discount)
    tmp=tmp&"<td width='100%'>"&shop_main_good(rs("id"),name,rs("smallimg"),rs("brand"),price,price_now,discount,rs("is_emoney"),rs("emoney"),remark_1)&"</td>"
    rs.movenext
  loop
  rs.close
  call shop_bar_top("推荐产品",tmp,1,1)
end sub

sub shop_cast_top(n_num,c_num)
  dim n_topic,n_tim,tmp
  sql="select top "&n_num&" id,topic,tim from shop_cast where hidden=1 order by istop desc,id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    n_topic=rs("topic")
    n_tim=rs("tim")
    n_tim=joekoe_cms.time_type(n_tim,1)
    tmp=tmp&shop_topic_type(c_num,rs("id"),n_topic,n_tim)
    rs.movenext
  loop
  rs.close
  call shop_bar_top("商城公告",tmp,1,1)
  response.write vbcrlf&"<table border=0 align=right><tr><td><a href='shop_cast.asp'>浏览更多商城公告…</a>&nbsp;&nbsp;</td></tr></table>"
end sub

sub shop_top(n_num,c_num)
  dim n_topic,n_counter,tmp
  sql="select top "&n_num&" id,name,buy_counter from shop_product order by buy_counter desc,id desc"
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
  n_topic=rs("name")
  n_topic=joekoe_cms.code_js(n_topic,1)
  n_counter=rs("buy_counter")
  tmp=tmp&vbcrlf&"<tr>" &_
          vbcrlf&"<td>"&img_skin(web_img_m)&"</td>" &_
		  vbcrlf&"<td align=left><a href='shop_view.asp?id="&rs("id")&"' alt='"&joekoe_cms.code_html(n_topic,1,0)&"'>"&joekoe_cms.code_html(n_topic,1,c_num)&"</a></td>" &_
		  vbcrlf&"<td align=right>"&n_counter&"</td>" &_
		  vbcrlf&"</tr>"
  rs.movenext
loop
rs.close
  call shop_bar_top("销售排行",tmp,4,1)
end sub

function fm_discount(dvar)
  if dvar>=100 then
    fm_discount="不打折"
    exit function
  end if 
  fm_discount=cstr(dvar/10)&"折"
end function

function shop_emoney_pay(p_is_emoney,p_emoney,p_id,put)
  dim nemoney
  nemoney=0
  if p_is_emoney=true then nemoney=p_emoney
  shop_emoney_pay=note_emoney_pay(nemoney,n_sort,p_id,put)
end function

sub shop_search()
dim temp1,tmp
temp1=temp1&vbcrlf&"<table border=0>" & _
          vbcrlf&"<form name=shop_sea_frm action='shop_list.asp' method=get onsubmit=""javascript:frm_submitonce(this);"">" & _
          vbcrlf&"<input type=hidden name=action value='search'>" & _
          vbcrlf&"<tr>" & _
          vbcrlf&"<td>"&img_skin("new")&"</td>" & _
          vbcrlf&"<td width=5></td>" & _
          vbcrlf&"<td>"&select_type("产品",0,0)&"</td>" & _
          vbcrlf&"<td width=5></td>" & _
          vbcrlf&"<td><select name=sea_type sizs=1><option value='name'>产品名称</option><option value='price'>产品价格</option><option value='brand'>产品品牌</option><option value='serial'>产品编号</option></seelct></td>" & _
          vbcrlf&"<td width=5></td>" & _
          vbcrlf&"<td><select name=sea_term sizs=1><option value='all'>满足所有条件</option><option value='only'>满足一个条件</option></seelct></td>" & _
          vbcrlf&"<td width=5></td>" & _
          vbcrlf&"<td><input type=text name=keyword size=20 maxlength=20 title='多个关键字请用 空格 格开' class=bg_search></td>" & _
          vbcrlf&"<td width=5></td>" & _
          vbcrlf&"<td><input type=submit value='搜索'></td>" & _
          vbcrlf&"</tr></form></table>"
  call shop_bar_top("产品搜索",temp1,3,0)
end sub

sub shop_bar_top(tit,body,ttype,tt)
  dim w_wid,tmp
  w_wid="70"
  if len(tit)>8 then w_wid="240"
  if len(tit)>20 then w_wid="400"
  if tt=1 then body="<table border=0 width='100%'>"&body&"</table>"
  tmp=CMS_Skin.GetDB("shop_left")
  tmp=Replace(tmp,"{$wid}",w_wid)
  tmp=Replace(tmp,"{$tit}",tit)
  tmp=Replace(tmp,"{$web_skin}",joekoe_cms.web_dir_skin)
  tmp=Replace(tmp,"{$channel}",m_channel)
  tmp=Replace(tmp,"{$ttype}",ttype)
  tmp=Replace(tmp,"{$body}",body)
  tmp=Replace(tmp,"{$ukong}",CMS_Skin.skukong)
  Response.Write(vbcrlf&tmp)
end sub

function shop_bar_end(mvar,tt)
  dim temp1
  if tt=1 then temp1=temp1&vbcrlf&"  </table>"
  temp1=temp1&vbcrlf&"</td></tr>"
  if mvar<>"" then temp1=temp1&vbcrlf&"<tr><td align=right>"&mvar&"&nbsp;&nbsp;</td></tr>"
  temp1=temp1&vbcrlf&"</table>"
  shop_bar_end=temp1&ukong
end function

function shop_topic_type(b_c_num,b_id,b_topic,b_tim)
  dim n_url,n_jt
  n_url="shop_cast.asp?action=view&id="&b_id
  n_jt=img_skin(web_img_h)
  shop_topic_type="<tr><td>"&n_jt&"<a href='"&n_url&"' alt='公告标题:"&joekoe_cms.code_html(b_topic,1,0)&"<br>发布时间:"&b_tim&"' target=_blank>"&joekoe_cms.code_html(b_topic,1,b_c_num)&"</a></td></tr>"
end function

function shop_list_type(n_id,n_name,n_smallimg,n_brand,n_price,n_price_now,n_discount,n_is_emoney,n_emoney)
   dim temp1
  temp1=CMS_Skin.GetDB("shop_list")
  temp1=Replace(temp1,"{$pic}",pic_fk(n_smallimg,1,"shop_view.asp?id="&n_id))
  temp1=Replace(temp1,"{$id}",n_id)
  temp1=Replace(temp1,"{$name}",n_name)
  temp1=Replace(temp1,"{$price_now}",n_price_now)
  temp1=Replace(temp1,"{$val_unit}",web_dim(45))
  temp1=Replace(temp1,"{$price}",n_price)
  temp1=Replace(temp1,"{$discount}",n_discount)
  temp1=Replace(temp1,"{$web_unit}",joekoe_cms.web_unit)
  temp1=Replace(temp1,"{$shop_emoney_pay}",shop_emoney_pay(n_is_emoney,n_emoney,n_id,1))
  temp1=Replace(temp1,"{$web_dir_skin}",joekoe_cms.web_dir_skin)
  shop_list_type=temp1
end function

function shop_main_good(n_id,n_name,n_smallimg,n_brand,n_price,n_price_now,n_discount,n_is_emoney,n_emoney,n_remark_1)
  dim temp1
  temp1=CMS_Skin.GetDB("shop_good")
  temp1=Replace(temp1,"{$pic}",pic_fk(n_smallimg,2,"shop_view.asp?id="&n_id))
  temp1=Replace(temp1,"{$id}",n_id)
  temp1=Replace(temp1,"{$name}",n_name)
  temp1=Replace(temp1,"{$price_now}",n_price_now)
  temp1=Replace(temp1,"{$val_unit}",web_dim(45))
  temp1=Replace(temp1,"{$web_dir_skin}",joekoe_cms.web_dir_skin)
  temp1=Replace(temp1,"{$price}",n_price)
  temp1=Replace(temp1,"{$discount}",n_discount)
  temp1=Replace(temp1,"{$web_unit}",joekoe_cms.web_unit)
  temp1=Replace(temp1,"{$shop_emoney_pay}",shop_emoney_pay(n_is_emoney,n_emoney,n_id,1))
  temp1=Replace(temp1,"{$brand}",n_brand)
  temp1=Replace(temp1,"{$remark}",n_remark_1)
  shop_main_good=temp1
end function

sub shop_list()
  dim price,price_now,discount,name,li,tmp
  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 tmp=tmp&"<tr valign=top>"
    name=joekoe_cms.code_html(rs("name"),1,13)
    price=fm_price(rs("price"),0)
    discount=rs("discount")
    price_now=fm_price(price*(discount/100),0)
    discount=fm_discount(discount)
    tmp=tmp&"<td width='50%'>"&shop_list_type(rs("id"),name,rs("smallimg"),rs("brand"),price,price_now,discount,rs("is_emoney"),rs("emoney"))&"</td>"
    if (li mod 2)>0 then tmp=tmp&"</tr>"
    rs.movenext
    li=li+1
  loop
  rs.close
  call shop_bar_top("产品列表"&n_name,tmp,2,1)
response.write vbcrlf&"<table border=0 width='95%'><tr class=bg_td><td align=right height=30><a href='?action=more&c_id="&cid&"&s_id="&sid&"&taxis='>浏览更多<font class=red2>"&n_name&"</font>...</a></td></tr></table>"
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()
  dim pageurl,sql_add,li,price,price_now,discount,name,tmp
  li=0
  pageurl="?action="&action&"&c_id="&cid&"&s_id="&sid&"&"
  sql="select count(id) from shop_product where hidden=1"&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"&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 tmp=tmp&"<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)
    tmp=tmp&"<td width='50%'>"&shop_list_type(rs("id"),name,rs("smallimg"),rs("brand"),price,price_now,discount,rs("is_emoney"),rs("emoney"))&"</td>"
    if (li mod 2)>0 then tmp=tmp&"</tr>"
    rs.movenext
    li=li+1
  next
  rs.close
  call shop_bar_top("产品列表"&n_name,tmp,2,1)
  if action<>"hot" then response.write shop_pagecute(rssum,viewpage,thepages,pageurl,taxis)
end sub

Function shop_pagecute(n_rssum,n_viewpage,n_thepages,n_pageurl,n_taxis)
dim tmp
tmp="<table border=0 cellspacing=0 cellpadding=2 width='98%'>" & _
"<tr>" & _
"<td>&nbsp;共有<font class=red>"&n_rssum&"</font>个产品,<font class=red>"&n_viewpage&"</font>/<font class=red>"&n_thepages&"</font>页&nbsp;分页:"&jk_pagecute(nummer,n_thepages,n_viewpage,n_pageurl&"taxis="&n_taxis&"&",5,"#ff0000")&"</td>" & _
"<td align=right><select name=taxis size=1 onchange=""javascript:shop_sel_taxis(this.options[this.selectedIndex].value);"">" & _
"<option value=''>-请选择显示方式-</option>" & _
"<option value='tim'>按上架时间排序</option>" & _
"<option value='buy'>按订购次数排序</option>" & _
"<option value='price_high'>按价格由高到低排序</option>" & _
"<option value='price_low'>按价格由低到高排序</option>" & _
"<option value='counter'>按点击次数排序</option>" & _
"</select>&nbsp;</td>" & _
"</tr>" & _
"</table>"&ukong & _
"<script language=javascript>" & _
"function shop_sel_taxis(tvar)" & _
"{" & _
"  if (tvar=="""" || tvar==null) {return;}" & _
"  location.href="""&n_pageurl&"taxis=""+tvar;" & _
"}" & _
"</script>"
shop_pagecute=tmp
end Function

sub shop_main_list(ltype,l_num)
  dim n_tit,price,price_now,discount,name,li,t,tmp
  sql="select top "&(2*l_num)&" id,name,smallimg,brand,price,discount,is_emoney,emoney from shop_product where hidden=1"
  select case ltype
  case "good"
    sql=sql&" and isgood=1 order by tim desc,id desc"
    n_tit="推荐"
    t=2
  case "hot"
    sql=sql&" order by buy_counter desc,id desc"
    n_tit="热门"
    t=3
  case else
    sql=sql&" order by tim desc,id desc"
    n_tit="最新"
    t=4
  end select
  li=0
  set rs=joekoe_cms.exec(sql,1)
  do while not rs.eof
    if (li mod 2)=0 then tmp=tmp&"<tr valign=top>"
    name=joekoe_cms.code_html(rs("name"),1,6)
    price=fm_price(rs("price"),0)
    discount=rs("discount")
    price_now=fm_price(price*(discount/100),0)
    discount=fm_discount(discount)
    tmp=tmp&"<td width='50%'>"&shop_list_type(rs("id"),name,rs("smallimg"),rs("brand"),price,price_now,discount,rs("is_emoney"),rs("emoney"))&"</td>"
    if (li mod 2)>0 then tmp=tmp&"</tr>"
    rs.movenext
    li=li+1
  loop
  rs.close
  if (li mod 2)>0 then
    tmp=tmp&"<td width='50%'></td></tr>"
  end if
  call shop_bar_top(n_tit&"产品",tmp,t,1)
end sub


sub shop_bag_close()
  if int(format_mid_num(20))=0 then
    response.write joekoe_cms.js_put("alert(""对不起!本商城盘货整理中,暂时关闭商城购物功能。\n\n请大家谅解!我们将很快恢复购物。\n\n如有急需,请与管理员"&web_dim(3)&"(E_mail:"&web_dim(4)&")联系!"");window.close()",1)
    exit sub
  end if
end sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -