Print Page | Close Window

Must be logged in to view

Printed From: Web Wiz Forums
Category: Web Wiz Web App Support Forums
Forum Name: Web Wiz Forums Modifications
Forum Description: Mod's and Add-on's for Web Wiz Forums.
URL: https://forums.webwiz.net/forum_posts.asp?TID=21871
Printed Date: 29 March 2026 at 10:54pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Must be logged in to view
Posted By: Exis
Subject: Must be logged in to view
Date Posted: 08 November 2006 at 11:28am
Hello everyone,

Just a quick question. Is there anyway I can insert an include into anyone of my homepages which when you visit, you must be logged into WebWiz to view?

IE: You must log into the message boards to view certain pages on my websites. Understand?

Any help would be greatly appreciated!

Many Thanks



Replies:
Posted By: JasonPEC
Date Posted: 08 November 2006 at 2:30pm
I use this code to redirect anyone that's not logged into the forum to the forum login page and denies access to the page they're trying to view until they log in (the page you place this code on must have an .asp extension):
 
<!--#include virtual="/forum/common.asp" -->
 
<%
If lngLoggedInUserID = 2 then
   response.redirect("/forum/login_user.asp")
End If
%>
 
Your file paths may differ.


-------------
http://www.surfgeeks.com" rel="nofollow - SurfGeeks.com


Posted By: Exis
Date Posted: 08 November 2006 at 4:33pm
Fantastic, Thanks jason Thumbs%20Up


Posted By: JasonPEC
Date Posted: 08 November 2006 at 6:05pm
Originally posted by Exis Exis wrote:

Fantastic, Thanks jason Thumbs%20Up
 
You're welcome. Hope it works for you.


-------------
http://www.surfgeeks.com" rel="nofollow - SurfGeeks.com


Posted By: Scotty32
Date Posted: 08 November 2006 at 6:08pm
i would recommend closing the connections to the database


<!--#include virtual="/forum/common.asp" -->
 
<%
If lngLoggedInUserID = 2 then
   'Release server objects
   Call closeDatabase()

   response.redirect("/forum/login_user.asp")
End If
%>


and then once your finished with the DB on your page close it using this (the part in red above basically)

<%
   'Release server objects
   Call closeDatabase()
%>



-------------
S2H.co.uk - http://www.s2h.co.uk/wwf/" rel="nofollow - WebWiz Mods and Skins

For support on my mods + skins, please use http://www.s2h.co.uk/forum/" rel="nofollow - my forum .


Posted By: Exis
Date Posted: 08 November 2006 at 7:16pm
Perfect! Working fine! Thanks to both of you. Thumbs%20Up



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net