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