$uthando->setTemplate(__SITE_PATH . '/templates/' . $registry->template . '/ajax_content.php'); $uthando->AddParameter('MERCHANT_NAME', $registry->config->get('site_name', 'SERVER')); $registry->session = new Session($registry); UthandoUser::setUserInfo(); if (UthandoUser::authorize()) { $registry->loggedInUser = true; $uthando->AddParameter('LOGIN_STATUS', "<p>You are logged in as: " . $_SESSION['name'] . "</p>"); } else { $registry->loggedInUser = false; } try { $registry->db = new UthandoDB($registry); // Load component. $uthando->loadComponent(); // Get Modules and add them. $uthando->addModules(); } catch (PDOException $e) { $registry->Error($e->getMessage(), $e); } if ($registry->component_css) { foreach ($registry->component_css as $id => $filename) { $uthando->AddScript('CSS', 'if (!$defined($("' . $id . '"))) new Asset.css("' . $filename . '", {id: "' . $id . '"});', true); } } $uthando->timer->stop(); $timer_result = $uthando->timer->getProfiling(); $uthando->AddScript('BENCHMARK', "Page generated in {$timer_result[1]['total']} seconds."); $uthando->display(); $registry->db = null; unset($uthando, $registry); ob_end_flush();