ASP删除多条记录--(复选框)
现在在修改别人的网站系统,有个删除选定按钮功能实现不了请高手帮忙!!以下是一、Action=KS.S("Action")SelectCaseActionCase"Del"...
现在在修改别人的网站系统,有个删除选定按钮功能实现不了请高手帮忙!!
以下是
一、Action=KS.S("Action")
Select Case Action
Case "Del"
Call KSUser.DelItemInfo(ChannelID,ComeUrl)
Case "Add","Edit"
Call ShopAdd
Case "AddSave","EditSave"
Call ShopSave()
Case Else
Call ShopList
End Select
二、 End Sub
Sub ShopList
Sub DelItemInfo(ChannelID,ComeUrl)
Dim ID:ID=KS.S("ID")
ID=KS.FilterIDs(ID)
If ID="" Then Call KS.Alert("你没有选中要删除的" & KS.C_S(ChannelID,3) & "!",ComeUrl):Response.End
Dim RS,DelIDS
Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select id From " & KS.C_S(ChannelID,2) &" Where Inputer='" & UserName & "' and Verific<>1 And ID In(" & ID & ")",conn,1,3
Do While Not RS.Eof
If DelIds="" Then DelIDs=RS(0) Else DelIds=DelIds & "," & RS(0)
Conn.Execute("Delete From KS_UploadFiles Where ChannelID=" & ChannelID &" and infoid=" & rs(0))
RS.Delete
RS.MoveNext
Loop
RS.Close:Set RS=Nothing
If DelIds<>"" Then
Call AddLog(UserName,"删除发表的" & KS.C_S(ChannelID,3) & "操作!" & KS.C_S(ChannelID,3) & "ID:" & DelIds,KS.C_S(ChannelID,6))
End If
Conn.Execute("Delete From KS_ItemInfo Where Inputer='" & UserName & "' and Verific<>1 and InfoID in(" & ID & ") and channelid=" & ChannelID)
if ComeUrl="" then
Response.Redirect("../index.asp")
else
Response.Redirect ComeUrl
end if
End Sub 展开
以下是
一、Action=KS.S("Action")
Select Case Action
Case "Del"
Call KSUser.DelItemInfo(ChannelID,ComeUrl)
Case "Add","Edit"
Call ShopAdd
Case "AddSave","EditSave"
Call ShopSave()
Case Else
Call ShopList
End Select
二、 End Sub
Sub ShopList
Sub DelItemInfo(ChannelID,ComeUrl)
Dim ID:ID=KS.S("ID")
ID=KS.FilterIDs(ID)
If ID="" Then Call KS.Alert("你没有选中要删除的" & KS.C_S(ChannelID,3) & "!",ComeUrl):Response.End
Dim RS,DelIDS
Set RS=Server.CreateObject("ADODB.RECORDSET")
RS.Open "Select id From " & KS.C_S(ChannelID,2) &" Where Inputer='" & UserName & "' and Verific<>1 And ID In(" & ID & ")",conn,1,3
Do While Not RS.Eof
If DelIds="" Then DelIDs=RS(0) Else DelIds=DelIds & "," & RS(0)
Conn.Execute("Delete From KS_UploadFiles Where ChannelID=" & ChannelID &" and infoid=" & rs(0))
RS.Delete
RS.MoveNext
Loop
RS.Close:Set RS=Nothing
If DelIds<>"" Then
Call AddLog(UserName,"删除发表的" & KS.C_S(ChannelID,3) & "操作!" & KS.C_S(ChannelID,3) & "ID:" & DelIds,KS.C_S(ChannelID,6))
End If
Conn.Execute("Delete From KS_ItemInfo Where Inputer='" & UserName & "' and Verific<>1 and InfoID in(" & ID & ") and channelid=" & ChannelID)
if ComeUrl="" then
Response.Redirect("../index.asp")
else
Response.Redirect ComeUrl
end if
End Sub 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询