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

📄 manlockok.asp

📁 网佳网络办公系统(以下简称OA)是一套基于B/S模式的无纸化办公系统。[显著特点:无须安装客户端] 主要功能模块:管理 公文 车辆 通知 档案 值班 人事 审批 仓库 主界面 软件下载 个
💻 ASP
字号:
<%Response.Expires=0
nickname=Session("hxf_u_nickname")
grade=Int(Session("hxf_u_grade"))
inthechat=Session("hxf_u_inthechat")
userip=Request.ServerVariables("REMOTE_ADDR")
if nickname="" or session("mypai")<>"六扇门" then Response.Redirect "manerr.asp?id=100"
if grade<10 then Response.Redirect "manerr.asp?id=200"
if inthechat<>"1" then Response.Redirect "manerr.asp?id=211"
lockname=Server.HTMLEncode(Trim(Request.Form("lockname")))
lockip=Server.HTMLEncode(Trim(Request.Form("lockip")))
if lockip="" then Response.Redirect "manerr.asp?id=212"
lockwhy=Server.HTMLEncode(Trim(Request.Form("lockwhy")))
if lockwhy="" then Response.Redirect "manerr.asp?id=214"
if CStr(lockname)=CStr(nickname) then Response.Redirect "manerr.asp?id=213"
if len(lockwhy)>60 then lockwhy=Left(lockwhy,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")
connstr=Application("hg_connstr")
conn.open connstr
sql="SELECT ip FROM iplocktemp WHERE ip='" & lockip & "'"
rs.open sql,conn,1,1
if Not(rs.Eof and rs.Bof) then
 rs.close
 conn.close
 set rs=nothing
 set conn=nothing
 Response.Redirect "manerr.asp?id=215"
end if
rs.close
if lockname<>"" then
 Application.Lock
 onlinelist=Application("hxf_c_onlinelist")
 dim newonlinelist()
 useronlinename=""
 onliners=0
 js=1
 for i=1 to UBound(onlinelist) step 6
  if CStr(onlinelist(i+1))<>CStr(lockname) then
   onliners=onliners+1
   useronlinename=useronlinename & " " & onlinelist(i+1)
   Redim Preserve newonlinelist(js),newonlinelist(js+1),newonlinelist(js+2),newonlinelist(js+3),newonlinelist(js+4),newonlinelist(js+5)
   newonlinelist(js)=onlinelist(i)
   newonlinelist(js+1)=onlinelist(i+1)
   newonlinelist(js+2)=onlinelist(i+2)
   newonlinelist(js+3)=onlinelist(i+3)
   newonlinelist(js+4)=onlinelist(i+4)
   newonlinelist(js+5)=onlinelist(i+5)
   js=js+6
  else
   kickip=lockip
  end if
 next
 useronlinename=useronlinename&" "
 if kickip=lockip then
  if onliners=0 then
   dim listnull(0)
   Application("hxf_c_onlinelist")=listnull
  else
   Application("hxf_c_onlinelist")=newonlinelist
  end if
  Application("hxf_c_useronlinename")=useronlinename
  Application("hxf_c_chatrs")=onliners
 else
  Application.UnLock
  conn.close
  set rs=nothing
  set conn=nothing
  Response.Redirect "manerr.asp?id=219"
 end if
 Application.UnLock
 sql="SELECT lastkick FROM 用户 WHERE 姓名='" & lockname & "'"
 rs.open sql,conn,1,3
 if Not(rs.Eof and rs.Bof) then
  rs("lastkick")=sj
  rs.Update
 end if
 rs.close
end if
set rs=nothing
Function SqlStr(data)
 SqlStr="'" & Replace(data,"'","''") & "'"
End Function
sql="INSERT INTO iplocktemp (ip,lockdate,locker) VALUES ("
sql=sql & SqlStr(lockip) & ","
sql=sql & SqlStr(sj) & ","
sql=sql & SqlStr(nickname) & ")"
conn.Execute sql
locklog="封锁IP:<font color=red>" & lockip & "</font>(<font color=blue>" & lockname & "</font>) <font color=009900>[原因:" & lockwhy & "]</font>"
'记录在案
 sql="INSERT INTO logdata (logtime,name,ip,opertion) VALUES ("
 sql=sql & SqlStr(sj) & ","
 sql=sql & SqlStr(nickname) & ","
 sql=sql & SqlStr(userip) & ","
 sql=sql & SqlStr(locklog) & ")"
 conn.Execute sql
conn.close
set conn=nothing
Session("hxf_u_lasttime")=sj
Application.Lock
sd=Application("hxf_c_sd")
line=int(Application("hxf_c_line"))
Application("hxf_c_line")=line+1
	for i=1 to 171
	  sd(i)=sd(i+9)
	next
	sd(172)=line
	sd(173)=1
	sd(174)=0
	sd(175)="消息"
	sd(176)="大家"
	sd(177)="660099"
	sd(178)="660099"
	sd(179)="对"
    sd(180)="<font color=black>【封锁】</font><font color=8800FF><font color=red>" & nickname & "</font>封锁IP:<font color=red>" & lockip & "</font>(" & lockname & ")……〖原因:" & lockwhy & "〗</font><font class=t>(" & t & ")</font>"
Application("hxf_c_sd")=sd
Application.UnLock%><html>
<head>
<title>封锁IP</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="readonly/style.css">
</head>
<BODY bgColor=#000000 oncontextmenu=self.event.returnValue=false class=p150 text="#FFFFFF"> 
<p><br></p>
<table border="1" cellspacing="0" cellpadding="10" bordercolorlight="#808000" bordercolordark="#000000" align="center">
<form>
<tr>
<td>
<p><%=sj%></p>
<p><%=nickname&"("&userip&")"%></p>
<p><%=locklog%></p>
<div align="center">
<input type="button" value="返回" onclick="javascript:history.go(-1)">
</div>
</td>
</tr>
</form>
</table>
</body>
</html>

⌨️ 快捷键说明

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