<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/function.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<%
'''''''''''''''''''''''''''''''''''''''''''''''
call checkPrevilege(Session("Name"),"p19")
'''''''''''''''''''''''''''''''''''''''''''''''
BeginTime=Timer
dim act,newsidStr,newsidArr,newsUrl,isoutlink,ParentId,IndustryId
if not isempty(request.Form("act")) then
	act=request.Form("act")
else
	response.Write("请选择操作方式")
	response.Write("<a href=""#"" onClick=""javascript:history.back();"">返回</a>")
	response.End()
end if
if not isempty(request.Form("newsid")) then
	newsidStr=request.Form("newsid")
else
	response.Write("请选择需要操作的软件记录")
	response.Write("<a href=""#"" onClick=""javascript:history.back();"">返回</a>")
	response.End()
end if
newsidstr=replace(newsidstr,", ",",")
newsidArr=split(newsidStr,",")

Select Case LCase(act)
	Case "lock"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set IsLocked=1 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量锁定成功！")
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "unlock"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set IsLocked=0 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量取消锁定成功！")		
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "rem"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set UserLevel=1 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量锁定成功！")
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "unrem"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set UserLevel=0 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量取消锁定成功！")		
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "top"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set UserLevel=2 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量锁定成功！")
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "untop"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set UserLevel=0 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量取消锁定成功！")		
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "channel"
		tochannel=Cint(request.Form("tochannel"))
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set ChannelId="&tochannel&" where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量移动成功！")		
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "remove"
		ParentId=Clng(request.Form("ParentId"))
		IndustryId=Clng(request.Form("IndustryId"))
		for i=0 to ubound(newsidArr)
			conn.execute("update t_member_e set ParentId="&ParentId&",IndustryId="&IndustryId&" where UserId ='"&newsidArr(i)&"'")
		next
		response.Write("批量移动成功！")		
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "check"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set IsCheck=1 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量审核成功！")
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "del"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("delete from t_member where UserId='"&newsidArr(i)&"'")
			conn.execute("delete from t_member_e where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量审核成功！")
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
	Case "uncheck"
		for i=0 to ubound(newsidArr)
			response.Write(newsidArr(i))
			conn.execute("update t_member set IsCheck=0 where UserId='"&newsidArr(i)&"'")
		next
		response.Write("批量取消审核成功！")		
		response.Redirect(request.ServerVariables("HTTP_REFERER"))
end Select
%>
<html>
<head>
<title>新闻操作</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #FFFFFF;
	font-size:12px;
}
-->
</style>
</head>
<body>
<%
  	'set rs=server.createobject("adodb.recordset")
  	'rs.open "select count(*) AS co from news where classid="&classid,conn,3,1
%>
</body>
</html>
<%

call connclose()
%>
执行时间：<%=CStr(FormatNumber((Timer-BeginTime)*1000,2))& "毫秒"%>