Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 Make Page Only for Admin
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

leatherlips
Senior Member

USA
1838 Posts

Posted - 31 July 2008 :  21:42:08  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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.<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD

leatherlips
Senior Member

USA
1838 Posts

Posted - 31 July 2008 :  21:49:55  Show Profile  Visit leatherlips's Homepage  Reply with Quote
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
<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page

Etymon
Advanced Member

United States
2392 Posts

Posted - 31 July 2008 :  23:28:47  Show Profile  Visit Etymon's Homepage  Reply with Quote
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


<
Go to Top of Page

MaD2ko0l
Senior Member

United Kingdom
1053 Posts

Posted - 01 August 2008 :  10:21:30  Show Profile  Visit MaD2ko0l's Homepage  Reply with Quote
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
<

© 1999-2010 MaD2ko0l
Go to Top of Page

Andy Humm
Average Member

United Kingdom
908 Posts

Posted - 01 August 2008 :  10:48:28  Show Profile  Reply with Quote
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.<
Go to Top of Page

Etymon
Advanced Member

United States
2392 Posts

Posted - 01 August 2008 :  11:07:28  Show Profile  Visit Etymon's Homepage  Reply with Quote
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?



<

Edited by - Etymon on 01 August 2008 11:09:57
Go to Top of Page

leatherlips
Senior Member

USA
1838 Posts

Posted - 01 August 2008 :  11:27:00  Show Profile  Visit leatherlips's Homepage  Reply with Quote
This bit of code is doing what I want:

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

Thanks!<

Mangione Magic Forum - The Music of Chuck Mangione

My Mods: Googiespell MOD | Link To Reply MOD | Petition MOD | Contact Page MOD | Share This Topic MOD | MP3 MOD | PageEar MOD | Google Viewer MOD
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000 Version 3.4.07