📄 admin_log.asp
字号:
<!--#include file="Inc/Const.asp"-->
<%
if Not Cl.TrueOtherPurview("Log") then
Cl.ShowErr("<br /><li>您无此操作权限!</li>")
end if
const PageSize=50
dim Action
dim keyword,Field
Dim WhereStr
keyword = Trim(request("keyword"))
Field = Trim(request("Field"))
Action = Trim(request("Action"))
CurrentPage=Cl.GetClng(request("page"))
FileName = "Admin_Log.asp?Action="&Action&"&Field="&Field&"&Keyword="&Keyword
Header
%>
<script language="JavaScript" type="text/javascript">
function unselectall()
{
if(document.myform.chkAll.checked){
document.myform.chkAll.checked = document.myform.chkAll.checked&0;
}
}
function CheckAll(form)
{
for (var i=0;i<form.elements.length;i++)
{
var e = form.elements[i];
if (e.name != "chkAll"&&e.disabled!=true)
e.checked = form.chkAll.checked;
}
}
</script>
<table cellpadding="0" cellspacing="1" border="0" width="100%" class="border" align="center">
<tr>
<td colspan="2" align="center" class="title"><strong>Log 记 录 管 理</strong></td>
</tr>
<tr class="tdbg">
<td width="80" height="30"><strong>管理导航:</strong></td>
<td height="30"><a href="Admin_Log.asp?Action=SqlLog">SQL注入记录</a> | <a href="Admin_Log.asp?Action=UpFileLog">上传文件记录</a> | <a href="Admin_Log.asp?Action=AdminLog">管理事件记录</a>
<%if SysTemVersion > 1 then %>
| <a href="Admin_Log.asp?Action=TransferLog" target="main">用户转账记录</a> | <a href="Admin_Log.asp?Action=BuyCardLog" target="main">充值卡购买记录</a>
<%end if%>
</td>
</tr>
<form action="Admin_Log.asp?Action=<%=Action%>" method="post" name="form2" id="form2">
<tr class="tdbg">
<td width="80" height="30"><strong>快速查询:</strong></td>
<td height="30">
<select id="Field" name="Field">
<option value="id">用户ID</option>
<option value="name" selected="selected">用户名</option>
<option value="ip">用户IP</option>
</select>
关键字:<input name="Keyword" type="text" id="Keyword" size="30" maxlength="30" value="<%=Keyword%>">
<input type="submit" name="Submit" value=" 查 询 "> <font color="#3399FF">注,某些记录可能不支持查询</font>
</td>
</tr>
</form>
</table>
<script language="JavaScript" type="text/javascript">
CheckSel('Field','<%=Field%>');
</script>
<br />
<%
Select Case Action
Case "SqlLog"
call SqlLog()
Case "UpFileLog"
call UpFileLog()
Case "AdminLog"
call AdminLog()
Case "DelSqlLog"
call DelSqlLog()
Case "DelUpFileLog"
call DelUpFileLog()
Case "DelAdminLog"
call DelAdminLog()
Case "BuyCardLog"
call BuyCardLog()
Case "TransferLog"
call TransferLog()
Case Else
call SqlLog()
end Select
Footer
Sub BuyCardLog()
Dim UserID
%>
<table border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="title">
<td align="center" colspan="8"><strong>充 值 卡 购 买 记 录</strong></td>
</tr>
<tr class="tdbg" onmouseout="this.className='tdbg'" onmouseover="this.className='tdbg2'">
<td align="center" width="40"><strong>编号</strong></td>
<td align="center" width="80"><strong>购买用户</strong></td>
<td align="center"><strong>充值卡号及密码</strong></td>
<td align="center" width="60"><strong>购买<%=Cl.Web_Setting(26)%></strong></td>
<td align="center" width="100"><strong><%=Cl.Web_Setting(28)%>面值</strong></td>
<td align="center" width="100"><strong>天数面值</strong></td>
<td align="center" width="120"><strong>购买时间</strong></td>
<td align="center" width="40"><strong>操作</strong></td>
</tr>
<%
Select Case Field
Case "id"
WhereStr=" Where UserID="&CLng(Keyword)&""
Case "ip"
'WhereStr=" Where UserID="&UserID&""
Case "name"
WhereStr=" Where UserName like '%"&Keyword&"%'"
End Select
SQL="Select ID,UserID,UserName,CzNum,CzPass,BuyMoney,PointRate,CzPoint,DayRate,CzDayNum,BuyType,BuyTime From Cl_BuyCardLog " & WhereStr & " Order by id desc"
Set Rs=Cl.Execute_L(SQL)
if Rs.Bof and Rs.Eof then
%>
<tr>
<td align="center" Colspan="8" Class="tdbg">暂无任何充值记录!</td>
</tr>
<%
Rs.Close : Set Rs=Nothing
else
Dim rsTotalPut
Set rsTotalPut=Cl.Execute_L("select count(id) from Cl_BuyCardLog " & WhereStr)
TotalPut=rsTotalPut(0)'rs.recordcount
rsTotalPut.Close : Set rsTotalPut=Nothing
if (TotalPut mod PageSize)=0 then
TotalPages = TotalPut \ PageSize
else
TotalPages = TotalPut \ PageSize + 1
end if
if CurrentPage > TotalPages then CurrentPage=TotalPages
if CurrentPage < 1 then CurrentPage=1
rs.move (CurrentPage-1)*PageSize
SQL = rs.GetRows(PageSize)
rs.close : set rs=Nothing
For i=0 To Ubound(SQL,2)
%>
<tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
<td align="center" width="40"><%=SQL(0,i)%></td>
<td align="center" width="80"><%=SQL(2,i)%></td>
<td align="left"><%
if SQL(10,i)=1 then%>已直接充进账户<%
else%><font color="#0000ff">卡号:<%=SQL(3,i)%></font><br />
<font color="#ff0033">密码:<%=SQL(4,i)%></font><%
end if%></td>
<td align="center" width="60"><font color="#ff0033"><b><%=SQL(5,i)%></b></font> <%=Cl.Web_Setting(27)%></td>
<td width="100">[1:<font color="#ff0033"><b><%=SQL(6,i)%></b></font>] <font color="#0000ff"><b><%=SQL(7,i)%></b></font> <%=Cl.Web_Setting(29)%></td>
<td width="100">[1:<font color="#ff0033"><b><%=SQL(8,i)%></b></font>] <font color="#0000ff"><b><%=SQL(9,i)%></b></font> 天</td>
<td align="center" width="120"><%=SQL(11,i)%></td>
<td align="center" width="40">删除</td>
</tr>
<%
Next
SQL=Empty
End if
%>
</table>
<%
Response.write Cl.ShowPage("?Action="&Action,TotalPut,PageSize,"条","记录")
End Sub
Sub TransferLog()
%>
<table border="0" align="center" cellpadding="0" cellspacing="1" class="border">
<tr class="title">
<td align="center" colspan="8"><strong>用 户 转 帐 记 录</strong></td>
</tr>
<tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
<td align="center" width="40"><strong>编号</strong></td>
<td align="center" width="80"><strong>用户名称</strong></td>
<td align="center" width="60"><strong>转出<%=Cl.Web_Setting(28)%></strong></td>
<td align="center" width="60"><strong>转出<%=Cl.Web_Setting(26)%></strong></td>
<td align="center" width="80"><strong>对方账号</strong></td>
<td align="center" width="120"><strong>转账时间</strong></td>
<td align="center"><strong>附加留言</strong></td>
<td align="center" width="40"><strong>操作</strong></td>
</tr>
<%
Select Case Field
Case "id"
WhereStr=" Where UserID="&CLng(Keyword)&""
Case "ip"
'WhereStr=" Where UserID="&UserID&""
Case "name"
WhereStr=" Where UserName like '%"&Keyword&"%'"
End Select
SQL="Select ID,UserID,UserName,TransferPoint,TransferDay,TransferMoney,TransferUser,TransferTime,Message From Cl_TransferLog "&WhereStr&" order by ID Desc"
Set Rs=Cl.Execute_L(SQL)
if Rs.Bof and Rs.Eof then
%>
<tr>
<td align="center" Colspan="8" Class="tdbg">暂无任何充值记录!</td>
</tr>
<%
Rs.Close : Set Rs=Nothing
else
Dim rsTotalPut
Set rsTotalPut=Cl.Execute_L("select count(id) from Cl_TransferLog "&WhereStr&"")
TotalPut=rsTotalPut(0)'rs.recordcount
rsTotalPut.Close : Set rsTotalPut=Nothing
if (TotalPut mod PageSize)=0 then
TotalPages = TotalPut \ PageSize
else
TotalPages = TotalPut \ PageSize + 1
end if
if CurrentPage > TotalPages then CurrentPage=TotalPages
if CurrentPage < 1 then CurrentPage=1
rs.move (CurrentPage-1)*PageSize
SQL = rs.GetRows(PageSize)
rs.close : set rs=Nothing
For i=0 To Ubound(SQL,2)
'ID,UserID,UserName,TransferPoint,TransferDay,TransferMoney=5,TransferUser,TransferTime,Message
%>
<tr class="tdbg">
<td align="center" width="40"><%=SQL(0,i)%></td>
<td align="center" width="80"><%=SQL(2,i)%></td>
<td align="center" width="60"><font color="#ff0033"><b><%=SQL(3,i)%></b></font></td>
<td align="center" width="60"><font color="#ff0033"><b><%=SQL(5,i)%></b></font></td>
<td align="center" width="80"><%=SQL(6,i)%></td>
<td align="center" width="120"><%=SQL(7,i)%></td>
<td> <span title="<%=SQL(8,i)%>"><%=Left(SQL(8,i),200)%></span></td>
<td align="center" width="40">删除</td>
</tr>
<%
Next
SQL=Empty
End if
%>
</table>
<%
Response.write Cl.ShowPage(FileName,TotalPut,PageSize,"条","记录")
End Sub
Sub SqlLog()
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<form action="Admin_Log.asp?Action=DelSqlLog" method="post" name="myform" id="myform">
<tr class="title">
<td align="center" colspan="6"><strong>SQL 注 入 记 录</strong></td>
</tr>
<tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
<td width="30" align="center"><strong>选中</strong></td>
<td width="150" height="22" align="center"><strong> 操作页面 </strong></td>
<td height="22" align="center"><strong> 提交数据 </strong></td>
<td width="120" height="22" align="center"><strong> IP/日期</strong></td>
<td width="80" height="22" align="center"><strong> 方式 </strong></td>
</tr>
<%
Select Case Field
Case "id"
'WhereStr=" Where UserID="&CLng(Keyword)&""
Case "ip"
WhereStr=" Where IP like '%"&Keyword&"%'"
Case "name"
'WhereStr=" Where UserName like '%"&Keyword&"%'"
End Select
sql="select ID,ScriptName,S_Info,IP,A_Time,Type from Cl_SqlLog " & WhereStr & " order by ID desc"
Set rs=Cl.Execute_L(SQL)
if rs.eof and rs.bof then
TotalPut=0
response.write "<tr class='tdbg'><td colspan=6><p>没有任何记录!</p></td></tr>"
else
Dim rsTotalPut
Set rsTotalPut=Cl.Execute_L("select count(id) from Cl_SqlLog " & WhereStr & "")
TotalPut=rsTotalPut(0)'rs.recordcount
rsTotalPut.Close : Set rsTotalPut=Nothing
if (TotalPut mod PageSize)=0 then
TotalPages = TotalPut \ PageSize
else
TotalPages = TotalPut \ PageSize + 1
end if
if CurrentPage > TotalPages then CurrentPage=TotalPages
if CurrentPage < 1 then CurrentPage=1
rs.move (CurrentPage-1)*PageSize
SQL=rs.GetRows(PageSize)
for i=0 to Ubound(SQL,2)%>
<tr class="tdbg" onMouseOut="this.className='tdbg'" onMouseOver="this.className='tdbg2'">
<td width="30" align="center"><input name="ID" type="checkbox" id="ID" value="<%=SQL(0,i)%>" onclick="unselectall()" /></td>
<td width="150"><%=SQL(1,i)%></td>
<td style="table-layout:fixed;word-break:break-all"><%=Server.HtmlEncode(Cl.GotTopic(SQL(2,i),200))%></td>
<td width="120" align="center"><a href="Admin_LockIP.asp?action=add&userip=<%=SQL(3,i)%>"><%=SQL(3,i)%></a><br /><%=Cl.Format_Time(SQL(4,i),3)%></td>
<td align="center" width="80"><%=SQL(5,i)%></td>
</tr>
<%
Next
SQL=Empty
end if
rs.Close:set rs=Nothing
%>
<tr class="tdbg">
<td colspan="2">
<input name="chkAll" type="checkbox" id="chkAll" onclick="CheckAll(this.form);" value="checkbox" />
选中本页所有</td>
<td colspan="4">
<input name="Submit" type="submit" id="Submit" value=" 删除选中的记录 " onclick= "return confirm('确定要删除选中的记录吗?');" />
<input name="Delall" type="submit" id="Delall" value=" 清空所有记录 " onclick="document.myform.action='Admin_Log.asp?Action=DelSqlLog&DelType=All';return confirm('确定要删除所有的记录吗?注意,此操作将不可恢复!');" /></td>
</tr>
</form>
</table>
<%=Cl.ShowPage(FileName,TotalPut,PageSize,"条","记录")%>
<%
End Sub
Sub UpFileLog()
%>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
<form action="Admin_Log.asp?Action=DelUpFileLog" method="post" name="myform" target="_self" id="myform">
<tr class="title">
<td align="center" colspan="7"><strong>上 传 文 件 记 录</strong></td>
</tr>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -