delcontent.asp

来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 421 行 · 第 1/2 页

ASP
421
字号
			If tempx="," Then
				Call DoDelslhtml(""&DownNameDiy&""&Separated&""&selectx&"."&HTMLName&"")
				selectx=""
			Else
				selectx=selectx&tempx
			End If
			if len_idx-ix=0 Then Call DoDelslhtml(""&DownNameDiy&""&Separated&""&selectx&"."&HTMLName&"")
			SelectID=right(SelectID,len_idx-ix)
		Loop
	End If
    response.redirect request.servervariables("http_referer")
	End Select
  case "Jobs"
    select case Trim(Request.Form("batch"))
	case "中文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Jobs set ViewFlagCH = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Jobs set ViewFlagEN = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "中文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Jobs set ViewFlagCH = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Jobs set ViewFlagEN = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "删除所选"
    if SelectID<>"" Then conn.execute "delete from LiangJingCMS_Jobs where id in ("&SelectID&")"
	If ISHTML = 1 Then
		ix=0
		SelectID=replace(SelectID," ","")
		len_idx=len(SelectID)
		tempx=tempx&left(SelectID,1)
		Do While ix<len_idx
			ix=ix+1
			tempx=left(SelectID,1)
			If tempx="," Then
				Call DoDelslhtml(""&JobNameDiy&""&Separated&""&selectx&"."&HTMLName&"")
				selectx=""
			Else
				selectx=selectx&tempx
			End If
			if len_idx-ix=0 Then Call DoDelslhtml(""&JobNameDiy&""&Separated&""&selectx&"."&HTMLName&"")
			SelectID=right(SelectID,len_idx-ix)
		Loop
	End If
    response.redirect request.servervariables("http_referer")
	End Select
  case "Message"
    select case Trim(Request.Form("batch"))
	case "中文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Message set ViewFlagCH = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Message set ViewFlagEN = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "中文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Message set ViewFlagCH = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Message set ViewFlagEN = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "删除所选"
    if SelectID<>"" Then conn.execute "delete from LiangJingCMS_Message where id in ("&SelectID&")"
    response.redirect request.servervariables("http_referer")
	End Select
  case "Order"
    if SelectID<>"" Then conn.execute "delete from LiangJingCMS_Order where id in ("&SelectID&")"
    response.redirect request.servervariables("http_referer")
  case "Talents"
    if SelectID<>"" Then conn.execute "delete from LiangJingCMS_Talents where id in ("&SelectID&")"
    response.redirect request.servervariables("http_referer")
  case "Navigation"
    select case Trim(Request.Form("batch"))
	case "批量修改排序"
	Nav_id=request("Nav_id")
	Sequence=request("Sequence")
	arr_id=Split(Replace(Nav_id," ",""),",")
	arr_Sequence=Split(Replace(Sequence," ",""),",")
	For i = 0 To UBound(arr_id)
	conn.execute("update LiangJingCMS_Navigation set Sequence='"&arr_Sequence(i)&"' where id="&arr_id(i)&"")
	Next
	response.redirect request.servervariables("http_referer")
	case "中文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Navigation set ViewFlagCH = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Navigation set ViewFlagEN = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "中文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Navigation set ViewFlagCH = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Navigation set ViewFlagEN = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "删除所选"
    if SelectID<>"" Then conn.execute "delete from LiangJingCMS_Navigation where id in ("&SelectID&")"
    response.redirect request.servervariables("http_referer")
	End Select
  case "FriendLink"
    select case Trim(Request.Form("batch"))
	case "中文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_FriendLink set ViewFlagCH = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_FriendLink set ViewFlagEN = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "中文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_FriendLink set ViewFlagCH = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_FriendLink set ViewFlagEN = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "删除所选"
    if SelectID<>"" Then conn.execute "delete from LiangJingCMS_FriendLink where id in ("&SelectID&")"
    response.redirect request.servervariables("http_referer")
	End Select
  case "Others"
    select case Trim(Request.Form("batch"))
	case "中文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Others set ViewFlagCH = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Others set ViewFlagEN = 1 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "中文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Others set ViewFlagCH = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "英文批量不显示"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_Others set ViewFlagEN = 0 where id in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "删除所选"
    if SelectID<>"" Then conn.execute "delete from LiangJingCMS_Others where id in ("&SelectID&")"
	If ISHTML = 1 Then
		ix=0
		SelectID=replace(SelectID," ","")
		len_idx=len(SelectID)
		tempx=tempx&left(SelectID,1)
		Do While ix<len_idx
			ix=ix+1
			tempx=left(SelectID,1)
			If tempx="," Then
				Call DoDelslhtml(""&OtherName&""&Separated&""&selectx&"."&HTMLName&"")
				selectx=""
			Else
				selectx=selectx&tempx
			End If
			if len_idx-ix=0 Then Call DoDelslhtml(""&OtherName&""&Separated&""&selectx&"."&HTMLName&"")
			SelectID=right(SelectID,len_idx-ix)
		Loop
	End If
    response.redirect request.servervariables("http_referer")
	End Select
	
	case "ADs"
    if SelectID<>"" then  
		'调用删除文章中相关文件	代码开始
	if instr(SelectID,",")>0 then
		idArr=split(SelectID)
		for i = 0 to ubound(idArr)
			call DelArticlepic(clng(idarr(i)))
		next
	else
		call DelArticlepic(clng(SelectID))
	end if
	'调用删除文章中相关文件	代码结束
	conn.execute "delete from liangjing_ADs where id in ("&SelectID&")"
    response.redirect request.servervariables("http_referer")
	end if
	
 case "NoHackSql"
    select case Trim(Request.Form("batch"))
	case "批量锁定"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_NoHackSql set Kill_ip=true where SqlIn_ID in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "批量解锁"
	if SelectID<>"" Then conn.execute "update LiangJingCMS_NoHackSql set Kill_ip=False where SqlIn_ID in ("&SelectID&")"
	response.redirect request.servervariables("http_referer")
	case "删除所选"
    if SelectID<>"" then  conn.execute "delete from LiangJingCMS_NoHackSql where SqlIn_ID in ("&SelectID&")"
    response.redirect request.servervariables("http_referer")
	End Select
  case else
end select

sub DelArticlepic(SelectID)
	   dim rs,sql,fso,strUploadFiles,arrUploadFiles,i
       Set rs= Server.CreateObject("ADODB.Recordset")
       sql= "select * from liangjing_"&Result&" where id in ("&SelectID&")"
       rs.open sql,conn,1,3
	   strUploadFiles=rs("UploadFiles")
			if strUploadFiles<>"" then
				Set fso = CreateObject("Scripting.FileSystemObject")
				if instr(strUploadFiles,"|")>1 then
					arrUploadFiles=split(strUploadFiles,"|")
					for i=0 to ubound(arrUploadFiles)
						if fso.FileExists(server.MapPath("" & arrUploadfiles(i))) then
							fso.DeleteFile(server.MapPath("" & arrUploadfiles(i)))
						end if
					next
				else
					if fso.FileExists(server.MapPath("" & strUploadfiles)) then
						fso.DeleteFile(server.MapPath("" & strUploadfiles))
					end if
				end if
				Set fso = nothing
			end if
end sub

%>

⌨️ 快捷键说明

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