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

📄 config_nsort.asp

📁 该软件是帮助大学生更好的生活
💻 ASP
字号:
<%
dim n_sort,cid,sid
cid=0:sid=0

function class_sort(sns,surl,idc,ids)
  dim nid,rs,sql,rs2,sql2,nnid
  class_sort=vbcrlf&"<table border=0>"
  sql="select c_name,c_id from product_class where nsort='"&sns&"' order by c_order"
  set rs=conn.execute(sql)
  do while not rs.eof
    nid=rs("c_id")
    class_sort=class_sort&vbcrlf&"<tr><td>【<a href='"&surl&"_list.asp?c_id="&nid&"'"
    if idc=nid then class_sort=class_sort&" class=red"
    class_sort=class_sort&">"&rs("c_name")&"</a></td><td>】</td><td>"
    sql2="select s_name,s_id from product_sort where c_id="&nid&" order by s_order"
    set rs2=conn.execute(sql2)
    do while not rs2.eof
      nnid=rs2("s_id")
      class_sort=class_sort&"&nbsp;<a href='"&surl&"_list.asp?c_id="&nid&"&s_id="&rs2("s_id")&"'"
      if ids=nnid then class_sort=class_sort&" class=red_3"
      class_sort=class_sort&">"&rs2("s_name")&"</a>&nbsp;"
      rs2.movenext
    loop
    class_sort=class_sort&"</td></tr>"
    rs.movenext
  loop
  rs.close:set rs=nothing
  class_sort=class_sort&vbcrlf&"</table>"
end function

function nsort_left(n_sort,cc_id,ss_id,link_url,left_type)
  dim rs1,sql1,rs2,sql2,ccid,ssid:cc_id=int(cc_id):ss_id=int(ss_id)
  nsort_left=vbcrlf&"<table border=0>"
  sql1="select c_id,c_name from product_class where nsort='"&n_sort&"' order by c_order,c_id"
  set rs1=conn.execute(sql1)
  do while not rs1.eof
    ccid=int(rs1(0))
    if cc_id=ccid or left_type=0 then
      nsort_left=nsort_left&vbcrlf&"<tr><td>"
      if cc_id=ccid then
        nsort_left=nsort_left&img_small("Article_elite")
      else
        nsort_left=nsort_left&img_small("article_common")
      end if
      nsort_left=nsort_left&"<a href='"&link_url&"c_id="&ccid&"'>"&rs1(1)&"</a></td></tr>"
      sql2="select s_id,s_name from product_sort where c_id="&ccid&" order by s_order,s_id"
      set rs2=conn.execute(sql2)
      do while not rs2.eof
        ssid=int(rs2(0))
        nsort_left=nsort_left&vbcrlf&"<tr><td>&nbsp;&nbsp;"&img_small("arrow_r")&"<a href='"&link_url&"c_id="&ccid&"&s_id="&rs2(0)&"'"
        if ssid=ss_id then nsort_left=nsort_left&" class=red_3"
        nsort_left=nsort_left&">"&rs2(1)&"</a></td></tr>"
        rs2.movenext
      loop
      rs2.close:set rs2=nothing
    else
      nsort_left=nsort_left&vbcrlf&"<tr><td>"&img_small("article_common")&"<a href='"&link_url&"c_id="&ccid&"'>"&rs1(1)&"</a></td></tr>"
    end if
    rs1.movenext
  loop
  rs1.close:set rs1=nothing
  nsort_left=nsort_left&vbcrlf&"</table>"
end function

sub cid_sid_sql(csst,csstt)
  dim temp:temp=csstt
  if cid>0 then
    sqladd=sqladd&" and c_id="&cid
    pageurl=pageurl&"c_id="&cid&"&"
    if sid>0 then
      sqladd=sqladd&" and s_id="&sid
      pageurl=pageurl&"s_id="&sid&"&"
    end if
  end if
  if csst=1 or csst=2 then
    if len(keyword)>0 then
      sqladd=sqladd&" and "&temp&" like '%"&keyword&"%'"
      pageurl=pageurl&"keyword="&server.urlencode(keyword)&"&"
      if csst=2 then pageurl=pageurl&"sea_type="&sea_type&"&"
    end if
  end if
end sub

sub cid_sid()
  cid=trim(request.querystring("c_id"))
  sid=trim(request.querystring("s_id"))
  if not(isnumeric(cid)) then
    if len(cid)>0 then
      cid=replace(cid,"&s_id=",",")
      sid=mid(cid,instr(cid,",")+1,len(cid))
      cid=mid(cid,1,instr(cid,",")-1)
    else
      cid=0
    end if
  end if
  if not(isnumeric(cid)) then cid=0
  if not(isnumeric(sid)) then sid=0
  cid=int(cid):sid=int(sid)
end sub

function put_type(pts)
  put_type=""
  select case pts
  case "article"
    put_type="我要发表文章"
  case "news"
    put_type="我要发布新闻"
  case "down"
    put_type="我要添加软件"
case "movie"
    put_type="我要添加影片"
  case "website"
    put_type="我要推荐网站"
  case "gallery"
    put_type="我要上传贴图"
  end select
  if put_type<>"" then put_type="[ <a href='user_put.asp?action="&pts&"'>→ "&put_type&"</a> ]"
end function
%>

⌨️ 快捷键说明

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