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