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