itransfer實現調用指定多個分類下的內容列表

時間:2017/4/10 19:35:18,點擊:0

1.打開./common/incfiles/module.asp
找到Function itransfer(ByVal itype, ByVal itpl, ByVal ivars)
修改代碼
tclass = get_num(get_strvalue(ivars, "class"), 0)


if instr(1,get_strvalue(ivars, "class"),",")=false  then 
  tclass = get_num(get_strvalue(ivars, "class"), 0)
else
  tclass = get_strvalue(ivars, "class")
end if

修改
  If not tclass = 0 Then tsqlstr = tsqlstr & " and " & tfpre & "class=" & tclass


if instr(1,get_strvalue(ivars, "class"),",")=false  then 
  If not tclass = 0 Then tsqlstr = tsqlstr & " and " & tfpre & "class=" & tclass
else
  tsqlstr = tsqlstr & " and " & tfpre & "class in (" & tclass & ")"
end if

2.使用方法
用函數itransfer使用.
{$=itransfer('top', 'anli_img', 'topx=10;tnum=30;genre=anli;class=9,10,11,12')}

class直接填寫需調用的分類即可.

打印 | 關閉

新疆18选7开奖公告