Files
VestaCP/web/vesta/app.init.php

41 lines
1.2 KiB
PHP
Raw Normal View History

2011-06-14 00:22:25 +03:00
<?php
define('VESTA_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR);
2011-06-14 00:22:25 +03:00
define('V_ROOT_DIR', dirname(__FILE__) . DIRECTORY_SEPARATOR);
require_once V_ROOT_DIR . 'config/Config.class.php';
2011-09-10 00:31:30 +03:00
require_once V_ROOT_DIR . 'core/utils/Utils.class.php';
require_once V_ROOT_DIR . 'core/VestaSession.class.php';
2011-06-14 00:22:25 +03:00
require_once V_ROOT_DIR . 'core/Vesta.class.php';
require_once V_ROOT_DIR . 'core/exceptions/SystemException.class.php';
require_once V_ROOT_DIR . 'core/exceptions/ProtectionException.class.php';
require_once V_ROOT_DIR . 'core/utils/Message.class.php';
require_once V_ROOT_DIR . 'core/Request.class.php';
require_once V_ROOT_DIR . 'api/AjaxHandler.php';
/**
* App execution
*
* @author Malishev Dima <dima.malishev@gmail.com>
2011-06-14 00:22:25 +03:00
* @author vesta, http://vestacp.com/
* @copyright vesta 2010-2011
2011-06-14 00:22:25 +03:00
*/
try {
// Execution
AjaxHandler::makeReply(
2011-09-10 00:31:30 +03:00
AjaxHandler::getInstance()->dispatch(new Request())
2011-06-14 00:22:25 +03:00
);
}
//
// Errors handling
//
catch (SystemException $e) {
AjaxHandler::systemError($e);
}
catch (ProtectionException $e) {
AjaxHandler::protectionError($e);
}
catch (Exception $e) {
AjaxHandler::generalError($e);
}