Here's a simple "must be logged in" mod. This mod prevents users who are not logged on from viewing pages that you select. If they view such a page, they get a message that they must be logged in to view that page and are then re-directed back to the main forum (default.asp) after a couple seconds.
Create a file named mustlogin.asp.
The contents of this file should be:
<%
'## Must Login Page
'## This page is to notify members that they must login
'## in order to view the page that sent them here
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<meta http-equiv="Refresh" content="2; URL=default.asp">
<p> </p>
<h2 align="center">You must be Logged On to view this page!</h2>
<p> </p>
<p align="center"><a href="default.asp">return to forum</a></p>
<%
my_Conn.Close
set my_Conn = nothing
%>
Place the mustlogin.asp file in your forum directory.
Now in any page you want to make viewable to members only, add the following code directly below the line at the top that reads <!--#INCLUDE FILE="inc_top.asp" -->:
<%
if mlev = 0 then
response.redirect "mustlogin.asp"
end if
%>
For example, to make the members page viewable to members only, edit the file members.asp to read like (added code in green):
'## PO Box 200
'## Harpswell, ME 04079
'#################################################################################
%>
<!--#INCLUDE FILE="config.asp" -->
<!--#INCLUDE FILE="inc_functions.asp" -->
<!--#INCLUDE FILE="inc_top.asp" -->
<%
if mlev = 0 then
response.redirect "mustlogin.asp"
end if
%>
<script language="JavaScript">
function ChangePage(i){
if (i == 1) {
document.PageNum1.submit();
-
*Interested in Radio Control*
*The RC Web Board - http://www.rcwebboard.com/*
Edited by - James on 15 May 2002 22:22:39