%
If Not session("admin_loggedin" & strSUnique) = Session.SessionID then Response.Redirect "default.asp"
Dim totalPage, totalRecords, displayRecords
RemoveAfter = 90
setLocale server_locale
sdd = dd(objConn)
strDelStat = "WHERE " & tablPfx & "Events.ldate < " & sdd & ConvDate(Now - RemoveAfter) & sdd
objConn.Execute("DELETE FROM " & tablPfx & "Events " & strDelStat & ";")
If lcase(Request.ServerVariables("REQUEST_METHOD")) = "post" then
etype = Request.Form("D1")
bdate = CLng(Request.Form("D2"))
If etype = 0 then
objConn.Execute("DELETE FROM " & tablPfx & "Events WHERE ldate <= " & sdd & ConvDate(Now - bdate) & sdd & ";")
Else
objConn.Execute("DELETE FROM " & tablPfx & "Events WHERE (ldate <= " & sdd & ConvDate(Now - bdate) & sdd & " AND eID = " & CLng(etype) & ");")
End If
Response.Redirect "admin_events.asp"
End If
iOrder = Request("order")
iSearch = Request("search")
iDisplay = Request("display")
Select Case iOrder
Case "etypea": sort_order = " ORDER BY eID ASC"
Case "etyped": sort_order = " ORDER BY eID DESC"
Case "ipa": sort_order = " ORDER BY IP ASC"
Case "ipd": sort_order = " ORDER BY IP ASC"
Case "datea": sort_order = " ORDER BY ldate ASC"
Case "dated": sort_order = " ORDER BY ldate DESC"
Case Else: sort_order = " ORDER BY ldate DESC"
End Select
If isNumeric(iDisplay) AND Not CStr(iDisplay) = "0" AND Len(CStr(iDisplay)) > 0 then
If Len(iSearch) > 0 then
strEventFilter = " WHERE (eID = " & iDisplay
Else
strEventFilter = " WHERE eID = " & iDisplay
End If
Else: iDisplay = 0
End If
If Len(iSearch) > 0 then
If Len(strEventFilter) = 0 then
strSearch = " WHERE (ldescr LIKE '%" & iSearch & "%' OR luser LIKE '%" & iSearch & "%' OR IP LIKE '%" & iSearch & "%') "
Else
strSearch = " AND (ldescr LIKE '%" & iSearch & "%' OR luser LIKE '%" & iSearch & "%')) "
End If
End If
%>
![]() |
![]() |
||||||||||||||||
|
|||||||||||||||||
![]() |
![]() |
||||||||||||||||
Note: The Events log is self-maintained. Events data is cleared when older than 3 month.
Expiration occurs when you access this page at list once every 3 month. To
modify this value, edit this page and indicate desired number of days before
event is expired in a variable: RemoveAfter = 90
* You may select a filter and/or search string
and/or sort order and then make a query against events stored in database. If
you specify a search string, then the "Description", "User" and "IP Address"
fields will be searched for the specified string. You may search for a
particular user name, Ad ID, IP address... etc. Search type is an "Exact Phrase".
Click RESET to revert all
fields to the default values and display all stored events.