Пример #1
0
$site_path = realpath(dirname(__FILE__));
define('__SITE_PATH', $site_path);
/*{START_PHP_INI_PATH}*/
define('__PHP_PATH', realpath(__SITE_PATH . '/../uthando/php'));
/*{END_PHP_INI_PATH}*/
// Set include paths.
$ini_path = '.' . PATH_SEPARATOR . __PHP_PATH . PATH_SEPARATOR . __PHP_PATH . '/PEAR' . PATH_SEPARATOR . __PHP_PATH . '/Uthando' . PATH_SEPARATOR . __PHP_PATH . '/Uthando/functions' . PATH_SEPARATOR . __SITE_PATH . '/modules' . PATH_SEPARATOR . __SITE_PATH . '/components';
set_include_path($ini_path);
// Include functions.
require_once 'functions.php';
$timer = new Benchmark_Timer();
$timer->start();
$registry = new Registry();
require 'Dbug/FirePHP.class.php';
$registry->firephp = FirePHP::getInstance(true);
$registry->setSite(realpath(__SITE_PATH . '/../uthando/ini/uthandoSites.ini.php'));
$registry->loadIniFile('uthando', 'config');
$registry->setDefaults();
if ($registry->get('config.server.compat_router')) {
    require_once 'includes/CompatRouter.php';
}
$uthando = new Uthando($registry);
$registry->template = new HTML_Template($registry, $registry->get('config.site.template'));
$registry->template->addParameter('merchant_name', $registry->get('config.server.site_name'));
$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;
Пример #2
0
define('PUB', BASE . DS . 'Public' . DS);
define('CLASSES', BASE . DS . 'Uthando-Classes' . DS);
define('MODULES', BASE . DS . 'Uthando-Lib' . DS . 'modules' . DS);
define('COMPONENTS', BASE . DS . 'Uthando-Lib' . DS . 'components' . DS . 'public' . DS);
define('FUNCS', BASE . DS . 'Uthando-Lib' . DS . 'functions' . DS);
define('TEMPLATES', BASE . DS . 'Uthando-Templates' . DS);
define('SCHEME', isset($_SERVER['HTTPS']) ? 'https://' : 'http://');
define('HOST', $_SERVER['HTTP_HOST']);
define('REQUEST_URI', $_SERVER['REQUEST_URI']);
// Set include paths.
$ini_path = get_include_path() . PS . CLASSES . PS . FUNCS . PS . MODULES . PS . COMPONENTS;
set_include_path($ini_path);
// Include functions.
require_once 'functions.php';
$registry = new Registry($_GET['path']);
$registry->setSite(BASE . DS . 'Uthando-ini' . DS . 'UthandoSites.ini' . EXT);
$registry->loadIniFile('uthando', 'config');
$registry->setDefaults();
$uthando = new Uthando($registry);
$uthando->timer = new Benchmark_Timer();
$uthando->timer->start();
$registry->template = new AjaxContent($registry);
$registry->template->setTemplate('/home/' . $registry->get('settings.dir') . '/Public/' . $registry->get('settings.resolve') . '/template_files/html/ajax_content.php');
$registry->template->addParameter('merchant_name', $registry->get('config.server.site_name'));
$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;