Subversion Repositories DevTools

Rev

Rev 5299 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

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