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