 |
用户日志 |
<%
Action = request("Action")
select case Action
case "search"
call Search
case "searchResult0"
call searchResult0
case "searchResult"
call searchResult
case else
call main
end select
sub main()
%>
<%
end sub
sub Search()
%>
<%
end sub
sub searchResult0()
session("uid") = trim(request("uid"))
session("d1") = request("d1")
session("d2") = request("d2")
session("page") = 1
call searchResult
end sub
sub searchResult()
dim rse, sqle, t_classid, uid, d1, d2, totalPages, totalRecords, strFileName,i
uid = session("uid")
d1 = session("d1")
d2 = session("d2")
strFileName = "admin_userLog.asp?action=searchResult"
sqle = "select id, uid, contents, happentime from t_user_log where uid = '" & uid & "' and happentime between '"&d1&"' and '"&d2&"' order by happentime desc"
set rse = server.CreateObject("adodb.recordset")
rse.open sqle, conn, 1, 1
rse.pagesize = maxperpage
totalPages = rse.pagecount
totalRecords = rse.recordcount
if rse.bof and rse.eof then
else
dim pageAction
pageAction = request("pageAction")
select case pageAction
case "goPage" session("page") = CLng(request("pageNum"))
case "first" session("page") = 1
case "prev" session("page") = session("page") - 1
case "next" session("page") = session("page") + 1
case "last" session("page") = totalPages
case else session("page") = 1
end select
if session("page") < 1 then session("page") = 1
if session("page") > totalPages then session("page") = totalPages
rse.absolutepage = session("page")
end if
if totalPages > 1 then
if session("page")=1 then
response.write "共有记录"&TotalRecords&"条 "&session("Page")&"/"&TotalPages&"页 第一页-上一页 -下一页-最后一页"
elseif session("page")=TotalPages Then
response.write "共有记录"&TotalRecords&"条 "&session("Page")&"/"&TotalPages&"页 第一页-上一页-下一页-最后一页"
else
response.write "共有记录"&TotalRecords&"条 "&session("Page")&"/"&TotalPages&"页 第一页-上一页-下一页-最后一页"
end if
else
response.write "共有记录" & totalRecords & "条 " & session("page") & "/" & totalPages & "页"
end if
%>
ID |
用户 |
事件 |
发生时间 |
<%if rse.bof and rse.eof then%>
没有日志 |
<%
else
i = 0
do while not rse.eof and i < maxperpage
i = i + 1
%>
<%=rse("id")%> |
<%=rse("uid")%> |
<%=rse("contents")%> |
<%=rse("happentime")%> |
<%
rse.movenext
loop
end if
rse.close
set rse = nothing
%>
<%
end sub
%> |
|