| 5354 |
dpurdie |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| Login Trail |
|
|
|
6 |
'| |
|
|
|
7 |
'=====================================================
|
|
|
8 |
%>
|
|
|
9 |
<%
|
|
|
10 |
Option explicit
|
|
|
11 |
Response.Expires = 0
|
|
|
12 |
%>
|
|
|
13 |
<!--#include file="common/globals.asp"-->
|
|
|
14 |
<!--#include file="common/config.asp"-->
|
|
|
15 |
<!--#include file="common/common_subs.asp"-->
|
|
|
16 |
<%
|
|
|
17 |
'------------ ACCESS CONTROL ------------------
|
|
|
18 |
%>
|
|
|
19 |
<!--#include file="_access_control_general.asp"-->
|
|
|
20 |
<%
|
|
|
21 |
'------------ VARIABLE DEFINITION -------------
|
|
|
22 |
Dim rsUser
|
|
|
23 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
24 |
'------------ VARIABLE INIT -------------------
|
|
|
25 |
'------------ CONDITIONS ----------------------
|
|
|
26 |
'----------------------------------------------
|
|
|
27 |
%>
|
|
|
28 |
<%
|
|
|
29 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
30 |
objPMod.PersistInQryString ("tree")
|
|
|
31 |
'----------------------------------------------
|
|
|
32 |
%>
|
|
|
33 |
<html>
|
|
|
34 |
<head>
|
|
|
35 |
<title>Access Manager</title>
|
|
|
36 |
<link rel="shortcut icon" href="<%=FavIcon%>"/>
|
|
|
37 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
38 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
39 |
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
|
|
|
40 |
</head>
|
|
|
41 |
|
|
|
42 |
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
|
|
|
43 |
<!-- HEADER ++++++++++++++++++++++ -->
|
|
|
44 |
<!--#include file="_header.asp"-->
|
|
|
45 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
46 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
47 |
<tr>
|
|
|
48 |
<td width="1%" valign="top" background="images/bg_bage_pane.gif">
|
|
|
49 |
<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
50 |
<!--#include file="_treeNavigator.asp"-->
|
|
|
51 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
52 |
</td>
|
|
|
53 |
<td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
|
|
|
54 |
<td width="100%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="9">
|
|
|
55 |
<tr>
|
|
|
56 |
<td background="images/bg_drk_bage_pane.gif">
|
|
|
57 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
58 |
<tr>
|
|
|
59 |
<td nowrap class="body_txt">
|
|
|
60 |
<!-- BUTTONS CONTROL +++++++++++++++++++ -->
|
|
|
61 |
<!-- +++++++++++++++++++++++++++++++++++ -->
|
|
|
62 |
</td>
|
|
|
63 |
<td align="right" nowrap class="section_ttl">Login Trail</td>
|
|
|
64 |
</tr>
|
|
|
65 |
</table>
|
|
|
66 |
</td>
|
|
|
67 |
</tr>
|
|
|
68 |
<tr>
|
|
|
69 |
<td>
|
|
|
70 |
<%
|
|
|
71 |
Dim startPosition, pageNumber, navigator, totalRecords, lastRecord
|
|
|
72 |
Const MAX_ROWS = 100 ' Maximum number of rows displayed
|
|
|
73 |
|
|
|
74 |
|
|
|
75 |
Set rsUser = OraDatabase.DbCreateDynaset( GetQuery ("LoginTrail.sql") , ORADYN_DEFAULT )
|
|
|
76 |
|
|
|
77 |
'--- Get page number ---
|
|
|
78 |
pageNumber = 0
|
|
|
79 |
If Request("pg") <> "" Then
|
|
|
80 |
pageNumber = CInt(Request("pg"))
|
|
|
81 |
End If
|
|
|
82 |
|
|
|
83 |
|
|
|
84 |
'--- Set Cursor start position ---
|
|
|
85 |
startPosition = pageNumber * MAX_ROWS + 1
|
|
|
86 |
If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
|
|
|
87 |
rsUser.MoveTo ( startPosition ) ' Set starting cursor point
|
|
|
88 |
|
|
|
89 |
End If
|
|
|
90 |
|
|
|
91 |
|
|
|
92 |
'--- Construct Navigator
|
|
|
93 |
navigator = ""
|
|
|
94 |
If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
|
|
|
95 |
totalRecords = rsUser.RecordCount ' Get total number of records
|
|
|
96 |
|
|
|
97 |
'--- Create "Previous" link
|
|
|
98 |
If pageNumber > 0 Then
|
|
|
99 |
navigator = navigator &"<a href='"& SCRIPT_NAME &"?pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>« Previous</a>"
|
|
|
100 |
End If
|
|
|
101 |
|
|
|
102 |
'--- Create "Next" link
|
|
|
103 |
If ( startPosition + MAX_ROWS ) < totalRecords Then
|
|
|
104 |
navigator = navigator &" <a href='"& SCRIPT_NAME &"?pg="& pageNumber + 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Next Page'>Next »</a>"
|
|
|
105 |
End If
|
|
|
106 |
|
|
|
107 |
End If
|
|
|
108 |
|
|
|
109 |
|
|
|
110 |
'--- Calculate Last Record ---
|
|
|
111 |
If totalRecords > 0 Then
|
|
|
112 |
lastRecord = ( startPosition - 1 + MAX_ROWS ) _
|
|
|
113 |
+ ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )
|
|
|
114 |
End If
|
|
|
115 |
%>
|
|
|
116 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
117 |
<tr align="left">
|
|
|
118 |
<td colspan="2" class="body_row"> </td>
|
|
|
119 |
</tr>
|
|
|
120 |
<tr>
|
|
|
121 |
<td align="left" class="body_row">
|
|
|
122 |
<%
|
|
|
123 |
If totalRecords > 0 Then
|
|
|
124 |
Response.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecords
|
|
|
125 |
Else
|
|
|
126 |
Response.write "No Results."
|
|
|
127 |
End If
|
|
|
128 |
%></td>
|
|
|
129 |
<td align="right" class="body_scol"><%=navigator%></td>
|
|
|
130 |
</tr>
|
|
|
131 |
</table>
|
|
|
132 |
<!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
133 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
|
|
134 |
<tr>
|
|
|
135 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
|
|
136 |
<td width="10%" background="images/bg_table_border.gif">
|
|
|
137 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
138 |
<tr>
|
|
|
139 |
<td align="right" nowrap background="images/bg_table_col.gif" class="body_col">User Name</td>
|
|
|
140 |
</tr>
|
|
|
141 |
</table></td>
|
|
|
142 |
<td width="10%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Full Name</td>
|
|
|
143 |
<td width="15%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Remote Address (IP)</td>
|
|
|
144 |
<td width="15%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Application</td>
|
|
|
145 |
<td width="10%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Date</td>
|
|
|
146 |
<td width="40%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Comments</td>
|
|
|
147 |
</tr>
|
|
|
148 |
<%
|
|
|
149 |
'--- Render rows ---
|
|
|
150 |
Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)
|
|
|
151 |
If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do ' Limit the number of rows displayed
|
|
|
152 |
%>
|
|
|
153 |
<tr>
|
|
|
154 |
<td align="center"><%=Eval(rsUser("event_icon"))%></td>
|
|
|
155 |
<td nowrap class="body_row"><%=rsUser("user_name")%></td>
|
|
|
156 |
<td nowrap class="body_row"><a href="User_General.asp?user_id=<%=rsUser("user_id")%>&<%=objPMod.ComposeURL%>" class="body_link"><%=rsUser("full_name")%></a></td>
|
|
|
157 |
<td nowrap class="body_row"><a href="Computer_Users.asp?client_ip=<%=rsUser("client_ip")%>&<%=objPMod.ComposeURL%>" class="body_link"><%=rsUser("client_ip")%></a></td>
|
|
|
158 |
<td nowrap class="body_row"><%=rsUser("application_name")%></td>
|
|
|
159 |
<td nowrap class="body_row"><%=rsUser("stamp")%></td>
|
|
|
160 |
<td class="body_rowlite"><%=rsUser("comments")%></td>
|
|
|
161 |
</tr>
|
|
|
162 |
<%rsUser.MoveNext%>
|
|
|
163 |
|
|
|
164 |
<%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%>
|
|
|
165 |
<tr>
|
|
|
166 |
<td colspan="7" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
167 |
</tr>
|
|
|
168 |
<%End If%>
|
|
|
169 |
|
|
|
170 |
<%
|
|
|
171 |
Loop
|
|
|
172 |
|
|
|
173 |
|
|
|
174 |
rsUser.Close()
|
|
|
175 |
Set rsUser = Nothing
|
|
|
176 |
%>
|
|
|
177 |
<tr>
|
|
|
178 |
<td colspan="7" background="images/bg_table_border.gif">
|
|
|
179 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
180 |
<tr>
|
|
|
181 |
<td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
182 |
</tr>
|
|
|
183 |
</table>
|
|
|
184 |
</td>
|
|
|
185 |
</tr>
|
|
|
186 |
</table>
|
|
|
187 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
188 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
189 |
<tr>
|
|
|
190 |
<td align="right" class="body_scol"><%=navigator%></td>
|
|
|
191 |
</tr>
|
|
|
192 |
</table>
|
|
|
193 |
<br></td>
|
|
|
194 |
</tr>
|
|
|
195 |
</table></td>
|
|
|
196 |
</tr>
|
|
|
197 |
</table>
|
|
|
198 |
<!-- FOOTER ++++++++++++++++++++++ -->
|
|
|
199 |
<!--#include file="_footer.asp"-->
|
|
|
200 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
201 |
</body>
|
|
|
202 |
</html>
|
|
|
203 |
<%
|
|
|
204 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
205 |
'----------------------------------------------
|
|
|
206 |
%>
|
| 2 |
rsolanki |
207 |
<!--#include file="common/globals_destructor.asp"-->
|