Subversion Repositories DevTools

Rev

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

<%@LANGUAGE="VBSCRIPT"%>
<%
'=====================================================
'|                                                   |
'|                                Role Privileges                                |
'|                                                   |
'=====================================================
%>
<%
Option explicit
Response.Expires = 0
%>
<!--#include file="common/globals.asp"-->
<!--#include file="common/config.asp"-->
<!--#include file="common/common_subs.asp"-->
<!--#include file="common/_role_common.asp"-->
<%
'------------ ACCESS CONTROL ------------------
%>
<!--#include file="_access_control_general.asp"-->
<%
'------------ VARIABLE DEFINITION -------------
Dim sNode
Dim rsQry
Dim ActiveCombo
Dim VisibleCombo
'------------ CONSTANTS DECLARATION -----------
'------------ VARIABLE INIT -------------------
'------------ CONDITIONS ----------------------
'----------------------------------------------
%>
<%
'------------------------------------------------------------------------------------------------------------------------------------------------------
Sub SetPermissionCombos ( nObj_id, cVisible, cActive, ByRef outVisibleCombo, ByRef outActiveCombo )
        Dim i, selected
        
        
        ' --- Visible Combo ---
        outVisibleCombo = ""
        outVisibleCombo = outVisibleCombo &"<select name='VIS_"& nObj_id &"' class='form_iname'>"
        
        For i = 0 To UBound( arrVisiblePermissions ) Step NumberofPermissionFields
                selected = ""
                If arrVisiblePermissions( INXperm_val + i ) = cVisible Then
                        selected = "selected"
                End If
                
                outVisibleCombo = outVisibleCombo &"<option class='"& arrVisiblePermissions( INXperm_style + i ) &"' "& selected &" value='"& arrVisiblePermissions( INXperm_val + i ) &"'>"& arrVisiblePermissions( INXperm_text + i ) &"</option>"& VBNewLine
        Next
        
        outVisibleCombo = outVisibleCombo &"</select>"
        
        
        
        ' --- Active Combo ---
        outActiveCombo = ""
        outActiveCombo = outActiveCombo &"<select name='ACT_"& nObj_id &"' class='form_iname'>"
        
        For i = 0 To UBound( arrActivePermissions ) Step NumberofPermissionFields
                selected = ""
                If arrActivePermissions( INXperm_val + i ) = cActive Then
                        selected = "selected"
                End If
                
                outActiveCombo = outActiveCombo &"<option class='"& arrActivePermissions( INXperm_style + i ) &"' "& selected &" value='"& arrActivePermissions( INXperm_val + i ) &"'>"& arrActivePermissions( INXperm_text + i ) &"</option>"& VBNewLine
        Next
        
        outActiveCombo = outActiveCombo &"</select>"
        
End Sub
'------------------------------------------------------------------------------------------------------------------------------------------------------
%>
<%
'------------ RUN BEFORE PAGE RENDER ----------
Call GetRoleDetails ( parRole_id, parApp_id, objRoleCollector )
'----------------------------------------------
%>
<html>
<head>
<title>Access Manager</title>
<meta HTTP-EQUIV="Pragma" CONTENT="no-cache">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="scripts/access_manager.css" rel="stylesheet" type="text/css">

</head>

