5UCMS后台内容管理实现大类列表

  不说废话,直接上代码。实现后台内容大类分页,同前台一样,需要修改源码。在此cssHaier提醒您,若是没有ASP基础,请勿修改!

1,打开admin/admin_content.asp文件,找到以下代码

Sub Main()
If Len(Key) > 0 Then
If Instr(",ID,Cid,Commend,Views,Comments,Orders,Display,","," & DFieldKey & ",") > 0 Then
If Len(Key) > 0 And IsNumeric(Key) Then Sql = "[" & DFieldKey & "]=" & Key & ""
Else
Sql = "[" & DFieldKey & "] Like '%" & Key & "%'"
End If
End If

2、将以上代码整体替换成以下代码

Sub Main()
If Len(Key) > 0 Then
If Instr(",ID,Cid,Commend,Views,Comments,Orders,Display,","," & DFieldKey & ",") > 0 Then
' ↓修改栏目显示内容 by cssHaier↓
Dim Tag_Where,Cid,N
N= DB("Select [ChildID],[ChildIDs] from [{pre}Channel] where CID = "& Key,1)
If Len(N(0)) > 0 then
Cid=N(1)
Tag_Where="or [cid] in ("&N(1)")"
Else
Cid= Key
Tag_Where=""
End If
'↑修改大类显示内容↑
If Len(Key) > 0 And IsNumeric(Key) Then Sql = "[" & DFieldKey & "]=" & Key & Tag_Where""
Else
Sql = "[" & DFieldKey & "] Like '%" & Key & "%' "&Tag_Where
End If
End If

3、经测试,0409版和v1.2 2024版可用!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值