Files
keliopanel-v4/web/myaccount.php
2016-02-21 14:28:40 +01:00

34 lines
1015 B
PHP
Executable File

<?php
require_once('../system/configuration.php');
require(PATH_SYSTEM.'core.php');
// test
try
{
$_SESSION['user']->userCheckAccess(LEVEL_REGISTER);
$_SESSION['template']->loadCSS(array('myaccount.css'));
$_SESSION['template']->loadJS(array('myaccount.js'));
// List of countries
$lang = new Lang();
$countries = $lang->listCountries();
if ( !$countries ) throw new myException('The list of countries can\'t be generated');
$_SESSION['template']->getWords(array('countries' => $countries));
// List of templates
$templates = unserialize(TEMPLATE_ALLOWED);
$_SESSION['template']->getWords(array('templates' => $templates));
// Template
$_SESSION['template']->loadTemplate('_contentbegin');
$_SESSION['template']->loadTemplate('myaccount');
$_SESSION['template']->loadTemplate('_contentend');
$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
$_SESSION['template']->parseTemplate();
} catch (myException $error) {
$error->displayErrorMessage();
}
?>