Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
5354 dpurdie 1
<%@LANGUAGE="VBSCRIPT"%>
2
<%
3
'=====================================================
4
'|                                                   |
5
'|			          Role Privileges				 |
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/_role_common.asp"-->
17
<%
18
'------------ ACCESS CONTROL ------------------
19
%>
20
<!--#include file="_access_control_general.asp"-->
21
<%
22
'------------ VARIABLE DEFINITION -------------
23
Dim sNode
24
Dim rsQry
25
Dim ActiveCombo
26
Dim VisibleCombo
27
Dim CanEdit
28
'------------ CONSTANTS DECLARATION -----------
29
'------------ VARIABLE INIT -------------------
30
CanEdit = canActionControl("canAssignActionToRole")
31
'------------ CONDITIONS ----------------------
32
'----------------------------------------------
33
%>
34
<%
35
'------------------------------------------------------------------------------------------------------------------------------------------------------
36
Sub SetPermissionCombos ( nObj_id, cVisible, cActive, ByRef outVisibleCombo, ByRef outActiveCombo )
37
	Dim i, selected ,disableControl
38
 
39
    ' -- Disable editing
40
    If CanEdit Then
41
        disableControl = ""
42
    Else
43
         disableControl = " disabled"	
44
    End IF
45
 
46
 
47
	' --- Visible Combo ---
48
	outVisibleCombo = ""
49
	outVisibleCombo = outVisibleCombo &"<select name='VIS_"& nObj_id &"' class='form_iname'" & disableControl &">"
50
 
51
	For i = 0 To UBound( arrVisiblePermissions ) Step NumberofPermissionFields
52
		selected = ""
53
		If arrVisiblePermissions( INXperm_val + i ) = cVisible Then
54
			selected = "selected"
55
		End If
56
 
57
		outVisibleCombo = outVisibleCombo &"<option class='"& arrVisiblePermissions( INXperm_style + i ) &"' "& selected &" value='"& arrVisiblePermissions( INXperm_val + i ) &"'>"& arrVisiblePermissions( INXperm_text + i ) &"</option>"& VBNewLine
58
	Next
59
 
60
	outVisibleCombo = outVisibleCombo &"</select>"
61
 
62
 
63
 
64
	' --- Active Combo ---
65
	outActiveCombo = ""
66
	outActiveCombo = outActiveCombo &"<select name='ACT_"& nObj_id &"' class='form_iname'" & disableControl &">"
67
 
68
	For i = 0 To UBound( arrActivePermissions ) Step NumberofPermissionFields
69
		selected = ""
70
		If arrActivePermissions( INXperm_val + i ) = cActive Then
71
			selected = "selected"
72
		End If
73
 
74
		outActiveCombo = outActiveCombo &"<option class='"& arrActivePermissions( INXperm_style + i ) &"' "& selected &" value='"& arrActivePermissions( INXperm_val + i ) &"'>"& arrActivePermissions( INXperm_text + i ) &"</option>"& VBNewLine
75
	Next
76
 
77
	outActiveCombo = outActiveCombo &"</select>"
78
 
79
End Sub
80
'------------------------------------------------------------------------------------------------------------------------------------------------------
81
%>
82
<%
83
'------------ RUN BEFORE PAGE RENDER ----------
84
Call GetRoleDetails ( parRole_id, parApp_id, objRoleCollector )
85
'----------------------------------------------
86
%>
87
<html>
88
<head>
89
<title>Access Manager</title>
90
<link rel="shortcut icon" href="<%=FavIcon%>"/>
91
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
92
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
93
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">
94
 
95
</head>
96
 
97
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
98
<!-- HEADER ++++++++++++++++++++++ -->
99
<!--#include file="_header.asp"-->
100
<!-- +++++++++++++++++++++++++++++ -->
101
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
102
  <tr>
103
    <td width="1%" valign="top" background="images/bg_bage_pane.gif">
104
	<!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
105
	<!--#include file="_treeNavigator.asp"-->  
106
	<!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
107
	</td>
108
    <td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
109
    <td width="100%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="9">
110
      <tr>
111
        <td background="images/bg_drk_bage_pane.gif">
112
		  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
113
            <tr>
114
              <td nowrap class="body_txt">
115
			    <!-- BUTTONS CONTROL +++++++++++++++++++ -->
116
				<!-- +++++++++++++++++++++++++++++++++++ -->
117
			  </td>
118
              <td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
119
            </tr>
120
          </table>
121
		</td>
122
      </tr>
123
	  <tr>
124
        <td class="menu_crumbttl"><%Call RenderTitle ( objRoleCollector )%></td>
125
      </tr>
126
      <tr>
127
        <td>
128
		 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
129
		 	<!-- TAB CONTROLS ++++++++++++++++++++++ -->
