Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

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