home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
ims.cab
/
smau.asp
< prev
next >
Wrap
Text File
|
1997-10-16
|
9KB
|
377 lines
<%
'----------------------------------------------------------------------------
'
'
' File: smau.asp
'
' Description: Outbound security Authentication Account Page
'
' Copyright (C) 1997 Microsoft Corporation
'
'------------------------------------------------------------------------------
%>
<% Response.Expires = 0 %>
<%
REM LOCALIZATION
L_PAGETITLE_TEXT = "Authentication Account"
L_ACCOUNT_REMOTE_HOST_TEXT = "Account on Remote Host"
L_ACCOUNT_TEXT = "Account:"
L_PASSWORD_TEXT = "Password:"
L_CONFIRMPASSWORD_TEXT = "Confirm Password:"
L_NT_PAGE_TITLE_TEXT = "Windows NT Account"
L_WINNT_REMOTE_HOST_TEXT = "Windows NT Account on Remote Host"
L_USERNAME_TEXT = "User name:"
L_DOMAIN_TEXT = "Domain:"
L_OK_TEXT = "OK"
L_CANCEL_TEXT = "Cancel"
L_HELP_TEXT = "Help"
L_VALUE_CANNOT_EXCEED_ERRORMESSAGE = "The value cannot exceed"
L_CHARACTERS_ERRORMESSAGE = "characters."
L_PASSWORDS_DONT_MATCH_ERRORMESSAGE = "The passwords don't match!"
UPDATE_TEXT = "update"
REM END LOCALIZATION
svr = Request("svr")
siteInstance = Request("ServerInstance")
pageType = Request("AuthType")
RouteUserName = Request("RouteUserName")
szTest = Request.ServerVariables("HTTP_USER_AGENT")
%>
<HTML>
<HEAD>
<% if (pageType = "clear") then %>
<TITLE><% = L_PAGETITLE_TEXT %></TITLE>
<% else %>
<TITLE><% = L_NT_PAGE_TITLE_TEXT %></TITLE>
<% end if %>
<script language="javascript">
ua = navigator.useragent;
v = navigator.appVersion.substring(0,1);
var szName = "<% = RouteUserName %>";
unescape(szName);
<% if (RouteUserName = "") then
RouteUserName = " "
end if %>
<% newUserName = Replace(RouteUserName, "\", "\\") %>
var szUserName = new String("<% = RouteUserName %>");
<% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"4") then %>
szUserNameArray = szUserName.split("\\");
szUserNameArray.reverse();
<% else %>
szUserNameArray = new Array();
iSearch = szUserName.indexOf("\\");
if(iSearch == (-1))
{
szUserNameArray[0] = "<% = RouteUserName %>";
}
else
{
szUserNameArray[0] = szUserName.substring((iSearch + 1), (szUserName.length));
szUserNameArray[1] = szUserName.substring(0, (iSearch - 1));
}
<% end if %>
function onOK()
{
uform = document.userform;
wform = opener.document.userform;
if(dataCheck())
{
<% if (pageType = "clear") then %>
wform.txtRouteUserName.value = uform.txtAccount.value;
<% else %>
wform.txtRouteUserName.value = uform.txtDomain.value + "\\" + uform.txtUserName.value;
<% end if %>
wform.txtRoutePassword.value = uform.txtPassword.value;
opener.GetRouteAction();
wform.a.value = "<% = UPDATE_TEXT %>";
wform.submit();
close();
}
}
<% REM Javascript function helpBox %>
function helpBox()
{
window.open("help/smAuh.htm","<% = L_HELP_TEXT %>","toolbar=no,scrollbars=yes,directories=no,menubar=no,width=450,height=450");
}
function dataCheck()
{
uform = document.userform;
<% if (pageType = "clear") then %>
if(!(checkLength(uform.txtAccount,256)))
{
return false;
}
<% else %>
if(!(checkLength(uform.txtUserName,64)))
{
return false;
}
if(!(checkLength(uform.txtDomain,64)))
{
return false;
}
<% end if %>
if(!(checkLength(uform.txtPassword,64)))
{
return false;
}
if(!(checkLength(uform.txtConfirmPassword,64)))
{
return false;
}
if(!(checkPassword()))
{
return false;
}
return true;
}
function checkPassword()
{
uform = document.userform;
if(uform.txtPassword.value != uform.txtConfirmPassword.value)
{
alert("<% = L_PASSWORDS_DONT_MATCH_ERRORMESSAGE %>");
uform.txtPassword.value = "";
uform.txtConfirmPassword.value = "";
uform.txtPassword.focus();
return false;
}
return true;
}
function checkLength(myControl, iNumber)
{
var str = myControl.value;
if((str.length) > iNumber)
{
alert("<% = L_VALUE_CANNOT_EXCEED_ERRORMESSAGE %> " + iNumber + " <% = L_CHARACTERS_ERRORMESSAGE %>");
myControl.value = str.substring(0, iNumber);
myControl.focus();
return false;
}
return true;
}
</script>
</HEAD>
<BODY background="images\black.gif" BGCOLOR="#CCCCCC" TEXT="#000000" TOPMARGIN=15 LINK="#000000" VLINK="#000000" ALINK="#000000">
<FORM NAME="userform" ACTION="smAu.asp" METHOD="post">
<input type="hidden" name="a" value="<% = a %>">
<input type="hidden" name="svr" value="<% = svr %>">
<TABLE BORDER="1" BGCOLOR="#CCCCCC" WIDTH="100%" cellpadding="10">
<TR><TD>
<% if (pageType = "clear") then %>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_ACCOUNT_REMOTE_HOST_TEXT %>
</FONT>
</TD>
</TR><TR>
<TD>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="2" CELLSPACING="2">
<TR><TD>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_ACCOUNT_TEXT %>
</font>
</td><TD>
<input type="text" name="txtAccount" value="<% = RouteUserName %>" onBlur="" onChange="">
</TD>
</TR><TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_PASSWORD_TEXT %>
</font>
</TD><TD>
<input type="password" name="txtPassword" value="">
<TD>
</TR><TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_CONFIRMPASSWORD_TEXT %>
</FONT>
</TD><TD>
<input type="password" name="txtConfirmPassword" value="">
</TD>
</TR>
</TABLE>
</TD></TR>
</TABLE>
</TD>
</TR>
</TABLE>
<script language="javascript">
uform = document.userform;
uform.txtAccount.value = szUserNameArray[0];
</script>
<% else %>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_WINNT_REMOTE_HOST_TEXT %>
</font>
</TD>
</TR><TR>
<TD>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="2" CELLSPACING="2">
<TR><TD>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="2" CELLSPACING="2">
<TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_USERNAME_TEXT %>
</font>
</TD><TD>
<input type="text" name="txtUserName" value=""
</TR><TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_DOMAIN_TEXT %>
</font>
</TD><TD>
<input type="text" name="txtDomain" value="">
</TD>
</TR><TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_PASSWORD_TEXT %>
</font>
</TD><TD>
<input type="password" name="txtPassword" value="">
</TD>
</TR><TR>
<TD>
<FONT FACE="Arial" SIZE=2>
<% = L_CONFIRMPASSWORD_TEXT %>
</FONT>
</TD><TD>
<input type="password" name="txtConfirmPassword" value="">
</TD>
</TR>
</TABLE>
</TD></TR>
</TABLE>
</TD></TR>
</TABLE>
<script language="javascript">
uform = document.userform;
uform.txtUserName.value = szUserNameArray[0];
if(szUserNameArray[1] == null)
{
szUserNameArray[1] = "";
}
uform.txtDomain.value = szUserNameArray[1];
</script>
<% end if %>
</TD></TR>
</TABLE>
<P>
<TABLE ALIGN="right" BORDER=0 CELLPADDING=2 CELLSPACING=2>
<TR>
<TD>
<TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0 BGCOLOR="#FFCC00">
<TR>
<TD VALIGN="middle">
<FONT FACE="Arial" SIZE=2>
<B><A HREF="javascript:onOK();">
<IMG SRC="images/gnicok.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16></A>
<A HREF="javascript:onOK();"><% = L_OK_TEXT%></A></B>
</FONT>
</TD>
</TR>
</TABLE>
</TD>
<TD>
<TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0 BGCOLOR="#FFCC00">
<TR>
<TD VALIGN="middle">
<FONT FACE="Arial" SIZE=2>
<B><A HREF="javascript:close();">
<IMG SRC="images/gniccncl.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16></A>
<A HREF="javascript:close();"><% = L_CANCEL_TEXT %></A></B>
</FONT>
</TD>
</TR>
</TABLE>
</TD>
<TD>
<TABLE VALIGN="top" BORDER=0 CELLPADDING=5 CELLSPACING=0 BGCOLOR="#FFCC00">
<TR>
<TD VALIGN="middle">
<FONT FACE="Arial" SIZE=2><A HREF="javascript:helpBox();">
<IMG SRC="images/gnichelp.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16></A>
<B><A HREF="javascript:helpBox();"><% = L_HELP_TEXT %></A></B>
</FONT>
</TD>
</TR>
</TABLE>
</TD>
<TD> </TD>
</TR>
</TABLE>
</FORM>
<script language="javascript">
uform = document.userform;
<% if (pageType = "clear") then %>
uform.txtAccount.focus();
<% else %>
uform.txtUserName.focus();
<% end if %>
</script>
</BODY>
</HTML>