⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_lockuser.asp

📁 品泡女人香XI8.NET文章管理系统的源码
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<!--#include file="conn.asp"-->
<!-- #include file="inc/const.asp" -->
<!--#include file="inc/dv_clsother.asp"-->
<!-- #include file="inc/GroupPermission.asp" -->
<%
Dvbbs.Loadtemplates("")
Dim username
Dim locktype
Dim ip,BoardID
Dim TotalUseTable
Dim AdminUserPer
Dim UpdateBoardID,i,Rs,Sql
AdminUserPer=false
If (Dvbbs.master or Dvbbs.boardmaster or Dvbbs.superboardmaster) and Cint(Dvbbs.GroupSetting(42))=1 Then
	AdminUserPer=True 
Else 
	AdminUserPer=False
End If
If Dvbbs.UserGroupID > 3 And CInt(Dvbbs.GroupSetting(42))=1 Then
	AdminUserPer=True
End If 
If Dvbbs.FoundUserPer And CInt(Dvbbs.GroupSetting(42))=1 Then
	AdminUserPer=True
ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(42))=0 Then
	AdminUserPer=False
End If
Dim userid
ip=Dvbbs.UserTrueIP
Dvbbs.stats="管理用户"
Response.Write "<link rel=""stylesheet"" href=""forum_admin.css"" type=""text/css"">"
Dvbbs.nav()
If request("name")="" Then
	Response.redirect "showerr.asp?ErrCodes=<li>请指定所操作的用户!&action=OtherErr"
Else
	username=Dvbbs.CheckStr(request("name"))
End If
Dvbbs.Head_Var 2,0,"",""
Dvbbs.ShowErr()
If request("userid")<> "" Then
	userid=Dvbbs.CheckStr(request("userid"))
	If Not isnumeric(userid) Then Response.redirect "showerr.asp?ErrCodes=<li>非法的参数。&action=OtherErr"
Else
	Set Rs=Dvbbs.Execute("SELECT UserID FROM [Dv_User] WHERE Username = '"&Username&"' ")
	If Not (Rs.eof And Rs.bof) Then
		UserID=Rs(0)
	Else
		UserID=0
	End If
	Set Rs=Nothing
End If 
If Not Dvbbs.ChkPost() And Request("action") <> "" Then
	Response.redirect "showerr.asp?ErrCodes=<li>您不要从外部提交数据&action=OtherErr"
End If
If request("action")="power" Then
	Call Poweruser()
ElseIf request("action")="DelTopic" then
	Call DelTopic()
ElseIf request("action")="getpermission" then
	Call boardlist()
ElseIf request("action")="userBoardPermission" then
	Call GetUserPermission()
ElseIf request("action")="saveuserpermission" then
	Call saveuserpermission()
ElseIf request("action")="DelUserReply" then
	Call DelUserReply()
Else
	Call lockuser()
End If

Dvbbs.activeonline()
Dvbbs.footer()

Sub lockuser()
	Dim canlockuser
	canlockuser=false
	if (Dvbbs.master or Dvbbs.boardmaster or Dvbbs.superboardmaster) and Cint(Dvbbs.GroupSetting(28))=1 Then
		canlockuser=True 
	Else
		canlockuser=False 
	End If
	If Dvbbs.UserGroupID > 3 And CInt(Dvbbs.GroupSetting(28))=1 Then canlockuser=True
	If Dvbbs.FoundUserPer And  Cint(Dvbbs.GroupSetting(28))=1 Then
		canlockuser=True
	ElseIf Dvbbs.FoundUserPer and Cint(Dvbbs.GroupSetting(28))=0 Then 
		canlockuser=False 
	End If 

	If Not canlockuser then Response.redirect "showerr.asp?ErrCodes=<li>您没有权限执行此操作。&action=OtherErr"

	If request("action")="lock_1" Then
		Dvbbs.Execute("update [dv_user] set LockUser=1 where userid="&userid&" and UserGroupID > 1")
		locktype="锁定"
		sql="insert into Dv_log (l_touser,l_username,l_content,l_ip,l_type) values ('"&username&"','"&Dvbbs.membername&"','用户操作:"&locktype& "','"&ip&"',6)"
		Dvbbs.Execute(sql)
	ElseIf request("action")="lock_2" then
		Dvbbs.Execute("update [dv_user] set LockUser=2 where userid="&userid&" and UserGroupID>1")
		locktype="屏蔽"
		sql="insert into Dv_log (l_touser,l_username,l_content,l_ip,l_type) values ('"&username&"','"&Dvbbs.membername&"','用户操作:"&locktype& "','"&ip&"',6)"
		Dvbbs.Execute(SQL)
	ElseIf request("action")="lock_3" then
		Dvbbs.Execute("update [dv_user] set LockUser=0 where userid="&userid&" and UserGroupID>1")
		locktype="解锁"
		sql="insert into Dv_log (l_touser,l_username,l_content,l_ip,l_type) values ('"&username&"','"&Dvbbs.membername&"','用户操作:"&locktype& "','"&ip&"',6)"
		Dvbbs.Execute(SQL)
	Else
		Response.redirect "showerr.asp?ErrCodes=<li>请指定正确的参数!&action=OtherErr"
	End If

	Dvbbs.Dvbbs_suc("<li>您选择的用户已经"&locktype&"。您的操作已经记录在案。")
End Sub

