Subversion Repositories DevTools

Rev

Go to most recent revision | Details | 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">
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"><%=PARENT_TITLE%></td>
65
            </tr>
66
          </table>
67
		</td>
68
      </tr>
69
	  <tr>
70
        <td class="menu_crumbttl"><%Call RenderTitle ( objUserCollector )%></td>
71
      </tr>
72
      <tr>
73
        <td>
74
		 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
75
		 	<!-- TAB CONTROLS ++++++++++++++++++++++ -->
76
			<!--#include file="_tabs_definition.asp"-->
77
			<%
78
			Set objTabControl = New TabControl
79
			objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definition
80
			objTabControl.TabStyle = "StyleMac"
81
			objTabControl.AddTabDefnition ( arrUserAccount )
82
			objTabControl.SelectByName ( "Login Trail" )
83
 
84
			objTabControl.Render ()
85
			%>
86
			<!-- END OF TAB CONTROLS +++++++++++++++ -->
87
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
88
          <tr>
89
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
90
            <td width="100%" valign="top">
91
			  <table width="100%"  border="0" cellspacing="10" cellpadding="0">
92
                <tr>
93
                  <td>
94
				  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
95
		<%
96
		Dim startPosition, pageNumber, navigator, totalRecords, lastRecord
97
		Const MAX_ROWS = 100	' Maximum number of rows displayed
98
 
99
		OraDatabase.Parameters.Add "USER_NAME", 	objUserCollector("user_name"),	ORAPARM_INPUT, ORATYPE_VARCHAR2
100
 
101
		Set rsUser = OraDatabase.DbCreateDynaset( GetQuery ("UserLoginTrail.sql") , ORADYN_DEFAULT )
102
 
103
		'--- Get page number ---
104
		pageNumber = 0
105
		If Request("pg") <> "" Then 
106
		pageNumber = CInt(Request("pg"))
107
		End If
108
 
109
 
110
		'--- Set Cursor start position ---
111
		startPosition = pageNumber * MAX_ROWS + 1
112
		If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
113
			rsUser.MoveTo ( startPosition )		' Set starting cursor point
114
 
115
		End If
116
 
117
 
118
		'--- Construct Navigator
119
		navigator = ""
120
		If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
121
			totalRecords = rsUser.RecordCount	' Get total number of records
122
 
123
			'--- Create "Previous" link
124
			If pageNumber > 0 Then
125
				navigator = navigator &"<a href='"& SCRIPT_NAME &"?pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>&laquo; Previous</a>"
126
			End If
127
 
128
			'--- Create "Next" link
129
			If ( startPosition + MAX_ROWS ) < totalRecords Then
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
			End If
132
 
133
		End If
134
 
135
 
136
		'--- Calculate Last Record ---
137
		If totalRecords > 0 Then
138
			lastRecord = ( startPosition - 1 + MAX_ROWS ) _
139
						+ ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )
140
		End If
141
		%>
142
		<table width="100%"  border="0" cellspacing="0" cellpadding="0">
143
          <tr align="left">
144
            <td colspan="2" class="body_row">&nbsp;</td>
145
          </tr>
146
          <tr>
147
            <td align="left" class="body_row">
148
			<%
149
			If totalRecords > 0 Then 
150
				Response.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecords
151
			Else
152
				Response.write "No Results."
153
			End If
154
			%></td>
155
            <td align="right" class="body_scol"><%=navigator%></td>
156
          </tr>
157
        </table>          
158
		 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
159
		 <table width="100%"  border="0" cellspacing="3" cellpadding="0">
160
          <tr>
161
		  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
162
            <td width="15%" background="images/bg_table_border.gif">
163
			<table width="100%"  border="0" cellspacing="1" cellpadding="2">
164
              <tr>
165
                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">User Name</td>
166
              </tr>
167
            </table></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">Application</td>
170
			<td width="15%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Date</td>
171
			<td width="40%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Comments</td>
172
          </tr>
173
		  <%
174
		  '--- Render rows ---
175
		  Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)
176
		  		If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do	' Limit the number of rows displayed
177
		  %>
178
          <tr>
179
		  	<td align="center"><%=Eval(rsUser("event_icon"))%></td>
180
            <td nowrap class="body_row"><%=rsUser("user_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("application_name")%></td>
183
			<td nowrap class="body_row"><%=rsUser("stamp")%></td>
184
            <td class="body_rowlite"><%=rsUser("comments")%></td>
185
          </tr>
186
		  <%rsUser.MoveNext%>
187
 
188
		  <%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%>
189
          <tr>
190
            <td colspan="6" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
191
          </tr>
192
		  <%End If%>
193
 
194
		  <%
195
		  Loop
196
 
197
		  OraDatabase.Parameters.Remove "USER_NAME"
198
 
199
		  rsUser.Close()
200
		  Set rsUser = Nothing
201
		  %>
202
          <tr>
203
            <td colspan="6" background="images/bg_table_border.gif">
204
			 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
205
              <tr>
206
                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
207
              </tr>
208
             </table>
209
			</td>
210
          </tr>
211
         </table>	 
212
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
213
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
214
          <tr>
215
            <td align="right" class="body_scol"><%=navigator%></td>
216
          </tr>
217
        </table>
218
         <br>					
219
				  <!-- +++++++++++++++++++++++++++++++++++++++++ -->
220
				  </td>
221
                </tr>
222
              </table>
223
			</td>
224
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
225
          </tr>
226
         </table>
227
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
228
           <tr>
229
             <td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
230
           </tr>
231
         </table>
232
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
233
         <br></td>
234
      </tr>
235
    </table></td>
236
  </tr>
237
</table>
238
<!-- FOOTER ++++++++++++++++++++++ -->
239
<!--#include file="_footer.asp"-->
240
<!-- +++++++++++++++++++++++++++++ -->
241
</body>
242
</html>
243
<%
244
'------------ RUN AFTER PAGE RENDER -----------
245
'----------------------------------------------
246
%>
2 rsolanki 247
<!--#include file="common/globals_destructor.asp"-->