function boot()
 {
     $GLOBALS['__localization_disable_formatting__'] = false;
     $GLOBALS['application'] = new Application();
     $GLOBALS['application']->readAppINI();
     //CTrace::inf('Point 3.1 (after readAppINI)');
     $GLOBALS['__session_db_handler_object'] = new SessionDBHandler();
     // check cache folder
     if (!is_dir_writable($GLOBALS['application']->getAppINI('PATH_CACHE_DIR'))) {
         _fatal(array("CODE" => "CORE_040"), $GLOBALS['application']->getAppINI('PATH_CACHE_DIR'));
     }
     $GLOBALS['application']->init();
     //CTrace::inf('Point 3.2 (after application->init)');
     // include custom template file
     if (isset($GLOBALS['__SYSTEM_TPL_DIR__']) && file_exists($GLOBALS['__SYSTEM_TPL_DIR__'] . 'custom.php')) {
         include_once $GLOBALS['__SYSTEM_TPL_DIR__'] . 'custom.php';
     }
     if (isset($GLOBALS['__TPL_DIR__']) && file_exists($GLOBALS['__TPL_DIR__'] . 'custom.php')) {
         include_once $GLOBALS['__TPL_DIR__'] . 'custom.php';
     }
     // include functions template file
     if (isset($GLOBALS['__SYSTEM_TPL_DIR__']) && file_exists($GLOBALS['__SYSTEM_TPL_DIR__'] . 'functions.php')) {
         include_once $GLOBALS['__SYSTEM_TPL_DIR__'] . 'functions.php';
     }
     if (isset($GLOBALS['__TPL_DIR__']) && file_exists($GLOBALS['__TPL_DIR__'] . 'functions.php')) {
         include_once $GLOBALS['__TPL_DIR__'] . 'functions.php';
     }
 }
 /**
  * Checks if it is possible to write to the image folder.
  *
  * @author Vadim Lyalikov
  * @
  * @return
  */
 function isImageFolderNotWritable()
 {
     global $application;
     $dir_fs_name = $application->getAppIni("PATH_IMAGES_DIR");
     return !is_dir_writable($dir_fs_name);
 }
 /**
  *                                     backup.
  *
  * @
  * @return
  */
 function isBackupFolderNotWritable()
 {
     global $application;
     $dir_fs_name = $application->getAppIni("PATH_BACKUP_DIR");
     return !is_dir_writable($dir_fs_name);
 }