inv_admin_pages +-----+-------+--------------------------+ | PID | Title | File | +-----+-------+--------------------------+ | 1 | Login | includes/pages/login.php | +-----+-------+--------------------------+ | 2 | Home | includes/pages/home.php | +-----+-------+--------------------------+ | 3 | Users | includes/pages/users.php | +-----+-------+--------------------------+ inv_admin_masks - every page,subsection BitWise Mask PID refers to the inv_admin_pages +----+---------+-----+--------+ | ID | Bitwise | PID | OP | +----+---------+-----+--------+ | 1 | 1 | 1 | | No SubSection ( OP ) will Show the Login Form +----+---------+-----+--------+ | 2 | 2 | 1 | Login | SubSection called Login will Log the user in +----+---------+-----+--------+ | 3 | 4 | 1 | Logout | SubSection of Logout will Log the user out - Subsections still use the page ( login.php ) +----+---------+-----+--------+ | 4 | 1 | 2 | | No Subsection Needed - Admin Home page just shows Stats/Admin Notes etc +----+---------+-----+--------+ | 5 | 1 | 3 | View | SubSection of View will list the current users +----+---------+-----+--------+ | 6 | 2 | 3 | Edit | SubSection of Edit - URL will look like index.php?pid=3&op=edit&id=1 - This means it will show details for that User +----+---------+-----+--------+ | 7 | 4 | 3 | Delete | SubSection of Delete - URL: index.php?pid=3&op=delete&id=1 - Means it will delete user 1 +----+---------+-----+--------+ | 8 | 8 | 3 | Add | SubSection of Add will allow the Admin/User to Add another user +----+---------+-----+--------+ inv_users +----+----------+ | ID | Username | +----+----------+ | 1 | Test | +----+----------+ | 2 | Fred | +----+----------+ +----+----------+-------+ | ID | PID | Mask | +----+----------+-------+ | 1 | 1 | 7 | +----+----------+-------+ | 2 | 1 | 7 | +----+----------+-------+ | 2 | 2 | 1 | +----+----------+-------+ | 2 | 3 | 15 | +----+----------+-------+