<%@ Language=VBScript %>
<% Option Explicit %>

<!--#include virtual="/NRConfig/Shared/Shared.inc"-->
<!--#include virtual="/NRConfig/Shared/UIConstants.inc"-->
<!--#include virtual="/NRConfig/SecurityConfig/CNCASPPageManager_SecurityConfig.inc"-->
<!--#include virtual="/NRConfig/Shared/CNCDialogModalControl.inc"-->
<!--#include virtual="/NRConfig/Shared/ASPUtils.inc"-->

<%
'*****************************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
' File:   /SCA/ConfigSecurity/SecurityConfigDlg.asp
' Author: Microsoft Corporation
'
' Purpose:
'   ASP file that generates a user interface to configure Web Server dialog.
'
' Query String Parameters:
'
'	ResServerIndex:  Resolution Server Entry Point, Value > 0.
'*****************************************************************************
'--Creat an instance for init manager class to get query string

Dim g_pASPPageManager
Dim m_pUIASPPageManager

Set g_pASPPageManager = New CNCASPPageManager_SecurityConfig
Call g_pASPPageManager.InitManager()
' -- Create am instance of CNCASPPageUI_SecurityConfig
Set m_pUIASPPageManager = New CNCASPPageUI_SecurityConfig
Call m_pUIASPPageManager.InitClass(g_pASPPageManager)

'	Show SSL warning only if
'   IsSSLRunning = False and
'   LocalHost = False
If ((Not g_pASPPageManager.IsSSLRunning) And _
     (Not g_pASPPageManager.IsLocalHost))Then
    Call ServerSideRedirect(g_pASPPageManager.SecurityAlertURL)
End If
%>
<HTML>
<HEAD>

<meta name="Author" content="Microsoft Corporation">
<meta name="Description" content="Configuring SCA Security tab">

<script language="JavaScript" src="/NRConfig/Shared/Shared.js" type="text/javascript"></script>
<script language="JavaScript" SRC="SecurityConfig.js" type="text/javascript" ></script>
<script language="JavaScript" type="text/javascript" >window.name="WSecurity"</script>
<link rel="StyleSheet" href="/NRConfig/Shared/Shared.css" type="text/css" >
<link rel="StyleSheet" href="SecurityConfig.css" type="text/css" >

<TITLE><%=IDS_UI_PAGE_TITLE_SECURITYCONFIG & " - " & IDS_UI_TITLE_RESOLUTION_SERVER_APP%></TITLE>

</HEAD>
<BODY bgColor="#ffffff">
<div id="AppTitle" class="SCAStyleAppSecurityTitle">
	<table border="0" width="670" bgcolor="#330066">
		  <tr>
		   		<td width="25">
	     	      	<IMG alt="<%=IDS_UI_IMAGE_ALT_LOGO%>"
						src = "<%=IDS_IMAGE_LOGO%>"
				        border=0 >
				</td>
				<td class="SCAStyleLargeText">
		    			<b><%=IDS_UI_TITLE_RESOLUTION_SERVER_APP & " - " & IDS_UI_PAGE_TITLE_SECURITYCONFIG%></b>
		    	</td>
		   </tr>
	</table>
