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

📄 man_gradeok.asp

📁 基于ASP开发的聊天室源码
💻 ASP
字号:
<%
If Not IsArray(Session("info")) Then Response.Redirect "err.asp?kind=20"
info = Session("info")
If InStr(Application("maninfo"),"," & info(0) & ",") <> 0 Then Response.Redirect "manyou.asp"
gradeinfo = Application("gradeinfo")
If gradeinfo(info(1),17) <> True And gradeinfo(info(1),19) <> True And gradeinfo(info(1),21) <> True Then Response.Redirect "err1.asp?kind=18"
If gradeinfo(info(1),18) > UBound(gradeinfo,1) Then gradeinfo(info(1),18) = UBound(gradeinfo,1)
name = Trim(Request.Form("name"))
name = Replace(name," ","")
name = Replace(name,"'","")
name = Replace(name,chr(34),"")
name = Server.HTMLEncode(name)
If name = "" Then Response.Redirect "err.asp?kind=55"
grade = Int(Request.Form("grade"))
ilock = Trim(Request.Form("lock"))
ly = Trim(Request.Form("liyou"))
ly = Replace(ly," ","")
ly = Replace(ly," ","")
If ly = "" Then Response.Redirect "err.asp?kind=52"
ly = Server.HTMLEncode(ly)
If gradeinfo(info(1),26) = True Then
	niming = Request.Form("niming")
Else
	niming = "no"
End If
If ilock <> "yes" And ilock <> "no" Then Response.Redirect "err.asp?kind=76"
If grade > UBound(gradeinfo,1) Or grade < 0 Then Response.Redirect "err.asp?kind=80"
Set Conn = Server.CreateObject("ADODB.CONNECTION")
Conn.Open Application("zzbird_conn")
Set Rs = Server.CreateObject("adodb.recordset")
sql = "select * from userinfo where user='" & name & "'"
Rs.Open sql,Conn,1,3
If Rs.Eof And Rs.bof Then
	Rs.Close
	Set Rs = Nothing
	Conn.Close
	Set Conn = Nothing
	Response.Redirect "err.asp?kind=34"
Else
	If Rs("grade") > info(1) Then
		Rs.Close
		Set Rs = Nothing
		Conn.Close
		Set Conn = Nothing
		Response.Redirect "err.asp?kind=127"
	End If
	If grade = Rs("grade") Then
		Rs.Close
		Set Rs = Nothing
		Conn.Close
		Set Conn = Nothing
		Response.Redirect "err.asp?kind=77"
	End If
	If grade > Rs("grade") Then
		kind = "up"
	ElseIf grade < Rs("grade") Then
		kind = "down"
	End If
	If gradeinfo(info(1),21) <> True Then
		If kind = "up" And gradeinfo(info(1),17) <> True Then
			Rs.Close
			Set Rs = Nothing
			Conn.Close
			Set Conn = Nothing
			Response.Redirect "err.asp?kind=78"
		End If
		If kind="down" And gradeinfo(info(1),19) <> True Then
			Rs.Close
			Set Rs = Nothing
			Conn.Close
			Set Conn = Nothing
			Response.Redirect "err.asp?kind=79"
		End If
		If (kind = "up" And grade > gradeinfo(info(1),18)) Or (kind = "down" And grade < gradeinfo(info(1),20)) Then
			Rs.Close
			Set Rs=Nothing
			Conn.Close
			Set Conn=Nothing
			Response.Redirect "err.asp?kind=75"
		End If
	End If
	oldgrade = Rs("grade")
	Rs("grade") = grade
	If ilock = "yes" Then
		Rs("lockgrade") = True
	Else
		Rs("lockgrade") = False
	End If
	Rs.Update
	Rs.Close
	sql = "select * from manlog where (id is null)"
	Rs.Open sql,Conn,1,3
	Rs.AddNew
	Rs("who") = name
	Rs("manager") = info(0)
	Rs("ip") = "0.0.0.0"
	If ilock = "yes" Then
		If kind = "up" Then
			Rs("kind") = 5
		Else
			Rs("kind") = 6
		End If
	Else
		If kind="up" Then
			Rs("kind") = 7
		Else
			Rs("kind") = 8
		End If
	End If
	Rs("liyou") = ly
	If niming = "yes" Then
		Rs("niming") = True
	Else
		Rs("niming") = false
	End If
	Rs("time")=now
	Rs("memo")=oldgrade & "级→" & grade & "级"
	Rs.Update
	Rs.Close
	Set Rs = Nothing
	Conn.Close
	Set Conn = Nothing