130
			<!--#include file="_tabs_definition.asp"-->
131
			<%
132
			Set objTabControl = New TabControl
133
			objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definition
134
			objTabControl.TabStyle = "StyleMac"
135
			objTabControl.AddTabDefnition ( arrRole )
136
			objTabControl.DisableByName ( "Data Filtering" )
137
			objTabControl.SelectByName ( "Role Permissions" )
138
			objTabControl.Render ()
139
			%>
140
			<!-- END OF TAB CONTROLS +++++++++++++++ -->
141
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
142
          <tr>
143
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
144
            <td width="100%" valign="top">
145
			  <table width="100%"  border="0" cellspacing="10" cellpadding="0">
146
                <tr>
147
                  <td>
148
				  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
149
					<table width="100%"  border="0" cellspacing="3" cellpadding="0">
150
					<form name="RolePrivileges" action="_SetRolePermissions.asp" method="post">
151
			          <tr>
152
					  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
153
			            <td width="30%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
154
			              <tr>
155
			                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Action Name</td>
156
			              </tr>
157
			            </table></td>
158
						<td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Permissions</td>
159
						<td width="70%" align="right" background="images/bg_table_col.gif" class="body_col">Description</td>
160
						<td width="1%" background="images/bg_table_col.gif"></td>
161
			          </tr>
162
					  <%
163
					  OraDatabase.Parameters.Add "ROLE_ID", parRole_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
164
					  OraDatabase.Parameters.Add "APP_ID",  parApp_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
165
 
166
					  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RolePrivileges.sql") , ORADYN_DEFAULT )
167
					  While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
168
					  	Call SetPermissionCombos ( rsQry("obj_id"), rsQry("visible_value"), rsQry("active_value"), VisibleCombo, ActiveCombo )
169
					  %>
170
			          <tr>
171
					  	<td align="center"><input type="checkbox" name="obj_id" value="<%=rsQry("obj_id")%>" disabled></td>
172
						<td nowrap class="body_row"><a href="Control_General.asp?obj_id=<%=rsQry("obj_id")%>&<%=objPMod.ComposeURL%>" class="body_link"><%=LIMG_CONTROL  &  rsQry("obj_name")%></a></td>
173
						<td class="body_txt" nowrap background='images/bg_bage_pane.gif'>&nbsp;&nbsp;<%=VisibleCombo%>&nbsp;&nbsp;<%=ActiveCombo%>&nbsp;&nbsp;</td>
174
						<td class="body_rowg"><%=rsQry("obj_description")%></td>
175
						<td><a href="Role_DataFiltering.asp?obj_id=<%=rsQry("obj_id")%>&<%=objPMod.ComposeURL%>" class="body_link"><%=EVal( rsQry("data_filter") )%></a></td>
176
			          </tr>
177
					  <%rsQry.MoveNext%>
178
 
179
			          <tr>
180
			            <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
181
			          </tr>
182
					  <%
183
					  WEnd
184
 
185
					  OraDatabase.Parameters.Remove "ROLE_ID"
186
					  OraDatabase.Parameters.Remove "APP_ID"
187
					  %>
188
                      <%If CanEdit Then%>
189
					  <tr>
190
					  	<td class="body_txt"></td>
191
						<td class="body_txt"></td>
192
						<td align="center" background='images/bg_bage_pane.gif'><input type="submit" name="btn" value="Apply" class="form_btn"></td>
193
						<td class="body_txt"></td>
194
			          </tr>
195
                      <%End If%>
196
			          <tr>
197
			            <td colspan="5" background="images/bg_table_border.gif">
198
						 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
199
			              <tr>
200
			                <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
201
			              </tr>
202
			             </table>
203
						</td>
204
			          </tr>
205
					 <%=objPMod.ComposeHiddenTags()%>
206
					 <input type="hidden" name="rfile" value="<%=SCRIPT_NAME%>">
207
					 </form>
208
			         </table>
209
				  <!-- +++++++++++++++++++++++++++++++++++++++++ -->
210
				  </td>
211
                </tr>
212
              </table>
213
			</td>
214
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
215
          </tr>
216
         </table>
217
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
218
           <tr>
219
             <td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
220
           </tr>
221
         </table>
222
		 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
223
         <br></td>
224
      </tr>
225
    </table></td>
226
  </tr>
227
</table>
228
<!-- FOOTER ++++++++++++++++++++++ -->
229
<!--#include file="_footer.asp"-->
230
<!-- +++++++++++++++++++++++++++++ -->
231
</body>
232
</html>
233
<%
234
'------------ RUN AFTER PAGE RENDER -----------
235
'----------------------------------------------
236
%>
2 rsolanki 237
<!--#include file="common/globals_destructor.asp"-->