Subversion Repositories DevTools

Rev

Rev 5512 | Details | Compare with Previous | Last modification | View Log | RSS feed

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