<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<!-- HEADER ++++++++++++++++++++++ -->
<!--#include file="_header.asp"-->
<!-- +++++++++++++++++++++++++++++ -->
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="1%" valign="top" background="images/bg_bage_pane.gif">
        <!-- TREE NAVIGATOR ++++++++++++++++++++++++++++++++++++++++++++ -->
        <!--#include file="_treeNavigator.asp"-->  
        <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
        </td>
    <td width="1" background="images/bg_drk_gray_border.gif"><img src="images/spacer.gif" width="1" height="600"></td>
    <td width="100%" valign="top"><table width="100%"  border="0" cellspacing="0" cellpadding="9">
      <tr>
        <td background="images/bg_drk_bage_pane.gif">
                  <table width="100%"  border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td nowrap class="body_txt">
                            <!-- BUTTONS CONTROL +++++++++++++++++++ -->
                                <!-- +++++++++++++++++++++++++++++++++++ -->
                          </td>
              <td align="right" nowrap class="section_ttl"><%=PARENT_TITLE%></td>
            </tr>
          </table>
                </td>
      </tr>
          <tr>
        <td class="menu_crumbttl"><%Call RenderTitle ( objRoleCollector )%></td>
      </tr>
      <tr>
        <td>
                 <!-- DETAILS ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
                        <!-- TAB CONTROLS ++++++++++++++++++++++ -->
                        <!--#include file="_tabs_definition.asp"-->
                        <%
                        Set objTabControl = New TabControl
                        objTabControl.TemplateDoc = ReadFile( Server.MapPath("controls/ERGTabStyleMac/mac_style.html") ) ' Supply tab style definition
                        objTabControl.TabStyle = "StyleMac"
                        objTabControl.AddTabDefnition ( arrRole )
                        objTabControl.DisableByName ( "Data Filtering" )
                        objTabControl.SelectByName ( "Role Permissions" )
                        objTabControl.Render ()
                        %>
                        <!-- END OF TAB CONTROLS +++++++++++++++ -->
                 <table width="100%"  border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="500"></td>
            <td width="100%" valign="top">
                          <table width="100%"  border="0" cellspacing="10" cellpadding="0">
                <tr>
                  <td>
                                  <!-- TAB DETAILS +++++++++++++++++++++++++++++ -->
                                        <table width="100%"  border="0" cellspacing="3" cellpadding="0">
                                        <form name="RolePrivileges" action="_SetRolePermissions.asp" method="post">
                                  <tr>
                                                <td width="1%" background="images/bg_table_col.gif"><img src="images/spacer.gif" width="16" height="16" hspace="2"></td>
                                    <td width="30%" background="images/bg_table_border.gif"><table width="100%"  border="0" cellspacing="1" cellpadding="2">
                                      <tr>
                                        <td align="right" nowrap background="images/bg_table_col.gif" class="body_col">Action Name</td>
                                      </tr>
                                    </table></td>
                                                <td width="1%" align="right" nowrap background="images/bg_table_col.gif" class="body_col">Permissions</td>
                                                <td width="70%" align="right" background="images/bg_table_col.gif" class="body_col">Description</td>
                                                <td width="1%" background="images/bg_table_col.gif"></td>
                                  </tr>
                                          <%
                                          OraDatabase.Parameters.Add "ROLE_ID", parRole_id,     ORAPARM_INPUT, ORATYPE_NUMBER 
                                          OraDatabase.Parameters.Add "APP_ID",  parApp_id,      ORAPARM_INPUT, ORATYPE_NUMBER 
                                          
                                          Set rsQry = OraDatabase.DbCreateDynaset( GetQuery ("RolePrivileges.sql") , ORADYN_DEFAULT )
                                          While (NOT rsQry.BOF) AND (NOT rsQry.EOF)
                                                Call SetPermissionCombos ( rsQry("obj_id"), rsQry("visible_value"), rsQry("active_value"), VisibleCombo, ActiveCombo )
                                          %>
                                  <tr>
                                                <td align="center"><input type="checkbox" name="obj_id" value="<%=rsQry("obj_id")%>" disabled></td>
                                                <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>
                                                <td class="body_txt" nowrap background='images/bg_bage_pane.gif'>&nbsp;&nbsp;<%=VisibleCombo%>&nbsp;&nbsp;<%=ActiveCombo%>&nbsp;&nbsp;</td>
                                                <td class="body_rowg"><%=rsQry("obj_description")%></td>
                                                <td><a href="Role_DataFiltering.asp?obj_id=<%=rsQry("obj_id")%>&<%=objPMod.ComposeURL%>" class="body_link"><%=EVal( rsQry("data_filter") )%></a></td>
                                  </tr>
                                          <%rsQry.MoveNext%>
                                          
                                  <tr>
                                    <td colspan="5" background="images/bg_table_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                                  </tr>
                                          <%
                                          WEnd
                                          
                                          OraDatabase.Parameters.Remove "ROLE_ID"
                                          OraDatabase.Parameters.Remove "APP_ID"
                                          %>
                                          <tr>
                                                <td class="body_txt"></td>
                                                <td class="body_txt"></td>
                                                <td align="center" background='images/bg_bage_pane.gif'><input type="submit" name="btn" value="Apply" class="form_btn"></td>
                                                <td class="body_txt"></td>
                                  </tr>
                                  <tr>
                                    <td colspan="5" background="images/bg_table_border.gif">
                                                 <table width="100%"  border="0" cellspacing="1" cellpadding="2">
                                      <tr>
                                        <td nowrap background="images/bg_table_col.gif"><img src="images/spacer.gif" width="1" height="1"></td>
                                      </tr>
                                     </table>
                                                </td>
                                  </tr>
                                         <%=objPMod.ComposeHiddenTags()%>
                                         <input type="hidden" name="rfile" value="<%=SCRIPT_NAME%>">
                                         </form>
                                 </table>
                                  <!-- +++++++++++++++++++++++++++++++++++++++++ -->
                                  </td>
                </tr>
              </table>
                        </td>
            <td width="1" background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
          </tr>
         </table>
         <table width="100%"  border="0" cellspacing="0" cellpadding="0">
           <tr>
             <td background="images/bg_gray_border.gif"><img src="images/spacer.gif" width="1" height="1"></td>
           </tr>
         </table>
                 <!-- +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
         <br></td>
      </tr>
    </table></td>
  </tr>
</table>
<!-- FOOTER ++++++++++++++++++++++ -->
<!--#include file="_footer.asp"-->
<!-- +++++++++++++++++++++++++++++ -->
</body>
</html>
<%
'------------ RUN AFTER PAGE RENDER -----------
'----------------------------------------------
%>
<!--#include file="common/globals_destructor.asp"-->