Ejemplo n.º 1
0
$registry->template = new HTML_Template($registry, $registry->get('admin_config.site.template'));
require 'Dbug/FirePHP.class.php';
$registry->firephp = FirePHP::getInstance(true);
try {
    $registry->db = new DB_Admin($registry);
    $registry->session = new Session($registry);
    UthandoUser::setUserInfo();
    if ($uthando->authorize()) {
        $registry->template->addParameter('login_status', 'You are logged in as: ' . $_SESSION['username']);
        // Load component.
        $uthando->loadComponent();
        // Get Modules and add them.
        $uthando->addModules();
    } else {
        // set action and path.
        if ($uthando->getPath() != "/user/login") {
            $registry->path = "/user/login";
            $registry->component = "user";
            $registry->action = "login";
        }
        $uthando->loadComponent();
    }
} catch (PDOException $e) {
    $registry->Error($e->getMessage());
}
$timer->stop();
$timer_result = $timer->getProfiling();
$registry->template->addParameter('benchmark', "Page generated in {$timer_result[1]['total']} seconds.");
$registry->firephp->log($_SESSION);
//$registry->firephp->log($uthando);
$registry->firephp->log($registry);