home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 1998 February
/
CHIP_2_98.iso
/
software
/
pelne
/
optionp
/
ins.cab
/
nnemnu.asp
< prev
next >
Wrap
Text File
|
1997-10-12
|
9KB
|
343 lines
<% Response.Expires = 0 %>
<%
REM LOCALIZATION
L_PAGETITLE_TEXT = "Microsoft News Server Administration"
L_UNSAVEDCHANGES_TEXT = "You have unsaved property changes. Do you want to save them now?"
L_SERVER_TEXT = "Server"
L_INVALIDACCOUNT_TEXT = "Invalid account name."
L_INVALIDPASSWORD_TEXT = "Invalid password."
L_FEED_TEXT = "Feed"
L_PROPERTIES_TEXT = "Properties"
L_SUBS_TEXT = "Subscriptions"
L_SCHEDULE_TEXT = "Schedule"
L_SECURITY_TEXT = "Security"
L_NEWS_TEXT = "News"
L_SERVERS_TEXT = "Services"
L_SERVICE_TEXT = "Service"
L_SESSIONS_TEXT = "Sessions"
L_GENERAL_TEXT = "NNTP Settings"
L_FEEDS_TEXT = "Feeds"
L_EXPIRATION_TEXT = "Expiration"
L_GROUPS_TEXT = "Groups"
L_DIRECTORIES_TEXT = "Directories"
L_DIRSECURITY_TEXT = "Security"
L_HOMEDIRECTORY_TEXT = "Home Directory"
L_POLICY_TEXT = "Policy"
L_NEWSGROUPS_TEXT = "Newsgroups"
L_ACCESSDENIED_ERRORMESSAGE = "Error: Access is Denied."
L_UNSAVED_PROP_CHANGES_TEXT = "You have unsaved property changes. Do you want to save them now?"
CHANGELEVEL_TEXT = "changelevel" 'internal string do NOT localize
SAVE_TEXT = "save" 'internal string do NOT localize
CLOSE_TEXT = "close" 'internal string do NOT localize
TRUE_TEXT = "true" 'internal string do NOT localize
FALSE_TEXT = "false" 'internal string do NOT localize
REM END LOCALIZATION
%>
<% REM Get variables %>
<% REM svr = Server name %>
<% REM save = Action to be performed by server-side code %>
<% REM id = ID of expiration policy %>
<% REM chpg = Page to be loaded in top level %>
<% REM pg = Current page in main frame %>
<% save = Request("save") %>
<% svr = Session("svr") %>
<% id = Cint(Request("id")) %>
<% chpg = Request("chpg") %>
<% pg = Request("pg") %>
<% REM If no main page is selected, set to Policy page %>
<% if (pg = "") then %>
<% pg = "nnexppl" %>
<% end if %>
<!--#include file="_cnst.asp" -->
<% if (cont = true) then %>
<% REM CREATE EXPIRATION OBJECT %>
<% Set ExpireObj = Server.CreateObject("NntpAdm.Expiration") %>
<% if Err <> 0 then %>
<script language="javascript">
<p>
<% = L_ACCESSDENIED_ERRORMESSAGE %>
alert("<% = Err.description %> ");
</script>
<% end if %>
<% REM GET SERVER NAME %>
<% ExpireObj.Server = svr %>
<% REM SET SERVICE INSTANCE %>
<% ExpireObj.ServiceInstance = Session("ServiceInstance") %>
<% REM ENUMERATE EXPIRE OBJECTS %>
<% ExpireObj.Enumerate %>
<% REM FIND OBJECT WHICH MATCHES ID %>
<% index = ExpireObj.FindID(id) %>
<% REM GET OBJECT WHICH MATCHES ID %>
<% On Error Resume Next %>
<% ExpireObj.GetNth (index) %>
<% if (Err <> 0) then %>
<script language="javascript">
alert("<% = Err.description %> ");
</script>
<% end if %>
<HTML>
<HEAD>
<SCRIPT LANGUAGE="javascript">
function changeToolbar(pg)
{
tlpg = parent.frames[3].document.hiddenform.pg.value;
if (tlpg != pg)
{
if ((pg == "nnser") || (pg == "nngen") || (pg == "nnlog") || (pg == "nnadv") || (pg == "nnexppl"))
{
if ((tlpg != "nnser") && (tlpg != "nngen") && (tlpg != "nnlog") && (tlpg != "nnadv") && (tlpg != "nnexppl"))
{
return true;
}
}
else {
if ((pg == "nnf") || (pg == "nnexp") || (pg == "nndir") || (pg == "nnexpg"))
{
if ((tlpg != "nnf") && (tlpg != "nnexp") && (tlpg != "nndir") && (tlpg != "nnexpg"))
{
return true;
}
}
else
{
if ((pg == "nnses") && (tlpg != "nnses"))
{
return true;
}
else
{
if ((pg == "nngrp") && (tlpg != "nngrp"))
{
return true;
}
}
}
}
}
return false;
}
function expPage(pg)
{
if (pg != document.hiddenform.pg.value)
{
document.hiddenform.pg.value = pg;
document.hiddenform.helpfilename.value = "help/" + pg + "h.htm";
if (document.hiddenform.updated.value == "<% = TRUE_TEXT %>")
{
document.hiddenform.updated.value = "<% = FALSE_TEXT %>";
if (confirm("<% = L_UNSAVED_PROP_CHANGES_TEXT %>"))
{
document.hiddenform.submit();
}
else
{
self.location = "nnemnu.asp?svr=<% = svr %>&id=<% = id %>&pg=" + pg;
}
}
else
{
if (changeToolbar(pg))
{
top.frames[3].location = "nntl.asp?svr=<% = svr %>&pg=" + pg;
}
top.frames[2].location = "nneredir.asp?svr=<% = svr %>&id=<% = id %>&pg=" + pg;
}
}
}
function changeLevel(chpg)
{
if (document.hiddenform.updated.value == "<% = TRUE_TEXT %>")
{
document.hiddenform.updated.value = "<% = FALSE_TEXT %>";
if (confirm("<% = L_UNSAVED_PROP_CHANGES_TEXT %>"))
{
document.hiddenform.chpg.value = chpg;
document.hiddenform.save.value = "<% = CHANGELEVEL_TEXT %>";
document.hiddenform.submit();
}
else
{
self.location = "nnmnu.asp?svr=<% = svr %>&pg=" + chpg;
}
}
else
{
self.location = "nnmnu.asp?svr=<% = svr %>&pg=" + chpg;
}
}
<% REM Javascript function changeSrv displays main tree control window %>
<% REM "nnadv.asp" with the currently selected server %>
function changeSrv()
{
top.location = "nnadv.asp?svr=<% = svr %>";
}
function verifyChange()
{
if (document.hiddenform.updated.value == "<% = TRUE_TEXT %>")
{
if (confirm("<% = L_UNSAVED_PROP_CHANGES_TEXT %>"))
{
document.hiddenform.save.value = "<% = CLOSE_TEXT %>";
document.hiddenform.submit();
}
}
}
<% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then %>
function imgAct(num)
{
document.toc.location = "nnemnus.asp?sel=" + num;
}
<% else %>
function imgAct(imgName)
{
document.nnexppl.src = "images/gnictoc0.gif";
document.nnexpg.src = "images/gnictoc0.gif";
document [imgName].src = "images/gnictoc1.gif";
}
<% end if %>
</SCRIPT>
<TITLE><% = L_PAGETITLE_TEXT %></TITLE>
</HEAD>
<BODY BACKGROUND="images/gnback.gif" LINK="#FFCC00" TEXT="#CCCCCC" ALINK="#FFCC00" VLINK="#FFCC00" BGCOLOR="#000000" LEFTMARGIN=10 TOPMARGIN=10 onUnload="verifyChange();">
<% if ((save = SAVE_TEXT) OR (save = CLOSE_TEXT) OR (save = CHANGELEVEL_TEXT)) then %>
<% ExpTime = Request("ExpTime") %>
<% ExpSizeHorizon = Request("ExpSizeHorizon") %>
<% if ((ExpTime <> "") AND (ExpSizeHorizon <> "")) then %>
<% if (ExpTime = "-1") then %>
<% ExpireObj.ExpireTime = -1 %>
<% else %>
<% ExpireObj.ExpireTime = (ExpTime * 24) %>
<% end if %>
<% ExpireObj.ExpireSize = ExpSizeHorizon %>
<% elseif ((ExpTime <> "") and (ExpSizeHorizon = "")) then %>
<% if (ExpTime = "-1") then %>
<% ExpireObj.ExpireTime = -1 %>
<% else %>
<% ExpireObj.ExpireTime = (ExpTime * 24) %>
<% end if %>
<% ExpireObj.ExpireSize = -1 %>
<% else %>
<% ExpireObj.ExpireTime = -1 %>
<% ExpireObj.ExpireSize = ExpSizeHorizon %>
<% end if %>
<% On Error Resume Next %>
<% ExpireObj.Set %>
<% if (Err <> 0) then %>
<script language="javascript">
alert("<% = Err.description %> " );
</script>
<% end if %>
<% if (Error <> 0) then %>
<SCRIPT LANGUAGE="javascript">
alert ("<% = nntp.ErrorToString ( Error ) %>" );
</SCRIPT>
<% end if %>
<% if (a = CHANGELEVEL_TEXT) then %>
<SCRIPT LANGUAGE="javascript">
self.location = "nnmnu.asp?svr=<% = svr %>&pg=<% = chpg %>";
</SCRIPT>
<% end if %>
<% end if %>
<% REM Determine browser to use either floating frame nav arrow (IE) or image replacement nav arrow (Netscape) %>
<% if Instr(Request.ServerVariables("HTTP_USER_AGENT"),"MSIE") then %>
<% browser = "ms" %>
<% if (pg = "nnexppl") then %>
<% num = 1 %>
<% elseif (pg = "nnexpg") then %>
<% num = 2 %>
<% end if %>
<!--#include file="nnemnums.asp"-->
<% else %>
<% browser = "ns" %>
<!--#include file="nnemnuns.asp"-->
<% end if %>
<FORM NAME="hiddenform" ACTION="nnemnu.asp" METHOD="post">
<INPUT TYPE="hidden" NAME="save" VALUE="<% = SAVE_TEXT %>">
<INPUT TYPE="hidden" NAME="pg" VALUE="<% = pg %>">
<INPUT TYPE="hidden" NAME="chpg" VALUE="<% = chpg %>">
<INPUT TYPE="hidden" NAME="svr" VALUE="<% = svr %>">
<INPUT TYPE="hidden" NAME="updated" VALUE="<% = FALSE_TEXT %>">
<INPUT TYPE="hidden" NAME="id" VALUE="<% = id %>">
<INPUT TYPE="hidden" NAME="helpfilename" VALUE="help/<% = pg %>h.htm">
<% if (ExpireObj.ExpireTime = -1) then %>
<INPUT NAME="ExpTime" TYPE="hidden" VALUE="-1">
<% else %>
<INPUT NAME="ExpTime" TYPE="hidden" VALUE="<% = (ExpireObj.ExpireTime / 24) %>">
<% end if %>
<INPUT NAME="ExpSizeHorizon" TYPE="hidden" VALUE="<% = ExpireObj.ExpireSize %>">
<% if ((save <> CLOSE_TEXT) AND (save <> CHANGELEVEL_TEXT)) then %>
<SCRIPT LANGUAGE="javascript">
top.main.location = "nneredir.asp?svr=<% = svr %>&id=<% = id %>&pg=<% = pg %>";
</SCRIPT>
<% end if %>
</FORM>
<% if (browser = "ns") then %>
<SCRIPT LANGUAGE="javascript">
imgAct("<% = pg %>");
</SCRIPT>
<% end if %>
</BODY>
</HTML>
<% end if %>