Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 rsolanki 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5299 dpurdie 5
'|                    MultiRole Members              |
2 rsolanki 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
5299 dpurdie 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
 
2 rsolanki 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">
5299 dpurdie 63
    <!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
64
    <!--#include file="_treeNavigator.asp"-->  
65
    <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
66
    </td>
2 rsolanki 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">
5299 dpurdie 69
    <form name="FormName" method="post" action="<%=SCRIPT_NAME%>">
2 rsolanki 70
      <tr>
71
        <td background="images/bg_drk_bage_pane.gif">
5299 dpurdie 72
          <table width="100%"  border="0" cellspacing="0" cellpadding="0">
2 rsolanki 73
            <tr>
74
              <td nowrap class="body_txt">
5299 dpurdie 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>
2 rsolanki 86
              <td align="right" nowrap class="section_ttl"><%=objAppCollector.Item ("application_name")%></td>
87
            </tr>
88
          </table>
5299 dpurdie 89
        </td>
2 rsolanki 90
      </tr>
5299 dpurdie 91
      <tr>
2 rsolanki 92
        <td class="menu_crumbttl"><img src="images/i_user_lrg.gif" border="0" align="absmiddle" hspace="4"><strong>Role Members</strong></td>
93
      </tr>
94
      <tr>
95
        <td>
5299 dpurdie 96
         <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
97
         <%
98
        Dim startPosition, pageNumber, navigator, totalRecords, lastRecord, listCount
99
        Const MAX_ROWS = 50 ' Maximum number of rows displayed
100
        listCount = UBound(Split(Request("role_id_list"),",")) + 1
101
 
102
        '--- Set filters ---
103
 
104
        OraDatabase.Parameters.Add "ROLE_ID_LIST",  Request("role_id_list"),    ORAPARM_INPUT, ORATYPE_NUMBER
105
        OraDatabase.Parameters.Add "ROLE_SUM",      listCount,                  ORAPARM_INPUT, ORATYPE_NUMBER
106
 
107
 
108
        Set rsUser = OraDatabase.DbCreateDynaset( GetQuery ("MultiRoleMembers.sql") , ORADYN_DEFAULT )
109
 
110
 
111
        OraDatabase.Parameters.Remove "ROLE_ID_LIST"
112
        OraDatabase.Parameters.Remove "ROLE_SUM"
113
 
114
 
115
        '--- Get page number ---
116
        pageNumber = 0
117
        If Request("pg") <> "" Then 
118
        pageNumber = CInt(Request("pg"))
119
        End If
120
 
121
 
122
        '--- Set Cursor start position ---
123
        startPosition = pageNumber * MAX_ROWS + 1
124
        If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
125
            rsUser.MoveTo ( startPosition )     ' Set starting cursor point
126
 
127
        End If
128
 
129
 
130
        '--- Construct Navigator
131
        navigator = ""
132
        If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then
133
            totalRecords = rsUser.RecordCount   ' Get total number of records
134
 
135
            '--- Create "Previous" link
136
            If pageNumber > 0 Then
137
                navigator = navigator &"<a href='"& SCRIPT_NAME &"?pg="& pageNumber - 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Previous Page'>&laquo; Previous</a>"
138
            End If
139
 
140
            '--- Create "Next" link
141
            If ( startPosition + MAX_ROWS ) < totalRecords Then
142
                navigator = navigator &"&nbsp;&nbsp;<a href='"& SCRIPT_NAME &"?pg="& pageNumber + 1 &"&"& objPMod.ComposeURL &"' class='body_link' title='Show Next Page'>Next &raquo;</a>"
143
            End If
144
 
145
        End If
146
 
147
 
148
        '--- Calculate Last Record ---
149
        If totalRecords > 0 Then
150
            lastRecord = ( startPosition - 1 + MAX_ROWS ) _
151
                        + ( CInt( ( startPosition - 1 + MAX_ROWS )/totalRecords > 1) ) * ( ( startPosition - 1 + MAX_ROWS ) - totalRecords )
152
        End If
153
        %>
154
        <table width="100%"  border="0" cellspacing="0" cellpadding="0">
2 rsolanki 155
          <tr align="left">
156
            <td colspan="2" class="body_row">&nbsp;</td>
157
          </tr>
158
          <tr>
159
            <td align="left" class="body_row">
5299 dpurdie 160
            <%
161
            If totalRecords > 0 Then 
162
                Response.write "Showing "& startPosition &" - "& lastRecord &" of "& totalRecords
163
            Else
164
                Response.write "No Results."
165
            End If
166
            %></td>
2 rsolanki 167
            <td align="right" class="body_scol"><%=navigator%></td>
168
          </tr>
5299 dpurdie 169
        </table> 
170
         <%
171
         If listCount > 1 Then
