StrangeOne101 / BB-Team-Section-Camp

The website for the 2017 Boys Brigade "Team Section Camp"
0 stars 0 forks source link

Admin Page #4

Closed StrangeOne101 closed 6 years ago

StrangeOne101 commented 7 years ago

What is it

A page that allows the team to do things with the site all in one place. This includes things like, but is not limited to:

This page can be expanded on in the future. It will be safeguarded with either user logins (via sessions) or via a simple password entry.

Login Page

The login page is a must for the admin page, so normal users cannot access it. Multiple users can be set up on this, which will be stored in a table. The table will be in the following format:

`RegisterID` SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY - The auto ID
`Email` VARCHAR(50) - The email used to login
`PasswordHash` VARCHAR(255) - The hash of a users password. 
`PermissionLevel` TINYINT UNSIGNED DEFAULT 0 - The permission of a user.

See here for more info on password hashing.

Data edit page

There will be a page where users can edit the data in the database. They will be able to simply click the fields, modify the data, then click save.

Furthermore, the data changed should be logged in a table. The table should be in the following format:

`ChangeID` SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY - The ID of the change. For reverting.
`RegisterID` SMALLINT UNSIGNED - The ID of the user who changed the data
`TableName` VARCHAR(24) - The name of the table modified
`FieldName` VARCHAR(24) - The name of the field modified
`ValueBefore` VARCHAR(512) - The value of the data before
`ValueAfter` VARCHAR(512) - The value of the data after the change
`Modified` DATETIME - The time the change occurred.
StrangeOne101 commented 6 years ago

Issue closed for now, and in its place, a new "Admin Panel" label will be made to separate new features and issues for the admin panel.