CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 "You do not have permission..."

Print topic Send  topic

Author Message
Donna
Posted: 02/18/2002, 4:19 AM

Good Morning,
I would like to display a custom message (page?) when a logged-in user tries to view a page that they don't have permission for.

For example, "Donna" logs-in at the web site. She is security level 1. She then tries to open a security level 3 page (admin.php). How would I display a page/message in response to her attempt that says "You do not have permission to access this area."?

Thanks,
Donna

Nicole
Posted: 02/18/2002, 6:04 AM

Donna,
look at GotoCode AccessDenied page. It is almost the same you are talking about.

GotoCode is avaiable to downlaod at: http://www.codecharge.com/download/files/examples/gotocodev2.zip
Stuart Sammels
Posted: 02/18/2002, 7:40 PM

Try this also:

http://www.gotocode.com/art.asp?art_id=126&

Stuart
Donna
Posted: 02/19/2002, 12:57 PM

The link that Stuart provided is exactly what I'm trying to accomplish but it is written in asp and I'm using php. I have been trying to convert the code to php but have been unsuccessful. I have tried searching the internet for instructions on using setVar and have downloaded "asp2php" but nothing I've tried seems to work.

Does anyone here know how to convert this code? It would be greatly appreciated as I have run out of ideas!

// start code
if Session("UserID")<>"" then SetVar "access_message","<font face=""arial"" color=""red"" size=""2""><b>You don't have sufficient privileges to access this area.<br>Access Denied.</b></font>"
// end code


Thanks a million!!!
Nicole
Posted: 02/20/2002, 12:42 AM

PHP version is:

if (get_session("UserID") != "")
$tpl->set_var("access_message", "<font face=\"arial\" color=\"red\" size=\"2\"><b>You don't have sufficient privileges to access this area.<br>Access Denied.</b></font>");
Donna
Posted: 02/20/2002, 4:11 AM

Thank you Nicole & Stuart. It works like a charm! It also gave me a better understanding of how the code works.

THANKS AGAIN!

Donna

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.