172
            Call Messenger ( "There are no users common to all the selected Roles", 3, 400 )
173
         Else
174
         %>
175
         <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
176
         <table width="100%"  border="0" cellspacing="3" cellpadding="0">
177
 
2 rsolanki 178
          <tr>
179
            <td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
5299 dpurdie 180
            <td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
2 rsolanki 181
            <td width="30%" background="images/bg_table_border.gif">
5299 dpurdie 182
            <table width="100%"  border="0" cellspacing="1" cellpadding="2">
2 rsolanki 183
              <tr>
184
                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Full Name </td>
185
              </tr>
186
            </table></td>
187
            <td width="25%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Email</td>
188
            <td width="25%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">User Name</td>
189
            <td width="20%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Domain</td>
5299 dpurdie 190
            <td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Last Request</td>
191
            <td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
2 rsolanki 192
          </tr>
5299 dpurdie 193
          <%If (Request("filter") = "") AND (rsUser.RecordCount > 0) Then%>
194
          <tr>
195
            <td align="center" background="images/bg_table_col.gif"><input type="checkbox" name="everyone" value="Y"></td>
196
            <td background="images/bg_table_col.gif"></td>
2 rsolanki 197
            <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>
198
            <td background="images/bg_table_col.gif"></td>
5299 dpurdie 199
            <td background="images/bg_table_col.gif"></td>
200
            <td background="images/bg_table_col.gif"></td>
201
            <td background="images/bg_table_col.gif"></td>
202
            <td background="images/bg_table_col.gif"></td>
203
            <td background="images/bg_table_col.gif"></td>
2 rsolanki 204
          </tr>
5299 dpurdie 205
          <%End If%>
206
          <%
207
          '--- Render rows ---
208
          Do While (NOT rsUser.BOF) AND (NOT rsUser.EOF)
209
                If rsUser.RowPosition => (startPosition + MAX_ROWS) Then Exit Do    ' Limit the number of rows displayed
210
          %>
2 rsolanki 211
          <tr>
5299 dpurdie 212
            <td align="center"><input type="checkbox" name="user_id_list" value="<%=rsUser("user_id")%>"></td>
2 rsolanki 213
            <td align="center"><%= UserOnlineIcon ( rsUser("user_online"), rsUser("last_request") )%></td>
214
            <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>
215
            <td nowrap><a href="mailto:<%=rsUser("user_email")%>" class="body_link"><%=rsUser("user_email")%></a></td>
216
            <td class="body_rowg"><%=rsUser("user_name")%></td>
217
            <td class="body_rowg"><%=rsUser("domain")%></td>
5299 dpurdie 218
            <td class="body_rowg" nowrap><%=LastRequest ( rsUser("last_request") )%></td>
219
            <td align="center"><a href="User_Roles.asp?user_id=<%=rsUser("user_id")%>&<%=objPMod.ComposeURL%>" title="See User Roles"><%=LIMG_ROLE%></a></td>
2 rsolanki 220
          </tr>
5299 dpurdie 221
          <%rsUser.MoveNext%>
222
 
223
          <%If (NOT rsUser.BOF) AND (NOT rsUser.EOF) Then%>
2 rsolanki 224
          <tr>
225
            <td colspan="8" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
226
          </tr>
5299 dpurdie 227
          <%End If%>
228
 
229
          <%
230
          Loop
231
 
232
          rsUser.Close()
233
          Set rsUser = Nothing
234
          %>
2 rsolanki 235
          <tr>
236
            <td colspan="8" background="images/bg_table_border.gif">
5299 dpurdie 237
             <table width="100%"  border="0" cellspacing="1" cellpadding="2">
2 rsolanki 238
              <tr>
239
                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
240
              </tr>
241
             </table>
5299 dpurdie 242
            </td>
2 rsolanki 243
          </tr>
5299 dpurdie 244
         </table>
245
         <%End If%>
246
         <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
247
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
2 rsolanki 248
          <tr>
249
            <td align="right" class="body_scol"><%=navigator%></td>
250
          </tr>
251
        </table>
5299 dpurdie 252
         <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
2 rsolanki 253
         <br></td>
254
      </tr>
5299 dpurdie 255
      <%=objPMod.ComposeHiddenTags()%>
256
      <input type="hidden" name="action" value="true">
257
    </form>
2 rsolanki 258
    </table></td>
259
  </tr>
260
</table>
261
<!-- FOOTER ++++++++++++++++++++++ -->
262
<!--#include file="_footer.asp"-->
263
<!-- +++++++++++++++++++++++++++++ -->
264
</body>
265
</html>
266
<%
267
'------------ RUN AFTER PAGE RENDER -----------
268
'----------------------------------------------
269
%>
270
<!--#include file="common/globals_destructor.asp"-->