</div>
<div id="SecurityUpdate" class="SCAStyleSecurityDetailPos">
<form name="SCA_frm_ConfigSecurity" method="post">
<INPUT type="hidden" name="SCA_frm_formSubmit" value="True">
<INPUT type="hidden" name="SCA_frm_SysAccount_DirtyFlag"  value="<%= Server.HTMLEncode(m_pUIASPPageManager.bDirtyFlag) %>">
    <div id="SysAccount" class="SCAStyleSysAccountTitle">
			<table border="0" width = "680" cellspacing="3" cellpadding="3">
				<tr>
					<td  class= "SCAStyleTitle"><b><%=IDS_UI_RESSYSTEM_ACCOUNT%></b>
						<%
						If g_pASPPageManager.IsSupportedBrowser <> "OK" Then
							Call Response.Write ("<font size='2' color='#FF0000'><b><i>" & Server.HTMLEncode(g_pASPPageManager.IsSupportedBrowser) & "</i></b></font>")
						End If
						%>
					</td>
				</tr>
			</table>
		</div>
		<div class="SCAStyleSysAccountDetail">
			<table border="0" width = "660" cellspacing="3" cellpadding="1">
				<tr>
					<td align="right" width="250" class= "SCAStyleTitle"><b><%=IDS_UI_NT_ACCOUNT%></b>
					</td>
					<td width="260">
						<INPUT  name="frm_Textbox_NTAccount" size=48  value="<%= Server.HTMLEncode(m_pUIASPPageManager.SysAccount) %>" OnChange="SCA_clearDummyPassword()" >

					</td >
					<td width="130" class="SCAStyleSetMouseIcon">
						<img  name="btn_NTAccoutBrowse" border="0" src="<%=IDS_IMAGE_BTN_OFF_BROWSER%>"  width="120" height="24" alt ="<%=IDS_UI_IMAGE_ALT_BROWSER_NTDOMAIN_USERS%>"
							onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('btn_NTAccoutBrowse','','<%=IDS_IMAGE_BTN_ON_BROWSER%>',1)"
							onclick ="SCA_openPopupWindowForSecurity('<%=IDS_ASPPAGE_NTUserBrowse%>?SelectMode=true&InIineDialog=True&<%=IDS_TIME_STAMP%>=<%=CDbl(CDate(now))%>',360,450)" align="right">
					</td >
				</tr>
				<tr>
					<td  align="right" class= "SCAStyleTitle"><b><%=IDS_UI_ACCOUNT_PASSWORD%></b>
					</td>
					<td>
						<% If m_pUIASPPageManager.ValidateStatus = "" Then %>
							<INPUT  type="password" name="frm_Textbox_SysPassword" size=20 value="<%=IDS_DUMMY_PASSWORD%>" OnChange="SCA_setPasswordModified()" OnClick="SCA_clearDummyPassword()" >
						<% Else %>
							<INPUT  type="password" name="frm_Textbox_SysPassword" size=20 value="" OnChange="SCA_setPasswordModified()" OnClick="SCA_clearDummyPassword()" >
						<% End If %>
					</td>
					<td>
					</td>
				</tr>
			</table>
		</div>
		<div class='SCAStyleGuestTitlePos'>

			<table border="0" width = "680" cellspacing="3" cellpadding="3">
				<tr>
					<td  class= "SCAStyleTitle"><b><%=IDS_UI_GUEST_VISIT%></b>
					</td>
				</tr>
			</table>
		</div>
		<div id="GuestDetail" class="SCAStyleGuestAccountDetail">
			<table border="0" width = "660" cellspacing="3" cellpadding="1">
				<tr>
					<td width="250" align="right"  class= "SCAStyleTitle"><b><% = IDS_UI_ALLOW_GUESTS_ON_SITE %></b>
					</td>
					<td width="260">


					<Select name="frm_Select_GuestsOnSite" onChange="SCA_enableTextbox(this.value)">
							<option value=True <%=m_pUIASPPageManager.GuestSelectTrue%>>Yes</option>
							<option value=False <%=m_pUIASPPageManager.GuestSelectFalse%>>No</option>
					</Select>
					</td>
					<td width="130">
					</td>
				</tr>
				<tr>
					<td align="right"  class= "SCAStyleTitle"><b><%=IDS_UI_GUEST_LOGIN_ACCOUNT%></b>
					</td>
					<% Dim GuestAccount
					  If m_pUIASPPageManager.GuestAccount = "None" Then
							GuestAccount = ""
					  Else
					   		GuestAccount = m_pUIASPPageManager.GuestAccount
					  End If
					%>
					<td ><INPUT  name="frm_Textbox_GuestAccount" size=48    class="SCAStyleTextboxbgColor" value="<%=GuestAccount%>" OnKeyUp="EnableOrNotGuestTextBox()">
					</td >
					<td class="SCAStyleSetMouseIcon">
						<img  name="btn_GuestAccoutBrowse" border="0" src="<%=IDS_IMAGE_BTN_OFF_BROWSER%>"  width="120" height="24" alt ="<%=IDS_UI_IMAGE_ALT_BROWSER_NTDOMAIN_USERS%>"
							onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('btn_GuestAccoutBrowse','','<%=IDS_IMAGE_BTN_ON_BROWSER%>',1)"
							onclick ="SCA_openPopupWindowForSecurity('<%=IDS_ASPPAGE_NTUserBrowse%>?SelectMode=False&InIineDialog=True&<%=IDS_TIME_STAMP%>=<%=CDbl(CDate(now))%>' ,360,450)" align="right">
					</td >
				</tr>

			</table>
		</div>
		<div class="SCAStyleWebBrowserSettingTitlePos">
			<table border="0" width="280" cellspacing="2" cellpadding="2">
				<tr>
					<td class="SCAStyleTitle">
						<%=IDS_WEB_BROWSER_COOKIE_SETTINGS %>
					</td>
				</tr>
			</table>
		</div>
		<div class="SCAStyleWebBrowserSettingContentPos">

			<table border="0" width = "640" cellspacing="3" cellpadding="2">

				<tr>
					<td  align="right" width="240" class= "SCAStyleTitle">
						<%=IDS_UI_COOKIE_LIFE_TIME_TAB%>
					</td>
					<td width="400" class="SCAStyleText">
						<INPUT name="frm_Textbox_CookieLifeTime" size=10  maxlength="9" value="<%= Server.HTMLEncode(m_pUIASPPageManager.CookieLifeTime) %>">
						&nbsp;
					</td >

				</tr>
				<tr>
					<td align="right"  class= "SCAStyleTitle">
						<%=IDS_UI_CHECK_MACHIEN_IP%>
					</td>
					<td>

						<Select name="frm_Select_CheckMachineIP">
							<option value=True   <%=m_pUIASPPageManager.MachineIPSelectTrue%>>Yes</option>
							<option value=False  <%=m_pUIASPPageManager.MachineIPSelectFalse%>>No</option>
						</Select>
					</td>

				</tr>

			</table>

		</div>
		<div class="SCAStyleSecurityButtonPosition">
			<table border="0" width="260" cellspacing="2" cellpadding="0">
				<tr >
					<td align="center"class="SCAStyleSetMouseIcon">
						<img  name="btn_configSecurityOK" border="0" src="<%=IDS_IMAGE_BTN_OK_OFF %>"  width="120" height="24" alt="<%=IDS_UI_IMAGE_ALT_POPUP_OK%>"
									onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('btn_configSecurityOK','','<%=IDS_IMAGE_BTN_OK_ON %>',0)"
										onClick="SCA_SecuritySubmit('<%= Server.URLEncode(g_pASPPageManager.ResServerIndex) %>')" align="right">
					</td>
					<td align = "center" class="SCAStyleSetMouseIcon">
						<img  name="btn_configSecurityCancel" border="0" src="<%=IDS_IMAGE_BTN_CANCEL_OFF%>"  width="120" height="24" alt="<%=IDS_UI_IMAGE_ALT_POPUP_CLOSE%>"
									onMouseOut="SCA_swapImgRestore()" onMouseOver="SCA_swapImage('btn_configSecurityCancel','','<%=IDS_IMAGE_BTN_CANCEL_ON%>',1)"
										onClick="SCA_closeWindow()" align="right">
					</td>
				</tr>
			</table>
		</div>
</div>
<%
' -- Call java script function to enable or disable guest text box
m_pUIASPPageManager.CallJavaScriptFucToEnableGuestAccount()
' -- Display error message if any
m_pUIASPPageManager.DisplayErrorMsgbox()

%>
</form>
</div>
</BODY>
</HTML>
