| 2 |
rsolanki |
1 |
<%@LANGUAGE="VBSCRIPT"%>
|
|
|
2 |
<%
|
|
|
3 |
'=====================================================
|
|
|
4 |
'| |
|
|
|
5 |
'| User List |
|
|
|
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 |
Dim objAppCollector
|
|
|
25 |
'------------ CONSTANTS DECLARATION -----------
|
|
|
26 |
'------------ VARIABLE INIT -------------------
|
|
|
27 |
Set objAppCollector = CreateObject("Scripting.Dictionary")
|
|
|
28 |
'------------ CONDITIONS ----------------------
|
|
|
29 |
'----------------------------------------------
|
|
|
30 |
%>
|
|
|
31 |
<%
|
|
|
32 |
'------------ RUN BEFORE PAGE RENDER ----------
|
|
|
33 |
Call GetApplicationDetails ( parApp_id, objAppCollector )
|
|
|
34 |
|
|
|
35 |
If (Request("action") <> "") Then
|
|
|
36 |
'-- Select Action
|
|
|
37 |
|
|
|
38 |
Select Case Request("action")
|
|
|
39 |
Case "btnSubUser"
|
|
|
40 |
Call OpenInWindow ( "_RemoveApplicationUser.asp?user_id_list="& Request("user_id_list") &"&everyone="& Request("everyone") &"&rfile="& SCRIPT_NAME &"&"& objPMod.ComposeURL() )
|
|
|
41 |
|
|
|
42 |
End Select
|
|
|
43 |
|
|
|
44 |
End If
|
|
|
45 |
'----------------------------------------------
|
|
|
46 |
%>
|
|
|
47 |
<html>
|
|
|
48 |
<head>
|
|
|
49 |
<title>Access Manager</title>
|
|
|
50 |
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
|
|
|
51 |
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
|
|
52 |
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
|
|
|
53 |
<script language="JavaScript" src="scripts/common.js"></script>
|
|
|
54 |
</head>
|
|
|
55 |
|
|
|
56 |
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
|
|
|
57 |
<!-- HEADER ++++++++++++++++++++++ -->
|
|
|
58 |
<!--#include file="_header.asp"-->
|
|
|
59 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
60 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
61 |
<tr>
|
|
|
62 |
<td width="1%" valign="top" background="images/bg_bage_pane.gif">
|
|
|
63 |
<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
64 |
<!--#include file="_treeNavigator.asp"-->
|
|
|
65 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
66 |
</td>
|
|
|
67 |
<td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
|
|
|
68 |
<td width="100%" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="9">
|
|
|
69 |
<form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
|
|
|
70 |
<tr>
|
|
|
71 |
<td background="images/bg_drk_bage_pane.gif">
|
|
|
72 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
73 |
<tr>
|
|
|
74 |
<td nowrap class="body_txt">
|
|
|
75 |
<!-- BUTTONS CONTROL +++++++++++++++++++ -->
|
|
|
76 |
<%
|
|
|
77 |
'-- Define Action buttons on this tab
|
|
|
78 |
aTabBtnsDef = Array("btnAddUser", "btnSubUser")
|
|
|
79 |
|
|
|
80 |
Call LoadTabActionButtons ( aTabBtnsDef, objBtnControl )
|
|
|
81 |
|
|
|
82 |
objBtnControl.Render( aTabBtnsDef )
|
|
|
83 |
%>
|
|
|
84 |
<!-- +++++++++++++++++++++++++++++++++++ -->
|
|
|
85 |
</td>
|
|
|
86 |
<td align="right" nowrap class="section_ttl"><%=objAppCollector.Item ("application_name")%></td>
|
|
|
87 |
</tr>
|
|
|
88 |
</table>
|
|
|
89 |
</td>
|
|
|
90 |
</tr>
|
|
|
91 |
<tr>
|
|
|
92 |
<td class="menu_crumbttl"><img src="images/i_folder_lrg.gif" width="18" height="15" border="0" align="absmiddle" hspace="4"><strong>Users</strong></td>
|
|
|
93 |
</tr>
|
|
|
94 |
<tr>
|
|
|
95 |
<td>
|
|
|
96 |
<!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
97 |
<%
|
|
|
98 |
Dim startPosition, pageNumber, navigator, totalRecords, lastRecord
|
|
|
99 |
Const MAX_ROWS = 50 ' Maximum number of rows displayed
|
|
|
100 |
|
|
|
101 |
'--- Set filters ---
|
|
|
102 |
If Request("filter") <> "" Then
|
|
|
103 |
OraDatabase.Parameters.Add "FULL_NAME", "%"& Request("filter") &"%", ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
104 |
OraDatabase.Parameters.Add "USER_NAME", Request("filter") &"%", ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
105 |
OraDatabase.Parameters.Add "DOMAIN_NAME", Request("filter") &"%", ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
106 |
OraDatabase.Parameters.Add "APP_ID", parApp_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
107 |
Else
|
|
|
108 |
OraDatabase.Parameters.Add "FULL_NAME", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
109 |
OraDatabase.Parameters.Add "USER_NAME", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
110 |
OraDatabase.Parameters.Add "DOMAIN_NAME", NULL, ORAPARM_INPUT, ORATYPE_VARCHAR2
|
|
|
111 |
OraDatabase.Parameters.Add "APP_ID", parApp_id, ORAPARM_INPUT, ORATYPE_NUMBER
|
|
|
112 |
End If
|
|
|
113 |
|
|
|
114 |
|
|
|
115 |
Set rsUser = OraDatabase.DbCreateDynaset( GetQuery ("GetAppUserList.sql") , ORADYN_DEFAULT )
|
|
|
116 |
|
|
|
117 |
'--- Get page number ---
|
|
|
118 |
pageNumber = 0
|
|
|
119 |
If Request("pg") <> "" Then
|
|
|
120 |
pageNumber = CInt(Request("pg"))
|
|
|
121 |
End If
|
|
|
122 |
|
|
|
123 |
|
|
|
124 |
'--- Set Cursor start position ---
|
|
|
125 |
startPosition = pageNumber * MAX_ROWS + 1
|
|
|
126 |
If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
|
|
|
127 |
rsUser.MoveTo ( startPosition ) ' Set starting cursor point
|
|
|
128 |
|
|
|
129 |
End If
|
|
|
130 |
|
|
|
131 |
|
|
|
132 |
'--- Construct Navigator
|
|
|
133 |
navigator = ""
|
|
|
134 |
If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
|
|
|
135 |
totalRecords = rsUser.RecordCount ' Get total number of records
|
|
|
136 |
|
|
|
137 |
'--- Create "Previous" link
|
|
|
138 |
If pageNumber > 0 Then
|
|
|
139 |
navigator = navigator &"<a href='"& SCRIPT_NAME &"?pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>« Previous</a>"
|
|
|
140 |
End If
|
|
|
141 |
|
|
|
142 |
'--- Create "Next" link
|
|
|
143 |
If ( startPosition + MAX_ROWS ) < totalRecords Then
|
|
|
144 |
navigator = navigator &" <a href='"& SCRIPT_NAME &"?pg="& pageNumber + 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Next Page'>Next »</a>"
|
|
|
145 |
End If
|
|
|
146 |
|
|
|
147 |
End If
|
|
|
148 |
|
|
|
149 |
|
|
|
150 |
'--- Calculate Last Record ---
|
|
|
151 |
If totalRecords > 0 Then
|
|
|
152 |
lastRecord = ( startPosition - 1 + MAX_ROWS ) _
|
|
|
153 |
+ ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )
|
|
|
154 |
End If
|
|
|
155 |
%>
|
|
|
156 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
157 |
<tr align="left">
|
|
|
158 |
<td colspan="2" class="body_row"> </td>
|
|
|
159 |
</tr>
|
|
|
160 |
<tr>
|
|
|
161 |
<td align="left" class="body_row">
|
|
|
162 |
<%
|
|
|
163 |
If totalRecords > 0 Then
|
|
|
164 |
Response.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecords
|
|
|
165 |
Else
|
|
|
166 |
Response.write "No Results."
|
|
|
167 |
End If
|
|
|
168 |
%></td>
|
|
|
169 |
<td align="right" class="body_scol"><%=navigator%></td>
|
|
|
170 |
</tr>
|
|
|
171 |
</table>
|
|
|
172 |
<!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
173 |
<table width="100%" border="0" cellspacing="3" cellpadding="0">
|
|
|
174 |
|
|
|
175 |
<tr>
|
|
|
176 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
|
|
177 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
|
|
178 |
<td width="30%" background="images/bg_table_border.gif">
|
|
|
179 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
180 |
<tr>
|
|
|
181 |
<td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Full Name </td>
|
|
|
182 |
</tr>
|
|
|
183 |
</table></td>
|
|
|
184 |
<td width="25%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Email</td>
|
|
|
185 |
<td width="25%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">User Name</td>
|
|
|
186 |
<td width="20%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Domain</td>
|
|
|
187 |
<td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Last Request</td>
|
|
|
188 |
<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
|
|
|
189 |
</tr>
|
|
|
190 |
<%If (Request("filter") = "") AND (rsUser.RecordCount > 0) Then%>
|
|
|
191 |
<tr>
|
|
|
192 |
<td align="center" background="images/bg_table_col.gif"><input type="checkbox" name="everyone" value="Y"></td>
|
|
|
193 |
<td background="images/bg_table_col.gif"></td>
|
|
|
194 |
<td nowrap class="body_row" background="images/bg_table_col.gif"><img src="images/i_accounts.gif" width="16" height="14" border="0" hspace="4" align="absmiddle">Everyone</td>
|
|
|
195 |
<td background="images/bg_table_col.gif"></td>
|
|
|
196 |
<td background="images/bg_table_col.gif"></td>
|
|
|
197 |
<td background="images/bg_table_col.gif"></td>
|
|
|
198 |
<td background="images/bg_table_col.gif"></td>
|
|
|
199 |
<td background="images/bg_table_col.gif"></td>
|
|
|
200 |
<td background="images/bg_table_col.gif"></td>
|
|
|
201 |
</tr>
|
|
|
202 |
<%End If%>
|
|
|
203 |
<%
|
|
|
204 |
'--- Render rows ---
|
|
|
205 |
Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)
|
|
|
206 |
If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do ' Limit the number of rows displayed
|
|
|
207 |
%>
|
|
|
208 |
<tr>
|
|
|
209 |
<td align="center"><input type="checkbox" name="user_id_list" value="<%=rsUser("user_id")%>"></td>
|
|
|
210 |
<td align="center"><%= UserOnlineIcon ( rsUser("user_online"), rsUser("last_request") )%></td>
|
|
|
211 |
<td nowrap class="body_row"><a href="User_General.asp?user_id=<%=rsUser("user_id")%>&<%=objPMod.ComposeURL%>" class="body_link"><%=Eval( rsUser("user_image") ) & rsUser("full_name")%></a></td>
|
|
|
212 |
<td nowrap><a href="mailto:<%=rsUser("user_email")%>" class="body_link"><%=rsUser("user_email")%></a></td>
|
|
|
213 |
<td class="body_rowg"><%=rsUser("user_name")%></td>
|
|
|
214 |
<td class="body_rowg"><%=rsUser("domain")%></td>
|
|
|
215 |
<td class="body_rowg" nowrap><%=LastRequest ( rsUser("last_request") )%></td>
|
|
|
216 |
<td align="center"><a href="User_Roles.asp?user_id=<%=rsUser("user_id")%>&<%=objPMod.ComposeURL%>" title="See User Roles"><%=LIMG_ROLE%></a></td>
|
|
|
217 |
</tr>
|
|
|
218 |
<%rsUser.MoveNext%>
|
|
|
219 |
|
|
|
220 |
<%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%>
|
|
|
221 |
<tr>
|
|
|
222 |
<td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
223 |
</tr>
|
|
|
224 |
<%End If%>
|
|
|
225 |
|
|
|
226 |
<%
|
|
|
227 |
Loop
|
|
|
228 |
|
|
|
229 |
|
|
|
230 |
OraDatabase.Parameters.Remove "FULL_NAME"
|
|
|
231 |
OraDatabase.Parameters.Remove "USER_NAME"
|
|
|
232 |
OraDatabase.Parameters.Remove "DOMAIN_NAME"
|
|
|
233 |
OraDatabase.Parameters.Remove "APP_ID"
|
|
|
234 |
|
|
|
235 |
rsUser.Close()
|
|
|
236 |
Set rsUser = Nothing
|
|
|
237 |
%>
|
|
|
238 |
<tr>
|
|
|
239 |
<td colspan="8" background="images/bg_table_border.gif">
|
|
|
240 |
<table width="100%" border="0" cellspacing="1" cellpadding="2">
|
|
|
241 |
<tr>
|
|
|
242 |
<td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
|
|
|
243 |
</tr>
|
|
|
244 |
</table>
|
|
|
245 |
</td>
|
|
|
246 |
</tr>
|
|
|
247 |
</table>
|
|
|
248 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
249 |
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
|
|
250 |
<tr>
|
|
|
251 |
<td align="right" class="body_scol"><%=navigator%></td>
|
|
|
252 |
</tr>
|
|
|
253 |
</table>
|
|
|
254 |
<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
|
|
|
255 |
<br></td>
|
|
|
256 |
</tr>
|
|
|
257 |
<%=objPMod.ComposeHiddenTags()%>
|
|
|
258 |
<input type="hidden" name="action" value="true">
|
|
|
259 |
</form>
|
|
|
260 |
</table></td>
|
|
|
261 |
</tr>
|
|
|
262 |
</table>
|
|
|
263 |
<!-- FOOTER ++++++++++++++++++++++ -->
|
|
|
264 |
<!--#include file="_footer.asp"-->
|
|
|
265 |
<!-- +++++++++++++++++++++++++++++ -->
|
|
|
266 |
</body>
|
|
|
267 |
</html>
|
|
|
268 |
<%
|
|
|
269 |
'------------ RUN AFTER PAGE RENDER -----------
|
|
|
270 |
'----------------------------------------------
|
|
|
271 |
%>
|
|
|
272 |
<!--#include file="common/globals_destructor.asp"-->
|