Metropoli BBS
VIEWER: root.asp MODE: TEXT (ASCII)
<% @ LANGUAGE=VBSCRIPT CODEPAGE = 1252 %>
<!--#include file="constant.inc"-->
<!--#include file="lib/session.inc"-->
<% SendHeader 0, 1 %>
<!--#include file="lib/pageutil.inc"-->
<!--#include file="lib/jsutil.inc"-->
<%
'<!-- Microsoft Chat Web Admin -->
'<!-- Root.asp : Frameset for the Nav and Channel/User Windows -->
'<!-- Copyright (c) Microsoft Corporation 1993-1997. All rights reserved.-->

On Error Resume Next

urlString = Request.QueryString()
if urlString <> "" then urlString="?"+urlString
CheckSession bstrVirtRoot + "/root.asp" + urlString, "self"

InitPage
iChannelsPage = Session(CURRENT_CHANNELS_PAGE)
iBansPage = Session(CURRENT_BANS_PAGE)

urlWin = Request.QueryString("iwin")

If urlWin = "" Then
	Session(CURRENT_MAINWIN) = MAINWIN_SERVER
Else
	Session(CURRENT_MAINWIN) = CInt(urlWin)
End If

iCurrMainWin = Session(CURRENT_MAINWIN)

iPage = 1

Select Case iCurrMainWin
	Case MAINWIN_SERVER
		bstrMainFr = bstrVirtRoot + "/mainwin/server.asp"
	Case MAINWIN_INTRO
		bstrMainFr = bstrVirtRoot + "/mainwin/intro.asp"
	Case MAINWIN_SERVERMSG
		bstrMainFr = bstrVirtRoot + "/mainwin/server.asp"
	Case MAINWIN_CHANNEL
		iPage = iChannelsPage
		bstrMainFr = bstrVirtRoot + "/mainwin/magchan.asp"
	Case MAINWIN_BAN
		iPage = iBansPage
		bstrMainFr = bstrVirtRoot + "/mainwin/maguser.asp"
	Case Else
		bstrMainFr = bstrVirtRoot + "/mainwin/server.asp"
End Select

If isMSIE Then
	iTopNavBarColNumber = 34
Else
	iTopNavBarColNumber = 50	'46 - good when gif aligns to zero margin
End If

L_SideNavBarCol_Number = 225

%>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<SCRIPT LANGUAGE="Javascript">

var iCurrentPage = <%=iPage%>;
var iCurrMainWin = <%=iCurrMainWin%>;
var szCurrMainWin = "<%=bstrMainFr%>";

function refreshWindows(iWindow) {
	
    if (iWindow != iCurrMainWin)  {
		<% If isMSIE Then %>
			switchImages(iWindow);
			self.topnav_fr.location = "<%=bstrVirtRoot%>/navbar/topnav.asp?iwin="+iWindow;
			iCurrentPage = 1;
			refreshMainWindow(iWindow);
			iCurrMainWin = iWindow;

		<% Else %>
			self.location="<%=bstrVirtRoot%>/root.asp?iwin="+iWindow;
			if (iWindow == <%=MAINWIN_SERVERMSG%>)	// pop up server message
				openNewWindow("<%=bstrVirtRoot%>/forms/srvrmsg/frmroot.asp", "newMessageWindow", 400, 425);

		<% End If %>
	}

	//repeat click - refresh main window only
	else
		refreshMainWindow(iWindow);
}

function refreshMainWindow(iWindow)  {

	MF = self.main_fr;

	if (iWindow == <%=MAINWIN_INTRO%>) 
		MF.location="<%=bstrVirtRoot%>/mainwin/intro.asp";
	else if (iWindow == <%=MAINWIN_SERVERMSG%>)  {
		MF.location="<%=bstrVirtRoot%>/mainwin/server.asp";
		openNewWindow("<%=bstrVirtRoot%>/forms/srvrmsg/frmroot.asp", "newMessageWindow", 400, 425);
	}
	else if (iWindow == <%=MAINWIN_CHANNEL%>) 
		MF.location="<%=bstrVirtRoot%>/mainwin/magchan.asp?page=" + iCurrentPage;
	else if (iWindow == <%=MAINWIN_BAN%>) 
		MF.location="<%=bstrVirtRoot%>/mainwin/maguser.asp?page=" + iCurrentPage;
	else 
		MF.location="<%=bstrVirtRoot%>/mainwin/server.asp";
}

