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

📄 log_admin.asp

📁 使用Asp+Access+FSO+Jmail+Servu开发
💻 ASP
字号:
<%
chk_admin_login(3)
response.buffer=true
response.expires=0%>
<!--#include file="admin.asp"-->

<%
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from log order by id" 
rs.open sql,conn,1,1
if request("delid")<>"" then
chk_admin_login(3)
Set rs = Server.CreateObject("ADODB.Recordset")
sql="select * from log where id="&request("delid")
rs.open sql,conn,3,3
rs.delete
rs.update
response.redirect"log_admin.asp"
rs.close
set rs=nothing
end if
%>
<%
   const MaxPerPage=20   
   dim totalPut   
   dim CurrentPage
   dim TotalPages
   dim i,j
   if not isempty(request("page")) then
      currentPage=cint(request("page"))
   else
      currentPage=1
   end if
   
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="../css/admin.css" rel=stylesheet type=text/css>
</head>
<body>
<%
if rs.eof and rs.bof then   
	 response.write"<br><br><br><center>目前日志记录为空!</center>"
	 response.end  
	 end if
	 %>
<table width=95% border=1 align="center" cellpadding=4 cellspacing=0 class="table-line">
      <tr align="center">
        <td colspan="7" class="td-title-color"><table  border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td class="shadow">登录日志</td>
          </tr>
        </table>        </td>
  </tr>
      <tr class="td-title-color">
        <td width="11%">
        <div align="center">登录情况</div></td>
        <td width="13%" align="center">用户名</td>
        <td width="16%" align="center">
          登录密码</td>
        <td width="18%" align="center">登录IP</td>
        <td width="13%" align="center" valign="middle">操作系统          </td>
        <td width="21%" align="center" valign="middle">登录时间</td>
        <td width="8%" align="center">
          删除</td>
  </tr>
      <tbody>
        <%
	 rs.pagesize=30  '系统默认每页显示30条记录,可自定义修改
     page=request("page")
     if page="" then
     page=1
     end if
	      rs.absoluteposition=rs.recordcount-(page-1)*rs.pagesize
          for ipag=1 to rs.pagesize
%>
        <tr onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">
          <td height="22" align="center"><%select case rs("type")
		  case "正常登录"
		  Response.Write("正常登录")
		  case "非法登录"
		  Response.Write("<b>非法登录</b>")
		  end select%></td>
          <td height="22" align="center"><%=rs("username")%></td>
          <td align="center"> <%=rs("password")%></td>
          <td align="center"><%=rs("loginip")%></td>
          <td align="center"><%=rs("os")%> </td>
          <td align="center"><%=rs("time")%></td>
          <td align="center"> <a href="?delid=<%=rs("id")%>">删除</a></td>
        </tr>
        <%
          rs.moveprevious
          if rs.bof Then exit for
          next  
%>
      </tbody>
</table>
<table width="95%" border="0" cellspacing="0" cellpadding="4" align="center">
  <tr align="CENTER" valign="BOTTOM">
    <td  width="33%"> 共 <%=rs.recordcount%> 条记录 第 <%=page%>/<%=rs.pagecount%> 页 </td>
    <td width="14%"><a href="log_admin.asp">首页</a></td>
    <td width="22%"><%if page<>1 then%>
        <a href="log_admin.asp?page=<%=page-1%>">上一页</a>
        <%else%>
        <font color="#999999">上一页</font>
        <%end if%></td>
    <td width="14%"><%
						rs.absolutepage=page+1
						if not rs.EOF then   
					  %>
        <a href="log_admin.asp?page=<%=page+1%>">下一页</a>
        <%else%>
        <font color="#999999">下一页</font>
        <%end if%>
    </td>
    <td width="17%"><a href="log_admin.asp?page=<%=rs.pagecount%>">尾页</a></td>
  </tr>
</table>
</body>

</html>

⌨️ 快捷键说明

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