how would I go about making two or three admin permissions for a portal admin. Say there's pages:
- Upload files (upload.php)
- Post news (news.php)
- Add/Remove Affiliates (affiliates.php)
- View/Delete Comments (comments.php)
They're all in a directory, protected from direct access using .htaccess (Thanks to Jason
Now, let's say I make ranks. Full Admin, News Admin and Moderator.
The full admin gets access to everything. News, can add and remove news, and also comments. Moderator will just have control over news.
I'm thinkin if the user tries to go to main.php?panel=affiliates. Then it checks it gets the username from the session, then connects to mysql, then gets the rank. If the rank is Mod, or NewsAdmin, then you get redirected to a 403 (lol, Access denied page).
Is there a better way of going about it? How about if I only want the admin to be limited from certain things, not the whole panel.
Thanks,
-Nay