Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Make Page Only for Admin

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!
Before posting, make sure you have read this topic!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
leatherlips Posted - 31 July 2008 : 21:42:08
I have a pop up page that I only want accessible by moderators or admins. Right now if someone types in the URL they can see it. I want them to get a message saying the page is not able to be viewed by them.

I think it has to do with mlev = 2 or something but I don't know how to add it.<
6   L A T E S T    R E P L I E S    (Newest First)
leatherlips Posted - 01 August 2008 : 11:27:00
This bit of code is doing what I want:

If mLev < 3 Then
Response.Redirect("default.asp")
End If

Thanks!<
Etymon Posted - 01 August 2008 : 11:07:28
I remember the guys here talking about the "15916941253" part a long time ago and how the number is just an arbitrary number. I am pretty sure you can change it to what you want as long as you do it throughout your code. I think I also remember another person who made the number longer while another person made the number random with a generator.

From what I remember those statements are true.

Is that the question you were asking?



<
Andy Humm Posted - 01 August 2008 : 10:48:28
Mad, I found if you use the session check and the admin/moderator has time expired or not logged in, the popup window diverts to a full forum page with full header and full footer, all crammed into the small pop up window. No problems though if an external visitor types the popup window url into the browser window then the full page is ok.

This if mLev < 3 then Response.Redirect("default.asp") end if allows you to ignore time sessions etc and points the vistor to the default, straight away.<
MaD2ko0l Posted - 01 August 2008 : 10:21:30
so what does this bit fo code do then? its in all the admin_ pages

if Session(strCookieURL & "Approval") <> "15916941253" then
scriptname = split(request.servervariables("SCRIPT_NAME"),"/")
Response.Redirect "admin_login.asp?target=" & scriptname(ubound(scriptname))
end if
<
Etymon Posted - 31 July 2008 : 23:28:47
1 = Member
2 = Author
3 = Moderator
4 = Admin

What you have will work, but normally it would be:

if mLev < 3 then
   Response.Redirect("default.asp")
end if


<
leatherlips Posted - 31 July 2008 : 21:49:55
I found out the answer myself. At least I think this is the right way to do it. It appears to be working.

I added this near the top of the page after the includes:

If mLev < 2 Then
  Response.Redirect("default.asp")
End If
<

Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000 Version 3.4.07