Global class
<?php
require_once "config_class.php";
require_once "checkvalid_class.php";
require_once "database_class.php";
abstract class GlobalClass {
private $db;
private $table_name;
protected $config;
protected $valid;
protected function __construct ($table_name, $db) {
$this ->db = $db;
$this ->table_name = $table_name;
$this ->config = new Config ();
$this ->valid = new CheckValid();
}
Modules
<?php
require_once "config_class.php";
require_once "article_class.php";
require_once "section_class.php";
require_once "user_class.php";
require_once "menu_class.php";
require_once "banner_class.php";
require_once "message_class.php";
abstract class Modules
{
protected $config;
protected $article;
protected $section;
protected $user;
protected $menu;
protected $banner;
protected $message;
protected $data;
public function __construct($db){
session_start();
$this->config = new Config($db);
26 $this->article = new Article($db);
$this->section = new Section($db);
$this->user = new User($db);
$this->menu = new Menu($db);
$this->banner = new Banner($db);
$this->message = new Message();
$this->data = $this->secureData($_GET);
}