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

📄 userlog.asp

📁 办公自动化系统 适用于办公室的各种几本功能的操作 功能比较简单
💻 ASP
字号:
<!--#include file="../Inc/Secure.asp"-->
<%dim ThisKey
ThisKey = "#"
%>
<!--#include file="../inc/permission.asp"-->
<!--#include file="../Inc/connection.asp"-->
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../css/main.css" rel="STYLESHEET" type="text/css">
</HEAD>
<body>
<%
strStartTime=replace(trim(request("StartTime")),"'","''")
strEndTime=replace(trim(request("EndTime")),"'","''")

if request("cmdDelete")<>"" then
	if strStartTime<>"" and strEndTime<>"" then
		Conn.execute "Delete tblLog where LoginTime>='"& strStartTime &"' and LoginTime<='"& strEndTime &"'"
	else
		response.write "<font color=#ff0000>请输入起始时间</font>"
	end if
end if

Maxmessage=50
currentpage = request("page")
If currentpage = "" Then
currentpage = 1
End If

Set oRs = Server.Createobject("Adodb.Recordset")
strSql="Select ID,Name,IP,LoginTime from tblLog order by ID desc"
oRs.pagesize = Maxmessage
oRs.Open strSQL, Conn, 1, 1
totalpage = oRs.pagecount
totalmessage = oRs.recordcount

If totalmessage <> 0 Then
  oRs.AbsolutePage = currentpage
  arrMsg = oRs.getRows(Maxmessage) 
End If
oRs.close
Set oRs = Nothing


%>
<Form name="frmDelete" Method="Post" action="<%=Request.ServerVariables("SCRIPT_NAME")%>">
	删除登陆日志记录:开始时间:<INPUT TYPE="text" NAME="StartTime" size=10 maxlength=30 class="input">
	截止时间:<INPUT TYPE="text" NAME="EndTime" size=10 maxlength=30 class="input">
	<INPUT TYPE="submit" Name="cmdDelete" value="删除" class="font9boldwhite">
</Form>
<%

Response.Write "登陆日志共 " & totalmessage & " 条/" & totalpage & " 页 每页 "& maxmessage &" 条"
If totalpage > 0 Then
   Response.Write ",第 " & currentpage & " 页 "
End If

If totalpage > 1 Then
   If currentpage > 1 Then

   Response.Write ("<a href='"& Request.ServerVariables("SCRIPT_NAME")&"?page=" & currentpage - 1 & "' >上页</a>  " & vbCrLf)

   End If

   If currentpage + 1 <= totalpage Then

   Response.Write ("<a href='"& Request.ServerVariables("SCRIPT_NAME")&"?page=" & currentpage + 1 & "' >下页</a>" & vbCrLf)

   End If
End If
If IsEmpty(arrMsg) Then
   Response.Write " <BR><BR>暂时为空!"
Else
	response.write "<table border=0 bgcolor=#CC99FF width='100%' cellpadding=4 cellspacing=1><tr bgcolor=#CCCCFF><td>登陆用户名</td><td>登陆IP</td><td>登陆时间</td></tr>"
	For i=0 to uBound(arrMsg,2)
		response.write "<tr bgcolor=#ffffff> "
			response.write "<td>"& trim(trim(arrMsg(1,i))) &"</a></td>"
			response.write "<td>"& trim(trim(arrMsg(2,i))) &"</td>"
			response.write "<td>"& trim(trim(arrMsg(3,i))) &"</td>"
		response.write "</tr>"
	next
	response.write "</table><BR><BR>"
end if
%>
</body>
</html>
<!--#include file="../Inc/connclose.asp"-->

⌨️ 快捷键说明

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