Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Show/Hide Links

Guest
Aug 27, 2008 Aug 27, 2008
I am creating an employee site with DWCS3 for my school district. I am using php with a mysql database. I am not really skilled in mysql or php. The Tech Serv dept created the database. I have been able to connect to the employee database with DW and users can login using the login page I created with DW. Each user also has an access level, either staff or administrator (admin). I know that I can restrict access to an administrator page based on username, password, and access level. However, I have been asked to not even have the administrator link visible on the index.php page if a person is not logged in as an administrator. What is wanted is for an individual to login and if they are at the staff access level, then they will see all the links to other areas on the employee site except the link for administrators. If an administrator logs in, that person will see all the links everyone else sees and a link - Administrator - and then have access to those pages as well. I thought this had something to do with regions, but I can't figure it out. Can anyone explain how I might do this.
Thank you,
--Linda
TOPICS
Server side applications
322
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 27, 2008 Aug 27, 2008
Here is some info on the restrict access behavior
http://www.communitymx.com/content/article.cfm?cid=CEE05
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 28, 2008 Aug 28, 2008
LATEST
agldgs wrote:
> If an administrator
> logs in, that person will see all the links everyone else sees and a link -
> Administrator - and then have access to those pages as well. I thought this had
> something to do with regions, but I can't figure it out.

It's a simple conditional statement.

if ($_SESSION['MM_UserGroup'] == 'administrator') {
// show links for administrators only
}

Replace 'administrator' with whatever you use for the admin access level.

--
David Powers, Adobe Community Expert
Author, "The Essential Guide to Dreamweaver CS3" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines