📄 manbd.asp
字号:
<%@ codepage ="936" %>
<%Response.Expires=0
nickname=Session("hxf_u_nickname")
grade=Int(Session("hxf_u_grade"))
userip=Request.ServerVariables("REMOTE_ADDR")
if grade<>12 or session("ipbt")<>"1" then Response.Redirect "manerr.asp?id=100"
uip=trim(request.form("pointname"))
uname=trim(request.form("uname"))
ts=trim(request.form("pl"))
if ts="" then ts=trim(request.form("pl1"))
sql=""
pp=""
if ts="绑定" and uip<>"" and uname<>"" then sql="insert into ipbt (username,userip) values('" & uname & "','" & uip & "')"
if ts="删除" and uip<>"" and uname<>"" then sql="delete from ipbt where userip='" & uip & "' and username='" & uname & "'"
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=n & "-" & y & "-" & r & " " & s & ":" & f & ":" & m
Set conn=Server.CreateObject("ADODB.CONNECTION")
Set rs=Server.CreateObject("ADODB.RecordSet")
connstr=Application("wsaxhg_connstr")
conn.open connstr
if ts="绑定" or ts="删除" then sql1="select * from ipbt where username='" & uname & "' and userip='" & uip & "'"
if sql<>"" then
set rs = conn.execute(sql1)
if rs.EOF or rs.bof then
rs.close
if ts="删除" then pp="删除的ip不存在!"
if ts="绑定" then
set rs = conn.execute(sql)
pp="绑定成功!"
sql = "INSERT INTO logs (type, logtime, name, ip, opertion) VALUES ('6', '" & sj & "', '" & nickname & "', '" & userip & "', '绑定用户名:<font color=green>" & uname & "</font> 用户IP:<font color=green>" & uip & "</font>')"
conn.Execute sql
end if
else
rs.close
if ts="绑定" then pp="绑定的用户已经存在!"
if ts="删除" then
set rs = conn.execute(sql)
pp="删除成功!"
sql = "INSERT INTO logs (type, logtime, name, ip, opertion) VALUES ('6', '" & sj & "', '" & nickname & "', '" & userip & "', '删除绑定用户名:<font color=green>" & uname & "</font> 用户IP:<font color=green>" & uip & "</font>')"
conn.Execute sql
end if
end if
end if
sql="select username,userip from ipbt"
set rs = conn.execute(sql)
%><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="#FFFFFF">
<h1 align="center"><font color="#0099FF">【IP绑定】</font></h1>
<div align="center">
<a href="javascript:history.go(0)">刷新</a> </div>
<hr noshade size="1" color=#009900>
<div align="center">
<center>
<table border="0" cellspacing="1" bordercolorlight="#999999" bordercolordark="#FFFFFF" cellpadding="0" bgcolor="#009AFF" align="center" width="59%" bordercolor="#009AFF">
<tr>
<td width="100%" align="center" colspan="3" height="25"> <font color="#FFFFFF">绑定信息</font></td>
</tr>
<tr bgcolor="#F7F3F7">
<td width="15%" align="center" height="25">序号</td>
<td width="30%" align="center" height="25">用户名</td>
<td width="40%" align="center" height="25">IP地址</td>
<td width="15%" align="center" height="25">删除</td>
</tr>
<%
p=1
do while not rs.eof
%>
<tr onmouseout="this.bgColor='#F0F0F0';"onmouseover="this.bgColor='#DFEFFF';" bgcolor="#F0F0F0">
<td width="15%" align="center" height="25"><%=p%></td>
<td width="30%" align="center" height="25"><%=rs("username")%></td>
<td width="40%" align="center" height="25"><%=rs("userip")%></td>
<td width="15%" align="center" height="25"><a href='manbddel.asp?id=<%=rs("username")%>&ip=<%=rs("userip")%>' onMouseOver="window.status='删除绑定用户。';return true" onMouseOut="window.status='';return true";)" title="删除绑定用户">删除</a></td>
</tr>
<%
p=p+1
rs.movenext
loop
%>
</table>
</center>
</div>
<div align=center>
<blockquote>
<form method="POST" action="manbd.asp">
●请输入授权用户名:<input type="text" name="uname" maxlength="20" size="20" style="font-size:12pt"><br><br>
●请输入授权IP地址:<input type="text" name="pointname" maxlength="20" size="20" style="font-size:12pt"><br><br>
<input type="submit" value="绑定" name="pl">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -