Print Page | Close Window

administration check failure.

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=2169
Printed Date: 29 March 2026 at 2:58pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: administration check failure.
Posted By: Badaboem
Subject: administration check failure.
Date Posted: 26 April 2003 at 1:23pm

I've used an administration check a while ago, but it doesn't seem to work now. I don't know if it's because of the final version of wwf or not. I've included the common.asp file.

There are two methods..the first one doesn't work, but I need it in that kinda structure. The second one works, but I can't use it on all pages due to the contents it has to protect.

<!--#include virtual="/xx/xx.asp" -->
<%If lngLoggedInUserID = 0 Then%>
 <!--#include Virtual="/xx/xx.asp" -->
 <% ELSE %>
ddddd
<%end if%>

  <%
'If the user is admin display a link to the admin memnu
If lngLoggedInUserID = 1 Then%>
hgjhgjgjhgjg
<%Else if inloggedInUserID = 0 then%>
 <!--#include Virtual="/xx/xx" --> <%End if%>
 <%End If%>

Any idea why the first one isn't working?





Replies:
Posted By: TYSON
Date Posted: 27 April 2003 at 12:56am

Unfortunatley ASP doesnt allow conditional <!--#include  --> statements, One way to do it would be like this,

<!--#include virtual="/xx/xx.asp" -->
<%
   If lngLoggedInUserID = 0 Then
       Server.Execute("your_Page_to_Include_here.asp")
   Else
      Repsonse.Write("dddd")
   End If
%>



-------------
http://www.fuo-motorsports.com/ - http://www.fuo-motorsports.com/



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