Example #1
0
require_once "app/controllers/application_controller.php";
require_once "app/controllers/ringside_controller.php";
require_once "app/controllers/apps.php";
require_once "app/controllers/communities.php";
require_once "app/controllers/welcome.php";
// Automatically find controllers
// spl_autoload_register('admin_autoload');
// function admin_autoload($class_name)
// {
//   $_path = "app/controllers/" . strtolower($class_name) . '.php';
//   if(file_exists($_path))
//     require_once $_path;
// }
//require_once "app/controllers/welcome.php";
if (isset($_GET['apps'])) {
    $action = new Apps();
} elseif (isset($_GET['communities'])) {
    $action = new Communities();
} else {
    $action = new Welcome();
}
Application_Controller::$controllers = array("Apps", "Communities", "Welcome");
//$action->setLocalClient( true );
//$user = $action->client->require_login();
$action->render();
?>

<br><br>

<?php 
//print_r(Application_Controller::$controllers);