Subversion Repositories DevTools

Rev

Rev 5512 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
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">
6658 dpurdie 40
<script language="JavaScript1.2" src="images/popup_menu.js"></script>
5354 dpurdie 41
</head>
42
 
43
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
44
<!-- HEADER ++++++++++++++++++++++ -->
45
<!--#include file="_header.asp"-->
46
<!-- +++++++++++++++++++++++++++++ -->
47
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
48
  <tr>
49
    <td width="1%" valign="top" background="images/bg_bage_pane.gif">
50
	<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
51
	<!--#include file="_treeNavigator.asp"-->  
52
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
53
	</td>
54
    <td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
55
    <td width="100%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="9">
56
      <tr>
57
        <td background="images/bg_drk_bage_pane.gif">
58
		  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
59
            <tr>
60
              <td nowrap class="body_txt">
61
			    <!-- BUTTONS CONTROL +++++++++++++++++++ -->
62
				<!-- +++++++++++++++++++++++++++++++++++ -->
63
			  </td>
64
              <td align="right" nowrap class="section_ttl">Login Trail</td>
65
            </tr>
66
          </table>
67
		</td>
68
      </tr>
69
      <tr>
70
        <td>
71
		<%
72
		Dim startPosition, pageNumber, navigator, totalRecords, lastRecord
73
		Const MAX_ROWS = 100	' Maximum number of rows displayed
74
 
75
 
76
		Set rsUser = OraDatabase.DbCreateDynaset( GetQuery ("LoginTrail.sql") , ORADYN_DEFAULT )
77
 
78
		'--- Get page number ---
79
		pageNumber = 0
80
		If Request("pg") <> "" Then 
81
		pageNumber = CInt(Request("pg"))
82
		End If
83
 
84
 
85
		'--- Set Cursor start position ---
86
		startPosition = pageNumber * MAX_ROWS + 1
87
		If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
88
			rsUser.MoveTo ( startPosition )		' Set starting cursor point
89
 
90
		End If
91
 
92
 
93
		'--- Construct Navigator
94
		navigator = ""
95
		If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
96
			totalRecords = rsUser.RecordCount	' Get total number of records
97
 
98
			'--- Create "Previous" link
99
			If pageNumber > 0 Then
100
				navigator = navigator &"<a href='"& SCRIPT_NAME &"?pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>&laquo; Previous</a>"
101
			End If
102
 
103
			'--- Create "Next" link
104
			If ( startPosition + MAX_ROWS ) < totalRecords Then
105
				navigator = navigator &"&nbsp;&nbsp;<a href='"& SCRIPT_NAME &"?pg="& pageNumber + 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Next Page'>Next &raquo;</a>"
106
			End If
107
 
108
		End If
109
 
110
 
111
		'--- Calculate Last Record ---
112
		If totalRecords > 0 Then
113
			lastRecord = ( startPosition - 1 + MAX_ROWS ) _
114
						+ ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )
115
		End If
116
		%>
117
		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
118
          <tr align="left">
119
            <td colspan="2" class="body_row">&nbsp;</td>
120
          </tr>
121
          <tr>
122
            <td align="left" class="body_row">
123
			<%
124
			If totalRecords > 0 Then 
125
				Response.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecords
126
			Else
127
				Response.write "No Results."
128
			End If
129
			%></td>
130
            <td align="right" class="body_scol"><%=navigator%></td>
131
          </tr>
132
        </table>          
133
		 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
134
		 <table width="100%"  border="0" cellspacing="3" cellpadding="0">
135
          <tr>
136
		  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
137
            <td width="10%" background="images/bg_table_border.gif">
138
			<table width="100%"  border="0" cellspacing="1" cellpadding="2">
139
              <tr>
140
                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">User Name</td>
141
              </tr>
142
            </table></td>
143
			<td width="10%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Full Name</td>
144
            <td width="15%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Remote Address (IP)</td>
145
			<td width="15%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Application</td>
146
			<td width="10%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Date</td>
147
			<td width="40%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Comments</td>
148
          </tr>
149
		  <%
150
		  '--- Render rows ---
151
		  Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)
152
		  		If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do	' Limit the number of rows displayed
153
		  %>
154
          <tr>
155
		  	<td align="center"><%=Eval(rsUser("event_icon"))%></td>
156
            <td nowrap class="body_row"><%=rsUser("user_name")%></td>
157
			<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>
158
			<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>
159
			<td nowrap class="body_row"><%=rsUser("application_name")%></td>
160
			<td nowrap class="body_row"><%=rsUser("stamp")%></td>
161
            <td class="body_rowlite"><%=rsUser("comments")%></td>
162
          </tr>
163
		  <%rsUser.MoveNext%>
164
 
165
		  <%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%>
166
          <tr>
167
            <td colspan="7" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
168
          </tr>
169
		  <%End If%>
170
 
171
		  <%
172
		  Loop
173
 
174
 
175
		  rsUser.Close()
176
		  Set rsUser = Nothing
177
		  %>
178
          <tr>
179
            <td colspan="7" background="images/bg_table_border.gif">
180
			 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
181
              <tr>
182
                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
183
              </tr>
184
             </table>
185
			</td>
186
          </tr>
187
         </table>	 
188
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
189
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
190
          <tr>
191
            <td align="right" class="body_scol"><%=navigator%></td>
192
          </tr>
193
        </table>
194
         <br></td>
195
      </tr>
196
    </table></td>
197
  </tr>
198
</table>
199
<!-- FOOTER ++++++++++++++++++++++ -->
200
<!--#include file="_footer.asp"-->
201
<!-- +++++++++++++++++++++++++++++ -->
202
</body>
203
</html>
204
<%
205
'------------ RUN AFTER PAGE RENDER -----------
206
'----------------------------------------------
207
%>
2 rsolanki 208
<!--#include file="common/globals_destructor.asp"-->