Sub Poweruser()
	Dim title,content
	Dim canlockuser
	canlockuser=false
	If (Dvbbs.master or Dvbbs.boardmaster or Dvbbs.superboardmaster) And CInt(Dvbbs.GroupSetting(43))=1 Then
		canlockuser=True 
	Else 
		canlockuser=False 
	End If 
	If Dvbbs.UserGroupID > 3 And  Cint(Dvbbs.GroupSetting(43))=1 Then canlockuser=True 
	If Dvbbs.FoundUserPer And  CInt(Dvbbs.GroupSetting(43))=1 Then
		canlockuser=True 
	ElseIf Dvbbs.FoundUserPer And CInt(Dvbbs.GroupSetting(43))=0 Then
		canlockuser=False
	End If 

	If Not canlockuser Then Response.redirect "showerr.asp?ErrCodes=<li>您没有权限执行此操作。&action=OtherErr"
	If request("checked")="yes" Then
		Dim doWealth,douserEP,douserCP,douserPower
		Dim doWealthMsg,douserEPMsg,douserCPMsg,douserPowerMsg,allMsg
		If Not isnumeric(request("doWealth")) or request("doWealth")="0" or request("doWealth")="" Then 
			doWealth=0
			doWealthMsg=""
		Else
			doWealth=request("doWealth")
			doWealthMsg="金钱" & request("doWealth") & ","
		End If

		If Not IsNumeric(request("douserEP")) or request("douserEP")="0" or request("douserEP")="" Then
			douserEP=0
			douserEPMsg=""
		Else 
			douserEP=request("douserEP")
			douserEPMsg="经验" & request("douserEP") & ","
		End If 

		If Not  IsNumeric(request("douserCP")) or request("douserCP")="0" or request("douserCP")="" Then
			douserCP=0
			douserCPMsg=""
		Else
			douserCP=request("douserCP")
			douserCPMsg="魅力" & request("douserCP") & ","
		End If

		If Not IsNumeric(request("douserPower")) or request("douserPower")="0" or request("douserPower")="" Then
			douserPower=0
			douserPowerMsg=""
		Else
			douserPower=request("douserPower")
			douserPowerMsg="威望" & request("douserPower")
		End If

		If doWealthMsg="" and douserEPMsg="" and douserCPMsg="" and douserPowerMsg="" Then
			allmsg="没有对用户进行分值操作"
		Else
			allmsg="用户操作:" & doWealthMsg & douserEPMsg & douserCPMsg & douserPowerMsg
		End If
		'Response.Write allmsg
		'response.end

		title=request.form("title")
		content=request.form("content")
		content="原因:" & title & content
		if request.form("title")="" and request.form("content")="" then Response.redirect "showerr.asp?ErrCodes=<li>请写明操作原因。&action=OtherErr"

		sql="insert into Dv_log (l_touser,l_username,l_content,l_ip,l_type) values ('"&username&"','"&Dvbbs.membername&"','用户操作:"&content& ","&allmsg&"','"&ip&"',5)"
		Dvbbs.Execute(sql)
		If allmsg<>"" Then
			Dvbbs.Execute("update [dv_user] set userWealth=userWealth+"&doWealth&",userCP=userCP+"&douserCP&",userEP=userEP+"&douserEP&",userPower=userPower+"&douserPower&" where userid="&userid&"")
		End If
		locktype="成功操作"
		Dvbbs.Dvbbs_suc("<li>您选择的用户已经"&locktype&"。<li>您的操作已经记录。")
	Else
%>
<FORM METHOD=POST ACTION="admin_lockuser.asp?action=power">
<table style="width:70%" cellspacing="1" cellpadding="3" align="center" class=tableborder1>
  <tr> 
    <th height=24>论坛管理中心--您要进行的操作是奖励用户</th>
  </tr>   
  <tr> 
    <td class=tablebody1 height=24><b>
      操作理由</b>:  
	  <select name="title" size=1>
<option value="">自定义</option>
<option value="多次发表好文章">多次发表好文章</option>
<option value="对社区建设有贡献">对社区建设有贡献</option>
<option value="多次发表灌水帖子">多次发表灌水帖子</option>
<option value="多次发表广告帖子">多次发表广告帖子</option>
	  </select>
	  <input type="text" name="content" size=50>  *</td>
  </tr>   
  <tr> 
    <td class=tablebody1 height=24><b>
      用户操作</b>:  金钱
	<select name="doWealth" size=1>

<%for i=-50 to 50%>
<option value="<%=i%>" <%if cint(i)=cint(0) then%>selected<%end if%>><%=i%></option>
<%next%>
	</select>&nbsp;魅力
	<select name="douserCP" size=1>

<%for i=-50 to 50%>
<option value="<%=i%>" <%if cint(i)=cint(0) then%>selected<%end if%>><%=i%></option>
<%next%>
	</select>&nbsp;经验
	<select name="douserEP" size=1>

<%for i=-50 to 50%>
<option value="<%=i%>" <%if cint(i)=cint(0) then%>selected<%end if%>><%=i%></option>
<%next%>
	</select>&nbsp;威望
	<select name="douserPower" size=1>

<%for i=-5 to 5%>
<option value="<%=i%>" <%if cint(i)=cint(0) then%>selected<%end if%>><%=i%></option>
<%next%>
	</select>
  *</td>
  </tr> 
<input type=hidden value="yes" name="checked">
<input type=hidden value="<%=userid%>" name="userid">
<input type=hidden value="<%=username%>" name="name">
  <tr> 
    <td class=tablebody2 height=24>
      请慎重使用管理员的管理职能,管理员所有操作将被记录&nbsp;<input type="Submit" name=Submit value="确认操作"></td>
  </tr>   
</table>
</FORM>
<%
end if
End Sub

'删除用户1-10天内主题
Sub Deltopic()
	Dim DelDate, Suserid
	Dim Todaynum
	Dim Trs, ii, SplitBoardID
	Dim j

⌨️ 快捷键说明

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