<?php
require_once('../system/configuration.php');
require(PATH_SYSTEM.'core.php');
try 
{

	$_SESSION['user']->userCheckAccess(LEVEL_CUSTOMER);
	$_SESSION['template']->loadCSS(array('myhostings.css'));
	$_SESSION['template']->loadJS(array('myhostings.js'));

	// Get total hostings pages for pagination links
	$pages_count = $_SESSION['hosting']->userCountTotalPages();
	$_SESSION['template']->getWords(array('pages_count' => $pages_count));
	
	
	// Template
	$_SESSION['template']->loadTemplate('_contentbegin');
	$_SESSION['template']->loadTemplate('myhostings');
	$_SESSION['template']->loadTemplate('_contentend');
	$_SESSION['template']->getWords(array('sql' => $_SESSION['database']->executed_req));
	$_SESSION['template']->parseTemplate();
} catch (myException $error) {
	$error->displayErrorMessage();
}
?>
