现在版本如果在后台管理列表里批量加入专题,会将之前该文章已所属的专题删除,但很我时候我们只是希望此文章新归属其它专题并不希望删除原来已加入的专题。解决方法如下:
打开admin/ks.iteminfo.asp
找到700多行
If Request.Form("Flag") = "Add" Then
Dim SpecialID, NewsIDArr, K,I
SpecialID = Replace(Request.Form("SpecialID")," ","")
NewsID=KS.FilterIDs(NewsID)
If NewsID<>"" Then
Dim NArr:Narr=Split(NewsID,",")
SpecialID= Split(SpecialID,",")
For K=0 To Ubound(NArr)
Conn.Execute("Delete From KS_SpecialR Where InfoID=" & NArr(K) & " and channelid=" & ChannelID)
For I=0 To Ubound(SpecialID)
Conn.Execute("Insert Into KS_SpecialR(SpecialID,InfoID,ChannelID) values(" & SpecialID(I) & "," & NArr(K) & "," & ChannelID & ")")
Next
Next
End If
改成
If Request.Form("Flag") = "Add" Then
Dim SpecialID, NewsIDArr, K,I
SpecialID = Replace(Request.Form("SpecialID")," ","")
NewsID=KS.FilterIDs(NewsID)
If NewsID<>"" Then
Dim NArr:Narr=Split(NewsID,",")
SpecialID= Split(SpecialID,",")
For K=0 To Ubound(NArr)
For I=0 To Ubound(SpecialID)
If Conn.Execute("select top 1 * from KS_SpecialR Where SpecialID=" & SpecialID(I) &" And InfoID=" & NArr(K) & " And ChannelID=" & ChannelID).eof Then
Conn.Execute("Insert Into KS_SpecialR(SpecialID,InfoID,ChannelID) values(" & SpecialID(I) & "," & NArr(K) & "," & ChannelID & ")")
End If
Next
Next
End If
即可