Example #1
0
<?php

include_once "classes/Controller.php";
include_once "classes/shapes/Shape.php";
include_once "classes/shapes/Circle.php";
include_once "classes/shapes/Square.php";
classes\Controller::instance()->init();
Example #2
0
<?php

error_reporting(E_ALL);
include 'functions/autoloader.php';
$controller = new classes\Controller();
// The controller will handle the config info and manage DB access & Session Information.
if (!empty($_REQUEST['ajax'])) {
    echo $controller->getAjax($_REQUEST['ajax']);
    die;
}
// I hate notices so handle undefined variable.
if (empty($_GET['page'])) {
    $_GET['page'] = 'home';
}
// The controller will override the page if the user isn't logged in.
echo $controller->getPage($_GET['page']);