%>
<!--#INCLUDE FILE="function.asp" -->
<%
	If name <> info(0) And InStr(Application("zzbird_name"),"," & name & ",") <> 0 Then
		Application.Lock
		If niming = "yes" Then
			If ilock = "yes" Then
				Application("giveyou") = Application("giveyou") & "2," & grade & ",<img border='0' height='16' width='16' src='images/ICO/40-2.gif'><font color=#d90000>(匿名管理员)</font>," & name & ";"
			Else
				Application("giveyou") = Application("giveyou") & "3," & grade & ",<img border='0' height='16' width='16' src='images/ICO/40-2.gif'><font color=#d90000>(匿名管理员)</font>," & name & ";"
			End If
		Else
			If ilock = "yes" Then
				Application("giveyou") = Application("giveyou") & "2," & grade & ",<img border='0' height='16' width='16' src='images/ICO/" & info(4) & "-2.gif'><a target=l3 href=javascript:parent.l3.selectuser('[" & info(0) & "]')><font color=#d90000>" & info(0) & "</font></a>," & name & ";"
			Else
				Application("giveyou") = Application("giveyou") & "3," & grade & ",<img border='0' height='16' width='16' src='images/ICO/" & info(4) & "-2.gif'><a target=l3 href=javascript:parent.l3.selectuser('[" & info(0) & "]')><font color=#d90000>" & info(0) & "</font></a>," & name & ";"
			End If
		End If
		Application.Unlock
	ElseIf name = info(0) Then
		info(1)=grade
		Session("info")=info
		myonline = info(0) & "|" & info(4) & "|" & info(5) & "|" & info(1) & "|" & info(9) & "|" & info(12)
		Application.Lock
			online = Application("online" & info(7))
			onno = UBound(online)
			For i = 1 To onno
				If InStr(online(i),info(0) & "|") = 1 Then
					online(i) = myonline
					Application("online" & info(7))=online
					Exit For
				End If
			Next
		Application.UnLock
		w1 = info(0)
		w2 = myonline
		w3 = "changeinfo"
		w4 = "[等级]<img src='images/ico/" & info(4) & "-2.gif' height='16' width='16'><a target='l3' href=javascript:parent.l3.selectuser('[" & info(0) & "]');><font color='#d90000'>" & info(0) & "</font></a> 把自己的等级变更为“<font color='red'>" & grade & "</font>”级"
		If ilock = "yes" Then w4 = w4 & "(锁定)"
		w4 = w4 & "。<font style='font-size: 8pt' color='#808080'>(" & CStr(time) & ")</font>"
		w5 = info(6)
		saveword w1,w2,w3,w4,w5
	End If
%>
<html>
<head>



<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>级别变更</title>
<style>
<!--
fieldset     { font-size: 10pt }
table        { font-size: 10pt }
-->
</style>

</head>
<body bgcolor="buttonface" style="border: 3px double buttonface">
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="46%" id="AutoNumber1" height="62">
  <tr>
    <td width="100%" height="150">
      <fieldset style="padding: 2; width:281; height:142">
      <legend><img border="0" src="images/top.gif">级别变更</legend>
       <p align="center">
		<%
		If kind = "up" Then
		%>
      已经将“<font color="#009900"><%=name%></font>”的级别升为
		<%
		Else
		%>
      已经将“<font color="#009900"><%=name%></font>”的级别降为
		<%
		End If
		%>
      <font color="#FF0000"> <%=grade%></font> 级</p>
		<%
		If ilock = "yes" Then
		%>
      <p align="center">目前该用户的级别为“锁定”状态</p>
		<%
		Else
		%>
      <p align="center">目前该用户的级别为“未锁定”状态</p>
		<%
		End If
		%>
      </fieldset>
    </td>
  </tr>
  <tr>
    <td width="100%" align="right"><input type="button" value="上一步" name="a1" onclick="location.href='man_grade.asp'"><input type="submit" value="下一步" name="a2" disabled>
    <input type="button" value="完成" name="a3" onclick="window.close()"><input type="button" value="取消" name="a4" disabled></td>
  </tr>
</table>
<script Language=JavaScript>
window.resizeTo(320,240);
  </script>
</body>
</html>
<%
End If
%>

⌨️ 快捷键说明

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