HomeMySQL Creating the Admin Script for a PHP/MySQL Blogging System
Creating the Admin Script for a PHP/MySQL Blogging System
In this part of the series we will be writing the administration of the blog. The idea is to give the owner of the blog the ability to manage the blog by being able to remove users and articles as required, or to alter the status of users by upgrading them to admin status or banning them. It is also a place where the administrator can start new topics that will then garner their own replies.
A downloadable file for this article can be found here.
The administration area can only be accessed by users with a administration level access. The admin area will consist of only one page, where all actions are going to be performed. The navigation panel will be on the right and the rest of the page will be used for showing the outcome of the various functions.
The navigation panel will contain among other things the name of the person that is logged in, with two sections with links. The first section will deal with messages. This includes creating a new topic, listing all the main messages in the blog and listing the different topic categories.
The next section will deal with user management. This includes creating a new user or adding a user and listing all users in the database. Both of the listing links(user listing and message listing) will allow you to do further operations on the listings.
Each link will submit a link variable called action, which will activate a function which will be called by the switch structure that is written in the main.php page. All of the functions are defined in the functions.php page.