home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
ins.cab
/
nnsrv.asp
< prev
next >
Wrap
Text File
|
1997-10-12
|
4KB
|
162 lines
<% Response.Expires = 0 %>
<%
REM LOCALIZATION
L_MENUTITLE_TEXT = "Select Server"
L_ENTERSERVERNAME_TEXT = "Please enter a server name."
L_SERVERALPHANUMALERT_TEXT = "Server names can only contain alphanumeric characters."
L_SERVERNUMALERT_TEXT = "Server names names cannot be longer than 50 characters."
L_SERVERNAMELABEL_TEXT = "Server name:"
L_OKLABEL_TEXT = "OK"
L_CANCELLABEL_TEXT = "Cancel"
L_HELPLABEL_TEXT = "Help"
REM END LOCALIZATION
%>
<% svr = Request("svr") %>
<% a = Request("a") %>
<!--#include file = "_cnst.asp" -->
<% if (cont=true) then %>
<HTML>
<HEAD>
<TITLE><% = L_MENUTITLE_TEXT %></TITLE>
<SCRIPT LANGUAGE="javascript">
function helpBox()
{
window.open("help/nnsrvh.htm","<% = L_HELPLABEL_TEXT %>","toolbar=no,scrollbars=yes,directories=no,menubar=no,width=300,height=425");
}
function checkSvr()
{
svr = document.userform.svr.value
if (svr == "")
{
alert("<% = L_ENTERSERVERNAME_TEXT %>");
}
else
{
i = (svr.indexOf("'") + svr.indexOf('"') + svr.indexOf(document.userform.slash.value));
i = ( i + svr.indexOf("<") + svr.indexOf('>') + svr.indexOf('%'));
i = ( i + svr.indexOf("&")+ svr.indexOf("#") + svr.indexOf("("));
i = ( i + svr.indexOf("+")+ svr.indexOf(")") + svr.indexOf("@"));
i = ( i + svr.indexOf("~")+ svr.indexOf("`") + svr.indexOf("!"));
i = ( i + svr.indexOf("^")+ svr.indexOf("*") + svr.indexOf("="));
i = ( i + svr.indexOf("|")+ svr.indexOf("/") + svr.indexOf(";"));
i = ( i + svr.indexOf(",")+ svr.indexOf("?"));
if (i != -23 )
{
alert("<% = L_SERVERALPHANUMALERT_TEXT %>");
}
else
{
if (svr.length >= 50)
{
alert("<% = L_SERVERNUMALERT_TEXT %>");
}
else {
return true;
}
}
}
return false;
}
function changeSvr()
{
if (checkSvr())
{
document.userform.submit();
}
}
</SCRIPT>
</HEAD>
<% if (a = "save") then %>
<% Set admin = CreateObject("NntpAdm.Admin.1") %>
<% Set serv = CreateObject("NntpAdm.VirtualServer.1") %>
<% serv.Server = svr %>
<% serv.ServiceInstance = Session("ServiceInstance") %>
<% On Error Resume Next %>
<% serv.Get %>
<% if (Err <> 0) then %>
<SCRIPT LANGUAGE="javascript">
alert("<% = Err.description %>");
</SCRIPT>
<% else %>
<SCRIPT LANGUAGE = "javascript">
close();
opener.top.location = "nntp.asp?svr=<% = svr %>";
</SCRIPT>
<% end if %>
<% end if %>
<BODY BGCOLOR="#000000" TEXT="#000000" TOPMARGIN=15 LINK="#000000" VLINK="#000000" ALINK="#000000">
<FORM NAME="userform" ACTION="nnsrv.asp" onSubmit="return checkSvr();">
<INPUT TYPE="hidden" NAME="a" VALUE="save">
<INPUT TYPE="hidden" NAME="slash" Value = "\">
<P>
<TABLE BORDER=1 BGCOLOR="#CCCCCC" WIDTH=100% CELLPADDING=10>
<TR>
<TD>
<FONT SIZE=2 FACE="Arial">
<IMG SRC="images/gnicttl.gif" HSPACE=4 HEIGHT=10 WIDTH=10><B><% = L_MENUTITLE_TEXT %></B>
<BLOCKQUOTE>
<% = L_SERVERNAMELABEL_TEXT %> <INPUT TYPE="text" NAME="svr" SIZE = 25 VALUE="<% = svr %>">
</BLOCKQUOTE>
</FONT>
</TD>
</TR>
</TABLE>
</FORM>
<P>
<TABLE ALIGN="right" CELLPADDING=1 CELLSPACING=1>
<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:changeSvr();"><IMG HEIGHT=16 WIDTH=16 ALIGN="top" SRC="images/gnicok.gif" BORDER=0 ALT="OK"></A>
<A HREF="javascript:changeSvr();"><% = L_OKLABEL_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 HEIGHT=16 WIDTH = 16 ALIGN="top" SRC="images/gniccncl.gif" BORDER=0 ALT="Cancel"></A>
<A HREF="javascript:close();"><% = L_CANCELLABEL_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:helpBox();"><IMG HEIGHT=16 WIDTH=16 ALIGN="top" SRC="images/gnichelp.gif" BORDER=0 ALT="Help"></A>
<A HREF="javascript:helpBox();"><% = L_HELPLABEL_TEXT %></A></B>
</FONT>
</TD>
</TR>
</TABLE>
</TD>
<TD> </TD>
</TR>
</TABLE>
</BODY>
</HTML>
<% end if %>