LICENSE & DOWNLOAD
Core Boxx is released under the MIT License. You are free to use it for personal and commercial projects, and modify it as you see fit. On the condition that the software is provided “as-is”. There are no warranties provided and “no strings attached”. Code Boxx and the authors are not liable for any claims, damages, or liabilities.
INSTALLATION
- Install the Users Module first.
- Copy/unzip this module into your existing Core Boxx project folder.
- Access
http://your-site.com/install/admin
, this will automatically:- Create a new
HOST_ADMIN
definition inlib/CORE-config.php
. - Add a new
$wild = [ "admin/" => "ADM-check.php" ]
line tolib/HOOK-Routes.php
. - Create your specified admin account.
- Delete
PAGE-install-admin.php
itself.
- Create a new
- After installing, login and access
http://your-site.com/admin
.
SORRY FOR THE ADS...
But someone has to pay the bills, and sponsors are paying for it. I insist on not turning Code Boxx into a "paid scripts" business, and I don't "block people with Adblock". Every little bit of support helps.
Buy Me A Coffee Code Boxx eBooks
FILES LIST
HTML TEMPLATE
pages/TEMPLATE-ADM-top.php
Admin template top half.pages/TEMPLATE-ADM-bottom.php
Admin template bottom half.
ADMIN PAGES
pages/ADM-check.php
Admin access and route handler.pages/ADM-home.php
Admin home page.
SETTINGS ADMIN
pages/ADM-settings.php
Manage settings page.assets/ADM-settings.php
Manage settings JS.
USERS ADMIN
pages/ADM-users.php
Manage users page.pages/ADM-users-list.php
AJAX loaded. List of users.pages/ADM-users-form.php
AJAX loaded. Add/edit user form.assets/ADM-users.php
Manage users JS.
Thank you, works perfectly!
Small typo: if (isset($_CORE->Session->data[“user”]) && $_CORE->Session->data[“user”][“user_role”]==”A”) {
SHOW ADMIN ITEMS
} // Should be [“user_level”]
Thank you again
Hi there,
I have tried to hide menu items based on user roles but am coming up short.
This is what i have tried:
mode==”A”){?>
System
<a class="nav-link ms-2" href="users”>
people Users
<a class="nav-link ms-2" href="settings”>
settings Settings
This however is hiding the menu for all users. I am trying to show it for Admins and hide it for normal Users
Thank you
Garth
Sorry, the filter cut out some of the snippet. What I usually do:
Yep, the session data and permission check is kind of unfriendly now. I will try to move this into $_SESSION in a future update, and simplify this a little more.