function switchImages(iWindow)  {

	SF = self.sidenav_fr;

	// change old main window image
	if (iCurrMainWin == <%=MAINWIN_SERVER%>)
		SF.document.images["server"].src = "<%=bstrVirtRoot%>/images/server.gif";
	else if (iCurrMainWin == <%=MAINWIN_INTRO%>)
		SF.document.images["intro"].src = "<%=bstrVirtRoot%>/images/clsfldr.gif";
	else if (iCurrMainWin == <%=MAINWIN_SERVERMSG%>)
		SF.document.images["servermsg"].src = "<%=bstrVirtRoot%>/images/clsfldr.gif";
	else if (iCurrMainWin == <%=MAINWIN_CHANNEL%>)
		SF.document.images["channel"].src = "<%=bstrVirtRoot%>/images/clsfldr.gif";
	else if (iCurrMainWin == <%=MAINWIN_BAN%>)
		SF.document.images["ban"].src = "<%=bstrVirtRoot%>/images/clsfldr.gif";

	// change new main window image, set szCurrMainWin
	if (iWindow == <%=MAINWIN_SERVER%>)  {
		SF.document.images["server"].src = "<%=bstrVirtRoot%>/images/opnfldr.gif";
		szCurrMainWin = "<%=bstrVirtRoot%>/mainwin/server.asp";
	}
	else if (iWindow == <%=MAINWIN_INTRO%>)  {
		SF.document.images["intro"].src = "<%=bstrVirtRoot%>/images/opnfldr.gif";
		szCurrMainWin = "<%=bstrVirtRoot%>/mainwin/intro.asp";
	}
	else if (iWindow == <%=MAINWIN_SERVERMSG%>)  {
		SF.document.images["servermsg"].src = "<%=bstrVirtRoot%>/images/opnfldr.gif";
		szCurrMainWin = "<%=bstrVirtRoot%>/mainwin/server.asp";
	}
	else if (iWindow == <%=MAINWIN_CHANNEL%>)  {
		SF.document.images["channel"].src = "<%=bstrVirtRoot%>/images/opnfldr.gif";
		szCurrMainWin = "<%=bstrVirtRoot%>/mainwin/magchan.asp";
	}
	else if (iWindow == <%=MAINWIN_BAN%>)  {
		SF.document.images["ban"].src = "<%=bstrVirtRoot%>/images/opnfldr.gif";
		szCurrMainWin = "<%=bstrVirtRoot%>/mainwin/maguser.asp";
	}
}

function composeWindow(iWin, iNum) {

// iNum - 0 for new channel or ban, otherwise indicate the item number

	if (iWin == <%=COMPOSE_CHANNEL%>)
		openNewWindow("<%=bstrVirtRoot%>/forms/mngchan/frmroot.asp?item=" + iNum,"newMessageWindow",400, 425);
	else if (iWin == <%=COMPOSE_BAN%>)
		openNewWindow("<%=bstrVirtRoot%>/forms/mngusr/frmroot.asp?item=" + iNum,"newMessageWindow",400, 425);
}

function logoff()  {
	self.location="<%=bstrVirtRoot%>/logoff.asp";
}

</SCRIPT>

<TITLE><%=L_ChatWebAccess_StaticText%></TITLE>
</HEAD>

<FRAMESET ROWS="<%=iTopNavBarColNumber%>,*"> 
	<FRAME SRC="<%=bstrVirtRoot%>/navbar/topnav.asp?iwin=<%=iCurrMainWin%>" name="topnav_fr" marginheight=1 marginwidth=1 scrolling=no frameborder=1 border=5>
	<FRAMESET COLS="<%=L_SideNavBarCol_Number%>,*">
		<FRAME SRC="<%=bstrVirtRoot%>/navbar/sidenav.asp?iwin=<%=iCurrMainWin%>" name="sidenav_fr" marginheight=1 marginwidth=1 scrolling=auto frameborder=1 border=5>
		<FRAME SRC="<%=bstrMainFr%>" name="main_fr" marginheight=1 marginwidth=1 scrolling=auto frameborder=1 border=5>
	</FRAMESET>
</FRAMESET>

<body text=000000>
<NOFRAMES>
Microsoft Chat Web Access must be viewed on a browser that supports frames. <br>
To obtain such a browser, please click <a href="http://www.microsoft.com/ie/download/" target="_blank">here</a> to 
download the Microsoft <a href="http://www.microsoft.com/ie/download" target="_blank"><b>Internet Explorer</a>.</b>  </p>
</NOFRAMES>
</body>

</HTML>
[ RETURN TO DIRECTORY ]