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

📄 iplock.asp

📁 聊天室源码呵呵你好用~~~~~~2.0版本
💻 ASP
字号:
<%@ LANGUAGE=VBScript%>
<%Server.ScriptTimeout=600
Response.Expires=0
if Session("a_c_user_name")="" then
 Response.write "<b>[操作失败]</b><p>您尚未登录(或已经超时退出),不能进行此操作!"
 Response.end
end if
if Session("a_c_user_level")<8 then
 Response.Write "<b>[操作失败]</b><p>您没有IP管理的权限!"
 Response.End
end if
ip=Trim(Request.Form("lockip"))
lockwhy=Server.HTMLEncode(Trim(Request.Form("lockwhy")))
if lockwhy="" then
 Response.Write "<b>[操作失败]</b><p>请输入封锁该IP的原因!<a href=javascript:history.go(-1)>【返回】</a>"
 Response.End
end if
if len(ip)<7 or ip="" or Instr(ip," ")<>0 or Instr(ip,".")=0 then Response.Redirect "ip.asp"
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
sj = s & ":" & f & ":" & m
sj2= n & "-" & y & "-" & r & " " & sj
iplock=sj2 & " " & Session("a_c_user_name") & "(" & Request.ServerVariables("REMOTE_ADDR") & ") 封锁IP: " & ip & " 。【原因:" & lockwhy & "】(" & Application("a_c_user_inthechat") & "人)"
dim log()
logfile=server.mappath("logdata.asp")
Set fs = CreateObject("Scripting.FileSystemObject")
Set thisfile = fs.OpenTextFile(logfile,1,False)
countlog = 0
do while not thisfile.AtEndOfStream
 thisline = thisfile.readline
 Redim preserve log(countlog)
 log(countlog) = thisline
 countlog = countlog + 1
loop
thisfile.Close
Set outfile = fs.CreateTextFile(logfile)
outfile.WriteLine log(0)
outfile.WriteLine iplock
if countlog>500 then countlog=500
for i=1 to countlog-1
 outfile.WriteLine log(i)
next
Application.Lock
ysd=0
for i=1 to Application("a_c_ip_locknum") step 2
 if Application("a_c_ip_lock"&i)=ip then
  Application("a_c_ip_lock"&(i+1))=sj2
  ysd=1
 end if
next
if ysd=0 then 
 locknum=Application("a_c_ip_locknum")
 Application("a_c_ip_lock"&(locknum+1))=ip
 Application("a_c_ip_lock"&(locknum+2))=sj2
 Application("a_c_ip_locknum")=Application("a_c_ip_locknum")+2
end if
Application.UnLock%><html>
<head>
<title>锁定IP</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type='text/css'>
<!--
.p9 {line-height: 150%; font-size: 9pt;}
.p12 {line-height: 150%; font-size: 12pt;}
body {line-height: 150%;font-size : 12pt;}
A  {text-decoration: none;}
A:Hover  {text-decoration : none;}
a:visited {  color: #0000FF}
-->
</style>
</head>
<body bgcolor="FFFFFF">
<h1 align="center"><font color="0099FF">【锁定IP】</font></h1>
<hr noshade size="1" color=009900>
<p><b>[完成锁定]</b></p>
<p>您刚才的操作已经记入“聊务公开”栏中,以供聊友监督:<a href="javascript:history.go(-1)">【返回】</a></p>
<blockquote>
<p class="p9"><font color="FF0000"><%=iplock%></font></p>
</blockquote>
<hr noshade size="1" color=009900>
<div align="center" class="p9"><script src="use.asp"></script> <script src="sn.asp"></script><br><script src="copyright.asp"></script></div>
</body>
</html>

⌨️ 快捷键说明

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