Subversion Repositories DevTools

Rev

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

Rev Author Line No. Line
2 rsolanki 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
'------------ CONSTANTS DECLARATION -----------
27
Const LIMG_ROLE = "<img src='images/i_role.gif' width='16' height='16' hspace='2' border='0' align='absmiddle'>"
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 GetControlDetails ( parObj_id, parApp_id, objObjCollector )
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 ( objObjCollector )%></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 ( arrControl )
126
			objTabControl.SelectByName ( "Action Permissions" )
127
			objTabControl.Render ()
128
			%>
129
			<!-- END OF TAB CONTROLS +++++++++++++++ -->
130
		 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
131
          <tr>
132
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
133
            <td width="100%" valign="top">
134
			  <table width="100%"  border="0" cellspacing="10" cellpadding="0">
135
                <tr>
136
                  <td>
137
				  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
138
					<table width="100%"  border="0" cellspacing="3" cellpadding="0">
139
					<form name="ControlPrivileges" action="_SetControlPermissions.asp" method="post">
140
			          <tr>
141
					  	<td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
142
			            <td width="20%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
143
			              <tr>
144
			                <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Role Name</td>
145
			              </tr>
146
			            </table></td>
147
						<td width="20%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Control Name</td>
148
						<td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Permissions</td>
149
						<td width="60%" align="right" background="images/bg_table_col.gif" class="body_col"></td>
150
			          </tr>
151
					  <%
152
					  Call SetPermissionCombos ( "ALL", NULL, NULL, VisibleCombo, ActiveCombo )
153
					  %>
154
					  <tr>
155
					  	<td align="center" background="images/bg_table_col.gif"><input type="checkbox" name="role_id_list" value="Y" disabled></td>
156
						<td nowrap class="body_row" background="images/bg_table_col.gif">&nbsp;ALL</td>
157
						<td nowrap class="body_row" background="images/bg_table_col.gif"><%=LIMG_CONTROL  &  objObjCollector("obj_name")%></td>
158
						<td class="body_txt" nowrap background='images/bg_bage_pane.gif'>&nbsp;&nbsp;<%=VisibleCombo%>&nbsp;&nbsp;<%=ActiveCombo%>&nbsp;&nbsp;</td>
159
						<td class="body_rowg" background="images/bg_table_col.gif"></td>
160
			          </tr>
161
 
162
					  <%
163
					  OraDatabase.Parameters.Add "OBJ_ID",  parObj_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
164
					  OraDatabase.Parameters.Add "APP_ID",  parApp_id,	ORAPARM_INPUT, ORATYPE_NUMBER 
165
 
166
					  Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("ControlPrivileges.sql") , ORADYN_DEFAULT )
167
					  While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
168
					  	Call SetPermissionCombos ( rsQry("role_id"), rsQry("visible_value"), rsQry("active_value"), VisibleCombo, ActiveCombo )
169
					  %>
170
			          <tr>
171
					  	<td align="center"><input type="checkbox" name="role_id_list" value="<%=rsQry("role_id")%>" disabled></td>
172
						<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>
173
						<td nowrap class="body_row"><%=LIMG_CONTROL  &  objObjCollector("obj_name")%></td>
174
						<td class="body_txt" nowrap background='images/bg_bage_pane.gif'>&nbsp;&nbsp;<%=VisibleCombo%>&nbsp;&nbsp;<%=ActiveCombo%>&nbsp;&nbsp;</td>
175
						<td class="body_rowg"></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 "OBJ_ID"
186
					  OraDatabase.Parameters.Remove "APP_ID"
187
					  %>
188
					  <tr>
189
					  	<td class="body_txt"></td>
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
			          <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"-->