CodeCharge Studio
search Register Login  

Visual Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 Hiding Menu based on user security

Print topic Send  topic

Author Message
RipCurl
Posted: 04/11/2003, 7:55 PM

I've looked at http://www.gotocode.com/art.asp?art_id=54&
which i see referred to conscerning this matter, but it doesn't address menus and how to address "user sercurity" as designated by the DB.

Im working with CC 2.0.5 php + template (mysql db).

How can I hide a menu based on a user's security level (ie show it only to level 3 users)
RipCurl
Posted: 04/11/2003, 8:16 PM

if (_condition_) {
$tpl->set_var("Formadminmenu","");
return;
}


Is the code, just want to know what to put in place of _condition_
the only "security" that i see mentioned in the coding in the php file is pagesecurity
DaveRexel
Posted: 04/12/2003, 10:44 PM

Please read this entry in the CCS KnowledgeBase

http://www.rexdesign.com/ccs/kb.php?language_id=7&categ...=36&event_id=63

Greetings
Dave
Karen
Posted: 04/13/2003, 12:48 AM

This was how I did it. It doesn't look so nice (as though there's a small hole there) but it works.

Instead of using a URL field for your menu element, set it to Label type and check 'html'.

In the Form/Before Show event, code something like this:
if(get_session("UserRights") == 1)
$fld<menu_item> = "";
else
$fld<menu_item> = "<a href = 'Some_link.php'><font class='DataFONT'><img border='0' src='some_image.jpg'></font></a>";

I hope this helps.

   


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.