<%@LANGUAGE = "VBScript"%>
<!--#include file="umraglobal.inc"-->

<%
InitUmra
AuthorizeUser False

If Session("WebRole") <> "MANAGEMENT" then response.redirect "not-allowed.asp"

RetVal=Umra.SetVariableText("%ObjectODN%", Session("UserObjectODN"))
RetVal = Umra.ExecuteProjectScript("function-user-get-info")
RetVal = Umra.GetVariableText("%AD_username%", AD_username)
RetVal = Umra.GetVariableText("%AD_displayName%", AD_displayName)
RetVal = Umra.GetVariableText("%BO4_func_kd%", BO4_func_kd)
RetVal = Umra.GetVariableText("%BO4_func_oms%", BO4_func_oms)
RetVal = Umra.GetVariableText("%BO4_regio_code%", BO4_regio_code)
RetVal = Umra.GetVariableText("%BO4_regio_naam%", BO4_regio_naam)
RetVal = Umra.GetVariableText("%BO4_oe_kort_nm%", BO4_oe_kort_nm)
RetVal = Umra.GetVariableText("%BO4_oe_vol_nm%", BO4_oe_vol_nm)
RetVal = Umra.SetVariableText("%regio_code%", "%BO4_regio_code%")
RetVal = Umra.SetVariableText("%func_kd%", "%BO4_func_kd%")

Session("ApplAuthorizations") = ""
for RowIndex = 0 to Session("UBoundTable1")
Session("ApplAuthorizations") = Session("ApplAuthorizations") & ";" & Request.Form("chkAppl_" & RowIndex)
next

Session("NTFSAuthorizations") = ""
for RowIndex = 0 to Session("UBoundTable2")
Session("NTFSAuthorizations") = Session("NTFSAuthorizations") & ";" & Request.Form("chkNTFS_" & RowIndex)
next

ApplAuthorizationTable = Split(Session("ApplAuthorizations"), ";")
NTFSAuthorizationTable = Split(Session("NTFSAuthorizations"), ";")
%>

<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK href="style.css" type=text/css rel=stylesheet>
</HEAD>

<%
HtmlWriteStyleElement_Top "Toevoegen autorisaties aan gebruiker"
%>

<table width="100%" border="0" cellpadding="10" cellspacing="0">
<tr>
<td>
<FORM NAME=UmraForm ACTION="manage-authorizations-status.asp" METHOD="POST" ID="Form1">
<table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td colspan="2"><strong>Gegevens geselecteerde gebruiker:</strong></td>
</tr>
<tr>
<td width="50%">Naam: <% response.write AD_displayName & " (" & AD_username & ")"%></td>
<td width="50%">Functie: <% response.write BO4_func_oms & " (" & BO4_func_kd & ")"%></td>
</tr>
<tr>
<td width="50%">Afdeling (code): <% response.write BO4_oe_kort_nm%></td>
<td width="50%">Afdeling (naam): <% response.write BO4_oe_vol_nm%></td>
</tr>
<tr>
<td width="50%">Regio (code): <% response.write BO4_regio_code%></td>
<td width="50%">Regio (naam): <% response.write BO4_regio_naam%></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><strong>U heeft onderstaande autorisaties aangevinkt, zodra u dit bevestigt worden deze autorisaties toegepast:</strong></td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td><strong>Applicatie autorisaties:</strong></td>
<td><strong>Map autorisaties:</strong></td>
</tr>
<tr>
<td>
<%
for RowIndex = 0 to UBound(ApplAuthorizationTable)
if Len(ApplAuthorizationTable(RowIndex)) > 0 then
response.write ApplAuthorizationTable(RowIndex)
response.write "<BR>"
end if
next
%>
</td>
<td>
<%
for RowIndex = 0 to UBound(NTFSAuthorizationTable)
if Len(NTFSAuthorizationTable(RowIndex)) > 0 then
response.write NTFSAuthorizationTable(RowIndex)
response.write "<BR>"
end if
next
%>
</td>
</tr>
<tr>
<td colspan="2">&nbsp;</td>
</tr>
<tr>
<td colspan="2"><input type="submit" value="Pas autorisatie(s) toe ->" name="Submit"></td>
</tr>
</table>
</form>
</td>
</tr>
</table>