home *** CD-ROM | disk | FTP | other *** search
- <% Response.Expires = 0 %>
-
- <%
- REM LOCALIZATION
-
- L_MENU_TITLETXT = "MCIS-NS Administration"
- L_ERROR_ACCESS_DENIEDTXT = "Error: Access is Denied."
- L_ERRORTXT = "Error is: "
- L_ADD_TITLETXT = "Add Newsgroup"
- L_EDIT_TITLETXT = "Edit Newsgroup Properties"
- L_ENTER_NAMETXT = "Please enter a newsgroup name."
- L_ADD_LABELTXT = "Add Newsgroup on"
- L_EDIT_LABELTXT = "Edit Newsgroup on"
- L_NEWSGROUP_LABELTXT = "Newsgroup:"
- L_DESCRIPTION_LABELTXT = "Description:"
- L_READ_ONLY_LABELTXT = "Read only"
- L_MODERATED_LABELTXT = "Moderated"
- L_MODERATOR_LABELTXT = "Moderator:"
- L_OK_LABELTXT = "OK"
- L_CANCEL_LABELTXT = "Cancel"
- L_HELP_LABELTXT = "Help"
-
- REM END LOCALIZATION
- %>
-
- <% svr = Request ("svr") %>
- <% a = Request ("a") %>
- <% svcInstance = 1 %>
- <% Description = Request ("txtDescription") %>
- <% Moderated = Request ("hdnModerated") %>
- <% Moderator = Request ("txtModerator") %>
- <% ReadOnly = Request ("hdnReadOnly") %>
-
- <% Group = Request ("Group") %>
- <!--#include file="_cnst.asp" -->
-
- <% if (cont = true) then %>
-
- <% On Error Resume Next %>
- <% Set GroupAdm = Server.CreateObject("nntpadm.groups") %>
- <% if Err <> 0 then %>
- <script language="javascript>
- <p>
- <% = L_ERROR_ACCESS_DENIEDTXT %>
- alert('<% = L_ERRORTXT %><% = Err.description %> ');
- </script>
- <% end if %>
-
- <% REM get server name %>
- <% GroupAdm.Server = svr %>
-
- <% REM set service instance %>
- <% GroupAdm.ServiceInstance = svcInstance %>
-
- <HTML>
- <HEAD>
-
- <% if (a = "new") then %>
- <TITLE><% = L_ADD_TITLETXT %></TITLE>
- <% else %>
- <TITLE><% = L_EDIT_TITLETXT %></TITLE>
- <% end if %>
-
- <SCRIPT LANGUAGE="javascript">
-
- <!--#include file="nnisfull.htm" -->
-
- function maintainCheck () {
- if (document.userform.chkModerated.checked == true) {
- document.userform.txtModerator.value = document.userform.hdnModerator.value;
- document.userform.txtModerator.focus();
- }
- else {
- document.userform.hdnModerator.value = document.userform.txtModerator.value;
- document.userform.txtModerator.value = "";
- }
- }
-
- function convertChktoHdn(chkControl, hdnControl) {
- if (chkControl.checked == true) {
- hdnControl.value = true;
- }
- else {
- hdnControl.value = false;
- }
- }
-
- function maintainText () {
- if (document.userform.txtModerator.value != "") {
- document.userform.chkModerated.checked = true;
- document.userform.hdnModerator.value = document.userform.txtModerator.value;
- }
- }
-
- function checkModerator() {
- if ((document.userform.chkModerated.checked == true) && (document.userform.txtModerator.value == "")) {
- alert("Moderated newsgroups must have a moderator. Please enter a moderator name.");
- return false;
- }
- else {
- return true;
- }
- }
-
- function checkNgrp() {
- if (document.userform.Group.value!="") {
- return true;
- }
- else {
- alert("<% = L_ENTER_NAMETXT %>")
- return false;
- }
- }
-
- function onOk() {
- if ((checkNgrp())&&(checkModerator())) {
- convertChktoHdn(document.userform.chkReadOnly, document.userform.hdnReadOnly);
- convertChktoHdn(document.userform.chkModerated, document.userform.hdnModerated);
- <% if (a = "new") then %>
- document.userform.a.value = "add";
- <% else %>
- document.userform.a.value = "save";
- <% end if %>
- document.userform.submit();
- }
- }
-
- function helpBox() {
- window.open("help/nngrpedh.htm","Help","toolbar=no,scrollbars=yes,directories=no,menubar=no,width=300,height=425");
- }
-
- function closeWin()
- {
- <% if (a = "add") then %>
- window.opener.document.uForm.refresh();
- <% else %>
- index = window.opener.document.uForm.selectedItem;
- window.opener.document.uForm.loadList();
- <% end if %>
- self.close();
- }
-
- </SCRIPT>
-
- </HEAD>
-
- <% if ((a = "add") OR (a = "save")) then %>
-
- <% if (a = "add") then %>
-
- <% GroupAdm.Newsgroup = Group %>
- <% GroupAdm.Description = Description %>
- <% GroupAdm.Moderator = Moderator %>
- <% GroupAdm.ReadOnly = ReadOnly %>
-
- <% On Error Resume Next %>
- <% GroupAdm.Add %>
- <% if (Err <> 0) then %>
- <script language = "javascript">
- alert ( '<% = L_ERRORTXT %><% = Err.Description %> ' );
- </script>
- <% end if %>
-
- <BODY BGCOLOR="#000000" TOPMARGIN=15 LINK="#000000" VLINK="#000000" ALINK="#000000" onLoad="closeWin();">
-
- <% elseif (a = "save" ) then %>
- <% GroupAdm.Newsgroup = Group %>
- <% GroupAdm.Description = Description %>
- <% GroupAdm.Moderator = Moderator %>
- <% GroupAdm.ReadOnly = ReadOnly %>
-
- <% On Error Resume Next %>
- <% GroupAdm.Set %>
- <% if ( Err <> 0 ) then %>
- <SCRIPT language="JavaScript">
- alert ( '<% = L_ERRORTXT %><% = Err.description %>' );
- </SCRIPT>
- <% end if %>
-
- <BODY BGCOLOR="#000000" TEXT="#000000" TOPMARGIN=15 LINK="#000000" VLINK="#000000" ALINK="#000000" onLoad="closeWin();">
-
- <% end if %>
-
- <% else %>
-
- <% if (a = "edit") then %>
- <% On Error Resume Next %>
- <% GroupAdm.Get(Group) %>
- <% if ( Err <> 0 ) then %>
- <SCRIPT LANGUAGE = "JavaScript">
- alert ('<% = L_ERRORTXT %><% = Err.Description %>' );
- </SCRIPT>
- <% end if %>
- <% end if %>
-
- <BODY BGCOLOR="#000000" TEXT="#000000" TOPMARGIN=15 LINK="#000000" VLINK="#000000" ALINK="#000000">
-
- <FORM NAME="userform" ACTION="nngrped.asp" onSubmit="return false" METHOD="post">
-
- <TABLE BORDER=1 BGCOLOR="#CCCCCC" WIDTH=100% CELLPADDING=10>
-
- <TR><TD>
-
- <FONT SIZE=2 FACE="Arial">
-
- <P><IMG SRC="images/gnicttl.gif" ALIGN="textmiddle" HEIGHT=10 WIDTH=10> <FONT SIZE=2 FACE="Arial"><B>
-
- <% if (a = "new") then %>
- <% = L_ADD_LABELTXT %>
- <% else %>
- <% = L_EDIT_LABELTXT %>
- <% end if %>
-
- </B></FONT><FONT FACE="Times New Roman" SIZE=3><I> <% = svr %></I></FONT>
-
- <P>
-
- <INPUT TYPE="hidden" NAME="svr" VALUE="<% = svr %>">
- <INPUT TYPE="hidden" NAME="a" VALUE="<% = a %>">
-
- <% = L_NEWSGROUP_LABELTXT %>
-
- <% if (a = "new") then %>
- <INPUT NAME="Group" TYPE = "text" VALUE = "<% = Group %>" SIZE=25>
- <% else %>
- <% = Group %>
- <INPUT NAME="Group" TYPE = "hidden" VALUE = "<% = Group %>" SIZE=25>
- <% end if %>
-
- <P><% = L_DESCRIPTION_LABELTXT %>
-
- <INPUT NAME="txtDescription" TYPE = "text" VALUE="<% = GroupAdm.Description %>" SIZE = 25>
- <INPUT NAME ="hdnDescription" TYPE = "hidden" VALUE = "<% = GroupAdm.Description %>" >
-
- <P>
- <INPUT NAME="chkReadOnly" TYPE = "checkbox"
- <% if ( GroupAdm.ReadOnly = 1 ) then %> CHECKED <% end if %> >
-
- <% = L_READ_ONLY_LABELTXT %>
- <INPUT NAME="hdnReadOnly" TYPE = "hidden">
-
- <P>
- <INPUT NAME="chkModerated" TYPE = "checkbox"
- <% if ( GroupAdm.Moderator <> "" ) then %> CHECKED <% end if %>onClick = "maintainCheck();" >
-
- <% = L_MODERATED_LABELTXT %>
- <INPUT NAME="hdnModerated" TYPE = "hidden">
-
- <BLOCKQUOTE>
- <% = L_MODERATOR_LABELTXT %>
- <INPUT NAME="txtModerator" TYPE="text" onChange = "maintainText();" VALUE = "<% = GroupAdm.Moderator %>" SIZE=25>
- <INPUT NAME="hdnModerator" TYPE="hidden" VALUE = "<% = GroupAdm.Moderator %>">
- </BLOCKQUOTE>
-
- </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:onOk();">
- <IMG SRC="images/gnicok.gif" BORDER=0 ALIGN="top" HEIGHT=16 WIDTH=16></A>
- <A HREF="javascript:onOk();"><% = L_OK_LABELTXT %></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_LABELTXT %></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_HELP_LABELTXT %></A></B>
- </FONT>
- </TD>
- </TR>
-
- </TABLE></TD>
-
-
- <TD> </TD>
-
- </TR>
-
- </TABLE>
-
- <% end if %>
-
- </BODY>
- </HTML>
-
- <% end if %>