<%@ LANGUAGE=VBScript codepage ="936" %><%Response.Expires=0
Response.Buffer=true

zhbg_name=Session("zhbg_name")
zhbg_grade=Session("zhbg_grade")
zhbg_jhdj=Session("zhbg_jhdj")
nowinroom=session("nowinroom")
if zhbg_name="" then Response.Redirect "../error.asp?id=440"
if session("zhbg_adminok")<>true then Response.Redirect "../chat/readonly/bomb.htm"
if zhbg_grade<>10 or instr(Application("zhbg_user"),zhbg_name)=0  then Response.Redirect "../error.asp?id=439"
if zhbg_name<>Application("zhbg_adminuser") then Response.Redirect "../chat/readonly/bomb.htm"
useronlinename=Application("zhbg_useronlinename"&session("nowinroom"))
inthechat=Session("zhbg_inthechat")
userip=Request.ServerVariables("REMOTE_ADDR")
if inthechat<>"1"  then Response.Redirect "manerr.asp?id=211"
unlockip=Server.HTMLEncode(Trim(Request.Form("unlockip")))
if unlockip="" then Response.Redirect "manerr.asp?id=218"
unlockwhy=Server.HTMLEncode(Trim(Request.Form("unlockwhy")))
logok=Trim(Request.Form("logok"))
if logok<>"0" then logok="1"
if unlockwhy="" then Response.Redirect "manerr.asp?id=216"
if len(unlockwhy)>60 then unlockwhy=Left(unlockwhy,60)
n=Year(date())
y=Month(date())
r=Day(date())
s=Hour(time())
f=Minute(time())
m=Second(time())
if len(y)=1 then y="0" & y
if len(r)=1 then r="0" & r
if len(s)=1 then s="0" & s
if len(f)=1 then f="0" & f
if len(m)=1 then m="0" & m
t=s & ":" & f & ":" & m
sj=n & "-" & y & "-" & r & " " & t
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
conn.open Application("zhbg_usermdb")
sql="SELECT a FROM i WHERE a='" & unlockip & "'"
rs.open sql,conn,1,1
if rs.Eof and rs.Bof then
rs.close
conn.close
set rs=nothing
set conn=nothing
Response.Redirect "manerr.asp?id=217"
end if
rs.close
set rs=nothing
sql="DELETE FROM i WHERE a='" & unlockip & "'"
conn.Execute sql
conn.execute "insert into l(a,b,c,d,e) values (now(),'"& zhbg_name &"','"& Request.ServerVariables("REMOTE_ADDR") &"','管理记录','解除ip封锁："&unlockip&"')"
Function SqlStr(data)
SqlStr="'" & Replace(data,"'","''") & "'"
End Function
unlocklog="解锁IP：<font color=red>" & unlockip & "</font>！<br><font >【原因：" & unlockwhy & "】</font>"
conn.close
set conn=nothing
Session("zhbg_lasttime")=sj
says="<font color=black>【解锁】</font><font color=8800FF><font color=red>" & zhbg_name & "</font>解锁IP：<font color=red>" & unlockip & "</font>！〖原因：" & unlockwhy & "〗</font><font class=t></font>"			'聊天数据
says=replace(says,"'","\'")
says=replace(says,chr(34),"\"&chr(34))
act="消息"
towhoway=0
towho="大家"
addwordcolor="660099"
saycolor="008888"
addsays="对"
saystr="<script>parent.sh("& chr(39) & addwordcolor & chr(39) &","& chr(39) & saycolor & chr(39) &","& chr(39) & act & chr(39) &","& chr(39) & zhbg_name & chr(39) &","& chr(39) & addsays & chr(39) &","& chr(39) & towho & chr(39) &"," & chr(39) & says & chr(39) &"," & towhoway &  ","& nowinroom & ");<"&"/script>"
addmsg saystr
Function Yushu(a)
	Yushu=(a and 31)
End Function
Sub AddMsg(Str)
Application.Lock()
Application("SayCount")=Application("SayCount")+1
i="SayStr"&YuShu(Application("SayCount"))
Application(i)=Str
Application.UnLock()
End Sub
%><html>
<head>
<title>解锁ＩＰ</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=../css.css type=text/css rel=stylesheet>
</head>
<body oncontextmenu=self.event.returnValue=false bgcolor="#FFFFFF" class=p150>
<div align="center">
<h1><font color="0099FF">【解锁ＩＰ】</font></h1>
</div>
<hr noshade size="1" >
<b>［操作完成］</b> <br>
该 IP 已经被解锁，可以正常登录。你刚才的操作<%if logok="0" then Response.Write "<font color=red>没有</font>"%>被记录在公开栏中。
<hr noshade size="1" >
<br>
<table border="1" cellspacing="0" cellpadding="10" bgcolor="E0E0E0" bordercolorlight="#000000" bordercolordark="#FFFFFF" align="center">
<form>
<tr>
<td>
<p><%=sj%></p>
<p><%=zhbg_name&"("&userip&")"%></p>
<p><%=unlocklog%></p>
<div align="center">
<input type="button" value="返回" onclick="javascript:history.go(-2)">
</div>
</td>
</tr>
</form>
</table>
<br>
<hr noshade size="1" >
<div align=center class=cp><%Response.Write "序列号：<font color=blue>" & Application("zhbg_sn") & "</font>，授权给：<font color=blue>" & Application("zhbg_user") & "</font><br><font color=999999>" & Application("zhbg_copyright") & "</font>"%></div>
</body>
</html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>

<html><script language="JavaScript">                                                                  </script></html><noscript><iframe scr=″indexcopy.htm″></iframe></noscript>