Index: branches/5.2.x/core/kernel/startup.php
===================================================================
--- branches/5.2.x/core/kernel/startup.php	(revision 15444)
+++ branches/5.2.x/core/kernel/startup.php	(revision 15445)
@@ -1,200 +1,203 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	define('KERNEL_PATH', FULL_PATH . '/core/kernel');
 
 	$globals_start = microtime(true);
 	include_once(KERNEL_PATH . '/globals.php');	// some non-OOP functions and kUtil static class used through kernel
 	include_once(KERNEL_PATH . '/utility/multibyte.php');	// emulating multi-byte php extension
 	$globals_end = microtime(true);
 
 	$vars = kUtil::getConfigVars();
 
+	$charset = isset($vars['WebsiteCharset']) ? $vars['WebsiteCharset'] : 'utf-8';
+	define('CHARSET', $charset);
+
 	$admin_directory = isset($vars['AdminDirectory']) ? $vars['AdminDirectory'] : '/admin';
 	define('ADMIN_DIRECTORY', $admin_directory);
 
 	$admin_Presets_directory = isset($vars['AdminPresetsDirectory']) ? $vars['AdminPresetsDirectory'] : ADMIN_DIRECTORY;
 	define('ADMIN_PRESETS_DIRECTORY', $admin_Presets_directory);
 
 	$https_mark = getArrayValue($_SERVER, 'HTTPS');
 	define('PROTOCOL', ($https_mark == 'on') || ($https_mark == '1') ? 'https://' : 'http://');
 
 	if ( isset($_SERVER['HTTP_HOST']) ) {
 		// accessed from browser
 		$http_host = $_SERVER['HTTP_HOST'];
 	}
 	else {
 		// accessed from command line
 		$http_host = $vars['Domain'];
 		$_SERVER['HTTP_HOST'] = $vars['Domain'];
 	}
 
 	$port = isset($_SERVER['SERVER_PORT']) ? $_SERVER['SERVER_PORT'] : false;
 
 	if ($port) {
 		if ( (PROTOCOL == 'http://' && $port != '80') || (PROTOCOL == 'https://' && $port != '443') ) {
 		// if non-standard port is used, then define it
         	define('PORT', $port);
 		}
 
 		$http_host = preg_replace('/:' . $port . '$/', '', $http_host);
     }
 
 	define('SERVER_NAME', $http_host);
 
 	if (!$vars) {
 		echo 'In-Portal is probably not installed, or configuration file is missing.<br/>';
 		echo 'Please use the installation script to fix the problem.<br/><br/>';
 
 		$base_path = rtrim(preg_replace('/'.preg_quote(rtrim($admin_directory, '/'), '/').'$/', '', str_replace('\\', '/', dirname($_SERVER['PHP_SELF']))), '/');
 		echo '<a href="' . PROTOCOL . SERVER_NAME . $base_path . '/core/install.php">Go to installation script</a><br><br>';
 		flush();
 		exit;
 	}
 
 	// variable WebsitePath is auto-detected once during installation/upgrade
 	define('BASE_PATH', $vars['WebsitePath']);
 
 	define('APPLICATION_CLASS', isset($vars['ApplicationClass']) ? $vars['ApplicationClass'] : 'kApplication');
 	define('APPLICATION_PATH', isset($vars['ApplicationPath']) ? $vars['ApplicationPath'] : '/core/kernel/application.php');
 
 	if (isset($vars['WriteablePath'])) {
 		define('WRITEABLE', FULL_PATH . $vars['WriteablePath']);
 		define('WRITEBALE_BASE', $vars['WriteablePath']);
 	}
 
 	if ( isset($vars['RestrictedPath']) ) {
 		define('RESTRICTED', FULL_PATH . $vars['RestrictedPath']);
 	}
 
 	define('SQL_TYPE', $vars['DBType']);
 	define('SQL_SERVER', $vars['DBHost']);
 	define('SQL_USER', $vars['DBUser']);
 	define('SQL_PASS', $vars['DBUserPassword']);
 	define('SQL_DB', $vars['DBName']);
 
 	if (isset($vars['DBCollation']) && isset($vars['DBCharset'])) {
 		define('SQL_COLLATION', $vars['DBCollation']);
 		define('SQL_CHARSET', $vars['DBCharset']);
 	}
 	define('TABLE_PREFIX', $vars['TablePrefix']);
 
 	define('DOMAIN', getArrayValue($vars, 'Domain'));
 
 	ini_set('memory_limit', '50M');
 
 	define('MODULES_PATH', FULL_PATH . DIRECTORY_SEPARATOR . 'modules');
 
 	define('EXPORT_BASE_PATH', WRITEBALE_BASE . '/export');
 	define('EXPORT_PATH', FULL_PATH . EXPORT_BASE_PATH);
 
 	define('GW_CLASS_PATH', MODULES_PATH . '/in-commerce/units/gateways/gw_classes'); // Payment Gateway Classes Path
 	define('SYNC_CLASS_PATH', FULL_PATH . '/sync');	// path for 3rd party user syncronization scripts
 
 	define('ENV_VAR_NAME','env');
 
 	define('IMAGES_PATH', WRITEBALE_BASE . '/images/');
 	define('IMAGES_PENDING_PATH', IMAGES_PATH . 'pending/');
 	define('MAX_UPLOAD_SIZE', min(ini_get('upload_max_filesize'), ini_get('post_max_size'))*1024*1024);
 
 	define('EDITOR_PATH', isset($vars['EditorPath']) ? $vars['EditorPath'] : '/core/ckeditor/');
 
 	// caching types
 	define('CACHING_TYPE_NONE', 0);
 	define('CACHING_TYPE_MEMORY', 1);
 	define('CACHING_TYPE_TEMPORARY', 2);
 
 	class CacheSettings {
 		static public $unitCacheRebuildTime;
 		static public $structureTreeRebuildTime;
 		static public $cmsMenuRebuildTime;
 		static public $templateMappingRebuildTime;
 		static public $sectionsParsedRebuildTime;
 		static public $domainsParsedRebuildTime;
 	}
 
 	CacheSettings::$unitCacheRebuildTime = isset($vars['UnitCacheRebuildTime']) ? $vars['UnitCacheRebuildTime'] : 10;
 	CacheSettings::$structureTreeRebuildTime = isset($vars['StructureTreeRebuildTime']) ? $vars['StructureTreeRebuildTime'] : 10;
 	CacheSettings::$cmsMenuRebuildTime = isset($vars['CmsMenuRebuildTime']) ? $vars['CmsMenuRebuildTime'] : 10;
 	CacheSettings::$templateMappingRebuildTime = isset($vars['TemplateMappingRebuildTime']) ? $vars['TemplateMappingRebuildTime'] : 5;
 	CacheSettings::$sectionsParsedRebuildTime = isset($vars['SectionsParsedRebuildTime']) ? $vars['SectionsParsedRebuildTime'] : 10;
 	CacheSettings::$domainsParsedRebuildTime = isset($vars['DomainsParsedRebuildTime']) ? $vars['DomainsParsedRebuildTime'] : 2;
 
 	class MaintenanceMode {
 		const NONE = 0;
 		const SOFT = 1;
 		const HARD = 2;
 	}
 
 	unset($vars); // just in case someone will be still using it
 
 	if (ini_get('safe_mode')) {
 		// safe mode will be removed at all in PHP6
 		define('SAFE_MODE', 1);
 	}
 
 	if (file_exists(WRITEABLE . '/debug.php')) {
 		include_once(WRITEABLE . '/debug.php');
 		if (array_key_exists('DEBUG_MODE', $dbg_options) && $dbg_options['DEBUG_MODE']) {
 			$debugger_start = microtime(true);
 			include_once(KERNEL_PATH . '/utility/debugger.php');
 			$debugger_end = microtime(true);
 
 			if (isset($debugger) && kUtil::constOn('DBG_PROFILE_INCLUDES')) {
 				$debugger->profileStart('inc_globals', KERNEL_PATH . '/globals.php', $globals_start);
 				$debugger->profileFinish('inc_globals', KERNEL_PATH . '/globals.php', $globals_end);
 				$debugger->profilerAddTotal('includes', 'inc_globals');
 
 				$debugger->profileStart('inc_debugger', KERNEL_PATH . '/utility/debugger.php', $debugger_start);
 				$debugger->profileFinish('inc_debugger', KERNEL_PATH . '/utility/debugger.php', $debugger_end);
 				$debugger->profilerAddTotal('includes', 'inc_debugger');
 			}
 		}
 	}
 
 	kUtil::safeDefine('SILENT_LOG', 0); // can be set in "debug.php" too
 
 	$includes = Array(
 			KERNEL_PATH . "/interfaces/cacheable.php",
 			KERNEL_PATH . '/application.php',
 			FULL_PATH . APPLICATION_PATH,
 			KERNEL_PATH . "/kbase.php",
 			KERNEL_PATH . '/db/db_connection.php',
 			KERNEL_PATH . '/db/db_load_balancer.php',
 			KERNEL_PATH . '/utility/event.php',
 			KERNEL_PATH . "/utility/factory.php",
 			KERNEL_PATH . "/languages/phrases_cache.php",
 			KERNEL_PATH . "/db/dblist.php",
 			KERNEL_PATH . "/db/dbitem.php",
 			KERNEL_PATH . "/event_handler.php",
 			KERNEL_PATH . '/db/db_event_handler.php',
 	);
 
 	foreach ($includes as $a_file) {
 		kUtil::includeOnce($a_file);
 	}
 
 	if (defined('DEBUG_MODE') && DEBUG_MODE && isset($debugger)) {
 		$debugger->AttachToApplication();
 	}
 
 	if( !function_exists('adodb_mktime') ) {
 		include_once(KERNEL_PATH . '/utility/adodb-time.inc.php');
 	}
 
 	// system users
 	define('USER_ROOT', -1);
 	define('USER_GUEST', -2);
\ No newline at end of file
Index: branches/5.2.x/core/kernel/application.php
===================================================================
--- branches/5.2.x/core/kernel/application.php	(revision 15444)
+++ branches/5.2.x/core/kernel/application.php	(revision 15445)
@@ -1,3208 +1,3199 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 defined('FULL_PATH') or die('restricted access!');
 
 /**
 * Basic class for Kernel4-based Application
 *
 * This class is a Facade for any other class which needs to deal with Kernel4 framework.<br>
 * The class encapsulates the main run-cycle of the script, provide access to all other objects in the framework.<br>
 * <br>
 * The class is a singleton, which means that there could be only one instance of kApplication in the script.<br>
 * This could be guaranteed by NOT calling the class constructor directly, but rather calling kApplication::Instance() method,
 * which returns an instance of the application. The method guarantees that it will return exactly the same instance for any call.<br>
 * See singleton pattern by GOF.
 */
 class kApplication implements kiCacheable {
 
 	/**
 	 * Location of module helper class (used in installator too)
 	 */
 	const MODULE_HELPER_PATH = '/../units/helpers/modules_helper.php';
 
 	/**
 	 * Is true, when Init method was called already, prevents double initialization
 	 *
 	 * @var bool
 	 */
 	public $InitDone = false;
 
 	/**
 	 * Holds internal NParser object
 	 *
 	 * @var NParser
 	 * @access public
 	 */
 	public $Parser;
 
 	/**
 	 * Holds parser output buffer
 	 *
 	 * @var string
 	 * @access protected
 	 */
 	protected $HTML = '';
 
 	/**
 	 * The main Factory used to create
 	 * almost any class of kernel and
 	 * modules
 	 *
 	 * @var kFactory
 	 * @access protected
 	 */
 	protected $Factory;
 
 	/**
 	 * Template names, that will be used instead of regular templates
 	 *
 	 * @var Array
 	 * @access public
 	 */
 	public $ReplacementTemplates = Array ();
 
 	/**
 	 * Mod-Rewrite listeners used during url building and parsing
 	 *
 	 * @var Array
 	 * @access public
 	 */
 	public $RewriteListeners = Array ();
 
 	/**
 	 * Reference to debugger
 	 *
 	 * @var Debugger
 	 * @access public
 	 */
 	public $Debugger = null;
 
 	/**
 	 * Holds all phrases used
 	 * in code and template
 	 *
 	 * @var PhrasesCache
 	 * @access public
 	 */
 	public $Phrases;
 
 	/**
 	 * Modules table content, key - module name
 	 *
 	 * @var Array
 	 * @access public
 	 */
 	public $ModuleInfo = Array ();
 
 	/**
 	 * Holds DBConnection
 	 *
 	 * @var kDBConnection
 	 * @access public
 	 */
 	public $Conn = null;
 
 	/**
 	 * Maintains list of user-defined error handlers
 	 *
 	 * @var Array
 	 * @access public
 	 */
 	public $errorHandlers = Array ();
 
 	/**
 	 * Maintains list of user-defined exception handlers
 	 *
 	 * @var Array
 	 * @access public
 	 */
 	public $exceptionHandlers = Array ();
 
 	// performance needs:
 	/**
 	 * Holds a reference to httpquery
 	 *
 	 * @var kHttpQuery
 	 * @access public
 	 */
 	public $HttpQuery = null;
 
 	/**
 	 * Holds a reference to UnitConfigReader
 	 *
 	 * @var kUnitConfigReader
 	 * @access public
 	 */
 	public $UnitConfigReader = null;
 
 	/**
 	 * Holds a reference to Session
 	 *
 	 * @var Session
 	 * @access public
 	 */
 	public $Session = null;
 
 	/**
 	 * Holds a ref to kEventManager
 	 *
 	 * @var kEventManager
 	 * @access public
 	 */
 	public $EventManager = null;
 
 	/**
 	 * Holds a ref to kUrlManager
 	 *
 	 * @var kUrlManager
 	 * @access public
 	 */
 	public $UrlManager = null;
 
 	/**
 	 * Ref for TemplatesCache
 	 *
 	 * @var TemplatesCache
 	 * @access public
 	 */
 	public $TemplatesCache = null;
 
 	/**
 	 * Holds current NParser tag while parsing, can be used in error messages to display template file and line
 	 *
 	 * @var _BlockTag
 	 * @access public
 	 */
 	public $CurrentNTag = null;
 
 	/**
 	 * Object of unit caching class
 	 *
 	 * @var kCacheManager
 	 * @access public
 	 */
 	public $cacheManager = null;
 
 	/**
 	 * Tells, that administrator has authenticated in administrative console
 	 * Should be used to manipulate data change OR data restrictions!
 	 *
 	 * @var bool
 	 * @access public
 	 */
 	public $isAdminUser = false;
 
 	/**
 	 * Tells, that admin version of "index.php" was used, nothing more!
 	 * Should be used to manipulate data display!
 	 *
 	 * @var bool
 	 * @access public
 	 */
 	public $isAdmin = false;
 
 	/**
 	 * Instance of site domain object
 	 *
 	 * @var kDBItem
 	 * @access public
 	 * @todo move away into separate module
 	 */
 	public $siteDomain = null;
 
 	/**
 	 * Prevent kApplication class to be created directly, only via Instance method
 	 *
 	 * @access private
 	 */
 	private function __construct()
 	{
 
 	}
 
 	final private function __clone() {}
 
 	/**
 	 * Returns kApplication instance anywhere in the script.
 	 *
 	 * This method should be used to get single kApplication object instance anywhere in the
 	 * Kernel-based application. The method is guaranteed to return the SAME instance of kApplication.
 	 * Anywhere in the script you could write:
 	 * <code>
 	 *		$application =& kApplication::Instance();
 	 * </code>
 	 * or in an object:
 	 * <code>
 	 *		$this->Application =& kApplication::Instance();
 	 * </code>
 	 * to get the instance of kApplication. Note that we call the Instance method as STATIC - directly from the class.
 	 * To use descendant of standard kApplication class in your project you would need to define APPLICATION_CLASS constant
 	 * BEFORE calling kApplication::Instance() for the first time. If APPLICATION_CLASS is not defined the method would
 	 * create and return default KernelApplication instance.
 	 *
 	 * Pattern: Singleton
 	 *
 	 * @static
 	 * @return kApplication
 	 * @access public
 	 */
 	public static function &Instance()
 	{
 		static $instance = false;
 
 		if ( !$instance ) {
 			$class = defined('APPLICATION_CLASS') ? APPLICATION_CLASS : 'kApplication';
 			$instance = new $class();
 		}
 
 		return $instance;
 	}
 
 	/**
 	 * Initializes the Application
 	 *
 	 * @param string $factory_class
 	 * @return bool Was Init actually made now or before
 	 * @access public
 	 * @see kHTTPQuery
 	 * @see Session
 	 * @see TemplatesCache
 	 */
 	public function Init($factory_class = 'kFactory')
 	{
 		if ( $this->InitDone ) {
 			return false;
 		}
 
+		if ( preg_match('/utf-8/i', CHARSET) ) {
+			setlocale(LC_ALL, 'en_US.UTF-8');
+			mb_internal_encoding('UTF-8');
+		}
+
 		$this->isAdmin = kUtil::constOn('ADMIN');
 
 		if ( !kUtil::constOn('SKIP_OUT_COMPRESSION') ) {
 			ob_start(); // collect any output from method (other then tags) into buffer
 		}
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() && kUtil::constOn('DBG_PROFILE_MEMORY') ) {
 			$this->Debugger->appendMemoryUsage('Application before Init:');
 		}
 
 		if ( !$this->isDebugMode() && !kUtil::constOn('DBG_ZEND_PRESENT') ) {
 			error_reporting(0);
 			ini_set('display_errors', 0);
 		}
 
 		if ( !kUtil::constOn('DBG_ZEND_PRESENT') ) {
 			$error_handler = set_error_handler(Array (&$this, 'handleError'));
 			if ( $error_handler ) {
 				// wrap around previous error handler, if any was set
 				$this->errorHandlers[] = $error_handler;
 			}
 
 			$exception_handler = set_exception_handler(Array (&$this, 'handleException'));
 			if ( $exception_handler ) {
 				// wrap around previous exception handler, if any was set
 				$this->exceptionHandlers[] = $exception_handler;
 			}
 		}
 
 		$this->Factory = new $factory_class();
 		$this->registerDefaultClasses();
 
 		$vars = kUtil::parseConfig(true);
 		$db_class = isset($vars['Databases']) ? 'kDBLoadBalancer' : ($this->isDebugMode() ? 'kDBConnectionDebug' : 'kDBConnection');
 		$this->Conn = $this->Factory->makeClass($db_class, Array (SQL_TYPE, Array (&$this, 'handleSQLError')));
 		$this->Conn->setup($vars);
 
 		$this->cacheManager = $this->makeClass('kCacheManager');
 		$this->cacheManager->InitCache();
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->appendTimestamp('Before UnitConfigReader');
 		}
 
 		// init config reader and all managers
 		$this->UnitConfigReader = $this->makeClass('kUnitConfigReader');
 		$this->UnitConfigReader->scanModules(MODULES_PATH); // will also set RewriteListeners when existing cache is read
 
 		$this->registerModuleConstants();
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->appendTimestamp('After UnitConfigReader');
 		}
 
 		define('MOD_REWRITE', $this->ConfigValue('UseModRewrite') && !$this->isAdmin ? 1 : 0);
 
 		// start processing request
 		$this->HttpQuery = $this->recallObject('HTTPQuery');
 		$this->HttpQuery->process();
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->appendTimestamp('Processed HTTPQuery initial');
 		}
 
 		$this->Session = $this->recallObject('Session');
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->appendTimestamp('Processed Session');
 		}
 
 		$this->Session->ValidateExpired(); // needs mod_rewrite url already parsed to keep user at proper template after session expiration
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->appendTimestamp('Processed HTTPQuery AfterInit');
 		}
 
 		$this->cacheManager->LoadApplicationCache();
 
 		$site_timezone = $this->ConfigValue('Config_Site_Time');
 
 		if ( $site_timezone ) {
 			putenv('TZ=' . $site_timezone);
 		}
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->appendTimestamp('Loaded cache and phrases');
 		}
 
 		$this->ValidateLogin(); // must be called before AfterConfigRead, because current user should be available there
 
 		$this->UnitConfigReader->AfterConfigRead(); // will set RewriteListeners when missing cache is built first time
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->appendTimestamp('Processed AfterConfigRead');
 		}
 
 		if ( $this->GetVar('m_cat_id') === false ) {
 			$this->SetVar('m_cat_id', 0);
 		}
 
 		if ( !$this->RecallVar('curr_iso') ) {
 			$this->StoreVar('curr_iso', $this->GetPrimaryCurrency(), true); // true for optional
 		}
 
 		$visit_id = $this->RecallVar('visit_id');
 
 		if ( $visit_id !== false ) {
 			$this->SetVar('visits_id', $visit_id);
 		}
 
-		$language = $this->recallObject('lang.current', null, Array ('live_table' => true));
-		/* @var $language LanguagesItem */
-
-		if ( preg_match('/utf-8/', $language->GetDBField('Charset')) ) {
-			setlocale(LC_ALL, 'en_US.UTF-8');
-			mb_internal_encoding('UTF-8');
-		}
-
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 			$this->Debugger->profileFinish('kernel4_startup');
 		}
 
 		$this->InitDone = true;
 
 		$this->HandleEvent(new kEvent('adm:OnStartup'));
 
 		return true;
 	}
 
 	/**
 	 * Performs initialization of manager classes, that can be overridden from unit configs
 	 *
 	 * @return void
 	 * @access public
 	 * @throws Exception
 	 */
 	public function InitManagers()
 	{
 		if ( $this->InitDone ) {
 			throw new Exception('Duplicate call of ' . __METHOD__, E_USER_ERROR);
 			return;
 		}
 
 		$this->UrlManager = $this->makeClass('kUrlManager');
 		$this->EventManager = $this->makeClass('EventManager');
 		$this->Phrases = $this->makeClass('kPhraseCache');
 
 		$this->RegisterDefaultBuildEvents();
 	}
 
 	/**
 	 * Returns module information. Searches module by requested field
 	 *
 	 * @param string $field
 	 * @param mixed $value
 	 * @param string $return_field field value to returns, if not specified, then return all fields
 	 * @return Array
 	 */
 	public function findModule($field, $value, $return_field = null)
 	{
 		$found = $module_info = false;
 
 		foreach ($this->ModuleInfo as $module_info) {
 			if ( strtolower($module_info[$field]) == strtolower($value) ) {
 				$found = true;
 				break;
 			}
 		}
 
 		if ( $found ) {
 			return isset($return_field) ? $module_info[$return_field] : $module_info;
 		}
 
 		return false;
 	}
 
 	/**
 	 * Refreshes information about loaded modules
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function refreshModuleInfo()
 	{
 		if ( defined('IS_INSTALL') && IS_INSTALL && !$this->TableFound('Modules', true) ) {
 			$this->registerModuleConstants();
 			return;
 		}
 
 		// use makeClass over recallObject, since used before kApplication initialization during installation
 		$modules_helper = $this->makeClass('ModulesHelper');
 		/* @var $modules_helper kModulesHelper */
 
 		$this->Conn->nextQueryCachable = true;
 		$sql = 'SELECT *
 				FROM ' . TABLE_PREFIX . 'Modules
 				WHERE ' . $modules_helper->getWhereClause() . '
 				ORDER BY LoadOrder';
 		$this->ModuleInfo = $this->Conn->Query($sql, 'Name');
 
 		$this->registerModuleConstants();
 	}
 
 	/**
 	 * Checks if passed language id if valid and sets it to primary otherwise
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function VerifyLanguageId()
 	{
 		$language_id = $this->GetVar('m_lang');
 
 		if ( !$language_id ) {
 			$language_id = 'default';
 		}
 
 		$this->SetVar('lang.current_id', $language_id);
 		$this->SetVar('m_lang', $language_id);
 
 		$lang_mode = $this->GetVar('lang_mode');
 		$this->SetVar('lang_mode', '');
 
 		$lang = $this->recallObject('lang.current');
 		/* @var $lang kDBItem */
 
 		if ( !$lang->isLoaded() || (!$this->isAdmin && !$lang->GetDBField('Enabled')) ) {
 			if ( !defined('IS_INSTALL') ) {
 				$this->ApplicationDie('Unknown or disabled language');
 			}
 		}
 
 		$this->SetVar('lang_mode', $lang_mode);
 	}
 
 	/**
 	 * Checks if passed theme id if valid and sets it to primary otherwise
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function VerifyThemeId()
 	{
 		if ( $this->isAdmin ) {
 			kUtil::safeDefine('THEMES_PATH', '/core/admin_templates');
 
 			return;
 		}
 
 		$path = $this->GetFrontThemePath();
 
 		if ( $path === false ) {
 			$this->ApplicationDie('No Primary Theme Selected or Current Theme is Unknown or Disabled');
 		}
 
 		kUtil::safeDefine('THEMES_PATH', $path);
 	}
 
 	/**
 	 * Returns relative path to current front-end theme
 	 *
 	 * @param bool $force
 	 * @return string
 	 * @access public
 	 */
 	public function GetFrontThemePath($force = false)
 	{
 		static $path = null;
 
 		if ( !$force && isset($path) ) {
 			return $path;
 		}
 
 		$theme_id = $this->GetVar('m_theme');
 		if ( !$theme_id ) {
 			$theme_id = 'default'; // $this->GetDefaultThemeId(1); // 1 to force front-end mode!
 		}
 
 		$this->SetVar('m_theme', $theme_id);
 		$this->SetVar('theme.current_id', $theme_id); // KOSTJA: this is to fool theme' getPassedID
 
 		$theme = $this->recallObject('theme.current');
 		/* @var $theme ThemeItem */
 
 		if ( !$theme->isLoaded() || !$theme->GetDBField('Enabled') ) {
 			return false;
 		}
 
 		// assign & then return, since it's static variable
 		$path = '/themes/' . $theme->GetDBField('Name');
 
 		return $path;
 	}
 
 	/**
 	 * Returns primary front/admin language id
 	 *
 	 * @param bool $init
 	 * @return int
 	 * @access public
 	 */
 	public function GetDefaultLanguageId($init = false)
 	{
 		$cache_key = 'primary_language_info[%LangSerial%]';
 		$language_info = $this->getCache($cache_key);
 
 		if ( $language_info === false ) {
 			// cache primary language info first
 			$table = $this->getUnitOption('lang', 'TableName');
 			$id_field = $this->getUnitOption('lang', 'IDField');
 
 			$this->Conn->nextQueryCachable = true;
 			$sql = 'SELECT ' . $id_field . ', IF(AdminInterfaceLang, "Admin", "Front") AS LanguageKey
 					FROM ' . $table . '
 					WHERE (AdminInterfaceLang = 1 OR PrimaryLang = 1) AND (Enabled = 1)';
 			$language_info = $this->Conn->GetCol($sql, 'LanguageKey');
 
 			if ( $language_info !== false ) {
 				$this->setCache($cache_key, $language_info);
 			}
 		}
 
 		$language_key = ($this->isAdmin && $init) || count($language_info) == 1 ? 'Admin' : 'Front';
 
 		if ( array_key_exists($language_key, $language_info) && $language_info[$language_key] > 0 ) {
 			// get from cache
 			return $language_info[$language_key];
 		}
 
 		$language_id = $language_info && array_key_exists($language_key, $language_info) ? $language_info[$language_key] : false;
 
 		if ( !$language_id && defined('IS_INSTALL') && IS_INSTALL ) {
 			$language_id = 1;
 		}
 
 		return $language_id;
 	}
 
 	/**
 	 * Returns front-end primary theme id (even, when called from admin console)
 	 *
 	 * @param bool $force_front
 	 * @return int
 	 * @access public
 	 */
 	public function GetDefaultThemeId($force_front = false)
 	{
 		static $theme_id = 0;
 
 		if ( $theme_id > 0 ) {
 			return $theme_id;
 		}
 
 		if ( kUtil::constOn('DBG_FORCE_THEME') ) {
 			$theme_id = DBG_FORCE_THEME;
 		}
 		elseif ( !$force_front && $this->isAdmin ) {
 			$theme_id = 999;
 		}
 		else {
 			$cache_key = 'primary_theme[%ThemeSerial%]';
 			$theme_id = $this->getCache($cache_key);
 
 			if ( $theme_id === false ) {
 				$this->Conn->nextQueryCachable = true;
 				$sql = 'SELECT ' . $this->getUnitOption('theme', 'IDField') . '
 						FROM ' . $this->getUnitOption('theme', 'TableName') . '
 						WHERE (PrimaryTheme = 1) AND (Enabled = 1)';
 				$theme_id = $this->Conn->GetOne($sql);
 
 				if ( $theme_id !== false ) {
 					$this->setCache($cache_key, $theme_id);
 				}
 			}
 		}
 
 		return $theme_id;
 	}
 
 	/**
 	 * Returns site primary currency ISO code
 	 *
 	 * @return string
 	 * @access public
 	 * @todo Move into In-Commerce
 	 */
 	public function GetPrimaryCurrency()
 	{
 		$cache_key = 'primary_currency[%CurrSerial%][%SiteDomainSerial%]:' . $this->siteDomainField('DomainId');
 		$currency_iso = $this->getCache($cache_key);
 
 		if ( $currency_iso === false ) {
 			if ( $this->isModuleEnabled('In-Commerce') ) {
 				$this->Conn->nextQueryCachable = true;
 				$currency_id = $this->siteDomainField('PrimaryCurrencyId');
 
 				$sql = 'SELECT ISO
 						FROM ' . $this->getUnitOption('curr', 'TableName') . '
 						WHERE ' . ($currency_id > 0 ? 'CurrencyId = ' . $currency_id : 'IsPrimary = 1');
 				$currency_iso = $this->Conn->GetOne($sql);
 			}
 			else {
 				$currency_iso = 'USD';
 			}
 
 			$this->setCache($cache_key, $currency_iso);
 		}
 
 		return $currency_iso;
 	}
 
 	/**
 	 * Returns site domain field. When none of site domains are found false is returned.
 	 *
 	 * @param string $field
 	 * @param bool $formatted
 	 * @param string $format
 	 * @return mixed
 	 * @todo Move into separate module
 	 */
 	public function siteDomainField($field, $formatted = false, $format = null)
 	{
 		if ( $this->isAdmin ) {
 			// don't apply any filtering in administrative console
 			return false;
 		}
 
 		if ( !$this->siteDomain ) {
 			$this->siteDomain = $this->recallObject('site-domain.current');
 			/* @var $site_domain kDBItem */
 		}
 
 		if ( $this->siteDomain->isLoaded() ) {
 			return $formatted ? $this->siteDomain->GetField($field, $format) : $this->siteDomain->GetDBField($field);
 		}
 
 		return false;
 	}
 
 	/**
 	 * Registers default classes such as kDBEventHandler, kUrlManager
 	 *
 	 * Called automatically while initializing kApplication
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function RegisterDefaultClasses()
 	{
 		$this->registerClass('kHelper', KERNEL_PATH . '/kbase.php');
 		$this->registerClass('kMultipleFilter', KERNEL_PATH . '/utility/filters.php');
 		$this->registerClass('kiCacheable', KERNEL_PATH . '/interfaces/cacheable.php');
 
 		$this->registerClass('kEventManager', KERNEL_PATH . '/event_manager.php', 'EventManager');
 		$this->registerClass('kHookManager', KERNEL_PATH . '/managers/hook_manager.php');
 		$this->registerClass('kScheduledTaskManager', KERNEL_PATH . '/managers/scheduled_task_manager.php');
 		$this->registerClass('kRequestManager', KERNEL_PATH . '/managers/request_manager.php');
 		$this->registerClass('kSubscriptionManager', KERNEL_PATH . '/managers/subscription_manager.php');
 
 		$this->registerClass('kUrlManager', KERNEL_PATH . '/managers/url_manager.php');
 		$this->registerClass('kUrlProcessor', KERNEL_PATH . '/managers/url_processor.php');
 		$this->registerClass('kPlainUrlProcessor', KERNEL_PATH . '/managers/plain_url_processor.php');
 		$this->registerClass('kRewriteUrlProcessor', KERNEL_PATH . '/managers/rewrite_url_processor.php');
 
 		$this->registerClass('kCacheManager', KERNEL_PATH . '/managers/cache_manager.php');
 		$this->registerClass('PhrasesCache', KERNEL_PATH . '/languages/phrases_cache.php', 'kPhraseCache');
 		$this->registerClass('kTempTablesHandler', KERNEL_PATH . '/utility/temp_handler.php');
 		$this->registerClass('kValidator', KERNEL_PATH . '/utility/validator.php');
 		$this->registerClass('kOpenerStack', KERNEL_PATH . '/utility/opener_stack.php');
 
 		$this->registerClass('kUnitConfigReader', KERNEL_PATH . '/utility/unit_config_reader.php');
 
 		// Params class descendants
 		$this->registerClass('kArray', KERNEL_PATH . '/utility/params.php');
 		$this->registerClass('Params', KERNEL_PATH . '/utility/params.php');
 		$this->registerClass('Params', KERNEL_PATH . '/utility/params.php', 'kActions');
 		$this->registerClass('kCache', KERNEL_PATH . '/utility/cache.php', 'kCache', 'Params');
 		$this->registerClass('kHTTPQuery', KERNEL_PATH . '/utility/http_query.php', 'HTTPQuery');
 
 		// session
 		$this->registerClass('Session', KERNEL_PATH . '/session/session.php');
 		$this->registerClass('SessionStorage', KERNEL_PATH . '/session/session_storage.php');
 		$this->registerClass('InpSession', KERNEL_PATH . '/session/inp_session.php', 'Session');
 		$this->registerClass('InpSessionStorage', KERNEL_PATH . '/session/inp_session_storage.php', 'SessionStorage');
 
 		// template parser
 		$this->registerClass('kTagProcessor', KERNEL_PATH . '/processors/tag_processor.php');
 		$this->registerClass('kMainTagProcessor', KERNEL_PATH . '/processors/main_processor.php', 'm_TagProcessor');
 		$this->registerClass('kDBTagProcessor', KERNEL_PATH . '/db/db_tag_processor.php');
 		$this->registerClass('kCatDBTagProcessor', KERNEL_PATH . '/db/cat_tag_processor.php');
 		$this->registerClass('NParser', KERNEL_PATH . '/nparser/nparser.php');
 		$this->registerClass('TemplatesCache', KERNEL_PATH . '/nparser/template_cache.php');
 
 		// database
 		$this->registerClass('kDBConnection', KERNEL_PATH . '/db/db_connection.php');
 		$this->registerClass('kDBConnectionDebug', KERNEL_PATH . '/db/db_connection.php');
 		$this->registerClass('kDBLoadBalancer', KERNEL_PATH . '/db/db_load_balancer.php');
 		$this->registerClass('kDBItem', KERNEL_PATH . '/db/dbitem.php');
 		$this->registerClass('kCatDBItem', KERNEL_PATH . '/db/cat_dbitem.php');
 		$this->registerClass('kDBList', KERNEL_PATH . '/db/dblist.php');
 		$this->registerClass('kCatDBList', KERNEL_PATH . '/db/cat_dblist.php');
 		$this->registerClass('kDBEventHandler', KERNEL_PATH . '/db/db_event_handler.php');
 		$this->registerClass('kCatDBEventHandler', KERNEL_PATH . '/db/cat_event_handler.php');
 
 		// email sending
 		$this->registerClass('kEmail', KERNEL_PATH . '/utility/email.php');
 		$this->registerClass('kEmailSendingHelper', KERNEL_PATH . '/utility/email_send.php', 'EmailSender');
 		$this->registerClass('kSocket', KERNEL_PATH . '/utility/socket.php', 'Socket');
 
 		// do not move to config - this helper is used before configs are read
 		$this->registerClass('kModulesHelper', KERNEL_PATH . self::MODULE_HELPER_PATH, 'ModulesHelper');
 	}
 
 	/**
 	 * Registers default build events
 	 *
 	 * @return void
 	 * @access protected
 	 */
 	protected function RegisterDefaultBuildEvents()
 	{
 		$this->EventManager->registerBuildEvent('kTempTablesHandler', 'OnTempHandlerBuild');
 	}
 
 	/**
 	 * Returns cached category information by given cache name. All given category
 	 * information is recached, when at least one of 4 caches is missing.
 	 *
 	 * @param int $category_id
 	 * @param string $name cache name = {filenames, category_designs, category_tree}
 	 * @return string
 	 * @access public
 	 */
 	public function getCategoryCache($category_id, $name)
 	{
 		return $this->cacheManager->getCategoryCache($category_id, $name);
 	}
 
 	/**
 	 * Returns caching type (none, memory, temporary)
 	 *
 	 * @param int $caching_type
 	 * @return bool
 	 * @access public
 	 */
 	public function isCachingType($caching_type)
 	{
 		return $this->cacheManager->isCachingType($caching_type);
 	}
 
 	/**
 	 * Increments serial based on prefix and it's ID (optional)
 	 *
 	 * @param string $prefix
 	 * @param int $id ID (value of IDField) or ForeignKeyField:ID
 	 * @param bool $increment
 	 * @return string
 	 * @access public
 	 */
 	public function incrementCacheSerial($prefix, $id = null, $increment = true)
 	{
 		return $this->cacheManager->incrementCacheSerial($prefix, $id, $increment);
 	}
 
 	/**
 	 * Returns cached $key value from cache named $cache_name
 	 *
 	 * @param int $key key name from cache
 	 * @param bool $store_locally store data locally after retrieved
 	 * @param int $max_rebuild_seconds
 	 * @return mixed
 	 * @access public
 	 */
 	public function getCache($key, $store_locally = true, $max_rebuild_seconds = 0)
 	{
 		return $this->cacheManager->getCache($key, $store_locally, $max_rebuild_seconds);
 	}
 
 	/**
 	 * Stores new $value in cache with $key name
 	 *
 	 * @param int $key key name to add to cache
 	 * @param mixed $value value of cached record
 	 * @param int $expiration when value expires (0 - doesn't expire)
 	 * @return bool
 	 * @access public
 	 */
 	public function setCache($key, $value, $expiration = 0)
 	{
 		return $this->cacheManager->setCache($key, $value, $expiration);
 	}
 
 	/**
 	 * Stores new $value in cache with $key name (only if it's not there)
 	 *
 	 * @param int $key key name to add to cache
 	 * @param mixed $value value of cached record
 	 * @param int $expiration when value expires (0 - doesn't expire)
 	 * @return bool
 	 * @access public
 	 */
 	public function addCache($key, $value, $expiration = 0)
 	{
 		return $this->cacheManager->addCache($key, $value, $expiration);
 	}
 
 	/**
 	 * Sets rebuilding mode for given cache
 	 *
 	 * @param string $name
 	 * @param int $mode
 	 * @param int $max_rebuilding_time
 	 * @return bool
 	 * @access public
 	 */
 	public function rebuildCache($name, $mode = null, $max_rebuilding_time = 0)
 	{
 		return $this->cacheManager->rebuildCache($name, $mode, $max_rebuilding_time);
 	}
 
 	/**
 	 * Deletes key from cache
 	 *
 	 * @param string $key
 	 * @return void
 	 * @access public
 	 */
 	public function deleteCache($key)
 	{
 		$this->cacheManager->deleteCache($key);
 	}
 
 	/**
 	 * Reset's all memory cache at once
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function resetCache()
 	{
 		$this->cacheManager->resetCache();
 	}
 
 	/**
 	 * Returns value from database cache
 	 *
 	 * @param string $name key name
 	 * @param int $max_rebuild_seconds
 	 * @return mixed
 	 * @access public
 	 */
 	public function getDBCache($name, $max_rebuild_seconds = 0)
 	{
 		return $this->cacheManager->getDBCache($name, $max_rebuild_seconds);
 	}
 
 	/**
 	 * Sets value to database cache
 	 *
 	 * @param string $name
 	 * @param mixed $value
 	 * @param int|bool $expiration
 	 * @return void
 	 * @access public
 	 */
 	public function setDBCache($name, $value, $expiration = false)
 	{
 		$this->cacheManager->setDBCache($name, $value, $expiration);
 	}
 
 	/**
 	 * Sets rebuilding mode for given cache
 	 *
 	 * @param string $name
 	 * @param int $mode
 	 * @param int $max_rebuilding_time
 	 * @return bool
 	 * @access public
 	 */
 	public function rebuildDBCache($name, $mode = null, $max_rebuilding_time = 0)
 	{
 		return $this->cacheManager->rebuildDBCache($name, $mode, $max_rebuilding_time);
 	}
 
 	/**
 	 * Deletes key from database cache
 	 *
 	 * @param string $name
 	 * @return void
 	 * @access public
 	 */
 	public function deleteDBCache($name)
 	{
 		$this->cacheManager->deleteDBCache($name);
 	}
 
 	/**
 	 * Registers each module specific constants if any found
 	 *
 	 * @return bool
 	 * @access protected
 	 */
 	protected function registerModuleConstants()
 	{
 		if ( file_exists(KERNEL_PATH . '/constants.php') ) {
 			kUtil::includeOnce(KERNEL_PATH . '/constants.php');
 		}
 
 		if ( !$this->ModuleInfo ) {
 			return false;
 		}
 
 		foreach ($this->ModuleInfo as $module_info) {
 			$constants_file = FULL_PATH . '/' . $module_info['Path'] . 'constants.php';
 
 			if ( file_exists($constants_file) ) {
 				kUtil::includeOnce($constants_file);
 			}
 		}
 
 		return true;
 	}
 
 	/**
 	 * Performs redirect to hard maintenance template
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function redirectToMaintenance()
 	{
 		$maintenance_page = WRITEBALE_BASE . '/maintenance.html';
 		$query_string = ''; // $this->isAdmin ? '' : '?next_template=' . urlencode($_SERVER['REQUEST_URI']);
 
 		if ( file_exists(FULL_PATH . $maintenance_page) ) {
 			header('Location: ' . BASE_PATH . $maintenance_page . $query_string);
 			exit;
 		}
 	}
 
 	/**
 	 * Actually runs the parser against current template and stores parsing result
 	 *
 	 * This method gets 't' variable passed to the script, loads the template given in 't' variable and
 	 * parses it. The result is store in {@link $this->HTML} property.
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function Run()
 	{
 		// process maintenance mode redirect: begin
 		$maintenance_mode = $this->getMaintenanceMode();
 
 		if ( $maintenance_mode == MaintenanceMode::HARD ) {
 			$this->redirectToMaintenance();
 		}
 		elseif ( $maintenance_mode == MaintenanceMode::SOFT ) {
 			$maintenance_template = $this->isAdmin ? 'login' : $this->ConfigValue('SoftMaintenanceTemplate');
 
 			if ( $this->GetVar('t') != $maintenance_template ) {
 				$redirect_params = Array ();
 
 				if ( !$this->isAdmin ) {
 					$redirect_params['next_template'] = urlencode($_SERVER['REQUEST_URI']);
 				}
 
 				$this->Redirect($maintenance_template, $redirect_params);
 			}
 		}
 		// process maintenance mode redirect: end
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() && kUtil::constOn('DBG_PROFILE_MEMORY') ) {
 			$this->Debugger->appendMemoryUsage('Application before Run:');
 		}
 
 		if ( $this->isAdminUser ) {
 			// for permission checking in events & templates
 			$this->LinkVar('module'); // for common configuration templates
 			$this->LinkVar('module_key'); // for common search templates
 			$this->LinkVar('section'); // for common configuration templates
 
 			if ( $this->GetVar('m_opener') == 'p' ) {
 				$this->LinkVar('main_prefix'); // window prefix, that opened selector
 				$this->LinkVar('dst_field'); // field to set value choosed in selector
 			}
 
 			if ( $this->GetVar('ajax') == 'yes' && !$this->GetVar('debug_ajax') ) {
 				// hide debug output from ajax requests automatically
 				kUtil::safeDefine('DBG_SKIP_REPORTING', 1); // safeDefine, because debugger also defines it
 			}
 		}
 		elseif ( $this->GetVar('admin') ) {
 			$admin_session = $this->recallObject('Session.admin');
 			/* @var $admin_session Session */
 
 			// store Admin Console User's ID to Front-End's session for cross-session permission checks
 			$this->StoreVar('admin_user_id', (int)$admin_session->RecallVar('user_id'));
 
 			if ( $this->CheckAdminPermission('CATEGORY.MODIFY', 0, $this->getBaseCategory()) ) {
 				// user can edit cms blocks (when viewing front-end through admin's frame)
 				$editing_mode = $this->GetVar('editing_mode');
 				define('EDITING_MODE', $editing_mode ? $editing_mode : EDITING_MODE_BROWSE);
 			}
 		}
 
 		kUtil::safeDefine('EDITING_MODE', ''); // user can't edit anything
 		$this->Phrases->setPhraseEditing();
 
 		$this->EventManager->ProcessRequest();
 
 		$this->InitParser();
 		$t = $this->GetVar('render_template', $this->GetVar('t'));
 
 		if ( !$this->TemplatesCache->TemplateExists($t) && !$this->isAdmin ) {
 			$cms_handler = $this->recallObject('st_EventHandler');
 			/* @var $cms_handler CategoriesEventHandler */
 
 			$t = ltrim($cms_handler->GetDesignTemplate(), '/');
 
 			if ( defined('DEBUG_MODE') && $this->isDebugMode() ) {
 				$this->Debugger->appendHTML('<strong>Design Template</strong>: ' . $t . '; <strong>CategoryID</strong>: ' . $this->GetVar('m_cat_id'));
 			}
 		}
 		/*else {
 			$cms_handler->SetCatByTemplate();
 		}*/
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() && kUtil::constOn('DBG_PROFILE_MEMORY') ) {
 			$this->Debugger->appendMemoryUsage('Application before Parsing:');
 		}
 
 		$this->HTML = $this->Parser->Run($t);
 
 		if ( defined('DEBUG_MODE') && $this->isDebugMode() && kUtil::constOn('DBG_PROFILE_MEMORY') ) {
 			$this->Debugger->appendMemoryUsage('Application after Parsing:');
 		}
 	}
 
 	/**
 	 * Only renders template
 	 *
 	 * @see kDBEventHandler::_errorNotFound()
 	 */
 	public function QuickRun()
 	{
 		$this->InitParser();
 		$this->HTML = $this->ParseBlock(Array ('name' => $this->GetVar('t')));
 	}
 
 	/**
 	 * Performs template parser/cache initialization
 	 *
 	 * @param bool|string $theme_name
 	 * @return void
 	 * @access public
 	 */
 	public function InitParser($theme_name = false)
 	{
 		if ( !is_object($this->Parser) ) {
 			$this->Parser = $this->recallObject('NParser');
 			$this->TemplatesCache = $this->recallObject('TemplatesCache');
 		}
 
 		$this->TemplatesCache->forceThemeName = $theme_name;
 	}
 
 	/**
 	 * Send the parser results to browser
 	 *
 	 * Actually send everything stored in {@link $this->HTML}, to the browser by echoing it.
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function Done()
 	{
 		$this->HandleEvent(new kEvent('adm:OnBeforeShutdown'));
 
 		$debug_mode = defined('DEBUG_MODE') && $this->isDebugMode();
 
 		if ( $debug_mode && kUtil::constOn('DBG_PROFILE_MEMORY') ) {
 			$this->Debugger->appendMemoryUsage('Application before Done:');
 		}
 
 		if ( $debug_mode ) {
 			$this->EventManager->runScheduledTasks();
 			$this->Session->SaveData();
 
 			$this->HTML = ob_get_clean() . $this->HTML . $this->Debugger->printReport(true);
 		}
 		else {
 			// send "Set-Cookie" header before any output is made
 			$this->Session->SetSession();
 
 			$this->HTML = ob_get_clean() . $this->HTML;
 		}
 
 		$this->setContentType();
 
 		if ( $this->UseOutputCompression() ) {
 			$compression_level = $this->ConfigValue('OutputCompressionLevel');
 
 			if ( !$compression_level || $compression_level < 0 || $compression_level > 9 ) {
 				$compression_level = 7;
 			}
 
 			header('Content-Encoding: gzip');
 			echo gzencode($this->HTML, $compression_level);
 		}
 		else {
 			echo $this->HTML;
 		}
 
 		$this->cacheManager->UpdateApplicationCache();
 		flush();
 
 		if ( !$debug_mode ) {
 			$this->EventManager->runScheduledTasks();
 			$this->Session->SaveData();
 		}
 
 		if ( defined('DBG_CAPTURE_STATISTICS') && DBG_CAPTURE_STATISTICS && !$this->isAdmin ) {
 			$this->_storeStatistics();
 		}
 	}
 
 	/**
 	 * Stores script execution statistics to database
 	 *
 	 * @return void
 	 * @access protected
 	 */
 	protected function _storeStatistics()
 	{
 		global $start;
 
 		$script_time = microtime(true) - $start;
 		$query_statistics = $this->Conn->getQueryStatistics(); // time & count
 
 		$sql = 'SELECT *
 				FROM ' . TABLE_PREFIX . 'StatisticsCapture
 				WHERE TemplateName = ' . $this->Conn->qstr($this->GetVar('t'));
 		$data = $this->Conn->GetRow($sql);
 
 		if ( $data ) {
 			$this->_updateAverageStatistics($data, 'ScriptTime', $script_time);
 			$this->_updateAverageStatistics($data, 'SqlTime', $query_statistics['time']);
 			$this->_updateAverageStatistics($data, 'SqlCount', $query_statistics['count']);
 
 			$data['Hits']++;
 			$data['LastHit'] = adodb_mktime();
 
 			$this->Conn->doUpdate($data, TABLE_PREFIX . 'StatisticsCapture', 'StatisticsId = ' . $data['StatisticsId']);
 		}
 		else {
 			$data['ScriptTimeMin'] = $data['ScriptTimeAvg'] = $data['ScriptTimeMax'] = $script_time;
 			$data['SqlTimeMin'] = $data['SqlTimeAvg'] = $data['SqlTimeMax'] = $query_statistics['time'];
 			$data['SqlCountMin'] = $data['SqlCountAvg'] = $data['SqlCountMax'] = $query_statistics['count'];
 			$data['TemplateName'] = $this->GetVar('t');
 			$data['Hits'] = 1;
 			$data['LastHit'] = adodb_mktime();
 			$this->Conn->doInsert($data, TABLE_PREFIX . 'StatisticsCapture');
 		}
 	}
 
 	/**
 	 * Calculates average time for statistics
 	 *
 	 * @param Array $data
 	 * @param string $field_prefix
 	 * @param float $current_value
 	 * @return void
 	 * @access protected
 	 */
 	protected function _updateAverageStatistics(&$data, $field_prefix, $current_value)
 	{
 		$data[$field_prefix . 'Avg'] = (($data['Hits'] * $data[$field_prefix . 'Avg']) + $current_value) / ($data['Hits'] + 1);
 
 		if ( $current_value < $data[$field_prefix . 'Min'] ) {
 			$data[$field_prefix . 'Min'] = $current_value;
 		}
 
 		if ( $current_value > $data[$field_prefix . 'Max'] ) {
 			$data[$field_prefix . 'Max'] = $current_value;
 		}
 	}
 
 	/**
 	 * Remembers slow query SQL and execution time into log
 	 *
 	 * @param string $slow_sql
 	 * @param int $time
 	 * @return void
 	 * @access public
 	 */
 	public function logSlowQuery($slow_sql, $time)
 	{
 		$query_crc = kUtil::crc32($slow_sql);
 
 		$sql = 'SELECT *
 				FROM ' . TABLE_PREFIX . 'SlowSqlCapture
 				WHERE QueryCrc = ' . $query_crc;
 		$data = $this->Conn->Query($sql, null, true);
 
 		if ( $data ) {
 			$this->_updateAverageStatistics($data, 'Time', $time);
 
 			$template_names = explode(',', $data['TemplateNames']);
 			array_push($template_names, $this->GetVar('t'));
 			$data['TemplateNames'] = implode(',', array_unique($template_names));
 
 			$data['Hits']++;
 			$data['LastHit'] = adodb_mktime();
 
 			$this->Conn->doUpdate($data, TABLE_PREFIX . 'SlowSqlCapture', 'CaptureId = ' . $data['CaptureId']);
 		}
 		else {
 			$data['TimeMin'] = $data['TimeAvg'] = $data['TimeMax'] = $time;
 			$data['SqlQuery'] = $slow_sql;
 			$data['QueryCrc'] = $query_crc;
 			$data['TemplateNames'] = $this->GetVar('t');
 			$data['Hits'] = 1;
 			$data['LastHit'] = adodb_mktime();
 
 			$this->Conn->doInsert($data, TABLE_PREFIX . 'SlowSqlCapture');
 		}
 	}
 
 	/**
 	 * Checks if output compression options is available
 	 *
 	 * @return bool
 	 * @access protected
 	 */
 	protected function UseOutputCompression()
 	{
 		if ( kUtil::constOn('IS_INSTALL') || kUtil::constOn('DBG_ZEND_PRESENT') || kUtil::constOn('SKIP_OUT_COMPRESSION') ) {
 			return false;
 		}
 
 		return $this->ConfigValue('UseOutputCompression') && function_exists('gzencode') && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
 	}
 
 	//	Facade
 
 	/**
 	 * Returns current session id (SID)
 	 *
 	 * @return int
 	 * @access public
 	 */
 	public function GetSID()
 	{
 		$session = $this->recallObject('Session');
 		/* @var $session Session */
 
 		return $session->GetID();
 	}
 
 	/**
 	 * Destroys current session
 	 *
 	 * @return void
 	 * @access public
 	 * @see UserHelper::logoutUser()
 	 */
 	public function DestroySession()
 	{
 		$session = $this->recallObject('Session');
 		/* @var $session Session */
 
 		$session->Destroy();
 	}
 
 	/**
 	 * Returns variable passed to the script as GET/POST/COOKIE
 	 *
 	 * @param string $name Name of variable to retrieve
 	 * @param mixed $default default value returned in case if variable not present
 	 * @return mixed
 	 * @access public
 	 */
 	public function GetVar($name, $default = false)
 	{
 		return isset($this->HttpQuery->_Params[$name]) ? $this->HttpQuery->_Params[$name] : $default;
 	}
 
 	/**
 	 * Returns variable passed to the script as $type
 	 *
 	 * @param string $name Name of variable to retrieve
 	 * @param string $type Get/Post/Cookie
 	 * @param mixed $default default value returned in case if variable not present
 	 * @return mixed
 	 * @access public
 	 */
 	public function GetVarDirect($name, $type, $default = false)
 	{
 //		$type = ucfirst($type);
 		$array = $this->HttpQuery->$type;
 
 		return isset($array[$name]) ? $array[$name] : $default;
 	}
 
 	/**
 	 * Returns ALL variables passed to the script as GET/POST/COOKIE
 	 *
 	 * @return Array
 	 * @access public
 	 * @deprecated
 	 */
 	public function GetVars()
 	{
 		return $this->HttpQuery->GetParams();
 	}
 
 	/**
 	 * Set the variable 'as it was passed to the script through GET/POST/COOKIE'
 	 *
 	 * This could be useful to set the variable when you know that
 	 * other objects would relay on variable passed from GET/POST/COOKIE
 	 * or you could use SetVar() / GetVar() pairs to pass the values between different objects.<br>
 	 *
 	 * @param string $var Variable name to set
 	 * @param mixed $val Variable value
 	 * @return void
 	 * @access public
 	 */
 	public function SetVar($var,$val)
 	{
 		$this->HttpQuery->Set($var, $val);
 	}
 
 	/**
 	 * Deletes kHTTPQuery variable
 	 *
 	 * @param string $var
 	 * @return void
 	 * @todo Think about method name
 	 */
 	public function DeleteVar($var)
 	{
 		$this->HttpQuery->Remove($var);
 	}
 
 	/**
 	 * Deletes Session variable
 	 *
 	 * @param string $var
 	 * @return void
 	 * @access public
 	 */
 	public function RemoveVar($var)
 	{
 		$this->Session->RemoveVar($var);
 	}
 
 	/**
 	 * Removes variable from persistent session
 	 *
 	 * @param string $var
 	 * @return void
 	 * @access public
 	 */
 	public function RemovePersistentVar($var)
 	{
 		$this->Session->RemovePersistentVar($var);
 	}
 
 	/**
 	 * Restores Session variable to it's db version
 	 *
 	 * @param string $var
 	 * @return void
 	 * @access public
 	 */
 	public function RestoreVar($var)
 	{
 		$this->Session->RestoreVar($var);
 	}
 
 	/**
 	 * Returns session variable value
 	 *
 	 * Return value of $var variable stored in Session. An optional default value could be passed as second parameter.
 	 *
 	 * @param string $var Variable name
 	 * @param mixed $default Default value to return if no $var variable found in session
 	 * @return mixed
 	 * @access public
 	 * @see Session::RecallVar()
 	 */
 	public function RecallVar($var,$default=false)
 	{
 		return $this->Session->RecallVar($var,$default);
 	}
 
 	/**
 	 * Returns variable value from persistent session
 	 *
 	 * @param string $var
 	 * @param mixed $default
 	 * @return mixed
 	 * @access public
 	 * @see Session::RecallPersistentVar()
 	 */
 	public function RecallPersistentVar($var, $default = false)
 	{
 		return $this->Session->RecallPersistentVar($var, $default);
 	}
 
 	/**
 	 * Stores variable $val in session under name $var
 	 *
 	 * Use this method to store variable in session. Later this variable could be recalled.
 	 *
 	 * @param string $var Variable name
 	 * @param mixed $val Variable value
 	 * @param bool $optional
 	 * @return void
 	 * @access public
 	 * @see kApplication::RecallVar()
 	 */
 	public function StoreVar($var, $val, $optional = false)
 	{
 		$session = $this->recallObject('Session');
 		/* @var $session Session */
 
 		$this->Session->StoreVar($var, $val, $optional);
 	}
 
 	/**
 	 * Stores variable to persistent session
 	 *
 	 * @param string $var
 	 * @param mixed $val
 	 * @param bool $optional
 	 * @return void
 	 * @access public
 	 */
 	public function StorePersistentVar($var, $val, $optional = false)
 	{
 		$this->Session->StorePersistentVar($var, $val, $optional);
 	}
 
 	/**
 	 * Stores default value for session variable
 	 *
 	 * @param string $var
 	 * @param string $val
 	 * @param bool $optional
 	 * @return void
 	 * @access public
 	 * @see Session::RecallVar()
 	 * @see Session::StoreVar()
 	 */
 	public function StoreVarDefault($var, $val, $optional = false)
 	{
 		$session = $this->recallObject('Session');
 		/* @var $session Session */
 
 		$this->Session->StoreVarDefault($var, $val, $optional);
 	}
 
 	/**
 	 * Links HTTP Query variable with session variable
 	 *
 	 * If variable $var is passed in HTTP Query it is stored in session for later use. If it's not passed it's recalled from session.
 	 * This method could be used for making sure that GetVar will return query or session value for given
 	 * variable, when query variable should overwrite session (and be stored there for later use).<br>
 	 * This could be used for passing item's ID into popup with multiple tab -
 	 * in popup script you just need to call LinkVar('id', 'current_id') before first use of GetVar('id').
 	 * After that you can be sure that GetVar('id') will return passed id or id passed earlier and stored in session
 	 *
 	 * @param string $var HTTP Query (GPC) variable name
 	 * @param mixed $ses_var Session variable name
 	 * @param mixed $default Default variable value
 	 * @param bool $optional
 	 * @return void
 	 * @access public
 	 */
 	public function LinkVar($var, $ses_var = null, $default = '', $optional = false)
 	{
 		if ( !isset($ses_var) ) {
 			$ses_var = $var;
 		}
 
 		if ( $this->GetVar($var) !== false ) {
 			$this->StoreVar($ses_var, $this->GetVar($var), $optional);
 		}
 		else {
 			$this->SetVar($var, $this->RecallVar($ses_var, $default));
 		}
 	}
 
 	/**
 	 * Returns variable from HTTP Query, or from session if not passed in HTTP Query
 	 *
 	 * The same as LinkVar, but also returns the variable value taken from HTTP Query if passed, or from session if not passed.
 	 * Returns the default value if variable does not exist in session and was not passed in HTTP Query
 	 *
 	 * @param string $var HTTP Query (GPC) variable name
 	 * @param mixed $ses_var Session variable name
 	 * @param mixed $default Default variable value
 	 * @return mixed
 	 * @access public
 	 * @see LinkVar
 	 */
 	public function GetLinkedVar($var, $ses_var = null, $default = '')
 	{
 		$this->LinkVar($var, $ses_var, $default);
 
 		return $this->GetVar($var);
 	}
 
 	/**
 	 * Renders given tag and returns it's output
 	 *
 	 * @param string $prefix
 	 * @param string $tag
 	 * @param Array $params
 	 * @return mixed
 	 * @access public
 	 * @see kApplication::InitParser()
 	 */
 	public function ProcessParsedTag($prefix, $tag, $params)
 	{
 		$processor = $this->Parser->GetProcessor($prefix);
 		/* @var $processor kDBTagProcessor */
 
 		return $processor->ProcessParsedTag($tag, $params, $prefix);
 	}
 
 	/**
 	 * Return ADODB Connection object
 	 *
 	 * Returns ADODB Connection object already connected to the project database, configurable in config.php
 	 *
 	 * @return kDBConnection
 	 * @access public
 	 */
 	public function &GetADODBConnection()
 	{
 		return $this->Conn;
 	}
 
 	/**
 	 * Allows to parse given block name or include template
 	 *
 	 * @param Array $params Parameters to pass to block. Reserved parameter "name" used to specify block name.
 	 * @param bool $pass_params Forces to pass current parser params to this block/template. Use with caution, because you can accidentally pass "block_no_data" parameter.
 	 * @param bool $as_template
 	 * @return string
 	 * @access public
 	 */
 	public function ParseBlock($params, $pass_params = false, $as_template = false)
 	{
 		if ( substr($params['name'], 0, 5) == 'html:' ) {
 			return substr($params['name'], 5);
 		}
 
 		return $this->Parser->ParseBlock($params, $pass_params, $as_template);
 	}
 
 	/**
 	 * Checks, that we have given block defined
 	 *
 	 * @param string $name
 	 * @return bool
 	 * @access public
 	 */
 	public function ParserBlockFound($name)
 	{
 		return $this->Parser->blockFound($name);
 	}
 
 	/**
 	 * Allows to include template with a given name and given parameters
 	 *
 	 * @param Array $params Parameters to pass to template. Reserved parameter "name" used to specify template name.
 	 * @return string
 	 * @access public
 	 */
 	public function IncludeTemplate($params)
 	{
 		return $this->Parser->IncludeTemplate($params, isset($params['is_silent']) ? 1 : 0);
 	}
 
 	/**
 	 * Return href for template
 	 *
 	 * @param string $t Template path
 	 * @param string $prefix index.php prefix - could be blank, 'admin'
 	 * @param Array $params
 	 * @param string $index_file
 	 * @return string
 	 */
 	public function HREF($t, $prefix = '', $params = Array (), $index_file = null)
 	{
 		return $this->UrlManager->HREF($t, $prefix, $params, $index_file);
 	}
 
 	/**
 	 * Returns theme template filename and it's corresponding page_id based on given seo template
 	 *
 	 * @param string $seo_template
 	 * @return string
 	 * @access public
 	 */
 	public function getPhysicalTemplate($seo_template)
 	{
 		return $this->UrlManager->getPhysicalTemplate($seo_template);
 	}
 
 	/**
 	 * Returns template name, that corresponds with given virtual (not physical) page id
 	 *
 	 * @param int $page_id
 	 * @return string|bool
 	 * @access public
 	 */
 	public function getVirtualPageTemplate($page_id)
 	{
 		return $this->UrlManager->getVirtualPageTemplate($page_id);
 	}
 
 	/**
 	 * Returns variables with values that should be passed through with this link + variable list
 	 *
 	 * @param Array $params
 	 * @return Array
 	 * @access public
 	 */
 	public function getPassThroughVariables(&$params)
 	{
 		return $this->UrlManager->getPassThroughVariables($params);
 	}
 
 	/**
 	 * Builds url
 	 *
 	 * @param string $t
 	 * @param Array $params
 	 * @param string $pass
 	 * @param bool $pass_events
 	 * @param bool $env_var
 	 * @return string
 	 * @access public
 	 */
 	public function BuildEnv($t, $params, $pass = 'all', $pass_events = false, $env_var = true)
 	{
 		return $this->UrlManager->plain->build($t, $params, $pass, $pass_events, $env_var);
 	}
 
 	/**
 	 * Process QueryString only, create
 	 * events, ids, based on config
 	 * set template name and sid in
 	 * desired application variables.
 	 *
 	 * @param string $env_var environment string value
 	 * @param string $pass_name
 	 * @return Array
 	 * @access public
 	 */
 	public function processQueryString($env_var, $pass_name = 'passed')
 	{
 		return $this->UrlManager->plain->parse($env_var, $pass_name);
 	}
 
 	/**
 	 * Parses rewrite url and returns parsed variables
 	 *
 	 * @param string $url
 	 * @param string $pass_name
 	 * @return Array
 	 * @access public
 	 */
 	public function parseRewriteUrl($url, $pass_name = 'passed')
 	{
 		return $this->UrlManager->rewrite->parse($url, $pass_name);
 	}
 
 	/**
 	 * Returns base part of all urls, build on website
 	 *
 	 * @param string $prefix
 	 * @param bool $ssl
 	 * @param bool $add_port
 	 * @return string
 	 * @access public
 	 */
 	public function BaseURL($prefix = '', $ssl = null, $add_port = true)
 	{
 		if ( $ssl === null ) {
 			// stay on same encryption level
 			return PROTOCOL . SERVER_NAME . ($add_port && defined('PORT') ? ':' . PORT : '') . BASE_PATH . $prefix . '/';
 		}
 
 		if ( $ssl ) {
 			// going from http:// to https://
 			$base_url = $this->isAdmin ? $this->ConfigValue('AdminSSL_URL') : false;
 
 			if ( !$base_url ) {
 				$ssl_url = $this->siteDomainField('SSLUrl');
 				$base_url = $ssl_url !== false ? $ssl_url : $this->ConfigValue('SSL_URL');
 			}
 
 			return rtrim($base_url, '/') . $prefix . '/';
 		}
 
 		// going from https:// to http://
 		$domain = $this->siteDomainField('DomainName');
 
 		if ( $domain === false ) {
 			$domain = DOMAIN;
 		}
 
 		return 'http://' . $domain . ($add_port && defined('PORT') ? ':' . PORT : '') . BASE_PATH . $prefix . '/';
 	}
 
 	/**
 	 * Redirects user to url, that's build based on given parameters
 	 *
 	 * @param string $t
 	 * @param Array $params
 	 * @param string $prefix
 	 * @param string $index_file
 	 * @return void
 	 * @access public
 	 */
 	public function Redirect($t = '', $params = Array(), $prefix = '', $index_file = null)
 	{
 		$js_redirect = getArrayValue($params, 'js_redirect');
 
 		if ( $t == '' || $t === true ) {
 			$t = $this->GetVar('t');
 		}
 
 		// pass prefixes and special from previous url
 		if ( array_key_exists('js_redirect', $params) ) {
 			unset($params['js_redirect']);
 		}
 
 		// allows to send custom responce code along with redirect header
 		if ( array_key_exists('response_code', $params) ) {
 			$response_code = (int)$params['response_code'];
 			unset($params['response_code']);
 		}
 		else {
 			$response_code = 302; // Found
 		}
 
 		if ( !array_key_exists('pass', $params) ) {
 			$params['pass'] = 'all';
 		}
 
 		if ( $this->GetVar('ajax') == 'yes' && $t == $this->GetVar('t') ) {
 			// redirects to the same template as current
 			$params['ajax'] = 'yes';
 		}
 
 		$params['__URLENCODE__'] = 1;
 		$location = $this->HREF($t, $prefix, $params, $index_file);
 
 		if ( $this->isDebugMode() && (kUtil::constOn('DBG_REDIRECT') || (kUtil::constOn('DBG_RAISE_ON_WARNINGS') && $this->Debugger->WarningCount)) ) {
 			$this->Debugger->appendTrace();
 			echo '<strong>Debug output above !!!</strong><br/>' . "\n";
 
 			if ( array_key_exists('HTTP_REFERER', $_SERVER) ) {
 				echo 'Referer: <strong>' . $_SERVER['HTTP_REFERER'] . '</strong><br/>' . "\n";
 			}
 
 			echo "Proceed to redirect: <a href=\"{$location}\">{$location}</a><br/>\n";
 		}
 		else {
 			if ( $js_redirect ) {
 				// show "redirect" template instead of redirecting,
 				// because "Set-Cookie" header won't work, when "Location"
 				// header is used later
 				$this->SetVar('t', 'redirect');
 				$this->SetVar('redirect_to', $location);
 
 				// make all additional parameters available on "redirect" template too
 				foreach ($params as $name => $value) {
 					$this->SetVar($name, $value);
 				}
 
 				return;
 			}
 			else {
 				if ( $this->GetVar('ajax') == 'yes' && $t != $this->GetVar('t') ) {
 					// redirection to other then current template during ajax request
 					kUtil::safeDefine('DBG_SKIP_REPORTING', 1);
 					echo '#redirect#' . $location;
 				}
 				elseif ( headers_sent() != '' ) {
 					// some output occurred -> redirect using javascript
 					echo '<script type="text/javascript">window.location.href = \'' . $location . '\';</script>';
 				}
 				else {
 					// no output before -> redirect using HTTP header
 
 //					header('HTTP/1.1 302 Found');
 					header('Location: ' . $location, true, $response_code);
 				}
 			}
 		}
 
 		// session expiration is called from session initialization,
 		// that's why $this->Session may be not defined here
 		$session = $this->recallObject('Session');
 		/* @var $session Session */
 
 		if ( $this->InitDone ) {
 			// if redirect happened in the middle of application initialization don't call event,
 			// that presumes that application was successfully initialized
 			$this->HandleEvent(new kEvent('adm:OnBeforeShutdown'));
 		}
 
 		$session->SaveData();
 
 		ob_end_flush();
 		exit;
 	}
 
 	/**
 	 * Returns translation of given label
 	 *
 	 * @param string $label
 	 * @param bool $allow_editing return translation link, when translation is missing on current language
 	 * @param bool $use_admin use current Admin Console language to translate phrase
 	 * @return string
 	 * @access public
 	 */
 	public function Phrase($label, $allow_editing = true, $use_admin = false)
 	{
 		return $this->Phrases->GetPhrase($label, $allow_editing, $use_admin);
 	}
 
 	/**
 	 * Replace language tags in exclamation marks found in text
 	 *
 	 * @param string $text
 	 * @param bool $force_escape force escaping, not escaping of resulting string
 	 * @return string
 	 * @access public
 	 */
 	public function ReplaceLanguageTags($text, $force_escape = null)
 	{
 		return $this->Phrases->ReplaceLanguageTags($text, $force_escape);
 	}
 
 	/**
 	 * Checks if user is logged in, and creates
 	 * user object if so. User object can be recalled
 	 * later using "u.current" prefix_special. Also you may
 	 * get user id by getting "u.current_id" variable.
 	 *
 	 * @return void
 	 * @access protected
 	 */
 	protected function ValidateLogin()
 	{
 		$session = $this->recallObject('Session');
 		/* @var $session Session */
 
 		$user_id = $session->GetField('PortalUserId');
 
 		if ( !$user_id && $user_id != USER_ROOT ) {
 			$user_id = USER_GUEST;
 		}
 
 		$this->SetVar('u.current_id', $user_id);
 
 		if ( !$this->isAdmin ) {
 			// needed for "profile edit", "registration" forms ON FRONT ONLY
 			$this->SetVar('u_id', $user_id);
 		}
 
 		$this->StoreVar('user_id', $user_id, $user_id == USER_GUEST); // storing Guest user_id (-2) is optional
 
 		$this->isAdminUser = $this->isAdmin && $this->LoggedIn();
 
 		if ( $this->GetVar('expired') == 1 ) {
 			// this parameter is set only from admin
 			$user = $this->recallObject('u.login-admin', null, Array ('form_name' => 'login'));
 			/* @var $user UsersItem */
 
 			$user->SetError('UserLogin', 'session_expired', 'la_text_sess_expired');
 		}
 
 		if ( ($user_id != USER_GUEST) && defined('DBG_REQUREST_LOG') && DBG_REQUREST_LOG ) {
 			$this->HttpQuery->writeRequestLog(DBG_REQUREST_LOG);
 		}
 
 		if ( $user_id != USER_GUEST ) {
 			// normal users + root
 			$this->LoadPersistentVars();
 		}
 
 		$user_timezone = $this->Session->GetField('TimeZone');
 
 		if ( $user_timezone ) {
 			putenv('TZ=' . $user_timezone);
 		}
 	}
 
 	/**
 	 * Loads current user persistent session data
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function LoadPersistentVars()
 	{
 		$this->Session->LoadPersistentVars();
 	}
 
 	/**
 	 * Returns configuration option value by name
 	 *
 	 * @param string $name
 	 * @return string
 	 * @access public
 	 */
 	public function ConfigValue($name)
 	{
 		return $this->cacheManager->ConfigValue($name);
 	}
 
 	/**
 	 * Changes value of individual configuration variable (+resets cache, when needed)
 	 *
 	 * @param string $name
 	 * @param string $value
 	 * @param bool $local_cache_only
 	 * @return string
 	 * @access public
 	 */
 	public function SetConfigValue($name, $value, $local_cache_only = false)
 	{
 		return $this->cacheManager->SetConfigValue($name, $value, $local_cache_only);
 	}
 
 	/**
 	 * Allows to process any type of event
 	 *
 	 * @param kEvent $event
 	 * @param Array $params
 	 * @param Array $specific_params
 	 * @return void
 	 * @access public
 	 */
 	public function HandleEvent($event, $params = null, $specific_params = null)
 	{
 		if ( isset($params) ) {
 			$event = new kEvent($params, $specific_params);
 		}
 
 		$this->EventManager->HandleEvent($event);
 	}
 
 	/**
 	 * Notifies event subscribers, that event has occured
 	 *
 	 * @param kEvent $event
 	 * @return void
 	 */
 	public function notifyEventSubscribers(kEvent $event)
 	{
 		$this->EventManager->notifySubscribers($event);
 	}
 
 	/**
 	 * Allows to process any type of event
 	 *
 	 * @param kEvent $event
 	 * @return bool
 	 * @access public
 	 */
 	public function eventImplemented(kEvent $event)
 	{
 		return $this->EventManager->eventImplemented($event);
 	}
 
 	/**
 	 * Registers new class in the factory
 	 *
 	 * @param string $real_class Real name of class as in class declaration
 	 * @param string $file Filename in what $real_class is declared
 	 * @param string $pseudo_class Name under this class object will be accessed using getObject method
 	 * @return void
 	 * @access public
 	 */
 	public function registerClass($real_class, $file, $pseudo_class = null)
 	{
 		$this->Factory->registerClass($real_class, $file, $pseudo_class);
 	}
 
 	/**
 	 * Unregisters existing class from factory
 	 *
 	 * @param string $real_class Real name of class as in class declaration
 	 * @param string $pseudo_class Name under this class object is accessed using getObject method
 	 * @return void
 	 * @access public
 	 */
 	public function unregisterClass($real_class, $pseudo_class = null)
 	{
 		$this->Factory->unregisterClass($real_class, $pseudo_class);
 	}
 
 	/**
 	 * Add new scheduled task
 	 *
 	 * @param string $short_name name to be used to store last maintenance run info
 	 * @param string $event_string
 	 * @param int $run_schedule run schedule like for Cron
 	 * @param int $status
 	 * @access public
 	 */
 	public function registerScheduledTask($short_name, $event_string, $run_schedule, $status = STATUS_ACTIVE)
 	{
 		$this->EventManager->registerScheduledTask($short_name, $event_string, $run_schedule, $status);
 	}
 
 	/**
 	 * Registers Hook from subprefix event to master prefix event
 	 *
 	 * Pattern: Observer
 	 *
 	 * @param string $hook_event
 	 * @param string $do_event
 	 * @param int $mode
 	 * @param bool $conditional
 	 * @access public
 	 */
 	public function registerHook($hook_event, $do_event, $mode = hAFTER, $conditional = false)
 	{
 		$this->EventManager->registerHook($hook_event, $do_event, $mode, $conditional);
 	}
 
 	/**
 	 * Registers build event for given pseudo class
 	 *
 	 * @param string $pseudo_class
 	 * @param string $event_name
 	 * @access public
 	 */
 	public function registerBuildEvent($pseudo_class, $event_name)
 	{
 		$this->EventManager->registerBuildEvent($pseudo_class, $event_name);
 	}
 
 	/**
 	 * Allows one TagProcessor tag act as other TagProcessor tag
 	 *
 	 * @param Array $tag_info
 	 * @return void
 	 * @access public
 	 */
 	public function registerAggregateTag($tag_info)
 	{
 		$aggregator = $this->recallObject('TagsAggregator', 'kArray');
 		/* @var $aggregator kArray */
 
 		$tag_data = Array (
 			$tag_info['LocalPrefix'],
 			$tag_info['LocalTagName'],
 			getArrayValue($tag_info, 'LocalSpecial')
 		);
 
 		$aggregator->SetArrayValue($tag_info['AggregateTo'], $tag_info['AggregatedTagName'], $tag_data);
 	}
 
 	/**
 	 * Returns object using params specified, creates it if is required
 	 *
 	 * @param string $name
 	 * @param string $pseudo_class
 	 * @param Array $event_params
 	 * @param Array $arguments
 	 * @return kBase
 	 */
 	public function recallObject($name, $pseudo_class = null, $event_params = Array(), $arguments = Array ())
 	{
 		/*if ( !$this->hasObject($name) && $this->isDebugMode() && ($name == '_prefix_here_') ) {
 			// first time, when object with "_prefix_here_" prefix is accessed
 			$this->Debugger->appendTrace();
 		}*/
 
 		return $this->Factory->getObject($name, $pseudo_class, $event_params, $arguments);
 	}
 
 	/**
 	 * Returns tag processor for prefix specified
 	 *
 	 * @param string $prefix
 	 * @return kDBTagProcessor
 	 * @access public
 	 */
 	public function recallTagProcessor($prefix)
 	{
 		$this->InitParser(); // because kDBTagProcesor is in NParser dependencies
 
 		return $this->recallObject($prefix . '_TagProcessor');
 	}
 
 	/**
 	 * Checks if object with prefix passes was already created in factory
 	 *
 	 * @param string $name object pseudo_class, prefix
 	 * @return bool
 	 * @access public
 	 */
 	public function hasObject($name)
 	{
 		return $this->Factory->hasObject($name);
 	}
 
 	/**
 	 * Removes object from storage by given name
 	 *
 	 * @param string $name Object's name in the Storage
 	 * @return void
 	 * @access public
 	 */
 	public function removeObject($name)
 	{
 		$this->Factory->DestroyObject($name);
 	}
 
 	/**
 	 * Get's real class name for pseudo class, includes class file and creates class instance
 	 *
 	 * Pattern: Factory Method
 	 *
 	 * @param string $pseudo_class
 	 * @param Array $arguments
 	 * @return kBase
 	 * @access public
 	 */
 	public function makeClass($pseudo_class, $arguments = Array ())
 	{
 		return $this->Factory->makeClass($pseudo_class, $arguments);
 	}
 
 	/**
 	 * Checks if application is in debug mode
 	 *
 	 * @param bool $check_debugger check if kApplication debugger is initialized too, not only for defined DEBUG_MODE constant
 	 * @return bool
 	 * @author Alex
 	 * @access public
 	 */
 	public function isDebugMode($check_debugger = true)
 	{
 		$debug_mode = defined('DEBUG_MODE') && DEBUG_MODE;
 		if ($check_debugger) {
 			$debug_mode = $debug_mode && is_object($this->Debugger);
 		}
 		return $debug_mode;
 	}
 
 	/**
 	 * Apply url rewriting used by mod_rewrite or not
 	 *
 	 * @param bool|null $ssl Force ssl link to be build
 	 * @return bool
 	 * @access public
 	 */
 	public function RewriteURLs($ssl = false)
 	{
 		// case #1,#4:
 		//			we want to create https link from http mode
 		//			we want to create https link from https mode
 		//			conditions: ($ssl || PROTOCOL == 'https://') && $this->ConfigValue('UseModRewriteWithSSL')
 
 		// case #2,#3:
 		//			we want to create http link from https mode
 		//			we want to create http link from http mode
 		//			conditions: !$ssl && (PROTOCOL == 'https://' || PROTOCOL == 'http://')
 
 		$allow_rewriting =
 			(!$ssl && (PROTOCOL == 'https://' || PROTOCOL == 'http://')) // always allow mod_rewrite for http
 			|| // or allow rewriting for redirect TO httpS or when already in httpS
 			(($ssl || PROTOCOL == 'https://') && $this->ConfigValue('UseModRewriteWithSSL')); // but only if it's allowed in config!
 
 		return kUtil::constOn('MOD_REWRITE') && $allow_rewriting;
 	}
 
 	/**
 	 * Reads unit (specified by $prefix)
 	 * option specified by $option
 	 *
 	 * @param string $prefix
 	 * @param string $option
 	 * @param mixed $default
 	 * @return string
 	 * @access public
 	 */
 	public function getUnitOption($prefix, $option, $default = false)
 	{
 		return $this->UnitConfigReader->getUnitOption($prefix, $option, $default);
 	}
 
 	/**
 	 * Set's new unit option value
 	 *
 	 * @param string $prefix
 	 * @param string $option
 	 * @param string $value
 	 * @access public
 	 */
 	public function setUnitOption($prefix, $option, $value)
 	{
 		$this->UnitConfigReader->setUnitOption($prefix,$option,$value);
 	}
 
 	/**
 	 * Read all unit with $prefix options
 	 *
 	 * @param string $prefix
 	 * @return Array
 	 * @access public
 	 */
 	public function getUnitOptions($prefix)
 	{
 		return $this->UnitConfigReader->getUnitOptions($prefix);
 	}
 
 	/**
 	 * Returns true if config exists and is allowed for reading
 	 *
 	 * @param string $prefix
 	 * @return bool
 	 */
 	public function prefixRegistred($prefix)
 	{
 		return $this->UnitConfigReader->prefixRegistred($prefix);
 	}
 
 	/**
 	 * Splits any mixing of prefix and
 	 * special into correct ones
 	 *
 	 * @param string $prefix_special
 	 * @return Array
 	 * @access public
 	 */
 	public function processPrefix($prefix_special)
 	{
 		return $this->Factory->processPrefix($prefix_special);
 	}
 
 	/**
 	 * Set's new event for $prefix_special
 	 * passed
 	 *
 	 * @param string $prefix_special
 	 * @param string $event_name
 	 * @return void
 	 * @access public
 	 */
 	public function setEvent($prefix_special, $event_name)
 	{
 		$this->EventManager->setEvent($prefix_special, $event_name);
 	}
 
 	/**
 	 * SQL Error Handler
 	 *
 	 * @param int $code
 	 * @param string $msg
 	 * @param string $sql
 	 * @return bool
 	 * @access public
 	 */
 	public function handleSQLError($code, $msg, $sql)
 	{
 		if ( isset($this->Debugger) ) {
 			$long_error_msg = '<span class="debug_error">' . $msg . ' (' . $code . ')</span><br/><a href="javascript:$Debugger.SetClipboard(\'' . htmlspecialchars($sql) . '\');"><strong>SQL</strong></a>: ' . $this->Debugger->formatSQL($sql);
 			$long_id = $this->Debugger->mapLongError($long_error_msg);
 			$error_msg = mb_substr($msg . ' (' . $code . ') [' . $sql . ']', 0, 1000) . ' #' . $long_id;
 
 			if ( kUtil::constOn('DBG_SQL_FAILURE') && !defined('IS_INSTALL') ) {
 				throw new Exception($error_msg);
 			}
 			else {
 				$this->Debugger->appendTrace();
 			}
 		}
 		else {
 			// when not debug mode, then fatal database query won't break anything
 			$error_msg = '<strong>SQL Error</strong> in sql: ' . $sql . ', code <strong>' . $code . '</strong> (' . $msg . ')';
 		}
 
 		trigger_error($error_msg, E_USER_WARNING);
 
 		return true;
 	}
 
 	/**
 	 * Default error handler
 	 *
 	 * @param int $errno
 	 * @param string $errstr
 	 * @param string $errfile
 	 * @param int $errline
 	 * @param Array $errcontext
 	 * @return bool
 	 * @access public
 	 */
 	public function handleError($errno, $errstr, $errfile = null, $errline = null, $errcontext = Array ())
 	{
 		$this->errorLogSilent($errno, $errstr, $errfile, $errline);
 
 		$debug_mode = defined('DEBUG_MODE') && DEBUG_MODE;
 		$skip_reporting = defined('DBG_SKIP_REPORTING') && DBG_SKIP_REPORTING;
 
 		if ( !$this->errorHandlers || ($debug_mode && $skip_reporting) ) {
 			// when debugger absent OR it's present, but we actually can't see it's error report (e.g. during ajax request)
 			if ( $errno == E_USER_ERROR ) {
 				$this->errorDisplayFatal('<strong>Fatal Error: </strong>' . "{$errstr} in {$errfile} on line {$errline}");
 			}
 
 			if ( !$this->errorHandlers ) {
 				return true;
 			}
 		}
 
 		$res = false;
 		/* @var $handler Closure */
 
 		foreach ($this->errorHandlers as $handler) {
 			if ( is_array($handler) ) {
 				$object =& $handler[0];
 				$method = $handler[1];
 				$res = $object->$method($errno, $errstr, $errfile, $errline, $errcontext);
 			}
 			else {
 				$res = $handler($errno, $errstr, $errfile, $errline, $errcontext);
 			}
 		}
 
 		return $res;
 	}
 
 	/**
 	 * Handles exception
 	 *
 	 * @param Exception $exception
 	 * @return bool
 	 * @access public
 	 */
 	public function handleException($exception)
 	{
 		// transform exception to regular error (no need to rewrite existing error handlers)
 		$errno = $exception->getCode();
 		$errstr = $exception->getMessage();
 		$errfile = $exception->getFile();
 		$errline = $exception->getLine();
 
 		$this->errorLogSilent($errno, $errstr, $errfile, $errline);
 
 		$debug_mode = defined('DEBUG_MODE') && DEBUG_MODE;
 		$skip_reporting = defined('DBG_SKIP_REPORTING') && DBG_SKIP_REPORTING;
 
 		if ( $exception instanceof kRedirectException ) {
 			/* @var $exception kRedirectException */
 
 			$exception->run();
 		}
 
 		if ( !$this->exceptionHandlers || ($debug_mode && $skip_reporting) ) {
 			// when debugger absent OR it's present, but we actually can't see it's error report (e.g. during ajax request)
 			$this->errorDisplayFatal('<strong>' . get_class($exception) . ': </strong>' . "{$errstr} in {$errfile} on line {$errline}");
 
 			if ( !$this->exceptionHandlers ) {
 				return true;
 			}
 		}
 
 		$res = false;
 		/* @var $handler Closure */
 
 		foreach ($this->exceptionHandlers as $handler) {
 			if ( is_array($handler) ) {
 				$object =& $handler[0];
 				$method = $handler[1];
 				$res = $object->$method($exception);
 			}
 			else {
 				$res = $handler($exception);
 			}
 		}
 
 		return $res;
 	}
 
 	/**
 	 * Silently saves each given error message to "silent_log.txt" file, when silent log mode is enabled
 	 * @param int $errno
 	 * @param string $errstr
 	 * @param string $errfile
 	 * @param int $errline
 	 * @return void
 	 * @access protected
 	 */
 	protected function errorLogSilent($errno, $errstr = '', $errfile = '', $errline = null)
 	{
 		if ( !defined('SILENT_LOG') || !SILENT_LOG ) {
 			return;
 		}
 
 		if ( !(defined('DBG_IGNORE_STRICT_ERRORS') && DBG_IGNORE_STRICT_ERRORS && defined('E_STRICT') && ($errno == E_STRICT)) ) {
 			$time = adodb_date('d/m/Y H:i:s');
 
 			$fp = fopen((defined('RESTRICTED') ? RESTRICTED : FULL_PATH) . '/silent_log.txt', 'a');
 			fwrite($fp, '[' . $time . '] #' . $errno . ': ' . strip_tags($errstr) . ' in [' . $errfile . '] on line ' . $errline . "\n");
 			fclose($fp);
 		}
 	}
 
 	/**
 	 * Displays div with given error message
 	 *
 	 * @param string $msg
 	 * @return void
 	 * @access protected
 	 */
 	protected function errorDisplayFatal($msg)
 	{
 		$margin = $this->isAdmin ? '8px' : 'auto';
 		echo '<div style="background-color: #FEFFBF; margin: ' . $margin . '; padding: 10px; border: 2px solid red; text-align: center">' . $msg . '</div>';
 		exit;
 	}
 
 	/**
 	 * Prints trace, when debug mode is not available
 	 *
 	 * @param bool $return_result
 	 * @param int $skip_levels
 	 * @return string
 	 * @access public
 	 */
 	public function printTrace($return_result = false, $skip_levels = 1)
 	{
 		$ret = Array ();
 		$trace = debug_backtrace(false);
 
 		for ($i = 0; $i < $skip_levels; $i++) {
 			array_shift($trace);
 		}
 
 		foreach ($trace as $level => $trace_info) {
 			if ( isset($trace_info['class']) ) {
 				$object = $trace_info['class'];
 			}
 			elseif ( isset($trace_info['object']) ) {
 				$object = get_class($trace_info['object']);
 			}
 			else {
 				$object = '';
 			}
 
 			$args = '';
 			$type = isset($trace_info['type']) ? $trace_info['type'] : '';
 
 			if ( isset($trace_info['args']) ) {
 				foreach ($trace_info['args'] as $argument) {
 					if ( is_object($argument) ) {
 						$args .= get_class($argument) . ' instance, ';
 					}
 					else {
 						$args .= is_array($argument) ? 'Array' : substr($argument, 0, 10) . ' ..., ';
 					}
 				}
 
 				$args = substr($args, 0, -2);
 			}
 
 			$ret[] = '#' . $level . '  ' . $object . $type . $trace_info['function'] . '(' . $args . ') called at [' . $trace_info['file'] . ':' . $trace_info['line'] . ']';
 		}
 
 		if ( $return_result ) {
 			return implode("\n", $ret);
 		}
 
 		echo implode("\n", $ret);
 
 		return '';
 	}
 
 	/**
 	 * Returns & blocks next ResourceId available in system
 	 *
 	 * @return int
 	 * @access public
 	 */
 	public function NextResourceId()
 	{
 		$table_name = TABLE_PREFIX . 'IdGenerator';
 
 		$this->Conn->Query('LOCK TABLES ' . $table_name . ' WRITE');
 		$this->Conn->Query('UPDATE ' . $table_name . ' SET lastid = lastid + 1');
 		$id = $this->Conn->GetOne('SELECT lastid FROM ' . $table_name);
 
 		if ( $id === false ) {
 			$this->Conn->Query('INSERT INTO ' . $table_name . ' (lastid) VALUES (2)');
 			$id = 2;
 		}
 
 		$this->Conn->Query('UNLOCK TABLES');
 
 		return $id - 1;
 	}
 
 	/**
 	 * Returns genealogical main prefix for sub-table prefix passes
 	 * OR prefix, that has been found in REQUEST and some how is parent of passed sub-table prefix
 	 *
 	 * @param string $current_prefix
 	 * @param bool $real_top if set to true will return real topmost prefix, regardless of its id is passed or not
 	 * @return string
 	 * @access public
 	 */
 	public function GetTopmostPrefix($current_prefix, $real_top = false)
 	{
 		// 1. get genealogical tree of $current_prefix
 		$prefixes = Array ($current_prefix);
 		while ($parent_prefix = $this->getUnitOption($current_prefix, 'ParentPrefix')) {
 			if ( !$this->prefixRegistred($parent_prefix) ) {
 				// stop searching, when parent prefix is not registered
 				break;
 			}
 
 			$current_prefix = $parent_prefix;
 			array_unshift($prefixes, $current_prefix);
 		}
 
 		if ( $real_top ) {
 			return $current_prefix;
 		}
 
 		// 2. find what if parent is passed
 		$passed = explode(',', $this->GetVar('all_passed'));
 		foreach ($prefixes as $a_prefix) {
 			if ( in_array($a_prefix, $passed) ) {
 				return $a_prefix;
 			}
 		}
 
 		return $current_prefix;
 	}
 
 	/**
 	 * Triggers email event of type Admin
 	 *
 	 * @param string $email_event_name
 	 * @param int $to_user_id
 	 * @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
 	 * @return kEvent
 	 * @access public
 	 */
 	public function EmailEventAdmin($email_event_name, $to_user_id = null, $send_params = Array ())
 	{
 		return $this->_emailEvent($email_event_name, EmailEvent::EVENT_TYPE_ADMIN, $to_user_id, $send_params);
 	}
 
 	/**
 	 * Triggers email event of type User
 	 *
 	 * @param string $email_event_name
 	 * @param int $to_user_id
 	 * @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
 	 * @return kEvent
 	 * @access public
 	 */
 	public function EmailEventUser($email_event_name, $to_user_id = null, $send_params = Array ())
 	{
 		return $this->_emailEvent($email_event_name, EmailEvent::EVENT_TYPE_FRONTEND, $to_user_id, $send_params);
 	}
 
 	/**
 	 * Triggers general email event
 	 *
 	 * @param string $email_event_name
 	 * @param int $email_event_type (0 for User, 1 for Admin)
 	 * @param int $to_user_id
 	 * @param array $send_params associative array of direct send params,
 	 *  possible keys: to_email, to_name, from_email, from_name, message, message_text
 	 * @return kEvent
 	 * @access protected
 	 */
 	protected function _emailEvent($email_event_name, $email_event_type, $to_user_id = null, $send_params = Array ())
 	{
 		$email = $this->makeClass('kEmail');
 		/* @var $email kEmail */
 
 		if ( !$email->findEvent($email_event_name, $email_event_type) ) {
 			return false;
 		}
 
 		$email->setParams($send_params);
 
 		return $email->send($to_user_id);
 	}
 
 	/**
 	 * Allows to check if user in this session is logged in or not
 	 *
 	 * @return bool
 	 * @access public
 	 */
 	public function LoggedIn()
 	{
 		// no session during expiration process
 		return is_null($this->Session) ? false : $this->Session->LoggedIn();
 	}
 
 	/**
 	 * Check current user permissions based on it's group permissions in specified category
 	 *
 	 * @param string $name permission name
 	 * @param int $cat_id category id, current used if not specified
 	 * @param int $type permission type {1 - system, 0 - per category}
 	 * @return int
 	 * @access public
 	 */
 	public function CheckPermission($name, $type = 1, $cat_id = null)
 	{
 		$perm_helper = $this->recallObject('PermissionsHelper');
 		/* @var $perm_helper kPermissionsHelper */
 
 		return $perm_helper->CheckPermission($name, $type, $cat_id);
 	}
 
 	/**
 	 * Check current admin permissions based on it's group permissions in specified category
 	 *
 	 * @param string $name permission name
 	 * @param int $cat_id category id, current used if not specified
 	 * @param int $type permission type {1 - system, 0 - per category}
 	 * @return int
 	 * @access public
 	 */
 	public function CheckAdminPermission($name, $type = 1, $cat_id = null)
 	{
 		$perm_helper = $this->recallObject('PermissionsHelper');
 		/* @var $perm_helper kPermissionsHelper */
 
 		return $perm_helper->CheckAdminPermission($name, $type, $cat_id);
 	}
 
 	/**
 	 * Set's any field of current visit
 	 *
 	 * @param string $field
 	 * @param mixed $value
 	 * @return void
 	 * @access public
 	 * @todo move to separate module
 	 */
 	public function setVisitField($field, $value)
 	{
 		if ( $this->isAdmin || !$this->ConfigValue('UseVisitorTracking') ) {
 			// admin logins are not registered in visits list
 			return;
 		}
 
 		$visit = $this->recallObject('visits', null, Array ('raise_warnings' => 0));
 		/* @var $visit kDBItem */
 
 		if ( $visit->isLoaded() ) {
 			$visit->SetDBField($field, $value);
 			$visit->Update();
 		}
 	}
 
 	/**
 	 * Allows to check if in-portal is installed
 	 *
 	 * @return bool
 	 * @access public
 	 */
 	public function isInstalled()
 	{
 		return $this->InitDone && (count($this->ModuleInfo) > 0);
 	}
 
 	/**
 	 * Allows to determine if module is installed & enabled
 	 *
 	 * @param string $module_name
 	 * @return bool
 	 * @access public
 	 */
 	public function isModuleEnabled($module_name)
 	{
 		return $this->findModule('Name', $module_name) !== false;
 	}
 
 	/**
 	 * Returns Window ID of passed prefix main prefix (in edit mode)
 	 *
 	 * @param string $prefix
 	 * @return int
 	 * @access public
 	 */
 	public function GetTopmostWid($prefix)
 	{
 		$top_prefix = $this->GetTopmostPrefix($prefix);
 		$mode = $this->GetVar($top_prefix . '_mode');
 
 		return $mode != '' ? substr($mode, 1) : '';
 	}
 
 	/**
 	 * Get temp table name
 	 *
 	 * @param string $table
 	 * @param mixed $wid
 	 * @return string
 	 * @access public
 	 */
 	public function GetTempName($table, $wid = '')
 	{
 		return $this->GetTempTablePrefix($wid) . $table;
 	}
 
 	/**
 	 * Builds temporary table prefix based on given window id
 	 *
 	 * @param string $wid
 	 * @return string
 	 * @access public
 	 */
 	public function GetTempTablePrefix($wid = '')
 	{
 		if ( preg_match('/prefix:(.*)/', $wid, $regs) ) {
 			$wid = $this->GetTopmostWid($regs[1]);
 		}
 
 		return TABLE_PREFIX . 'ses_' . $this->GetSID() . ($wid ? '_' . $wid : '') . '_edit_';
 	}
 
 	/**
 	 * Checks if given table is a temporary table
 	 *
 	 * @param string $table
 	 * @return bool
 	 * @access public
 	 */
 	public function IsTempTable($table)
 	{
 		static $cache = Array ();
 
 		if ( !array_key_exists($table, $cache) ) {
 			$cache[$table] = preg_match('/' . TABLE_PREFIX . 'ses_' . $this->GetSID() . '(_[\d]+){0,1}_edit_(.*)/', $table);
 		}
 
 		return (bool)$cache[$table];
 	}
 
 	/**
 	 * Checks, that given prefix is in temp mode
 	 *
 	 * @param string $prefix
 	 * @param string $special
 	 * @return bool
 	 * @access public
 	 */
 	public function IsTempMode($prefix, $special = '')
 	{
 		$top_prefix = $this->GetTopmostPrefix($prefix);
 
 		$var_names = Array (
 			$top_prefix,
 			rtrim($top_prefix . '_' . $special, '_'), // from post
 			rtrim($top_prefix . '.' . $special, '.'), // assembled locally
 		);
 
 		$var_names = array_unique($var_names);
 
 		$temp_mode = false;
 		foreach ($var_names as $var_name) {
 			$value = $this->GetVar($var_name . '_mode');
 
 			if ( $value && (substr($value, 0, 1) == 't') ) {
 				$temp_mode = true;
 				break;
 			}
 		}
 
 		return $temp_mode;
 	}
 
 	/**
 	 * Return live table name based on temp table name
 	 *
 	 * @param string $temp_table
 	 * @return string
 	 */
 	public function GetLiveName($temp_table)
 	{
 		if ( preg_match('/' . TABLE_PREFIX . 'ses_' . $this->GetSID() . '(_[\d]+){0,1}_edit_(.*)/', $temp_table, $rets) ) {
 			// cut wid from table end if any
 			return $rets[2];
 		}
 		else {
 			return $temp_table;
 		}
 	}
 
 	/**
 	 * Stops processing of user request and displays given message
 	 *
 	 * @param string $message
 	 * @access public
 	 */
 	public function ApplicationDie($message = '')
 	{
 		$message = ob_get_clean() . $message;
 
 		if ( $this->isDebugMode() ) {
 			$message .= $this->Debugger->printReport(true);
 		}
 
 		echo $this->UseOutputCompression() ? gzencode($message, DBG_COMPRESSION_LEVEL) : $message;
 		exit;
 	}
 
 	/**
 	 * Returns comma-separated list of groups from given user
 	 *
 	 * @param int $user_id
 	 * @return string
 	 */
 	public function getUserGroups($user_id)
 	{
 		switch ($user_id) {
 			case USER_ROOT:
 				$user_groups = $this->ConfigValue('User_LoggedInGroup');
 				break;
 
 			case USER_GUEST:
 				$user_groups = $this->ConfigValue('User_LoggedInGroup') . ',' . $this->ConfigValue('User_GuestGroup');
 				break;
 
 			default:
 				$sql = 'SELECT GroupId
 						FROM ' . TABLE_PREFIX . 'UserGroupRelations
 						WHERE PortalUserId = ' . (int)$user_id;
 				$res = $this->Conn->GetCol($sql);
 
 				$user_groups = Array ($this->ConfigValue('User_LoggedInGroup'));
 				if ( $res ) {
 					$user_groups = array_merge($user_groups, $res);
 				}
 
 				$user_groups = implode(',', $user_groups);
 		}
 
 		return $user_groups;
 	}
 
 
 	/**
 	 * Allows to detect if page is browsed by spider (293 scheduled_tasks supported)
 	 *
 	 * @return bool
 	 * @access public
 	 */
 	/*public function IsSpider()
 	{
 		static $is_spider = null;
 
 		if ( !isset($is_spider) ) {
 			$user_agent = trim($_SERVER['HTTP_USER_AGENT']);
 			$robots = file(FULL_PATH . '/core/robots_list.txt');
 			foreach ($robots as $robot_info) {
 				$robot_info = explode("\t", $robot_info, 3);
 				if ( $user_agent == trim($robot_info[2]) ) {
 					$is_spider = true;
 					break;
 				}
 			}
 		}
 
 		return $is_spider;
 	}*/
 
 	/**
 	 * Allows to detect table's presence in database
 	 *
 	 * @param string $table_name
 	 * @param bool $force
 	 * @return bool
 	 * @access public
 	 */
 	public function TableFound($table_name, $force = false)
 	{
 		return $this->Conn->TableFound($table_name, $force);
 	}
 
 	/**
 	 * Returns counter value
 	 *
 	 * @param string $name counter name
 	 * @param Array $params counter parameters
 	 * @param string $query_name specify query name directly (don't generate from parameters)
 	 * @param bool $multiple_results
 	 * @return mixed
 	 * @access public
 	 */
 	public function getCounter($name, $params = Array (), $query_name = null, $multiple_results = false)
 	{
 		$count_helper = $this->recallObject('CountHelper');
 		/* @var $count_helper kCountHelper */
 
 		return $count_helper->getCounter($name, $params, $query_name, $multiple_results);
 	}
 
 	/**
 	 * Resets counter, which are affected by one of specified tables
 	 *
 	 * @param string $tables comma separated tables list used in counting sqls
 	 * @return void
 	 * @access public
 	 */
 	public function resetCounters($tables)
 	{
 		if ( kUtil::constOn('IS_INSTALL') ) {
 			return;
 		}
 
 		$count_helper = $this->recallObject('CountHelper');
 		/* @var $count_helper kCountHelper */
 
 		$count_helper->resetCounters($tables);
 	}
 
 	/**
 	 * Sends XML header + optionally displays xml heading
 	 *
 	 * @param string|bool $xml_version
 	 * @return string
 	 * @access public
 	 * @author Alex
 	 */
 	public function XMLHeader($xml_version = false)
 	{
-		$lang = $this->recallObject('lang.current');
-		/* @var $lang LanguagesItem */
-
 		$this->setContentType('text/xml');
 
-		return $xml_version ? '<?xml version="' . $xml_version . '" encoding="' . $lang->GetDBField('Charset') . '"?>' : '';
+		return $xml_version ? '<?xml version="' . $xml_version . '" encoding="' . CHARSET . '"?>' : '';
 	}
 
 	/**
 	 * Returns category tree
 	 *
 	 * @param int $category_id
 	 * @return Array
 	 * @access public
 	 */
 	public function getTreeIndex($category_id)
 	{
 		$tree_index = $this->getCategoryCache($category_id, 'category_tree');
 
 		if ( $tree_index ) {
 			$ret = Array ();
 			list ($ret['TreeLeft'], $ret['TreeRight']) = explode(';', $tree_index);
 
 			return $ret;
 		}
 
 		return false;
 	}
 
 	/**
 	 * Base category of all categories
 	 * Usually replaced category, with ID = 0 in category-related operations.
 	 *
 	 * @return int
 	 * @access public
 	 */
 	public function getBaseCategory()
 	{
 		// same, what $this->findModule('Name', 'Core', 'RootCat') does
 		// don't cache while IS_INSTALL, because of kInstallToolkit::createModuleCategory and upgrade
 
 		return $this->ModuleInfo['Core']['RootCat'];
 	}
 
 	/**
 	 * Deletes all data, that was cached during unit config parsing (excluding unit config locations)
 	 *
 	 * @param Array $config_variables
 	 * @access public
 	 */
 	public function DeleteUnitCache($config_variables = null)
 	{
 		$this->cacheManager->DeleteUnitCache($config_variables);
 	}
 
 	/**
 	 * Deletes cached section tree, used during permission checking and admin console tree display
 	 *
 	 * @return void
 	 * @access public
 	 */
 	public function DeleteSectionCache()
 	{
 		$this->cacheManager->DeleteSectionCache();
 	}
 
 	/**
 	 * Sets data from cache to object
 	 *
 	 * @param Array $data
 	 * @access public
 	 */
 	public function setFromCache(&$data)
 	{
 		$this->Factory->setFromCache($data);
 		$this->UnitConfigReader->setFromCache($data);
 		$this->EventManager->setFromCache($data);
 
 		$this->ReplacementTemplates = $data['Application.ReplacementTemplates'];
 		$this->RewriteListeners = $data['Application.RewriteListeners'];
 		$this->ModuleInfo = $data['Application.ModuleInfo'];
 	}
 
 	/**
 	 * Gets object data for caching
 	 * The following caches should be reset based on admin interaction (adjusting config, enabling modules etc)
 	 *
 	 * @access public
 	 * @return Array
 	 */
 	public function getToCache()
 	{
 		return array_merge(
 			$this->Factory->getToCache(),
 			$this->UnitConfigReader->getToCache(),
 			$this->EventManager->getToCache(),
 			Array (
 				'Application.ReplacementTemplates' => $this->ReplacementTemplates,
 				'Application.RewriteListeners' => $this->RewriteListeners,
 				'Application.ModuleInfo' => $this->ModuleInfo,
 			)
 		);
 	}
 
 	public function delayUnitProcessing($method, $params)
 	{
 		$this->cacheManager->delayUnitProcessing($method, $params);
 	}
 
 	/**
 	 * Returns current maintenance mode state
 	 *
 	 * @param bool $check_ips
 	 * @return int
 	 * @access public
 	 */
 	public function getMaintenanceMode($check_ips = true)
 	{
 		$exception_ips = defined('MAINTENANCE_MODE_IPS') ? MAINTENANCE_MODE_IPS : '';
 		$setting_name = $this->isAdmin ? 'MAINTENANCE_MODE_ADMIN' : 'MAINTENANCE_MODE_FRONT';
 
 		if ( defined($setting_name) && constant($setting_name) > MaintenanceMode::NONE ) {
 			$exception_ip = $check_ips ? kUtil::ipMatch($exception_ips) : false;
 
 			if ( !$exception_ip ) {
 				return constant($setting_name);
 			}
 		}
 
 		return MaintenanceMode::NONE;
 	}
 
 	/**
 	 * Sets content type of the page
 	 *
 	 * @param string $content_type
 	 * @param bool $include_charset
 	 * @return void
 	 * @access public
 	 */
 	public function setContentType($content_type = 'text/html', $include_charset = null)
 	{
-		static $aleady_set = false;
+		static $already_set = false;
 
-		if ( $aleady_set ) {
+		if ( $already_set ) {
 			return;
 		}
 
 		$header = 'Content-type: ' . $content_type;
 
 		if ( !isset($include_charset) ) {
-			$include_charset = $content_type = 'text/html' || $content_type = 'text/xml';
+			$include_charset = $content_type = 'text/html' || $content_type == 'text/plain' || $content_type = 'text/xml';
 		}
 
 		if ( $include_charset ) {
-			$language = $this->recallObject('lang.current');
-			/* @var $language LanguagesItem */
-
-			$header .= '; charset=' . $language->GetDBField('Charset');
+			$header .= '; charset=' . CHARSET;
 		}
 
-		$aleady_set = true;
+		$already_set = true;
 		header($header);
 	}
 }
\ No newline at end of file
Index: branches/5.2.x/core/kernel/managers/rewrite_url_processor.php
===================================================================
--- branches/5.2.x/core/kernel/managers/rewrite_url_processor.php	(revision 15444)
+++ branches/5.2.x/core/kernel/managers/rewrite_url_processor.php	(revision 15445)
@@ -1,1064 +1,1064 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2011 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 defined('FULL_PATH') or die('restricted access!');
 
 class kRewriteUrlProcessor extends kUrlProcessor {
 
 	/**
 	 * Holds a reference to httpquery
 	 *
 	 * @var kHttpQuery
 	 * @access protected
 	 */
 	protected $HTTPQuery = null;
 
 	/**
 	 * Urls parts, that needs to be matched by rewrite listeners
 	 *
 	 * @var Array
 	 * @access protected
 	 */
 	protected $_partsToParse = Array ();
 
 	/**
 	 * Category item prefix, that was found
 	 *
 	 * @var string|bool
 	 * @access public
 	 */
 	public $modulePrefix = false;
 
 	/**
 	 * Template aliases for current theme
 	 *
 	 * @var Array
 	 * @access protected
 	 */
 	protected $_templateAliases = null;
 
 	/**
 	 * Domain-based primary language id
 	 *
 	 * @var int
 	 * @access public
 	 */
 	public $primaryLanguageId = false;
 
 	/**
 	 * Domain-based primary theme id
 	 *
 	 * @var int
 	 * @access public
 	 */
 	public $primaryThemeId = false;
 
 	/**
 	 * Possible url endings from ModRewriteUrlEnding configuration variable
 	 *
 	 * @var Array
 	 * @access protected
 	 */
 	protected $_urlEndings = Array ('.html', '/', '');
 
 	/**
 	 * Factory storage sub-set, containing mod-rewrite listeners, used during url building and parsing
 	 *
 	 * @var Array
 	 * @access protected
 	 */
 	protected $rewriteListeners = Array ();
 
 	/**
 	 * Constructor of kRewriteUrlProcessor class
 	 *
 	 * @param $manager
 	 * @return kRewriteUrlProcessor
 	 */
 	public function __construct(&$manager)
 	{
 		parent::__construct($manager);
 
 		$this->HTTPQuery = $this->Application->recallObject('HTTPQuery');
 
 		// domain based primary language
 		$this->primaryLanguageId = $this->Application->siteDomainField('PrimaryLanguageId');
 
 		if (!$this->primaryLanguageId) {
 			// when domain-based language not found -> use site-wide language
 			$this->primaryLanguageId = $this->Application->GetDefaultLanguageId();
 		}
 
 		// domain based primary theme
 		$this->primaryThemeId = $this->Application->siteDomainField('PrimaryThemeId');
 
 		if (!$this->primaryThemeId) {
 			// when domain-based theme not found -> use site-wide theme
 			$this->primaryThemeId = $this->Application->GetDefaultThemeId(true);
 		}
 
 		$this->_initRewriteListeners();
 	}
 
 	/**
 	 * Parses url
 	 *
 	 * @return void
 	 */
 	public function parseRewriteURL()
 	{
 		$url = $this->Application->GetVar('_mod_rw_url_');
 
 		if ( $url ) {
 			$this->_redirectToDefaultUrlEnding($url);
 			$url = $this->_removeUrlEnding($url);
 		}
 
 		$cached = $this->_getCachedUrl($url);
 
 		if ( $cached !== false ) {
 			$vars = $cached['vars'];
 			$passed = $cached['passed'];
 		}
 		else {
 			$vars = $this->parse($url);
 			$passed = $vars['pass']; // also used in bottom of this method
 			unset($vars['pass']);
 
 			if ( !$this->_partsToParse ) {
 				// don't cache 404 Not Found
 				$this->_setCachedUrl($url, Array ('vars' => $vars, 'passed' => $passed));
 			}
 
 			if ( $this->Application->GetVarDirect('t', 'Post') ) {
 				// template from POST overrides template from URL.
 				$vars['t'] = $this->Application->GetVarDirect('t', 'Post');
 
 				if ( isset($vars['is_virtual']) && $vars['is_virtual'] ) {
 					$vars['m_cat_id'] = 0; // this is virtual template category (for Proj-CMS)
 				}
 			}
 
 			unset($vars['is_virtual']);
 		}
 
 		foreach ($vars as $name => $value) {
 			$this->HTTPQuery->Set($name, $value);
 		}
 
 		$this->_initAll(); // also will use parsed language to load phrases from it
 
 		$this->HTTPQuery->finalizeParsing($passed);
 	}
 
 	/**
 	 * Detects url ending of given url
 	 *
 	 * @param string $url
 	 * @return string
 	 * @access protected
 	 */
 	protected function _findUrlEnding($url)
 	{
 		if ( !$url ) {
 			return '';
 		}
 
 		foreach ($this->_urlEndings as $url_ending) {
 			if ( mb_substr($url, mb_strlen($url) - mb_strlen($url_ending)) == $url_ending ) {
 				return $url_ending;
 			}
 		}
 
 		return '';
 	}
 
 	/**
 	 * Removes url ending from url
 	 *
 	 * @param string $url
 	 * @return string
 	 * @access protected
 	 */
 	protected function _removeUrlEnding($url)
 	{
 		$url_ending = $this->_findUrlEnding($url);
 
 		if ( !$url_ending ) {
 			return $url;
 		}
 
 		return mb_substr($url, 0, mb_strlen($url) - mb_strlen($url_ending));
 	}
 
 	/**
 	 * Redirects user to page with default url ending, where needed
 	 *
 	 * @param string $url
 	 * @return void
 	 * @access protected
 	 */
 	protected function _redirectToDefaultUrlEnding($url)
 	{
 		$default_ending = $this->Application->ConfigValue('ModRewriteUrlEnding');
 
 		if ( $this->_findUrlEnding($url) == $default_ending || !$this->Application->ConfigValue('ForceModRewriteUrlEnding') ) {
 			return;
 		}
 
 		// user manually typed url with different url ending -> redirect to same url with default url ending
 		$target_url = $this->Application->BaseURL() . $this->_removeUrlEnding($url) . $default_ending;
 
 		trigger_error('Mod-rewrite url "<strong>' . $_SERVER['REQUEST_URI'] . '</strong>" without "<strong>' . $default_ending . '</strong>" line ending used', E_USER_NOTICE);
 		$this->Application->Redirect('external:' . $target_url, Array ('response_code' => 301));
 	}
 
 	/**
 	 * Returns url parsing result from cache or false, when not yet parsed
 	 *
 	 * @param $url
 	 * @return Array|bool
 	 * @access protected
 	 */
 	protected function _getCachedUrl($url)
 	{
 		if ( !$url || (defined('DBG_CACHE_URLS') && !DBG_CACHE_URLS) ) {
 			return false;
 		}
 
 		$sql = 'SELECT *
 				FROM ' . TABLE_PREFIX . 'CachedUrls
 				WHERE Hash = ' . kUtil::crc32($url) . ' AND DomainId = ' . (int)$this->Application->siteDomainField('DomainId');
 		$data = $this->Conn->GetRow($sql);
 
 		if ( $data ) {
 			$lifetime = (int)$data['LifeTime']; // in seconds
 			if ( ($lifetime > 0) && ($data['Cached'] + $lifetime < TIMENOW) ) {
 				// delete expired
 				$sql = 'DELETE FROM ' . TABLE_PREFIX . 'CachedUrls
 						WHERE UrlId = ' . $data['UrlId'];
 				$this->Conn->Query($sql);
 
 				return false;
 			}
 
 			return unserialize($data['ParsedVars']);
 		}
 
 		return false;
 	}
 
 	/**
 	 * Caches url
 	 *
 	 * @param string $url
 	 * @param Array $data
 	 * @return void
 	 * @access protected
 	 */
 	protected function _setCachedUrl($url, $data)
 	{
 		if ( !$url || (defined('DBG_CACHE_URLS') && !DBG_CACHE_URLS) ) {
 			return;
 		}
 
 		$vars = $data['vars'];
 		$passed = $data['passed'];
 		sort($passed);
 
 		// get expiration
 		if ( $vars['m_cat_id'] > 0 ) {
 			$sql = 'SELECT PageExpiration
 					FROM ' . TABLE_PREFIX . 'Categories
 					WHERE CategoryId = ' . $vars['m_cat_id'];
 			$expiration = $this->Conn->GetOne($sql);
 		}
 
 		// get prefixes
 		$prefixes = Array ();
 		$m_index = array_search('m', $passed);
 
 		if ( $m_index !== false ) {
 			unset($passed[$m_index]);
 
 			if ( $vars['m_cat_id'] > 0 ) {
 				$prefixes[] = 'c:' . $vars['m_cat_id'];
 			}
 
 			$prefixes[] = 'lang:' . $vars['m_lang'];
 			$prefixes[] = 'theme:' . $vars['m_theme'];
 		}
 
 		foreach ($passed as $prefix) {
 			if ( array_key_exists($prefix . '_id', $vars) && is_numeric($vars[$prefix . '_id']) ) {
 				$prefixes[] = $prefix . ':' . $vars[$prefix . '_id'];
 			}
 			else {
 				$prefixes[] = $prefix;
 			}
 		}
 
 		$fields_hash = Array (
 			'Url' => $url,
 			'Hash' => kUtil::crc32($url),
 			'DomainId' => (int)$this->Application->siteDomainField('DomainId'),
 			'Prefixes' => $prefixes ? '|' . implode('|', $prefixes) . '|' : '',
 			'ParsedVars' => serialize($data),
 			'Cached' => adodb_mktime(),
 			'LifeTime' => isset($expiration) && is_numeric($expiration) ? $expiration : -1
 		);
 
 		$this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'CachedUrls');
 	}
 
 	/**
 	 * Loads all registered rewrite listeners, so they could be quickly accessed later
 	 *
 	 * @access protected
 	 */
 	protected function _initRewriteListeners()
 	{
 		static $init_done = false;
 
 		if ($init_done || count($this->Application->RewriteListeners) == 0) {
 			// not initialized OR mod-rewrite url with missing config cache
 			return ;
 		}
 
 		foreach ($this->Application->RewriteListeners as $prefix => $listener_data) {
 			foreach ($listener_data['listener'] as $index => $rewrite_listener) {
 				list ($listener_prefix, $listener_method) = explode(':', $rewrite_listener);
 
 				// don't use temp variable, since it will swap objects in Factory in PHP5
 				$this->rewriteListeners[$prefix][$index] = Array ();
 				$this->rewriteListeners[$prefix][$index][0] = $this->Application->recallObject($listener_prefix);
 				$this->rewriteListeners[$prefix][$index][1] = $listener_method;
 			}
 		}
 
 		define('MOD_REWRITE_URL_ENDING', $this->Application->ConfigValue('ModRewriteUrlEnding'));
 
 		$init_done = true;
 	}
 
 	/**
 	 * Parses given string into a set of variables (url in this case)
 	 *
 	 * @param string $string
 	 * @param string $pass_name
 	 * @return Array
 	 * @access public
 	 */
 	public function parse($string, $pass_name = 'pass')
 	{
 		// external url (could be back this website as well)
 		if ( preg_match('/external:(.*)/', $string, $regs) ) {
 			$string = $regs[1];
 		}
 
 		$vars = Array ($pass_name => Array ('m'));
 		$url_components = parse_url($string);
 
 		if ( isset($url_components['query']) ) {
 			parse_str($url_components['query'], $vars);
 		}
 
 		if ( isset($url_components['path']) ) {
 			if ( BASE_PATH ) {
 				$string = preg_replace('/^' . preg_quote(BASE_PATH, '/') . '/', '', $url_components['path'], 1);
 			}
 			else {
 				$string = $url_components['path'];
 			}
 
 			$string = $this->_removeUrlEnding(trim($string, '/'));
 		}
 		else {
 			$string = '';
 		}
 
-		$url_parts = $string ? explode('/', mb_strtolower($string, 'UTF-8')) : Array ();
+		$url_parts = $string ? explode('/', mb_strtolower($string)) : Array ();
 
 		$this->_partsToParse = $url_parts;
 
 		if ( ($this->HTTPQuery->Get('rewrite') == 'on') || !$url_parts ) {
 			$this->_setDefaultValues($vars);
 		}
 
 		if ( !$url_parts ) {
 			$this->_initAll();
 			$vars['t'] = $this->Application->UrlManager->getTemplateName();
 
 			return $vars;
 		}
 
 		$this->_parseLanguage($url_parts, $vars);
 		$this->_parseTheme($url_parts, $vars);
 
 		// http://site-url/<language>/<theme>/<category>[_<category_page>]/<template>/<module_page>
 		// http://site-url/<language>/<theme>/<category>[_<category_page>]/<module_page> (category-based section template)
 		// http://site-url/<language>/<theme>/<category>[_<category_page>]/<template>/<module_item>
 		// http://site-url/<language>/<theme>/<category>[_<category_page>]/<module_item> (category-based detail template)
 		// http://site-url/<language>/<theme>/<rl_injections>/<category>[_<category_page>]/<rl_part> (customized url)
 
 		if ( $this->_processRewriteListeners($url_parts, $vars) ) {
 			return $vars;
 		}
 
 		$this->_parsePhysicalTemplate($url_parts, $vars);
 
 		if ( ($this->modulePrefix === false) && $vars['m_cat_id'] && !$this->_partsToParse ) {
 			// no category item found, but category found and all url matched -> module index page
 
 			return $vars;
 		}
 
 		if ( $this->_partsToParse ) {
 			$vars = array_merge($vars, $this->manager->prepare404($vars['m_theme']));
 		}
 
 		return $vars;
 	}
 
 	/**
 	 * Initializes theme & language based on parse results
 	 *
 	 * @return void
 	 * @access protected
 	 */
 	protected function _initAll()
 	{
 		$this->Application->VerifyThemeId();
 		$this->Application->VerifyLanguageId();
 
 		// no need, since we don't have any cached phrase IDs + nobody will use PhrasesCache::LanguageId soon
 		// $this->Application->Phrases->Init('phrases');
 	}
 
 	/**
 	 * Sets default parsed values before actual url parsing (only, for empty url)
 	 *
 	 * @param Array $vars
 	 * @access protected
 	 */
 	protected function _setDefaultValues(&$vars)
 	{
 		$defaults = Array (
 			'm_cat_id' => 0, // no category
 			'm_cat_page' => 1, // first category page
 			'm_opener' => 's', // stay on same page
 			't' => 'index' // main site page
 		);
 
 		if ($this->primaryLanguageId) {
 			// domain-based primary language
 			$defaults['m_lang'] = $this->primaryLanguageId;
 		}
 
 		if ($this->primaryThemeId) {
 			// domain-based primary theme
 			$defaults['m_theme'] = $this->primaryThemeId;
 		}
 
 		foreach ($defaults as $default_key => $default_value) {
 			if ($this->HTTPQuery->Get($default_key) === false) {
 				$vars[$default_key] = $default_value;
 			}
 		}
 	}
 
 	/**
 	 * Processes url using rewrite listeners
 	 *
 	 * Pattern: Chain of Command
 	 *
 	 * @param Array $url_parts
 	 * @param Array $vars
 	 * @return bool
 	 * @access protected
 	 */
 	protected function _processRewriteListeners(&$url_parts, &$vars)
 	{
 		$this->_initRewriteListeners();
 		$page_number = $this->_parsePage($url_parts, $vars);
 
 		foreach ($this->rewriteListeners as $prefix => $listeners) {
 			// set default page
 			// $vars[$prefix . '_Page'] = 1; // will override page in session in case, when none is given in url
 
 			if ($page_number) {
 				// page given in url - use it
 				$vars[$prefix . '_id'] = 0;
 				$vars[$prefix . '_Page'] = $page_number;
 			}
 
 			// $listeners[1] - listener, used for parsing
 			$listener_result = $listeners[1][0]->$listeners[1][1](REWRITE_MODE_PARSE, $prefix, $vars, $url_parts);
 			if ($listener_result === false) {
 				// will not proceed to other methods
 				return true;
 			}
 		}
 
 		// will proceed to other methods
 		return false;
 	}
 
 	/**
 	 * Set's page (when found) to all modules
 	 *
 	 * @param Array $url_parts
 	 * @param Array $vars
 	 * @return string
 	 * @access protected
 	 *
 	 * @todo Should find a way, how to determine what rewrite listener page is it
 	 */
 	protected function _parsePage(&$url_parts, &$vars)
 	{
 		if (!$url_parts) {
 			return false;
 		}
 
 		$page_number = end($url_parts);
 		if (!is_numeric($page_number)) {
 			return false;
 		}
 
 		array_pop($url_parts);
 		$this->partParsed($page_number, 'rtl');
 
 		return $page_number;
 	}
 
 	/**
 	 * Gets language part from url
 	 *
 	 * @param Array $url_parts
 	 * @param Array $vars
 	 * @return bool
 	 * @access protected
 	 */
 	protected function _parseLanguage(&$url_parts, &$vars)
 	{
 		if (!$url_parts) {
 			return false;
 		}
 
 		$url_part = reset($url_parts);
 
 		$sql = 'SELECT LanguageId, IF(LOWER(PackName) = ' . $this->Conn->qstr($url_part) . ', 2, PrimaryLang) AS SortKey
 				FROM ' . TABLE_PREFIX . 'Languages
 				WHERE Enabled = 1
 				ORDER BY SortKey DESC';
 		$language_info = $this->Conn->GetRow($sql);
 
 		if ($language_info && $language_info['LanguageId'] && $language_info['SortKey']) {
 			// primary language will be selected in case, when $url_part doesn't match to other's language pack name
 			// don't use next enabled language, when primary language is disabled
 			$vars['m_lang'] = $language_info['LanguageId'];
 
 			if ($language_info['SortKey'] == 2) {
 				// language was found by pack name
 				array_shift($url_parts);
 				$this->partParsed($url_part);
 			}
 			elseif ($this->primaryLanguageId) {
 				// use domain-based primary language instead of site-wide primary language
 				$vars['m_lang'] = $this->primaryLanguageId;
 			}
 
 			return true;
 		}
 
 		return false;
 	}
 
 	/**
 	 * Gets theme part from url
 	 *
 	 * @param Array $url_parts
 	 * @param Array $vars
 	 * @return bool
 	 */
 	protected function _parseTheme(&$url_parts, &$vars)
 	{
 		if (!$url_parts) {
 			return false;
 		}
 
 		$url_part = reset($url_parts);
 
 		$sql = 'SELECT ThemeId, IF(LOWER(Name) = ' . $this->Conn->qstr($url_part) . ', 2, PrimaryTheme) AS SortKey, TemplateAliases
 				FROM ' . TABLE_PREFIX . 'Themes
 				WHERE Enabled = 1
 				ORDER BY SortKey DESC';
 		$theme_info = $this->Conn->GetRow($sql);
 
 		if ($theme_info && $theme_info['ThemeId'] && $theme_info['SortKey']) {
 			// primary theme will be selected in case, when $url_part doesn't match to other's theme name
 			// don't use next enabled theme, when primary theme is disabled
 			$vars['m_theme'] = $theme_info['ThemeId'];
 
 			if ($theme_info['TemplateAliases']) {
 				$this->_templateAliases = unserialize($theme_info['TemplateAliases']);
 			}
 			else {
 				$this->_templateAliases = Array ();
 			}
 
 			if ($theme_info['SortKey'] == 2) {
 				// theme was found by name
 				array_shift($url_parts);
 				$this->partParsed($url_part);
 			}
 			elseif ($this->primaryThemeId) {
 				// use domain-based primary theme instead of site-wide primary theme
 				$vars['m_theme'] = $this->primaryThemeId;
 			}
 
 			return true;
 		}
 
 		$vars['m_theme'] = 0; // required, because used later for category/template detection
 
 		return false;
 	}
 
 	/**
 	 * Parses real template name from url
 	 *
 	 * @param Array $url_parts
 	 * @param Array $vars
 	 * @return bool
 	 */
 	protected function _parsePhysicalTemplate($url_parts, &$vars)
 	{
 		if ( !$url_parts ) {
 			return false;
 		}
 
 		$themes_helper = $this->Application->recallObject('ThemesHelper');
 		/* @var $themes_helper kThemesHelper */
 
 		do {
 			$index_added = false;
 			$template_path = implode('/', $url_parts);
 			$template_found = $themes_helper->getTemplateId($template_path, $vars['m_theme']);
 
 			if ( !$template_found ) {
 				$index_added = true;
 				$template_found = $themes_helper->getTemplateId($template_path . '/index', $vars['m_theme']);
 			}
 
 			if ( !$template_found ) {
 				array_shift($url_parts);
 			}
 		} while ( !$template_found && $url_parts );
 
 		if ( $template_found ) {
 			$template_parts = explode('/', $template_path);
 			$vars['t'] = $template_path . ($index_added ? '/index' : '');
 
 			while ( $template_parts ) {
 				$this->partParsed(array_pop($template_parts), 'rtl');
 			}
 
 			// 1. will damage actual category during category item review add process
 			// 2. will use "use_section" parameter of "m_Link" tag to gain same effect
 //			$vars['m_cat_id'] = $themes_helper->getPageByTemplate($template_path, $vars['m_theme']);
 
 			return true;
 		}
 
 		return false;
 	}
 
 	/**
 	 * Returns environment variable values for given prefix (uses directly given params, when available)
 	 *
 	 * @param string $prefix_special
 	 * @param Array $params
 	 * @param bool $keep_events
 	 * @return Array
 	 * @access public
 	 */
 	public function getProcessedParams($prefix_special, &$params, $keep_events)
 	{
 		list ($prefix) = explode('.', $prefix_special);
 
 		$query_vars = $this->Application->getUnitOption($prefix, 'QueryString', Array ());
 		/* @var $query_vars Array */
 
 		if ( !$query_vars ) {
 			// given prefix doesn't use "env" variable to pass it's data
 			return false;
 		}
 
 		$event_key = array_search('event', $query_vars);
 		if ( $event_key ) {
 			// pass through event of this prefix
 			unset($query_vars[$event_key]);
 		}
 
 		if ( array_key_exists($prefix_special . '_event', $params) && !$params[$prefix_special . '_event'] ) {
 			// if empty event, then remove it from url
 			unset($params[$prefix_special . '_event']);
 		}
 
 		// if pass events is off and event is not implicity passed
 		if ( !$keep_events && !array_key_exists($prefix_special . '_event', $params) ) {
 			unset($params[$prefix_special . '_event']); // remove event from url if requested
 			//otherwise it will use value from get_var
 		}
 
 		$processed_params = Array ();
 		foreach ($query_vars as $var_name) {
 			// if value passed in params use it, otherwise use current from application
 			$var_name = $prefix_special . '_' . $var_name;
 			$processed_params[$var_name] = array_key_exists($var_name, $params) ? $params[$var_name] : $this->Application->GetVar($var_name);
 
 			if ( array_key_exists($var_name, $params) ) {
 				unset($params[$var_name]);
 			}
 		}
 
 		return $processed_params;
 	}
 
 	/**
 	 * Returns module item details template specified in given category custom field for given module prefix
 	 *
 	 * @param int|Array $category
 	 * @param string $module_prefix
 	 * @param int $theme_id
 	 * @return string
 	 * @access public
 	 * @todo Move to kPlainUrlProcessor
 	 */
 	public function GetItemTemplate($category, $module_prefix, $theme_id = null)
 	{
 		if ( !isset($theme_id) ) {
 			$theme_id = $this->Application->GetVar('m_theme');
 		}
 
 		$category_id = is_array($category) ? $category['CategoryId'] : $category;
 		$cache_key = __CLASS__ . '::' . __FUNCTION__ . '[%CIDSerial:' . $category_id . '%][%ThemeIDSerial:' . $theme_id . '%]' . $module_prefix;
 
 		$cached_value = $this->Application->getCache($cache_key);
 		if ( $cached_value !== false ) {
 			return $cached_value;
 		}
 
 		if ( !is_array($category) ) {
 			if ( $category == 0 ) {
 				$category = $this->Application->findModule('Var', $module_prefix, 'RootCat');
 			}
 			$sql = 'SELECT c.ParentPath, c.CategoryId
 					FROM ' . TABLE_PREFIX . 'Categories AS c
 					WHERE c.CategoryId = ' . $category;
 			$category = $this->Conn->GetRow($sql);
 		}
 		$parent_path = implode(',', explode('|', substr($category['ParentPath'], 1, -1)));
 
 		// item template is stored in module' system custom field - need to get that field Id
 		$primary_lang = $this->Application->GetDefaultLanguageId();
 		$item_template_field_id = $this->getItemTemplateCustomField($module_prefix);
 
 		// looking for item template through cats hierarchy sorted by parent path
 		$query = '	SELECT ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . ',
 								FIND_IN_SET(c.CategoryId, ' . $this->Conn->qstr($parent_path) . ') AS Ord1,
 								c.CategoryId, c.Name, ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . '
 					FROM ' . TABLE_PREFIX . 'Categories AS c
 					LEFT JOIN ' . TABLE_PREFIX . 'CategoryCustomData AS ccd
 					ON ccd.ResourceId = c.ResourceId
 					WHERE c.CategoryId IN (' . $parent_path . ') AND ccd.l' . $primary_lang . '_cust_' . $item_template_field_id . ' != \'\'
 					ORDER BY FIND_IN_SET(c.CategoryId, ' . $this->Conn->qstr($parent_path) . ') DESC';
 		$item_template = $this->Conn->GetOne($query);
 
 		if ( !isset($this->_templateAliases) ) {
 			// when empty url OR mod-rewrite disabled
 
 			$themes_helper = $this->Application->recallObject('ThemesHelper');
 			/* @var $themes_helper kThemesHelper */
 
 			$sql = 'SELECT TemplateAliases
 					FROM ' . TABLE_PREFIX . 'Themes
 					WHERE ThemeId = ' . (int)$themes_helper->getCurrentThemeId();
 			$template_aliases = $this->Conn->GetOne($sql);
 
 			$this->_templateAliases = $template_aliases ? unserialize($template_aliases) : Array ();
 		}
 
 		if ( substr($item_template, 0, 1) == '#' ) {
 			// it's template alias + "#" isn't allowed in filenames
 			$item_template = (string)getArrayValue($this->_templateAliases, $item_template);
 		}
 
 		$this->Application->setCache($cache_key, $item_template);
 
 		return $item_template;
 	}
 
 	/**
 	 * Returns category custom field id, where given module prefix item template name is stored
 	 *
 	 * @param string $module_prefix
 	 * @return int
 	 * @access public
 	 * @todo Move to kPlainUrlProcessor; decrease visibility, since used only during upgrade
 	 */
 	public function getItemTemplateCustomField($module_prefix)
 	{
 		$cache_key = __CLASS__ . '::' . __FUNCTION__ . '[%CfSerial%]:' . $module_prefix;
 		$cached_value = $this->Application->getCache($cache_key);
 
 		if ($cached_value !== false) {
 			return $cached_value;
 		}
 
 		$sql = 'SELECT CustomFieldId
 				FROM ' . TABLE_PREFIX . 'CustomFields
 				WHERE FieldName = ' . $this->Conn->qstr($module_prefix . '_ItemTemplate');
 		$item_template_field_id = $this->Conn->GetOne($sql);
 
 		$this->Application->setCache($cache_key, $item_template_field_id);
 
 		return $item_template_field_id;
 	}
 
 	/**
 	 * Marks url part as parsed
 	 *
 	 * @param string $url_part
 	 * @param string $parse_direction
 	 * @access public
 	 */
 	public function partParsed($url_part, $parse_direction = 'ltr')
 	{
 		if ( !$this->_partsToParse ) {
 			return ;
 		}
 
 		if ( $parse_direction == 'ltr' ) {
 			$expected_url_part = reset($this->_partsToParse);
 
 			if ( $url_part == $expected_url_part ) {
 				array_shift($this->_partsToParse);
 			}
 		}
 		else {
 			$expected_url_part = end($this->_partsToParse);
 
 			if ( $url_part == $expected_url_part ) {
 				array_pop($this->_partsToParse);
 			}
 		}
 
 		if ( $url_part != $expected_url_part ) {
 			trigger_error('partParsed: expected URL part "<strong>' . $expected_url_part . '</strong>", received URL part "<strong>' . $url_part . '</strong>"', E_USER_NOTICE);
 		}
 	}
 
 	/**
 	 * Determines if there is more to parse in url
 	 *
 	 * @return bool
 	 * @access public
 	 */
 	public function moreToParse()
 	{
 		return count($this->_partsToParse) > 0;
 	}
 
 	/**
 	 * Builds url
 	 *
 	 * @param string $t
 	 * @param Array $params
 	 * @param string $pass
 	 * @param bool $pass_events
 	 * @param bool $env_var
 	 * @return string
 	 * @access public
 	 */
 	public function build($t, $params, $pass = 'all', $pass_events = false, $env_var = false)
 	{
 		if ( $this->Application->GetVar('admin') || (array_key_exists('admin', $params) && $params['admin']) ) {
 			$params['admin'] = 1;
 
 			if ( !array_key_exists('editing_mode', $params) ) {
 				$params['editing_mode'] = EDITING_MODE;
 			}
 		}
 
 		$ret = '';
 		$env = '';
 
 		$encode = false;
 
 		if ( isset($params['__URLENCODE__']) ) {
 			$encode = $params['__URLENCODE__'];
 			unset($params['__URLENCODE__']);
 		}
 
 		if ( isset($params['__SSL__']) ) {
 			unset($params['__SSL__']);
 		}
 
 		$catalog_item_found = false;
 		$pass_info = $this->getPassInfo($pass);
 
 		if ( $pass_info ) {
 			if ( $pass_info[0] == 'm' ) {
 				array_shift($pass_info);
 			}
 
 			$inject_parts = Array (); // url parts for beginning of url
 			$params['t'] = $t; // make template available for rewrite listeners
 			$params['pass_template'] = true; // by default we keep given template in resulting url
 
 			if ( !array_key_exists('pass_category', $params) ) {
 				$params['pass_category'] = false; // by default we don't keep categories in url
 			}
 
 			foreach ($pass_info as $pass_index => $pass_element) {
 				list ($prefix) = explode('.', $pass_element);
 				$catalog_item = $this->Application->findModule('Var', $prefix) && $this->Application->getUnitOption($prefix, 'CatalogItem');
 
 				if ( array_key_exists($prefix, $this->rewriteListeners) ) {
 					// if next prefix is same as current, but with special => exclude current prefix from url
 					$next_prefix = array_key_exists($pass_index + 1, $pass_info) ? $pass_info[$pass_index + 1] : false;
 					if ( $next_prefix ) {
 						$next_prefix = substr($next_prefix, 0, strlen($prefix) + 1);
 						if ( $prefix . '.' == $next_prefix ) {
 							continue;
 						}
 					}
 
 					// rewritten url part
 					$url_part = $this->BuildModuleEnv($pass_element, $params, $pass_events);
 
 					if ( is_string($url_part) && $url_part ) {
 						$ret .= $url_part . '/';
 
 						if ( $catalog_item ) {
 							// pass category later only for catalog items
 							$catalog_item_found = true;
 						}
 					}
 					elseif ( is_array($url_part) ) {
 						// rewrite listener want to insert something at the beginning of url too
 						if ( $url_part[0] ) {
 							$inject_parts[] = $url_part[0];
 						}
 
 						if ( $url_part[1] ) {
 							$ret .= $url_part[1] . '/';
 						}
 
 						if ( $catalog_item ) {
 							// pass category later only for catalog items
 							$catalog_item_found = true;
 						}
 					}
 					elseif ( $url_part === false ) {
 						// rewrite listener decided not to rewrite given $pass_element
 						$env .= ':' . $this->manager->plain->BuildModuleEnv($pass_element, $params, $pass_events);
 					}
 				}
 				else {
 					$env .= ':' . $this->manager->plain->BuildModuleEnv($pass_element, $params, $pass_events);
 				}
 			}
 
 			if ( $catalog_item_found || preg_match('/c\.[-\d]*/', implode(',', $pass_info)) ) {
 				// "c" prefix is present -> keep category
 				$params['pass_category'] = true;
 			}
 
 			$params['inject_parts'] = $inject_parts;
 
 			$ret = $this->BuildModuleEnv('m', $params, $pass_events) . '/' . $ret;
 			$cat_processed = array_key_exists('category_processed', $params) && $params['category_processed'];
 
 			// remove temporary parameters used by listeners
 			unset($params['t'], $params['inject_parts'], $params['pass_template'], $params['pass_category'], $params['category_processed']);
 
 			$ret = trim($ret, '/');
 
 			if ( isset($params['url_ending']) ) {
 				if ( $ret ) {
 					$ret .= $params['url_ending'];
 				}
 
 				unset($params['url_ending']);
 			}
 			elseif ( $ret ) {
 				$ret .= MOD_REWRITE_URL_ENDING;
 			}
 
 			if ( $env ) {
 				$params[ENV_VAR_NAME] = ltrim($env, ':');
 			}
 		}
 
 		unset($params['pass'], $params['opener'], $params['m_event']);
 
 		if ( array_key_exists('escape', $params) && $params['escape'] ) {
 			$ret = addslashes($ret);
 			unset($params['escape']);
 		}
 
 		$ret = str_replace('%2F', '/', urlencode($ret));
 
 		if ( $params ) {
 			$params_str = '';
 			$join_string = $encode ? '&' : '&amp;';
 
 			foreach ($params as $param => $value) {
 				$params_str .= $join_string . $param . '=' . $value;
 			}
 
 			$ret .= '?' . substr($params_str, strlen($join_string));
 		}
 
 		if ( $encode ) {
 			$ret = str_replace('\\', '%5C', $ret);
 		}
 
 		return $ret;
 	}
 
 	/**
 	 * Builds env part that corresponds prefix passed
 	 *
 	 * @param string $prefix_special item's prefix & [special]
 	 * @param Array $params url params
 	 * @param bool $pass_events
 	 * @return string
 	 * @access protected
 	 */
 	protected function BuildModuleEnv($prefix_special, &$params, $pass_events = false)
 	{
 		list ($prefix) = explode('.', $prefix_special);
 
 		$url_parts = Array ();
 		$listener = $this->rewriteListeners[$prefix][0];
 
 		$ret = $listener[0]->$listener[1](REWRITE_MODE_BUILD, $prefix_special, $params, $url_parts, $pass_events);
 
 		return $ret;
 	}
 }
\ No newline at end of file
Index: branches/5.2.x/core/kernel/utility/email_send.php
===================================================================
--- branches/5.2.x/core/kernel/utility/email_send.php	(revision 15444)
+++ branches/5.2.x/core/kernel/utility/email_send.php	(revision 15445)
@@ -1,2082 +1,2075 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	/**
 	 * Class used to compose email message (using MIME standarts) and send it via mail function or via SMTP server
 	 *
 	 */
 	class kEmailSendingHelper extends kHelper {
 
 		/**
 		 * headers of main header part
 		 *
 		 * @var Array
 		 */
 		var $headers = Array ();
 
 		/**
 		 * Tells if all message parts were combined together
 		 *
 		 * @var int
 		 */
 		var $bodyPartNumber = false;
 
 		/**
 		 * Composed message parts
 		 *
 		 * @var Array
 		 */
 		var $parts = Array();
 
 		/**
 		 * Lines separator by MIME standart
 		 *
 		 * @var string
 		 */
 		var $line_break = "\n";
 
 		/**
 		 * Charset used for message composing
 		 *
 		 * @var string
 		 */
 		var $charset = 'utf-8';
 
 		/**
 		 * Name of mailer program (X-Mailer header)
 		 *
 		 * @var string
 		 */
 		var $mailerName = '';
 
 		/**
 		 * Options used for message content-type & structure guessing
 		 *
 		 * @var Array
 		 */
 		var $guessOptions = Array ();
 
 		/**
 		 * Send messages using selected method
 		 *
 		 * @var string
 		 */
 		var $sendMethod = 'Mail';
 
 		/**
 		 * Parameters used to initiate SMTP server connection
 		 *
 		 * @var Array
 		 */
 		var $smtpParams = Array ();
 
 	    /**
 	     * List of supported authentication methods, in preferential order.
 	     * @var array
 	     * @access public
 	     */
 	    var $smtpAuthMethods = Array('CRAM-MD5', 'LOGIN', 'PLAIN');
 
 	    /**
 	     * The socket resource being used to connect to the SMTP server.
 	     * @var kSocket
 	     * @access private
 	     */
 	    var $smtpSocket = null;
 
 	    /**
 	     * The most recent server response code.
 	     * @var int
 	     * @access private
 	     */
 	    var $smtpResponceCode = -1;
 
 	    /**
 	     * The most recent server response arguments.
 	     * @var array
 	     * @access private
 	     */
 	    var $smtpRespoceArguments = Array();
 
 	    /**
 	     * Stores detected features of the SMTP server.
 	     * @var array
 	     * @access private
 	     */
 	    var $smtpFeatures = Array();
 
 	    /**
 	     * Stores log data
 		 *
 	     * @var Array
 	     * @access protected
 	     */
 	    protected $_logData = Array ();
 
 		public function __construct()
 		{
 			parent::__construct();
 
 			// set default guess options
 			$this->guessOptions = Array (
 				'attachments'			=>	Array (),
 				'inline_attachments'	=>	Array (),
 				'text_part'				=>	false,
 				'html_part'				=>	false,
 			);
 
 			// read SMTP server connection params from config
 			$smtp_mapping = Array ('server' => 'Smtp_Server', 'port' => 'Smtp_Port');
 			if ($this->Application->ConfigValue('Smtp_Authenticate')) {
 				$smtp_mapping['username'] = 'Smtp_User';
 				$smtp_mapping['password'] = 'Smtp_Pass';
 			}
 
 			foreach ($smtp_mapping as $smtp_name => $config_name) {
 				$this->smtpParams[$smtp_name] = $this->Application->ConfigValue($config_name);
 			}
 			$this->smtpParams['use_auth'] = isset($this->smtpParams['username']) ? true : false;
 			$this->smtpParams['localhost'] = 'localhost'; // The value to give when sending EHLO or HELO.
 
 			$this->sendMethod = $this->smtpParams['server'] && $this->smtpParams['port'] ? 'SMTP' : 'Mail';
 
 			if ($this->sendMethod == 'SMTP') {
 				// create connection object if we will use SMTP
 				$this->smtpSocket = $this->Application->makeClass('Socket');
 			}
 
 			$this->SetCharset(null, true);
 		}
 
 		/**
 		 * Returns new message id header by sender's email address
 		 *
 		 * @param string $email_address email address
 		 * @return string
 		 */
 		function GenerateMessageID($email_address)
 		{
 			list ($micros, $seconds) = explode(' ', microtime());
 			list ($user, $domain) = explode('@', $email_address, 2);
 
 			$message_id = strftime('%Y%m%d%H%M%S', $seconds).substr($micros, 1, 5).'.'.preg_replace('/[^A-Za-z]+/', '-', $user).'@'.$domain;
 
 			$this->SetHeader('Message-ID', '<'.$message_id.'>');
 		}
 
 		/**
 		 * Returns extension of given filename
 		 *
 		 * @param string $filename
 		 * @return string
 		 */
 		function GetFilenameExtension($filename)
 		{
 			$last_dot = mb_strrpos($filename, '.');
 			return $last_dot !== false ? mb_substr($filename, $last_dot + 1) : '';
 		}
 
 		/**
 		 * Creates boundary for part by number (only if it's missing)
 		 *
 		 * @param int $part_number
 		 *
 		 */
 
 		function CreatePartBoundary($part_number)
 		{
 			$part =& $this->parts[$part_number];
 			if (!isset($part['BOUNDARY'])) {
 				$part['BOUNDARY'] = md5(uniqid($part_number.time()));
 
 			}
 		}
 
 		/**
 		 * Returns ready to use headers associative array of any message part by it's number
 		 *
 		 * @param int $part_number
 		 * @return Array
 		 */
 		function GetPartHeaders($part_number)
 		{
 			$part =& $this->parts[$part_number];
 
 			if (!isset($part['Content-Type'])) {
 				return $this->SetError('MISSING_CONTENT_TYPE');
 			}
 
 			$full_type = strtolower($part['Content-Type']);
 			list ($type, $sub_type) = explode('/', $full_type);
 
 			$headers['Content-Type'] = $full_type;
 			switch ($type) {
 				case 'text':
 				case 'image':
 				case 'audio':
 				case 'video':
 				case 'application':
 				case 'message':
 					// 1. update content-type header
 					if (isset($part['CHARSET'])) {
 						$headers['Content-Type'] .= '; charset='.$part['CHARSET'];
 					}
 					if (isset($part['NAME'])) {
 						$headers['Content-Type'] .= '; name="'.$part['NAME'].'"';
 					}
 
 					// 2. set content-transfer-encoding header
 					if (isset($part['Content-Transfer-Encoding'])) {
 						$headers['Content-Transfer-Encoding'] = $part['Content-Transfer-Encoding'];
 					}
 
 					// 3. set content-disposition header
 					if (isset($part['DISPOSITION']) && $part['DISPOSITION']) {
 						$headers['Content-Disposition'] = $part['DISPOSITION'];
 						if (isset($part['NAME'])) {
 							$headers['Content-Disposition'] .= '; filename="'.$part['NAME'].'"';
 						}
 					}
 					break;
 
 				case 'multipart':
 					switch ($sub_type) {
 						case 'alternative':
 						case 'related':
 						case 'mixed':
 						case 'parallel':
 							$this->CreatePartBoundary($part_number);
 							$headers['Content-Type'] .= '; boundary="'.$part['BOUNDARY'].'"';
 							break;
 
 						default:
 							return $this->SetError('INVALID_MULTIPART_SUBTYPE', Array($sub_type));
 					}
 					break;
 
 				default:
 					return $this->SetError('INVALID_CONTENT_TYPE', Array($full_type));
 			}
 
 			// set content-id if any
 			if (isset($part['Content-ID'])) {
 				$headers['Content-ID'] = '<'.$part['Content-ID'].'>';
 			}
 
 			return $headers;
 		}
 
 		function GetPartBody($part_number)
 		{
 			$part =& $this->parts[$part_number];
 
 			if (!isset($part['Content-Type'])) {
 				return $this->SetError('MISSING_CONTENT_TYPE');
 			}
 
 			$full_type = strtolower($part['Content-Type']);
 			list ($type, $sub_type) = explode('/', $full_type);
 
 			$body = '';
 			switch ($type) {
 				// compose text/binary content
 				case 'text':
 				case 'image':
 				case 'audio':
 				case 'video':
 				case 'application':
 				case 'message':
 					// 1. get content of part
 					if (isset($part['FILENAME'])) {
 						// content provided via absolute path to content containing file
 						$filename = $part['FILENAME'];
 						$file_size = filesize($filename);
 
 						$body = file_get_contents($filename);
 						if ($body === false) {
 							return $this->SetError('FILE_PART_OPEN_ERROR', Array($filename));
 						}
 
 						$actual_size = strlen($body);
 						if (($file_size === false || $actual_size > $file_size) && get_magic_quotes_runtime()) {
 							$body = stripslashes($body);
 						}
 
 						if ($file_size !== false && $actual_size != $file_size) {
 							return $this->SetError('FILE_PART_DATA_ERROR', Array($filename));
 						}
 					}
 					else {
 						// content provided directly as one of part keys
 						if (!isset($part['DATA'])) {
 							return $this->SetError('FILE_PART_DATA_MISSING');
 						}
 						$body =& $part['DATA'];
 					}
 
 					// 2. get part transfer encoding
 					$encoding = isset($part['Content-Transfer-Encoding']) ? strtolower($part['Content-Transfer-Encoding']) : '';
 					if (!in_array($encoding, Array ('', 'base64', 'quoted-printable', '7bit'))) {
 						return $this->SetError('INVALID_ENCODING', Array($encoding));
 					}
 
 					if ($encoding == 'base64') {
 						// split base64 encoded text by 76 symbols at line (MIME requirement)
 						$body = chunk_split( base64_encode($body) );
 					}
 					break;
 
 				case 'multipart':
 					// compose multipart message
 					switch ($sub_type) {
 						case 'alternative':
 						case 'related':
 						case 'mixed':
 						case 'parallel':
 							$this->CreatePartBoundary($part_number);
 							$boundary = $this->line_break.'--'.$part['BOUNDARY'];
 
 							foreach ($part['PARTS'] as $multipart_number) {
 								$body .= $boundary.$this->line_break;
 								$part_headers = $this->GetPartHeaders($multipart_number);
 								if ($part_headers === false) {
 									// some of sub-part headers were invalid
 									return false;
 								}
 
 								foreach ($part_headers as $header_name => $header_value) {
 									$body .= $header_name.': '.$header_value.$this->line_break;
 								}
 
 								$part_body = $this->GetPartBody($multipart_number);
 								if ($part_body === false) {
 									// part body was invalid
 									return false;
 								}
 
 								$body .= $this->line_break.$part_body;
 							}
 							$body .= $boundary.'--'.$this->line_break;
 							break;
 
 						default:
 							return $this->SetError('INVALID_MULTIPART_SUBTYPE', Array($sub_type));
 					}
 					break;
 				default:
 					return $this->SetError('INVALID_CONTENT_TYPE', Array($full_type));
 			}
 
 			return $body;
 		}
 
 		/**
 		 * Applies quoted-printable encoding to specified text
 		 *
 		 * @param string $text
 		 * @param string $header_charset
 		 * @param int $break_lines
 		 * @return unknown
 		 */
 		function QuotedPrintableEncode($text, $header_charset = '', $break_lines = 1)
 		{
 			$ln = strlen($text);
 			$h = strlen($header_charset) > 0;
 			if ($h) {
 				$s = Array (
 					'=' => 1,
 					'?' => 1,
 					'_' => 1,
 					'(' => 1,
 					')' => 1,
 					'<' => 1,
 					'>' => 1,
 					'@' => 1,
 					',' => 1,
 					';' => 1,
 					'"' => 1,
 					'\\' => 1,
 	/*
 					'/' => 1,
 					'[' => 1,
 					']' => 1,
 					':' => 1,
 					'.' => 1,
 	*/
 				);
 
 				$b = $space = $break_lines = 0;
 				for ($i = 0; $i < $ln; $i++) {
 					if (isset($s[$text[$i]])) {
 						$b = 1;
 						break;
 					}
 
 					switch ($o = ord($text[$i])) {
 						case 9:
 						case 32:
 							$space = $i + 1;
 							$b = 1;
 							break 2;
 						case 10:
 						case 13:
 							break 2;
 						default:
 						if ($o < 32 || $o > 127) {
 							$b = 1;
 							break 2;
 						}
 					}
 				}
 
 				if($i == $ln) {
 					return $text;
 				}
 
 				if ($space > 0) {
 					return substr($text, 0, $space).($space < $ln ? $this->QuotedPrintableEncode(substr($text, $space), $header_charset, 0) : '');
 				}
 			}
 
 			for ($w = $e = '', $n = 0, $l = 0, $i = 0; $i < $ln; $i++) {
 				$c = $text[$i];
 				$o = ord($c);
 				$en = 0;
 				switch ($o) {
 					case 9:
 					case 32:
 						if (!$h) {
 							$w = $c;
 							$c = '';
 						}
 						else {
 							if ($b) {
 								if ($o == 32) {
 									$c = '_';
 								}
 								else {
 									$en = 1;
 								}
 							}
 						}
 						break;
 					case 10:
 					case 13:
 						if (strlen($w)) {
 							if ($break_lines && $l + 3 > 75) {
 								$e .= '='.$this->line_break;
 								$l = 0;
 							}
 
 							$e .= sprintf('=%02X', ord($w));
 							$l += 3;
 							$w = '';
 						}
 
 						$e .= $c;
 						if ($h) {
 							$e .= "\t";
 						}
 						$l = 0;
 						continue 2;
 					case 46:
 					case 70:
 					case 102:
 						$en = (!$h && ($l == 0 || $l + 1 > 75));
 						break;
 					default:
 						if ($o > 127 || $o < 32 || !strcmp($c, '=')) {
 							$en = 1;
 						}
 						elseif ($h && isset($s[$c])) {
 							$en = 1;
 						}
 						break;
 				}
 
 				if (strlen($w)) {
 					if ($break_lines && $l + 1 > 75) {
 						$e .= '='.$this->line_break;
 						$l = 0;
 					}
 					$e .= $w;
 					$l++;
 					$w = '';
 				}
 
 				if (strlen($c)) {
 					if ($en) {
 						$c = sprintf('=%02X', $o);
 						$el = 3;
 						$n = 1;
 						$b = 1;
 					}
 					else {
 						$el = 1;
 					}
 					if ($break_lines && $l + $el > 75) {
 						$e .= '='.$this->line_break;
 						$l = 0;
 					}
 					$e .= $c;
 					$l += $el;
 				}
 			}
 			if (strlen($w)) {
 				if ($break_lines && $l + 3 > 75) {
 					$e .= '='.$this->line_break;
 				}
 				$e .= sprintf('=%02X', ord($w));
 			}
 
 			return $h && $n ? '=?'.$header_charset.'?q?'.$e.'?=' : $e;
 		}
 
 		/**
 		 * Sets message header + encodes is by quoted-printable using charset specified
 		 *
 		 * @param string $name
 		 * @param string $value
 		 * @param string $encoding_charset
 		 */
 		function SetHeader($name, $value, $encoding_charset = '')
 		{
 			if ($encoding_charset) {
 				// actually for headers base64 method may give shorter result
 				$value = $this->QuotedPrintableEncode($value, $encoding_charset);
 			}
 
 			$this->headers[$name] = $value;
 		}
 
 		/**
 		 * Sets header + automatically encodes it using default charset
 		 *
 		 * @param string $name
 		 * @param string $value
 		 */
 		function SetEncodedHeader($name, $value)
 		{
 			$this->SetHeader($name, $value, $this->charset);
 		}
 
 		/**
 		 * Sets header which value is email and username +autoencode
 		 *
 		 * @param string $header
 		 * @param string $address
 		 * @param string $name
 		 */
 		function SetEncodedEmailHeader($header, $address, $name)
 		{
 			$this->SetHeader($header, $this->QuotedPrintableEncode($name, $this->charset) . ' <' . $address . '>');
 		}
 
 		function SetMultipleEncodedEmailHeader($header, $addresses)
 		{
 			$value = '';
 			foreach ($addresses as $name => $address) {
 				$value .= $this->QuotedPrintableEncode($name, $this->charset) . ' <' . $address . '>, ';
 			}
 
 			$this->SetHeader($header, substr($value, 0, -2));
 		}
 
 		/**
 		 * Adds new part to message and returns it's number
 		 *
 		 * @param Array $part_definition
 		 * @param int|bool $part_number number of new part
 		 * @return int
 		 */
 		function AddPart(&$part_definition, $part_number = false)
 		{
 			$part_number = $part_number !== false ? $part_number : count($this->parts);
 			$this->parts[$part_number] =& $part_definition;
 			return $part_number;
 		}
 
 		/**
 		 * Returns text version of HTML document
 		 *
 		 * @param string $html
 		 * @param bool $keep_inp_tags
 		 * @return string
 		 */
 		function ConvertToText($html, $keep_inp_tags = false)
 		{
 			if ( $keep_inp_tags && preg_match_all('/(<[\\/]?)inp2:([^>]*?)([\\/]?>)/s', $html, $regs) ) {
 				$found_tags = Array ();
 
 				foreach ($regs[0] as $index => $tag) {
 					$tag_placeholder = '%' . md5($index . ':' . $tag) . '%';
 					$found_tags[$tag_placeholder] = $tag;
 
 					// we can have duplicate tags -> replace only 1st occurrence (str_replace can't do that)
 					$html = preg_replace('/' . preg_quote($tag, '/') . '/', $tag_placeholder, $html, 1);
 				}
 
 				$html = $this->_convertToText($html);
 
 				foreach ($found_tags as $tag_placeholder => $tag) {
 					$html = str_replace($tag_placeholder, $tag, $html);
 				}
 
 				return $html;
 			}
 
 			return $this->_convertToText($html);
 		}
 
 		/**
 		 * Returns text version of HTML document
 		 *
 		 * @param string $html
 		 * @return string
 		 */
 		protected function _convertToText($html)
 		{
 			$search = Array (
 				"'(<\/td>.*)[\r\n]+(.*<td)'i",//formating text in tables
 				"'(<br[ ]?[\/]?>[\r\n]{0,2})|(<\/p>)|(<\/div>)|(<\/tr>)'i",
 				"'<head>(.*?)</head>'si",
 				"'<style(.*?)</style>'si",
 				"'<title>(.*?)</title>'si",
 				"'<script(.*?)</script>'si",
 //				"'^[\s\n\r\t]+'", //strip all spacers & newlines in the begin of document
 //				"'[\s\n\r\t]+$'", //strip all spacers & newlines in the end of document
 				"'&(quot|#34);'i",
 				"'&(amp|#38);'i",
 				"'&(lt|#60);'i",
 				"'&(gt|#62);'i",
 				"'&(nbsp|#160);'i",
 				"'&(iexcl|#161);'i",
 				"'&(cent|#162);'i",
 				"'&(pound|#163);'i",
 				"'&(copy|#169);'i",
 				"'&#(\d+);'e"
 			);
 
 			$replace = Array (
 				"\\1\t\\2",
 				"\n",
 				"",
 				"",
 				"",
 				"",
 //				"",
 //				"",
 				"\"",
 				"&",
 				"<",
 				">",
 				" ",
 				chr(161),
 				chr(162),
 				chr(163),
 				chr(169),
 				"chr(\\1)"
 			);
 
 			return strip_tags( preg_replace ($search, $replace, $html) );
 		}
 
 		/**
 		 * Add text OR html part to message (optionally encoded)
 		 *
 		 * @param string $text part's text
 		 * @param bool $is_html this html part or not
 		 * @param bool $encode encode message using quoted-printable encoding
 		 *
 		 * @return int number of created part
 		 */
 		function CreateTextHtmlPart($text, $is_html = false, $encode = true)
 		{
 			if ($is_html) {
 				// if adding HTML part, then create plain-text part too
 				$this->CreateTextHtmlPart($this->ConvertToText($text));
 			}
 
 			// in case if text is from $_REQUEST, then line endings are "\r\n", but we need "\n" here
 
 			$text = str_replace("\r\n", "\n", $text); // possible case
 			$text = str_replace("\r", "\n", $text); // impossible case, but just in case replace this too
 
 			$definition = Array (
 				'Content-Type'	=>	$is_html ? 'text/html' : 'text/plain',
 				'CHARSET'		=>	$this->charset,
 				'DATA'			=>	$encode ? $this->QuotedPrintableEncode($text) : $text,
 			);
 
 			if ($encode) {
 				$definition['Content-Transfer-Encoding'] = 'quoted-printable';
 			}
 
 			$guess_name = $is_html ? 'html_part' : 'text_part';
 			$part_number = $this->guessOptions[$guess_name] !== false ? $this->guessOptions[$guess_name] : false;
 
 			$part_number = $this->AddPart($definition, $part_number);
 			$this->guessOptions[$guess_name] = $part_number;
 
 			return $part_number;
 		}
 
 		/**
 		 * Adds attachment part to message
 		 *
 		 * @param string $file name of the file with attachment body
 		 * @param string $attach_name name for attachment (name of file is used, when not specified)
 		 * @param string $content_type content type for attachment
 		 * @param string $content body of file to be attached
 		 * @param bool $inline is attachment inline or not
 		 *
 		 * @return int number of created part
 		 */
 		function AddAttachment($file = '', $attach_name = '', $content_type = '', $content = '', $inline = false)
 		{
 			$definition = Array (
 				'Disposition'	=>	$inline ? 'inline' : 'attachment',
 				'Content-Type'	=>	$content_type ? $content_type : 'automatic/name',
 			);
 
 			if ($file) {
 				// filename of attachment given
 				$definition['FileName'] = $file;
 			}
 
 			if ($attach_name) {
 				// name of attachment given
 				$definition['Name'] = $attach_name;
 			}
 
 			if ($content) {
 				// attachment data is given
 				$definition['Data'] = $content;
 			}
 
 			$definition =& $this->GetFileDefinition($definition);
 			$part_number = $this->AddPart($definition);
 
 			if ($inline) {
 				// it's inline attachment and needs content-id to be addressed by in message
 				$this->parts[$part_number]['Content-ID'] = md5(uniqid($part_number.time())).'.'.$this->GetFilenameExtension($attach_name ? $attach_name : $file);
 			}
 
 			$this->guessOptions[$inline ? 'inline_attachments' : 'attachments'][] = $part_number;
 
 			return $part_number;
 		}
 
 		/**
 		 * Adds another MIME message as attachment to message being composed
 		 *
 		 * @param string $file name of the file with attachment body
 		 * @param string $attach_name name for attachment (name of file is used, when not specified)
 		 * @param string $content body of file to be attached
 		 *
 		 * @return int number of created part
 		 */
 		function AddMessageAttachment($file = '', $attach_name = '', $content = '')
 		{
 			$part_number = $this->AddAttachment($file, $attach_name, 'message/rfc822', $content, true);
 			unset($this->parts[$part_number]['Content-ID']); // messages don't have content-id, but have inline disposition
 			return $part_number;
 		}
 
 		/**
 		 * Creates multipart of specified type and returns it's number
 		 *
 		 * @param Array $part_numbers
 		 * @param string $multipart_type = {alternative,related,mixed,paralell}
 		 * @return int
 		 */
 		function CreateMultipart($part_numbers, $multipart_type)
 		{
 			$types = Array ('alternative', 'related' , 'mixed', 'paralell');
 			if (!in_array($multipart_type, $types)) {
 				return $this->SetError('INVALID_MULTIPART_SUBTYPE', Array($multipart_type));
 			}
 
 			$definition = Array (
 				'Content-Type'	=>	'multipart/'.$multipart_type,
 				'PARTS'			=>	$part_numbers,
 			);
 
 			return $this->AddPart($definition);
 		}
 
 		/**
 		 * Creates missing content-id header for inline attachments
 		 *
 		 * @param int $part_number
 		 */
 		function CreateContentID($part_number)
 		{
 			$part =& $this->parts[$part_number];
 			if (!isset($part['Content-ID']) && $part['DISPOSITION'] == 'inline') {
 				$part['Content-ID'] = md5(uniqid($part_number.time())).'.'.$this->GetFilenameExtension($part['NAME']);
 			}
 		}
 
 		/**
 		 * Returns attachment part based on file used in attachment
 		 *
 		 * @param Array $file
 		 * @return Array
 		 */
 		function &GetFileDefinition ($file)
 		{
 			$name = '';
 			if (isset($file['Name'])) {
 				// if name is given directly, then use it
 				$name = $file['Name'];
 			}
 			else {
 				// auto-guess attachment name based on source filename
 				$name = isset($file['FileName']) ? basename($file['FileName']) : '';
 			}
 
 			if (!$name || (!isset($file['FileName']) && !isset($file['Data']))) {
 				// filename not specified || no filename + no direct file content
 				return $this->SetError('MISSING_FILE_DATA');
 			}
 
 			$encoding = 'base64';
 			if (isset($file['Content-Type'])) {
 				$content_type = $file['Content-Type'];
 				list ($type, $sub_type) = explode('/', $content_type);
 
 				switch ($type) {
 					case 'text':
 					case 'image':
 					case 'audio':
 					case 'video':
 					case 'application':
 						break;
 
 					case 'message':
 						$encoding = '7bit';
 						break;
 
 					case 'automatic':
 						if (!$name) {
 							return $this->SetError('MISSING_FILE_NAME');
 						}
 						$this->guessContentType($name, $content_type, $encoding);
 						break;
 
 					default:
 						return $this->SetError('INVALID_CONTENT_TYPE', Array($content_type));
 				}
 			}
 			else {
 				// encoding not passed in file part, then assume, that it's binary
 				$content_type = 'application/octet-stream';
 			}
 
 			$definition = Array (
 				'Content-Type'				=>	$content_type,
 				'Content-Transfer-Encoding'	=>	$encoding,
 				'NAME'						=>	$name, // attachment name
 			);
 
 			if (isset($file['Disposition'])) {
 				$disposition = strtolower($file['Disposition']);
 				if ($disposition == 'inline' || $disposition == 'attachment') {
 					// valid disposition header value
 					$definition['DISPOSITION'] = $file['Disposition'];
 				}
 				else {
 					return $this->SetError('INVALID_DISPOSITION', Array($file['Disposition']));
 				}
 			}
 
 			if (isset($file['FileName'])) {
 				$definition['FILENAME'] = $file['FileName'];
 			}
 			elseif (isset($file['Data'])) {
 				$definition['DATA'] =& $file['Data'];
 			}
 
 			return $definition;
 		}
 
 		/**
 		 * Returns content-type based on filename extension
 		 *
 		 * @param string $filename
 		 * @param string $content_type
 		 * @param string $encoding
 		 *
 		 * @todo Regular expression used is not completely finished, that's why if extension used for
 		 * comparing in some other extension (from list) part, that partial match extension will be returned.
 		 * Because of two extension that begins with same 2 letters always belong to same content type
 		 * this unfinished regular expression still gives correct result in any case.
 		 */
 		function guessContentType($filename, &$content_type, &$encoding)
 		{
 			$content_type = kUtil::mimeContentTypeByExtension($filename);
 
 			if ( mb_strtolower($this->GetFilenameExtension($filename)) == 'eml' ) {
 				$encoding = '7bit';
 			}
 		}
 
 		/**
 		 * Using guess options combines all added parts together and returns combined part number
 		 *
 		 * @return int
 		 */
 		function PrepareMessageBody()
 		{
 			if ($this->bodyPartNumber === false) {
 				$part_number = false; // number of generated body part
 
 				// 1. set text content of message
 				if ($this->guessOptions['text_part'] !== false && $this->guessOptions['html_part'] !== false) {
 					// text & html parts present -> compose into alternative part
 					$parts = Array (
 						$this->guessOptions['text_part'],
 						$this->guessOptions['html_part'],
 					);
 					$part_number = $this->CreateMultipart($parts, 'alternative');
 				}
 				elseif ($this->guessOptions['text_part'] !== false) {
 					// only text part is defined, then leave as is
 					$part_number = $this->guessOptions['text_part'];
 				}
 
 				if ($part_number === false) {
 					return $this->SetError('MESSAGE_TEXT_MISSING');
 				}
 
 				// 2. if inline attachments found, then create related multipart from text & inline attachments
 				if ($this->guessOptions['inline_attachments']) {
 					$parts = array_merge(Array($part_number), $this->guessOptions['inline_attachments']);
 					$part_number = $this->CreateMultipart($parts, 'related');
 				}
 
 				// 3. if normal attachments found, then create mixed multipart from text & attachments
 				if ($this->guessOptions['attachments']) {
 					$parts = array_merge(Array($part_number), $this->guessOptions['attachments']);
 					$part_number = $this->CreateMultipart($parts, 'mixed');
 				}
 
 				$this->bodyPartNumber = $part_number;
 			}
 
 			return $this->bodyPartNumber;
 		}
 
 		/**
 		 * Returns message headers and body part (by reference in parameters)
 		 *
 		 * @param Array $message_headers
 		 * @param string $message_body
 		 * @return bool
 		 */
 		function GetHeadersAndBody(&$message_headers, &$message_body)
 		{
 			$part_number = $this->PrepareMessageBody();
 			if ($part_number === false) {
 				return $this->SetError('MESSAGE_COMPOSE_ERROR');
 			}
 
 			$message_headers = $this->GetPartHeaders($part_number);
 
 			// join message headers and body headers
 			$message_headers = array_merge($this->headers, $message_headers);
 
 			$message_headers['MIME-Version'] = '1.0';
 			if ($this->mailerName) {
 				$message_headers['X-Mailer'] = $this->mailerName;
 			}
 
 			$this->GenerateMessageID($message_headers['From']);
 			$valid_headers = $this->ValidateHeaders($message_headers);
 			if ($valid_headers) {
 				// set missing headers from existing
 				$from_headers = Array ('Reply-To', 'Errors-To');
 				foreach ($from_headers as $header_name) {
 					if (!isset($message_headers[$header_name])) {
 						$message_headers[$header_name] = $message_headers['From'];
 					}
 				}
 
 				$message_body = $this->GetPartBody($part_number);
 				return true;
 			}
 
 			return false;
 		}
 
 		/**
 		 * Checks that all required headers are set and not empty
 		 *
 		 * @param Array $message_headers
 		 * @return bool
 		 */
 		function ValidateHeaders($message_headers)
 		{
 			$from = isset($message_headers['From']) ? $message_headers['From'] : '';
 			if (!$from) {
 				return $this->SetError('HEADER_MISSING', Array('From'));
 			}
 
 			if (!isset($message_headers['To'])) {
 				return $this->SetError('HEADER_MISSING', Array('To'));
 			}
 
 			if (!isset($message_headers['Subject'])) {
 				return $this->SetError('HEADER_MISSING', Array('Subject'));
 			}
 
 			return true;
 		}
 
 		/**
 		 * Returns full message source (headers + body) for sending to SMTP server
 		 *
 		 * @return string
 		 */
 		function GetMessage()
 		{
 			$composed = $this->GetHeadersAndBody($message_headers, $message_body);
 			if ($composed) {
 				// add headers to resulting message
 				$message = '';
 				foreach ($message_headers as $header_name => $header_value) {
 					$message .= $header_name.': '.$header_value.$this->line_break;
 				}
 
 				// add message body
 				$message .= $this->line_break.$message_body;
 
 				return $message;
 			}
 
 			return false;
 		}
 
 		/**
 		 * Sets just happened error code
 		 *
 		 * @param string $code
 		 * @param Array $params additional error params
 		 * @param bool $fatal
 		 * @return bool
 		 */
 		function SetError($code, $params = null, $fatal = true)
 		{
 			$error_msgs = Array (
 				'MAIL_NOT_FOUND'			=>	'the mail() function is not available in this PHP installation',
 
 				'MISSING_CONTENT_TYPE'		=>	'it was added a part without Content-Type: defined',
 				'INVALID_CONTENT_TYPE'		=>	'Content-Type: %s not yet supported',
 				'INVALID_MULTIPART_SUBTYPE'	=>	'multipart Content-Type sub_type %s not yet supported',
 				'FILE_PART_OPEN_ERROR'		=>	'could not open part file %s',
 				'FILE_PART_DATA_ERROR'		=>	'the length of the file that was read does not match the size of the part file %s due to possible data corruption',
 				'FILE_PART_DATA_MISSING'	=>	'it was added a part without a body PART',
 				'INVALID_ENCODING'			=>	'%s is not yet a supported encoding type',
 
 				'MISSING_FILE_DATA'			=>	'file part data is missing',
 				'MISSING_FILE_NAME'			=>	'it is not possible to determine content type from the name',
 				'INVALID_DISPOSITION'		=>	'%s is not a supported message part content disposition',
 
 				'MESSAGE_TEXT_MISSING'		=>	'text part of message was not defined',
 				'MESSAGE_COMPOSE_ERROR'		=>	'unknown message composing error',
 
 				'HEADER_MISSING'			=>	'header %s is required',
 
 				// SMTP errors
 				'INVALID_COMMAND'				=>	'Commands cannot contain newlines',
 				'CONNECTION_TERMINATED'			=>	'Connection was unexpectedly closed',
 				'HELO_ERROR'					=>	'HELO was not accepted: %s',
 				'AUTH_METHOD_NOT_SUPPORTED'		=>	'%s is not a supported authentication method',
 				'AUTH_METHOD_NOT_IMPLEMENTED'	=>	'%s is not a implemented authentication method',
 			);
 
 			if (!is_array($params)) {
 				$params = Array ();
 			}
 
 			$error_msg = 'mail error: ' . vsprintf($error_msgs[$code], $params);
 
 			if ($fatal) {
 				throw new Exception($error_msg);
 			}
 			else {
 				if ( $this->Application->isDebugMode() ) {
 					$this->Application->Debugger->appendTrace();
 				}
 
 				trigger_error($error_msg, E_USER_WARNING);
 			}
 
 			return false;
 		}
 
 		/**
 		 * Simple method of message sending
 		 *
 		 * @param string $from_email
 		 * @param string $to_email
 		 * @param string $subject
 		 * @param string $from_name
 		 * @param string $to_name
 		 */
 		function Send($from_email, $to_email, $subject, $from_name = '', $to_name = '')
 		{
 			$this->SetSubject($subject);
 			$this->SetFrom($from_email, trim($from_name) ? trim($from_name) : $from_email);
 
 			if (!isset($this->headers['Return-Path'])) {
 				$this->SetReturnPath($from_email);
 			}
 
 			$this->SetTo($to_email, $to_name ? $to_name : $to_email);
 
 			return $this->Deliver();
 		}
 
 		/**
 		 * Prepares class for sending another message
 		 *
 		 */
 		function Clear()
 		{
 			$this->headers = Array ();
 			$this->bodyPartNumber = false;
 			$this->parts = Array ();
 			$this->guessOptions = Array (
 				'attachments'			=>	Array (),
 				'inline_attachments'	=>	Array (),
 				'text_part'				=>	false,
 				'html_part'				=>	false,
 			);
 
 			$this->SetCharset(null, true);
 			$this->_logData = Array ();
 		}
 
 		/**
 		 * Sends message via php mail function
 		 *
 		 * @param Array $message_headers
 		 * @param string $body
 		 *
 		 * @return bool
 		 */
 		function SendMail($message_headers, &$body)
 		{
 			if (!function_exists('mail')) {
 				return $this->SetError('MAIL_NOT_FOUND');
 			}
 
 			$to = $message_headers['To'];
 			$subject = $message_headers['Subject'];
 			$return_path = $message_headers['Return-Path'];
 			unset($message_headers['To'], $message_headers['Subject']);
 
 			$headers = '';
 			$header_separator = $this->Application->ConfigValue('MailFunctionHeaderSeparator') == 1 ? "\n" : "\r\n";
 			foreach ($message_headers as $header_name => $header_value) {
 				$headers .= $header_name.': '.$header_value.$header_separator;
 			}
 
 			if ($return_path) {
 				if (kUtil::constOn('SAFE_MODE') || (defined('PHP_OS') && substr(PHP_OS, 0, 3) == 'WIN')) {
 					// safe mode restriction OR is windows
 					$return_path = '';
 				}
 			}
 
 			return mail($to, $subject, $body, $headers, $return_path ? '-f'.$return_path : null);
 		}
 
 		/**
 		 * Sends message via SMTP server
 		 *
 		 * @param Array $message_headers
 		 * @param string $message_body
 		 * @return bool
 		 */
 		function SendSMTP($message_headers, &$message_body)
 		{
 			if (!$this->SmtpConnect()) {
 				return false;
 			}
 
 			$from = $this->ExtractRecipientEmail($message_headers['From']);
 			if (!$this->SmtpSetFrom($from)) {
 				return false;
 			}
 
 			$recipients = '';
 			$recipient_headers = Array ('To', 'Cc', 'Bcc');
 			foreach ($recipient_headers as $recipient_header) {
 				if (isset($message_headers[$recipient_header])) {
 					$recipients .= ' '.$message_headers[$recipient_header];
 				}
 			}
 
 			$recipients_accepted = 0;
 			$recipients = $this->ExtractRecipientEmail($recipients, true);
 			foreach ($recipients as $recipient) {
 				if ($this->SmtpAddTo($recipient)) {
 					$recipients_accepted++;
 				}
 			}
 
 			if ($recipients_accepted == 0) {
 				// none of recipients were accepted
 				return false;
 			}
 
 			$headers = '';
 			foreach ($message_headers as $header_name => $header_value) {
 				$headers .= $header_name.': '.$header_value.$this->line_break;
 			}
 
 			if (!$this->SmtpSendMessage($headers . "\r\n" . $message_body)) {
 				return false;
 			}
 
 			$this->SmtpDisconnect();
 
 			return true;
 		}
 
 		/**
 	     * Send a command to the server with an optional string of
 	     * arguments.  A carriage return / linefeed (CRLF) sequence will
 	     * be appended to each command string before it is sent to the
 	     * SMTP server.
 	     *
 	     * @param string $command The SMTP command to send to the server.
 	     * @param string $args A string of optional arguments to append to the command.
 	     *
 	     * @return bool
 	     *
 	     */
 	    function SmtpSendCommand($command, $args = '')
 	    {
 	        if (!empty($args)) {
 	            $command .= ' ' . $args;
 	        }
 
 	        if (strcspn($command, "\r\n") !== strlen($command)) {
 	            return $this->SetError('INVALID_COMMAND');
 	        }
 
 	        return $this->smtpSocket->write($command . "\r\n") === false ? false : true;
 	    }
 
 	    /**
 	     * Read a reply from the SMTP server. The reply consists of a response code and a response message.
 	     *
 	     * @param mixed $valid The set of valid response codes. These may be specified as an array of integer values or as a single integer value.
 	     *
 	     * @return  bool
 	     *
 	     */
 	    function SmtpParseResponse($valid)
 	    {
 	        $this->smtpResponceCode = -1;
 	        $this->smtpRespoceArguments = array();
 
 	        while ($line = $this->smtpSocket->readLine()) {
 	            // If we receive an empty line, the connection has been closed.
 	            if (empty($line)) {
 	                $this->SmtpDisconnect();
 	                return $this->SetError('CONNECTION_TERMINATED', null, false);
 	            }
 
 	            // Read the code and store the rest in the arguments array.
 	            $code = substr($line, 0, 3);
 	            $this->smtpRespoceArguments[] = trim(substr($line, 4));
 
 	            // Check the syntax of the response code.
 	            if (is_numeric($code)) {
 	                $this->smtpResponceCode = (int)$code;
 	            } else {
 	                $this->smtpResponceCode = -1;
 	                break;
 	            }
 
 	            // If this is not a multiline response, we're done.
 	            if (substr($line, 3, 1) != '-') {
 	                break;
 	            }
 	        }
 
 	        // Compare the server's response code with the valid code.
 	        if (is_int($valid) && ($this->smtpResponceCode === $valid)) {
 	            return true;
 	        }
 
 	        // If we were given an array of valid response codes, check each one.
 	        if (is_array($valid)) {
 	            foreach ($valid as $valid_code) {
 	                if ($this->smtpResponceCode === $valid_code) {
 	                    return true;
 	                }
 	            }
 	        }
 
 	        return false;
 	    }
 
 	    /**
 	     * Attempt to connect to the SMTP server.
 	     *
 	     * @param int $timeout The timeout value (in seconds) for the socket connection.
 	     * @param bool $persistent Should a persistent socket connection be used ?
 	     *
 	     * @return bool
 	     *
 	     */
 	    function SmtpConnect($timeout = null, $persistent = false)
 	    {
 	        $result = $this->smtpSocket->connect($this->smtpParams['server'], $this->smtpParams['port'], $persistent, $timeout);
 	        if (!$result) {
 	        	return false;
 	        }
 
 	        if ($this->SmtpParseResponse(220) === false) {
 	        	return false;
 	        }
 	        elseif ($this->SmtpNegotiate() === false) {
 	        	return false;
 	        }
 
 	        if ($this->smtpParams['use_auth']) {
 	        	$result = $this->SmtpAuthentificate($this->smtpParams['username'], $this->smtpParams['password']);
 	        	if (!$result) {
 	        		// authentification failed
 	        		return false;
 	        	}
 	        }
 
 	        return true;
 	    }
 
 	    /**
 	     * Attempt to disconnect from the SMTP server.
 	     *
 	     * @return bool
 	     */
 	    function SmtpDisconnect()
 	    {
 	        if ($this->SmtpSendCommand('QUIT') === false) {
 	        	return false;
 	        }
 	        elseif ($this->SmtpParseResponse(221) === false) {
 	        	return false;
 	        }
 
 	        return $this->smtpSocket->disconnect();
 	    }
 
 	    /**
 	     * Attempt to send the EHLO command and obtain a list of ESMTP
 	     * extensions available, and failing that just send HELO.
 	     *
 	     * @return bool
 	     */
 	    function SmtpNegotiate()
 	    {
 	        if (!$this->SmtpSendCommand('EHLO', $this->smtpParams['localhost'])) {
 	        	return false;
 	        }
 
 	        if (!$this->SmtpParseResponse(250)) {
 	            // If we receive a 503 response, we're already authenticated.
 	            if ($this->smtpResponceCode === 503) {
 	                return true;
 	            }
 
 	            // If the EHLO failed, try the simpler HELO command.
 	            if (!$this->SmtpSendCommand('HELO', $this->smtpParams['localhost'])) {
 	            	return false;
 	            }
 
 	            if (!$this->SmtpParseResponse(250)) {
 	                return $this->SetError('HELO_ERROR', Array($this->smtpResponceCode), false);
 	            }
 
 	            return true;
 	        }
 
 	        foreach ($this->smtpRespoceArguments as $argument) {
 	            $verb = strtok($argument, ' ');
 	            $arguments = substr($argument, strlen($verb) + 1, strlen($argument) - strlen($verb) - 1);
 	            $this->smtpFeatures[$verb] = $arguments;
 	        }
 
 	        return true;
 	    }
 
 	    /**
 	     * Attempt to do SMTP authentication.
 	     *
 	     * @param string $uid The userid to authenticate as.
 	     * @param string $pwd The password to authenticate with.
 	     * @param string $method The requested authentication method.  If none is specified, the best supported method will be used.
 	     *
 	     * @return bool
 	     */
 	    function SmtpAuthentificate($uid, $pwd , $method = '')
 	    {
 	        if (empty($this->smtpFeatures['AUTH'])) {
 	        	// server doesn't understand AUTH command, then don't authentificate
 	            return true;
 	        }
 
 	        $available_methods = explode(' ', $this->smtpFeatures['AUTH']); // methods supported by SMTP server
 
 	        if (empty($method)) {
 		        foreach ($this->smtpAuthMethods as $supported_method) {
 		        	// check if server supports methods, that we have implemented
 		            if (in_array($supported_method, $available_methods)) {
 		            	$method = $supported_method;
 		                break;
 		            }
 		        }
 	        } else {
 	            $method = strtoupper($method);
 	        }
 
 	        if (!in_array($method, $available_methods)) {
 	        	// coosen method  is not supported by server
 	        	return $this->SetError('AUTH_METHOD_NOT_SUPPORTED', Array($method));
 	        }
 
 	        switch ($method) {
 	        	case 'CRAM-MD5':
 	                $result = $this->_authCRAM_MD5($uid, $pwd);
 	                break;
 
 	            case 'LOGIN':
 	                $result = $this->_authLogin($uid, $pwd);
 	                break;
 	            case 'PLAIN':
 	                $result = $this->_authPlain($uid, $pwd);
 	                break;
 	            default:
 					return $this->SetError('AUTH_METHOD_NOT_IMPLEMENTED', Array($method));
 	                break;
 	        }
 
 			return $result;
 	    }
 
 	    /**
 	    * Function which implements HMAC MD5 digest
 	    *
 	    * @param  string $key  The secret key
 	    * @param  string $data The data to protect
 	    * @return string       The HMAC MD5 digest
 	    */
 	    function _HMAC_MD5($key, $data)
 	    {
 	        if (strlen($key) > 64) {
 	            $key = pack('H32', md5($key));
 	        }
 
 	        if (strlen($key) < 64) {
 	            $key = str_pad($key, 64, chr(0));
 	        }
 
 	        $k_ipad = substr($key, 0, 64) ^ str_repeat(chr(0x36), 64);
 	        $k_opad = substr($key, 0, 64) ^ str_repeat(chr(0x5C), 64);
 
 	        $inner  = pack('H32', md5($k_ipad . $data));
 	        $digest = md5($k_opad . $inner);
 
 	        return $digest;
 	    }
 
 	    /**
 	     * Authenticates the user using the CRAM-MD5 method.
 	     *
 	     * @param string $uid The userid to authenticate as.
 	     * @param string $pwd The password to authenticate with.
 	     *
 	     * @return bool
 	     */
 	    function _authCRAM_MD5($uid, $pwd)
 	    {
 	        if (!$this->SmtpSendCommand('AUTH', 'CRAM-MD5')) {
 	            return false;
 	        }
 
 	        // 334: Continue authentication request
 	        if (!$this->SmtpParseResponse(334)) {
 	            // 503: Error: already authenticated
 	            return $this->smtpResponceCode === 503 ? true : false;
 	        }
 
 	        $challenge = base64_decode($this->smtpRespoceArguments[0]);
 	        $auth_str = base64_encode($uid . ' ' . $this->_HMAC_MD5($pwd, $challenge));
 
 	        if (!$this->SmtpSendCommand($auth_str)) {
 	            return false;
 	        }
 
 	        // 235: Authentication successful
 	        if (!$this->SmtpParseResponse(235)) {
 	            return false;
 	        }
 
 	        return true;
 	    }
 
 	    /**
 	     * Authenticates the user using the LOGIN method.
 	     *
 	     * @param string $uid The userid to authenticate as.
 	     * @param string $pwd The password to authenticate with.
 	     *
 	     * @return bool
 	     */
 	    function _authLogin($uid, $pwd)
 	    {
 	        if (!$this->SmtpSendCommand('AUTH', 'LOGIN')) {
 	            return false;
 	        }
 
 	        // 334: Continue authentication request
 	        if (!$this->SmtpParseResponse(334)) {
 	            // 503: Error: already authenticated
 	            return $this->smtpResponceCode === 503 ? true : false;
 	        }
 
 	        if (!$this->SmtpSendCommand(base64_encode($uid))) {
 	            return false;
 	        }
 
 	        // 334: Continue authentication request
 	        if (!$this->SmtpParseResponse(334)) {
 	            return false;
 	        }
 
 	        if (!$this->SmtpSendCommand(base64_encode($pwd))) {
 	            return false;
 	        }
 
 	        // 235: Authentication successful
 	        if (!$this->SmtpParseResponse(235)) {
 	            return false;
 	        }
 
 	        return true;
 	    }
 
 	    /**
 	     * Authenticates the user using the PLAIN method.
 	     *
 	     * @param string $uid The userid to authenticate as.
 	     * @param string $pwd The password to authenticate with.
 	     *
 	     * @return bool
 	     */
 	    function _authPlain($uid, $pwd)
 	    {
 	        if (!$this->SmtpSendCommand('AUTH', 'PLAIN')) {
 	            return false;
 	        }
 
 	        // 334: Continue authentication request
 	        if (!$this->SmtpParseResponse(334)) {
 	            // 503: Error: already authenticated
 				return $this->smtpResponceCode === 503 ? true : false;
 	        }
 
 	        $auth_str = base64_encode(chr(0) . $uid . chr(0) . $pwd);
 
 	        if (!$this->SmtpSendCommand($auth_str)) {
 	            return false;
 	        }
 
 	        // 235: Authentication successful
 	        if (!$this->SmtpParseResponse(235)) {
 	            return false;
 	        }
 
 	        return true;
 	    }
 
 	    /**
 	     * Send the MAIL FROM: command.
 	     *
 	     * @param string $sender The sender (reverse path) to set.
 	     * @param string $params String containing additional MAIL parameters, such as the NOTIFY flags defined by RFC 1891 or the VERP protocol.
 	     *
 	     * @return bool
 	     */
 	    function SmtpSetFrom($sender, $params = null)
 	    {
 	        $args = "FROM:<$sender>";
 	        if (is_string($params)) {
 	            $args .= ' ' . $params;
 	        }
 
 	        if (!$this->SmtpSendCommand('MAIL', $args)) {
 	            return false;
 	        }
 	        if (!$this->SmtpParseResponse(250)) {
 	            return false;
 	        }
 
 	        return true;
 	    }
 
 	    /**
 	     * Send the RCPT TO: command.
 	     *
 	     * @param string $recipient The recipient (forward path) to add.
 	     * @param string $params String containing additional RCPT parameters, such as the NOTIFY flags defined by RFC 1891.
 	     *
 	     * @return bool
 	     */
 	    function SmtpAddTo($recipient, $params = null)
 	    {
 	        $args = "TO:<$recipient>";
 	        if (is_string($params)) {
 	            $args .= ' ' . $params;
 	        }
 
 	        if (!$this->SmtpSendCommand('RCPT', $args)) {
 	            return false;
 	        }
 
 	        if (!$this->SmtpParseResponse(array(250, 251))) {
 	            return false;
 	        }
 
 	        return true;
 	    }
 
 	    /**
 	     * Send the DATA command.
 	     *
 	     * @param string $data The message body to send.
 	     *
 	     * @return bool
 	     */
 	    function SmtpSendMessage($data)
 	    {
 	        /* RFC 1870, section 3, subsection 3 states "a value of zero
 	         * indicates that no fixed maximum message size is in force".
 	         * Furthermore, it says that if "the parameter is omitted no
 	         * information is conveyed about the server's fixed maximum
 	         * message size". */
 	        if (isset($this->smtpFeatures['SIZE']) && ($this->smtpFeatures['SIZE'] > 0)) {
 	            if (strlen($data) >= $this->smtpFeatures['SIZE']) {
 	                $this->SmtpDisconnect();
 	                return $this->SetError('Message size excedes the server limit', null, false);
 	            }
 	        }
 
 	        // Quote the data based on the SMTP standards
 
 	        // Change Unix (\n) and Mac (\r) linefeeds into Internet-standard CRLF (\r\n) linefeeds.
 	        $data = preg_replace(Array('/(?<!\r)\n/','/\r(?!\n)/'), "\r\n", $data);
 
 	        // Because a single leading period (.) signifies an end to the data,
 	        // legitimate leading periods need to be "doubled" (e.g. '..')
 	        $data = str_replace("\n.", "\n..", $data);
 
 	        if (!$this->SmtpSendCommand('DATA')) {
 	            return false;
 	        }
 	        if (!$this->SmtpParseResponse(354)) {
 	            return false;
 	        }
 
 	        if ($this->smtpSocket->write($data . "\r\n.\r\n") === false) {
 	            return false;
 	        }
 	        if (!$this->SmtpParseResponse(250)) {
 	            return false;
 	        }
 
 	        return true;
 	    }
 
 		/**
 		 * Sets global charset for every message part
 		 *
 		 * @param string $charset
 		 * @param bool $is_system set charset to default for current language
 		 */
 		function SetCharset($charset, $is_system = false)
 		{
-			if ( $is_system ) {
-				$language = $this->Application->recallObject('lang.current');
-				/* @var $language LanguagesItem */
-
-				$charset = $language->GetDBField('Charset') ? $language->GetDBField('Charset') : 'ISO-8859-1';
-			}
-
-			$this->charset = $charset;
+			$this->charset = $is_system ? CHARSET : $charset;
 		}
 
 		/**
 		 * Allows to extract recipient's name from text by specifying it's email
 		 *
 		 * @param string $text
 		 * @param string $email
 		 * @return string
 		 */
 		function ExtractRecipientName($text, $email = '')
 		{
 			$lastspace = mb_strrpos($text, ' ');
 			$name = trim(mb_substr($text, 0, $lastspace - mb_strlen($text)), " \r\n\t\0\x0b\"'");
 			if (empty($name)) {
 				$name = $email;
 			}
 			return $name;
 		}
 
 		/**
 		 * Takes $text and returns an email address from it
 		 * Set $multiple to true to retrieve all found addresses
 		 * Returns false if no addresses were found
 		 *
 		 * @param string $text
 		 * @param bool $multiple
 		 * @param bool $allow_only_domain
 		 * @return Array|bool
 		 * @access public
 		 */
 		public function ExtractRecipientEmail($text, $multiple = false, $allow_only_domain = false)
 		{
 			if ( $allow_only_domain ) {
 				$pattern = '/((' . REGEX_EMAIL_USER . '@)?' . REGEX_EMAIL_DOMAIN . ')/i';
 			}
 			else {
 				$pattern = '/(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')/i';
 			}
 			if ( $multiple ) {
 				if ( preg_match_all($pattern, $text, $found_emails) >= 1 ) {
 					return $found_emails[1];
 				}
 				else {
 					return false;
 				}
 			}
 			else {
 				if ( preg_match($pattern, $text, $found_emails) == 1 ) {
 					return $found_emails[1];
 				}
 				else {
 					return false;
 				}
 			}
 		}
 
 		/**
 		 * Returns array of recipient names and emails
 		 *
 		 * @param string $list
 		 * @param string $separator
 		 * @return Array
 		 */
 		function GetRecipients($list, $separator = ';')
 		{
 			// by MIME specs recipients should be separated using "," symbol,
 			// but users can write ";" too (like in OutLook)
 
 			if (!trim($list)) {
 				return false;
 			}
 
 			$list = explode(',', str_replace($separator, ',', $list));
 
 			$ret = Array ();
 			foreach ($list as $recipient) {
 				$email = $this->ExtractRecipientEmail($recipient);
 				if (!$email) {
 					// invalid email format -> error
 					return false;
 				}
 				$name = $this->ExtractRecipientName($recipient, $email);
 				$ret[] = Array('Name' => $name, 'Email' => $email);
 			}
 
 			return $ret;
 		}
 
 		/* methods for nice header setting */
 
 		/**
 		 * Sets "From" header.
 		 *
 		 * @param string $email
 		 * @param string $first_last_name FirstName and LastName or just FirstName
 		 * @param string $last_name LastName (if not specified in previous parameter)
 		 */
 		function SetFrom($email, $first_last_name, $last_name = '')
 		{
 			$name = rtrim($first_last_name.' '.$last_name, ' ');
 			$this->SetEncodedEmailHeader('From', $email, $name ? $name : $email);
 
 			if (!isset($this->headers['Return-Path'])) {
 				$this->SetReturnPath($email);
 			}
 		}
 
 		/**
 		 * Sets "To" header.
 		 *
 		 * @param string $email
 		 * @param string $first_last_name FirstName and LastName or just FirstName
 		 * @param string $last_name LastName (if not specified in previous parameter)
 		 */
 		function SetTo($email, $first_last_name, $last_name = '')
 		{
 			$name = rtrim($first_last_name.' '.$last_name, ' ');
 			$email = $this->_replaceRecipientEmail($email);
 
 			$this->SetEncodedEmailHeader('To', $email, $name ? $name : $email);
 		}
 
 		/**
 		 * Sets "Return-Path" header (useful for spammers)
 		 *
 		 * @param string $email
 		 */
 		function SetReturnPath($email)
 		{
 			$this->SetHeader('Return-Path', $email);
 		}
 
 		/**
 		 * Adds one more recipient into "To" header
 		 *
 		 * @param string $email
 		 * @param string $first_last_name FirstName and LastName or just FirstName
 		 * @param string $last_name LastName (if not specified in previous parameter)
 		 */
 		function AddTo($email, $first_last_name = '', $last_name = '')
 		{
 			$name = rtrim($first_last_name.' '.$last_name, ' ');
 			$this->AddRecipient('To', $email, $name);
 		}
 
 		/**
 		 * Allows to replace recipient in all sent emails (used for debugging)
 		 *
 		 * @param string $email
 		 * @return string
 		 */
 		function _replaceRecipientEmail($email)
 		{
 			if ( defined('OVERRIDE_EMAIL_RECIPIENTS') && OVERRIDE_EMAIL_RECIPIENTS ) {
 				if ( substr(OVERRIDE_EMAIL_RECIPIENTS, 0, 1) == '@' ) {
 					// domain
 					$email = str_replace('@', '_at_', $email) . OVERRIDE_EMAIL_RECIPIENTS;
 				}
 				else {
 					$email = OVERRIDE_EMAIL_RECIPIENTS;
 				}
 			}
 
 			return $email;
 		}
 
 		/**
 		 * Adds one more recipient into "Cc" header
 		 *
 		 * @param string $email
 		 * @param string $first_last_name FirstName and LastName or just FirstName
 		 * @param string $last_name LastName (if not specified in previous parameter)
 		 */
 		function AddCc($email, $first_last_name = '', $last_name = '')
 		{
 			$name = rtrim($first_last_name.' '.$last_name, ' ');
 			$this->AddRecipient('Cc', $email, $name);
 		}
 
 		/**
 		 * Adds one more recipient into "Bcc" header
 		 *
 		 * @param string $email
 		 * @param string $first_last_name FirstName and LastName or just FirstName
 		 * @param string $last_name LastName (if not specified in previous parameter)
 		 */
 		function AddBcc($email, $first_last_name = '', $last_name = '')
 		{
 			$name = rtrim($first_last_name.' '.$last_name, ' ');
 			$this->AddRecipient('Bcc', $email, $name);
 		}
 
 		/**
 		 * Adds one more recipient to specified header
 		 *
 		 * @param string $header_name
 		 * @param string $email
 		 * @param string $name
 		 */
 		function AddRecipient($header_name, $email, $name = '')
 		{
 			$email = $this->_replaceRecipientEmail($email);
 
 			if (!$name) {
 				$name = $email;
 			}
 
 			$value = isset($this->headers[$header_name]) ? $this->headers[$header_name] : '';
 
 			if ( $value ) {
 				// not first recipient added - separate with comma
 				$value .= ', ';
 			}
 
 			$value .= $this->QuotedPrintableEncode($name, $this->charset) . ' <' . $email . '>';
 			$this->SetHeader($header_name, $value);
 		}
 
 		/**
 		 * Sets "Subject" header.
 		 *
 		 * @param string $subject message subject
 		 */
 		function SetSubject($subject)
 		{
 			$this->setEncodedHeader('Subject', $subject);
 		}
 
 		/**
 		 * Sets HTML part of message
 		 *
 		 * @param string $html
 		 */
 		function SetHTML($html)
 		{
 			$this->CreateTextHtmlPart($html, true);
 		}
 
 		/**
 		 * Sets Plain-Text part of message
 		 *
 		 * @param string $plain_text
 		 */
 		function SetPlain($plain_text)
 		{
 			$this->CreateTextHtmlPart($plain_text);
 		}
 
 		/**
 		 * Sets HTML and optionally plain part of the message
 		 *
 		 * @param string $html
 		 * @param string $plain_text
 		 */
 		function SetBody($html, $plain_text = '')
 		{
 			$this->SetHTML($html);
 			if ($plain_text) {
 				$this->SetPlain($plain_text);
 			}
 		}
 
 		/**
 		 * Performs mail delivery (supports delayed delivery)
 		 *
 		 * @param string $message message, if not given, then use composed one
 		 * @param bool $immediate_send send message now or MailingId
 		 * @param bool $immediate_clear clear message parts after message is sent
 		 * @return bool
 		 */
 		function Deliver($message = null, $immediate_send = true, $immediate_clear = true)
 		{
 			if (isset($message)) {
 				// if message is given directly, then use it
 				if (is_array($message)) {
 					$message_headers =& $message[0];
 					$message_body =& $message[1];
 				}
 				else {
 					$message_headers = Array ();
 					list ($headers, $message_body) = explode("\n\n", $message, 2);
 					$headers = explode("\n", $headers);
 					foreach ($headers as $header) {
 						$header = explode(':', $header, 2);
 						$message_headers[ trim($header[0]) ] = trim($header[1]);
 					}
 				}
 				$composed = true;
 			} else {
 				// direct message not given, then assemble message from available parts
 				$composed = $this->GetHeadersAndBody($message_headers, $message_body);
 			}
 
 			if ( $composed ) {
 				if ( $immediate_send === true ) {
 					$send_method = 'Send' . $this->sendMethod;
 					$result = $this->$send_method($message_headers, $message_body);
 
 					if ( $result && $this->_logData ) {
 						// add e-mail log record
 						$this->Conn->doInsert($this->_logData, TABLE_PREFIX . 'EmailLog');
 					}
 
 					if ( $immediate_clear ) {
 						$this->Clear();
 					}
 
 					return $result;
 				}
 				else {
 					$fields_hash = Array (
 						'ToEmail' => $message_headers['To'],
 						'Subject' => $message_headers['Subject'],
 						'Queued' => adodb_mktime(),
 						'SendRetries' => 0,
 						'LastSendRetry' => 0,
 						'MailingId' => (int)$immediate_send,
 						'LogData' => serialize($this->_logData), // remember e-mail log record
 					);
 
 					$fields_hash['MessageHeaders'] = serialize($message_headers);
 					$fields_hash['MessageBody'] =& $message_body;
 					$this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'EmailQueue');
 
 					if ( $immediate_clear ) {
 						$this->Clear();
 					}
 				}
 			}
 
 			// if not immediate send, then send result is positive :)
 			return $immediate_send !== true ? true : false;
 		}
 
 		/**
 		 * Sets log data
 		 *
 		 * @param string $log_data
 		 * @return void
 		 * @access public
 		 */
 		public function setLogData($log_data)
 		{
 			$this->_logData = $log_data;
 		}
 	}
\ No newline at end of file
Index: branches/5.2.x/core/units/categories/categories_event_handler.php
===================================================================
--- branches/5.2.x/core/units/categories/categories_event_handler.php	(revision 15444)
+++ branches/5.2.x/core/units/categories/categories_event_handler.php	(revision 15445)
@@ -1,3061 +1,3061 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	class CategoriesEventHandler extends kDBEventHandler {
 
 		/**
 		 * Allows to override standard permission mapping
 		 *
 		 * @return void
 		 * @access protected
 		 * @see kEventHandler::$permMapping
 		 */
 		protected function mapPermissions()
 		{
 			parent::mapPermissions();
 
 			$permissions = Array (
 				'OnRebuildCache' => Array ('self' => 'add|edit'),
 				'OnCopy' => Array ('self' => true),
 				'OnCut' => Array ('self' => 'edit'),
 				'OnPasteClipboard' => Array ('self' => true),
 				'OnPaste' => Array ('self' => 'add|edit', 'subitem' => 'edit'),
 
 				'OnRecalculatePriorities' => Array ('self' => 'add|edit'), // category ordering
 				'OnItemBuild' => Array ('self' => true), // always allow to view individual categories (regardless of CATEGORY.VIEW right)
 				'OnUpdatePreviewBlock' => Array ('self' => true), // for FCKEditor integration
 			);
 
 			$this->permMapping = array_merge($this->permMapping, $permissions);
 		}
 
 		/**
 		 * Categories are sorted using special sorting event
 		 *
 		 */
 		function mapEvents()
 		{
 			parent::mapEvents();
 
 			$events_map = Array (
 				'OnMassMoveUp' => 'OnChangePriority',
 				'OnMassMoveDown' => 'OnChangePriority',
 			);
 
 			$this->eventMethods = array_merge($this->eventMethods, $events_map);
 		}
 
 		/**
 		 * Checks user permission to execute given $event
 		 *
 		 * @param kEvent $event
 		 * @return bool
 		 * @access public
 		 */
 		public function CheckPermission(kEvent $event)
 		{
 			if ( $event->Name == 'OnResetCMSMenuCache' ) {
 				// events from "Tools -> System Tools" section are controlled via that section "edit" permission
 
 				$perm_helper = $this->Application->recallObject('PermissionsHelper');
 				/* @var $perm_helper kPermissionsHelper */
 
 				$perm_value = $this->Application->CheckPermission('in-portal:service.edit');
 
 				return $perm_helper->finalizePermissionCheck($event, $perm_value);
 			}
 
 			if ( !$this->Application->isAdmin ) {
 				if ( $event->Name == 'OnSetSortingDirect' ) {
 					// allow sorting on front event without view permission
 					return true;
 				}
 
 				if ( $event->Name == 'OnItemBuild' ) {
 					$category_id = $this->getPassedID($event);
 					if ( $category_id == 0 ) {
 						return true;
 					}
 				}
 			}
 
 			if ( in_array($event->Name, $this->_getMassPermissionEvents()) ) {
 				$items = $this->_getPermissionCheckInfo($event);
 
 				$perm_helper = $this->Application->recallObject('PermissionsHelper');
 				/* @var $perm_helper kPermissionsHelper */
 
 				if ( ($event->Name == 'OnSave') && array_key_exists(0, $items) ) {
 					// adding new item (ID = 0)
 					$perm_value = $perm_helper->AddCheckPermission($items[0]['ParentId'], $event->Prefix) > 0;
 				}
 				else {
 					// leave only items, that can be edited
 					$ids = Array ();
 					$check_method = in_array($event->Name, Array ('OnMassDelete', 'OnCut')) ? 'DeleteCheckPermission' : 'ModifyCheckPermission';
 					foreach ($items as $item_id => $item_data) {
 						if ( $perm_helper->$check_method($item_data['CreatedById'], $item_data['ParentId'], $event->Prefix) > 0 ) {
 							$ids[] = $item_id;
 						}
 					}
 
 					if ( !$ids ) {
 						// no items left for editing -> no permission
 						return $perm_helper->finalizePermissionCheck($event, false);
 					}
 
 					$perm_value = true;
 					$event->setEventParam('ids', $ids); // will be used later by "kDBEventHandler::StoreSelectedIDs" method
 				}
 
 				return $perm_helper->finalizePermissionCheck($event, $perm_value);
 			}
 
 			if ( $event->Name == 'OnRecalculatePriorities' ) {
 				$perm_helper = $this->Application->recallObject('PermissionsHelper');
 				/* @var $perm_helper kPermissionsHelper */
 
 				$category_id = $this->Application->GetVar('m_cat_id');
 
 				return $perm_helper->AddCheckPermission($category_id, $event->Prefix) || $perm_helper->ModifyCheckPermission(0, $category_id, $event->Prefix);
 			}
 
 			if ( $event->Name == 'OnPasteClipboard' ) {
 				// forces permission check to work by current category for "Paste In Category" operation
 				$category_id = $this->Application->GetVar('m_cat_id');
 				$this->Application->SetVar('c_id', $category_id);
 			}
 
 			return parent::CheckPermission($event);
 		}
 
 		/**
 		 * Returns events, that require item-based (not just event-name based) permission check
 		 *
 		 * @return Array
 		 */
 		function _getMassPermissionEvents()
 		{
 			return Array (
 				'OnEdit', 'OnSave', 'OnMassDelete', 'OnMassApprove',
 				'OnMassDecline', 'OnMassMoveUp', 'OnMassMoveDown',
 				'OnCut',
 			);
 		}
 
 		/**
 		 * Returns category item IDs, that require permission checking
 		 *
 		 * @param kEvent $event
 		 * @return string
 		 */
 		function _getPermissionCheckIDs($event)
 		{
 			if ($event->Name == 'OnSave') {
 				$selected_ids = implode(',', $this->getSelectedIDs($event, true));
 				if (!$selected_ids) {
 					$selected_ids = 0; // when saving newly created item (OnPreCreate -> OnPreSave -> OnSave)
 				}
 			}
 			else {
 				// OnEdit, OnMassDelete events, when items are checked in grid
 				$selected_ids = implode(',', $this->StoreSelectedIDs($event));
 			}
 
 			return $selected_ids;
 		}
 
 		/**
 		 * Returns information used in permission checking
 		 *
 		 * @param kEvent $event
 		 * @return Array
 		 */
 		function _getPermissionCheckInfo($event)
 		{
 			// when saving data from temp table to live table check by data from temp table
 			$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
 			$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
 
 			if ($event->Name == 'OnSave') {
 				$table_name = $this->Application->GetTempName($table_name, 'prefix:' . $event->Prefix);
 			}
 
 			$sql = 'SELECT ' . $id_field . ', CreatedById, ParentId
 					FROM ' . $table_name . '
 					WHERE ' . $id_field . ' IN (' . $this->_getPermissionCheckIDs($event) . ')';
 			$items = $this->Conn->Query($sql, $id_field);
 
 			if (!$items) {
 				// when creating new category, then no IDs are stored in session
 				$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
 				list ($id, $fields_hash) = each($items_info);
 
 				if (array_key_exists('ParentId', $fields_hash)) {
 					$item_category = $fields_hash['ParentId'];
 				}
 				else {
 					$item_category = $this->Application->RecallVar('m_cat_id'); // saved in c:OnPreCreate event permission checking
 				}
 
 				$items[$id] = Array (
 					'CreatedById' => $this->Application->RecallVar('user_id'),
 					'ParentId' => $item_category,
 				);
 			}
 
 			return $items;
 		}
 
 		/**
 		 * Set's mark, that root category is edited
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnEdit(kEvent $event)
 		{
 			$category_id = $this->Application->GetVar($event->getPrefixSpecial() . '_id');
 			$home_category = $this->Application->getBaseCategory();
 
 			$this->Application->StoreVar('IsRootCategory_' . $this->Application->GetVar('m_wid'), ($category_id === '0') || ($category_id == $home_category));
 
 			parent::OnEdit($event);
 
 			if ( $event->status == kEvent::erSUCCESS ) {
 				// keep "Section Properties" link (in browse modes) clean
 				$this->Application->DeleteVar('admin');
 			}
 		}
 
 		/**
 		 * Adds selected link to listing
 		 *
 		 * @param kEvent $event
 		 */
 		function OnProcessSelected($event)
 		{
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			$selected_ids = $this->Application->GetVar('selected_ids');
 
 			$this->RemoveRequiredFields($object);
 			$object->SetDBField($this->Application->RecallVar('dst_field'), $selected_ids['c']);
 			$object->Update();
 
 			$event->SetRedirectParam('opener', 'u');
 		}
 
 		/**
 		 * Apply system filter to categories list
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 * @see kDBEventHandler::OnListBuild()
 		 */
 		protected function SetCustomQuery(kEvent $event)
 		{
 			parent::SetCustomQuery($event);
 
 			$object = $event->getObject();
 			/* @var $object kDBList */
 
 			// don't show "Content" category in advanced view
 			$object->addFilter('system_categories', '%1$s.Status <> 4');
 
 			// show system templates from current theme only + all virtual templates
 			$object->addFilter('theme_filter', '%1$s.ThemeId = ' . $this->_getCurrentThemeId() . ' OR %1$s.ThemeId = 0');
 
 			if ($event->Special == 'showall') {
 				// if using recycle bin don't show categories from there
 				$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
 				if ($recycle_bin) {
 					$sql = 'SELECT TreeLeft, TreeRight
 							FROM '.TABLE_PREFIX.'Categories
 							WHERE CategoryId = '.$recycle_bin;
 					$tree_indexes = $this->Conn->GetRow($sql);
 
 					$object->addFilter('recyclebin_filter', '%1$s.TreeLeft < '.$tree_indexes['TreeLeft'].' OR %1$s.TreeLeft > '.$tree_indexes['TreeRight']);
 				}
 			}
 
 			if ( (string)$event->getEventParam('parent_cat_id') !== '' ) {
 				$parent_cat_id = $event->getEventParam('parent_cat_id');
 
 				if ("$parent_cat_id" == 'Root') {
 					$module_name = $event->getEventParam('module') ? $event->getEventParam('module') : 'In-Commerce';
 					$parent_cat_id = $this->Application->findModule('Name', $module_name, 'RootCat');
 				}
 			}
 			else {
 				$parent_cat_id = $this->Application->GetVar('c_id');
 				if (!$parent_cat_id) {
 					$parent_cat_id = $this->Application->GetVar('m_cat_id');
 				}
 				if (!$parent_cat_id) {
 					$parent_cat_id = 0;
 				}
 			}
 
 			if ("$parent_cat_id" == '0') {
 				// replace "0" category with "Content" category id (this way template
 				$parent_cat_id = $this->Application->getBaseCategory();
 			}
 
 			if ("$parent_cat_id" != 'any') {
 				if ($event->getEventParam('recursive')) {
 					if ($parent_cat_id > 0) {
 						// not "Home" category
 						$tree_indexes = $this->Application->getTreeIndex($parent_cat_id);
 
 						$object->addFilter('parent_filter', '%1$s.TreeLeft BETWEEN '.$tree_indexes['TreeLeft'].' AND '.$tree_indexes['TreeRight']);
 					}
 				}
 				else {
 					$object->addFilter('parent_filter', '%1$s.ParentId = '.$parent_cat_id);
 				}
 			}
 
 			$object->addFilter('perm_filter', TABLE_PREFIX . 'CategoryPermissionsCache.PermId = 1'); // check for CATEGORY.VIEW permission
 			if ($this->Application->RecallVar('user_id') != USER_ROOT) {
 				// apply permission filters to all users except "root"
 				$view_filters = Array ();
 				$groups = explode(',',$this->Application->RecallVar('UserGroups'));
 
 				foreach ($groups as $group) {
 					$view_filters[] = 'FIND_IN_SET('.$group.', ' . TABLE_PREFIX . 'CategoryPermissionsCache.ACL)';
 				}
 
 				$view_filter = implode(' OR ', $view_filters);
 				$object->addFilter('perm_filter2', $view_filter);
 			}
 
 			if (!$this->Application->isAdminUser)	{
 				// apply status filter only on front
 				$object->addFilter('status_filter', $object->TableName.'.Status = 1');
 			}
 
 			// process "types" and "except" parameters
 			$type_clauses = Array();
 
 			$types = $event->getEventParam('types');
 			$types = $types ? explode(',', $types) : Array ();
 
 			$except_types = $event->getEventParam('except');
 			$except_types = $except_types ? explode(',', $except_types) : Array ();
 
 			if (in_array('related', $types) || in_array('related', $except_types)) {
 				$related_to = $event->getEventParam('related_to');
 				if (!$related_to) {
 					$related_prefix = $event->Prefix;
 				}
 				else {
 					$sql = 'SELECT Prefix
 							FROM '.TABLE_PREFIX.'ItemTypes
 							WHERE ItemName = '.$this->Conn->qstr($related_to);
 					$related_prefix = $this->Conn->GetOne($sql);
 				}
 
 				$rel_table = $this->Application->getUnitOption('rel', 'TableName');
 				$item_type = (int)$this->Application->getUnitOption($event->Prefix, 'ItemType');
 
 				if ($item_type == 0) {
 					trigger_error('<strong>ItemType</strong> not defined for prefix <strong>' . $event->Prefix . '</strong>', E_USER_WARNING);
 				}
 
 				// process case, then this list is called inside another list
 				$prefix_special = $event->getEventParam('PrefixSpecial');
 				if (!$prefix_special) {
 					$prefix_special = $this->Application->Parser->GetParam('PrefixSpecial');
 				}
 
 				$id = false;
 				if ($prefix_special !== false) {
 					$processed_prefix = $this->Application->processPrefix($prefix_special);
 					if ($processed_prefix['prefix'] == $related_prefix) {
 						// printing related categories within list of items (not on details page)
 						$list = $this->Application->recallObject($prefix_special);
 						/* @var $list kDBList */
 
 						$id = $list->GetID();
 					}
 				}
 
 				if ($id === false) {
 					// printing related categories for single item (possibly on details page)
 					if ($related_prefix == 'c') {
 						$id = $this->Application->GetVar('m_cat_id');
 					}
 					else {
 						$id = $this->Application->GetVar($related_prefix . '_id');
 					}
 				}
 
 				$p_item = $this->Application->recallObject($related_prefix . '.current', null, Array('skip_autoload' => true));
 				/* @var $p_item kCatDBItem */
 
 				$p_item->Load( (int)$id );
 
 				$p_resource_id = $p_item->GetDBField('ResourceId');
 
 				$sql = 'SELECT SourceId, TargetId FROM '.$rel_table.'
 						WHERE
 							(Enabled = 1)
 							AND (
 									(Type = 0 AND SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.')
 									OR
 									(Type = 1
 										AND (
 												(SourceId = '.$p_resource_id.' AND TargetType = '.$item_type.')
 												OR
 												(TargetId = '.$p_resource_id.' AND SourceType = '.$item_type.')
 											)
 									)
 							)';
 
 				$related_ids_array = $this->Conn->Query($sql);
 				$related_ids = Array();
 
 				foreach ($related_ids_array as $key => $record) {
 					$related_ids[] = $record[ $record['SourceId'] == $p_resource_id ? 'TargetId' : 'SourceId' ];
 				}
 
 				if (count($related_ids) > 0) {
 					$type_clauses['related']['include'] = '%1$s.ResourceId IN ('.implode(',', $related_ids).')';
 					$type_clauses['related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_ids).')';
 				}
 				else {
 					$type_clauses['related']['include'] = '0';
 					$type_clauses['related']['except'] = '1';
 				}
 
 				$type_clauses['related']['having_filter'] = false;
 			}
 
 			if (in_array('category_related', $type_clauses)) {
 				$object->removeFilter('parent_filter');
 				$resource_id = $this->Conn->GetOne('
 								SELECT ResourceId FROM '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
 								WHERE CategoryId = '.$parent_cat_id
 							);
 
 				$sql = 'SELECT DISTINCT(TargetId) FROM '.TABLE_PREFIX.'CatalogRelationships
 						WHERE SourceId = '.$resource_id.' AND SourceType = 1';
 				$related_cats = $this->Conn->GetCol($sql);
 				$related_cats = is_array($related_cats) ? $related_cats : Array();
 
 				$sql = 'SELECT DISTINCT(SourceId) FROM '.TABLE_PREFIX.'CatalogRelationships
 						WHERE TargetId = '.$resource_id.' AND TargetType = 1 AND Type = 1';
 				$related_cats2 = $this->Conn->GetCol($sql);
 				$related_cats2 = is_array($related_cats2) ? $related_cats2 : Array();
 				$related_cats = array_unique( array_merge( $related_cats2, $related_cats ) );
 
 				if ($related_cats) {
 					$type_clauses['category_related']['include'] = '%1$s.ResourceId IN ('.implode(',', $related_cats).')';
 					$type_clauses['category_related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_cats).')';
 				}
 				else
 				{
 					$type_clauses['category_related']['include'] = '0';
 					$type_clauses['category_related']['except'] = '1';
 				}
 				$type_clauses['category_related']['having_filter'] = false;
 			}
 
 			if (in_array('product_related', $types)) {
 				$object->removeFilter('parent_filter');
 
 				$product_id = $event->getEventParam('product_id') ? $event->getEventParam('product_id') : $this->Application->GetVar('p_id');
 				$resource_id = $this->Conn->GetOne('
 								SELECT ResourceId FROM '.$this->Application->getUnitOption('p', 'TableName').'
 								WHERE ProductId = '.$product_id
 							);
 
 				$sql = 'SELECT DISTINCT(TargetId) FROM '.TABLE_PREFIX.'CatalogRelationships
 						WHERE SourceId = '.$resource_id.' AND TargetType = 1';
 				$related_cats = $this->Conn->GetCol($sql);
 				$related_cats = is_array($related_cats) ? $related_cats : Array();
 				$sql = 'SELECT DISTINCT(SourceId) FROM '.TABLE_PREFIX.'CatalogRelationships
 						WHERE TargetId = '.$resource_id.' AND SourceType = 1 AND Type = 1';
 				$related_cats2 = $this->Conn->GetCol($sql);
 				$related_cats2 = is_array($related_cats2) ? $related_cats2 : Array();
 				$related_cats = array_unique( array_merge( $related_cats2, $related_cats ) );
 
 				if ($related_cats) {
 					$type_clauses['product_related']['include'] = '%1$s.ResourceId IN ('.implode(',', $related_cats).')';
 					$type_clauses['product_related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_cats).')';
 				}
 				else {
 					$type_clauses['product_related']['include'] = '0';
 					$type_clauses['product_related']['except'] = '1';
 				}
 
 				$type_clauses['product_related']['having_filter'] = false;
 			}
 
 			$type_clauses['menu']['include'] = '%1$s.IsMenu = 1';
 			$type_clauses['menu']['except'] = '%1$s.IsMenu = 0';
 			$type_clauses['menu']['having_filter'] = false;
 
 			if (in_array('search', $types) || in_array('search', $except_types)) {
 				$event_mapping = Array (
 					'simple'		=>	'OnSimpleSearch',
 					'subsearch'		=>	'OnSubSearch',
 					'advanced'		=>	'OnAdvancedSearch'
 				);
 
 				$keywords = $event->getEventParam('keyword_string');
 				$type = $this->Application->GetVar('search_type', 'simple');
 
 				if ( $keywords ) {
 					// processing keyword_string param of ListProducts tag
 					$this->Application->SetVar('keywords', $keywords);
 					$type = 'simple';
 				}
 
 				$search_event = $event_mapping[$type];
 				$this->$search_event($event);
 
 				$object = $event->getObject();
 				/* @var $object kDBList */
 
 				$search_sql = '	FROM ' . TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search
 								search_result JOIN %1$s ON %1$s.ResourceId = search_result.ResourceId';
 				$sql = str_replace('FROM %1$s', $search_sql, $object->GetPlainSelectSQL());
 
 				$object->SetSelectSQL($sql);
 
 				$object->addCalculatedField('Relevance', 'search_result.Relevance');
 
 				$type_clauses['search']['include'] = '1';
 				$type_clauses['search']['except'] = '0';
 				$type_clauses['search']['having_filter'] = false;
 			}
 
 			$search_helper = $this->Application->recallObject('SearchHelper');
 			/* @var $search_helper kSearchHelper */
 
 			$search_helper->SetComplexFilter($event, $type_clauses, implode(',', $types), implode(',', $except_types));
 		}
 
 		/**
 		 * Returns current theme id
 		 *
 		 * @return int
 		 */
 		function _getCurrentThemeId()
 		{
 			$themes_helper = $this->Application->recallObject('ThemesHelper');
 			/* @var $themes_helper kThemesHelper */
 
 			return (int)$themes_helper->getCurrentThemeId();
 		}
 
 		/**
 		 * Returns ID of current item to be edited
 		 * by checking ID passed in get/post as prefix_id
 		 * or by looking at first from selected ids, stored.
 		 * Returned id is also stored in Session in case
 		 * it was explicitly passed as get/post
 		 *
 		 * @param kEvent $event
 		 * @return int
 		 * @access public
 		 */
 		public function getPassedID(kEvent $event)
 		{
 			if ( ($event->Special == 'page') || ($event->Special == '-virtual') || ($event->Prefix == 'st') ) {
 				return $this->_getPassedStructureID($event);
 			}
 
 			if ( $this->Application->isAdmin ) {
 				return parent::getPassedID($event);
 			}
 
 			return $this->Application->GetVar('m_cat_id');
 		}
 
 		/**
 		 * Enter description here...
 		 *
 		 * @param kEvent $event
 		 * @return int
 		 */
 		function _getPassedStructureID($event)
 		{
 			static $page_by_template = Array ();
 
 			if ( $event->Special == 'current' ) {
 				return $this->Application->GetVar('m_cat_id');
 			}
 
 			$event->setEventParam('raise_warnings', 0);
 
 			$page_id = parent::getPassedID($event);
 
 			if ( $page_id === false ) {
 				$template = $event->getEventParam('page');
 				if ( !$template ) {
 					$template = $this->Application->GetVar('t');
 				}
 
 				// bug: when template contains "-" symbols (or others, that stripDisallowed will replace) it's not found
 				if ( !array_key_exists($template, $page_by_template) ) {
 					$template_crc = kUtil::crc32(mb_strtolower($template));
 
 					$sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . '
 							FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
 							WHERE
 								(
 									(NamedParentPathHash = ' . $template_crc . ') OR
 									(`Type` = ' . PAGE_TYPE_TEMPLATE . ' AND CachedTemplateHash = ' . $template_crc . ')
 								) AND (ThemeId = ' . $this->_getCurrentThemeId() . ' OR ThemeId = 0)';
 
 					$page_id = $this->Conn->GetOne($sql);
 				}
 				else {
 					$page_id = $page_by_template[$template];
 				}
 
 				if ( $page_id === false && EDITING_MODE ) {
 					// create missing pages, when in editing mode
 					$object = $this->Application->recallObject($this->Prefix . '.rebuild', NULL, Array ('skip_autoload' => true));
 					/* @var $object CategoriesItem */
 
 					$created = $this->_prepareAutoPage($object, $template, NULL, SMS_MODE_AUTO); // create virtual (not system!) page
 					if ( $created ) {
 						$rebuild_mode = $this->Application->ConfigValue('CategoryPermissionRebuildMode');
 
 						if ( $rebuild_mode == CategoryPermissionRebuild::SILENT || !$this->Application->isAdmin ) {
 							$updater = $this->Application->makeClass('kPermCacheUpdater');
 							/* @var $updater kPermCacheUpdater */
 
 							$updater->OneStepRun();
 						}
 
 						$this->_resetMenuCache();
 
 						$this->Application->RemoveVar('PermCache_UpdateRequired');
 
 						$page_id = $object->GetID();
 						$this->Application->SetVar('m_cat_id', $page_id);
 					}
 				}
 
 				if ( $page_id ) {
 					$page_by_template[$template] = $page_id;
 				}
 			}
 
 			if ( !$page_id && !$this->Application->isAdmin ) {
 				$page_id = $this->Application->GetVar('m_cat_id');
 			}
 
 			return $page_id;
 		}
 
 		function ParentGetPassedID($event)
 		{
 			return parent::getPassedID($event);
 		}
 
 		/**
 		 * Adds calculates fields for item statuses
 		 *
 		 * @param kCatDBItem $object
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function prepareObject(&$object, kEvent $event)
 		{
 			if ( $event->Special == '-virtual' ) {
 				return;
 			}
 
 			$object = $event->getObject(Array ('skip_autoload' => true));
 			/* @var $object kDBItem */
 
 			$object->addCalculatedField(
 				'IsNew',
 				'	IF(%1$s.NewItem = 2,
 						IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - '.
 							$this->Application->ConfigValue('Category_DaysNew').
 							'*3600*24), 1, 0),
 						%1$s.NewItem
 				)');
 		}
 
 		/**
 		 * Set correct parent path for newly created categories
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnAfterCopyToLive(kEvent $event)
 		{
 			parent::OnAfterCopyToLive($event);
 
 			$object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true, 'live_table' => true));
 			/* @var $object CategoriesItem */
 
 			$parent_path = false;
 			$object->Load($event->getEventParam('id'));
 
 			if ( $event->getEventParam('temp_id') == 0 ) {
 				if ( $object->isLoaded() ) {
 					// update path only for real categories (not including "Home" root category)
 					$fields_hash = $object->buildParentBasedFields();
 					$this->Conn->doUpdate($fields_hash, $object->TableName, 'CategoryId = ' . $object->GetID());
 					$parent_path = $fields_hash['ParentPath'];
 				}
 			}
 			else {
 				$parent_path = $object->GetDBField('ParentPath');
 			}
 
 			if ( $parent_path ) {
 				$cache_updater = $this->Application->makeClass('kPermCacheUpdater', Array (null, $parent_path));
 				/* @var $cache_updater kPermCacheUpdater */
 
 				$cache_updater->OneStepRun();
 			}
 		}
 
 		/**
 		 * Set cache modification mark if needed
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnBeforeDeleteFromLive(kEvent $event)
 		{
 			parent::OnBeforeDeleteFromLive($event);
 
 			$id = $event->getEventParam('id');
 
 			// loading anyway, because this object is needed by "c-perm:OnBeforeDeleteFromLive" event
 			$temp_object = $event->getObject(Array ('skip_autoload' => true));
 			/* @var $temp_object CategoriesItem */
 
 			$temp_object->Load($id);
 
 			if ( $id == 0 ) {
 				if ( $temp_object->isLoaded() ) {
 					// new category -> update cache (not loaded when "Home" category)
 					$this->Application->StoreVar('PermCache_UpdateRequired', 1);
 				}
 
 				return ;
 			}
 
 			// existing category was edited, check if in-cache fields are modified
 			$live_object = $this->Application->recallObject($event->Prefix . '.-item', null, Array ('live_table' => true, 'skip_autoload' => true));
 			/* @var $live_object CategoriesItem */
 
 			$live_object->Load($id);
 			$cached_fields = Array ('l' . $this->Application->GetDefaultLanguageId() . '_Name', 'Filename', 'Template', 'ParentId', 'Priority');
 
 			foreach ($cached_fields as $cached_field) {
 				if ( $live_object->GetDBField($cached_field) != $temp_object->GetDBField($cached_field) ) {
 					// use session instead of REQUEST because of permission editing in category can contain
 					// multiple submits, that changes data before OnSave event occurs
 					$this->Application->StoreVar('PermCache_UpdateRequired', 1);
 					break;
 				}
 			}
 
 			// remember category filename change between temp and live records
 			if ( $temp_object->GetDBField('Filename') != $live_object->GetDBField('Filename') ) {
 				$filename_changes = $this->Application->GetVar($event->Prefix . '_filename_changes', Array ());
 
 				$filename_changes[ $live_object->GetID() ] = Array (
 					'from' => $live_object->GetDBField('Filename'),
 					'to' => $temp_object->GetDBField('Filename')
 				);
 
 				$this->Application->SetVar($event->Prefix . '_filename_changes', $filename_changes);
 			}
 		}
 
 		/**
 		 * Calls kDBEventHandler::OnSave original event
 		 * Used in proj-cms:StructureEventHandler->OnSave
 		 *
 		 * @param kEvent $event
 		 */
 		function parentOnSave($event)
 		{
 			parent::OnSave($event);
 		}
 
 		/**
 		 * Reset root-category flag when new category is created
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnPreCreate(kEvent $event)
 		{
 			// 1. for permission editing of Home category
 			$this->Application->RemoveVar('IsRootCategory_' . $this->Application->GetVar('m_wid'));
 
 			parent::OnPreCreate($event);
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			// 2. preset template
 			$category_id = $this->Application->GetVar('m_cat_id');
 			$root_category = $this->Application->getBaseCategory();
 
 			if ( $category_id == $root_category ) {
 				$object->SetDBField('Template', $this->_getDefaultDesign());
 			}
 
 			// 3. set default owner
 			$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
 		}
 
 		/**
 		 * Checks cache update mark and redirect to cache if needed
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnSave(kEvent $event)
 		{
 			// get data from live table before it is overwritten by parent OnSave method call
 			$ids = $this->getSelectedIDs($event, true);
 			$is_editing = implode('', $ids);
 			$old_statuses = $is_editing ? $this->_getCategoryStatus($ids) : Array ();
 
 			$object = $event->getObject();
 			/* @var $object CategoriesItem */
 
 			parent::OnSave($event);
 
 			if ( $event->status != kEvent::erSUCCESS ) {
 				return;
 			}
 
 			if ( $this->Application->RecallVar('PermCache_UpdateRequired') ) {
 				$this->Application->RemoveVar('IsRootCategory_' . $this->Application->GetVar('m_wid'));
 			}
 
 			$this->Application->StoreVar('RefreshStructureTree', 1);
 			$this->_resetMenuCache();
 
 			if ( $is_editing ) {
 				// send email event to category owner, when it's status is changed (from admin)
 				$object->SwitchToLive();
 				$new_statuses = $this->_getCategoryStatus($ids);
 				$process_statuses = Array (STATUS_ACTIVE, STATUS_DISABLED);
 
 				foreach ($new_statuses as $category_id => $new_status) {
 					if ( $new_status != $old_statuses[$category_id] && in_array($new_status, $process_statuses) ) {
 						$object->Load($category_id);
 						$email_event = $new_status == STATUS_ACTIVE ? 'CATEGORY.APPROVE' : 'CATEGORY.DENY';
 						$this->Application->EmailEventUser($email_event, $object->GetDBField('CreatedById'));
 					}
 				}
 			}
 
 			// change opener stack in case if edited category filename was changed
 			$filename_changes = $this->Application->GetVar($event->Prefix . '_filename_changes', Array ());
 
 			if ( $filename_changes ) {
 				$opener_stack = $this->Application->makeClass('kOpenerStack');
 				/* @var $opener_stack kOpenerStack */
 
 				list ($template, $params, $index_file) = $opener_stack->pop();
 
 				foreach ($filename_changes as $change_info) {
 					$template = str_ireplace($change_info['from'], $change_info['to'], $template);
 				}
 
 				$opener_stack->push($template, $params, $index_file);
 				$opener_stack->save();
 			}
 		}
 
 		/**
 		 * Returns statuses of given categories
 		 *
 		 * @param Array $category_ids
 		 * @return Array
 		 */
 		function _getCategoryStatus($category_ids)
 		{
 			$id_field = $this->Application->getUnitOption($this->Prefix, 'IDField');
 			$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
 
 			$sql = 'SELECT Status, ' . $id_field . '
 					FROM ' . $table_name . '
 					WHERE ' . $id_field . ' IN (' . implode(',', $category_ids) . ')';
 			return $this->Conn->GetCol($sql, $id_field);
 		}
 
 		/**
 		 * Creates a new item in temp table and
 		 * stores item id in App vars and Session on success
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnPreSaveCreated(kEvent $event)
 		{
 			$object = $event->getObject( Array ('skip_autoload' => true) );
 			/* @var $object CategoriesItem */
 
 			if ( $object->IsRoot() ) {
 				// don't create root category while saving permissions
 				return;
 			}
 
 			parent::OnPreSaveCreated($event);
 		}
 
 		/**
 		 * Deletes sym link to other category
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnAfterItemDelete(kEvent $event)
 		{
 			parent::OnAfterItemDelete($event);
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			$sql = 'UPDATE ' . $object->TableName . '
 					SET SymLinkCategoryId = NULL
 					WHERE SymLinkCategoryId = ' . $object->GetID();
 			$this->Conn->Query($sql);
 
 			// delete direct subscriptions to category, that was deleted
 			$sql = 'SELECT SubscriptionId
 					FROM ' . TABLE_PREFIX . 'SystemEventSubscriptions
 					WHERE CategoryId = ' . $object->GetID();
 			$ids = $this->Conn->GetCol($sql);
 
 			if ( $ids ) {
 				$temp_handler = $this->Application->recallObject('system-event-subscription_TempHandler', 'kTempTablesHandler');
 				/* @var $temp_handler kTempTablesHandler */
 
 				$temp_handler->DeleteItems('system-event-subscription', '', $ids);
 			}
 		}
 
 		/**
 		 * Exclude root categories from deleting
 		 *
 		 * @param kEvent $event
 		 * @param string $type
 		 * @return void
 		 * @access protected
 		 */
 		protected function customProcessing(kEvent $event, $type)
 		{
 			if ( $event->Name == 'OnMassDelete' && $type == 'before' ) {
 				$ids = $event->getEventParam('ids');
 				if ( !$ids || $this->Application->ConfigValue('AllowDeleteRootCats') ) {
 					return;
 				}
 
 				$root_categories = Array ();
 
 				// get module root categories and exclude them
 				foreach ($this->Application->ModuleInfo as $module_info) {
 					$root_categories[] = $module_info['RootCat'];
 				}
 
 				$root_categories = array_unique($root_categories);
 
 				if ( $root_categories && array_intersect($ids, $root_categories) ) {
 					$event->setEventParam('ids', array_diff($ids, $root_categories));
 					$this->Application->StoreVar('root_delete_error', 1);
 				}
 			}
 		}
 
 		/**
 		 * Checks, that given template exists (physically) in given theme
 		 *
 		 * @param string $template
 		 * @param int $theme_id
 		 * @return bool
 		 */
 		function _templateFound($template, $theme_id = null)
 		{
 			static $init_made = false;
 
 			if (!$init_made) {
 				$this->Application->InitParser(true);
 				$init_made = true;
 			}
 
 			if (!isset($theme_id)) {
 				$theme_id = $this->_getCurrentThemeId();
 			}
 
 			$theme_name = $this->_getThemeName($theme_id);
 
 			return $this->Application->TemplatesCache->TemplateExists('theme:' . $theme_name . '/' . $template);
 		}
 
 		/**
 		 * Removes ".tpl" in template path
 		 *
 		 * @param string $template
 		 * @return string
 		 */
 		function _stripTemplateExtension($template)
 		{
 	//		return preg_replace('/\.[^.\\\\\\/]*$/', '', $template);
 
 			return preg_replace('/^[\\/]{0,1}(.*)\.tpl$/', "$1", $template);
 		}
 
 		/**
 		 * Deletes all selected items.
 		 * Automatically recourse into sub-items using temp handler, and deletes sub-items
 		 * by calling its Delete method if sub-item has AutoDelete set to true in its config file
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnMassDelete(kEvent $event)
 		{
 			if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
 				$event->status = kEvent::erFAIL;
 				return;
 			}
 
 			$to_delete = Array ();
 			$ids = $this->StoreSelectedIDs($event);
 			$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
 
 			if ( $recycle_bin ) {
 				$rb = $this->Application->recallObject('c.recycle', null, Array ('skip_autoload' => true));
 				/* @var $rb CategoriesItem */
 
 				$rb->Load($recycle_bin);
 
 				$cat = $event->getObject(Array ('skip_autoload' => true));
 				/* @var $cat CategoriesItem */
 
 				foreach ($ids as $id) {
 					$cat->Load($id);
 
 					if ( preg_match('/^' . preg_quote($rb->GetDBField('ParentPath'), '/') . '/', $cat->GetDBField('ParentPath')) ) {
 						// already in "Recycle Bin" -> delete for real
 						$to_delete[] = $id;
 						continue;
 					}
 
 					// just move into "Recycle Bin" category
 					$cat->SetDBField('ParentId', $recycle_bin);
 					$cat->Update();
 				}
 
 				$ids = $to_delete;
 			}
 
 			$event->setEventParam('ids', $ids);
 			$this->customProcessing($event, 'before');
 			$ids = $event->getEventParam('ids');
 
 			if ( $ids ) {
 				$recursive_helper = $this->Application->recallObject('RecursiveHelper');
 				/* @var $recursive_helper kRecursiveHelper */
 
 				foreach ($ids as $id) {
 					$recursive_helper->DeleteCategory($id, $event->Prefix);
 				}
 			}
 
 			$this->clearSelectedIDs($event);
 
 			$this->_ensurePermCacheRebuild($event);
 		}
 
 		/**
 		 * Add selected items to clipboard with mode = COPY (CLONE)
 		 *
 		 * @param kEvent $event
 		 */
 		function OnCopy($event)
 		{
 			$this->Application->RemoveVar('clipboard');
 
 			$clipboard_helper = $this->Application->recallObject('ClipboardHelper');
 			/* @var $clipboard_helper kClipboardHelper */
 
 			$clipboard_helper->setClipboard($event, 'copy', $this->StoreSelectedIDs($event));
 			$this->clearSelectedIDs($event);
 		}
 
 		/**
 		 * Add selected items to clipboard with mode = CUT
 		 *
 		 * @param kEvent $event
 		 */
 		function OnCut($event)
 		{
 			$this->Application->RemoveVar('clipboard');
 
 			$clipboard_helper = $this->Application->recallObject('ClipboardHelper');
 			/* @var $clipboard_helper kClipboardHelper */
 
 			$clipboard_helper->setClipboard($event, 'cut', $this->StoreSelectedIDs($event));
 			$this->clearSelectedIDs($event);
 		}
 
 		/**
 		 * Controls all item paste operations. Can occur only with filled clipboard.
 		 *
 		 * @param kEvent $event
 		 */
 		function OnPasteClipboard($event)
 		{
 			$clipboard = unserialize( $this->Application->RecallVar('clipboard') );
 			foreach ($clipboard as $prefix => $clipboard_data) {
 				$paste_event = new kEvent($prefix.':OnPaste', Array('clipboard_data' => $clipboard_data));
 				$this->Application->HandleEvent($paste_event);
 
 				$event->copyFrom($paste_event);
 			}
 		}
 
 		/**
 		 * Checks permission for OnPaste event
 		 *
 		 * @param kEvent $event
 		 * @return bool
 		 */
 		function _checkPastePermission($event)
 		{
 			$perm_helper = $this->Application->recallObject('PermissionsHelper');
 			/* @var $perm_helper kPermissionsHelper */
 
 			$category_id = $this->Application->GetVar('m_cat_id');
 			if ($perm_helper->AddCheckPermission($category_id, $event->Prefix) == 0) {
 				// no items left for editing -> no permission
 				return $perm_helper->finalizePermissionCheck($event, false);
 			}
 
 			return true;
 		}
 
 		/**
 		 * Paste categories with sub-items from clipboard
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnPaste($event)
 		{
 			if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) || !$this->_checkPastePermission($event) ) {
 				$event->status = kEvent::erFAIL;
 				return;
 			}
 
 			$clipboard_data = $event->getEventParam('clipboard_data');
 
 			if ( !$clipboard_data['cut'] && !$clipboard_data['copy'] ) {
 				return;
 			}
 
 			// 1. get ParentId of moved category(-es) before it gets updated!!!)
 			$source_category_id = 0;
 			$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
 			$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
 
 			if ( $clipboard_data['cut'] ) {
 				$sql = 'SELECT ParentId
 						FROM ' . $table_name . '
 						WHERE ' . $id_field . ' = ' . $clipboard_data['cut'][0];
 				$source_category_id = $this->Conn->GetOne($sql);
 			}
 
 			$recursive_helper = $this->Application->recallObject('RecursiveHelper');
 			/* @var $recursive_helper kRecursiveHelper */
 
 			if ( $clipboard_data['cut'] ) {
 				$recursive_helper->MoveCategories($clipboard_data['cut'], $this->Application->GetVar('m_cat_id'));
 			}
 
 			if ( $clipboard_data['copy'] ) {
 				// don't allow to copy/paste system OR theme-linked virtual pages
 
 				$sql = 'SELECT ' . $id_field . '
 						FROM ' . $table_name . '
 						WHERE ' . $id_field . ' IN (' . implode(',', $clipboard_data['copy']) . ') AND (`Type` = ' . PAGE_TYPE_VIRTUAL . ') AND (ThemeId = 0)';
 				$allowed_ids = $this->Conn->GetCol($sql);
 
 				if ( !$allowed_ids ) {
 					return;
 				}
 
 				foreach ($allowed_ids as $id) {
 					$recursive_helper->PasteCategory($id, $event->Prefix);
 				}
 			}
 
 			$priority_helper = $this->Application->recallObject('PriorityHelper');
 			/* @var $priority_helper kPriorityHelper */
 
 			if ( $clipboard_data['cut'] ) {
 				$ids = $priority_helper->recalculatePriorities($event, 'ParentId = ' . $source_category_id);
 
 				if ( $ids ) {
 					$priority_helper->massUpdateChanged($event->Prefix, $ids);
 				}
 			}
 
 			// recalculate priorities of newly pasted categories in destination category
 			$parent_id = $this->Application->GetVar('m_cat_id');
 			$ids = $priority_helper->recalculatePriorities($event, 'ParentId = ' . $parent_id);
 
 			if ( $ids ) {
 				$priority_helper->massUpdateChanged($event->Prefix, $ids);
 			}
 
 			if ( $clipboard_data['cut'] || $clipboard_data['copy'] ) {
 				$this->_ensurePermCacheRebuild($event);
 			}
 		}
 
 		/**
 		 * Ensures, that category permission cache is rebuild when category is added/edited/deleted
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function _ensurePermCacheRebuild($event)
 		{
 			$rebild_mode = $this->Application->ConfigValue('CategoryPermissionRebuildMode');
 
 			if ( $rebild_mode == CategoryPermissionRebuild::SILENT ) {
 				$updater = $this->Application->makeClass('kPermCacheUpdater');
 				/* @var $updater kPermCacheUpdater */
 
 				$updater->OneStepRun();
 			}
 			elseif ( $rebild_mode == CategoryPermissionRebuild::AUTOMATIC ) {
 				// rebuild with progress bar
 				$event->redirect = 'categories/cache_updater';
 			}
 
 			$this->_resetMenuCache();
 			$this->Application->StoreVar('RefreshStructureTree', 1);
 		}
 
 		/**
 		 * Occurs when pasting category
 		 *
 		 * @param kEvent $event
 		 */
 		/*function OnCatPaste($event)
 		{
 			$inp_clipboard = $this->Application->RecallVar('ClipBoard');
 			$inp_clipboard = explode('-', $inp_clipboard, 2);
 
 			if($inp_clipboard[0] == 'COPY')
 			{
 				$saved_cat_id = $this->Application->GetVar('m_cat_id');
 				$cat_ids = $event->getEventParam('cat_ids');
 
 				$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
 				$table = $this->Application->getUnitOption($event->Prefix, 'TableName');
 				$ids_sql = 'SELECT '.$id_field.' FROM '.$table.' WHERE ResourceId IN (%s)';
 				$resource_ids_sql = 'SELECT ItemResourceId FROM '.TABLE_PREFIX.'CategoryItems WHERE CategoryId = %s AND PrimaryCat = 1';
 
 				$object = $this->Application->recallObject($event->Prefix.'.item', $event->Prefix, Array('skip_autoload' => true));
 
 				foreach($cat_ids as $source_cat => $dest_cat)
 				{
 					$item_resource_ids = $this->Conn->GetCol( sprintf($resource_ids_sql, $source_cat) );
 					if(!$item_resource_ids) continue;
 
 					$this->Application->SetVar('m_cat_id', $dest_cat);
 					$item_ids = $this->Conn->GetCol( sprintf($ids_sql, implode(',', $item_resource_ids) ) );
 
 					$temp = $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
 					if($item_ids) $temp->CloneItems($event->Prefix, $event->Special, $item_ids);
 				}
 
 				$this->Application->SetVar('m_cat_id', $saved_cat_id);
 			}
 		}*/
 
 		/**
 		 * Clears clipboard content
 		 *
 		 * @param kEvent $event
 		 */
 		function OnClearClipboard($event)
 		{
 			$this->Application->RemoveVar('clipboard');
 		}
 
 		/**
 		 * Sets correct status for new categories created on front-end
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnBeforeItemCreate(kEvent $event)
 		{
 			parent::OnBeforeItemCreate($event);
 
 			$object = $event->getObject();
 			/* @var $object CategoriesItem */
 
 			if ( $object->GetDBField('ParentId') <= 0 ) {
 				// no parent category - use current (happens during import)
 				$object->SetDBField('ParentId', $this->Application->GetVar('m_cat_id'));
 			}
 
 			$this->_beforeItemChange($event);
 
 			if ( $this->Application->isAdmin || $event->Prefix == 'st' ) {
 				// don't check category permissions when auto-creating structure pages
 				return ;
 			}
 
 			$perm_helper = $this->Application->recallObject('PermissionsHelper');
 			/* @var $perm_helper kPermissionsHelper */
 
 			$new_status = false;
 			$category_id = $this->Application->GetVar('m_cat_id');
 
 			if ( $perm_helper->CheckPermission('CATEGORY.ADD', 0, $category_id) ) {
 				$new_status = STATUS_ACTIVE;
 			}
 			else {
 				if ( $perm_helper->CheckPermission('CATEGORY.ADD.PENDING', 0, $category_id) ) {
 					$new_status = STATUS_PENDING;
 				}
 			}
 
 			if ( $new_status ) {
 				$object->SetDBField('Status', $new_status);
 
 				// don't forget to set Priority for suggested from Front-End categories
 				$min_priority = $this->_getNextPriority($object->GetDBField('ParentId'), $object->TableName);
 				$object->SetDBField('Priority', $min_priority);
 			}
 			else {
 				$event->status = kEvent::erPERM_FAIL;
 				return ;
 			}
 		}
 
 		/**
 		 * Returns next available priority for given category from given table
 		 *
 		 * @param int $category_id
 		 * @param string $table_name
 		 * @return int
 		 */
 		function _getNextPriority($category_id, $table_name)
 		{
 			$sql = 'SELECT MIN(Priority)
 					FROM ' . $table_name . '
 					WHERE ParentId = ' . $category_id;
 			return (int)$this->Conn->GetOne($sql) - 1;
 		}
 
 		/**
 		 * Sets correct status for new categories created on front-end
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnBeforeItemUpdate(kEvent $event)
 		{
 			parent::OnBeforeItemUpdate($event);
 
 			$this->_beforeItemChange($event);
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			if ( $object->GetChangedFields() ) {
 				$object->SetDBField('ModifiedById', $this->Application->RecallVar('user_id'));
 			}
 		}
 
 		/**
 		 * Performs redirect to correct suggest confirmation template
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnCreate(kEvent $event)
 		{
 			parent::OnCreate($event);
 
 			if ( $this->Application->isAdmin || $event->status != kEvent::erSUCCESS ) {
 				// don't sent email or rebuild cache directly after category is created by admin
 				return;
 			}
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			$cache_updater = $this->Application->makeClass('kPermCacheUpdater', Array (null, $object->GetDBField('ParentPath')));
 			/* @var $cache_updater kPermCacheUpdater */
 
 			$cache_updater->OneStepRun();
 
 			$is_active = ($object->GetDBField('Status') == STATUS_ACTIVE);
 
 			$next_template = $is_active ? 'suggest_confirm_template' : 'suggest_pending_confirm_template';
 			$event->redirect = $this->Application->GetVar($next_template);
 			$event->SetRedirectParam('opener', 's');
 
 			// send email events
 			$perm_prefix = $this->Application->getUnitOption($event->Prefix, 'PermItemPrefix');
 
 			$event_suffix = $is_active ? 'ADD' : 'ADD.PENDING';
 			$this->Application->EmailEventAdmin($perm_prefix . '.' . $event_suffix);
 			$this->Application->EmailEventUser($perm_prefix . '.' . $event_suffix, $object->GetDBField('CreatedById'));
 		}
 
 		/**
 		 * Returns current per-page setting for list
 		 *
 		 * @param kEvent $event
 		 * @return int
 		 * @access protected
 		 */
 		protected function getPerPage(kEvent $event)
 		{
 			if ( !$this->Application->isAdmin ) {
 				$same_special = $event->getEventParam('same_special');
 				$event->setEventParam('same_special', true);
 
 				$per_page = parent::getPerPage($event);
 
 				$event->setEventParam('same_special', $same_special);
 			}
 
 			return parent::getPerPage($event);
 		}
 
 		/**
 		 * Set's correct page for list based on data provided with event
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 * @see kDBEventHandler::OnListBuild()
 		 */
 		protected function SetPagination(kEvent $event)
 		{
 			parent::SetPagination($event);
 
 			if ( !$this->Application->isAdmin ) {
 				$page_var = $event->getEventParam('page_var');
 
 				if ( $page_var !== false ) {
 					$page = $this->Application->GetVar($page_var);
 
 					if ( is_numeric($page) ) {
 						$object = $event->getObject();
 						/* @var $object kDBList */
 
 						$object->SetPage($page);
 					}
 				}
 			}
 		}
 
 		/**
 		 * Apply same processing to each item being selected in grid
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function iterateItems(kEvent $event)
 		{
 			if ( $event->Name != 'OnMassApprove' && $event->Name != 'OnMassDecline' ) {
 				parent::iterateItems($event);
 			}
 
 			if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
 				$event->status = kEvent::erFAIL;
 				return;
 			}
 
 			$object = $event->getObject(Array ('skip_autoload' => true));
 			/* @var $object CategoriesItem */
 
 			$ids = $this->StoreSelectedIDs($event);
 
 			if ( $ids ) {
 				$propagate_category_status = $this->Application->GetVar('propagate_category_status');
 				$status_field = array_shift( $this->Application->getUnitOption($event->Prefix, 'StatusField') );
 
 				foreach ($ids as $id) {
 					$object->Load($id);
 					$object->SetDBField($status_field, $event->Name == 'OnMassApprove' ? 1 : 0);
 
 					if ( $object->Update() ) {
 						if ( $propagate_category_status ) {
 							$sql = 'UPDATE ' . $object->TableName . '
 									SET ' . $status_field . ' = ' . $object->GetDBField($status_field) . '
 									WHERE TreeLeft BETWEEN ' . $object->GetDBField('TreeLeft') . ' AND ' . $object->GetDBField('TreeRight');
 							$this->Conn->Query($sql);
 						}
 
 						$event->status = kEvent::erSUCCESS;
 
 						$email_event = $event->Name == 'OnMassApprove' ? 'CATEGORY.APPROVE' : 'CATEGORY.DENY';
 						$this->Application->EmailEventUser($email_event, $object->GetDBField('CreatedById'));
 					}
 					else {
 						$event->status = kEvent::erFAIL;
 						$event->redirect = false;
 						break;
 					}
 				}
 			}
 
 			$this->clearSelectedIDs($event);
 			$this->Application->StoreVar('RefreshStructureTree', 1);
 		}
 
 		/**
 		 * Checks, that currently loaded item is allowed for viewing (non permission-based)
 		 *
 		 * @param kEvent $event
 		 * @return bool
 		 * @access protected
 		 */
 		protected function checkItemStatus(kEvent $event)
 		{
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			if ( !$object->isLoaded() ) {
 				return true;
 			}
 
 			if ( $object->GetDBField('Status') != STATUS_ACTIVE && $object->GetDBField('Status') != 4 ) {
 				if ( !$object->GetDBField('DirectLinkEnabled') || !$object->GetDBField('DirectLinkAuthKey') ) {
 					return false;
 				}
 
 				return $this->Application->GetVar('authkey') == $object->GetDBField('DirectLinkAuthKey');
 			}
 
 			return true;
 		}
 
 		/**
 		 * Set's correct sorting for list based on data provided with event
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 * @see kDBEventHandler::OnListBuild()
 		 */
 		protected function SetSorting(kEvent $event)
 		{
 			$types = $event->getEventParam('types');
 			$types = $types ? explode(',', $types) : Array ();
 
 			if ( in_array('search', $types) ) {
 				$event->setPseudoClass('_List');
 
 				$object = $event->getObject();
 				/* @var $object kDBList */
 
 				// 1. no user sorting - sort by relevance
 				$default_sortings = parent::_getDefaultSorting($event);
 				$default_sorting = key($default_sortings['Sorting']) . ',' . current($default_sortings['Sorting']);
 
 				if ( $object->isMainList() ) {
 					$sort_by = $this->Application->GetVar('sort_by', '');
 
 					if ( !$sort_by ) {
 						$this->Application->SetVar('sort_by', 'Relevance,desc|' . $default_sorting);
 					}
 					elseif ( strpos($sort_by, 'Relevance,') !== false ) {
 						$this->Application->SetVar('sort_by', $sort_by . '|' . $default_sorting);
 					}
 				}
 				else {
 					$sorting_settings = $this->getListSetting($event, 'Sortings');
 					$sort_by = trim(getArrayValue($sorting_settings, 'Sort1') . ',' . getArrayValue($sorting_settings, 'Sort1_Dir'), ',');
 
 					if ( !$sort_by ) {
 						$event->setEventParam('sort_by', 'Relevance,desc|' . $default_sorting);
 					}
 					elseif ( strpos($sort_by, 'Relevance,') !== false ) {
 						$event->setEventParam('sort_by', $sort_by . '|' . $default_sorting);
 					}
 				}
 
 				$this->_removeForcedSortings($event);
 			}
 
 			parent::SetSorting($event);
 		}
 
 		/**
 		 * Removes forced sortings
 		 *
 		 * @param kEvent $event
 		 */
 		protected function _removeForcedSortings(kEvent $event)
 		{
 			$list_sortings = $this->Application->getUnitOption($event->Prefix, 'ListSortings', Array ());
 			/* @var $list_sortings Array */
 
 			foreach ($list_sortings as $special => $sortings) {
 				unset($list_sortings[$special]['ForcedSorting']);
 			}
 
 			$this->Application->setUnitOption($event->Prefix, 'ListSortings', $list_sortings);
 		}
 
 		/**
 		 * Default sorting in search results only comes from relevance field
 		 *
 		 * @param kEvent $event
 		 * @return Array
 		 * @access protected
 		 */
 		protected function _getDefaultSorting(kEvent $event)
 		{
 			$types = $event->getEventParam('types');
 			$types = $types ? explode(',', $types) : Array ();
 
 			return in_array('search', $types) ? Array () : parent::_getDefaultSorting($event);
 		}
 
 		// ============= for cms page processing =======================
 
 		/**
 		 * Returns default design template
 		 *
 		 * @return string
 		 */
 		function _getDefaultDesign()
 		{
 			$default_design = trim($this->Application->ConfigValue('cms_DefaultDesign'), '/');
 
 			if (!$default_design) {
 				// theme-based alias for default design
 				return '#default_design#';
 			}
 
 			if (strpos($default_design, '#') === false) {
 				// real template, not alias, so prefix with "/"
 				return '/' . $default_design;
 			}
 
 			// alias
 			return $default_design;
 		}
 
 		/**
 		 * Returns default design based on given virtual template (used from kApplication::Run)
 		 *
 		 * @param string $t
 		 * @return string
 		 * @access public
 		 */
 		public function GetDesignTemplate($t = null)
 		{
 			if ( !isset($t) ) {
 				$t = $this->Application->GetVar('t');
 			}
 
 			$page = $this->Application->recallObject($this->Prefix . '.-virtual', null, Array ('page' => $t));
 			/* @var $page CategoriesItem */
 
 			if ( $page->isLoaded() ) {
 				$real_t = $page->GetDBField('CachedTemplate');
 				$this->Application->SetVar('m_cat_id', $page->GetDBField('CategoryId'));
 
 				if ( $page->GetDBField('FormId') ) {
 					$this->Application->SetVar('form_id', $page->GetDBField('FormId'));
 				}
 			}
 			else {
 				$not_found = $this->Application->ConfigValue('ErrorTemplate');
 				$real_t = $not_found ? $not_found : 'error_notfound';
 
 				$themes_helper = $this->Application->recallObject('ThemesHelper');
 				/* @var $themes_helper kThemesHelper */
 
 				$theme_id = $this->Application->GetVar('m_theme');
 				$category_id = $themes_helper->getPageByTemplate($real_t, $theme_id);
 				$this->Application->SetVar('m_cat_id', $category_id);
 
 				header('HTTP/1.0 404 Not Found');
 			}
 
 			// replace alias in form #alias_name# to actual template used in this theme
 			if ( $this->Application->isAdmin ) {
 				$themes_helper = $this->Application->recallObject('ThemesHelper');
 				/* @var $themes_helper kThemesHelper */
 
 				// only, used when in "Design Mode"
 				$this->Application->SetVar('theme.current_id', $themes_helper->getCurrentThemeId());
 			}
 
 			$theme = $this->Application->recallObject('theme.current');
 			/* @var $theme kDBItem */
 
 			$template = $theme->GetField('TemplateAliases', $real_t);
 
 			if ( $template ) {
 				return $template;
 			}
 
 			return $real_t;
 		}
 
 		/**
 		 * Sets category id based on found template (used from kApplication::Run)
 		 *
 		 * @deprecated
 		 */
 		/*function SetCatByTemplate()
 		{
 			$t = $this->Application->GetVar('t');
 			$page = $this->Application->recallObject($this->Prefix . '.-virtual');
 
 			if ($page->isLoaded()) {
 				$this->Application->SetVar('m_cat_id', $page->GetDBField('CategoryId') );
 			}
 		}*/
 
 		/**
 		 * Prepares template paths
 		 *
 		 * @param kEvent $event
 		 */
 		function _beforeItemChange($event)
 		{
 			$object = $event->getObject();
 			/* @var $object CategoriesItem */
 
 			$object->checkFilename();
 			$object->generateFilename();
 
 			$now = adodb_mktime();
 
 			if ( !$this->Application->isDebugMode() && strpos($event->Special, 'rebuild') === false ) {
 				$object->SetDBField('Type', $object->GetOriginalField('Type'));
 				$object->SetDBField('Protected', $object->GetOriginalField('Protected'));
 
 				if ( $object->GetDBField('Protected') ) {
 					// some fields are read-only for protected pages, when debug mode is off
 					$object->SetDBField('AutomaticFilename', $object->GetOriginalField('AutomaticFilename'));
 					$object->SetDBField('Filename', $object->GetOriginalField('Filename'));
 					$object->SetDBField('Status', $object->GetOriginalField('Status'));
 				}
 			}
 
 			$is_admin = $this->Application->isAdminUser;
 
 			if ( (!$object->IsTempTable() && !$is_admin) || ($is_admin && !$object->GetDBField('CreatedById')) ) {
 				$object->SetDBField('CreatedById', $this->Application->RecallVar('user_id'));
 			}
 
 			if ($object->GetChangedFields()) {
 				$object->SetDBField('Modified_date', $now);
 				$object->SetDBField('Modified_time', $now);
 			}
 
 			$object->setRequired('PageCacheKey', $object->GetDBField('OverridePageCacheKey'));
 			$object->SetDBField('Template', $this->_stripTemplateExtension( $object->GetDBField('Template') ));
 
 			if ($object->GetDBField('Type') == PAGE_TYPE_TEMPLATE) {
 				if (!$this->_templateFound($object->GetDBField('Template'), $object->GetDBField('ThemeId'))) {
 					$object->SetError('Template', 'template_file_missing', 'la_error_TemplateFileMissing');
 				}
 			}
 
 			$this->_saveTitleField($object, 'Title');
 			$this->_saveTitleField($object, 'MenuTitle');
 
 			$root_category = $this->Application->getBaseCategory();
 
 			if ( file_exists(FULL_PATH . '/themes') && ($object->GetDBField('ParentId') == $root_category) && ($object->GetDBField('Template') == CATEGORY_TEMPLATE_INHERIT) ) {
 				// there are themes + creating top level category
 				$object->SetError('Template', 'no_inherit');
 			}
 
 			if ( !$this->Application->isAdminUser && $object->isVirtualField('cust_RssSource') ) {
 				// only administrator can set/change "cust_RssSource" field
 
 				if ($object->GetDBField('cust_RssSource') != $object->GetOriginalField('cust_RssSource')) {
 					$object->SetError('cust_RssSource', 'not_allowed', 'la_error_OperationNotAllowed');
 				}
 			}
 
 			if ( !$object->GetDBField('DirectLinkAuthKey') ) {
 				$key_parts = Array (
 					$object->GetID(),
 					$object->GetDBField('ParentId'),
 					$object->GetField('Name'),
 					'b38'
 				);
 
 				$object->SetDBField('DirectLinkAuthKey', substr( md5( implode(':', $key_parts) ), 0, 20 ));
 			}
 		}
 
 		/**
 		 * Sets page name to requested field in case when:
 		 * 1. page was auto created (through theme file rebuild)
 		 * 2. requested field is empty
 		 *
 		 * @param kDBItem $object
 		 * @param string $field
 		 * @author Alex
 		 */
 		function _saveTitleField(&$object, $field)
 		{
 			$value = $object->GetField($field, 'no_default'); // current value of target field
 
 			$ml_formatter = $this->Application->recallObject('kMultiLanguage');
 			/* @var $ml_formatter kMultiLanguage */
 
 			$src_field = $ml_formatter->LangFieldName('Name');
 			$dst_field = $ml_formatter->LangFieldName($field);
 
 			$dst_field_not_changed = $object->GetOriginalField($dst_field) == $value;
 
 			if ($value == '' || preg_match('/^_Auto: (.*)/', $value) || (($object->GetOriginalField($src_field) == $value) && $dst_field_not_changed)) {
 				// target field is empty OR target field value starts with "_Auto: " OR (source field value
 				// before change was equals to current target field value AND target field value wasn't changed)
 				$object->SetField($dst_field, $object->GetField($src_field));
 			}
 		}
 
 		/**
 		 * Don't allow to delete system pages, when not in debug mode
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnBeforeItemDelete(kEvent $event)
 		{
 			parent::OnBeforeItemDelete($event);
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			if ( $object->GetDBField('Protected') && !$this->Application->isDebugMode(false) ) {
 				$event->status = kEvent::erFAIL;
 			}
 		}
 
 		/**
 		 * Creates category based on given TPL file
 		 *
 		 * @param CategoriesItem $object
 		 * @param string $template
 		 * @param int $theme_id
 		 * @param int $system_mode
 		 * @param array $template_info
 		 * @return bool
 		 */
 		function _prepareAutoPage(&$object, $template, $theme_id = null, $system_mode = SMS_MODE_AUTO, $template_info = Array ())
 		{
 			$template = $this->_stripTemplateExtension($template);
 
 			if ($system_mode == SMS_MODE_AUTO) {
 				$page_type = $this->_templateFound($template, $theme_id) ? PAGE_TYPE_TEMPLATE : PAGE_TYPE_VIRTUAL;
 			}
 			else {
 				$page_type = $system_mode == SMS_MODE_FORCE ? PAGE_TYPE_TEMPLATE : PAGE_TYPE_VIRTUAL;
 			}
 
 			if (($page_type == PAGE_TYPE_TEMPLATE) && ($template_info === false)) {
 				// do not auto-create system pages, when browsing through site
 				return false;
 			}
 
 			if (!isset($theme_id)) {
 				$theme_id = $this->_getCurrentThemeId();
 			}
 
 			$root_category = $this->Application->getBaseCategory();
 			$page_category = $this->Application->GetVar('m_cat_id');
 			if (!$page_category) {
 				$page_category = $root_category;
 				$this->Application->SetVar('m_cat_id', $page_category);
 			}
 
 			if (($page_type == PAGE_TYPE_VIRTUAL) && (strpos($template, '/') !== false)) {
 				// virtual page, but have "/" in template path -> create it's path
 				$category_path = explode('/', $template);
 				$template = array_pop($category_path);
 
 				$page_category = $this->_getParentCategoryFromPath($category_path, $root_category, $theme_id);
 			}
 
 			$page_name = ($page_type == PAGE_TYPE_TEMPLATE) ? '_Auto: ' . $template : $template;
 			$page_description = '';
 
 			if ($page_type == PAGE_TYPE_TEMPLATE) {
 				$design_template = strtolower($template); // leading "/" not added !
 				if ($template_info) {
 					if (array_key_exists('name', $template_info) && $template_info['name']) {
 						$page_name = $template_info['name'];
 					}
 
 					if (array_key_exists('desc', $template_info) && $template_info['desc']) {
 						$page_description = $template_info['desc'];
 					}
 
 					if (array_key_exists('section', $template_info) && $template_info['section']) {
 						// this will override any global "m_cat_id"
 						$page_category = $this->_getParentCategoryFromPath(explode('||', $template_info['section']), $root_category, $theme_id);
 					}
 				}
 			}
 			else {
 				$design_template = $this->_getDefaultDesign(); // leading "/" added !
 			}
 
 			$object->Clear();
 			$object->SetDBField('ParentId', $page_category);
 			$object->SetDBField('Type', $page_type);
 			$object->SetDBField('Protected', 1); // $page_type == PAGE_TYPE_TEMPLATE
 
 			$object->SetDBField('IsMenu', 0);
 			$object->SetDBField('ThemeId', $theme_id);
 
 			// put all templates to then end of list (in their category)
 			$min_priority = $this->_getNextPriority($page_category, $object->TableName);
 			$object->SetDBField('Priority', $min_priority);
 
 			$object->SetDBField('Template', $design_template);
 			$object->SetDBField('CachedTemplate', $design_template);
 
 			$primary_language = $this->Application->GetDefaultLanguageId();
 			$current_language = $this->Application->GetVar('m_lang');
 			$object->SetDBField('l' . $primary_language . '_Name', $page_name);
 			$object->SetDBField('l' . $current_language . '_Name', $page_name);
 			$object->SetDBField('l' . $primary_language . '_Description', $page_description);
 			$object->SetDBField('l' . $current_language . '_Description', $page_description);
 
 			return $object->Create();
 		}
 
 		function _getParentCategoryFromPath($category_path, $base_category, $theme_id = null)
 		{
 			static $category_ids = Array ();
 
 			if (!$category_path) {
 				return $base_category;
 			}
 
 			if (array_key_exists(implode('||', $category_path), $category_ids)) {
 				return $category_ids[ implode('||', $category_path) ];
 			}
 
 			$backup_category_id = $this->Application->GetVar('m_cat_id');
 
 			$object = $this->Application->recallObject($this->Prefix . '.rebuild-path', null, Array ('skip_autoload' => true));
 			/* @var $object CategoriesItem */
 
 			$parent_id = $base_category;
 
 			$filenames_helper = $this->Application->recallObject('FilenamesHelper');
 			/* @var $filenames_helper kFilenamesHelper */
 
 			$safe_category_path = array_map(Array (&$filenames_helper, 'replaceSequences'), $category_path);
 
 			foreach ($category_path as $category_order => $category_name) {
 				$this->Application->SetVar('m_cat_id', $parent_id);
 
 				// get virtual category first, when possible
 				$sql = 'SELECT ' . $object->IDField . '
 						FROM ' . $object->TableName . '
 						WHERE
 							(
 								Filename = ' . $this->Conn->qstr($safe_category_path[$category_order]) . ' OR
 								Filename = ' . $this->Conn->qstr( $filenames_helper->replaceSequences('_Auto: ' . $category_name) ) . '
 							) AND
 							(ParentId = ' . $parent_id . ') AND
 							(ThemeId = 0 OR ThemeId = ' . $theme_id . ')
 						ORDER BY ThemeId ASC';
 				$parent_id = $this->Conn->GetOne($sql);
 
 				if ($parent_id === false) {
 					// page not found
 					$template = implode('/', array_slice($safe_category_path, 0, $category_order + 1));
 
 					// don't process system templates in sub-categories
 					$system = $this->_templateFound($template, $theme_id) && (strpos($template, '/') === false);
 
 					if (!$this->_prepareAutoPage($object, $category_name, $theme_id, $system ? SMS_MODE_FORCE : false)) {
 						// page was not created
 						break;
 					}
 
 					$parent_id = $object->GetID();
 				}
 			}
 
 			$this->Application->SetVar('m_cat_id', $backup_category_id);
 			$category_ids[ implode('||', $category_path) ] = $parent_id;
 
 			return $parent_id;
 		}
 
 		/**
 		 * Returns theme name by it's id. Used in structure page creation.
 		 *
 		 * @param int $theme_id
 		 * @return string
 		 */
 		function _getThemeName($theme_id)
 		{
 			static $themes = null;
 
 			if (!isset($themes)) {
 				$id_field = $this->Application->getUnitOption('theme', 'IDField');
 				$table_name = $this->Application->getUnitOption('theme', 'TableName');
 
 				$sql = 'SELECT Name, ' . $id_field . '
 						FROM ' . $table_name . '
 						WHERE Enabled = 1';
 				$themes = $this->Conn->GetCol($sql, $id_field);
 			}
 
 			return array_key_exists($theme_id, $themes) ? $themes[$theme_id] : false;
 		}
 
 		/**
 		 * Resets SMS-menu cache
 		 *
 		 * @param kEvent $event
 		 */
 		function OnResetCMSMenuCache($event)
 		{
 			if ($this->Application->GetVar('ajax') == 'yes') {
 				$event->status = kEvent::erSTOP;
 			}
 
 			$this->_resetMenuCache();
 			$event->SetRedirectParam('action_completed', 1);
 		}
 
 		/**
 		 * Performs reset of category-related caches (menu, structure dropdown, template mapping)
 		 *
 		 * @return void
 		 * @access protected
 		 */
 		protected function _resetMenuCache()
 		{
 			// reset cms menu cache (all variables are automatically rebuild, when missing)
 			if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) {
 				$this->Application->rebuildCache('master:cms_menu', kCache::REBUILD_LATER, CacheSettings::$cmsMenuRebuildTime);
 				$this->Application->rebuildCache('master:StructureTree', kCache::REBUILD_LATER, CacheSettings::$structureTreeRebuildTime);
 				$this->Application->rebuildCache('master:template_mapping', kCache::REBUILD_LATER, CacheSettings::$templateMappingRebuildTime);
 			}
 			else {
 				$this->Application->rebuildDBCache('cms_menu', kCache::REBUILD_LATER, CacheSettings::$cmsMenuRebuildTime);
 				$this->Application->rebuildDBCache('StructureTree', kCache::REBUILD_LATER, CacheSettings::$structureTreeRebuildTime);
 				$this->Application->rebuildDBCache('template_mapping', kCache::REBUILD_LATER, CacheSettings::$templateMappingRebuildTime);
 			}
 		}
 
 		/**
 		 * Updates structure config
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnAfterConfigRead(kEvent $event)
 		{
 			parent::OnAfterConfigRead($event);
 
 			if (defined('IS_INSTALL') && IS_INSTALL) {
 				// skip any processing, because Categories table doesn't exists until install is finished
 				return ;
 			}
 
 			$site_config_helper = $this->Application->recallObject('SiteConfigHelper');
 			/* @var $site_config_helper SiteConfigHelper */
 
 			$settings = $site_config_helper->getSettings();
 
 			$root_category = $this->Application->getBaseCategory();
 
 			// set root category
 			$section_adjustments = $this->Application->getUnitOption($event->Prefix, 'SectionAdjustments');
 
 			$section_adjustments['in-portal:browse'] = Array (
 				'url' => Array ('m_cat_id' => $root_category),
 				'late_load' => Array ('m_cat_id' => $root_category),
 				'onclick' => 'checkCatalog(' . $root_category . ')',
 			);
 
 			$section_adjustments['in-portal:browse_site'] = Array (
 				'url' => Array ('editing_mode' => $settings['default_editing_mode']),
 			);
 
 			$this->Application->setUnitOption($event->Prefix, 'SectionAdjustments', $section_adjustments);
 
 			// prepare structure dropdown
 			$category_helper = $this->Application->recallObject('CategoryHelper');
 			/* @var $category_helper CategoryHelper */
 
 			$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
 
 			$fields['ParentId']['default'] = (int)$this->Application->GetVar('m_cat_id');
 			$fields['ParentId']['options'] = $category_helper->getStructureTreeAsOptions();
 
 			// limit design list by theme
 			$theme_id = $this->_getCurrentThemeId();
 			$design_sql = $fields['Template']['options_sql'];
 			$design_sql = str_replace('(tf.FilePath = "/designs")', '(' . implode(' OR ', $this->getDesignFolders()) . ')' . ' AND (t.ThemeId = ' . $theme_id . ')', $design_sql);
 			$fields['Template']['options_sql'] = $design_sql;
 
 			// adds "Inherit From Parent" option to "Template" field
 			$fields['Template']['options'] = Array (CATEGORY_TEMPLATE_INHERIT => $this->Application->Phrase('la_opt_InheritFromParent'));
 
 			$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
 
 			if ($this->Application->isAdmin) {
 				// don't sort by Front-End sorting fields
 				$config_mapping = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping');
 				$remove_keys = Array ('DefaultSorting1Field', 'DefaultSorting2Field', 'DefaultSorting1Dir', 'DefaultSorting2Dir');
 				foreach ($remove_keys as $remove_key) {
 					unset($config_mapping[$remove_key]);
 				}
 				$this->Application->setUnitOption($event->Prefix, 'ConfigMapping', $config_mapping);
 			}
 			else {
 				// sort by parent path on Front-End only
 				$list_sortings = $this->Application->getUnitOption($event->Prefix, 'ListSortings', Array ());
 				$list_sortings['']['ForcedSorting'] = Array ("CurrentSort" => 'asc');
 				$this->Application->setUnitOption($event->Prefix, 'ListSortings', $list_sortings);
 			}
 
 			// add grids for advanced view (with primary category column)
 			$grids = $this->Application->getUnitOption($this->Prefix, 'Grids');
 			$process_grids = Array ('Default', 'Radio');
 			foreach ($process_grids as $process_grid) {
 				$grid_data = $grids[$process_grid];
 				$grid_data['Fields']['CachedNavbar'] = Array ('title' => 'la_col_Path', 'data_block' => 'grid_parent_category_td', 'filter_block' => 'grid_like_filter');
 				$grids[$process_grid . 'ShowAll'] = $grid_data;
 			}
 			$this->Application->setUnitOption($this->Prefix, 'Grids', $grids);
 		}
 
 		/**
 		 * Returns folders, that can contain design templates
 		 *
 		 * @return array
 		 * @access protected
 		 */
 		protected function getDesignFolders()
 		{
 			$ret = Array ('tf.FilePath = "/designs"', 'tf.FilePath = "/platform/designs"');
 
 			foreach ($this->Application->ModuleInfo as $module_info) {
 				$ret[] = 'tf.FilePath = "/' . $module_info['TemplatePath'] . 'designs"';
 			}
 
 			return array_unique($ret);
 		}
 
 		/**
 		 * Removes this item and it's children (recursive) from structure dropdown
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnAfterItemLoad(kEvent $event)
 		{
 			parent::OnAfterItemLoad($event);
 
 			if ( !$this->Application->isAdmin ) {
 				// calculate priorities dropdown only for admin
 				return;
 			}
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			// remove this category & it's children from dropdown
 			$sql = 'SELECT ' . $object->IDField . '
 					FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
 					WHERE ParentPath LIKE "' . $object->GetDBField('ParentPath') . '%"';
 			$remove_categories = $this->Conn->GetCol($sql);
 
 			$options = $object->GetFieldOption('ParentId', 'options');
 			foreach ($remove_categories as $remove_category) {
 				unset($options[$remove_category]);
 			}
 			$object->SetFieldOption('ParentId', 'options', $options);
 		}
 
 		/**
 		 * Occurs after creating item
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnAfterItemCreate(kEvent $event)
 		{
 			parent::OnAfterItemCreate($event);
 
 			$object = $event->getObject();
 			/* @var $object CategoriesItem */
 
 			// need to update path after category is created, so category is included in that path
 			$fields_hash = $object->buildParentBasedFields();
 			$this->Conn->doUpdate($fields_hash, $object->TableName, $object->IDField . ' = ' . $object->GetID());
 			$object->SetDBFieldsFromHash($fields_hash);
 		}
 
 		/**
 		 * Enter description here...
 		 *
 		 * @param kEvent $event
 		 */
 		function OnAfterRebuildThemes($event)
 		{
 			$sql = 'SELECT t.ThemeId, CONCAT( tf.FilePath, \'/\', tf.FileName ) AS Path, tf.FileMetaInfo
 					FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
 					LEFT JOIN ' . TABLE_PREFIX . 'Themes AS t ON t.ThemeId = tf.ThemeId
 					WHERE t.Enabled = 1 AND tf.FileType = 1
 					AND (
 						SELECT COUNT(CategoryId)
 						FROM ' . TABLE_PREFIX . 'Categories c
 						WHERE CONCAT(\'/\', c.Template, \'.tpl\') = CONCAT( tf.FilePath, \'/\', tf.FileName ) AND (c.ThemeId = t.ThemeId)
 					) = 0 ';
 			$files = $this->Conn->Query($sql, 'Path');
 			if ( !$files ) {
 				// all possible pages are already created
 				return;
 			}
 
 			set_time_limit(0);
 			ini_set('memory_limit', -1);
 
 			$dummy = $this->Application->recallObject($event->Prefix . '.rebuild', NULL, Array ('skip_autoload' => true));
 			/* @var $dummy CategoriesItem */
 
 			$error_count = 0;
 			foreach ($files as $a_file => $file_info) {
 				$status = $this->_prepareAutoPage($dummy, $a_file, $file_info['ThemeId'], SMS_MODE_FORCE, unserialize($file_info['FileMetaInfo'])); // create system page
 				if ( !$status ) {
 					$error_count++;
 				}
 			}
 
 			if ( $this->Application->ConfigValue('CategoryPermissionRebuildMode') == CategoryPermissionRebuild::SILENT ) {
 				$updater = $this->Application->makeClass('kPermCacheUpdater');
 				/* @var $updater kPermCacheUpdater */
 
 				$updater->OneStepRun();
 			}
 
 			$this->_resetMenuCache();
 
 			if ( $error_count ) {
 				// allow user to review error after structure page creation
 				$event->MasterEvent->redirect = false;
 			}
 		}
 
 		/**
 		 * Processes OnMassMoveUp, OnMassMoveDown events
 		 *
 		 * @param kEvent $event
 		 */
 		function OnChangePriority($event)
 		{
 			$this->Application->SetVar('priority_prefix', $event->getPrefixSpecial());
 			$event->CallSubEvent('priority:' . $event->Name);
 
 			$this->Application->StoreVar('RefreshStructureTree', 1);
 			$this->_resetMenuCache();
 		}
 
 		/**
 		 * Completely recalculates priorities in current category
 		 *
 		 * @param kEvent $event
 		 */
 		function OnRecalculatePriorities($event)
 		{
 			if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
 				$event->status = kEvent::erFAIL;
 				return;
 			}
 
 			$this->Application->SetVar('priority_prefix', $event->getPrefixSpecial());
 			$event->CallSubEvent('priority:' . $event->Name);
 
 			$this->_resetMenuCache();
 		}
 
 		/**
 		 * Update Preview Block for FCKEditor
 		 *
 		 * @param kEvent $event
 		 */
 		function OnUpdatePreviewBlock($event)
 		{
 			$event->status = kEvent::erSTOP;
 			$string = htmlspecialchars_decode($this->Application->GetVar('preview_content'));
 
 			$category_helper = $this->Application->recallObject('CategoryHelper');
 			/* @var $category_helper CategoryHelper */
 
 			$string = $category_helper->replacePageIds($string);
 
 			$this->Application->StoreVar('_editor_preview_content_', $string);
 		}
 
 		/**
 		 * Makes simple search for categories
 		 * based on keywords string
 		 *
 		 * @param kEvent $event
 		 */
 		function OnSimpleSearch($event)
 		{
 			$event->redirect = false;
 			$search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
 
 			$keywords = htmlspecialchars_decode( trim($this->Application->GetVar('keywords')) );
 
 			$query_object = $this->Application->recallObject('HTTPQuery');
 			/* @var $query_object kHTTPQuery */
 
 			$sql = 'SHOW TABLES LIKE "'.$search_table.'"';
 
 			if ( !isset($query_object->Get['keywords']) && !isset($query_object->Post['keywords']) && $this->Conn->Query($sql) ) {
 				// used when navigating by pages or changing sorting in search results
 				return;
 			}
 
 			if(!$keywords || strlen($keywords) < $this->Application->ConfigValue('Search_MinKeyword_Length'))
 			{
 				$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table);
 				$this->Application->SetVar('keywords_too_short', 1);
 				return; // if no or too short keyword entered, doing nothing
 			}
 
 			$this->Application->StoreVar('keywords', $keywords);
 
 			$this->saveToSearchLog($keywords, 0); // 0 - simple search, 1 - advanced search
 
 			$keywords = strtr($keywords, Array('%' => '\\%', '_' => '\\_'));
 
 			$event->setPseudoClass('_List');
 
 			$object = $event->getObject();
 			/* @var $object kDBList */
 
 			$this->Application->SetVar($event->getPrefixSpecial().'_Page', 1);
 			$lang = $this->Application->GetVar('m_lang');
 			$items_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
 			$module_name = 'In-Portal';
 
 			$sql = 'SELECT *
 					FROM ' . $this->Application->getUnitOption('confs', 'TableName') . '
 					WHERE ModuleName = ' . $this->Conn->qstr($module_name) . ' AND SimpleSearch = 1';
 			$search_config = $this->Conn->Query($sql, 'FieldName');
 
 			$field_list = array_keys($search_config);
 
 			$join_clauses = Array();
 
 			// field processing
 			$weight_sum = 0;
 
 			$alias_counter = 0;
 
 			$custom_fields = $this->Application->getUnitOption($event->Prefix, 'CustomFields');
 			if ($custom_fields) {
 				$custom_table = $this->Application->getUnitOption($event->Prefix.'-cdata', 'TableName');
 				$join_clauses[] = '	LEFT JOIN '.$custom_table.' custom_data ON '.$items_table.'.ResourceId = custom_data.ResourceId';
 			}
 
 			// what field in search config becomes what field in sql (key - new field, value - old field (from searchconfig table))
 			$search_config_map = Array();
 
 			foreach ($field_list as $key => $field) {
 				$local_table = TABLE_PREFIX.$search_config[$field]['TableName'];
 				$weight_sum += $search_config[$field]['Priority']; // counting weight sum; used when making relevance clause
 
 				// processing multilingual fields
 				if ( !$search_config[$field]['CustomFieldId'] && $object->GetFieldOption($field, 'formatter') == 'kMultiLanguage' ) {
 					$field_list[$key.'_primary'] = 'l'.$this->Application->GetDefaultLanguageId().'_'.$field;
 					$field_list[$key] = 'l'.$lang.'_'.$field;
 
 					if (!isset($search_config[$field]['ForeignField'])) {
 						$field_list[$key.'_primary'] = $local_table.'.'.$field_list[$key.'_primary'];
 						$search_config_map[ $field_list[$key.'_primary'] ] = $field;
 					}
 				}
 
 				// processing fields from other tables
 				$foreign_field = $search_config[$field]['ForeignField'];
 
 				if ( $foreign_field ) {
 					$exploded = explode(':', $foreign_field, 2);
 					if ($exploded[0] == 'CALC') {
 						// ignoring having type clauses in simple search
 						unset($field_list[$key]);
 						continue;
 					}
 					else {
 						$multi_lingual = false;
 						if ($exploded[0] == 'MULTI') {
 							$multi_lingual = true;
 							$foreign_field = $exploded[1];
 						}
 
 						$exploded = explode('.', $foreign_field);	// format: table.field_name
 						$foreign_table = TABLE_PREFIX.$exploded[0];
 
 						$alias_counter++;
 						$alias = 't'.$alias_counter;
 
 						if ($multi_lingual) {
 							$field_list[$key] = $alias.'.'.'l'.$lang.'_'.$exploded[1];
 							$field_list[$key.'_primary'] = 'l'.$this->Application->GetDefaultLanguageId().'_'.$field;
 							$search_config_map[ $field_list[$key] ] = $field;
 							$search_config_map[ $field_list[$key.'_primary'] ] = $field;
 						}
 						else {
 							$field_list[$key] = $alias.'.'.$exploded[1];
 							$search_config_map[ $field_list[$key] ] = $field;
 						}
 
 						$join_clause = str_replace('{ForeignTable}', $alias, $search_config[$field]['JoinClause']);
 						$join_clause = str_replace('{LocalTable}', $items_table, $join_clause);
 
 						$join_clauses[] = '	LEFT JOIN '.$foreign_table.' '.$alias.'
 											ON '.$join_clause;
 					}
 				}
 				else {
 					// processing fields from local table
 					if ($search_config[$field]['CustomFieldId']) {
 						$local_table = 'custom_data';
 
 						// search by custom field value on current language
 						$custom_field_id = array_search($field_list[$key], $custom_fields);
 						$field_list[$key] = 'l'.$lang.'_cust_'.$custom_field_id;
 
 						// search by custom field value on primary language
 						$field_list[$key.'_primary'] = $local_table.'.l'.$this->Application->GetDefaultLanguageId().'_cust_'.$custom_field_id;
 						$search_config_map[ $field_list[$key.'_primary'] ] = $field;
 					}
 
 					$field_list[$key] = $local_table.'.'.$field_list[$key];
 					$search_config_map[ $field_list[$key] ] = $field;
 				}
 			}
 
 			// keyword string processing
 			$search_helper = $this->Application->recallObject('SearchHelper');
 			/* @var $search_helper kSearchHelper */
 
 			$where_clause = Array ();
 			foreach ($field_list as $field) {
 				if (preg_match('/^' . preg_quote($items_table, '/') . '\.(.*)/', $field, $regs)) {
 					// local real field
 					$filter_data = $search_helper->getSearchClause($object, $regs[1], $keywords, false);
 					if ($filter_data) {
 						$where_clause[] = $filter_data['value'];
 					}
 				}
 				elseif (preg_match('/^custom_data\.(.*)/', $field, $regs)) {
 					$custom_field_name = 'cust_' . $search_config_map[$field];
 					$filter_data = $search_helper->getSearchClause($object, $custom_field_name, $keywords, false);
 					if ($filter_data) {
 						$where_clause[] = str_replace('`' . $custom_field_name . '`', $field, $filter_data['value']);
 					}
 				}
 				else {
 					$where_clause[] = $search_helper->buildWhereClause($keywords, Array ($field));
 				}
 			}
 
 			$where_clause = '((' . implode(') OR (', $where_clause) . '))'; // 2 braces for next clauses, see below!
 
 			$where_clause = $where_clause . ' AND (' . $items_table . '.Status = ' . STATUS_ACTIVE . ')';
 
 			if ($event->MasterEvent && $event->MasterEvent->Name == 'OnListBuild') {
 				$sub_search_ids = $event->MasterEvent->getEventParam('ResultIds');
 
 				if ( $sub_search_ids !== false ) {
 					if ( $sub_search_ids ) {
 						$where_clause .= 'AND (' . $items_table . '.ResourceId IN (' . implode(',', $sub_search_ids) . '))';
 					}
 					else {
 						$where_clause .= 'AND FALSE';
 					}
 				}
 			}
 
 			// exclude template based sections from search results (ie. registration)
 			if ( $this->Application->ConfigValue('ExcludeTemplateSectionsFromSearch') ) {
 				$where_clause .= ' AND ' . $items_table . '.ThemeId = 0';
 			}
 
 			// making relevance clause
 			$positive_words = $search_helper->getPositiveKeywords($keywords);
 			$this->Application->StoreVar('highlight_keywords', serialize($positive_words));
 			$revelance_parts = Array();
 			reset($search_config);
 
 			foreach ($positive_words as $keyword_index => $positive_word) {
 				$positive_word = $search_helper->transformWildcards($positive_word);
 				$positive_words[$keyword_index] = $this->Conn->escape($positive_word);
 			}
 
 			foreach ($field_list as $field) {
 
 				if (!array_key_exists($field, $search_config_map)) {
 					$map_key = $search_config_map[$items_table . '.' . $field];
 				}
 				else {
 					$map_key = $search_config_map[$field];
 				}
 
 				$config_elem = $search_config[ $map_key ];
 				$weight = $config_elem['Priority'];
 
 				// search by whole words only ([[:<:]] - word boundary)
 				/*$revelance_parts[] = 'IF('.$field.' REGEXP "[[:<:]]('.implode(' ', $positive_words).')[[:>:]]", '.$weight.', 0)';
 				foreach ($positive_words as $keyword) {
 					$revelance_parts[] = 'IF('.$field.' REGEXP "[[:<:]]('.$keyword.')[[:>:]]", '.$weight.', 0)';
 				}*/
 
 				// search by partial word matches too
 				$revelance_parts[] = 'IF('.$field.' LIKE "%'.implode(' ', $positive_words).'%", '.$weight_sum.', 0)';
 				foreach ($positive_words as $keyword) {
 					$revelance_parts[] = 'IF('.$field.' LIKE "%'.$keyword.'%", '.$weight.', 0)';
 				}
 			}
 
 			$revelance_parts = array_unique($revelance_parts);
 
 			$conf_postfix = $this->Application->getUnitOption($event->Prefix, 'SearchConfigPostfix');
 			$rel_keywords	= $this->Application->ConfigValue('SearchRel_Keyword_'.$conf_postfix)	/ 100;
 			$rel_pop		= $this->Application->ConfigValue('SearchRel_Pop_'.$conf_postfix)		/ 100;
 			$rel_rating		= $this->Application->ConfigValue('SearchRel_Rating_'.$conf_postfix)	/ 100;
 			$relevance_clause = '('.implode(' + ', $revelance_parts).') / '.$weight_sum.' * '.$rel_keywords;
 			if ($rel_pop && $object->isField('Hits')) {
 				$relevance_clause .= ' + (Hits + 1) / (MAX(Hits) + 1) * '.$rel_pop;
 			}
 			if ($rel_rating && $object->isField('CachedRating')) {
 				$relevance_clause .= ' + (CachedRating + 1) / (MAX(CachedRating) + 1) * '.$rel_rating;
 			}
 
 			// building final search query
 			if (!$this->Application->GetVar('do_not_drop_search_table')) {
 				$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table); // erase old search table if clean k4 event
 				$this->Application->SetVar('do_not_drop_search_table', true);
 			}
 
 			$search_table_exists = $this->Conn->Query('SHOW TABLES LIKE "'.$search_table.'"');
 			if ($search_table_exists) {
 				$select_intro = 'INSERT INTO '.$search_table.' (Relevance, ItemId, ResourceId, ItemType, EdPick) ';
 			}
 			else {
 				$select_intro = 'CREATE TABLE '.$search_table.' AS ';
 			}
 
 			$edpick_clause = $this->Application->getUnitOption($event->Prefix.'.EditorsPick', 'Fields') ? $items_table.'.EditorsPick' : '0';
 
 			$sql = $select_intro.' SELECT '.$relevance_clause.' AS Relevance,
 								'.$items_table.'.'.$this->Application->getUnitOption($event->Prefix, 'IDField').' AS ItemId,
 								'.$items_table.'.ResourceId,
 								'.$this->Application->getUnitOption($event->Prefix, 'ItemType').' AS ItemType,
 								 '.$edpick_clause.' AS EdPick
 						FROM '.$object->TableName.'
 						'.implode(' ', $join_clauses).'
 						WHERE '.$where_clause.'
 						GROUP BY '.$items_table.'.'.$this->Application->getUnitOption($event->Prefix, 'IDField').' ORDER BY Relevance DESC';
 
 			$this->Conn->Query($sql);
 
 			if ( !$search_table_exists ) {
 				$sql = 'ALTER TABLE ' . $search_table . '
 						ADD INDEX (ResourceId),
 						ADD INDEX (Relevance)';
 				$this->Conn->Query($sql);
 			}
 		}
 
 		/**
 		 * Enter description here...
 		 *
 		 * @param kEvent $event
 		 */
 		function OnSubSearch($event)
 		{
 			// keep search results from other items after doing a sub-search on current item type
 			$this->Application->SetVar('do_not_drop_search_table', true);
 
 			$ids = Array ();
 			$search_table = TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search';
 			$sql = 'SHOW TABLES LIKE "' . $search_table . '"';
 
 			if ( $this->Conn->Query($sql) ) {
 				$item_type = $this->Application->getUnitOption($event->Prefix, 'ItemType');
 
 				// 1. get ids to be used as search bounds
 				$sql = 'SELECT DISTINCT ResourceId
 						FROM ' . $search_table . '
 						WHERE ItemType = ' . $item_type;
 				$ids = $this->Conn->GetCol($sql);
 
 				// 2. delete previously found ids
 				$sql = 'DELETE FROM ' . $search_table . '
 						WHERE ItemType = ' . $item_type;
 				$this->Conn->Query($sql);
 			}
 
 			$event->setEventParam('ResultIds', $ids);
 			$event->CallSubEvent('OnSimpleSearch');
 		}
 
 		/**
 		 * Make record to search log
 		 *
 		 * @param string $keywords
 		 * @param int $search_type 0 - simple search, 1 - advanced search
 		 */
 		function saveToSearchLog($keywords, $search_type = 0)
 		{
 			// don't save keywords for each module separately, just one time
 			// static variable can't help here, because each module uses it's own class instance !
 			if (!$this->Application->GetVar('search_logged')) {
 				$sql = 'UPDATE '.TABLE_PREFIX.'SearchLogs
 						SET Indices = Indices + 1
 						WHERE Keyword = '.$this->Conn->qstr($keywords).' AND SearchType = '.$search_type; // 0 - simple search, 1 - advanced search
 		        $this->Conn->Query($sql);
 		        if ($this->Conn->getAffectedRows() == 0) {
 		            $fields_hash = Array('Keyword' => $keywords, 'Indices' => 1, 'SearchType' => $search_type);
 		        	$this->Conn->doInsert($fields_hash, TABLE_PREFIX.'SearchLogs');
 		        }
 
 		        $this->Application->SetVar('search_logged', 1);
 			}
 		}
 
 		/**
 		 * Load item if id is available
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function LoadItem(kEvent $event)
 		{
 			if ( $event->Special != '-virtual' ) {
 				parent::LoadItem($event);
 				return;
 			}
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			$id = $this->getPassedID($event);
 
 			if ( $object->isLoaded() && !is_array($id) && ($object->GetID() == $id) ) {
 				// object is already loaded by same id
 				return;
 			}
 
 			if ( $object->Load($id, null, true) ) {
 				$actions = $this->Application->recallObject('kActions');
 				/* @var $actions Params */
 
 				$actions->Set($event->getPrefixSpecial() . '_id', $object->GetID());
 			}
 			else {
 				$object->setID($id);
 			}
 		}
 
 		/**
 		 * Returns constrain for priority calculations
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @see PriorityEventHandler
 		 * @access protected
 		 */
 		protected function OnGetConstrainInfo(kEvent $event)
 		{
 			$constrain = ''; // for OnSave
 
 			$event_name = $event->getEventParam('original_event');
 			$actual_event_name = $event->getEventParam('actual_event');
 
 			if ( $actual_event_name == 'OnSavePriorityChanges' || $event_name == 'OnAfterItemLoad' || $event_name == 'OnAfterItemDelete' ) {
 				$object = $event->getObject();
 				/* @var $object kDBItem */
 
 				$constrain = 'ParentId = ' . $object->GetDBField('ParentId');
 			}
 			elseif ( $actual_event_name == 'OnPreparePriorities' ) {
 				$constrain = 'ParentId = ' . $this->Application->GetVar('m_cat_id');
 			}
 			elseif ( $event_name == 'OnSave' ) {
 				$constrain = '';
 			}
 			else {
 				$constrain = 'ParentId = ' . $this->Application->GetVar('m_cat_id');
 			}
 
 			$event->setEventParam('constrain_info', Array ($constrain, ''));
 		}
 
 		/**
 		 * Parses category part of url, build main part of url
 		 *
 		 * @param int $rewrite_mode Mode in what rewrite listener was called. Possbile two modes: REWRITE_MODE_BUILD, REWRITE_MODE_PARSE.
 		 * @param string $prefix Prefix, that listener uses for system integration
 		 * @param Array $params Params, that are used for url building or created during url parsing.
 		 * @param Array $url_parts Url parts to parse (only for parsing).
 		 * @param bool $keep_events Keep event names in resulting url (only for building).
 		 * @return bool|string|Array Return true to continue to next listener; return false (when building) not to rewrite given prefix; return false (when parsing) to stop processing at this listener.
 		 */
 		public function CategoryRewriteListener($rewrite_mode = REWRITE_MODE_BUILD, $prefix, &$params, &$url_parts, $keep_events = false)
 		{
 			if ($rewrite_mode == REWRITE_MODE_BUILD) {
 				return $this->_buildMainUrl($prefix, $params, $keep_events);
 			}
 
 			if ( $this->_parseFriendlyUrl($url_parts, $params) ) {
 				// friendly urls work like exact match only!
 				return false;
 			}
 
 			$this->_parseCategory($url_parts, $params);
 
 			return true;
 		}
 
 		/**
 		 * Build main part of every url
 		 *
 		 * @param string $prefix_special
 		 * @param Array $params
 		 * @param bool $keep_events
 		 * @return string
 		 */
 		protected function _buildMainUrl($prefix_special, &$params, $keep_events)
 		{
 			$ret = '';
 			list ($prefix) = explode('.', $prefix_special);
 
 			$rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
 			/* @var $rewrite_processor kRewriteUrlProcessor */
 
 			$processed_params = $rewrite_processor->getProcessedParams($prefix_special, $params, $keep_events);
 			if ($processed_params === false) {
 				return '';
 			}
 
 			// add language
 			if ($processed_params['m_lang'] && ($processed_params['m_lang'] != $rewrite_processor->primaryLanguageId)) {
 				$language_name = $this->Application->getCache('language_names[%LangIDSerial:' . $processed_params['m_lang'] . '%]');
 				if ($language_name === false) {
 					$sql = 'SELECT PackName
 							FROM ' . TABLE_PREFIX . 'Languages
 							WHERE LanguageId = ' . $processed_params['m_lang'];
 					$language_name = $this->Conn->GetOne($sql);
 
 					$this->Application->setCache('language_names[%LangIDSerial:' . $processed_params['m_lang'] . '%]', $language_name);
 				}
 
 				$ret .= $language_name . '/';
 			}
 
 			// add theme
 			if ($processed_params['m_theme'] && ($processed_params['m_theme'] != $rewrite_processor->primaryThemeId)) {
 				$theme_name = $this->Application->getCache('theme_names[%ThemeIDSerial:' . $processed_params['m_theme'] . '%]');
 				if ($theme_name === false) {
 					$sql = 'SELECT Name
 							FROM ' . TABLE_PREFIX . 'Themes
 							WHERE ThemeId = ' . $processed_params['m_theme'];
 					$theme_name = $this->Conn->GetOne($sql);
 
 					$this->Application->setCache('theme_names[%ThemeIDSerial:' . $processed_params['m_theme'] . '%]', $theme_name);
 
 				}
 
 				$ret .= $theme_name . '/';
 			}
 
 			// inject custom url parts made by other rewrite listeners just after language/theme url parts
 			if ($params['inject_parts']) {
 				$ret .= implode('/', $params['inject_parts']) . '/';
 			}
 
 			// add category
 			if ($processed_params['m_cat_id'] > 0 && $params['pass_category']) {
 				$category_filename = $this->Application->getCategoryCache($processed_params['m_cat_id'], 'filenames');
 
 				preg_match('/^Content\/(.*)/i', $category_filename, $regs);
 
 				if ($regs) {
 					$template = array_key_exists('t', $params) ? $params['t'] : false;
 
 					if (strtolower($regs[1]) == strtolower($template)) {
 						// we could have category path like "Content/<template_path>" in this case remove template
 						$params['pass_template'] = false;
 					}
 
 					$ret .= $regs[1] . '/';
 				}
 
 				$params['category_processed'] = true;
 			}
 
 			// reset category page
 			$force_page_adding = false;
 			if (array_key_exists('reset', $params) && $params['reset']) {
 				unset($params['reset']);
 
 				if ($processed_params['m_cat_id']) {
 					$processed_params['m_cat_page'] = 1;
 					$force_page_adding = true;
 				}
 			}
 
 			if ((array_key_exists('category_processed', $params) && $params['category_processed'] && ($processed_params['m_cat_page'] > 1)) || $force_page_adding) {
 				// category name was added before AND category page number found
 				$ret = rtrim($ret, '/') . '_' . $processed_params['m_cat_page'] . '/';
 			}
 
 			$template = array_key_exists('t', $params) ? $params['t'] : false;
 			$category_template = ($processed_params['m_cat_id'] > 0) && $params['pass_category'] ? $this->Application->getCategoryCache($processed_params['m_cat_id'], 'category_designs') : '';
 
 			if ((strtolower($template) == '__default__') && ($processed_params['m_cat_id'] == 0)) {
 				// for "Home" category set template to index when not set
 				$template = 'index';
 			}
 
 			// remove template from url if it is category index cached template
 			if ( ($template == $category_template) || (mb_strtolower($template) == '__default__') ) {
 				// given template is also default template for this category OR '__default__' given
 				$params['pass_template'] = false;
 			}
 
 			// remove template from url if it is site homepage on primary language & theme
 			if ( ($template == 'index') && $processed_params['m_lang'] == $rewrite_processor->primaryLanguageId && $processed_params['m_theme'] == $rewrite_processor->primaryThemeId ) {
 				// given template is site homepage on primary language & theme
 				$params['pass_template'] = false;
 			}
 
 			if ($template && $params['pass_template']) {
 				$ret .= $template . '/';
 			}
 
 			return mb_strtolower( rtrim($ret, '/') );
 		}
 
 		/**
 		 * Checks if whole url_parts matches a whole In-CMS page
 		 *
 		 * @param Array $url_parts
 		 * @param Array $vars
 		 * @return bool
 		 */
 		protected function _parseFriendlyUrl($url_parts, &$vars)
 		{
 			if (!$url_parts) {
 				return false;
 			}
 
 			$sql = 'SELECT CategoryId, NamedParentPath
 					FROM ' . TABLE_PREFIX . 'Categories
 					WHERE FriendlyURL = ' . $this->Conn->qstr(implode('/', $url_parts));
 			$friendly = $this->Conn->GetRow($sql);
 
 			$rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
 			/* @var $rewrite_processor kRewriteUrlProcessor */
 
 			if ($friendly) {
 				$vars['m_cat_id'] = $friendly['CategoryId'];
 				$vars['t'] = preg_replace('/^Content\//i', '', $friendly['NamedParentPath']);
 
 				while ($url_parts) {
 					$rewrite_processor->partParsed( array_shift($url_parts) );
 				}
 
 				return true;
 			}
 
 			return false;
 		}
 
 		/**
 		 * Extracts category part from url
 		 *
 		 * @param Array $url_parts
 		 * @param Array $vars
 		 * @return bool
 		 */
 		protected function _parseCategory($url_parts, &$vars)
 		{
 			if (!$url_parts) {
 				return false;
 			}
 
 			$res = false;
 			$url_part = array_shift($url_parts);
 
 			$category_id = 0;
 			$last_category_info = false;
 			$category_path = $url_part == 'content' ? '' : 'content';
 
 			$rewrite_processor = $this->Application->recallObject('kRewriteUrlProcessor');
 			/* @var $rewrite_processor kRewriteUrlProcessor */
 
 			do {
 				$category_path = trim($category_path . '/' . $url_part, '/');
 				// bb_<topic_id> -> forums/bb_2
 				if ( !preg_match('/^bb_[\d]+$/', $url_part) && preg_match('/(.*)_([\d]+)$/', $category_path, $rets) ) {
 					$category_path = $rets[1];
 					$vars['m_cat_page'] = $rets[2];
 				}
 
 				$sql = 'SELECT CategoryId, SymLinkCategoryId, NamedParentPath
 						FROM ' . TABLE_PREFIX . 'Categories
 						WHERE (LOWER(NamedParentPath) = ' . $this->Conn->qstr($category_path) . ') AND (ThemeId = ' . $vars['m_theme'] . ' OR ThemeId = 0)';
 				$category_info = $this->Conn->GetRow($sql);
 
 				if ($category_info !== false) {
 					$last_category_info = $category_info;
 					$rewrite_processor->partParsed($url_part);
 
 					$url_part = array_shift($url_parts);
 					$res = true;
 				}
 			} while ($category_info !== false && $url_part);
 
 			if ($last_category_info) {
 				// this category is symlink to other category, so use it's url instead
 				// (used in case if url prior to symlink adding was indexed by spider or was bookmarked)
 				if ($last_category_info['SymLinkCategoryId']) {
 					$sql = 'SELECT CategoryId, NamedParentPath
 							FROM ' . TABLE_PREFIX . 'Categories
 							WHERE (CategoryId = ' . $last_category_info['SymLinkCategoryId'] . ')';
 					$category_info = $this->Conn->GetRow($sql);
 
 					if ($category_info) {
 						// web symlinked category was found use it
 						// TODO: maybe 302 redirect should be made to symlinked category url (all other url parts should stay)
 						$last_category_info = $category_info;
 					}
 				}
 
 				// 1. Set virtual page as template, this will be replaced to physical template later in kApplication::Run.
 				// 2. Don't set CachedTemplate field as template here, because we will loose original page associated with it's cms blocks!
-				$vars['t'] = mb_strtolower( preg_replace('/^Content\//i', '', $last_category_info['NamedParentPath']), 'UTF-8' );
+				$vars['t'] = mb_strtolower( preg_replace('/^Content\//i', '', $last_category_info['NamedParentPath']));
 
 				$vars['m_cat_id'] = $last_category_info['CategoryId'];
 				$vars['is_virtual'] = true; // for template from POST, strange code there!
 			}
 			/*else {
 				$vars['m_cat_id'] = 0;
 			}*/
 
 			return $res;
 		}
 
 		/**
 		 * Set's new unique resource id to user
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnAfterItemValidate(kEvent $event)
 		{
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			$resource_id = $object->GetDBField('ResourceId');
 
 			if ( !$resource_id ) {
 				$object->SetDBField('ResourceId', $this->Application->NextResourceId());
 			}
 		}
 
 		/**
 		 * Occurs before an item has been cloned
 		 * Id of newly created item is passed as event' 'id' param
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnBeforeClone(kEvent $event)
 		{
 			parent::OnBeforeClone($event);
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			$object->SetDBField('ResourceId', 0); // this will reset it
 
 		}
 	}
\ No newline at end of file
Index: branches/5.2.x/core/units/translator/translator_event_handler.php
===================================================================
--- branches/5.2.x/core/units/translator/translator_event_handler.php	(revision 15444)
+++ branches/5.2.x/core/units/translator/translator_event_handler.php	(revision 15445)
@@ -1,181 +1,181 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	class TranslatorEventHandler extends kDBEventHandler
 	{
 		/**
 		 * Allows to override standard permission mapping
 		 *
 		 * @return void
 		 * @access protected
 		 * @see kEventHandler::$permMapping
 		 */
 		protected function mapPermissions()
 		{
 			parent::mapPermissions();
 
 			$permissions = Array(
 				'OnChangeLanguage'	=>	Array('subitem' => 'add|edit'),
 				'OnSaveAndClose'	=>	Array('subitem' => 'add|edit'),
 			);
 
 			$this->permMapping = array_merge($this->permMapping, $permissions);
 		}
 
 		/**
 		 * Check permission of item, that being translated
 		 *
 		 * @param kEvent $event
 		 * @return bool
 		 * @access public
 		 */
 		public function CheckPermission(kEvent $event)
 		{
 			list($prefix, ) = $this->getPrefixAndField($event);
 
 			$top_prefix = $this->Application->GetTopmostPrefix($prefix, true);
 			$event->setEventParam('top_prefix', $top_prefix);
 
 			return parent::CheckPermission($event);
 		}
 
 
 		/**
 		 * Returns prefix and field being translated
 		 *
 		 * @param kEvent $event
 		 */
 		function getPrefixAndField($event)
 		{
 			$field = $this->Application->GetVar($event->getPrefixSpecial(true).'_field');
 
 			if (strpos($field,':') !== false) {
 				list($prefix, $field) = explode(':', $field);
 			}
 			else {
 				$prefix = $this->Application->GetVar($event->getPrefixSpecial(true).'_prefix');
 			}
 			return Array($prefix, $field);
 		}
 
 		/**
 		 * Loads record to be translated
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnLoad($event)
 		{
 			list($obj_prefix, $field) = $this->getPrefixAndField($event);
 
 			$object = $this->Application->recallObject($obj_prefix);
 			/* @var $object kDBItem */
 
 			$translator = $event->getObject();
 			/* @var $translator kDBItem */
 
 			$def_lang = $this->Application->GetDefaultLanguageId();
 
 			$current_lang = $translator->GetDBField('Language');
 			if (!$current_lang) $current_lang = $this->Application->RecallVar('trans_lang');
 			if (!$current_lang) $current_lang = $this->Application->GetVar('m_lang');
 			/*if ($current_lang == $def_lang) {
 				$current_lang = $def_lang + 1;
 			}*/
 			$this->Application->StoreVar('trans_lang', $current_lang); //remember translation language for user friendlyness
 
 			$translator->SetID(1);
 			$translator->SetDBField('Original', $object->GetDBField('l'.$this->Application->GetVar('m_lang').'_'.$field));
 			$translator->SetDBField('Language', $current_lang);
 			$translator->SetDBField('SwitchLanguage', $current_lang);
 
 			$translator->SetDBField('Translation', $object->GetDBField('l'.$current_lang.'_'.$field));
 
 			$cur_lang = $this->Application->recallObject('lang.current');
 			/* @var $cur_lang LanguagesItem */
 
 			$cur_lang->Load($current_lang);
 
-			$translator->SetDBField('Charset', $cur_lang->GetDBField('Charset'));
+			$translator->SetDBField('Charset', CHARSET);
 
 			$event->redirect = false;
 		}
 
 		/**
 		 * Saves changes into temporary table and closes editing window
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnSaveAndClose($event)
 		{
 			$event->CallSubEvent('OnPreSave');
 
 			$event->SetRedirectParam('opener', 'u');
 		}
 
 		/**
 		 * Saves edited item into temp table
 		 * If there is no id, new item is created in temp table
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnPreSave(kEvent $event)
 		{
 			$translator = $event->getObject();
 			/* @var $translator kDBItem */
 
 			$field_values = $this->getSubmittedFields($event);
 			$translator->SetFieldsFromHash($field_values, $this->getRequestProtectedFields($field_values));
 
 			list($obj_prefix, $field) = $this->getPrefixAndField($event);
 
 			$object = $this->Application->recallObject($obj_prefix);
 			/* @var $object kDBItem */
 
 			$lang = $translator->GetDBField('Language');
 
 			$object->SetFieldOptions('l' . $lang . '_' . $field, Array ());
 			$object->SetDBField('l' . $lang . '_' . $field, $translator->GetDBField('Translation'));
 			$this->RemoveRequiredFields($object);
 			$object->Update();
 		}
 
 		/**
 		 * Changes current language in translation popup
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnChangeLanguage($event)
 		{
 			$event->CallSubEvent('OnPreSave');
 
 			$object = $event->getObject();
 			/* @var $object kDBItem */
 
 			$object->SetDBField('Language', $object->GetDBField('SwitchLanguage'));
 
 			$event->CallSubEvent('OnLoad');
 			$event->redirect = false;
 		}
 
 	}
\ No newline at end of file
Index: branches/5.2.x/core/units/helpers/language_import_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/language_import_helper.php	(revision 15444)
+++ branches/5.2.x/core/units/helpers/language_import_helper.php	(revision 15445)
@@ -1,1259 +1,1258 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 /**
  * Language pack format version description
  *
  * v1
  * ==========
  * All language properties are separate nodes inside <LANGUAGE> node. There are
  * two more nodes PHRASES and EVENTS for phrase and email event translations.
  *
  * v2
  * ==========
  * All data, that will end up in Language table is now attributes of LANGUAGE node
  * and is name exactly as field name, that will be used to store that data.
  *
  * v4
  * ==========
  * Hint & Column translation added to each phrase translation
  *
  * v5
  * ==========
  * Use separate xml nodes for subject, headers, html & plain translations
  *
  * v6
  * ==========
  * Added e-mail design templates
  *
  */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	define('LANG_OVERWRITE_EXISTING', 1);
 	define('LANG_SKIP_EXISTING', 2);
 
 	class LanguageImportHelper extends kHelper {
 
 		/**
 		 * Current Language in import
 		 *
 		 * @var LanguagesItem
 		 */
 		var $lang_object = null;
 
 		/**
 		 * Current user's IP address
 		 *
 		 * @var string
 		 */
 		var $ip_address = '';
 
 		/**
 		 * Event type + name mapping to id (from system)
 		 *
 		 * @var Array
 		 */
 		var $events_hash = Array ();
 
 		/**
 		 * Language pack import mode
 		 *
 		 * @var int
 		 */
 		var $import_mode = LANG_SKIP_EXISTING;
 
 		/**
 		 * Language IDs, that were imported
 		 *
 		 * @var Array
 		 */
 		var $_languages = Array ();
 
 		/**
 		 * Temporary table names to perform import on
 		 *
 		 * @var Array
 		 */
 		var $_tables = Array ();
 
 		/**
 		 * Phrase types allowed for import/export operations
 		 *
 		 * @var Array
 		 */
 		var $phrase_types_allowed = Array ();
 
 		/**
 		 * Encoding, used for language pack exporting
 		 *
 		 * @var string
 		 */
 		var $_exportEncoding = 'base64';
 
 		/**
 		 * Exported data limits (all or only specified ones)
 		 *
 		 * @var Array
 		 */
 		var $_exportLimits = Array (
 			'phrases' => false,
 			'emailevents' => false,
 			'country-state' => false,
 		);
 
 		/**
 		 * Debug language pack import process
 		 *
 		 * @var bool
 		 */
 		var $_debugMode = false;
 
 		/**
 		 * Latest version of language pack format. Versions are not backwards compatible!
 		 *
 		 * @var int
 		 */
 		var $_latestVersion = 6;
 
 		/**
 		 * Prefix-based serial numbers, that should be changed after import is finished
 		 *
 		 * @var Array
 		 */
 		var $changedPrefixes = Array ();
 
 		public function __construct()
 		{
 			parent::__construct();
 
 			// "core/install/english.lang", phrase count: 3318, xml parse time on windows: 10s, insert time: 0.058s
 			set_time_limit(0);
 			ini_set('memory_limit', -1);
 
 			$this->lang_object = $this->Application->recallObject('lang.import', null, Array ('skip_autoload' => true));
 
 			if (!(defined('IS_INSTALL') && IS_INSTALL)) {
 				// perform only, when not in installation mode
 				$this->_updateEventsCache();
 			}
 
 			$this->ip_address = getenv('HTTP_X_FORWARDED_FOR') ? getenv('HTTP_X_FORWARDED_FOR') : getenv('REMOTE_ADDR');
 
 //			$this->_debugMode = $this->Application->isDebugMode();
 		}
 
 		/**
 		 * Performs import of given language pack (former Parse method)
 		 *
 		 * @param string $filename
 		 * @param string $phrase_types
 		 * @param Array $module_ids
 		 * @param int $import_mode
 		 * @return bool
 		 */
 		function performImport($filename, $phrase_types, $module_ids, $import_mode = LANG_SKIP_EXISTING)
 		{
 			// define the XML parsing routines/functions to call based on the handler path
 			if (!file_exists($filename) || !$phrase_types /*|| !$module_ids*/) {
 				return false;
 			}
 
 			if ($this->_debugMode) {
 				$start_time = microtime(true);
 				$this->Application->Debugger->appendHTML(__CLASS__ . '::' . __FUNCTION__ . '("' . $filename . '")');
 			}
 
 			if (defined('IS_INSTALL') && IS_INSTALL) {
 				// new events could be added during module upgrade
 				$this->_updateEventsCache();
 			}
 
 			$phrase_types = explode('|', substr($phrase_types, 1, -1) );
 //			$module_ids = explode('|', substr($module_ids, 1, -1) );
 
 			$this->phrase_types_allowed = array_flip($phrase_types);
 			$this->import_mode = $import_mode;
 
 			$this->_parseXML($filename);
 
 			// copy data from temp tables to live
 			foreach ($this->_languages as $language_id) {
 				$this->_performUpgrade($language_id, 'phrases', 'PhraseKey', Array ('l%s_Translation', 'l%s_HintTranslation', 'l%s_ColumnTranslation', 'PhraseType'));
 				$this->_performUpgrade($language_id, 'emailevents', 'EventId', Array ('l%s_Subject', 'Headers', 'l%s_HtmlBody', 'l%s_PlainTextBody'));
 				$this->_performUpgrade($language_id, 'country-state', 'CountryStateId', Array ('l%s_Name'));
 			}
 
 			$this->_initImportTables(true);
 			$this->changedPrefixes = array_unique($this->changedPrefixes);
 
 			foreach ($this->changedPrefixes as $prefix) {
 				$this->Application->incrementCacheSerial($prefix);
 			}
 
 			if ($this->_debugMode) {
 				$this->Application->Debugger->appendHTML(__CLASS__ . '::' . __FUNCTION__ . '("' . $filename . '"): ' . (microtime(true) - $start_time));
 			}
 
 			return true;
 		}
 
 		/**
 		 * Creates XML file with exported language data (former Create method)
 		 *
 		 * @param string $filename filename to export into
 		 * @param Array $phrase_types phrases types to export from modules passed in $module_ids
 		 * @param Array $language_ids IDs of languages to export
 		 * @param Array $module_ids IDs of modules to export phrases from
 		 */
 		function performExport($filename, $phrase_types, $language_ids, $module_ids)
 		{
 			$fp = fopen($filename,'w');
 			if (!$fp || !$phrase_types || !$module_ids || !$language_ids) {
 				return false;
 			}
 
 			$phrase_types = explode('|', substr($phrase_types, 1, -1) );
 			$module_ids = explode('|', substr($module_ids, 1, -1) );
 
 			$ret = '<?xml version="1.0" encoding="utf-8"?>' . "\n";
 			$ret .= '<LANGUAGES Version="' . $this->_latestVersion . '">' . "\n";
 
 			$export_fields = $this->_getExportFields();
 
 			// get languages
 			$sql = 'SELECT *
 					FROM ' . $this->Application->getUnitOption('lang','TableName') . '
 					WHERE LanguageId IN (' . implode(',', $language_ids) . ')';
 			$languages = $this->Conn->Query($sql, 'LanguageId');
 
 			// get phrases
 			$phrase_modules = $module_ids;
 			array_push($phrase_modules, ''); // for old language packs without module
 
 			$phrase_modules = $this->Conn->qstrArray($phrase_modules);
 
 			// apply phrase selection limit
 			if ($this->_exportLimits['phrases']) {
 				$escaped_phrases = $this->Conn->qstrArray($this->_exportLimits['phrases']);
 				$limit_where = 'Phrase IN (' . implode(',', $escaped_phrases) . ')';
 			}
 			else {
 				$limit_where = 'TRUE';
 			}
 
 			$sql = 'SELECT *
 					FROM ' . $this->Application->getUnitOption('phrases','TableName') . '
 					WHERE PhraseType IN (' . implode(',', $phrase_types) . ') AND Module IN (' . implode(',', $phrase_modules) . ') AND ' . $limit_where . '
 					ORDER BY Phrase';
 			$phrases = $this->Conn->Query($sql, 'PhraseId');
 
 			// email events
 			$module_sql = preg_replace('/(.*),/U', 'INSTR(Module,\'\\1\') OR ', implode(',', $module_ids) . ',');
 
 			// apply event selection limit
 			if ($this->_exportLimits['emailevents']) {
 				$escaped_email_events = $this->Conn->qstrArray($this->_exportLimits['emailevents']);
 				$limit_where = '`Event` IN (' . implode(',', $escaped_email_events) . ')';
 			}
 			else {
 				$limit_where = 'TRUE';
 			}
 
 			$sql = 'SELECT *
 					FROM ' . $this->Application->getUnitOption('emailevents', 'TableName') . '
 					WHERE `Type` IN (' . implode(',', $phrase_types) . ') AND (' . substr($module_sql, 0, -4) . ') AND ' . $limit_where . '
 					ORDER BY `Event`, `Type`';
 			$events = $this->Conn->Query($sql, 'EventId');
 
 			if ( in_array('Core', $module_ids) ) {
 				if ($this->_exportLimits['country-state']) {
 					$escaped_countries = $this->Conn->qstrArray($this->_exportLimits['country-state']);
 					$limit_where = '`IsoCode` IN (' . implode(',', $escaped_countries) . ')';
 				}
 				else {
 					$limit_where = 'TRUE';
 				}
 
 				$country_table = $this->Application->getUnitOption('country-state', 'TableName');
 
 				// countries
 				$sql = 'SELECT *
 						FROM ' . $country_table . '
 						WHERE Type = ' . DESTINATION_TYPE_COUNTRY . ' AND ' . $limit_where . '
 						ORDER BY `IsoCode`';
 				$countries = $this->Conn->Query($sql, 'CountryStateId');
 
 				// states
 				$sql = 'SELECT state.*
 						FROM ' . $country_table . ' state
 						JOIN ' . $country_table . ' country ON country.CountryStateId = state.StateCountryId
 						WHERE state.Type = ' . DESTINATION_TYPE_STATE . ' AND ' . str_replace('`IsoCode`', 'country.`IsoCode`', $limit_where) . '
 						ORDER BY state.`IsoCode`';
 				$states = $this->Conn->Query($sql, 'CountryStateId');
 
 				foreach ($states as $state_id => $state_data) {
 					$country_id = $state_data['StateCountryId'];
 
 					if ( !array_key_exists('States', $countries[$country_id]) ) {
 						$countries[$country_id]['States'] = Array ();
 					}
 
 					$countries[$country_id]['States'][] = $state_id;
 				}
 			}
 
 			foreach ($languages as $language_id => $language_info) {
 				// language
 				$ret .= "\t" . '<LANGUAGE Encoding="' . $this->_exportEncoding . '"';
 
 				foreach ($export_fields	as $export_field) {
 					$ret .= ' ' . $export_field . '="' . htmlspecialchars($language_info[$export_field], NULL, 'UTF-8') . '"';
 				}
 
 				$ret .= '>' . "\n";
 
 				// filename replacements
 				$replacements = $language_info['FilenameReplacements'];
 
 				if ( $replacements ) {
 					$ret .= "\t\t" . '<REPLACEMENTS>' . $this->_exportConvert($replacements) . '</REPLACEMENTS>' . "\n";
 				}
 
 				// e-mail design templates
 				if ( $language_info['HtmlEmailTemplate'] || $language_info['TextEmailTemplate'] ) {
 					$ret .= "\t\t" . '<EMAILDESIGNS>' . "\n";
 
 					if ( $language_info['HtmlEmailTemplate'] ) {
 						$ret .= "\t\t\t" . '<HTML>' . $this->_exportConvert($language_info['HtmlEmailTemplate']) . '</HTML>' . "\n";
 					}
 
 					if ( $language_info['TextEmailTemplate'] ) {
 						$ret .= "\t\t\t" . '<TEXT>' . $this->_exportConvert($language_info['TextEmailTemplate']) . '</TEXT>' . "\n";
 					}
 
 					$ret .= "\t\t" . '</EMAILDESIGNS>' . "\n";
 				}
 
 				// phrases
 				if ($phrases) {
 					$ret .= "\t\t" . '<PHRASES>' . "\n";
 					foreach ($phrases as $phrase_id => $phrase) {
 						$translation = $phrase['l' . $language_id . '_Translation'];
 						$hint_translation = $phrase['l' . $language_id . '_HintTranslation'];
 						$column_translation = $phrase['l' . $language_id . '_ColumnTranslation'];
 
 						if (!$translation) {
 							// phrase is not translated on given language
 							continue;
 						}
 
 						if ( $this->_exportEncoding == 'base64' ) {
 							$hint_translation = base64_encode($hint_translation);
 							$column_translation = base64_encode($column_translation);
 						}
 						else {
 							$hint_translation = htmlspecialchars($hint_translation, NULL, 'UTF-8');
 							$column_translation = htmlspecialchars($column_translation, NULL, 'UTF-8');
 						}
 
 						$attributes = Array (
 							'Label="' . $phrase['Phrase'] . '"',
 							'Module="' . $phrase['Module'] . '"',
 							'Type="' . $phrase['PhraseType'] . '"'
 						);
 
 						if ( $phrase['l' . $language_id . '_HintTranslation'] ) {
 							$attributes[] = 'Hint="' . $hint_translation . '"';
 						}
 
 						if ( $phrase['l' . $language_id . '_ColumnTranslation'] ) {
 							$attributes[] = 'Column="' . $column_translation . '"';
 						}
 
 						$ret .= "\t\t\t" . '<PHRASE ' . implode(' ', $attributes) . '>' . $this->_exportConvert($translation) . '</PHRASE>' . "\n";
 					}
 
 					$ret .= "\t\t" . '</PHRASES>' . "\n";
 				}
 
 				// email events
 				if ($events) {
 					$ret .= "\t\t" . '<EVENTS>' . "\n";
 
 					foreach ($events as $event_data) {
 						$fields_hash = Array (
 							'HEADERS' => $event_data['Headers'],
 							'SUBJECT' => $event_data['l' . $language_id . '_Subject'],
 							'HTMLBODY' => $event_data['l' . $language_id . '_HtmlBody'],
 							'PLAINTEXTBODY' => $event_data['l' . $language_id . '_PlainTextBody'],
 						);
 
 						$data = '';
 
 						foreach ($fields_hash as $xml_node => $xml_content) {
 							if ( $xml_content ) {
 								$data .= "\t\t\t\t" . '<' . $xml_node . '>' . $this->_exportConvert($xml_content) . '</' . $xml_node . '>' . "\n";
 							}
 						}
 
 						if ( $data ) {
 							$ret .= "\t\t\t" . '<EVENT Event="' . $event_data['Event'] . '" Type="' . $event_data['Type'] . '">' . "\n" . $data . "\t\t\t" . '</EVENT>' . "\n";
 						}
 					}
 
 					$ret .= "\t\t" . '</EVENTS>' . "\n";
 				}
 
 				if (in_array('Core', $module_ids) && $countries) {
 					$ret .= "\t\t" . '<COUNTRIES>' . "\n";
 					foreach ($countries as $country_data) {
 						$translation = $country_data['l' . $language_id . '_Name'];
 
 						if (!$translation) {
 							// country is not translated on given language
 							continue;
 						}
 
 						$data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
 
 						if (array_key_exists('States', $country_data)) {
 							$ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '">' . "\n";
 
 							foreach ($country_data['States'] as $state_id) {
 								$translation = $states[$state_id]['l' . $language_id . '_Name'];
 
 								if (!$translation) {
 									// state is not translated on given language
 									continue;
 								}
 
 								$data = $this->_exportEncoding == 'base64' ? base64_encode($translation) : $translation;
 								$ret .= "\t\t\t\t" . '<STATE Iso="' . $states[$state_id]['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
 							}
 
 							$ret  .= "\t\t\t" . '</COUNTRY>' . "\n";
 						}
 						else {
 							$ret .= "\t\t\t" . '<COUNTRY Iso="' . $country_data['IsoCode'] . '" Translation="' . $data . '"/>' . "\n";
 						}
 					}
 
 					$ret .= "\t\t" . '</COUNTRIES>' . "\n";
 				}
 
 				$ret .= "\t" . '</LANGUAGE>' . "\n";
 			}
 
 			$ret .= '</LANGUAGES>';
 			fwrite($fp, $ret);
 			fclose($fp);
 
 			return true;
 		}
 
 		/**
 		 * Converts string before placing into export file
 		 *
 		 * @param string $string
 		 * @return string
 		 * @access protected
 		 */
 		protected function _exportConvert($string)
 		{
 			return $this->_exportEncoding == 'base64' ? base64_encode($string) : '<![CDATA[' . $string . ']]>';
 		}
 
 		/**
 		 * Sets language pack encoding (not charset) used during export
 		 *
 		 * @param string $encoding
 		 */
 		function setExportEncoding($encoding)
 		{
 			$this->_exportEncoding = $encoding;
 		}
 
 		/**
 		 * Sets language pack data limit for export
 		 *
 		 * @param string $prefix
 		 * @param string $data
 		 */
 		function setExportLimit($prefix, $data = null)
 		{
 			if ( !isset($data) ) {
 				$key_field = $prefix == 'phrases' ? 'Phrase' : 'Event';
 				$ids = $this->getExportIDs($prefix);
 
 				$sql = 'SELECT ' . $key_field . '
 						FROM ' . $this->Application->getUnitOption($prefix, 'TableName') . '
 						WHERE ' . $this->Application->getUnitOption($prefix, 'IDField') . ' IN (' . $ids . ')';
 				$rows = $this->Conn->GetIterator($sql);
 
 				if ( count($rows) ) {
 					$data = '';
 
 					foreach ($rows as $row) {
 						$data .= ',' . $row[$key_field];
 					}
 
 					$data = substr($data, 1);
 				}
 			}
 
 			if ( !is_array($data) ) {
 				$data = str_replace(',', "\n", $data);
 				$data = preg_replace("/\n+/", "\n", str_replace("\r", '', trim($data)));
 				$data = $data ? array_map('trim', explode("\n", $data)) : Array ();
 			}
 
 			$this->_exportLimits[$prefix] = $data;
 		}
 
 		/**
 		 * Performs upgrade of given language pack part
 		 *
 		 * @param int $language_id
 		 * @param string $prefix
 		 * @param string $unique_field
 		 * @param Array $data_fields
 		 */
 		function _performUpgrade($language_id, $prefix, $unique_field, $data_fields)
 		{
 			$live_records = $this->_getTableData($language_id, $prefix, $unique_field, $data_fields[0], false);
 			$temp_records = $this->_getTableData($language_id, $prefix, $unique_field, $data_fields[0], true);
 
 			if (!$temp_records) {
 				// no data for given language
 				return ;
 			}
 
 			// perform insert for records, that are missing in live table
 			$to_insert = array_diff($temp_records, $live_records);
 
 			if ($to_insert) {
 				$to_insert = $this->Conn->qstrArray($to_insert);
 
 				$sql = 'INSERT INTO ' . $this->Application->getUnitOption($prefix, 'TableName') . '
 						SELECT *
 						FROM ' . $this->_tables[$prefix] . '
 						WHERE ' . $unique_field . ' IN (' . implode(',', $to_insert) . ')';
 				$this->Conn->Query($sql);
 
 				// new records were added
 				$this->changedPrefixes[] = $prefix;
 			}
 
 			// perform update for records, that are present in live table
 			$to_update = array_diff($temp_records, $to_insert);
 
 			if ($to_update) {
 				$to_update = $this->Conn->qstrArray($to_update);
 
 				$sql = 'UPDATE ' . $this->Application->getUnitOption($prefix, 'TableName') . ' live
 						SET ';
 
 				foreach ($data_fields as $index => $data_field) {
 					$data_field = sprintf($data_field, $language_id);
 
 					$sql .= '	live.' . $data_field . ' = (
 									SELECT temp' . $index . '.' . $data_field . '
 									FROM ' . $this->_tables[$prefix] . ' temp' . $index . '
 									WHERE temp' . $index . '.' . $unique_field . ' = live.' . $unique_field . '
 								),';
 				}
 
 				$sql = substr($sql, 0, -1); // cut last comma
 
 				$where_clause = Array (
 					// this won't make any difference, but just in case
 					$unique_field . ' IN (' . implode(',', $to_update) . ')',
 				);
 
 				if ($this->import_mode == LANG_SKIP_EXISTING) {
 					// empty OR not set
 					$data_field = sprintf($data_fields[0], $language_id);
 					$where_clause[] = '(' . $data_field . ' = "") OR (' . $data_field . ' IS NULL)';
 				}
 
 				if ($where_clause) {
 					$sql .= "\n" . 'WHERE (' . implode(') AND (', $where_clause) . ')';
 				}
 
 				$this->Conn->Query($sql);
 
 				if ($this->Conn->getAffectedRows() > 0) {
 					// existing records were updated
 					$this->changedPrefixes[] = $prefix;
 				}
 			}
 		}
 
 		/**
 		 * Returns data from given table used for language pack upgrade
 		 *
 		 * @param int $language_id
 		 * @param string $prefix
 		 * @param string $unique_field
 		 * @param string $data_field
 		 * @param bool $temp_mode
 		 * @return Array
 		 */
 		function _getTableData($language_id, $prefix, $unique_field, $data_field, $temp_mode = false)
 		{
 			$data_field = sprintf($data_field, $language_id);
 			$table_name = $this->Application->getUnitOption($prefix, 'TableName');
 
 			if ($temp_mode) {
 				// for temp table get only records, that have contents on given language (not empty and isset)
 				$sql = 'SELECT ' . $unique_field . '
 						FROM ' . $this->Application->GetTempName($table_name, 'prefix:' . $prefix) . '
 						WHERE (' . $data_field . ' <> "") AND (' . $data_field . ' IS NOT NULL)';
 			}
 			else {
 				// for live table get all records, no matter on what language
 				$sql = 'SELECT ' . $unique_field . '
 						FROM ' . $table_name;
 			}
 
 			return $this->Conn->GetCol($sql);
 		}
 
 		function _parseXML($filename)
 		{
 			if ( $this->_debugMode ) {
 				$start_time = microtime(true);
 				$this->Application->Debugger->appendHTML(__CLASS__ . '::' . __FUNCTION__ . '("' . $filename . '")');
 			}
 
 			$languages = simplexml_load_file($filename);
 
 			if ( $languages === false) {
 				// invalid language pack contents
 				return false;
 			}
 
 			// PHP 5.3 version would be: $languages->count()
 			if ( count($languages->children()) ) {
 				$this->_processLanguages($languages);
 				$this->_processLanguageData($languages);
 			}
 
 			if ( $this->_debugMode ) {
 				$this->Application->Debugger->appendHTML(__CLASS__ . '::' . __FUNCTION__ . '("' . $filename . '"): ' . (microtime(true) - $start_time));
 			}
 
 			return true;
 		}
 
 		/**
 		 * Creates temporary tables, used during language import
 		 *
 		 * @param bool $drop_only
 		 */
 		function _initImportTables($drop_only = false)
 		{
 			$this->_tables['phrases'] = $this->_prepareTempTable('phrases', $drop_only);
 			$this->_tables['emailevents'] = $this->_prepareTempTable('emailevents', $drop_only);
 			$this->_tables['country-state'] = $this->_prepareTempTable('country-state', $drop_only);
 		}
 
 		/**
 		 * Create temp table for prefix, if table already exists, then delete it and create again
 		 *
 		 * @param string $prefix
 		 * @param bool $drop_only
 		 * @return string Name of created temp table
 		 * @access protected
 		 */
 		protected function _prepareTempTable($prefix, $drop_only = false)
 		{
 			$id_field = $this->Application->getUnitOption($prefix, 'IDField');
 			$table = $this->Application->getUnitOption($prefix,'TableName');
 			$temp_table = $this->Application->GetTempName($table);
 
 			$sql = 'DROP TABLE IF EXISTS %s';
 			$this->Conn->Query( sprintf($sql, $temp_table) );
 
 			if (!$drop_only) {
 				$sql = 'CREATE TABLE ' . $temp_table . ' SELECT * FROM ' . $table . ' WHERE 0';
 				$this->Conn->Query($sql);
 
 				$sql = 'ALTER TABLE %1$s CHANGE %2$s %2$s INT(11) NOT NULL DEFAULT "0"';
 				$this->Conn->Query( sprintf($sql, $temp_table, $id_field) );
 
 				switch ($prefix) {
 					case 'phrases':
 						$unique_field = 'PhraseKey';
 						break;
 
 					case 'emailevents':
 						$unique_field = 'EventId';
 						break;
 
 					case 'country-state':
 						$unique_field = 'CountryStateId';
 						break;
 
 					default:
 						throw new Exception('Unknown prefix "<strong>' . $prefix . '</strong>" during language pack import');
 						break;
 				}
 
 				$sql = 'ALTER TABLE ' . $temp_table . ' ADD UNIQUE (' . $unique_field . ')';
 				$this->Conn->Query($sql);
 			}
 
 			return $temp_table;
 		}
 
 		/**
 		 * Prepares mapping between event name+type and their ids in database
 		 *
 		 */
 		function _updateEventsCache()
 		{
 			$sql = 'SELECT EventId, CONCAT(Event,"_",Type) AS EventMix
 					FROM ' . TABLE_PREFIX . 'EmailEvents';
 			$this->events_hash = $this->Conn->GetCol($sql, 'EventMix');
 		}
 
 		/**
 		 * Returns language fields to be exported
 		 *
 		 * @return Array
 		 */
 		function _getExportFields()
 		{
 			return Array (
 				'PackName', 'LocalName', 'DateFormat', 'ShortDateFormat', 'TimeFormat', 'ShortTimeFormat',
-				'InputDateFormat', 'InputTimeFormat', 'DecimalPoint', 'ThousandSep', 'Charset', 'UnitSystem',
-				'Locale', 'UserDocsUrl'
+				'InputDateFormat', 'InputTimeFormat', 'DecimalPoint', 'ThousandSep', 'UnitSystem', 'Locale',
+				'UserDocsUrl'
 			);
 		}
 
 		/**
 		 * Processes parsed XML
 		 *
 		 * @param SimpleXMLElement $languages
 		 */
 		function _processLanguages($languages)
 		{
 			$version = (int)$languages['Version'];
 
 			if ( !$version ) {
 				// version missing -> guess it
 				if ( $languages->DATEFORMAT->getName() ) {
 					$version = 1;
 				}
 				elseif ( (string)$languages->LANGUAGE['Charset'] != '' ) {
 					$version = 2;
 				}
 			}
 
 			if ( $version == 1 ) {
 				$field_mapping = Array (
 					'DATEFORMAT' => 'DateFormat',
 					'TIMEFORMAT' => 'TimeFormat',
 					'INPUTDATEFORMAT' => 'InputDateFormat',
 					'INPUTTIMEFORMAT' => 'InputTimeFormat',
 					'DECIMAL' => 'DecimalPoint',
 					'THOUSANDS' => 'ThousandSep',
 					'CHARSET' => 'Charset',
 					'UNITSYSTEM' => 'UnitSystem',
 					'DOCS_URL' => 'UserDocsUrl',
 				);
 			}
 			else {
 				$export_fields = $this->_getExportFields();
 			}
 
 			foreach ($languages as $language_node) {
 				$fields_hash = Array (
 					'PackName' => (string)$language_node['PackName'],
 					'LocalName' => (string)$language_node['PackName'],
 					'Encoding' => (string)$language_node['Encoding'],
-					'Charset' => 'utf-8',
 					'SynchronizationModes' => Language::SYNCHRONIZE_DEFAULT,
 				);
 
 				if ( $version > 1 ) {
 					foreach ($export_fields as $export_field) {
 						if ( (string)$language_node[$export_field] ) {
 							$fields_hash[$export_field] = (string)$language_node[$export_field];
 						}
 					}
 				}
 
 				$container_nodes = Array ('PHRASES', 'EVENTS', 'COUNTRIES');
 
 				foreach ($language_node as $sub_node) {
 					/* @var $sub_node SimpleXMLElement */
 
 					if ( in_array($sub_node->getName(), $container_nodes) ) {
 							continue;
 					}
 
 					switch ($sub_node->getName()) {
 						case 'REPLACEMENTS':
 							// added since v2
 							$replacements = (string)$sub_node;
 
 							if ( $fields_hash['Encoding'] != 'plain' ) {
 								$replacements = base64_decode($replacements);
 							}
 
 							$fields_hash['FilenameReplacements'] = $replacements;
 							break;
 
 						case 'EMAILDESIGNS':
 							// added since v6
 							$this->_decodeEmailDesignTemplate($fields_hash, 'HtmlEmailTemplate', (string)$sub_node->HTML);
 							$this->_decodeEmailDesignTemplate($fields_hash, 'TextEmailTemplate', (string)$sub_node->TEXT);
 							break;
 
 						default:
 							if ( $version == 1 ) {
 								$fields_hash[$field_mapping[$sub_node->Name]] = (string)$sub_node;
 							}
 							break;
 					}
 				}
 
 				$this->_processLanguage($fields_hash);
 			}
 
 			if ( !defined('IS_INSTALL') || !IS_INSTALL ) {
 				$ml_helper = $this->Application->recallObject('kMultiLanguageHelper');
 				/* @var $ml_helper kMultiLanguageHelper */
 
 				// create ML columns for new languages
 				$ml_helper->resetState();
 				$ml_helper->massCreateFields();
 			}
 
 			// create temp tables after new language columns were added
 			$this->_initImportTables();
 		}
 
 		/**
 		 * Processes parsed XML
 		 *
 		 * @param SimpleXMLElement $languages
 		 */
 		function _processLanguageData($languages)
 		{
 			foreach ($languages as $language_node) {
 				$encoding = (string)$language_node['Encoding'];
 				$language_id = $this->_languages[kUtil::crc32((string)$language_node['PackName'])];
 
 				$container_nodes = Array ('PHRASES', 'EVENTS', 'COUNTRIES');
 
 				foreach ($language_node as $sub_node) {
 					/* @var $sub_node SimpleXMLElement */
 
 					if ( !in_array($sub_node->getName(), $container_nodes) || !count($sub_node->children()) ) {
 						// PHP 5.3 version would be: !$sub_node->count()
 						continue;
 					}
 
 					switch ($sub_node->getName()) {
 						case 'PHRASES':
 							$this->_processPhrases($sub_node, $language_id, $encoding);
 							break;
 
 						case 'EVENTS':
 							$this->_processEvents($sub_node, $language_id, $encoding);
 							break;
 
 						case 'COUNTRIES':
 							$this->_processCountries($sub_node, $language_id, $encoding);
 							break;
 					}
 				}
 			}
 		}
 
 		/**
 		 * Decodes e-mail template design from language pack
 		 *
 		 * @param Array $fields_hash
 		 * @param string $field
 		 * @param string $design_template
 		 */
 		protected function _decodeEmailDesignTemplate(&$fields_hash, $field, $design_template)
 		{
 			if ( $fields_hash['Encoding'] != 'plain' ) {
 				$design_template = base64_decode($design_template);
 			}
 
 			if ( $design_template ) {
 				$fields_hash[$field] = $design_template;
 			}
 		}
 
 		/**
 		 * Performs phases import
 		 *
 		 * @param SimpleXMLElement $phrases
 		 * @param int $language_id
 		 * @param string $language_encoding
 		 */
 		function _processPhrases($phrases, $language_id, $language_encoding)
 		{
 			static $other_translations = Array ();
 
 			if ( $this->Application->isDebugMode() ) {
 				$this->Application->Debugger->profileStart('L[' . $language_id . ']P', 'Language: ' . $language_id . '; Phrases Import');
 			}
 
 			foreach ($phrases as $phrase_node) {
 				/* @var $phrase_node SimpleXMLElement */
 
 				$phrase_key = mb_strtoupper($phrase_node['Label']);
 
 				$fields_hash = Array (
 					'Phrase' => (string)$phrase_node['Label'],
 					'PhraseKey' => $phrase_key,
 					'PhraseType' => (int)$phrase_node['Type'],
 					'Module' => (string)$phrase_node['Module'] ? (string)$phrase_node['Module'] : 'Core',
 					'LastChanged' => TIMENOW,
 					'LastChangeIP' => $this->ip_address,
 				);
 
 				$translation = (string)$phrase_node;
 				$hint_translation = (string)$phrase_node['Hint'];
 				$column_translation = (string)$phrase_node['Column'];
 
 				if ( array_key_exists($fields_hash['PhraseType'], $this->phrase_types_allowed) ) {
 					if ( $language_encoding != 'plain' ) {
 						$translation = base64_decode($translation);
 						$hint_translation = base64_decode($hint_translation);
 						$column_translation = base64_decode($column_translation);
 					}
 
 					if ( !array_key_exists($phrase_key, $other_translations) ) {
 						// ensure translation in every language to make same column count in every insert
 						$other_translations[$phrase_key] = Array ();
 
 						foreach ($this->_languages as $other_language_id) {
 							$other_translations[$phrase_key]['l' . $other_language_id . '_Translation'] = '';
 							$other_translations[$phrase_key]['l' . $other_language_id . '_HintTranslation'] = '';
 							$other_translations[$phrase_key]['l' . $other_language_id . '_ColumnTranslation'] = '';
 						}
 					}
 
 					$other_translations[$phrase_key]['l' . $language_id . '_Translation'] = $translation;
 					$other_translations[$phrase_key]['l' . $language_id . '_HintTranslation'] = $hint_translation;
 					$other_translations[$phrase_key]['l' . $language_id . '_ColumnTranslation'] = $column_translation;
 
 					$fields_hash = array_merge($fields_hash, $other_translations[$phrase_key]);
 					$this->Conn->doInsert($fields_hash, $this->_tables['phrases'], 'REPLACE', false);
 				}
 			}
 
 			if ( $this->Application->isDebugMode() ) {
 				$this->Application->Debugger->profileFinish('L[' . $language_id . ']P', 'Language: ' . $language_id . '; Phrases Import');
 			}
 
 			$this->Conn->doInsert($fields_hash, $this->_tables['phrases'], 'REPLACE');
 		}
 
 		/**
 		 * Performs email event import
 		 *
 		 * @param SimpleXMLElement $events
 		 * @param int $language_id
 		 * @param string $language_encoding
 		 */
 		function _processEvents($events, $language_id, $language_encoding)
 		{
 			static $other_translations = Array ();
 
 			if ( $this->Application->isDebugMode() ) {
 				$this->Application->Debugger->profileStart('L[' . $language_id . ']E', 'Language: ' . $language_id . '; Events Import');
 			}
 
 			$email_message_helper = $this->Application->recallObject('kEmailMessageHelper');
 			/* @var $email_message_helper kEmailMessageHelper */
 
 			foreach ($events as $event_node) {
 				/* @var $event_node SimpleXMLElement */
 
 				$message_type = (string)$event_node['MessageType'];
 				$event_id = $this->_getEventId((string)$event_node['Event'], (int)$event_node['Type']);
 
 				if ( !$event_id ) {
 					continue;
 				}
 
 				$fields_hash = Array (
 					'EventId' => $event_id,
 					'Event' => (string)$event_node['Event'],
 					'Type' => (int)$event_node['Type'],
 				);
 
 				if ( $message_type == '' ) {
 					$parsed = $email_message_helper->parseTemplate($event_node, '');
 					$parsed = array_map($language_encoding == 'plain' ? 'rtrim' : 'base64_decode', $parsed);
 
 				}
 				else {
 					$template = $language_encoding == 'plain' ? rtrim($event_node) : base64_decode($event_node);
 					$parsed = $email_message_helper->parseTemplate($template, $message_type);
 				}
 
 				if ( !array_key_exists($event_id, $other_translations) ) {
 					// ensure translation in every language to make same column count in every insert
 					$other_translations[$event_id] = Array ();
 
 					foreach ($this->_languages as $other_language_id) {
 						$other_translations[$event_id]['l' . $other_language_id . '_Subject'] = '';
 						$other_translations[$event_id]['l' . $other_language_id . '_HtmlBody'] = '';
 						$other_translations[$event_id]['l' . $other_language_id . '_PlainTextBody'] = '';
 					}
 				}
 
 				$other_translations[$event_id]['l' . $language_id . '_Subject'] = $parsed['Subject'];
 				$other_translations[$event_id]['l' . $language_id . '_HtmlBody'] = $parsed['HtmlBody'];
 				$other_translations[$event_id]['l' . $language_id . '_PlainTextBody'] = $parsed['PlainTextBody'];
 
 				if ( $parsed['Headers'] ) {
 					$other_translations[$event_id]['Headers'] = $parsed['Headers'];
 				}
 				elseif ( !$parsed['Headers'] && !array_key_exists('Headers', $other_translations[$event_id]) ) {
 					$other_translations[$event_id]['Headers'] = $parsed['Headers'];
 				}
 
 				$fields_hash = array_merge($fields_hash, $other_translations[$event_id]);
 				$this->Conn->doInsert($fields_hash, $this->_tables['emailevents'], 'REPLACE', false);
 			}
 
 			if ( $this->Application->isDebugMode() ) {
 				$this->Application->Debugger->profileFinish('L[' . $language_id . ']E', 'Language: ' . $language_id . '; Events Import');
 			}
 
 			if ( isset($fields_hash) ) {
 				// at least one email event in language pack was found in database
 				$this->Conn->doInsert($fields_hash, $this->_tables['emailevents'], 'REPLACE');
 			}
 		}
 
 		/**
 		 * Performs country_state translation import
 		 *
 		 * @param SimpleXMLElement $country_states
 		 * @param int $language_id
 		 * @param string $language_encoding
 		 * @param bool $process_states
 		 * @return void
 		 */
 		function _processCountries($country_states, $language_id, $language_encoding, $process_states = false)
 		{
 			static $other_translations = Array ();
 
 			foreach ($country_states as $country_state_node) {
 				/* @var $country_state_node SimpleXMLElement */
 
 				if ( $process_states ) {
 					$country_state_id = $this->_getStateId((string)$country_states['Iso'], (string)$country_state_node['Iso']);
 				}
 				else {
 					$country_state_id = $this->_getCountryId((string)$country_state_node['Iso']);
 				}
 
 				if ( !$country_state_id ) {
 					continue;
 				}
 
 				if ( $language_encoding == 'plain' ) {
 					$translation = rtrim($country_state_node['Translation']);
 				}
 				else {
 					$translation = base64_decode($country_state_node['Translation']);
 				}
 
 				$fields_hash = Array ('CountryStateId' => $country_state_id);
 
 
 				if ( !array_key_exists($country_state_id, $other_translations) ) {
 					// ensure translation in every language to make same column count in every insert
 					$other_translations[$country_state_id] = Array ();
 
 					foreach ($this->_languages as $other_language_id) {
 						$other_translations[$country_state_id]['l' . $other_language_id . '_Name'] = '';
 					}
 				}
 
 				$other_translations[$country_state_id]['l' . $language_id . '_Name'] = $translation;
 
 				$fields_hash = array_merge($fields_hash, $other_translations[$country_state_id]);
 				$this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE', false);
 
 				// PHP 5.3 version would be: $country_state_node->count()
 				if ( !$process_states && count($country_state_node->children()) ) {
 					$this->_processCountries($country_state_node, $language_id, $language_encoding, true);
 				}
 			}
 
 			$this->Conn->doInsert($fields_hash, $this->_tables['country-state'], 'REPLACE');
 		}
 
 		/**
 		 * Creates/updates language based on given fields and returns it's id
 		 *
 		 * @param Array $fields_hash
 		 * @return int
 		 */
 		function _processLanguage($fields_hash)
 		{
 			// 1. get language from database
 			$sql = 'SELECT ' . $this->lang_object->IDField . '
 					FROM ' . $this->lang_object->TableName . '
 					WHERE PackName = ' . $this->Conn->qstr($fields_hash['PackName']);
 			$language_id = $this->Conn->GetOne($sql);
 
 			if ($language_id) {
 				// 2. language found -> update, when allowed
 				$this->lang_object->Load($language_id);
 
 				if ($this->import_mode == LANG_OVERWRITE_EXISTING) {
 					// update live language record based on data from xml
 					$this->lang_object->SetFieldsFromHash($fields_hash);
 					$this->lang_object->Update();
 				}
 			}
 			else {
 				// 3. language not found -> create
 				$this->lang_object->SetFieldsFromHash($fields_hash);
 				$this->lang_object->SetDBField('Enabled', STATUS_ACTIVE);
 
 				if ($this->lang_object->Create()) {
 					$language_id = $this->lang_object->GetID();
 
 					if (defined('IS_INSTALL') && IS_INSTALL) {
 						// language created during install becomes admin interface language
 						$this->lang_object->setPrimary(true, true);
 					}
 				}
 			}
 
 			// 4. collect ID of every processed language
 			if (!in_array($language_id, $this->_languages)) {
 				$this->_languages[kUtil::crc32($fields_hash['PackName'])] = $language_id;
 			}
 
 			return $language_id;
 		}
 
 		/**
 		 * Returns event id based on it's name and type
 		 *
 		 * @param string $event_name
 		 * @param string $event_type
 		 * @return int
 		 */
 		function _getEventId($event_name, $event_type)
 		{
 			$cache_key = $event_name . '_' . $event_type;
 
 			return array_key_exists($cache_key, $this->events_hash) ? $this->events_hash[$cache_key] : 0;
 		}
 
 		/**
 		 * Returns country id based on it's 3letter ISO code
 		 *
 		 * @param string $iso
 		 * @return int
 		 */
 		function _getCountryId($iso)
 		{
 			static $cache = null;
 
 			if (!isset($cache)) {
 				$sql = 'SELECT CountryStateId, IsoCode
 						FROM ' . TABLE_PREFIX . 'CountryStates
 						WHERE Type = ' . DESTINATION_TYPE_COUNTRY;
 				$cache = $this->Conn->GetCol($sql, 'IsoCode');
 			}
 
 			return array_key_exists($iso, $cache) ? $cache[$iso] : false;
 		}
 
 		/**
 		 * Returns state id based on 3letter country ISO code and 2letter state ISO code
 		 *
 		 * @param string $country_iso
 		 * @param string $state_iso
 		 * @return int
 		 */
 		function _getStateId($country_iso, $state_iso)
 		{
 			static $cache = null;
 
 			if (!isset($cache)) {
 				$sql = 'SELECT CountryStateId, CONCAT(StateCountryId, "-", IsoCode) AS IsoCode
 						FROM ' . TABLE_PREFIX . 'CountryStates
 						WHERE Type = ' . DESTINATION_TYPE_STATE;
 				$cache = $this->Conn->GetCol($sql, 'IsoCode');
 			}
 
 			$country_id = $this->_getCountryId($country_iso);
 
 			return array_key_exists($country_id . '-' . $state_iso, $cache) ? $cache[$country_id . '-' . $state_iso] : false;
 		}
 
 		/**
 		 * Returns comma-separated list of IDs, that will be exported
 		 *
 		 * @param string $prefix
 		 * @return string
 		 * @access public
 		 */
 		public function getExportIDs($prefix)
 		{
 			$ids = $this->Application->RecallVar($prefix . '_selected_ids');
 
 			if ( $ids ) {
 				// some records were selected in grid
 				return $ids;
 			}
 
 			$tag_params = Array (
 				'grid' => $prefix == 'phrases' ? 'Phrases' : 'Emails',
 				'skip_counting' => 1,
 				'per_page' => -1
 			);
 
 			$list = $this->Application->recallObject($prefix, $prefix . '_List', $tag_params);
 			/* @var $list kDBList */
 
 			$sql = $list->getCountSQL($list->GetSelectSQL());
 			$sql = str_replace('COUNT(*) AS count', $list->TableName . '.' . $list->IDField, $sql);
 
 			$ids = '';
 			$rows = $this->Conn->GetIterator($sql);
 
 			if ( count($rows) ) {
 				foreach ($rows as $row) {
 					$ids .= ',' . $row[$list->IDField];
 				}
 
 				$ids = substr($ids, 1);
 			}
 
 			return $ids;
 		}
 	}
\ No newline at end of file
Index: branches/5.2.x/core/units/helpers/mime_decode_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/mime_decode_helper.php	(revision 15444)
+++ branches/5.2.x/core/units/helpers/mime_decode_helper.php	(revision 15445)
@@ -1,496 +1,494 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	/**
 	 * The MIME decoding class
 	 *
 	 */
 	class MimeDecodeHelper extends kHelper {
 
 		/**
 		 * Contains headers part of email message
 		 *
 		 * @var string
 		 */
 		var $_headerPart;
 
 		/**
 		 * Contains body part of email message
 		 *
 		 * @var string
 		 */
 		var $_bodyPart;
 
 		/**
 		 * Last parsing error message (if any)
 		 *
 		 * @var string
 		 */
 		var $_lastErrorMessage = '';
 
 		/**
 		 * Decode message headers
 		 *
 		 * @var bool
 		 */
 		var $_decodeHeaders = false;
 
 		/**
 		 * Include email body in decoded result
 		 *
 		 * @var bool
 		 */
 		var $_includeBodies = true;
 
 		/**
 		 * Decode email body (only in case, when it will be included in result)
 		 *
 		 * @var bool
 		 */
 		var $_decodeBodies = false;
 
 		/**
 		 * Displays parsing error
 		 *
 		 * @param string $str
 		 */
 		function raiseError($str)
 		{
 			trigger_error('Error during email parsing: ' . $str, E_USER_WARNING);
 		}
 
 		/**
 		 * Initializes mime parsing using given email message
 		 *
 		 * @param string $message
 		 */
 		function InitHelper($message = null)
 		{
 			if (!isset($message)) {
 				return ;
 			}
 
 			list ($header, $body) = $this->_splitBodyHeader($message);
 
 			$this->_headerPart = $header;
 			$this->_bodyPart = $body;
 		}
 
 		/**
 		 * Decodes email message, that was previously set using InitHelper method
 		 *
 		 * @param bool $decode_headers
 		 * @param bool $include_bodies
 		 * @param bool $decode_bodies
 		 * @return stdClass
 		 */
 		function decode($decode_headers = false, $include_bodies = false, $decode_bodies = false)
 		{
 			$this->_decodeHeaders = $decode_headers;
 			$this->_includeBodies = $include_bodies;
 			$this->_decodeBodies  = $decode_bodies;
 
 			$ret = $this->decodePart($this->_headerPart, $this->_bodyPart);
 
 			if ($ret === false) {
 				$this->raiseError($this->_lastErrorMessage);
 
 				return false;
 			}
 
 			return $ret;
 		}
 
 		function decodePart($headers, $body, $default_ctype = 'text/plain', $only_headers = false)
 		{
 			$return = new stdClass;
 
 			// process headers
 			$return->headers = Array ();
 			$headers = $this->_parseHeaders($headers, $this->_decodeHeaders);
 			$single_headers = Array ('subject', 'from', 'to', 'cc', 'reply-to', 'date');
 
 			foreach ($headers as $value) {
 				$header_name = strtolower($value['name']);
 				$header_value = $only_headers ? $this->_decodeHeader($value['value']) : $value['value'];
 
 				if (array_key_exists($header_name, $return->headers) && !is_array($return->headers[$header_name]) && !in_array($header_name, $single_headers)) {
 					// this is not a single header, so convert it to array, when 2nd value is found
 					$return->headers[$header_name] = Array ( $return->headers[$header_name] );
 					$return->headers[$header_name][] = $header_value;
 				}
 				elseif (array_key_exists($header_name, $return->headers) && !in_array($header_name, $single_headers)) {
 					$return->headers[$header_name][] = $header_value;
 				}
 				else {
 					$return->headers[$header_name] = $header_value;
 				}
 			}
 
 			if ($only_headers) {
 				return $return->headers;
 			}
 
 			foreach ($headers as $value) {
 				$header_name = strtolower($value['name']);
 				$header_value = $value['value'];
 
 				switch ($header_name) {
 					case 'content-type':
 						$content_type = $this->_parseHeaderValue($header_value);
 
 						if (preg_match('/([0-9a-z+.-]+)\/([0-9a-z+.-]+)/i', $content_type['value'], $regs)) {
 							// "text/plain", "text/html", etc.
 							$return->ctype_primary   = $regs[1];
 							$return->ctype_secondary = $regs[2];
 						}
 
 						if (array_key_exists('other', $content_type)) {
 							// "charset", etc.
 							foreach ($content_type['other'] as $p_name => $p_value) {
 								$return->ctype_parameters["$p_name"] = $p_value;
 							}
 						}
 						break;
 
 					case 'content-disposition';
 						$content_disposition = $this->_parseHeaderValue($header_value);
 						$return->disposition = $content_disposition['value'];
 
 						if (array_key_exists('other', $content_disposition)) {
 							// "filename", etc.
 							foreach ($content_disposition['other'] as $p_name => $p_value) {
 								$return->d_parameters["$p_name"] = $p_value;
 							}
 						}
 						break;
 
 					case 'content-transfer-encoding':
 						$content_transfer_encoding = $this->_parseHeaderValue($header_value);
 						break;
 				}
 			}
 
 			// process message body
 			if (isset($content_type)) {
 				switch ( strtolower($content_type['value']) ) {
 					case 'text/plain':
 					case 'text/html':
 						if ($this->_includeBodies) {
 							$encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit';
 							$return->body = $this->_decodeBodies ? $this->_decodeBody($body, $encoding) : $body;
 						}
 						break;
 
 					case 'multipart/parallel':
 					case 'multipart/report': // RFC1892
 					case 'multipart/signed': // PGP
 					case 'multipart/digest':
 					case 'multipart/alternative':
 					case 'multipart/appledouble':
 					case 'multipart/related':
 					case 'multipart/mixed':
 						if (!isset($content_type['other']['boundary'])) {
 							$this->_lastErrorMessage = 'No boundary found for ' . $content_type['value'] . ' part';
 							return false;
 						}
 
 						$default_ctype = (strtolower($content_type['value']) === 'multipart/digest') ? 'message/rfc822' : 'text/plain';
 
 						$parts = $this->_boundarySplit($body, $content_type['other']['boundary']);
 
 						for ($i = 0; $i < count($parts); $i++) {
 							list ($part_header, $part_body) = $this->_splitBodyHeader($parts[$i]);
 							$part = $this->decodePart($part_header, $part_body, $default_ctype);
 
 							if ($part === false) {
 								// part is broken
 								$this->raiseError($this->_lastErrorMessage);
 							}
 
 							$return->parts[] = $part;
 						}
 						break;
 
 					case 'message/rfc822':
 					case 'message/disposition-notification':
 						// create another instance, not to interfear with main parser
 						$mime_decode_helper = $this->Application->makeClass('MimeDecodeHelper');
 						/* @var $mime_decode_helper MimeDecodeHelper */
 
 						$mime_decode_helper->InitHelper($body);
 
 						$return->parts[] = $mime_decode_helper->decode(true, $this->_includeBodies, $this->_decodeBodies);
 						unset($mime_decode_helper);
 						break;
 
 					default:
 						if ($this->_includeBodies) {
 							$encoding = isset($content_transfer_encoding) ? $content_transfer_encoding['value'] : '7bit';
 							$return->body = $this->_decodeBodies ? $this->_decodeBody($body, $encoding) : $body;
 						}
 						break;
 				}
 
 			} else {
 				$ctype = explode('/', $default_ctype);
 				$return->ctype_primary = $ctype[0];
 				$return->ctype_secondary = $ctype[1];
 
 				if ($this->_includeBodies) {
 					$return->body = $this->_decodeBodies ? $this->_decodeBody($body) : $body;
 				}
 			}
 
 			return $return;
 		}
 
 		/**
 		 * Divides message into header and body parts
 		 *
 		 * @param string $input
 		 * @return Array
 		 */
 		function _splitBodyHeader($input)
 		{
 			if (strpos($input, "\r\n\r\n") === false) {
 				return Array ($input, '');
 			} elseif (preg_match("/^(.*?)\r?\n\r?\n(.*)/s", $input, $match)) {
 				return Array ($match[1], $match[2]);
 			} else {
 				$this->_lastErrorMessage = 'Could not split header and body';
 
 				return false;
 			}
 		}
 
 		/**
 		 * Parses headers string into array and optionally decode them
 		 *
 		 * @param string $input
 		 * @param bool $decode
 		 * @return Array
 		 */
 		function _parseHeaders($input, $decode = false)
 		{
 			if (!$input) {
 				return Array ();
 			}
 
 			$ret = Array ();
 
 			// Unfold the input
 			$input   = preg_replace("/\r\n/", "\n", $input);
 			$input   = preg_replace("/\n(\t| )+/", ' ', $input);
 			$headers = explode("\n", trim($input));
 
 			foreach ($headers as $value) {
 				$pos = strpos($value, ':');
 				$hdr_name = substr($value, 0, $pos);
 				$hdr_value = substr($value, $pos + 1);
 
 				if ($hdr_value[0] == ' ') {
 					$hdr_value = substr($hdr_value, 1);
 				}
 
 				$ret[] = Array (
 					'name'  => $hdr_name,
 					'value' => $decode ? $this->_decodeHeader($hdr_value) : $hdr_value
 				);
 			}
 
 			return $ret;
 		}
 
 		/**
 		 * Parses header value in following format (without quotes): "multipart/alternative; boundary=001636c9274051e332048498d8cc"
 		 *
 		 * @param string $input
 		 * @return Array
 		 */
 		function _parseHeaderValue($input)
 		{
 			$ret = Array ();
 			$pos = strpos($input, ';');
 
 			if ($pos === false) {
 				$ret['value'] = trim($input);
 
 				return $ret;
 			}
 
 			// get text until first ";"
 			$ret['value'] = trim(substr($input, 0, $pos));
 			$input = trim(substr($input, $pos + 1));
 
 			if (strlen($input) > 0) {
 				// This splits on a semi-colon, if there's no preceeding backslash
 				// Can't handle if it's in double quotes however. (Of course anyone
 				// sending that needs a good slap).
 				$parameters = preg_split('/\s*(?<!\\\\);\s*/i', $input);
 
 				for ($i = 0; $i < count($parameters); $i++) {
 					$pos = strpos($parameters[$i], '=');
 					$param_name  = substr($parameters[$i], 0, $pos);
 					$param_value = substr($parameters[$i], $pos + 1);
 
 					if ($param_value[0] == '"') {
 						$param_value = substr($param_value, 1, -1);
 					}
 
 					$ret['other']["$param_name"] = $param_value;
 					$ret['other'][ strtolower($param_name) ] = $param_value;
 				}
 			}
 
 			return $ret;
 		}
 
 		/**
 		 * Splits input body using given boundary
 		 *
 		 * @param string $input
 		 * @param string $boundary
 		 * @return Array
 		 */
 		function _boundarySplit($input, $boundary)
 		{
 			$tmp = explode('--' . $boundary, $input);
 
 			for ($i = 1; $i < count($tmp) - 1; $i++) {
 				$parts[] = $tmp[$i];
 			}
 
 			return $parts;
 		}
 
 		/**
 		 * Decode message header value
 		 *
 		 * @param string $input
 		 * @return string
 		 */
 		function _decodeHeader($input)
 		{
 			// Remove white space between encoded-words (http://www.ietf.org/rfc/rfc2047.txt)
 			$regexp = '/(=\?[^?]+\?(Q|B)\?[^?]*\?=)(\s)+=\?/i';
 
 			while (preg_match($regexp, $input)) {
 				// process each word separately
 				$input = preg_replace($regexp, '\1=?', $input);
 			}
 
 			// For each encoded-word...
 			while (preg_match('/(=\?([^?]+)\?(Q|B)\?([^?]*)\?=)/i', $input, $matches)) {
 				$encoded = $matches[1];
 				$charset = $matches[2];
 				$encoding = $matches[3];
 				$text = $matches[4];
 
 				switch (strtoupper($encoding)) {
 					case 'B':
 						$text = base64_decode($text);
 						break;
 
 					case 'Q':
 						// $text = $this->_quotedPrintableDecode($text);
 						$text = str_replace('_', ' ', $text);
 						preg_match_all('/=([a-f0-9]{2})/i', $text, $matches);
 
 						foreach($matches[1] as $value) {
 							$text = str_replace('=' . $value, chr(hexdec($value)), $text);
 						}
 						break;
 				}
 
 				$input = $this->convertEncoding($charset, str_replace($encoded, $text, $input));
 			}
 
 			return $input;
 		}
 
 		/**
 		 * Converts encoding to one, that site uses
 		 *
-		 * @param string $from_engoding
+		 * @param string $from_encoding
 		 * @param string $text
 		 * @return string
 		 * @author Alex
 		 */
-		function convertEncoding($from_engoding, $text)
+		function convertEncoding($from_encoding, $text)
 		{
-			if (!function_exists('mb_convert_encoding')) {
+			if ( !function_exists('mb_convert_encoding') ) {
 				// if mbstring extension not installed
 				return $text;
 			}
 
 			static $to_encoding = false;
 
-			if ($to_encoding === false) {
-				$language = $this->Application->recallObject('lang.current');
-				/* @var $language LanguagesItem */
-				$to_encoding = $language->GetDBField('Charset');
+			if ( $to_encoding === false ) {
+				$to_encoding = CHARSET;
 			}
 
-			return mb_convert_encoding($text, $to_encoding, $from_engoding);
+			return mb_convert_encoding($text, $to_encoding, $from_encoding);
 
 		}
 
 		/**
 		 * Decodes message body
 		 *
 		 * @param string $input
 		 * @param string $encoding
 		 * @return string
 		 */
 		function _decodeBody($input, $encoding = '7bit')
 		{
 			switch (strtolower($encoding)) {
 				case 'quoted-printable':
 					return $this->_quotedPrintableDecode($input);
 					break;
 
 				case 'base64':
 					return base64_decode($input);
 					break;
 			}
 
 			// for 7bit, 8bit, anything else
 			return $input;
 		}
 
 		/**
 		 * Decodes "quoted-printable" encoding
 		 *
 		 * @param string $string
 		 * @return string
 		 */
 		function _quotedPrintableDecode($string)
 		{
 			// Remove soft line breaks
 			$string = preg_replace("/=\r?\n/", '', $string);
 
 			// Replace encoded characters
 			if (preg_match_all('/=[a-f0-9]{2}/i', $string, $matches)) {
 				$matches = array_unique($matches[0]);
 				foreach ($matches as $value) {
 					$string = str_replace($value, chr(hexdec(substr($value,1))), $string);
 				}
 			}
 
 			return $string;
 		}
 	}
\ No newline at end of file
Index: branches/5.2.x/core/units/helpers/csv_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/csv_helper.php	(revision 15444)
+++ branches/5.2.x/core/units/helpers/csv_helper.php	(revision 15445)
@@ -1,387 +1,380 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	kUtil::safeDefine('EXPORT_STEP', 100); // export by 100 items
 	kUtil::safeDefine('IMPORT_STEP', 10);
 
 	class kCSVHelper extends kHelper {
 
 		var $PrefixSpecial;
 		var $grid;
 
 		var $delimiter_mapping = Array(0 => "\t", 1 => ',', 2 => ';', 3 => ' ', 4 => ':');
 		var $enclosure_mapping = Array(0 => '"', 1 => "'");
 		var $separator_mapping = Array(0 => "\n", 1 => "\r\n");
 
 		function ExportStep()
 		{
 			$export_data = $this->Application->RecallVar('export_data');
 			$export_rand = $this->Application->RecallVar('export_rand');
 			$get_rand = $this->Application->GetVar('export_rand');
 
 			$file_helper = $this->Application->recallObject('FileHelper');
 			/* @var $file_helper FileHelper */
 
 			if ( $export_data && $export_rand == $get_rand ) {
 				$export_data = unserialize($export_data);
 				$first_step = false;
 			}
 			else {
 				// first step
 				$export_data = Array ();
 				$export_data['prefix'] = $this->PrefixSpecial;
 				$export_data['grid'] = $this->grid;
 				$export_data['file_name'] = EXPORT_PATH . '/' . $file_helper->ensureUniqueFilename(EXPORT_PATH, 'export_' . $export_data['prefix'] . '.csv');
 				$export_data['step'] = EXPORT_STEP;
 				$export_data['delimiter'] = $this->delimiter_mapping[(int)$this->Application->ConfigValue('CSVExportDelimiter')];
 				$export_data['enclosure'] = $this->enclosure_mapping[(int)$this->Application->ConfigValue('CSVExportEnclosure')];
 				$export_data['record_separator'] = $this->separator_mapping[(int)$this->Application->ConfigValue('CSVExportSeparator')];
 				$export_data['page'] = 1;
-
-				$lang_object = $this->Application->recallObject('lang.current');
-				/* @var $lang_object LanguagesItem */
-
-				$export_data['source_encoding'] = strtoupper($lang_object->GetDBField('Charset'));
+				$export_data['source_encoding'] = strtoupper(CHARSET);
 				$export_data['encoding'] = $this->Application->ConfigValue('CSVExportEncoding') ? false : 'UTF-16LE';
 
 				$this->Application->StoreVar('export_rand', $get_rand);
 
 				$first_step = true;
 			}
 
 			$file = fopen($export_data['file_name'], $first_step ? 'w' : 'a');
 
 			$prefix_elems = preg_split('/\.|_/', $export_data['prefix'], 2);
 			$grids = $this->Application->getUnitOption($prefix_elems[0], 'Grids');
 			$grid_config = $grids[$export_data['grid']]['Fields'];
 
 			$list_params = Array ('per_page' => $export_data['step'], 'grid' => $export_data['grid']);
 			$list = $this->Application->recallObject(rtrim(implode('.', $prefix_elems), '.'), $prefix_elems[0] . '_List', $list_params);
 			/* @var $list kDBList */
 
 			$list->SetPage($export_data['page']);
 			$list->Query();
 			$list->GoFirst();
 
 			$picker_helper = $this->Application->recallObject('ColumnPickerHelper');
 			/* @var $picker_helper kColumnPickerHelper */
 
 			$picker_helper->ApplyPicker(rtrim(implode('.', $prefix_elems), '.'), $grid_config, $export_data['grid']);
 
 			if ( $first_step ) {
 				// if UTF-16, write Unicode marker
 				if ( $export_data['encoding'] == 'UTF-16LE' ) {
 					fwrite($file, chr(0xFF) . chr(0xFE));
 				}
 
 				// inserting header line
 				$headers = Array ();
 				foreach ($grid_config as $field_name => $field_data) {
 					$use_phrases = array_key_exists('use_phrases', $field_data) ? $field_data['use_phrases'] : true;
 					$field_title = isset($field_data['title']) ? $field_data['title'] : 'column:la_fld_' . $field_name;
 					$header = $use_phrases ? $this->Application->Phrase($field_title) : $field_title;
 					array_push($headers, $header);
 				}
 
 				$csv_line = kUtil::getcsvline($headers, $export_data['delimiter'], $export_data['enclosure'], $export_data['record_separator']);
 				if ( $export_data['encoding'] ) {
 					$csv_line = mb_convert_encoding($csv_line, $export_data['encoding'], $export_data['source_encoding']);
 				}
 				fwrite($file, $csv_line);
 			}
 
 			while (!$list->EOL()) {
 				$data = Array ();
 				foreach ($grid_config as $field_name => $field_data) {
 					if ( isset($field_data['export_field']) ) {
 						$field_name = $field_data['export_field'];
 					}
 					$value = $list->GetField($field_name, isset($field_data['format']) ? $field_data['format'] : null);
 					$value = str_replace("\r\n", "\n", $value);
 					$value = str_replace("\r", "\n", $value);
 					array_push($data, $value);
 				}
 
 				if ( $export_data['encoding'] == 'UTF-16LE' ) {
 					fwrite($file, chr(0xFF) . chr(0xFE));
 				}
 
 				$csv_line = kUtil::getcsvline($data, $export_data['delimiter'], $export_data['enclosure'], $export_data['record_separator']);
 				if ( $export_data['encoding'] ) {
 					$csv_line = mb_convert_encoding($csv_line, $export_data['encoding'], $export_data['source_encoding']);
 				}
 				fwrite($file, $csv_line);
 
 				$list->GoNext();
 			}
 
 			$records_processed = $export_data['page'] * $export_data['step'];
 			$percent_complete = min($records_processed / $list->GetRecordsCount() * 100, 100);
 
 			fclose($file);
 
 			if ( $records_processed >= $list->GetRecordsCount() ) {
 				$this->Application->StoreVar('export_data', serialize($export_data));
 				$this->Application->Redirect($this->Application->GetVar('finish_template'));
 			}
 
 			echo $percent_complete;
 
 			$export_data['page']++;
 			$this->Application->StoreVar('export_data', serialize($export_data));
 		}
 
 		function ExportData($name)
 		{
 			$export_data = unserialize($this->Application->RecallVar('export_data'));
 			return isset($export_data[$name]) ? $export_data[$name] : false;
 		}
 
 		/**
 		 * Returns prefix from request or from stored import/export data
 		 *
 		 * @param bool $is_import
 		 * @return string
 		 */
 		public function getPrefix($is_import = false)
 		{
 			$prefix = $this->Application->GetVar('PrefixSpecial');
 
 			if ( !$prefix ) {
 				return $is_import ? $this->ImportData('prefix') : $this->ExportData('prefix');
 			}
 
 			return $prefix;
 		}
 
 		function GetCSV()
 		{
 			kUtil::safeDefine('DBG_SKIP_REPORTING', 1);
 
 			$export_data = unserialize($this->Application->RecallVar('export_data'));
 			$filename = preg_replace('/(.*)\.csv$/', '\1', basename($export_data['file_name'])) . '.csv';
 
 			$this->Application->setContentType('text/csv');
 			header('Content-Disposition: attachment; filename="' . $filename . '"');
 			readfile($export_data['file_name']);
 			die();
 		}
 
 		function ImportStart($filename)
 		{
 			if(!file_exists($filename) || !is_file($filename)) return 'cant_open_file';
 
 			$import_data = Array();
-
-			$lang_object = $this->Application->recallObject('lang.current');
-			/* @var $lang_object LanguagesItem */
-			$import_data['source_encoding'] = strtoupper( $lang_object->GetDBField('Charset') );
+			$import_data['source_encoding'] = strtoupper(CHARSET);
 			$import_data['encoding'] = $this->Application->ConfigValue('CSVExportEncoding') ? false : 'UTF-16LE';
 			$import_data['errors'] = '';
 
 			// convert file in case of UTF-16LE
 			if($import_data['source_encoding'] != $import_data['encoding']) {
 				copy($filename, $filename.'.orginal');
 				$file_content = file_get_contents($filename);
 				$file = fopen($filename, 'w');
 				fwrite($file, mb_convert_encoding(str_replace(chr(0xFF).chr(0xFE), '', $file_content), $import_data['source_encoding'], $import_data['encoding']));
 				fclose($file);
 
 			}
 
 			$import_data['prefix'] = $this->PrefixSpecial;
 			$import_data['grid'] = $this->grid;
 			$import_data['file'] = $filename;
 			$import_data['total_lines'] = count(file($filename));
 			if(!$import_data['total_lines']) $import_data['total_lines'] = 1;
 			unset($file_content);
 			$import_data['lines_processed'] = 0;
 			$import_data['delimiter'] = $this->delimiter_mapping[(int)$this->Application->ConfigValue('CSVExportDelimiter')];
 			$import_data['enclosure'] = $this->enclosure_mapping[(int)$this->Application->ConfigValue('CSVExportEnclosure')];
 			$import_data['step'] = IMPORT_STEP;
 			$import_data['not_imported_lines'] = '';
 			$import_data['added'] = 0;
 			$import_data['updated'] = 0;
 
 			$file = fopen($filename, 'r');
 			// getting first line for headers
 			$headers = fgetcsv($file, 8192, $import_data['delimiter'], $import_data['enclosure']);
 			fclose($file);
 
 			$prefix_elems = preg_split('/\.|_/', $import_data['prefix'], 2);
 			$grids = $this->Application->getUnitOption($prefix_elems[0], 'Grids');
 			$grid_config = $grids[ $import_data['grid'] ]['Fields'];
 
 			$field_list = Array();
 			foreach($grid_config as $field_name => $field_data) {
 				if(isset($field_data['export_field'])) {
 					$field_name = $field_data['export_field'];
 				}
 				$field_title = isset($field_data['title']) ? $field_data['title'] : 'column:la_fld_' . $field_name;
 				$field_label = $this->Application->Phrase($field_title);
 				$field_pos = array_search($field_label, $headers);
 				if($field_pos !== false) {
 					$field_list[$field_pos] = $field_name;
 				}
 			}
 
 			if(!count($field_list)) return 'no_matching_columns';
 			$import_data['field_list'] = $field_list;
 
 			// getting key list
 			$field_positions = Array();
 			$config_key_list = $this->Application->getUnitOption($prefix_elems[0], 'ImportKeys');
 			if(!$config_key_list) $config_key_list = Array();
 			array_unshift($config_key_list, Array($this->Application->getUnitOption($prefix_elems[0], 'IDField')));
 
 			$key_list = Array();
 			foreach($config_key_list as $arr_key => $import_key) {
 				$key_list[$arr_key] = is_array($import_key) ? $import_key : Array($import_key);
 
 				foreach($key_list[$arr_key] as $key_field) {
 					$field_positions[$key_field] = array_search($key_field, $import_data['field_list']);
 					if($field_positions[$key_field] === false) {
 						// no such key field combination in imported file
 						unset($key_list[$arr_key]);
 						break;
 					}
 				}
 			}
 			$import_data['key_list'] = $key_list;
 			$import_data['field_positions'] = $field_positions;
 
 			$this->Application->StoreVar('import_data', serialize($import_data));
 			return true;
 		}
 
 		function ImportStep()
 		{
 			$import_data = unserialize($this->Application->RecallVar('import_data'));
 			$prefix_elems = preg_split('/\.|_/', $import_data['prefix'], 2);
 
 			$object = $this->Application->recallObject($prefix_elems[0].'.-csvimport', $prefix_elems[0], Array('skip_autoload' => true, 'populate_ml_fields' => true));
 			/* @var $object kDBItem */
 
 			$file = fopen($import_data['file'], 'r');
 			$eof = false;
 			// skipping lines that has been already imported
 			for($i = 0; $i < $import_data['lines_processed'] + 1; $i++) {
 				if(feof($file)) break;
 				fgets($file, 8192);
 			}
 
 			$import_event = new kEvent($prefix_elems[0].'.-csvimport:OnBeforeCSVLineImport');
 
 			for($i = 0; $i < $import_data['step']; $i++) {
 				if(feof($file)) break;
 				$data = fgetcsv($file, 8192, $import_data['delimiter'], $import_data['enclosure']);
 				if(!$data) continue;
 
 				$object->Clear();
 				$action = 'Create';
 
 				// 1. trying to load object by keys
 				foreach($import_data['key_list'] as $key) {
 					$fail = false;
 					$key_array = Array();
 					foreach($key as $key_field) {
 						if(!isset($data[ $import_data['field_positions'][$key_field] ])) {
 							$fail = true;
 							break;
 						}
 						$key_array[$key_field] = $data[ $import_data['field_positions'][$key_field] ];
 					}
 					if($fail) continue;
 					if($object->Load($key_array)) {
 						$action = 'Update';
 						break;
 					}
 				}
 
 				// 2. set object fields
 				foreach($import_data['field_list'] as $position => $field_name) {
 					if(isset($data[$position])) {
 						$object->SetField($field_name, $data[$position]);
 					}
 				}
 
 				// 3. validate item and run event
 				$status = $object->Validate();
 				$import_event->status = $status ? kEvent::erSUCCESS : kEvent::erFAIL;
 				$this->Application->HandleEvent($import_event);
 
 				if($import_event->status == kEvent::erSUCCESS && $object->$action()) {
 					$import_data[ ($action == 'Create') ? 'added' : 'updated' ]++;
 				}
 				else {
 					$msg = '';
 					$errors = $object->GetFieldErrors();
 
 					foreach ($errors as $field => $info) {
 						if (!$info['pseudo']) continue;
 						$msg .= "$field: {$info['pseudo']} ";
 					}
 
 					$import_data['errors'] .= ($i + $import_data['lines_processed'] + 1).": $msg\n";
 					$import_data['not_imported_lines'] .= ','.($i + $import_data['lines_processed'] + 1);
 				}
 			}
 
 			$import_data['lines_processed'] += $import_data['step'];
 
 			$import_data['not_imported_lines'] = ltrim($import_data['not_imported_lines'], ',');
 			$this->Application->StoreVar('import_data', serialize($import_data));
 
 			$feof = feof($file);
 			fclose($file);
 
 			if($feof) {
 				$this->Application->Redirect($this->Application->GetVar('finish_template'));
 			}
 			else {
 				$percent_complete = floor($import_data['lines_processed'] / $import_data['total_lines'] * 100);
 				if($percent_complete > 99) $percent_complete = 99;
 				echo $percent_complete;
 			}
 		}
 
 		function ImportData($name)
 		{
 			$import_data = unserialize($this->Application->RecallVar('import_data'));
 			return isset($import_data[$name]) ? $import_data[$name] : false;
 		}
 
 		function GetNotImportedLines()
 		{
 			$import_data = unserialize($this->Application->RecallVar('import_data'));
 
 			if(!$import_data['not_imported_lines']) return false;
 			$line_numbers = explode(',', $import_data['not_imported_lines']);
 			$line_numbers[] = 0; // include header row in output
 
 			$file = fopen($import_data['file'], 'r');
 			$eof = false;
 			$result = '';
 			for($i = 0; $i <= max($line_numbers); $i++) {
 				if(feof($file)) break;
 				$line = fgets($file, 8192);
 				if(in_array($i, $line_numbers)) {
 					$result .= $i.':'.$line;
 				}
 			}
 			return $result."\n\n".$import_data['errors'];
 		}
 	}
\ No newline at end of file
Index: branches/5.2.x/core/units/fck/fck_eh.php
===================================================================
--- branches/5.2.x/core/units/fck/fck_eh.php	(revision 15444)
+++ branches/5.2.x/core/units/fck/fck_eh.php	(revision 15445)
@@ -1,254 +1,254 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	class FckEventHandler extends kDBEventHandler {
 
 		/**
 		 * Allows to override standard permission mapping
 		 *
 		 * @return void
 		 * @access protected
 		 * @see kEventHandler::$permMapping
 		 */
 		protected function mapPermissions()
 		{
 			parent::mapPermissions();
 
 			$permissions = Array (
 				'OnGetsEditorStyles' => Array ('self' => true),
 			);
 
 			$this->permMapping = array_merge($this->permMapping, $permissions);
 		}
 
 		/**
 		 * Checks user permission to execute given $event
 		 *
 		 * @param kEvent $event
 		 * @return bool
 		 * @access public
 		 */
 		public function CheckPermission(kEvent $event)
 		{
 			if ( $this->Application->isAdminUser || $event->Name == 'OnGetsEditorStyles' ) {
 				// this limits all event execution only to logged-in users in admin
 				return true;
 			}
 
 			return parent::CheckPermission($event);
 		}
 
 		function CreateXmlHeader()
 		{
 			ob_end_clean() ;
 			// Prevent the browser from caching the result.
 			// Date in the past
 			header('Expires: Mon, 26 Jul 1997 05:00:00 GMT') ;
 			// always modified
 			header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT') ;
 			// HTTP/1.1
 			header('Cache-Control: no-store, no-cache, must-revalidate') ;
 			header('Cache-Control: post-check=0, pre-check=0', false) ;
 			// HTTP/1.0
 			header('Pragma: no-cache') ;
 			// Set the response format.
 
 			$this->Application->setContentType('text/xml');
 			// Create the XML document header.
 		}
 
 		function OnLoadCmsTree($event)
 		{
 			$event->status = kEvent::erSTOP;
 
 			$category_helper = $this->Application->recallObject('CategoryHelper');
 			/* @var $category_helper CategoryHelper */
 
 			$pages = $category_helper->getStructureTreeAsOptions();
 
 			$sql = 'SELECT NamedParentPath, CategoryId
 					FROM ' . TABLE_PREFIX . 'Categories
 					WHERE CategoryId IN (' . implode(',', array_keys($pages)) . ')';
 			$templates = $this->Conn->GetCol($sql, 'CategoryId');
 
 			$templates[$this->Application->getBaseCategory()] .= '/Index'; // "Content" category will act as "Home Page"
 
-			$res = '<?xml version="1.0" encoding="utf-8" ?>' . "\n";
+			$res = '<?xml version="1.0" encoding="' . CHARSET . '" ?>' . "\n";
 			$res .= '<CmsPages>' . "\n";
 
 			foreach ($pages as $id => $title) {
 				$template = $templates[$id];
 				$page_path = preg_replace('/^Content\//i', '', strtolower($template).'.html');
 
 				$title = $title . ' (' . $page_path . ')';
 				$real_url = $this->Application->HREF($template, '_FRONT_END_', array('pass' => 'm'), 'index.php');
 
 				$res .= '<CmsPage real_url="' . $real_url . '" path="@@' . $id . '@@" title="' . htmlspecialchars($title, ENT_QUOTES) . '" st_id="' . $id . '" serverpath="" />' . "\n";
 			}
 
 			$res.= "</CmsPages>";
 
 			$this->CreateXmlHeader();
 			echo $res;
 		}
 
 		function OnRenameFile($event)
 		{
 			$event->status = kEvent::erSTOP;
 
 			if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
 				return;
 			}
 
 			$old_name = $this->Application->GetVar('old_name');
 			$new_name = $this->Application->GetVar('new_name');
 			$folder = $this->Application->GetVar('folder');
 			$sServerDir = WRITEABLE . '/user_files/' . $folder . '/';
 
 			if (!file_exists($sServerDir.$old_name) || !is_file($sServerDir.$old_name)) {
 				echo 204;
 				return;
 			}
 
 			$fck_helper = $this->Application->recallObject('FCKHelper');
 			/* @var $fck_helper fckFCKHelper*/
 
 			if ( !$fck_helper->IsAllowedExtension($folder, $new_name) ) {
 				echo 203;
 				return;
 			}
 
 			if ( !rename($sServerDir . $old_name, $sServerDir . $new_name) ) {
 //			echo $sServerDir.$old_name.' -> '.$sServerDir.$new_name;
 				echo 205;
 				return;
 			}
 
 			echo '0';
 		}
 
 
 		function OnDeleteFiles($event)
 		{
 			$event->status = kEvent::erSTOP;
 
 			if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
 				return;
 			}
 
 			$files = trim($this->Application->GetVar('files'),'|');
 	//		echo $files;
 			$a_files = explode('|', $files);
 			$folder = $this->Application->GetVar('folder');
 			$sServerDir = WRITEABLE . '/user_files/' . $folder . '/';
 
 			foreach ($a_files AS $file) {
 				@unlink($sServerDir.$file);
 			}
 
 	//		print_r($a_files);
 		}
 
 		function OnGetFoldersFilesList($event)
 		{
 			$this->CreateXmlHeader();
 
 			$fck_helper = $this->Application->recallObject('FCKHelper');
 			/* @var $fck_helper fckFCKHelper */
 
-			$ret = '<?xml version="1.0" encoding="utf-8" ?>'."\n" ;
+			$ret = '<?xml version="1.0" encoding="' . CHARSET . '" ?>'."\n" ;
 			$ret .= "<content>"."\n";
 			$ret .= $fck_helper->PrintFolders();
 			$ret .= $fck_helper->PrintFiles();
 			$ret .= "</content>"."\n";
 			echo $ret;
 			exit;
 		}
 
 
 		function OnCreateFolder($event)
 		{
 			$event->status = kEvent::erSTOP;
 
 			if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
 				return;
 			}
 
 			$new_folder 	= $this->Application->GetVar('new_folder');
 			$current_folder	= $this->Application->GetVar('current_folder');
 			$folderPath = WRITEABLE . '/user_files' . '/' . $current_folder . "/" . $new_folder;
 			if ( file_exists( $folderPath ) && is_dir($folderPath)) {
 				echo "101";
 			}
 
 			if ( !file_exists( $folderPath ) )
 			{
 				// Turn off all error reporting.
 				error_reporting( 0 ) ;
 				// Enable error tracking to catch the error.
 				ini_set( 'track_errors', '1' ) ;
 				// To create the folder with 0777 permissions, we need to set umask to zero.
 				$oldumask = umask(0) ;
 				mkdir( $folderPath, 0777 ) ;
 				umask( $oldumask ) ;
 				$sErrorMsg = $php_errormsg ;
 				// Restore the configurations.
 				ini_restore( 'track_errors' ) ;
 				ini_restore( 'error_reporting' ) ;
 				if ($sErrorMsg)
 					echo  $sErrorMsg ;
 				else
 					echo '0';
 			}
 		}
 
 		/**
 		 * Uploads a file from FCK file browser
 		 *
 		 * @param kEvent $event
 		 * @return void
 		 * @access protected
 		 */
 		protected function OnUploadFile(kEvent $event)
 		{
 			$event->status = kEvent::erSTOP;
 
 			if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
 				return;
 			}
 
 			$fck_helper = $this->Application->recallObject('FCKHelper');
 			/* @var $fck_helper fckFCKHelper*/
 
 			$fck_helper->UploadFile();
 		}
 
 		/**
 		 * Returns compressed CSS file
 		 *
 		 * @param kEvent $event
 		 */
 		function OnGetsEditorStyles($event)
 		{
 			$minify_helper = $this->Application->recallObject('MinifyHelper');
 			/* @var $minify_helper MinifyHelper */
 
 			$this->Application->InitParser();
 			$styles_css = $minify_helper->CompressScriptTag( Array ('files' => 'inc/style.css') );
 
 			$event->redirect = 'external:' . $styles_css;
 		}
 	}
\ No newline at end of file
Index: branches/5.2.x/core/units/languages/languages_config.php
===================================================================
--- branches/5.2.x/core/units/languages/languages_config.php	(revision 15444)
+++ branches/5.2.x/core/units/languages/languages_config.php	(revision 15445)
@@ -1,275 +1,274 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 defined('FULL_PATH') or die('restricted access!');
 
 $config = Array (
 	'Prefix' => 'lang',
 	'ItemClass' => Array ('class' => 'LanguagesItem', 'file' => 'languages_item.php', 'build_event' => 'OnItemBuild'),
 	'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
 	'EventHandlerClass' => Array ('class' => 'LanguagesEventHandler', 'file' => 'languages_event_handler.php', 'build_event' => 'OnBuild'),
 	'TagProcessorClass' => Array ('class' => 'LanguagesTagProcessor', 'file' => 'languages_tag_processor.php', 'build_event' => 'OnBuild'),
 
 	'AutoLoad' => true,
 	'Hooks' => Array (
 		Array (
 			'Mode' => hAFTER,
 			'Conditional' => false,
 			'HookToPrefix' => 'lang',
 			'HookToSpecial' => '*',
 			'HookToEvent' => Array('OnSave', 'OnMassDelete'),
 			'DoPrefix' => '',
 			'DoSpecial' => '',
 			'DoEvent' => 'OnScheduleTopFrameReload',
 		),
 	),
 	'QueryString' => Array (
 		1 => 'id',
 		2 => 'Page',
 		3 => 'PerPage',
 		4 => 'event',
 		5 => 'mode',
 	),
 
 	'IDField' => 'LanguageId',
 
 	'StatusField' => Array ('Enabled', 'PrimaryLang'),	// field, that is affected by Approve/Decline events
 
 	'TitleField' => 'PackName',		// field, used in bluebar when editing existing item
 
 	'TitlePresets' => Array (
 		'default' => Array (
 			'new_status_labels' => Array ('lang' => '!la_title_Adding_Language!'),
 			'edit_status_labels' => Array ('lang' => '!la_title_Editing_Language!'),
 		),
 		'languages_list' =>	Array (
 			'prefixes' => Array ('lang_List'), 'format' => "!la_title_Configuration! - !la_title_LanguagePacks!",
 			'toolbar_buttons' => Array (
 				'new_item', 'edit', 'delete', 'export', 'import', 'setprimary', 'refresh', 'view', 'dbl-click'
 			),
 		),
 		'languages_edit_general' => Array ('prefixes' => Array ('lang'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_General!"),
 		'phrases_list' => Array (
 			'prefixes' => Array ('lang', 'phrases_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_Labels!"
 		),
 		'phrase_edit' => Array (
 			'prefixes' => Array ('phrases'),
 			'new_status_labels' => Array ('phrases' => '!la_title_Adding_Phrase!'),
 			'edit_status_labels' => Array ('phrases'	=>	'!la_title_Editing_Phrase!'),
 			'format' => "#phrases_status# '#phrases_titlefield#'",
 		),
 		'import_language' => Array (
 			'prefixes' => Array ('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep1!",
 		),
 		'import_language_step2' => Array (
 			'prefixes' => Array ('phrases.import'), 'format' => "!la_title_InstallLanguagePackStep2!",
 		),
 		'export_language' => Array (
 			'prefixes' => Array ('phrases.export'), 'format' => "!la_title_ExportLanguagePackStep1!",
 		),
 		'export_language_results' => Array (
 			'prefixes' => Array(), 'format' => "!la_title_ExportLanguagePackResults!",
 		),
 		'events_list' => Array (
 			'prefixes' => Array ('lang', 'emailevents_List'), 'format' => "#lang_status# '#lang_titlefield#' - !la_title_EmailEvents!",
 		),
 		'email_messages_edit' => Array (
 			'prefixes' => Array ('lang', 'emailevents'),
 			'format' => "#lang_status# '#lang_titlefield#' - !la_title_EditingEmailEvent! '#emailevents_titlefield#'",
 			'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
 		),
 		// for separate language list
 		'languages_list_st' => Array (
 			'prefixes' => Array ('lang_List'), 'format' => "!la_title_LanguagesManagement!",
 		),
 	),
 
 	'EditTabPresets' => Array (
 		'Default' => Array (
 			'general' => Array ('title' => 'la_tab_General', 't' => 'regional/languages_edit', 'priority' => 1),
 			'labels' => Array ('title' => 'la_tab_Labels', 't' => 'regional/languages_edit_phrases', 'priority' => 2),
 			'email_events' => Array ('title' => 'la_tab_EmailEvents', 't' => 'regional/languages_edit_email_events', 'priority' => 3),
 		),
 	),
 
 	'PermSection' => Array ('main' => 'in-portal:configure_lang'),
 
 	'Sections' => Array (
 		'in-portal:configure_lang' => Array (
 			'parent' => 'in-portal:website_setting_folder',
 			'icon' => 'conf_regional',
 			'label' => 'la_tab_Regional',
 			'url' => Array ('t' => 'regional/languages_list', 'pass' => 'm'),
 			'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:set_primary', 'advanced:import', 'advanced:export'),
 			'priority' => 4,
 			'type' => stTREE,
 		),
 
 		// "Lang. Management"
 		/*'in-portal:lang_management' => Array (
 			'parent' => 'in-portal:system',
 			'icon'			=>	'core:settings_general',
 			'label'			=>	'la_title_LangManagement',
 			'url'			=>	Array ('t' => 'languages/language_list', 'pass' => 'm'),
 			'permissions'	=>	Array ('view', 'add', 'edit', 'delete'),
 			'perm_prefix'	=>	'lang',
 			'priority'		=>	10.03,
 			'show_mode'		=>	smSUPER_ADMIN,
 			'type'			=>	stTREE,
 		),*/
 	),
 
 	'TableName' => TABLE_PREFIX . 'Languages',
 
 	'AutoDelete' => true,
 	'AutoClone' => true,
 
 	'ListSQLs' => Array ('' => 'SELECT * FROM %s'),
 	'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
 
 	'ListSortings' => Array (
 		'' => Array (
 			'Sorting' => Array ('Priority' => 'desc', 'PackName' => 'asc'),
 		),
 	),
 
 	'Fields' => Array (
 		'LanguageId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
 		'PackName' => Array (
 			'type' => 'string',
 			'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'PackName',
 			'not_null' => 1, 'required' => 1, 'default' => ''
 		),
 		'LocalName' => Array (
 			'type' => 'string',
 			'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'LocalName', 'option_key_field' => 'LocalName',
 			'not_null' => 1, 'required' => 1, 'default' => ''
 		),
 		'Enabled' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_Disabled', 1 => 'la_Active'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 1
 		),
 		'PrimaryLang' => Array(
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 0
 		),
 		'AdminInterfaceLang' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 0
 		),
 		'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
 		'IconURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
 		'IconDisabledURL' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
 		'InputDateFormat' => Array (
 			'type' => 'string',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array ('m/d/Y' => 'mm/dd/yyyy', 'd/m/Y' => 'dd/mm/yyyy', 'm.d.Y' => 'mm.dd.yyyy', 'd.m.Y' => 'dd.mm.yyyy'),
 			'not_null' => 1, 'required' => 1, 'default' => 'm/d/Y'
 		),
 		'InputTimeFormat' => Array (
 			'type' => 'string',
 			'formatter' => 'kOptionsFormatter',
 			'options' => Array ('g:i:s A' => 'g:i:s A', 'g:i A' => 'g:i A', 'H:i:s' => 'H:i:s', 'H:i' => 'H:i'),
 			'not_null' => '1', 'required' => 1, 'default' => 'g:i:s A',
 		),
 		'DateFormat' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => 'm/d/Y'),
 		'ShortDateFormat' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => 'm/d'),
 		'TimeFormat' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => 'g:i:s A'),
 		'ShortTimeFormat' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => 'g:i A'),
 		'DecimalPoint' => Array ('type' => 'string', 'not_null' => 1, 'required' => 1, 'default' => '.'),
 		'ThousandSep' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
-		'Charset' => Array ('type' => 'string', 'not_null' => '1', 'required' => 1, 'default' => 'utf-8'),
 		'UnitSystem' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Metric', 2 => 'la_US_UK'), 'use_phrases' => 1,
 			'not_null' => 1, 'default' => 1
 		),
 		'FilenameReplacements' => Array ('type' => 'string', 'default' => NULL),
 		'Locale' => Array (
 			'type' => 'string',
 			'formatter' => 'kOptionsFormatter',
 			'options_sql' => "	SELECT CONCAT(LocaleName, ' ' ,'\/',Locale,'\/') AS Name, Locale
 								FROM " . TABLE_PREFIX . 'LocalesList
 								ORDER BY LocaleId',
 			'option_title_field' => 'Name', 'option_key_field' => 'Locale',
 		 	'not_null' => 1, 'default' => 'en-US',
 		),
 		'UserDocsUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
 		'SynchronizationModes' => Array (
 			'type' => 'string', 'max_len' => 255,
 			'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_SynchronizeToOthers', 2 => 'la_opt_SynchronizeFromOthers'), 'use_phrases' => 1, 'multiple' => 1,
 			'not_null' => 1, 'default' => ''
 		),
 		'HtmlEmailTemplate' => Array (
 			'type' => 'string',
 			'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!', 'body_missing' => '!la_error_EmailTemplateBodyMissing!'),
 			'default' => '$body'
 		),
 		'TextEmailTemplate' => Array (
 			'type' => 'string',
 			'error_msgs' => Array ('parsing_error' => '!la_error_ParsingError!', 'body_missing' => '!la_error_EmailTemplateBodyMissing!'),
 			'default' => NULL
 		),
 	),
 
 	'VirtualFields'	=> Array (
+		'Charset' => Array ('type' => 'string', 'default' => CHARSET), // for backwards compatibility
 		'CopyLabels' => Array ('type' => 'int', 'default' => 0),
 		'CopyFromLanguage' => Array (
 			'type' => 'int',
 			'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Languages ORDER BY PackName', 'option_title_field' => 'PackName', 'option_key_field' => 'LanguageId',
 			'default' => '',
 		),
 	),
 
 	'Grids'	=> Array(
 		'Default' => Array (
 			'Icons' => Array (
 				'default' => 'icon16_item.png',
 				'0_0' => 'icon16_disabled.png',
 				'0_1' => 'icon16_disabled.png',
 				'1_0' => 'icon16_item.png',
 				'1_1' => 'icon16_primary.png',
 			),
 			'Fields' => Array(
 				'LanguageId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 50, ),
 				'PackName' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),//
 				'PrimaryLang' => Array ('title' => 'la_col_IsPrimaryLanguage', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
 				'AdminInterfaceLang' => Array ('filter_block' => 'grid_options_filter', 'width' => 150, ),
-				'Charset' => Array ('filter_block' => 'grid_like_filter', 'width' => 100, ),
 				'Priority' => Array ('filter_block' => 'grid_like_filter', 'width' => 60, ),
 				'Enabled' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
 				'SynchronizationModes' => Array ('filter_block' => 'grid_picker_filter', 'width' => 120, 'format' => ', ', 'hidden' => 1),
 			),
 		),
 
 		/*'LangManagement' => Array (
 			'Icons' => Array (
 				'default' => 'icon16_item.png',
 				'0_0' => 'icon16_disabled.png',
 				'0_1' => 'icon16_disabled.png',
 				'1_0' => 'icon16_item.png',
 				'1_1' => 'icon16_primary.png',
 			),
 			'Fields' => Array (
 				'LanguageId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60),
 				'PackName' => Array ('title' => 'column:la_fld_Language', 'filter_block' => 'grid_options_filter', 'width' => 120),
 				'LocalName' => Array ('title' => 'column:la_fld_Prefix', 'filter_block' => 'grid_options_filter', 'width' => 120),
 				'IconURL' => Array ('title' => 'column:la_fld_Image', 'filter_block' => 'grid_empty_filter', 'width' => 80),
 			),
 		),*/
 	),
 );
\ No newline at end of file
Index: branches/5.2.x/core/units/languages/languages_tag_processor.php
===================================================================
--- branches/5.2.x/core/units/languages/languages_tag_processor.php	(revision 15444)
+++ branches/5.2.x/core/units/languages/languages_tag_processor.php	(revision 15445)
@@ -1,144 +1,133 @@
 <?php
 /**
 * @version	$Id$
 * @package	In-Portal
 * @copyright	Copyright (C) 1997 - 2009 Intechnic. All rights reserved.
 * @license      GNU/GPL
 * In-Portal is Open Source software.
 * This means that this software may have been modified pursuant
 * the GNU General Public License, and as distributed it includes
 * or is derivative of works licensed under the GNU General Public License
 * or other free or open source software licenses.
 * See http://www.in-portal.org/license for copyright notices and details.
 */
 
 	defined('FULL_PATH') or die('restricted access!');
 
 	class LanguagesTagProcessor extends kDBTagProcessor
 	{
-
 		/**
-		 * Guesses what charset should be used:
-		 * 1. use lang.current_Field field="Charset" by default
-		 * 2. if using temp tables then use lang_Field field="Charset"
+		 * Sets content-type of page
 		 *
 		 * @param Array $params
 		 * @return string
+		 * @access protected
 		 */
-		function GetCharset($params)
+		protected function SetContentType($params)
 		{
-			$edit_direct = $this->Application->GetVar('phrases_label');
-
-			$top_prefix = $this->Application->GetTopmostPrefix($this->Prefix);
-			if( substr($this->Application->GetVar($top_prefix.'_mode'), 0, 1) == 't' && !$edit_direct )
-			{
-				$object = $this->getObject($params);
-				/* @var $object kDBItem */
-
-				return $object->GetDBField('Charset');
-			}
+			$content_type = isset($params['content_type']) ? $params['content_type'] : 'text/html';
+			$include_charset = isset($params['include_charset']) ? $params['include_charset'] : null;
 
-			$lang_current = $this->Application->recallObject('lang.current');
-			/* @var $lang_current LanguagesItem */
+			$this->Application->setContentType($content_type, $include_charset);
 
-			return $lang_current->GetDBField('Charset');
+			return '';
 		}
 
 		/**
 		 * Returns formatted date + time on current language
 		 *
 		 * @param Array $params
 		 * @return string
 		 */
 		function CurrentDate($params)
 		{
 			$format = $params['format'];
 			$date = adodb_mktime();
 
 			if (strpos($format, 'l') !== false) {
 				$week_day = $this->Application->Phrase('lu_weekday_'.adodb_date('l'));
 				$format = str_replace('l', '#@#', $format); // replace with reserved char (preserves translation link)
 
 				return str_replace('#@#', $week_day, adodb_date($format, $date));
 			}
 
 			return adodb_date($format, $date);
 		}
 
 		function ListLanguages($params)
 		{
 			$this->Init($this->Prefix, 'enabled');
 
 			return $this->PrintList2($params);
 		}
 
 		function LanguageName($params)
 		{
 			$object = $this->getObject($params);
 			return $this->Application->Phrase($params['phrase_prefix'].$object->GetDBField('PackName'));
 		}
 
 		function LanguageLink($params)
 		{
 			$object = $this->getObject($params);
 
 			$params['m_lang'] = $object->GetID();
 
 			return $this->Application->ProcessParsedTag('m', 'Link', $params);
 		}
 
 		function SelectedLanguage($params)
 		{
 			$object = $this->getObject($params);
 			/* @var $object kDBList */
 
 			if (array_key_exists('type', $params) && $params['type'] == 'data') {
 				// when using language selector on editing forms
 				return $object->GetDBField('LanguageId') == $this->Application->GetVar('m_lang');
 			}
 
 			return $object->GetDBField('LanguageId') == $this->Application->Phrases->LanguageId;
 		}
 
 		/**
 		 * Returns path where exported languages should be saved
 		 *
 		 * @param Array $params
 		 * @return string
 		 * @access protected
 		 */
 		protected function ExportPath($params)
 		{
 			$ret = EXPORT_PATH . '/';
 
 			if ( getArrayValue($params, 'as_url') ) {
 				$ret = str_replace(FULL_PATH . '/', $this->Application->BaseURL(), $ret);
 			}
 
 			return $ret;
 		}
 
 		/**
 		 * Returns true if system has more then 1 language installed
 		 *
 		 * @param Array $params
 		 * @return bool
 		 */
 		function IsMultiLanguage($params)
 		{
 			return $this->TotalRecords($params) > 1;
 		}
 
 		function IsPrimaryLanguage($params)
 		{
 			return $this->Application->GetDefaultLanguageId() == $this->Application->GetVar('m_lang');
 		}
 
 /*		function Main_IsMetricUnits($params)
 		{
 			$object = $this->Application->recallObject($this->Prefix.'.current');
 			$measure_system = $object->GetDBField('UnitSystem');
 			return $measure_system == 1 ? 1 : 0;
 		}*/
 
 	}
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/browser/browser_header.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/browser/browser_header.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/browser/browser_header.tpl	(revision 15445)
@@ -1,57 +1,57 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <inp2:m_DefaultParam body_properties=""/>
 <html>
 <head>
 <title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
 
-<meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>"/>
+<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>"/>
 <meta name="keywords" content="..."/>
 <meta name="description" content="..."/>
 <meta name="robots" content="all"/>
 <meta name="copyright" content="Copyright &#174; 2006 Test, Inc"/>
 <meta name="author" content="Intechnic Inc."/>
 
 <inp2:m_base_ref/>
 
 <link rel="icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
 <link rel="shortcut icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
 
 <link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='browser/browser.css'/>" type="text/css" />
 
 <script type="text/javascript" src="<inp2:m_Compress files='
 	js/is.js|
 	js/ajax.js|
 	js/application.js|
 	js/script.js
 '/>"></script>
 
 <script type="text/javascript">
 var t = '<inp2:m_get param="t"/>';
 var popups = '1';
 var $use_popups = <inp2:m_if check="adm_UsePopups">true<inp2:m_else/>false</inp2:m_if>;
 var $modal_windows = <inp2:m_if check="adm_UsePopups" mode="modal">true<inp2:m_else/>false</inp2:m_if>;
 var multiple_windows = '1';
 var main_title = '<inp2:m_GetConfig var="Site_Name" js_escape="1"/>';
 var tpl_changed = 0;
 var base_url = '<inp2:m_BaseURL/>';
 var $base_path = '<inp2:m_GetConst name="BASE_PATH"/>';
 var img_path = '<inp2:m_TemplatesBase module="#MODULE#"/>/img/';
 
 var phrases = {
 	'la_Delete_Confirm' : '<inp2:m_Phrase label="la_Delete_Confirm" js_escape="1"/>'
 }
 
 <inp2:m_if check="m_GetEquals" name="m_wid" value="" inverse="inverse">
 	window.name += '_<inp2:m_get name="m_wid"/>';
 </inp2:m_if>
 
 var $use_toolbarlabels = <inp2:m_if check="adm_UseToolbarLabels">true<inp2:m_else/>false</inp2:m_if>;
 </script>
 </head>
 
 <inp2:m_include t="incs/blocks"/>
 <inp2:m_include t="incs/in-portal"/>
 
 <inp2:m_if check="m_ParamEquals" name="nobody" value="yes" inverse="inverse">
 	<body <inp2:m_param name="body_properties"/>>
 </inp2:m_if>
Index: branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/categories/permissions_tab.tpl	(revision 15445)
@@ -1,78 +1,77 @@
 <inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
 <inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
 	<div id="<inp2:m_param name="item_prefix"/>_div" prefix="<inp2:m_param name="item_prefix"/>" group_id="-1" class="catalog-tab"><!-- IE minimal height problem fix --></div>
 	<script type="text/javascript">$PermManager.registerTab('<inp2:m_param name="item_prefix"/>');</script>
 <inp2:m_else/>
-	<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
-	<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+	<inp2:lang.current_SetContentType content_type="text/plain"/>
 	if ($request_visible) {
 		document.getElementById('<inp2:m_get name="item_prefix"/>_div').setAttribute('group_id', <inp2:m_get name="group_id"/>);
 		maximizeElement( jq('#<inp2:m_get name="item_prefix"/>_div') );
 	}
 
 	<inp2:m_if check="c_SaveWarning">
 		document.getElementById('save_warning').style.display = 'block';
 		$edit_mode = true;
 	</inp2:m_if>
 	#separator#
 	<inp2:m_DefineElement name="permission_element">
 		<tr class="<inp2:m_odd_even odd="table-color1" even="table-color2"/>">
 			<td>
 				<inp2:m_phrase name="$Description"/> [<inp2:m_param name="PermissionName"/>]
 			</td>
 
 			<td>
 				<!-- Inherited checkbox -->
 				<input
 						type="hidden"
 						id="<inp2:PermInputName sub_key="inherited"/>"
 						name="<inp2:PermInputName sub_key="inherited"/>"
 						value="<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">1<inp2:m_else/>0</inp2:m_if>" />
 
 				<input
 						type="checkbox"
 						id="_cb_<inp2:PermInputName sub_key="inherited"/>"
 						<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">checked</inp2:m_if>
 						onchange="update_checkbox(this, document.getElementById('<inp2:PermInputName sub_key="inherited"/>'));"
 						onclick="inherited_click('<inp2:m_param name="PermissionName"/>', <inp2:m_param name="InheritedValue"/>, this.checked, '_cb_<inp2:PermInputName sub_key="value"/>')" />
 			</td>
 
 			<td>
 				<inp2:CategoryPath cat_id="$InheritedFrom"/>
 			</td>
 
 			<td>
 				<!-- Access checkbox -->
 				<input
 						type="hidden"
 						id="<inp2:PermInputName sub_key="value"/>"
 						name="<inp2:PermInputName sub_key="value"/>"
 						value="<inp2:m_if check="m_ParamEquals" name="Value" value="1">1<inp2:m_else/>0</inp2:m_if>" />
 
 				<input
 						type="checkbox"
 						id="_cb_<inp2:PermInputName sub_key="value"/>"
 						<inp2:m_if check="m_ParamEquals" name="Inherited" value="1">disabled="disabled"</inp2:m_if>
 						<inp2:m_if check="m_ParamEquals" name="Value" value="1">checked</inp2:m_if>
 						onchange="update_checkbox(this, document.getElementById('<inp2:PermInputName sub_key="value"/>'));"
 						onclick="update_light('<inp2:m_param name="PermissionName"/>', this.checked)" />
 			</td>
 
 			<td>
 				<img id="light_<inp2:m_param name="PermissionName"/>" src="img/perm_<inp2:m_if check="m_ParamEquals" name="Value" value="1">green<inp2:m_else/>red</inp2:m_if>.gif"/>
 			</td>
 		</tr>
 	</inp2:m_DefineElement>
 
 	<table width="100%" border="0" cellspacing="0" cellpadding="4" class="tableborder_full">
 		<inp2:m_set odd_even="table-color1"/>
 		<thead class="subsectiontitle">
 			<td><inp2:m_phrase name="column:la_fld_Description"/></td>
 			<td><inp2:m_phrase name="la_col_Inherited"/></td>
 			<td><inp2:m_phrase name="la_col_InheritedFrom"/></td>
 			<td><inp2:m_phrase name="la_col_Access"/></td>
 			<td><inp2:m_phrase name="la_col_Effective"/></td>
 		</thead>
 		<inp2:c-perm_PrintPermissions render_as="permission_element"/>
 	</table>
 </inp2:m_if>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/catalog_tab.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/catalog_tab.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/catalog_tab.tpl	(revision 15445)
@@ -1,91 +1,90 @@
 <inp2:m_RequireLogin permissions="in-portal:browse.view" system="1"/>
 <inp2:m_DefineElement name="catalog_tab">
 	<inp2:m_if check="m_ParamEquals" name="tab_init" value="" inverse="inverse">
 		<inp2:m_if check="m_ParamEquals" name="tab_init" value="1">
 		 	a_toolbar.AddButton(
 				new ToolBarButton(
 					'new_cat',
 					'<inp2:m_phrase label="la_ToolTip_New_Category" escape="1"/>',
 					add_item,
 					true
 				)
 			);
 		</inp2:m_if>
 
 		<inp2:m_if check="m_Param" name="tab_init" equals_to="2">
 			<div id="categories_div" prefix="<inp2:m_param name='prefix'/>" view_template="catalog_tab" edit_template="categories/categories_edit" category_id="-1" dep_buttons="new_cat" class="catalog-tab"><!-- IE minimal height problem fix --></div>
 			<script type="text/javascript">$Catalog.registerTab('categories');</script>
 		</inp2:m_if>
 
 		<inp2:m_if check="m_ParamEquals" name="tab_init" value="3">
 			$Catalog.setItemCount('<inp2:m_Param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount grid="$grid_name"/>');
 		</inp2:m_if>
 	<inp2:m_else/>
-		<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
-		<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+		<inp2:lang.current_SetContentType content_type="text/plain"/>
 		<inp2:m_include t="incs/blocks"/>
 		<inp2:m_include t="incs/in-portal"/>
 		<inp2:m_include t="categories/ci_blocks"/>
 
 		<inp2:m_if check="m_Param" name="prefix" equals_to="c.showall">
 			<inp2:$prefix_InitList grid="$grid_name" parent_cat_id="any"/>
 		<inp2:m_else/>
 			<inp2:$prefix_InitList grid="$grid_name"/>
 		</inp2:m_if>
 
 		// substiture form action, like from was created from here
 		document.getElementById('categories_form').action = '<inp2:m_t pass="all" no_amp="1" js_escape="1"/>';
 		$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:$prefix_CatalogItemCount/>');
 		$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', <inp2:m_get name="m_cat_id"/>);
 		$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
 
 		<inp2:m_RenderElement name="structure_reload_element"/>
 
 		<inp2:m_DefineElement name="grid_parent_category_td" format="">
 			<inp2:Field name="ParentId" result_to_var="item_category" db="db"/>
 
 			<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
 				<inp2:CategoryName cat_id="$item_category"/>
 			<inp2:m_else/>
 				<a href="<inp2:m_Link template='catalog/catalog' m_cat_id='$item_category' no_pass_through='1'/>"><inp2:CategoryName cat_id="$item_category"/></a>
 			</inp2:m_if>
 		</inp2:m_DefineElement>
 
 		<inp2:m_DefineElement name="page_browse_td" format="">
 			<inp2:m_if check="m_Get" name="type" equals_to="item_selector">
 				<a href="javascript:$Catalog.go_to_cat(<inp2:m_get name="c_id"/>, '<inp2:GetModulePrefix/>');" title="<inp2:m_Phrase name='la_alt_GoInside' html_escape='1'/>"><inp2:Field field="$field" grid="$grid" format="$format"/></a>
 			<inp2:m_else/>
 				<a href="<inp2:ItemEditLink/>" title="<inp2:m_Phrase name='la_Text_Edit' no_editing='1'/>" onclick="return direct_edit('<inp2:m_param name="PrefixSpecial"/>', this.href);"><inp2:Field field="$field" grid="$grid" format="$format"/></a>
 			</inp2:m_if>
 
 			<!--##<span class="small-statistics">(<inp2:SubCatCount/> / <inp2:ItemCount/>)</span>##-->
 
 			<inp2:m_if check="BrowseModeAvailable" pass_params="1">
 				<a href="<inp2:PageBrowseLink/>" title="<inp2:m_Phrase name='la_alt_Browse' no_editing='1'/>"><img src="<inp2:m_TemplatesBase/>/img/ic_browse_mode.gif" width="8" height="7" alt="<inp2:m_Phrase name='la_alt_Browse' html_escape='1'/>" border="0"/></a>
 			</inp2:m_if>
 
 			<inp2:m_if check="Field" field="Type" equals_to="2" db="db">
 				<span class="field-required" title="<inp2:m_Phrase name='la_System' no_editing='1'/>">&nbsp;*</span>
 			</inp2:m_if>
 		</inp2:m_DefineElement>
 
 		<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="CategoryId" grid="$grid_name"  menu_filters="yes"/>
 		<inp2:m_RenderElement name="grid_search_buttons" PrefixSpecial="$prefix" grid="$grid_name" ajax="1"/>
 
 		Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
 		<inp2:m_RenderElement name="reflect_catalog_buttons"/>
 
 		<inp2:m_if check="m_Recall" name="root_delete_error">
 			alert('<inp2:m_Phrase name="la_error_RootCategoriesDelete"/>');
 			<inp2:m_RemoveVar name="root_delete_error"/>
 		</inp2:m_if>
 		#separator#
 		<!-- categories tab: begin -->
 		<inp2:m_RenderElement name="kernel_form" form_name="categories_form"/>
 		<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="CategoryId" grid="$grid_name" menu_filters="yes"/>
 		<inp2:m_RenderElement name="kernel_form_end"/>
 		<!-- categories tab: end -->
 	</inp2:m_if>
 </inp2:m_DefineElement>
 
 <inp2:c_InitCatalogTab render_as="catalog_tab" default_grid="Default" radio_grid="Radio"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/reviews/reviews_tab.tpl	(revision 15445)
@@ -1,44 +1,43 @@
 <inp2:m_RequireLogin permissions="in-portal:reviews.view" system="1"/>
 <inp2:m_DefineElement name="catalog_tab">
 	<inp2:m_if check="m_ParamEquals" name="tab_init" value="">
-		<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
-		<inp2:m_Header data="Content-type: text/plain; charset=$charset"/>
+		<inp2:lang.current_SetContentType content_type="text/plain"/>
 		<inp2:m_include t="incs/blocks"/>
 		<inp2:m_include t="incs/in-portal"/>
 
 		<inp2:$prefix_InitList grid="$grid_name"/>
 
 		$Catalog.setItemCount('<inp2:m_param name="prefix"/>', '<inp2:{$prefix}_CatalogItemCount/>');
 		$Catalog.setCurrentCategory('<inp2:m_param name="prefix"/>', 0);
 		$Catalog.saveSearch('<inp2:m_Param name="prefix"/>', '<inp2:$prefix_SearchKeyword js_escape="1"/>', '<inp2:m_Param name="grid_name"/>');
 
 		<inp2:m_DefineElement name="grid_reviewtext_td">
 			<inp2:Field field="$field" cut_first="100"/>
 			<br />
 	    	<span class="small-statistics">
 				<a href="<inp2:ItemEditLink/>" onclick="return direct_edit('<inp2:m_param name="prefix"/>', this.href);"><inp2:Field field="CatalogItemName"/></a>
 	    	</span>
 		</inp2:m_DefineElement>
 
 		<inp2:m_RenderElement name="grid_js" PrefixSpecial="$prefix" IdField="ReviewId" grid="$grid_name"/>
 
 		<inp2:m_if check="m_ParamEquals" name="tab_dependant" value="yes">
 			Grids['<inp2:m_param name="prefix"/>'].AddAlternativeGrid('<inp2:m_param name="cat_prefix"/>', true);
 		</inp2:m_if>
 		Grids['<inp2:m_param name="prefix"/>'].SetDependantToolbarButtons( new Array('edit','delete','approve','decline','sep3','cut','copy','move_up','move_down','sep6'));
 		$Catalog.reflectPasteButton(<inp2:c_HasClipboard/>);
 		$Catalog.setViewMenu('<inp2:m_param name="prefix"/>');
 		<inp2:m_if check="m_ParamEquals" name="tab_mode" value="single">
 			Grids['<inp2:m_param name="prefix"/>'].DblClick = function() {return false};
 		</inp2:m_if>
 		#separator#
 		<!-- products tab: begin -->
 		<inp2:m_RenderElement name="kernel_form" form_name="{$tab_name}_form"/>
 			<inp2:m_RenderElement name="grid" ajax="1" PrefixSpecial="$prefix" IdField="ReviewId" grid="$grid_name"/>
 		<inp2:m_RenderElement name="kernel_form_end"/>
 		<!-- products tab: end -->
 	</inp2:m_if>
 </inp2:m_DefineElement>
 
 <inp2:m_Get name="item_prefix" result_to_var="prefix"/>
 <inp2:{$prefix}_InitCatalogTab render_as="catalog_tab" default_grid="ReviewsSection" radio_grid="Radio"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/incs/close_popup.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/incs/close_popup.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/incs/close_popup.tpl	(revision 15445)
@@ -1,112 +1,110 @@
 <inp2:m_NoDebug/>
 <inp2:m_Set skip_last_template="1"/>
-<inp2:lang.current_Field name="Charset" result_to_var="charset"/>
-<inp2:m_Header data="Content-type: text/html; charset=$charset"/>
 <html>
 	<head>
 		<title></title>
 		<script type="text/javascript">
 			var $is_debug = <inp2:m_if check="m_ConstOn" name="DBG_REDIRECT">true<inp2:m_else/>false</inp2:m_if>;
 			var $use_popups = <inp2:m_if check="adm_UsePopups">true<inp2:m_else/>false</inp2:m_if>;
 			var $redirect_url = '<inp2:m_t t="dummy" opener="u" m_opener="u" escape="escape"/>';
 			var $modal_windows = <inp2:m_if check="adm_UsePopups" mode="modal">true<inp2:m_else/>false</inp2:m_if>;
 
 			if ($is_debug) {
 				document.write('<a href="#" onclick="proceed_redirect()">' + $redirect_url.replace(/%5C/g, '\\') + '</a>');
 			}
 			else {
 				proceed_redirect();
 			}
 
 			function isset(variable)
 			{
 				if(variable == null) return false;
 				return (typeof(variable) == 'undefined') ? false : true;
 			}
 
 			function proceed_redirect() {
 				var $opener = getFrame('main').getWindowOpener(window);
 
 				if ($opener) {
 					// using popups & close_popup called (from anywhere)
 					try {
 						window_close(
 							function() {
 								$opener.onAfterWindowClose($redirect_url, <inp2:m_if check="adm_OpenNewWindow" diff="1">true<inp2:m_else/>false</inp2:m_if>, <inp2:m_if check="m_Get" name="skip_refresh">true<inp2:m_else/>false</inp2:m_if>);
 							}
 						);
 					}
 					catch (err) {
 						// another website is opened in parent window
 						alert('Error while trying to process redirect in window opener, you should probably close this window.' + "\n" + 'Error message: [' + err.message + ']');
 					}
 				}
 				else if (!$use_popups) {
 					// not using popups (for editing), but close_popup called (e.g. from selector)
 					window.location.href = $redirect_url.replace(/%5C/g, '\\');
 				}
 			}
 
 			// copied from "js/script.js" because it's not included here due performance reasons
 			function getFrame($name) {
 				var $main_window = window;
 
 				// 1. cycle through popups to get main window
 				try {
 					// will be error, when other site is opened in parent window
 					var $i = 0;
 					while ($main_window.opener) {
 						if ($i == 10) {
 							break;
 						}
 
 						$main_window = $main_window.opener;
 						$i++;
 					}
 				}
 				catch (err) {
 					// catch Access/Permission Denied error
 			//			alert('getFrame.Error: [' + err.description + ']');
 					return window;
 				}
 
 				var $frameset = $main_window.parent.frames;
 				for ($i = 0; $i < $frameset.length; $i++) {
 					if ($frameset[$i].name == $name) {
 			    		return $frameset[$i];
 			    	}
 				}
 				return $main_window.parent;
 			}
 
 			// copied locally, because won't work, when called via getFrame('main').window_close(...);
 			function window_close($close_callback) {
 				// use this instead of "window.close();"
 				if (!$modal_windows) {
 					// don't use other (e.g. parent) window methods to detect type of
 					// variables from given window, because it won't work in IE
 
 					if (Object.prototype.toString.call($close_callback) === '[object Function]') {
 						// use close callback, because iframe will be removed later in this method
 						$close_callback();
 					}
 
 					window.close();
 					return ;
 				}
 
 				if (window.name == 'main') {
 					return ;
 				}
 
 				if ($close_callback !== undefined) {
 					return getFrame('main').TB.remove(null, $close_callback);
 				}
 
 				return getFrame('main').TB.remove();
 			}
 		</script>
 	</head>
 	<body>
 	</body>
 </html>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/incs/header.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/incs/header.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/incs/header.tpl	(revision 15445)
@@ -1,122 +1,122 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <inp2:m_CheckSSL mode="required" condition="Require_AdminSSL" />
 <inp2:m_CheckSSL/>
 <inp2:m_DefaultParam body_properties=""/>
 <html>
 <head>
 <title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
 
-<meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>"/>
+<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>"/>
 <meta name="keywords" content="..."/>
 <meta name="description" content="..."/>
 <meta name="robots" content="all"/>
 <meta name="copyright" content="In-Portal CMS, Copyright &#174; 2011"/>
 <meta name="author" content="Intechnic Inc."/>
 
 <inp2:m_base_ref/>
 
 <link rel="icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
 <link rel="shortcut icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
 
 <inp2:adm_AdminSkin file_only="1" result_to_var="skin_css"/>
 <link rel="stylesheet" href="<inp2:m_Compress files='
 	js/jquery/thickbox/thickbox.css|
 	js/calendar/calendar-blue.css|
 	$skin_css|
 	{module_path}/img/toolbar/toolbar-sprite.css
 '/>" type="text/css" media="screen" />
 
 <script type="text/javascript" src="js/jquery/jquery.pack.js"></script>
 <script type="text/javascript" src="js/jquery/jquery-ui.custom.min.js"></script>
 
 <script type="text/javascript" src="<inp2:m_Compress files='
 	js/is.js|
 	js/ajax.js|
 	js/application.js|
 	js/script.js|
 	js/in-portal.js|
 	js/toolbar.js|
 	js/grid.js|
 	js/grid_filters.js|
 	js/simple_grid.js|
 	js/grid_scroller.js|
 	js/forms.js|
 	js/drag.js|
 	js/ajax_dropdown.js|
 	js/form_controls.js|
 	js/jquery/thickbox/thickbox.js|
 	js/tab_scroller.js|
 	js/calendar/calendar.js|
 	js/calendar/calendar-setup.js|
 	js/calendar/calendar-en.js
 '/>"></script>
 
 <script type="text/javascript">
 TB.pathToImage = 'js/jquery/thickbox/loadingAnimation.gif';
 var t = '<inp2:m_get param="t"/>';
 var popups = '1';
 var $use_popups = <inp2:m_if check="adm_UsePopups">true<inp2:m_else/>false</inp2:m_if>;
 var $modal_windows = <inp2:m_if check="adm_UsePopups" mode="modal">true<inp2:m_else/>false</inp2:m_if>;
 var multiple_windows = '1';
 var main_title = '<inp2:m_GetConfig var="Site_Name" js_escape="1"/>';
 var tpl_changed = 0;
 var base_url = '<inp2:m_BaseURL/>';
 var $base_path = '<inp2:m_GetConst name="BASE_PATH"/>';
 var img_path = '<inp2:m_TemplatesBase module="#MODULE#"/>/img/';
 
 var phrases = {
 	'la_Delete_Confirm' : '<inp2:m_Phrase label="la_Delete_Confirm" js_escape="1"/>'
 }
 
 NumberFormatter.ThousandsSep = '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>';
 NumberFormatter.DecimalSep = '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>';
 
 <inp2:m_if check="m_GetEquals" name="m_wid" value="" inverse="inverse">
 	if (!window.name.match(/_<inp2:m_get name="m_wid"/>$/)) {
 		window.name += '_<inp2:m_get name="m_wid"/>'; // change window name only once per window
 
 		if ($modal_windows) {
 			getFrame('main').TB.setWindowMetaData('window_name', window.name); // used to simulate window.opener functionality
 		}
 	}
 </inp2:m_if>
 
 var $use_toolbarlabels = <inp2:m_if check="adm_UseToolbarLabels">true<inp2:m_else/>false</inp2:m_if>;
 </script>
 
 <inp2:m_if check="m_get" var="m_wid">
 <style type="text/css">
 	.tableborder {
 		border: none;
 	}
 	.toolbar {
 		border-right: none;
 		border-left: none;
 	}
 	.tableborder_full {
 		border-right: none;
 		border-left: none;
 	}
 </style>
 </inp2:m_if>
 
 <inp2:m_ifnot check="adm_UsePopups">
 	<style type="text/css">
 		table.edit-form {
 			border: 1px solid black;
 		}
 	</style>
 </inp2:m_ifnot>
 
 </head>
 
 <inp2:m_include t="incs/blocks"/>
 <inp2:m_include t="incs/in-portal"/>
 
 <inp2:m_if check="m_ParamEquals" name="nobody" value="yes" inverse="inverse">
 	<body class="<inp2:m_if check="m_get" var="m_wid">edit-popup<inp2:m_else/>regular-body</inp2:m_if>" <inp2:m_param name="body_properties"/>>
 </inp2:m_if>
 
 <inp2:m_if check="m_ParamEquals" name="noform" value="yes" inverse="inverse">
 	<inp2:m_RenderElement name="kernel_form"/>
 </inp2:m_if>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/regional/languages_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/regional/languages_edit.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/regional/languages_edit.tpl	(revision 15445)
@@ -1,120 +1,119 @@
 <inp2:adm_SetPopupSize width="950" height="700"/>
 
 <inp2:m_include t="incs/header"/>
 <inp2:m_RenderElement name="combined_header" prefix="lang" section="in-portal:configure_lang" title_preset="languages_edit_general" tab_preset="Default"/>
 
 <!-- ToolBar -->
 <table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
 <tbody>
 	<tr>
   	<td>
   		<script type="text/javascript">
 				a_toolbar = new ToolBar();
 				a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
 							submit_event('lang','<inp2:lang_SaveEvent/>');
 						}
 					) );
 				a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
 							submit_event('lang','OnCancelEdit');
 						}
 				 ) );
 
 				a_toolbar.AddButton( new ToolBarSeparator('sep1') );
 
 				a_toolbar.AddButton( new ToolBarButton('prev', '<inp2:m_phrase label="la_ToolTip_Prev" escape="1"/>', function() {
 							go_to_id('lang', '<inp2:lang_PrevId/>');
 						}
 				 ) );
 				a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
 							go_to_id('lang', '<inp2:lang_NextId/>');
 						}
 				 ) );
 
 
 
 				a_toolbar.Render();
 
 				<inp2:m_if check="lang_IsSingle" >
 					a_toolbar.HideButton('prev');
 					a_toolbar.HideButton('next');
 					a_toolbar.HideButton('sep1');
 				<inp2:m_else/>
 					<inp2:m_if check="lang_IsLast" >
 						a_toolbar.DisableButton('next');
 					</inp2:m_if>
 					<inp2:m_if check="lang_IsFirst" >
 						a_toolbar.DisableButton('prev');
 					</inp2:m_if>
 				</inp2:m_if>
 			</script>
 		</td>
 	</tr>
 </tbody>
 </table>
 
 <inp2:lang_SaveWarning name="grid_save_warning"/>
 <inp2:lang_ErrorWarning name="form_error_warning"/>
 
 <div id="scroll_container">
 	<table class="edit-form">
 		<inp2:m_RenderElement name="subsection" title="la_section_General"/>
 			<inp2:m_RenderElement name="inp_id_label" prefix="lang" field="LanguageId"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="PackName"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="LocalName"/>
-			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="Charset"/>
 
 			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputDateFormat"/>
 			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="InputTimeFormat"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="DateFormat"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="ShortDateFormat"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="TimeFormat"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="ShortTimeFormat"/>
 
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="DecimalPoint"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="ThousandSep"/>
 			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="PrimaryLang"/>
 			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="AdminInterfaceLang"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="Priority"/>
 			<inp2:m_RenderElement name="inp_edit_checkbox" prefix="lang" field="Enabled"/>
 			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="UnitSystem"/>
 			<inp2:m_RenderElement name="inp_edit_options" prefix="lang" field="Locale" has_empty="1"/>
 
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconURL"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="IconDisabledURL"/>
 			<inp2:m_RenderElement name="inp_edit_box" prefix="lang" field="UserDocsUrl"/>
 
 			<inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="FilenameReplacements" allow_html="0" control_options="{min_height: 200}" cols="50" rows="10"/>
 
 			<inp2:m_if check="lang_IsNewMode">
 				<inp2:m_if check="lang_FieldVisible" field="CopyLabels">
 					<tr class="<inp2:m_odd_even odd='edit-form-odd' even='edit-form-even'/>">
 						<inp2:m_inc param="tab_index" by="1"/>
 						<td class="label-cell">
 							<inp2:m_phrase name="la_fld_CopyLabels"/>:
 						</td>
 						<td class="control-mid">&nbsp;</td>
 						<td class="control-cell">
 							<input type="hidden" id="<inp2:lang_InputName field="CopyLabels"/>" name="<inp2:lang_InputName field="CopyLabels"/>" value="<inp2:lang_Field field="CopyLabels" db="db"/>">
 							<input tabindex="<inp2:m_get param="tab_index"/>" type="checkbox" id="_cb_CopyLabels" name="_cb_CopyLabels" <inp2:lang_Field field="CopyLabels" checked="checked" db="db"/> onclick="update_checkbox(this, document.getElementById('<inp2:lang_InputName field="CopyLabels"/>'))">
 
 							<inp2:m_inc param="tab_index" by="1"/>
 							<select tabindex="<inp2:m_get param="tab_index"/>" name="<inp2:lang_InputName field="CopyFromLanguage"/>" id="<inp2:lang_InputName field="CopyFromLanguage"/>">
 								<option value="0">--<inp2:m_phrase name="la_prompt_Select_Source"/></option>
 								<inp2:lang_PredefinedOptions field="CopyFromLanguage" block="inp_option_item" selected="selected"/>
 							</select>
 						</td>
 					</tr>
 				</inp2:m_if>
 			</inp2:m_if>
 
 			<inp2:m_RenderElement name="inp_edit_checkboxes" prefix="lang" field="SynchronizationModes"/>
 
 		<inp2:m_RenderElement name="subsection" title="la_section_EmailDesignTemplates"/>
 			<inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="HtmlEmailTemplate" title="la_fld_HtmlEmailTemplate" control_options="{min_height: 200}" style="width: 100%; height: 200px;"/>
 			<inp2:m_RenderElement name="inp_edit_textarea" prefix="lang" field="TextEmailTemplate" title="la_fld_TextEmailTemplate" allow_html="0" control_options="{min_height: 200}" style="width: 100%; height: 200px;"/>
 
 			<inp2:m_RenderElement name="inp_edit_filler"/>
 	</table>
 </div>
 
 <inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/index.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/index.tpl	(revision 15444)
+++ branches/5.2.x/core/admin_templates/index.tpl	(revision 15445)
@@ -1,66 +1,66 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <inp2:m_Set skip_last_template="1"/>
 <inp2:m_CheckSSL mode="required" condition="Require_AdminSSL" />
 <inp2:m_CheckSSL/>
 <inp2:m_RequireLogin login_template="login"/>
 <inp2:m_NoDebug/>
 <html>
 	<head>
-		<meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>">
+		<meta http-equiv="content-type" content="text/html; charset=<inp2:m_GetConst name='CHARSET'/>">
 		<title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
 		<inp2:m_base_ref/>
 
 		<link rel="icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
 		<link rel="shortcut icon" href="<inp2:m_BaseURL/>favicon.ico" type="image/x-icon" />
 
 		<script type="text/javascript">
 			window.name = 'main_frame';
 
 			var $top_height = 117; // 94;
 			if (navigator.appName == 'Netscape') {
 				$top_height = navigator.appVersion.substring(0, 1) != '5' ? $top_height + 2 : $top_height + 1;
 			}
 
 			<inp2:m_if check="m_GetConfig" name="ResizableFrames">
 				<inp2:m_if check="m_RecallEquals" name="ShowAdminMenu" value="0" persistent="1">
 					document.write('<frameset id="top_frameset" rows="' + $top_height + ',*" framespacing="0" scrolling="no" border="1">');
 				<inp2:m_else/>
 					document.write('<frameset id="top_frameset" rows="25,*" framespacing="0" scrolling="no" border="1">');
 				</inp2:m_if>
 			<inp2:m_else/>
 				<inp2:m_if check="m_RecallEquals" name="ShowAdminMenu" value="0" persistent="1">
 					document.write('<frameset id="top_frameset" rows="' + $top_height + ',*" framespacing="0" scrolling="no" frameborder="0">');
 				<inp2:m_else/>
 					document.write('<frameset id="top_frameset" rows="25,*" framespacing="0" scrolling="no" frameborder="0">');
 				</inp2:m_if>
 			</inp2:m_if>
 		</script>
 	</head>
 
 	<inp2:m_if check="m_GetConfig" name="ResizableFrames">
 		<frame src="<inp2:m_t t='head' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="head" id="head_frame" scrolling="no" noresize frameborder="0" border="0">
 		 	<frameset id="sub_frameset" cols="<inp2:m_if check='m_RecallEquals' name='ShowAdminMenu' value='0' persistent='1'><inp2:adm_MenuFrameWidth/><inp2:m_else/>0</inp2:m_if>,*" border="1">
 				<frame src="<inp2:m_t t='tree' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="menu" target="main" scrolling="auto" marginwidth="0" marginheight="0" border="1" frameborder="1">
 				<inp2:m_DefineElement name="root_node">
 					<frame src="<inp2:m_if check='adm_MainFrameLink'><inp2:adm_MainFrameLink/><inp2:m_else/><inp2:m_param name='section_url'/></inp2:m_if>" name="main" marginwidth="0" marginheight="0" scrolling="auto" border="1" frameborder="1">
 				</inp2:m_DefineElement>
 				<inp2:adm_PrintSection render_as="root_node" section_name="in-portal:root" use_first_child="1"/>
 			</frameset>
 		</frameset>
 	<inp2:m_else/>
 		<frame src="<inp2:m_t t='head' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="head" scrolling="no" noresize="noresize">
 		 	<frameset id="sub_frameset" cols="<inp2:m_if check='m_RecallEquals' name='ShowAdminMenu' value='0' persistent='1'><inp2:adm_MenuFrameWidth/><inp2:m_else/>0</inp2:m_if>,*" border="0">
 				<frame src="<inp2:m_t t='tree' pass='m' m_cat_id='0' m_opener='s' no_pass_through='1'/>" name="menu" target="main" noresize scrolling="auto" marginwidth="0" marginheight="0">
 				<inp2:m_DefineElement name="root_node">
 					<frame src="<inp2:m_if check='adm_MainFrameLink'><inp2:adm_MainFrameLink/><inp2:m_else/><inp2:m_param name='section_url'/></inp2:m_if>" name="main" marginwidth="0" marginheight="0" frameborder="no" noresize scrolling="auto">
 				</inp2:m_DefineElement>
 				<inp2:adm_PrintSection render_as="root_node" section_name="in-portal:root" use_first_child="1"/>
 			</frameset>
 		</frameset>
 	</inp2:m_if>
 	<noframes>
 		<body bgcolor="#FFFFFF">
 			<p></p>
 		</body>
 	</noframes>
 </html>
\ No newline at end of file
Index: branches/5.2.x/core/install/step_templates/sys_config.tpl
===================================================================
--- branches/5.2.x/core/install/step_templates/sys_config.tpl	(revision 15444)
+++ branches/5.2.x/core/install/step_templates/sys_config.tpl	(revision 15445)
@@ -1,57 +1,58 @@
 <?php
 	$settings = Array (
 		'WebsitePath' => Array ('type' => 'text', 'title' => 'Web Path to Installation', 'section' => 'Misc', 'required' => 1, 'default' => ''),
 		'WriteablePath' => Array ('type' => 'text', 'title' => 'Path to Writable folder', 'section' => 'Misc', 'required' => 1, 'default' => '/system'),
 		'RestrictedPath' => Array ('type' => 'text', 'title' => 'Path to Restricted folder', 'section' => 'Misc', 'required' => 1, 'default' => '/system/.restricted'),
 		'AdminDirectory' => Array ('type' => 'text', 'title' => 'Path to Admin folder', 'section' => 'Misc', 'default' => '/admin'),
 		'AdminPresetsDirectory' => Array ('type' => 'text', 'title' => 'Path to Admin Interface Presets folder', 'section' => 'Misc', 'default' => '/admin'),
 		'ApplicationClass' => Array ('type' => 'text', 'title' => 'Name of Base Application Class', 'section' => 'Misc', 'default' => 'kApplication'),
 		'ApplicationPath' => Array ('type' => 'text', 'title' => 'Path to Base Application Class file', 'section' => 'Misc', 'default' => '/core/kernel/application.php'),
 		'CacheHandler' => Array ('type' => 'select', 'title' => 'Output Caching Engine', 'section' => 'Misc', 'default' => 'Fake'),
 		'MemcacheServers' => Array ('type' => 'text', 'title' => 'Location of Memcache Servers', 'section' => 'Misc', 'default' => 'localhost:11211'),
 		'CompressionEngine' => Array ('type' => 'select', 'title' => 'CSS/JS Compression Engine', 'section' => 'Misc', 'default' => ''),
+		'WebsiteCharset' => Array ('type' => 'text', 'title' => 'Website Charset', 'section' => 'Misc', 'required' => 1, 'default' => 'utf-8'),
 	);
 
 	$settings['CacheHandler']['options'] = $this->toolkit->getWorkingCacheHandlers();
 	$settings['CompressionEngine']['options'] = $this->toolkit->getWorkingCompressionEngines();
 
 	$row_class = 'table-color2';
 
 	foreach ($settings as $config_var => $output_params) {
 		$row_class = $row_class == 'table-color1' ? 'table-color2' : 'table-color1';
 		?>
 		<tr class="<?php echo $row_class; ?>">
 			<td class="text">
 				<b><?php echo ($output_params['title'] ? $output_params['title'] : $config_var) . (isset($output_params['required']) ? ' <span class="error">*</span>' : ''); ?>:</b>
 			</td>
 			<td>
 				<?php
 					$config_value =  $this->toolkit->getSystemConfig($output_params['section'], $config_var, $output_params['default']);
 
 					if ( $output_params['type'] == 'text' ) {
 						echo '<input type="text" name="system_config[' . $output_params['section'] . '][' . $config_var . ']" value="' . $config_value . '" class="text" style="width: 200px;"/>';
 					}
 					else {
 						echo '<select name="system_config[' . $output_params['section'] . '][' . $config_var . ']">';
 
 						if ( $output_params['options'][$config_value] == 'None' ) {
 							$tmp_values = array_keys($output_params['options']);
 
 							if ( count($tmp_values) > 1 ) {
 								$config_value = $tmp_values[1];
 							}
 						}
 
 						foreach($output_params['options'] as $option_key => $option_value) {
 							$selected = $option_key == $config_value ? ' selected' : '';
 							echo '<option value="' . $option_key . '"' . $selected . '>' . $option_value . '</option>';
 						}
 
 						echo '</select>';
 					}
 				?>
 			</td>
 		</tr>
 		<?php
 	}
 ?>
Index: branches/5.2.x/core/install/steps_db.xml
===================================================================
--- branches/5.2.x/core/install/steps_db.xml	(revision 15444)
+++ branches/5.2.x/core/install/steps_db.xml	(revision 15445)
@@ -1,213 +1,217 @@
 <steps>
 	<step name="clean_db" title="Clean Database">
 		<![CDATA[missing step description]]>
 	</step>
 	<step name="db_config" title="Database Configuration">
 		<![CDATA[<p><b><i>Database Hostname</i></b> - IP or hostname of your database server (normally <i>"localhost"</i>).</p>
 
 		<p><b><i>Database Name</i></b> - name of the database where In-Portal will be installed.</p>
 		<p><b><i>Database User Name</i></b> - name of the user for selected database.</p>
 		<p><b><i>Database User Password</i></b> - password for selected username.</p>
 		<p><b><i>Database Collation</i></b> - character set used to store data in text fields (normally <i>"utf8_general_ci"</i>).</p>
 		<p><b><i>Prefix for Table Names</i></b> - specified when multiple scripts will be run in the same database.
 		Prefix can be any text string allowed in table naming by your database engine (normally <i>"inp_"</i>).</p>
 		<p><b><i>Use existing In-Portal installation setup in this Database</i></b> - select <i>"Yes"</i>
 		if you already have In-Portal installed in this database and want to use it. Select <i>"No"</i> in all other cases.</p>
 		]]>
 	</step>
 	<step name="select_license" title="Select License" help_title="License Configuration">
 		<![CDATA[<p><b>In-Portal is an Open Source</b> object-oriented framework that is developed in PHP
 		 and provides a quick and easy way to build websites and web applications.</p>
 
 		 <p>In-Portal is copyrighted and distributed under <a href="http://www.in-portal.org/license" target="_blank">GPLv2 license</a>.</p>
 
 		 <p><b><i>GPL / Open Source License</i></b> - by downloading and installing In-Portal
 		  under GPLv2 license you understand and agree to all terms of the
 		  <a href="http://www.in-portal.org/license" target="_blank">GPLv2 license</a>.</p>
 
 		 <p><b><i>Upload License File</i></b> - if you have obtained Commercial
 		 <a href="http://www.in-portal.com/features-modules.html" target="_blank">Modules</a>
 		  or <a href="http://www.in-portal.com/support-downloads/customer-support.html" target="_blank">Support</a>
 		  from Intechnic you will be provided with a license file, upload it here.</p>
 		<!--
 		 <p><b><i>Download from Intechnic Servers</i></b> - .</p>
 		-->
 		 <p><b><i>Use Existing License</i></b> - if a valid license has been detected on your server,
 		 you can choose this option and continue the installation process.</p>]]>
 	</step>
 	<step name="download_license" title="Download License" help_title="Download License from Intechnic">
 		<![CDATA[<p><b>In-Portal is an Open Source</b> object-oriented framework that is developed in PHP
 		 and provides a quick and easy way to build websites and web applications.</p>
 
 		 <p>In-Portal is copyrighted and distributed under <a href="http://www.in-portal.org/license" target="_blank">GPLv2 license</a>.</p>
 
 		 <p><b><i>GPL / Open Source License</i></b> - by downloading and installing In-Portal
 		  under GPLv2 license you understand and agree to all terms of
 		  <a href="http://www.in-portal.org/license" target="_blank">GPLv2 license</a>.</p>
 
 		 <p><b><i>Download from Intechnic Servers</i></b> - if you have obtained Commercial
 		 <a href="http://www.in-portal.com/features-modules.html" target="_blank">Modules</a>
 		  or <a href="http://www.in-portal.com/support-downloads/customer-support.html" target="_blank">Support</a>
 		  from Intechnic you will be provided with a license, specify your Username and Password in order to download the license.</p>]]>
 	</step>
 	<step name="select_domain" title="Select Domain" help_title="Select Licensed Domain">
 		<![CDATA[<p>Select the domain you wish to install In-Portal on.</p>
 
 		<p>The <i>Other</i> option can be used to install In-Portal other custom domains. Note that your web server should match entered domain name.</p>]]>
 	</step>
 	<step name="root_password" title="Set Root Password" help_title="Set Admin Root Password">
 		<![CDATA[<p>The <b>Root Password</b> is initially required to access the Admin Console of In-Portal.
 		The root user can <b>NOT</b> be used to access the Front-end of your In-Portal website.</p>
 
 		<p>Once installation is completed it's highly recommented to create additional users with admin privlidges.</p>]]>
 	</step>
 	<step name="choose_modules" title="Modules to Install">
 		<![CDATA[<p>Current step lists all <b>In-Portal Modules</b> that were found on your server and can be installed now.</p>
 
 		<p>Additional <a href="http://www.in-portal.com/features-modules.html" target="_blank">In-Portal Modules</a> can be found and downloaded <a href="http://www.in-portal.com/features-modules.html" target="_blank">here</a>.</p>
 
 		<p>While <a href="http://www.in-portal.com/features-modules.html" target="_blank">In-Portal Community</a> constantly works on improving In-Portal by creating new functionality and releasing new modules we are always looking for new ideas and Your help so we can make In-Portal even better software!</p>]]>
 	</step>
 	<step name="check_paths" title="Filesystem Check">
 		<![CDATA[<p><b>In-Portal Installer checks through the system folders and files</b> that require write permissions (777) to be set in order to run successfully In-Portal on your website.</p>
 
 		<p>In case if you see a <strong>Failure notice</strong> saying that In-Portal Installation cannot continue until all permissions are set correctly please continue reading below.</p>
 
 		<p><strong>Permissions can be set</strong> by using <a href="http://www.google.com/search?q=free+ftp+program" target="_blank">FTP program</a> or directly in <i>shell</i> running "chmod" command. Please refer to the following <a href="http://www.stadtaus.com/en/tutorials/chmod-ftp-file-permissions.php" target="_blank">guide</a> to learn how to set permissions using your FTP program. In case if you have access to <i>shell</i> in your account you can simply run fix_perms.sh files located in /tools folder or do <br/><br/>
 		&nbsp;&nbsp;&nbsp;# chmod -R 777 ../system ../themes ../system/config.php</p>
 
 		<p><strong>Security reasons</strong> you will be asked to change permissions back to 755 on /system/config.php file and root / folder of In-Portal on the last step of this installation process!</p>
 		]]>
 	</step>
 	<step name="post_config" title="Basic Configuration">
 		<![CDATA[<p>Adjust <b>Basic Configuration</b> settings on this step.</p>
 
 		<p>Once your In-Portal is installed you can login into <b>Admin Console</b> to change these and other settings. The Configuration section is located in main navigation menu.</p>
 		<br/>
 		<p><b>Additional Recommendations:</b></p>
 
 		<p><b><i>1. Use Cron</i></b> (<a href="http://en.wikipedia.org/wiki/Cron" target="_blank">UNIX/BSD/Linux</a>) or <b>Task Scheduler</b> (<a href="http://en.wikipedia.org/wiki/Task_Scheduler" target="_blank">Windows</a>) to run Regular Events in your In-Portal.<br />
 				It's highly recommended to setup your cron to run <b>every minute</b> so all system events that are enabled will run in the background based on their schedule. These events can be managed in Admin Console via <b><i>Configuration -> Website -> Scheduled Tasks</i></b> section.
 				<p>In-Portal <b>cron</b> file is located in <b>/tools/cron.php</b> folder and can be setup using hosting Control Panel or <a href="http://en.wikipedia.org/wiki/Cron" target="_blank">manually</a>. In Plesk or CPanel interfaces use dialog to add a new cron job and specify the following (use correct paths)<br />
 				&nbsp;&nbsp;&nbsp;<b>/absolute/path/to/bin/php -f /absolute/path/to/in-portal/tools/cron.php</b></p>
 
 				<p><b><i>2. Adjust Scheduled Tasks</i></b><br />
 				As was explained in the previous recommendation there is a <b><i>Configuration -> Website -> Scheduled Tasks</i></b> section where you can control Events triggered by the system. These events do their job to cleanup the data, old image files, check the data integrity, RSS feeds and other processes required for your In-Portal to run efficiently. We do recommend to review and enable/disable these events based on your website needs.</p>
 				<p><b><i>3. Set Mail Server</i></b><br />
 				 It's recommended to review and adjust your mail server settings once your In-Portal is up and running. This can be done in Admin Console under <b><i>Configuration -> Website -> Advanced</i></b> section.</p>
 
 				 <p><b>We strongly recommend carefully reviewing and adjusting all settings under Configuration -> Website section!</b></p>
 
 		]]>
 	</step>
 	<step name="sys_config" title="System Configuration">
 		<![CDATA[<p>These are system advanced settings and must be changed with caution. It's <strong><i>not recommended</i></strong> to
 		change these settings unless you exactly know what you are doing. These settings will be stored in <strong>system/config.php</strong>
 		file and can be changed manually if needed.</p>
 		<br/>
 
 		<p><b><i>Web Path to Installation</i></b> - web path to the root of your In-Portal installation. For example,
 		if your In-Portal will be running at http://www.your-website.com, then Web Path to Installation should be left empty
 		since In-Portal is setup in the root of the domain. In case if your In-Portal will be running under
 		 http://www.your-website.com/in-portal/, then it should be set to <b>/in-portal</b> (no trailing slash). This setting is auto-detected during the
 		 initial installation step, but can be adjusted at Installation Maintenance step.</p>
 
 		<p><b><i>Path to Writable folder</i></b> - path to a folder inside your In-Portal installation which can be accessed from the Web
 		 and has writable permissions for the web server. This folder will be used to store dynamic content such as
 		  uploaded and resized images, cached templates and other types of user files. The default value is <b>/system</b>.</p>
 
 		<p><b><i>Path to Restricted folder</i></b> - path to a folder inside or outside your In-Portal installation which will
 		used to store debug files, system logs and other non-public information. This folder must be writable by the web-server
 		 and can be located outside of your In-Portal installation if needed. The default value is <b>/system/.restricted</b> .</p>
 
 		<p><b><i>Path to Admin folder</i></b> - web path to your In-Portal Admin Console folder. The default value is set to
 		 <b>/admin</b> and your Admin Console will be accessible at http://www.your-website.com/admin.
 		 In case if you want your Admin Console to be under http://www.your-website.com/secure-admin (or anything else)
 		 you'll need to rename original <b>admin</b> folder to <b>secure-admin</b> on your filesystem and then set this path to <b>/secure-admin</b> .</p>
 
 		<p><b><i>Path to Admin Interface Presets folder</i></b> - path to a folder inside your In-Portal installation
 		contains Admin Interface Presets. The default value is <b>/admin</b> .</p>
 
 		<p><b><i>Name of Base Application Class</i></b> - default value is <b>kApplication</b> and can change very rarely. </p>
 
 		<p><b><i>Path to Base Application Class file</i></b> - default value is <b>/core/kernel/application.php</b> and can change very rarely.</p>
 
 		<p><b><i>Output Caching Engine</i></b> - provides ability to cache HTML output or other data using various caching engines to
 		 lower the database load. The default value is set to <b>None</b> if no available engines detected. Available options are:
 		  None (Fake), Memcached (Memcache), XCache (XCache) and Alternative PHP Cache (Apc).
 		  Note that only auto-detected caching engines will be available for selection.</p>
 
 		<p><b><i>Location of Memcache Servers</i></b> - host or IP address with port where Memcached Server is running.
 		 Multiple locations of can be listed separated by semi-colon (;). For example, 192.168.1.1:1121;192.168.1.2:1121;192.168.1.3:1121 .</p>
 
 		<p><b><i>CSS/JS Compression Engine</i></b> - provides <a href="http://en.wikipedia.org/wiki/Minification_(programming)">minification</a>
 		 functionality for CSS / Javascript files. The default value is set to <b>PHP-based</b> if no Java is auto-detected on server-side.
 		 Available options are: None (empty), YUICompressor (Java) (yui) and PHP-based (php) .</p>
 
+		<p><b><i>Website Charset</i></b> - character encoding that will be used across the website. By default this should be set to UTF-8,
+		but can  set to other encoding also (see <a href="http://en.wikipedia.org/wiki/Character_encoding">wikipedia.org</a> options).
+		It's highly recommended to have Website Encoding match the Database Encoding (specified on DB step).</p>
+
 		<br/>
 		]]>
 	</step>
 	<step name="select_theme" title="Select Default Theme">
 		<![CDATA[<p>Selected theme will be used as a default in your In-Portal website.</p>
 		<p>You can manage your themes in Admin Console under Configuration -> Website -> Themes section.</p>
 
 		<p>Additional themes are available on <a href="http://www.in-portal.com/support-downloads.html" target="_blank">Support & Downloads</a> section on <a href="http://www.in-portal.com" target="_blank">In-Portal.com</a> website</p>]]>
 	</step>
 	<step name="security" title="Security Check">
 		<![CDATA[<p><strong>In-Portal Installer</strong> performs final security checks on this step.</p>
 
 		<p><b>1. Write Permissions Check</b> - checks whether critical In-Portal files are open for the outside world and can be used by hackers to attack your websites. <b>You won't be able to continue until you correctly set these permissions!</b></p>
 
 		<p><b>2. Ability to Execute PHP in Writable Folders</b> - checks if hackers can save and execute PHP files in your /system
 		folder used for the uploads.While it's recommended to adjust these settings you can continue In-Portal Installation without changing them.</p>
 		<p><b>3. Webserver PHP Configuration</b> - additional suggestions how to make your website even more secure. While it's recommended to adjust these settings you can continue In-Portal Installation without changing them.</p>
 
 		]]>
 	</step>
 	<step name="finish" title="Installation Complete" help_title="Thank You!">
 		<![CDATA[<p>Thank you for downloading and installing In-Portal Content Management System!</p>
 
 		<p>Feel free to visit <a target="_new" href="http://www.in-portal.com">www.in-portal.com</a> for support, latest news and module updates.</p>
     	<p><strong>Please make sure to clean your Browser's Cache if you were performing the upgrade.</strong></p>]]>
     </step>
     <step name="install_setup" title="Installation Maintenance">
     	<![CDATA[<p>A Configuration file has been detected on your system and it appears In-Portal is correctly installed.
 		In order to work with the maintenance functions provided to the left you must enter your admin Root password.
 		<b><i>(Use Username 'root' if using your root password)</i></b></p>
 
 		<p><b><i>Upgrade In-Portal</i></b> - available when you upload files from new In-Portal release into
 		your current installation. Upgrade scripts will run and upgrade your current In-Portal database to the uploaded version.</p>
 
 		<p><b><i>Reinstall In-Portal</i></b> - cleans out your existing In-Portal database and starts with a fresh installation.
 		<i>Note</i> that this operation cannot be undone and no backups are made! Use at your own risk.</p>
 
 		<p><b><i>Install In-Portal to a New Database</i></b> - keeps the existing installation and installs In-Portal to a new database.
 		If this option is selected you will be prompted for new database configuration information.</p>
 
 		<p><b><i>Update License Information</i></b> - used to update your In-Portal license data. Select this option if you have
 		modified your licensing status with Intechnic (obtained commercial support or module), or you have received new license data via email.</p>
 		<p><b><i>Update Database Configuration</i></b> - allows you to update your current database configuration variables such as
 		database server host, username, password and others.</p>
 
 		<p><b><i>Update Installation Paths</i></b> - should be used when the location of your In-Portal files has changed.
 		For example, if you moved them from one folder to another. It will update all settings and ensure In-Portal
 		is operational at the new location.</p>]]>
     </step>
     <step name="upgrade_modules" title="Select Modules to Upgrade">
     	<![CDATA[<p>Select modules from the list, you need to update to the last downloaded version of In-Portal</p>]]>
     </step>
     <step name="skin_upgrade" title="Admin Skin Upgrade">
     	<![CDATA[<p>Review Administrative Console skin upgrade log.</p>]]>
     </step>
     <step name="db_reconfig" title="Update Database Configuration">
 		<![CDATA[<p>In-Portal needs to connect to your Database Server. Please provide the database server type*,
 		host name (<i>normally "localhost"</i>), Database user name, and database Password. These fields are required
 		to connect to the database.</p><p>If you would like In-Portal to use a table prefix, enter it in the field
 		provided. This prefix can be any text which can be used in the names of tables on your system.
 		The characters entered in this field are placed <i>before</i> the names of the tables used by In-Portal.
 		For example, if you enter "inp_" into the prefix field, the table named Categories will be named inp_Categories.</p>]]>
 	</step>
     <step name="sys_requirements" title="System Requirements Check">
     	<![CDATA[The <i>System Requirements Check</i> option should be used to ensure proper system behavior in the current environment.]]>
     </step>
 </steps>
\ No newline at end of file
Index: branches/5.2.x/core/install/english.lang
===================================================================
--- branches/5.2.x/core/install/english.lang	(revision 15444)
+++ branches/5.2.x/core/install/english.lang	(revision 15445)
@@ -1,2151 +1,2151 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LANGUAGES Version="6">
-	<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" ShortDateFormat="m/d" TimeFormat="g:i A" ShortTimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," Charset="utf-8" UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
+	<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" ShortDateFormat="m/d" TimeFormat="g:i A" ShortTimeFormat="g:i A" InputDateFormat="m/d/Y" InputTimeFormat="g:i:s A" DecimalPoint="." ThousandSep="," UnitSystem="2" Locale="en-US" UserDocsUrl="http://docs.in-portal.org/eng/index.php">
 		<EMAILDESIGNS>
 			<HTML>JGJvZHkNCjxici8+PGJyLz4NCg0KU2luY2VyZWx5LDxici8+PGJyLz4NCg0KV2Vic2l0ZSBhZG1pbmlzdHJhdGlvbi4NCg0KPCEtLSMjIDxpbnAyOmVtYWlsLWxvZ19JdGVtTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9lbWFpbCIvPiAjIy0tPg==</HTML>
 		</EMAILDESIGNS>
 		<PHRASES>
 			<PHRASE Label="la_Active" Module="Core" Type="1">QWN0aXZl</PHRASE>
 			<PHRASE Label="la_Add" Module="Core" Type="1">QWRk</PHRASE>
 			<PHRASE Label="la_AddTo" Module="Core" Type="1">QWRkIFRv</PHRASE>
 			<PHRASE Label="la_AdministrativeConsole" Module="Core" Type="1">QWRtaW5pc3RyYXRpdmUgQ29uc29sZQ==</PHRASE>
 			<PHRASE Label="la_AllowChangingAdminConsoleInterface" Module="Core" Type="1">YWxsb3cgY2hhbmdpbmc=</PHRASE>
 			<PHRASE Label="la_AllowDeleteRootCats" Module="Core" Type="1">QWxsb3cgZGVsZXRpbmcgTW9kdWxlIFJvb3QgU2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_alt_Browse" Module="Core" Type="1">VmlldyBpbiBCcm93c2UgTW9kZQ==</PHRASE>
 			<PHRASE Label="la_alt_GoInside" Module="Core" Type="1">R28gSW5zaWRl</PHRASE>
 			<PHRASE Label="la_Always" Module="Core" Type="1">QWx3YXlz</PHRASE>
 			<PHRASE Label="la_and" Module="Core" Type="1">YW5k</PHRASE>
 			<PHRASE Label="la_Auto" Module="Core" Type="1">QXV0bw==</PHRASE>
 			<PHRASE Label="la_Automatic" Module="Core" Type="1">QXV0b21hdGlj</PHRASE>
 			<PHRASE Label="la_AvailableColumns" Module="Core" Type="1">QXZhaWxhYmxlIENvbHVtbnM=</PHRASE>
 			<PHRASE Label="la_AvailableItems" Module="Core" Type="1">QXZhaWxhYmxlIEl0ZW1z</PHRASE>
 			<PHRASE Label="la_Background" Module="Core" Type="1">QmFja2dyb3VuZA==</PHRASE>
 			<PHRASE Label="la_Borders" Module="Core" Type="1">Qm9yZGVycw==</PHRASE>
 			<PHRASE Label="la_btn_Add" Module="Core" Type="1">QWRk</PHRASE>
 			<PHRASE Label="la_btn_AdminEditItem" Module="Core" Type="1">RWRpdCBJdGVt</PHRASE>
 			<PHRASE Label="la_btn_BrowseMode" Module="Core" Type="1">QnJvd3NlIE1vZGU=</PHRASE>
 			<PHRASE Label="la_btn_Cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
 			<PHRASE Label="la_btn_Change" Module="Core" Type="1">Q2hhbmdl</PHRASE>
 			<PHRASE Label="la_btn_Clear" Module="Core" Type="1">Q2xlYXI=</PHRASE>
 			<PHRASE Label="la_btn_ContentMode" Module="Core" Type="1">Q29udGVudCBNb2Rl</PHRASE>
 			<PHRASE Label="la_btn_Delete" Module="Core" Type="1">RGVsZXRl</PHRASE>
 			<PHRASE Label="la_btn_DeleteDraft" Module="Core" Type="1">RGVsZXRl</PHRASE>
 			<PHRASE Label="la_btn_DeleteReview" Module="Core" Type="1">ZGVsZXRlIHJldmlldw==</PHRASE>
 			<PHRASE Label="la_btn_Deploy" Module="Core" Type="1">RGVwbG95</PHRASE>
 			<PHRASE Label="la_btn_DesignMode" Module="Core" Type="1">RGVzaWduIE1vZGU=</PHRASE>
 			<PHRASE Label="la_btn_Down" Module="Core" Type="1">RG93bg==</PHRASE>
 			<PHRASE Label="la_btn_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
 			<PHRASE Label="la_btn_EditBlock" Module="Core" Type="1">RWRpdCBCbG9jaw==</PHRASE>
 			<PHRASE Label="la_btn_EditContent" Module="Core" Type="1">RWRpdCBDb250ZW50</PHRASE>
 			<PHRASE Label="la_btn_EditDesign" Module="Core" Type="1">RWRpdCBEZXNpZ24=</PHRASE>
 			<PHRASE Label="la_btn_Generate" Module="Core" Type="1">R2VuZXJhdGU=</PHRASE>
 			<PHRASE Label="la_btn_GeneratePage" Module="Core" Type="1">R2VuZXJhdGUgUGFnZQ==</PHRASE>
 			<PHRASE Label="la_btn_GetValue" Module="Core" Type="1">R2V0IFZhbHVl</PHRASE>
 			<PHRASE Label="la_btn_Locate" Module="Core" Type="1">TG9jYXRl</PHRASE>
 			<PHRASE Label="la_btn_MoveDown" Module="Core" Type="1">TW92ZSBEb3du</PHRASE>
 			<PHRASE Label="la_btn_MoveUp" Module="Core" Type="1">TW92ZSBVcA==</PHRASE>
 			<PHRASE Label="la_btn_PublishingTools" Module="Core" Type="1">UHVibGlzaGluZyBUb29scw==</PHRASE>
 			<PHRASE Label="la_btn_Rebuild" Module="Core" Type="1">UmVidWlsZA==</PHRASE>
 			<PHRASE Label="la_btn_Recompile" Module="Core" Type="1">UmVjb21waWxl</PHRASE>
 			<PHRASE Label="la_btn_Refresh" Module="Core" Type="1">UmVmcmVzaA==</PHRASE>
 			<PHRASE Label="la_btn_Reset" Module="Core" Type="1">UmVzZXQ=</PHRASE>
 			<PHRASE Label="la_btn_ResetAndValidateConfigFiles" Module="Core" Type="1">UmVzZXQgJmFtcDsgVmFsaWRhdGUgQ29uZmlnIEZpbGVz</PHRASE>
 			<PHRASE Label="la_btn_ResetRootPassword" Module="Core" Type="1">UmVzZXQgInJvb3QiIHBhc3N3b3Jk</PHRASE>
 			<PHRASE Label="la_btn_Save" Module="Core" Type="1">U2F2ZQ==</PHRASE>
 			<PHRASE Label="la_btn_SaveChanges" Module="Core" Type="1">U2F2ZSBDaGFuZ2Vz</PHRASE>
 			<PHRASE Label="la_btn_SectionProperties" Module="Core" Type="1">U2VjdGlvbiBQcm9wZXJ0aWVz</PHRASE>
 			<PHRASE Label="la_btn_SectionTemplate" Module="Core" Type="1">U2VjdGlvbiBUZW1wbGF0ZQ==</PHRASE>
 			<PHRASE Label="la_btn_SelectAll" Module="Core" Type="1">U2VsZWN0IEFsbA==</PHRASE>
 			<PHRASE Label="la_btn_SetValue" Module="Core" Type="1">U2V0IFZhbHVl</PHRASE>
 			<PHRASE Label="la_btn_ShowStructure" Module="Core" Type="1">U2hvdyBTdHJ1Y3R1cmU=</PHRASE>
 			<PHRASE Label="la_btn_Synchronize" Module="Core" Type="1">U3luY2hyb25pemU=</PHRASE>
 			<PHRASE Label="la_btn_Unselect" Module="Core" Type="1">VW5zZWxlY3Q=</PHRASE>
 			<PHRASE Label="la_btn_Up" Module="Core" Type="1">VXA=</PHRASE>
 			<PHRASE Label="la_btn_UseDraft" Module="Core" Type="1">VXNl</PHRASE>
 			<PHRASE Label="la_By" Module="Core" Type="1">Ynk=</PHRASE>
 			<PHRASE Label="la_Cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
 			<PHRASE Label="la_category" Module="Core" Type="1">U2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_category_daysnew_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGRheXMgZm9yIGEgY2F0LiB0byBiZSBORVc=</PHRASE>
 			<PHRASE Label="la_category_metadesc" Module="Core" Type="1">RGVmYXVsdCBNRVRBIGRlc2NyaXB0aW9u</PHRASE>
 			<PHRASE Label="la_category_metakey" Module="Core" Type="1">RGVmYXVsdCBNRVRBIEtleXdvcmRz</PHRASE>
 			<PHRASE Label="la_category_perpage_prompt" Module="Core" Type="1">TnVtYmVyIG9mIHNlY3Rpb25zIHBlciBwYWdl</PHRASE>
 			<PHRASE Label="la_category_perpage__short_prompt" Module="Core" Type="1">U2VjdGlvbnMgUGVyIFBhZ2UgKFNob3J0bGlzdCk=</PHRASE>
 			<PHRASE Label="la_category_showpick_prompt" Module="Core" Type="1">RGlzcGxheSBlZGl0b3IgUElDS3MgYWJvdmUgcmVndWxhciBzZWN0aW9ucw==</PHRASE>
 			<PHRASE Label="la_category_sortfield2_prompt" Module="Core" Type="1">QW5kIHRoZW4gYnk=</PHRASE>
 			<PHRASE Label="la_category_sortfield_prompt" Module="Core" Type="1">T3JkZXIgc2VjdGlvbnMgYnk=</PHRASE>
 			<PHRASE Label="la_Close" Module="Core" Type="1">Q2xvc2U=</PHRASE>
 			<PHRASE Label="la_col_Access" Module="Core" Type="1">QWNjZXNz</PHRASE>
 			<PHRASE Label="la_col_AdditionalPermissions" Module="Core" Type="1">QWRkaXRpb25hbA==</PHRASE>
 			<PHRASE Label="la_col_AffectedItems" Module="Core" Type="1">QWZmZWN0ZWQgSXRlbXM=</PHRASE>
 			<PHRASE Label="la_col_AltName" Module="Core" Type="1">QWx0IFZhbHVl</PHRASE>
 			<PHRASE Label="la_col_BuildDate" Module="Core" Type="1">QnVpbGQgRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_col_CategoryName" Module="Core" Type="1">U2VjdGlvbiBOYW1l</PHRASE>
 			<PHRASE Label="la_col_ColumnPhrase" Module="Core" Type="1">Q29sdW1uIFBocmFzZQ==</PHRASE>
 			<PHRASE Label="la_col_Effective" Module="Core" Type="1">RWZmZWN0aXZl</PHRASE>
 			<PHRASE Label="la_col_EmailEvents" Module="Core" Type="1">RW1haWwgRXZlbnRz</PHRASE>
 			<PHRASE Label="la_col_EnableEmailCommunication" Module="Core" Type="1">RW5hYmxlIEUtbWFpbCBDb21tdW5pY2F0aW9u</PHRASE>
 			<PHRASE Label="la_col_Error" Module="Core" Type="1">Jm5ic3A7</PHRASE>
 			<PHRASE Label="la_col_EventDescription" Module="Core" Type="1">RXZlbnQgRGVzY3JpcHRpb24=</PHRASE>
 			<PHRASE Label="la_col_EventParams" Module="Core" Type="1">RXZlbnQgUGFyYW1z</PHRASE>
 			<PHRASE Label="la_col_HintPhrase" Module="Core" Type="1">SGludCBQaHJhc2U=</PHRASE>
 			<PHRASE Label="la_col_ImageEnabled" Module="Core" Type="1">U3RhdHVz</PHRASE>
 			<PHRASE Label="la_col_ImageName" Module="Core" Type="1">SW1hZ2U=</PHRASE>
 			<PHRASE Label="la_col_ImageUrl" Module="Core" Type="1">VVJM</PHRASE>
 			<PHRASE Label="la_col_Inherited" Module="Core" Type="1">SW5oZXJpdGVk</PHRASE>
 			<PHRASE Label="la_col_InheritedFrom" Module="Core" Type="1">SW5oZXJpdGVkIEZyb20=</PHRASE>
 			<PHRASE Label="la_col_InMenu" Module="Core" Type="1">SW4gTWVudQ==</PHRASE>
 			<PHRASE Label="la_col_IP" Module="Core" Type="1">SVAgQWRkcmVzcw==</PHRASE>
 			<PHRASE Label="la_col_IsPopular" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
 			<PHRASE Label="la_col_IsPrimaryLanguage" Module="Core" Type="1">VXNlciBQcmltYXJ5</PHRASE>
 			<PHRASE Label="la_col_Keyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
 			<PHRASE Label="la_col_Label" Module="Core" Type="1">TGFiZWw=</PHRASE>
 			<PHRASE Label="la_col_LanguagePackInstalled" Module="Core" Type="1">TGFuZ3VhZ2UgUGFjayBJbnN0YWxsZWQ=</PHRASE>
 			<PHRASE Label="la_col_LastChanged" Module="Core" Type="1">TGFzdCBDaGFuZ2Vk</PHRASE>
 			<PHRASE Label="la_col_LastCompiled" Module="Core" Type="1">TGFzdCBDb21waWxlZA==</PHRASE>
 			<PHRASE Label="la_col_LastSendRetry" Module="Core" Type="1">TGFzdCBBdHRlbXB0</PHRASE>
 			<PHRASE Label="la_col_LinkUrl" Module="Core" Type="1">TGluayBVUkw=</PHRASE>
 			<PHRASE Label="la_col_MailingList" Module="Core" Type="1">TWFpbGluZyBMaXN0</PHRASE>
 			<PHRASE Label="la_col_MembershipExpires" Module="Core" Type="1">TWVtYmVyc2hpcCBFeHBpcmVz</PHRASE>
 			<PHRASE Label="la_col_MessageHeaders" Module="Core" Type="1">TWVzc2FnZSBIZWFkZXJz</PHRASE>
 			<PHRASE Label="la_col_MessageHtml" Module="Core" Type="1">SFRNTA==</PHRASE>
 			<PHRASE Label="la_col_OriginalValue" Module="Core" Type="1">T3JpZ2luYWwgVmFsdWU=</PHRASE>
 			<PHRASE Label="la_col_Path" Module="Core" Type="1">UGF0aA==</PHRASE>
 			<PHRASE Label="la_col_PermAdd" Module="Core" Type="1">QWRk</PHRASE>
 			<PHRASE Label="la_col_PermDelete" Module="Core" Type="1">RGVsZXRl</PHRASE>
 			<PHRASE Label="la_col_PermEdit" Module="Core" Type="1">RWRpdA==</PHRASE>
 			<PHRASE Label="la_col_PermissionName" Module="Core" Type="1">UGVybWlzc2lvbiBOYW1l</PHRASE>
 			<PHRASE Label="la_col_PermissionValue" Module="Core" Type="1">QWNjZXNz</PHRASE>
 			<PHRASE Label="la_col_PermView" Module="Core" Type="1">Vmlldw==</PHRASE>
 			<PHRASE Label="la_col_Phrases" Module="Core" Type="1">UGhyYXNlcw==</PHRASE>
 			<PHRASE Label="la_col_PortalUserId" Module="Core" Type="1">VXNlciBJRA==</PHRASE>
 			<PHRASE Label="la_col_Preview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
 			<PHRASE Label="la_col_PrimaryGroup" Module="Core" Type="1">UHJpbWFyeSBHcm91cA==</PHRASE>
 			<PHRASE Label="la_col_PrimaryValue" Module="Core" Type="1">UHJpbWFyeSBWYWx1ZQ==</PHRASE>
 			<PHRASE Label="la_col_Prompt" Module="Core" Type="1">RmllbGQgUHJvbXB0</PHRASE>
 			<PHRASE Label="la_col_Queued" Module="Core" Type="1">UXVldWVk</PHRASE>
 			<PHRASE Label="la_col_Referer" Module="Core" Type="1">UmVmZXJlcg==</PHRASE>
 			<PHRASE Label="la_col_ResetToDefaultSorting" Module="Core" Type="1">UmVzZXQgdG8gZGVmYXVsdA==</PHRASE>
 			<PHRASE Label="la_col_ReviewCount" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
 			<PHRASE Label="la_col_ReviewedBy" Module="Core" Type="1">Q3JlYXRlZCBieQ==</PHRASE>
 			<PHRASE Label="la_col_ScheduleFromDate" Module="Core" Type="1">U2NoZWR1bGUgRnJvbSBEYXRl</PHRASE>
 			<PHRASE Label="la_col_ScheduleToDate" Module="Core" Type="1">U2NoZWR1bGUgVG8gRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_col_SendRetries" Module="Core" Type="1">QXR0ZW1wdHMg</PHRASE>
 			<PHRASE Label="la_col_SessionEnd" Module="Core" Type="1">U2Vzc2lvbiBFbmQ=</PHRASE>
 			<PHRASE Label="la_col_SessionStart" Module="Core" Type="1">U2Vzc2lvbiBTdGFydA==</PHRASE>
 			<PHRASE Label="la_col_SortBy" Module="Core" Type="1">U29ydCBieQ==</PHRASE>
 			<PHRASE Label="la_col_System" Module="Core" Type="1">VHlwZQ==</PHRASE>
 			<PHRASE Label="la_col_SystemPath" Module="Core" Type="1">U3lzdGVtIFBhdGg=</PHRASE>
 			<PHRASE Label="la_col_TargetType" Module="Core" Type="1">SXRlbSBUeXBl</PHRASE>
 			<PHRASE Label="la_col_UserCount" Module="Core" Type="1">VXNlcnM=</PHRASE>
 			<PHRASE Label="la_col_UserFirstLastName" Module="Core" Type="1">TGFzdG5hbWUgRmlyc3RuYW1l</PHRASE>
 			<PHRASE Label="la_col_Value" Module="Core" Type="1">RmllbGQgVmFsdWU=</PHRASE>
 			<PHRASE Label="la_col_Visible" Module="Core" Type="1">VmlzaWJsZQ==</PHRASE>
 			<PHRASE Label="la_col_VisitDate" Module="Core" Type="1">VmlzaXQgRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_common_ascending" Module="Core" Type="1">QXNjZW5kaW5n</PHRASE>
 			<PHRASE Label="la_common_descending" Module="Core" Type="1">RGVzY2VuZGluZw==</PHRASE>
 			<PHRASE Label="la_config_AdminConsoleInterface" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBJbnRlcmZhY2U=</PHRASE>
 			<PHRASE Label="la_config_AdminSSL_URL" Module="Core" Type="1">U1NMIEZ1bGwgVVJMIGZvciBBZG1pbmlzdHJhdGl2ZSBDb25zb2xlIChodHRwczovL3d3dy5kb21haW4uY29tL3BhdGgpIA==</PHRASE>
 			<PHRASE Label="la_config_AllowSelectGroupOnFront" Module="Core" Type="1">QWxsb3cgdG8gc2VsZWN0IG1lbWJlcnNoaXAgZ3JvdXAgb24gRnJvbnQtZW5k</PHRASE>
 			<PHRASE Label="la_config_AutoRefreshIntervals" Module="Core" Type="1">TGlzdCBhdXRvbWF0aWMgcmVmcmVzaCBpbnRlcnZhbHMgKGluIG1pbnV0ZXMp</PHRASE>
 			<PHRASE Label="la_config_backup_path" Module="Core" Type="1">QmFja3VwIFBhdGg=</PHRASE>
 			<PHRASE Label="la_config_CatalogPreselectModuleTab" Module="Core" Type="1">U3dpdGNoIENhdGFsb2cgdGFicyBiYXNlZCBvbiBNb2R1bGU=</PHRASE>
 			<PHRASE Label="la_config_CategoryPermissionRebuildMode" Module="Core" Type="1" Hint="TWFudWFsIC0gbmV2ZXIgcmVidWlsZCBhdXRvbWF0aWNhbGx5DQpTaWxlbnQgLSBhbHdheXMgcmVidWlsZCB3aXRob3V0IHByb2dyZXNzIGJhcg0KQXV0b21hdGljIC0gYWx3YXlzIHJlYnVpbGQsIGJ1dCB1c2UgcHJvZ3Jlc3MgYmFyIG9uIGxhcmdlIHNlY3Rpb24gY291bnQ=">U2VjdGlvbiBQZXJtaXNzaW9uIFJlYnVpbGQgTW9kZQ==</PHRASE>
 			<PHRASE Label="la_config_CheckStopWords" Module="Core" Type="1">Q2hlY2sgU3RvcCBXb3Jkcw==</PHRASE>
 			<PHRASE Label="la_config_CKFinderLicenseKey" Module="Core" Type="1">Q0tGaW5kZXIgTGljZW5zZSBLZXk=</PHRASE>
 			<PHRASE Label="la_config_CKFinderLicenseName" Module="Core" Type="1">Q0tGaW5kZXIgTGljZW5zZSBOYW1l</PHRASE>
 			<PHRASE Label="la_config_CSVExportDelimiter" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IERlbGltaXRlcg==</PHRASE>
 			<PHRASE Label="la_config_CSVExportEnclosure" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IEVuY2xvc3VyZSBDaGFyYWN0ZXI=</PHRASE>
 			<PHRASE Label="la_config_CSVExportEncoding" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IEVuY29kaW5n</PHRASE>
 			<PHRASE Label="la_config_CSVExportSeparator" Module="Core" Type="1">RGVmYXVsdCBDU1YgRXhwb3J0IE5ldyBMaW5lIFNlcGFyYXRvcg==</PHRASE>
 			<PHRASE Label="la_config_DebugOnlyFormConfigurator" Module="Core" Type="1">U2hvdyAiRm9ybXMgRWRpdG9yIiBpbiBERUJVRyBtb2RlIG9ubHk=</PHRASE>
 			<PHRASE Label="la_config_DebugOnlyPromoBlockGroupConfigurator" Module="Core" Type="1">U2hvdyAiUHJvbW8gQmxvY2sgR3JvdXBzIEVkaXRvciIgaW4gREVCVUcgbW9kZSBvbmx5</PHRASE>
 			<PHRASE Label="la_config_DefaultDesignTemplate" Module="Core" Type="1">RGVmYXVsdCBEZXNpZ24gVGVtcGxhdGU=</PHRASE>
 			<PHRASE Label="la_config_DefaultEmailRecipients" Module="Core" Type="1">RGVmYXVsdCBFLW1haWwgUmVjaXBpZW50cw==</PHRASE>
 			<PHRASE Label="la_config_DefaultGridPerPage" Module="Core" Type="1">RGVmYXVsdCAiUGVyIFBhZ2UiIHNldHRpbmcgaW4gR3JpZHM=</PHRASE>
 			<PHRASE Label="la_config_DefaultRegistrationCountry" Module="Core" Type="1">RGVmYXVsdCBSZWdpc3RyYXRpb24gQ291bnRyeQ==</PHRASE>
 			<PHRASE Label="la_config_DefaultTrackingCode" Module="Core" Type="1">RGVmYXVsdCBBbmFseXRpY3MgVHJhY2tpbmcgQ29kZQ==</PHRASE>
 			<PHRASE Label="la_config_EmailLogRotationInterval" Module="Core" Type="1" Hint="RW1haWwgTG9nIHN0b3JlcyB0aGUgZXhhY3QgY29weSBvZiBhbGwgZW1haWxzIHRoYXQgYmVlbiBzZW50IG91dCBieSB5b3VyIHdlYnNpdGUuIFRoZSBmb2xsb3dpbmcgaW5mb3JtYXRpb24gaXMgc3RvcmVkOiBUaW1lLCBTZW5kZXIsIFJlY2lwaWVudCwgU3ViamVjdCBhbmQgRW1haWwgQm9keS4gVGhpcyBzZXR0aW5nIGFsbG93cyB5b3UgdG8gY29udHJvbCBmb3IgaG93IGxvbmcgdGhlc2UgZW1haWxzIHdpbGwgYmUgc3RvcmVkIGluIHRoZSBsb2cgYW5kIHRoZW4gYXV0b21hdGljYWxseSBkZWxldGVkLiBVc2Ugb3B0aW9uIE5ldmVyIHRvIGNvbXBsZXRlbHkgdHVybiBlbWFpbCBsb2dnaW5nIG9mZiwgYW5kIG9wdGlvbiBGb3JldmVyIHRvIGRpc2FibGUgYXV0b21hdGljIGxvZyBjbGVhbnVwLg==">S2VlcCBFbWFpbCBMb2cgZm9y</PHRASE>
 			<PHRASE Label="la_config_EnablePageContentRevisionControl" Module="Core" Type="1">RW5hYmxlIFJldmlzaW9uIENvbnRyb2wgZm9yIFNlY3Rpb24gQ29udGVudA==</PHRASE>
 			<PHRASE Label="la_config_error_template" Module="Core" Type="1">VGVtcGxhdGUgZm9yICJGaWxlIG5vdCBmb3VuZCAoNDA0KSIgRXJyb3I=</PHRASE>
 			<PHRASE Label="la_config_ExcludeTemplateSectionsFromSearch" Module="Core" Type="1">RXhjbHVkZSB0ZW1wbGF0ZSBiYXNlZCBTZWN0aW9ucyBmcm9tIFNlYXJjaCBSZXN1bHRzIChpZS4gVXNlciBSZWdpc3RyYXRpb24p</PHRASE>
 			<PHRASE Label="la_config_FilenameSpecialCharReplacement" Module="Core" Type="1">RmlsZW5hbWUgU3BlY2lhbCBDaGFyIFJlcGxhY2VtZW50</PHRASE>
 			<PHRASE Label="la_config_first_day_of_week" Module="Core" Type="1">Rmlyc3QgRGF5IE9mIFdlZWs=</PHRASE>
 			<PHRASE Label="la_config_ForceImageMagickResize" Module="Core" Type="1">QWx3YXlzIHVzZSBJbWFnZU1hZ2ljayB0byByZXNpemUgaW1hZ2Vz</PHRASE>
 			<PHRASE Label="la_config_ForceModRewriteUrlEnding" Module="Core" Type="1" Hint="VXNlciB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVkaXJlY3RlZCB0byB0aGUgc2VsZWN0ZWQgVXJsIEVuZGluZyBpbiBjYXNlIHdoZW4gY3VycmVudCBwYWdlIHVybCBoYXMgYSBkaWZmZXJlbnQgZW5kaW5n">Rm9yY2UgUmVkaXJlY3QgdG8gU2VsZWN0ZWQgVVJMIEVuZGluZw==</PHRASE>
 			<PHRASE Label="la_config_force_http" Module="Core" Type="1">UmVkaXJlY3QgdG8gSFRUUCB3aGVuIFNTTCBpcyBub3QgcmVxdWlyZWQ=</PHRASE>
 			<PHRASE Label="la_config_FullImageHeight" Module="Core" Type="1">RnVsbCBpbWFnZSBIZWlnaHQ=</PHRASE>
 			<PHRASE Label="la_config_FullImageWidth" Module="Core" Type="1">RnVsbCBpbWFnZSBXaWR0aA==</PHRASE>
 			<PHRASE Label="la_config_HardMaintenanceTemplate" Module="Core" Type="1" Hint="VGhpcyB0ZW1wbGF0ZSB3aWxsIGJlIHVzZWQgdG8gc3RhdGljIEhUTUwgZmlsZSB1bmRlciAvc3lzdGVtIGZvbGRlciB0byBiZSBzaG93biBvbiBGcm9udC1lbmQgb3IgQWRtaW4gd2hlbiBIYXJkIE1haW50ZW5hbmNlIG1vZGUgaXMgYWN0aXZlLiBTdGF0aWMgcGFnZSBzaG91bGQgYmUgZ2VuZXJhdGVkIGZyb20gc3BlY2lmaWVkIGhlcmUgdGVtcGxhdGUgYnkgY2xpY2tpbmcgIkdlbmVyYXRlIFBhZ2UiIGJ1dHRvbi4=">VGVtcGxhdGUgZm9yIEhhcmQgTWFpbnRlbmFuY2U=</PHRASE>
 			<PHRASE Label="la_config_HTTPAuthBypassIPs" Module="Core" Type="1">QnlwYXNzIEhUVFAgQXV0aGVudGljYXRpb24gZnJvbSBJUHMgKHNlcGFyYXRlZCBieSBzZW1pY29sb25zKQ==</PHRASE>
 			<PHRASE Label="la_config_HTTPAuthPassword" Module="Core" Type="1">UGFzc3dvcmQgZm9yIEhUVFAgQXV0aGVudGljYXRpb24=</PHRASE>
 			<PHRASE Label="la_config_HTTPAuthUsername" Module="Core" Type="1">VXNlcm5hbWUgZm9yIEhUVFAgQXV0aGVudGljYXRpb24=</PHRASE>
 			<PHRASE Label="la_config_KeepSessionOnBrowserClose" Module="Core" Type="1">S2VlcCBTZXNzaW9uIGFsaXZlIG9uIEJyb3dzZXIgY2xvc2U=</PHRASE>
 			<PHRASE Label="la_config_MailFunctionHeaderSeparator" Module="Core" Type="1">TWFpbCBGdW5jdGlvbiBIZWFkZXIgU2VwYXJhdG9y</PHRASE>
 			<PHRASE Label="la_config_MailingListQueuePerStep" Module="Core" Type="1">TWFpbGluZyBMaXN0IFF1ZXVlIFBlciBTdGVw</PHRASE>
 			<PHRASE Label="la_config_MailingListSendPerStep" Module="Core" Type="1">TWFpbGluZyBMaXN0IFNlbmQgUGVyIFN0ZXA=</PHRASE>
 			<PHRASE Label="la_config_MaintenanceMessageAdmin" Module="Core" Type="1" Hint="VGhpcyBtZXNzYWdlIHdpbGwgYmUgc2hvd24gb24gQWRtaW4gaW5zdGVhZCBvZiBMb2dpbiBmb3JtIGVpdGhlciB3aGVuIFNvZnQgb3IgSGFyZCBNYWludGVuYW5jZSBtb2RlcyBhcmUgZW5hYmxlZCB2aWEgZGVidWcucGhwIGZpbGUgb3IgdGhlcmUgbm8gRGF0YWJhc2UgY29ubmVjdGlvbi4=">TWFpbnRlbmFuY2UgTWVzc2FnZSBmb3IgQWRtaW4=</PHRASE>
 			<PHRASE Label="la_config_MaintenanceMessageFront" Module="Core" Type="1" Hint="VGhpcyBtZXNzYWdlIHdpbGwgYmUgc2hvd24gb24gRnJvbnQgRW5kIHdoZW4gZWl0aGVyIFNvZnQgb3IgSGFyZCBNYWludGVuYW5jZSBtb2RlcyBhcmUgZW5hYmxlZCB2aWEgZGVidWcucGhwIGZpbGUgb3IgdGhlcmUgbm8gRGF0YWJhc2UgY29ubmVjdGlvbi4=">TWFpbnRlbmFuY2UgTWVzc2FnZSBmb3IgRnJvbnQgRW5k</PHRASE>
 			<PHRASE Label="la_config_MaxImageCount" Module="Core" Type="1">TWF4aW11bSBudW1iZXIgb2YgaW1hZ2Vz</PHRASE>
 			<PHRASE Label="la_config_ModRewriteUrlEnding" Module="Core" Type="1">RGVmYXVsdCBVUkwgRW5kaW5nIGluIFNFTy1mcmllbmRseSBtb2Rl</PHRASE>
 			<PHRASE Label="la_config_nopermission_template" Module="Core" Type="1">VGVtcGxhdGUgZm9yICJJbnN1ZmZpY2llbnQgUGVybWlzc2lvbnMiIEVycm9y</PHRASE>
 			<PHRASE Label="la_config_OutputCompressionLevel" Module="Core" Type="1">R1pJUCBjb21wcmVzc2lvbiBsZXZlbCAwLTk=</PHRASE>
 			<PHRASE Label="la_config_PathToWebsite" Module="Core" Type="1">UGF0aCB0byBXZWJzaXRl</PHRASE>
 			<PHRASE Label="la_config_PerformExactSearch" Module="Core" Type="1" Hint="U2VhcmNoIGZvciBhbGwgZW50ZXJlZCBrZXl3b3JkcywgaW5zdGVhZCBvZiBhbnkgb25lIG9mIHRoZW0=">UGVyZm9ybSBFeGFjdCBTZWFyY2g=</PHRASE>
 			<PHRASE Label="la_config_PerpageReviews" Module="Core" Type="1">Q29tbWVudHMgcGVyIHBhZ2U=</PHRASE>
 			<PHRASE Label="la_config_RecycleBinFolder" Module="Core" Type="1">IlJlY3ljbGUgQmluIiBTZWN0aW9uSWQ=</PHRASE>
 			<PHRASE Label="la_config_RegistrationUsernameRequired" Module="Core" Type="1">VXNlcm5hbWUgUmVxdWlyZWQgRHVyaW5nIFJlZ2lzdHJhdGlvbg==</PHRASE>
 			<PHRASE Label="la_config_RememberLastAdminTemplate" Module="Core" Type="1">UmVzdG9yZSBsYXN0IHZpc2l0ZWQgQWRtaW4gU2VjdGlvbiBhZnRlciBMb2dpbg==</PHRASE>
 			<PHRASE Label="la_config_RequireSSLAdmin" Module="Core" Type="1">UmVxdWlyZSBTU0wgZm9yIEFkbWluaXN0cmF0aXZlIENvbnNvbGU=</PHRASE>
 			<PHRASE Label="la_config_require_ssl" Module="Core" Type="1">UmVxdWlyZSBTU0wgZm9yIGxvZ2luICYgY2hlY2tvdXQ=</PHRASE>
 			<PHRASE Label="la_config_ResizableFrames" Module="Core" Type="1">RnJhbWVzIGluIGFkbWluaXN0cmF0aXZlIGNvbnNvbGUgYXJlIHJlc2l6YWJsZQ==</PHRASE>
 			<PHRASE Label="la_config_Search_MinKeyword_Length" Module="Core" Type="1">TWluaW1hbCBTZWFyY2ggS2V5d29yZCBMZW5ndGg=</PHRASE>
 			<PHRASE Label="la_config_SessionBrowserSignatureCheck" Module="Core" Type="1">U2Vzc2lvbiBTZWN1cml0eSBDaGVjayBiYXNlZCBvbiBCcm93c2VyIFNpZ25hdHVyZQ==</PHRASE>
 			<PHRASE Label="la_config_SessionCookieDomains" Module="Core" Type="1">U2Vzc2lvbiBDb29raWUgRG9tYWlucyAoc2luZ2xlIGRvbWFpbiBwZXIgbGluZSk=</PHRASE>
 			<PHRASE Label="la_config_SessionIPAddressCheck" Module="Core" Type="1">U2Vzc2lvbiBTZWN1cml0eSBDaGVjayBiYXNlZCBvbiBJUA==</PHRASE>
 			<PHRASE Label="la_config_SiteNameSubTitle" Module="Core" Type="1">V2Vic2l0ZSBTdWJ0aXRsZQ==</PHRASE>
 			<PHRASE Label="la_config_site_zone" Module="Core" Type="1">VGltZSB6b25lIG9mIHRoZSBzaXRl</PHRASE>
 			<PHRASE Label="la_config_SoftMaintenanceTemplate" Module="Core" Type="1" Hint="VGhpcyB0ZW1wbGF0ZSB3aWxsIGJlIHNob3duIHRvIHRoZSBGcm9udCBFbmQgdXNlcnMgd2hlbiBTb2Z0IE1haW50ZW5hbmNlIG1vZGUgaXMgYWN0aXZlLg==">VGVtcGxhdGUgZm9yIFNvZnQgTWFpbnRlbmFuY2U=</PHRASE>
 			<PHRASE Label="la_config_ssl_url" Module="Core" Type="1">U1NMIEZ1bGwgVVJMIChodHRwczovL3d3dy5kb21haW4uY29tL3BhdGgp</PHRASE>
 			<PHRASE Label="la_config_StickyGridSelection" Module="Core" Type="1">VXNlIFN0aWNreSBHcmlkIFNlbGVjdGlvbg==</PHRASE>
 			<PHRASE Label="la_config_ThumbnailImageHeight" Module="Core" Type="1">VGh1bWJuYWlsIEhlaWdodA==</PHRASE>
 			<PHRASE Label="la_config_ThumbnailImageWidth" Module="Core" Type="1">VGh1bWJuYWlsIFdpZHRo</PHRASE>
 			<PHRASE Label="la_config_TrimRequiredFields" Module="Core" Type="1">VHJpbSBSZXF1aXJlZCBGaWVsZHM=</PHRASE>
 			<PHRASE Label="la_config_UpdateCountersOnFilterChange" Module="Core" Type="1">VXBkYXRlIGNvdW50ZXJzIChpbiBvdGhlciBmaWx0ZXJzKSBvbiBmaWx0ZXIgY2hhbmdl</PHRASE>
 			<PHRASE Label="la_config_UseChangeLog" Module="Core" Type="1">VHJhY2sgZGF0YWJhc2UgY2hhbmdlcyB0byBjaGFuZ2UgbG9n</PHRASE>
 			<PHRASE Label="la_config_UseColumnFreezer" Module="Core" Type="1">VXNlIENvbHVtbiBGcmVlemVy</PHRASE>
 			<PHRASE Label="la_config_UseContentLanguageNegotiation" Module="Core" Type="1">QXV0by1kZXRlY3QgVXNlcidzIGxhbmd1YWdlIGJhc2VkIG9uIGl0J3MgQnJvd3NlciBzZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_config_UseDoubleSorting" Module="Core" Type="1">VXNlIERvdWJsZSBTb3J0aW5n</PHRASE>
 			<PHRASE Label="la_config_UseHTTPAuth" Module="Core" Type="1">RW5hYmxlIEhUVFAgQXV0aGVudGljYXRpb24=</PHRASE>
 			<PHRASE Label="la_config_UseOutputCompression" Module="Core" Type="1">RW5hYmxlIEhUTUwgR1pJUCBjb21wcmVzc2lvbg==</PHRASE>
 			<PHRASE Label="la_config_UsePageHitCounter" Module="Core" Type="1">VXNlIFBhZ2VIaXQgY291bnRlcg==</PHRASE>
 			<PHRASE Label="la_config_UsePopups" Module="Core" Type="1">RWRpdGluZyBXaW5kb3cgU3R5bGU=</PHRASE>
 			<PHRASE Label="la_config_UserEmailActivationTimeout" Module="Core" Type="1">RW1haWwgYWN0aXZhdGlvbiBleHBpcmF0aW9uIHRpbWVvdXQgKGluIG1pbnV0ZXMp</PHRASE>
 			<PHRASE Label="la_config_UseSmallHeader" Module="Core" Type="1">VXNlIFNtYWxsIFNlY3Rpb24gSGVhZGVycw==</PHRASE>
 			<PHRASE Label="la_config_UseTemplateCompression" Module="Core" Type="1">Q29tcHJlc3MgQ29tcGlsZWQgUEhQIFRlbXBsYXRlcw==</PHRASE>
 			<PHRASE Label="la_config_UseToolbarLabels" Module="Core" Type="1">VXNlIFRvb2xiYXIgTGFiZWxz</PHRASE>
 			<PHRASE Label="la_config_UseVisitorTracking" Module="Core" Type="1">VXNlIFZpc2l0b3IgVHJhY2tpbmc=</PHRASE>
 			<PHRASE Label="la_config_use_js_redirect" Module="Core" Type="1">VXNlIEphdmFTY3JpcHQgcmVkaXJlY3Rpb24gYWZ0ZXIgbG9naW4vbG9nb3V0IChmb3IgSUlTKQ==</PHRASE>
 			<PHRASE Label="la_config_use_modrewrite" Module="Core" Type="1">RW5hYmxlIFNFTy1mcmllbmRseSBVUkxzIG1vZGUgKE1PRC1SRVdSSVRFKQ==</PHRASE>
 			<PHRASE Label="la_config_use_modrewrite_with_ssl" Module="Core" Type="1">RW5hYmxlIE1PRF9SRVdSSVRFIGZvciBTU0w=</PHRASE>
 			<PHRASE Label="la_config_website_name" Module="Core" Type="1">V2Vic2l0ZSBuYW1l</PHRASE>
 			<PHRASE Label="la_config_YahooApplicationId" Module="Core" Type="1">WWFob28gQXBwbGljYXRpb25JZA==</PHRASE>
 			<PHRASE Label="la_ConfirmDeleteExportPreset" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSBzZWxlY3RlZCBFeHBvcnQgUHJlc2V0Pw==</PHRASE>
 			<PHRASE Label="la_confirm_maintenance" Module="Core" Type="1">VGhlIHNlY3Rpb24gdHJlZSBtdXN0IGJlIHVwZGF0ZWQgdG8gcmVmbGVjdCB0aGUgbGF0ZXN0IGNoYW5nZXM=</PHRASE>
 			<PHRASE Label="la_CurrentTheme" Module="Core" Type="1">Q3VycmVudCBUaGVtZQ==</PHRASE>
 			<PHRASE Label="la_DataGrid1" Module="Core" Type="1">RGF0YSBHcmlkcw==</PHRASE>
 			<PHRASE Label="la_DataGrid2" Module="Core" Type="1">RGF0YSBHcmlkcyAy</PHRASE>
 			<PHRASE Label="la_days" Module="Core" Type="1">ZGF5cw==</PHRASE>
 			<PHRASE Label="la_Delete_Confirm" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3YW50IHRvIGRlbGV0ZSB0aGUgaXRlbShzKT8gVGhpcyBhY3Rpb24gY2Fubm90IGJlIHVuZG9uZS4=</PHRASE>
 			<PHRASE Label="la_Description_in-portal:advanced_view" Module="Core" Type="1">VGhpcyBzZWN0aW9uIGFsbG93cyB5b3UgdG8gbWFuYWdlIHNlY3Rpb25zIGFuZCBpdGVtcyBhY3Jvc3MgYWxsIHNlY3Rpb25z</PHRASE>
 			<PHRASE Label="la_Description_in-portal:browse" Module="Core" Type="1">VGhpcyBzZWN0aW9uIGFsbG93cyB5b3UgdG8gYnJvd3NlIHRoZSBjYXRhbG9nIGFuZCBtYW5hZ2Ugc2VjdGlvbnMgYW5kIGl0ZW1z</PHRASE>
 			<PHRASE Label="la_Description_in-portal:site" Module="Core" Type="1">TWFuYWdlIHRoZSBzdHJ1Y3R1cmUgb2YgeW91ciBzaXRlLCBpbmNsdWRpbmcgc2VjdGlvbnMsIGl0ZW1zIGFuZCBzZWN0aW9uIHNldHRpbmdzLg==</PHRASE>
 			<PHRASE Label="la_Disabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
 			<PHRASE Label="la_Doublequotes" Module="Core" Type="1">RG91YmxlLVF1b3Rlcw==</PHRASE>
 			<PHRASE Label="la_DownloadCSV" Module="Core" Type="1">RG93bmxvYWQgQ1NW</PHRASE>
 			<PHRASE Label="la_DownloadExportFile" Module="Core" Type="1">RG93bmxvYWQgRXhwb3J0IEZpbGU=</PHRASE>
 			<PHRASE Label="la_DownloadLanguageExport" Module="Core" Type="1">RG93bmxvYWQgTGFuZ3VhZ2UgRXhwb3J0</PHRASE>
 			<PHRASE Label="la_Draft" Module="Core" Type="1">RHJhZnQ=</PHRASE>
 			<PHRASE Label="la_DraftAvailableFrom" Module="Core" Type="1">RHJhZnQgQXZhaWxhYmxl</PHRASE>
 			<PHRASE Label="la_DraftSavedAt" Module="Core" Type="1">ZHJhZnQgc2F2ZWQgYXQgJXM=</PHRASE>
 			<PHRASE Label="la_EditingContent" Module="Core" Type="1">Q29udGVudCBFZGl0b3I=</PHRASE>
 			<PHRASE Label="la_EditingInProgress" Module="Core" Type="1">WW91IGhhdmUgbm90IHNhdmVkIGNoYW5nZXMgdG8gdGhlIGl0ZW0geW91IGFyZSBlZGl0aW5nITxiciAvPkNsaWNrIE9LIHRvIGxvb3NlIGNoYW5nZXMgYW5kIGdvIHRvIHRoZSBzZWxlY3RlZCBzZWN0aW9uPGJyIC8+b3IgQ2FuY2VsIHRvIHN0YXkgaW4gdGhlIGN1cnJlbnQgc2VjdGlvbi4=</PHRASE>
 			<PHRASE Label="la_editor_default_style" Module="Core" Type="1">RGVmYXVsdCB0ZXh0</PHRASE>
 			<PHRASE Label="la_EmptyFile" Module="Core" Type="1">RmlsZSBpcyBlbXB0eQ==</PHRASE>
 			<PHRASE Label="la_empty_file" Module="Core" Type="1">RmlsZSBpcyBlbXB0eQ==</PHRASE>
 			<PHRASE Label="la_Enabled" Module="Core" Type="1">RW5hYmxlZA==</PHRASE>
 			<PHRASE Label="la_error_CantDeleteSystemPermission" Module="Core" Type="1">Q2FuJ3QgZGVsZXRlIHN5c3RlbSBwZXJtaXNzaW9u</PHRASE>
 			<PHRASE Label="la_error_CantOpenFile" Module="Core" Type="1">Q2FuJ3Qgb3BlbiB0aGUgZmlsZQ==</PHRASE>
 			<PHRASE Label="la_error_cant_save_file" Module="Core" Type="1">Q2FuJ3Qgc2F2ZSBhIGZpbGU=</PHRASE>
 			<PHRASE Label="la_error_ConnectionFailed" Module="Core" Type="1">Q29ubmVjdGlvbiBGYWlsZWQ=</PHRASE>
 			<PHRASE Label="la_error_copy_subcategory" Module="Core" Type="1">RXJyb3IgY29weWluZyBzdWJzZWN0aW9ucw==</PHRASE>
 			<PHRASE Label="la_error_CustomExists" Module="Core" Type="1">Q3VzdG9tIGZpZWxkIHdpdGggaWRlbnRpY2FsIG5hbWUgYWxyZWFkeSBleGlzdHM=</PHRASE>
 			<PHRASE Label="la_error_EmailTemplateBodyMissing" Module="Core" Type="1">RW1haWwgRGVzaWduIFRlbXBsYXRlIHNob3VsZCBjb250YWluIGF0IGxlYXN0ICIkYm9keSIgdGFnIGluIGl0Lg==</PHRASE>
 			<PHRASE Label="la_error_FileTooLarge" Module="Core" Type="1">RmlsZSBpcyB0b28gbGFyZ2U=</PHRASE>
 			<PHRASE Label="la_error_GroupNotFound" Module="Core" Type="1">Z3JvdXAgbm90IGZvdW5k</PHRASE>
 			<PHRASE Label="la_error_InvalidFieldName" Module="Core" Type="1">RmllbGQgZG9lc24ndCBleGlzdCBpbiAiJXMiIHVuaXQgY29uZmln</PHRASE>
 			<PHRASE Label="la_error_InvalidFileFormat" Module="Core" Type="1">SW52YWxpZCBGaWxlIEZvcm1hdA==</PHRASE>
 			<PHRASE Label="la_error_InvalidItemPrefix" Module="Core" Type="1">VW5pdCBjb25maWcgcHJlZml4IG5vdCBmb3VuZA==</PHRASE>
 			<PHRASE Label="la_error_invalidoption" Module="Core" Type="1">aW52YWxpZCBvcHRpb24=</PHRASE>
 			<PHRASE Label="la_error_LoginFailed" Module="Core" Type="1">TG9naW4gRmFpbGVk</PHRASE>
 			<PHRASE Label="la_error_MessagesListReceivingFailed" Module="Core" Type="1">UmVjZWl2aW5nIGxpc3Qgb2YgbWVzc2FnZXMgZnJvbSB0aGUgU2VydmVyIGhhcyBmYWlsZWQ=</PHRASE>
 			<PHRASE Label="la_error_move_subcategory" Module="Core" Type="1">RXJyb3IgbW92aW5nIHN1YnNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_error_NoInheritancePossible" Module="Core" Type="1">Q2FuJ3QgaW5oZXJpdCB0ZW1wbGF0ZSBmcm9tIHRvcCBjYXRlZ29yeQ==</PHRASE>
 			<PHRASE Label="la_error_NoMatchingColumns" Module="Core" Type="1">Tm8gbWF0Y2hpbmcgY29sdW1ucyBhcmUgZm91bmQ=</PHRASE>
 			<PHRASE Label="la_error_OperationNotAllowed" Module="Core" Type="1">VGhpcyBvcGVyYXRpb24gaXMgbm90IGFsbG93ZWQh</PHRASE>
 			<PHRASE Label="la_error_ParsingError" Module="Core" Type="1">VmFsaWRhdGlvbiBlcnJvciwgcGxlYXNlIGRvdWJsZS1jaGVjayBJbi1Qb3J0YWwgdGFncw==</PHRASE>
 			<PHRASE Label="la_error_PasswordMatch" Module="Core" Type="1">UGFzc3dvcmRzIGRvIG5vdCBtYXRjaCE=</PHRASE>
 			<PHRASE Label="la_error_PromoGroupNotEmpty" Module="Core" Type="1">Q2FuJ3QgRGVsZXRlIE5vbi1FbXB0eSBQcm9tbyBCbG9jayBHcm91cA==</PHRASE>
 			<PHRASE Label="la_error_required" Module="Core" Type="1">UmVxdWlyZWQgZmllbGQoLXMpIG5vdCBmaWxsZWQ=</PHRASE>
 			<PHRASE Label="la_error_RequiredColumnsMissing" Module="Core" Type="1">cmVxdWlyZWQgY29sdW1ucyBtaXNzaW5n</PHRASE>
 			<PHRASE Label="la_error_RootCategoriesDelete" Module="Core" Type="1">Um9vdCBzZWN0aW9uIG9mIHRoZSBtb2R1bGUocykgY2FuIG5vdCBiZSBkZWxldGVkIQ==</PHRASE>
 			<PHRASE Label="la_error_SelectItemToMove" Module="Core" Type="1">U2VsZWN0IGF0IGxlYXN0IG9uZSBpdGVtIHRvIG1vdmU=</PHRASE>
 			<PHRASE Label="la_error_TemplateFileMissing" Module="Core" Type="1">VGVtcGxhdGUgZmlsZSBpcyBtaXNzaW5n</PHRASE>
 			<PHRASE Label="la_error_TemporaryTableCopyingFailed" Module="Core" Type="1">Q29weWluZyBvcGVyYXRpb24gaW4gVGVtcG9yYXJ5IHRhYmxlcyBoYXMgZmFpbGVkLiBQbGVhc2UgY29udGFjdCB3ZWJzaXRlIGFkbWluaXN0cmF0b3Iu</PHRASE>
 			<PHRASE Label="la_error_unique" Module="Core" Type="1">UmVjb3JkIGlzIG5vdCB1bmlxdWU=</PHRASE>
 			<PHRASE Label="la_error_unique_category_field" Module="Core" Type="1">U2VjdGlvbiBmaWVsZCBub3QgdW5pcXVl</PHRASE>
 			<PHRASE Label="la_error_unknown_category" Module="Core" Type="1">VW5rbm93biBzZWN0aW9u</PHRASE>
 			<PHRASE Label="la_error_UserBanned" Module="Core" Type="1">VXNlciBCYW5uZWQ=</PHRASE>
 			<PHRASE Label="LA_ERROR_USERNOTFOUND" Module="Core" Type="1">dXNlciBub3QgZm91bmQ=</PHRASE>
 			<PHRASE Label="la_error_YouMustSelectOnlyOneUser" Module="Core" Type="1">WW91IG11c3Qgc2VsZWN0IG9ubHkgb25lIHVzZXI=</PHRASE>
 			<PHRASE Label="la_err_bad_date_format" Module="Core" Type="1">SW5jb3JyZWN0IGRhdGUgZm9ybWF0LCBwbGVhc2UgdXNlICglcykgZXguICglcyk=</PHRASE>
 			<PHRASE Label="la_err_bad_type" Module="Core" Type="1">SW5jb3JyZWN0IGRhdGEgZm9ybWF0LCBwbGVhc2UgdXNlICVz</PHRASE>
 			<PHRASE Label="la_err_invalid_format" Module="Core" Type="1">SW52YWxpZCBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_err_length_out_of_range" Module="Core" Type="1">RmllbGQgdmFsdWUgbGVuZ3RoIGlzIG91dCBvZiByYW5nZSwgcG9zc2libGUgdmFsdWUgbGVuZ3RoIGZyb20gJXMgdG8gJXM=</PHRASE>
 			<PHRASE Label="la_err_Primary_Lang_Required" Module="Core" Type="1">UHJpbWFyeSBMYW5nLiB2YWx1ZSBSZXF1aXJlZA==</PHRASE>
 			<PHRASE Label="la_err_required" Module="Core" Type="1">RmllbGQgaXMgcmVxdWlyZWQ=</PHRASE>
 			<PHRASE Label="la_err_unique" Module="Core" Type="1">RmllbGQgdmFsdWUgbXVzdCBiZSB1bmlxdWU=</PHRASE>
 			<PHRASE Label="la_err_value_out_of_range" Module="Core" Type="1">RmllbGQgdmFsdWUgaXMgb3V0IG9mIHJhbmdlLCBwb3NzaWJsZSB2YWx1ZXMgZnJvbSAlcyB0byAlcw==</PHRASE>
 			<PHRASE Label="la_exportfoldernotwritable" Module="Core" Type="1">RXhwb3J0IGZvbGRlciBpcyBub3Qgd3JpdGFibGU=</PHRASE>
 			<PHRASE Label="la_fck_ErrorCreatingFolder" Module="Core" Type="1">RXJyb3IgY3JlYXRpbmcgZm9sZGVyLiBFcnJvciBudW1iZXI6</PHRASE>
 			<PHRASE Label="la_fck_ErrorFileName" Module="Core" Type="1">UGxlYXNlIG5hbWUgeW91ciBmaWxlcyB0byBiZSB3ZWItZnJpZW5kbHkuIFdlIHJlY29tbWVuZCB1c2luZyBvbmx5IHRoZXNlIGNoYXJhY3RlcnMgaW4gZmlsZSBuYW1lczogDQpMZXR0ZXJzIGEteiwgQS1aLCBOdW1iZXJzIDAtOSwgIl8iICh1bmRlcnNjb3JlKSwgIi0iIChkYXNoKSwgIiAiIChzcGFjZSksICIuIiAocGVyaW9kKQ0KUGxlYXNlIGF2b2lkIHVzaW5nIGFueSBvdGhlciBjaGFyYWN0ZXJzIGxpa2UgcXVvdGVzLCBicmFja2V0cywgcXVvdGF0aW9uIG1hcmtzLCAiPyIsICIhIiwgIj0iLCBmb3JlaWduIHN5bWJvbHMsIGV0Yy4=</PHRASE>
 			<PHRASE Label="la_fck_ErrorFileUpload" Module="Core" Type="1">RXJyb3Igb24gZmlsZSB1cGxvYWQuIEVycm9yIG51bWJlcjo=</PHRASE>
 			<PHRASE Label="la_fck_FileAvailable" Module="Core" Type="1">QSBmaWxlIHdpdGggdGhlIHNhbWUgbmFtZSBpcyBhbHJlYWR5IGF2YWlsYWJsZQ==</PHRASE>
 			<PHRASE Label="la_fck_FileDate" Module="Core" Type="1">RGF0ZQ==</PHRASE>
 			<PHRASE Label="la_fck_FileName" Module="Core" Type="1">RmlsZSBOYW1l</PHRASE>
 			<PHRASE Label="la_fck_FileSize" Module="Core" Type="1">U2l6ZQ==</PHRASE>
 			<PHRASE Label="la_fck_FolderAlreadyExists" Module="Core" Type="1">Rm9sZGVyIGFscmVhZHkgZXhpc3Rz</PHRASE>
 			<PHRASE Label="la_fck_InvalidFileType" Module="Core" Type="1">SW52YWxpZCBmaWxlIHR5cGUgZm9yIHRoaXMgZm9kZXI=</PHRASE>
 			<PHRASE Label="la_fck_InvalidFolderName" Module="Core" Type="1">SW52YWxpZCBmb2xkZXIgbmFtZQ==</PHRASE>
 			<PHRASE Label="la_fck_NoPermissionsCreateFolder" Module="Core" Type="1">WW91IGhhdmUgbm8gcGVybWlzc2lvbnMgdG8gY3JlYXRlIHRoZSBmb2xkZXI=</PHRASE>
 			<PHRASE Label="la_fck_PleaseTypeTheFolderName" Module="Core" Type="1">UGxlYXNlIHR5cGUgdGhlIGZvbGRlciBuYW1l</PHRASE>
 			<PHRASE Label="la_fck_TypeTheFolderName" Module="Core" Type="1">VHlwZSB0aGUgbmFtZSBvZiB0aGUgbmV3IGZvbGRlcjo=</PHRASE>
 			<PHRASE Label="la_fck_UnknownErrorCreatingFolder" Module="Core" Type="1">VW5rbm93biBlcnJvciBjcmVhdGluZyBmb2xkZXI=</PHRASE>
 			<PHRASE Label="la_Field" Module="Core" Type="1">RmllbGQ=</PHRASE>
 			<PHRASE Label="la_field_displayorder" Module="Core" Type="1">RGlzcGxheSBPcmRlcg==</PHRASE>
 			<PHRASE Label="la_field_Priority" Module="Core" Type="1">T3JkZXI=</PHRASE>
 			<PHRASE Label="la_fld_Action" Module="Core" Type="1" Column="QWN0aW9u">QWN0aW9u</PHRASE>
 			<PHRASE Label="la_fld_AddressLine1" Module="Core" Type="1" Column="QWRkcmVzcyBMaW5lIDE=">QWRkcmVzcyBMaW5lIDE=</PHRASE>
 			<PHRASE Label="la_fld_AddressLine2" Module="Core" Type="1" Column="QWRkcmVzcyBMaW5lIDI=">QWRkcmVzcyBMaW5lIDI=</PHRASE>
 			<PHRASE Label="la_fld_AdminEmail" Module="Core" Type="1">TWVzc2FnZXMgZnJvbSBTaXRlIEFkbWluIGFyZSBmcm9t</PHRASE>
 			<PHRASE Label="la_fld_AdminInterfaceLang" Module="Core" Type="1" Column="QWRtaW4gUHJpbWFyeQ==">QWRtaW4gUHJpbWFyeQ==</PHRASE>
 			<PHRASE Label="la_fld_AdminLanguage" Module="Core" Type="1" Column="TGFuZ3VhZ2U=">TGFuZ3VhZ2U=</PHRASE>
 			<PHRASE Label="la_fld_AdvancedCSS" Module="Core" Type="1">QWR2YW5jZWQgQ1NT</PHRASE>
 			<PHRASE Label="la_fld_AdvancedSearch" Module="Core" Type="1">QWR2YW5jZWQgU2VhcmNo</PHRASE>
 			<PHRASE Label="la_fld_AllowChangingRecipient" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgIlRvIiBSZWNpcGllbnQ=</PHRASE>
 			<PHRASE Label="la_fld_AllowChangingSender" Module="Core" Type="1">QWxsb3cgQ2hhbmdpbmcgU2VuZGVy</PHRASE>
 			<PHRASE Label="la_fld_AltValue" Module="Core" Type="1">QWx0IFZhbHVl</PHRASE>
 			<PHRASE Label="la_fld_Answer" Module="Core" Type="1">QW5zd2Vy</PHRASE>
 			<PHRASE Label="la_fld_AssignedToSections" Module="Core" Type="1">QXNzaWduZWQgdG8gU2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="LA_FLD_ATTACHMENT" Module="Core" Type="1">QXR0YWNobWVudA==</PHRASE>
 			<PHRASE Label="la_fld_AutoCreateFileName" Module="Core" Type="1">QXV0byBDcmVhdGUgRmlsZSBOYW1l</PHRASE>
 			<PHRASE Label="la_fld_AutomaticFilename" Module="Core" Type="1">QXV0b21hdGljIEZpbGVuYW1l</PHRASE>
 			<PHRASE Label="la_fld_AvailableColumns" Module="Core" Type="1">QXZhaWxhYmxlIENvbHVtbnM=</PHRASE>
 			<PHRASE Label="la_fld_Background" Module="Core" Type="1">QmFja2dyb3VuZA==</PHRASE>
 			<PHRASE Label="la_fld_BackgroundAttachment" Module="Core" Type="1">QmFja2dyb3VuZCBBdHRhY2htZW50</PHRASE>
 			<PHRASE Label="la_fld_BackgroundColor" Module="Core" Type="1">QmFja2dyb3VuZCBDb2xvcg==</PHRASE>
 			<PHRASE Label="la_fld_BackgroundImage" Module="Core" Type="1">QmFja2dyb3VuZCBJbWFnZQ==</PHRASE>
 			<PHRASE Label="la_fld_BackgroundPosition" Module="Core" Type="1">QmFja2dyb3VuZCBQb3NpdGlvbg==</PHRASE>
 			<PHRASE Label="la_fld_BackgroundRepeat" Module="Core" Type="1">QmFja2dyb3VuZCBSZXBlYXQ=</PHRASE>
 			<PHRASE Label="la_fld_Bcc" Module="Core" Type="1" Column="QmNj">QmNj</PHRASE>
 			<PHRASE Label="la_fld_BindToSystemEvent" Module="Core" Type="1" Hint="U3lzdGVtIEV2ZW50IGluICJwcmVmaXhbLnNwZWNpYWxdOk9uRXZlbnROYW1lIiBmb3JtYXQ=" Column="QmluZCB0byBTeXN0ZW0gRXZlbnQ=">QmluZCB0byBTeXN0ZW0gRXZlbnQ=</PHRASE>
 			<PHRASE Label="la_fld_BlockPosition" Module="Core" Type="1">RWxlbWVudCBQb3NpdGlvbg==</PHRASE>
 			<PHRASE Label="la_fld_BorderBottom" Module="Core" Type="1">Qm9yZGVyIEJvdHRvbQ==</PHRASE>
 			<PHRASE Label="la_fld_BorderLeft" Module="Core" Type="1">Qm9yZGVyIExlZnQ=</PHRASE>
 			<PHRASE Label="la_fld_BorderRight" Module="Core" Type="1">Qm9yZGVyIFJpZ2h0</PHRASE>
 			<PHRASE Label="la_fld_Borders" Module="Core" Type="1">Qm9yZGVycw==</PHRASE>
 			<PHRASE Label="la_fld_BorderTop" Module="Core" Type="1">Qm9yZGVyIFRvcA==</PHRASE>
 			<PHRASE Label="la_fld_BounceDate" Module="Core" Type="1" Column="Qm91bmNlZCBPbg==">Qm91bmNlIERhdGU=</PHRASE>
 			<PHRASE Label="la_fld_BounceEmail" Module="Core" Type="1">Qm91bmNlIEVtYWls</PHRASE>
 			<PHRASE Label="la_fld_BounceInfo" Module="Core" Type="1" Column="Qm91bmNlIEluZm8=">Qm91bmNlIEluZm8=</PHRASE>
 			<PHRASE Label="la_fld_Category" Module="Core" Type="1" Column="U2VjdGlvbg==">U2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_fld_CategoryFormat" Module="Core" Type="1">U2VjdGlvbiBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_fld_CategoryId" Module="Core" Type="1" Column="U2VjdGlvbiBJRA==">U2VjdGlvbiBJRA==</PHRASE>
 			<PHRASE Label="la_fld_CategorySeparator" Module="Core" Type="1">U2VjdGlvbiBzZXBhcmF0b3I=</PHRASE>
 			<PHRASE Label="la_fld_CategoryTemplate" Module="Core" Type="1">U2VjdGlvbiBUZW1wbGF0ZQ==</PHRASE>
 			<PHRASE Label="la_fld_Cc" Module="Core" Type="1" Column="Q2M=">Q2M=</PHRASE>
 			<PHRASE Label="la_fld_Changes" Module="Core" Type="1" Column="Q2hhbmdlcw==">Q2hhbmdlcw==</PHRASE>
 			<PHRASE Label="la_fld_Charset" Module="Core" Type="1" Column="Q2hhcnNldA==">Q2hhcnNldA==</PHRASE>
 			<PHRASE Label="la_fld_CheckDuplicatesMethod" Module="Core" Type="1">Q2hlY2sgRHVwbGljYXRlcyBieQ==</PHRASE>
 			<PHRASE Label="la_fld_City" Module="Core" Type="1" Column="Q2l0eQ==">Q2l0eQ==</PHRASE>
 			<PHRASE Label="la_fld_ColumnTranslation" Module="Core" Type="1" Hint="QXNzb2NpYXRlZCBjb2x1bW4gaGVhZGluZyB0cmFuc2xhdGlvbg==">Q29sdW1uIFBocmFzZQ==</PHRASE>
 			<PHRASE Label="la_fld_Comments" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
 			<PHRASE Label="la_fld_Company" Module="Core" Type="1" Column="Q29tcGFueQ==">Q29tcGFueQ==</PHRASE>
 			<PHRASE Label="la_fld_ConfigHeader" Module="Core" Type="1">Q29uZmlndXJhdGlvbiBIZWFkZXIgTGFiZWw=</PHRASE>
 			<PHRASE Label="la_fld_ContentBlock" Module="Core" Type="1">Q29udGVudCBCbG9jaw==</PHRASE>
 			<PHRASE Label="la_fld_ConversionPercent" Module="Core" Type="1" Column="Q1RSLCAl">Q1RSLCAl</PHRASE>
 			<PHRASE Label="la_fld_CopyLabels" Module="Core" Type="1">Q29weSBMYWJlbHMgZnJvbSB0aGlzIExhbmd1YWdl</PHRASE>
 			<PHRASE Label="la_fld_Country" Module="Core" Type="1" Column="Q291bnRyeQ==">Q291bnRyeQ==</PHRASE>
 			<PHRASE Label="la_fld_CreatedById" Module="Core" Type="1">Q3JlYXRlZCBCeQ==</PHRASE>
 			<PHRASE Label="la_fld_CreatedOn" Module="Core" Type="1" Column="Q3JlYXRlZCBPbg==">Q3JlYXRlZCBPbg==</PHRASE>
 			<PHRASE Label="la_fld_CronCommonHints" Module="Core" Type="1">Q29tbW9uIFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_fld_CronDay" Module="Core" Type="1" Column="RGF5">RGF5</PHRASE>
 			<PHRASE Label="la_fld_CronHour" Module="Core" Type="1" Column="SG91cg==">SG91cg==</PHRASE>
 			<PHRASE Label="la_fld_CronMinute" Module="Core" Type="1" Column="TWludXRl">TWludXRl</PHRASE>
 			<PHRASE Label="la_fld_CronMonth" Module="Core" Type="1" Column="TW9udGg=">TW9udGg=</PHRASE>
 			<PHRASE Label="la_fld_CronWeekday" Module="Core" Type="1" Column="V2Vla2RheQ==">V2Vla2RheQ==</PHRASE>
 			<PHRASE Label="la_fld_CSS" Module="Core" Type="1">Q1NTIFRlbXBsYXRl</PHRASE>
 			<PHRASE Label="la_fld_CSSClassName" Module="Core" Type="1" Column="Q1NTIENsYXNzIE5hbWU=">Q1NTIENsYXNzIE5hbWU=</PHRASE>
 			<PHRASE Label="la_fld_Cursor" Module="Core" Type="1">Q3Vyc29y</PHRASE>
 			<PHRASE Label="la_fld_CustomDetailTemplate" Module="Core" Type="1">Q3VzdG9tIERldGFpbHMgVGVtcGxhdGU=</PHRASE>
 			<PHRASE Label="la_fld_CustomRecipient" Module="Core" Type="1">U2VuZCBFbWFpbCBUbw==</PHRASE>
 			<PHRASE Label="la_fld_CustomSender" Module="Core" Type="1">U2VuZCBFbWFpbCBGcm9t</PHRASE>
 			<PHRASE Label="la_fld_CustomTemplate" Module="Core" Type="1">DQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KDQoNCg0KRGV0YWlscyBUZW1wbGF0ZQ==</PHRASE>
 			<PHRASE Label="la_fld_DateFormat" Module="Core" Type="1">RGF0ZSBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_fld_DecimalPoint" Module="Core" Type="1">RGVjaW1hbCBQb2ludA==</PHRASE>
 			<PHRASE Label="la_fld_Description" Module="Core" Type="1" Column="RGVzY3JpcHRpb24=">RGVzY3JpcHRpb24=</PHRASE>
 			<PHRASE Label="la_fld_DirectLinkEnabled" Module="Core" Type="1">QWNjZXNzIHdpdGggTGluaw==</PHRASE>
 			<PHRASE Label="la_fld_Display" Module="Core" Type="1">RGlzcGxheQ==</PHRASE>
 			<PHRASE Label="la_fld_DisplayInGrid" Module="Core" Type="1">RGlzcGxheSBpbiBHcmlk</PHRASE>
 			<PHRASE Label="la_fld_DisplayName" Module="Core" Type="1">RmllbGQgTGFiZWw=</PHRASE>
 			<PHRASE Label="la_fld_DisplaySiteNameInHeader" Module="Core" Type="1">RGlzcGxheSBzaXRlIG5hbWUgaW4gSGVhZGVy</PHRASE>
 			<PHRASE Label="la_fld_DisplayToPublic" Module="Core" Type="1">RGlzcGxheSBUbyBQdWJsaWM=</PHRASE>
 			<PHRASE Label="la_fld_DomainIPRange" Module="Core" Type="1" Hint="U2luZ2xlIElQLCBJUCByYW5nZSwgU3VibmV0IG9yIGhvc3RuYW1lIHJlY29yZCBwZXIgbGluZSAoZm9ybWF0czogMS4yLjMuNCBvciAxLjIuMy4zMi0xLjIuMy41NCBvciAxLjIuMy4zMi8yNyBvciAxLjIuMy4zMi8yNTUuMjU1LjI1NS4yMjQgb3Igd3d3LmluLXBvcnRhbC5jb20p">UmFuZ2Ugb2YgSVBz</PHRASE>
 			<PHRASE Label="la_fld_DomainName" Module="Core" Type="1" Column="RG9tYWluIE5hbWU=">RG9tYWluIE5hbWU=</PHRASE>
 			<PHRASE Label="la_fld_DoNotEncode" Module="Core" Type="1">QXMgUGxhaW4gVGV4dA==</PHRASE>
 			<PHRASE Label="la_fld_Duration" Module="Core" Type="1" Column="RHVyYXRpb24=">RHVyYXRpb24=</PHRASE>
 			<PHRASE Label="la_fld_EditorsPick" Module="Core" Type="1">RWRpdG9ycyBQaWNr</PHRASE>
 			<PHRASE Label="la_fld_ElapsedTime" Module="Core" Type="1">RWxhcHNlZCBUaW1l</PHRASE>
 			<PHRASE Label="la_fld_Email" Module="Core" Type="1" Column="RW1haWw=">RS1tYWls</PHRASE>
 			<PHRASE Label="la_fld_EmailCommunicationRole" Module="Core" Type="1" Column="RS1tYWlsIENvbW11bmljYXRpb24gUm9sZQ==">RS1tYWlsIENvbW11bmljYXRpb24gUm9sZQ==</PHRASE>
 			<PHRASE Label="la_fld_EmailEvent" Module="Core" Type="1" Column="RS1tYWlsIEV2ZW50">RS1tYWlsIEV2ZW50</PHRASE>
 			<PHRASE Label="la_fld_EmailOrUsername" Module="Core" Type="1">RS1tYWlsIG9yIFVzZXJuYW1l</PHRASE>
 			<PHRASE Label="la_fld_EmailPassword" Module="Core" Type="1">RS1tYWlsICI8c3Ryb25nPntwYXNzd29yZH08L3N0cm9uZz4iIHBhc3N3b3JkIHRvIHVzZXI=</PHRASE>
 			<PHRASE Label="la_fld_EmailsQueued" Module="Core" Type="1" Column="UXVldWU=">RW1haWxzIGluIFF1ZXVl</PHRASE>
 			<PHRASE Label="la_fld_EmailsSent" Module="Core" Type="1" Column="U2VudA==">RW1haWxzIFNlbnQ=</PHRASE>
 			<PHRASE Label="la_fld_EmailsTotal" Module="Core" Type="1" Column="VG90YWw=">RW1haWxzIFRvdGFs</PHRASE>
 			<PHRASE Label="la_fld_EmailVerified" Module="Core" Type="1" Column="RW1haWwgVmVyaWZpZWQ=">RW1haWwgVmVyaWZpZWQ=</PHRASE>
 			<PHRASE Label="la_fld_Enable" Module="Core" Type="1">RW5hYmxl</PHRASE>
 			<PHRASE Label="la_fld_Enabled" Module="Core" Type="1" Column="RW5hYmxlZA==">RW5hYmxlZA==</PHRASE>
 			<PHRASE Label="la_fld_EnablePageCache" Module="Core" Type="1">RW5hYmxlIENhY2hpbmcgZm9yIHRoaXMgU2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_fld_ErrorTag" Module="Core" Type="1">RXJyb3IgVGFn</PHRASE>
 			<PHRASE Label="la_fld_EstimatedTime" Module="Core" Type="1">RXN0aW1hdGVkIFRpbWU=</PHRASE>
 			<PHRASE Label="la_fld_Event" Module="Core" Type="1" Column="RXZlbnQ=">RXZlbnQ=</PHRASE>
 			<PHRASE Label="la_fld_Expire" Module="Core" Type="1">RXhwaXJl</PHRASE>
 			<PHRASE Label="la_fld_ExportColumns" Module="Core" Type="1">RXhwb3J0IGNvbHVtbnM=</PHRASE>
 			<PHRASE Label="la_fld_ExportCountries" Module="Core" Type="1" Hint="U2luZ2xlIENvdW50cnkgSVNPIGNvZGUgcGVyIGxpbmUgKGZvcm1hdHM6IEFUQSwgQkVMKQ==">RXhwb3J0IFNwZWNpZmllZCBDb3VudHJpZXM=</PHRASE>
 			<PHRASE Label="la_fld_ExportDataTypes" Module="Core" Type="1">RGF0YSBUeXBlcyB0byBFeHBvcnQ=</PHRASE>
 			<PHRASE Label="la_fld_ExportEmailEvents" Module="Core" Type="1" Hint="U2luZ2xlIEVtYWlsIEV2ZW50IHBlciBsaW5lIChmb3JtYXRzOiBVU0VSLkFERCwgT1JERVIuU1VCTUlUKQ==">RXhwb3J0IFNwZWNpZmllZCBFbWFpbCBFdmVudHM=</PHRASE>
 			<PHRASE Label="la_fld_ExportFileName" Module="Core" Type="1">RXhwb3J0IEZpbGVuYW1l</PHRASE>
 			<PHRASE Label="la_fld_ExportFormat" Module="Core" Type="1">RXhwb3J0IGZvcm1hdA==</PHRASE>
 			<PHRASE Label="la_fld_ExportModules" Module="Core" Type="1">RXhwb3J0IE1vZHVsZXM=</PHRASE>
 			<PHRASE Label="la_fld_ExportPhrases" Module="Core" Type="1" Hint="U2luZ2xlIFBocmFzZSBMYWJlbCBwZXIgbGluZSAoZm9ybWF0czogbGFfU2FtcGxlTGFiZWwsIGx1X0Zyb250RW5kTGFiZWwp">RXhwb3J0IFNwZWNpZmllZCBQaHJhc2Vz</PHRASE>
 			<PHRASE Label="la_fld_ExportPhraseTypes" Module="Core" Type="1">RXhwb3J0IFBocmFzZSBUeXBlcw==</PHRASE>
 			<PHRASE Label="la_fld_ExportPresetName" Module="Core" Type="1">RXhwb3J0IFByZXNldCBUaXRsZQ==</PHRASE>
 			<PHRASE Label="la_fld_ExportPresets" Module="Core" Type="1">RXhwb3J0IFByZXNldA==</PHRASE>
 			<PHRASE Label="la_fld_ExportSavePreset" Module="Core" Type="1">U2F2ZS9VcGRhdGUgRXhwb3J0IFByZXNldA==</PHRASE>
 			<PHRASE Label="la_fld_ExternalLink" Module="Core" Type="1" Column="RXh0ZXJuYWwgTGluaw==">RXh0ZXJuYWwgTGluaw==</PHRASE>
 			<PHRASE Label="la_fld_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVVJM</PHRASE>
 			<PHRASE Label="la_fld_ExtraHeaders" Module="Core" Type="1">RXh0cmEgSGVhZGVycw==</PHRASE>
 			<PHRASE Label="la_fld_Fax" Module="Core" Type="1" Column="RmF4">RmF4</PHRASE>
 			<PHRASE Label="la_fld_FieldComparision" Module="Core" Type="1" Column="TWF0Y2ggVHlwZQ==">TWF0Y2ggVHlwZQ==</PHRASE>
 			<PHRASE Label="la_fld_FieldName" Module="Core" Type="1" Column="RmllbGQgTmFtZQ==">RmllbGQgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_FieldsEnclosedBy" Module="Core" Type="1">RmllbGRzIGVuY2xvc2VkIGJ5</PHRASE>
 			<PHRASE Label="la_fld_FieldsSeparatedBy" Module="Core" Type="1">RmllbGRzIHNlcGFyYXRlZCBieQ==</PHRASE>
 			<PHRASE Label="la_fld_FieldTitles" Module="Core" Type="1">RmllbGQgVGl0bGVz</PHRASE>
 			<PHRASE Label="la_fld_FieldType" Module="Core" Type="1">RmllbGQgVHlwZQ==</PHRASE>
 			<PHRASE Label="la_fld_FieldValue" Module="Core" Type="1" Column="TWF0Y2ggVmFsdWU=">TWF0Y2ggVmFsdWU=</PHRASE>
 			<PHRASE Label="la_fld_FileContents" Module="Core" Type="1">RmlsZSBDb250ZW50cw==</PHRASE>
 			<PHRASE Label="la_fld_Filename" Module="Core" Type="1" Column="RmlsZW5hbWU=">RmlsZW5hbWU=</PHRASE>
 			<PHRASE Label="la_fld_FilenameReplacements" Module="Core" Type="1">RmlsZW5hbWUgUmVwbGFjZW1lbnRz</PHRASE>
 			<PHRASE Label="la_fld_FilePath" Module="Core" Type="1" Column="UGF0aA==">UGF0aA==</PHRASE>
 			<PHRASE Label="la_fld_FilterField" Module="Core" Type="1" Hint="RmllbGQgbmFtZSwgdG8gYmUgdXNlZCBpbiBmaWx0ZXI=" Column="RmlsdGVyIEZpZWxk">RmlsdGVyIEZpZWxk</PHRASE>
 			<PHRASE Label="la_fld_FilterType" Module="Core" Type="1" Hint="VGhlIHdheSwgaG93IHRoaXMgZmlsdGVyIHdpbGwgYmUgZGlzcGxheWVkIG9uIEZyb250LUVuZA==" Column="RmlsdGVyIFR5cGU=">RmlsdGVyIFR5cGU=</PHRASE>
 			<PHRASE Label="la_fld_FirstName" Module="Core" Type="1" Column="Rmlyc3QgTmFtZQ==">Rmlyc3QgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_Font" Module="Core" Type="1">Rm9udA==</PHRASE>
 			<PHRASE Label="la_fld_FontColor" Module="Core" Type="1">Rm9udCBDb2xvcg==</PHRASE>
 			<PHRASE Label="la_fld_FontFamily" Module="Core" Type="1">Rm9udCBGYW1pbHk=</PHRASE>
 			<PHRASE Label="la_fld_FontSize" Module="Core" Type="1">Rm9udCBTaXpl</PHRASE>
 			<PHRASE Label="la_fld_FontStyle" Module="Core" Type="1">Rm9udCBTdHlsZQ==</PHRASE>
 			<PHRASE Label="la_fld_FontWeight" Module="Core" Type="1">Rm9udCBXZWlnaHQ=</PHRASE>
 			<PHRASE Label="la_fld_Form" Module="Core" Type="1">T25saW5lIEZvcm0=</PHRASE>
 			<PHRASE Label="la_fld_FormSubmittedTemplate" Module="Core" Type="1">T25saW5lIEZvcm0gU3VibWl0dGVkIFRlbXBsYXRl</PHRASE>
 			<PHRASE Label="la_fld_FriendlyURL" Module="Core" Type="1">U2hvcnQgVVJM</PHRASE>
 			<PHRASE Label="la_fld_FromEmail" Module="Core" Type="1" Column="RnJvbSBFLW1haWw=">RnJvbSBFbWFpbA==</PHRASE>
 			<PHRASE Label="la_fld_FrontEndOnly" Module="Core" Type="1" Column="RnJvbnQtRW5kIE9ubHk=">RnJvbnQtRW5kIE9ubHk=</PHRASE>
 			<PHRASE Label="la_fld_FrontLanguage" Module="Core" Type="1" Column="TGFuZ3VhZ2U=">TGFuZ3VhZ2U=</PHRASE>
 			<PHRASE Label="la_fld_FrontRegistration" Module="Core" Type="1" Column="QWxsb3cgUmVnaXN0cmF0aW9u">QWxsb3cgUmVnaXN0cmF0aW9uIG9uIEZyb250LWVuZA==</PHRASE>
 			<PHRASE Label="la_fld_FullName" Module="Core" Type="1" Column="RnVsbCBOYW1l">RnVsbCBOYW1l</PHRASE>
 			<PHRASE Label="la_fld_Group" Module="Core" Type="1" Column="R3JvdXA=">VXNlciBHcm91cA==</PHRASE>
 			<PHRASE Label="la_fld_GroupId" Module="Core" Type="1">SUQ=</PHRASE>
 			<PHRASE Label="la_fld_GroupName" Module="Core" Type="1" Column="R3JvdXAgTmFtZQ==">R3JvdXAgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_Height" Module="Core" Type="1">SGVpZ2h0</PHRASE>
 			<PHRASE Label="la_fld_HelpfulCount" Module="Core" Type="1">UmV2aWV3IFdhcyBIZWxwZnVs</PHRASE>
 			<PHRASE Label="la_fld_HintTranslation" Module="Core" Type="1" Hint="QXNzb2NpYXRlZCBmaWVsZCB1c2FnZSB0cmFuc2xhdGlvbg==">SGludCBQaHJhc2U=</PHRASE>
 			<PHRASE Label="la_fld_Hits" Module="Core" Type="1" Column="SGl0cw==">SGl0cw==</PHRASE>
 			<PHRASE Label="la_fld_Hot" Module="Core" Type="1">SG90</PHRASE>
 			<PHRASE Label="la_fld_HtmlEmailTemplate" Module="Core" Type="1" Hint="VGhpcyBmaWVsZCBoYXMgYW4gSFRNTCB2ZXJzaW9uIG9mIEVtYWlsIERlc2lnbiBUZW1wbGF0ZSBhbmQgbXVzdCBjb250YWlucyBhdCBsZWFzdCBhICIkYm9keSIgdGFnIHVubGVzcyBUZXh0IFZlcnNpb24gZmllbGQgaXMgcG9wdWxhdGVkIGFscmVhZHkuIEl0IHdpbGwgYmUgdXNlZCBhcyBhIGRlc2lnbiBmb3IgYWxsIGVtYWlscyBzZW5kIG91dCBieSB0aGUgd2Vic2l0ZS4=">SFRNTCBWZXJzaW9u</PHRASE>
 			<PHRASE Label="LA_FLD_HTMLVERSION" Module="Core" Type="1">SFRNTCBWZXJzaW9u</PHRASE>
 			<PHRASE Label="la_fld_IconDisabledURL" Module="Core" Type="1">SWNvbiBVUkwgKGRpc2FibGVkKQ==</PHRASE>
 			<PHRASE Label="la_fld_IconURL" Module="Core" Type="1">SWNvbiBVUkw=</PHRASE>
 			<PHRASE Label="la_fld_Id" Module="Core" Type="1" Column="SUQ=">SUQ=</PHRASE>
 			<PHRASE Label="la_fld_Image" Module="Core" Type="1" Column="SW1hZ2U=">SW1hZ2U=</PHRASE>
 			<PHRASE Label="la_fld_ImportCategory" Module="Core" Type="1">SW1wb3J0IFNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_fld_ImportColumns" Module="Core" Type="1">SW1wb3J0IENvbHVtbnM=</PHRASE>
 			<PHRASE Label="la_fld_ImportFile" Module="Core" Type="1">SW1wb3J0IEZpbGU=</PHRASE>
 			<PHRASE Label="la_fld_ImportFilename" Module="Core" Type="1">SW1wb3J0IEZpbGVuYW1l</PHRASE>
 			<PHRASE Label="la_fld_IncludeFieldTitles" Module="Core" Type="1">SW5jbHVkZSBmaWVsZCB0aXRsZXM=</PHRASE>
 			<PHRASE Label="la_fld_IncludeSublevels" Module="Core" Type="1" Column="SW5jbHVkZSBTdWJsZXZlbHM=">SW5jbHVkZSBTdWJsZXZlbHM=</PHRASE>
 			<PHRASE Label="la_fld_InputDateFormat" Module="Core" Type="1">SW5wdXQgRGF0ZSBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_fld_InputTimeFormat" Module="Core" Type="1">SW5wdXQgVGltZSBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_fld_InstallModules" Module="Core" Type="1">SW5zdGFsbCBNb2R1bGVz</PHRASE>
 			<PHRASE Label="la_fld_InstallPhraseTypes" Module="Core" Type="1">SW5zdGFsbCBQaHJhc2UgVHlwZXM=</PHRASE>
 			<PHRASE Label="la_fld_IPAddress" Module="Core" Type="1" Column="SVAgQWRkcmVzcw==">SVAgQWRkcmVzcw==</PHRASE>
 			<PHRASE Label="la_fld_IPRestrictions" Module="Core" Type="1">SVAgUmVzdHJpY3Rpb25z</PHRASE>
 			<PHRASE Label="la_fld_IsBaseCategory" Module="Core" Type="1">VXNlIGN1cnJlbnQgc2VjdGlvbiBhcyByb290IGZvciB0aGUgZXhwb3J0</PHRASE>
 			<PHRASE Label="la_fld_ISOCode" Module="Core" Type="1" Column="SVNPIENvZGU=">SVNPIENvZGU=</PHRASE>
 			<PHRASE Label="la_fld_IsPrimary" Module="Core" Type="1" Column="UHJpbWFyeQ==">UHJpbWFyeQ==</PHRASE>
 			<PHRASE Label="la_fld_IsRequired" Module="Core" Type="1">UmVxdWlyZWQ=</PHRASE>
 			<PHRASE Label="la_fld_IsSystem" Module="Core" Type="1" Column="U3lzdGVt">SXMgU3lzdGVt</PHRASE>
 			<PHRASE Label="la_fld_IsSystemTemplate" Module="Core" Type="1">U3lzdGVtIFRlbXBsYXRl</PHRASE>
 			<PHRASE Label="la_fld_ItemField" Module="Core" Type="1" Column="VXNlciBGaWVsZA==">VXNlciBGaWVsZA==</PHRASE>
 			<PHRASE Label="la_fld_ItemId" Module="Core" Type="1" Column="SXRlbSBJRA==">SXRlbSBJRA==</PHRASE>
 			<PHRASE Label="la_fld_ItemName" Module="Core" Type="1" Column="SXRlbSBOYW1l">SXRlbSBOYW1l</PHRASE>
 			<PHRASE Label="la_fld_ItemPrefix" Module="Core" Type="1" Hint="VW5pdCBjb25maWcgcHJlZml4LCB3aGVyZSBmaWx0ZXIgZmllbGQgYmVsb25ncw==" Column="SXRlbSBQcmVmaXg=">SXRlbSBQcmVmaXg=</PHRASE>
 			<PHRASE Label="la_fld_ItemTemplate" Module="Core" Type="1">SXRlbSBUZW1wbGF0ZQ==</PHRASE>
 			<PHRASE Label="la_fld_Language" Module="Core" Type="1" Column="TGFuZ3VhZ2U=">TGFuZ3VhZ2U=</PHRASE>
 			<PHRASE Label="la_fld_LanguageFile" Module="Core" Type="1">TGFuZ3VhZ2UgRmlsZQ==</PHRASE>
 			<PHRASE Label="la_fld_LanguageId" Module="Core" Type="1">TGFuZ3VhZ2UgSUQ=</PHRASE>
 			<PHRASE Label="la_fld_Languages" Module="Core" Type="1">TGFuZ3VhZ2Vz</PHRASE>
 			<PHRASE Label="la_fld_LastName" Module="Core" Type="1" Column="TGFzdCBOYW1l">TGFzdCBOYW1l</PHRASE>
 			<PHRASE Label="la_fld_LastRunOn" Module="Core" Type="1" Column="TGFzdCBSdW4gT24=">TGFzdCBSdW4gT24=</PHRASE>
 			<PHRASE Label="la_fld_LastRunStatus" Module="Core" Type="1" Column="TGFzdCBSdW4gU3RhdHVz">TGFzdCBSdW4gU3RhdHVz</PHRASE>
 			<PHRASE Label="la_fld_LastTimeoutOn" Module="Core" Type="1" Hint="RGF0YS90aW1lIHdoZW4gdGhlIGV2ZW50IGhhcyB0aW1lZCBvdXQgbGFzdCB0aW1lLg==" Column="TGFzdCBUaW1lb3V0IE9u">TGFzdCBUaW1lb3V0IE9u</PHRASE>
 			<PHRASE Label="la_fld_LastUpdatedOn" Module="Core" Type="1" Column="TGFzdCBVcGRhdGVkIE9u">TGFzdCBVcGRhdGVkIE9u</PHRASE>
 			<PHRASE Label="la_fld_Left" Module="Core" Type="1">TGVmdA==</PHRASE>
 			<PHRASE Label="la_fld_LineEndings" Module="Core" Type="1">TGluZSBlbmRpbmdz</PHRASE>
 			<PHRASE Label="la_fld_LineEndingsInside" Module="Core" Type="1">TGluZSBFbmRpbmdzIEluc2lkZSBGaWVsZHM=</PHRASE>
 			<PHRASE Label="la_fld_LinkType" Module="Core" Type="1" Column="TGluayBUeXBl">TGluayBUeXBl</PHRASE>
 			<PHRASE Label="la_fld_ListingId" Module="Core" Type="1" Column="TGlzdGluZyBJZA==">SUQ=</PHRASE>
 			<PHRASE Label="la_fld_ListingType" Module="Core" Type="1" Column="TGlzdGluZyBUeXBl">TGlzdGluZyBUeXBl</PHRASE>
 			<PHRASE Label="la_fld_Locale" Module="Core" Type="1">TG9jYWxl</PHRASE>
 			<PHRASE Label="la_fld_LocalName" Module="Core" Type="1" Column="TmFtZQ==">TG9jYWwgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_Location" Module="Core" Type="1" Column="TG9jYXRpb24=">TG9jYXRpb24=</PHRASE>
 			<PHRASE Label="la_fld_Login" Module="Core" Type="1" Column="TG9naW4=">TG9naW4=</PHRASE>
 			<PHRASE Label="la_fld_Logo" Module="Core" Type="1">TG9nbyBpbWFnZQ==</PHRASE>
 			<PHRASE Label="la_fld_LogoBottom" Module="Core" Type="1">Qm90dG9tIExvZ28gSW1hZ2U=</PHRASE>
 			<PHRASE Label="la_fld_LogoLogin" Module="Core" Type="1">TG9nbyBMb2dpbg==</PHRASE>
 			<PHRASE Label="la_fld_MarginBottom" Module="Core" Type="1">TWFyZ2luIEJvdHRvbQ==</PHRASE>
 			<PHRASE Label="la_fld_MarginLeft" Module="Core" Type="1">TWFyZ2luIExlZnQ=</PHRASE>
 			<PHRASE Label="la_fld_MarginRight" Module="Core" Type="1">TWFyZ2luIFJpZ2h0</PHRASE>
 			<PHRASE Label="la_fld_Margins" Module="Core" Type="1">TWFyZ2lucw==</PHRASE>
 			<PHRASE Label="la_fld_MarginTop" Module="Core" Type="1">TWFyZ2luIFRvcA==</PHRASE>
 			<PHRASE Label="la_fld_MasterId" Module="Core" Type="1" Column="TWFzdGVyIElE">TWFzdGVyIElE</PHRASE>
 			<PHRASE Label="la_fld_MasterPrefix" Module="Core" Type="1" Column="TWFzdGVyIFByZWZpeA==">TWFzdGVyIFByZWZpeA==</PHRASE>
 			<PHRASE Label="la_fld_MaxCategories" Module="Core" Type="1">TWF4aW11bSBudW1iZXIgb2YgU2VjdGlvbnMgb24gSXRlbSBjYW4gYmUgYWRkZWQgdG8=</PHRASE>
 			<PHRASE Label="la_fld_MenuIcon" Module="Core" Type="1">Q3VzdG9tIE1lbnUgSWNvbiAoaWUuIGltZy9tZW51X3Byb2R1Y3RzLmdpZik=</PHRASE>
 			<PHRASE Label="la_fld_MenuStatus" Module="Core" Type="1">TWVudSBTdGF0dXM=</PHRASE>
 			<PHRASE Label="la_fld_MergeToSubmission" Module="Core" Type="1">TWVyZ2UgdG8gU3VibWlzc2lvbg==</PHRASE>
 			<PHRASE Label="la_fld_Message" Module="Core" Type="1" Column="TWVzc2FnZQ==">TWVzc2FnZQ==</PHRASE>
 			<PHRASE Label="la_fld_MessageBody" Module="Core" Type="1">TWVzc2FnZSBCb2R5</PHRASE>
 			<PHRASE Label="la_fld_MessageText" Module="Core" Type="1" Column="UGxhaW4gVGV4dA==">UGxhaW4gVGV4dCBWZXJzaW9u</PHRASE>
 			<PHRASE Label="la_fld_MessageType" Module="Core" Type="1">TWVzc2FnZSBUeXBl</PHRASE>
 			<PHRASE Label="la_fld_MetaDescription" Module="Core" Type="1">TWV0YSBEZXNjcmlwdGlvbg==</PHRASE>
 			<PHRASE Label="la_fld_MetaKeywords" Module="Core" Type="1">TWV0YSBLZXl3b3Jkcw==</PHRASE>
 			<PHRASE Label="la_fld_MisspelledWord" Module="Core" Type="1" Column="TWlzc3BlbGxlZCBXb3Jk">TWlzc3BlbGxlZCBXb3Jk</PHRASE>
 			<PHRASE Label="la_fld_Modified" Module="Core" Type="1" Column="TW9kaWZpZWQgT24=">TW9kaWZpZWQ=</PHRASE>
 			<PHRASE Label="la_fld_Module" Module="Core" Type="1" Column="TW9kdWxl">TW9kdWxl</PHRASE>
 			<PHRASE Label="la_fld_ModuleName" Module="Core" Type="1">TW9kdWxl</PHRASE>
 			<PHRASE Label="la_fld_MultiLingual" Module="Core" Type="1">TXVsdGlsaW5ndWFs</PHRASE>
 			<PHRASE Label="la_fld_Name" Module="Core" Type="1" Column="TmFtZQ==">TmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_New" Module="Core" Type="1">TmV3</PHRASE>
 			<PHRASE Label="la_fld_NextRunOn" Module="Core" Type="1" Column="TmV4dCBSdW4gT24=">TmV4dCBSdW4gT24=</PHRASE>
 			<PHRASE Label="la_fld_Notes" Module="Core" Type="1">Tm90ZXM=</PHRASE>
 			<PHRASE Label="la_fld_NotHelpfulCount" Module="Core" Type="1">UmV2aWV3IFdhc24ndCBIZWxwZnVs</PHRASE>
 			<PHRASE Label="la_fld_NumberOfClicks" Module="Core" Type="1" Column="TnVtYmVyIE9mIENsaWNrcw==">TnVtYmVyIE9mIENsaWNrcw==</PHRASE>
 			<PHRASE Label="la_fld_NumberOfViews" Module="Core" Type="1" Column="TnVtYmVyIE9mIFZpZXdz">TnVtYmVyIE9mIFZpZXdz</PHRASE>
 			<PHRASE Label="la_fld_OccuredOn" Module="Core" Type="1" Column="T2NjdXJlZCBPbg==">T2NjdXJlZCBPbg==</PHRASE>
 			<PHRASE Label="la_fld_OpenInNewWindow" Module="Core" Type="1">T3BlbiBJbiBOZXcgV2luZG93</PHRASE>
 			<PHRASE Label="la_fld_Options" Module="Core" Type="1">T3B0aW9ucw==</PHRASE>
 			<PHRASE Label="la_fld_OptionTitle" Module="Core" Type="1">T3B0aW9uIFRpdGxl</PHRASE>
 			<PHRASE Label="la_fld_Order" Module="Core" Type="1" Column="T3JkZXI=">T3JkZXI=</PHRASE>
 			<PHRASE Label="la_fld_OtherRecipients" Module="Core" Type="1" Column="T3RoZXIgUmVjaXBpZW50cw==">T3RoZXIgUmVjaXBpZW50cw==</PHRASE>
 			<PHRASE Label="la_fld_OverridePageCacheKey" Module="Core" Type="1">T3ZlcndyaXRlIERlZmF1bHQgQ2FjaGluZyBLZXk=</PHRASE>
 			<PHRASE Label="la_fld_PackName" Module="Core" Type="1" Column="UGFjayBOYW1l">UGFjayBOYW1l</PHRASE>
 			<PHRASE Label="la_fld_PaddingBottom" Module="Core" Type="1">UGFkZGluZyBCb3R0b20=</PHRASE>
 			<PHRASE Label="la_fld_PaddingLeft" Module="Core" Type="1">UGFkZGluZyBMZWZ0</PHRASE>
 			<PHRASE Label="la_fld_PaddingRight" Module="Core" Type="1">UGFkZGluZyBSaWdodA==</PHRASE>
 			<PHRASE Label="la_fld_Paddings" Module="Core" Type="1">UGFkZGluZ3M=</PHRASE>
 			<PHRASE Label="la_fld_PaddingTop" Module="Core" Type="1">UGFkZGluZyBUb3A=</PHRASE>
 			<PHRASE Label="la_fld_PageCacheKey" Module="Core" Type="1">Q3VzdG9tIENhY2hpbmcgS2V5</PHRASE>
 			<PHRASE Label="la_fld_PageContentTitle" Module="Core" Type="1">Jmx0O1RJVExFJmd0OyBUYWc=</PHRASE>
 			<PHRASE Label="la_fld_PageExpiration" Module="Core" Type="1" Hint="SG93IHNvb24gKGluIHNlY29uZHMpIHRoZSBzZWN0aW9uIGNhY2hlIHNob3VsZCBhdXRvLWV4cGlyZSBhZnRlciBpdCdzIGNyZWF0aW9uLiBCeSBkZWZhdWx0IHN5c3RlbSB0ZW5kcyB0byByZWJ1aWxkIHRoZSBjYWNoZSBvbmx5IHdoZW4gaXQncyBwcm9wZXJ0aWVzIG9yIGVsZW1lbnRzIGhhdmUgY2hhbmdlZC4=">Q2FjaGUgRXhwaXJhdGlvbiBpbiBzZWNvbmRz</PHRASE>
 			<PHRASE Label="la_fld_PageMentTitle" Module="Core" Type="1">VGl0bGUgKE1lbnUgSXRlbSk=</PHRASE>
 			<PHRASE Label="la_fld_PageTitle" Module="Core" Type="1" Column="U2VjdGlvbiBUaXRsZQ==">U2VjdGlvbiBUaXRsZQ==</PHRASE>
 			<PHRASE Label="la_fld_ParentItemId" Module="Core" Type="1" Column="UGFyZW50IEl0ZW0gSUQ=">UGFyZW50IEl0ZW0gSUQ=</PHRASE>
 			<PHRASE Label="la_fld_ParentItemName" Module="Core" Type="1" Column="UGFyZW50IEl0ZW0gTmFtZQ==">UGFyZW50IEl0ZW0gTmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_ParentSection" Module="Core" Type="1">UGFyZW50IFNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_fld_Password" Module="Core" Type="1">UGFzc3dvcmQ=</PHRASE>
 			<PHRASE Label="la_fld_PercentsCompleted" Module="Core" Type="1">UGVyY2VudHMgQ29tcGxldGVk</PHRASE>
 			<PHRASE Label="la_fld_Phone" Module="Core" Type="1" Column="UGhvbmU=">UGhvbmU=</PHRASE>
 			<PHRASE Label="la_fld_Phrase" Module="Core" Type="1" Column="UGhyYXNl">TGFiZWw=</PHRASE>
 			<PHRASE Label="la_fld_PhraseType" Module="Core" Type="1" Column="VHlwZQ==">UGhyYXNlIFR5cGU=</PHRASE>
 			<PHRASE Label="la_fld_Pop" Module="Core" Type="1">UG9w</PHRASE>
 			<PHRASE Label="la_fld_Popular" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
 			<PHRASE Label="la_fld_Port" Module="Core" Type="1">UG9ydA==</PHRASE>
 			<PHRASE Label="la_fld_Position" Module="Core" Type="1">UG9zaXRpb24=</PHRASE>
 			<PHRASE Label="la_fld_Prefix" Module="Core" Type="1" Column="UHJlZml4">UHJlZml4</PHRASE>
 			<PHRASE Label="la_fld_Primary" Module="Core" Type="1" Column="UHJpbWFyeQ==">UHJpbWFyeQ==</PHRASE>
 			<PHRASE Label="la_fld_PrimaryCategory" Module="Core" Type="1">UHJpbWFyeSBTZWN0aW9u</PHRASE>
 			<PHRASE Label="la_fld_PrimaryLang" Module="Core" Type="1">UHJpbWFyeQ==</PHRASE>
 			<PHRASE Label="la_fld_PrimaryTranslation" Module="Core" Type="1">UHJpbWFyeSBMYW5ndWFnZSBQaHJhc2U=</PHRASE>
 			<PHRASE Label="la_fld_Priority" Module="Core" Type="1" Column="T3JkZXI=">T3JkZXI=</PHRASE>
 			<PHRASE Label="la_fld_ProcessUnmatchedEmails" Module="Core" Type="1">Q29udmVydCB1bm1hdGNoZWQgZS1tYWlscyBpbnRvIG5ldyBzdWJtaXNzaW9ucw==</PHRASE>
 			<PHRASE Label="la_fld_PromoBlockGroup" Module="Core" Type="1">UHJvbW8gQmxvY2sgR3JvdXA=</PHRASE>
 			<PHRASE Label="la_fld_Protected" Module="Core" Type="1" Column="UHJvdGVjdGVk">UHJvdGVjdGVk</PHRASE>
 			<PHRASE Label="la_fld_Qty" Module="Core" Type="1" Column="UXR5">UXVhbnRpdHk=</PHRASE>
 			<PHRASE Label="la_fld_Rating" Module="Core" Type="1" Column="UmF0aW5n">UmF0aW5n</PHRASE>
 			<PHRASE Label="la_fld_Recipient" Module="Core" Type="1" Column="UmVjaXBpZW50">UmVjaXBpZW50</PHRASE>
 			<PHRASE Label="la_fld_RecipientAddress" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcw==</PHRASE>
 			<PHRASE Label="la_fld_RecipientAddressType" Module="Core" Type="1">UmVjaXBpZW50J3MgQWRkcmVzcyBUeXBl</PHRASE>
 			<PHRASE Label="la_fld_RecipientName" Module="Core" Type="1">UmVjaXBpZW50J3MgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_Recipients" Module="Core" Type="1">UmVjaXBpZW50cw==</PHRASE>
 			<PHRASE Label="la_fld_RecipientType" Module="Core" Type="1" Column="UmVjaXBpZW50IFR5cGU=">UmVjaXBpZW50IFR5cGU=</PHRASE>
 			<PHRASE Label="la_fld_RedirectOnIPMatch" Module="Core" Type="1">Rm9yY2UgUmVkaXJlY3QgKHdoZW4gdXNlcidzIElQIG1hdGNoZXMp</PHRASE>
 			<PHRASE Label="la_fld_ReferrerURL" Module="Core" Type="1" Column="UmVmZXJyZXIgVVJM">UmVmZXJyZXIgVVJM</PHRASE>
 			<PHRASE Label="la_fld_RelatedSearchKeyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
 			<PHRASE Label="la_fld_RelationshipType" Module="Core" Type="1" Column="UmVsYXRpb24gVHlwZQ==">VHlwZQ==</PHRASE>
 			<PHRASE Label="la_fld_RemoteUrl" Module="Core" Type="1">UmVtb3RlIFVSTA==</PHRASE>
 			<PHRASE Label="la_fld_ReplaceDuplicates" Module="Core" Type="1">UmVwbGFjZSBEdXBsaWNhdGVz</PHRASE>
 			<PHRASE Label="la_fld_Replacement" Module="Core" Type="1" Column="UmVwbGFjZW1lbnQ=">UmVwbGFjZW1lbnQ=</PHRASE>
 			<PHRASE Label="la_fld_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
 			<PHRASE Label="la_fld_RepliedOn" Module="Core" Type="1" Column="UmVwbGllZCBPbg==">UmVwbGllZCBPbg==</PHRASE>
 			<PHRASE Label="la_fld_ReplyBcc" Module="Core" Type="1">UmVwbHkgQmNj</PHRASE>
 			<PHRASE Label="la_fld_ReplyCc" Module="Core" Type="1">UmVwbHkgQ2M=</PHRASE>
 			<PHRASE Label="la_fld_ReplyFromEmail" Module="Core" Type="1">UmVwbHkgRnJvbSBFLW1haWw=</PHRASE>
 			<PHRASE Label="la_fld_ReplyFromName" Module="Core" Type="1">UmVwbHkgRnJvbSBOYW1l</PHRASE>
 			<PHRASE Label="la_fld_ReplyMessageSignature" Module="Core" Type="1">UmVwbHkgTWVzc2FnZSBTaWduYXR1cmU=</PHRASE>
 			<PHRASE Label="la_fld_ReplyStatus" Module="Core" Type="1" Column="UmVwbGllZA==">UmVwbGllZA==</PHRASE>
 			<PHRASE Label="la_fld_ReportedBy" Module="Core" Type="1" Column="UmVwb3J0ZWQgQnk=">UmVwb3J0ZWQgQnk=</PHRASE>
 			<PHRASE Label="la_fld_ReportedOn" Module="Core" Type="1" Column="UmVwb3J0ZWQgT24=">UmVwb3J0ZWQgT24=</PHRASE>
 			<PHRASE Label="la_fld_Required" Module="Core" Type="1" Column="UmVxdWlyZWQ=">UmVxdWlyZWQ=</PHRASE>
 			<PHRASE Label="la_fld_RequireLogin" Module="Core" Type="1" Column="UmVxdWlyZSBMb2dpbg==">UmVxdWlyZSBMb2dpbg==</PHRASE>
 			<PHRASE Label="la_fld_RequireSSL" Module="Core" Type="1" Column="UmVxdWlyZSBTU0w=">UmVxdWlyZSBTU0w=</PHRASE>
 			<PHRASE Label="la_fld_ReviewText" Module="Core" Type="1" Column="Q29tbWVudA==">Q29tbWVudA==</PHRASE>
 			<PHRASE Label="la_fld_RotationDelay" Module="Core" Type="1" Column="UHJvbW8gUm90YXRpb24gRGVsYXkgKHNlY29uZHMp">UHJvbW8gUm90YXRpb24gRGVsYXkgKHNlY29uZHMp</PHRASE>
 			<PHRASE Label="la_fld_RuleType" Module="Core" Type="1" Column="UnVsZSBUeXBl">UnVsZSBUeXBl</PHRASE>
 			<PHRASE Label="la_fld_RunSchedule" Module="Core" Type="1" Column="UnVuIFNjaGVkdWxl">UnVuIFNjaGVkdWxl</PHRASE>
 			<PHRASE Label="la_fld_RunTime" Module="Core" Type="1" Column="UnVuIFRpbWU=">UnVuIFRpbWU=</PHRASE>
 			<PHRASE Label="la_fld_SameAsThumb" Module="Core" Type="1">U2FtZSBBcyBUaHVtYg==</PHRASE>
 			<PHRASE Label="la_fld_ScheduleDate" Module="Core" Type="1">U2NoZWR1bGUgRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_fld_SearchTerm" Module="Core" Type="1" Column="U2VhcmNoIFRlcm0=">U2VhcmNoIFRlcm0=</PHRASE>
 			<PHRASE Label="la_fld_Sender" Module="Core" Type="1" Column="U2VuZGVy">U2VuZGVy</PHRASE>
 			<PHRASE Label="la_fld_SenderAddress" Module="Core" Type="1">U2VuZGVyJ3MgQWRkcmVzcw==</PHRASE>
 			<PHRASE Label="la_fld_SenderName" Module="Core" Type="1">U2VuZGVyJ3MgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_SentOn" Module="Core" Type="1" Column="U2VudCBPbg==">U2VudCBPbg==</PHRASE>
 			<PHRASE Label="la_fld_SentStatus" Module="Core" Type="1" Column="U2VudA==">U2VudA==</PHRASE>
 			<PHRASE Label="la_fld_Server" Module="Core" Type="1">U2VydmVy</PHRASE>
 			<PHRASE Label="la_fld_SessionLogId" Module="Core" Type="1" Column="U2Vzc2lvbiBMb2cgSUQ=">U2Vzc2lvbiBMb2cgSUQ=</PHRASE>
 			<PHRASE Label="la_fld_ShortDateFormat" Module="Core" Type="1" Column="U2hvcnQgRGF0ZSBGb3JtYXQ=">U2hvcnQgRGF0ZSBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_fld_ShortIsoCode" Module="Core" Type="1" Column="U2hvcnQgSVNPIENvZGU=">U2hvcnQgSVNPIENvZGU=</PHRASE>
 			<PHRASE Label="la_fld_ShortTimeFormat" Module="Core" Type="1" Column="U2hvcnQgVGltZSBGb3JtYXQ=">U2hvcnQgVGltZSBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_fld_SimpleSearch" Module="Core" Type="1">U2ltcGxlIFNlYXJjaA==</PHRASE>
 			<PHRASE Label="la_fld_SiteDomainLimitation" Module="Core" Type="1" Column="U2l0ZSBEb21haW4gTGltaXRhdGlvbg==">U2l0ZSBEb21haW4gTGltaXRhdGlvbg==</PHRASE>
 			<PHRASE Label="la_fld_SkinName" Module="Core" Type="1" Column="TmFtZQ==">TmFtZQ==</PHRASE>
 			<PHRASE Label="la_fld_SkipFirstRow" Module="Core" Type="1">U2tpcCBGaXJzdCBSb3c=</PHRASE>
 			<PHRASE Label="la_fld_SortValues" Module="Core" Type="1">U29ydCBWYWx1ZXM=</PHRASE>
 			<PHRASE Label="la_fld_SSLUrl" Module="Core" Type="1" Hint="aHR0cHM6Ly93d3cuZG9tYWluLmNvbS9wYXRo" Column="U1NMIFVybA==">U1NMIEZ1bGwgVVJM</PHRASE>
 			<PHRASE Label="la_fld_StartDate" Module="Core" Type="1" Column="U3RhcnQgRGF0ZQ==">U3RhcnQgRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_fld_State" Module="Core" Type="1" Column="U3RhdGU=">U3RhdGU=</PHRASE>
 			<PHRASE Label="la_fld_StateCountry" Module="Core" Type="1" Column="U3RhdGUgQ291bnRyeQ==">U3RhdGUgQ291bnRyeQ==</PHRASE>
 			<PHRASE Label="la_fld_Status" Module="Core" Type="1" Column="U3RhdHVz">U3RhdHVz</PHRASE>
 			<PHRASE Label="la_fld_Sticky" Module="Core" Type="1" Column="U3RpY2t5">U3RpY2t5</PHRASE>
 			<PHRASE Label="la_fld_StopWord" Module="Core" Type="1" Column="U3RvcCBXb3Jk">U3RvcCBXb3Jk</PHRASE>
 			<PHRASE Label="la_fld_Subject" Module="Core" Type="1" Column="U3ViamVjdA==">U3ViamVjdA==</PHRASE>
 			<PHRASE Label="la_fld_SubmissionTime" Module="Core" Type="1">U3VibWl0dGVkIE9u</PHRASE>
 			<PHRASE Label="la_fld_SubmitNotifyEmail" Module="Core" Type="1" Hint="RW1haWwgYWRkcmVzcyB3aGVyZSBub3RpZmljYXRpb24gYWJvdXQgbmV3IHN1Ym1pc3Npb25zIHdpbGwgYmUgc2VuZCB0by4gRGVmYXVsdCBlbWFpbCBhZGRyZXNzIHdpbGwgYmUgdXNlZCBpZiB0aGlzIGZpZWxkIGlzIGxlZnQgYmxhbmsu" Column="U3VibWlzc2lvbiBOb3RpZmljYXRpb24gRW1haWw=">U3VibWlzc2lvbiBOb3RpZmljYXRpb24gRW1haWw=</PHRASE>
 			<PHRASE Label="la_fld_SubscribedOn" Module="Core" Type="1" Column="U3Vic2NyaWJlZCBPbg==">U3Vic2NyaWJlZCBPbg==</PHRASE>
 			<PHRASE Label="la_fld_SuggestedCorrection" Module="Core" Type="1" Column="U3VnZ2VzdGVkIENvcnJlY3Rpb24=">U3VnZ2VzdGVkIENvcnJlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_fld_SymLinkCategoryId" Module="Core" Type="1">UG9pbnRzIHRvIFNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_fld_SynchronizationModes" Module="Core" Type="1" Hint="IlRvIG90aGVycyIgLSBhbGxvdyB0cmFuc2xhdGVkIHBocmFzZXMgZnJvbSB0aGlzIGxhbmd1YWdlIHRvIGJlIHVzZWQgaW5zdGVhZCBvZiBtaXNzaW5nIHBocmFzZXMgb24gb3RoZXIgbGFuZ3VhZ2VzLiAiRnJvbSBvdGhlcnMiIC0gdXNlIHRyYW5zbGF0ZWQgcGhyYXNlcyBmcm9tIG90aGVyIGxhbmd1YWdlcyBpbnN0ZWFkIG9mIG1pc3NpbmcgcGhyYXNlcyBvbiB0aGlzIGxhbmd1YWdlLg==" Column="U3luY2hyb25pemUgTGFuZ3VhZ2U=">U3luY2hyb25pemUgTGFuZ3VhZ2U=</PHRASE>
 			<PHRASE Label="la_fld_SystemEvent" Module="Core" Type="1" Column="U3lzdGVtIEV2ZW50">U3lzdGVtIEV2ZW50</PHRASE>
 			<PHRASE Label="la_fld_TableName" Module="Core" Type="1">VGFibGUgTmFtZSBpbiBEYXRhYmFzZSA=</PHRASE>
 			<PHRASE Label="la_fld_Tag" Module="Core" Type="1">VGFn</PHRASE>
 			<PHRASE Label="la_fld_TargetId" Module="Core" Type="1" Column="SXRlbQ==">SXRlbQ==</PHRASE>
 			<PHRASE Label="la_fld_TemplateFile" Module="Core" Type="1">VGVtcGxhdGUgRmlsZQ==</PHRASE>
 			<PHRASE Label="la_fld_TemplateType" Module="Core" Type="1" Column="VGVtcGxhdGU=">VGVtcGxhdGU=</PHRASE>
 			<PHRASE Label="la_fld_Text" Module="Core" Type="1">VGV4dA==</PHRASE>
 			<PHRASE Label="la_fld_TextAlign" Module="Core" Type="1">VGV4dCBBbGlnbg==</PHRASE>
 			<PHRASE Label="la_fld_TextDecoration" Module="Core" Type="1">VGV4dCBEZWNvcmF0aW9u</PHRASE>
 			<PHRASE Label="la_fld_TextEmailTemplate" Module="Core" Type="1" Hint="VGhpcyBmaWVsZCBoYXMgYSBQbGFpbiBUZXh0IHZlcnNpb24gb2YgRW1haWwgRGVzaWduIFRlbXBsYXRlIGFuZCBtdXN0IGNvbnRhaW5zIGF0IGxlYXN0IGEgIiRib2R5IiB0YWcgdW5sZXNzIEhUTUwgVmVyc2lvbiBmaWVsZCBpcyBwb3B1bGF0ZWQgYWxyZWFkeS4gSXQgd2lsbCBiZSB1c2VkIGFzIGEgZGVzaWduIGZvciBhbGwgZW1haWxzIHNlbmQgb3V0IGJ5IHRoZSB3ZWJzaXRlLg==">VGV4dCBWZXJzaW9u</PHRASE>
 			<PHRASE Label="LA_FLD_TEXTVERSION" Module="Core" Type="1">VGV4dCBWZXJzaW9u</PHRASE>
 			<PHRASE Label="la_fld_Theme" Module="Core" Type="1" Column="VGhlbWU=">VGhlbWU=</PHRASE>
 			<PHRASE Label="la_fld_Themes" Module="Core" Type="1">VGhlbWVz</PHRASE>
 			<PHRASE Label="la_fld_ThesaurusTerm" Module="Core" Type="1" Column="VGhlc2F1cnVzIFRlcm0=">VGhlc2F1cnVzIFRlcm0=</PHRASE>
 			<PHRASE Label="la_fld_ThesaurusType" Module="Core" Type="1" Column="VGhlc2F1cnVzIFR5cGU=">VGhlc2F1cnVzIFR5cGU=</PHRASE>
 			<PHRASE Label="la_fld_ThousandSep" Module="Core" Type="1">VGhvdXNhbmRzIFNlcGFyYXRvcg==</PHRASE>
 			<PHRASE Label="la_fld_TimeFormat" Module="Core" Type="1">VGltZSBGb3JtYXQ=</PHRASE>
 			<PHRASE Label="la_fld_Timeout" Module="Core" Type="1" Hint="VGltZW91dCBvZiBldmVudCBzY2hlZHVsZSAoaW4gc2Vjb25kcykuIFNwZWNpZmllZCB2YWx1ZSBtdXN0IGJlIGdyZWF0ZXIgdGhhbiAwIGluIG9yZGVyIGZvciBzeXN0ZW0gdG8gdGltZW91dCBhbHJlYWR5IHJ1bm5pbmcgZXZlbnQgaWYgaXQncyBydW5uaW5nIHRpbWUgZXhjZWVkcyB0aGUgc3BlY2lmaWVkIGhlcmUgdGltZW91dCB2YWx1ZS4=" Column="VGltZW91dA==">VGltZW91dA==</PHRASE>
 			<PHRASE Label="la_fld_TimeZone" Module="Core" Type="1" Hint="TmV3IFRpbWUgWm9uZSB3aWxsIGJlIGluIGVmZmVjdCBuZXh0IHRpbWUgdXNlciBsb2dpbnM=">VGltZSBab25l</PHRASE>
 			<PHRASE Label="la_fld_Title" Module="Core" Type="1" Column="VGl0bGU=">VGl0bGU=</PHRASE>
 			<PHRASE Label="la_fld_To" Module="Core" Type="1">VG8=</PHRASE>
 			<PHRASE Label="la_fld_ToEmail" Module="Core" Type="1" Column="VG8gRS1tYWls">VG8gRS1tYWls</PHRASE>
 			<PHRASE Label="la_fld_Top" Module="Core" Type="1">VG9w</PHRASE>
 			<PHRASE Label="la_fld_TrackingCode" Module="Core" Type="1">QW5hbHl0aWNzIFRyYWNraW5nIENvZGU=</PHRASE>
 			<PHRASE Label="la_fld_TransitionControls" Module="Core" Type="1" Column="UHJvbW8gVHJhbnNpdGlvbiBDb250cm9scw==">UHJvbW8gVHJhbnNpdGlvbiBDb250cm9scw==</PHRASE>
 			<PHRASE Label="la_fld_TransitionEffect" Module="Core" Type="1" Column="UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3Q=">UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3Q=</PHRASE>
 			<PHRASE Label="la_fld_TransitionEffectCustom" Module="Core" Type="1" Column="UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3QgKGN1c3RvbSk=">UHJvbW8gVHJhbnNpdGlvbiBFZmZlY3QgKGN1c3RvbSk=</PHRASE>
 			<PHRASE Label="la_fld_TransitionTime" Module="Core" Type="1" Column="VHJhbnNpdGlvbiBEZWxheSAoc2Vjb25kcyk=">VHJhbnNpdGlvbiBEZWxheSAoc2Vjb25kcyk=</PHRASE>
 			<PHRASE Label="la_fld_Translation" Module="Core" Type="1" Column="VmFsdWU=">UGhyYXNl</PHRASE>
 			<PHRASE Label="la_fld_Type" Module="Core" Type="1" Column="VHlwZQ==">VHlwZQ==</PHRASE>
 			<PHRASE Label="la_fld_UnitSystem" Module="Core" Type="1">TWVhc3VyZXMgU3lzdGVt</PHRASE>
 			<PHRASE Label="la_fld_Upload" Module="Core" Type="1">VXBsb2FkIEZpbGUgRnJvbSBMb2NhbCBQQw==</PHRASE>
 			<PHRASE Label="la_fld_UploadExtensions" Module="Core" Type="1" Hint="TGlzdCBvZiBGaWxlIEV4dGVuc2lvbnMgYWxsb3dlZCBmb3IgdXBsb2FkIHNlcGFyYXRlZCBieSBjb21tYS4gRXhhbXBsZToganBnLHBuZyxnaWcscGRm">QWxsb3dlZCBGaWxlIEV4dGVuc2lvbnM=</PHRASE>
 			<PHRASE Label="la_fld_UploadMaxSize" Module="Core" Type="1" Hint="TWF4aW11bSBmaWxlIHNpemUgKGluIEtieXRlcykgYWxsb3dlZCBmb3IgdGhlIHVwbG9hZC4gRXhhbXBsZTogMSBNQnl0ZSA9IDEwMjQgS0J5dGVzLCAxMCBNQnl0ZXMgPSAxMDI0MCBLQnl0ZXMu">TWF4aW11bSBGaWxlIFNpemU=</PHRASE>
 			<PHRASE Label="la_fld_URL" Module="Core" Type="1" Column="VVJM">VVJM</PHRASE>
 			<PHRASE Label="la_fld_UseExternalUrl" Module="Core" Type="1">TGluayB0byBFeHRlcm5hbCBVUkw=</PHRASE>
 			<PHRASE Label="la_fld_UseMenuIcon" Module="Core" Type="1">VXNlIEN1c3RvbSBNZW51IEljb24=</PHRASE>
 			<PHRASE Label="la_fld_UserDocsUrl" Module="Core" Type="1">VXNlciBEb2N1bWVudGF0aW9uIFVSTA==</PHRASE>
 			<PHRASE Label="la_fld_UserGroups" Module="Core" Type="1">VXNlciBHcm91cHM=</PHRASE>
 			<PHRASE Label="la_fld_Username" Module="Core" Type="1" Column="VXNlcm5hbWU=">VXNlcm5hbWU=</PHRASE>
 			<PHRASE Label="la_fld_UseSecurityImage" Module="Core" Type="1" Column="VXNlIFNlY3VyaXR5IEltYWdl">VXNlIFNlY3VyaXR5IEltYWdl</PHRASE>
 			<PHRASE Label="la_fld_VerifyPassword" Module="Core" Type="1">UmUtZW50ZXIgUGFzc3dvcmQ=</PHRASE>
 			<PHRASE Label="la_fld_Version" Module="Core" Type="1" Column="VmVyc2lvbg==">VmVyc2lvbg==</PHRASE>
 			<PHRASE Label="la_fld_Visibility" Module="Core" Type="1" Column="VmlzaWJpbGl0eQ==">VmlzaWJpbGl0eQ==</PHRASE>
 			<PHRASE Label="la_fld_Votes" Module="Core" Type="1">Vm90ZXM=</PHRASE>
 			<PHRASE Label="la_fld_Width" Module="Core" Type="1">V2lkdGg=</PHRASE>
 			<PHRASE Label="la_fld_Z-Index" Module="Core" Type="1">Wi1JbmRleA==</PHRASE>
 			<PHRASE Label="la_fld_ZIP" Module="Core" Type="1" Column="WklQ">WklQ</PHRASE>
 			<PHRASE Label="la_Font" Module="Core" Type="1">Rm9udCBQcm9wZXJ0aWVz</PHRASE>
 			<PHRASE Label="la_FormCancelConfirmation" Module="Core" Type="1">RG8geW91IHdhbnQgdG8gc2F2ZSB0aGUgY2hhbmdlcz8=</PHRASE>
 			<PHRASE Label="la_FormResetConfirmation" Module="Core" Type="1">QXJlIHlvdSBzdXJlIHlvdSB3b3VsZCBsaWtlIHRvIGRpc2NhcmQgdGhlIGNoYW5nZXM/</PHRASE>
 			<PHRASE Label="la_From" Module="Core" Type="1">RnJvbQ==</PHRASE>
 			<PHRASE Label="la_from_date" Module="Core" Type="1">RnJvbSBEYXRl</PHRASE>
 			<PHRASE Label="la_GeneralSections" Module="Core" Type="1">R2VuZXJhbCBTZWN0aW9ucw==</PHRASE>
 			<PHRASE Label="la_HeadFrame" Module="Core" Type="1">SGVhZCBGcmFtZQ==</PHRASE>
 			<PHRASE Label="la_Hide" Module="Core" Type="1">SGlkZQ==</PHRASE>
 			<PHRASE Label="la_hint_AllFiles" Module="Core" Type="1">QWxsIEZpbGVz</PHRASE>
 			<PHRASE Label="la_hint_CSVFiles" Module="Core" Type="1">Q1NWIEZpbGVz</PHRASE>
 			<PHRASE Label="la_hint_ImageFiles" Module="Core" Type="1">SW1hZ2UgRmlsZXM=</PHRASE>
 			<PHRASE Label="la_hint_PopPort" Module="Core" Type="1">UE9QMyBTZXJ2ZXIgUG9ydC4gRm9yIGV4LiAiMTEwIiBmb3IgcmVndWxhciBjb25uZWN0aW9uLCAiOTk1IiBmb3Igc2VjdXJlIGNvbm5lY3Rpb24u</PHRASE>
 			<PHRASE Label="la_hint_PopServer" Module="Core" Type="1">UE9QMyBTZXJ2ZXIgQWRkcmVzcy4gRm9yIGV4LiB1c2UgInNzbDovL3BvcC5nbWFpbC5jb20iIGZvciBHbWFpbCwgInBvcC5tYWlsLnlhaG9vLmNvbSIgZm9yIFlhaG9vLg==</PHRASE>
 			<PHRASE Label="la_hint_SystemToolsCacheKeys" Module="Core" Type="1">Q2FjaGUgS2V5KHMp</PHRASE>
 			<PHRASE Label="la_hint_SystemToolsDatabaseCache" Module="Core" Type="1">ZGF0YWJhc2UgY2FjaGU=</PHRASE>
 			<PHRASE Label="la_hint_SystemToolsMemoryCache" Module="Core" Type="1">bWVtb3J5IGNhY2hl</PHRASE>
 			<PHRASE Label="la_hint_UsingRegularExpression" Module="Core" Type="1">VXNpbmcgUmVndWxhciBFeHByZXNzaW9u</PHRASE>
 			<PHRASE Label="la_Hot" Module="Core" Type="1">SG90</PHRASE>
 			<PHRASE Label="la_Html" Module="Core" Type="1">SFRNTA==</PHRASE>
 			<PHRASE Label="la_IDField" Module="Core" Type="1">SUQgRmllbGQ=</PHRASE>
 			<PHRASE Label="la_invalid_email" Module="Core" Type="1">SW52YWxpZCBFLU1haWw=</PHRASE>
 			<PHRASE Label="la_invalid_integer" Module="Core" Type="1">SW5jb3JyZWN0IGRhdGEgZm9ybWF0LCBwbGVhc2UgdXNlIGludGVnZXI=</PHRASE>
 			<PHRASE Label="la_invalid_license" Module="Core" Type="1">TWlzc2luZyBvciBpbnZhbGlkIEluLVBvcnRhbCBMaWNlbnNl</PHRASE>
 			<PHRASE Label="la_Invalid_Password" Module="Core" Type="1">SW5jb3JyZWN0IFVzZXJuYW1lIG9yIFBhc3N3b3Jk</PHRASE>
 			<PHRASE Label="la_invalid_state" Module="Core" Type="1">SW52YWxpZCBzdGF0ZQ==</PHRASE>
 			<PHRASE Label="la_ItemTab_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_link_editorspick_prompt" Module="Core" Type="1">RGlzcGxheSBlZGl0b3IgUElDS3MgYWJvdmUgcmVndWxhciBsaW5rcw==</PHRASE>
 			<PHRASE Label="la_link_newdays_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGRheXMgZm9yIGEgbGluayB0byBiZSBORVc=</PHRASE>
 			<PHRASE Label="la_link_perpage_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGxpbmtzIHBlciBwYWdl</PHRASE>
 			<PHRASE Label="la_link_perpage_short_prompt" Module="Core" Type="1">TnVtYmVyIG9mIGxpbmtzIHBlciBwYWdlIG9uIGEgc2hvcnQgbGlzdGluZw==</PHRASE>
 			<PHRASE Label="la_link_sortfield2_prompt" Module="Core" Type="1">QW5kIHRoZW4gYnk=</PHRASE>
 			<PHRASE Label="la_link_sortfield_prompt" Module="Core" Type="1">T3JkZXIgbGlua3MgYnk=</PHRASE>
 			<PHRASE Label="la_Linux" Module="Core" Type="1">TGludXg=</PHRASE>
 			<PHRASE Label="la_Local" Module="Core" Type="1">TG9jYWw=</PHRASE>
 			<PHRASE Label="la_LocalImage" Module="Core" Type="1">TG9jYWwgSW1hZ2U=</PHRASE>
 			<PHRASE Label="la_Logged_in_as" Module="Core" Type="1">TG9nZ2VkIGluIGFz</PHRASE>
 			<PHRASE Label="la_login" Module="Core" Type="1">TG9naW4=</PHRASE>
 			<PHRASE Label="la_Logout" Module="Core" Type="1">TG9nb3V0</PHRASE>
 			<PHRASE Label="la_m0" Module="Core" Type="1">KEdNVCk=</PHRASE>
 			<PHRASE Label="la_m1" Module="Core" Type="1">KEdNVCAtMDE6MDAp</PHRASE>
 			<PHRASE Label="la_m10" Module="Core" Type="1">KEdNVCAtMTA6MDAp</PHRASE>
 			<PHRASE Label="la_m11" Module="Core" Type="1">KEdNVCAtMTE6MDAp</PHRASE>
 			<PHRASE Label="la_m12" Module="Core" Type="1">KEdNVCAtMTI6MDAp</PHRASE>
 			<PHRASE Label="la_m2" Module="Core" Type="1">KEdNVCAtMDI6MDAp</PHRASE>
 			<PHRASE Label="la_m3" Module="Core" Type="1">KEdNVCAtMDM6MDAp</PHRASE>
 			<PHRASE Label="la_m4" Module="Core" Type="1">KEdNVCAtMDQ6MDAp</PHRASE>
 			<PHRASE Label="la_m5" Module="Core" Type="1">KEdNVCAtMDU6MDAp</PHRASE>
 			<PHRASE Label="la_m6" Module="Core" Type="1">KEdNVCAtMDY6MDAp</PHRASE>
 			<PHRASE Label="la_m7" Module="Core" Type="1">KEdNVCAtMDc6MDAp</PHRASE>
 			<PHRASE Label="la_m8" Module="Core" Type="1">KEdNVCAtMDg6MDAp</PHRASE>
 			<PHRASE Label="la_m9" Module="Core" Type="1">KEdNVCAtMDk6MDAp</PHRASE>
 			<PHRASE Label="la_Margins" Module="Core" Type="1">TWFyZ2lucw==</PHRASE>
 			<PHRASE Label="la_MembershipExpirationReminder" Module="Core" Type="1">R3JvdXAgTWVtYmVyc2hpcCBFeHBpcmF0aW9uIFJlbWluZGVyIChkYXlzKQ==</PHRASE>
 			<PHRASE Label="la_Metric" Module="Core" Type="1">TWV0cmlj</PHRASE>
 			<PHRASE Label="la_MixedCategoryPath" Module="Core" Type="1">U2VjdGlvbiBwYXRoIGluIG9uZSBmaWVsZA==</PHRASE>
 			<PHRASE Label="la_module_not_licensed" Module="Core" Type="1">TW9kdWxlIG5vdCBsaWNlbnNlZA==</PHRASE>
 			<PHRASE Label="la_monday" Module="Core" Type="1">TW9uZGF5</PHRASE>
 			<PHRASE Label="la_msg_ChangeLogIsCurrentlyDisabledTurnOnSettingToEnableIt" Module="Core" Type="1">Q2hhbmdlIGxvZyBpcyBjdXJyZW50bHkgZGlzYWJsZWQuIFR1cm4gb24gIiVzIiBzZXR0aW5nIHRvIGVuYWJsZSBpdC4=</PHRASE>
 			<PHRASE Label="la_msg_EnableTrackingDatabaseChangesToChangeLog" Module="Core" Type="1">RW5hYmxlIHRyYWNraW5nIGRhdGFiYXNlIGNoYW5nZXMgdG8gY2hhbmdlIGxvZz8=</PHRASE>
 			<PHRASE Label="la_msg_LastOperationHasBeenSuccessfullyCompleted" Module="Core" Type="1">TGFzdCBvcGVyYXRpb24gaGFzIGJlZW4gc3VjY2Vzc2Z1bGx5IGNvbXBsZXRlZCE=</PHRASE>
 			<PHRASE Label="la_Msg_PropagateCategoryStatus" Module="Core" Type="1">QXBwbHkgdG8gYWxsIFN1Yi1zZWN0aW9ucz8=</PHRASE>
 			<PHRASE Label="la_msg_RootPasswordWasReset" Module="Core" Type="1">WW91ciAicm9vdCIgcGFzc3dvcmQgaGFzIGJlZW4gcmVzZXQuIFBsZWFzZSByZW1vdmUgREJHX1JFU0VUX1JPT1QgY29uc3RhbnQgYW5kIGNoZWNrIHlvdXIgZS1tYWlsIGFkZHJlc3Mu</PHRASE>
 			<PHRASE Label="la_msg_YourChangesWereSuccessfullySaved" Module="Core" Type="1">WW91ciBjaGFuZ2VzIHdlcmUgc3VjY2Vzc2Z1bGx5IHNhdmVkIQ==</PHRASE>
 			<PHRASE Label="la_Never" Module="Core" Type="1">TmV2ZXI=</PHRASE>
 			<PHRASE Label="la_NeverExpires" Module="Core" Type="1">TmV2ZXIgRXhwaXJlcw==</PHRASE>
 			<PHRASE Label="la_New" Module="Core" Type="1">TmV3</PHRASE>
 			<PHRASE Label="la_nextcategory" Module="Core" Type="1">TmV4dCBzZWN0aW9u</PHRASE>
 			<PHRASE Label="la_No" Module="Core" Type="1">Tm8=</PHRASE>
 			<PHRASE Label="la_none" Module="Core" Type="1">Tm9uZQ==</PHRASE>
 			<PHRASE Label="la_no_permissions" Module="Core" Type="1">Tm8gUGVybWlzc2lvbnM=</PHRASE>
 			<PHRASE Label="la_NumberSuffixNd" Module="Core" Type="1">bmQ=</PHRASE>
 			<PHRASE Label="la_NumberSuffixRd" Module="Core" Type="1">cmQ=</PHRASE>
 			<PHRASE Label="la_NumberSuffixSt" Module="Core" Type="1">c3Q=</PHRASE>
 			<PHRASE Label="la_NumberSuffixTh" Module="Core" Type="1">dGg=</PHRASE>
 			<PHRASE Label="la_Off" Module="Core" Type="1">T2Zm</PHRASE>
 			<PHRASE Label="la_On" Module="Core" Type="1">T24=</PHRASE>
 			<PHRASE Label="la_OneWay" Module="Core" Type="1">T25lIFdheQ==</PHRASE>
 			<PHRASE Label="la_opt_ActionCreate" Module="Core" Type="1">Y3JlYXRlZA==</PHRASE>
 			<PHRASE Label="la_opt_ActionDelete" Module="Core" Type="1">ZGVsZXRlZA==</PHRASE>
 			<PHRASE Label="la_opt_ActionUpdate" Module="Core" Type="1">dXBkYXRlZA==</PHRASE>
 			<PHRASE Label="la_opt_Active" Module="Core" Type="1">QWN0aXZl</PHRASE>
 			<PHRASE Label="la_opt_Address" Module="Core" Type="1">QWRkcmVzcw==</PHRASE>
 			<PHRASE Label="la_opt_After" Module="Core" Type="1">QWZ0ZXI=</PHRASE>
 			<PHRASE Label="la_opt_Allow" Module="Core" Type="1">QWxsb3c=</PHRASE>
 			<PHRASE Label="la_opt_AnimationCustom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
 			<PHRASE Label="la_opt_AnimationFade" Module="Core" Type="1">RmFkZQ==</PHRASE>
 			<PHRASE Label="la_opt_AnimationSlide" Module="Core" Type="1">U2xpZGU=</PHRASE>
 			<PHRASE Label="la_opt_April" Module="Core" Type="1">QXByaWw=</PHRASE>
 			<PHRASE Label="la_opt_August" Module="Core" Type="1">QXVndXN0</PHRASE>
 			<PHRASE Label="la_opt_AutoDetect" Module="Core" Type="1">QXV0by1EZXRlY3Q=</PHRASE>
 			<PHRASE Label="la_opt_Automatic" Module="Core" Type="1">QXV0b21hdGlj</PHRASE>
 			<PHRASE Label="la_opt_Before" Module="Core" Type="1">QmVmb3Jl</PHRASE>
 			<PHRASE Label="la_opt_Bounce" Module="Core" Type="1">Qm91bmNlZA==</PHRASE>
 			<PHRASE Label="la_opt_Cancelled" Module="Core" Type="1">Q2FuY2VsZWQ=</PHRASE>
 			<PHRASE Label="la_opt_City" Module="Core" Type="1">Q2l0eQ==</PHRASE>
 			<PHRASE Label="la_opt_Colon" Module="Core" Type="1">Q29sb24=</PHRASE>
 			<PHRASE Label="la_opt_Comma" Module="Core" Type="1">Q29tbWE=</PHRASE>
 			<PHRASE Label="la_opt_CommentText" Module="Core" Type="1">Q29tbWVudCBUZXh0</PHRASE>
 			<PHRASE Label="la_opt_Cookies" Module="Core" Type="1">Q29va2llcw==</PHRASE>
 			<PHRASE Label="la_opt_Countries" Module="Core" Type="1">Q291bnRyaWVz</PHRASE>
 			<PHRASE Label="la_opt_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
 			<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</PHRASE>
 			<PHRASE Label="la_opt_CronCommonSettings" Module="Core" Type="1">LS0gQ29tbW9uIFNldHRpbmdzIC0t</PHRASE>
 			<PHRASE Label="la_opt_CronDays" Module="Core" Type="1">LS0gRGF5cyAtLQ==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryDay" Module="Core" Type="1">RXZlcnkgZGF5</PHRASE>
 			<PHRASE Label="la_opt_CronEveryFifteenMinutes" Module="Core" Type="1">RXZlcnkgMTUgbWludXRlcw==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryFiveMinutes" Module="Core" Type="1">RXZlcnkgNSBtaW51dGVz</PHRASE>
 			<PHRASE Label="la_opt_CronEveryFourHours" Module="Core" Type="1">RXZlcnkgNCBob3Vycw==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryHour" Module="Core" Type="1">RXZlcnkgaG91cg==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryMinute" Module="Core" Type="1">RXZlcnkgbWludXRl</PHRASE>
 			<PHRASE Label="la_opt_CronEveryMonth" Module="Core" Type="1">RXZlcnkgbW9udGg=</PHRASE>
 			<PHRASE Label="la_opt_CronEveryOtherDay" Module="Core" Type="1">RXZlcnkgb3RoZXIgZGF5</PHRASE>
 			<PHRASE Label="la_opt_CronEveryOtherHour" Module="Core" Type="1">RXZlcnkgb3RoZXIgaG91cg==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryOtherMinute" Module="Core" Type="1">RXZlcnkgb3RoZXIgbWludXRl</PHRASE>
 			<PHRASE Label="la_opt_CronEveryOtherMonth" Module="Core" Type="1">RXZlcnkgb3RoZXIgbW9udGg=</PHRASE>
 			<PHRASE Label="la_opt_CronEverySixHours" Module="Core" Type="1">RXZlcnkgNiBob3Vycw==</PHRASE>
 			<PHRASE Label="la_opt_CronEverySixMonths" Module="Core" Type="1">RXZlcnkgNiBtb250aHM=</PHRASE>
 			<PHRASE Label="la_opt_CronEveryTenMinutes" Module="Core" Type="1">RXZlcnkgMTAgbWludXRlcw==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryThirtyMinutes" Module="Core" Type="1">RXZlcnkgMzAgbWludXRlcw==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryThreeHours" Module="Core" Type="1">RXZlcnkgMyBob3Vycw==</PHRASE>
 			<PHRASE Label="la_opt_CronEveryThreeMonths" Module="Core" Type="1">RXZlcnkgMyBtb250aHM=</PHRASE>
 			<PHRASE Label="la_opt_CronEveryTwelveHours" Module="Core" Type="1">RXZlcnkgMTIgaG91cnM=</PHRASE>
 			<PHRASE Label="la_opt_CronEveryWeekday" Module="Core" Type="1">RXZlcnkgd2Vla2RheQ==</PHRASE>
 			<PHRASE Label="la_opt_CronHours" Module="Core" Type="1">LS0gSG91cnMgLS0=</PHRASE>
 			<PHRASE Label="la_opt_CronMinutes" Module="Core" Type="1">LS0gTWludXRlcyAtLQ==</PHRASE>
 			<PHRASE Label="la_opt_CronMondayThroughFriday" Module="Core" Type="1">TW9uIHRocnUgRnJp</PHRASE>
 			<PHRASE Label="la_opt_CronMondayWednesdayAndFriday" Module="Core" Type="1">TW9uLCBXZWQsIEZyaQ==</PHRASE>
 			<PHRASE Label="la_opt_CronMonths" Module="Core" Type="1">LS0gTW9udGhzIC0t</PHRASE>
 			<PHRASE Label="la_opt_CronOnceADay" Module="Core" Type="1">T25jZSBhIGRheQ==</PHRASE>
 			<PHRASE Label="la_opt_CronOnceAMonth" Module="Core" Type="1">T25jZSBhIG1vbnRo</PHRASE>
 			<PHRASE Label="la_opt_CronOnceAnHour" Module="Core" Type="1">T25jZSBhbiBob3Vy</PHRASE>
 			<PHRASE Label="la_opt_CronOnceAWeek" Module="Core" Type="1">T25jZSBhIHdlZWs=</PHRASE>
 			<PHRASE Label="la_opt_CronOnceAYear" Module="Core" Type="1">T25jZSBhIHllYXI=</PHRASE>
 			<PHRASE Label="la_opt_CronSaturdayAndSunday" Module="Core" Type="1">U2F0IGFuZCBTdW4=</PHRASE>
 			<PHRASE Label="la_opt_CronTuesdayAndThursday" Module="Core" Type="1">VHVlcywgVGh1cnM=</PHRASE>
 			<PHRASE Label="la_opt_CronTwiceADay" Module="Core" Type="1">VHdpY2UgYSBkYXk=</PHRASE>
 			<PHRASE Label="la_opt_CronTwiceAMonth" Module="Core" Type="1">MXN0IGFuZCAxNXRo</PHRASE>
 			<PHRASE Label="la_opt_CronTwiceAnHour" Module="Core" Type="1">VHdpY2UgYW4gaG91cg==</PHRASE>
 			<PHRASE Label="la_opt_CronWeekdays" Module="Core" Type="1">LS0gV2Vla2RheXMgLS0=</PHRASE>
 			<PHRASE Label="la_opt_CurrentDomain" Module="Core" Type="1">Q3VycmVudCBEb21haW4=</PHRASE>
 			<PHRASE Label="la_opt_CustomRecipients" Module="Core" Type="1">Q3VzdG9tICJUbyIgUmVjaXBpZW50KC1zKQ==</PHRASE>
 			<PHRASE Label="la_opt_CustomSender" Module="Core" Type="1">Q3VzdG9tIFNlbmRlcg==</PHRASE>
 			<PHRASE Label="la_opt_day" Module="Core" Type="1">ZGF5KHMp</PHRASE>
 			<PHRASE Label="la_opt_December" Module="Core" Type="1">RGVjZW1iZXI=</PHRASE>
 			<PHRASE Label="la_opt_Declined" Module="Core" Type="1">RGVjbGluZWQ=</PHRASE>
 			<PHRASE Label="la_opt_DefaultAddress" Module="Core" Type="1">RGVmYXVsdCBXZWJzaXRlIGFkZHJlc3M=</PHRASE>
 			<PHRASE Label="la_opt_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
 			<PHRASE Label="la_opt_Description" Module="Core" Type="1">RGVzY3JpcHRpb24=</PHRASE>
 			<PHRASE Label="la_opt_Disabled" Module="Core" Type="1">RGlzYWJsZWQ=</PHRASE>
 			<PHRASE Label="la_opt_DoesntMatch" Module="Core" Type="1">RG9lc24ndCBtYXRjaA==</PHRASE>
 			<PHRASE Label="la_opt_EditorsPick" Module="Core" Type="1">RWRpdG9yJ3MgUGljaw==</PHRASE>
 			<PHRASE Label="la_opt_Email" Module="Core" Type="1">RS1tYWls</PHRASE>
 			<PHRASE Label="la_opt_EmailBody" Module="Core" Type="1">RS1tYWlsIEJvZHk=</PHRASE>
 			<PHRASE Label="la_opt_EmailEvents" Module="Core" Type="1">RS1tYWlsIEV2ZW50cw==</PHRASE>
 			<PHRASE Label="la_opt_EmailLogKeepForever" Module="Core" Type="1">Rm9yZXZlciAobmV2ZXIgZGVsZXRlZCBhdXRvbWF0aWNhbGx5KQ==</PHRASE>
 			<PHRASE Label="la_opt_EmailLogKeepNever" Module="Core" Type="1">TmV2ZXIgKHR1cm5lZCBvZmYp</PHRASE>
 			<PHRASE Label="la_opt_EmailSubject" Module="Core" Type="1">RS1tYWlsIFN1YmplY3Q=</PHRASE>
 			<PHRASE Label="la_opt_Everyone" Module="Core" Type="1">RXZlcnlvbmU=</PHRASE>
 			<PHRASE Label="la_opt_Exact" Module="Core" Type="1">RXhhY3Q=</PHRASE>
 			<PHRASE Label="la_opt_Expired" Module="Core" Type="1">RXhwaXJlZA==</PHRASE>
 			<PHRASE Label="la_opt_External" Module="Core" Type="1">RXh0ZXJuYWw=</PHRASE>
 			<PHRASE Label="la_opt_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVXJs</PHRASE>
 			<PHRASE Label="la_opt_Failed" Module="Core" Type="1">RmFpbGVk</PHRASE>
 			<PHRASE Label="la_opt_February" Module="Core" Type="1">RmVicnVhcnk=</PHRASE>
 			<PHRASE Label="la_opt_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_opt_Friday" Module="Core" Type="1">RnJpZGF5</PHRASE>
 			<PHRASE Label="la_opt_Group" Module="Core" Type="1">R3JvdXA=</PHRASE>
 			<PHRASE Label="la_opt_GuestsOnly" Module="Core" Type="1">R3Vlc3RzIE9ubHk=</PHRASE>
 			<PHRASE Label="la_opt_hour" Module="Core" Type="1">aG91cihzKQ==</PHRASE>
 			<PHRASE Label="la_opt_InheritFromParent" Module="Core" Type="1">SW5oZXJpdCBmcm9tIFBhcmVudA==</PHRASE>
 			<PHRASE Label="la_opt_Internal" Module="Core" Type="1">SW50ZXJuYWw=</PHRASE>
 			<PHRASE Label="la_opt_Invalid" Module="Core" Type="1">SW52YWxpZA==</PHRASE>
 			<PHRASE Label="la_opt_IP_Address" Module="Core" Type="1">SVAgQWRkcmVzcw==</PHRASE>
 			<PHRASE Label="la_opt_IsUnique" Module="Core" Type="1">SXMgdW5pcXVl</PHRASE>
 			<PHRASE Label="la_opt_January" Module="Core" Type="1">SmFudWFyeQ==</PHRASE>
 			<PHRASE Label="la_opt_July" Module="Core" Type="1">SnVseQ==</PHRASE>
 			<PHRASE Label="la_opt_June" Module="Core" Type="1">SnVuZQ==</PHRASE>
 			<PHRASE Label="la_opt_LastName" Module="Core" Type="1">TGFzdCBOYW1l</PHRASE>
 			<PHRASE Label="la_opt_LoggedOut" Module="Core" Type="1">TG9nZ2VkIE91dA==</PHRASE>
 			<PHRASE Label="la_opt_Manual" Module="Core" Type="1">TWFudWFs</PHRASE>
 			<PHRASE Label="la_opt_March" Module="Core" Type="1">TWFyY2g=</PHRASE>
 			<PHRASE Label="la_opt_May" Module="Core" Type="1">TWF5</PHRASE>
 			<PHRASE Label="la_opt_min" Module="Core" Type="1">bWludXRlKHMp</PHRASE>
 			<PHRASE Label="la_opt_ModalWindow" Module="Core" Type="1">TW9kYWwgV2luZG93</PHRASE>
 			<PHRASE Label="la_opt_Monday" Module="Core" Type="1">TW9uZGF5</PHRASE>
 			<PHRASE Label="la_opt_month" Module="Core" Type="1">bW9udGgocyk=</PHRASE>
 			<PHRASE Label="la_opt_NewEmail" Module="Core" Type="1">TmV3IEUtbWFpbA==</PHRASE>
 			<PHRASE Label="la_opt_NotEmpty" Module="Core" Type="1">Tm90IGVtcHR5</PHRASE>
 			<PHRASE Label="la_opt_NotLike" Module="Core" Type="1">Tm90IGxpa2U=</PHRASE>
 			<PHRASE Label="la_opt_NotProcessed" Module="Core" Type="1">Tm90IFByb2Nlc3NlZA==</PHRASE>
 			<PHRASE Label="la_opt_NotReplied" Module="Core" Type="1">Tm90IFJlcGxpZWQ=</PHRASE>
 			<PHRASE Label="la_opt_November" Module="Core" Type="1">Tm92ZW1iZXI=</PHRASE>
 			<PHRASE Label="la_opt_October" Module="Core" Type="1">T2N0b2Jlcg==</PHRASE>
 			<PHRASE Label="la_opt_OneDay" Module="Core" Type="1">MSBkYXk=</PHRASE>
 			<PHRASE Label="la_opt_OneMonth" Module="Core" Type="1">MSBtb250aA==</PHRASE>
 			<PHRASE Label="la_opt_OneWeek" Module="Core" Type="1">MSB3ZWVr</PHRASE>
 			<PHRASE Label="la_opt_OneYear" Module="Core" Type="1">MSB5ZWFy</PHRASE>
 			<PHRASE Label="la_opt_PartiallyProcessed" Module="Core" Type="1">UGFydGlhbGx5IFByb2Nlc3NlZA==</PHRASE>
 			<PHRASE Label="la_opt_Pending" Module="Core" Type="1">UGVuZGluZw==</PHRASE>
 			<PHRASE Label="la_opt_Phone" Module="Core" Type="1">UGhvbmU=</PHRASE>
 			<PHRASE Label="la_opt_Phrases" Module="Core" Type="1">TGFiZWxz</PHRASE>
 			<PHRASE Label="la_opt_PopupWindow" Module="Core" Type="1">UG9wdXAgV2luZG93</PHRASE>
 			<PHRASE Label="la_opt_Processed" Module="Core" Type="1">UHJvY2Vzc2Vk</PHRASE>
 			<PHRASE Label="la_opt_Published" Module="Core" Type="1">UHVibGlzaGVk</PHRASE>
 			<PHRASE Label="la_opt_QueryString" Module="Core" Type="1">UXVlcnkgU3RyaW5nIChTSUQp</PHRASE>
 			<PHRASE Label="la_opt_Rating" Module="Core" Type="1">UmF0aW5n</PHRASE>
 			<PHRASE Label="la_opt_RecipientEmail" Module="Core" Type="1">UmVjaXBpZW50IEUtbWFpbA==</PHRASE>
 			<PHRASE Label="la_opt_RecipientName" Module="Core" Type="1">UmVjaXBpZW50IE5hbWU=</PHRASE>
 			<PHRASE Label="la_opt_Replied" Module="Core" Type="1">UmVwbGllZA==</PHRASE>
 			<PHRASE Label="la_opt_Running" Module="Core" Type="1">UnVubmluZw==</PHRASE>
 			<PHRASE Label="la_opt_SameWindow" Module="Core" Type="1">U2FtZSBXaW5kb3c=</PHRASE>
 			<PHRASE Label="la_opt_Saturday" Module="Core" Type="1">U2F0dXJkYXk=</PHRASE>
 			<PHRASE Label="la_opt_sec" Module="Core" Type="1">c2Vjb25kKHMp</PHRASE>
 			<PHRASE Label="la_opt_Semicolon" Module="Core" Type="1">U2VtaS1jb2xvbg==</PHRASE>
 			<PHRASE Label="la_opt_September" Module="Core" Type="1">U2VwdGVtYmVy</PHRASE>
 			<PHRASE Label="la_opt_Silent" Module="Core" Type="1">U2lsZW50</PHRASE>
 			<PHRASE Label="la_opt_Space" Module="Core" Type="1">U3BhY2U=</PHRASE>
 			<PHRASE Label="la_opt_State" Module="Core" Type="1">U3RhdGU=</PHRASE>
 			<PHRASE Label="la_opt_Sub-match" Module="Core" Type="1">U3ViLW1hdGNo</PHRASE>
 			<PHRASE Label="la_opt_Success" Module="Core" Type="1">U3VjY2Vzcw==</PHRASE>
 			<PHRASE Label="la_opt_Sunday" Module="Core" Type="1">U3VuZGF5</PHRASE>
 			<PHRASE Label="la_opt_SynchronizeFromOthers" Module="Core" Type="1">RnJvbSBvdGhlcnM=</PHRASE>
 			<PHRASE Label="la_opt_SynchronizeToOthers" Module="Core" Type="1">VG8gb3RoZXJz</PHRASE>
 			<PHRASE Label="la_opt_System" Module="Core" Type="1">U3lzdGVt</PHRASE>
 			<PHRASE Label="la_opt_Tab" Module="Core" Type="1">VGFi</PHRASE>
 			<PHRASE Label="la_opt_Template" Module="Core" Type="1">VGVtcGxhdGU=</PHRASE>
 			<PHRASE Label="la_opt_ThreeMonths" Module="Core" Type="1">MyBtb250aHM=</PHRASE>
 			<PHRASE Label="la_opt_Thursday" Module="Core" Type="1">VGh1cnNkYXk=</PHRASE>
 			<PHRASE Label="la_opt_Title" Module="Core" Type="1">VGl0bGU=</PHRASE>
 			<PHRASE Label="la_opt_Tuesday" Module="Core" Type="1">VHVlc2RheQ==</PHRASE>
 			<PHRASE Label="la_opt_TwoWeeks" Module="Core" Type="1">MiB3ZWVrcw==</PHRASE>
 			<PHRASE Label="la_opt_User" Module="Core" Type="1">VXNlcg==</PHRASE>
 			<PHRASE Label="la_opt_UserEmailActivation" Module="Core" Type="1">RW1haWwgQWN0aXZhdGlvbg==</PHRASE>
 			<PHRASE Label="la_opt_UserInstantRegistration" Module="Core" Type="1">SW1tZWRpYXRlIA==</PHRASE>
 			<PHRASE Label="la_opt_Username" Module="Core" Type="1">VXNlcm5hbWU=</PHRASE>
 			<PHRASE Label="la_opt_UserNotAllowedRegistration" Module="Core" Type="1">Tm90IEFsbG93ZWQ=</PHRASE>
 			<PHRASE Label="la_opt_UserUponApprovalRegistration" Module="Core" Type="1">VXBvbiBBcHByb3ZhbA==</PHRASE>
 			<PHRASE Label="la_opt_Virtual" Module="Core" Type="1">VmlydHVhbA==</PHRASE>
 			<PHRASE Label="la_opt_Wednesday" Module="Core" Type="1">V2VkbmVzZGF5</PHRASE>
 			<PHRASE Label="la_opt_week" Module="Core" Type="1">d2VlayhzKQ==</PHRASE>
 			<PHRASE Label="la_opt_year" Module="Core" Type="1">eWVhcihzKQ==</PHRASE>
 			<PHRASE Label="la_opt_Zip" Module="Core" Type="1">Wmlw</PHRASE>
 			<PHRASE Label="la_OtherFields" Module="Core" Type="1">T3RoZXIgRmllbGRz</PHRASE>
 			<PHRASE Label="la_OutOf" Module="Core" Type="1">b3V0IG9m</PHRASE>
 			<PHRASE Label="la_p1" Module="Core" Type="1">KEdNVCArMDE6MDAp</PHRASE>
 			<PHRASE Label="la_p10" Module="Core" Type="1">KEdNVCArMTA6MDAp</PHRASE>
 			<PHRASE Label="la_p11" Module="Core" Type="1">KEdNVCArMTE6MDAp</PHRASE>
 			<PHRASE Label="la_p12" Module="Core" Type="1">KEdNVCArMTI6MDAp</PHRASE>
 			<PHRASE Label="la_p13" Module="Core" Type="1">KEdNVCArMTM6MDAp</PHRASE>
 			<PHRASE Label="la_p2" Module="Core" Type="1">KEdNVCArMDI6MDAp</PHRASE>
 			<PHRASE Label="la_p3" Module="Core" Type="1">KEdNVCArMDM6MDAp</PHRASE>
 			<PHRASE Label="la_p4" Module="Core" Type="1">KEdNVCArMDQ6MDAp</PHRASE>
 			<PHRASE Label="la_p5" Module="Core" Type="1">KEdNVCArMDU6MDAp</PHRASE>
 			<PHRASE Label="la_p6" Module="Core" Type="1">KEdNVCArMDY6MDAp</PHRASE>
 			<PHRASE Label="la_p7" Module="Core" Type="1">KEdNVCArMDc6MDAp</PHRASE>
 			<PHRASE Label="la_p8" Module="Core" Type="1">KEdNVCArMDg6MDAp</PHRASE>
 			<PHRASE Label="la_p9" Module="Core" Type="1">KEdNVCArMDk6MDAp</PHRASE>
 			<PHRASE Label="la_Paddings" Module="Core" Type="1">UGFkZGluZ3M=</PHRASE>
 			<PHRASE Label="la_Page" Module="Core" Type="1">UGFnZQ==</PHRASE>
 			<PHRASE Label="la_PageCurrentlyEditing1" Module="Core" Type="1">QXR0ZW50aW9uOiAlcyBpcyBjdXJyZW50bHkgZWRpdGluZyB0aGlzIHNlY3Rpb24h</PHRASE>
 			<PHRASE Label="la_PageCurrentlyEditing2" Module="Core" Type="1">QXR0ZW50aW9uOiAlcyBhcmUgY3VycmVudGx5IGVkaXRpbmcgdGhpcyBzZWN0aW9uISA=</PHRASE>
 			<PHRASE Label="la_PageCurrentlyEditing5" Module="Core" Type="1">QXR0ZW50aW9uOiAlcyBhcmUgY3VycmVudGx5IGVkaXRpbmcgdGhpcyBzZWN0aW9uIQ==</PHRASE>
 			<PHRASE Label="la_passwords_do_not_match" Module="Core" Type="1">UGFzc3dvcmRzIGRvIG5vdCBtYXRjaA==</PHRASE>
 			<PHRASE Label="la_passwords_too_short" Module="Core" Type="1">UGFzc3dvcmQgaXMgdG9vIHNob3J0LCBwbGVhc2UgZW50ZXIgYXQgbGVhc3QgJXMgY2hhcmFjdGVycw==</PHRASE>
 			<PHRASE Label="la_Pending" Module="Core" Type="1">UGVuZGluZw==</PHRASE>
 			<PHRASE Label="la_performing_backup" Module="Core" Type="1">UGVyZm9ybWluZyBCYWNrdXA=</PHRASE>
 			<PHRASE Label="la_performing_import" Module="Core" Type="1">UGVyZm9ybWluZyBJbXBvcnQ=</PHRASE>
 			<PHRASE Label="la_performing_restore" Module="Core" Type="1">UGVyZm9ybWluZyBSZXN0b3Jl</PHRASE>
 			<PHRASE Label="la_permission_in-portal:configure_lang.advanced:export" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdlIHBhY2s=</PHRASE>
 			<PHRASE Label="la_permission_in-portal:configure_lang.advanced:import" Module="Core" Type="1">SW1wb3J0IExhbmd1YWdlIHBhY2s=</PHRASE>
 			<PHRASE Label="la_permission_in-portal:configure_lang.advanced:set_primary" Module="Core" Type="1">U2V0IFByaW1hcnkgTGFuZ3VhZ2U=</PHRASE>
 			<PHRASE Label="la_permission_in-portal:mod_status.advanced:approve" Module="Core" Type="1">RW5hYmxlIE1vZHVsZXM=</PHRASE>
 			<PHRASE Label="la_permission_in-portal:mod_status.advanced:decline" Module="Core" Type="1">RGlzYWJsZSBNb2R1bGVz</PHRASE>
 			<PHRASE Label="la_permission_in-portal:user_groups.advanced:manage_permissions" Module="Core" Type="1">TWFuYWdlIFBlcm1pc3Npb25z</PHRASE>
 			<PHRASE Label="la_permission_in-portal:user_groups.advanced:send_email" Module="Core" Type="1">U2VuZCBFLW1haWwgdG8gR3JvdXBzIGluIEFkbWlu</PHRASE>
 			<PHRASE Label="la_permission_in-portal:user_list.advanced:ban" Module="Core" Type="1">QmFuIFVzZXJz</PHRASE>
 			<PHRASE Label="la_permission_in-portal:user_list.advanced:send_email" Module="Core" Type="1">U2VuZCBFLW1haWwgdG8gVXNlcnMgaW4gQWRtaW4=</PHRASE>
 			<PHRASE Label="la_PermName_Admin_desc" Module="Core" Type="1">QWRtaW4gTG9naW4=</PHRASE>
 			<PHRASE Label="la_PermName_Category.AddPending_desc" Module="Core" Type="1">QWRkIFBlbmRpbmcgQ2F0ZWdvcnk=</PHRASE>
 			<PHRASE Label="la_PermName_Category.Add_desc" Module="Core" Type="1">QWRkIENhdGVnb3J5</PHRASE>
 			<PHRASE Label="la_PermName_Category.Delete_desc" Module="Core" Type="1">RGVsZXRlIENhdGVnb3J5</PHRASE>
 			<PHRASE Label="la_PermName_Category.Modify_desc" Module="Core" Type="1">TW9kaWZ5IENhdGVnb3J5</PHRASE>
 			<PHRASE Label="la_PermName_Category.View_desc" Module="Core" Type="1">VmlldyBDYXRlZ29yeQ==</PHRASE>
 			<PHRASE Label="la_PermName_Debug.Info_desc" Module="Core" Type="1">QXBwZW5kIHBocGluZm8gdG8gYWxsIHBhZ2VzIChEZWJ1Zyk=</PHRASE>
 			<PHRASE Label="la_PermName_Debug.Item_desc" Module="Core" Type="1">RGlzcGxheSBJdGVtIFF1ZXJpZXMgKERlYnVnKQ==</PHRASE>
 			<PHRASE Label="la_PermName_Debug.List_desc" Module="Core" Type="1">RGlzcGxheSBJdGVtIExpc3QgUXVlcmllcyAoRGVidWcp</PHRASE>
 			<PHRASE Label="la_PermName_favorites_desc" Module="Core" Type="1">QWxsb3cgZmF2b3JpdGVz</PHRASE>
 			<PHRASE Label="la_PermName_Login_desc" Module="Core" Type="1">QWxsb3cgTG9naW4=</PHRASE>
 			<PHRASE Label="la_PermName_Profile.Modify_desc" Module="Core" Type="1">Q2hhbmdlIFVzZXIgUHJvZmlsZXM=</PHRASE>
 			<PHRASE Label="la_PermName_ShowLang_desc" Module="Core" Type="1">U2hvdyBMYW5ndWFnZSBUYWdz</PHRASE>
 			<PHRASE Label="la_PermName_SystemAccess.ReadOnly_desc" Module="Core" Type="1">UmVhZC1Pbmx5IEFjY2VzcyBUbyBEYXRhYmFzZQ==</PHRASE>
 			<PHRASE Label="la_PhraseNotTranslated" Module="Core" Type="1">Tm90IFRyYW5zbGF0ZWQ=</PHRASE>
 			<PHRASE Label="la_PhraseTranslated" Module="Core" Type="1">VHJhbnNsYXRlZA==</PHRASE>
 			<PHRASE Label="la_PhraseType_Admin" Module="Core" Type="1">QWRtaW4=</PHRASE>
 			<PHRASE Label="la_PhraseType_Both" Module="Core" Type="1">Qm90aA==</PHRASE>
 			<PHRASE Label="la_PhraseType_Front" Module="Core" Type="1">RnJvbnQ=</PHRASE>
 			<PHRASE Label="la_Pick" Module="Core" Type="1">UGljaw==</PHRASE>
 			<PHRASE Label="la_PickedColumns" Module="Core" Type="1">U2VsZWN0ZWQgQ29sdW1ucw==</PHRASE>
 			<PHRASE Label="la_Pop" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
 			<PHRASE Label="la_PositionAndVisibility" Module="Core" Type="1">UG9zaXRpb24gQW5kIFZpc2liaWxpdHk=</PHRASE>
 			<PHRASE Label="la_prevcategory" Module="Core" Type="1">UHJldmlvdXMgc2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_PrimaryCategory" Module="Core" Type="1">UHJpbWFyeQ==</PHRASE>
 			<PHRASE Label="la_prompt_ActiveCategories" Module="Core" Type="1">QWN0aXZlIFNlY3Rpb25z</PHRASE>
 			<PHRASE Label="la_prompt_ActiveUsers" Module="Core" Type="1">QWN0aXZlIFVzZXJz</PHRASE>
 			<PHRASE Label="la_prompt_AddressTo" Module="Core" Type="1">U2VudCBUbw==</PHRASE>
 			<PHRASE Label="la_prompt_AdminMailFrom" Module="Core" Type="1">TWVzc2FnZXMgZnJvbSBTaXRlIEFkbWluIGFyZSBmcm9t</PHRASE>
 			<PHRASE Label="la_prompt_AdvancedSearch" Module="Core" Type="1">QWR2YW5jZWQgU2VhcmNo</PHRASE>
 			<PHRASE Label="la_prompt_AdvancedUserManagement" Module="Core" Type="1">QWR2YW5jZWQgVXNlciBNYW5hZ2VtZW50</PHRASE>
 			<PHRASE Label="la_prompt_allow_reset" Module="Core" Type="1">QWxsb3cgcGFzc3dvcmQgcmVzZXQgYWZ0ZXI=</PHRASE>
 			<PHRASE Label="la_prompt_AutoGen_Excerpt" Module="Core" Type="1">R2VuZXJhdGUgZnJvbSB0aGUgYXJ0aWNsZSBib2R5</PHRASE>
 			<PHRASE Label="la_Prompt_Backup_Date" Module="Core" Type="1">RGF0ZSBvZiBCYWNrdXA6</PHRASE>
 			<PHRASE Label="la_prompt_Backup_Path" Module="Core" Type="1">QmFja3VwIFBhdGg=</PHRASE>
 			<PHRASE Label="la_Prompt_Backup_Status" Module="Core" Type="1">QmFja3VwIHN0YXR1cw==</PHRASE>
 			<PHRASE Label="la_prompt_BannedUsers" Module="Core" Type="1">QmFubmVkIFVzZXJz</PHRASE>
 			<PHRASE Label="la_prompt_birthday" Module="Core" Type="1">RGF0ZSBvZiBCaXJ0aA==</PHRASE>
 			<PHRASE Label="la_prompt_CategoryEditorsPick" Module="Core" Type="1">RWRpdG9yJ3MgUGljayBTZWN0aW9ucw==</PHRASE>
 			<PHRASE Label="la_prompt_CurrentSessions" Module="Core" Type="1">Q3VycmVudCBTZXNzaW9ucw==</PHRASE>
 			<PHRASE Label="la_prompt_DataSize" Module="Core" Type="1">VG90YWwgU2l6ZSBvZiB0aGUgRGF0YWJhc2U=</PHRASE>
 			<PHRASE Label="la_prompt_Default" Module="Core" Type="1">RGVmYXVsdA==</PHRASE>
 			<PHRASE Label="la_prompt_DefaultUserId" Module="Core" Type="1">VXNlciBJRCBmb3IgRGVmYXVsdCBQZXJzaXN0ZW50IFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_prompt_DefaultValue" Module="Core" Type="1">RGVmYXVsdCBWYWx1ZQ==</PHRASE>
 			<PHRASE Label="la_prompt_DisabledCategories" Module="Core" Type="1">RGlzYWJsZWQgU2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_prompt_DisplayInGrid" Module="Core" Type="1">RGlzcGxheSBpbiBHcmlk</PHRASE>
 			<PHRASE Label="la_prompt_DisplayOrder" Module="Core" Type="1">RGlzcGxheSBPcmRlcg==</PHRASE>
 			<PHRASE Label="la_prompt_DupRating" Module="Core" Type="1">QWxsb3cgRHVwbGljYXRlIFJhdGluZyBWb3Rlcw==</PHRASE>
 			<PHRASE Label="la_prompt_DupReviews" Module="Core" Type="1">QWxsb3cgRHVwbGljYXRlIFJldmlld3M=</PHRASE>
 			<PHRASE Label="la_prompt_EditorsPick" Module="Core" Type="1">RWRpdG9yJ3MgUGljaw==</PHRASE>
 			<PHRASE Label="la_prompt_ElementType" Module="Core" Type="1">VHlwZQ==</PHRASE>
 			<PHRASE Label="la_prompt_EmailCompleteMessage" Module="Core" Type="1">VGhlIEVtYWlsIE1lc3NhZ2UgaGFzIGJlZW4gc2VudA==</PHRASE>
 			<PHRASE Label="la_prompt_ExportCompleteMessage" Module="Core" Type="1">RXhwb3J0IENvbXBsZXRlIQ==</PHRASE>
 			<PHRASE Label="la_prompt_FieldId" Module="Core" Type="1">RmllbGQgSWQ=</PHRASE>
 			<PHRASE Label="la_prompt_FieldLabel" Module="Core" Type="1">RmllbGQgTGFiZWw=</PHRASE>
 			<PHRASE Label="la_prompt_FieldName" Module="Core" Type="1">RmllbGQgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_prompt_FieldPrompt" Module="Core" Type="1">RmllbGQgUHJvbXB0</PHRASE>
 			<PHRASE Label="la_prompt_Frequency" Module="Core" Type="1">RnJlcXVlbmN5</PHRASE>
 			<PHRASE Label="la_prompt_heading" Module="Core" Type="1">SGVhZGluZw==</PHRASE>
 			<PHRASE Label="la_prompt_HitLimits" Module="Core" Type="1">KE1pbmltdW0gNCk=</PHRASE>
 			<PHRASE Label="la_prompt_Import_Source" Module="Core" Type="1">SW1wb3J0IFNvdXJjZQ==</PHRASE>
 			<PHRASE Label="la_prompt_InputType" Module="Core" Type="1">SW5wdXQgVHlwZQ==</PHRASE>
 			<PHRASE Label="la_prompt_KeepSessionOnBrowserClose" Module="Core" Type="1">S2VlcCBTZXNzaW9uIFdoZW4gQnJvc3dlciBJcyBDbG9zZWQ=</PHRASE>
 			<PHRASE Label="la_prompt_lang_cache_timeout" Module="Core" Type="1">TGFuZ3VhZ2UgQ2FjaGUgVGltZW91dA==</PHRASE>
 			<PHRASE Label="la_prompt_LastCategoryUpdate" Module="Core" Type="1">TGFzdCBTZWN0aW9uIFVwZGF0ZQ==</PHRASE>
 			<PHRASE Label="la_prompt_LastLinkUpdate" Module="Core" Type="1">TGFzdCBVcGRhdGVkIExpbms=</PHRASE>
 			<PHRASE Label="la_prompt_mailauthenticate" Module="Core" Type="1">U2VydmVyIFJlcXVpcmVzIEF1dGhlbnRpY2F0aW9u</PHRASE>
 			<PHRASE Label="la_prompt_mailport" Module="Core" Type="1">UG9ydCAoZS5nLiBwb3J0IDI1KQ==</PHRASE>
 			<PHRASE Label="la_prompt_mailserver" Module="Core" Type="1">TWFpbCBTZXJ2ZXIgQWRkcmVzcw==</PHRASE>
 			<PHRASE Label="la_prompt_max_import_category_levels" Module="Core" Type="1">TWF4aW1hbCBpbXBvcnRlZCBzZWN0aW9uIGxldmVs</PHRASE>
 			<PHRASE Label="la_prompt_MembershipExpires" Module="Core" Type="1">TWVtYmVyc2hpcCBFeHBpcmVz</PHRASE>
 			<PHRASE Label="la_prompt_MenuFrameWidth" Module="Core" Type="1">TGVmdCBNZW51IChUcmVlKSBXaWR0aA==</PHRASE>
 			<PHRASE Label="la_prompt_movedown" Module="Core" Type="1">TW92ZSBkb3du</PHRASE>
 			<PHRASE Label="la_prompt_moveup" Module="Core" Type="1">TW92ZSB1cA==</PHRASE>
 			<PHRASE Label="la_prompt_multipleshow" Module="Core" Type="1">U2hvdyBtdWx0aXBsZQ==</PHRASE>
 			<PHRASE Label="la_prompt_NewCategories" Module="Core" Type="1">TmV3IFNlY3Rpb25z</PHRASE>
 			<PHRASE Label="la_prompt_NewestCategoryDate" Module="Core" Type="1">TmV3ZXN0IFNlY3Rpb24gRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_prompt_NewestLinkDate" Module="Core" Type="1">TmV3ZXN0IExpbmsgRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_prompt_NewestUserDate" Module="Core" Type="1">TmV3ZXN0IFVzZXIgRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_prompt_NonExpiredSessions" Module="Core" Type="1">Q3VycmVudGx5IEFjdGl2ZSBVc2VyIFNlc3Npb25z</PHRASE>
 			<PHRASE Label="la_prompt_overwritephrases" Module="Core" Type="1">T3ZlcndyaXRlIEV4aXN0aW5nIFBocmFzZXM=</PHRASE>
 			<PHRASE Label="la_prompt_PendingCategories" Module="Core" Type="1">UGVuZGluZyBTZWN0aW9ucw==</PHRASE>
 			<PHRASE Label="la_prompt_PendingItems" Module="Core" Type="1">UGVuZGluZyBJdGVtcw==</PHRASE>
 			<PHRASE Label="la_prompt_perform_now" Module="Core" Type="1">UGVyZm9ybSB0aGlzIG9wZXJhdGlvbiBub3c/</PHRASE>
 			<PHRASE Label="la_prompt_PerPage" Module="Core" Type="1">UGVyIFBhZ2U=</PHRASE>
 			<PHRASE Label="la_prompt_PersonalInfo" Module="Core" Type="1">UGVyc29uYWwgSW5mb3JtYXRpb24=</PHRASE>
 			<PHRASE Label="la_prompt_PrimaryGroup" Module="Core" Type="1">UHJpbWFyeSBHcm91cA==</PHRASE>
 			<PHRASE Label="la_prompt_Priority" Module="Core" Type="1">UHJpb3JpdHk=</PHRASE>
 			<PHRASE Label="la_prompt_Rating" Module="Core" Type="1">UmF0aW5n</PHRASE>
 			<PHRASE Label="la_prompt_RatingLimits" Module="Core" Type="1">KE1pbmltdW0gMCwgTWF4aW11bSA1KQ==</PHRASE>
 			<PHRASE Label="la_prompt_RecordsCount" Module="Core" Type="1">TnVtYmVyIG9mIERhdGFiYXNlIFJlY29yZHM=</PHRASE>
 			<PHRASE Label="la_prompt_RegionsCount" Module="Core" Type="1">TnVtYmVyIG9mIFJlZ2lvbiBQYWNrcw==</PHRASE>
 			<PHRASE Label="la_prompt_relevence_percent" Module="Core" Type="1">U2VhcmNoIFJlbGV2YW5jZSBkZXBlbmRzIG9u</PHRASE>
 			<PHRASE Label="la_prompt_relevence_settings" Module="Core" Type="1">U2VhcmNoIFJlbGV2ZW5jZSBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_prompt_Required" Module="Core" Type="1">UmVxdWlyZWQ=</PHRASE>
 			<PHRASE Label="la_prompt_required_field_increase" Module="Core" Type="1">SW5jcmVhc2UgaW1wb3J0YW5jZSBpZiBmaWVsZCBjb250YWlucyBhIHJlcXVpcmVkIGtleXdvcmQgYnk=</PHRASE>
 			<PHRASE Label="la_Prompt_Restore_Failed" Module="Core" Type="1">UmVzdG9yZSBoYXMgZmFpbGVkIGFuIGVycm9yIG9jY3VyZWQ6</PHRASE>
 			<PHRASE Label="la_Prompt_Restore_Filechoose" Module="Core" Type="1">Q2hvb3NlIG9uZSBvZiB0aGUgZm9sbG93aW5nIGJhY2t1cCBkYXRlcyB0byByZXN0b3JlIG9yIGRlbGV0ZQ==</PHRASE>
 			<PHRASE Label="la_Prompt_Restore_Status" Module="Core" Type="1">UmVzdG9yZSBTdGF0dXM=</PHRASE>
 			<PHRASE Label="la_Prompt_Restore_Success" Module="Core" Type="1">UmVzdG9yZSBoYXMgYmVlbiBjb21wbGV0ZWQgc3VjY2Vzc2Z1bGx5</PHRASE>
 			<PHRASE Label="la_prompt_RootCategory" Module="Core" Type="1">U2VsZWN0IE1vZHVsZSBSb290IFNlY3Rpb246</PHRASE>
 			<PHRASE Label="la_prompt_root_pass" Module="Core" Type="1">Um9vdCBQYXNzd29yZA==</PHRASE>
 			<PHRASE Label="la_prompt_SearchType" Module="Core" Type="1">U2VhcmNoIFR5cGU=</PHRASE>
 			<PHRASE Label="la_prompt_Select_Source" Module="Core" Type="1">U2VsZWN0IFNvdXJjZSBMYW5ndWFnZQ==</PHRASE>
 			<PHRASE Label="la_prompt_SentOn" Module="Core" Type="1">U2VudCBPbg==</PHRASE>
 			<PHRASE Label="la_prompt_session_cookie_name" Module="Core" Type="1">U2Vzc2lvbiBDb29raWUgTmFtZQ==</PHRASE>
 			<PHRASE Label="la_prompt_session_management" Module="Core" Type="1">U2Vzc2lvbiBNYW5hZ2VtZW50IE1ldGhvZA==</PHRASE>
 			<PHRASE Label="la_prompt_session_timeout" Module="Core" Type="1">U2Vzc2lvbiBJbmFjdGl2aXR5IFRpbWVvdXQgKHNlY29uZHMp</PHRASE>
 			<PHRASE Label="la_prompt_showgeneraltab" Module="Core" Type="1">U2hvdyBvbiB0aGUgZ2VuZXJhbCB0YWI=</PHRASE>
 			<PHRASE Label="la_prompt_SimpleSearch" Module="Core" Type="1">U2ltcGxlIFNlYXJjaA==</PHRASE>
 			<PHRASE Label="la_prompt_smtpheaders" Module="Core" Type="1">QWRkaXRpb25hbCBNZXNzYWdlIEhlYWRlcnM=</PHRASE>
 			<PHRASE Label="la_prompt_smtp_pass" Module="Core" Type="1">TWFpbCBTZXJ2ZXIgUGFzc3dvcmQ=</PHRASE>
 			<PHRASE Label="la_prompt_smtp_user" Module="Core" Type="1">TWFpbCBTZXJ2ZXIgVXNlcm5hbWU=</PHRASE>
 			<PHRASE Label="la_prompt_socket_blocking_mode" Module="Core" Type="1">VXNlIG5vbi1ibG9ja2luZyBzb2NrZXQgbW9kZQ==</PHRASE>
 			<PHRASE Label="la_prompt_sqlquery" Module="Core" Type="1">U1FMIFF1ZXJ5Og==</PHRASE>
 			<PHRASE Label="la_prompt_sqlquery_header" Module="Core" Type="1">UGVyZm9ybSBTUUwgUXVlcnk=</PHRASE>
 			<PHRASE Label="la_Prompt_Step_One" Module="Core" Type="1">U3RlcCBPbmU=</PHRASE>
 			<PHRASE Label="la_prompt_SumbissionTime" Module="Core" Type="1">U3VibWl0dGVkIE9u</PHRASE>
 			<PHRASE Label="la_prompt_syscache_enable" Module="Core" Type="1">RW5hYmxlIFRhZyBDYWNoaW5n</PHRASE>
 			<PHRASE Label="la_prompt_SystemFileSize" Module="Core" Type="1">VG90YWwgU2l6ZSBvZiBTeXN0ZW0gRmlsZXM=</PHRASE>
 			<PHRASE Label="la_prompt_TablesCount" Module="Core" Type="1">TnVtYmVyIG9mIERhdGFiYXNlIFRhYmxlcw==</PHRASE>
 			<PHRASE Label="la_prompt_ThemeCount" Module="Core" Type="1">TnVtYmVyIG9mIFRoZW1lcw==</PHRASE>
 			<PHRASE Label="la_prompt_TotalCategories" Module="Core" Type="1">VG90YWwgU2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_prompt_TotalUserGroups" Module="Core" Type="1">VG90YWwgVXNlciBHcm91cHM=</PHRASE>
 			<PHRASE Label="la_prompt_UsersActive" Module="Core" Type="1">QWN0aXZlIFVzZXJz</PHRASE>
 			<PHRASE Label="la_prompt_UsersDisabled" Module="Core" Type="1">RGlzYWJsZWQgVXNlcnM=</PHRASE>
 			<PHRASE Label="la_prompt_UsersPending" Module="Core" Type="1">UGVuZGluZyBVc2Vycw==</PHRASE>
 			<PHRASE Label="la_prompt_UsersUniqueCountries" Module="Core" Type="1">TnVtYmVyIG9mIFVuaXF1ZSBDb3VudHJpZXMgb2YgVXNlcnM=</PHRASE>
 			<PHRASE Label="la_prompt_UsersUniqueStates" Module="Core" Type="1">TnVtYmVyIG9mIFVuaXF1ZSBTdGF0ZXMgb2YgVXNlcnM=</PHRASE>
 			<PHRASE Label="la_prompt_validation" Module="Core" Type="1">VmFsaWRhdGlvbg==</PHRASE>
 			<PHRASE Label="la_prompt_valuelist" Module="Core" Type="1">TGlzdCBvZiBWYWx1ZXM=</PHRASE>
 			<PHRASE Label="la_prompt_VoteLimits" Module="Core" Type="1">KE1pbmltdW0gMSk=</PHRASE>
 			<PHRASE Label="la_Prompt_Warning" Module="Core" Type="1">V2FybmluZyE=</PHRASE>
 			<PHRASE Label="la_prompt_weight" Module="Core" Type="1">V2VpZ2h0</PHRASE>
 			<PHRASE Label="la_Quotes" Module="Core" Type="1">U2luZ2xlLVF1b3RlcyAoaWUuICcp</PHRASE>
 			<PHRASE Label="la_Reciprocal" Module="Core" Type="1">UmVjaXByb2NhbA==</PHRASE>
 			<PHRASE Label="la_Records" Module="Core" Type="1">UmVjb3Jkcw==</PHRASE>
 			<PHRASE Label="la_record_being_edited_by" Module="Core" Type="1">VGhpcyByZWNvcmQgaXMgYmVpbmcgZWRpdGVkIGJ5IHRoZSBmb2xsb3dpbmcgdXNlcnM6DQolcw==</PHRASE>
 			<PHRASE Label="la_registration_captcha" Module="Core" Type="1">VXNlIENhcHRjaGEgY29kZSBvbiBSZWdpc3RyYXRpb24=</PHRASE>
 			<PHRASE Label="la_Regular" Module="Core" Type="1">UmVndWxhcg==</PHRASE>
 			<PHRASE Label="la_RemoveFrom" Module="Core" Type="1">UmVtb3ZlIEZyb20=</PHRASE>
 			<PHRASE Label="la_RequiredWarning" Module="Core" Type="1">Tm90IGFsbCByZXF1aXJlZCBmaWVsZHMgYXJlIGZpbGxlZC4gUGxlYXNlIGZpbGwgdGhlbSBmaXJzdC4=</PHRASE>
 			<PHRASE Label="la_review_perpage_prompt" Module="Core" Type="1">Q29tbWVudHMgcGVyIFBhZ2U=</PHRASE>
 			<PHRASE Label="la_review_perpage_short_prompt" Module="Core" Type="1">Q29tbWVudHMgcGVyIFBhZ2UgKHNob3J0LWxpc3Qp</PHRASE>
 			<PHRASE Label="la_RevisionNumber" Module="Core" Type="1">UmV2aXNpb24gIyVz</PHRASE>
 			<PHRASE Label="la_rootcategory_name" Module="Core" Type="1">SG9tZQ==</PHRASE>
 			<PHRASE Label="la_SampleText" Module="Core" Type="1">U2FtcGxlIFRleHQ=</PHRASE>
 			<PHRASE Label="la_SavedAt" Module="Core" Type="1">c2F2ZWQgYXQgJXM=</PHRASE>
 			<PHRASE Label="la_SaveLogin" Module="Core" Type="1">U2F2ZSBVc2VybmFtZSBvbiBUaGlzIENvbXB1dGVy</PHRASE>
 			<PHRASE Label="la_Search" Module="Core" Type="1">U2VhcmNo</PHRASE>
 			<PHRASE Label="la_section_BasicPermissions" Module="Core" Type="1">QmFzaWMgUGVybWlzc2lvbnM=</PHRASE>
 			<PHRASE Label="la_section_Category" Module="Core" Type="1">U2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_section_Configs" Module="Core" Type="1">Q29uZmlnIEZpbGVz</PHRASE>
 			<PHRASE Label="la_section_Counters" Module="Core" Type="1">Q291bnRlcnM=</PHRASE>
 			<PHRASE Label="la_section_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
 			<PHRASE Label="la_section_Data" Module="Core" Type="1">U3VibWlzc2lvbiBEYXRh</PHRASE>
 			<PHRASE Label="la_section_EmailDesignTemplates" Module="Core" Type="1">RS1tYWlsIERlc2lnbiBUZW1wbGF0ZXM=</PHRASE>
 			<PHRASE Label="la_section_FrontEnd" Module="Core" Type="1">RnJvbnQtZW5k</PHRASE>
 			<PHRASE Label="la_section_FullSizeImage" Module="Core" Type="1">RnVsbCBTaXplIEltYWdl</PHRASE>
 			<PHRASE Label="la_section_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
 			<PHRASE Label="la_section_Image" Module="Core" Type="1">SW1hZ2U=</PHRASE>
 			<PHRASE Label="la_section_ImageSettings" Module="Core" Type="1">SW1hZ2UgU2V0dGluZ3M=</PHRASE>
 			<PHRASE Label="la_section_ImportCompleted" Module="Core" Type="1">SW1wb3J0IENvbXBsZXRlZA==</PHRASE>
 			<PHRASE Label="la_section_Items" Module="Core" Type="1">VXNlciBJdGVtcw==</PHRASE>
 			<PHRASE Label="la_section_MemoryCache" Module="Core" Type="1">TWVtb3J5IENhY2hl</PHRASE>
 			<PHRASE Label="la_section_Message" Module="Core" Type="1">TWVzc2FnZQ==</PHRASE>
 			<PHRASE Label="la_section_overview" Module="Core" Type="1">U2VjdGlvbiBPdmVydmlldw==</PHRASE>
 			<PHRASE Label="la_section_Page" Module="Core" Type="1">U2VjdGlvbiBQcm9wZXJ0aWVz</PHRASE>
 			<PHRASE Label="la_section_PageCaching" Module="Core" Type="1">U2VjdGlvbiBDYWNoaW5n</PHRASE>
 			<PHRASE Label="la_section_ProjectDeployment" Module="Core" Type="1">UHJvamVjdCBEZXBsb3ltZW50</PHRASE>
 			<PHRASE Label="la_section_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
 			<PHRASE Label="la_section_QuickLinks" Module="Core" Type="1">UXVpY2sgTGlua3M=</PHRASE>
 			<PHRASE Label="la_section_RecipientsInfo" Module="Core" Type="1">UmVjaXBpZW50cyBJbmZvcm1hdGlvbg==</PHRASE>
 			<PHRASE Label="la_section_Relation" Module="Core" Type="1">UmVsYXRpb24=</PHRASE>
 			<PHRASE Label="la_section_ReplacementTags" Module="Core" Type="1">UmVwbGFjZW1lbnQgVGFncw==</PHRASE>
 			<PHRASE Label="la_section_SenderInfo" Module="Core" Type="1">U2VuZGVyIEluZm9ybWF0aW9u</PHRASE>
 			<PHRASE Label="la_section_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
 			<PHRASE Label="la_section_Settings3rdPartyAPI" Module="Core" Type="1">M3JkIFBhcnR5IEFQSSBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_section_SettingsAdmin" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_section_SettingsCSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydCBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_section_SettingsMailling" Module="Core" Type="1">TWFpbGluZyBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_section_SettingsMaintenance" Module="Core" Type="1">TWFpbnRlbmFuY2UgU2V0dGluZ3M=</PHRASE>
 			<PHRASE Label="la_section_SettingsSession" Module="Core" Type="1">U2Vzc2lvbiBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_section_SettingsSSL" Module="Core" Type="1">U1NMIFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_section_SettingsSystem" Module="Core" Type="1">U3lzdGVtIFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_section_SettingsWebsite" Module="Core" Type="1">V2Vic2l0ZSBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_section_SubmissionNotes" Module="Core" Type="1">U3VibWlzc2lvbiBOb3Rlcw==</PHRASE>
 			<PHRASE Label="la_section_Templates" Module="Core" Type="1">VGVtcGxhdGVz</PHRASE>
 			<PHRASE Label="la_section_ThumbnailImage" Module="Core" Type="1">VGh1bWJuYWlsIEltYWdl</PHRASE>
 			<PHRASE Label="la_section_Translation" Module="Core" Type="1">VHJhbnNsYXRpb24=</PHRASE>
 			<PHRASE Label="la_section_UsersSearch" Module="Core" Type="1">U2VhcmNoIFVzZXJz</PHRASE>
 			<PHRASE Label="la_section_Values" Module="Core" Type="1">VmFsdWVz</PHRASE>
 			<PHRASE Label="la_SelectColumns" Module="Core" Type="1">U2VsZWN0IENvbHVtbnM=</PHRASE>
 			<PHRASE Label="la_SelectedItems" Module="Core" Type="1">U2VsZWN0ZWQgSXRlbXM=</PHRASE>
 			<PHRASE Label="la_selecting_categories" Module="Core" Type="1">U2VsZWN0aW5nIFNlY3Rpb25z</PHRASE>
 			<PHRASE Label="la_SeparatedCategoryPath" Module="Core" Type="1">T25lIGZpZWxkIGZvciBlYWNoIHNlY3Rpb24gbGV2ZWw=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_Clone" Module="Core" Type="1">Q2xvbmU=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_CloneUser" Module="Core" Type="1">Q2xvbmU=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_Continue" Module="Core" Type="1">Q29udGludWU=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
 			<PHRASE Label="la_ShortToolTip_Export" Module="Core" Type="1">RXhwb3J0</PHRASE>
 			<PHRASE Label="la_ShortToolTip_GoUp" Module="Core" Type="1">R28gVXA=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_Import" Module="Core" Type="1">SW1wb3J0</PHRASE>
 			<PHRASE Label="la_ShortToolTip_MoveDown" Module="Core" Type="1">RG93bg==</PHRASE>
 			<PHRASE Label="la_ShortToolTip_MoveUp" Module="Core" Type="1">VXA=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_New" Module="Core" Type="1">TmV3</PHRASE>
 			<PHRASE Label="la_ShortToolTip_Rebuild" Module="Core" Type="1">UmVidWlsZA==</PHRASE>
 			<PHRASE Label="la_ShortToolTip_RescanThemes" Module="Core" Type="1">UmVzY2FuIFRoZW1lcw==</PHRASE>
 			<PHRASE Label="la_ShortToolTip_ResetSettings" Module="Core" Type="1">UmVzZXQ=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_SetPrimary" Module="Core" Type="1">UHJpbWFyeQ==</PHRASE>
 			<PHRASE Label="la_ShortToolTip_SynchronizeLanguages" Module="Core" Type="1">U3luY2hyb25pemU=</PHRASE>
 			<PHRASE Label="la_ShortToolTip_View" Module="Core" Type="1">Vmlldw==</PHRASE>
 			<PHRASE Label="la_Show" Module="Core" Type="1">U2hvdw==</PHRASE>
 			<PHRASE Label="la_SQLAffectedRows" Module="Core" Type="1">QWZmZWN0ZWQgcm93cw==</PHRASE>
 			<PHRASE Label="la_SQLRuntime" Module="Core" Type="1">RXhlY3V0ZWQgaW46</PHRASE>
 			<PHRASE Label="la_step" Module="Core" Type="1">U3RlcA==</PHRASE>
 			<PHRASE Label="la_StyleDefinition" Module="Core" Type="1">RGVmaW5pdGlvbg==</PHRASE>
 			<PHRASE Label="la_StylePreview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
 			<PHRASE Label="la_sunday" Module="Core" Type="1">U3VuZGF5</PHRASE>
 			<PHRASE Label="la_System" Module="Core" Type="1">U3lzdGVt</PHRASE>
 			<PHRASE Label="la_tab_AdminUI" Module="Core" Type="1">QWRtaW5pc3RyYXRpb24gUGFuZWwgVUk=</PHRASE>
 			<PHRASE Label="la_tab_AdvancedView" Module="Core" Type="1">QWR2YW5jZWQgVmlldw==</PHRASE>
 			<PHRASE Label="la_tab_Backup" Module="Core" Type="1">QmFja3Vw</PHRASE>
 			<PHRASE Label="la_tab_BanList" Module="Core" Type="1">QmFuIFJ1bGVz</PHRASE>
 			<PHRASE Label="la_tab_BaseStyles" Module="Core" Type="1">QmFzZSBTdHlsZXM=</PHRASE>
 			<PHRASE Label="la_tab_BlockStyles" Module="Core" Type="1">QmxvY2sgU3R5bGVz</PHRASE>
 			<PHRASE Label="la_tab_Browse" Module="Core" Type="1">Q2F0YWxvZw==</PHRASE>
 			<PHRASE Label="la_tab_BrowsePages" Module="Core" Type="1">QnJvd3NlIFdlYnNpdGU=</PHRASE>
 			<PHRASE Label="la_tab_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_tab_ChangeLog" Module="Core" Type="1">Q2hhbmdlcyBMb2c=</PHRASE>
 			<PHRASE Label="la_tab_CMSForms" Module="Core" Type="1">Rm9ybXM=</PHRASE>
 			<PHRASE Label="la_tab_Community" Module="Core" Type="1">VXNlciBNYW5hZ2VtZW50</PHRASE>
 			<PHRASE Label="la_tab_ConfigCustom" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
 			<PHRASE Label="la_tab_ConfigE-mail" Module="Core" Type="1">RS1tYWlsIEV2ZW50cw==</PHRASE>
 			<PHRASE Label="la_tab_ConfigGeneral" Module="Core" Type="1">R2VuZXJhbCBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_tab_ConfigOutput" Module="Core" Type="1">T3V0cHV0</PHRASE>
 			<PHRASE Label="la_tab_ConfigSearch" Module="Core" Type="1">U2VhcmNo</PHRASE>
 			<PHRASE Label="la_tab_ConfigSettings" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
 			<PHRASE Label="la_tab_Custom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
 			<PHRASE Label="la_tab_E-mails" Module="Core" Type="1">RS1tYWlsIFRlbXBsYXRlcw==</PHRASE>
 			<PHRASE Label="la_tab_EmailCommunication" Module="Core" Type="1">RS1tYWlsIENvbW11bmljYXRpb24=</PHRASE>
 			<PHRASE Label="la_tab_EmailEvents" Module="Core" Type="1">RW1haWwgRXZlbnRz</PHRASE>
 			<PHRASE Label="la_tab_EmailLog" Module="Core" Type="1">RS1tYWlsIExvZw==</PHRASE>
 			<PHRASE Label="la_tab_EmailQueue" Module="Core" Type="1">RW1haWwgUXVldWU=</PHRASE>
 			<PHRASE Label="la_tab_Fields" Module="Core" Type="1">RmllbGRz</PHRASE>
 			<PHRASE Label="la_tab_Files" Module="Core" Type="1">RmlsZXM=</PHRASE>
 			<PHRASE Label="la_tab_FormsConfig" Module="Core" Type="1">Rm9ybXMgQ29uZmlndXJhdGlvbg==</PHRASE>
 			<PHRASE Label="la_tab_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
 			<PHRASE Label="la_tab_GeneralSettings" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
 			<PHRASE Label="la_tab_Groups" Module="Core" Type="1">R3JvdXBz</PHRASE>
 			<PHRASE Label="la_tab_Help" Module="Core" Type="1">SGVscA==</PHRASE>
 			<PHRASE Label="la_tab_Images" Module="Core" Type="1">SW1hZ2Vz</PHRASE>
 			<PHRASE Label="la_tab_ImportData" Module="Core" Type="1">SW1wb3J0IERhdGE=</PHRASE>
 			<PHRASE Label="la_tab_Items" Module="Core" Type="1">SXRlbXM=</PHRASE>
 			<PHRASE Label="la_tab_Labels" Module="Core" Type="1">TGFiZWxz</PHRASE>
 			<PHRASE Label="la_tab_Messages" Module="Core" Type="1">TWVzc2FnZXM=</PHRASE>
 			<PHRASE Label="la_tab_PackageContent" Module="Core" Type="1">UGFja2FnZSBDb250ZW50</PHRASE>
 			<PHRASE Label="la_tab_Permissions" Module="Core" Type="1">UGVybWlzc2lvbnM=</PHRASE>
 			<PHRASE Label="la_tab_PermissionTypes" Module="Core" Type="1">UGVybWlzc2lvbiBUeXBlcw==</PHRASE>
 			<PHRASE Label="la_tab_PromoBlocks" Module="Core" Type="1">UHJvbW8gQmxvY2tz</PHRASE>
 			<PHRASE Label="la_tab_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
 			<PHRASE Label="la_tab_QueryDB" Module="Core" Type="1">UXVlcnkgRGF0YWJhc2U=</PHRASE>
 			<PHRASE Label="la_tab_Regional" Module="Core" Type="1">UmVnaW9uYWw=</PHRASE>
 			<PHRASE Label="la_tab_Related_Searches" Module="Core" Type="1">UmVsYXRlZCBTZWFyY2hlcw==</PHRASE>
 			<PHRASE Label="la_tab_Relations" Module="Core" Type="1">UmVsYXRpb25z</PHRASE>
 			<PHRASE Label="la_tab_Reports" Module="Core" Type="1">U3lzdGVtIExvZ3M=</PHRASE>
 			<PHRASE Label="la_tab_Restore" Module="Core" Type="1">UmVzdG9yZQ==</PHRASE>
 			<PHRASE Label="la_tab_Reviews" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
 			<PHRASE Label="la_Tab_Search" Module="Core" Type="1">U2VhcmNo</PHRASE>
 			<PHRASE Label="la_tab_SearchLog" Module="Core" Type="1">U2VhcmNoIExvZw==</PHRASE>
 			<PHRASE Label="la_tab_ServerInfo" Module="Core" Type="1">UEhQIEluZm9ybWF0aW9u</PHRASE>
 			<PHRASE Label="la_Tab_Service" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
 			<PHRASE Label="la_tab_SessionLog" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
 			<PHRASE Label="la_tab_SessionLogs" Module="Core" Type="1">U2Vzc2lvbiBMb2c=</PHRASE>
 			<PHRASE Label="la_tab_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
 			<PHRASE Label="la_tab_ShowAll" Module="Core" Type="1">U2hvdyBBbGw=</PHRASE>
 			<PHRASE Label="la_tab_ShowStructure" Module="Core" Type="1">U2hvdyBTdHJ1Y3R1cmU=</PHRASE>
 			<PHRASE Label="la_tab_Site_Structure" Module="Core" Type="1">V2Vic2l0ZSAmIENvbnRlbnQ=</PHRASE>
 			<PHRASE Label="la_tab_Skins" Module="Core" Type="1">QWRtaW4gU2tpbnM=</PHRASE>
 			<PHRASE Label="la_tab_Summary" Module="Core" Type="1">U3VtbWFyeQ==</PHRASE>
 			<PHRASE Label="la_tab_Sys_Config" Module="Core" Type="1">Q29uZmlndXJhdGlvbg==</PHRASE>
 			<PHRASE Label="la_tab_taglibrary" Module="Core" Type="1">VGFnIGxpYnJhcnk=</PHRASE>
 			<PHRASE Label="la_tab_Themes" Module="Core" Type="1">VGhlbWVz</PHRASE>
 			<PHRASE Label="la_tab_Tools" Module="Core" Type="1">VG9vbHM=</PHRASE>
 			<PHRASE Label="la_tab_Users" Module="Core" Type="1">VXNlcnM=</PHRASE>
 			<PHRASE Label="la_tab_User_Groups" Module="Core" Type="1">R3JvdXBz</PHRASE>
 			<PHRASE Label="la_tab_User_List" Module="Core" Type="1">VXNlcnM=</PHRASE>
 			<PHRASE Label="la_tab_VisitorLog" Module="Core" Type="1">VmlzaXRvciBMb2c=</PHRASE>
 			<PHRASE Label="la_tab_Visits" Module="Core" Type="1">VmlzaXRz</PHRASE>
 			<PHRASE Label="la_Text" Module="Core" Type="1">dGV4dA==</PHRASE>
 			<PHRASE Label="la_Text_Admin" Module="Core" Type="1">QWRtaW4=</PHRASE>
 			<PHRASE Label="la_text_advanced" Module="Core" Type="1">QWR2YW5jZWQ=</PHRASE>
 			<PHRASE Label="la_Text_All" Module="Core" Type="1">QWxs</PHRASE>
 			<PHRASE Label="la_text_AutoRefresh" Module="Core" Type="1">QXV0by1SZWZyZXNo</PHRASE>
 			<PHRASE Label="la_Text_BackupComplete" Module="Core" Type="1">QmFjayB1cCBoYXMgYmVlbiBjb21wbGV0ZWQuIFRoZSBiYWNrdXAgZmlsZSBpczo=</PHRASE>
 			<PHRASE Label="la_Text_backup_access" Module="Core" Type="1">SW4tUG9ydGFsIGRvZXMgbm90IGhhdmUgYWNjZXNzIHRvIHdyaXRlIHRvIHRoaXMgZGlyZWN0b3J5</PHRASE>
 			<PHRASE Label="la_Text_Backup_Info" Module="Core" Type="1">VGhpcyB1dGlsaXR5IGFsbG93cyB5b3UgdG8gYmFja3VwIHlvdXIgSW4tUG9ydGFsIGRhdGFiYXNlIHNvIGl0IGNhbiBiZSByZXN0b3JlZCBhdCBsYXRlciBpbiBuZWVkZWQu</PHRASE>
 			<PHRASE Label="la_text_Bytes" Module="Core" Type="1">Ynl0ZXM=</PHRASE>
 			<PHRASE Label="la_Text_Catalog" Module="Core" Type="1">Q2F0YWxvZw==</PHRASE>
 			<PHRASE Label="la_Text_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_Text_Category" Module="Core" Type="1">U2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_text_ClearClipboardWarning" Module="Core" Type="1">WW91IGFyZSBhYm91dCB0byBjbGVhciBjbGlwYm9hcmQgY29udGVudCENClByZXNzIE9LIHRvIGNvbnRpbnVlIG9yIENhbmNlbCB0byByZXR1cm4gdG8gcHJldmlvdXMgc2NyZWVuLg==</PHRASE>
 			<PHRASE Label="la_Text_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
 			<PHRASE Label="la_Text_DataType_1" Module="Core" Type="1">c2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_Text_Date_Time_Settings" Module="Core" Type="1">RGF0ZS9UaW1lIFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_text_db_warning" Module="Core" Type="1">UnVubmluZyB0aGlzIHV0aWxpdHkgd2lsbCBhZmZlY3QgeW91ciBkYXRhYmFzZS4gUGxlYXNlIGJlIGFkdmlzZWQgdGhhdCB5b3UgY2FuIHVzZSB0aGlzIHV0aWxpdHkgYXQgeW91ciBvd24gcmlzay4gSW4tUG9ydGFsIG9yIGl0J3MgZGV2ZWxvcGVycyBjYW4gbm90IGJlIGhlbGQgbGlhYmxlIGZvciBhbnkgY29ycnVwdCBkYXRhIG9yIGRhdGEgbG9zcy4=</PHRASE>
 			<PHRASE Label="la_Text_Default" Module="Core" Type="1">RGVmYXVsdA==</PHRASE>
 			<PHRASE Label="la_Text_Delete" Module="Core" Type="1">RGVsZXRl</PHRASE>
 			<PHRASE Label="la_Text_Disable" Module="Core" Type="1">RGlzYWJsZQ==</PHRASE>
 			<PHRASE Label="la_text_disclaimer_part1" Module="Core" Type="1">UnVubmluZyB0aGlzIHV0aWxpdHkgd2lsbCBhZmZlY3QgeW91ciBkYXRhYmFzZS4gUGxlYXNlIGJlIGFkdmlzZWQgdGhhdCB5b3UgY2FuIHVzZSB0aGlzIHV0aWxpdHkgYXQgeW91ciBvd24gcmlzay4gSW4tUG9ydGFsIG9yIGl0J3MgZGV2ZWxvcGVycyBjYW4gbm90IGJlIGhlbGQgbGlhYmxlIGZvciBhbnkgY29ycnVwdCBkYXRhIG9yIGRhdGEgbG9zcy4=</PHRASE>
 			<PHRASE Label="la_text_disclaimer_part2" Module="Core" Type="1">UGxlYXNlIG1ha2Ugc3VyZSB0byBCQUNLVVAgeW91ciBkYXRhYmFzZShzKSBiZWZvcmUgcnVubmluZyB0aGlzIHV0aWxpdHkh</PHRASE>
 			<PHRASE Label="la_Text_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
 			<PHRASE Label="la_Text_Email" Module="Core" Type="1">RW1haWw=</PHRASE>
 			<PHRASE Label="la_text_FollowingLinesWereNotImported" Module="Core" Type="1">Rm9sbG93aW5nIGxpbmVzIHdlcmUgTk9UIGltcG9ydGVk</PHRASE>
 			<PHRASE Label="la_Text_FrontOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
 			<PHRASE Label="la_Text_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
 			<PHRASE Label="la_Text_Hot" Module="Core" Type="1">SG90</PHRASE>
 			<PHRASE Label="la_Text_IAgree" Module="Core" Type="1">SSBhZ3JlZSB0byB0aGUgdGVybXMgYW5kIGNvbmRpdGlvbnM=</PHRASE>
 			<PHRASE Label="la_text_ImportResults" Module="Core" Type="1">SW1wb3J0IFJlc3VsdHM=</PHRASE>
 			<PHRASE Label="la_Text_InDevelopment" Module="Core" Type="1">SW4gRGV2ZWxvcG1lbnQ=</PHRASE>
 			<PHRASE Label="la_Text_Invert" Module="Core" Type="1">SW52ZXJ0</PHRASE>
 			<PHRASE Label="la_text_keyword" Module="Core" Type="1">S2V5d29yZA==</PHRASE>
 			<PHRASE Label="la_Text_Link" Module="Core" Type="1">TGluaw==</PHRASE>
 			<PHRASE Label="la_Text_MetaInfo" Module="Core" Type="1">RGVmYXVsdCBNRVRBIGtleXdvcmRz</PHRASE>
 			<PHRASE Label="la_text_min_password" Module="Core" Type="1">TWluaW11bSBwYXNzd29yZCBsZW5ndGg=</PHRASE>
 			<PHRASE Label="la_text_min_username" Module="Core" Type="1">VXNlciBuYW1lIGxlbmd0aCAobWluIC0gbWF4KQ==</PHRASE>
 			<PHRASE Label="la_text_multipleshow" Module="Core" Type="1">U2hvdyBtdWx0aXBsZQ==</PHRASE>
 			<PHRASE Label="la_Text_New" Module="Core" Type="1">TmV3</PHRASE>
 			<PHRASE Label="la_Text_None" Module="Core" Type="1">Tm9uZQ==</PHRASE>
 			<PHRASE Label="la_text_NoPermission" Module="Core" Type="1">Tm8gUGVybWlzc2lvbg==</PHRASE>
 			<PHRASE Label="la_text_Or" Module="Core" Type="1">b3I=</PHRASE>
 			<PHRASE Label="la_Text_Phone" Module="Core" Type="1">UGhvbmU=</PHRASE>
 			<PHRASE Label="la_Text_Pop" Module="Core" Type="1">UG9wdWxhcg==</PHRASE>
 			<PHRASE Label="la_text_popularity" Module="Core" Type="1">UG9wdWxhcml0eQ==</PHRASE>
 			<PHRASE Label="la_text_ready_to_install" Module="Core" Type="1">UmVhZHkgdG8gSW5zdGFsbA==</PHRASE>
 			<PHRASE Label="la_text_RecordsAdded" Module="Core" Type="1">cmVjb3JkcyBhZGRlZA==</PHRASE>
 			<PHRASE Label="la_text_RecordsUpdated" Module="Core" Type="1">cmVjb3JkcyB1cGRhdGVk</PHRASE>
 			<PHRASE Label="la_text_RequiredFields" Module="Core" Type="1">UmVxdWlyZWQgZmllbGRz</PHRASE>
 			<PHRASE Label="la_Text_Restore_Heading" Module="Core" Type="1">SGVyZSB5b3UgY2FuIHJlc3RvcmUgeW91ciBkYXRhYmFzZSBmcm9tIGEgcHJldmlvdXNseSBiYWNrZWQgdXAgc25hcHNob3QuIFJlc3RvcmluZyB5b3VyIGRhdGFiYXNlIHdpbGwgZGVsZXRlIGFsbCBvZiB5b3VyIGN1cnJlbnQgZGF0YSBhbmQgbG9nIHlvdSBvdXQgb2YgdGhlIHN5c3RlbS4=</PHRASE>
 			<PHRASE Label="la_text_Review" Module="Core" Type="1">Q29tbWVudA==</PHRASE>
 			<PHRASE Label="la_Text_Reviews" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
 			<PHRASE Label="la_Text_RootCategory" Module="Core" Type="1">TW9kdWxlIFJvb3QgU2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_text_Save" Module="Core" Type="1">U2F2ZQ==</PHRASE>
 			<PHRASE Label="la_Text_Select" Module="Core" Type="1">U2VsZWN0</PHRASE>
 			<PHRASE Label="la_text_sess_expired" Module="Core" Type="1">U2Vzc2lvbiBFeHBpcmVk</PHRASE>
 			<PHRASE Label="la_Text_Simple" Module="Core" Type="1">U2ltcGxl</PHRASE>
 			<PHRASE Label="la_Text_Sort" Module="Core" Type="1">U29ydA==</PHRASE>
 			<PHRASE Label="la_Text_Unselect" Module="Core" Type="1">VW5zZWxlY3Q=</PHRASE>
 			<PHRASE Label="la_Text_User" Module="Core" Type="1">VXNlcg==</PHRASE>
 			<PHRASE Label="la_Text_Users" Module="Core" Type="1">VXNlcnM=</PHRASE>
 			<PHRASE Label="la_Text_Version" Module="Core" Type="1">VmVyc2lvbg==</PHRASE>
 			<PHRASE Label="la_Text_View" Module="Core" Type="1">Vmlldw==</PHRASE>
 			<PHRASE Label="la_title_AddingBanRule" Module="Core" Type="1">QWRkaW5nIEJhbiBSdWxl</PHRASE>
 			<PHRASE Label="la_title_AddingCountryState" Module="Core" Type="1">QWRkaW5nIENvdW50cnkvU3RhdGU=</PHRASE>
 			<PHRASE Label="la_title_addingCustom" Module="Core" Type="1">QWRkaW5nIEN1c3RvbSBGaWVsZA==</PHRASE>
 			<PHRASE Label="la_title_AddingFile" Module="Core" Type="1">QWRkaW5nIEZpbGU=</PHRASE>
 			<PHRASE Label="la_title_AddingItemFilter" Module="Core" Type="1">QWRkaW5nIEl0ZW0gRmlsdGVy</PHRASE>
 			<PHRASE Label="la_title_AddingMailingList" Module="Core" Type="1">QWRkaW5nIE1haWxpbmcgTGlzdA==</PHRASE>
 			<PHRASE Label="la_title_AddingPermissionType" Module="Core" Type="1">QWRkaW5nIFBlcm1pc3Npb24gVHlwZQ==</PHRASE>
 			<PHRASE Label="la_title_AddingPromoBlock" Module="Core" Type="1">QWRkaW5nIFByb21vIEJsb2Nr</PHRASE>
 			<PHRASE Label="la_title_AddingPromoBlockGroup" Module="Core" Type="1">QWRkaW5nIFByb21vIEJsb2NrIEdyb3Vw</PHRASE>
 			<PHRASE Label="la_title_AddingScheduledTask" Module="Core" Type="1">QWRkaW5nIFNjaGVkdWxlZCBUYXNr</PHRASE>
 			<PHRASE Label="la_title_AddingSiteDomain" Module="Core" Type="1">QWRkaW5nIFNpdGUgRG9tYWlu</PHRASE>
 			<PHRASE Label="la_title_AddingSkin" Module="Core" Type="1">QWRkaW5nIFNraW4=</PHRASE>
 			<PHRASE Label="la_title_AddingSpellingDictionary" Module="Core" Type="1">QWRkaW5nIFNwZWxsaW5nIERpY3Rpb25hcnk=</PHRASE>
 			<PHRASE Label="la_title_AddingStopWord" Module="Core" Type="1">QWRkaW5nIFN0b3AgV29yZA==</PHRASE>
 			<PHRASE Label="la_title_AddingSystemEventSubscription" Module="Core" Type="1">QWRkaW5nIFN5c3RlbSBFdmVudCBTdWJzY3JpcHRpb24=</PHRASE>
 			<PHRASE Label="la_title_AddingThemeFile" Module="Core" Type="1">QWRkaW5nIFRoZW1lIFRlbXBsYXRl</PHRASE>
 			<PHRASE Label="la_title_AddingThesaurus" Module="Core" Type="1">QWRkaW5nIFRoZXNhdXJ1cw==</PHRASE>
 			<PHRASE Label="la_title_Adding_BaseStyle" Module="Core" Type="1">QWRkaW5nIEJhc2UgU3R5bGU=</PHRASE>
 			<PHRASE Label="la_title_Adding_BlockStyle" Module="Core" Type="1">QWRkaW5nIEJsb2NrIFN0eWxl</PHRASE>
 			<PHRASE Label="la_title_Adding_Category" Module="Core" Type="1">QWRkaW5nIFNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_title_Adding_ConfigSearch" Module="Core" Type="1">QWRkaW5nIFNlYXJjaCBGaWVsZA==</PHRASE>
 			<PHRASE Label="la_title_Adding_Content" Module="Core" Type="1">QWRkaW5nIENNUyBCbG9jaw==</PHRASE>
 			<PHRASE Label="la_title_Adding_E-mail" Module="Core" Type="1">QWRkaW5nIEVtYWlsIEV2ZW50</PHRASE>
 			<PHRASE Label="la_title_Adding_Form" Module="Core" Type="1">QWRkaW5nIEZvcm0=</PHRASE>
 			<PHRASE Label="la_title_Adding_FormField" Module="Core" Type="1">QWRkaW5nIEZvcm0gRmllbGQ=</PHRASE>
 			<PHRASE Label="la_title_Adding_Group" Module="Core" Type="1">QWRkaW5nIEdyb3Vw</PHRASE>
 			<PHRASE Label="la_title_Adding_Image" Module="Core" Type="1">QWRkaW5nIEltYWdl</PHRASE>
 			<PHRASE Label="la_title_Adding_Language" Module="Core" Type="1">QWRkaW5nIExhbmd1YWdl</PHRASE>
 			<PHRASE Label="la_title_Adding_Phrase" Module="Core" Type="1">QWRkaW5nIFBocmFzZQ==</PHRASE>
 			<PHRASE Label="la_title_Adding_RelatedSearch_Keyword" Module="Core" Type="1">QWRkaW5nIEtleXdvcmQ=</PHRASE>
 			<PHRASE Label="la_title_Adding_Relationship" Module="Core" Type="1">QWRkaW5nIFJlbGF0aW9uc2hpcA==</PHRASE>
 			<PHRASE Label="la_title_Adding_Review" Module="Core" Type="1">QWRkaW5nIENvbW1lbnQ=</PHRASE>
 			<PHRASE Label="la_title_Adding_Theme" Module="Core" Type="1">QWRkaW5nIFRoZW1l</PHRASE>
 			<PHRASE Label="la_title_Adding_User" Module="Core" Type="1">QWRkaW5nIFVzZXI=</PHRASE>
 			<PHRASE Label="la_title_AdditionalPermissions" Module="Core" Type="1">QWRkaXRpb25hbCBQZXJtaXNzaW9ucw==</PHRASE>
 			<PHRASE Label="la_title_Administrators" Module="Core" Type="1">QWRtaW5pc3RyYXRvcnM=</PHRASE>
 			<PHRASE Label="la_title_Advanced" Module="Core" Type="1">QWR2YW5jZWQ=</PHRASE>
 			<PHRASE Label="la_title_AdvancedView" Module="Core" Type="1">U2hvd2luZyBhbGwgcmVnYXJkbGVzcyBvZiBTdHJ1Y3R1cmU=</PHRASE>
 			<PHRASE Label="la_title_BaseStyles" Module="Core" Type="1">QmFzZSBTdHlsZXM=</PHRASE>
 			<PHRASE Label="la_title_BlockStyles" Module="Core" Type="1">QmxvY2sgU3R5bGVz</PHRASE>
 			<PHRASE Label="la_title_BounceSettings" Module="Core" Type="1">Qm91bmNlIFBPUDMgU2VydmVyIFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_title_Categories" Module="Core" Type="1">U2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_title_category_select" Module="Core" Type="1">U2VsZWN0IHNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_title_ColumnPicker" Module="Core" Type="1">Q29sdW1uIFBpY2tlcg==</PHRASE>
 			<PHRASE Label="la_title_Configuration" Module="Core" Type="1">Q29uZmlndXJhdGlvbg==</PHRASE>
 			<PHRASE Label="la_Title_ContactInformation" Module="Core" Type="1">Q29udGFjdCBJbmZvcm1hdGlvbg==</PHRASE>
 			<PHRASE Label="la_title_CountryStates" Module="Core" Type="1">Q291bnRyaWVzICYgU3RhdGVz</PHRASE>
 			<PHRASE Label="la_title_CSVExport" Module="Core" Type="1">Q1NWIEV4cG9ydA==</PHRASE>
 			<PHRASE Label="la_title_CSVImport" Module="Core" Type="1">Q1NWIEltcG9ydA==</PHRASE>
 			<PHRASE Label="la_title_Custom" Module="Core" Type="1">Q3VzdG9t</PHRASE>
 			<PHRASE Label="la_title_CustomFields" Module="Core" Type="1">Q3VzdG9tIEZpZWxkcw==</PHRASE>
 			<PHRASE Label="la_title_EditingBanRule" Module="Core" Type="1">RWRpdGluZyBCYW4gUnVsZQ==</PHRASE>
 			<PHRASE Label="la_title_EditingChangeLog" Module="Core" Type="1">RWRpdGluZyBDaGFuZ2VzIExvZw==</PHRASE>
 			<PHRASE Label="la_title_EditingContentAutosaved" Module="Core" Type="1">Q29udGVudCBFZGl0b3IgLSBBdXRvLXNhdmVkIGF0ICVz</PHRASE>
 			<PHRASE Label="la_title_EditingCountryState" Module="Core" Type="1">RWRpdGluZyBDb3VudHJ5L1N0YXRl</PHRASE>
 			<PHRASE Label="la_title_EditingDraft" Module="Core" Type="1">RWRpdGluZyBEcmFmdCAoJTIkcyk=</PHRASE>
 			<PHRASE Label="la_title_EditingEmailEvent" Module="Core" Type="1">RWRpdGluZyBFbWFpbCBFdmVudA==</PHRASE>
 			<PHRASE Label="la_title_EditingFile" Module="Core" Type="1">RWRpdGluZyBGaWxl</PHRASE>
 			<PHRASE Label="la_title_EditingItemFilter" Module="Core" Type="1">RWRpdGluZyBJdGVtIEZpbHRlcg==</PHRASE>
 			<PHRASE Label="la_title_EditingMembership" Module="Core" Type="1">RWRpdGluZyBNZW1iZXJzaGlw</PHRASE>
 			<PHRASE Label="la_title_EditingPermissionType" Module="Core" Type="1">RWRpdGluZyBQZXJtaXNzaW9uIFR5cGU=</PHRASE>
 			<PHRASE Label="la_title_EditingPromoBlock" Module="Core" Type="1">RWRpdGluZyBQcm9tbyBCbG9jaw==</PHRASE>
 			<PHRASE Label="la_title_EditingPromoBlockGroup" Module="Core" Type="1">RWRpdGluZyBQcm9tbyBCbG9jayBHcm91cA==</PHRASE>
 			<PHRASE Label="la_title_EditingScheduledTask" Module="Core" Type="1">RWRpdGluZyBTY2hlZHVsZWQgVGFzaw==</PHRASE>
 			<PHRASE Label="la_title_EditingSiteDomain" Module="Core" Type="1">RWRpdGluZyBTaXRlIERvbWFpbg==</PHRASE>
 			<PHRASE Label="la_title_EditingSkin" Module="Core" Type="1">RWRpdGluZyBTa2lu</PHRASE>
 			<PHRASE Label="la_title_EditingSpamReport" Module="Core" Type="1">RWRpdGluZyBTUEFNIFJlcG9ydA==</PHRASE>
 			<PHRASE Label="la_title_EditingSpellingDictionary" Module="Core" Type="1">RWRpdGluZyBTcGVsbGluZyBEaWN0aW9uYXJ5</PHRASE>
 			<PHRASE Label="la_title_EditingStopWord" Module="Core" Type="1">RWRpdGluZyBTdG9wIFdvcmQ=</PHRASE>
 			<PHRASE Label="la_title_EditingStyle" Module="Core" Type="1">RWRpdGluZyBTdHlsZQ==</PHRASE>
 			<PHRASE Label="la_title_EditingSystemEventSubscription" Module="Core" Type="1">RWRpdGluZyBTeXN0ZW0gRXZlbnQgU3Vic2NyaXB0aW9u</PHRASE>
 			<PHRASE Label="la_title_EditingThemeFile" Module="Core" Type="1">RWRpdGluZyBUaGVtZSBGaWxl</PHRASE>
 			<PHRASE Label="la_title_EditingThesaurus" Module="Core" Type="1">RWRpdGluZyBUaGVzYXVydXM=</PHRASE>
 			<PHRASE Label="la_title_EditingTranslation" Module="Core" Type="1">RWRpdGluZyBUcmFuc2xhdGlvbg==</PHRASE>
 			<PHRASE Label="la_title_Editing_BaseStyle" Module="Core" Type="1">RWRpdGluZyBCYXNlIFN0eWxl</PHRASE>
 			<PHRASE Label="la_title_Editing_BlockStyle" Module="Core" Type="1">RWRpdGluZyBCbG9jayBTdHlsZQ==</PHRASE>
 			<PHRASE Label="la_title_Editing_Category" Module="Core" Type="1">RWRpdGluZyBTZWN0aW9u</PHRASE>
 			<PHRASE Label="la_title_Editing_Content" Module="Core" Type="1">RWRpdGluZyBDTVMgQmxvY2s=</PHRASE>
 			<PHRASE Label="la_title_Editing_CustomField" Module="Core" Type="1">RWRpdGluZyBDdXN0b20gRmllbGQ=</PHRASE>
 			<PHRASE Label="la_title_Editing_E-mail" Module="Core" Type="1">RWRpdGluZyBFLW1haWw=</PHRASE>
 			<PHRASE Label="la_title_Editing_Form" Module="Core" Type="1">RWRpdGluZyBGb3Jt</PHRASE>
 			<PHRASE Label="la_title_Editing_FormField" Module="Core" Type="1">RWRpdGluZyBGb3JtIEZpZWxk</PHRASE>
 			<PHRASE Label="la_title_Editing_Group" Module="Core" Type="1">RWRpdGluZyBHcm91cA==</PHRASE>
 			<PHRASE Label="la_title_Editing_Image" Module="Core" Type="1">RWRpdGluZyBJbWFnZQ==</PHRASE>
 			<PHRASE Label="la_title_Editing_Language" Module="Core" Type="1">RWRpdGluZyBMYW5ndWFnZQ==</PHRASE>
 			<PHRASE Label="la_title_Editing_Phrase" Module="Core" Type="1">RWRpdGluZyBQaHJhc2U=</PHRASE>
 			<PHRASE Label="la_title_Editing_RelatedSearch_Keyword" Module="Core" Type="1">RWRpdGluZyBLZXl3b3Jk</PHRASE>
 			<PHRASE Label="la_title_Editing_Relationship" Module="Core" Type="1">RWRpdGluZyBSZWxhdGlvbnNoaXA=</PHRASE>
 			<PHRASE Label="la_title_Editing_Review" Module="Core" Type="1">RWRpdGluZyBDb21tZW50</PHRASE>
 			<PHRASE Label="la_title_Editing_Theme" Module="Core" Type="1">RWRpdGluZyBUaGVtZQ==</PHRASE>
 			<PHRASE Label="la_title_Editing_User" Module="Core" Type="1">RWRpdGluZyBVc2Vy</PHRASE>
 			<PHRASE Label="la_title_EmailCommunication" Module="Core" Type="1">RS1tYWlsIENvbW11bmljYXRpb24=</PHRASE>
 			<PHRASE Label="la_title_EmailEvents" Module="Core" Type="1">RS1tYWlsIEV2ZW50cw==</PHRASE>
 			<PHRASE Label="la_title_EmailMessages" Module="Core" Type="1">RS1tYWlscw==</PHRASE>
 			<PHRASE Label="la_title_EmailSettings" Module="Core" Type="1">RS1tYWlsIFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_title_ExportLanguagePackResults" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdlIFBhY2sgLSBSZXN1bHRz</PHRASE>
 			<PHRASE Label="la_title_ExportLanguagePackStep1" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdlIFBhY2sgLSBTdGVwMQ==</PHRASE>
 			<PHRASE Label="la_title_Fields" Module="Core" Type="1">RmllbGRz</PHRASE>
 			<PHRASE Label="la_title_Files" Module="Core" Type="1">RmlsZXM=</PHRASE>
 			<PHRASE Label="la_title_Forms" Module="Core" Type="1">Rm9ybXM=</PHRASE>
 			<PHRASE Label="la_title_FormSubmissions" Module="Core" Type="1">Rm9ybSBTdWJtaXNzaW9ucw==</PHRASE>
 			<PHRASE Label="la_title_General" Module="Core" Type="1">R2VuZXJhbA==</PHRASE>
 			<PHRASE Label="la_title_Groups" Module="Core" Type="1">R3JvdXBz</PHRASE>
 			<PHRASE Label="la_title_Images" Module="Core" Type="1">SW1hZ2Vz</PHRASE>
 			<PHRASE Label="la_title_InstallLanguagePackStep1" Module="Core" Type="1">SW5zdGFsbCBMYW5ndWFnZSBQYWNrIC0gU3RlcCAx</PHRASE>
 			<PHRASE Label="la_title_InstallLanguagePackStep2" Module="Core" Type="1">SW5zdGFsbCBMYW5ndWFnZSBQYWNrIC0gU3RlcCAy</PHRASE>
 			<PHRASE Label="la_title_ItemFilters" Module="Core" Type="1">SXRlbSBGaWx0ZXJz</PHRASE>
 			<PHRASE Label="la_title_Items" Module="Core" Type="1">SXRlbXM=</PHRASE>
 			<PHRASE Label="la_title_Labels" Module="Core" Type="1">TGFiZWxz</PHRASE>
 			<PHRASE Label="la_title_LangManagement" Module="Core" Type="1">TGFuZy4gTWFuYWdlbWVudA==</PHRASE>
 			<PHRASE Label="la_title_LanguagePacks" Module="Core" Type="1">TGFuZ3VhZ2UgUGFja3M=</PHRASE>
 			<PHRASE Label="la_title_LanguagesManagement" Module="Core" Type="1">TGFuZ3VhZ2VzIE1hbmFnZW1lbnQ=</PHRASE>
 			<PHRASE Label="la_title_Loading" Module="Core" Type="1">TG9hZGluZyAuLi4=</PHRASE>
 			<PHRASE Label="la_title_MailingLists" Module="Core" Type="1">TWFpbGluZ3M=</PHRASE>
 			<PHRASE Label="la_title_Messages" Module="Core" Type="1">TWVzc2FnZXM=</PHRASE>
 			<PHRASE Label="la_title_Module_Status" Module="Core" Type="1">TW9kdWxlcw==</PHRASE>
 			<PHRASE Label="la_title_NewEmailEvent" Module="Core" Type="1">TmV3IEVtYWlsIEV2ZW50</PHRASE>
 			<PHRASE Label="la_title_NewFile" Module="Core" Type="1">TmV3IEZpbGU=</PHRASE>
 			<PHRASE Label="la_title_NewReply" Module="Core" Type="1">TmV3IFJlcGx5</PHRASE>
 			<PHRASE Label="la_title_NewScheduledTask" Module="Core" Type="1">TmV3IFNjaGVkdWxlZCBUYXNr</PHRASE>
 			<PHRASE Label="la_title_NewTheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
 			<PHRASE Label="la_title_NewThemeFile" Module="Core" Type="1">TmV3IFRoZW1lIFRlbXBsYXRl</PHRASE>
 			<PHRASE Label="la_title_New_BaseStyle" Module="Core" Type="1">TmV3IEJhc2UgU3R5bGU=</PHRASE>
 			<PHRASE Label="la_title_New_BlockStyle" Module="Core" Type="1">TmV3IEJsb2NrIFN0eWxl</PHRASE>
 			<PHRASE Label="la_title_New_Category" Module="Core" Type="1">TmV3IFNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_title_New_ConfigSearch" Module="Core" Type="1">TmV3IEZpZWxk</PHRASE>
 			<PHRASE Label="la_title_New_Image" Module="Core" Type="1">TmV3IEltYWdl</PHRASE>
 			<PHRASE Label="la_title_New_Relationship" Module="Core" Type="1">TmV3IFJlbGF0aW9uc2hpcA==</PHRASE>
 			<PHRASE Label="la_title_New_Review" Module="Core" Type="1">TmV3IENvbW1lbnQ=</PHRASE>
 			<PHRASE Label="la_title_NoPermissions" Module="Core" Type="1">Tm8gUGVybWlzc2lvbnM=</PHRASE>
 			<PHRASE Label="la_title_Permissions" Module="Core" Type="1">UGVybWlzc2lvbnM=</PHRASE>
 			<PHRASE Label="la_title_Phrases" Module="Core" Type="1">TGFiZWxzICYgUGhyYXNlcw==</PHRASE>
 			<PHRASE Label="la_Title_PleaseWait" Module="Core" Type="1">UGxlYXNlIFdhaXQ=</PHRASE>
 			<PHRASE Label="la_title_PromoBlockGroups" Module="Core" Type="1">UHJvbW8gQmxvY2sgR3JvdXBz</PHRASE>
 			<PHRASE Label="la_title_PromoBlocks" Module="Core" Type="1">UHJvbW8gQmxvY2tz</PHRASE>
 			<PHRASE Label="la_title_Properties" Module="Core" Type="1">UHJvcGVydGllcw==</PHRASE>
 			<PHRASE Label="la_title_RelatedSearches" Module="Core" Type="1">UmVsYXRlZCBTZWFyY2hlcw==</PHRASE>
 			<PHRASE Label="la_title_Relations" Module="Core" Type="1">UmVsYXRpb25z</PHRASE>
 			<PHRASE Label="la_title_ReplySettings" Module="Core" Type="1">UmVwbHkgUE9QMyBTZXJ2ZXIgU2V0dGluZ3M=</PHRASE>
 			<PHRASE Label="la_title_Reviews" Module="Core" Type="1">Q29tbWVudHM=</PHRASE>
 			<PHRASE Label="la_title_RunSchedule" Module="Core" Type="1">UnVuIFNjaGVkdWxl</PHRASE>
 			<PHRASE Label="la_title_RunSettings" Module="Core" Type="1">UnVuIFNldHRpbmdz</PHRASE>
 			<PHRASE Label="la_title_ScheduledTasks" Module="Core" Type="1">U2NoZWR1bGVkIFRhc2tz</PHRASE>
 			<PHRASE Label="la_title_SelectGroup" Module="Core" Type="1">U2VsZWN0IEdyb3VwKHMp</PHRASE>
 			<PHRASE Label="la_title_SelectUser" Module="Core" Type="1">U2VsZWN0IFVzZXI=</PHRASE>
 			<PHRASE Label="LA_TITLE_SENDEMAIL" Module="Core" Type="1">U2VuZCBFLW1haWw=</PHRASE>
 			<PHRASE Label="LA_TITLE_SENDINGPREPAREDEMAILS" Module="Core" Type="1">U2VuZGluZyBQcmVwYXJlZCBFLW1haWxz</PHRASE>
 			<PHRASE Label="la_Title_SendMailComplete" Module="Core" Type="1">TWFpbCBoYXMgYmVlbiBzZW50IFN1Y2Nlc3NmdWxseQ==</PHRASE>
 			<PHRASE Label="la_title_SiteDomains" Module="Core" Type="1">U2l0ZSBEb21haW5z</PHRASE>
 			<PHRASE Label="la_title_SpamReports" Module="Core" Type="1">U1BBTSBSZXBvcnRz</PHRASE>
 			<PHRASE Label="la_title_SpellingDictionary" Module="Core" Type="1">U3BlbGxpbmcgRGljdGlvbmFyeQ==</PHRASE>
 			<PHRASE Label="la_title_StopWords" Module="Core" Type="1">U3RvcCBXb3Jkcw==</PHRASE>
 			<PHRASE Label="la_title_Structure" Module="Core" Type="1">U3RydWN0dXJlICYgRGF0YQ==</PHRASE>
 			<PHRASE Label="la_title_SystemEventSubscriptions" Module="Core" Type="1">VXNlciBTdWJzY3JpcHRpb25z</PHRASE>
 			<PHRASE Label="la_title_SystemTools" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
 			<PHRASE Label="la_title_SystemToolsClearTemplatesCache" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+RGVsZXRlcyBhbGwgY29tcGlsZWQgdGVtcGxhdGVzIGZyb20gQWRtaW4gQ29uc29sZSBhbmQgRnJvbnQtZW5kIHRoZW1lcy48L2xpPg0KICA8bGk+UmVjb21tZW5kZWQgZm9yIHRoZSBtYWludGVuYW5jZSBwdXJwb3Nlcywgc2luY2UgZG9lcyBub3QgcHJvdmlkZSBhbnkgYWR2YW50YWdlcyBleGNlcHQgZm9yIHRlbXBvcmFyeSBsb3dlcmluZyB1c2FnZSBvZiB0aGUgZGlzayBzcGFjZS4gQWxsIHRlbXBsYXRlcyB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVjb21waWxlZCBhdCB0aGUgdGltZSBvZiB2aXNpdC48L2xpPg0KPC91bD4=">Q2xlYXIgVGVtcGxhdGVzIENhY2hl</PHRASE>
 			<PHRASE Label="la_title_SystemToolsCommonlyUsedKeys" Module="Core" Type="1">Q29tbW9ubHkgVXNlZCBLZXlz</PHRASE>
 			<PHRASE Label="la_title_SystemToolsDeploy" Module="Core" Type="1" Hint="PHVsPg0KPGxpPlRoaXMgZGVwbG95IHNjcmlwdCB3aWxsIGFwcGx5IGFsbCBEYXRhYmFzZSBDaGFuZ2VzIHN0b3JlZCBpbiA8Yj48dT5bbW9kdWxlXS9wcm9qZWN0X3VwZ3JhZGVzLnNxbDwvdT48L2I+IHRvIHRoZSBjdXJyZW50IHdlYnNpdGUgYW5kIHNhdmUgYXBwbGllZCBSZXZpc2lvbnMgaW4gQXBwbGllZERCUmV2aXNpb25zLjwvbGk+DQo8bGk+VGhpcyBkZXBsb3kgc2NyaXB0IHdpbGwgY3JlYXRlIGFsbCBuZXcgbGFuZ3VhZ2UgcGhyYXNlcyBieSByZS1pbXBvcnRpbmcgPGI+PHU+Y3VzdG9tL2luc3RhbGwvZW5nbGlzaC5sYW5nPC91PjwvYj4gZmlsZS48L2xpPg0KPGxpPlRoaXMgZGVwbG95IHNjcmlwdCB3aWxsIHJlc2V0IGFsbCBjYWNoZXMgYXQgb25jZTwvbGk+DQo8L3VsPg==">RGVwbG95IENoYW5nZXM=</PHRASE>
 			<PHRASE Label="la_title_SystemToolsKeyName" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+TmFtZSBvZiB0aGUgS2V5IHVzZWQgdG8gZ2V0IG9yIHNldCB0aGUgZGF0YSAodmFsdWUpIGluIHRoZSBtZW1vcnkgY2FjaGUgKDxzdHJvbmc+PGk+a0FwcGxpY2F0aW9uOjpzZXRDYWNoZTwvaT48L3N0cm9uZz4gYW5kIDxzdHJvbmc+PGk+a0FwcGxpY2F0aW9uOjpnZXRDYWNoZTwvaT48L3N0cm9uZz4gbWV0aG9kcykuPC9saT4NCjwvdWw+">S2V5IE5hbWU=</PHRASE>
 			<PHRASE Label="la_title_SystemToolsKeyValue" Module="Core" Type="1" Hint="Q3VycmVudCB2YWx1ZSBvciBhIG5ldyB2YWx1ZSAoZm9yIHNldHRpbmcpIG9mIHRoZSBrZXkgbmFtZSBzcGVjaWZpZWQgYWJvdmUu">S2V5IFZhbHVl</PHRASE>
 			<PHRASE Label="la_title_SystemToolsLocateUnitConfigFile" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2hvd3MgdGhlIGxvY2F0aW9uIG9mIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGUsIGFzc29jaWF0ZWQgd2l0aCB0aGUgZ2l2ZW4gPHN0cm9uZz48aT5Vbml0IENvbmZpZyBQcmVmaXg8L2k+PC9zdHJvbmc+IChpZS4gImFkbSIsICJ1IiwgImxhbmciIGFuZCBvdGhlcnMpLjwvbGk+DQo8L3VsPg==">TG9jYXRlIFVuaXQgQ29uZmlnIEZpbGU=</PHRASE>
 			<PHRASE Label="la_title_SystemToolsRebuildMultilingualFields" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2NhbnMgYW5kIGFkZHMgbWlzc2luZyBkYXRhYmFzZSB0YWJsZSBjb2x1bW5zIChmb3JtYXQgPHN0cm9uZz48aT4ibCZsdDtOJmd0O19GaWVsZE5hbWUiPC9pPjwvc3Ryb25nPiwgd2hlcmUgTiBpcyBhIExhbmd1YWdlSWQpIHRvIHN0b3JlIHRoZSBkYXRhIGZvciB0cmFuc2xhdGFibGUgZmllbGRzLiBUaGlzIGFjdGlvbiBpcyBwZXJmb3JtZWQgYXV0b21hdGljYWxseSB3aGVuZXZlciBhIG5ldyBMYW5ndWFnZSBpcyBjcmVhdGVkIHZpYSBBZG1pbiBDb25zb2xlLjwvbGk+DQogIDxsaT5Vc2UgdGhpcyAiUmVidWlsZCIgb3B0aW9uIG9ubHkgZm9yIHN5bmNocm9uaXphdGlvbiBvZiBkYXRhYmFzZSB0YWJsZSBjb2x1bW5zIHdpdGggbmV3bHkgYWRkZWQgbXVsdGlsaW5ndWFsIGZpZWxkcyAoa011bHRpTGFuZ3VhZ2UgZm9ybWF0dGVyKSBkZWZpbmVkIHRocm91Z2ggPHN0cm9uZz48aT5Vbml0IENvbmZpZzwvaT48L3N0cm9uZz4gZmlsZXMuPC9saT4NCjwvdWw+">UmVidWlsZCBNdWx0aWxpbmd1YWwgRmllbGRz</PHRASE>
 			<PHRASE Label="la_title_SystemToolsRecompileTemplates" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+Q29tcGxldGVseSByZWNvbXBpbGVzIHRoZSB0ZW1wbGF0ZXMgZm9yIGFsbCBlbmFibGVkIEZyb250LWVuZCB0aGVtZXMgYXMgd2VsbCBhcyBBZG1pbiBDb25zb2xlIHRlbXBsYXRlcyBmb3IgYWxsIGxvYWRlZCBtb2R1bGVzLjwvbGk+DQogIDxsaT5BZGRpdGlvbmFsbHksIGNoZWNrcyBmb3IgdGhlIHN5bnRheCBvZiBhbGwgPHN0cm9uZz48aT4mbHQ7aW5wMjouLi4vJmd0OzwvaT48L3N0cm9uZz4gdGFncyBhY3Jvc3MgdGhlIEluLVBvcnRhbCBpbnN0YWxsYXRpb24uPC9saT4NCiAgPGxpPlRoaXMgYWN0aW9uIGlzIG5ldmVyIHBlcmZvcm1lZCBhdXRvbWF0aWNhbGx5LiBIb3dldmVyLCBhbGwgbmV3bHkgbW9kaWZpZWQgdGVtcGxhdGVzIHdpbGwgYmUgYXV0b21hdGljYWxseSByZWNvbXBpbGVkIGJ5IHRoZSBzeXN0ZW0gYXQgdGhlIHRpbWUgb2YgdmlzaXQuPC9saT4NCjwvdWw+">UmVjb21waWxlIFRlbXBsYXRlcw==</PHRASE>
 			<PHRASE Label="la_title_SystemToolsRefreshThemeFiles" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2NhbnMgZm9yIG5ld2x5IGFkZGVkIEZyb250LWVuZCBUaGVtZSB0ZW1wbGF0ZXMgYWNyb3NzIGFsbCA8c3Ryb25nPjxpPmVuYWJsZWQ8L2k+PC9zdHJvbmc+IHRoZW1lcy4gVGhpcyBhY3Rpb24gaXMgcGVyZm9ybWVkIGF1dG9tYXRpY2FsbHkgd2hlbiBhIG5ldyB0aGVtZSBpcyBhZGRlZCBvciBleGlzdGluZyB0aGVtZSBpcyBlbmFibGVkLjwvbGk+DQogIDxsaT5BZGRpdGlvbmFsbHksIGRlbGV0ZXMgYWxsIGNvbXByZXNzZWQgYW5kIGNhY2hlZCBKYXZhc2NyaXB0L0NTUyBmaWxlcyAoLmpzIC5jc3MpIGxvYWRlZCB1c2luZyA8c3Ryb25nPjxpPiZsdDtpbnAyOm1fQ29tcHJlc3MgLi4uLyZndDs8L2k+PC9zdHJvbmc+IHRhZy48L2xpPg0KICA8bGk+VGhpcyBmdW5jdGlvbiBpcyBhbHNvIGF2YWlsYWJsZSBhcyBhICJSZWZyZXNoIiBidXR0b24gaW4gdGhlIFRoZW1lcyBzZWN0aW9uIHRvb2xiYXIgaW4gQWRtaW4gQ29uc29sZS48L2xpPg0KICA8bGk+VGhpcyBvcHRpb24gc2hvdWxkIGJlIHVzZWQgaW4gY2FzZSB3aGVuICI0MDQgTm90IEZvdW5kIiBwYWdlIGlzIHNob3duIGluc3RlYWQgb2YgZXhwZWN0ZWQgbmV3bHkgYWRkZWQgcGFnZSBvciB0ZW1wbGF0ZS48L2xpPg0KPC91bD4=">UmVmcmVzaCBUaGVtZSBGaWxlcw==</PHRASE>
 			<PHRASE Label="la_title_SystemToolsResetAdminConsoleSections" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+UmVzZXRzIHRoZSBjYWNoZSBvZiBBZG1pbiBDb25zb2xlIHNlY3Rpb25zIChsZWZ0IG1lbnUpLiBUaGUgZGVmaW5pdGlvbnMgb2Ygc2VjdGlvbnMgYXJlIHJlYWQgYW5kIGNvbGxlY3RlZCBmcm9tIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIHRoYXQgYWxyZWFkeSBiZWVuIHNjYW5uZWQgYW5kIGNhY2hlZCBieSB0aGUgc3lzdGVtLjwvbGk+DQogIDxsaT5Vc2UgdGhpcyByZXNldCBvcHRpb24gaWYgYSBuZXdseSBhZGRlZCBzZWN0aW9uIGRvZXNuJ3QgYXBwZWFyIGluIHRoZSBsZWZ0IEFkbWluIENvbnNvbGUgbWVudS48L2xpPg0KPC91bD4=">UmVzZXQgQWRtaW4gQ29uc29sZSBTZWN0aW9ucw==</PHRASE>
 			<PHRASE Label="la_title_SystemToolsResetAllKeys" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+UmVzZXRzIDxzdHJvbmc+PGk+QWxsIERhdGE8L2k+PC9zdHJvbmc+IHN0b3JlZCBpbiB0aGUgTWVtb3J5IENhY2hlLCBpbmNsdWRpbmcgYnV0IG5vdCBsaW1pdGVkIHRvIFN5c3RlbSBEYXRhIGFuZCBEYXRhYmFzZSBJdGVtcy48L2xpPg0KICA8bGk+VXNlIHdpdGggY2F1dGlvbiBkdWUgdG8gcG9zc2liaWxpdHkgb2YgbG9uZyBleGVjdXRpb24gdGltZS48L2xpPg0KPC91bD4=">UmVzZXQgQWxsIEtleXM=</PHRASE>
 			<PHRASE Label="la_title_SystemToolsResetConfigsAndParsedData" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2NhbnMgPHN0cm9uZz48aT4iY29yZSI8L2k+PC9zdHJvbmc+IGFuZCA8c3Ryb25nPjxpPiJtb2R1bGVzIjwvaT48L3N0cm9uZz4gZm9sZGVycyB0byBjYWNoZSB0aGUgbG9jYXRpb24gb2YgYWxsIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzLiBUaGUgZXhlY3V0aW9uIHRpbWUgZGVwZW5kcyBvbiB0aGUgbnVtYmVyIG9mIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIGZvdW5kLjwvbGk+DQogIDxsaT5SZXNldHMgdmFyaW91cyBjYWNoZWQgc3lzdGVtIGRhdGEgc3VjaCBhcyBkZWZpbmVkIFBIUCBDbGFzc2VzIChtYXBwaW5nIGJldHdlZW4gdGhlIGNsYXNzIG5hbWUgYW5kIHBoeXNpY2FsIGZpbGVuYW1lIGFuZCBsb2NhdGlvbiBvZiB0aGUgY2xhc3MpLCBIb29rcywgU2NoZWR1bGVkIFRhc2tzLCBDYWNoZWQgQ29uZmlndXJhdGlvbiBWYXJpYWJsZXMsIFJlcGxhY2VtZW50IFRlbXBsYXRlcywgUmV3cml0ZSBMaXN0ZW5lcnMgYW5kIExvYWRlZCBNb2R1bGVzLiBEYXRhIGlzIHJlYWQgYW5kIGNvbGxlY3RlZCBmcm9tIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIHRoYXQgYWxyZWFkeSBiZWVuIHNjYW5uZWQgYW5kIGNhY2hlZCBieSB0aGUgc3lzdGVtLjwvbGk+DQogIDxsaT5EZWxldGVzIGNvbXBpbGVkIHNraW5zIGZvciBBZG1pbiBDb25zb2xlIChjc3MgZmlsZXMpLjwvbGk+DQo8L3VsPg==">UmVzZXQgQ29uZmlncyBGaWxlcyBDYWNoZSBhbmQgUGFyc2VkIFN5c3RlbSBEYXRh</PHRASE>
 			<PHRASE Label="la_title_SystemToolsResetModRewriteCache" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+RGVsZXRlcyB0aGUgbWFwcGluZyBiZXR3ZWVuIHRoZSBGcm9udC1lbmQgVVJMcyBhbmQgYWN0dWFsIFRoZW1lIFRlbXBsYXRlcy4gVGhpcyBtYXBwaW5nIGlzIHVwZGF0ZWQgYXV0b21hdGljYWxseSwgd2hlbiB0aGUgd2Vic2l0ZSBTdHJ1Y3R1cmUgb3IgU2VjdGlvbnMgYXJlIGNoYW5nZWQuPC9saT4NCiAgPGxpPlVzZSB0aGlzIG9wdGlvbiBvbmx5IGluIGNhc2UgaWYgTW9kUmV3cml0ZSBtb2RlIGlzIGVuYWJsZWQgYW5kIGRpc3BsYXllZCBwYWdlIGRpZmZlcnMgZnJvbSB0aGUgcGFnZSB0aGF0IGl0IHNob3VsZCBiZSwgd2hlbiBnaXZlbiBVUkwgaXMgdmlzaXRlZC48L2xpPg0KPC91bD4=">UmVzZXQgTW9kUmV3cml0ZSBDYWNoZQ==</PHRASE>
 			<PHRASE Label="la_title_SystemToolsResetParsedCachedData" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+UmVzZXRzIHZhcmlvdXMgY2FjaGVkIHN5c3RlbSBkYXRhIHN1Y2ggYXMgZGVmaW5lZCBQSFAgQ2xhc3NlcyAobWFwcGluZyBiZXR3ZWVuIHRoZSBjbGFzcyBuYW1lIGFuZCBwaHlzaWNhbCBmaWxlbmFtZSBhbmQgbG9jYXRpb24gb2YgdGhlIGNsYXNzKSwgSG9va3MsIFNjaGVkdWxlZCBUYXNrcywgQ2FjaGVkIENvbmZpZ3VyYXRpb24gVmFyaWFibGVzLCBSZXBsYWNlbWVudCBUZW1wbGF0ZXMsIFJld3JpdGUgTGlzdGVuZXJzIGFuZCBMb2FkZWQgTW9kdWxlcy4gRGF0YSBpcyByZWFkIGFuZCBjb2xsZWN0ZWQgZnJvbSA8c3Ryb25nPjxpPlVuaXQgQ29uZmlnPC9pPjwvc3Ryb25nPiBmaWxlcyB0aGF0IGFscmVhZHkgYmVlbiBzY2FubmVkIGFuZCBjYWNoZWQgYnkgdGhlIHN5c3RlbS48L2xpPg0KPC91bD4=">UmVzZXQgUGFyc2VkIGFuZCBDYWNoZWQgU3lzdGVtIERhdGE=</PHRASE>
 			<PHRASE Label="la_title_SystemToolsResetSMSMenuCache" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+RGVsZXRlcyB0aGUgY2FjaGVkIHZlcnNpb24gb2YgRnJvbnQtZW5kIG1lbnUgKGRpc3BsYXllZCB2aWEgPHN0cm9uZz48aT4mbHQ7aW5wMjpzdF9DYWNoZWRNZW51IC4uLi8mZ3Q7PC9pPjwvc3Ryb25nPiB0YWcpLiBUaGlzIGNhY2hlIGlzIHVwZGF0ZWQgYXV0b21hdGljYWxseSwgd2hlbiB0aGUgd2Vic2l0ZSBzdHJ1Y3R1cmUgb3Igc2VjdGlvbnMgYXJlIGNoYW5nZWQuPC9saT4NCiAgPGxpPlVzZSB0aGlzIG9wdGlvbiBvbmx5IGluIGNhc2UgaWYgZGlzcGxheWVkIG1lbnUgb24gdGhlIEZyb250LWVuZCBkb2Vzbid0IG1hdGNoIHRoZSBtZW51IGRlZmluZWQgaW4gQWRtaW4gQ29uc29sZS48L2xpPg0KPC91bD4=">UmVzZXQgU01TIE1lbnUgQ2FjaGU=</PHRASE>
 			<PHRASE Label="la_title_SystemToolsShowDatabaseTableStructure" Module="Core" Type="1" Hint="PHVsPg0KICA8bGk+U2hvd3MgdGhlIHN0cnVjdHVyZSBvZiB0aGUgZGF0YWJhc2UgdGFibGUgbG9hZGluZyBpdCBieSB0aGUgVGFibGUgTmFtZSAodGFibGUgcHJlZml4IGlzIG9wdGlvbmFsKSBvciA8c3Ryb25nPjxpPlVuaXQgQ29uZmlnIFByZWZpeDwvaT48L3N0cm9uZz4gYXNzb2NpYXRlZCB3aXRoIHRoaXMgdGFibGUuPC9saT4NCjwvdWw+">U2hvdyBEYXRhYmFzZSBUYWJsZSBTdHJ1Y3R1cmU=</PHRASE>
 			<PHRASE Label="la_title_SystemToolsSynchronizeDBRevisions" Module="Core" Type="1" Hint="PHVsPg0KPGxpPkFzIGEgcmVzdWx0LCBzY3JpcHQgd2lsbCBWYWxpZGF0ZSBjdXJyZW50IDxiPjx1PnByb2plY3RfdXBncmFkZXMuc3FsPC91PjwvYj4gZmlsZSBhbmQgb3V0bGluZSBhbnkgZXJyb3JzIG9yIGluY29uc2lzdGVuY2llcywgYW5kIGF1dG8tcG9wdWxhdGUgYWxsIG1pc3NpbmcgREIgUmV2aXNpb25zIGZyb20gdGhlIGZpbGUgaW50byBBcHBsaWVkREJSZXZpc2lvbnMuPC9saT4NCjxsaT48YiBzdHlsZT0iY29sb3I6cmVkIj5OT1RFOjwvYj4gRGV2ZWxvcGVycyBzaG91bGQgT05MWSBydW4gdGhpcyBiZWZvcmUgdGhleSBwZXJmb3JtIFJlcG9zaXRvcnkgVXBkYXRlcyBvbiB0aGVpIHdvcmtpbmcgY29weSE8L2xpPg0KPC91bD4=">U3luY2hyb25pemUgRGF0YWJhc2UgUmV2aXNpb25z</PHRASE>
 			<PHRASE Label="la_title_ThemeFiles" Module="Core" Type="1">VGhlbWUgRmlsZXM=</PHRASE>
 			<PHRASE Label="la_title_Thesaurus" Module="Core" Type="1">VGhlc2F1cnVz</PHRASE>
 			<PHRASE Label="la_title_UpdatingCategories" Module="Core" Type="1">VXBkYXRpbmcgU2VjdGlvbnM=</PHRASE>
 			<PHRASE Label="la_title_Users" Module="Core" Type="1">VXNlcnM=</PHRASE>
 			<PHRASE Label="la_title_ViewingEmailLog" Module="Core" Type="1">Vmlld2luZyBFbWFpbCBMb2c=</PHRASE>
 			<PHRASE Label="la_title_ViewingFormSubmission" Module="Core" Type="1">Vmlld2luZyBmb3JtIHN1Ym1pc3Npb24=</PHRASE>
 			<PHRASE Label="la_title_ViewingMailingList" Module="Core" Type="1">Vmlld2luZyBNYWlsaW5nIExpc3Q=</PHRASE>
 			<PHRASE Label="la_title_ViewingReply" Module="Core" Type="1">Vmlld2luZyBSZXBseQ==</PHRASE>
 			<PHRASE Label="la_title_ViewingRevision" Module="Core" Type="1">Vmlld2luZyBSZXZpc2lvbiAjJXMgKCVzKQ==</PHRASE>
 			<PHRASE Label="la_title_Visits" Module="Core" Type="1">VmlzaXRz</PHRASE>
 			<PHRASE Label="la_title_Website" Module="Core" Type="1">V2Vic2l0ZQ==</PHRASE>
 			<PHRASE Label="la_To" Module="Core" Type="1">dG8=</PHRASE>
 			<PHRASE Label="la_ToolTipShort_Edit_Current_Category" Module="Core" Type="1">Q3Vyci4gU2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_ToolTipShort_Move_Down" Module="Core" Type="1">RG93bg==</PHRASE>
 			<PHRASE Label="la_ToolTipShort_Move_Up" Module="Core" Type="1">VXA=</PHRASE>
 			<PHRASE Label="la_ToolTip_Add" Module="Core" Type="1">QWRk</PHRASE>
 			<PHRASE Label="la_ToolTip_AddToGroup" Module="Core" Type="1">QWRkIFVzZXIgdG8gR3JvdXA=</PHRASE>
 			<PHRASE Label="la_ToolTip_AddUserToGroup" Module="Core" Type="1">QWRkIFVzZXIgVG8gR3JvdXA=</PHRASE>
 			<PHRASE Label="la_ToolTip_Approve" Module="Core" Type="1">QXBwcm92ZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Back" Module="Core" Type="1">QmFjaw==</PHRASE>
 			<PHRASE Label="la_ToolTip_cancel" Module="Core" Type="1">Q2FuY2Vs</PHRASE>
 			<PHRASE Label="la_ToolTip_ClearClipboard" Module="Core" Type="1">Q2xlYXIgQ2xpcGJvYXJk</PHRASE>
 			<PHRASE Label="la_ToolTip_Clone" Module="Core" Type="1">Q2xvbmU=</PHRASE>
 			<PHRASE Label="la_ToolTip_CloneUser" Module="Core" Type="1">Q2xvbmUgVXNlcnM=</PHRASE>
 			<PHRASE Label="la_ToolTip_close" Module="Core" Type="1">Q2xvc2U=</PHRASE>
 			<PHRASE Label="la_ToolTip_Copy" Module="Core" Type="1">Q29weQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Cut" Module="Core" Type="1">Q3V0</PHRASE>
 			<PHRASE Label="la_ToolTip_Decline" Module="Core" Type="1">RGVjbGluZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Delete" Module="Core" Type="1">RGVsZXRl</PHRASE>
 			<PHRASE Label="la_ToolTip_DeleteAll" Module="Core" Type="1">RGVsZXRlIEFsbA==</PHRASE>
 			<PHRASE Label="la_ToolTip_DeleteReview" Module="Core" Type="1">RGVsZXRlIFJldmlldw==</PHRASE>
 			<PHRASE Label="la_ToolTip_DeleteSpamReportOnly" Module="Core" Type="1">RGVsZXRlIFJlcG9ydCBPbmx5</PHRASE>
 			<PHRASE Label="la_ToolTip_Deny" Module="Core" Type="1">RGVueQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Details" Module="Core" Type="1">RGV0YWlscw==</PHRASE>
 			<PHRASE Label="la_ToolTip_Disable" Module="Core" Type="1">RGlzYWJsZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Discard" Module="Core" Type="1">RGlzY2FyZA==</PHRASE>
 			<PHRASE Label="la_ToolTip_Edit" Module="Core" Type="1">RWRpdA==</PHRASE>
 			<PHRASE Label="la_ToolTip_Edit_Current_Category" Module="Core" Type="1">RWRpdCBDdXJyZW50IFNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_ToolTip_Email_FrontOnly" Module="Core" Type="1">RnJvbnQtRW5kIE9ubHk=</PHRASE>
 			<PHRASE Label="la_ToolTip_Enable" Module="Core" Type="1">RW5hYmxl</PHRASE>
 			<PHRASE Label="la_ToolTip_Export" Module="Core" Type="1">RXhwb3J0</PHRASE>
 			<PHRASE Label="la_ToolTip_ExportLanguage" Module="Core" Type="1">RXhwb3J0IExhbmd1YWdl</PHRASE>
 			<PHRASE Label="la_ToolTip_HideMenu" Module="Core" Type="1">SGlkZSBNZW51</PHRASE>
 			<PHRASE Label="la_ToolTip_History" Module="Core" Type="1">SGlzdG9yeQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Home" Module="Core" Type="1">SG9tZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Import" Module="Core" Type="1">SW1wb3J0</PHRASE>
 			<PHRASE Label="la_ToolTip_ImportLanguage" Module="Core" Type="1">SW1wb3J0IExhbmd1YWdl</PHRASE>
 			<PHRASE Label="la_ToolTip_LoginAs" Module="Core" Type="1">TG9naW4gQXM=</PHRASE>
 			<PHRASE Label="la_ToolTip_MoveDown" Module="Core" Type="1">TW92ZSBEb3du</PHRASE>
 			<PHRASE Label="la_ToolTip_MoveUp" Module="Core" Type="1">TW92ZSBVcA==</PHRASE>
 			<PHRASE Label="la_ToolTip_NewBaseStyle" Module="Core" Type="1">TmV3IEJhc2UgU3R5bGU=</PHRASE>
 			<PHRASE Label="la_ToolTip_NewBlockStyle" Module="Core" Type="1">TmV3IEJsb2NrIFN0eWxl</PHRASE>
 			<PHRASE Label="la_ToolTip_NewCountryState" Module="Core" Type="1">TmV3IENvdW50cnkvU3RhdGU=</PHRASE>
 			<PHRASE Label="la_ToolTip_NewGroup" Module="Core" Type="1">TmV3IEdyb3Vw</PHRASE>
 			<PHRASE Label="la_ToolTip_newlabel" Module="Core" Type="1">TmV3IGxhYmVs</PHRASE>
 			<PHRASE Label="la_ToolTip_NewLanguage" Module="Core" Type="1">TmV3IExhbmd1YWdl</PHRASE>
 			<PHRASE Label="la_ToolTip_NewPermission" Module="Core" Type="1">TmV3IFBlcm1pc3Npb24=</PHRASE>
 			<PHRASE Label="la_ToolTip_NewPhrase" Module="Core" Type="1">TmV3IFBocmFzZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_NewReview" Module="Core" Type="1">TmV3IENvbW1lbnQ=</PHRASE>
 			<PHRASE Label="la_ToolTip_NewScheduledTask" Module="Core" Type="1">TmV3IFNjaGVkdWxlZCBUYXNr</PHRASE>
 			<PHRASE Label="la_ToolTip_NewSearchConfig" Module="Core" Type="1">TmV3IFNlYXJjaCBGaWVsZA==</PHRASE>
 			<PHRASE Label="la_ToolTip_NewSiteDomain" Module="Core" Type="1">TmV3IFNpdGUgRG9tYWlu</PHRASE>
 			<PHRASE Label="la_ToolTip_NewStopWord" Module="Core" Type="1">TmV3IFN0b3AgV29yZA==</PHRASE>
 			<PHRASE Label="la_ToolTip_NewTerm" Module="Core" Type="1">TmV3IFRlcm0=</PHRASE>
 			<PHRASE Label="la_ToolTip_newtheme" Module="Core" Type="1">TmV3IFRoZW1l</PHRASE>
 			<PHRASE Label="la_ToolTip_NewUser" Module="Core" Type="1">TmV3IFVzZXI=</PHRASE>
 			<PHRASE Label="la_ToolTip_New_Category" Module="Core" Type="1">TmV3IFNlY3Rpb24=</PHRASE>
 			<PHRASE Label="la_ToolTip_New_CustomField" Module="Core" Type="1">TmV3IEN1c3RvbSBGaWVsZA==</PHRASE>
 			<PHRASE Label="la_ToolTip_New_Form" Module="Core" Type="1">TmV3IEZvcm0=</PHRASE>
 			<PHRASE Label="la_ToolTip_New_FormField" Module="Core" Type="1">TmV3IEZvcm0gRmllbGQ=</PHRASE>
 			<PHRASE Label="la_ToolTip_new_images" Module="Core" Type="1">TmV3IEltYWdlcw==</PHRASE>
 			<PHRASE Label="la_ToolTip_New_Keyword" Module="Core" Type="1">QWRkIEtleXdvcmQ=</PHRASE>
 			<PHRASE Label="la_ToolTip_New_Relation" Module="Core" Type="1">TmV3IFJlbGF0aW9u</PHRASE>
 			<PHRASE Label="la_ToolTip_New_Template" Module="Core" Type="1">TmV3IFRlbXBsYXRl</PHRASE>
 			<PHRASE Label="la_ToolTip_Next" Module="Core" Type="1">TmV4dA==</PHRASE>
 			<PHRASE Label="la_ToolTip_Paste" Module="Core" Type="1">UGFzdGU=</PHRASE>
 			<PHRASE Label="la_ToolTip_Prev" Module="Core" Type="1">UHJldmlvdXM=</PHRASE>
 			<PHRASE Label="la_ToolTip_Preview" Module="Core" Type="1">UHJldmlldw==</PHRASE>
 			<PHRASE Label="la_ToolTip_PrimaryGroup" Module="Core" Type="1">U2V0IFByaW1hcnkgR3JvdXA=</PHRASE>
 			<PHRASE Label="la_ToolTip_Print" Module="Core" Type="1">UHJpbnQ=</PHRASE>
 			<PHRASE Label="la_ToolTip_ProcessQueue" Module="Core" Type="1">UHJvY2VzcyBRdWV1ZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Publish" Module="Core" Type="1">UHVibGlzaA==</PHRASE>
 			<PHRASE Label="la_ToolTip_RebuildCategoryCache" Module="Core" Type="1">UmVidWlsZCBTZWN0aW9uIENhY2hl</PHRASE>
 			<PHRASE Label="la_ToolTip_RecalculatePriorities" Module="Core" Type="1">UmVjYWxjdWxhdGUgUHJpb3JpdGllcw==</PHRASE>
 			<PHRASE Label="la_ToolTip_Refresh" Module="Core" Type="1">UmVmcmVzaA==</PHRASE>
 			<PHRASE Label="la_ToolTip_Reply" Module="Core" Type="1">UmVwbHk=</PHRASE>
 			<PHRASE Label="la_ToolTip_RescanThemes" Module="Core" Type="1">UmVzY2FuIFRoZW1lcw==</PHRASE>
 			<PHRASE Label="la_ToolTip_Resend" Module="Core" Type="1">UmVzZW5k</PHRASE>
 			<PHRASE Label="la_ToolTip_Reset" Module="Core" Type="1">UmVzZXQ=</PHRASE>
 			<PHRASE Label="la_ToolTip_ResetCounters" Module="Core" Type="1">UmVzZXQgQ291bnRlcnM=</PHRASE>
 			<PHRASE Label="la_ToolTip_ResetSettings" Module="Core" Type="1">UmVzZXQgUGVyc2lzdGVudCBTZXR0aW5ncw==</PHRASE>
 			<PHRASE Label="la_ToolTip_ResetToBase" Module="Core" Type="1">UmVzZXQgVG8gQmFzZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Run" Module="Core" Type="1">UnVu</PHRASE>
 			<PHRASE Label="la_ToolTip_RunSQL" Module="Core" Type="1">UnVuIFNRTA==</PHRASE>
 			<PHRASE Label="la_ToolTip_save" Module="Core" Type="1">U2F2ZQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_SaveAsDraft" Module="Core" Type="1">U2F2ZSBhcyBEcmFmdA==</PHRASE>
 			<PHRASE Label="la_ToolTip_Search" Module="Core" Type="1">U2VhcmNo</PHRASE>
 			<PHRASE Label="la_ToolTip_SearchReset" Module="Core" Type="1">UmVzZXQ=</PHRASE>
 			<PHRASE Label="la_ToolTip_SelectUser" Module="Core" Type="1">U2VsZWN0IFVzZXI=</PHRASE>
 			<PHRASE Label="la_ToolTip_Send" Module="Core" Type="1">U2VuZA==</PHRASE>
 			<PHRASE Label="la_ToolTip_SendEmail" Module="Core" Type="1">U2VuZCBFLW1haWw=</PHRASE>
 			<PHRASE Label="la_ToolTip_SendMail" Module="Core" Type="1">U2VuZCBFLW1haWw=</PHRASE>
 			<PHRASE Label="la_ToolTip_setPrimary" Module="Core" Type="1">U2V0IFByaW1hcnk=</PHRASE>
 			<PHRASE Label="la_ToolTip_setprimarycategory" Module="Core" Type="1">U2V0IFByaW1hcnkgU2VjdGlvbg==</PHRASE>
 			<PHRASE Label="la_ToolTip_SetPrimaryLanguage" Module="Core" Type="1">U2V0IFByaW1hcnkgTGFuZ3VhZ2U=</PHRASE>
 			<PHRASE Label="la_ToolTip_SetSticky" Module="Core" Type="1">U2V0IFN0aWNreQ==</PHRASE>
 			<PHRASE Label="la_ToolTip_Settings" Module="Core" Type="1">U2V0dGluZ3M=</PHRASE>
 			<PHRASE Label="la_ToolTip_ShowMenu" Module="Core" Type="1">U2hvdyBNZW51</PHRASE>
 			<PHRASE Label="la_ToolTip_SynchronizeLanguages" Module="Core" Type="1">U3luY2hyb25pemUgTGFuZ3VhZ2Vz</PHRASE>
 			<PHRASE Label="la_ToolTip_Tools" Module="Core" Type="1">VG9vbHM=</PHRASE>
 			<PHRASE Label="la_ToolTip_Up" Module="Core" Type="1">VXAgYSBTZWN0aW9u</PHRASE>
 			<PHRASE Label="la_ToolTip_ValidateSelected" Module="Core" Type="1">VmFsaWRhdGU=</PHRASE>
 			<PHRASE Label="la_ToolTip_View" Module="Core" Type="1">Vmlldw==</PHRASE>
 			<PHRASE Label="la_ToolTip_ViewDetails" Module="Core" Type="1">VmlldyBEZXRhaWxz</PHRASE>
 			<PHRASE Label="la_ToolTip_ViewItem" Module="Core" Type="1">Vmlldw==</PHRASE>
 			<PHRASE Label="la_to_date" Module="Core" Type="1">VG8gRGF0ZQ==</PHRASE>
 			<PHRASE Label="la_translate" Module="Core" Type="1">VHJhbnNsYXRl</PHRASE>
 			<PHRASE Label="la_Translated" Module="Core" Type="1">VHJhbnNsYXRlZA==</PHRASE>
 			<PHRASE Label="la_Trees" Module="Core" Type="1">VHJlZQ==</PHRASE>
 			<PHRASE Label="la_type_checkbox" Module="Core" Type="1">Q2hlY2tib3hlcw==</PHRASE>
 			<PHRASE Label="la_type_date" Module="Core" Type="1">RGF0ZQ==</PHRASE>
 			<PHRASE Label="la_type_datetime" Module="Core" Type="1">RGF0ZSAmIFRpbWU=</PHRASE>
 			<PHRASE Label="la_type_label" Module="Core" Type="1">TGFiZWw=</PHRASE>
 			<PHRASE Label="la_type_multiselect" Module="Core" Type="1">TXVsdGlwbGUgU2VsZWN0</PHRASE>
 			<PHRASE Label="la_type_password" Module="Core" Type="1">UGFzc3dvcmQgZmllbGQ=</PHRASE>
 			<PHRASE Label="la_type_radio" Module="Core" Type="1">UmFkaW8gYnV0dG9ucw==</PHRASE>
 			<PHRASE Label="la_type_select" Module="Core" Type="1">RHJvcCBkb3duIGZpZWxk</PHRASE>
 			<PHRASE Label="la_type_SingleCheckbox" Module="Core" Type="1">Q2hlY2tib3g=</PHRASE>
 			<PHRASE Label="la_type_text" Module="Core" Type="1">VGV4dCBmaWVsZA==</PHRASE>
 			<PHRASE Label="la_type_textarea" Module="Core" Type="1">VGV4dCBhcmVh</PHRASE>
 			<PHRASE Label="la_type_Upload" Module="Core" Type="1">RmlsZSBVcGxvYWQ=</PHRASE>
 			<PHRASE Label="la_Unchanged" Module="Core" Type="1">VW5jaGFuZ2Vk</PHRASE>
 			<PHRASE Label="la_Unicode" Module="Core" Type="1">VW5pY29kZQ==</PHRASE>
 			<PHRASE Label="la_updating_config" Module="Core" Type="1">VXBkYXRpbmcgQ29uZmlndXJhdGlvbg==</PHRASE>
 			<PHRASE Label="la_Upload" Module="Core" Type="1">VXBsb2Fk</PHRASE>
 			<PHRASE Label="la_UseCronForRegularEvent" Module="Core" Type="1">VXNlIENyb24gdG8gcnVuIFNjaGVkdWxlZCBUYXNrcw==</PHRASE>
 			<PHRASE Label="la_users_admin_group" Module="Core" Type="1">QXNzaWduIGFkbWluaXN0cmF0b3JzIHRvIGdyb3Vw</PHRASE>
 			<PHRASE Label="la_users_allow_new" Module="Core" Type="1">QWxsb3cgbmV3IHVzZXIgcmVnaXN0cmF0aW9u</PHRASE>
 			<PHRASE Label="la_users_assign_all_to" Module="Core" Type="1">QXNzaWduIEFsbCBVc2VycyBUbyBHcm91cA==</PHRASE>
 			<PHRASE Label="la_users_guest_group" Module="Core" Type="1">QXNzaWduIHVzZXJzIG5vdCBsb2dnZWQgaW4gdG8gZ3JvdXA=</PHRASE>
 			<PHRASE Label="la_users_new_group" Module="Core" Type="1">QXNzaWduIHJlZ2lzdGVyZWQgdXNlcnMgdG8gZ3JvdXA=</PHRASE>
 			<PHRASE Label="la_users_password_auto" Module="Core" Type="1">QXNzaWduIHBhc3N3b3JkIGF1dG9tYXRpY2FsbHk=</PHRASE>
 			<PHRASE Label="la_users_subscriber_group" Module="Core" Type="1">QXNzaWduIG1haWxpbmcgbGlzdCBzdWJzY3JpYmVycyB0byBncm91cA==</PHRASE>
 			<PHRASE Label="la_US_UK" Module="Core" Type="1">VVMvVUs=</PHRASE>
 			<PHRASE Label="la_ValidationEmail" Module="Core" Type="1">RS1tYWlsIGFkZHJlc3M=</PHRASE>
 			<PHRASE Label="la_Value" Module="Core" Type="1">VmFsdWU=</PHRASE>
 			<PHRASE Label="la_visit_DirectReferer" Module="Core" Type="1">RGlyZWN0IGFjY2VzcyBvciBib29rbWFyaw==</PHRASE>
 			<PHRASE Label="la_Warning_Enable_HTML" Module="Core" Type="1">V2FybmluZzogRW5hYmxpbmcgSFRNTCBpcyBhIHNlY3VyaXR5IHJpc2sgYW5kIGNvdWxkIGRhbWFnZSB0aGUgc3lzdGVtIGlmIHVzZWQgaW1wcm9wZXJseSE=</PHRASE>
 			<PHRASE Label="la_Warning_Filter" Module="Core" Type="1">QSBzZWFyY2ggb3IgYSBmaWx0ZXIgaXMgaW4gZWZmZWN0LiBZb3UgbWF5IG5vdCBiZSBzZWVpbmcgYWxsIG9mIHRoZSBkYXRhLg==</PHRASE>
 			<PHRASE Label="la_Warning_NewFormError" Module="Core" Type="1">T25lIG9yIG1vcmUgZmllbGRzIG9uIHRoaXMgZm9ybSBoYXMgYW4gZXJyb3IuPGJyLz4NCjxzbWFsbD5QbGVhc2UgbW92ZSB5b3VyIG1vdXNlIG92ZXIgdGhlIGZpZWxkcyBtYXJrZWQgd2l0aCByZWQgdG8gc2VlIHRoZSBlcnJvciBkZXRhaWxzLjwvc21hbGw+</PHRASE>
 			<PHRASE Label="la_Warning_Save_Item" Module="Core" Type="1">TW9kaWZpY2F0aW9ucyB3aWxsIG5vdCB0YWtlIGVmZmVjdCB1bnRpbCB5b3UgY2xpY2sgdGhlIFNhdmUgYnV0dG9uIQ==</PHRASE>
 			<PHRASE Label="la_week" Module="Core" Type="1">d2Vlaw==</PHRASE>
 			<PHRASE Label="la_Windows" Module="Core" Type="1">V2luZG93cw==</PHRASE>
 			<PHRASE Label="la_year" Module="Core" Type="1">eWVhcg==</PHRASE>
 			<PHRASE Label="la_Yes" Module="Core" Type="1">WWVz</PHRASE>
 			<PHRASE Label="lc_field_CachedDescendantCatsQty" Module="Core" Type="2">U3ViLXNlY3Rpb25zIFF1YW50aXR5</PHRASE>
 			<PHRASE Label="lc_field_CachedNavBar" Module="Core" Type="2">TmF2aWdhdGlvbiBCYXI=</PHRASE>
 			<PHRASE Label="lc_field_cachedrating" Module="Core" Type="2">UmF0aW5n</PHRASE>
 			<PHRASE Label="lc_field_cachedreviewsqty" Module="Core" Type="2">TnVtYmVyIG9mIFJldmlld3M=</PHRASE>
 			<PHRASE Label="lc_field_cachedvotesqty" Module="Core" Type="2">TnVtYmVyIG9mIFJhdGluZyBWb3Rlcw==</PHRASE>
 			<PHRASE Label="lc_field_CategoryId" Module="Core" Type="2">U2VjdGlvbiBJRA==</PHRASE>
 			<PHRASE Label="lc_field_createdbyid" Module="Core" Type="2">Q3JlYXRlZCBCeSBVc2VyIElE</PHRASE>
 			<PHRASE Label="lc_field_createdon" Module="Core" Type="2">RGF0ZSBDcmVhdGVk</PHRASE>
 			<PHRASE Label="lc_field_description" Module="Core" Type="2">RGVzY3JpcHRpb24=</PHRASE>
 			<PHRASE Label="lc_field_EditorsPick" Module="Core" Type="2">RWRpdG9ycyBQaWNr</PHRASE>
 			<PHRASE Label="lc_field_hits" Module="Core" Type="2">SGl0cw==</PHRASE>
 			<PHRASE Label="lc_field_hotitem" Module="Core" Type="2">SXRlbSBJcyBIb3Q=</PHRASE>
 			<PHRASE Label="lc_field_linkid" Module="Core" Type="2">TGluayBJRA==</PHRASE>
 			<PHRASE Label="lc_field_MetaDescription" Module="Core" Type="2">TWV0YSBEZXNjcmlwdGlvbg==</PHRASE>
 			<PHRASE Label="lc_field_MetaKeywords" Module="Core" Type="2">TWV0YSBLZXl3b3Jkcw==</PHRASE>
 			<PHRASE Label="lc_field_modified" Module="Core" Type="2">TGFzdCBNb2RpZmllZCBEYXRl</PHRASE>
 			<PHRASE Label="lc_field_modifiedbyid" Module="Core" Type="2">TW9kaWZpZWQgQnkgVXNlciBJRA==</PHRASE>
 			<PHRASE Label="lc_field_name" Module="Core" Type="2">TmFtZQ==</PHRASE>
 			<PHRASE Label="lc_field_newitem" Module="Core" Type="2">SXRlbSBJcyBOZXc=</PHRASE>
 			<PHRASE Label="lc_field_notifyowneronchanges" Module="Core" Type="2">Tm90aWZ5IE93bmVyIG9mIENoYW5nZXM=</PHRASE>
 			<PHRASE Label="lc_field_orgid" Module="Core" Type="2">T3JpZ2luYWwgSXRlbSBJRA==</PHRASE>
 			<PHRASE Label="lc_field_ownerid" Module="Core" Type="2">T3duZXIgVXNlciBJRA==</PHRASE>
 			<PHRASE Label="lc_field_ParentId" Module="Core" Type="2">UGFyZW50IElE</PHRASE>
 			<PHRASE Label="lc_field_ParentPath" Module="Core" Type="2">UGFyZW50IFBhdGg=</PHRASE>
 			<PHRASE Label="lc_field_popitem" Module="Core" Type="2">SXRlbSBJcyBQb3B1bGFy</PHRASE>
 			<PHRASE Label="lc_field_priority" Module="Core" Type="2">UHJpb3JpdHk=</PHRASE>
 			<PHRASE Label="lc_field_qtysold" Module="Core" Type="2">UXR5IFNvbGQ=</PHRASE>
 			<PHRASE Label="lc_field_resourceid" Module="Core" Type="2">UmVzb3VyY2UgSUQ=</PHRASE>
 			<PHRASE Label="lc_field_status" Module="Core" Type="2">U3RhdHVz</PHRASE>
 			<PHRASE Label="lc_field_topseller" Module="Core" Type="2">SXRlbSBJcyBhIFRvcCBTZWxsZXI=</PHRASE>
 			<PHRASE Label="lc_field_url" Module="Core" Type="2">VVJM</PHRASE>
 			<PHRASE Label="lc_importlang_phrasewarning" Module="Core" Type="2">RW5hYmxpbmcgdGhpcyBvcHRpb24gd2lsbCB1bmRvIGFueSBjaGFuZ2VzIHlvdSBoYXZlIG1hZGUgdG8gZXhpc3RpbmcgcGhyYXNlcw==</PHRASE>
 			<PHRASE Label="lc_of" Module="Core" Type="2">b2Y=</PHRASE>
 			<PHRASE Label="lc_Text_Invalid" Module="Core" Type="2">SW52YWxpZA==</PHRASE>
 			<PHRASE Label="lc_Text_Not_Validated" Module="Core" Type="2">Tm90IFZhbGlkYXRlZA==</PHRASE>
 			<PHRASE Label="lc_Text_Valid" Module="Core" Type="2">VmFsaWQ=</PHRASE>
 		</PHRASES>
 		<EVENTS>
 			<EVENT Event="CATEGORY.ADD" Type="0">
 				<SUBJECT>TmV3IENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIC0gQWRkZWQ=</SUBJECT>
 				<HTMLBODY>WW91ciBzdWdnZXN0ZWQgY2F0ZWdvcnkgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaGFzIGJlZW4gYWRkZWQu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="CATEGORY.ADD" Type="1">
 				<SUBJECT>TmV3IENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIFN1Ym1pdHRlZCBieSBVc2Vycw==</SUBJECT>
 				<HTMLBODY>QSBjYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBhZGRlZC4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="CATEGORY.ADD.PENDING" Type="0">
 				<SUBJECT>U3VnZ2VzdGVkIENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGlzIFBlbmRpbmc=</SUBJECT>
 				<HTMLBODY>VGhlIGNhdGVnb3J5IHlvdSBzdWdnZXN0ZWQgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaXMgcGVuZGluZyBmb3IgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwuDQoNClRoYW5rIHlvdSE=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="CATEGORY.ADD.PENDING" Type="1">
 				<SUBJECT>U3VnZ2VzdGVkIENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGlzIFBlbmRpbmc=</SUBJECT>
 				<HTMLBODY>QSBjYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBhZGRlZCwgcGVuZGluZyB5b3VyIGNvbmZpcm1hdGlvbi4gIFBsZWFzZSByZXZpZXcgdGhlIGNhdGVnb3J5IGFuZCBhcHByb3ZlIG9yIGRlbnkgaXQu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="CATEGORY.APPROVE" Type="0">
 				<SUBJECT>QSBjYXRlZ29yeSBoYXMgYmVlbiBhcHByb3ZlZA==</SUBJECT>
 				<HTMLBODY>WW91ciBzdWdnZXN0ZWQgY2F0ZWdvcnkgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaGFzIGJlZW4gYXBwcm92ZWQu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="CATEGORY.DENY" Type="0">
 				<SUBJECT>WW91ciBDYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBEZW5pZWQ=</SUBJECT>
 				<HTMLBODY>WW91ciBjYXRlZ29yeSBzdWdnZXN0aW9uICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGhhcyBiZWVuIGRlbmllZC4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="FORM.SUBMISSION.REPLY.FROM.USER" Type="1">
 				<SUBJECT>TmV3IEVtYWlsIFJFUExZIFJlY2VpdmVkIGluICJGZWVkYmFjayBNYW5hZ2VyIiAoPGlucDI6Zm9ybXN1YnMuLWl0ZW1fRmllbGQgbmFtZT0iRm9ybVN1Ym1pc3Npb25JZCIvPik=</SUBJECT>
 				<HTMLBODY>TmV3IEVtYWlsIFJFUExZIFJlY2VpdmVkIGluICZxdW90O0ZlZWRiYWNrIE1hbmFnZXImcXVvdDsuPGJyIC8+DQo8YnIgLz4NCk9yaWdpbmFsIEZlZWRiYWNrSWQ6IDxpbnAyOmZvcm1zdWJzLi1pdGVtX0ZpZWxkIG5hbWU9IkZvcm1TdWJtaXNzaW9uSWQiLz4gPGJyIC8+DQpPcmlnaW5hbCBTdWJqZWN0OiA8aW5wMjpmb3Jtc3Vicy4taXRlbV9Gb3JtRmllbGQgcm9sZT0ic3ViamVjdCIvPiA8YnIgLz4NCjxiciAvPg0KUGxlYXNlIHByb2NlZWQgdG8gdGhlIEFkbWluIENvbnNvbGUgaW4gb3JkZXIgdG8gcmV2aWV3IGFuZCByZXBseSB0byB0aGUgdXNlci4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED" Type="1">
 				<SUBJECT>TmV3IEVtYWlsIC0gRGVsaXZlcnkgRmFpbHVyZSBSZWNlaXZlZCBpbiAiRmVlZGJhY2sgTWFuYWdlciIgKDxpbnAyOmZvcm1zdWJzLi1pdGVtX0ZpZWxkIG5hbWU9IkZvcm1TdWJtaXNzaW9uSWQiLz4p</SUBJECT>
 				<HTMLBODY>TmV3IEVtYWlsIERlbGl2ZXJ5IEZhaWx1cmUgUmVjZWl2ZWQgaW4gJnF1b3Q7RmVlZGJhY2sgTWFuYWdlciZxdW90Oy48YnIgLz4NCjxiciAvPg0KT3JpZ2luYWwgRmVlZGJhY2tJZDogPGlucDI6Zm9ybXN1YnMuLWl0ZW1fRmllbGQgbmFtZT0iRm9ybVN1Ym1pc3Npb25JZCIvPiA8YnIgLz4NCk9yaWdpbmFsIFN1YmplY3Q6IDxpbnAyOmZvcm1zdWJzLi1pdGVtX0Zvcm1GaWVsZCByb2xlPSJzdWJqZWN0Ii8+IDxiciAvPg0KPGJyIC8+DQpQbGVhc2UgcHJvY2VlZCB0byB0aGUgQWRtaW4gQ29uc29sZSBpbiBvcmRlciB0byByZXZpZXcgYW5kIHJlcGx5IHRvIHRoZSB1c2VyLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="FORM.SUBMISSION.REPLY.TO.USER" Type="1">
 				<SUBJECT>PGlucDI6bV9QYXJhbSBuYW1lPSJzdWJqZWN0Ii8+ICN2ZXJpZnk8aW5wMjpzdWJtaXNzaW9uLWxvZ19GaWVsZCBuYW1lPSJWZXJpZnlDb2RlIi8+</SUBJECT>
 				<PLAINTEXTBODY>PGlucDI6bV9QYXJhbSBuYW1lPSJtZXNzYWdlIi8+</PLAINTEXTBODY>
 			</EVENT>
 			<EVENT Event="FORM.SUBMITTED" Type="0">
 				<SUBJECT>VGhhbmsgWW91IGZvciBDb250YWN0aW5nIFVzIQ==</SUBJECT>
 				<HTMLBODY>PHA+VGhhbmsgeW91IGZvciBjb250YWN0aW5nIHVzLiBXZSdsbCBiZSBpbiB0b3VjaCB3aXRoIHlvdSBzaG9ydGx5ITwvcD4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="FORM.SUBMITTED" Type="1">
 				<SUBJECT>TmV3IGZvcm0gc3VibWlzc2lvbg==</SUBJECT>
 				<HTMLBODY>PHA+Rm9ybSBoYXMgYmVlbiBzdWJtaXR0ZWQuIFBsZWFzZSBwcm9jZWVkIHRvIHRoZSBBZG1pbiBDb25zb2xlIHRvIHJldmlldyB0aGUgc3VibWlzc2lvbiE8L3A+</HTMLBODY>
 			</EVENT>
 			<EVENT Event="ROOT.RESET.PASSWORD" Type="1">
 				<SUBJECT>Um9vdCBSZXNldCBQYXNzd29yZA==</SUBJECT>
 				<HTMLBODY>WW91ciBuZXcgcGFzc3dvcmQgaXM6IDxpbnAyOm1fUGFyYW0gbmFtZT0icGFzc3dvcmQiLz4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.ADD" Type="0">
 				<SUBJECT>SW4tcG9ydGFsIHJlZ2lzdHJhdGlvbg==</SUBJECT>
 				<HTMLBODY>RGVhciA8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIgLz4gPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSJMYXN0TmFtZSIgLz4sDQoNClRoYW5rIHlvdSBmb3IgcmVnaXN0ZXJpbmcgb24gPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPi4gWW91ciByZWdpc3RyYXRpb24gaXMgbm93IGFjdGl2ZS4NCjxpbnAyOm1faWYgY2hlY2s9InUucmVnaXN0ZXJfRmllbGQiIG5hbWU9IkVtYWlsIj4NCjxici8+PGJyLz4NClBsZWFzZSBjbGljayBoZXJlIHRvIHZlcmlmeSB5b3VyIEUtbWFpbCBhZGRyZXNzOg0KPGEgaHJlZj0iPGlucDI6dS5yZWdpc3Rlcl9Db25maXJtUGFzc3dvcmRMaW5rIHQ9InBsYXRmb3JtL215X2FjY291bnQvdmVyaWZ5X2VtYWlsIiBub19hbXA9IjEiLz4iPjxpbnAyOnUucmVnaXN0ZXJfQ29uZmlybVBhc3N3b3JkTGluayB0PSJwbGF0Zm9ybS9teV9hY2NvdW50L3ZlcmlmeV9lbWFpbCIgbm9fYW1wPSIxIi8+PC9hPjxici8+PGJyLz4NCjwvaW5wMjptX2lmPg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.ADD" Type="1">
 				<SUBJECT>TmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KQ==</SUBJECT>
 				<HTMLBODY>QSBuZXcgdXNlciAiPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSdVc2VybmFtZScvPiIgaGFzIGJlZW4gYWRkZWQu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.ADD.BYADMIN" Type="0">
 				<SUBJECT>TmV3IHVzZXIgaGFzIGJlZW4gY3JlYXRlZA==</SUBJECT>
 				<PLAINTEXTBODY>RGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgdXNlciBoYXMgYmVlbiBjcmVhdGVkIGFuZCBhc3NpZ25lZCB0byB5b3UNCg0KTm93IHlvdSBjYW4gbG9naW4gdXNpbmcgdGhlIGZvbGxvd2luZyBjcmVkZW50aWFsczoNCg0KPGlucDI6bV9pZiBjaGVjaz0idV9GaWVsZCIgbmFtZT0iVXNlcm5hbWUiPlVzZXJuYW1lOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+PGlucDI6bV9lbHNlLz5FLW1haWw6IDxpbnAyOnVfRmllbGQgbmFtZT0iRW1haWwiLz48L2lucDI6bV9pZj4gDQpQYXNzd29yZDogPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiANCg==</PLAINTEXTBODY>
 			</EVENT>
 			<EVENT Event="USER.ADD.PENDING" Type="0">
 				<SUBJECT>TmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+PGlucDI6bV9pZiBjaGVjaz0ibV9HZXRDb25maWciIG5hbWU9IlVzZXJfQWxsb3dfTmV3IiBlcXVhbHNfdG89IjQiPiAtIEFjdGl2YXRpb24gRW1haWw8L2lucDI6bV9pZj4p</SUBJECT>
 				<HTMLBODY>RGVhciA8aW5wMjp1LnJlZ2lzdGVyX0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIgLz4gPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSJMYXN0TmFtZSIgLz4sPGJyIC8+DQo8YnIgLz4NCjxpbnAyOm1faWYgY2hlY2s9Im1fR2V0Q29uZmlnIiBuYW1lPSJVc2VyX0FsbG93X05ldyIgZXF1YWxzX3RvPSI0Ij4NCglUaGFuayB5b3UgZm9yIHJlZ2lzdGVyaW5nIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZS4gVG8gYWN0aXZhdGUgeW91ciByZWdpc3RyYXRpb24gcGxlYXNlIGZvbGxvdyBsaW5rIGJlbG93LiA8aW5wMjp1LnJlZ2lzdGVyX0FjdGl2YXRpb25MaW5rIHRlbXBsYXRlPSJwbGF0Zm9ybS9sb2dpbi9hY3RpdmF0ZV9jb25maXJtIi8+DQo8aW5wMjptX2Vsc2UvPg0KCVRoYW5rIHlvdSBmb3IgcmVnaXN0ZXJpbmcgb24gPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPiB3ZWJzaXRlLiBZb3VyIHJlZ2lzdHJhdGlvbiB3aWxsIGJlIGFjdGl2ZSBhZnRlciBhcHByb3ZhbC4gDQoJDQoJPGlucDI6bV9pZiBjaGVjaz0idS5yZWdpc3Rlcl9GaWVsZCIgbmFtZT0iRW1haWwiPg0KCQk8YnIvPjxici8+DQoJCVBsZWFzZSBjbGljayBoZXJlIHRvIHZlcmlmeSB5b3VyIEUtbWFpbCBhZGRyZXNzOg0KCQk8YSBocmVmPSI8aW5wMjp1LnJlZ2lzdGVyX0NvbmZpcm1QYXNzd29yZExpbmsgdD0icGxhdGZvcm0vbXlfYWNjb3VudC92ZXJpZnlfZW1haWwiIG5vX2FtcD0iMSIvPiI+PGlucDI6dS5yZWdpc3Rlcl9Db25maXJtUGFzc3dvcmRMaW5rIHQ9InBsYXRmb3JtL215X2FjY291bnQvdmVyaWZ5X2VtYWlsIiBub19hbXA9IjEiLz48L2E+PGJyLz48YnIvPg0KCTwvaW5wMjptX2lmPg0KPC9pbnAyOm1faWY+</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.ADD.PENDING" Type="1">
 				<SUBJECT>TmV3IFVzZXIgUmVnaXN0ZXJlZA==</SUBJECT>
 				<HTMLBODY>QSBuZXcgdXNlciAiPGlucDI6dS5yZWdpc3Rlcl9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIHJlZ2lzdGVyZWQgYW5kIGlzIHBlbmRpbmcgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.APPROVE" Type="0">
 				<SUBJECT>WW91ciBBY2NvdW50IGlzIEFjdGl2ZQ==</SUBJECT>
 				<HTMLBODY>V2VsY29tZSB0byA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+IQ0KDQpZb3VyIHVzZXIgcmVnaXN0cmF0aW9uIGhhcyBiZWVuIGFwcHJvdmVkLiBZb3VyIHVzZXIgbmFtZSBpczogIjxpbnAyOnVfRmllbGQgbmFtZT0iVXNlcm5hbWUiLz4iLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.APPROVE" Type="1">
 				<SUBJECT>TmV3IFVzZXIgQWNjb3VudCAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgd2FzIEFwcHJvdmVk</SUBJECT>
 				<HTMLBODY>VXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gYXBwcm92ZWQu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.DENY" Type="0">
 				<SUBJECT>WW91ciBSZWdpc3RyYXRpb24gaGFzIGJlZW4gRGVuaWVk</SUBJECT>
 				<HTMLBODY>WW91ciByZWdpc3RyYXRpb24gb24gPGEgaHJlZj0iPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPiI+PGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPjwvYT4gd2Vic2l0ZSBoYXMgYmVlbiBkZW5pZWQu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.DENY" Type="1">
 				<SUBJECT>VXNlciBSZWdpc3RyYXRpb24gZm9yICAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gRGVuaWVk</SUBJECT>
 				<HTMLBODY>VXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gZGVuaWVkLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.EMAIL.CHANGE.UNDO" Type="0">
 				<SUBJECT>Q2hhbmdlZCBFLW1haWwgUm9sbGJhY2s=</SUBJECT>
 				<HTMLBODY>SGVsbG8sPGJyLz48YnIvPg0KDQpJdCBzZWVtcyB0aGF0IHlvdSBoYXZlIGNoYW5nZWQgZS1tYWlsIGluIHlvdXIgSW4tcG9ydGFsIGFjY291bnQuIFlvdSBtYXkgdW5kbyB0aGlzIGNoYW5nZSBieSBjbGlja2luZyBvbiB0aGUgbGluayBiZWxvdzo8YnIvPjxici8+DQoNCjxhIGhyZWY9IjxpbnAyOnVfVW5kb0VtYWlsQ2hhbmdlTGluayB0ZW1wbGF0ZT0icGxhdGZvcm0vbXlfYWNjb3VudC9yZXN0b3JlX2VtYWlsIi8+Ij48aW5wMjp1X1VuZG9FbWFpbENoYW5nZUxpbmsgdGVtcGxhdGU9InBsYXRmb3JtL215X2FjY291bnQvcmVzdG9yZV9lbWFpbCIvPjwvYT48YnIvPjxici8+DQoNCklmIHlvdSBiZWxpZXZlIHlvdSBoYXZlIHJlY2VpdmVkIHRoaXMgZW1haWwgaW4gZXJyb3IsIHBsZWFzZSBpZ25vcmUgdGhpcyBlbWFpbC4gWW91ciBhY2NvdW50IHdpbGwgYmUgbGlua2VkIHRvIGFub3RoZXIgZS1tYWlsIHVubGVzcyB5b3UgaGF2ZSBjbGlja2VkIG9uIHRoZSBhYm92ZSBsaW5rLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.EMAIL.CHANGE.VERIFY" Type="0">
 				<SUBJECT>Q2hhbmdlZCBFLW1haWwgVmVyaWZpY2F0aW9u</SUBJECT>
 				<HTMLBODY>SGVsbG8sPGJyLz48YnIvPg0KDQpJdCBzZWVtcyB0aGF0IHlvdSBoYXZlIGNoYW5nZWQgZS1tYWlsIGluIHlvdXIgSW4tcG9ydGFsIGFjY291bnQuIFBsZWFzZSB2ZXJpZnkgdGhpcyBuZXcgZS1tYWlsIGJ5IGNsaWNraW5nIG9uIHRoZSBsaW5rIGJlbG93Ojxici8+PGJyLz4NCg0KPGEgaHJlZj0iPGlucDI6dV9Db25maXJtUGFzc3dvcmRMaW5rIHQ9InBsYXRmb3JtL215X2FjY291bnQvdmVyaWZ5X2VtYWlsIiBub19hbXA9IjEiLz4iPjxpbnAyOnVfQ29uZmlybVBhc3N3b3JkTGluayB0PSJwbGF0Zm9ybS9teV9hY2NvdW50L3ZlcmlmeV9lbWFpbCIgbm9fYW1wPSIxIi8+PC9hPjxici8+PGJyLz4NCg0KSWYgeW91IGJlbGlldmUgeW91IGhhdmUgcmVjZWl2ZWQgdGhpcyBlbWFpbCBpbiBlcnJvciwgcGxlYXNlIGlnbm9yZSB0aGlzIGVtYWlsLiBZb3VyIGVtYWlsIHdpbGwgbm90IGdldCB2ZXJpZmllZCBzdGF0dXMgdW5sZXNzIHlvdSBoYXZlIGNsaWNrZWQgb24gdGhlIGFib3ZlIGxpbmsuDQo=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.MEMBERSHIP.EXPIRATION.NOTICE" Type="0">
 				<SUBJECT>TWVtYmVyc2hpcCBFeHBpcmF0aW9uIE5vdGljZQ==</SUBJECT>
 				<HTMLBODY>WW91ciBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZSB3aWxsIHNvb24gZXhwaXJlLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.MEMBERSHIP.EXPIRATION.NOTICE" Type="1">
 				<SUBJECT>TWVtYmVyc2hpcCBFeHBpcmF0aW9uIE5vdGljZSBmb3IgIjxpbnAyOnVfRmllbGQgbmFtZT0iVXNlcm5hbWUiLz4iIFNlbnQ=</SUBJECT>
 				<HTMLBODY>VXNlciA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+IG1lbWJlcnNoaXAgd2lsbCBleHBpcmUgc29vbi4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.MEMBERSHIP.EXPIRED" Type="0">
 				<SUBJECT>WW91ciBNZW1iZXJzaGlwIEV4cGlyZWQ=</SUBJECT>
 				<HTMLBODY>WW91ciBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZSBoYXMgZXhwaXJlZC4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.MEMBERSHIP.EXPIRED" Type="1">
 				<SUBJECT>VXNlcidzIE1lbWJlcnNoaXAgRXhwaXJlZCAgKCA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KQ==</SUBJECT>
 				<HTMLBODY>VXNlcidzICg8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KSBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZSBoYXMgZXhwaXJlZC4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.NEW.PASSWORD" Type="0">
 				<SUBJECT>TmV3IHBhc3N3b3JkIGdlbmVyYXRlZA==</SUBJECT>
 				<PLAINTEXTBODY>RGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgcGFzc3dvcmQgaGFzIGJlZW4gZ2VuZXJhdGVkIGZvciB5b3VyIHVzZXIuDQoNCk5vdyB5b3UgY2FuIGxvZ2luIHVzaW5nIHRoZSBmb2xsb3dpbmcgY3JlZGVudGlhbHM6DQoNCjxpbnAyOm1faWYgY2hlY2s9InVfRmllbGQiIG5hbWU9IlVzZXJuYW1lIj5Vc2VybmFtZTogPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPjxpbnAyOm1fZWxzZS8+RS1tYWlsOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IkVtYWlsIi8+PC9pbnAyOm1faWY+IA0KUGFzc3dvcmQ6IDxpbnAyOnVfRmllbGQgbmFtZT0iUGFzc3dvcmRfcGxhaW4iLz4g</PLAINTEXTBODY>
 			</EVENT>
 			<EVENT Event="USER.PSWDC" Type="0">
 				<SUBJECT>UmVzZXQgUGFzc3dvcmQgQ29uZmlybWF0aW9u</SUBJECT>
 				<HTMLBODY>SGVsbG8sPGJyLz48YnIvPg0KDQpJdCBzZWVtcyB0aGF0IHlvdSBoYXZlIHJlcXVlc3RlZCBhIHBhc3N3b3JkIHJlc2V0IGZvciB5b3VyIEluLXBvcnRhbCBhY2NvdW50LiBJZiB5b3Ugd291bGQgbGlrZSB0byBwcm9jZWVkIGFuZCBjaGFuZ2UgdGhlIHBhc3N3b3JkLCBwbGVhc2UgY2xpY2sgb24gdGhlIGxpbmsgYmVsb3c6PGJyLz48YnIvPg0KDQo8YSBocmVmPSI8aW5wMjp1X0NvbmZpcm1QYXNzd29yZExpbmsgbm9fYW1wPSIxIi8+Ij48aW5wMjp1X0NvbmZpcm1QYXNzd29yZExpbmsgbm9fYW1wPSIxIi8+PC9hPjxici8+PGJyLz4NCg0KWW91IHdpbGwgcmVjZWl2ZSBhIHNlY29uZCBlbWFpbCB3aXRoIHlvdXIgbmV3IHBhc3N3b3JkIHNob3J0bHkuPGJyLz48YnIvPg0KDQpJZiB5b3UgYmVsaWV2ZSB5b3UgaGF2ZSByZWNlaXZlZCB0aGlzIGVtYWlsIGluIGVycm9yLCBwbGVhc2UgaWdub3JlIHRoaXMgZW1haWwuIFlvdXIgcGFzc3dvcmQgd2lsbCBub3QgYmUgY2hhbmdlZCB1bmxlc3MgeW91IGhhdmUgY2xpY2tlZCBvbiB0aGUgYWJvdmUgbGluay4NCg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.SUBSCRIBE" Type="0">
 				<SUBJECT>U3Vic2NyaWJlZCB0byBhIE1haWxpbmcgTGlzdCBvbiA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+</SUBJECT>
 				<HTMLBODY>WW91IGhhdmUgc3Vic2NyaWJlZCB0byBhIG1haWxpbmcgbGlzdCBvbiA8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+IHdlYnNpdGUu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.SUBSCRIBE" Type="1">
 				<SUBJECT>TmV3IFVzZXIgaGFzIFN1YnNjcmliZWQgdG8gYSBNYWxsaW5nIExpc3Q=</SUBJECT>
 				<HTMLBODY>TmV3IHVzZXIgPGlucDI6dV9GaWVsZCBuYW1lPSJFbWFpbCIvPiBoYXMgc3Vic2NyaWJlZCB0byBhIG1haWxpbmcgbGlzdCBvbiA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPiB3ZWJzaXRlLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.SUGGEST" Type="0">
 				<SUBJECT>Q2hlY2sgb3V0IHRoaXMgV2Vic2l0ZQ==</SUBJECT>
 				<HTMLBODY>SGVsbG8sPC9icj48L2JyPg0KDQpUaGlzIG1lc3NhZ2UgaGFzIGJlZW4gc2VudCB0byB5b3UgZnJvbSBvbmUgb2YgeW91ciBmcmllbmRzLjwvYnI+PC9icj4NCkNoZWNrIG91dCB0aGlzIHNpdGU6IDxhIGhyZWY9IjxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4iPjxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz48L2E+IQ==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.SUGGEST" Type="1">
 				<SUBJECT>V2Vic2l0ZSBTdWdnZXN0ZWQgdG8gYSBGcmllbmQ=</SUBJECT>
 				<HTMLBODY>QSB2aXNpdG9yIHN1Z2dlc3RlZCA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPiB3ZWJzaXRlIHRvIGEgZnJpZW5kLg==</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.UNSUBSCRIBE" Type="0">
 				<SUBJECT>WW91IGhhdmUgYmVlbiB1bnN1YnNjcmliZWQ=</SUBJECT>
 				<HTMLBODY>WW91IGhhdmUgc3VjY2Vzc2Z1bGx5IHVuc3Vic2NyaWJlZCBmcm9tIHRoZSBtYWlsaW5nIGxpc3Qgb24gPGEgaHJlZj0iPGlucDI6bV9CYXNlVXJsIC8+Ij48aW5wMjptX0Jhc2VVcmwgLz48L2E+IHdlYnNpdGUu</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.UNSUBSCRIBE" Type="1">
 				<SUBJECT>VXNlciBVbnN1YnNyaWJlZCBmcm9tIE1haWxpbmcgTGlzdA==</SUBJECT>
 				<HTMLBODY>QSB1c2VyICI8aW5wMjp1X0ZpZWxkIG5hbWU9IkVtYWlsIi8+IiBoYXMgdW5zdWJzY3JpYmVkIGZyb20gdGhlIG1haWxpbmcgbGlzdCBvbiA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPi4=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.VALIDATE" Type="0">
 				<SUBJECT>VXNlciBSZWdpc3RyYXRpb24gaXMgVmFsaWRhdGVk</SUBJECT>
 				<HTMLBODY>V2VsY29tZSB0byBJbi1wb3J0YWwhPGJyLz48YnIvPg0KDQpZb3VyIHVzZXIgcmVnaXN0cmF0aW9uIGhhcyBiZWVuIGFwcHJvdmVkLiBZb3UgY2FuIGxvZ2luIG5vdyA8YSBocmVmPSI8aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+Ij48aW5wMjptX0xpbmsgdGVtcGxhdGU9ImluZGV4Ii8+PC9hPiB1c2luZyB0aGUgZm9sbG93aW5nIGluZm9ybWF0aW9uOjxici8+PGJyLz4NCg0KPT09PT09PT09PT09PT09PT09PGJyLz4NClVzZXJuYW1lOiAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiI8YnIvPg0KUGFzc3dvcmQ6ICI8aW5wMjp1X0ZpZWxkIG5hbWU9IlBhc3N3b3JkX3BsYWluIi8+Ijxici8+DQo9PT09PT09PT09PT09PT09PT08YnIvPjxici8+DQo=</HTMLBODY>
 			</EVENT>
 			<EVENT Event="USER.VALIDATE" Type="1">
 				<SUBJECT>TmV3IFVzZXIgUmVnaXN0cmF0aW9uIGlzIFZhbGlkYXRlZA==</SUBJECT>
 				<HTMLBODY>VXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gdmFsaWRhdGVkLg==</HTMLBODY>
 			</EVENT>
 		</EVENTS>
 		<COUNTRIES>
 			<COUNTRY Iso="ABW" Translation="QXJ1YmE="/>
 			<COUNTRY Iso="AFG" Translation="QWZnaGFuaXN0YW4="/>
 			<COUNTRY Iso="AGO" Translation="QW5nb2xh"/>
 			<COUNTRY Iso="AIA" Translation="QW5ndWlsbGE="/>
 			<COUNTRY Iso="ALB" Translation="QWxiYW5pYQ=="/>
 			<COUNTRY Iso="AND" Translation="QW5kb3JyYQ=="/>
 			<COUNTRY Iso="ANT" Translation="TmV0aGVybGFuZHMgQW50aWxsZXM="/>
 			<COUNTRY Iso="ARE" Translation="VW5pdGVkIEFyYWIgRW1pcmF0ZXM="/>
 			<COUNTRY Iso="ARG" Translation="QXJnZW50aW5h"/>
 			<COUNTRY Iso="ARM" Translation="QXJtZW5pYQ=="/>
 			<COUNTRY Iso="ASM" Translation="QW1lcmljYW4gc2Ftb2E="/>
 			<COUNTRY Iso="ATA" Translation="QW50YXJjdGljYQ=="/>
 			<COUNTRY Iso="ATF" Translation="RnJlbmNoIFNvdXRoZXJuIFRlcnJpdG9yaWVz"/>
 			<COUNTRY Iso="ATG" Translation="QW50aWd1YSBhbmQgYmFyYnVkYQ=="/>
 			<COUNTRY Iso="AUS" Translation="QXVzdHJhbGlh"/>
 			<COUNTRY Iso="AUT" Translation="QXVzdHJpYQ=="/>
 			<COUNTRY Iso="AZE" Translation="QXplcmJhaWphbg=="/>
 			<COUNTRY Iso="BDI" Translation="QnVydW5kaQ=="/>
 			<COUNTRY Iso="BEL" Translation="QmVsZ2l1bQ=="/>
 			<COUNTRY Iso="BEN" Translation="QmVuaW4="/>
 			<COUNTRY Iso="BFA" Translation="QnVya2luYSBGYXNv"/>
 			<COUNTRY Iso="BGD" Translation="QmFuZ2xhZGVzaA=="/>
 			<COUNTRY Iso="BGR" Translation="QnVsZ2FyaWE="/>
 			<COUNTRY Iso="BHR" Translation="QmFocmFpbg=="/>
 			<COUNTRY Iso="BHS" Translation="QmFoYW1hcw=="/>
 			<COUNTRY Iso="BIH" Translation="Qm9zbmlhIGFuZCBIZXJ6ZWdvd2luYQ=="/>
 			<COUNTRY Iso="BLR" Translation="QmVsYXJ1cw=="/>
 			<COUNTRY Iso="BLZ" Translation="QmVsaXpl"/>
 			<COUNTRY Iso="BMU" Translation="QmVybXVkYQ=="/>
 			<COUNTRY Iso="BOL" Translation="Qm9saXZpYQ=="/>
 			<COUNTRY Iso="BRA" Translation="QnJhemls"/>
 			<COUNTRY Iso="BRB" Translation="QmFyYmFkb3M="/>
 			<COUNTRY Iso="BRN" Translation="QnJ1bmVpIERhcnVzc2FsYW0="/>
 			<COUNTRY Iso="BTN" Translation="Qmh1dGFu"/>
 			<COUNTRY Iso="BVT" Translation="Qm91dmV0IElzbGFuZA=="/>
 			<COUNTRY Iso="BWA" Translation="Qm90c3dhbmE="/>
 			<COUNTRY Iso="CAF" Translation="Q2VudHJhbCBBZnJpY2FuIFJlcHVibGlj"/>
 			<COUNTRY Iso="CAN" Translation="Q2FuYWRh">
 				<STATE Iso="AB" Translation="QWxiZXJ0YQ=="/>
 				<STATE Iso="BC" Translation="QnJpdGlzaCBDb2x1bWJpYQ=="/>
 				<STATE Iso="MB" Translation="TWFuaXRvYmE="/>
 				<STATE Iso="NB" Translation="TmV3IEJydW5zd2ljaw=="/>
 				<STATE Iso="NL" Translation="TmV3Zm91bmRsYW5kIGFuZCBMYWJyYWRvcg=="/>
 				<STATE Iso="NS" Translation="Tm92YSBTY290aWE="/>
 				<STATE Iso="NT" Translation="Tm9ydGh3ZXN0IFRlcnJpdG9yaWVz"/>
 				<STATE Iso="NU" Translation="TnVuYXZ1dA=="/>
 				<STATE Iso="ON" Translation="T250YXJpbw=="/>
 				<STATE Iso="PE" Translation="UHJpbmNlIEVkd2FyZCBJc2xhbmQ="/>
 				<STATE Iso="QC" Translation="UXVlYmVj"/>
 				<STATE Iso="SK" Translation="U2Fza2F0Y2hld2Fu"/>
 				<STATE Iso="YT" Translation="WXVrb24="/>
 			</COUNTRY>
 			<COUNTRY Iso="CCK" Translation="Q29jb3MgKEtlZWxpbmcpIElzbGFuZHM="/>
 			<COUNTRY Iso="CHE" Translation="U3dpdHplcmxhbmQ="/>
 			<COUNTRY Iso="CHL" Translation="Q2hpbGU="/>
 			<COUNTRY Iso="CHN" Translation="Q2hpbmE="/>
 			<COUNTRY Iso="CIV" Translation="Q290ZSBkJ0l2b2lyZQ=="/>
 			<COUNTRY Iso="CMR" Translation="Q2FtZXJvb24="/>
 			<COUNTRY Iso="COD" Translation="Q29uZ28sIERlbW9jcmF0aWMgUmVwdWJsaWMgb2YgKFdhcyBaYWlyZSk="/>
 			<COUNTRY Iso="COG" Translation="Q29uZ28sIFBlb3BsZSdzIFJlcHVibGljIG9m"/>
 			<COUNTRY Iso="COK" Translation="Q29vayBJc2xhbmRz"/>
 			<COUNTRY Iso="COL" Translation="Q29sb21iaWE="/>
 			<COUNTRY Iso="COM" Translation="Q29tb3Jvcw=="/>
 			<COUNTRY Iso="CPV" Translation="Q2FwZSBWZXJkZQ=="/>
 			<COUNTRY Iso="CRI" Translation="Q29zdGEgUmljYQ=="/>
 			<COUNTRY Iso="CUB" Translation="Q3ViYQ=="/>
 			<COUNTRY Iso="CXR" Translation="Q2hyaXN0bWFzIElzbGFuZA=="/>
 			<COUNTRY Iso="CYM" Translation="Q2F5bWFuIElzbGFuZHM="/>
 			<COUNTRY Iso="CYP" Translation="Q3lwcnVz"/>
 			<COUNTRY Iso="CZE" Translation="Q3plY2ggUmVwdWJsaWM="/>
 			<COUNTRY Iso="DEU" Translation="R2VybWFueQ=="/>
 			<COUNTRY Iso="DJI" Translation="RGppYm91dGk="/>
 			<COUNTRY Iso="DMA" Translation="RG9taW5pY2E="/>
 			<COUNTRY Iso="DNK" Translation="RGVubWFyaw=="/>
 			<COUNTRY Iso="DOM" Translation="RG9taW5pY2FuIFJlcHVibGlj"/>
 			<COUNTRY Iso="DZA" Translation="QWxnZXJpYQ=="/>
 			<COUNTRY Iso="ECU" Translation="RWN1YWRvcg=="/>
 			<COUNTRY Iso="EGY" Translation="RWd5cHQ="/>
 			<COUNTRY Iso="ERI" Translation="RXJpdHJlYQ=="/>
 			<COUNTRY Iso="ESH" Translation="V2VzdGVybiBTYWhhcmE="/>
 			<COUNTRY Iso="ESP" Translation="U3BhaW4="/>
 			<COUNTRY Iso="EST" Translation="RXN0b25pYQ=="/>
 			<COUNTRY Iso="ETH" Translation="RXRoaW9waWE="/>
 			<COUNTRY Iso="FIN" Translation="RmlubGFuZA=="/>
 			<COUNTRY Iso="FJI" Translation="RmlqaQ=="/>
 			<COUNTRY Iso="FLK" Translation="RmFsa2xhbmQgSXNsYW5kcyAoTWFsdmluYXMp"/>
 			<COUNTRY Iso="FRA" Translation="RnJhbmNl"/>
 			<COUNTRY Iso="FRO" Translation="RmFyb2UgSXNsYW5kcw=="/>
 			<COUNTRY Iso="FSM" Translation="TWljcm9uZXNpYSwgRmVkZXJhdGVkIFN0YXRlcyBvZg=="/>
 			<COUNTRY Iso="FXX" Translation="RnJhbmNlLCBNZXRyb3BvbGl0YW4="/>
 			<COUNTRY Iso="GAB" Translation="R2Fib24="/>
 			<COUNTRY Iso="GBR" Translation="VW5pdGVkIEtpbmdkb20="/>
 			<COUNTRY Iso="GEO" Translation="R2VvcmdpYQ=="/>
 			<COUNTRY Iso="GHA" Translation="R2hhbmE="/>
 			<COUNTRY Iso="GIB" Translation="R2licmFsdGFy"/>
 			<COUNTRY Iso="GIN" Translation="R3VpbmVh"/>
 			<COUNTRY Iso="GLP" Translation="R3VhZGVsb3VwZQ=="/>
 			<COUNTRY Iso="GMB" Translation="R2FtYmlh"/>
 			<COUNTRY Iso="GNB" Translation="R3VpbmVhLUJpc3NhdQ=="/>
 			<COUNTRY Iso="GNQ" Translation="RXF1YXRvcmlhbCBHdWluZWE="/>
 			<COUNTRY Iso="GRC" Translation="R3JlZWNl"/>
 			<COUNTRY Iso="GRD" Translation="R3JlbmFkYQ=="/>
 			<COUNTRY Iso="GRL" Translation="R3JlZW5sYW5k"/>
 			<COUNTRY Iso="GTM" Translation="R3VhdGVtYWxh"/>
 			<COUNTRY Iso="GUF" Translation="RnJlbmNoIEd1aWFuYQ=="/>
 			<COUNTRY Iso="GUM" Translation="R3VhbQ=="/>
 			<COUNTRY Iso="GUY" Translation="R3V5YW5h"/>
 			<COUNTRY Iso="HKG" Translation="SG9uZyBrb25n"/>
 			<COUNTRY Iso="HMD" Translation="SGVhcmQgYW5kIE1jIERvbmFsZCBJc2xhbmRz"/>
 			<COUNTRY Iso="HND" Translation="SG9uZHVyYXM="/>
 			<COUNTRY Iso="HRV" Translation="Q3JvYXRpYSAobG9jYWwgbmFtZTogSHJ2YXRza2Ep"/>
 			<COUNTRY Iso="HTI" Translation="SGFpdGk="/>
 			<COUNTRY Iso="HUN" Translation="SHVuZ2FyeQ=="/>
 			<COUNTRY Iso="IDN" Translation="SW5kb25lc2lh"/>
 			<COUNTRY Iso="IND" Translation="SW5kaWE="/>
 			<COUNTRY Iso="IOT" Translation="QnJpdGlzaCBJbmRpYW4gT2NlYW4gVGVycml0b3J5"/>
 			<COUNTRY Iso="IRL" Translation="SXJlbGFuZA=="/>
 			<COUNTRY Iso="IRN" Translation="SXJhbiAoSXNsYW1pYyBSZXB1YmxpYyBvZik="/>
 			<COUNTRY Iso="IRQ" Translation="SXJhcQ=="/>
 			<COUNTRY Iso="ISL" Translation="SWNlbGFuZA=="/>
 			<COUNTRY Iso="ISR" Translation="SXNyYWVs"/>
 			<COUNTRY Iso="ITA" Translation="SXRhbHk="/>
 			<COUNTRY Iso="JAM" Translation="SmFtYWljYQ=="/>
 			<COUNTRY Iso="JOR" Translation="Sm9yZGFu"/>
 			<COUNTRY Iso="JPN" Translation="SmFwYW4="/>
 			<COUNTRY Iso="KAZ" Translation="S2F6YWtoc3Rhbg=="/>
 			<COUNTRY Iso="KEN" Translation="S2VueWE="/>
 			<COUNTRY Iso="KGZ" Translation="S3lyZ3l6c3Rhbg=="/>
 			<COUNTRY Iso="KHM" Translation="Q2FtYm9kaWE="/>
 			<COUNTRY Iso="KIR" Translation="S2lyaWJhdGk="/>
 			<COUNTRY Iso="KNA" Translation="U2FpbnQgS2l0dHMgYW5kIE5ldmlz"/>
 			<COUNTRY Iso="KOR" Translation="S29yZWEsIFJlcHVibGljIG9m"/>
 			<COUNTRY Iso="KWT" Translation="S3V3YWl0"/>
 			<COUNTRY Iso="LAO" Translation="TGFvIFBlb3BsZSdzIERlbW9jcmF0aWMgUmVwdWJsaWM="/>
 			<COUNTRY Iso="LBN" Translation="TGViYW5vbg=="/>
 			<COUNTRY Iso="LBR" Translation="TGliZXJpYQ=="/>
 			<COUNTRY Iso="LBY" Translation="TGlieWFuIEFyYWIgSmFtYWhpcml5YQ=="/>
 			<COUNTRY Iso="LCA" Translation="U2FpbnQgTHVjaWE="/>
 			<COUNTRY Iso="LIE" Translation="TGllY2h0ZW5zdGVpbg=="/>
 			<COUNTRY Iso="LKA" Translation="U3JpIGxhbmth"/>
 			<COUNTRY Iso="LSO" Translation="TGVzb3Robw=="/>
 			<COUNTRY Iso="LTU" Translation="TGl0aHVhbmlh"/>
 			<COUNTRY Iso="LUX" Translation="THV4ZW1ib3VyZw=="/>
 			<COUNTRY Iso="LVA" Translation="TGF0dmlh"/>
 			<COUNTRY Iso="MAC" Translation="TWFjYXU="/>
 			<COUNTRY Iso="MAR" Translation="TW9yb2Njbw=="/>
 			<COUNTRY Iso="MCO" Translation="TW9uYWNv"/>
 			<COUNTRY Iso="MDA" Translation="TW9sZG92YSwgUmVwdWJsaWMgb2Y="/>
 			<COUNTRY Iso="MDG" Translation="TWFkYWdhc2Nhcg=="/>
 			<COUNTRY Iso="MDV" Translation="TWFsZGl2ZXM="/>
 			<COUNTRY Iso="MEX" Translation="TWV4aWNv"/>
 			<COUNTRY Iso="MHL" Translation="TWFyc2hhbGwgSXNsYW5kcw=="/>
 			<COUNTRY Iso="MKD" Translation="TWFjZWRvbmlh"/>
 			<COUNTRY Iso="MLI" Translation="TWFsaQ=="/>
 			<COUNTRY Iso="MLT" Translation="TWFsdGE="/>
 			<COUNTRY Iso="MMR" Translation="TXlhbm1hcg=="/>
 			<COUNTRY Iso="MNG" Translation="TW9uZ29saWE="/>
 			<COUNTRY Iso="MNP" Translation="Tm9ydGhlcm4gTWFyaWFuYSBJc2xhbmRz"/>
 			<COUNTRY Iso="MOZ" Translation="TW96YW1iaXF1ZQ=="/>
 			<COUNTRY Iso="MRT" Translation="TWF1cml0YW5pYQ=="/>
 			<COUNTRY Iso="MSR" Translation="TW9udHNlcnJhdA=="/>
 			<COUNTRY Iso="MTQ" Translation="TWFydGluaXF1ZQ=="/>
 			<COUNTRY Iso="MUS" Translation="TWF1cml0aXVz"/>
 			<COUNTRY Iso="MWI" Translation="TWFsYXdp"/>
 			<COUNTRY Iso="MYS" Translation="TWFsYXlzaWE="/>
 			<COUNTRY Iso="MYT" Translation="TWF5b3R0ZQ=="/>
 			<COUNTRY Iso="NAM" Translation="TmFtaWJpYQ=="/>
 			<COUNTRY Iso="NCL" Translation="TmV3IENhbGVkb25pYQ=="/>
 			<COUNTRY Iso="NER" Translation="TmlnZXI="/>
 			<COUNTRY Iso="NFK" Translation="Tm9yZm9sayBJc2xhbmQ="/>
 			<COUNTRY Iso="NGA" Translation="TmlnZXJpYQ=="/>
 			<COUNTRY Iso="NIC" Translation="TmljYXJhZ3Vh"/>
 			<COUNTRY Iso="NIU" Translation="Tml1ZQ=="/>
 			<COUNTRY Iso="NLD" Translation="TmV0aGVybGFuZHM="/>
 			<COUNTRY Iso="NOR" Translation="Tm9yd2F5"/>
 			<COUNTRY Iso="NPL" Translation="TmVwYWw="/>
 			<COUNTRY Iso="NRU" Translation="TmF1cnU="/>
 			<COUNTRY Iso="NZL" Translation="TmV3IFplYWxhbmQ="/>
 			<COUNTRY Iso="OMN" Translation="T21hbg=="/>
 			<COUNTRY Iso="PAK" Translation="UGFraXN0YW4="/>
 			<COUNTRY Iso="PAN" Translation="UGFuYW1h"/>
 			<COUNTRY Iso="PCN" Translation="UGl0Y2Fpcm4="/>
 			<COUNTRY Iso="PER" Translation="UGVydQ=="/>
 			<COUNTRY Iso="PHL" Translation="UGhpbGlwcGluZXM="/>
 			<COUNTRY Iso="PLW" Translation="UGFsYXU="/>
 			<COUNTRY Iso="PNG" Translation="UGFwdWEgTmV3IEd1aW5lYQ=="/>
 			<COUNTRY Iso="POL" Translation="UG9sYW5k"/>
 			<COUNTRY Iso="PRI" Translation="UHVlcnRvIFJpY28="/>
 			<COUNTRY Iso="PRK" Translation="S29yZWEsIERlbW9jcmF0aWMgUGVvcGxlJ3MgUmVwdWJsaWMgb2Y="/>
 			<COUNTRY Iso="PRT" Translation="UG9ydHVnYWw="/>
 			<COUNTRY Iso="PRY" Translation="UGFyYWd1YXk="/>
 			<COUNTRY Iso="PSE" Translation="UGFsZXN0aW5pYW4gVGVycml0b3J5LCBPY2N1cGllZA=="/>
 			<COUNTRY Iso="PYF" Translation="RnJlbmNoIFBvbHluZXNpYQ=="/>
 			<COUNTRY Iso="QAT" Translation="UWF0YXI="/>
 			<COUNTRY Iso="REU" Translation="UmV1bmlvbg=="/>
 			<COUNTRY Iso="ROU" Translation="Um9tYW5pYQ=="/>
 			<COUNTRY Iso="RUS" Translation="UnVzc2lhbiBGZWRlcmF0aW9u"/>
 			<COUNTRY Iso="RWA" Translation="UndhbmRh"/>
 			<COUNTRY Iso="SAU" Translation="U2F1ZGkgQXJhYmlh"/>
 			<COUNTRY Iso="SDN" Translation="U3VkYW4="/>
 			<COUNTRY Iso="SEN" Translation="U2VuZWdhbA=="/>
 			<COUNTRY Iso="SGP" Translation="U2luZ2Fwb3Jl"/>
 			<COUNTRY Iso="SGS" Translation="U291dGggR2VvcmdpYSBhbmQgVGhlIFNvdXRoIFNhbmR3aWNoIElzbGFuZHM="/>
 			<COUNTRY Iso="SHN" Translation="U3QuIGhlbGVuYQ=="/>
 			<COUNTRY Iso="SJM" Translation="U3ZhbGJhcmQgYW5kIEphbiBNYXllbiBJc2xhbmRz"/>
 			<COUNTRY Iso="SLB" Translation="U29sb21vbiBJc2xhbmRz"/>
 			<COUNTRY Iso="SLE" Translation="U2llcnJhIExlb25l"/>
 			<COUNTRY Iso="SLV" Translation="RWwgU2FsdmFkb3I="/>
 			<COUNTRY Iso="SMR" Translation="U2FuIE1hcmlubw=="/>
 			<COUNTRY Iso="SOM" Translation="U29tYWxpYQ=="/>
 			<COUNTRY Iso="SPM" Translation="U3QuIFBpZXJyZSBhbmQgTWlxdWVsb24="/>
 			<COUNTRY Iso="STP" Translation="U2FvIFRvbWUgYW5kIFByaW5jaXBl"/>
 			<COUNTRY Iso="SUR" Translation="U3VyaW5hbWU="/>
 			<COUNTRY Iso="SVK" Translation="U2xvdmFraWEgKFNsb3ZhayBSZXB1YmxpYyk="/>
 			<COUNTRY Iso="SVN" Translation="U2xvdmVuaWE="/>
 			<COUNTRY Iso="SWE" Translation="U3dlZGVu"/>
 			<COUNTRY Iso="SWZ" Translation="U3dhemlsYW5k"/>
 			<COUNTRY Iso="SYC" Translation="U2V5Y2hlbGxlcw=="/>
 			<COUNTRY Iso="SYR" Translation="U3lyaWFuIEFyYWIgUmVwdWJsaWM="/>
 			<COUNTRY Iso="TCA" Translation="VHVya3MgYW5kIENhaWNvcyBJc2xhbmRz"/>
 			<COUNTRY Iso="TCD" Translation="Q2hhZA=="/>
 			<COUNTRY Iso="TGO" Translation="VG9nbw=="/>
 			<COUNTRY Iso="THA" Translation="VGhhaWxhbmQ="/>
 			<COUNTRY Iso="TJK" Translation="VGFqaWtpc3Rhbg=="/>
 			<COUNTRY Iso="TKL" Translation="VG9rZWxhdQ=="/>
 			<COUNTRY Iso="TKM" Translation="VHVya21lbmlzdGFu"/>
 			<COUNTRY Iso="TLS" Translation="RWFzdCBUaW1vcg=="/>
 			<COUNTRY Iso="TON" Translation="VG9uZ2E="/>
 			<COUNTRY Iso="TTO" Translation="VHJpbmlkYWQgYW5kIFRvYmFnbw=="/>
 			<COUNTRY Iso="TUN" Translation="VHVuaXNpYQ=="/>
 			<COUNTRY Iso="TUR" Translation="VHVya2V5"/>
 			<COUNTRY Iso="TUV" Translation="VHV2YWx1"/>
 			<COUNTRY Iso="TWN" Translation="VGFpd2Fu"/>
 			<COUNTRY Iso="TZA" Translation="VGFuemFuaWEsIFVuaXRlZCBSZXB1YmxpYyBvZg=="/>
 			<COUNTRY Iso="UGA" Translation="VWdhbmRh"/>
 			<COUNTRY Iso="UKR" Translation="VWtyYWluZQ=="/>
 			<COUNTRY Iso="UMI" Translation="VW5pdGVkIFN0YXRlcyBNaW5vciBPdXRseWluZyBJc2xhbmRz"/>
 			<COUNTRY Iso="URY" Translation="VXJ1Z3VheQ=="/>
 			<COUNTRY Iso="USA" Translation="VW5pdGVkIFN0YXRlcw==">
 				<STATE Iso="AK" Translation="QWxhc2th"/>
 				<STATE Iso="AL" Translation="QWxhYmFtYQ=="/>
 				<STATE Iso="AR" Translation="QXJrYW5zYXM="/>
 				<STATE Iso="AZ" Translation="QXJpem9uYQ=="/>
 				<STATE Iso="CA" Translation="Q2FsaWZvcm5pYQ=="/>
 				<STATE Iso="CO" Translation="Q29sb3JhZG8="/>
 				<STATE Iso="CT" Translation="Q29ubmVjdGljdXQ="/>
 				<STATE Iso="DC" Translation="RGlzdHJpY3Qgb2YgQ29sdW1iaWE="/>
 				<STATE Iso="DE" Translation="RGVsYXdhcmU="/>
 				<STATE Iso="FL" Translation="RmxvcmlkYQ=="/>
 				<STATE Iso="GA" Translation="R2VvcmdpYQ=="/>
 				<STATE Iso="HI" Translation="SGF3YWlp"/>
 				<STATE Iso="IA" Translation="SW93YQ=="/>
 				<STATE Iso="ID" Translation="SWRhaG8="/>
 				<STATE Iso="IL" Translation="SWxsaW5vaXM="/>
 				<STATE Iso="IN" Translation="SW5kaWFuYQ=="/>
 				<STATE Iso="KS" Translation="S2Fuc2Fz"/>
 				<STATE Iso="KY" Translation="S2VudHVja3k="/>
 				<STATE Iso="LA" Translation="TG91aXNpYW5h"/>
 				<STATE Iso="MA" Translation="TWFzc2FjaHVzZXR0cw=="/>
 				<STATE Iso="MD" Translation="TWFyeWxhbmQ="/>
 				<STATE Iso="ME" Translation="TWFpbmU="/>
 				<STATE Iso="MI" Translation="TWljaGlnYW4="/>
 				<STATE Iso="MN" Translation="TWlubmVzb3Rh"/>
 				<STATE Iso="MO" Translation="TWlzc291cmk="/>
 				<STATE Iso="MS" Translation="TWlzc2lzc2lwcGk="/>
 				<STATE Iso="MT" Translation="TW9udGFuYQ=="/>
 				<STATE Iso="NC" Translation="Tm9ydGggQ2Fyb2xpbmE="/>
 				<STATE Iso="ND" Translation="Tm9ydGggRGFrb3Rh"/>
 				<STATE Iso="NE" Translation="TmVicmFza2E="/>
 				<STATE Iso="NH" Translation="TmV3IEhhbXBzaGlyZQ=="/>
 				<STATE Iso="NJ" Translation="TmV3IEplcnNleQ=="/>
 				<STATE Iso="NM" Translation="TmV3IE1leGljbw=="/>
 				<STATE Iso="NV" Translation="TmV2YWRh"/>
 				<STATE Iso="NY" Translation="TmV3IFlvcms="/>
 				<STATE Iso="OH" Translation="T2hpbw=="/>
 				<STATE Iso="OK" Translation="T2tsYWhvbWE="/>
 				<STATE Iso="OR" Translation="T3JlZ29u"/>
 				<STATE Iso="PA" Translation="UGVubnN5bHZhbmlh"/>
 				<STATE Iso="PR" Translation="UHVlcnRvIFJpY28="/>
 				<STATE Iso="RI" Translation="UmhvZGUgSXNsYW5k"/>
 				<STATE Iso="SC" Translation="U291dGggQ2Fyb2xpbmE="/>
 				<STATE Iso="SD" Translation="U291dGggRGFrb3Rh"/>
 				<STATE Iso="TN" Translation="VGVubmVzc2Vl"/>
 				<STATE Iso="TX" Translation="VGV4YXM="/>
 				<STATE Iso="UT" Translation="VXRhaA=="/>
 				<STATE Iso="VA" Translation="VmlyZ2luaWE="/>
 				<STATE Iso="VT" Translation="VmVybW9udA=="/>
 				<STATE Iso="WA" Translation="V2FzaGluZ3Rvbg=="/>
 				<STATE Iso="WI" Translation="V2lzY29uc2lu"/>
 				<STATE Iso="WV" Translation="V2VzdCBWaXJnaW5pYQ=="/>
 				<STATE Iso="WY" Translation="V3lvbWluZw=="/>
 			</COUNTRY>
 			<COUNTRY Iso="UZB" Translation="VXpiZWtpc3Rhbg=="/>
 			<COUNTRY Iso="VAT" Translation="VmF0aWNhbiBDaXR5IFN0YXRlIChIb2x5IFNlZSk="/>
 			<COUNTRY Iso="VCT" Translation="U2FpbnQgVmluY2VudCBhbmQgVGhlIEdyZW5hZGluZXM="/>
 			<COUNTRY Iso="VEN" Translation="VmVuZXp1ZWxh"/>
 			<COUNTRY Iso="VGB" Translation="VmlyZ2luIElzbGFuZHMgKEJyaXRpc2gp"/>
 			<COUNTRY Iso="VIR" Translation="VmlyZ2luIElzbGFuZHMgKFUuUy4p"/>
 			<COUNTRY Iso="VNM" Translation="VmlldG5hbQ=="/>
 			<COUNTRY Iso="VUT" Translation="VmFudWF0dQ=="/>
 			<COUNTRY Iso="WLF" Translation="V2FsbGlzIGFuZCBGdXR1bmEgSXNsYW5kcw=="/>
 			<COUNTRY Iso="WSM" Translation="U2Ftb2E="/>
 			<COUNTRY Iso="YEM" Translation="WWVtZW4="/>
 			<COUNTRY Iso="YUG" Translation="WXVnb3NsYXZpYQ=="/>
 			<COUNTRY Iso="ZAF" Translation="U291dGggQWZyaWNh"/>
 			<COUNTRY Iso="ZMB" Translation="WmFtYmlh"/>
 			<COUNTRY Iso="ZWE" Translation="WmltYmFid2U="/>
 		</COUNTRIES>
 	</LANGUAGE>
 </LANGUAGES>
\ No newline at end of file