PEAR Articles

  Home arrow PEAR Articles arrow Building a Content Management System w...

Building a Content Management System with PEAR
By: David Web
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1

    Table of Contents:
  • Building a Content Management System with PEAR
  • The database structure
  • Tables
  • The PEAR::DB connection



    Building a Content Management System with PEAR

    (Page 1 of 4 )

    In the previous articles we looked at what PEAR is, how it works and how to install packages. We also explored various packages that we installed. One of these packages was called PEAR::DB. We will be using this database abstraction layer to build a CMS in the next couple of articles.

    Overview of CMS

    The CMS works like this: several authors will send in articles which are then processed, stored and displayed in the CMS. It follows these rules:

    • Anyone who wants to use the CMS must be authenticated. This ensures that only users that have the right to use the system are using it.

    • Different users will have different clearance levels. Some will have admin rights and others will not.

    • The CMS home page will display the latest five stories. Users can click on them to view the stories or articles in detail.


    The authentication section will consist of two scripts:

    Login.php - This script is responsible for authenticating a user; in other words, logging a user into the CMS system.

    Logout.php - This script is responsible for ending a user session, which basically means logging a user out of the CMS system.

    The main CMS section will contain the following four scripts:

    main.php - This script acts as the "door" to the CMS application. It is the first page that you will see when accessing the Content Management System.

    view.php - This script displays a user-selected article in full.

    authors.php - This script lists all the authors in the system. It also provides links to articles written by the author.

    authart.php - This script list all the articles written by a particular author.

    The admin section contains four scripts:

    Add_auth.php - This script adds a new author to the system.

    Delete.php - This script deletes an author from the system, including all articles written by the particular author.

    Index.php - This script displays a welcome message. It is the first screen that you will encounter when accessing the admin area.

    Listauth.php - This script displays the names of the authors that are in the system. It also provides a facility to remove authors from the system. When removing an author, all the articles that he or she wrote are also automatically removed.

    Other application-wide scripts include:

    pear.css - This script contains the styles for the site.

    main.dwt.php - This item provides the template for the entire Content Management System

    connx.php - This script contains the connection credentials of the application.

    More PEAR Articles Articles
    More By David Web

    blog comments powered by Disqus


    - Installing PEAR
    - PEAR: an Introduction
    - Managing robots.txt using PHP: Generating Dy...
    - Deleting Authors from a PEAR Content Managem...
    - PEAR CMS: Index and Delete Scripts
    - Listing Articles for a PEAR Content Manageme...
    - Building an Authors Page for a PEAR CMS
    - Building the View Details Page in a PEAR CMS
    - Creating the Main Pages of a PEAR CMS
    - Completing the Login Script for a PEAR CMS
    - User Authentication for a PEAR CMS
    - A PEAR CMS: Examining the Code
    - Building a Content Management System with PE...
    - Installing a PEAR Package
    - My PEAR: The Beginning

    Developer Shed Affiliates


    © 2003-2019 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap