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