Core Boxx – Admin Panel

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.

Download Core Boxx Admin Panel | GitHubSource Forge

 

INSTALLATION & REQUIREMENTS

  • Install the “main” Core Boxx and the user module first.
  • Unzip this module into your existing Core Boxx project folder.
  • Copy the snippet from lib/CORE-Config.add to lib/CORE-Config.php.
  • Copy the snippet from lib/HOOK-Routes.add to lib/HOOK-Routes.php.
  • Create an admin account first, then access http://yoursite.com/admin.

 

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.

 

3 thoughts on “Core Boxx – Admin Panel”

  1. 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

  2. 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

    1. Sorry, the filter cut out some of the snippet. What I usually do:

      if (isset($_CORE->Session->data["user"]) && $_CORE->Session->data["user"]["user_role"]=="A") {
        SHOW ADMIN ITEMS
      }

      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.

Leave a Comment

Your email address will not be published. Required fields are marked *