Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Wed, Feb 5, 9:13 PM

in-portal

This file is larger than 256 KB, so syntax highlighting was skipped.
Index: branches/5.2.x/admin/system_presets/simple/users_u.php
===================================================================
--- branches/5.2.x/admin/system_presets/simple/users_u.php (revision 14725)
+++ branches/5.2.x/admin/system_presets/simple/users_u.php (revision 14726)
@@ -1,119 +1,119 @@
<?php
defined('FULL_PATH') or die('restricted access!');
// section removal
$remove_sections = Array (
// 'in-portal:user_list',
// 'in-portal:admins',
// 'in-portal:user_setting_folder',
// 'in-portal:configure_users',
'in-portal:user_email',
'in-portal:user_custom'
);
// sections shown with debug on
$debug_only_sections = Array (
// 'in-portal:user_list',
// 'in-portal:admins',
'in-portal:user_setting_folder',
'in-portal:configure_users',
// 'in-portal:user_email',
// 'in-portal:user_custom'
);
// toolbar buttons
$remove_buttons = Array (
// list of users; section: Users Management -> Users
'users_list' => Array (/*'new_item', 'edit', 'delete', 'approve', 'decline',*/ 'frontend_mail', /*'e-mail',*/ 'export', /*'view', 'dbl-click'*/),
// "General" tab during user adding/editing
// 'users_edit' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
// "Images" tab during user adding/editing
// 'user_edit_images' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'setprimary', 'view', 'dbl-click'),
// "Groups" tab during user/admin adding/editing
// 'user_edit_groups' => Array ('select', 'cancel', 'prev', 'next', 'selec_user', 'edit', 'delete', 'primary_group', 'view', 'dbl-click'),
// "Items" tab during user/admin adding/editing
// 'user_edit_items' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
// "Custom" tab during user/admin adding/editing
// 'user_edit_custom' => Array ('select', 'cancel', 'prev', 'next'),
// list of administrators; section: Users Managements -> Administrators
'admin_list' => Array (/*'new_item', 'edit', 'delete', */'clone', 'refresh',/* 'view', 'dbl-click'*/),
// "General" tab during admin adding/editing AND separate password change form for non-"root" users (in top frame)
'admins_edit' => Array (/*'select', 'cancel', */'reset_edit', /*'prev', 'next'*/),
// 'regular_users_list' => Array (), // not used
// separate password change form for "root" user (in top frame)
// 'root_edit' => Array ('select', 'cancel'),
// user/admin group membership editing (used on "Groups" tab during user/admin adding/editing)
// 'user_edit_group' => Array ('select', 'cancel'),
// user image adding/editing (used on "Images" tab during user adding/editing)
// 'user_image_edit' => Array ('select', 'cancel', 'prev', 'next'),
// user selector
// 'user_select' => Array ('select', 'cancel', 'view', 'dbl-click'),
// user selector when adding/editing user group
// 'group_user_select' => Array ('select', 'cancel', 'view', 'dbl-click'),
);
// fields to hide
$hidden_fields = Array (
- /* 'PortalUserId', 'Login', 'Password', 'FirstName','LastName', 'Company', 'Email', 'CreatedOn',
+ /* 'PortalUserId', 'Username', 'Password', 'FirstName','LastName', 'Company', 'Email', 'CreatedOn',
'Phone', 'Fax', 'Street', 'Street2', 'City', 'State' , 'Zip', 'Country', 'ResourceId', 'Status',
'Modified', 'dob', 'tz',*/ 'IPAddress', /*'IsBanned', 'PwResetConfirm', 'PwRequestTime',*/ 'IPRestrictions',
);
// virtual fields to hide
$virtual_hidden_fields = Array (
/*'SubscribeEmail', 'PrimaryGroup', 'RootPassword', 'FullName', 'UserGroup'*/
);
// fields to make required
$required_fields = Array (
- /*'PortalUserId',*/ 'Login', /*'Password', 'FirstName', 'LastName', 'Company', */'Email', /*'CreatedOn',
+ /*'PortalUserId',*/ 'Username', /*'Password', 'FirstName', 'LastName', 'Company', */'Email', /*'CreatedOn',
'Phone', 'Fax', 'Street', 'Street2', 'City', 'State' , 'Zip', 'Country', 'ResourceId', 'Status',
'Modified', 'dob', 'tz', 'IPAddress', 'IsBanned', 'PwResetConfirm', 'PwRequestTime',*/
);
// virtual fields to make required
$virtual_required_fields = Array (
/*'SubscribeEmail', 'PrimaryGroup', 'RootPassword', 'FullName', 'UserGroup'*/
);
// tabs during editing
$hide_edit_tabs = Array (
// tabs during user editing, when In-Portal module is enabled
'Default' => Array ('general', 'groups', 'images', 'items', 'custom'),
// tabs during user editing, when In-Portal module isn't enabled
'RegularUsers' => Array ('general', 'groups'),
// tabs during admin editing
'Admins' => Array ('general', 'groups'),
);
// hide columns in grids
$hide_columns = Array (
// currently not in user
-// 'Default' => Array ('Login', 'LastName', 'FirstName', 'Email', 'PrimaryGroup', 'CreatedOn', 'Modified'),
+// 'Default' => Array ('Username', 'LastName', 'FirstName', 'Email', 'PrimaryGroup', 'CreatedOn', 'Modified'),
// user selector
-// 'UserSelector' => Array ('Login', 'LastName', 'FirstName', 'Email', 'PrimaryGroup', 'CreatedOn', 'Modified'),
+// 'UserSelector' => Array ('Username', 'LastName', 'FirstName', 'Email', 'PrimaryGroup', 'CreatedOn', 'Modified'),
// admins list; section: Users Management -> Administrators
-// 'Admins' => Array ('PortalUserId', 'Login', 'FirstName', 'LastName', 'Email'),
+// 'Admins' => Array ('PortalUserId', 'Username', 'FirstName', 'LastName', 'Email'),
// users list; section: Users Management -> Users
- 'RegularUsers' => Array (/*'PortalUserId', 'Login', 'FirstName', 'LastName', 'Email',*/ 'PrimaryGroup', 'CreatedOn', 'Modified', /* 'Status',*/ 'IPAddress'),
+ 'RegularUsers' => Array (/*'PortalUserId', 'Username', 'FirstName', 'LastName', 'Email',*/ 'PrimaryGroup', 'CreatedOn', 'Modified', /* 'Status',*/ 'IPAddress'),
);
Index: branches/5.2.x/core/kernel/db/db_event_handler.php
===================================================================
--- branches/5.2.x/core/kernel/db/db_event_handler.php (revision 14725)
+++ branches/5.2.x/core/kernel/db/db_event_handler.php (revision 14726)
@@ -1,3139 +1,3141 @@
<?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('EH_CUSTOM_PROCESSING_BEFORE',1);
define('EH_CUSTOM_PROCESSING_AFTER',2);
/**
* Note:
* 1. When adressing variables from submit containing
* Prefix_Special as part of their name use
* $event->getPrefixSpecial(true) instead of
* $event->getPrefixSpecial() as usual. This is due PHP
* is converting "." symbols in variable names during
* submit info "_". $event->getPrefixSpecial optional
* 1st parameter returns correct corrent Prefix_Special
* for variables beeing submitted such way (e.g. variable
* name that will be converted by PHP: "users.read_only_id"
* will be submitted as "users_read_only_id".
*
* 2. When using $this->Application-LinkVar on variables submitted
* from form which contain $Prefix_Special then note 1st item. Example:
* LinkVar($event->getPrefixSpecial(true).'_varname',$event->getPrefixSpecial().'_varname')
*
*/
/**
* EventHandler that is used to process
* any database related events
*
*/
class kDBEventHandler extends kEventHandler {
/**
* Checks permissions of user
*
* @param kEvent $event
* @return bool
* @access public
*/
function CheckPermission(&$event)
{
$section = $event->getSection();
if (!$this->Application->isAdmin) {
$allow_events = Array('OnSearch', 'OnSearchReset', 'OnNew');
if (in_array($event->Name, $allow_events)) {
// allow search on front
return true;
}
}
elseif (($event->Name == 'OnPreSaveAndChangeLanguage') && !$this->UseTempTables($event)) {
// allow changing language in grids, when not in editing mode
return $this->Application->CheckPermission($section . '.view', 1);
}
if (!preg_match('/^CATEGORY:(.*)/', $section)) {
// only if not category item events
if ((substr($event->Name, 0, 9) == 'OnPreSave') || ($event->Name == 'OnSave')) {
if ($this->isNewItemCreate($event)) {
return $this->Application->CheckPermission($section.'.add', 1);
}
else {
return $this->Application->CheckPermission($section.'.add', 1) || $this->Application->CheckPermission($section.'.edit', 1);
}
}
}
if ($event->Name == 'OnPreCreate') {
// save category_id before item create (for item category selector not to destroy permission checking category)
$this->Application->LinkVar('m_cat_id');
}
if ($event->Name == 'OnSaveWidths') {
return $this->Application->isAdminUser;
}
return parent::CheckPermission($event);
}
/**
* Allows to override standard permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnLoad' => Array('self' => 'view', 'subitem' => 'view'),
'OnItemBuild' => Array('self' => 'view', 'subitem' => 'view'),
'OnSuggestValues' => Array('self' => 'view', 'subitem' => 'view'),
'OnBuild' => Array('self' => true),
'OnNew' => Array('self' => 'add', 'subitem' => 'add|edit'),
'OnCreate' => Array('self' => 'add', 'subitem' => 'add|edit'),
'OnUpdate' => Array('self' => 'edit', 'subitem' => 'add|edit'),
'OnSetPrimary' => Array('self' => 'add|edit', 'subitem' => 'add|edit'),
'OnDelete' => Array('self' => 'delete', 'subitem' => 'add|edit'),
'OnDeleteAll' => Array('self' => 'delete', 'subitem' => 'add|edit'),
'OnMassDelete' => Array('self' => 'delete', 'subitem' => 'add|edit'),
'OnMassClone' => Array('self' => 'add', 'subitem' => 'add|edit'),
'OnCut' => array('self'=>'edit', 'subitem' => 'edit'),
'OnCopy' => array('self'=>'edit', 'subitem' => 'edit'),
'OnPaste' => array('self'=>'edit', 'subitem' => 'edit'),
'OnSelectItems' => Array('self' => 'add|edit', 'subitem' => 'add|edit'),
'OnProcessSelected' => Array('self' => 'add|edit', 'subitem' => 'add|edit'),
'OnStoreSelected' => Array('self' => 'add|edit', 'subitem' => 'add|edit'),
'OnSelectUser' => Array('self' => 'add|edit', 'subitem' => 'add|edit'),
'OnMassApprove' => Array('self' => 'advanced:approve|edit', 'subitem' => 'advanced:approve|add|edit'),
'OnMassDecline' => Array('self' => 'advanced:decline|edit', 'subitem' => 'advanced:decline|add|edit'),
'OnMassMoveUp' => Array('self' => 'advanced:move_up|edit', 'subitem' => 'advanced:move_up|add|edit'),
'OnMassMoveDown' => Array('self' => 'advanced:move_down|edit', 'subitem' => 'advanced:move_down|add|edit'),
'OnPreCreate' => Array('self' => 'add|add.pending', 'subitem' => 'edit|edit.pending'),
'OnEdit' => Array('self' => 'edit|edit.pending', 'subitem' => 'edit|edit.pending'),
'OnExport' => Array('self' => 'view|advanced:export'),
'OnExportBegin' => Array('self' => 'view|advanced:export'),
'OnExportProgress' => Array('self' => 'view|advanced:export'),
'OnSetAutoRefreshInterval' => Array ('self' => true, 'subitem' => true),
'OnAutoRefreshToggle' => Array ('self' => true, 'subitem' => true),
// theese event do not harm, but just in case check them too :)
'OnCancelEdit' => Array('self' => true, 'subitem' => true),
'OnCancel' => Array('self' => true, 'subitem' => true),
'OnReset' => Array('self' => true, 'subitem' => true),
'OnSetSorting' => Array('self' => true, 'subitem' => true),
'OnSetSortingDirect' => Array('self' => true, 'subitem' => true),
'OnResetSorting' => Array('self' => true, 'subitem' => true),
'OnSetFilter' => Array('self' => true, 'subitem' => true),
'OnApplyFilters' => Array('self' => true, 'subitem' => true),
'OnRemoveFilters' => Array('self' => true, 'subitem' => true),
'OnSetFilterPattern' => Array('self' => true, 'subitem' => true),
'OnSetPerPage' => Array('self' => true, 'subitem' => true),
'OnSetPage' => Array('self' => true, 'subitem' => true),
'OnSearch' => Array('self' => true, 'subitem' => true),
'OnSearchReset' => Array('self' => true, 'subitem' => true),
'OnGoBack' => Array('self' => true, 'subitem' => true),
// it checks permission itself since flash uploader does not send cookies
'OnUploadFile' => Array ('self' => true, 'subitem' => true),
'OnDeleteFile' => Array ('self' => true, 'subitem' => true),
'OnViewFile' => Array ('self' => true, 'subitem' => true),
'OnSaveWidths' => Array ('self' => true, 'subitem' => true),
'OnValidateMInputFields' => Array ('self' => 'view'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
function mapEvents()
{
$events_map = Array(
'OnRemoveFilters' => 'FilterAction',
'OnApplyFilters' => 'FilterAction',
'OnMassApprove'=>'iterateItems',
'OnMassDecline'=>'iterateItems',
'OnMassMoveUp'=>'iterateItems',
'OnMassMoveDown'=>'iterateItems',
);
$this->eventMethods = array_merge($this->eventMethods, $events_map);
}
/**
* 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
*/
function getPassedID(&$event)
{
if ($event->getEventParam('raise_warnings') === false) {
$event->setEventParam('raise_warnings', 1);
}
if ( $event->Special == 'previous' || $event->Special == 'next' ) {
$object =& $this->Application->recallObject( $event->getEventParam('item') );
/* @var $object kDBItem */
$list_helper =& $this->Application->recallObject('ListHelper');
/* @var $list_helper ListHelper */
return $list_helper->getNavigationResource($object, $event->getEventParam('list'), $event->Special == 'next');
}
if (preg_match('/^auto-(.*)/', $event->Special, $regs) && $this->Application->prefixRegistred($regs[1])) {
// <inp2:lang.auto-phrase_Field name="DateFormat"/> - returns field DateFormat value from language (LanguageId is extracted from current phrase object)
$main_object =& $this->Application->recallObject($regs[1]);
/* @var $main_object kDBItem */
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
return $main_object->GetDBField($id_field);
}
// 1. get id from post (used in admin)
$ret = $this->Application->GetVar($event->getPrefixSpecial(true).'_id');
if (($ret !== false) && ($ret != '')) {
return $ret;
}
// 2. get id from env (used in front)
$ret = $this->Application->GetVar($event->getPrefixSpecial().'_id');
if (($ret !== false) && ($ret != '')) {
return $ret;
}
// recall selected ids array and use the first one
$ids = $this->Application->GetVar($event->getPrefixSpecial().'_selected_ids');
if ($ids != '') {
$ids = explode(',',$ids);
if ($ids) {
$ret = array_shift($ids);
}
}
else { // if selected ids are not yet stored
$this->StoreSelectedIDs($event);
return $this->Application->GetVar($event->getPrefixSpecial().'_id'); // StoreSelectedIDs sets this variable
}
return $ret;
}
/**
* Prepares and stores selected_ids string
* in Session and Application Variables
* by getting all checked ids from grid plus
* id passed in get/post as prefix_id
*
* @param kEvent $event
* @param Array $direct_ids
*
* @return Array ids stored
*/
function StoreSelectedIDs(&$event, $direct_ids = null)
{
$wid = $this->Application->GetTopmostWid($event->Prefix);
$session_name = rtrim($event->getPrefixSpecial().'_selected_ids_'.$wid, '_');
$ids = $event->getEventParam('ids');
if (isset($direct_ids) || ($ids !== false)) {
// save ids directly if they given + reset array indexes
$resulting_ids = $direct_ids ? array_values($direct_ids) : ($ids ? array_values($ids) : false);
if ($resulting_ids) {
$this->Application->SetVar($event->getPrefixSpecial() . '_selected_ids', implode(',', $resulting_ids));
$this->Application->LinkVar($event->getPrefixSpecial() . '_selected_ids', $session_name, '', true);
$this->Application->SetVar($event->getPrefixSpecial() . '_id', $resulting_ids[0]);
return $resulting_ids;
}
return Array ();
}
$ret = Array();
// May be we don't need this part: ?
$passed = $this->Application->GetVar($event->getPrefixSpecial(true).'_id');
if($passed !== false && $passed != '')
{
array_push($ret, $passed);
}
$ids = Array();
// get selected ids from post & save them to session
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if($items_info)
{
$id_field = $this->Application->getUnitOption($event->Prefix,'IDField');
foreach($items_info as $id => $field_values)
{
if( getArrayValue($field_values,$id_field) ) array_push($ids,$id);
}
//$ids=array_keys($items_info);
}
$ret = array_unique(array_merge($ret, $ids));
$this->Application->SetVar($event->getPrefixSpecial().'_selected_ids', implode(',',$ret));
$this->Application->LinkVar($event->getPrefixSpecial().'_selected_ids', $session_name, '', !$ret); // optional when IDs are missing
// This is critical - otherwise getPassedID will return last ID stored in session! (not exactly true)
// this smells... needs to be refactored
$first_id = getArrayValue($ret,0);
if (($first_id === false) && ($event->getEventParam('raise_warnings') == 1)) {
if ( $this->Application->isDebugMode() ) {
$this->Application->Debugger->appendTrace();
}
trigger_error('Requested ID for prefix <strong>' . $event->getPrefixSpecial() . '</strong> <span class="debug_error">not passed</span>', E_USER_NOTICE);
}
$this->Application->SetVar($event->getPrefixSpecial() . '_id', $first_id);
return $ret;
}
/**
* Returns stored selected ids as an array
*
* @param kEvent $event
* @param bool $from_session return ids from session (written, when editing was started)
* @return array
*/
function getSelectedIDs(&$event, $from_session = false)
{
if ($from_session) {
$wid = $this->Application->GetTopmostWid($event->Prefix);
$var_name = rtrim($event->getPrefixSpecial().'_selected_ids_'.$wid, '_');
$ret = $this->Application->RecallVar($var_name);
}
else {
$ret = $this->Application->GetVar($event->getPrefixSpecial().'_selected_ids');
}
return explode(',', $ret);
}
/**
* Stores IDs, selected in grid in session
*
* @param kEvent $event
*/
function OnStoreSelected(&$event)
{
$this->StoreSelectedIDs($event);
$id = $this->Application->GetVar($event->getPrefixSpecial() . '_id');
if ($id !== false) {
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', $id);
$event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial());
}
}
/**
* Returs associative array of submitted fields for current item
* Could be used while creating/editing single item -
* meaning on any edit form, except grid edit
*
* @param kEvent $event
*/
function getSubmittedFields(&$event)
{
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
$field_values = $items_info ? array_shift($items_info) : Array();
return $field_values;
}
/**
* Removes any information about current/selected ids
* from Application variables and Session
*
* @param kEvent $event
*/
function clearSelectedIDs(&$event)
{
$prefix_special = $event->getPrefixSpecial();
$ids = implode(',', $this->getSelectedIDs($event, true));
$event->setEventParam('ids', $ids);
$wid = $this->Application->GetTopmostWid($event->Prefix);
$session_name = rtrim($prefix_special.'_selected_ids_'.$wid, '_');
$this->Application->RemoveVar($session_name);
$this->Application->SetVar($prefix_special.'_selected_ids', '');
$this->Application->SetVar($prefix_special.'_id', ''); // $event->getPrefixSpecial(true).'_id' too may be
}
/**
* Common builder part for Item & List
*
* @param kDBBase|kDBItem|kDBList $object
* @param kEvent $event
* @access private
*/
function dbBuild(&$object, &$event)
{
// for permission checking inside item/list build events
$event->setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true));
if ( $event->getEventParam('form_name') !== false ) {
$form_name = $event->getEventParam('form_name');
}
else {
$request_forms = $this->Application->GetVar('forms', Array ());
$form_name = (string)getArrayValue( $request_forms, $object->getPrefixSpecial() );
}
$object->Configure( $event->getEventParam('populate_ml_fields') || $this->Application->getUnitOption($event->Prefix, 'PopulateMlFields'), $form_name );
$this->PrepareObject($object, $event);
$parent_event = $event->getEventParam('parent_event');
if ( is_object($parent_event) ) {
$object->setParentEvent($parent_event);
}
// force live table if specified or is original item
$live_table = $event->getEventParam('live_table') || $event->Special == 'original';
if( $this->UseTempTables($event) && !$live_table )
{
$object->SwitchToTemp();
}
$this->Application->setEvent($event->getPrefixSpecial(), '');
$save_event = $this->UseTempTables($event) && $this->Application->GetTopmostPrefix($event->Prefix) == $event->Prefix ? 'OnSave' : 'OnUpdate';
$this->Application->SetVar($event->getPrefixSpecial().'_SaveEvent',$save_event);
}
/**
* Checks, that currently loaded item is allowed for viewing (non permission-based)
*
* @param kEvent $event
* @return bool
*/
function checkItemStatus(&$event)
{
$status_fields = $this->Application->getUnitOption($event->Prefix, 'StatusField');
if ( !$status_fields ) {
return true;
}
$status_field = array_shift($status_fields);
if ( $status_field == 'Status' || $status_field == 'Enabled' ) {
$object =& $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
return true;
}
return $object->GetDBField($status_field) == STATUS_ACTIVE;
}
return true;
}
/**
* Shows not found template content
*
* @param kEvent $event
*
*/
function _errorNotFound(&$event)
{
if ($event->getEventParam('raise_warnings') === 0) {
// when it's possible, that autoload fails do nothing
return ;
}
if ( $this->Application->isDebugMode() ) {
$this->Application->Debugger->appendTrace();
}
trigger_error('ItemLoad Permission Failed for prefix [' . $event->getPrefixSpecial() . '] in <strong>checkItemStatus</strong>, leading to "404 Not Found"', E_USER_NOTICE);
header('HTTP/1.0 404 Not Found');
while (ob_get_level()) {
ob_end_clean();
}
// object is used inside template parsing, so break out any parsing and return error document
$error_template = $this->Application->ConfigValue('ErrorTemplate');
$themes_helper =& $this->Application->recallObject('ThemesHelper');
/* @var $themes_helper kThemesHelper */
$this->Application->SetVar('t', $error_template);
$this->Application->SetVar('m_cat_id', $themes_helper->getPageByTemplate($error_template));
// in case if missing item is recalled first from event (not from template)
$this->Application->InitParser();
$this->Application->HTML = $this->Application->ParseBlock( Array ('name' => $error_template) );
$this->Application->Done();
exit;
}
/**
* Builds item (loads if needed)
*
* Pattern: Prototype Manager
*
* @param kEvent $event
* @access protected
*/
function OnItemBuild(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$this->dbBuild($object, $event);
$sql = $this->ItemPrepareQuery($event);
$sql = $this->Application->ReplaceLanguageTags($sql);
$object->setSelectSQL($sql);
// 2. loads if allowed
$auto_load = $this->Application->getUnitOption($event->Prefix,'AutoLoad');
$skip_autload = $event->getEventParam('skip_autoload');
if ($auto_load && !$skip_autload) {
$perm_status = true;
$user_id = $this->Application->InitDone ? $this->Application->RecallVar('user_id') : USER_ROOT;
$event->setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true));
$status_checked = false;
if ($user_id == USER_ROOT || $this->CheckPermission($event)) {
// don't autoload item, when user doesn't have view permission
$this->LoadItem($event);
$status_checked = true;
$editing_mode = defined('EDITING_MODE') ? EDITING_MODE : false;
if ($user_id != USER_ROOT && !$this->Application->isAdmin && !($editing_mode || $this->checkItemStatus($event))) {
// non-root user AND on front-end AND (not editing mode || incorrect status)
$perm_status = false;
}
}
else {
$perm_status = false;
}
if (!$perm_status) {
// when no permission to view item -> redirect to no pemrission template
if ( $this->Application->isDebugMode() ) {
$this->Application->Debugger->appendTrace();
}
trigger_error('ItemLoad Permission Failed for prefix ['.$event->getPrefixSpecial().'] in <strong>'.($status_checked ? 'checkItemStatus' : 'CheckPermission').'</strong>', E_USER_NOTICE);
$template = $this->Application->isAdmin ? 'no_permission' : $this->Application->ConfigValue('NoPermissionTemplate');
if (MOD_REWRITE) {
$redirect_params = Array (
'm_cat_id' => 0,
'next_template' => urlencode('external:' . $_SERVER['REQUEST_URI']),
);
}
else {
$redirect_params = Array (
'next_template' => $this->Application->GetVar('t'),
);
}
$this->Application->Redirect($template, $redirect_params);
}
}
$actions =& $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set($event->getPrefixSpecial().'_GoTab', '');
$actions->Set($event->getPrefixSpecial().'_GoId', '');
$actions->Set('forms[' . $event->getPrefixSpecial() . ']', $object->getFormName());
}
/**
* Build subtables array from configs
*
* @param kEvent $event
*/
function OnTempHandlerBuild(&$event)
{
$object =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $object kTempTablesHandler */
$parent_event = $event->getEventParam('parent_event');
if ( is_object($parent_event) ) {
$object->setParentEvent($parent_event);
}
$object->BuildTables( $event->Prefix, $this->getSelectedIDs($event) );
}
/**
* Checks, that object used in event should use temp tables
*
* @param kEvent $event
* @return bool
*/
function UseTempTables(&$event)
{
$top_prefix = $this->Application->GetTopmostPrefix($event->Prefix); // passed parent, not always actual
$special = ($top_prefix == $event->Prefix) ? $event->Special : $this->getMainSpecial($event);
return $this->Application->IsTempMode($event->Prefix, $special);
}
/**
* Returns table prefix from event (temp or live)
*
* @param kEvent $event
* @return string
* @todo Needed? Should be refactored (by Alex)
*/
function TablePrefix(&$event)
{
return $this->UseTempTables($event) ? $this->Application->GetTempTablePrefix('prefix:'.$event->Prefix).TABLE_PREFIX : TABLE_PREFIX;
}
/**
* Load item if id is available
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function LoadItem(&$event)
{
$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) ) {
$actions =& $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set($event->getPrefixSpecial() . '_id', $object->GetID());
}
else {
$object->setID($id);
}
}
/**
* Builds list
*
* Pattern: Prototype Manager
*
* @param kEvent $event
* @access protected
*/
function OnListBuild(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
$this->dbBuild($object, $event);
if ( !$object->isMainList() && $event->getEventParam('main_list') ) {
// once list is set to main, then even "requery" parameter can't remove that
/*$passed = $this->Application->GetVar('passed');
$this->Application->SetVar('passed', $passed . ',' . $event->Prefix);*/
$object->becameMain();
}
$object->setGridName($event->getEventParam('grid'));
$sql = $this->ListPrepareQuery($event);
$sql = $this->Application->ReplaceLanguageTags($sql);
$object->setSelectSQL($sql);
$object->reset();
$object->linkToParent( $this->getMainSpecial($event) );
$this->AddFilters($event);
$this->SetCustomQuery($event); // new!, use this for dynamic queries based on specials for ex.
$this->SetPagination($event);
$this->SetSorting($event);
$actions =& $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set('remove_specials[' . $event->getPrefixSpecial() . ']', '0');
$actions->Set($event->getPrefixSpecial() . '_GoTab', '');
}
/**
* Get's special of main item for linking with subitem
*
* @param kEvent $event
* @return string
*/
function getMainSpecial(&$event)
{
$main_special = $event->getEventParam('main_special');
if ($main_special === false) {
// main item's special not passed
if (substr($event->Special, -5) == '-item') {
// temp handler added "-item" to given special -> process that here
return substr($event->Special, 0, -5);
}
// by default subitem's special is used for main item searching
return $event->Special;
}
return $main_special;
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(&$event)
{
}
/**
* Set's new perpage for grid
*
* @param kEvent $event
*/
function OnSetPerPage(&$event)
{
$per_page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_PerPage');
$event->SetRedirectParam($event->getPrefixSpecial() . '_PerPage', $per_page);
$event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial());
if (!$this->Application->isAdminUser) {
$list_helper =& $this->Application->recallObject('ListHelper');
/* @var $list_helper ListHelper */
$this->_passListParams($event, 'per_page');
/*if ($per_page != $list_helper->getDefaultPerPage($event->Prefix)) {
$event->SetRedirectParam('per_page', $per_page);
}*/
}
}
/**
* Occurs when page is changed (only for hooking)
*
* @param kEvent $event
*/
function OnSetPage(&$event)
{
$page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page');
$event->SetRedirectParam($event->getPrefixSpecial() . '_Page', $page);
$event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial());
if (!$this->Application->isAdminUser) {
/*if ($page > 1) {
$event->SetRedirectParam('page', $page);
}*/
$this->_passListParams($event, 'page');
}
}
/**
* Passes through main list pagination and sorting
*
* @param kEvent $event
* @param string $skip_var
*/
function _passListParams(&$event, $skip_var)
{
$param_names = array_diff(Array ('page', 'per_page', 'sort_by'), Array ($skip_var));
$list_helper =& $this->Application->recallObject('ListHelper');
/* @var $list_helper ListHelper */
foreach ($param_names as $param_name) {
$value = $this->Application->GetVar($param_name);
switch ($param_name) {
case 'page':
if ($value > 1) {
$event->SetRedirectParam('page', $value);
}
break;
case 'per_page':
if ($value > 0) {
if ($value != $list_helper->getDefaultPerPage($event->Prefix)) {
$event->SetRedirectParam('per_page', $value);
}
}
break;
case 'sort_by':
$event->setPseudoClass('_List');
$object =& $event->getObject( Array ('main_list' => 1) );
/* @var $object kDBList */
if ($list_helper->hasUserSorting($object)) {
$event->SetRedirectParam('sort_by', $value);
}
break;
}
}
}
/**
* Set's correct page for list
* based on data provided with event
*
* @param kEvent $event
* @access private
* @see OnListBuild
*/
function SetPagination(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
// get PerPage (forced -> session -> config -> 10)
$object->SetPerPage( $this->getPerPage($event) );
// main lists on Front-End have special get parameter for page
$page = $object->isMainList() ? $this->Application->GetVar('page') : false;
if (!$page) {
// page is given in "env" variable for given prefix
$page = $this->Application->GetVar($event->getPrefixSpecial() . '_Page');
}
if (!$page && $event->Special) {
// when not part of env, then variables like "prefix.special_Page" are
// replaced (by PHP) with "prefix_special_Page", so check for that too
$page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page');
}
if (!$object->isMainList()) {
// main lists doesn't use session for page storing
$this->Application->StoreVarDefault($event->getPrefixSpecial() . '_Page', 1, true); // true for optional
if ($page) {
// page found in request -> store in session
$this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
}
else {
// page not found in request -> get from session
$page = $this->Application->RecallVar($event->getPrefixSpecial() . '_Page');
}
if ( !$event->getEventParam('skip_counting') ) {
// when stored page is larger, then maximal list page number
// (such case is also processed in kDBList::Query method)
$pages = $object->GetTotalPages();
if ($page > $pages) {
$page = 1;
$this->Application->StoreVar($event->getPrefixSpecial() . '_Page', 1, true);
}
}
}
$object->SetPage($page);
}
/**
* Returns current per-page setting for list
*
* @param kEvent $event
* @return int
*/
function getPerPage(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
$per_page = $event->getEventParam('per_page');
if ($per_page) {
// per-page is passed as tag parameter to PrintList, InitList, etc.
$config_mapping = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping');
// 2. per-page setting is stored in configuration variable
if ($config_mapping) {
// such pseudo per-pages are only defined in templates directly
switch ($per_page) {
case 'short_list':
$per_page = $this->Application->ConfigValue($config_mapping['ShortListPerPage']);
break;
case 'default':
$per_page = $this->Application->ConfigValue($config_mapping['PerPage']);
break;
}
}
return $per_page;
}
if (!$per_page && $object->isMainList()) {
// main lists on Front-End have special get parameter for per-page
$per_page = $this->Application->GetVar('per_page');
}
if (!$per_page) {
// per-page is given in "env" variable for given prefix
$per_page = $this->Application->GetVar($event->getPrefixSpecial() . '_PerPage');
}
if (!$per_page && $event->Special) {
// when not part of env, then variables like "prefix.special_PerPage" are
// replaced (by PHP) with "prefix_special_PerPage", so check for that too
$per_page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_PerPage');
}
if (!$object->isMainList()) {
// per-page given in env and not in main list
$view_name = $this->Application->RecallVar($event->getPrefixSpecial() . '_current_view');
if ($per_page) {
// per-page found in request -> store in session and persistent session
$this->setListSetting($event, 'PerPage', $per_page);
}
else {
// per-page not found in request -> get from pesistent session (or session)
$per_page = $this->getListSetting($event, 'PerPage');
}
}
if (!$per_page) {
// per page wan't found in request/session/persistent session
$list_helper =& $this->Application->recallObject('ListHelper');
/* @var $list_helper ListHelper */
// allow to override default per-page value from tag
$default_per_page = $event->getEventParam('default_per_page');
if (!is_numeric($default_per_page)) {
$default_per_page = 10;
}
$per_page = $list_helper->getDefaultPerPage($event->Prefix, $default_per_page);
}
return $per_page;
}
/**
* Set's correct sorting for list
* based on data provided with event
*
* @param kEvent $event
* @access private
* @see OnListBuild
*/
function SetSorting(&$event)
{
$event->setPseudoClass('_List');
$object =& $event->getObject();
/* @var $object kDBList */
if ( $object->isMainList() ) {
$sort_by = $this->Application->GetVar('sort_by');
$cur_sort1 = $cur_sort1_dir = $cur_sort2 = $cur_sort2_dir = false;
if ( $sort_by ) {
list ($cur_sort1, $cur_sort1_dir) = explode(',', $sort_by);
}
}
else {
$sorting_settings = $this->getListSetting($event, 'Sortings');
$cur_sort1 = getArrayValue($sorting_settings, 'Sort1');
$cur_sort1_dir = getArrayValue($sorting_settings, 'Sort1_Dir');
$cur_sort2 = getArrayValue($sorting_settings, 'Sort2');
$cur_sort2_dir = getArrayValue($sorting_settings, 'Sort2_Dir');
}
$tag_sort_by = $event->getEventParam('sort_by');
if ($tag_sort_by) {
if ($tag_sort_by == 'random') {
$object->AddOrderField('RAND()', '');
}
else {
// multiple sortings could be specified at once
$tag_sort_by = explode('|', $tag_sort_by);
foreach ($tag_sort_by as $sorting_element) {
list ($by, $dir) = explode(',', $sorting_element);
$object->AddOrderField($by, $dir);
}
}
}
$list_sortings = $this->Application->getUnitOption($event->Prefix, 'ListSortings', Array ());
$sorting_prefix = array_key_exists($event->Special, $list_sortings) ? $event->Special : '';
$sorting_configs = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping');
if ($sorting_configs && array_key_exists('DefaultSorting1Field', $sorting_configs)) {
// sorting defined in configuration variables overrides one from unit config
$list_sortings[$sorting_prefix]['Sorting'] = Array (
$this->Application->ConfigValue($sorting_configs['DefaultSorting1Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting1Dir']),
$this->Application->ConfigValue($sorting_configs['DefaultSorting2Field']) => $this->Application->ConfigValue($sorting_configs['DefaultSorting2Dir']),
);
// TODO: lowercase configuration variable values in db, instead of here
$list_sortings[$sorting_prefix]['Sorting'] = array_map('strtolower', $list_sortings[$sorting_prefix]['Sorting']);
}
// use default if not specified in session
if ( !$cur_sort1 || !$cur_sort1_dir ) {
$sorting = getArrayValue($list_sortings, $sorting_prefix, 'Sorting');
if ( $sorting ) {
reset($sorting);
$cur_sort1 = key($sorting);
$cur_sort1_dir = current($sorting);
if ( next($sorting) ) {
$cur_sort2 = key($sorting);
$cur_sort2_dir = current($sorting);
}
}
}
// always add forced sorting before any user sorting fields
$forced_sorting = getArrayValue($list_sortings, $sorting_prefix, 'ForcedSorting');
/* @var $forced_sorting Array */
if ( $forced_sorting ) {
foreach ($forced_sorting as $field => $dir) {
$object->AddOrderField($field, $dir);
}
}
// add user sorting fields
if ( $cur_sort1 != '' && $cur_sort1_dir != '' ) {
$object->AddOrderField($cur_sort1, $cur_sort1_dir);
}
if ( $cur_sort2 != '' && $cur_sort2_dir != '' ) {
$object->AddOrderField($cur_sort2, $cur_sort2_dir);
}
}
/**
* Gets list setting by name (persistent or real session)
*
* @param kEvent $event
* @param string $variable_name
* @return string|Array
* @access protected
*/
protected function getListSetting(&$event, $variable_name)
{
$view_name = $this->Application->RecallVar($event->getPrefixSpecial() . '_current_view');
$storage_prefix = $event->getEventParam('same_special') ? $event->Prefix : $event->getPrefixSpecial();
// get sorting from persistent session
$variable_value = $this->Application->RecallPersistentVar($storage_prefix . '_' . $variable_name . '.' . $view_name, ALLOW_DEFAULT_SETTINGS);
/*if (!$variable_value) {
// get sorting from session
$variable_value = $this->Application->RecallVar($storage_prefix . '_' . $variable_name);
}*/
if ( kUtil::IsSerialized($variable_value) ) {
$variable_value = unserialize($variable_value);
}
return $variable_value;
}
/**
* Sets list setting by name (persistent and real session)
*
* @param kEvent $event
* @param string $variable_name
* @param string|Array $variable_value
* @return void
* @access protected
*/
protected function setListSetting(&$event, $variable_name, $variable_value = null)
{
$view_name = $this->Application->RecallVar($event->getPrefixSpecial() . '_current_view');
// $this->Application->StoreVar($event->getPrefixSpecial() . '_' . $variable_name, $variable_value, true); //true for optional
if ( isset($variable_value) ) {
if ( is_array($variable_value) ) {
$variable_value = serialize($variable_value);
}
$this->Application->StorePersistentVar($event->getPrefixSpecial() . '_' . $variable_name . '.' . $view_name, $variable_value, true); //true for optional
}
else {
$this->Application->RemovePersistentVar($event->getPrefixSpecial() . '_' . $variable_name . '.' . $view_name);
}
}
/**
* Add filters found in session
*
* @param kEvent $event
*/
function AddFilters(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
$edit_mark = rtrim($this->Application->GetSID() . '_' . $this->Application->GetTopmostWid($event->Prefix), '_');
// add search filter
$filter_data = $this->Application->RecallVar($event->getPrefixSpecial() . '_search_filter');
if ( $filter_data ) {
$filter_data = unserialize($filter_data);
foreach ($filter_data as $filter_field => $filter_params) {
$filter_type = ($filter_params['type'] == 'having') ? kDBList::HAVING_FILTER : kDBList::WHERE_FILTER;
$filter_value = str_replace(EDIT_MARK, $edit_mark, $filter_params['value']);
$object->addFilter($filter_field, $filter_value, $filter_type, kDBList::FLT_SEARCH);
}
}
// add custom filter
$view_name = $this->Application->RecallVar($event->getPrefixSpecial() . '_current_view');
$custom_filters = $this->Application->RecallPersistentVar($event->getPrefixSpecial() . '_custom_filter.' . $view_name);
if ( $custom_filters ) {
$grid_name = $event->getEventParam('grid');
$custom_filters = unserialize($custom_filters);
if ( isset($custom_filters[$grid_name]) ) {
foreach ($custom_filters[$grid_name] as $field_name => $field_options) {
list ($filter_type, $field_options) = each($field_options);
if ( isset($field_options['value']) && $field_options['value'] ) {
$filter_type = ($field_options['sql_filter_type'] == 'having') ? kDBList::HAVING_FILTER : kDBList::WHERE_FILTER;
$filter_value = str_replace(EDIT_MARK, $edit_mark, $field_options['value']);
$object->addFilter($field_name, $filter_value, $filter_type, kDBList::FLT_CUSTOM);
}
}
}
}
$view_filter = $this->Application->RecallVar($event->getPrefixSpecial() . '_view_filter');
if ( $view_filter ) {
$view_filter = unserialize($view_filter);
$temp_filter =& $this->Application->makeClass('kMultipleFilter');
/* @var $temp_filter kMultipleFilter */
$filter_menu = $this->Application->getUnitOption($event->Prefix, 'FilterMenu');
$group_key = 0;
$group_count = count($filter_menu['Groups']);
while ( $group_key < $group_count ) {
$group_info = $filter_menu['Groups'][$group_key];
$temp_filter->setType(constant('kDBList::FLT_TYPE_' . $group_info['mode']));
$temp_filter->clearFilters();
foreach ($group_info['filters'] as $flt_id) {
$sql_key = getArrayValue($view_filter, $flt_id) ? 'on_sql' : 'off_sql';
if ( $filter_menu['Filters'][$flt_id][$sql_key] != '' ) {
$temp_filter->addFilter('view_filter_' . $flt_id, $filter_menu['Filters'][$flt_id][$sql_key]);
}
}
$object->addFilter('view_group_' . $group_key, $temp_filter, $group_info['type'], kDBList::FLT_VIEW);
$group_key++;
}
}
}
/**
* Set's new sorting for list
*
* @param kEvent $event
* @access protected
*/
function OnSetSorting(&$event)
{
$sorting_settings = $this->getListSetting($event, 'Sortings');
$cur_sort1 = getArrayValue($sorting_settings, 'Sort1');
$cur_sort1_dir = getArrayValue($sorting_settings, 'Sort1_Dir');
$use_double_sorting = $this->Application->ConfigValue('UseDoubleSorting');
if ( $use_double_sorting ) {
$cur_sort2 = getArrayValue($sorting_settings, 'Sort2');
$cur_sort2_dir = getArrayValue($sorting_settings, 'Sort2_Dir');
}
$passed_sort1 = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Sort1');
if ( $cur_sort1 == $passed_sort1 ) {
$cur_sort1_dir = $cur_sort1_dir == 'asc' ? 'desc' : 'asc';
}
else {
if ( $use_double_sorting ) {
$cur_sort2 = $cur_sort1;
$cur_sort2_dir = $cur_sort1_dir;
}
$cur_sort1 = $passed_sort1;
$cur_sort1_dir = 'asc';
}
$sorting_settings = Array ('Sort1' => $cur_sort1, 'Sort1_Dir' => $cur_sort1_dir);
if ( $use_double_sorting ) {
$sorting_settings['Sort2'] = $cur_sort2;
$sorting_settings['Sort2_Dir'] = $cur_sort2_dir;
}
$this->setListSetting($event, 'Sortings', $sorting_settings);
}
/**
* Set sorting directly to session (used for category item sorting (front-end), grid sorting (admin, view menu)
*
* @param kEvent $event
*/
function OnSetSortingDirect(&$event)
{
// used on Front-End in category item lists
$prefix_special = $event->getPrefixSpecial();
$combined = $this->Application->GetVar($event->getPrefixSpecial(true) . '_CombinedSorting');
if ( $combined ) {
list ($field, $dir) = explode('|', $combined);
if ( $this->Application->isAdmin || !$this->Application->GetVar('main_list') ) {
$this->setListSetting($event, 'Sortings', Array ('Sort1' => $field, 'Sort1_Dir' => $dir));
}
else {
$event->setPseudoClass('_List');
$this->Application->SetVar('sort_by', $field . ',' . $dir);
$object =& $event->getObject(Array ('main_list' => 1));
/* @var $object kDBList */
$list_helper =& $this->Application->recallObject('ListHelper');
/* @var $list_helper ListHelper */
$this->_passListParams($event, 'sort_by');
if ( $list_helper->hasUserSorting($object) ) {
$event->SetRedirectParam('sort_by', $field . ',' . strtolower($dir));
}
$event->SetRedirectParam('pass', 'm');
}
return;
}
// used in "View Menu -> Sort" menu in administrative console
$field_pos = $this->Application->GetVar($event->getPrefixSpecial(true) . '_SortPos');
$this->Application->LinkVar($event->getPrefixSpecial(true) . '_Sort' . $field_pos, $prefix_special . '_Sort' . $field_pos);
$this->Application->LinkVar($event->getPrefixSpecial(true) . '_Sort' . $field_pos . '_Dir', $prefix_special . '_Sort' . $field_pos . '_Dir');
}
/**
* Reset grid sorting to default (from config)
*
* @param kEvent $event
*/
function OnResetSorting(&$event)
{
$this->setListSetting($event, 'Sortings');
}
/**
* Sets grid refresh interval
*
* @param kEvent $event
*/
function OnSetAutoRefreshInterval(&$event)
{
$refresh_interval = $this->Application->GetVar('refresh_interval');
$view_name = $this->Application->RecallVar($event->getPrefixSpecial().'_current_view');
$this->Application->StorePersistentVar($event->getPrefixSpecial().'_refresh_interval.'.$view_name, $refresh_interval);
}
/**
* Changes auto-refresh state for grid
*
* @param kEvent $event
*/
function OnAutoRefreshToggle(&$event)
{
$refresh_intervals = $this->Application->ConfigValue('AutoRefreshIntervals');
if (!$refresh_intervals) {
return ;
}
$view_name = $this->Application->RecallVar($event->getPrefixSpecial().'_current_view');
$auto_refresh = $this->Application->RecallPersistentVar($event->getPrefixSpecial().'_auto_refresh.'.$view_name);
if ($auto_refresh === false) {
$refresh_intervals = explode(',', $refresh_intervals);
$this->Application->StorePersistentVar($event->getPrefixSpecial().'_refresh_interval.'.$view_name, $refresh_intervals[0]);
}
$this->Application->StorePersistentVar($event->getPrefixSpecial().'_auto_refresh.'.$view_name, $auto_refresh ? 0 : 1);
}
/**
* Creates needed sql query to load item,
* if no query is defined in config for
* special requested, then use default
* query
*
* @param kEvent $event
* @access protected
*/
function ItemPrepareQuery(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$sqls = $object->getFormOption('ItemSQLs', Array ());
$special = isset($sqls[$event->Special]) ? $event->Special : '';
// preferred special not found in ItemSQLs -> use analog from ListSQLs
return isset($sqls[$special]) ? $sqls[$special] : $this->ListPrepareQuery($event);
}
/**
* Creates needed sql query to load list,
* if no query is defined in config for
* special requested, then use default
* query
*
* @param kEvent $event
* @access protected
*/
function ListPrepareQuery(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$sqls = $object->getFormOption('ListSQLs', Array ());
return $sqls[ array_key_exists($event->Special, $sqls) ? $event->Special : '' ];
}
/**
* Apply custom processing to item
*
* @param kEvent $event
* @param string $type
* @return void
* @access protected
*/
protected function customProcessing(&$event, $type)
{
}
/* Edit Events mostly used in Admin */
/**
* Creates new kDBItem
*
* @param kEvent $event
* @access protected
*/
function OnCreate(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ($items_info) {
list($id,$field_values) = each($items_info);
$object->SetFieldsFromHash($field_values);
}
$this->customProcessing($event,'before');
//look at kDBItem' Create for ForceCreateId description, it's rarely used and is NOT set by default
if ( $object->Create($event->getEventParam('ForceCreateId')) ) {
$this->customProcessing($event,'after');
$event->status=kEvent::erSUCCESS;
$event->setRedirectParams(Array('opener'=>'u'), true);
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
$this->Application->SetVar($event->getPrefixSpecial().'_SaveEvent','OnCreate');
$object->setID($id);
}
}
/**
* Updates kDBItem
*
* @param kEvent $event
* @access protected
*/
protected function OnUpdate(&$event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ( $items_info ) {
foreach ($items_info as $id => $field_values) {
$object->Load($id);
$object->SetFieldsFromHash($field_values);
$this->customProcessing($event, 'before');
if ( $object->Update($id) ) {
$this->customProcessing($event, 'after');
$event->status = kEvent::erSUCCESS;
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
$event->SetRedirectParam('opener', 'u');
}
/**
* Delete's kDBItem object
*
* @param kEvent $event
* @access protected
*/
function OnDelete(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
return;
}
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array ($this->getPassedID($event)));
}
/**
* Deletes all records from table
*
* @param kEvent $event
*/
function OnDeleteAll(&$event)
{
$sql = 'SELECT ' . $this->Application->getUnitOption($event->Prefix, 'IDField') . '
FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName');
$ids = $this->Conn->GetCol($sql);
if ($ids) {
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
}
}
/**
* Prepares new kDBItem object
*
* @param kEvent $event
* @access protected
*/
function OnNew(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$object->Clear(0);
$this->Application->SetVar($event->getPrefixSpecial().'_SaveEvent', 'OnCreate');
if ($event->getEventParam('top_prefix') != $event->Prefix) {
// this is subitem prefix, so use main item special
$table_info = $object->getLinkedInfo( $this->getMainSpecial($event) );
}
else {
$table_info = $object->getLinkedInfo();
}
$object->SetDBField($table_info['ForeignKey'], $table_info['ParentId']);
$event->redirect = false;
}
/**
* Cancels kDBItem Editing/Creation
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCancel(&$event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( $items_info ) {
$delete_ids = Array ();
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
foreach ($items_info as $id => $field_values) {
$object->Load($id);
// record created for using with selector (e.g. Reviews->Select User), and not validated => Delete it
if ( $object->isLoaded() && !$object->Validate() && ($id <= 0) ) {
$delete_ids[] = $id;
}
}
if ( $delete_ids ) {
$temp_handler->DeleteItems($event->Prefix, $event->Special, $delete_ids);
}
}
$event->SetRedirectParam('opener', 'u');
}
/**
* Deletes all selected items.
* Automatically recurse 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(&$event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return ;
}
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$ids = $this->StoreSelectedIDs($event);
$event->setEventParam('ids', $ids);
$this->customProcessing($event, 'before');
$ids = $event->getEventParam('ids');
if ( $ids ) {
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
}
$this->clearSelectedIDs($event);
}
/**
* Sets window id (of first opened edit window) to temp mark in uls
*
* @param kEvent $event
*/
function setTempWindowID(&$event)
{
$prefixes = Array ($event->Prefix, $event->getPrefixSpecial(true));
foreach ($prefixes as $prefix) {
$mode = $this->Application->GetVar($prefix . '_mode');
if ($mode == 't') {
$wid = $this->Application->GetVar('m_wid');
$this->Application->SetVar(str_replace('_', '.', $prefix) . '_mode', 't' . $wid);
break;
}
}
}
/**
* Prepare temp tables and populate it
* with items selected in the grid
*
* @param kEvent $event
*/
function OnEdit(&$event)
{
$this->setTempWindowID($event);
$ids = $this->StoreSelectedIDs($event);
$this->Application->RemoveVar( $this->_getPendingActionVariableName($event) );
$changes_var_name = $this->Prefix . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
$this->Application->RemoveVar($changes_var_name);
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->PrepareEdit();
$event->SetRedirectParam('m_lang', $this->Application->GetDefaultLanguageId());
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', array_shift($ids));
$event->SetRedirectParam('pass', 'all,' . $event->getPrefixSpecial());
}
/**
* Saves content of temp table into live and
* redirects to event' default redirect (normally grid template)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnSave(&$event)
{
$event->CallSubEvent('OnPreSave');
if ($event->status != kEvent::erSUCCESS) {
return ;
}
$skip_master = false;
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$changes_var_name = $this->Prefix . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
if ( !$this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$live_ids = $temp_handler->SaveEdit($event->getEventParam('master_ids') ? $event->getEventParam('master_ids') : Array ());
if ( $live_ids === false ) {
// coping from table failed, because we have another coping process to same table, that wasn't finished
$event->status = kEvent::erFAIL;
return ;
}
if ( $live_ids ) {
// ensure, that newly created item ids are available as if they were selected from grid
// NOTE: only works if main item has sub-items !!!
$this->StoreSelectedIDs($event, $live_ids);
}
$object =& $event->getObject();
/* @var $object kDBItem */
$this->SaveLoggedChanges($changes_var_name, $object->ShouldLogChanges());
}
else {
$event->status = kEvent::erFAIL;
}
$this->clearSelectedIDs($event);
$event->setRedirectParams(Array ('opener' => 'u'), true);
$this->Application->RemoveVar($event->getPrefixSpecial() . '_modified');
// all temp tables are deleted here => all after hooks should think, that it's live mode now
$this->Application->SetVar($event->Prefix . '_mode', '');
}
function SaveLoggedChanges($changes_var_name, $save = true)
{
// 1. get changes, that were made
$changes = $this->Application->RecallVar($changes_var_name);
$changes = $changes ? unserialize($changes) : Array ();
$this->Application->RemoveVar($changes_var_name);
if (!$changes) {
// no changes, skip processing
return ;
}
// TODO: 2. optimize change log records (replace multiple changes to same record with one change record)
$to_increment = Array ();
// 3. collect serials to reset based on foreign keys
foreach ($changes as $index => $rec) {
if (array_key_exists('DependentFields', $rec)) {
foreach ($rec['DependentFields'] as $field_name => $field_value) {
// will be "ci|ItemResourceId:345"
$to_increment[] = $rec['Prefix'] . '|' . $field_name . ':' . $field_value;
// also reset sub-item prefix general serial
$to_increment[] = $rec['Prefix'];
}
unset($changes[$index]['DependentFields']);
}
unset($changes[$index]['ParentId'], $changes[$index]['ParentPrefix']);
}
// 4. collect serials to reset based on changed ids
foreach ($changes as $change) {
$to_increment[] = $change['MasterPrefix'] . '|' . $change['MasterId'];
if ($change['MasterPrefix'] != $change['Prefix']) {
// also reset sub-item prefix general serial
$to_increment[] = $change['Prefix'];
// will be "ci|ItemResourceId"
$to_increment[] = $change['Prefix'] . '|' . $change['ItemId'];
}
}
// 5. reset serials collected before
$to_increment = array_unique($to_increment);
$this->Application->incrementCacheSerial($this->Prefix);
foreach ($to_increment as $to_increment_mixed) {
if (strpos($to_increment_mixed, '|') !== false) {
list ($to_increment_prefix, $to_increment_id) = explode('|', $to_increment_mixed, 2);
$this->Application->incrementCacheSerial($to_increment_prefix, $to_increment_id);
}
else {
$this->Application->incrementCacheSerial($to_increment_mixed);
}
}
// save changes to database
$sesion_log_id = $this->Application->RecallVar('_SessionLogId_');
if (!$save || !$sesion_log_id) {
// saving changes to database disabled OR related session log missing
return ;
}
$add_fields = Array (
'PortalUserId' => $this->Application->RecallVar('user_id'),
'SessionLogId' => $sesion_log_id,
);
$change_log_table = $this->Application->getUnitOption('change-log', 'TableName');
foreach ($changes as $rec) {
$this->Conn->doInsert(array_merge($rec, $add_fields), $change_log_table);
}
$this->Application->incrementCacheSerial('change-log');
$sql = 'UPDATE ' . $this->Application->getUnitOption('session-log', 'TableName') . '
SET AffectedItems = AffectedItems + ' . count($changes) . '
WHERE SessionLogId = ' . $sesion_log_id;
$this->Conn->Query($sql);
$this->Application->incrementCacheSerial('session-log');
}
/**
* Cancels edit
* Removes all temp tables and clears selected ids
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnCancelEdit(&$event)
{
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->CancelEdit();
$this->clearSelectedIDs($event);
$event->setRedirectParams(Array ('opener' => 'u'), true);
$this->Application->RemoveVar($event->getPrefixSpecial() . '_modified');
$changes_var_name = $this->Prefix . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
$this->Application->RemoveVar($changes_var_name);
}
/**
* Allows to determine if we are creating new item or editing already created item
*
* @param kEvent $event
* @return bool
*/
function isNewItemCreate(&$event)
{
$object =& $event->getObject( Array ('raise_warnings' => 0) );
/* @var $object kDBItem */
return !$object->isLoaded();
}
/**
* 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(&$event)
{
// if there is no id - it means we need to create an item
if ( is_object($event->MasterEvent) ) {
$event->MasterEvent->setEventParam('IsNew', false);
}
if ( $this->isNewItemCreate($event) ) {
$event->CallSubEvent('OnPreSaveCreated');
if ( is_object($event->MasterEvent) ) {
$event->MasterEvent->setEventParam('IsNew', true);
}
return ;
}
$object =& $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
if ( $items_info ) {
foreach ($items_info as $id => $field_values) {
$object->Load($id);
$object->SetFieldsFromHash($field_values);
$this->customProcessing($event, 'before');
if ( $object->Update($id) ) {
$this->customProcessing($event, 'after');
$event->status = kEvent::erSUCCESS;
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
}
/**
* [HOOK] Saves sub-item
*
* @param kEvent $event
*/
function OnPreSaveSubItem(&$event)
{
$not_created = $this->isNewItemCreate($event);
$event->CallSubEvent($not_created ? 'OnCreate' : 'OnUpdate');
if ($event->status == kEvent::erSUCCESS) {
$object =& $event->getObject();
/* @var $object kDBItem */
$this->Application->SetVar($event->getPrefixSpecial() . '_id', $object->GetID());
}
else {
$event->MasterEvent->status = $event->status;
}
$event->SetRedirectParam('opener', 's');
}
/**
* Saves edited item in temp table and loads
* item with passed id in current template
* Used in Prev/Next buttons
*
* @param kEvent $event
*/
function OnPreSaveAndGo(&$event)
{
$event->CallSubEvent('OnPreSave');
if ($event->status == kEvent::erSUCCESS) {
$id = $this->Application->GetVar($event->getPrefixSpecial(true) . '_GoId');
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', $id);
}
}
/**
* Saves edited item in temp table and goes
* to passed tabs, by redirecting to it with OnPreSave event
*
* @param kEvent $event
*/
function OnPreSaveAndGoToTab(&$event)
{
$event->CallSubEvent('OnPreSave');
if ($event->status==kEvent::erSUCCESS) {
$event->redirect=$this->Application->GetVar($event->getPrefixSpecial(true).'_GoTab');
}
}
/**
* Saves editable list and goes to passed tab,
* by redirecting to it with empty event
*
* @param kEvent $event
*/
function OnUpdateAndGoToTab(&$event)
{
$event->setPseudoClass('_List');
$event->CallSubEvent('OnUpdate');
if ($event->status==kEvent::erSUCCESS) {
$event->redirect=$this->Application->GetVar($event->getPrefixSpecial(true).'_GoTab');
}
}
/**
* Prepare temp tables for creating new item
* but does not create it. Actual create is
* done in OnPreSaveCreated
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreCreate(&$event)
{
$this->setTempWindowID($event);
$this->clearSelectedIDs($event);
$this->Application->SetVar('m_lang', $this->Application->GetDefaultLanguageId());
$object =& $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$temp_handler =& $this->Application->recallObject($event->Prefix . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$temp_handler->PrepareEdit();
$object->setID(0);
$this->Application->SetVar($event->getPrefixSpecial() . '_id', 0);
$this->Application->SetVar($event->getPrefixSpecial() . '_PreCreate', 1);
$changes_var_name = $this->Prefix . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
$this->Application->RemoveVar($changes_var_name);
$event->redirect = false;
}
/**
* 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(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
$this->customProcessing($event, 'before');
if ( $object->Create() ) {
$this->customProcessing($event, 'after');
$event->SetRedirectParam($event->getPrefixSpecial(true) . '_id', $object->GetID());
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
$object->setID(0);
}
}
/**
* Reloads form to loose all changes made during item editing
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnReset(&$event)
{
//do nothing - should reset :)
if ( $this->isNewItemCreate($event) ) {
// just reset id to 0 in case it was create
$object =& $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$object->setID(0);
$this->Application->SetVar($event->getPrefixSpecial() . '_id', 0);
}
}
/**
* Apply same processing to each item being selected in grid
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function iterateItems(&$event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return ;
}
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$ids = $this->StoreSelectedIDs($event);
if ( $ids ) {
$status_field = array_shift( $this->Application->getUnitOption($event->Prefix, 'StatusField') );
$order_field = $this->Application->getUnitOption($event->Prefix, 'OrderField');
if ( !$order_field ) {
$order_field = 'Priority';
}
foreach ($ids as $id) {
$object->Load($id);
switch ( $event->Name ) {
case 'OnMassApprove':
$object->SetDBField($status_field, 1);
break;
case 'OnMassDecline':
$object->SetDBField($status_field, 0);
break;
case 'OnMassMoveUp':
$object->SetDBField($order_field, $object->GetDBField($order_field) + 1);
break;
case 'OnMassMoveDown':
$object->SetDBField($order_field, $object->GetDBField($order_field) - 1);
break;
}
if ( $object->Update() ) {
$event->status = kEvent::erSUCCESS;
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
$this->clearSelectedIDs($event);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnMassClone(&$event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return ;
}
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler', Array ('parent_event' => &$event));
/* @var $temp_handler kTempTablesHandler */
$ids = $this->StoreSelectedIDs($event);
if ( $ids ) {
$temp_handler->CloneItems($event->Prefix, $event->Special, $ids);
}
$this->clearSelectedIDs($event);
}
function check_array($records, $field, $value)
{
foreach ($records as $record) {
if ($record[$field] == $value) {
return true;
}
}
return false;
}
/**
* Saves data from editing form to database without checking required fields
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreSavePopup(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$this->RemoveRequiredFields($object);
$event->CallSubEvent('OnPreSave');
$event->SetRedirectParam('opener', 'u');
}
/* End of Edit events */
// III. Events that allow to put some code before and after Update,Load,Create and Delete methods of item
/**
* Occurse before loading item, 'id' parameter
* allows to get id of item beeing loaded
*
* @param kEvent $event
* @access public
*/
function OnBeforeItemLoad(&$event)
{
}
/**
* Occurs after loading item, 'id' parameter
* allows to get id of item that was loaded
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(&$event)
{
}
/**
* Occurs before creating item
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(&$event)
{
}
/**
* Occurs after creating item
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
if ( !$object->IsTempTable() ) {
$this->_proccessPendingActions($event);
}
}
/**
* Occurs before updating item
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(&$event)
{
}
/**
* Occurs after updating item
*
* @param kEvent $event
* @access public
*/
function OnAfterItemUpdate(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
if ( !$object->IsTempTable() ) {
$this->_proccessPendingActions($event);
}
}
/**
* Occurse before deleting item, id of item beeing
* deleted is stored as 'id' event param
*
* @param kEvent $event
* @access public
*/
function OnBeforeItemDelete(&$event)
{
}
/**
* Occurse after deleting item, id of deleted item
* is stored as 'id' param of event
*
* @param kEvent $event
* @access public
*/
function OnAfterItemDelete(&$event)
{
}
/**
* Occurs before validation attempt
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemValidate(kEvent &$event)
{
}
/**
* Occurs after successful item validation
*
* @param kEvent $event
+ * @return void
+ * @access protected
*/
- function OnAfterItemValidate(&$event)
+ protected function OnAfterItemValidate(kEvent &$event)
{
}
/**
* Occures after an item has been copied to temp
* Id of copied item is passed as event' 'id' param
*
* @param kEvent $event
*/
function OnAfterCopyToTemp(&$event)
{
}
/**
* Occurs before an item is deleted from live table when copying from temp
* (temp handler deleted all items from live and then copy over all items from temp)
* Id of item being deleted is passed as event' 'id' param
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeDeleteFromLive(&$event)
{
}
/**
* Occures before an item is copied to live table (after all foreign keys have been updated)
* Id of item being copied is passed as event' 'id' param
*
* @param kEvent $event
*/
function OnBeforeCopyToLive(&$event)
{
}
/**
* Occures after an item has been copied to live table
* Id of copied item is passed as event' 'id' param
*
* @param kEvent $event
*/
function OnAfterCopyToLive(&$event)
{
$this->_proccessPendingActions($event);
}
/**
* Processing file pending actions (e.g. delete scheduled files)
*
* @param kEvent $event
*/
function _proccessPendingActions(&$event)
{
$var_name = $this->_getPendingActionVariableName($event);
$schedule = $this->Application->RecallVar($var_name);
if ( $schedule ) {
$schedule = unserialize($schedule);
foreach ($schedule as $data) {
if ( $data['action'] == 'delete' ) {
unlink( $data['file'] );
}
}
$this->Application->RemoveVar($var_name);
}
}
/**
* Returns variable name, used to store pending file actions
*
* @param kEvent $event
* @return string
*/
function _getPendingActionVariableName(&$event)
{
$window_id = $this->Application->GetTopmostWid($event->Prefix);
return $event->Prefix . '_file_pending_actions' . $window_id;
}
/**
* 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(&$event)
{
}
/**
* Occures after an item has been cloned
* Id of newly created item is passed as event' 'id' param
*
* @param kEvent $event
*/
function OnAfterClone(&$event)
{
}
/**
* Occures after list is queried
*
* @param kEvent $event
*/
function OnAfterListQuery(&$event)
{
}
/**
* Ensures that popup will be closed automatically
* and parent window will be refreshed with template
* passed
*
* @param kEvent $event
* @return void
* @access protected
* @deprecated
*/
protected function finalizePopup(&$event)
{
$event->SetRedirectParam('opener', 'u');
}
/**
* Create search filters based on search query
*
* @param kEvent $event
* @access protected
*/
function OnSearch(&$event)
{
$event->setPseudoClass('_List');
$search_helper =& $this->Application->recallObject('SearchHelper');
/* @var $search_helper kSearchHelper */
$search_helper->performSearch($event);
}
/**
* Clear search keywords
*
* @param kEvent $event
* @access protected
*/
function OnSearchReset(&$event)
{
$search_helper =& $this->Application->recallObject('SearchHelper');
/* @var $search_helper kSearchHelper */
$search_helper->resetSearch($event);
}
/**
* Set's new filter value (filter_id meaning from config)
*
* @param kEvent $event
*/
function OnSetFilter(&$event)
{
$filter_id = $this->Application->GetVar('filter_id');
$filter_value = $this->Application->GetVar('filter_value');
$view_filter = $this->Application->RecallVar($event->getPrefixSpecial().'_view_filter');
$view_filter = $view_filter ? unserialize($view_filter) : Array();
$view_filter[$filter_id] = $filter_value;
$this->Application->StoreVar( $event->getPrefixSpecial().'_view_filter', serialize($view_filter) );
}
/**
* Sets view filter based on request
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnSetFilterPattern(&$event)
{
$filters = $this->Application->GetVar($event->getPrefixSpecial(true) . '_filters');
if ( !$filters ) {
return;
}
$view_filter = $this->Application->RecallVar($event->getPrefixSpecial() . '_view_filter');
$view_filter = $view_filter ? unserialize($view_filter) : Array ();
$filters = explode(',', $filters);
foreach ($filters as $a_filter) {
list($id, $value) = explode('=', $a_filter);
$view_filter[$id] = $value;
}
$this->Application->StoreVar($event->getPrefixSpecial() . '_view_filter', serialize($view_filter));
$event->redirect = false;
}
/**
* Add/Remove all filters applied to list from "View" menu
*
* @param kEvent $event
*/
function FilterAction(&$event)
{
$view_filter = Array();
$filter_menu = $this->Application->getUnitOption($event->Prefix,'FilterMenu');
switch ($event->Name)
{
case 'OnRemoveFilters':
$filter_value = 1;
break;
case 'OnApplyFilters':
$filter_value = 0;
break;
}
foreach($filter_menu['Filters'] as $filter_key => $filter_params)
{
if(!$filter_params) continue;
$view_filter[$filter_key] = $filter_value;
}
$this->Application->StoreVar( $event->getPrefixSpecial().'_view_filter', serialize($view_filter) );
}
/**
* Enter description here...
*
* @param kEvent $event
* @access protected
*/
protected function OnPreSaveAndOpenTranslator(&$event)
{
$this->Application->SetVar('allow_translation', true);
$object =& $event->getObject();
/* @var $object kDBItem */
$this->RemoveRequiredFields($object);
$event->CallSubEvent('OnPreSave');
if ( $event->status == kEvent::erSUCCESS ) {
$resource_id = $this->Application->GetVar('translator_resource_id');
if ( $resource_id ) {
$t_prefixes = explode(',', $this->Application->GetVar('translator_prefixes'));
$cdata =& $this->Application->recallObject($t_prefixes[1], null, Array ('skip_autoload' => true));
/* @var $cdata kDBItem */
$cdata->Load($resource_id, 'ResourceId');
if ( !$cdata->isLoaded() ) {
$cdata->SetDBField('ResourceId', $resource_id);
$cdata->Create();
}
$this->Application->SetVar($cdata->getPrefixSpecial() . '_id', $cdata->GetID());
}
$event->redirect = $this->Application->GetVar('translator_t');
$redirect_params = Array (
'pass' => 'all,trans,' . $this->Application->GetVar('translator_prefixes'),
'opener' => 's',
$event->getPrefixSpecial(true) . '_id' => $object->GetID(),
'trans_event' => 'OnLoad',
'trans_prefix' => $this->Application->GetVar('translator_prefixes'),
'trans_field' => $this->Application->GetVar('translator_field'),
'trans_multi_line' => $this->Application->GetVar('translator_multi_line'),
);
$event->setRedirectParams($redirect_params, true);
// 1. SAVE LAST TEMPLATE TO SESSION (really needed here, because of tweaky redirect)
$last_template = $this->Application->RecallVar('last_template');
preg_match('/index4\.php\|' . $this->Application->GetSID() . '-(.*):/U', $last_template, $rets);
$this->Application->StoreVar('return_template', $this->Application->GetVar('t'));
}
}
/**
* Makes all fields non-required
*
* @param kDBItem $object
*/
function RemoveRequiredFields(&$object)
{
// making all field non-required to achieve successful presave
$fields = array_keys( $object->getFields() );
foreach ($fields as $field) {
if ( $object->isRequired($field) ) {
$object->setRequired($field, false);
}
}
}
/**
* Saves selected user in needed field
*
* @param kEvent $event
*/
function OnSelectUser(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$items_info = $this->Application->GetVar('u');
if ( $items_info ) {
$user_id = array_shift( array_keys($items_info) );
$this->RemoveRequiredFields($object);
$is_new = !$object->isLoaded();
$is_main = substr($this->Application->GetVar($event->Prefix . '_mode'), 0, 1) == 't';
if ( $is_new ) {
$new_event = $is_main ? 'OnPreCreate' : 'OnNew';
$event->CallSubEvent($new_event);
$event->redirect = true;
}
$object->SetDBField($this->Application->RecallVar('dst_field'), $user_id);
if ( $is_new ) {
$object->Create();
}
else {
$object->Update();
}
}
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', $object->GetID());
$event->SetRedirectParam('opener', 'u');
}
/** EXPORT RELATED **/
/**
* Shows export dialog
*
* @param kEvent $event
*/
function OnExport(&$event)
{
$selected_ids = $this->StoreSelectedIDs($event);
if (implode(',', $selected_ids) == '') {
// K4 fix when no ids found bad selected ids array is formed
$selected_ids = false;
}
$this->Application->StoreVar($event->Prefix.'_export_ids', $selected_ids ? implode(',', $selected_ids) : '' );
$this->Application->LinkVar('export_finish_t');
$this->Application->LinkVar('export_progress_t');
$this->Application->StoreVar('export_oroginal_special', $event->Special);
$export_helper =& $this->Application->recallObject('CatItemExportHelper');
/*list ($index_file, $env) = explode('|', $this->Application->RecallVar('last_template'));
$finish_url = $this->Application->BaseURL('/admin').$index_file.'?'.ENV_VAR_NAME.'='.$env;
$this->Application->StoreVar('export_finish_url', $finish_url);*/
$redirect_params = Array (
$this->Prefix . '.export_event' => 'OnNew',
'pass' => 'all,' . $this->Prefix . '.export'
);
$event->setRedirectParams($redirect_params);
}
/**
* Apply some special processing to object being
* recalled before using it in other events that
* call prepareObject
*
* @param kDBItem|kDBList $object
* @param kEvent $event
* @return void
* @access protected
*/
protected function prepareObject(&$object, &$event)
{
if ( $event->Special == 'export' || $event->Special == 'import' ) {
$export_helper =& $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$export_helper->prepareExportColumns($event);
}
}
/**
* Returns specific to each item type columns only
*
* @param kEvent $event
* @return Array
*/
function getCustomExportColumns(&$event)
{
return Array();
}
/**
* Export form validation & processing
*
* @param kEvent $event
*/
function OnExportBegin(&$event)
{
$export_helper =& $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$export_helper->OnExportBegin($event);
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnExportCancel(&$event)
{
$this->OnGoBack($event);
}
/**
* Allows configuring export options
*
* @param kEvent $event
*/
function OnBeforeExportBegin(&$event)
{
}
/**
* Deletes export preset
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnDeleteExportPreset(&$event)
{
$field_values = $this->getSubmittedFields($event);
if ( !$field_values ) {
return ;
}
$preset_key = $field_values['ExportPresets'];
$export_settings = $this->Application->RecallPersistentVar('export_settings');
if ( !$export_settings ) {
return ;
}
$export_settings = unserialize($export_settings);
if ( !isset($export_settings[$event->Prefix]) ) {
return ;
}
$to_delete = '';
foreach ($export_settings[$event->Prefix] as $key => $val) {
if ( implode('|', $val['ExportColumns']) == $preset_key ) {
$to_delete = $key;
break;
}
}
if ( $to_delete ) {
unset($export_settings[$event->Prefix][$to_delete]);
$this->Application->StorePersistentVar('export_settings', serialize($export_settings));
}
}
/**
* Saves changes & changes language
*
* @param kEvent $event
*/
function OnPreSaveAndChangeLanguage(&$event)
{
if ($this->UseTempTables($event)) {
$event->CallSubEvent('OnPreSave');
}
if ($event->status == kEvent::erSUCCESS) {
$this->Application->SetVar('m_lang', $this->Application->GetVar('language'));
$data = $this->Application->GetVar('st_id');
if ($data) {
$event->SetRedirectParam('st_id', $data);
}
}
}
/**
* Used to save files uploaded via swfuploader
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnUploadFile(&$event)
{
$event->status = kEvent::erSTOP;
// define('DBG_SKIP_REPORTING', 0);
$default_msg = "Flash requires that we output something or it won't fire the uploadSuccess event";
if (!$this->Application->HttpQuery->Post) {
// Variables {field, id, flashsid} are always submitted through POST!
// When file size is larger, then "upload_max_filesize" (in php.ini),
// then these variables also are not submitted -> handle such case.
header('HTTP/1.0 413 File size exceeds allowed limit');
echo $default_msg;
return ;
}
if (!$this->_checkFlashUploaderPermission($event)) {
// 403 Forbidden
header('HTTP/1.0 403 You don\'t have permissions to upload');
echo $default_msg;
return ;
}
$value = $this->Application->GetVar('Filedata');
if (!$value || ($value['error'] != UPLOAD_ERR_OK)) {
// 413 Request Entity Too Large (file uploads disabled OR uploaded file was
// to large for web server to accept, see "upload_max_filesize" in php.ini)
header('HTTP/1.0 413 File size exceeds allowed limit');
echo $default_msg;
return ;
}
$tmp_path = WRITEABLE . '/tmp/';
$fname = $value['name'];
$id = $this->Application->GetVar('id');
if ($id) {
$fname = $id . '_' . $fname;
}
$field_name = $this->Application->GetVar('field');
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
$virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields');
$field_options = array_key_exists($field_name, $fields) ? $fields[$field_name] : $virtual_fields[$field_name];
$upload_dir = $field_options['upload_dir'];
$storage_format = array_key_exists('storage_format', $field_options) ? $field_options['storage_format'] : false;
if (!is_writable($tmp_path)) {
// 500 Internal Server Error
// check both temp and live upload directory
header('HTTP/1.0 500 Write permissions not set on the server');
echo $default_msg;
return ;
}
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$fname = $file_helper->ensureUniqueFilename($tmp_path, $fname);
if ($storage_format) {
$image_helper =& $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
move_uploaded_file($value['tmp_name'], $value['tmp_name'] . '.jpg'); // add extension, so ResizeImage can work
$url = $image_helper->ResizeImage($value['tmp_name'] . '.jpg', $storage_format);
$tmp_name = preg_replace('/^' . preg_quote($this->Application->BaseURL(), '/') . '/', '/', $url);
rename($tmp_name, $tmp_path.$fname);
}
else {
move_uploaded_file($value['tmp_name'], $tmp_path.$fname);
}
echo preg_replace('/^' . preg_quote($id, '/') . '_/', '', $fname);
$this->deleteTempFiles($tmp_path);
}
/**
* Delete temporary files, that won't be used for sure
*
* @param string $path
*/
function deleteTempFiles($path)
{
$files = glob($path . '*.*');
$max_file_date = strtotime('-1 day');
foreach ($files as $file) {
if (filemtime($file) < $max_file_date) {
unlink($file);
}
}
}
/**
* Checks, that flash uploader is allowed to perform upload
*
* @param kEvent $event
* @return bool
*/
function _checkFlashUploaderPermission(&$event)
{
// Flash uploader does NOT send correct cookies, so we need to make our own check
$cookie_name = 'adm_' . $this->Application->ConfigValue('SessionCookieName');
$this->Application->HttpQuery->Cookie['cookies_on'] = 1;
$this->Application->HttpQuery->Cookie[$cookie_name] = $this->Application->GetVar('flashsid');
// this prevents session from auto-expiring when KeepSessionOnBrowserClose & FireFox is used
$this->Application->HttpQuery->Cookie[$cookie_name . '_live'] = $this->Application->GetVar('flashsid');
$admin_ses =& $this->Application->recallObject('Session.admin');
/* @var $admin_ses Session */
if ($admin_ses->RecallVar('user_id') == USER_ROOT) {
return true;
}
// copy some data from given session to current session
$backup_user_id = $this->Application->RecallVar('user_id');
$this->Application->StoreVar('user_id', $admin_ses->RecallVar('user_id'));
$backup_user_groups = $this->Application->RecallVar('UserGroups');
$this->Application->StoreVar('UserGroups', $admin_ses->RecallVar('UserGroups'));
// check permissions using event, that have "add|edit" rule
$check_event = new kEvent($event->getPrefixSpecial() . ':OnProcessSelected');
$check_event->setEventParam('top_prefix', $this->Application->GetTopmostPrefix($event->Prefix, true));
$allowed_to_upload = $this->CheckPermission($check_event);
// restore changed data, so nothing gets saved to database
$this->Application->StoreVar('user_id', $backup_user_id);
$this->Application->StoreVar('UserGroups', $backup_user_groups);
return $allowed_to_upload;
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnDeleteFile(&$event)
{
$event->status = kEvent::erSTOP;
if (strpos($this->Application->GetVar('file'), '../') !== false) {
return ;
}
$object =& $event->getObject( Array ('skip_autoload' => true) );
$options = $object->GetFieldOptions( $this->Application->GetVar('field') );
$var_name = $this->_getPendingActionVariableName($event);
$schedule = $this->Application->RecallVar($var_name);
$schedule = $schedule ? unserialize($schedule) : Array ();
$schedule[] = Array ('action' => 'delete', 'file' => FULL_PATH . $options['upload_dir'] . $this->Application->GetVar('file'));
$this->Application->StoreVar($var_name, serialize($schedule));
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnViewFile(&$event)
{
$event->status = kEvent::erSTOP;
$file = $this->Application->GetVar('file');
if ((strpos($file, '../') !== false) || (trim($file) !== $file)) {
// when relative paths or special chars are found template names from url, then it's hacking attempt
return ;
}
$object =& $event->getObject( Array ('skip_autoload' => true));
/* @var $object kDBItem */
$field = $this->Application->GetVar('field');
$options = $object->GetFieldOptions($field);
// set current uploaded file
if ($this->Application->GetVar('tmp')) {
$options['upload_dir'] = WRITEBALE_BASE . '/tmp/';
unset($options['include_path']);
$object->SetFieldOptions($field, $options);
$object->SetDBField($field, $this->Application->GetVar('id') . '_' . $file);
}
else {
$object->SetDBField($field, $file);
}
// get url to uploaded file
if ($this->Application->GetVar('thumb')) {
$url = $object->GetField($field, $options['thumb_format']);
}
else {
$url = $object->GetField($field, 'full_url'); // don't use "file_urls" format to prevent recursion
}
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$path = $file_helper->urlToPath($url);
if (!file_exists($path)) {
exit;
}
header('Content-Length: ' . filesize($path));
header('Content-Type: ' . kUtil::mimeContentType($path));
header('Content-Disposition: inline; filename="' . $file . '"');
readfile($path);
}
/**
* Validates MInput control fields
*
* @param kEvent $event
*/
function OnValidateMInputFields(&$event)
{
$minput_helper =& $this->Application->recallObject('MInputHelper');
/* @var $minput_helper MInputHelper */
$minput_helper->OnValidateMInputFields($event);
}
/**
* Returns auto-complete values for ajax-dropdown
*
* @param kEvent $event
*/
function OnSuggestValues(&$event)
{
if (!$this->Application->isAdminUser) {
// very careful here, because this event allows to
// view every object field -> limit only to logged-in admins
return ;
}
$event->status = kEvent::erSTOP;
$field = $this->Application->GetVar('field');
$cur_value = $this->Application->GetVar('cur_value');
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
$object =& $event->getObject();
if (!$field || !$cur_value || !$object->isField($field)) {
return ;
}
$limit = $this->Application->GetVar('limit');
if (!$limit) {
$limit = 20;
}
$sql = 'SELECT DISTINCT '.$field.'
FROM '.$this->Application->getUnitOption($event->Prefix, 'TableName').'
WHERE '.$field.' LIKE '.$this->Conn->qstr($cur_value.'%').'
ORDER BY '.$field.'
LIMIT 0,' . $limit;
$data = $this->Conn->GetCol($sql);
$this->Application->XMLHeader();
echo '<suggestions>';
foreach ($data as $item) {
echo '<item>' . htmlspecialchars($item) . '</item>';
}
echo '</suggestions>';
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnSaveWidths(&$event)
{
$event->status = kEvent::erSTOP;
/*$lang =& $this->Application->recallObject('lang.current');
header('Content-type: text/xml; charset=' . $lang->GetDBField('Charset'));*/
$picker_helper =& $this->Application->RecallObject('ColumnPickerHelper');
/* @var $picker_helper kColumnPickerHelper */
$picker_helper->PreparePicker($event->getPrefixSpecial(), $this->Application->GetVar('grid_name'));
$picker_helper->SaveWidths($event->getPrefixSpecial(), $this->Application->GetVar('widths'));
echo 'OK';
}
/**
* Called from CSV import script after item fields
* are set and validated, but before actual item create/update.
* If event status is kEvent::erSUCCESS, line will be imported,
* else it will not be imported but added to skipped lines
* and displayed in the end of import.
* Event status is preset from import script.
*
* @param kEvent $event
*/
function OnBeforeCSVLineImport(&$event)
{
// abstract, for hooking
}
/**
* [HOOK] Allows to add cloned subitem to given prefix
*
* @param kEvent $event
*/
function OnCloneSubItem(&$event)
{
$clones = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Clones');
$subitem_prefix = $event->Prefix . '-' . preg_replace('/^#/', '', $event->MasterEvent->Prefix);
$clones[$subitem_prefix] = Array ('ParentPrefix' => $event->Prefix);
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones);
}
/**
* Returns constrain for priority calculations
*
* @param kEvent $event
* @return void
* @see PriorityEventHandler
* @access protected
*/
protected function OnGetConstrainInfo(&$event)
{
$event->setEventParam('constrain_info', Array ('', ''));
}
}
\ No newline at end of file
Index: branches/5.2.x/core/kernel/db/cat_event_handler.php
===================================================================
--- branches/5.2.x/core/kernel/db/cat_event_handler.php (revision 14725)
+++ branches/5.2.x/core/kernel/db/cat_event_handler.php (revision 14726)
@@ -1,2892 +1,2892 @@
<?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 kCatDBEventHandler extends kDBEventHandler {
/**
* Allows to override standard permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array(
'OnSaveSettings' => Array ('self' => 'add|edit|advanced:import'),
'OnResetSettings' => Array ('self' => 'add|edit|advanced:import'),
'OnBeforeDeleteOriginal' => Array ('self' => 'edit|advanced:approve'),
'OnCopy' => Array ('self' => true),
'OnDownloadFile' => Array ('self' => 'view'),
'OnCancelAction' => Array ('self' => true),
'OnItemBuild' => Array ('self' => true),
'OnMakeVote' => Array ('self' => true),
'OnReviewHelpful' => Array ('self' => true),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Load item if id is available
*
* @param kEvent $event
* @return void
* @access protected
*/
function LoadItem(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$id = $this->getPassedID($event);
if ( $object->Load($id) ) {
$actions =& $this->Application->recallObject('kActions');
/* @var $actions Params */
$actions->Set($event->getPrefixSpecial() . '_id', $object->GetID());
$use_pending_editing = $this->Application->getUnitOption($event->Prefix, 'UsePendingEditing');
if ( $use_pending_editing && $event->Special != 'original' ) {
$this->Application->SetVar($event->Prefix . '.original_id', $object->GetDBField('OrgId'));
}
}
else {
$object->setID($id);
}
}
/**
* Checks user permission to execute given $event
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(&$event)
{
if (!$this->Application->isAdmin) {
if ($event->Name == 'OnSetSortingDirect') {
// allow sorting on front event without view permission
return true;
}
}
if ($event->Name == 'OnExport') {
// save category_id before doing export
$this->Application->LinkVar('m_cat_id');
}
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]['CategoryId'], $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['CategoryId'], $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);
}
$export_events = Array ('OnSaveSettings', 'OnResetSettings', 'OnExportBegin');
if (in_array($event->Name, $export_events)) {
// when import settings before selecting target import category
return $this->Application->CheckPermission('in-portal:main_import.view');
}
if ($event->Name == 'OnProcessSelected') {
if ($this->Application->RecallVar('dst_field') == 'ImportCategory') {
// when selecting target import category
return $this->Application->CheckPermission('in-portal:main_import.view');
}
}
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)
{
$perm_helper =& $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
// when saving data from temp table to live table check by data from temp table
$item_ids = $this->_getPermissionCheckIDs($event);
$items = $perm_helper->GetCategoryItemData($event->Prefix, $item_ids, $event->Name == 'OnSave');
if (!$items) {
// when item not present in temp table, then permission is not checked, because there are no data in db to check
$items_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
list ($id, $fields_hash) = each($items_info);
if (array_key_exists('CategoryId', $fields_hash)) {
$item_category = $fields_hash['CategoryId'];
}
else {
$item_category = $this->Application->GetVar('m_cat_id');
}
$items[$id] = Array (
'CreatedById' => $this->Application->RecallVar('use_id'),
'CategoryId' => $item_category,
);
}
return $items;
}
/**
* Add selected items to clipboard with mode = COPY (CLONE)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected 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
* @return void
* @access protected
*/
protected 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);
}
/**
* 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;
}
/**
* Performs category item paste
*
* @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;
}
if ( $clipboard_data['copy'] ) {
$temp =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp kTempTablesHandler */
$this->Application->SetVar('ResetCatBeforeClone', 1); // used in "kCatDBEventHandler::OnBeforeClone"
$temp->CloneItems($event->Prefix, $event->Special, $clipboard_data['copy']);
}
if ( $clipboard_data['cut'] ) {
$object =& $this->Application->recallObject($event->getPrefixSpecial() . '.item', $event->Prefix, Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
foreach ($clipboard_data['cut'] as $id) {
$object->Load($id);
$object->MoveToCat();
}
}
}
/**
* Deletes all selected items.
* Automatically recurse 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(&$event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$ids = $this->StoreSelectedIDs($event);
$to_delete = Array ();
$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);
$object =& $this->Application->recallObject($event->Prefix . '.recycleitem', null, Array ('skip_autoload' => true));
/* @var $object kCatDBItem */
foreach ($ids as $id) {
$object->Load($id);
if ( preg_match('/^' . preg_quote($rb->GetDBField('ParentPath'), '/') . '/', $object->GetDBField('ParentPath')) ) {
$to_delete[] = $id;
continue;
}
$object->MoveToCat($recycle_bin);
}
$ids = $to_delete;
}
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$event->setEventParam('ids', $ids);
$this->customProcessing($event, 'before');
$ids = $event->getEventParam('ids');
if ( $ids ) {
$temp_handler->DeleteItems($event->Prefix, $event->Special, $ids);
}
$this->clearSelectedIDs($event);
}
/**
* Return type clauses for list bulding on front
*
* @param kEvent $event
* @return Array
*/
function getTypeClauses(&$event)
{
$types = $event->getEventParam('types');
$types = $types ? explode(',', $types) : Array ();
$except_types = $event->getEventParam('except');
$except_types = $except_types ? explode(',', $except_types) : Array ();
$type_clauses = Array();
$user_id = $this->Application->RecallVar('user_id');
$owner_field = $this->getOwnerField($event->Prefix);
$type_clauses['my_items']['include'] = '%1$s.'.$owner_field.' = '.$user_id;
$type_clauses['my_items']['except'] = '%1$s.'.$owner_field.' <> '.$user_id;
$type_clauses['my_items']['having_filter'] = false;
$type_clauses['pick']['include'] = '%1$s.EditorsPick = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['pick']['except'] = '%1$s.EditorsPick! = 1 AND '.TABLE_PREFIX.'CategoryItems.PrimaryCat = 1';
$type_clauses['pick']['having_filter'] = false;
$type_clauses['hot']['include'] = '`IsHot` = 1 AND PrimaryCat = 1';
$type_clauses['hot']['except'] = '`IsHot`! = 1 AND PrimaryCat = 1';
$type_clauses['hot']['having_filter'] = true;
$type_clauses['pop']['include'] = '`IsPop` = 1 AND PrimaryCat = 1';
$type_clauses['pop']['except'] = '`IsPop`! = 1 AND PrimaryCat = 1';
$type_clauses['pop']['having_filter'] = true;
$type_clauses['new']['include'] = '`IsNew` = 1 AND PrimaryCat = 1';
$type_clauses['new']['except'] = '`IsNew`! = 1 AND PrimaryCat = 1';
$type_clauses['new']['having_filter'] = true;
$type_clauses['displayed']['include'] = '';
$displayed = $this->Application->GetVar($event->Prefix.'_displayed_ids');
if ($displayed) {
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$type_clauses['displayed']['except'] = '%1$s.'.$id_field.' NOT IN ('.$displayed.')';
}
else {
$type_clauses['displayed']['except'] = '';
}
$type_clauses['displayed']['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 LEFT 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');
$object->AddOrderField('search_result.Relevance', 'desc', true);
$type_clauses['search']['include'] = 'PrimaryCat = 1 AND ('.TABLE_PREFIX.'Category.Status = '.STATUS_ACTIVE.')';
$type_clauses['search']['except'] = 'PrimaryCat = 1 AND ('.TABLE_PREFIX.'Category.Status = '.STATUS_ACTIVE.')';
$type_clauses['search']['having_filter'] = false;
}
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 $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).') AND PrimaryCat = 1';
$type_clauses['related']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $related_ids).') AND PrimaryCat = 1';
}
else {
$type_clauses['related']['include'] = '0';
$type_clauses['related']['except'] = '1';
}
$type_clauses['related']['having_filter'] = false;
}
if (in_array('favorites', $types) || in_array('favorites', $except_types)) {
$sql = 'SELECT ResourceId
FROM '.$this->Application->getUnitOption('fav', 'TableName').'
WHERE PortalUserId = '.$this->Application->RecallVar('user_id');
$favorite_ids = $this->Conn->GetCol($sql);
if ($favorite_ids) {
$type_clauses['favorites']['include'] = '%1$s.ResourceId IN ('.implode(',', $favorite_ids).') AND PrimaryCat = 1';
$type_clauses['favorites']['except'] = '%1$s.ResourceId NOT IN ('.implode(',', $favorite_ids).') AND PrimaryCat = 1';
}
else {
$type_clauses['favorites']['include'] = 0;
$type_clauses['favorites']['except'] = 1;
}
$type_clauses['favorites']['having_filter'] = false;
}
return $type_clauses;
}
/**
* Returns SQL clause, that will help to select only data from specified category & it's children
*
* @param int $category_id
* @return string
*/
function getCategoryLimitClause($category_id)
{
if (!$category_id) {
return false;
}
$tree_indexes = $this->Application->getTreeIndex($category_id);
if (!$tree_indexes) {
// id of non-existing category was given
return 'FALSE';
}
return TABLE_PREFIX.'Category.TreeLeft BETWEEN '.$tree_indexes['TreeLeft'].' AND '.$tree_indexes['TreeRight'];
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(&$event)
{
parent::SetCustomQuery($event);
$object =& $event->getObject();
/* @var $object kDBList */
// add category filter if needed
if ($event->Special != 'showall' && $event->Special != 'user') {
if ($event->getEventParam('parent_cat_id') !== false) {
$parent_cat_id = $event->getEventParam('parent_cat_id');
}
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 ((string)$parent_cat_id != 'any') {
if ($event->getEventParam('recursive')) {
$filter_clause = $this->getCategoryLimitClause($parent_cat_id);
if ($filter_clause !== false) {
$object->addFilter('category_filter', $filter_clause);
}
$object->addFilter('primary_filter', 'PrimaryCat = 1');
}
else {
$object->addFilter('category_filter', TABLE_PREFIX.'CategoryItems.CategoryId = '.$parent_cat_id );
}
}
else {
$object->addFilter('primary_filter', 'PrimaryCat = 1');
}
}
else {
$object->addFilter('primary_filter', 'PrimaryCat = 1');
// if using recycle bin don't show items from there
$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
if ($recycle_bin) {
$object->addFilter('recyclebin_filter', TABLE_PREFIX.'CategoryItems.CategoryId <> '.$recycle_bin);
}
}
if ($event->Special == 'user') {
$editable_user = $this->Application->GetVar('u_id');
$object->addFilter('owner_filter', '%1$s.'.$this->getOwnerField($event->Prefix).' = '.$editable_user);
}
// add permission filter
if ($this->Application->RecallVar('user_id') == USER_ROOT) {
// for "root" CATEGORY.VIEW permission is checked for items lists too
$view_perm = 1;
}
else {
// for any real user itemlist view permission is checked instead of CATEGORY.VIEW
$count_helper =& $this->Application->recallObject('CountHelper');
/* @var $count_helper kCountHelper */
list ($view_perm, $view_filter) = $count_helper->GetPermissionClause($event->Prefix, 'perm');
$object->addFilter('perm_filter2', $view_filter);
}
$object->addFilter('perm_filter', 'perm.PermId = '.$view_perm);
$types = $event->getEventParam('types');
$this->applyItemStatusFilter($object, $types);
$except_types = $event->getEventParam('except');
$type_clauses = $this->getTypeClauses($event);
$search_helper =& $this->Application->recallObject('SearchHelper');
/* @var $search_helper kSearchHelper */
$search_helper->SetComplexFilter($event, $type_clauses, $types, $except_types);
}
/**
* Adds filter that filters out items with non-required statuses
*
* @param kDBList $object
* @param string $types
*/
function applyItemStatusFilter(&$object, $types)
{
// Link1 (before modifications) [Status = 1, OrgId = NULL], Link2 (after modifications) [Status = -2, OrgId = Link1_ID]
$pending_editing = $this->Application->getUnitOption($object->Prefix, 'UsePendingEditing');
if (!$this->Application->isAdminUser) {
$types = explode(',', $types);
if (in_array('my_items', $types)) {
$allow_statuses = Array (STATUS_ACTIVE, STATUS_PENDING, STATUS_PENDING_EDITING);
$object->addFilter('status_filter', '%1$s.Status IN ('.implode(',', $allow_statuses).')');
if ($pending_editing) {
$user_id = $this->Application->RecallVar('user_id');
$this->applyPendingEditingFilter($object, $user_id);
}
}
else {
$object->addFilter('status_filter', '(%1$s.Status = ' . STATUS_ACTIVE . ') AND (' . TABLE_PREFIX . 'Category.Status = ' . STATUS_ACTIVE . ')');
if ($pending_editing) {
// if category item uses pending editing abilities, then in no cases show pending copies on front
$object->addFilter('original_filter', '%1$s.OrgId = 0 OR %1$s.OrgId IS NULL');
}
}
}
else {
if ($pending_editing) {
$this->applyPendingEditingFilter($object);
}
}
}
/**
* Adds filter, that removes live items if they have pending editing copies
*
* @param kDBList $object
* @param int $user_id
*/
function applyPendingEditingFilter(&$object, $user_id = null)
{
$sql = 'SELECT OrgId
FROM '.$object->TableName.'
WHERE Status = '.STATUS_PENDING_EDITING.' AND OrgId IS NOT NULL';
if (isset($user_id)) {
$owner_field = $this->getOwnerField($object->Prefix);
$sql .= ' AND '.$owner_field.' = '.$user_id;
}
$pending_ids = $this->Conn->GetCol($sql);
if ($pending_ids) {
$object->addFilter('no_original_filter', '%1$s.'.$object->IDField.' NOT IN ('.implode(',', $pending_ids).')');
}
}
/**
* Adds calculates fields for item statuses
*
* @param kDBItem|kDBList $object
* @param kEvent $event
* @return void
* @access protected
*/
protected function prepareObject(&$object, &$event)
{
$this->prepareItemStatuses($event);
$object->addCalculatedField('CachedNavbar', 'l'.$this->Application->GetVar('m_lang').'_CachedNavbar');
if ($event->Special == 'export' || $event->Special == 'import') {
$export_helper =& $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$export_helper->prepareExportColumns($event);
}
}
/**
* Creates calculated fields for all item statuses based on config settings
*
* @param kEvent $event
*/
function prepareItemStatuses(&$event)
{
$object =& $event->getObject( Array('skip_autoload' => true) );
$property_map = $this->Application->getUnitOption($event->Prefix, 'ItemPropertyMappings');
if (!$property_map) {
return ;
}
// new items
$object->addCalculatedField('IsNew', ' IF(%1$s.NewItem = 2,
IF(%1$s.CreatedOn >= (UNIX_TIMESTAMP() - '.
$this->Application->ConfigValue($property_map['NewDays']).
'*3600*24), 1, 0),
%1$s.NewItem
)');
// hot items (cache updated every hour)
if ($this->Application->isCachingType(CACHING_TYPE_MEMORY)) {
$serial_name = $this->Application->incrementCacheSerial($event->Prefix, null, false);
$hot_limit = $this->Application->getCache($property_map['HotLimit'] . '[%' . $serial_name . '%]');
}
else {
$hot_limit = $this->Application->getDBCache($property_map['HotLimit']);
}
if ($hot_limit === false) {
$hot_limit = $this->CalculateHotLimit($event);
}
$object->addCalculatedField('IsHot', ' IF(%1$s.HotItem = 2,
IF(%1$s.'.$property_map['ClickField'].' >= '.$hot_limit.', 1, 0),
%1$s.HotItem
)');
// popular items
$object->addCalculatedField('IsPop', ' IF(%1$s.PopItem = 2,
IF(%1$s.CachedVotesQty >= '.
$this->Application->ConfigValue($property_map['MinPopVotes']).
' AND %1$s.CachedRating >= '.
$this->Application->ConfigValue($property_map['MinPopRating']).
', 1, 0),
%1$s.PopItem)');
}
/**
* Calculates hot limit for current item's table
*
* @param kEvent $event
* @return float
* @access protected
*/
protected function CalculateHotLimit(&$event)
{
$property_map = $this->Application->getUnitOption($event->Prefix, 'ItemPropertyMappings');
if ( !$property_map ) {
return 0.00;
}
$click_field = $property_map['ClickField'];
$last_hot = $this->Application->ConfigValue($property_map['MaxHotNumber']) - 1;
$sql = 'SELECT ' . $click_field . '
FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
ORDER BY ' . $click_field . ' DESC
LIMIT ' . $last_hot . ', 1';
$res = $this->Conn->GetCol($sql);
$hot_limit = (double)array_shift($res);
if ( $this->Application->isCachingType(CACHING_TYPE_MEMORY) ) {
$serial_name = $this->Application->incrementCacheSerial($event->Prefix, null, false);
$this->Application->setCache($property_map['HotLimit'] . '[%' . $serial_name . '%]', $hot_limit);
}
else {
$this->Application->setDBCache($property_map['HotLimit'], $hot_limit, 3600);
}
return $hot_limit;
}
/**
* Moves item to preferred category, updates item hits
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$object =& $event->getObject();
/* @var $object kCatDBItem */
// update hits field
$property_map = $this->Application->getUnitOption($event->Prefix, 'ItemPropertyMappings');
if ( $property_map ) {
$click_field = $property_map['ClickField'];
if ( $this->Application->isAdminUser && ($this->Application->GetVar($click_field . '_original') !== false) && floor($this->Application->GetVar($click_field . '_original')) != $object->GetDBField($click_field) ) {
$sql = 'SELECT MAX(' . $click_field . ')
FROM ' . $this->Application->getUnitOption($event->Prefix, 'TableName') . '
WHERE FLOOR(' . $click_field . ') = ' . $object->GetDBField($click_field);
$hits = ($res = $this->Conn->GetOne($sql)) ? $res + 0.000001 : $object->GetDBField($click_field);
$object->SetDBField($click_field, $hits);
}
}
// change category
$target_category = $object->GetDBField('CategoryId');
if ( $object->GetOriginalField('CategoryId') != $target_category ) {
$object->MoveToCat($target_category);
}
}
/**
* Occurs after loading item, 'id' parameter
* allows to get id of item that was loaded
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
$special = substr($event->Special, -6);
$object =& $event->getObject();
/* @var $object kCatDBItem */
if ( $special == 'import' || $special == 'export' ) {
$image_data = $object->getPrimaryImageData();
if ( $image_data ) {
$thumbnail_image = $image_data[$image_data['LocalThumb'] ? 'ThumbPath' : 'ThumbUrl'];
if ( $image_data['SameImages'] ) {
$full_image = '';
}
else {
$full_image = $image_data[$image_data['LocalImage'] ? 'LocalPath' : 'Url'];
}
$object->SetDBField('ThumbnailImage', $thumbnail_image);
$object->SetDBField('FullImage', $full_image);
$object->SetDBField('ImageAlt', $image_data['AltName']);
}
}
// substituting pending status value for pending editing
if ( $object->HasField('OrgId') && $object->GetDBField('OrgId') > 0 && $object->GetDBField('Status') == -2 ) {
$new_options = Array ();
$options = $object->GetFieldOption('Status', 'options', false, Array ());
foreach ($options as $key => $val) {
if ( $key == 2 ) {
$key = -2;
}
$new_options[$key] = $val;
}
$object->SetFieldOption('Status', 'options', $new_options);
}
if ( !$this->Application->isAdmin ) {
// linking existing images for item with virtual fields
$image_helper =& $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
$image_helper->LoadItemImages($object);
// linking existing files for item with virtual fields
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->LoadItemFiles($object);
}
if ( $object->isVirtualField('MoreCategories') ) {
// set item's additional categories to virtual field (used in editing)
$item_categories = $this->getItemCategories($object->GetDBField('ResourceId'));
$object->SetDBField('MoreCategories', $item_categories ? '|' . implode('|', $item_categories) . '|' : '');
}
}
/**
* Occurs after updating item
*
* @param kEvent $event
* @access public
*/
function OnAfterItemUpdate(&$event)
{
$this->CalculateHotLimit($event);
if ( substr($event->Special, -6) == 'import' ) {
$this->setCustomExportColumns($event);
}
$object =& $event->getObject();
/* @var $object kCatDBItem */
if ( !$this->Application->isAdmin ) {
$image_helper =& $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
// process image upload in virtual fields
$image_helper->SaveItemImages($object);
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
// process file upload in virtual fields
$file_helper->SaveItemFiles($object);
if ( $event->Special != '-item' ) {
// don't touch categories during cloning
$this->processAdditionalCategories($object, 'update');
}
}
$recycle_bin = $this->Application->ConfigValue('RecycleBinFolder');
if ( $this->Application->isAdminUser && $recycle_bin ) {
$sql = 'SELECT CategoryId
FROM ' . $this->Application->getUnitOption('ci', 'TableName') . '
WHERE ItemResourceId = ' . $object->GetDBField('ResourceId') . ' AND PrimaryCat = 1';
$primary_category = $this->Conn->GetOne($sql);
if ( $primary_category == $recycle_bin ) {
$event->CallSubEvent('OnAfterItemDelete');
}
}
if ( $object->GetChangedFields() ) {
$now = adodb_mktime();
$object->SetDBField('Modified_date', $now);
$object->SetDBField('Modified_time', $now);
$object->SetDBField('ModifiedById', $this->Application->RecallVar('user_id'));
}
}
/**
* Sets values for import process
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
$object =& $event->getObject();
/* @var $object kCatDBItem */
if ( substr($event->Special, -6) == 'import' ) {
$this->setCustomExportColumns($event);
}
$object->assignPrimaryCategory();
if ( !$this->Application->isAdmin ) {
$image_helper =& $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
// process image upload in virtual fields
$image_helper->SaveItemImages($object);
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
// process file upload in virtual fields
$file_helper->SaveItemFiles($object);
if ( $event->Special != '-item' ) {
// don't touch categories during cloning
$this->processAdditionalCategories($object, 'create');
}
}
}
/**
* 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.'SearchLog
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.'SearchLog');
}
$this->Application->SetVar('search_logged', 1);
}
}
/**
* Makes simple search for category items
* 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 = kUtil::unhtmlentities( 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))
{
return; // used when navigating by pages or changing sorting in search results
}
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
$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 = $this->Application->findModule('Var', $event->Prefix, 'Name');
$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!
$search_scope = $this->Application->GetVar('search_scope');
if ($search_scope == 'category') {
$category_id = $this->Application->GetVar('m_cat_id');
$category_filter = $this->getCategoryLimitClause($category_id);
if ($category_filter !== false) {
$join_clauses[] = ' LEFT JOIN '.TABLE_PREFIX.'CategoryItems ON '.TABLE_PREFIX.'CategoryItems.ItemResourceId = '.$items_table.'.ResourceId';
$join_clauses[] = ' LEFT JOIN '.TABLE_PREFIX.'Category ON '.TABLE_PREFIX.'Category.CategoryId = '.TABLE_PREFIX.'CategoryItems.CategoryId';
$where_clause = '('.$this->getCategoryLimitClause($category_id).') AND '.$where_clause;
}
}
$where_clause = $where_clause . ' AND (' . $items_table . '.Status = ' . STATUS_ACTIVE . ')';
if ($event->MasterEvent && $event->MasterEvent->Name == 'OnListBuild') {
if ($event->MasterEvent->getEventParam('ResultIds')) {
$where_clause .= ' AND '.$items_table.'.ResourceId IN ('.implode(',', $event->MasterEvent->getEventParam('ResultIds')).')';
}
}
// 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)
{
$ids = Array ();
$search_table = TABLE_PREFIX . 'ses_' . $this->Application->GetSID() . '_' . TABLE_PREFIX . 'Search';
$sql = 'SHOW TABLES LIKE "' . $search_table . '"';
if ( $this->Conn->Query($sql) ) {
$sql = 'SELECT DISTINCT ResourceId
FROM ' . $search_table;
$ids = $this->Conn->GetCol($sql);
}
$event->setEventParam('ResultIds', $ids);
$event->CallSubEvent('OnSimpleSearch');
}
/**
* Enter description here...
*
* @param kEvent $event
* @todo Change all hardcoded Products table & In-Commerce module usage to dynamic usage from item config !!!
*/
function OnAdvancedSearch(&$event)
{
$query_object =& $this->Application->recallObject('HTTPQuery');
/* @var $query_object kHTTPQuery */
if ( !isset($query_object->Post['andor']) ) {
// used when navigating by pages or changing sorting in search results
return;
}
$this->Application->RemoveVar('keywords');
$this->Application->RemoveVar('Search_Keywords');
$module_name = $this->Application->findModule('Var', $event->Prefix, 'Name');
$sql = 'SELECT *
FROM '.$this->Application->getUnitOption('confs', 'TableName').'
WHERE (ModuleName = '.$this->Conn->qstr($module_name).') AND (AdvancedSearch = 1)';
$search_config = $this->Conn->Query($sql);
$lang = $this->Application->GetVar('m_lang');
$object =& $event->getObject();
/* @var $object kDBList */
$object->SetPage(1);
$items_table = $this->Application->getUnitOption($event->Prefix, 'TableName');
$search_keywords = $this->Application->GetVar('value'); // will not be changed
$keywords = $this->Application->GetVar('value'); // will be changed down there
$verbs = $this->Application->GetVar('verb');
$glues = $this->Application->GetVar('andor');
$and_conditions = Array();
$or_conditions = Array();
$and_having_conditions = Array();
$or_having_conditions = Array();
$join_clauses = Array();
$highlight_keywords = Array();
$relevance_parts = Array();
$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';
}
$search_log = '';
$weight_sum = 0;
// processing fields and preparing conditions
foreach ($search_config as $record) {
$field = $record['FieldName'];
$join_clause = '';
$condition_mode = 'WHERE';
// field processing
$local_table = TABLE_PREFIX.$record['TableName'];
$weight_sum += $record['Priority']; // counting weight sum; used when making relevance clause
// processing multilingual fields
if ( $object->GetFieldOption($field, 'formatter') == 'kMultiLanguage' ) {
$field_name = 'l'.$lang.'_'.$field;
}
else {
$field_name = $field;
}
// processing fields from other tables
$foreign_field = $record['ForeignField'];
if ( $foreign_field ) {
$exploded = explode(':', $foreign_field, 2);
if($exploded[0] == 'CALC')
{
$user_groups = $this->Application->RecallVar('UserGroups');
$field_name = str_replace('{PREFIX}', TABLE_PREFIX, $exploded[1]);
$join_clause = str_replace('{PREFIX}', TABLE_PREFIX, $record['JoinClause']);
$join_clause = str_replace('{USER_GROUPS}', $user_groups, $join_clause);
$join_clause = ' LEFT JOIN '.$join_clause;
$condition_mode = 'HAVING';
}
else {
$exploded = explode('.', $foreign_field);
$foreign_table = TABLE_PREFIX.$exploded[0];
if($record['CustomFieldId']) {
$exploded[1] = 'l'.$lang.'_'.$exploded[1];
}
$alias_counter++;
$alias = 't'.$alias_counter;
$field_name = $alias.'.'.$exploded[1];
$join_clause = str_replace('{ForeignTable}', $alias, $record['JoinClause']);
$join_clause = str_replace('{LocalTable}', $items_table, $join_clause);
if($record['CustomFieldId'])
{
$join_clause .= ' AND '.$alias.'.CustomFieldId='.$record['CustomFieldId'];
}
$join_clause = ' LEFT JOIN '.$foreign_table.' '.$alias.'
ON '.$join_clause;
}
}
else
{
// processing fields from local table
if ($record['CustomFieldId']) {
$local_table = 'custom_data';
$field_name = 'l'.$lang.'_cust_'.array_search($field_name, $custom_fields);
}
$field_name = $local_table.'.'.$field_name;
}
$condition = $this->getAdvancedSearchCondition($field_name, $record, $keywords, $verbs, $highlight_keywords);
if ($record['CustomFieldId'] && strlen($condition)) {
// search in primary value of custom field + value in current language
$field_name = $local_table.'.'.'l'.$this->Application->GetDefaultLanguageId().'_cust_'.array_search($field, $custom_fields);
$primary_condition = $this->getAdvancedSearchCondition($field_name, $record, $keywords, $verbs, $highlight_keywords);
$condition = '('.$condition.' OR '.$primary_condition.')';
}
if ($condition) {
if ($join_clause) {
$join_clauses[] = $join_clause;
}
$relevance_parts[] = 'IF('.$condition.', '.$record['Priority'].', 0)';
if ($glues[$field] == 1) { // and
if ($condition_mode == 'WHERE') {
$and_conditions[] = $condition;
}
else {
$and_having_conditions[] = $condition;
}
}
else { // or
if ($condition_mode == 'WHERE') {
$or_conditions[] = $condition;
}
else {
$or_having_conditions[] = $condition;
}
}
// create search log record
$search_log_data = Array('search_config' => $record, 'verb' => getArrayValue($verbs, $field), 'value' => ($record['FieldType'] == 'range') ? $search_keywords[$field.'_from'].'|'.$search_keywords[$field.'_to'] : $search_keywords[$field]);
$search_log[] = $this->Application->Phrase('la_Field').' "'.$this->getHuman('Field', $search_log_data).'" '.$this->getHuman('Verb', $search_log_data).' '.$this->Application->Phrase('la_Value').' '.$this->getHuman('Value', $search_log_data).' '.$this->Application->Phrase($glues[$field] == 1 ? 'lu_And' : 'lu_Or');
}
}
if ($search_log) {
$search_log = implode('<br />', $search_log);
$search_log = preg_replace('/(.*) '.preg_quote($this->Application->Phrase('lu_and'), '/').'|'.preg_quote($this->Application->Phrase('lu_or'), '/').'$/is', '\\1', $search_log);
$this->saveToSearchLog($search_log, 1); // advanced search
}
$this->Application->StoreVar('highlight_keywords', serialize($highlight_keywords));
// making relevance clause
if($relevance_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(' + ', $relevance_parts).') / '.$weight_sum.' * '.$rel_keywords;
$relevance_clause .= ' + (Hits + 1) / (MAX(Hits) + 1) * '.$rel_pop;
$relevance_clause .= ' + (CachedRating + 1) / (MAX(CachedRating) + 1) * '.$rel_rating;
}
else
{
$relevance_clause = '0';
}
// building having clause
if($or_having_conditions)
{
$and_having_conditions[] = '('.implode(' OR ', $or_having_conditions).')';
}
$having_clause = implode(' AND ', $and_having_conditions);
$having_clause = $having_clause ? ' HAVING '.$having_clause : '';
// building where clause
if($or_conditions)
{
$and_conditions[] = '('.implode(' OR ', $or_conditions).')';
}
// $and_conditions[] = $items_table.'.Status = 1';
$where_clause = implode(' AND ', $and_conditions);
if(!$where_clause)
{
if($having_clause)
{
$where_clause = '1';
}
else
{
$where_clause = '0';
$this->Application->SetVar('adv_search_error', 1);
}
}
$where_clause .= ' AND '.$items_table.'.Status = 1';
// building final search query
$search_table = TABLE_PREFIX.'ses_'.$this->Application->GetSID().'_'.TABLE_PREFIX.'Search';
$this->Conn->Query('DROP TABLE IF EXISTS '.$search_table);
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
$pick_field = isset($fields['EditorsPick']) ? $items_table.'.EditorsPick' : '0';
$sql = ' CREATE TABLE '.$search_table.'
SELECT '.$relevance_clause.' AS Relevance,
'.$items_table.'.'.$id_field.' AS ItemId,
'.$items_table.'.ResourceId AS ResourceId,
11 AS ItemType,
'.$pick_field.' AS EdPick
FROM '.$items_table.'
'.implode(' ', $join_clauses).'
WHERE '.$where_clause.'
GROUP BY '.$items_table.'.'.$id_field.
$having_clause;
$res = $this->Conn->Query($sql);
}
function getAdvancedSearchCondition($field_name, $record, $keywords, $verbs, &$highlight_keywords)
{
$field = $record['FieldName'];
$condition_patterns = Array (
'any' => '%s LIKE %s',
'contains' => '%s LIKE %s',
'notcontains' => '(NOT (%1$s LIKE %2$s) OR %1$s IS NULL)',
'is' => '%s = %s',
'isnot' => '(%1$s != %2$s OR %1$s IS NULL)'
);
$condition = '';
switch ($record['FieldType']) {
case 'select':
$keywords[$field] = kUtil::unhtmlentities( $keywords[$field] );
if ($keywords[$field]) {
$condition = sprintf($condition_patterns['is'], $field_name, $this->Conn->qstr( $keywords[$field] ));
}
break;
case 'multiselect':
$keywords[$field] = kUtil::unhtmlentities( $keywords[$field] );
if ($keywords[$field]) {
$condition = Array ();
$values = explode('|', substr($keywords[$field], 1, -1));
foreach ($values as $selected_value) {
$condition[] = sprintf($condition_patterns['contains'], $field_name, $this->Conn->qstr('%|'.$selected_value.'|%'));
}
$condition = '('.implode(' OR ', $condition).')';
}
break;
case 'text':
$keywords[$field] = kUtil::unhtmlentities( $keywords[$field] );
if (mb_strlen($keywords[$field]) >= $this->Application->ConfigValue('Search_MinKeyword_Length')) {
$highlight_keywords[] = $keywords[$field];
if (in_array($verbs[$field], Array('any', 'contains', 'notcontains'))) {
$keywords[$field] = '%'.strtr($keywords[$field], Array('%' => '\\%', '_' => '\\_')).'%';
}
$condition = sprintf($condition_patterns[$verbs[$field]], $field_name, $this->Conn->qstr( $keywords[$field] ));
}
break;
case 'boolean':
if ($keywords[$field] != -1) {
$property_mappings = $this->Application->getUnitOption($this->Prefix, 'ItemPropertyMappings');
$items_table = $this->Application->getUnitOption($this->Prefix, 'TableName');
switch ($field) {
case 'HotItem':
$hot_limit_var = getArrayValue($property_mappings, 'HotLimit');
if ($hot_limit_var) {
$hot_limit = (int)$this->Application->getDBCache($hot_limit_var);
$condition = 'IF('.$items_table.'.HotItem = 2,
IF('.$items_table.'.Hits >= '.
$hot_limit.
', 1, 0), '.$items_table.'.HotItem) = '.$keywords[$field];
}
break;
case 'PopItem':
$votes2pop_var = getArrayValue($property_mappings, 'VotesToPop');
$rating2pop_var = getArrayValue($property_mappings, 'RatingToPop');
if ($votes2pop_var && $rating2pop_var) {
$condition = 'IF('.$items_table.'.PopItem = 2, IF('.$items_table.'.CachedVotesQty >= '.
$this->Application->ConfigValue($votes2pop_var).
' AND '.$items_table.'.CachedRating >= '.
$this->Application->ConfigValue($rating2pop_var).
', 1, 0), '.$items_table.'.PopItem) = '.$keywords[$field];
}
break;
case 'NewItem':
$new_days_var = getArrayValue($property_mappings, 'NewDays');
if ($new_days_var) {
$condition = 'IF('.$items_table.'.NewItem = 2,
IF('.$items_table.'.CreatedOn >= (UNIX_TIMESTAMP() - '.
$this->Application->ConfigValue($new_days_var).
'*3600*24), 1, 0), '.$items_table.'.NewItem) = '.$keywords[$field];
}
break;
case 'EditorsPick':
$condition = $items_table.'.EditorsPick = '.$keywords[$field];
break;
}
}
break;
case 'range':
$range_conditions = Array();
if ($keywords[$field.'_from'] && !preg_match("/[^0-9]/i", $keywords[$field.'_from'])) {
$range_conditions[] = $field_name.' >= '.$keywords[$field.'_from'];
}
if ($keywords[$field.'_to'] && !preg_match("/[^0-9]/i", $keywords[$field.'_to'])) {
$range_conditions[] = $field_name.' <= '.$keywords[$field.'_to'];
}
if ($range_conditions) {
$condition = implode(' AND ', $range_conditions);
}
break;
case 'date':
if ($keywords[$field]) {
if (in_array($keywords[$field], Array('today', 'yesterday'))) {
$current_time = getdate();
$day_begin = adodb_mktime(0, 0, 0, $current_time['mon'], $current_time['mday'], $current_time['year']);
$time_mapping = Array('today' => $day_begin, 'yesterday' => ($day_begin - 86400));
$min_time = $time_mapping[$keywords[$field]];
}
else {
$time_mapping = Array (
'last_week' => 604800, 'last_month' => 2628000, 'last_3_months' => 7884000,
'last_6_months' => 15768000, 'last_year' => 31536000,
);
$min_time = adodb_mktime() - $time_mapping[$keywords[$field]];
}
$condition = $field_name.' > '.$min_time;
}
break;
}
return $condition;
}
/**
* Returns human readable representation of searched data to be placed in search log
* @param string $type
* @param Array $search_data
* @return string
* @access protected
*/
protected function getHuman($type, $search_data)
{
// all 3 variables are retrieved from $search_data array
/* @var $search_config Array */
/* @var $verb string */
/* @var $value string */
$type = ucfirst(strtolower($type));
extract($search_data);
switch ($type) {
case 'Field':
return $this->Application->Phrase($search_config['DisplayName']);
break;
case 'Verb':
return $verb ? $this->Application->Phrase('lu_advsearch_'.$verb) : '';
break;
case 'Value':
switch ($search_config['FieldType']) {
case 'date':
$values = Array(0 => 'lu_comm_Any', 'today' => 'lu_comm_Today',
'yesterday' => 'lu_comm_Yesterday', 'last_week' => 'lu_comm_LastWeek',
'last_month' => 'lu_comm_LastMonth', 'last_3_months' => 'lu_comm_Last3Months',
'last_6_months' => 'lu_comm_Last6Months', 'last_year' => 'lu_comm_LastYear');
$ret = $this->Application->Phrase($values[$value]);
break;
case 'range':
$value = explode('|', $value);
return $this->Application->Phrase('lu_comm_From').' "'.$value[0].'" '.$this->Application->Phrase('lu_comm_To').' "'.$value[1].'"';
break;
case 'boolean':
$values = Array(1 => 'lu_comm_Yes', 0 => 'lu_comm_No', -1 => 'lu_comm_Both');
$ret = $this->Application->Phrase($values[$value]);
break;
default:
$ret = $value;
break;
}
return '"'.$ret.'"';
break;
}
return '';
}
/**
* Set's correct page for list
* based on data provided with event
*
* @param kEvent $event
* @access private
* @see OnListBuild
*/
function SetPagination(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
// get PerPage (forced -> session -> config -> 10)
$object->SetPerPage( $this->getPerPage($event) );
// main lists on Front-End have special get parameter for page
$page = $object->isMainList() ? $this->Application->GetVar('page') : false;
if (!$page) {
// page is given in "env" variable for given prefix
$page = $this->Application->GetVar($event->getPrefixSpecial() . '_Page');
}
if (!$page && $event->Special) {
// when not part of env, then variables like "prefix.special_Page" are
// replaced (by PHP) with "prefix_special_Page", so check for that too
$page = $this->Application->GetVar($event->getPrefixSpecial(true) . '_Page');
}
if (!$object->isMainList()) {
// main lists doesn't use session for page storing
$this->Application->StoreVarDefault($event->getPrefixSpecial() . '_Page', 1, true); // true for optional
if (!$page) {
if ($this->Application->RewriteURLs()) {
// when page not found by prefix+special, then try to search it without special at all
$page = $this->Application->GetVar($event->Prefix . '_Page');
if (!$page) {
// page not found in request -> get from session
$page = $this->Application->RecallVar($event->Prefix . '_Page');
}
if ($page) {
// page found in request -> store in session
$this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
}
}
else {
// page not found in request -> get from session
$page = $this->Application->RecallVar($event->getPrefixSpecial() . '_Page');
}
}
else {
// page found in request -> store in session
$this->Application->StoreVar($event->getPrefixSpecial() . '_Page', $page, true); //true for optional
}
if ( !$event->getEventParam('skip_counting') ) {
// when stored page is larger, then maximal list page number
// (such case is also processed in kDBList::Query method)
$pages = $object->GetTotalPages();
if ($page > $pages) {
$page = 1;
$this->Application->StoreVar($event->getPrefixSpecial().'_Page', 1, true);
}
}
}
$object->SetPage($page);
}
/* === RELATED TO IMPORT/EXPORT: BEGIN === */
/**
* Shows export dialog
*
* @param kEvent $event
*/
function OnExport(&$event)
{
$selected_ids = $this->StoreSelectedIDs($event);
if (implode(',', $selected_ids) == '') {
// K4 fix when no ids found bad selected ids array is formed
$selected_ids = false;
}
$selected_cats_ids = $this->Application->GetVar('export_categories');
$this->Application->StoreVar($event->Prefix.'_export_ids', $selected_ids ? implode(',', $selected_ids) : '' );
$this->Application->StoreVar($event->Prefix.'_export_cats_ids', $selected_cats_ids);
$export_helper =& $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$redirect_params = Array (
$this->Prefix.'.export_event' => 'OnNew',
'pass' => 'all,'.$this->Prefix.'.export'
);
$event->setRedirectParams($redirect_params);
}
/**
* Performs each export step & displays progress percent
*
* @param kEvent $event
*/
function OnExportProgress(&$event)
{
$export_object =& $this->Application->recallObject('CatItemExportHelper');
/* @var $export_object kCatDBItemExportHelper */
$event = new kEvent($event->getPrefixSpecial().':OnDummy');
$action_method = 'perform'.ucfirst($event->Special);
$field_values = $export_object->$action_method($event);
// finish code is done from JS now
if ($field_values['start_from'] == $field_values['total_records']) {
if ($event->Special == 'import') {
$this->Application->StoreVar('PermCache_UpdateRequired', 1);
$event->SetRedirectParam('m_cat_id', $this->Application->RecallVar('ImportCategory'));
$event->SetRedirectParam('anchor', 'tab-' . $event->Prefix);
$event->redirect = 'catalog/catalog';
}
elseif ($event->Special == 'export') {
$event->redirect = $export_object->getModuleName($event) . '/' . $event->Special . '_finish';
$event->SetRedirectParam('pass', 'all');
}
return ;
}
$export_options = $export_object->loadOptions($event);
echo $export_options['start_from'] * 100 / $export_options['total_records'];
$event->status = kEvent::erSTOP;
}
/**
* Returns specific to each item type columns only
*
* @param kEvent $event
* @return Array
*/
function getCustomExportColumns(&$event)
{
return Array( '__VIRTUAL__ThumbnailImage' => 'ThumbnailImage',
'__VIRTUAL__FullImage' => 'FullImage',
'__VIRTUAL__ImageAlt' => 'ImageAlt');
}
/**
* Sets non standart virtual fields (e.g. to other tables)
*
* @param kEvent $event
*/
function setCustomExportColumns(&$event)
{
$this->restorePrimaryImage($event);
}
/**
* Create/Update primary image record in info found in imported data
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function restorePrimaryImage(&$event)
{
$object =& $event->getObject();
/* @var $object kCatDBItem */
$has_image_info = $object->GetDBField('ImageAlt') && ($object->GetDBField('ThumbnailImage') || $object->GetDBField('FullImage'));
if ( !$has_image_info ) {
return ;
}
$image_data = $object->getPrimaryImageData();
$image =& $this->Application->recallObject('img', null, Array ('skip_autoload' => true));
/* @var $image kDBItem */
if ( $image_data ) {
$image->Load($image_data['ImageId']);
}
else {
$image->Clear();
$image->SetDBField('Name', 'main');
$image->SetDBField('DefaultImg', 1);
$image->SetDBField('ResourceId', $object->GetDBField('ResourceId'));
}
$image->SetDBField('AltName', $object->GetDBField('ImageAlt'));
if ( $object->GetDBField('ThumbnailImage') ) {
$thumbnail_field = $this->isURL($object->GetDBField('ThumbnailImage')) ? 'ThumbUrl' : 'ThumbPath';
$image->SetDBField($thumbnail_field, $object->GetDBField('ThumbnailImage'));
$image->SetDBField('LocalThumb', $thumbnail_field == 'ThumbPath' ? 1 : 0);
}
if ( !$object->GetDBField('FullImage') ) {
$image->SetDBField('SameImages', 1);
}
else {
$image->SetDBField('SameImages', 0);
$full_field = $this->isURL($object->GetDBField('FullImage')) ? 'Url' : 'LocalPath';
$image->SetDBField($full_field, $object->GetDBField('FullImage'));
$image->SetDBField('LocalImage', $full_field == 'LocalPath' ? 1 : 0);
}
if ( $image->isLoaded() ) {
$image->Update();
}
else {
$image->Create();
}
}
/**
* Detects if image url is specified in a given path (instead of path on disk)
*
* @param string $path
* @return bool
* @access protected
*/
protected function isURL($path)
{
return preg_match('#(http|https)://(.*)#', $path);
}
/**
* Prepares item for import/export operations
*
* @param kEvent $event
*/
function OnNew(&$event)
{
parent::OnNew($event);
if ( $event->Special == 'import' || $event->Special == 'export' ) {
$export_helper =& $this->Application->recallObject('CatItemExportHelper');
/* @var $export_helper kCatDBItemExportHelper */
$export_helper->setRequiredFields($event);
}
}
/**
* Process items selected in item_selector
*
* @param kEvent $event
*/
function OnProcessSelected(&$event)
{
$dst_field = $this->Application->RecallVar('dst_field');
$selected_ids = $this->Application->GetVar('selected_ids');
if ( $dst_field == 'ItemCategory' ) {
// Item Edit -> Categories Tab -> New Categories
$object =& $event->getObject();
/* @var $object kCatDBItem */
$category_ids = explode(',', $selected_ids['c']);
foreach ($category_ids as $category_id) {
$object->assignToCategory($category_id);
}
}
if ($dst_field == 'ImportCategory') {
// Tools -> Import -> Item Import -> Select Import Category
$this->Application->StoreVar('ImportCategory', $selected_ids['c']);
$event->SetRedirectParam($event->getPrefixSpecial() . '_id', 0);
$event->SetRedirectParam($event->getPrefixSpecial() . '_event', 'OnExportBegin');
}
$event->SetRedirectParam('opener', 'u');
}
/**
* Saves Import/Export settings to session
*
* @param kEvent $event
*/
function OnSaveSettings(&$event)
{
$event->redirect = false;
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( $items_info ) {
list($id, $field_values) = each($items_info);
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$object->SetFieldsFromHash($field_values);
$field_values['ImportFilename'] = $object->GetDBField('ImportFilename'); //if upload formatter has renamed the file during moving !!!
$field_values['ImportSource'] = 2;
$field_values['ImportLocalFilename'] = $object->GetDBField('ImportFilename');
$items_info[$id] = $field_values;
$this->Application->StoreVar($event->getPrefixSpecial() . '_ItemsInfo', serialize($items_info));
}
}
/**
* Saves Import/Export settings to session
*
* @param kEvent $event
*/
function OnResetSettings(&$event)
{
$this->Application->StoreVar('ImportCategory', $this->Application->getBaseCategory());
}
/**
* Cancels item editing
* @param kEvent $event
* @return void
* @todo Used?
*/
function OnCancelAction(&$event)
{
$event->setRedirectParams(Array ('pass' => 'all,' . $event->getPrefixSpecial()), true);
$event->redirect = $this->Application->GetVar('cancel_template');
}
/* === RELATED TO IMPORT/EXPORT: END === */
/**
* Stores item's owner login into separate field together with id
*
* @param kEvent $event
* @param string $id_field
* @param string $cached_field
*/
function cacheItemOwner(&$event, $id_field, $cached_field)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$user_id = $object->GetDBField($id_field);
$options = $object->GetFieldOptions($id_field);
if ( isset($options['options'][$user_id]) ) {
$object->SetDBField($cached_field, $options['options'][$user_id]);
}
else {
$id_field = $this->Application->getUnitOption('u', 'IDField');
$table_name = $this->Application->getUnitOption('u', 'TableName');
- $sql = 'SELECT Login
+ $sql = 'SELECT Username
FROM ' . $table_name . '
WHERE ' . $id_field . ' = ' . $user_id;
$object->SetDBField($cached_field, $this->Conn->GetOne($sql));
}
}
/**
* 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(&$event)
{
parent::OnPreSave($event);
$use_pending_editing = $this->Application->getUnitOption($event->Prefix, 'UsePendingEditing');
if ( $event->status == kEvent::erSUCCESS && $use_pending_editing ) {
// decision: clone or not clone
$object =& $event->getObject();
/* @var $object kCatDBItem */
if ( $object->GetID() == 0 || $object->GetDBField('OrgId') > 0 ) {
// new items or cloned items shouldn't be cloned again
return ;
}
$perm_helper =& $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$owner_field = $this->getOwnerField($event->Prefix);
if ( $perm_helper->ModifyCheckPermission($object->GetDBField($owner_field), $object->GetDBField('CategoryId'), $event->Prefix) == 2 ) {
// 1. clone original item
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial() . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$cloned_ids = $temp_handler->CloneItems($event->Prefix, $event->Special, Array ($object->GetID()), null, null, null, true);
$ci_table = $this->Application->GetTempName(TABLE_PREFIX . 'CategoryItems');
// 2. delete record from CategoryItems (about cloned item) that was automatically created during call of Create method of kCatDBItem
$sql = 'SELECT ResourceId
FROM ' . $object->TableName . '
WHERE ' . $object->IDField . ' = ' . $cloned_ids[0];
$clone_resource_id = $this->Conn->GetOne($sql);
$sql = 'DELETE FROM ' . $ci_table . '
WHERE ItemResourceId = ' . $clone_resource_id . ' AND PrimaryCat = 1';
$this->Conn->Query($sql);
// 3. copy main item categoryitems to cloned item
$sql = ' INSERT INTO ' . $ci_table . ' (CategoryId, ItemResourceId, PrimaryCat, ItemPrefix, Filename)
SELECT CategoryId, ' . $clone_resource_id . ' AS ItemResourceId, PrimaryCat, ItemPrefix, Filename
FROM ' . $ci_table . '
WHERE ItemResourceId = ' . $object->GetDBField('ResourceId');
$this->Conn->Query($sql);
// 4. put cloned id to OrgId field of item being cloned
$sql = 'UPDATE ' . $object->TableName . '
SET OrgId = ' . $object->GetID() . '
WHERE ' . $object->IDField . ' = ' . $cloned_ids[0];
$this->Conn->Query($sql);
// 5. substitute id of item being cloned with clone id
$this->Application->SetVar($event->getPrefixSpecial() . '_id', $cloned_ids[0]);
$selected_ids = $this->getSelectedIDs($event, true);
$selected_ids[ array_search($object->GetID(), $selected_ids) ] = $cloned_ids[0];
$this->StoreSelectedIDs($event, $selected_ids);
// 6. delete original item from temp table
$temp_handler->DeleteItems($event->Prefix, $event->Special, Array ($object->GetID()));
}
}
}
/**
* Sets item's owner field
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
if ( $event->status != kEvent::erSUCCESS ) {
return ;
}
$object =& $event->getObject();
/* @var $object kDBItem */
$owner_field = $this->getOwnerField($event->Prefix);
$object->SetDBField($owner_field, $this->Application->RecallVar('user_id'));
}
/**
* Occures before original item of item in pending editing got deleted (for hooking only)
*
* @param kEvent $event
*/
function OnBeforeDeleteOriginal(&$event)
{
}
/**
* 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(&$event)
{
parent::OnBeforeClone($event);
if ( $this->Application->GetVar('ResetCatBeforeClone') ) {
$object =& $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('CategoryId', null);
}
}
/**
* Set status for new category item based on user permission in category
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
$object =& $event->getObject();
/* @var $object kCatDBItem */
$is_admin = $this->Application->isAdminUser;
$owner_field = $this->getOwnerField($event->Prefix);
if ( (!$object->IsTempTable() && !$is_admin) || ($is_admin && !$object->GetDBField($owner_field)) ) {
// Front-end OR owner not specified -> set to currently logged-in user
$object->SetDBField($owner_field, $this->Application->RecallVar('user_id'));
}
if ( !$this->Application->isAdmin ) {
$this->setItemStatusByPermission($event);
}
}
/**
* Sets category item status based on user permissions (only on Front-end)
*
* @param kEvent $event
*/
function setItemStatusByPermission(&$event)
{
$use_pending_editing = $this->Application->getUnitOption($event->Prefix, 'UsePendingEditing');
if (!$use_pending_editing) {
return ;
}
$object =& $event->getObject();
/* @var $object kCatDBItem */
$perm_helper =& $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$primary_category = $object->GetDBField('CategoryId') > 0 ? $object->GetDBField('CategoryId') : $this->Application->GetVar('m_cat_id');
$item_status = $perm_helper->AddCheckPermission($primary_category, $event->Prefix);
if ($item_status == STATUS_DISABLED) {
$event->status = kEvent::erFAIL;
}
else {
$object->SetDBField('Status', $item_status);
}
}
/**
* Creates category item & redirects to confirmation template (front-end only)
*
* @param kEvent $event
*/
function OnCreate(&$event)
{
parent::OnCreate($event);
$this->SetFrontRedirectTemplate($event, 'suggest');
}
/**
* Returns item's categories (allows to exclude primary category)
*
* @param int $resource_id
* @param bool $with_primary
* @return Array
*/
function getItemCategories($resource_id, $with_primary = false)
{
$sql = 'SELECT CategoryId
FROM '.TABLE_PREFIX.'CategoryItems
WHERE (ItemResourceId = '.$resource_id.')';
if (!$with_primary) {
$sql .= ' AND (PrimaryCat = 0)';
}
return $this->Conn->GetCol($sql);
}
/**
* Adds new and removes old additional categories from category item
*
* @param kCatDBItem $object
* @param int $mode
*/
function processAdditionalCategories(&$object, $mode)
{
if ( !$object->isVirtualField('MoreCategories') ) {
// given category item doesn't require such type of processing
return ;
}
$process_categories = $object->GetDBField('MoreCategories');
if ($process_categories === '') {
// field was not in submit & have default value (when no categories submitted, then value is null)
return ;
}
if ($mode == 'create') {
// prevents first additional category to become primary
$object->assignPrimaryCategory();
}
$process_categories = $process_categories ? explode('|', substr($process_categories, 1, -1)) : Array ();
$existing_categories = $this->getItemCategories($object->GetDBField('ResourceId'));
$add_categories = array_diff($process_categories, $existing_categories);
foreach ($add_categories as $category_id) {
$object->assignToCategory($category_id);
}
$remove_categories = array_diff($existing_categories, $process_categories);
foreach ($remove_categories as $category_id) {
$object->removeFromCategory($category_id);
}
}
/**
* Creates category item & redirects to confirmation template (front-end only)
*
* @param kEvent $event
*/
function OnUpdate(&$event)
{
$use_pending = $this->Application->getUnitOption($event->Prefix, 'UsePendingEditing');
if ($this->Application->isAdminUser || !$use_pending) {
parent::OnUpdate($event);
$this->SetFrontRedirectTemplate($event, 'modify');
return ;
}
$object =& $event->getObject(Array('skip_autoload' => true));
/* @var $object kCatDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ($items_info) {
$perm_helper =& $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$temp_handler =& $this->Application->recallObject($event->getPrefixSpecial().'_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$owner_field = $this->getOwnerField($event->Prefix);
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
foreach ($items_info as $id => $field_values) {
$object->Load($id);
$edit_perm = $perm_helper->ModifyCheckPermission($object->GetDBField($owner_field), $object->GetDBField('CategoryId'), $event->Prefix);
if ($use_pending && !$object->GetDBField('OrgId') && ($edit_perm == STATUS_PENDING)) {
// pending editing enabled + not pending copy -> get/create pending copy & save changes to it
$original_id = $object->GetID();
$original_resource_id = $object->GetDBField('ResourceId');
$file_helper->PreserveItemFiles($field_values);
$object->Load($original_id, 'OrgId');
if (!$object->isLoaded()) {
// 1. user has no pending copy of live item -> clone live item
$cloned_ids = $temp_handler->CloneItems($event->Prefix, $event->Special, Array($original_id), null, null, null, true);
$object->Load($cloned_ids[0]);
$object->SetFieldsFromHash($field_values);
// 1a. delete record from CategoryItems (about cloned item) that was automatically created during call of Create method of kCatDBItem
$ci_table = $this->Application->getUnitOption('ci', 'TableName');
$sql = 'DELETE FROM '.$ci_table.'
WHERE ItemResourceId = '.$object->GetDBField('ResourceId').' AND PrimaryCat = 1';
$this->Conn->Query($sql);
// 1b. copy main item categoryitems to cloned item
$sql = 'INSERT INTO '.$ci_table.' (CategoryId, ItemResourceId, PrimaryCat, ItemPrefix, Filename)
SELECT CategoryId, '.$object->GetDBField('ResourceId').' AS ItemResourceId, PrimaryCat, ItemPrefix, Filename
FROM '.$ci_table.'
WHERE ItemResourceId = '.$original_resource_id;
$this->Conn->Query($sql);
// 1c. put cloned id to OrgId field of item being cloned
$object->SetDBField('Status', STATUS_PENDING_EDITING);
$object->SetDBField('OrgId', $original_id);
}
else {
// 2. user has pending copy of live item -> just update field values
$object->SetFieldsFromHash($field_values);
}
// update id in request (used for redirect in mod-rewrite mode)
$this->Application->SetVar($event->getPrefixSpecial().'_id', $object->GetID());
}
else {
// 3. already editing pending copy -> just update field values
$object->SetFieldsFromHash($field_values);
}
if ($object->Update()) {
$event->status = kEvent::erSUCCESS;
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
$this->SetFrontRedirectTemplate($event, 'modify');
}
/**
* Sets next template to one required for front-end after adding/modifying item
*
* @param kEvent $event
* @param string $template_key - {suggest,modify}
*/
function SetFrontRedirectTemplate(&$event, $template_key)
{
if ( $this->Application->isAdminUser || $event->status != kEvent::erSUCCESS ) {
return;
}
// prepare redirect template
$object =& $event->getObject();
/* @var $object kDBItem */
$is_active = ($object->GetDBField('Status') == STATUS_ACTIVE);
$next_template = $is_active ? 'confirm_template' : 'pending_confirm_template';
$event->redirect = $this->Application->GetVar($template_key . '_' . $next_template);
$event->SetRedirectParam('opener', 's');
// send email events
$perm_prefix = $this->Application->getUnitOption($event->Prefix, 'PermItemPrefix');
$owner_field = $this->getOwnerField($event->Prefix);
$owner_id = $object->GetDBField($owner_field);
switch ( $event->Name ) {
case 'OnCreate':
$event_suffix = $is_active ? 'ADD' : 'ADD.PENDING';
$this->Application->EmailEventAdmin($perm_prefix . '.' . $event_suffix); // there are no ADD.PENDING event for admin :(
$this->Application->EmailEventUser($perm_prefix . '.' . $event_suffix, $owner_id);
break;
case 'OnUpdate':
$event_suffix = $is_active ? 'MODIFY' : 'MODIFY.PENDING';
$user_id = is_numeric($object->GetDBField('ModifiedById')) ? $object->GetDBField('ModifiedById') : $owner_id;
$this->Application->EmailEventAdmin($perm_prefix . '.' . $event_suffix); // there are no ADD.PENDING event for admin :(
$this->Application->EmailEventUser($perm_prefix . '.' . $event_suffix, $user_id);
break;
}
}
/**
* Apply same processing to each item being selected in grid
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function iterateItems(&$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 kCatDBItem */
$ids = $this->StoreSelectedIDs($event);
if ( $ids ) {
foreach ($ids as $id) {
$ret = true;
$object->Load($id);
switch ( $event->Name ) {
case 'OnMassApprove':
$ret = $object->ApproveChanges();
break;
case 'OnMassDecline':
$ret = $object->DeclineChanges();
break;
}
if ( !$ret ) {
$event->status = kEvent::erFAIL;
$event->redirect = false;
break;
}
}
}
$this->clearSelectedIDs($event);
}
/**
* Deletes items & preserves clean env
*
* @param kEvent $event
*/
function OnDelete(&$event)
{
parent::OnDelete($event);
if ($event->status == kEvent::erSUCCESS && !$this->Application->isAdmin) {
$event->SetRedirectParam('pass', 'm');
$event->SetRedirectParam('m_cat_id', 0);
}
}
/**
* Checks, that currently loaded item is allowed for viewing (non permission-based)
*
* @param kEvent $event
* @return bool
*/
function checkItemStatus(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
$this->_errorNotFound($event);
return true;
}
$status = $object->GetDBField('Status');
$user_id = $this->Application->RecallVar('user_id');
$owner_field = $this->getOwnerField($event->Prefix);
if ( ($status == STATUS_PENDING_EDITING || $status == STATUS_PENDING) && ($object->GetDBField($owner_field) == $user_id) ) {
return true;
}
return $status == STATUS_ACTIVE;
}
/**
* Set's correct sorting for list
* based on data provided with event
*
* @param kEvent $event
* @access private
* @see OnListBuild
*/
function SetSorting(&$event)
{
if (!$this->Application->isAdmin) {
$event->setEventParam('same_special', true);
}
parent::SetSorting($event);
}
/**
* Returns current per-page setting for list
*
* @param kEvent $event
* @return int
*/
function getPerPage(&$event)
{
if (!$this->Application->isAdmin) {
$event->setEventParam('same_special', true);
}
return parent::getPerPage($event);
}
/**
* Returns owner field for given prefix
*
* @param $prefix
* @return string
* @access protected
*/
protected function getOwnerField($prefix)
{
return $this->Application->getUnitOption($prefix, 'OwnerField', 'CreatedById');
}
/**
* Creates virtual image fields for item
*
* @param kEvent $event
*/
function OnAfterConfigRead(&$event)
{
parent::OnAfterConfigRead($event);
if (defined('IS_INSTALL') && IS_INSTALL) {
return ;
}
if ( !$this->Application->isAdmin ) {
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->createItemFiles($event->Prefix, true); // create image fields
$file_helper->createItemFiles($event->Prefix, false); // create file fields
}
$this->changeSortings($event);
// 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_primary_category_td', 'filter_block' => 'grid_like_filter');
$grids[$process_grid . 'ShowAll'] = $grid_data;
}
$this->Application->setUnitOption($this->Prefix, 'Grids', $grids);
// add options for CategoryId field (quick way to select item's primary category)
$category_helper =& $this->Application->recallObject('CategoryHelper');
/* @var $category_helper CategoryHelper */
$virtual_fields = $this->Application->getUnitOption($event->Prefix, 'VirtualFields');
$virtual_fields['CategoryId']['default'] = (int)$this->Application->GetVar('m_cat_id');
$virtual_fields['CategoryId']['options'] = $category_helper->getStructureTreeAsOptions();
$this->Application->setUnitOption($event->Prefix, 'VirtualFields', $virtual_fields);
}
function changeSortings(&$event)
{
$remove_sortings = Array ();
if ( !$this->Application->isAdmin ) {
// remove Pick sorting on Front-end, when not required
$config_mapping = $this->Application->getUnitOption($event->Prefix, 'ConfigMapping', Array ());
if ( !isset($config_mapping['ForceEditorPick']) || !$this->Application->ConfigValue($config_mapping['ForceEditorPick']) ) {
$remove_sortings[] = 'EditorsPick';
}
}
else {
// remove all forced sortings in Admin Console
$remove_sortings = array_merge($remove_sortings, Array ('Priority', 'EditorsPick'));
}
if ( !$remove_sortings ) {
return;
}
$list_sortings = $this->Application->getUnitOption($event->Prefix, 'ListSortings', Array ());
/* @var $list_sortings Array */
foreach ($list_sortings as $special => $sorting_fields) {
foreach ($remove_sortings as $sorting_field) {
unset($list_sortings[$special]['ForcedSorting'][$sorting_field]);
}
}
$this->Application->setUnitOption($event->Prefix, 'ListSortings', $list_sortings);
}
/**
* Returns file contents associated with item
*
* @param kEvent $event
*/
function OnDownloadFile(&$event)
{
$object =& $event->getObject();
/* @var $object kCatDBItem */
$event->status = kEvent::erSTOP;
$field = $this->Application->GetVar('field');
if (!preg_match('/^File([\d]+)/', $field)) {
return ;
}
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$filename = $object->GetField($field, 'full_path');
$file_helper->DownloadFile($filename);
}
/**
* Saves user's vote
*
* @param kEvent $event
*/
function OnMakeVote(&$event)
{
$event->status = kEvent::erSTOP;
if ($this->Application->GetVar('ajax') != 'yes') {
// this is supposed to call from AJAX only
return ;
}
$rating_helper =& $this->Application->recallObject('RatingHelper');
/* @var $rating_helper RatingHelper */
$object =& $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kCatDBItem */
$object->Load( $this->Application->GetVar('id') );
echo $rating_helper->makeVote($object);
}
/**
* Marks review as useful
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnReviewHelpful(&$event)
{
$review_id = (int)$this->Application->GetVar('review_id');
if ( !$review_id ) {
return;
}
$spam_helper =& $this->Application->recallObject('SpamHelper');
/* @var $spam_helper SpamHelper */
$spam_helper->InitHelper($review_id, 'ReviewHelpful', strtotime('+1 month') - strtotime('now'));
if ( $spam_helper->InSpamControl() ) {
return;
}
$field = (int)$this->Application->GetVar('helpful') ? 'HelpfulCount' : 'NotHelpfulCount';
$sql = 'UPDATE ' . $this->Application->getUnitOption('rev', 'TableName') . '
SET ' . $field . ' = ' . $field . ' + 1
WHERE ' . $this->Application->getUnitOption('rev', 'IDField') . ' = ' . $review_id;
$this->Conn->Query($sql);
if ( $this->Conn->getAffectedRows() ) {
// db was changed -> review with such ID exists
$spam_helper->AddToSpamControl();
}
}
/**
* [HOOK] Allows to add cloned subitem to given prefix
*
* @param kEvent $event
*/
function OnCloneSubItem(&$event)
{
parent::OnCloneSubItem($event);
if ($event->MasterEvent->Prefix == 'fav') {
$clones = $this->Application->getUnitOption($event->MasterEvent->Prefix, 'Clones');
$subitem_prefix = $event->Prefix . '-' . $event->MasterEvent->Prefix;
$clones[$subitem_prefix]['ParentTableKey'] = 'ResourceId';
$clones[$subitem_prefix]['ForeignKey'] = 'ResourceId';
$this->Application->setUnitOption($event->MasterEvent->Prefix, 'Clones', $clones);
}
}
/**
* 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());
}
}
}
\ No newline at end of file
Index: branches/5.2.x/core/kernel/utility/temp_handler.php
===================================================================
--- branches/5.2.x/core/kernel/utility/temp_handler.php (revision 14725)
+++ branches/5.2.x/core/kernel/utility/temp_handler.php (revision 14726)
@@ -1,1039 +1,1039 @@
<?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 kTempTablesHandler extends kBase {
var $Tables = Array();
/**
* Master table name for temp handler
*
* @var string
* @access private
*/
var $MasterTable = '';
/**
* IDs from master table
*
* @var Array
* @access private
*/
var $MasterIDs = Array();
var $AlreadyProcessed = Array();
var $DroppedTables = Array();
var $FinalRefs = Array();
var $TableIdCounter = 0;
var $CopiedTables = Array();
/**
* Foreign key cache
*
* @var Array
*/
var $FKeysCache = Array ();
/**
* IDs of newly cloned items (key - prefix.special, value - array of ids)
*
* @var Array
*/
var $savedIDs = Array();
/**
* Window ID of current window
*
* @var mixed
*/
var $WindowID = '';
/**
* Event, that was used to create this object
*
* @var kEvent
* @access protected
*/
protected $parentEvent = null;
/**
* Sets new parent event to the object
*
* @param kEvent $event
* @return void
* @access public
*/
public function setParentEvent(&$event)
{
$this->parentEvent =& $event;
}
function SetTables($tables)
{
// set table name as key for tables array
$this->Tables = $tables;
$this->MasterTable = $tables['TableName'];
}
function saveID($prefix, $special = '', $id = null)
{
if (!isset($this->savedIDs[$prefix.($special ? '.' : '').$special])) {
$this->savedIDs[$prefix.($special ? '.' : '').$special] = array();
}
if (is_array($id)) {
foreach ($id as $tmp_id => $live_id) {
$this->savedIDs[$prefix.($special ? '.' : '').$special][$tmp_id] = $live_id;
}
}
else {
$this->savedIDs[$prefix.($special ? '.' : '').$special][] = $id;
}
}
/**
* Get temp table name
*
* @param string $table
* @return string
*/
function GetTempName($table)
{
return $this->Application->GetTempName($table, $this->WindowID);
}
function GetTempTablePrefix()
{
return $this->Application->GetTempTablePrefix($this->WindowID);
}
/**
* Return live table name based on temp table name
*
* @param string $temp_table
* @return string
*/
function GetLiveName($temp_table)
{
return $this->Application->GetLiveName($temp_table);
}
function IsTempTable($table)
{
return $this->Application->IsTempTable($table);
}
/**
* Return temporary table name for master table
*
* @return string
* @access public
*/
function GetMasterTempName()
{
return $this->GetTempName($this->MasterTable);
}
function CreateTempTable($table)
{
$sql = 'CREATE TABLE ' . $this->GetTempName($table) . '
SELECT *
FROM ' . $table . '
WHERE 0';
$this->Conn->Query($sql);
}
function BuildTables($prefix, $ids)
{
$this->WindowID = $this->Application->GetVar('m_wid');
$this->TableIdCounter = 0;
$tables = Array(
'TableName' => $this->Application->getUnitOption($prefix, 'TableName'),
'IdField' => $this->Application->getUnitOption($prefix, 'IDField'),
'IDs' => $ids,
'Prefix' => $prefix,
'TableId' => $this->TableIdCounter++,
);
/*$parent_prefix = $this->Application->getUnitOption($prefix, 'ParentPrefix');
if ($parent_prefix) {
$tables['ForeignKey'] = $this->Application->getUnitOption($prefix, 'ForeignKey');
$tables['ParentPrefix'] = $parent_prefix;
$tables['ParentTableKey'] = $this->Application->getUnitOption($prefix, 'ParentTableKey');
}*/
$this->FinalRefs[ $tables['TableName'] ] = $tables['TableId']; // don't forget to add main table to FinalRefs too
$sub_items = $this->Application->getUnitOption($prefix, 'SubItems', Array ());
/* @var $sub_items Array */
if ( is_array($sub_items) ) {
foreach ($sub_items as $prefix) {
$this->AddTables($prefix, $tables);
}
}
$this->SetTables($tables);
}
/**
* Searches through TempHandler tables info for required prefix
*
* @param string $prefix
* @param Array $master
* @return mixed
*/
function SearchTable($prefix, $master = null)
{
if (is_null($master)) {
$master = $this->Tables;
}
if ($master['Prefix'] == $prefix) {
return $master;
}
if (isset($master['SubTables'])) {
foreach ($master['SubTables'] as $sub_table) {
$found = $this->SearchTable($prefix, $sub_table);
if ($found !== false) {
return $found;
}
}
}
return false;
}
function AddTables($prefix, &$tables)
{
if ( !$this->Application->prefixRegistred($prefix) ) {
// allows to skip subitem processing if subitem module not enabled/installed
return ;
}
$tmp = Array(
'TableName' => $this->Application->getUnitOption($prefix,'TableName'),
'IdField' => $this->Application->getUnitOption($prefix,'IDField'),
'ForeignKey' => $this->Application->getUnitOption($prefix,'ForeignKey'),
'ParentPrefix' => $this->Application->getUnitOption($prefix, 'ParentPrefix'),
'ParentTableKey' => $this->Application->getUnitOption($prefix,'ParentTableKey'),
'Prefix' => $prefix,
'AutoClone' => $this->Application->getUnitOption($prefix,'AutoClone'),
'AutoDelete' => $this->Application->getUnitOption($prefix,'AutoDelete'),
'TableId' => $this->TableIdCounter++,
);
$this->FinalRefs[ $tmp['TableName'] ] = $tmp['TableId'];
$constrain = $this->Application->getUnitOption($prefix, 'Constrain');
if ( $constrain ) {
$tmp['Constrain'] = $constrain;
$this->FinalRefs[ $tmp['TableName'] . $tmp['Constrain'] ] = $tmp['TableId'];
}
$sub_items = $this->Application->getUnitOption($prefix, 'SubItems', Array ());
/* @var $sub_items Array */
if ( is_array($sub_items) ) {
foreach ($sub_items as $prefix) {
$this->AddTables($prefix, $tmp);
}
}
if ( !is_array(getArrayValue($tables, 'SubTables')) ) {
$tables['SubTables'] = Array ();
}
$tables['SubTables'][] = $tmp;
}
function CloneItems($prefix, $special, $ids, $master = null, $foreign_key = null, $parent_prefix = null, $skip_filenames = false)
{
if (!isset($master)) $master = $this->Tables;
// recalling by different name, because we may get kDBList, if we recall just by prefix
if (!preg_match('/(.*)-item$/', $special)) {
$special .= '-item';
}
$object =& $this->Application->recallObject($prefix.'.'.$special, $prefix, Array('skip_autoload' => true, 'parent_event' => &$this->parentEvent));
/* @var $object kCatDBItem */
$object->PopulateMultiLangFields();
foreach ($ids as $id) {
$mode = 'create';
$cloned_ids = getArrayValue($this->AlreadyProcessed, $master['TableName']);
if ( $cloned_ids ) {
// if we have already cloned the id, replace it with cloned id and set mode to update
// update mode is needed to update second ForeignKey for items cloned by first ForeignKey
if ( getArrayValue($cloned_ids, $id) ) {
$id = $cloned_ids[$id];
$mode = 'update';
}
}
$object->Load($id);
$original_values = $object->GetFieldValues();
if (!$skip_filenames) {
$object->NameCopy($master, $foreign_key);
}
elseif ($master['TableName'] == $this->MasterTable) {
// kCatDBItem class only has this attribute
$object->useFilenames = false;
}
if (isset($foreign_key)) {
$master_foreign_key_field = is_array($master['ForeignKey']) ? $master['ForeignKey'][$parent_prefix] : $master['ForeignKey'];
$object->SetDBField($master_foreign_key_field, $foreign_key);
}
if ($mode == 'create') {
$this->RaiseEvent('OnBeforeClone', $master['Prefix'], $special, Array($object->GetId()), $foreign_key);
}
$object->inCloning = true;
$res = $mode == 'update' ? $object->Update() : $object->Create();
$object->inCloning = false;
if ($res)
{
if ( $mode == 'create' && is_array( getArrayValue($master, 'ForeignKey')) ) {
// remember original => clone mapping for dual ForeignKey updating
$this->AlreadyProcessed[$master['TableName']][$id] = $object->GetId();
}
if ($mode == 'create') {
$this->RaiseEvent('OnAfterClone', $master['Prefix'], $special, Array($object->GetId()), $foreign_key, array('original_id' => $id) );
$this->saveID($master['Prefix'], $special, $object->GetID());
}
if ( is_array(getArrayValue($master, 'SubTables')) ) {
foreach($master['SubTables'] as $sub_table) {
if (!getArrayValue($sub_table, 'AutoClone')) continue;
$sub_TableName = $object->IsTempTable() ? $this->GetTempName($sub_table['TableName']) : $sub_table['TableName'];
$foreign_key_field = is_array($sub_table['ForeignKey']) ? $sub_table['ForeignKey'][$master['Prefix']] : $sub_table['ForeignKey'];
$parent_key_field = is_array($sub_table['ParentTableKey']) ? $sub_table['ParentTableKey'][$master['Prefix']] : $sub_table['ParentTableKey'];
if (!$foreign_key_field || !$parent_key_field) continue;
$query = 'SELECT '.$sub_table['IdField'].' FROM '.$sub_TableName.'
WHERE '.$foreign_key_field.' = '.$original_values[$parent_key_field];
if (isset($sub_table['Constrain'])) $query .= ' AND '.$sub_table['Constrain'];
$sub_ids = $this->Conn->GetCol($query);
if ( is_array(getArrayValue($sub_table, 'ForeignKey')) ) {
// $sub_ids could containt newly cloned items, we need to remove it here
// to escape double cloning
$cloned_ids = getArrayValue($this->AlreadyProcessed, $sub_table['TableName']);
if ( !$cloned_ids ) $cloned_ids = Array();
$new_ids = array_values($cloned_ids);
$sub_ids = array_diff($sub_ids, $new_ids);
}
$parent_key = $object->GetDBField($parent_key_field);
$this->CloneItems($sub_table['Prefix'], $special, $sub_ids, $sub_table, $parent_key, $master['Prefix']);
}
}
}
}
if (!$ids) {
$this->savedIDs[$prefix.($special ? '.' : '').$special] = Array();
}
return $this->savedIDs[$prefix.($special ? '.' : '').$special];
}
function DeleteItems($prefix, $special, $ids, $master=null, $foreign_key=null)
{
if (!isset($master)) $master = $this->Tables;
if( strpos($prefix,'.') !== false ) list($prefix,$special) = explode('.', $prefix, 2);
$prefix_special = rtrim($prefix.'.'.$special, '.');
//recalling by different name, because we may get kDBList, if we recall just by prefix
$recall_prefix = $prefix_special.($special ? '' : '.').'-item';
$object =& $this->Application->recallObject($recall_prefix, $prefix, Array('skip_autoload' => true, 'parent_event' => &$this->parentEvent));
/* @var $object kDBItem */
foreach ($ids as $id)
{
$object->Load($id);
$original_values = $object->GetFieldValues();
if( !$object->Delete($id) ) continue;
if ( is_array(getArrayValue($master, 'SubTables')) ) {
foreach($master['SubTables'] as $sub_table) {
if (!getArrayValue($sub_table, 'AutoDelete')) continue;
$sub_TableName = $object->IsTempTable() ? $this->GetTempName($sub_table['TableName']) : $sub_table['TableName'];
$foreign_key_field = is_array($sub_table['ForeignKey']) ? getArrayValue($sub_table, 'ForeignKey', $master['Prefix']) : $sub_table['ForeignKey'];
$parent_key_field = is_array($sub_table['ParentTableKey']) ? getArrayValue($sub_table, 'ParentTableKey', $master['Prefix']) : $sub_table['ParentTableKey'];
if (!$foreign_key_field || !$parent_key_field) continue;
$query = 'SELECT '.$sub_table['IdField'].' FROM '.$sub_TableName.'
WHERE '.$foreign_key_field.' = '.$original_values[$parent_key_field];
$sub_ids = $this->Conn->GetCol($query);
$parent_key = $object->GetDBField(is_array($sub_table['ParentTableKey']) ? $sub_table['ParentTableKey'][$prefix] : $sub_table['ParentTableKey']);
$this->DeleteItems($sub_table['Prefix'], $special, $sub_ids, $sub_table, $parent_key);
}
}
}
}
function DoCopyLiveToTemp($master, $ids, $parent_prefix=null)
{
// when two tables refers the same table as sub-sub-table, and ForeignKey and ParentTableKey are arrays
// the table will be first copied by first sub-table, then dropped and copied over by last ForeignKey in the array
// this should not do any problems :)
if ( !preg_match("/.*\.[0-9]+/", $master['Prefix']) ) {
if( $this->DropTempTable($master['TableName']) )
{
$this->CreateTempTable($master['TableName']);
}
}
if (is_array($ids)) {
$ids = join(',', $ids);
}
$table_sig = $master['TableName'].(isset($master['Constrain']) ? $master['Constrain'] : '');
if ($ids != '' && !in_array($table_sig, $this->CopiedTables)) {
if ( getArrayValue($master, 'ForeignKey') ) {
if ( is_array($master['ForeignKey']) ) {
$key_field = $master['ForeignKey'][$parent_prefix];
}
else {
$key_field = $master['ForeignKey'];
}
}
else {
$key_field = $master['IdField'];
}
$query = 'INSERT INTO '.$this->GetTempName($master['TableName']).'
SELECT * FROM '.$master['TableName'].'
WHERE '.$key_field.' IN ('.$ids.')';
if (isset($master['Constrain'])) $query .= ' AND '.$master['Constrain'];
$this->Conn->Query($query);
$this->CopiedTables[] = $table_sig;
$query = 'SELECT '.$master['IdField'].' FROM '.$master['TableName'].'
WHERE '.$key_field.' IN ('.$ids.')';
if (isset($master['Constrain'])) $query .= ' AND '.$master['Constrain'];
$this->RaiseEvent( 'OnAfterCopyToTemp', $master['Prefix'], '', $this->Conn->GetCol($query) );
}
if ( getArrayValue($master, 'SubTables') ) {
foreach ($master['SubTables'] as $sub_table) {
$parent_key = is_array($sub_table['ParentTableKey']) ? $sub_table['ParentTableKey'][$master['Prefix']] : $sub_table['ParentTableKey'];
if (!$parent_key) continue;
if ( $ids != '' && $parent_key != $key_field ) {
$query = 'SELECT '.$parent_key.' FROM '.$master['TableName'].'
WHERE '.$key_field.' IN ('.$ids.')';
$sub_foreign_keys = join(',', $this->Conn->GetCol($query));
}
else {
$sub_foreign_keys = $ids;
}
$this->DoCopyLiveToTemp($sub_table, $sub_foreign_keys, $master['Prefix']);
}
}
}
function GetForeignKeys($master, $sub_table, $live_id, $temp_id=null)
{
$mode = 1; //multi
if (!is_array($live_id)) {
$live_id = Array($live_id);
$mode = 2; //single
}
if (isset($temp_id) && !is_array($temp_id)) $temp_id = Array($temp_id);
if ( isset($sub_table['ParentTableKey']) ) {
if ( is_array($sub_table['ParentTableKey']) ) {
$parent_key_field = $sub_table['ParentTableKey'][$master['Prefix']];
}
else {
$parent_key_field = $sub_table['ParentTableKey'];
}
}
else {
$parent_key_field = $master['IdField'];
}
$cached = getArrayValue($this->FKeysCache, $master['TableName'].'.'.$parent_key_field);
if ( $cached ) {
if ( array_key_exists(serialize($live_id), $cached) ) {
list($live_foreign_key, $temp_foreign_key) = $cached[serialize($live_id)];
if ($mode == 1) {
return $live_foreign_key;
}
else {
return Array($live_foreign_key[0], $temp_foreign_key[0]);
}
}
}
if ($parent_key_field != $master['IdField']) {
$query = 'SELECT '.$parent_key_field.' FROM '.$master['TableName'].'
WHERE '.$master['IdField'].' IN ('.join(',', $live_id).')';
$live_foreign_key = $this->Conn->GetCol($query);
if (isset($temp_id)) {
// because DoCopyTempToOriginal resets negative IDs to 0 in temp table (one by one) before copying to live
$temp_key = $temp_id < 0 ? 0 : $temp_id;
$query = 'SELECT '.$parent_key_field.' FROM '.$this->GetTempName($master['TableName']).'
WHERE '.$master['IdField'].' IN ('.join(',', $temp_key).')';
$temp_foreign_key = $this->Conn->GetCol($query);
}
else {
$temp_foreign_key = Array();
}
}
else {
$live_foreign_key = $live_id;
$temp_foreign_key = $temp_id;
}
$this->FKeysCache[$master['TableName'].'.'.$parent_key_field][serialize($live_id)] = Array($live_foreign_key, $temp_foreign_key);
if ($mode == 1) {
return $live_foreign_key;
}
else {
return Array($live_foreign_key[0], $temp_foreign_key[0]);
}
}
/**
* Copies data from temp to live table and returns IDs of copied records
*
* @param Array $master
* @param string $parent_prefix
* @param Array $current_ids
* @return Array
* @access public
*/
public function DoCopyTempToOriginal($master, $parent_prefix = null, $current_ids = Array())
{
if ( !$current_ids ) {
$query = 'SELECT ' . $master['IdField'] . ' FROM ' . $this->GetTempName($master['TableName']);
if ( isset($master['Constrain']) ) {
$query .= ' WHERE ' . $master['Constrain'];
}
$current_ids = $this->Conn->GetCol($query);
}
$table_sig = $master['TableName'] . (isset($master['Constrain']) ? $master['Constrain'] : '');
if ($current_ids) {
// delete all ids from live table - for MasterTable ONLY!
// because items from Sub Tables get deteleted in CopySubTablesToLive !BY ForeignKey!
if ( $master['TableName'] == $this->MasterTable ) {
$this->RaiseEvent('OnBeforeDeleteFromLive', $master['Prefix'], '', $current_ids);
$query = 'DELETE FROM ' . $master['TableName'] . ' WHERE ' . $master['IdField'] . ' IN (' . join(',', $current_ids) . ')';
$this->Conn->Query($query);
}
if ( getArrayValue($master, 'SubTables') ) {
if ( in_array($table_sig, $this->CopiedTables) || $this->FinalRefs[$table_sig] != $master['TableId'] ) {
return Array ();
}
foreach ($current_ids AS $id) {
$this->RaiseEvent('OnBeforeCopyToLive', $master['Prefix'], '', Array ($id));
//reset negative ids to 0, so autoincrement in live table works fine
if ( $id < 0 ) {
$query = ' UPDATE ' . $this->GetTempName($master['TableName']) . '
SET ' . $master['IdField'] . ' = 0
WHERE ' . $master['IdField'] . ' = ' . $id;
if ( isset($master['Constrain']) ) {
$query .= ' AND ' . $master['Constrain'];
}
$this->Conn->Query($query);
$id_to_copy = 0;
}
else {
$id_to_copy = $id;
}
//copy current id_to_copy (0 for new or real id) to live table
$query = ' INSERT INTO ' . $master['TableName'] . '
SELECT * FROM ' . $this->GetTempName($master['TableName']) . '
WHERE ' . $master['IdField'] . ' = ' . $id_to_copy;
$this->Conn->Query($query);
$insert_id = $id_to_copy == 0 ? $this->Conn->getInsertID() : $id_to_copy;
$this->saveID($master['Prefix'], '', array ($id => $insert_id));
$this->RaiseEvent('OnAfterCopyToLive', $master['Prefix'], '', Array ($insert_id), null, Array ('temp_id' => $id));
$this->UpdateForeignKeys($master, $insert_id, $id);
//delete already copied record from master temp table
$query = ' DELETE FROM ' . $this->GetTempName($master['TableName']) . '
WHERE ' . $master['IdField'] . ' = ' . $id_to_copy;
if ( isset($master['Constrain']) ) {
$query .= ' AND ' . $master['Constrain'];
}
$this->Conn->Query($query);
}
$this->CopiedTables[] = $table_sig;
// when all of ids in current master has been processed, copy all sub-tables data
$this->CopySubTablesToLive($master, $current_ids);
}
elseif ( !in_array($table_sig, $this->CopiedTables) && ($this->FinalRefs[$table_sig] == $master['TableId']) ) { //If current master doesn't have sub-tables - we could use mass operations
// We don't need to delete items from live here, as it get deleted in the beginning of the method for MasterTable
// or in parent table processing for sub-tables
$live_ids = Array ();
$this->RaiseEvent('OnBeforeCopyToLive', $master['Prefix'], '', $current_ids);
foreach ($current_ids as $an_id) {
if ( $an_id > 0 ) {
$live_ids[$an_id] = $an_id;
// positive (already live) IDs will be copied in on query all togather below,
// so we just store it here
continue;
}
else { // zero or negative ids should be copied one by one to get their InsertId
// resetting to 0 so it get inserted into live table with autoincrement
$query = ' UPDATE ' . $this->GetTempName($master['TableName']) . '
SET ' . $master['IdField'] . ' = 0
WHERE ' . $master['IdField'] . ' = ' . $an_id;
// constrain is not needed here because ID is already unique
$this->Conn->Query($query);
// copying
$query = ' INSERT INTO ' . $master['TableName'] . '
SELECT * FROM ' . $this->GetTempName($master['TableName']) . '
WHERE ' . $master['IdField'] . ' = 0';
$this->Conn->Query($query);
$live_ids[$an_id] = $this->Conn->getInsertID(); //storing newly created live id
//delete already copied record from master temp table
$query = ' DELETE FROM ' . $this->GetTempName($master['TableName']) . '
WHERE ' . $master['IdField'] . ' = 0';
$this->Conn->Query($query);
$this->UpdateChangeLogForeignKeys($master, $live_ids[$an_id], $an_id);
}
}
// copy ALL records to live table
$query = ' INSERT INTO ' . $master['TableName'] . '
SELECT * FROM ' . $this->GetTempName($master['TableName']);
if ( isset($master['Constrain']) ) {
$query .= ' WHERE ' . $master['Constrain'];
}
$this->Conn->Query($query);
$this->CopiedTables[] = $table_sig;
$this->RaiseEvent('OnAfterCopyToLive', $master['Prefix'], '', $live_ids);
$this->saveID($master['Prefix'], '', $live_ids);
// no need to clear temp table - it will be dropped by next statement
}
}
if ( $this->FinalRefs[ $master['TableName'] ] != $master['TableId'] ) {
return Array ();
}
/*if ( is_array(getArrayValue($master, 'ForeignKey')) ) { //if multiple ForeignKeys
if ( $master['ForeignKey'][$parent_prefix] != end($master['ForeignKey']) ) {
return; // Do not delete temp table if not all ForeignKeys have been processed (current is not the last)
}
}*/
$this->DropTempTable($master['TableName']);
$this->Application->resetCounters($master['TableName']);
if ( !isset($this->savedIDs[ $master['Prefix'] ]) ) {
$this->savedIDs[ $master['Prefix'] ] = Array ();
}
return $this->savedIDs[ $master['Prefix'] ];
}
/**
* Create separate connection for locking purposes
*
* @return kDBConnection
*/
function &_getSeparateConnection()
{
static $connection = null;
if (!isset($connection)) {
$connection =& $this->Application->makeClass( 'kDBConnection', Array (SQL_TYPE, Array (&$this->Application, 'handleSQLError')) );
/* @var $connection kDBConnection */
$connection->debugMode = $this->Application->isDebugMode();
$connection->Connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB, true);
}
return $connection;
}
function UpdateChangeLogForeignKeys($master, $live_id, $temp_id)
{
if ($live_id == $temp_id) {
return ;
}
$prefix = $master['Prefix'];
$main_prefix = $this->Application->GetTopmostPrefix($prefix);
$ses_var_name = $main_prefix . '_changes_' . $this->Application->GetTopmostWid($this->Prefix);
$changes = $this->Application->RecallVar($ses_var_name);
$changes = $changes ? unserialize($changes) : Array ();
foreach ($changes as $key => $rec) {
if ($rec['Prefix'] == $prefix && $rec['ItemId'] == $temp_id) {
// main item change log record
$changes[$key]['ItemId'] = $live_id;
}
if ($rec['MasterPrefix'] == $prefix && $rec['MasterId'] == $temp_id) {
// sub item change log record
$changes[$key]['MasterId'] = $live_id;
}
if (in_array($prefix, $rec['ParentPrefix']) && $rec['ParentId'][$prefix] == $temp_id) {
// parent item change log record
$changes[$key]['ParentId'][$prefix] = $live_id;
if (array_key_exists('DependentFields', $rec)) {
// these are fields from table of $rec['Prefix'] table!
// when one of dependent fields goes into idfield of it's parent item, that was changed
$parent_table_key = $this->Application->getUnitOption($rec['Prefix'], 'ParentTableKey');
$parent_table_key = is_array($parent_table_key) ? $parent_table_key[$prefix] : $parent_table_key;
if ($parent_table_key == $master['IdField']) {
$foreign_key = $this->Application->getUnitOption($rec['Prefix'], 'ForeignKey');
$foreign_key = is_array($foreign_key) ? $foreign_key[$prefix] : $foreign_key;
$changes[$key]['DependentFields'][$foreign_key] = $live_id;
}
}
}
}
$this->Application->StoreVar($ses_var_name, serialize($changes));
}
function UpdateForeignKeys($master, $live_id, $temp_id)
{
$this->UpdateChangeLogForeignKeys($master, $live_id, $temp_id);
foreach ($master['SubTables'] as $sub_table) {
$foreign_key_field = is_array($sub_table['ForeignKey']) ? getArrayValue($sub_table, 'ForeignKey', $master['Prefix']) : $sub_table['ForeignKey'];
if (!$foreign_key_field) {
continue;
}
list ($live_foreign_key, $temp_foreign_key) = $this->GetForeignKeys($master, $sub_table, $live_id, $temp_id);
//Update ForeignKey in sub TEMP table
if ($live_foreign_key != $temp_foreign_key) {
$query = 'UPDATE '.$this->GetTempName($sub_table['TableName']).'
SET '.$foreign_key_field.' = '.$live_foreign_key.'
WHERE '.$foreign_key_field.' = '.$temp_foreign_key;
if (isset($sub_table['Constrain'])) $query .= ' AND '.$sub_table['Constrain'];
$this->Conn->Query($query);
}
}
}
function CopySubTablesToLive($master, $current_ids) {
foreach ($master['SubTables'] as $sub_table) {
$table_sig = $sub_table['TableName'].(isset($sub_table['Constrain']) ? $sub_table['Constrain'] : '');
// delete records from live table by foreign key, so that records deleted from temp table
// get deleted from live
if (count($current_ids) > 0 && !in_array($table_sig, $this->CopiedTables) ) {
$foreign_key_field = is_array($sub_table['ForeignKey']) ? getArrayValue($sub_table, 'ForeignKey', $master['Prefix']) : $sub_table['ForeignKey'];
if (!$foreign_key_field) continue;
$foreign_keys = $this->GetForeignKeys($master, $sub_table, $current_ids);
if (count($foreign_keys) > 0) {
$query = 'SELECT '.$sub_table['IdField'].' FROM '.$sub_table['TableName'].'
WHERE '.$foreign_key_field.' IN ('.join(',', $foreign_keys).')';
if (isset($sub_table['Constrain'])) $query .= ' AND '.$sub_table['Constrain'];
if ( $this->RaiseEvent( 'OnBeforeDeleteFromLive', $sub_table['Prefix'], '', $this->Conn->GetCol($query), $foreign_keys ) ){
$query = 'DELETE FROM '.$sub_table['TableName'].'
WHERE '.$foreign_key_field.' IN ('.join(',', $foreign_keys).')';
if (isset($sub_table['Constrain'])) $query .= ' AND '.$sub_table['Constrain'];
$this->Conn->Query($query);
}
}
}
//sub_table passed here becomes master in the method, and recursively updated and copy its sub tables
$this->DoCopyTempToOriginal($sub_table, $master['Prefix']);
}
}
/**
* Raises event using IDs, that are currently being processed in temp handler
*
* @param string $name
* @param string $prefix
* @param string $special
* @param Array $ids
* @param string $foreign_key
* @param Array $add_params
* @return bool
* @access protected
*/
protected function RaiseEvent($name, $prefix, $special, $ids, $foreign_key = null, $add_params = null)
{
if ( !is_array($ids) ) {
return true;
}
$event_key = $prefix . ($special ? '.' : '') . $special . ':' . $name;
$event = new kEvent($event_key);
if ( isset($foreign_key) ) {
$event->setEventParam('foreign_key', $foreign_key);
}
$set_temp_id = ($name == 'OnAfterCopyToLive') && (!is_array($add_params) || !array_key_exists('temp_id', $add_params));
foreach ($ids as $index => $id) {
$event->setEventParam('id', $id);
if ( $set_temp_id ) {
$event->setEventParam('temp_id', $index);
}
if ( is_array($add_params) ) {
foreach ($add_params as $name => $val) {
$event->setEventParam($name, $val);
}
}
$this->Application->HandleEvent($event);
}
return $event->status == kEvent::erSUCCESS;
}
function DropTempTable($table)
{
if ( in_array($table, $this->DroppedTables) ) {
return false;
}
$query = 'DROP TABLE IF EXISTS ' . $this->GetTempName($table);
array_push($this->DroppedTables, $table);
$this->DroppedTables = array_unique($this->DroppedTables);
$this->Conn->Query($query);
return true;
}
function PrepareEdit()
{
$this->DoCopyLiveToTemp($this->Tables, $this->Tables['IDs']);
if ($this->Application->getUnitOption($this->Tables['Prefix'],'CheckSimulatniousEdit')) {
$this->CheckSimultaniousEdit();
}
}
function SaveEdit($master_ids = Array())
{
// SessionKey field is required for deleting records from expired sessions
$conn =& $this->_getSeparateConnection();
$sleep_count = 0;
do {
// acquire lock
$conn->ChangeQuery('LOCK TABLES '.TABLE_PREFIX.'Semaphores WRITE');
$sql = 'SELECT SessionKey
FROM ' . TABLE_PREFIX . 'Semaphores
WHERE (MainPrefix = ' . $conn->qstr($this->Tables['Prefix']) . ')';
$another_coping_active = $conn->GetOne($sql);
if ($another_coping_active) {
// another user is coping data from temp table to live -> release lock and try again after 1 second
$conn->ChangeQuery('UNLOCK TABLES');
$sleep_count++;
sleep(1);
}
} while ($another_coping_active && ($sleep_count <= 30));
if ($sleep_count > 30) {
// another coping process failed to finished in 30 seconds
$error_message = $this->Application->Phrase('la_error_TemporaryTableCopyingFailed');
$this->Application->SetVar('_temp_table_message', $error_message);
return false;
}
// mark, that we are coping from temp to live right now, so other similar attempt (from another script) will fail
$fields_hash = Array (
'SessionKey' => $this->Application->GetSID(),
'Timestamp' => adodb_mktime(),
'MainPrefix' => $this->Tables['Prefix'],
);
$conn->doInsert($fields_hash, TABLE_PREFIX.'Semaphores');
$semaphore_id = $conn->getInsertID();
// unlock table now to prevent permanent lock in case, when coping will end with SQL error in the middle
$conn->ChangeQuery('UNLOCK TABLES');
$ids = $this->DoCopyTempToOriginal($this->Tables, null, $master_ids);
// remove mark, that we are coping from temp to live
$conn->Query('LOCK TABLES '.TABLE_PREFIX.'Semaphores WRITE');
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'Semaphores
WHERE SemaphoreId = ' . $semaphore_id;
$conn->ChangeQuery($sql);
$conn->ChangeQuery('UNLOCK TABLES');
return $ids;
}
function CancelEdit($master=null)
{
if (!isset($master)) $master = $this->Tables;
$this->DropTempTable($master['TableName']);
if ( getArrayValue($master, 'SubTables') ) {
foreach ($master['SubTables'] as $sub_table) {
$this->CancelEdit($sub_table);
}
}
}
/**
* Checks, that someone is editing selected records and returns true, when no one.
*
* @param Array $ids
*
* @return bool
*/
function CheckSimultaniousEdit($ids = null)
{
$tables = $this->Conn->GetCol('SHOW TABLES');
$mask_edit_table = '/' . TABLE_PREFIX . 'ses_(.*)_edit_' . $this->MasterTable . '$/';
$my_sid = $this->Application->GetSID();
$my_wid = $this->Application->GetVar('m_wid');
$ids = implode(',', isset($ids) ? $ids : $this->Tables['IDs']);
$sids = Array ();
if (!$ids) {
return true;
}
foreach ($tables as $table) {
if ( preg_match($mask_edit_table, $table, $rets) ) {
$sid = preg_replace('/(.*)_(.*)/', '\\1', $rets[1]); // remove popup's wid from sid
if ($sid == $my_sid) {
if ($my_wid) {
// using popups for editing
if (preg_replace('/(.*)_(.*)/', '\\2', $rets[1]) == $my_wid) {
// don't count window, that is being opened right now
continue;
}
}
else {
// not using popups for editing -> don't count my session tables
continue;
}
}
$sql = 'SELECT COUNT(' . $this->Tables['IdField'] . ')
FROM ' . $table . '
WHERE ' . $this->Tables['IdField'] . ' IN (' . $ids . ')';
$found = $this->Conn->GetOne($sql);
if (!$found || in_array($sid, $sids)) {
continue;
}
$sids[] = $sid;
}
}
if ($sids) {
// detect who is it
$sql = 'SELECT
CONCAT(IF (s.PortalUserId = ' . USER_ROOT . ', \'root\',
IF (s.PortalUserId = ' . USER_GUEST . ', \'Guest\',
- CONCAT(FirstName, \' \', LastName, \' (\', Login, \')\')
+ CONCAT(u.FirstName, \' \', u.LastName, \' (\', u.Username, \')\')
)
), \' IP: \', s.IpAddress, \'\') FROM ' . TABLE_PREFIX . 'UserSession AS s
LEFT JOIN ' . TABLE_PREFIX . 'PortalUser AS u
ON u.PortalUserId = s.PortalUserId
WHERE s.SessionKey IN (' . implode(',', $sids) . ')';
$users = $this->Conn->GetCol($sql);
if ($users) {
$this->Application->SetVar('_simultanious_edit_message',
sprintf($this->Application->Phrase('la_record_being_edited_by'), join(",\n", $users))
);
return false;
}
}
return true;
}
}
\ No newline at end of file
Index: branches/5.2.x/core/units/visits/visits_config.php
===================================================================
--- branches/5.2.x/core/units/visits/visits_config.php (revision 14725)
+++ branches/5.2.x/core/units/visits/visits_config.php (revision 14726)
@@ -1,178 +1,178 @@
<?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' => 'visits',
'ItemClass' => Array ('class' => 'kDBItem','file' => '','build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'VisitsList','file' => 'visits_list.php','build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'VisitsEventHandler','file' => 'visits_event_handler.php','build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'VisitsTagProcessor','file' => 'visits_tag_processor.php','build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'Hooks' => Array (
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'adm',
'HookToSpecial' => '',
'HookToEvent' => Array ( 'OnStartup' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnRegisterVisit',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '*',
'HookToEvent' => Array ( 'OnAfterLogin' ),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnUserLogin',
),
),
'IDField' => 'VisitId',
'TableName' => TABLE_PREFIX.'Visits',
'PermSection' => Array ('main' => 'in-portal:visits'),
'Sections' => Array (
'in-portal:visits' => Array (
'parent' => 'in-portal:reports',
'icon' => 'visits',
'label' => 'la_tab_VisitorLog',
'url' => Array ('t' => 'logs/visits/visits_list', 'pass' => 'm'),
'permissions' => Array ('view', 'delete'),
'priority' => 6,
'type' => stTREE,
),
),
'TitlePresets' => Array (
'visits_list' => Array (
'prefixes' => Array ('visits_List'), 'format' => "!la_title_Visits!",
'toolbar_buttons' => Array ('search', 'search_reset', 'refresh', 'delete', 'export', 'view'),
),
'visits.incommerce_list' => Array (
'prefixes' => Array ('visits.incommerce_List'), 'format' => "!la_title_Visits!",
'toolbar_buttons' => Array ('search', 'search_reset', 'refresh', 'delete', 'export', 'view'),
),
),
'CalculatedFields' => Array (
'' => Array (
- 'UserName' => 'IF( ISNULL(u.Login), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Login)',
+ 'UserName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Username)',
),
'incommerce' => Array (
- 'UserName' => 'IF( ISNULL(u.Login), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Login)',
- 'AffiliateUser' => 'IF( LENGTH(au.Login),au.Login,\'!la_None!\')',
+ 'UserName' => 'IF( ISNULL(u.Username), IF (%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', IF (%1$s.PortalUserId = ' . USER_GUEST . ', \'Guest\', \'n/a\')), u.Username)',
+ 'AffiliateUser' => 'IF( LENGTH(au.Username),au.Username,\'!la_None!\')',
'AffiliatePortalUserId' => 'af.PortalUserId',
'OrderTotalAmount' => 'IF(ord.Status = 4, ord.SubTotal+ord.ShippingCost+ord.VAT, 0)',
'OrderAffiliateCommission' => 'IF(ord.Status = 4, ord.AffiliateCommission, 0)',
'OrderNumber' => 'CONCAT(LPAD(Number,6,"0"),\'-\',LPAD(SubNumber,3,"0") )',
'OrderId' => 'ord.OrderId',
),
),
'ListSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId',
'incommerce' => '
SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'Orders ord ON %1$s.VisitId = ord.VisitId',
),
'ItemSQLs' => Array ( '' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId',
'incommerce' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'Affiliates af ON %1$s.AffiliateId = af.AffiliateId
LEFT JOIN '.TABLE_PREFIX.'PortalUser au ON af.PortalUserId = au.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'Orders ord ON %1$s.VisitId = ord.VisitId',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('VisitDate' => 'desc'),
)
),
'Fields' => Array (
'VisitId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'VisitDate' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'custom_filter' => 'date_range', 'default' => NULL),
'Referer' => Array ('type' => 'string','not_null' => '1','default' => ''),
'IPAddress' => Array ('type' => 'string','not_null' => '1','default' => ''),
- 'AffiliateId' => Array ('type' => 'int','formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field' => 'AffiliateId','left_title_field' => 'Login','not_null'=>1,'default'=>0),
+ 'AffiliateId' => Array ('type' => 'int','formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (0 => 'lu_None'), 'left_sql' => 'SELECT %s FROM '.TABLE_PREFIX.'Affiliates af LEFT JOIN '.TABLE_PREFIX.'PortalUser pu ON pu.PortalUserId = af.PortalUserId WHERE `%s` = \'%s\'','left_key_field' => 'AffiliateId','left_title_field' => 'Username','not_null'=>1,'default'=>0),
'PortalUserId' => Array ('type' => 'int','not_null' => '1','default' => USER_GUEST),
),
'VirtualFields' => Array (
'UserName' => Array ('type' => 'string', 'default' => ''),
'AffiliateUser' => Array ('type' => 'string', 'default' => ''),
'AffiliatePortalUserId' => Array ('type' => 'int', 'default' => null),
'OrderTotalAmount' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00', 'totals' => 'SUM'),
'OrderTotalAmountSum' => Array ('type' => 'float', 'formatter' => 'kFormatter', 'format' => '%01.2f', 'default' => '0.00'),
'OrderAffiliateCommission' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000', 'totals' => 'SUM'),
'OrderAffiliateCommissionSum' => Array ('type' => 'double', 'formatter' => 'kFormatter','format' => '%.02f', 'default' => '0.0000'),
'OrderNumber' => Array ('type' => 'string', 'default' => ''),
'OrderId' => Array ('type' => 'int', 'default' => '0'),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'VisitDate' => Array ( 'title' => 'la_col_VisitDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'IPAddress' => Array ( 'title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
'Referer' => Array ( 'title' => 'la_col_Referer', 'data_block' => 'grid_referer_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'UserName' => Array ('title' => 'column:la_fld_Username', 'data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
),
),
'visitsincommerce' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'VisitDate' => Array ( 'title' => 'la_col_VisitDate', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'IPAddress' => Array ( 'title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 130, ),
'Referer' => Array ( 'title' => 'la_col_Referer', 'data_block' => 'grid_referer_td', 'filter_block' => 'grid_like_filter', 'width' => 250, ),
'UserName' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'AffiliateUser' => Array ('data_block' => 'grid_userlink_td', 'user_field' => 'AffiliatePortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 105, ),
'OrderTotalAmountSum' => Array ( 'title' => 'la_col_OrderTotal', 'filter_block' => 'grid_range_filter', 'width' => 95, ),
'OrderAffiliateCommissionSum' => Array ( 'title' => 'la_col_Commission', 'filter_block' => 'grid_range_filter', 'width' => 160, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/categories/categories_config.php
===================================================================
--- branches/5.2.x/core/units/categories/categories_config.php (revision 14725)
+++ branches/5.2.x/core/units/categories/categories_config.php (revision 14726)
@@ -1,518 +1,518 @@
<?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' => 'c',
'ItemClass' => Array ('class' => 'CategoriesItem', 'file' => 'categories_item.php', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'CategoriesEventHandler', 'file' => 'categories_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'CategoriesTagProcessor', 'file' => 'categories_tag_processor.php', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
Array ('pseudo' => 'kPermCacheUpdater', 'class' => 'kPermCacheUpdater', 'file' => 'cache_updater.php', 'build_event' => ''),
),
'ConfigPriority' => 0,
'Hooks' => Array (
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'adm', //self
'HookToSpecial' => '*',
'HookToEvent' => Array('OnRebuildThemes'),
'DoPrefix' => '',
'DoSpecial' => '',
'DoEvent' => 'OnAfterRebuildThemes',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'rel',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'img',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
),
'AutoLoad' => true,
'CatalogItem' => true,
'AdminTemplatePath' => 'categories',
'AdminTemplatePrefix' => 'categories_',
'SearchConfigPostfix' => 'category',
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'AggregateTags' => Array (
Array (
'AggregateTo' => 'm',
'AggregatedTagName' => 'CategoryLink',
'LocalTagName' => 'CategoryLink',
),
),
'IDField' => 'CategoryId',
'StatusField' => Array ('Status'), // 'Status'
'TitleField' => 'Name',
'TitlePhrase' => 'la_Text_Category',
'ItemType' => 1, // used for custom fields only
'StatisticsInfo' => Array (
'pending' => Array (
'icon' => 'icon16_cat_pending.gif',
'label' => 'la_tab_Categories',
'js_url' => '#url#',
'url' => Array('t' => 'catalog/advanced_view', 'SetTab' => 'c', 'pass' => 'm,c.showall', 'c.showall_event' => 'OnSetFilterPattern', 'c.showall_filters' => 'show_active=0,show_pending=1,show_disabled=0,show_new=1,show_pick=1'),
'status' => STATUS_PENDING,
),
),
'TableName' => TABLE_PREFIX.'Category',
'ViewMenuPhrase' => 'la_text_Categories',
'CatalogTabIcon' => 'icon16_sections.png',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('c' => '!la_title_Adding_Category!'),
'edit_status_labels' => Array ('c' => '!la_title_Editing_Category!'),
'new_titlefield' => Array ('c' => '!la_title_New_Category!'),
),
'category_list' => Array ('prefixes' => Array ('c_List'), 'format' => "!la_title_Categories! (#c_recordcount#)"),
'catalog' => Array (
'prefixes' => Array (), 'format' => "<span id='category_path'>!la_title_Categories!</span>",
'toolbar_buttons' => Array ('select', 'cancel', 'upcat', 'homecat', 'new_cat', 'new_link', 'new_article', 'new_topic', 'new_product', 'edit', 'delete', 'new_listing', 'approve', 'decline', 'cut', 'copy', 'paste', 'move_up', 'move_down', 'tools', 'view', 'dbl-click')
),
'advanced_view' => Array (
'prefixes' => Array (), 'format' => "!la_title_AdvancedView!",
'toolbar_buttons' => Array ('select', 'cancel', 'new_cat', 'new_link', 'new_article', 'new_topic', 'new_product', 'edit', 'delete', 'new_listing', 'approve', 'decline', 'view', 'dbl-click'),
),
'reviews' => Array (
'prefixes' => Array (), 'format' => "!la_title_Reviews!",
'toolbar_buttons' => Array ('edit', 'delete', 'approve', 'decline', 'view', 'dbl-click',)
),
'review_edit' => Array ('prefixes' => Array (), 'format' => "!la_title_Editing_Review!"),
'categories_edit' => Array (
'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_General!",
),
'categories_properties' => Array (
'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Properties!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'categories_relations' => Array (
'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Relations!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
),
'categories_related_searches' => Array (
'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_RelatedSearches!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'approve', 'decline', 'view', 'dbl-click'),
),
'categories_images' => Array (
'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Images!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'move_up', 'move_down', 'primary_image', 'view', 'dbl-click'),
),
'categories_permissions' => Array (
'prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Permissions!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'categories_custom' => Array ('prefixes' => Array ('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_Custom!"),
'categories_update' => Array ('prefixes' => Array (), 'format' => "!la_title_UpdatingCategories!"),
'images_edit' => Array (
'prefixes' => Array ('c', 'c-img'),
'new_status_labels' => Array ('c-img' => '!la_title_Adding_Image!'),
'edit_status_labels' => Array ('c-img' => '!la_title_Editing_Image!'),
'new_titlefield' => Array ('c-img' => ''),
'format' => "#c_status# '#c_titlefield#' - #c-img_status# '#c-img_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'relations_edit' => Array (
'prefixes' => Array ('c', 'c-rel'),
'new_status_labels' => Array ('c-rel' => "!la_title_Adding_Relationship! '!la_title_New_Relationship!'"),
'edit_status_labels' => Array ('c-rel' => '!la_title_Editing_Relationship!'),
'format' => "#c_status# '#c_titlefield#' - #c-rel_status#",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'related_searches_edit' => Array (
'prefixes' => Array ('c', 'c-search'),
'new_status_labels' => Array ('c-search' => "!la_title_Adding_RelatedSearch_Keyword!"),
'edit_status_labels' => Array ('c-search' => '!la_title_Editing_RelatedSearch_Keyword!'),
'format' => "#c_status# '#c_titlefield#' - #c-search_status#",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'edit_content' => Array ('format' => '!la_EditingContent!'),
'tree_site' => Array ('format' => '!la_selecting_categories!'),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'categories/categories_edit', 'priority' => 1),
'properties' => Array ('title' => 'la_tab_Properties', 't' => 'categories/categories_edit_properties', 'priority' => 2),
'relations' => Array ('title' => 'la_tab_Relations', 't' => 'categories/categories_edit_relations', 'priority' => 3),
'related_searches' => Array ('title' => 'la_tab_Related_Searches', 't' => 'categories/categories_edit_related_searches', 'priority' => 4),
'images' => Array ('title' => 'la_tab_Images', 't' => 'categories/categories_edit_images', 'priority' => 5),
'permissions' => Array ('title' => 'la_tab_Permissions', 't' => 'categories/categories_edit_permissions', 'priority' => 6),
'custom' => Array ('title' => 'la_tab_Custom', 't' => 'categories/categories_edit_custom', 'priority' => 7),
),
),
'PermItemPrefix' => 'CATEGORY',
'PermSection' => Array ('main' => 'CATEGORY:in-portal:categories', /*'search' => 'in-portal:configuration_search',*/ 'custom' => 'in-portal:configuration_custom'),
'Sections' => Array (
'in-portal:configure_categories' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_output',
'label' => 'la_tab_ConfigOutput',
'url' => Array ('t' => 'config/config_universal', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 11.1,
'type' => stTREE,
),
'in-portal:configuration_search' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_search',
'label' => 'la_tab_ConfigSearch',
'url' => Array ('t' => 'config/config_search', 'module_key' => 'category', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 11.2,
'type' => stTREE,
),
'in-portal:configuration_custom' => Array (
'parent' => 'in-portal:website_setting_folder',
'icon' => 'conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 1, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 11.3,
'type' => stTREE,
),
),
'FilterMenu' => Array (
'Groups' => Array (
Array ('mode' => 'AND', 'filters' => Array ('show_new'), 'type' => kDBList::HAVING_FILTER),
Array ('mode' => 'AND', 'filters' => Array ('show_pick'), 'type' => kDBList::WHERE_FILTER),
),
'Filters' => Array (
'show_new' => Array ('label' => 'la_Text_New', 'on_sql' => '', 'off_sql' => '`IsNew` != 1'),
'show_pick' => Array ('label' => 'la_prompt_EditorsPick', 'on_sql' => '', 'off_sql' => '`EditorsPick` != 1'),
)
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1
LEFT JOIN '.TABLE_PREFIX.'PermCache ON '.TABLE_PREFIX.'PermCache.CategoryId = %1$s.CategoryId
LEFT JOIN '.TABLE_PREFIX.'%3$sCategoryCustomData cust ON %1$s.ResourceId = cust.ResourceId',
'-virtual' => 'SELECT %1$s.* %2$s FROM %1$s',
),
'SubItems' => Array ('c-rel', 'c-search','c-img', 'c-cdata', 'c-perm', 'content'),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Priority' => 'desc', 'Name' => 'asc'),
)
),
'CalculatedFields' => Array (
'' => Array (
'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')",
'AltName' => 'img.AltName',
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
),
'-virtual' => Array (),
),
'CacheModRewrite' => true,
'Fields' => Array (
'CategoryId' => Array ('type' => 'int', 'not_null' => 1,'default' => 0),
'Type' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Virtual', 2 => 'la_opt_Template'), 'use_phrases' => 1,
'not_null' => 1,'default' => 1
),
'SymLinkCategoryId' => Array ('type' => 'int', 'default' => NULL),
'ParentId' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'not_null' => 1,'default' => 0, 'required' => 1),
'Name' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''),
'Filename' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'AutomaticFilename' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'default' => 1, 'not_null' => 1,
),
'Description' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'using_fck' => 1, 'default' => null),
'CreatedOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
'EditorsPick' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'default' => 0, 'not_null' => 1,
),
'Status' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'default' => 0),
'MetaKeywords' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'CachedDescendantCatsQty' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CachedNavbar' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
+ 'CreatedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
'ResourceId' => Array ('type' => 'int', 'default' => null),
'ParentPath' => Array ('type' => 'string', 'default' => null),
'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'TreeRight' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'NamedParentPath' => Array ('type' => 'string', 'default' => null),
'MetaDescription' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'HotItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'NewItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Modified' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
+ 'ModifiedById' => Array ('type' => 'int', 'formatter' => 'kLEFTFormatter', 'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'), 'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
'CachedTemplate' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
// fields from Pages
'Template' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT CONCAT(tf.Description, " :: ", FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName) ) AS Title,
IF(tf.TemplateAlias <> "", tf.TemplateAlias, CONCAT(FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName))) AS Value
FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
LEFT JOIN ' . TABLE_PREFIX . 'Theme AS t ON t.ThemeId = tf.ThemeId
WHERE (t.Enabled = 1) AND (tf.FileName NOT LIKE "%%.elm.tpl") AND (tf.FileName NOT LIKE "%%.des.tpl") AND (tf.FilePath = "/designs")
ORDER BY tf.Description ASC, tf.FileName ASC',
'option_key_field' => 'Value', 'option_title_field' => 'Title',
'error_msgs' => Array (
'no_inherit' => '!la_error_NoInheritancePossible!',
),
'required' => 1, 'not_null' => 1, 'default' => CATEGORY_TEMPLATE_INHERIT
),
'UseExternalUrl' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'UseMenuIconUrl' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'MenuIconUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'Title' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => '', 'not_null'=>1),
'MenuTitle' => Array ('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'default' => ''),
'MetaTitle' => Array ('type' => 'string', 'default' => null),
'IndexTools' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => null),
'IsMenu' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Show', 0 => 'la_Hide'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
'Protected' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'FormId' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array ('' => ''),
'options_sql' => 'SELECT Title, FormId FROM '.TABLE_PREFIX.'Forms ORDER BY Title',
'option_key_field' => 'FormId', 'option_title_field' => 'Title',
'default' => NULL
),
'FormSubmittedTemplate' => Array ('type' => 'string', 'default' => null),
'FriendlyURL' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'EnablePageCache' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'OverridePageCacheKey' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
'DirectLinkEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
),
'VirtualFields' => Array (
'CurrentSort' => Array('type' => 'string', 'default' => ''),
'IsNew' => Array('type' => 'int', 'default' => 0),
'OldPriority' => Array('type' => 'int', 'default' => 0),
// for primary image
'AltName' => Array('type' => 'string', 'default' => ''),
'SameImages' => Array('type' => 'string', 'default' => ''),
'LocalThumb' => Array('type' => 'string', 'default' => ''),
'ThumbPath' => Array('type' => 'string', 'default' => ''),
'ThumbUrl' => Array('type' => 'string', 'default' => ''),
'LocalImage' => Array('type' => 'string', 'default' => ''),
'LocalPath' => Array('type' => 'string', 'default' => ''),
'FullUrl' => Array('type' => 'string', 'default' => ''),
),
'Grids' => Array(
'Default' => Array (
'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
'default' => 'icon_section.png',
'1_0_0' => 'icon16_section_system.png', // system
'1_0_1' => 'icon16_section_system.png', // system
'1_1_1' => 'icon16_section_system.png', // system
'0_0_0' => 'icon16_section_disabled.png', // disabled
'0_0_1' => 'icon16_section_disabled.png', // disabled
'0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
'0_2_0' => 'icon16_section_pending.png', // pending
'0_2_1' => 'icon16_section_pending.png', // pending
'NEW' => 'icon16_section_new.png', // section is new
),
'Fields' => Array(
'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
'Radio' => Array (
'Selector' => 'radio',
'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
'default' => 'icon_section.png',
'1_0_0' => 'icon16_section_system.png', // system
'1_0_1' => 'icon16_section_system.png', // system
'1_1_1' => 'icon16_section_system.png', // system
'0_0_0' => 'icon16_section_disabled.png', // disabled
'0_0_1' => 'icon16_section_disabled.png', // disabled
'0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
'0_2_0' => 'icon16_section_pending.png', // pending
'0_2_1' => 'icon16_section_pending.png', // pending
'NEW' => 'icon16_section_new.png', // section is new
),
'Fields' => Array(
'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
'Structure' => Array (
'Icons' => Array( // 'StatusField' => Array ('Type', 'Status', 'IsMenu'), // 'Status'
'default' => 'icon_section.png',
'1_0_0' => 'icon16_section_system.png', // system
'1_0_1' => 'icon16_section_system.png', // system
'1_1_1' => 'icon16_section_system.png', // system
'0_0_0' => 'icon16_section_disabled.png', // disabled
'0_0_1' => 'icon16_section_disabled.png', // disabled
'0_1_0' => 'icon16_section_menuhidden.png', // hidden from menu
'0_2_0' => 'icon16_section_pending.png', // pending
'0_2_1' => 'icon16_section_pending.png', // pending
'NEW' => 'icon16_section_new.png', // section is new
),
'Fields' => Array(
'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Priority' => Array ('filter_block' => 'grid_options_filter', 'width' => 65),
'IsMenu' => Array ('title' => 'la_col_InMenu', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'Type' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
),
'ConfigMapping' => Array (
'PerPage' => 'Perpage_Category',
'ShortListPerPage' => 'Perpage_Category_Short',
'DefaultSorting1Field' => 'Category_Sortfield',
'DefaultSorting2Field' => 'Category_Sortfield2',
'DefaultSorting1Dir' => 'Category_Sortorder',
'DefaultSorting2Dir' => 'Category_Sortorder2',
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/statistics/statistics_config.php
===================================================================
--- branches/5.2.x/core/units/statistics/statistics_config.php (revision 14725)
+++ branches/5.2.x/core/units/statistics/statistics_config.php (revision 14726)
@@ -1,80 +1,80 @@
<?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' => 'stat',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array('class' => 'StatisticsEventHandler', 'file' => 'statistics_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array('class' => 'StatisticsTagProcessor', 'file' => 'statistics_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'StatItemId',
'TitleField' => 'ListLabel',
'TitlePresets' => Array (
'statistics_list' => Array (
'prefixes' => Array ('stat_List'), 'format' => "!la_title_Statistics!",
),
),
'TableName' => TABLE_PREFIX.'StatItem',
'ListSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
'ItemSQLs' => Array('' => 'SELECT %1$s.* %2$s FROM %1$s'),
'ListSortings' => Array(
'' => Array(
'Sorting' => Array('Priority' => 'asc'),
)
),
'Fields' => Array(
'StatItemId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Module' => Array('type' => 'string','not_null' => '1','default' => ''),
'ValueSQL' => Array('type' => 'string','default' => null),
'ResetSQL' => Array('type' => 'string','default' => null),
'ListLabel' => Array('type' => 'string','not_null' => 1, 'default' => ''),
'Priority' => Array('type' => 'int','not_null' => 1, 'default' => 0),
'AdminSummary' => Array('type' => 'int','not_null' => 1, 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array('default' => 'icon16_item.png'),
'Fields' => Array(
- 'Login' => Array('title' => 'column:la_fld_Username', 'data_block' => 'grid_checkbox_td'),
+ 'Username' => Array('data_block' => 'grid_checkbox_td'),
'LastName' => Array(),
'FirstName' => Array(),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/mailing_lists/mailing_lists_config.php
===================================================================
--- branches/5.2.x/core/units/mailing_lists/mailing_lists_config.php (revision 14725)
+++ branches/5.2.x/core/units/mailing_lists/mailing_lists_config.php (revision 14726)
@@ -1,145 +1,145 @@
<?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' => 'mailing-list',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'MailingListEventHandler', 'file' => 'mailing_list_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'MailingListTagProcessor', 'file' => 'mailing_list_tp.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'RegularEvents' => Array (
'generate_mailing_queue' => Array ('EventName' => 'OnGenerateEmailQueue', 'RunInterval' => 1800, 'Type' => reAFTER),
'process_mailing_queue' => Array ('EventName' => 'OnProcessEmailQueue', 'RunInterval' => 1800, 'Type' => reAFTER),
),
'IDField' => 'MailingId',
'TableName' => TABLE_PREFIX . 'MailingLists',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('mailing-list' => '!la_title_AddingMailingList!'),
'edit_status_labels' => Array ('mailing-list' => '!la_title_ViewingMailingList!'),
),
'mailing_list_list' => Array (
'prefixes' => Array ('mailing-list_List'), 'format' => "!la_title_MailingLists!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'primary_theme', 'clone', 'view', 'dbl-click'),
),
'mailing_list_edit' => Array (
'prefixes' => Array ('mailing-list'), 'format' => "#mailing-list_status#",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'PermSection' => Array('main' => 'in-portal:mailing_lists'),
'Sections' => Array (
'in-portal:mailing_folder' => Array (
'parent' => 'in-portal:users',
'icon' => 'mailing_list',
'label' => 'la_title_MailingLists',
'use_parent_header' => 1,
'permissions' => Array (),
'priority' => 5,
'type' => stTREE,
),
'in-portal:mailing_lists' => Array (
'parent' => 'in-portal:mailing_folder',
'icon' => 'mailing_list',
'label' => 'la_title_MailingLists',
'url' => Array('t' => 'mailing_lists/mailing_list_list', 'pass' => 'm'),
'permissions' => Array('view', 'add', 'edit', 'delete'),
'priority' => 5.1, // <parent_priority>.<own_priority>, because this section replaces parent in tree
'type' => stTAB,
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('MailingId' => 'desc'),
)
),
'Fields' => Array (
'MailingId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PortalUserId' => Array(
'type' => 'int',
'formatter' => 'kLEFTFormatter',
'options' => Array (USER_ROOT => 'root'),
- 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login',
+ 'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username',
'required' => 1, 'not_null' => 1, 'default' => USER_ROOT,
),
'To' => Array ('type' => 'string', 'required' => 1, 'default' => NULL),
'ToParsed' => Array ('type' => 'string', 'default' => NULL),
'Attachments' => Array (
'type' => 'string',
'formatter' => 'kUploadFormatter', 'upload_dir' => ITEM_FILES_PATH, 'max_size' => 50000000,
'multiple' => 10, 'direct_links' => true, 'file_types' => '*.*', 'files_description' => '!la_hint_AllFiles!',
'default' => NULL
),
'Subject' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
'MessageText' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'MessageHtml' => Array ('type' => 'string', 'formatter' => 'kFormatter', 'using_fck' => 1, 'default' => NULL),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_NotProcessed', 2 => 'la_opt_PartiallyProcessed', 3 => 'la_opt_Processed', 4 => 'la_opt_Cancelled'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => 1
),
'EmailsQueued' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'EmailsSent' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'EmailsTotal' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'MailingId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'Subject' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
'MessageText' => Array ('filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, ),
'MessageHtml' => Array ('title' => 'la_col_MessageHtml', 'filter_block' => 'grid_like_filter', 'cut_first' => 100, 'width' => 120, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
'EmailsQueued' => Array ('filter_block' => 'grid_range_filter', 'width' => 80, ),
'EmailsSent' => Array ('filter_block' => 'grid_range_filter', 'width' => 80, ),
'EmailsTotal' => Array ('filter_block' => 'grid_range_filter', 'width' => 80, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/structure/structure_config.php
===================================================================
--- branches/5.2.x/core/units/structure/structure_config.php (revision 14725)
+++ branches/5.2.x/core/units/structure/structure_config.php (revision 14726)
@@ -1,272 +1,272 @@
<?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' => 'st',
'ItemClass' => Array('class'=>'CategoriesItem','file'=>'structure_item.php', 'build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'CategoriesEventHandler','file'=>'structure_eh.php', 'build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'CategoriesTagProcessor','file'=>'structure_tp.php', 'build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'ConfigPriority' => 0,
'Hooks' => Array(
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'rel',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'img',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
),
'IDField' => 'CategoryId',
'StatusField' => Array('Status'),
'TitleField' => 'Name', // field, used in bluebar when editing existing item
'TableName' => TABLE_PREFIX.'Category',
'TitlePresets' => Array(
'default' => Array( 'new_status_labels' => Array('st'=>'!la_title_Adding_Category!'),
'edit_status_labels' => Array('st'=>'!la_title_Editing_Category!'),
'new_titlefield' => Array('st'=>'!la_title_New_Category!'),
),
'structure_list' => Array(
'prefixes' => Array('st_List', 'st.current'),
'format' => "!la_title_Structure! - '#st.current_Name#'"
),
'structure_edit' => Array(
'prefixes' => Array('st'),
'format' => "#st_status# '#st_titlefield#'",
),
'edit_content' => array('format' => '!la_EditingContent!'),
/* 'categories_edit' => Array('prefixes' => Array('c'), 'format' => "#c_status# '#c_titlefield#' - !la_title_General!"),*/
),
'PermItemPrefix' => 'CATEGORY',
'PermSection' => Array('main' => 'CATEGORY:in-portal:structure', 'email' => 'in-portal:configemail'),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PermCache ON '.TABLE_PREFIX.'PermCache.CategoryId = %1$s.CategoryId',
'-virtual' => 'SELECT %1$s.* %2$s FROM %1$s',
),
'SubItems' => Array('content'),
'ListSortings' => Array(
'' => Array(
'ForcedSorting' => Array('Priority' => 'desc'),
'Sorting' => Array('Name' => 'asc'),
)
),
'CalculatedFields' => Array(
'' => Array(
'CurrentSort' => "REPLACE(ParentPath, CONCAT('|', ".'%1$s'.".CategoryId, '|'), '')",
),
'-virtual' => Array (),
),
'Fields' => Array (
'CategoryId' => Array('type' => 'int', 'not_null' => 1,'default' => 0),
'Type' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_opt_Virtual', 2 => 'la_opt_Template'), 'use_phrases' => 1,
'not_null' => 1,'default' => 1
),
'SymLinkCategoryId' => Array ('type' => 'int', 'default' => NULL),
'ParentId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (), 'not_null' => 1,'default' => 0, 'required'=>1),
'Name' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'required' => 1, 'default' => ''),
'Filename' => Array('type' => 'string', 'not_null' => 1, 'default' => '', 'required' => 1),
'AutomaticFilename' => Array('type' => 'int', 'not_null' => 1, 'default' => 1),
'Description' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
'CreatedOn' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'required' => 1, 'default' => '#NOW#'),
'EditorsPick' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Active', 2 => 'la_Pending', 0 => 'la_Disabled' ), 'use_phrases' => 1, 'not_null' => 1,'default' => 1),
'Priority' => Array('type' => 'int', 'not_null' => 1, 'formatter' => 'kOptionsFormatter', 'options' => array(), 'required' => 1, 'default' => 0),
'MetaKeywords' => Array('type' => 'string', 'default' => null),
'CachedDescendantCatsQty' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'CachedNavbar' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => null),
- 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
+ 'CreatedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
'ResourceId' => Array('type' => 'int', 'default' => null),
'ParentPath' => Array('type' => 'string', 'default' => null),
'TreeLeft' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'TreeRight' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'NamedParentPath' => Array('type' => 'string', 'default' => null),
'MetaDescription' => Array('type' => 'string', 'default' => null),
'HotItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'NewItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'PopItem' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (2 => 'la_Auto', 1 => 'la_Always', 0 => 'la_Never'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 2),
'Modified' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => '#NOW#'),
- 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Login', 'default' => NULL),
+ 'ModifiedById' => Array('type' => 'int', 'formatter' => 'kLEFTFormatter', 'options' => Array(USER_ROOT => 'root', USER_GUEST => 'Guest'),'left_sql'=>'SELECT %s FROM '.TABLE_PREFIX.'PortalUser WHERE `%s` = \'%s\'', 'left_key_field' => 'PortalUserId', 'left_title_field' => 'Username', 'default' => NULL),
'CachedTemplate' => Array('type' => 'string', 'not_null' => 1, 'default' => ''),
// fields from Pages
'Template' => Array (
'type' => 'string',
'formatter' => 'kOptionsFormatter', 'options_sql' => ' SELECT CONCAT(tf.Description, " (", TRIM(TRAILING ".des" FROM TRIM(TRAILING ".tpl" FROM FileName) ), ")") AS Title,
CONCAT(FilePath, "/", TRIM(TRAILING ".tpl" FROM FileName)) AS Value
FROM ' . TABLE_PREFIX . 'ThemeFiles AS tf
LEFT JOIN ' . TABLE_PREFIX . 'Theme AS t ON t.ThemeId = tf.ThemeId
WHERE (t.Enabled = 1) AND (tf.FileName NOT LIKE "%%.elm.tpl") AND (tf.FileName NOT LIKE "%%.des.tpl") AND (tf.FilePath = "/designs")',
'option_key_field' => 'Value', 'option_title_field' => 'Title',
'not_null' => 1, 'default' => CATEGORY_TEMPLATE_INHERIT
),
'UseExternalUrl' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'ExternalUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'UseMenuIconUrl' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_No', 1 => 'la_Yes'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'MenuIconUrl' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'Title' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'default' => '', 'not_null'=>1),
'MenuTitle' => Array('type' => 'string', 'formatter' => 'kMultiLanguage', 'not_null' => 1, 'default' => ''),
'MetaTitle' => Array('type' => 'string', 'default' => null),
'IndexTools' => Array('type' => 'string','default' => null),
'IsMenu' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Show', 0 => 'la_Hide'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 1),
'Protected' => Array ('type' => 'int', 'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1, 'not_null' => 1, 'default' => 0),
'FormId' => Array('type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => array('' => ''),
'options_sql' => 'SELECT Title, FormId FROM '.TABLE_PREFIX.'Forms ORDER BY Title',
'option_key_field' => 'FormId', 'option_title_field' => 'Title', 'default' => NULL),
'FormSubmittedTemplate' => Array('type' => 'string', 'default' => null),
'FriendlyURL' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'ThemeId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'EnablePageCache' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'OverridePageCacheKey' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'PageCacheKey' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'default' => ''),
'PageExpiration' => Array ('type' => 'int', 'default' => NULL),
'DirectLinkEnabled' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'DirectLinkAuthKey' => Array ('type' => 'string', 'max_len' => 20, 'not_null' => 1, 'default' => '')
),
'VirtualFields' => Array(
'CurrentSort' => Array('type' => 'string', 'default' => ''),
'IsNew' => Array('type' => 'int', 'default' => 0),
'OldPriority' => Array('type' => 'int', 'default' => 0),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array(1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
'Fields' => Array(
'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Path' => Array ('title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ),
'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
'Radio' => Array(
'Icons' => Array(1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
'Selector' => 'radio',
'Fields' => Array(
'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_radio_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Path' => Array ('title'=>'la_col_Path', 'data_block' => 'page_entercat_td', 'filter_block' => 'grid_like_filter' ),
'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
'AllPages' => Array(
'Icons' => Array(1 => 'icon16_folder.gif', 0 => 'icon16_folder-red.gif'),
'Fields' => Array(
'CategoryId' => Array ('title'=>'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 55),
'Name' => Array ('title'=>'column:la_fld_PageTitle', 'data_block' => 'page_browse_td', 'filter_block' => 'grid_like_filter', 'width' => 250),
'Path' => Array ('title'=>'la_col_Path', 'data_block' => 'page_path_td', 'sort_field' => 'CachedNavbar', 'filter_block' => 'grid_like_filter' ),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 170),
'Template' => Array ('title' => 'column:la_fld_TemplateType', 'filter_block' => 'grid_options_filter', 'width' => 220),
'IsMenu' => Array ('title' => 'la_col_Visible', 'filter_block' => 'grid_options_filter', 'width' => 70),
'Protected' => Array ('filter_block' => 'grid_options_filter', 'width' => 100),
),
),
),
'ConfigMapping' => Array(
'PerPage' => 'Perpage_Category',
'ShortListPerPage' => 'Perpage_Category_Short',
'DefaultSorting1Field' => 'Category_Sortfield',
'DefaultSorting2Field' => 'Category_Sortfield2',
'DefaultSorting1Dir' => 'Category_Sortorder',
'DefaultSorting2Dir' => 'Category_Sortorder2',
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/users/users_tag_processor.php
===================================================================
--- branches/5.2.x/core/units/users/users_tag_processor.php (revision 14725)
+++ branches/5.2.x/core/units/users/users_tag_processor.php (revision 14726)
@@ -1,302 +1,302 @@
<?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 UsersTagProcessor extends kDBTagProcessor
{
function LogoutLink($params)
{
$pass = Array('pass' => 'all,m,u', 'u_event' => 'OnLogout', 'm_cat_id' => 0);
$logout_template = $this->SelectParam($params, 'template,t');
return $this->Application->HREF($logout_template, '', $pass);
}
function UseUsernames($params)
{
return $this->Application->ConfigValue('Email_As_Login') != 1;
}
function RegistrationEnabled($params)
{
return $this->Application->ConfigValue('User_Allow_New') != 2;
}
function SuggestRegister($params)
{
return !$this->Application->LoggedIn() && !$this->Application->ConfigValue('Comm_RequireLoginBeforeCheckout') && $this->RegistrationEnabled($params);
}
function ConfirmPasswordLink($params)
{
$user =& $this->Application->recallObject($this->Prefix . '.email-to');
/* @var $user UsersItem */
$code = $this->getCachedCode();
$user->SetDBField('PwResetConfirm', $code);
$user->SetDBField('PwRequestTime_date', adodb_mktime());
$user->SetDBField('PwRequestTime_time', adodb_mktime());
if ( $user->GetChangedFields() ) {
// tag is called 2 times within USER.PWDC email event, so don't update user record twice
$user->Update();
}
$params['user_key'] = $code;
if ( !$this->SelectParam($params, 'template,t') ) {
$params['template'] = $this->Application->GetVar('reset_confirm_template');
}
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
/**
* Generates & caches code for password confirmation link
*
* @return string
*/
function getCachedCode()
{
static $code = null;
if ( !isset($code) ) {
$code = md5($this->GenerateCode());
}
return $code;
}
function GenerateCode()
{
list($usec, $sec) = explode(" ",microtime());
$id_part_1 = substr($usec, 4, 4);
$id_part_2 = mt_rand(1,9);
$id_part_3 = substr($sec, 6, 4);
$digit_one = substr($id_part_1, 0, 1);
if ($digit_one == 0) {
$digit_one = mt_rand(1,9);
$id_part_1 = preg_replace('/^0/', '', $id_part_1);
$id_part_1=$digit_one.$id_part_1;
}
return $id_part_1.$id_part_2.$id_part_3;
}
function TestCodeIsValid($params)
{
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$code_type = isset($params['code_type']) ? $params['code_type'] : 'forgot_password';
$expiration_timeout = isset($params['expiration_timeout']) ? $params['expiration_timeout'] : null;
$user_id = $user_helper->validateUserCode($this->Application->GetVar('user_key'), $code_type, $expiration_timeout);
if ( !is_numeric($user_id) ) {
// used for error reporting only -> rewrite code + theme (by Alex)
$object =& $this->getObject( Array('skip_autoload' => true) ); // TODO: change theme too
/* @var $object UsersItem */
$object->SetError('PwResetConfirm', $user_id, $this->_getUserCodeErrorMsg($user_id, $code_type, $params));
return false;
}
return true;
}
/**
* Returns error message set by given code type
*
* @param string $error_code
* @param string $code_type
* @param Array $params
* @return string
*/
function _getUserCodeErrorMsg($error_code, $code_type, $params)
{
$error_messages = Array (
'forgot_password' => Array (
'code_is_not_valid' => 'lu_code_is_not_valid',
'code_expired' => 'lu_code_expired',
),
'activation' => Array (
'code_is_not_valid' => 'lu_error_ActivationCodeNotValid',
'code_expired' => 'lu_error_ActivationCodeExpired',
),
);
if ($code_type == 'custom') {
// custom error messages are given directly in tag
$error_messages[$code_type] = Array (
'code_is_not_valid' => $params['error_invalid'],
'code_expired' => $params['error_expired'],
);
}
return $error_messages[$code_type][$error_code];
}
/**
* Returns sitem administrator email
*
* @param Array $params
* @return string
*/
function SiteAdminEmail($params)
{
return $this->Application->ConfigValue('Smtp_AdminMailFrom');
}
/**
* Returns login name of user
*
* @param Array $params
* @return string
* @access protected
*/
protected function LoginName($params)
{
$object =& $this->getObject($params);
/* @var $object UsersItem */
- return $object->GetID() != USER_ROOT ? $object->GetDBField('Login') : 'root';
+ return $object->GetID() != USER_ROOT ? $object->GetDBField('Username') : 'root';
}
function CookieUsername($params)
{
$items_info = $this->Application->GetVar( $this->getPrefixSpecial(true) );
if ( $items_info !== false ) {
return $items_info[USER_GUEST][ $params['field'] ];
}
$username = $this->Application->GetVar('save_username'); // from cookie
if ($username == 'super-root') {
$username = 'root';
}
return $username === false ? '' : $username;
}
/**
* Checks if user have one of required permissions
*
* @param Array $params
* @return bool
*/
function HasPermission($params)
{
$perm_helper =& $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
return $perm_helper->TagPermissionCheck($params);
}
/**
* Returns link to user public profile
*
* @param Array $params
* @return string
*/
function ProfileLink($params)
{
$object =& $this->getObject($params);
$params['user_id'] = $object->GetID();
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
function ImageSrc($params)
{
list ($ret, $tag_processed) = $this->processAggregatedTag('ImageSrc', $params, $this->getPrefixSpecial());
return $tag_processed ? $ret : false;
}
function LoggedIn($params)
{
static $loggedin_status = Array ();
$object =& $this->getObject($params);
/* @var $object kDBList */
if (!isset($loggedin_status[$this->Special])) {
$user_ids = $object->GetCol($object->IDField);
$sql = 'SELECT LastAccessed, '.$object->IDField.'
FROM '.TABLE_PREFIX.'UserSession
WHERE (PortalUserId IN ('.implode(',', $user_ids).'))';
$loggedin_status[$this->Special] = $this->Conn->GetCol($sql, $object->IDField);
}
return isset($loggedin_status[$this->Special][$object->GetID()]);
}
/**
* Prints user activation link
*
* @param Array $params
* @return string
*/
function ActivationLink($params)
{
$object =& $this->getObject($params);
/* @var $object kDBItem */
$code = $this->getCachedCode();
$object->SetDBField('PwResetConfirm', $code);
$object->SetDBField('PwRequestTime_date', adodb_mktime());
$object->SetDBField('PwRequestTime_time', adodb_mktime());
$object->Update();
$params['user_key'] = $code;
return $this->Application->ProcessParsedTag('m', 'Link', $params);
}
/**
* Activates user using given code
*
* @param Array $params
*/
function ActivateUser($params)
{
$passed_key = trim($this->Application->GetVar('user_key'));
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$user =& $user_helper->getUserObject();
$user->Load($passed_key, 'PwResetConfirm');
if ( !$user->isLoaded() ) {
return ;
}
$user->SetDBField('Status', STATUS_ACTIVE);
$user->SetDBField('PwResetConfirm', '');
$user->SetDBField('PwRequestTime_date', NULL);
$user->SetDBField('PwRequestTime_time', NULL);
$user->Update();
if ( $user_helper->checkLoginPermission() ) {
$user_helper->loginUserById( $user->GetID() );
}
}
}
\ No newline at end of file
Index: branches/5.2.x/core/units/users/users_event_handler.php
===================================================================
--- branches/5.2.x/core/units/users/users_event_handler.php (revision 14725)
+++ branches/5.2.x/core/units/users/users_event_handler.php (revision 14726)
@@ -1,1796 +1,1796 @@
<?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 UsersEventHandler extends kDBEventHandler
{
/**
* Allows to override standard permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
// admin
'OnSetPersistantVariable' => Array('self' => 'view'), // because setting to logged in user only
'OnUpdateRootPassword' => Array('self' => true),
'OnUpdatePassword' => Array('self' => true),
'OnSaveSelected' => Array ('self' => 'view'),
'OnGeneratePassword' => Array ('self' => 'view'),
// front
'OnRefreshForm' => Array('self' => true),
'OnForgotPassword' => Array('self' => true),
'OnSubscribeQuery' => Array('self' => true),
'OnSubscribeUser' => Array('self' => true),
'OnRecommend' => Array('self' => true),
'OnItemBuild' => Array('self' => true),
'OnMassResetSettings' => Array('self' => 'edit'),
'OnMassCloneUsers' => Array('self' => 'add'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Builds item (loads if needed)
*
* Pattern: Prototype Manager
*
* @param kEvent $event
* @access protected
*/
function OnItemBuild(&$event)
{
parent::OnItemBuild($event);
$object =& $event->getObject();
/* @var $object kDBItem */
if ( $event->Special == 'forgot' || $object->getFormName() == 'registration' ) {
$this->_makePasswordRequired($event);
}
}
/**
* Shows only admins when required
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
if ($event->Special == 'regular') {
$object->addFilter('primary_filter', '%1$s.UserType = ' . UserType::USER);
}
if ($event->Special == 'admins') {
$object->addFilter('primary_filter', '%1$s.UserType = ' . UserType::ADMIN);
}
if (!$this->Application->isAdminUser) {
$object->addFilter('status_filter', '%1$s.Status = '.STATUS_ACTIVE);
}
if ($event->Special == 'online') {
$object->addFilter('online_users_filter', 's.PortalUserId IS NOT NULL');
}
if ($event->Special == 'group') {
$group_id = $this->Application->GetVar('g_id');
if ($group_id !== false) {
// show only users, that user doesn't belong to current group
$sql = 'SELECT PortalUserId
FROM ' . $this->Application->GetTempName(TABLE_PREFIX.'UserGroup', 'prefix:g') . '
WHERE GroupId = ' . (int)$group_id;
$user_ids = $this->Conn->GetCol($sql);
if ($user_ids) {
$object->addFilter('already_member_filter', '%1$s.PortalUserId NOT IN (' . implode(',', $user_ids) . ')');
}
}
}
}
/**
* Checks user permission to execute given $event
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(&$event)
{
if ( $event->Name == 'OnLogin' || $event->Name == 'OnLogout' ) {
// permission is checked in OnLogin event directly
return true;
}
if ( $event->Name == 'OnResetRootPassword' ) {
return defined('DBG_RESET_ROOT') && DBG_RESET_ROOT;
}
if ( $event->Name == 'OnLoginAs' ) {
$admin_session =& $this->Application->recallObject('Session.admin');
/* @var $admin_session Session */
return $admin_session->LoggedIn();
}
if ( !$this->Application->isAdminUser ) {
$user_id = $this->Application->RecallVar('user_id');
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( $event->Name == 'OnCreate' && $user_id == USER_GUEST ) {
// "Guest" can create new users
return true;
}
if ( $event->Name == 'OnUpdate' && $user_id > 0 ) {
$user_dummy =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $user_dummy UsersItem */
foreach ($items_info as $id => $field_values) {
if ( $id != $user_id ) {
// registered users can update their record only
return false;
}
$user_dummy->Load($id);
$status_field = array_shift($this->Application->getUnitOption($event->Prefix, 'StatusField'));
if ( $user_dummy->GetDBField($status_field) != STATUS_ACTIVE ) {
// not active user is not allowed to update his record (he could not activate himself manually)
return false;
}
if ( isset($field_values[$status_field]) && $user_dummy->GetDBField($status_field) != $field_values[$status_field] ) {
// user can't change status by himself
return false;
}
}
return true;
}
if ( $event->Name == 'OnResetLostPassword' && $event->Special == 'forgot' && $user_id == USER_GUEST ) {
// non-logged in users can reset their password, when reset code is valid
return is_numeric($this->getPassedID($event));
}
if ( $event->Name == 'OnUpdate' && $user_id <= 0 ) {
// guests are not allowed to update their record, because they don't have it :)
return false;
}
}
return parent::CheckPermission($event);
}
/**
* Handles session expiration (redirects to valid template)
*
* @param kEvent $event
*/
function OnSessionExpire(&$event)
{
$this->Application->resetCounters('UserSession');
// place 2 of 2 (also in kHTTPQuery::getRedirectParams)
$admin_url_params = Array (
'm_cat_id' => 0, // category means nothing on admin login screen
'm_wid' => '', // remove wid, otherwise parent window may add wid to its name breaking all the frameset (for <a> targets)
'pass' => 'm', // don't pass any other (except "m") prefixes to admin session expiration template
'expired' => 1, // expiration mark to show special error on login screen
'no_pass_through' => 1, // this way kApplication::HREF won't add them again
);
if ($this->Application->isAdmin) {
$this->Application->Redirect('index', $admin_url_params, '', 'index.php');
}
if ($this->Application->GetVar('admin') == 1) {
// Front-End showed in admin's right frame
$session_admin =& $this->Application->recallObject('Session.admin');
/* @var $session_admin Session */
if (!$session_admin->LoggedIn()) {
// front-end session created from admin session & both expired
$this->Application->DeleteVar('admin');
$this->Application->Redirect('index', $admin_url_params, '', 'admin/index.php');
}
}
// Front-End session expiration
$get = $this->Application->HttpQuery->getRedirectParams();
$t = $this->Application->GetVar('t');
$get['js_redirect'] = $this->Application->ConfigValue('UseJSRedirect');
$this->Application->Redirect($t ? $t : 'index', $get);
}
/**
* [AGENT] Deletes expired sessions
*
* @param kEvent $event
*/
function OnDeleteExpiredSessions(&$event)
{
if (defined('IS_INSTALL') && IS_INSTALL) {
return ;
}
$this->Application->Session->DeleteExpired();
}
/**
* Checks user data and logs it in if allowed
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnLogin(&$event)
{
$object =& $event->getObject( Array ('form_name' => 'login') );
/* @var $object kDBItem */
$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
$username = $object->GetDBField('UserLogin');
$password = $object->GetDBField('UserPassword');
$remember_login = $object->GetDBField('UserRememberLogin') == 1;
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$user_helper->event =& $event;
$result = $user_helper->loginUser($username, $password, false, $remember_login);
if ($result != LoginResult::OK) {
$event->status = kEvent::erFAIL;
$object->SetError('UserLogin', $result == LoginResult::NO_PERMISSION ? 'no_permission' : 'invalid_password');
}
}
/**
* [HOOK] Auto-Logins Front-End user when "Remember Login" cookie is found
*
* @param kEvent $event
*/
function OnAutoLoginUser(&$event)
{
$remember_login_cookie = $this->Application->GetVar('remember_login');
if (!$remember_login_cookie || $this->Application->isAdmin || $this->Application->LoggedIn()) {
return ;
}
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$user_helper->loginUser('', '', false, false, $remember_login_cookie);
}
/**
* Called when user logs in using old in-portal
*
* @param kEvent $event
*/
function OnInpLogin(&$event)
{
$sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('LoginUser', $event->getEventParam('user'), $event->getEventParam('pass') );
if ($event->redirect && is_string($event->redirect)) {
// some real template specified instead of true
$this->Application->Redirect($event->redirect, $event->getRedirectParams());
}
}
/**
* Called when user logs in using old in-portal
*
* @param kEvent $event
*/
function OnInpLogout(&$event)
{
$sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('LogoutUser');
}
/**
* Performs user logout
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnLogout(&$event)
{
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$user_helper->event =& $event;
$user_helper->logoutUser();
}
/**
* Redirects user after successful registration to confirmation template (on Front only)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemCreate(&$event)
{
parent::OnAfterItemCreate($event);
$this->afterItemChanged($event);
$this->assignToPrimaryGroup($event);
}
/**
* Performs user registration
*
* @param kEvent $event
*/
function OnCreate(&$event)
{
if ( $this->Application->isAdmin ) {
parent::OnCreate($event);
return ;
}
$object =& $event->getObject( Array('form_name' => 'registration') );
/* @var $object UsersItem */
$field_values = $this->getSubmittedFields($event);
$user_email = getArrayValue($field_values, 'Email');
$subscriber_id = $user_email ? $this->getSubscriberByEmail($user_email) : false;
if ( $subscriber_id ) {
// update existing subscriber
$object->Load($subscriber_id);
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_NewGroup'));
$this->Application->SetVar($event->getPrefixSpecial(true), Array ($object->GetID() => $field_values));
}
$object->SetFieldsFromHash($field_values);
$status = $object->isLoaded() ? $object->Update() : $object->Create();
if ( !$status ) {
$event->status = kEvent::erFAIL;
$event->redirect = false;
$object->setID( (int)$object->GetID() );
}
$this->setNextTemplate($event, true);
if ( ($event->status == kEvent::erSUCCESS) && $event->redirect ) {
$this->assignToPrimaryGroup($event);
$object->SendEmailEvents();
$this->autoLoginUser($event);
}
}
/**
* Returns subscribed user ID by given e-mail address
*
* @param string $email
* @return int|bool
* @access protected
*/
protected function getSubscriberByEmail($email)
{
$verify_user =& $this->Application->recallObject('u.verify', null, Array ('skip_autoload' => true));
/* @var $verify_user UsersItem */
$verify_user->Load($email, 'Email');
return $verify_user->isLoaded() && $verify_user->isSubscriberOnly() ? $verify_user->GetID() : false;
}
/**
* Login user if possible, if not then redirect to corresponding template
*
* @param kEvent $event
*/
function autoLoginUser(&$event)
{
$object =& $event->getObject();
/* @var $object UsersItem */
$this->Application->SetVar('u.current_id', $object->GetID());
if ( $object->GetDBField('Status') == STATUS_ACTIVE ) {
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
if ( $user_helper->checkLoginPermission() ) {
$user_helper->loginUserById( $object->GetID() );
}
}
}
/**
* Set's new unique resource id to user
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
$this->beforeItemChanged($event);
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$object =& $event->getObject();
/* @var $object UsersItem */
if ( !$object->isSubscriberOnly() ) {
// don't checck state-to-country relations for subscribers
$cs_helper->CheckStateField($event, 'State', 'Country');
}
$this->_makePasswordRequired($event);
$cs_helper->PopulateStates($event, 'State', 'Country');
if ( $this->Application->ConfigValue('Email_As_Login') ) {
$error_msgs = $object->GetFieldOption('Email', 'error_msgs');
$error_msgs['unique'] = '!lu_user_and_email_already_exist!';
$object->SetFieldOption('Email', 'error_msgs', $error_msgs);
}
$this->setUserGroup($object);
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
if ( !$user_helper->checkBanRules($object) ) {
- $object->SetError('Login', 'banned');
+ $object->SetError('Username', 'banned');
}
$object->SetDBField('IPAddress', $_SERVER['REMOTE_ADDR']);
}
/**
* Sets primary group of the user
*
* @param kDBItem $object
*/
protected function setUserGroup(&$object)
{
if ($object->Special == 'subscriber') {
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_SubscriberGroup'));
return ;
}
// set primary group to user
if ( !$this->Application->isAdminUser ) {
$group_id = $object->GetDBField('PrimaryGroupId');
if ($group_id) {
// check, that group is allowed for Front-End
$sql = 'SELECT GroupId
FROM ' . TABLE_PREFIX . 'PortalGroup
WHERE GroupId = ' . (int)$group_id . ' AND FrontRegistration = 1';
$group_id = $this->Conn->GetOne($sql);
}
if (!$group_id) {
// when group not selected OR not allowed -> use default group
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_NewGroup'));
}
}
}
/**
* Assigns a user to it's primary group
*
* @param kEvent $event
*/
protected function assignToPrimaryGroup(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$primary_group_id = $object->GetDBField('PrimaryGroupId');
if ($primary_group_id) {
$ug_table = TABLE_PREFIX . 'UserGroup';
if ( $object->IsTempTable() ) {
$ug_table = $this->Application->GetTempName($ug_table, 'prefix:' . $event->Prefix);
}
$fields_hash = Array (
'PortalUserId' => $object->GetID(),
'GroupId' => $primary_group_id,
);
$this->Conn->doInsert($fields_hash, $ug_table, 'REPLACE');
}
}
/**
* 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());
}
}
/**
* Enter description here...
*
* @param kEvent $event
*/
function OnRecommend(&$event)
{
$object =& $event->getObject( Array ('form_name' => 'recommend') );
/* @var $object kDBItem */
$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
if ( !$object->ValidateField('RecommendEmail') ) {
$event->status = kEvent::erFAIL;
return ;
}
$send_params = Array (
'to_email' => $object->GetDBField('RecommendEmail'),
'to_name' => $object->GetDBField('RecommendEmail'),
);
$user_id = $this->Application->RecallVar('user_id');
$email_event =& $this->Application->EmailEventUser('USER.SUGGEST', $user_id, $send_params);
$email_event =& $this->Application->EmailEventAdmin('USER.SUGGEST');
if ( $email_event->status == kEvent::erSUCCESS ) {
$event->SetRedirectParam('pass', 'all');
$event->redirect = $this->Application->GetVar('template_success');
}
else {
$event->status = kEvent::erFAIL;
$object->SetError('RecommendEmail', 'send_error');
}
}
/**
* Saves address changes and mades no redirect
*
* @param kEvent $event
*/
function OnUpdateAddress(&$event)
{
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object kDBItem */
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( $items_info ) {
list ($id, $field_values) = each($items_info);
if ( $id > 0 ) {
$object->Load($id);
}
$object->SetFieldsFromHash($field_values);
$object->setID($id);
$object->Validate();
}
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'State', 'Country');
$event->redirect = false;
}
/**
* Validate subscriber's email & store it to session -> redirect to confirmation template
*
* @param kEvent $event
*/
function OnSubscribeQuery(&$event)
{
$object =& $event->getObject( Array ('form_name' => 'subscription') );
/* @var $object UsersItem */
$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
if ( !$object->ValidateField('SubscriberEmail') ) {
$event->status = kEvent::erFAIL;
return ;
}
$user_email = $object->GetDBField('SubscriberEmail');
$object->Load($user_email, 'Email');
$event->SetRedirectParam('subscriber_email', $user_email);
if ( $object->isLoaded() && $object->isSubscribed() ) {
$event->redirect = $this->Application->GetVar('unsubscribe_template');
}
else {
$event->redirect = $this->Application->GetVar('subscribe_template');
}
$event->SetRedirectParam('pass', 'm');
}
/**
* Subscribe/Unsubscribe user based on email stored in previous step
*
* @param kEvent $event
*/
function OnSubscribeUser(&$event)
{
$object =& $event->getObject( Array ('form_name' => 'subscription') );
/* @var $object UsersItem */
$user_email = $this->Application->GetVar('subscriber_email');
$object->SetDBField('SubscriberEmail', $user_email);
if ( !$object->ValidateField('SubscriberEmail') ) {
$event->status = kEvent::erFAIL;
return ;
}
$this->RemoveRequiredFields($object);
$object->Load($user_email, 'Email');
if ( $object->isLoaded() ) {
if ( $object->isSubscribed() ) {
if ( $event->getEventParam('no_unsubscribe') ) {
// for customization code from FormsEventHandler
return ;
}
if ( $object->isSubscriberOnly() ) {
$temp_handler =& $this->Application->recallObject($event->Prefix . '_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$temp_handler->DeleteItems($event->Prefix, '', Array($object->GetID()));
}
else {
$this->RemoveSubscriberGroup( $object->GetID() );
}
$event->redirect = $this->Application->GetVar('unsubscribe_ok_template');
}
else {
$this->AddSubscriberGroup($object);
$event->redirect = $this->Application->GetVar('subscribe_ok_template');
}
}
else {
$object->generatePassword();
$object->SetDBField('Email', $user_email);
- if ( $object->isRequired('Login') ) {
- $object->SetDBField('Login', $user_email);
+ if ( $object->isRequired('Username') ) {
+ $object->SetDBField('Username', $user_email);
}
$object->SetDBField('Status', STATUS_ACTIVE); // make user subscriber Active by default
if ( $object->Create() ) {
$this->AddSubscriberGroup($object);
$event->redirect = $this->Application->GetVar('subscribe_ok_template');
}
}
}
/**
* Adding user to subscribers group
*
* @param UsersItem $object
*/
function AddSubscriberGroup(&$object)
{
if ( !$object->isSubscriberOnly() ) {
$fields_hash = Array (
'PortalUserId' => $object->GetID(),
'GroupId' => $this->Application->ConfigValue('User_SubscriberGroup'),
);
$this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'UserGroup');
}
$this->Application->EmailEventAdmin('USER.SUBSCRIBE');
$this->Application->EmailEventUser('USER.SUBSCRIBE', $object->GetID());
}
/**
* Removing user from subscribers group
*
* @param int $user_id
*/
function RemoveSubscriberGroup($user_id)
{
$group_id = $this->Application->ConfigValue('User_SubscriberGroup');
$sql = 'DELETE FROM ' . TABLE_PREFIX . 'UserGroup
WHERE PortalUserId = ' . $user_id . ' AND GroupId = ' . $group_id;
$this->Conn->Query($sql);
$this->Application->EmailEventAdmin('USER.UNSUBSCRIBE');
$this->Application->EmailEventUser('USER.UNSUBSCRIBE', $user_id);
}
/**
* Validates forgot password form and sends password reset confirmation e-mail
*
* @param kEvent $event
* @return void
*/
function OnForgotPassword(&$event)
{
$object =& $event->getObject( Array ('form_name' => 'forgot_password') );
/* @var $object kDBItem */
$object->SetFieldsFromHash( $this->getSubmittedFields($event) );
$user_object =& $this->Application->recallObject('u.tmp', null, Array('skip_autoload' => true));
/* @var $user_object UsersItem */
$found = $allow_reset = false;
$username = $object->GetDBField('ForgotLogin');
$email = $object->GetDBField('ForgotEmail');
if ( strlen($username) ) {
- $user_object->Load($username, 'Login');
+ $user_object->Load($username, 'Username');
}
elseif ( strlen($email) ) {
$user_object->Load($email, 'Email');
}
if ( $user_object->isLoaded() ) {
$min_pwd_reset_delay = $this->Application->ConfigValue('Users_AllowReset');
$found = ($user_object->GetDBField('Status') == STATUS_ACTIVE) && strlen( $user_object->GetDBField('Password') );
if ( !$user_object->GetDBField('PwResetConfirm') ) {
// no reset made -> allow
$allow_reset = true;
}
else {
// reset made -> wait N minutes, then allow
$allow_reset = adodb_mktime() > $user_object->GetDBField('PwRequestTime') + $min_pwd_reset_delay;
}
}
if ($found && $allow_reset) {
$this->Application->EmailEventUser('USER.PSWDC', $user_object->GetID());
$event->redirect = $this->Application->GetVar('template_success');
return ;
}
if ( !strlen($username) && !strlen($email) ) {
$object->SetError('ForgotLogin', 'required');
$object->SetError('ForgotEmail', 'required');
}
else {
if ( strlen($username) ) {
$object->SetError('ForgotLogin', $found ? 'reset_denied' : 'unknown_username');
}
if ( strlen($email) ) {
$object->SetError('ForgotEmail', $found ? 'reset_denied' : 'unknown_email');
}
}
if ( !$object->ValidateField('ForgotLogin') || !$object->ValidateField('ForgotEmail') ) {
$event->status = kEvent::erFAIL;
}
}
/**
* Updates kDBItem
*
* @param kEvent $event
* @access protected
*/
protected function OnUpdate(&$event)
{
parent::OnUpdate($event);
if ( !$this->Application->isAdmin ) {
$this->setNextTemplate($event);
}
}
/**
* Checks state against country
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$this->beforeItemChanged($event);
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->CheckStateField($event, 'State', 'Country');
$cs_helper->PopulateStates($event, 'State', 'Country');
$object =& $event->getObject();
/* @var $object kDBItem */
if ($event->Special == 'forgot') {
$object->SetDBField('PwResetConfirm', '');
$object->SetDBField('PwRequestTime_date', NULL);
$object->SetDBField('PwRequestTime_time', NULL);
}
$changed_fields = array_keys( $object->GetChangedFields() );
if ( $changed_fields && !in_array('Modified', $changed_fields) ) {
$object->SetDBField('Modified_date', adodb_mktime());
$object->SetDBField('Modified_time', adodb_mktime());
}
}
/**
* Occurs before item is changed
*
* @param kEvent $event
*/
function beforeItemChanged(&$event)
{
$object =& $event->getObject();
/* @var $object UsersItem */
if ( !$this->Application->isAdmin && $object->getFormName() == 'registration' ) {
// sets new user's status based on config options
$status_map = Array (1 => STATUS_ACTIVE, 2 => STATUS_DISABLED, 3 => STATUS_PENDING, 4 => STATUS_PENDING);
$object->SetDBField('Status', $status_map[ $this->Application->ConfigValue('User_Allow_New') ]);
if ( $this->Application->ConfigValue('User_Password_Auto') ) {
$object->generatePassword( rand(5, 8) );
}
if ( $this->Application->ConfigValue('RegistrationCaptcha') ) {
$captcha_helper =& $this->Application->recallObject('CaptchaHelper');
/* @var $captcha_helper kCaptchaHelper */
$captcha_helper->validateCode($event, false);
}
if ( $event->Name == 'OnBeforeItemUpdate' ) {
// when a subscriber-only users performs normal registration, then assign him to Member group
$this->setUserGroup($object);
}
}
}
/**
* Sets redirect template based on user status & user request contents
*
* @param kEvent $event
* @param bool $for_registration
*/
function setNextTemplate(&$event, $for_registration = false)
{
$event->SetRedirectParam('opener', 's');
$object =& $event->getObject();
/* @var $object UsersItem */
$next_template = false;
if ( $object->GetDBField('Status') == STATUS_ACTIVE && $this->Application->GetVar('next_template') ) {
$next_template = $this->Application->GetVar('next_template');
}
elseif ( $for_registration ) {
switch ( $this->Application->ConfigValue('User_Allow_New') ) {
case 1: // Immediate
$next_template = $this->Application->GetVar('registration_confirm_template');
break;
case 3: // Upon Approval
case 4: // Email Activation
$next_template = $this->Application->GetVar('registration_confirm_pending_template');
break;
}
}
if ($next_template) {
$event->redirect = $next_template;
}
}
/**
* Delete users from groups if their membership is expired
*
* @param kEvent $event
*/
function OnCheckExpiredMembership(&$event)
{
// send pre-expiration reminders: begin
$pre_expiration = adodb_mktime() + $this->Application->ConfigValue('User_MembershipExpirationReminder') * 3600 * 24;
$sql = 'SELECT PortalUserId, GroupId
FROM '.TABLE_PREFIX.'UserGroup
WHERE (MembershipExpires IS NOT NULL) AND (ExpirationReminderSent = 0) AND (MembershipExpires < '.$pre_expiration.')';
$skip_clause = $event->getEventParam('skip_clause');
if ($skip_clause) {
$sql .= ' AND !('.implode(') AND !(', $skip_clause).')';
}
$records = $this->Conn->Query($sql);
if ($records) {
$conditions = Array();
foreach ($records as $record) {
$this->Application->EmailEventUser('USER.MEMBERSHIP.EXPIRATION.NOTICE', $record['PortalUserId']);
$this->Application->EmailEventAdmin('USER.MEMBERSHIP.EXPIRATION.NOTICE');
$conditions[] = '(PortalUserId = '.$record['PortalUserId'].' AND GroupId = '.$record['GroupId'].')';
}
$sql = 'UPDATE '.TABLE_PREFIX.'UserGroup
SET ExpirationReminderSent = 1
WHERE '.implode(' OR ', $conditions);
$this->Conn->Query($sql);
}
// send pre-expiration reminders: end
// remove users from groups with expired membership: begin
$sql = 'SELECT PortalUserId
FROM '.TABLE_PREFIX.'UserGroup
WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.adodb_mktime().')';
$user_ids = $this->Conn->GetCol($sql);
if ($user_ids) {
foreach ($user_ids as $id) {
$this->Application->EmailEventUser('USER.MEMBERSHIP.EXPIRED', $id);
$this->Application->EmailEventAdmin('USER.MEMBERSHIP.EXPIRED');
}
}
$sql = 'DELETE FROM '.TABLE_PREFIX.'UserGroup
WHERE (MembershipExpires IS NOT NULL) AND (MembershipExpires < '.adodb_mktime().')';
$this->Conn->Query($sql);
// remove users from groups with expired membership: end
}
/**
* Used to keep user registration form data, while showing affiliate registration form fields
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnRefreshForm(&$event)
{
$event->redirect = false;
$item_info = $this->Application->GetVar( $event->getPrefixSpecial(true) );
list($id, $fields) = each($item_info);
$object =& $event->getObject( Array ('skip_autoload' => true) );
/* @var $object kDBItem */
$object->setID($id);
$object->IgnoreValidation = true;
$object->SetFieldsFromHash($fields);
}
/**
* Sets persistant variable
*
* @param kEvent $event
*/
function OnSetPersistantVariable(&$event)
{
$field = $this->Application->GetVar('field');
$value = $this->Application->GetVar('value');
$this->Application->StorePersistentVar($field, $value);
$force_tab = $this->Application->GetVar('SetTab');
if ($force_tab) {
$this->Application->StoreVar('force_tab', $force_tab);
}
}
/**
* Return user from order by special .ord
*
* @param kEvent $event
* @return int
*/
function getPassedID(&$event)
{
switch ($event->Special) {
case 'ord':
$order =& $this->Application->recallObject('ord');
/* @var $order OrdersItem */
return $order->GetDBField('PortalUserId');
break;
case 'profile':
$id = $this->Application->GetVar('user_id');
if (!$id) {
// if none user_id given use current user id
$id = $this->Application->RecallVar('user_id');
}
return $id;
break;
case 'forgot':
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$id = $user_helper->validateUserCode( $this->Application->GetVar('user_key'), 'forgot_password' );
if ( is_numeric($id) ) {
return $id;
}
break;
}
if ( preg_match('/^(login|register|recommend|subscribe|forgot)/', $event->Special) ) {
// this way we can have 2+ objects stating with same special, e.g. "u.login-sidebox" and "u.login-main"
return USER_GUEST;
}
return parent::getPassedID($event);
}
/**
* Allows to change root password
*
* @param kEvent $event
*/
function OnUpdateRootPassword(&$event)
{
return $this->OnUpdatePassword($event);
}
/**
* Allows to change root password
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnUpdatePassword(&$event)
{
$items_info = $this->Application->GetVar($event->getPrefixSpecial(true));
if ( !$items_info ) {
return;
}
list ($id, $field_values) = each($items_info);
$user_id = $this->Application->RecallVar('user_id');
if ( $id == $user_id && ($user_id > 0 || $user_id == USER_ROOT) ) {
$user_dummy =& $this->Application->recallObject($event->Prefix . '.-item', null, Array ('skip_autoload' => true));
/* @var $user_dummy kDBItem */
$user_dummy->Load($id);
$status_field = array_shift( $this->Application->getUnitOption($event->Prefix, 'StatusField') );
if ( $user_dummy->GetDBField($status_field) != STATUS_ACTIVE ) {
// not active user is not allowed to update his record (he could not activate himself manually)
return ;
}
}
if ( $user_id == USER_ROOT ) {
$object =& $event->getObject(Array ('skip_autoload' => true));
/* @var $object UsersItem */
// put salt to user's config
$field_options = $object->GetFieldOptions('RootPassword');
$field_options['salt'] = 'b38';
// this is internal hack to allow root/root passwords for dev
if ( $this->Application->isDebugMode() && $field_values['RootPassword'] == 'root' ) {
$field_options['min_length'] = 4;
}
$object->SetFieldOptions('RootPassword', $field_options);
$verify_options = $object->GetFieldOptions('VerifyRootPassword');
$verify_options['salt'] = 'b38';
$object->SetFieldOptions('VerifyRootPassword', $verify_options);
$this->RemoveRequiredFields($object);
$object->SetDBField('RootPassword', $this->Application->ConfigValue('RootPass'));
$object->SetFieldsFromHash($field_values);
$object->setID(-1);
if ( $object->Validate() ) {
// validation on, password match too
$fields_hash = Array ('VariableValue' => $object->GetDBField('RootPassword'));
$conf_table = $this->Application->getUnitOption('conf', 'TableName');
$this->Conn->doUpdate($fields_hash, $conf_table, 'VariableName = "RootPass"');
$event->SetRedirectParam('opener', 'u');
}
else {
$event->status = kEvent::erFAIL;
$event->redirect = false;
return ;
}
}
else {
$object =& $event->getObject();
$object->SetFieldsFromHash($field_values);
if ( !$object->Update() ) {
$event->status = kEvent::erFAIL;
$event->redirect = false;
}
}
$event->SetRedirectParam('opener', 'u');
}
/**
* Resets grid settings, remembered in each user record
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnMassResetSettings(&$event)
{
if ( $this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1) ) {
$event->status = kEvent::erFAIL;
return;
}
$ids = $this->StoreSelectedIDs($event);
$default_user_id = $this->Application->ConfigValue('DefaultSettingsUserId');
if ( in_array($default_user_id, $ids) ) {
array_splice($ids, array_search($default_user_id, $ids), 1);
}
if ( $ids ) {
$q = 'DELETE FROM ' . TABLE_PREFIX . 'PersistantSessionData WHERE PortalUserId IN (' . join(',', $ids) . ') AND
(VariableName LIKE "%_columns_%"
OR
VariableName LIKE "%_filter%"
OR
VariableName LIKE "%_PerPage%")';
$this->Conn->Query($q);
}
$this->clearSelectedIDs($event);
}
/**
* Checks, that currently loaded item is allowed for viewing (non permission-based)
*
* @param kEvent $event
* @return bool
*/
function checkItemStatus(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
if ( !$object->isLoaded() ) {
return true;
}
$virtual_users = Array (USER_ROOT, USER_GUEST);
return ($object->GetDBField('Status') == STATUS_ACTIVE) || in_array($object->GetID(), $virtual_users);
}
/**
* Sends approved/declined email event on user status change
*
* @param kEvent $event
*/
function OnAfterItemUpdate(&$event)
{
parent::OnAfterItemUpdate($event);
$this->afterItemChanged($event);
$object =& $event->getObject();
/* @var $object UsersItem */
if (!$this->Application->isAdmin || $object->IsTempTable()) {
return ;
}
$this->sendStatusChangeEvent($object->GetID(), $object->GetOriginalField('Status'), $object->GetDBField('Status'));
}
/**
* Occurs, after item is changed
*
* @param kEvent $event
*/
protected function afterItemChanged(&$event)
{
$this->saveUserImages($event);
$object =& $event->getObject();
/* @var $object UsersItem */
if ( $object->GetDBField('EmailPassword') && $object->GetDBField('Password_plain') ) {
$email_passwords = $this->Application->RecallVar('email_passwords');
$email_passwords = $email_passwords ? unserialize($email_passwords) : Array ();
$email_passwords[ $object->GetID() ] = $object->GetDBField('Password_plain');
$this->Application->StoreVar('email_passwords', serialize($email_passwords));
}
// update user subscription status (via my profile or new user registration)
if ( !$this->Application->isAdmin && !$object->isSubscriberOnly() ) {
if ( $object->GetDBField('SubscribeToMailing') && !$object->isSubscribed() ) {
$this->AddSubscriberGroup($object);
}
elseif ( !$object->GetDBField('SubscribeToMailing') && $object->isSubscribed() ) {
$this->RemoveSubscriberGroup( $object->GetID() );
}
}
}
/**
* Stores user's original Status before overwriting with data from temp table
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeDeleteFromLive(&$event)
{
parent::OnBeforeDeleteFromLive($event);
$user_id = $event->getEventParam('id');
$user_status = $this->Application->GetVar('user_status', Array ());
if ( $user_id > 0 ) {
$user_status[$user_id] = $this->getUserStatus($user_id);
$this->Application->SetVar('user_status', $user_status);
}
}
/**
* Sends approved/declined email event on user status change (in temp tables during editing)
*
* @param kEvent $event
*/
function OnAfterCopyToLive(&$event)
{
parent::OnAfterCopyToLive($event);
$temp_id = $event->getEventParam('temp_id');
$email_passwords = $this->Application->RecallVar('email_passwords');
if ( $email_passwords ) {
$email_passwords = unserialize($email_passwords);
if ( isset($email_passwords[$temp_id]) ) {
$object =& $event->getObject();
/* @var $object kDBItem */
$object->SwitchToLive();
$object->Load( $event->getEventParam('id') );
$object->SetField('Password', $email_passwords[$temp_id]);
$object->SetField('VerifyPassword', $email_passwords[$temp_id]);
$this->Application->EmailEventUser($temp_id > 0 ? 'USER.NEW.PASSWORD': 'USER.ADD.BYADMIN', $object->GetID());
unset($email_passwords[$temp_id]);
$this->Application->StoreVar('email_passwords', serialize($email_passwords));
}
}
if ( $temp_id > 0 ) {
// only send status change e-mail on user update
$new_status = $this->getUserStatus($temp_id);
$user_status = $this->Application->GetVar('user_status');
$this->sendStatusChangeEvent($temp_id, $user_status[$temp_id], $new_status);
}
}
/**
* Returns user status (active, pending, disabled) based on ID and temp mode setting
*
* @param int $user_id
* @return int
*/
function getUserStatus($user_id)
{
$id_field = $this->Application->getUnitOption($this->Prefix, 'IDField');
$table_name = $this->Application->getUnitOption($this->Prefix, 'TableName');
$sql = 'SELECT Status
FROM '.$table_name.'
WHERE '.$id_field.' = '.$user_id;
return $this->Conn->GetOne($sql);
}
/**
* Sends approved/declined email event on user status change
*
* @param int $user_id
* @param int $prev_status
* @param int $new_status
*/
function sendStatusChangeEvent($user_id, $prev_status, $new_status)
{
$status_events = Array (
STATUS_ACTIVE => 'USER.APPROVE',
STATUS_DISABLED => 'USER.DENY',
);
$email_event = isset($status_events[$new_status]) ? $status_events[$new_status] : false;
if (($prev_status != $new_status) && $email_event) {
$this->Application->EmailEventUser($email_event, $user_id);
$this->Application->EmailEventAdmin($email_event);
}
// deletes sessions from users, that are no longer active
if (($prev_status != $new_status) && ($new_status != STATUS_ACTIVE)) {
$sql = 'SELECT SessionKey
FROM ' . TABLE_PREFIX . 'UserSession
WHERE PortalUserId = ' . $user_id;
$session_ids = $this->Conn->GetCol($sql);
$this->Application->Session->DeleteSessions($session_ids);
}
}
/**
* OnAfterConfigRead for users
*
* @param kEvent $event
*/
function OnAfterConfigRead(&$event)
{
parent::OnAfterConfigRead($event);
$forms = $this->Application->getUnitOption($event->Prefix, 'Forms');
$form_fields =& $forms['default']['Fields'];
// 1. arrange user registration countries
$site_helper =& $this->Application->recallObject('SiteHelper');
/* @var $site_helper SiteHelper */
$first_country = $site_helper->getDefaultCountry('', false);
if ($first_country === false) {
$first_country = $this->Application->ConfigValue('User_Default_Registration_Country');
}
if ($first_country) {
// update user country dropdown sql
$form_fields['Country']['options_sql'] = preg_replace('/ORDER BY (.*)/', 'ORDER BY IF (CountryStateId = '.$first_country.', 1, 0) DESC, \\1', $form_fields['Country']['options_sql']);
}
$max_username = $this->Application->ConfigValue('MaxUserName');
- $fields['Login']['min_len'] = $this->Application->ConfigValue('Min_UserName');
- $fields['Login']['max_len'] = $max_username ? $max_username : 255;
+ $fields['Username']['min_len'] = $this->Application->ConfigValue('Min_UserName');
+ $fields['Username']['max_len'] = $max_username ? $max_username : 255;
// 2. set default user registration group
$form_fields['PrimaryGroupId']['default'] = $this->Application->ConfigValue('User_NewGroup');
// 3. allow avatar upload on Front-End
$file_helper =& $this->Application->recallObject('FileHelper');
/* @var $file_helper FileHelper */
$file_helper->createItemFiles($event->Prefix, true); // create image fields
if ($this->Application->isAdminUser) {
// 4. when in administrative console, then create all users with Active status
$form_fields['Status']['default'] = STATUS_ACTIVE;
// 5. remove groups tab on editing forms when AdvancedUserManagement config variable not set
if (!$this->Application->ConfigValue('AdvancedUserManagement')) {
$edit_tab_presets = $this->Application->getUnitOption($event->Prefix, 'EditTabPresets');
foreach ($edit_tab_presets as $preset_name => $preset_tabs) {
if (array_key_exists('groups', $preset_tabs)) {
unset($edit_tab_presets[$preset_name]['groups']);
if (count($edit_tab_presets[$preset_name]) == 1) {
// only 1 tab left -> remove it too
$edit_tab_presets[$preset_name] = Array ();
}
}
}
$this->Application->setUnitOption($event->Prefix, 'EditTabPresets', $edit_tab_presets);
}
}
if ( !$this->Application->ConfigValue('Email_As_Login') ) {
- // Login becomes required only, when it's used in registration process
- $form_fields['Login']['required'] = 1;
+ // Username becomes required only, when it's used in registration process
+ $form_fields['Username']['required'] = 1;
}
$this->Application->setUnitOption($event->Prefix, 'Forms', $forms);
}
/**
* OnMassCloneUsers
*
* @param kEvent $event
*/
function OnMassCloneUsers(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
return;
}
$temp_handler =& $this->Application->recallObject($event->Prefix.'_TempHandler', 'kTempTablesHandler');
/* @var $temp_handler kTempTablesHandler */
$ids = $this->StoreSelectedIDs($event);
$temp_handler->CloneItems($event->Prefix, '', $ids);
$this->clearSelectedIDs($event);
}
/**
* When cloning users, reset password (set random)
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeClone(&$event)
{
parent::OnBeforeClone($event);
$object =& $event->getObject();
/* @var $object UsersItem */
$object->generatePassword();
$object->SetDBField('ResourceId', 0); // this will reset it
// change email because it should be unique
$object->NameCopy(Array (), $object->GetID(), 'Email', 'copy%1$s.%2$s');
}
/**
* Saves selected ids to session
*
* @param kEvent $event
*/
function OnSaveSelected(&$event)
{
$this->StoreSelectedIDs($event);
// remove current ID, otherwise group selector will use it in filters
$this->Application->DeleteVar($event->getPrefixSpecial(true) . '_id');
}
/**
* Sets primary group of selected users
*
* @param kEvent $event
*/
function OnProcessSelected(&$event)
{
$event->SetRedirectParam('opener', 'u');
$user_ids = $this->getSelectedIDs($event, true);
$this->clearSelectedIDs($event);
$dst_field = $this->Application->RecallVar('dst_field');
if ($dst_field != 'PrimaryGroupId') {
return ;
}
$group_ids = $this->Application->GetVar('g');
$primary_group_id = $group_ids ? array_shift( array_keys($group_ids) ) : false;
if (!$user_ids || !$primary_group_id) {
return ;
}
$table_name = $this->Application->getUnitOption('ug', 'TableName');
// 1. mark group as primary
$sql = 'UPDATE ' . TABLE_PREFIX . 'PortalUser
SET PrimaryGroupId = ' . $primary_group_id . '
WHERE PortalUserId IN (' . implode(',', $user_ids) . ')';
$this->Conn->Query($sql);
$sql = 'SELECT PortalUserId
FROM ' . $table_name . '
WHERE (GroupId = ' . $primary_group_id . ') AND (PortalUserId IN (' . implode(',', $user_ids) . '))';
$existing_members = $this->Conn->GetCol($sql);
// 2. add new members to a group
$new_members = array_diff($user_ids, $existing_members);
foreach ($new_members as $user_id) {
$fields_hash = Array (
'GroupId' => $primary_group_id,
'PortalUserId' => $user_id,
);
$this->Conn->doInsert($fields_hash, $table_name);
}
}
/**
* Loads user images
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
// linking existing images for item with virtual fields
$image_helper =& $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
$object =& $event->getObject();
/* @var $object UsersItem */
$image_helper->LoadItemImages($object);
$cs_helper =& $this->Application->recallObject('CountryStatesHelper');
/* @var $cs_helper kCountryStatesHelper */
$cs_helper->PopulateStates($event, 'State', 'Country');
// get user subscription status
$object->SetDBField('SubscribeToMailing', $object->isSubscribed() ? 1 : 0);
}
/**
* Save user images
*
* @param kEvent $event
*/
function saveUserImages(&$event)
{
if (!$this->Application->isAdmin) {
$image_helper =& $this->Application->recallObject('ImageHelper');
/* @var $image_helper ImageHelper */
$object =& $event->getObject();
/* @var $object kDBItem */
// process image upload in virtual fields
$image_helper->SaveItemImages($object);
}
}
/**
* Makes password required for new users
*
* @param kEvent $event
* @return void
* @access protected
*/
function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
if ( $event->status != kEvent::erSUCCESS ) {
return;
}
$object =& $event->getObject();
/* @var $object kDBItem */
$user_type = $this->Application->GetVar('user_type');
if ( $user_type ) {
$object->SetDBField('UserType', $user_type);
if ( $user_type == UserType::ADMIN ) {
$object->SetDBField('PrimaryGroupId', $this->Application->ConfigValue('User_AdminGroup'));
}
}
if ( $this->Application->ConfigValue('User_Password_Auto') ) {
$object->SetDBField('EmailPassword', 1);
}
$this->_makePasswordRequired($event);
}
/**
* Makes password required for new users
*
* @param kEvent $event
*/
function _makePasswordRequired(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$required_fields = Array ('Password', 'Password_plain', 'VerifyPassword', 'VerifyPassword_plain');
$object->setRequired($required_fields);
}
/**
* Load item if id is available
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function LoadItem(&$event)
{
$id = $this->getPassedID($event);
if ( $id < 0 ) {
// when root, guest and so on
$object =& $event->getObject();
/* @var $object kDBItem */
$object->Clear($id);
return ;
}
parent::LoadItem($event);
}
/**
* Occurs just after login (for hooking)
*
* @param kEvent $event
*/
function OnAfterLogin(&$event)
{
}
/**
* Occurs just before logout (for hooking)
*
* @param kEvent $event
*/
function OnBeforeLogout(&$event)
{
}
/**
* Generates password
*
* @param kEvent $event
*/
function OnGeneratePassword(&$event)
{
$event->status = kEvent::erSTOP;
if ( $this->Application->isAdminUser ) {
echo kUtil::generatePassword();
}
}
/**
* Changes user's password and logges him in
*
* @param kEvent $event
*/
function OnResetLostPassword(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$event->CallSubEvent('OnUpdate');
if ( $event->status == kEvent::erSUCCESS ) {
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$user =& $user_helper->getUserObject();
$user->Load( $object->GetID() );
if ( $user_helper->checkLoginPermission() ) {
$user_helper->loginUserById( $user->GetID() );
}
}
}
/**
* Generates new Root password and email it
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnResetRootPassword(&$event)
{
$password_formatter =& $this->Application->recallObject('kPasswordFormatter');
/* @var $password_formatter kPasswordFormatter */
$new_root_password = kUtil::generatePassword();
$new_root_password_encrypted = $password_formatter->EncryptPassword($new_root_password, 'b38');
$this->Application->SetConfigValue('RootPass', $new_root_password_encrypted);
$this->Application->EmailEventAdmin('ROOT.RESET.PASSWORD', null, Array ('password' => $new_root_password));
$event->SetRedirectParam('reset', 1);
$event->SetRedirectParam('pass', 'm');
}
/**
* Perform login of user, selected in Admin Console, on Front-End in a separate window
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnLoginAs(kEvent &$event)
{
$user_helper =& $this->Application->recallObject('UserHelper');
/* @var $user_helper UserHelper */
$user =& $user_helper->getUserObject();
$user->Load( $this->Application->GetVar('user_id') );
if ( !$user->isLoaded() ) {
return ;
}
if ( $user_helper->checkLoginPermission() ) {
$user_helper->loginUserById( $user->GetID() );
}
}
}
Index: branches/5.2.x/core/units/users/users_config.php
===================================================================
--- branches/5.2.x/core/units/users/users_config.php (revision 14725)
+++ branches/5.2.x/core/units/users/users_config.php (revision 14726)
@@ -1,642 +1,642 @@
<?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' => 'u',
'ItemClass' => Array('class'=>'UsersItem','file'=>'users_item.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'UsersEventHandler','file'=>'users_event_handler.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'UsersTagProcessor','file'=>'users_tag_processor.php','build_event'=>'OnBuild'),
'RegisterClasses' => Array(
Array('pseudo' => 'UsersSyncronizeManager', 'class' => 'UsersSyncronizeManager', 'file' => 'users_syncronize.php', 'build_event' => ''),
),
'AutoLoad' => true,
'ConfigPriority' => 0,
'Hooks' => Array (
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'cdata',
'DoSpecial' => '*',
'DoEvent' => 'OnDefineCustomFields',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'adm',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnStartup'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnAutoLoginUser',
),
Array (
'Mode' => hBEFORE,
'Conditional' => false,
'HookToPrefix' => 'img',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterConfigRead'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnCloneSubItem',
),
// Captcha processing
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnAfterConfigRead'),
'DoPrefix' => 'captcha',
'DoSpecial' => '*',
'DoEvent' => 'OnPrepareCaptcha',
),
/*Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => '',
'HookToSpecial' => '*',
'HookToEvent' => Array('OnBeforeItemCreate'),
'DoPrefix' => 'captcha',
'DoSpecial' => '*',
'DoEvent' => 'OnValidateCode',
),*/
),
'QueryString' => Array(
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'RegularEvents' => Array(
'membership_expiration' => Array('EventName' => 'OnCheckExpiredMembership', 'RunInterval' => 1800, 'Type' => reAFTER),
'delete_expired_sessions' => Array('EventName' => 'OnDeleteExpiredSessions', 'RunInterval' => 43200, 'Type' => reAFTER),
),
'IDField' => 'PortalUserId',
'StatusField' => Array('Status'),
- 'TitleField' => 'Login',
+ 'TitleField' => 'Username',
'ItemType' => 6, // used for custom fields only (on user's case)
'StatisticsInfo' => Array(
'pending' => Array(
'icon' => 'icon16_user_pending.gif',
'label' => 'la_Text_Users',
'js_url' => '#url#',
'url' => Array('t' => 'users/users_list', 'pass' => 'm,u', 'u_event' => 'OnSetFilterPattern', 'u_filters' => 'show_active=0,show_pending=1,show_disabled=0'),
'status' => STATUS_PENDING,
),
),
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('u' => '!la_title_Adding_User!'),
'edit_status_labels' => Array ('u' => '!la_title_Editing_User!'),
),
'users_list' => Array (
'prefixes' => Array ('u_List'), 'format' => "!la_title_Users!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'setprimary', 'approve', 'decline', 'frontend_mail', 'e-mail', 'export', 'view', 'dbl-click'),
),
'users_edit' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
'user_edit_images' => Array (
'prefixes' => Array ('u', 'u-img_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Images!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'new_item', 'edit', 'delete', 'approve', 'decline', 'setprimary', 'move_up', 'move_down', 'view', 'dbl-click'),
),
'user_edit_groups' => Array (
'prefixes' => Array ('u', 'u-ug_List'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Groups!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'select_user', 'edit', 'delete', 'setprimary', 'view', 'dbl-click'),
),
'user_edit_items' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Items!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next', 'edit', 'delete', 'view', 'dbl-click'),
),
'user_edit_custom' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# '#u_titlefield#' - !la_title_Custom!",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'admin_list' => Array (
'prefixes' => Array ('u.admins_List'), 'format' => "!la_title_Administrators!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'clone', 'refresh', 'view', 'dbl-click'),
),
'admins_edit' => Array (
'prefixes' => Array ('u'), 'format' => "#u_status# #u_titlefield#",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
'regular_users_list' => Array (
'prefixes' => Array ('u.regular_List'), 'format' => "!la_title_Users!",
'toolbar_buttons' => Array (),
),
'root_edit' => Array (
'prefixes' => Array ('u'), 'format' => "!la_title_Editing_User! 'root'",
'toolbar_buttons' => Array ('select', 'cancel'),
),
'user_edit_group' => Array (
'prefixes' => Array ('u', 'u-ug'),
'edit_status_labels' => Array ('u-ug' => '!la_title_EditingMembership!'),
'format' => "#u_status# '#u_titlefield#' - #u-ug_status# '#u-ug_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'user_image_edit' => Array (
'prefixes' => Array ('u', 'u-img'),
'new_status_labels' => Array ('u-img' => '!la_title_Adding_Image!'),
'edit_status_labels' => Array ('u-img' => '!la_title_Editing_Image!'),
'new_titlefield' => Array ('u-img' => '!la_title_New_Image!'),
'format' => "#u_status# '#u_titlefield#' - #u-img_status# '#u-img_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'prev', 'next'),
),
'user_select' => Array (
'prefixes' => Array ('u_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
'toolbar_buttons' => Array ('select', 'cancel', 'dbl-click'),
),
'group_user_select' => Array (
'prefixes' => Array ('u.group_List'), 'format' => "!la_title_Users! - !la_title_SelectUser!",
'toolbar_buttons' => Array ('select', 'cancel', 'view', 'dbl-click'),
),
'tree_users' => Array('format' => '!la_section_overview!'),
),
'EditTabPresets' => Array (
'Default' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'users/users_edit', 'priority' => 1),
'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/users_edit_groups', 'priority' => 2),
'images' => Array ('title' => 'la_tab_Images', 't' => 'users/user_edit_images', 'priority' => 3),
'items' => Array ('title' => 'la_tab_Items', 't' => 'users/user_edit_items', 'priority' => 4),
'custom' => Array ('title' => 'la_tab_Custom', 't' => 'users/users_edit_custom', 'priority' => 5),
),
'Admins' => Array (
'general' => Array ('title' => 'la_tab_General', 't' => 'users/admins_edit', 'priority' => 1),
'groups' => Array ('title' => 'la_tab_Groups', 't' => 'users/admins_edit_groups', 'priority' => 2),
),
),
'PermSection' => Array('main' => 'in-portal:user_list', 'custom' => 'in-portal:user_custom'),
'Sections' => Array (
'in-portal:user_list' => Array (
'parent' => 'in-portal:users',
'icon' => 'users',
'label' => 'la_title_Users', // 'la_tab_User_List',
'url' => Array ('t' => 'users/users_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete', 'advanced:ban', 'advanced:send_email', /*'advanced:add_favorite', 'advanced:remove_favorite',*/),
'priority' => 1,
'type' => stTREE,
),
'in-portal:admins' => Array (
'parent' => 'in-portal:users',
'icon' => 'administrators',
'label' => 'la_title_Administrators',
'url' => Array ('t' => 'users/admins_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'perm_prefix' => 'u',
'priority' => 2,
'type' => stTREE,
),
// user settings
'in-portal:user_setting_folder' => Array (
'parent' => 'in-portal:system',
'icon' => 'conf_users',
'label' => 'la_title_Users',
'use_parent_header' => 1,
'url' => Array ('t' => 'index', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view'),
'priority' => 2,
'container' => true,
'type' => stTREE,
),
'in-portal:configure_users' => Array (
'parent' => 'in-portal:user_setting_folder',
'icon' => 'conf_users_general',
'label' => 'la_tab_ConfigSettings',
'url' => Array ('t' => 'config/config_universal', 'module' => 'In-Portal:Users', 'pass_section' => true, 'pass' => 'm'),
'permissions' => Array ('view', 'edit'),
'priority' => 1,
'type' => stTREE,
),
'in-portal:user_custom' => Array (
'parent' => 'in-portal:user_setting_folder',
'icon' => 'conf_customfields',
'label' => 'la_tab_ConfigCustom',
'url' => Array ('t' => 'custom_fields/custom_fields_list', 'cf_type' => 6, 'pass_section' => true, 'pass' => 'm,cf'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 2,
'type' => stTREE,
),
),
'TableName' => TABLE_PREFIX.'PortalUser',
'ListSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.PrimaryGroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
'online' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'UserSession s ON s.PortalUserId = %1$s.PortalUserId
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.PrimaryGroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
),
'ItemSQLs' => Array( '' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.PrimaryGroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUserCustomData cust ON %1$s.ResourceId = cust.ResourceId
LEFT JOIN '.TABLE_PREFIX.'%3$sImages img ON img.ResourceId = %1$s.ResourceId AND img.DefaultImg = 1',
),
'ListSortings' => Array (
'' => Array (
- 'Sorting' => Array ('Login' => 'asc'),
+ 'Sorting' => Array ('Username' => 'asc'),
)
),
'SubItems' => Array('addr', 'u-cdata', 'u-ug', 'u-img', 'fav', 'user-profile'),
/**
* Required for depricated public profile templates to work
*/
'UserProfileMapping' => Array (
'pp_firstname' => 'FirstName',
'pp_lastname' => 'LastName',
'pp_dob' => 'dob',
'pp_email' => 'Email',
'pp_phone' => 'Phone',
'pp_street' => 'Street',
'pp_city' => 'City',
'pp_state' => 'State',
'pp_zip' => 'Zip',
'pp_country' => 'Country',
),
'CalculatedFields' => Array(
'' => Array(
'PrimaryGroup' => 'g.Name',
'FullName' => 'CONCAT(FirstName, " ", LastName)',
'AltName' => 'img.AltName',
'SameImages' => 'img.SameImages',
'LocalThumb' => 'img.LocalThumb',
'ThumbPath' => 'img.ThumbPath',
'ThumbUrl' => 'img.ThumbUrl',
'LocalImage' => 'img.LocalImage',
'LocalPath' => 'img.LocalPath',
'FullUrl' => 'img.Url',
),
),
'Forms' => Array (
'default' => Array (
'Fields' => Array (
'PortalUserId' => Array ('default' => 0),
- 'Login' => Array (
+ 'Username' => Array (
'max_len' => 255,
'formatter' => 'kFormatter', 'regexp' => '/^[A-Z\d_\-\.]+$/i',
'error_msgs' => Array(
'unique' => '!lu_user_already_exist!', 'invalid_format' => '!la_error_InvalidLogin!', 'banned' => '!la_error_UserBanned!'
),
'unique' => Array (), 'default' => '',
),
'Password' => Array (
'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5', 'verify_field' => 'VerifyPassword',
'default' => 'd41d8cd98f00b204e9800998ecf8427e'
),
'FirstName' => Array ('default' => ''),
'LastName' => Array ('default' => ''),
'Company' => Array ('default' => ''),
'Email' => Array (
'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'sample_value' => 'email@domain.com', 'error_msgs' => Array (
'invalid_format' => '!la_invalid_email!', 'unique' => '!lu_email_already_exist!'
),
'unique' => Array (), 'required' => 1, 'default' => ''
),
'CreatedOn' => Array ('formatter' => 'kDateFormatter', 'default' => '#NOW#'),
'Phone' => Array ('default' => ''),
'Fax' => Array ('default' => ''),
'Street' => Array ('default' => ''),
'Street2' => Array ('default' => ''),
'City' => Array ('default' => ''),
'State' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (),
'default' => '',
),
'Zip' => Array ('default' => ''),
'Country' => Array (
'formatter' => 'kOptionsFormatter',
'options_sql' => ' SELECT IF(l%2$s_Name = "", l%3$s_Name, l%2$s_Name) AS Name, IsoCode
FROM ' . TABLE_PREFIX . 'CountryStates
WHERE Type = ' . DESTINATION_TYPE_COUNTRY . '
ORDER BY Name',
'option_key_field' => 'IsoCode', 'option_title_field' => 'Name',
'default' => '',
),
'ResourceId' => Array ('default' => 0),
'Status' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Enabled', 0 => 'la_Disabled', 2 => 'la_Pending'), 'use_phrases' => 1,
'default' => 1
),
'Modified' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
'dob' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
'tz' => Array ('default' => NULL),
'IPAddress' => Array ('default' => ''),
'IsBanned' => Array ('default' => 0),
'PwResetConfirm' => Array ('default' => ''),
'PwRequestTime' => Array ('formatter' => 'kDateFormatter', 'default' => NULL),
'AdminLanguage' => Array (
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'Language ORDER BY PackName',
'option_key_field' => 'LanguageId', 'option_title_field' => 'LocalName', 'default' => NULL
),
'DisplayToPublic' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (
'FirstName' => 'lu_fld_FirstName', 'LastName' => 'lu_fld_LastName', 'dob' => 'lu_fld_BirthDate',
'Email' => 'lu_fld_Email', 'Phone' => 'lu_fld_Phone', 'Street' => 'lu_fld_AddressLine1',
'Street2' => 'lu_fld_AddressLine2', 'City' => 'lu_fld_City', 'State' => 'lu_fld_State',
'Zip' => 'lu_fld_Zip', 'Country' => 'lu_fld_Country',
), 'use_phrases' => 1, 'multiple' => 1,
'default' => NULL
),
'UserType' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'la_opt_UserTypeUser', 1 => 'la_opt_UserTypeAdmin'), 'use_phrases' => 1,
'default' => 0
),
'PrimaryGroupId' => Array (
'formatter' => 'kOptionsFormatter', 'options_sql' => 'SELECT %1$s FROM ' . TABLE_PREFIX . 'PortalGroup WHERE Enabled = 1 AND FrontRegistration = 1',
'option_key_field' => 'GroupId', 'option_title_field' => 'Name', 'default' => NULL
),
'OldStyleLogin' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'default' => 0
),
'IPRestrictions' => Array ('default' => NULL),
),
'VirtualFields' => Array (
'PrimaryGroup' => Array ('default' => ''),
'RootPassword' => Array (
'formatter' => 'kPasswordFormatter', 'encryption_method' => 'md5',
'verify_field' => 'VerifyRootPassword', 'default' => 'd41d8cd98f00b204e9800998ecf8427e'
),
'EmailPassword' => Array ('default' => ''),
'FullName' => Array ('default' => ''),
'AltName' => Array ('default' => ''),
'SameImages' => Array ('default' => ''),
'LocalThumb' => Array ('default' => ''),
'ThumbPath' => Array ('default' => ''),
'ThumbUrl' => Array ('default' => ''),
'LocalImage' => Array ('default' => ''),
'LocalPath' => Array ('default' => ''),
'FullUrl' => Array ('default' => ''),
'SubscribeToMailing' => Array (
'formatter' => 'kOptionsFormatter', 'options' => Array (0 => 'lu_No', 1 => 'lu_Yes'), 'use_phrases' => 1,
'default' => 0,
),
),
),
'registration' => Array (
// Front-End user registration form
/*'Fields' => Array (
'FirstName' => Array ('required' => 1),
),*/
),
'recommend' => Array (
'VirtualFields' => Array (
'RecommendEmail' => Array (
'type' => 'string',
'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!', 'send_error' => '!lu_email_send_error!'),
'sample_value' => 'email@domain.com',
'required' => 1, 'default' => ''
),
),
),
'subscription' => Array (
'VirtualFields' => Array (
'SubscriberEmail' => Array (
'type' => 'string',
'formatter' => 'kFormatter', 'regexp' => '/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i',
'error_msgs' => Array ('required' => '!lu_InvalidEmail!', 'invalid_format' => '!lu_InvalidEmail!'),
'sample_value' => 'email@domain.com',
'required' => 1, 'default' => ''
),
),
),
'forgot_password' => Array (
'VirtualFields' => Array (
'ForgotLogin' => Array (
'type' => 'string',
'error_msgs' => Array (
'required' => '!lu_ferror_forgotpw_nodata!',
'unknown_username' => '!lu_ferror_unknown_username!',
'reset_denied' => '!lu_ferror_reset_denied!',
),
'default' => ''
),
'ForgotEmail' => Array (
'type' => 'string',
'error_msgs' => Array (
'required' => '!lu_ferror_forgotpw_nodata!',
'unknown_email' => '!lu_ferror_unknown_email!',
'reset_denied' => '!lu_ferror_reset_denied!',
),
'default' => ''
),
),
),
'login' => Array (
'VirtualFields' => Array (
'UserLogin' => Array (
'type' => 'string',
'error_msgs' => Array (
'no_permission' => '!la_no_permissions!', 'invalid_password' => '!la_invalid_password!'
),
'default' => ''
),
'UserPassword' => Array ('type' => 'string', 'default' => ''),
'UserRememberLogin' => Array ('type' => 'int', 'default' => 0),
),
),
),
'Fields' => Array (
'PortalUserId' => Array ('type' => 'int', 'not_null' => 1),
- 'Login' => Array ('type' => 'string', 'not_null' => 1),
+ 'Username' => Array ('type' => 'string', 'not_null' => 1),
'Password' => Array ('type' => 'string', 'skip_empty' => 1),
'FirstName' => Array ('type' => 'string', 'not_null' => 1),
'LastName' => Array ('type' => 'string', 'not_null' => 1),
'Company' => Array ('type' => 'string','not_null' => 1),
'Email' => Array ('type' => 'string', 'not_null' => 1),
'CreatedOn' => Array ('type' => 'int'),
'Phone' => Array ('type' => 'string', 'not_null' => 1),
'Fax' => Array ('type' => 'string', 'not_null' => 1),
'Street' => Array ('type' => 'string', 'not_null' => 1),
'Street2' => Array ('type' => 'string', 'not_null' => 1),
'City' => Array ('type' => 'string', 'not_null' => 1),
'State' => Array ('type' => 'string', 'not_null' => 1),
'Zip' => Array ('type' => 'string', 'not_null' => 1),
'Country' => Array ('type' => 'string', 'not_null' => 1),
'ResourceId' => Array ('type' => 'int', 'not_null' => 1),
'Status' => Array ('type' => 'int', 'not_null' => 1),
'Modified' => Array ('type' => 'int'),
'dob' => Array ('type' => 'int'),
'tz' => Array ('type' => 'int'),
'IPAddress' => Array ('type' => 'string', 'not_null' => 1),
'IsBanned' => Array ('type' => 'int', 'not_null' => 1),
'PwResetConfirm' => Array ('type' => 'string', 'not_null' => 1),
'PwRequestTime' => Array ('type' => 'int'),
'AdminLanguage' => Array ('type' => 'int'),
'DisplayToPublic' => Array ('type' => 'string'),
'UserType' => Array ('type' => 'int', 'not_null' => 1),
'PrimaryGroupId' => Array ('type' => 'int'),
'OldStyleLogin' => Array ('type' => 'int', 'not_null' => 1),
'IPRestrictions' => Array ('type' => 'string'),
),
'VirtualFields' => Array (
'PrimaryGroup' => Array ('type' => 'string'),
'RootPassword' => Array ('type' => 'string', 'skip_empty' => 1),
'EmailPassword' => Array ('type' => 'string'),
'FullName' => Array ('type' => 'string'),
'AltName' => Array ('type' => 'string'),
'SameImages' => Array ('type' => 'string'),
'LocalThumb' => Array ('type' => 'string'),
'ThumbPath' => Array ('type' => 'string'),
'ThumbUrl' => Array ('type' => 'string'),
'LocalImage' => Array ('type' => 'string'),
'LocalPath' => Array ('type' => 'string'),
'FullUrl' => Array ('type' => 'string'),
'SubscribeToMailing' => Array ('type' => 'int'),
),
'Grids' => Array(
// not in use
'Default' => Array(
'Icons' => Array(
0 => 'icon16_user_disabled.png',
1 => 'icon16_user.png',
2 => 'icon16_user_pending.png'
),
'Fields' => Array(
- 'Login' => Array ('title' => 'column:la_fld_Username', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
+ 'Username' => Array ('data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_like_filter'),
'LastName' => Array ('filter_block' => 'grid_like_filter'),
'FirstName' => Array ('filter_block' => 'grid_like_filter'),
'Email' => Array ('filter_block' => 'grid_like_filter'),
'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter'),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter'),
'Modified' => Array('filter_block' => 'grid_date_range_filter'),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
// used
'UserSelector' => Array(
'Icons' => Array(
0 => 'icon16_user_disabled.png',
1 => 'icon16_user.png',
2 => 'icon16_user_pending.png'
),
'Selector' => 'radio',
'Fields' => Array(
- 'Login' => Array ('title' => 'column:la_fld_Username', 'data_block' => 'grid_login_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Username' => Array ('data_block' => 'grid_login_td', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'Modified' => Array('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
// used
'Admins' => Array (
'Icons' => Array(
0 => 'icon16_admin_disabled.png',
1 => 'icon16_admin.png',
2 => 'icon16_admin_disabled.png',
),
'Fields' => Array (
'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
- 'Login' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
),
),
// used
'RegularUsers' => Array (
'Icons' => Array(
0 => 'icon16_user_disabled.png',
1 => 'icon16_user.png',
2 => 'icon16_user_pending.png'
),
'Fields' => Array(
'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70),
- 'Login' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
+ 'Username' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'FirstName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'LastName' => Array ('filter_block' => 'grid_like_filter', 'width' => 150, ),
'Email' => Array ('filter_block' => 'grid_like_filter', 'width' => 200, ),
'PrimaryGroup' => Array ('title' => 'la_col_PrimaryGroup', 'filter_block' => 'grid_like_filter', 'width' => 140),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
'Modified' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100),
'IPAddress' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 100, 'hidden' => 1),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/helpers/user_helper.php
===================================================================
--- branches/5.2.x/core/units/helpers/user_helper.php (revision 14725)
+++ branches/5.2.x/core/units/helpers/user_helper.php (revision 14726)
@@ -1,555 +1,555 @@
<?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 UserHelper extends kHelper {
/**
* Event to be used during login processings
*
* @var kEvent
*/
var $event = null;
/**
* Performs user login and returns the result
*
* @param string $username
* @param string $password
* @param bool $dry_run
* @param bool $remember_login
* @param string $remember_login_cookie
* @return int
*/
function loginUser($username, $password, $dry_run = false, $remember_login = false, $remember_login_cookie = '')
{
if (!isset($this->event)) {
$this->event = new kEvent('u:OnLogin');
}
if (!$password && !$remember_login_cookie) {
return LoginResult::INVALID_PASSWORD;
}
$object =& $this->getUserObject();
// process "Save Username" checkbox
if ($this->Application->isAdmin) {
$save_username = $this->Application->GetVar('cb_save_username') ? $username : '';
$this->Application->Session->SetCookie('save_username', $save_username, strtotime('+1 year'));
// cookie will be set on next refresh, but refresh won't occur if
// login error present, so duplicate cookie in kHTTPQuery
$this->Application->SetVar('save_username', $save_username);
}
// logging in "root" (admin only)
$super_admin = ($username == 'super-root') && $this->verifySuperAdmin();
if ($this->Application->isAdmin && ($username == 'root') || ($super_admin && $username == 'super-root')) {
$root_password = $this->Application->ConfigValue('RootPass');
$password_formatter =& $this->Application->recallObject('kPasswordFormatter');
/* @var $password_formatter kPasswordFormatter */
if ($root_password != $password_formatter->EncryptPassword($password, 'b38')) {
return LoginResult::INVALID_PASSWORD;
}
$user_id = USER_ROOT;
$object->Clear($user_id);
- $object->SetDBField('Login', 'root');
+ $object->SetDBField('Username', 'root');
if (!$dry_run) {
$this->loginUserById($user_id, $remember_login_cookie);
if ($super_admin) {
$this->Application->StoreVar('super_admin', 1);
}
// reset counters
$this->Application->resetCounters('UserSession');
$this->_processLoginRedirect('root', $password);
$this->_processInterfaceLanguage();
}
return LoginResult::OK;
}
$user_id = $this->getUserId($username, $password, $remember_login_cookie);
if ($user_id) {
$object->Load($user_id);
if (!$this->checkBanRules($object)) {
return LoginResult::BANNED;
}
if ($object->GetDBField('Status') == STATUS_ACTIVE) {
if ( !$this->checkLoginPermission() ) {
return LoginResult::NO_PERMISSION;
}
if (!$dry_run) {
$this->loginUserById($user_id, $remember_login_cookie);
if ($remember_login) {
// remember username & password when "Remember Login" checkbox us checked (when user is using login form on Front-End)
$this->Application->Session->SetCookie('remember_login', $username . '|' . md5($password), strtotime('+1 month'));
}
if (!$remember_login_cookie) {
// reset counters
$this->Application->resetCounters('UserSession');
$this->_processLoginRedirect($username, $password);
$this->_processInterfaceLanguage();
}
}
return LoginResult::OK;
}
else {
$pending_template = $this->Application->GetVar('pending_disabled_template');
if ($pending_template !== false && !$dry_run) {
// when user found, but it's not yet approved redirect hit to notification template
$this->event->redirect = $pending_template;
return LoginResult::OK;
}
else {
// when no notification template given return an error
return LoginResult::INVALID_PASSWORD;
}
}
}
if (!$dry_run) {
$this->event->SetRedirectParam('pass', 'all');
// $this->event->SetRedirectParam('pass_category', 1); // to test
}
return LoginResult::INVALID_PASSWORD;
}
/**
- * Login username by it's PortalUserId
+ * Login user by it's id
*
* @param int $user_id
* @param bool $remember_login_cookie
*/
function loginUserById($user_id, $remember_login_cookie = false)
{
$object =& $this->getUserObject();
$this->Application->StoreVar('user_id', $user_id);
$this->Application->SetVar('u.current_id', $user_id);
$this->Application->Session->SetField('PortalUserId', $user_id);
if ($user_id != USER_ROOT) {
$groups = $this->Application->RecallVar('UserGroups');
$this->Application->Session->SetField('GroupId', reset( explode(',', $groups) ));
$this->Application->Session->SetField('GroupList', $groups);
}
$this->Application->LoadPersistentVars();
if (!$remember_login_cookie) {
// don't change last login time when auto-login is used
$this_login = (int)$this->Application->RecallPersistentVar('ThisLogin');
$this->Application->StorePersistentVar('LastLogin', $this_login);
$this->Application->StorePersistentVar('ThisLogin', adodb_mktime());
}
$this->Application->HandleEvent($dummy, 'u:OnAfterLogin');
}
/**
* Checks login permission
*
* @return bool
*/
function checkLoginPermission()
{
$object =& $this->getUserObject();
$ip_restrictions = $object->GetDBField('IPRestrictions');
if ( $ip_restrictions && !$this->Application->isDebugMode() && !kUtil::ipMatch($ip_restrictions, "\n") ) {
return false;
}
$groups = $object->getMembershipGroups(true);
if ( !$groups ) {
$groups = Array ();
}
$default_group = $this->getUserTypeGroup();
if ( $default_group !== false ) {
array_push($groups, $default_group);
}
// store groups, because kApplication::CheckPermission will use them!
array_push($groups, $this->Application->ConfigValue('User_LoggedInGroup'));
$groups = array_unique($groups);
$this->Application->StoreVar('UserGroups', implode(',', $groups), true); // true for optional
return $this->Application->CheckPermission($this->Application->isAdmin ? 'ADMIN' : 'LOGIN', 1);
}
/**
* Returns default user group for it's type
*
* @return bool|string
* @access protected
*/
protected function getUserTypeGroup()
{
$group_id = false;
$object =& $this->getUserObject();
if ( $object->GetDBField('UserType') == UserType::USER ) {
$group_id = $this->Application->ConfigValue('User_NewGroup');
}
elseif ( $object->GetDBField('UserType') == UserType::ADMIN ) {
$group_id = $this->Application->ConfigValue('User_AdminGroup');
}
$ip_restrictions = $this->getGroupsWithIPRestrictions();
if ( !isset($ip_restrictions[$group_id]) || kUtil::ipMatch($ip_restrictions[$group_id], "\n") ) {
return $group_id;
}
return false;
}
/**
* Returns groups with IP restrictions
*
* @return Array
* @access public
*/
public function getGroupsWithIPRestrictions()
{
static $cache = null;
if ( $this->Application->isDebugMode() ) {
return Array ();
}
if ( !isset($cache) ) {
$sql = 'SELECT IPRestrictions, GroupId
FROM ' . TABLE_PREFIX . 'PortalGroup
WHERE IPRestrictions IS NOT NULL';
$cache = $this->Conn->GetCol($sql, 'GroupId');
}
return $cache;
}
/**
* Performs user logout
*
*/
function logoutUser()
{
if (!isset($this->event)) {
$this->event = new kEvent('u:OnLogout');
}
$sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('LogoutUser');
$this->Application->HandleEvent($dummy, 'u:OnBeforeLogout');
$user_id = USER_GUEST;
$this->Application->SetVar('u.current_id', $user_id);
$object =& $this->Application->recallObject('u.current', null, Array('skip_autoload' => true));
/* @var $object UsersItem */
$object->Load($user_id);
$this->Application->DestroySession();
$this->Application->StoreVar('user_id', $user_id, true);
$this->Application->Session->SetField('PortalUserId', $user_id);
$group_list = $this->Application->ConfigValue('User_GuestGroup') . ',' . $this->Application->ConfigValue('User_LoggedInGroup');
$this->Application->StoreVar('UserGroups', $group_list, true);
$this->Application->Session->SetField('GroupList', $group_list);
if ($this->Application->ConfigValue('UseJSRedirect')) {
$this->event->SetRedirectParam('js_redirect', 1);
}
$this->Application->resetCounters('UserSession');
$this->Application->Session->SetCookie('remember_login', '', strtotime('-1 hour'));
// don't pass user prefix on logout, since resulting url will have broken "env"
$this->event->SetRedirectParam('pass', MOD_REWRITE ? 'm' : 'all');
}
/**
* Returns user id based on given criteria
*
* @param string $username
* @param string $password
* @param string $remember_login_cookie
* @return int
*/
function getUserId($username, $password, $remember_login_cookie)
{
$password = md5($password);
if ($remember_login_cookie) {
list ($username, $password) = explode('|', $remember_login_cookie); // 0 - username, 1 - md5(password)
}
$sql = 'SELECT PortalUserId
FROM ' . TABLE_PREFIX . 'PortalUser
- WHERE (Email = %1$s OR Login = %1$s) AND (Password = %2$s)';
+ WHERE (Email = %1$s OR Username = %1$s) AND (Password = %2$s)';
return $this->Conn->GetOne( sprintf($sql, $this->Conn->qstr($username), $this->Conn->qstr($password) ) );
}
/**
* Process all required data and redirect logged-in user
*
* @param string $username
* @param string $password
*/
function _processLoginRedirect($username, $password)
{
// set next template
$next_template = $this->Application->GetVar('next_template');
if ($next_template) {
$this->event->redirect = $next_template;
}
// process IIS redirect
if ($this->Application->ConfigValue('UseJSRedirect')) {
$this->event->SetRedirectParam('js_redirect', 1);
}
// synchronize login
$sync_manager =& $this->Application->recallObject('UsersSyncronizeManager', null, Array(), Array ('InPortalSyncronize'));
/* @var $sync_manager UsersSyncronizeManager */
$sync_manager->performAction('LoginUser', $username, $password);
}
/**
* Sets correct interface language after successful login, based on user settings
*
* @return void
* @access protected
*/
protected function _processInterfaceLanguage()
{
if ( !$this->Application->isAdmin ) {
return;
}
$is_root = $this->Application->RecallVar('user_id') == USER_ROOT;
$object =& $this->getUserObject();
$user_language_id = $is_root ? $this->Application->RecallPersistentVar('AdminLanguage') : $object->GetDBField('AdminLanguage');
$sql = 'SELECT LanguageId, IF(LanguageId = ' . (int)$user_language_id . ', 2, AdminInterfaceLang) AS SortKey
FROM ' . TABLE_PREFIX . 'Language
WHERE Enabled = 1
HAVING SortKey <> 0
ORDER BY SortKey DESC';
$language_info = $this->Conn->GetRow($sql);
$language_id = $language_info && $language_info['LanguageId'] ? $language_info['LanguageId'] : $user_language_id;
if ( $user_language_id != $language_id ) {
// first admin login OR language was deleted or disabled
if ( $is_root ) {
$this->Application->StorePersistentVar('AdminLanguage', $language_id);
}
else {
$object->SetDBField('AdminLanguage', $language_id);
$object->Update();
}
}
$this->event->SetRedirectParam('m_lang', $language_id); // data
$this->Application->Session->SetField('Language', $language_id); // interface
}
/**
* Checks that user is allowed to use super admin mode
*
* @return bool
*/
function verifySuperAdmin()
{
$sa_mode = kUtil::ipMatch(defined('SA_IP') ? SA_IP : '');
return $sa_mode || $this->Application->isDebugMode();
}
/**
* Returns user object, used during login processing
*
* @return UsersItem
* @access public
*/
public function &getUserObject()
{
$prefix_special = $this->Application->isAdmin ? 'u.current' : 'u'; // "u" used on front not to change theme
$object =& $this->Application->recallObject($prefix_special, null, Array('skip_autoload' => true));
/* @var $object UsersItem */
return $object;
}
/**
* Checks, if given user fields matches at least one of defined ban rules
*
* @param kDBItem $object
* @return bool
*/
function checkBanRules(&$object)
{
$table = $this->Application->getUnitOption('ban-rule', 'TableName');
if (!$this->Conn->TableFound($table)) {
// when ban table not found -> assume user is ok by default
return true;
}
$sql = 'SELECT *
FROM ' . $table . '
WHERE ItemType = 6 AND Status = ' . STATUS_ACTIVE . '
ORDER BY Priority DESC';
$rules = $this->Conn->Query($sql);
$found = false;
foreach ($rules as $rule) {
$field = $rule['ItemField'];
$this_value = mb_strtolower( $object->GetDBField($field) );
$test_value = mb_strtolower( $rule['ItemValue'] );
switch ( $rule['ItemVerb'] ) {
case 1: // is
if ($this_value == $test_value) {
$found = true;
}
break;
case 2: // is not
if ($this_value != $test_value) {
$found = true;
}
break;
case 3: // contains
if ( strstr($this_value, $test_value) ) {
$found = true;
}
break;
case 4: // not contains
if ( !strstr($this_value, $test_value) ) {
$found = true;
}
break;
case 7: // exists
if ( strlen($this_value) > 0 ) {
$found = true;
}
break;
case 8: // unique
if ( $this->_checkValueExist($field, $this_value) ) {
$found = true;
}
break;
}
if ( $found ) {
// check ban rules, until one of them matches
if ( $rule['RuleType'] ) {
// invert rule type
$found = false;
}
break;
}
}
return !$found;
}
/**
* Checks if value is unique in Users table against the specified field
*
* @param string $field
* @param string $value
* @return string
*/
function _checkValueExist($field, $value)
{
$sql = 'SELECT *
FROM ' . $this->Application->getUnitOption('u', 'TableName') . '
WHERE '. $field .' = ' . $this->Conn->qstr($value);
return $this->Conn->GetOne($sql);
}
public function validateUserCode($user_code, $code_type, $expiration_timeout = null)
{
$expiration_timeouts = Array (
'forgot_password' => 'config:Users_AllowReset',
'activation' => 'config:UserEmailActivationTimeout',
'custom' => '',
);
if ( !$user_code ) {
return 'code_is_not_valid';
}
$sql = 'SELECT PwRequestTime, PortalUserId
FROM ' . TABLE_PREFIX . 'PortalUser
WHERE PwResetConfirm = ' . $this->Conn->qstr( trim($user_code) );
$user_info = $this->Conn->GetRow($sql);
if ( $user_info === false ) {
return 'code_is_not_valid';
}
$expiration_timeout = isset($expiration_timeout) ? $expiration_timeout : $expiration_timeouts[$code_type];
if ( preg_match('/^config:(.*)$/', $expiration_timeout, $regs) ) {
$expiration_timeout = $this->Application->ConfigValue( $regs[1] );
}
if ( $expiration_timeout && $user_info['PwRequestTime'] < strtotime('-' . $expiration_timeout . ' minutes') ) {
return 'code_expired';
}
return $user_info['PortalUserId'];
}
}
Index: branches/5.2.x/core/units/logs/session_logs/session_logs_config.php
===================================================================
--- branches/5.2.x/core/units/logs/session_logs/session_logs_config.php (revision 14725)
+++ branches/5.2.x/core/units/logs/session_logs/session_logs_config.php (revision 14726)
@@ -1,155 +1,155 @@
<?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' => 'session-log',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'SessionLogEventHandler', 'file' => 'session_log_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'Hooks' => Array (
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnAfterLogin'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnStartSession',
),
Array (
'Mode' => hAFTER,
'Conditional' => false,
'HookToPrefix' => 'u',
'HookToSpecial' => '*',
'HookToEvent' => Array ('OnBeforeLogout'),
'DoPrefix' => '',
'DoSpecial' => '*',
'DoEvent' => 'OnEndSession',
),
),
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'SessionLogId',
'StatusField' => Array ('Status'),
'TableName' => TABLE_PREFIX.'SessionLogs',
'TitlePresets' => Array (
'session_log_list' => Array ('prefixes' => Array('session-log_List'), 'format' => '!la_tab_SessionLogs!',
'toolbar_buttons' => Array ('delete', 'view'),
),
),
'PermSection' => Array('main' => 'in-portal:session_logs'),
// don't forget to add corresponding permissions to install script
// INSERT INTO Permissions VALUES (0, 'in-portal:session_logs.view', 11, 1, 1, 0), (0, 'in-portal:session_logs.delete', 11, 1, 1, 0);
'Sections' => Array (
'in-portal:session_logs' => Array (
'parent' => 'in-portal:reports',
'icon' => 'sessions_log',
'label' => 'la_tab_SessionLog', // 'la_tab_SessionLogs',
'url' => Array('t' => 'logs/session_logs/session_log_list', 'pass' => 'm'),
'permissions' => Array('view', 'delete'),
'priority' => 2,
// 'show_mode' => smSUPER_ADMIN,
'type' => stTREE,
),
),
'TitleField' => 'SessionLogId',
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser AS u ON u.PortalUserId = %1$s.PortalUserId',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('SessionLogId' => 'desc'),
)
),
'CalculatedFields' => Array(
'' => Array(
- 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Login)',
+ 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Username)',
'UserFirstName' => 'u.FirstName',
'UserLastName' => 'u.LastName',
'UserEmail' => 'u.Email',
'Duration' => 'IFNULL(SessionEnd, UNIX_TIMESTAMP())-SessionStart',
),
),
'ForceDontLogChanges' => true,
'Fields' => Array (
'SessionLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'SessionId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options'=> array(0 => 'la_opt_Active', 1 => 'la_opt_LoggedOut', 2 => 'la_opt_Expired'),
'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
'SessionStart' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
'SessionEnd' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
'IP' => Array ('type' => 'string', 'max_len' => 15, 'not_null' => 1, 'default' => ''),
'AffectedItems' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array(
'Duration' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'date_format' => '', 'time_format' => 'H:i:s', 'use_timezone' => false, 'default' => NULL),
'UserLogin' => Array ('type' => 'string', 'default' => ''),
'UserFirstName' => Array ('type' => 'string', 'default' => ''),
'UserLastName' => Array ('type' => 'string', 'default' => ''),
'UserEmail' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'SessionLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'PortalUserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 70, ),
'UserLogin' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'UserFirstName' => Array ('title' => 'column:la_fld_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserLastName' => Array ('title' => 'column:la_fld_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserEmail' => Array ('title' => 'column:la_fld_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'SessionStart' => Array ('title' => 'la_col_SessionStart', 'filter_block' => 'grid_date_range_filter', 'width' => 120, ),
'SessionEnd' => Array ('title' => 'la_col_SessionEnd', 'filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Duration' => Array ('filter_block' => 'grid_range_filter', 'width' => 100, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
'IP' => Array ('title' => 'la_col_IP', 'filter_block' => 'grid_like_filter', 'width' => 150, ),
'AffectedItems' => Array ('title' => 'la_col_AffectedItems', 'data_block' => 'affected_td', 'width' => 120, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/logs/change_logs/change_logs_config.php
===================================================================
--- branches/5.2.x/core/units/logs/change_logs/change_logs_config.php (revision 14725)
+++ branches/5.2.x/core/units/logs/change_logs/change_logs_config.php (revision 14726)
@@ -1,160 +1,160 @@
<?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' => 'change-log',
'ItemClass' => Array('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'ChangeLogEventHandler', 'file' => 'change_log_eh.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ChangeLogTagProcessor', 'file' => 'change_log_tp.php', 'build_event' => 'OnBuild'),
'RegisterClasses' => Array (
Array ('pseudo' => 'kChangesFormatter', 'class' => 'kChangesFormatter', 'file' => 'changes_formatter.php', 'build_event' => '', 'require_classes' => 'kFormatter'),
),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'ChangeLogId',
//'StatusField' => Array ('Status'),
'TableName' => TABLE_PREFIX.'ChangeLogs',
'TitlePresets' => Array (
'default' => Array (
'edit_status_labels' => Array ('change-log' => '!la_title_EditingChangeLog!'),
),
'change_log_list' => Array (
'prefixes' => Array('change-log_List'), 'format' => '!la_tab_ChangeLog!',
'toolbar_buttons' => Array ('edit', 'delete', 'view'),
),
'change_log_edit' => Array (
'prefixes' => Array('change-log'), 'format' => '#change-log_status# #change-log_titlefield#',
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'PermSection' => Array ('main' => 'in-portal:change_logs'),
// don't forget to add corresponding permissions to install script
// INSERT INTO Permissions VALUES (0, 'in-portal:change_logs.view', 11, 1, 1, 0), (0, 'in-portal:change_logs.add', 11, 1, 1, 0), (0, 'in-portal:change_logs.edit', 11, 1, 1, 0), (0, 'in-portal:change_logs.delete', 11, 1, 1, 0);
'Sections' => Array (
'in-portal:change_logs' => Array (
'parent' => 'in-portal:reports',
'icon' => 'changes_log', // 'change_logs',
'label' => 'la_tab_ChangeLog',
'url' => Array('t' => 'logs/change_logs/change_log_list', 'pass' => 'm'),
'permissions' => Array('view', 'edit', 'delete'),
'priority' => 3,
// 'show_mode' => smSUPER_ADMIN,
'type' => stTREE,
),
),
'TitleField' => 'ChangeLogId',
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalUser AS u ON u.PortalUserId = %1$s.PortalUserId',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('OccuredOn' => 'desc'),
)
),
'CalculatedFields' => Array (
'' => Array (
- 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Login)',
+ 'UserLogin' => 'IF(%1$s.PortalUserId = ' . USER_ROOT . ', \'root\', u.Username)',
'UserFirstName' => 'u.FirstName',
'UserLastName' => 'u.LastName',
'UserEmail' => 'u.Email',
),
),
'ForceDontLogChanges' => true,
'Fields' => Array (
'ChangeLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'PortalUserId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'SessionLogId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Action' => Array (
'type' => 'int', 'formatter' => 'kOptionsFormatter',
'options' => array (ChangeLog::CREATE => 'la_opt_ActionCreate', ChangeLog::UPDATE => 'la_opt_ActionUpdate', ChangeLog::DELETE => 'la_opt_ActionDelete'),
'use_phrases' => 1,
'not_null' => 1, 'default' => 0
),
'OccuredOn' => Array ('type' => 'int', 'formatter' => 'kDateFormatter', 'time_format' => 'H:i:s', 'default' => NULL),
'Prefix' => Array (
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
'option_key_field' => 'Prefix',
'option_title_field' => 'CONCAT(\'la_prefix_\', Prefix) AS Phrase',
'use_phrases' => 1,
'max_len' => 255, 'not_null' => 1, 'default' => ''
),
'ItemId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Changes' => Array ('type' => 'string', 'formatter' => 'kChangesFormatter', 'default' => NULL),
'MasterPrefix' => Array (
'type' => 'string', 'formatter' => 'kOptionsFormatter',
'options_sql' => 'SELECT DISTINCT %s FROM '.TABLE_PREFIX.'ChangeLogs ORDER BY Phrase',
'option_key_field' => 'MasterPrefix',
'option_title_field' => 'CONCAT(\'la_prefix_\',MasterPrefix) AS Phrase',
'use_phrases' => 1,
'max_len' => 255, 'not_null' => 1, 'default' => ''
),
'MasterId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array (
'UserLogin' => Array ('type' => 'string', 'default' => ''),
'UserFirstName' => Array ('type' => 'string', 'default' => ''),
'UserLastName' => Array ('type' => 'string', 'default' => ''),
'UserEmail' => Array ('type' => 'string', 'default' => ''),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array (
'ChangeLogId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'PortalUserId' => Array ('title' => 'la_col_PortalUserId', 'filter_block' => 'grid_like_filter', 'width' => 70, ),
'UserLogin' => Array ('title' => 'column:la_fld_Username', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'UserFirstName' => Array ('title' => 'column:la_fld_FirstName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserLastName' => Array ('title' => 'column:la_fld_LastName', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'UserEmail' => Array ('title' => 'column:la_fld_Email', 'filter_block' => 'grid_like_filter', 'width' => 120, ),
'SessionLogId' => Array ('filter_block' => 'grid_range_filter', 'width' => 120, ),
'Action' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
'OccuredOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 150, ),
'MasterPrefix' => Array ('filter_block' => 'grid_options_filter', 'width' => 120, ),
'MasterId' => Array ('filter_block' => 'grid_range_filter', 'width' => 90, ),
'Prefix' => Array ('title' => 'la_col_ItemPrefix', 'filter_block' => 'grid_options_filter', 'width' => 120, ),
'ItemId' => Array ('filter_block' => 'grid_range_filter', 'width' => 120, ),
'Changes' => Array ('data_block' => 'grid_changes_td', 'filter_block' => 'grid_like_filter', 'format' => 'auto_cut', 'width' => 225, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/user_groups/user_groups_config.php
===================================================================
--- branches/5.2.x/core/units/user_groups/user_groups_config.php (revision 14725)
+++ branches/5.2.x/core/units/user_groups/user_groups_config.php (revision 14726)
@@ -1,137 +1,137 @@
<?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' => 'ug',
'Clones' => Array(
'g-ug' => Array(
'ParentPrefix' => 'g',
'ForeignKey' => 'GroupId',
'ParentTableKey' => 'GroupId',
'IDField' => 'PortalUserId',
'ListSQLs' => Array(
'' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId'
),
'ItemSQLs' => Array(
'' => ' SELECT %1$s.* %2$s FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'PortalUser u ON %1$s.PortalUserId = u.PortalUserId'
),
'CalculatedFields' => Array (
'' => Array(
'UserName' => 'CONCAT(u.LastName, \' \', u.FirstName)',
- 'UserLogin' => 'u.Login',
+ 'UserLogin' => 'u.Username',
'PrimaryGroup' => 'IF(u.PrimaryGroupId = %1$s.GroupId, 1, 0)',
),
),
'VirtualFields' => Array (
'UserName' => Array('type' => 'string', 'default' => ''),
'UserLogin' => Array('type' => 'string', 'default' => ''),
),
'Grids' => Array(
'GroupUsers' => Array(
'Icons' => Array ('default' => 'icon16_item.png'),
'Fields' => Array(
'PortalUserId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'UserName' => Array ('title'=>'la_col_UserFirstLastName', 'width' => 200, ),
- 'UserLogin' => Array ('title'=>'column:la_fld_Login', 'width' => 100, ),
+ 'UserLogin' => Array ('title'=>'column:la_fld_Username', 'width' => 100, ),
'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
),
),
),
),
'u-ug' => Array(
'ParentPrefix' => 'u',
'ForeignKey' => 'PortalUserId',
'ParentTableKey' => 'PortalUserId',
),
),
'ItemClass' => Array('class'=>'UserGroups_DBItem','file'=>'user_groups_dbitem.php','build_event'=>'OnItemBuild'),
'ListClass' => Array('class'=>'kDBList','file'=>'','build_event'=>'OnListBuild'),
'EventHandlerClass' => Array('class'=>'UserGroupsEventHandler','file'=>'user_groups_eh.php','build_event'=>'OnBuild'),
'TagProcessorClass' => Array('class'=>'kDBTagProcessor','file'=>'','build_event'=>'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
),
'IDField' => 'GroupId',
'TitleField' => 'GroupName',
'TableName' => TABLE_PREFIX.'UserGroup',
'ListSQLs' => Array( ''=>' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN '.TABLE_PREFIX.'PortalGroup g ON %1$s.GroupId = g.GroupId
LEFT JOIN '.TABLE_PREFIX.'%3$sPortalUser u ON %1$s.PortalUserId = u.PortalUserId'),
'AutoDelete' => true,
'AutoClone' => false,
'CalculatedFields' => Array (
'' => Array(
'GroupName' => 'g.Name',
'GroupDescription' => 'g.Description',
'PrimaryGroup' => 'IF(u.PrimaryGroupId = %1$s.GroupId, 1, 0)',
),
),
'Fields' => Array(
'PortalUserId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'GroupId' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
'MembershipExpires' => Array('type' => 'int', 'formatter' => 'kDateFormatter', 'default' => null),
'ExpirationReminderSent' => Array('type' => 'int', 'not_null' => 1, 'default' => 0),
),
'VirtualFields' => Array (
'GroupName' => Array('type' => 'string', 'default' => ''),
'GroupDescription' => Array('type' => 'string', 'default' => ''),
'PrimaryGroup' => Array(
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array (1 => 'la_Yes', 0 => 'la_No'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 1
),
),
'Grids' => Array(
'Default' => Array(
'Icons' => Array (
'default' => 'icon16_item.png',
1 => 'icon16_primary.png'
),
'Fields' => Array(
'GroupId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'GroupName' => Array ('width' => 100, ),
'GroupDescription' => Array ('title' => 'column:la_fld_Description', 'width' => 150, ),
'PrimaryGroup' => Array( 'title'=>'la_col_PrimaryGroup', 'filter_block' => 'grid_options_filter', 'width' => 150, ),
'MembershipExpires' => Array ('title' => 'la_col_MembershipExpires', 'data_block' => 'grid_membership_td', 'filter_block' => 'grid_date_range_filter', 'width' => 150, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/reviews/reviews_config.php
===================================================================
--- branches/5.2.x/core/units/reviews/reviews_config.php (revision 14725)
+++ branches/5.2.x/core/units/reviews/reviews_config.php (revision 14726)
@@ -1,218 +1,218 @@
<?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' => 'rev',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'ReviewsEventHandler', 'file' => 'reviews_event_handler.php', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'ReviewsTagProcessor', 'file' => 'reviews_tag_processor.php', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'ParentPrefix' => 'p', // replace all usage of rev to "p-rev" and then remove this param from here and Prefix too
'ConfigMapping' => Array (
'PerPage' => 'Comm_Perpage_Reviews',
'ReviewDelayInterval' => 'product_ReviewDelay_Value',
'ReviewDelayValue' => 'product_ReviewDelay_Interval',
),
'IDField' => 'ReviewId',
'StatusField' => Array ('Status'), // field, that is affected by Approve/Decline events
'TableName' => TABLE_PREFIX.'ItemReview',
'ParentTableKey' => 'ResourceId', // linked field in master table
'ForeignKey' => 'ItemId', // linked field in subtable
'AutoDelete' => true,
'AutoClone' => true,
'TitlePresets' => Array (
'reviews_edit' => Array ('format' => "!la_title_Editing_Review!"),
'reviews' => Array (
'toolbar_buttons' => Array ('edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
),
),
'CalculatedFields' => Array (
'' => Array (
- 'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Login )',
+ 'ReviewedBy' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Username )',
),
'products' => Array (
- 'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Login )',
+ 'ReviewedBy' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Username )',
'ItemName' => 'pr.l1_Name',
'ProductId' => 'pr.ProductId',
),
'product' => Array (
- 'ReviewedBy' => 'IF( ISNULL(pu.Login), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Login )',
+ 'ReviewedBy' => 'IF( ISNULL(pu.Username), IF (%1$s.CreatedById = ' . USER_ROOT . ', \'root\', IF (%1$s.CreatedById = ' . USER_GUEST . ', \'Guest\', \'n/a\')), pu.Username )',
'ItemName' => 'pr.l1_Name',
'ProductId' => 'pr.ProductId',
),
),
// key - special, value - list select sql
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
'products' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
LEFT JOIN ' . TABLE_PREFIX . 'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
'product' => ' SELECT %1$s.* %2$s
FROM %1$s
LEFT JOIN ' . TABLE_PREFIX . 'Products pr ON pr.ResourceId = %1$s.ItemId
LEFT JOIN ' . TABLE_PREFIX . 'PortalUser pu ON pu.PortalUserId = %1$s.CreatedById',
),
'ItemSQLs' => Array ('' => 'SELECT * FROM %s'),
'ListSortings' => Array (
'' => Array (
'ForcedSorting' => Array ('Priority' => 'desc'),
'Sorting' => Array ('CreatedOn' => 'desc'),
)
),
'Fields' => Array (
'ReviewId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'CreatedOn' => Array (
'type' => 'int',
'formatter' => 'kDateFormatter', 'default' => '#NOW#',
),
'ReviewText' => Array (
'type' => 'string',
'formatter' => 'kFormatter',
'using_fck' => 1, 'default' => null, 'required' => 1,
),
'Rating' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (
0 => 'lu_None',
1 => 'lu_Rating_1',
2 => 'lu_Rating_2',
3 => 'lu_Rating_3',
4 => 'lu_Rating_4',
5 => 'lu_Rating_5'),
'use_phrases' => 1,
'min_value_inc' => 0, 'max_value_inc' => 5, 'not_null' => 1, 'default' => 0,
),
'IPAddress' => Array (
'type' => 'string',
'max_value_inc' => 15, 'not_null' =>1, 'default' => '',
),
'ItemId' => Array (
'type' => 'int',
'not_null' => 1, 'default' => 0
),
'CreatedById' => Array (
'type' => 'int',
'formatter' => 'kLEFTFormatter',
'options' => Array (USER_ROOT => 'root', USER_GUEST => 'Guest'),
'left_sql' => 'SELECT %s FROM ' . TABLE_PREFIX . 'PortalUser
WHERE `%s` = \'%s\' ',
'left_key_field' => 'PortalUserId',
- 'left_title_field' => 'Login',
+ 'left_title_field' => 'Username',
'required' => 1, 'default' => NULL,
'error_msgs' => Array ('invalid_option' => '!la_error_UserNotFound!'),
),
'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'use_phrases' => 1,
'options' => Array (
0 => 'la_Disabled',
1 => 'la_Active',
2 => 'la_Pending',
),
'not_null' =>1, 'default' => 2,
),
'TextFormat' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter',
'options' => Array (0 => 'la_text', 1 => 'la_html'), 'use_phrases' => 1,
'not_null' => 1, 'default' => 0,
),
'Module' => Array ('type' => 'string', 'not_null' => 1, 'default' => ''),
'HelpfulCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'NotHelpfulCount' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0)
),
'VirtualFields' => Array (
'ReviewedBy' => Array ('type' => 'string', 'default' => ''),
'CatalogItemName' => Array ('type' => 'string', 'default' => ''),
'CatalogItemId' => Array ('type' => 'int', 'default' => 0),
'CatalogItemCategory' => Array ('type' => 'int', 'default' => 0),
'ItemName' => Array ('type' => 'string', 'default' => ''),
'ProductId' => Array ('type' => 'int', 'default' => 0),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
2 => 'icon16_pending.png',
),
'Fields' => Array (
'ReviewId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'ReviewText' => Array ('filter_block' => 'grid_like_filter', 'width' => 210, 'first_chars' => 200, ),
'ReviewedBy' => Array ( 'title' => 'la_col_ReviewedBy', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
'Rating' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
'HelpfulCount' => Array ('title' => 'la_col_HelpfulCount', 'filter_block' => 'grid_range_filter'),
'NotHelpfulCount' => Array ('title' => 'la_col_NotHelpfulCount', 'filter_block' => 'grid_range_filter'),
),
),
'ReviewsSection' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
2 => 'icon16_pending.png',
),
'Fields' => Array (
'ReviewId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 60, ),
'ReviewText' => Array ('data_block' => 'grid_reviewtext_td', 'filter_block' => 'grid_like_filter', 'width' => 210, 'first_chars' => 200, ),
'ReviewedBy' => Array ( 'title' => 'la_col_ReviewedBy', 'filter_block' => 'grid_like_filter', 'width' => 100, ),
'CreatedOn' => Array ('filter_block' => 'grid_date_range_filter', 'width' => 145, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
'Rating' => Array ('filter_block' => 'grid_options_filter', 'width' => 80, ),
'HelpfulCount' => Array ('title' => 'la_col_HelpfulCount', 'filter_block' => 'grid_range_filter'),
'NotHelpfulCount' => Array ('title' => 'la_col_NotHelpfulCount', 'filter_block' => 'grid_range_filter'),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/ban_rules/ban_rules_config.php
===================================================================
--- branches/5.2.x/core/units/ban_rules/ban_rules_config.php (revision 14725)
+++ branches/5.2.x/core/units/ban_rules/ban_rules_config.php (revision 14726)
@@ -1,146 +1,146 @@
<?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' => 'ban-rule',
'ItemClass' => Array ('class' => 'kDBItem', 'file' => '', 'build_event' => 'OnItemBuild'),
'ListClass' => Array ('class' => 'kDBList', 'file' => '', 'build_event' => 'OnListBuild'),
'EventHandlerClass' => Array ('class' => 'kDBEventHandler', 'file' => '', 'build_event' => 'OnBuild'),
'TagProcessorClass' => Array ('class' => 'kDBTagProcessor', 'file' => '', 'build_event' => 'OnBuild'),
'AutoLoad' => true,
'QueryString' => Array (
1 => 'id',
2 => 'Page',
3 => 'PerPage',
4 => 'event',
5 => 'mode',
),
'IDField' => 'RuleId',
'TableName' => TABLE_PREFIX.'BanRules',
'StatusField' => Array ('Status'),
'TitleField' => 'ItemValue',
'TitlePresets' => Array (
'default' => Array (
'new_status_labels' => Array ('ban-rule' => '!la_title_AddingBanRule!'),
'edit_status_labels' => Array ('ban-rule' => '!la_title_EditingBanRule!'),
),
'ban_rule_list' => Array (
'prefixes' => Array ('ban-rule_List'), 'format' => "!la_tab_BanList!",
'toolbar_buttons' => Array ('new_item', 'edit', 'delete', 'approve', 'decline', 'view', 'dbl-click'),
),
'ban_rule_edit' => Array (
'prefixes' => Array ('ban-rule'), 'format' => "#ban-rule_status# '#ban-rule_titlefield#'",
'toolbar_buttons' => Array ('select', 'cancel', 'reset_edit', 'prev', 'next'),
),
),
'PermSection' => Array('main' => 'in-portal:user_banlist'),
'Sections' => Array (
'in-portal:user_banlist' => Array (
'parent' => 'in-portal:users',
'icon' => 'banlist',
'label' => 'la_tab_BanList',
'url' => Array('t' => 'ban_rules/ban_rule_list', 'pass' => 'm'),
'permissions' => Array ('view', 'add', 'edit', 'delete'),
'priority' => 4,
'type' => stTREE,
),
),
'ListSQLs' => Array (
'' => ' SELECT %1$s.* %2$s FROM %1$s',
),
'ListSortings' => Array (
'' => Array (
'Sorting' => Array ('Priority' => 'desc'),
)
),
'Fields' => Array (
'RuleId' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'RuleType' => Array (
'type' => 'int',
'formatter' => 'kOptionsFormatter', 'options' => Array(0 => 'la_opt_Deny', 1 => 'la_opt_Allow'), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => 0
),
'ItemField' => Array (
'type' => 'string', 'max_len' => 255,
'formatter'=>'kOptionsFormatter', 'options' => Array(
'ip' => 'la_opt_IP_Address',
- 'Login' => 'la_opt_Username',
+ 'Username' => 'la_opt_Username',
'Email' => 'la_opt_Email',
'FirstName' => 'la_opt_FirstName',
'LastName' => 'la_opt_LastName',
'Address' => 'la_opt_Address',
'City' => 'la_opt_City',
'State' => 'la_opt_State',
'Zip' => 'la_opt_Zip',
'Phone' => 'la_opt_Phone',
), 'use_phrases' => 1,
'required' => 1,
'default' => NULL,
),
'ItemVerb' => Array (
'type' => 'int',
'formatter'=>'kOptionsFormatter', 'options'=>Array(
1 => 'la_opt_Exact',
2 => 'la_opt_DoesntMatch',
3 => 'la_opt_Sub-match',
4 => 'la_opt_NotLike',
7 => 'la_opt_NotEmpty',
8 => 'la_opt_IsUnique',
), 'use_phrases' => 1,
'not_null' => 1, 'required' => 1, 'default' => 0,
),
'ItemValue' => Array ('type' => 'string', 'max_len' => 255, 'not_null' => 1, 'required' => 1, 'default' => ''),
'ItemType' => Array ('type' => 'int', 'not_null' => 1, 'default' => 6),
'Priority' => Array ('type' => 'int', 'not_null' => 1, 'default' => 0),
'Status' => Array ('type' => 'int', 'not_null' => 1, 'default' => 1, 'use_phrases' => 1, 'formatter'=>'kOptionsFormatter', 'options'=>Array(
1 => 'la_Enabled',
0 => 'la_Disabled'
)
),
'ErrorTag' => Array ('type' => 'string', 'max_len' => 255, 'default' => NULL),
),
'Grids' => Array (
'Default' => Array (
'Icons' => Array (
'default' => 'icon16_item.png',
0 => 'icon16_disabled.png',
1 => 'icon16_item.png',
),
'Fields' => Array (
'RuleId' => Array ('title' => 'column:la_fld_Id', 'data_block' => 'grid_checkbox_td', 'filter_block' => 'grid_range_filter', 'width' => 70, ),
'RuleType' => Array ('filter_block' => 'grid_options_filter', 'width' => 100, ),
'ItemField' => Array ('filter_block' => 'grid_options_filter', 'width' => 130, ),
'ItemVerb' => Array ('title' => 'column:la_fld_FieldComparision', 'filter_block' => 'grid_options_filter', 'width' => 100, ),
'ItemValue' => Array ('title' => 'column:la_fld_FieldValue', 'filter_block' => 'grid_like_filter', 'width' => 200, ),
'Status' => Array ('filter_block' => 'grid_options_filter', 'width' => 90, ),
),
),
),
);
\ No newline at end of file
Index: branches/5.2.x/core/units/email_events/email_events_event_handler.php
===================================================================
--- branches/5.2.x/core/units/email_events/email_events_event_handler.php (revision 14725)
+++ branches/5.2.x/core/units/email_events/email_events_event_handler.php (revision 14726)
@@ -1,1136 +1,1136 @@
<?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 EmailEventsEventsHandler extends kDBEventHandler
{
/**
* Allows to override standard permission mapping
*
*/
function mapPermissions()
{
parent::mapPermissions();
$permissions = Array (
'OnFrontOnly' => Array ('self' => 'edit'),
'OnSaveSelected' => Array ('self' => 'view'),
'OnProcessEmailQueue' => Array ('self' => 'add|edit'),
'OnSuggestAddress' => Array ('self' => 'add|edit'),
// events only for developers
'OnPreCreate' => Array ('self' => 'debug'),
'OnDelete' => Array ('self' => 'debug'),
'OnDeleteAll' => Array ('self' => 'debug'),
'OnMassDelete' => Array ('self' => 'debug'),
'OnMassApprove' => Array ('self' => 'debug'),
'OnMassDecline' => Array ('self' => 'debug'),
);
$this->permMapping = array_merge($this->permMapping, $permissions);
}
/**
* Changes permission section to one from REQUEST, not from config
*
* @param kEvent $event
* @return bool
* @access public
*/
public function CheckPermission(&$event)
{
$module = $this->Application->GetVar('module');
if (strlen($module) > 0) {
// checking permission when lising module email events in separate section
$module = explode(':', $module, 2);
if (count($module) == 1) {
$main_prefix = $this->Application->findModule('Name', $module[0], 'Var');
}
else {
$exceptions = Array('Category' => 'c', 'Users' => 'u');
$main_prefix = $exceptions[ $module[1] ];
}
$section = $this->Application->getUnitOption($main_prefix.'.email', 'PermSection');
$event->setEventParam('PermSection', $section);
}
// checking permission when listing all email events when editing language
return parent::CheckPermission($event);
}
/**
* Apply any custom changes to list's sql query
*
* @param kEvent $event
* @return void
* @access protected
* @see kDBEventHandler::OnListBuild()
*/
protected function SetCustomQuery(&$event)
{
$object =& $event->getObject();
/* @var $object kDBList */
if ($event->Special == 'module') {
$module = $this->Application->GetVar('module');
$object->addFilter('module_filter', '%1$s.Module = '.$this->Conn->qstr($module));
}
if (!$event->Special && !$this->Application->isDebugMode()) {
// no special
$object->addFilter('enabled_filter', '%1$s.Enabled <> ' . STATUS_DISABLED);
}
}
/**
* Set default headers
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnPreCreate(&$event)
{
parent::OnPreCreate($event);
$object =& $event->getObject();
/* @var $object kDBItem */
$object->SetDBField('Headers', $this->Application->ConfigValue('Smtp_DefaultHeaders'));
}
/**
* Sets status Front-End Only to selected email events
*
* @param kEvent $event
*/
function OnFrontOnly(&$event)
{
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
return ;
}
$ids = implode(',', $this->StoreSelectedIDs($event));
$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
$sql = 'UPDATE '.$table_name.'
SET FrontEndOnly = 1
WHERE EventId IN ('.$ids.')';
$this->Conn->Query($sql);
$this->clearSelectedIDs($event);
}
/**
* Sets selected user to email events selected
*
* @param kEvent $event
*/
function OnSelectUser(&$event)
{
if ($event->Special != 'module') {
parent::OnSelectUser($event);
return ;
}
if ($this->Application->CheckPermission('SYSTEM_ACCESS.READONLY', 1)) {
$event->status = kEvent::erFAIL;
return ;
}
$items_info = $this->Application->GetVar('u');
if ($items_info) {
$user_id = array_shift( array_keys($items_info) );
$selected_ids = $this->getSelectedIDs($event, true);
$ids = $this->Application->RecallVar($event->getPrefixSpecial().'_selected_ids');
$id_field = $this->Application->getUnitOption($event->Prefix, 'IDField');
$table_name = $this->Application->getUnitOption($event->Prefix, 'TableName');
$sql = 'UPDATE '.$table_name.'
SET '.$this->Application->RecallVar('dst_field').' = '.$user_id.'
WHERE '.$id_field.' IN ('.$ids.')';
$this->Conn->Query($sql);
}
$this->finalizePopup($event);
}
/**
* Saves selected ids to session
*
* @param kEvent $event
*/
function OnSaveSelected(&$event)
{
$this->StoreSelectedIDs($event);
}
/**
* Returns email event object based on given kEvent object
*
* @param kEvent $event
* @return kDBItem
*/
function &_getEmailEvent(&$event)
{
$false = false;
$name = $event->getEventParam('EmailEventName');
$type = $event->getEventParam('EmailEventType');
$object =& $event->getObject( Array('skip_autoload' => true) );
/* @var $object kDBItem */
if (!$object->isLoaded() || ($object->GetDBField('Event') != $name || $object->GetDBField('Type') != $type)) {
// get event parameters by name & type
$load_keys = Array ('Event' => $name, 'Type' => $type);
$object->Load($load_keys);
if (!$object->isLoaded() || ($object->GetDBField('Enabled') == STATUS_DISABLED)) {
// event record not found OR is disabled
return $false;
}
if ($object->GetDBField('FrontEndOnly') && $this->Application->isAdmin) {
return $false;
}
}
return $object;
}
/**
* Processes email sender
*
* @param kEvent $event
* @param Array $direct_params
*/
function _processSender(&$event, $direct_params = Array ())
{
$this->Application->removeObject('u.email-from');
$object =& $this->_getEmailEvent($event);
/* @var $object kDBItem */
$email = $name = '';
// set defaults from event
if ($object->GetDBField('CustomSender')) {
$address = $object->GetDBField('SenderAddress');
$address_type = $object->GetDBField('SenderAddressType');
switch ($address_type) {
case EmailEvent::ADDRESS_TYPE_EMAIL:
$email = $address;
break;
case EmailEvent::ADDRESS_TYPE_USER:
$sql = 'SELECT FirstName, LastName, Email, PortalUserId
FROM ' . TABLE_PREFIX . 'PortalUser
- WHERE Login = ' . $this->Conn->qstr($address);
+ WHERE Username = ' . $this->Conn->qstr($address);
$user_info = $this->Conn->GetRow($sql);
if ($user_info) {
// user still exists
$email = $user_info['Email'];
$name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
$user =& $this->Application->recallObject('u.email-from', null, Array('skip_autoload' => true));
/* @var $user UsersItem */
$user->Load($user_info['PortalUserId']);
}
break;
}
if ($object->GetDBField('SenderName')) {
$name = $object->GetDBField('SenderName');
}
}
// update with custom data given during event execution
if (array_key_exists('from_email', $direct_params)) {
$email = $direct_params['from_email'];
}
if (array_key_exists('from_name', $direct_params)) {
$name = $direct_params['from_name'];
}
// still nothing, set defaults
if (!$email) {
$email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
}
if (!$name) {
$name = strip_tags( $this->Application->ConfigValue('Site_Name') );
}
$esender =& $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
$esender->SetFrom($email, $name);
return Array ($email, $name);
}
/**
* Processes email recipients
*
* @param kEvent $event
* @param Array $direct_params
*/
function _processRecipients(&$event, $direct_params = Array ())
{
$this->Application->removeObject('u.email-to');
$object =& $this->_getEmailEvent($event);
/* @var $object kDBItem */
$to_email = $to_name = '';
$all_recipients = Array ();
$recipients_xml = $object->GetDBField('Recipients');
if ($recipients_xml) {
$minput_helper =& $this->Application->recallObject('MInputHelper');
/* @var $minput_helper MInputHelper */
// group recipients by type
$records = $minput_helper->parseMInputXML($recipients_xml);
foreach ($records as $record) {
$recipient_type = $record['RecipientType'];
if (!array_key_exists($recipient_type, $all_recipients)) {
$all_recipients[$recipient_type] = Array ();
}
$all_recipients[$recipient_type][] = $record;
}
}
if (!array_key_exists(EmailEvent::RECIPIENT_TYPE_TO, $all_recipients)) {
$all_recipients[EmailEvent::RECIPIENT_TYPE_TO] = Array ();
}
// remove all "To" recipients, when not allowed
$overwrite_to_email = array_key_exists('overwrite_to_email', $direct_params) ? $direct_params['overwrite_to_email'] : false;
if (!$object->GetDBField('CustomRecipient') || $overwrite_to_email) {
$all_recipients[EmailEvent::RECIPIENT_TYPE_TO] = Array ();
}
// update with custom data given during event execution (user_id)
$to_user_id = $event->getEventParam('EmailEventToUserId');
if ($to_user_id > 0) {
$sql = 'SELECT FirstName, LastName, Email
FROM ' . TABLE_PREFIX . 'PortalUser
WHERE PortalUserId = ' . $to_user_id;
$user_info = $this->Conn->GetRow($sql);
if ($user_info) {
$add_recipient = Array (
'RecipientAddressType' => EmailEvent::ADDRESS_TYPE_EMAIL,
'RecipientAddress' => $user_info['Email'],
'RecipientName' => trim($user_info['FirstName'] . ' ' . $user_info['LastName']),
);
array_unshift($all_recipients[EmailEvent::RECIPIENT_TYPE_TO], $add_recipient);
$user =& $this->Application->recallObject('u.email-to', null, Array('skip_autoload' => true));
/* @var $user UsersItem */
$user->Load($to_user_id);
}
}
elseif (is_numeric($to_user_id)) {
// recipient is system user with negative ID (root, guest, etc.) -> send to admin
array_unshift($all_recipients[EmailEvent::RECIPIENT_TYPE_TO], $this->_getDefaultRepipient());
}
// update with custom data given during event execution (email + name)
$add_recipient = Array ();
if (array_key_exists('to_email', $direct_params)) {
$add_recipient['RecipientName'] = '';
$add_recipient['RecipientAddressType'] = EmailEvent::ADDRESS_TYPE_EMAIL;
$add_recipient['RecipientAddress'] = $direct_params['to_email'];
}
if (array_key_exists('to_name', $direct_params)) {
$add_recipient['RecipientName'] = $direct_params['to_name'];
}
if ($add_recipient) {
array_unshift($all_recipients[EmailEvent::RECIPIENT_TYPE_TO], $add_recipient);
}
if (($object->GetDBField('Type') == EmailEvent::EVENT_TYPE_ADMIN) && !$all_recipients[EmailEvent::RECIPIENT_TYPE_TO]) {
// admin email event without direct recipient -> send to admin
array_unshift($all_recipients[EmailEvent::RECIPIENT_TYPE_TO], $this->_getDefaultRepipient());
}
$esender =& $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
$header_mapping = Array (
EmailEvent::RECIPIENT_TYPE_TO => 'To',
EmailEvent::RECIPIENT_TYPE_CC => 'Cc',
EmailEvent::RECIPIENT_TYPE_BCC => 'Bcc',
);
$default_email = $this->Application->ConfigValue('Smtp_AdminMailFrom');
foreach ($all_recipients as $recipient_type => $recipients) {
// add recipients to email
$pairs = Array ();
foreach ($recipients as $recipient) {
$address = $recipient['RecipientAddress'];
$address_type = $recipient['RecipientAddressType'];
$repipient_name = $recipient['RecipientName'];
switch ($address_type) {
case EmailEvent::ADDRESS_TYPE_EMAIL:
$pairs[] = Array ('email' => $address, 'name' => $repipient_name);
break;
case EmailEvent::ADDRESS_TYPE_USER:
$sql = 'SELECT FirstName, LastName, Email
FROM ' . TABLE_PREFIX . 'PortalUser
- WHERE Login = ' . $this->Conn->qstr($address);
+ WHERE Username = ' . $this->Conn->qstr($address);
$user_info = $this->Conn->GetRow($sql);
if ($user_info) {
// user still exists
$name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
$pairs[] = Array (
'email' => $user_info['Email'],
'name' => $name ? $name : $repipient_name,
);
}
break;
case EmailEvent::ADDRESS_TYPE_GROUP:
$sql = 'SELECT u.FirstName, u.LastName, u.Email
FROM ' . TABLE_PREFIX . 'PortalGroup g
JOIN ' . TABLE_PREFIX . 'UserGroup ug ON ug.GroupId = g.GroupId
JOIN ' . TABLE_PREFIX . 'PortalUser u ON u.PortalUserId = ug.PortalUserId
WHERE g.Name = ' . $this->Conn->qstr($address);
$users = $this->Conn->Query($sql);
foreach ($users as $user) {
$name = trim($user_info['FirstName'] . ' ' . $user_info['LastName']);
$pairs[] = Array (
'email' => $user_info['Email'],
'name' => $name ? $name : $repipient_name,
);
}
break;
}
}
if (!$pairs) {
continue;
}
if ($recipient_type == EmailEvent::RECIPIENT_TYPE_TO) {
$to_email = $pairs[0]['email'] ? $pairs[0]['email'] : $default_email;
$to_name = $pairs[0]['name'] ? $pairs[0]['name'] : $to_email;
}
$header_name = $header_mapping[$recipient_type];
foreach ($pairs as $pair) {
$email = $pair['email'] ? $pair['email'] : $default_email;
$name = $pair['name'] ? $pair['name'] : $email;
$esender->AddRecipient($header_name, $email, $name);
}
}
return Array ($to_email, $to_name);
}
/**
* This is default recipient, when we can't determine actual one
*
* @return Array
*/
function _getDefaultRepipient()
{
return Array (
'RecipientName' => $this->Application->ConfigValue('Smtp_AdminMailFrom'),
'RecipientAddressType' => EmailEvent::ADDRESS_TYPE_EMAIL,
'RecipientAddress' => $this->Application->ConfigValue('Smtp_AdminMailFrom'),
);
}
/**
* Returns email event message by ID (headers & body in one piece)
*
* @param kEvent $event
* @param int $language_id
*/
function _getMessageBody(&$event, $language_id = null)
{
if (!isset($language_id)) {
$language_id = $this->Application->GetVar('m_lang');
}
$object =& $this->_getEmailEvent($event);
// 1. get message body
$message_body = $this->_formMessageBody($object, $language_id, $object->GetDBField('MessageType'));
// 2. replace tags if needed
$default_replacement_tags = Array (
'<inp:touser _Field="password"' => '<inp2:u_Field name="Password_plain"',
- '<inp:touser _Field="UserName"' => '<inp2:u_Field name="Login"',
+ '<inp:touser _Field="UserName"' => '<inp2:u_Field name="Username"',
'<inp:touser _Field' => '<inp2:u_Field name',
);
$replacement_tags = $object->GetDBField('ReplacementTags');
$replacement_tags = $replacement_tags ? unserialize($replacement_tags) : Array ();
$replacement_tags = array_merge($default_replacement_tags, $replacement_tags);
foreach ($replacement_tags as $replace_from => $replace_to) {
$message_body = str_replace($replace_from, $replace_to, $message_body);
}
return $message_body;
}
/**
* Prepare email message body
*
* @param kDBItem $object
* @param int $language_id
* @return string
*/
function _formMessageBody(&$object, $language_id)
{
$default_language_id = $this->Application->GetDefaultLanguageId();
$fields_hash = Array (
'Headers' => $object->GetDBField('Headers'),
);
// prepare subject
$subject = $object->GetDBField('l' . $language_id . '_Subject');
if (!$subject) {
$subject = $object->GetDBField('l' . $default_language_id . '_Subject');
}
$fields_hash['Subject'] = $subject;
// prepare body
$body = $object->GetDBField('l' . $language_id . '_Body');
if (!$body) {
$body = $object->GetDBField('l' . $default_language_id . '_Body');
}
$fields_hash['Body'] = $body;
$email_message_helper =& $this->Application->recallObject('EmailMessageHelper');
/* @var $email_message_helper EmailMessageHelper */
$ret = $email_message_helper->buildTemplate($fields_hash);
// add footer
$footer = $this->_getFooter($language_id, $object->GetDBField('MessageType'));
if ($ret && $footer) {
$ret .= "\r\n" . $footer;
}
return $ret;
}
/**
* Returns email footer
*
* @param int $language_id
* @param string $message_type
* @return string
*/
function _getFooter($language_id, $message_type)
{
static $footer = null;
if (!isset($footer)) {
$default_language_id = $this->Application->GetDefaultLanguageId();
$sql = 'SELECT l' . $language_id . '_Body, l' . $default_language_id . '_Body
FROM ' . $this->Application->getUnitOption('emailevents', 'TableName') . ' em
WHERE Event = "COMMON.FOOTER"';
$footer_data = $this->Conn->GetRow($sql);
$footer = $footer_data['l' . $language_id . '_Body'];
if (!$footer) {
$footer = $footer_data['l' . $default_language_id . '_Body'];
}
if ($message_type == 'text') {
$esender =& $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
$footer = $esender->ConvertToText($footer);
}
}
return $footer;
}
/**
* Parse message template and return headers (as array) and message body part
*
* @param string $message
* @param Array $direct_params
* @return Array
*/
function ParseMessageBody($message, $direct_params = Array ())
{
$message_language = $this->_getSendLanguage($direct_params);
$this->_changeLanguage($message_language);
$direct_params['message_text'] = isset($direct_params['message']) ? $direct_params['message'] : ''; // parameter alias
// 1. parse template
$this->Application->InitParser();
$parser_params = $this->Application->Parser->Params; // backup parser params
$this->Application->Parser->SetParams( array_merge($parser_params, $direct_params) );
$message = implode('&|&', explode("\n\n", $message, 2)); // preserves double \n in case when tag is located in subject field
$message = $this->Application->Parser->Parse($message, 'email_template', 0);
$this->Application->Parser->SetParams($parser_params); // restore parser params
// 2. replace line endings, that are send with data submitted via request
$message = str_replace("\r\n", "\n", $message); // possible case
$message = str_replace("\r", "\n", $message); // impossible case, but just in case replace this too
// 3. separate headers from body
$message_headers = Array ();
list($headers, $message_body) = explode('&|&', $message, 2);
$category_helper =& $this->Application->recallObject('CategoryHelper');
/* @var $category_helper CategoryHelper */
$message_body = $category_helper->replacePageIds($message_body);
$headers = explode("\n", $headers);
foreach ($headers as $header) {
$header = explode(':', $header, 2);
$message_headers[ trim($header[0]) ] = trim($header[1]);
}
$this->_changeLanguage();
return Array ($message_headers, $message_body);
}
/**
* Raised when email message should be sent
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnEmailEvent(&$event)
{
$email_event_name = $event->getEventParam('EmailEventName');
if ( strpos($email_event_name, '_') !== false ) {
throw new Exception('<span class="debug_error">Invalid email event name</span> <strong>' . $email_event_name . '</strong>. Use only <strong>UPPERCASE characters</strong> and <strong>dots</strong> as email event names');
}
$object =& $this->_getEmailEvent($event);
if ( !is_object($object) ) {
// email event not found OR it's won't be send under given circumstances
return ;
}
// additional parameters from kApplication->EmailEvent
$send_params = $event->getEventParam('DirectSendParams');
// 1. get information about message sender and recipient
list ($from_email, $from_name) = $this->_processSender($event, $send_params);
list ($to_email, $to_name) = $this->_processRecipients($event, $send_params);
// 2. prepare message to be sent
$message_language = $this->_getSendLanguage($send_params);
$message_template = $this->_getMessageBody($event, $message_language);
if ( !trim($message_template) ) {
trigger_error('Message template is empty', E_USER_WARNING);
return ;
}
list ($message_headers, $message_body) = $this->ParseMessageBody($message_template, $send_params);
if ( !trim($message_body) ) {
trigger_error('Message template is empty after parsing', E_USER_WARNING);
return ;
}
// 3. set headers & send message
$esender =& $this->Application->recallObject('EmailSender');
/* @var $esender kEmailSendingHelper */
$message_subject = isset($message_headers['Subject']) ? $message_headers['Subject'] : 'Mail message';
$esender->SetSubject($message_subject);
if ( $this->Application->isDebugMode() ) {
// set special header with event name, so it will be easier to determine what's actually was received
$message_headers['X-Event-Name'] = $email_event_name . ' - ' . ($object->GetDBField('Type') == EmailEvent::EVENT_TYPE_ADMIN ? 'ADMIN' : 'USER');
}
foreach ($message_headers as $header_name => $header_value) {
$esender->SetEncodedHeader($header_name, $header_value);
}
$esender->CreateTextHtmlPart($message_body, $object->GetDBField('MessageType') == 'html');
$event->status = $esender->Deliver() ? kEvent::erSUCCESS : kEvent::erFAIL;
if ( $event->status == kEvent::erSUCCESS ) {
// all keys, that are not used in email sending are written to log record
$send_keys = Array ('from_email', 'from_name', 'to_email', 'to_name', 'message');
foreach ($send_keys as $send_key) {
unset($send_params[$send_key]);
}
$fields_hash = Array (
'fromuser' => $from_name . ' (' . $from_email . ')',
'addressto' => $to_name . ' (' . $to_email . ')',
'subject' => $message_subject,
'timestamp' => adodb_mktime(),
'event' => $email_event_name,
'EventParams' => serialize($send_params),
);
$this->Conn->doInsert($fields_hash, TABLE_PREFIX . 'EmailLog');
}
}
function _getSendLanguage($send_params)
{
if (array_key_exists('language_id', $send_params)) {
return $send_params['language_id'];
}
return $this->Application->GetVar('m_lang');
}
function _changeLanguage($language_id = null)
{
static $prev_language_id = null;
if ( !isset($language_id) ) {
// restore language
$language_id = $prev_language_id;
}
$this->Application->SetVar('m_lang', $language_id);
$language =& $this->Application->recallObject('lang.current');
/* @var $language LanguagesItem */
$language->Load($language_id);
$this->Application->Phrases->LanguageId = $language_id;
$this->Application->Phrases->Phrases = Array ();
$prev_language_id = $language_id; // for restoring it later
}
/**
* Process emails from queue
*
* @param kEvent $event
* @todo Move to MailingList
*/
function OnProcessEmailQueue(&$event)
{
$deliver_count = $event->getEventParam('deliver_count');
if ($deliver_count === false) {
$deliver_count = $this->Application->ConfigValue('MailingListSendPerStep');
if ($deliver_count === false) {
$deliver_count = 10; // 10 emails per script run (if not specified directly)
}
}
$processing_type = $this->Application->GetVar('type');
if ($processing_type = 'return_progress') {
$email_queue_progress = $this->Application->RecallVar('email_queue_progress');
if ($email_queue_progress === false) {
$emails_sent = 0;
$sql = 'SELECT COUNT(*)
FROM ' . TABLE_PREFIX . 'EmailQueue
WHERE (SendRetries < 5) AND (LastSendRetry < ' . strtotime('-2 hours') . ')';
$total_emails = $this->Conn->GetOne($sql);
$this->Application->StoreVar('email_queue_progress', $emails_sent.':'.$total_emails);
}
else {
list ($emails_sent, $total_emails) = explode(':', $email_queue_progress);
}
}
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'EmailQueue
WHERE (SendRetries < 5) AND (LastSendRetry < ' . strtotime('-2 hours') . ')
LIMIT 0,' . $deliver_count;
$messages = $this->Conn->Query($sql);
$message_count = count($messages);
if (!$message_count) {
// no messages left to send in queue
if ($processing_type = 'return_progress') {
$this->Application->RemoveVar('email_queue_progress');
$this->Application->Redirect($this->Application->GetVar('finish_template'));
}
return ;
}
$mailing_list_helper =& $this->Application->recallObject('MailingListHelper');
/* @var $mailing_list_helper MailingListHelper */
$mailing_list_helper->processQueue($messages);
if ($processing_type = 'return_progress') {
$emails_sent += $message_count;
if ($emails_sent >= $total_emails) {
$this->Application->RemoveVar('email_queue_progress');
$this->Application->Redirect($this->Application->GetVar('finish_template'));
}
$this->Application->StoreVar('email_queue_progress', $emails_sent.':'.$total_emails);
$event->status = kEvent::erSTOP;
echo ($emails_sent / $total_emails) * 100;
}
}
/**
* Prefills module dropdown
*
* @param kEvent $event
*/
function OnAfterConfigRead(&$event)
{
parent::OnAfterConfigRead($event);
$options = Array ();
foreach ($this->Application->ModuleInfo as $module_name => $module_info) {
if ($module_name == 'In-Portal') {
continue;
}
$options[$module_name] = $module_name;
}
$fields = $this->Application->getUnitOption($event->Prefix, 'Fields');
$fields['Module']['options'] = $options;
$this->Application->setUnitOption($event->Prefix, 'Fields', $fields);
if ($this->Application->GetVar('regional')) {
$this->Application->setUnitOption($event->Prefix, 'PopulateMlFields', true);
}
}
/**
* Prepare temp tables and populate it
* with items selected in the grid
*
* @param kEvent $event
*/
function OnEdit(&$event)
{
parent::OnEdit($event);
// use language from grid, instead of primary language used by default
$event->SetRedirectParam('m_lang', $this->Application->GetVar('m_lang'));
}
/**
* Fixes default recipient type
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnAfterItemLoad(&$event)
{
parent::OnAfterItemLoad($event);
$object =& $event->getObject();
/* @var $object kDBItem */
if (!$this->Application->isDebugMode(false)) {
if ($object->GetDBField('AllowChangingRecipient')) {
$object->SetDBField('RecipientType', EmailEvent::RECIPIENT_TYPE_TO);
}
else {
$object->SetDBField('RecipientType', EmailEvent::RECIPIENT_TYPE_CC);
}
}
// process replacement tags
$records = Array ();
$replacement_tags = $object->GetDBField('ReplacementTags');
$replacement_tags = $replacement_tags ? unserialize($replacement_tags) : Array ();
foreach ($replacement_tags as $tag => $replacement) {
$records[] = Array ('Tag' => $tag, 'Replacement' => $replacement);
}
$minput_helper =& $this->Application->recallObject('MInputHelper');
/* @var $minput_helper MInputHelper */
$xml = $minput_helper->prepareMInputXML($records, Array ('Tag', 'Replacement'));
$object->SetDBField('ReplacementTagsXML', $xml);
}
/**
* Performs custom validation + keep read-only fields
*
* @param kEvent $event
*/
function _itemChanged(&$event)
{
$object =& $event->getObject();
/* @var $object kDBItem */
// validate email subject and body for parsing errors
$this->_validateEmailTemplate($object);
// validate sender and recipient addresses
if ($object->GetDBField('CustomSender')) {
$this->_validateAddress($event, 'Sender');
}
$this->_validateAddress($event, 'Recipient');
if (!$this->Application->isDebugMode(false)) {
// only allow to enable/disable event while in debug mode
$to_restore = Array ('Enabled', 'AllowChangingSender', 'AllowChangingRecipient');
if (!$object->GetOriginalField('AllowChangingSender')) {
$to_restore = array_merge($to_restore, Array ('CustomSender', 'SenderName', 'SenderAddressType', 'SenderAddress'));
}
if (!$object->GetOriginalField('AllowChangingRecipient')) {
$to_restore = array_merge($to_restore, Array ('CustomRecipient'/*, 'Recipients'*/));
}
// prevent specific fields from editing
foreach ($to_restore as $restore_field) {
$original_value = $object->GetOriginalField($restore_field);
if ($object->GetDBField($restore_field) != $original_value) {
$object->SetDBField($restore_field, $original_value);
}
}
}
// process replacement tags
if ( $object->GetDBField('ReplacementTagsXML') ) {
$minput_helper =& $this->Application->recallObject('MInputHelper');
/* @var $minput_helper MInputHelper */
$replacement_tags = Array ();
$records = $minput_helper->parseMInputXML( $object->GetDBField('ReplacementTagsXML') );
foreach ($records as $record) {
$replacement_tags[ trim($record['Tag']) ] = trim($record['Replacement']);
}
$object->SetDBField('ReplacementTags', $replacement_tags ? serialize($replacement_tags) : NULL);
}
}
/**
* Validates address using given field prefix
*
* @param kEvent $event
* @param string $field_prefix
*/
function _validateAddress(&$event, $field_prefix)
{
$object =& $event->getObject();
/* @var $object kDBItem */
$address_type = $object->GetDBField($field_prefix . 'AddressType');
$object->setRequired($field_prefix . 'Address', $address_type > 0);
$address = $object->GetDBField($field_prefix . 'Address');
if (!$address) {
// don't validate against empty address
return ;
}
switch ($address_type) {
case EmailEvent::ADDRESS_TYPE_EMAIL:
if (!preg_match('/^(' . REGEX_EMAIL_USER . '@' . REGEX_EMAIL_DOMAIN . ')$/i', $address)) {
$object->SetError($field_prefix . 'Address', 'invalid_email');
}
break;
case EmailEvent::ADDRESS_TYPE_USER:
$sql = 'SELECT PortalUserId
FROM ' . TABLE_PREFIX . 'PortalUser
- WHERE Login = ' . $this->Conn->qstr($address);
+ WHERE Username = ' . $this->Conn->qstr($address);
if (!$this->Conn->GetOne($sql)) {
$object->SetError($field_prefix . 'Address', 'invalid_user');
}
break;
case EmailEvent::ADDRESS_TYPE_GROUP:
$sql = 'SELECT GroupId
FROM ' . TABLE_PREFIX . 'PortalGroup
WHERE Name = ' . $this->Conn->qstr($address);
if (!$this->Conn->GetOne($sql)) {
$object->SetError($field_prefix . 'Address', 'invalid_group');
}
break;
}
}
/**
* Don't allow to enable/disable events in non-debug mode
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemCreate(&$event)
{
parent::OnBeforeItemCreate($event);
$this->_itemChanged($event);
}
/**
* Don't allow to enable/disable events in non-debug mode
*
* @param kEvent $event
* @return void
* @access protected
*/
protected function OnBeforeItemUpdate(&$event)
{
parent::OnBeforeItemUpdate($event);
$this->_itemChanged($event);
}
/**
* Suggest address based on typed address and selected address type
*
* @param kEvent $event
*/
function OnSuggestAddress(&$event)
{
$event->status = kEvent::erSTOP;
$address_type = $this->Application->GetVar('type');
$address = $this->Application->GetVar('value');
$limit = $this->Application->GetVar('limit');
if (!$limit) {
$limit = 20;
}
switch ($address_type) {
case EmailEvent::ADDRESS_TYPE_EMAIL:
$field = 'Email';
$table_name = TABLE_PREFIX . 'PortalUser';
break;
case EmailEvent::ADDRESS_TYPE_USER:
- $field = 'Login';
+ $field = 'Username';
$table_name = TABLE_PREFIX . 'PortalUser';
break;
case EmailEvent::ADDRESS_TYPE_GROUP:
$field = 'Name';
$table_name = TABLE_PREFIX . 'PortalGroup';
break;
}
if (isset($field)) {
$sql = 'SELECT DISTINCT ' . $field . '
FROM ' . $table_name . '
WHERE ' . $field . ' LIKE ' . $this->Conn->qstr($address . '%') . '
ORDER BY ' . $field . ' ASC
LIMIT 0,' . $limit;
$data = $this->Conn->GetCol($sql);
}
else {
$data = Array ();
}
$this->Application->XMLHeader();
echo '<suggestions>';
foreach ($data as $item) {
echo '<item>' . htmlspecialchars($item) . '</item>';
}
echo '</suggestions>';
}
/**
* Validates subject and body fields of Email template
* @param kDBItem $object
*/
function _validateEmailTemplate(&$object)
{
$this->parseField($object, 'Subject');
$this->parseField($object, 'Body');
}
/**
* Parses contents of given object field and sets error, when invalid in-portal tags found
* @param kDBItem $object
* @param string $field
* @return void
*/
function parseField(&$object, $field)
{
$this->Application->InitParser();
try {
$this->Application->Parser->CompileRaw($object->GetField($field), 'email_template');
}
catch (ParserException $e) {
if ( $this->Application->isDebugMode() ) {
$this->Application->Debugger->appendHTML('<b style="color: red;">Error in Email Template:</b> ' . $e->getMessage() . ' (line: ' . $e->getLine() . ')');
}
$object->SetError($field, 'parsing_error');
}
}
}
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/users/user_edit_items.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/users/user_edit_items.tpl (revision 14725)
+++ branches/5.2.x/core/admin_templates/users/user_edit_items.tpl (revision 14726)
@@ -1,170 +1,170 @@
<inp2:adm_SetPopupSize width="720" height="500"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" prefix="u" title_preset="user_edit_items" tab_preset="Default"/>
<inp2:m_include template="catalog/catalog_elements"/>
<!-- ToolBar -->
<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td>
<link rel="stylesheet" rev="stylesheet" href="<inp2:m_Compress files='incs/nlsmenu.css'/>" type="text/css" />
<script type="text/javascript" src="<inp2:m_Compress files='
js/nlsmenu.js|
js/nlsmenueffect_1_2_1.js|
js/catalog.js
'/>"></script>
<script type="text/javascript">
var menuMgr = new NlsMenuManager("mgr");
menuMgr.timeout = 500;
menuMgr.flowOverFormElement = true;
Request.progressText = '<inp2:m_phrase name="la_title_Loading" no_editing="1" escape="1"/>';
Catalog.prototype.AfterInit = function () {
this.switchTab(); // refresh current item tab
}
/*Catalog.prototype.refreshTab = function($prefix, $div_id, $force) {
// query tab content only in case if not queried or category don't match
var $cat_id = get_hidden_field('m_cat_id');
var $tab_cat_id = document.getElementById($div_id).getAttribute('category_id');
if ($cat_id != $tab_cat_id || $force) {
var $url = this.URLMask.replace('#TEMPLATE_NAME#', this.queryTabRegistry('prefix', $prefix, 'module_path') + '/user_item_tab');
this.BusyRequest[$prefix] = false;
Request.makeRequest($url, this.BusyRequest[$prefix], $div_id, this.successCallback, this.errorCallback, $div_id, this);
}
}*/
var $Catalog = new Catalog('<inp2:m_Link template="#TEMPLATE_NAME#" pass_through="ts" ts="user" pass="m,u" no_amp="1"/>', 'useritems_', 'UserItemEditor');
a_toolbar = new ToolBar();
a_toolbar.AddButton( new ToolBarButton('select', '<inp2:m_phrase label="la_ToolTip_Save" escape="1"/>', function() {
submit_event('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
submit_event('u','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('u', '<inp2:u_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('u', '<inp2:u_NextId/>');
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep2') );
a_toolbar.AddButton( new ToolBarButton('edit', '<inp2:m_phrase label="la_ToolTip_Edit" escape="1"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('delete', '<inp2:m_phrase label="la_ToolTip_Delete" escape="1"/>',
function() {
var $template = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'view_template');
$form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + '.user]', 1);
std_delete_items($Catalog.ActivePrefix, $template, 1);
} ) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
function edit() {
$form_name = $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'tab_id') + '_form';
var $kf = document.getElementById($form_name);
var $prev_action = $kf.action;
$kf.action = '<inp2:m_t pass="all" no_pass_through="1"/>';
set_hidden_field('remove_specials[' + $Catalog.ActivePrefix + ']', 1);
std_edit_item(
$Catalog.ActivePrefix, $Catalog.queryTabRegistry('prefix', $Catalog.ActivePrefix, 'edit_template'),
function() {
$kf.action = $prev_action;
}
);
}
a_toolbar.Render();
<inp2:m_if check="u_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="u_IsLast">
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="u_IsFirst">
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
<inp2:m_RenderElement name="catalog_search_box"/>
</tr>
</tbody>
</table>
<inp2:m_RenderElement name="kernel_form_end"/>
<inp2:u_SaveWarning name="grid_save_warning"/>
<inp2:u_ErrorWarning name="form_error_warning"/>
<div id="scroll_container" mode="minimal">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" prefix="u" fields="PortalUserId,Login" title="la_section_General"/>
+ <inp2:m_RenderElement name="subsection" prefix="u" fields="PortalUserId,Username" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="u" field="PortalUserId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_label" prefix="u" field="Login" title="la_fld_Username"/>
+ <inp2:m_RenderElement name="inp_label" prefix="u" field="Username" title="la_fld_Username"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
<inp2:m_RenderElement name="subsection" title="la_section_Items"/>
</table>
</div>
<br />
<!-- item tabs: begin -->
<inp2:m_DefineElement name="item_tab" title="" special=".user">
<td class="tab-spacer"><img src="img/spacer.gif" width="3" height="1"/></td>
<td id="<inp2:m_param name="prefix"/><inp2:m_param name="special"/>_tab" class="tab">
<img src="<inp2:m_TemplatesBase module='$icon_module'/>/img/itemicons/<inp2:m_Param name='icon'/>" width="16" height="16" align="absmiddle" alt=""/>
<a href="#" onclick="$Catalog.switchTab('<inp2:m_param name="prefix"/><inp2:m_Param name="special"/>'); return false;" class="tab-link">
<inp2:m_Phrase name="$title"/> <span class="small-statistics" style="color: inherit;">(<span id="<inp2:m_param name="prefix"/><inp2:m_Param name="special"/>_item_count">?</span>)</span>
</a>
</td>
</inp2:m_DefineElement>
<inp2:m_DefineElement name="user_items_tabs">
<inp2:m_ModuleInclude template="user_item_tab" tab_init="2" title_property="ViewMenuPhrase" skip_prefixes="m,adm,cms"/>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="tabs_container" tabs_render_as="user_items_tabs"/>
<!-- item tabs: end -->
<inp2:m_set ts="user"/>
<inp2:m_ModuleInclude template="user_item_tab" tab_init="1" skip_prefixes="m,adm,cms"/>
<script type="text/javascript">
addLoadEvent(
function() {
$Catalog.Init(false);
}
);
</script>
<inp2:m_include t="incs/footer" noform="yes"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/users/user_edit_password.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/users/user_edit_password.tpl (revision 14725)
+++ branches/5.2.x/core/admin_templates/users/user_edit_password.tpl (revision 14726)
@@ -1,44 +1,44 @@
<inp2:adm_SetPopupSize width="564" height="377"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" perm_section="ADMIN" permission_type="" prefix="u" title_preset="admins_edit"/>
<!-- 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('u','OnUpdatePassword');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('u','OnCancelEdit','<inp2:u_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
) );
a_toolbar.Render();
</script>
</td>
</tr>
</tbody>
</table>
<inp2:u_SaveWarning name="grid_save_warning"/>
<inp2:u_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="inp_id_label" prefix="u" field="PortalUserId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_label" prefix="u" field="Login" title="la_fld_Username"/>
+ <inp2:m_RenderElement name="inp_label" prefix="u" field="Username" title="la_fld_Username"/>
<inp2:m_RenderElement name="inp_edit_password" prefix="u" field="Password" title="la_fld_Password"/>
<inp2:m_RenderElement name="inp_edit_password" prefix="u" field="VerifyPassword" title="la_fld_VerifyPassword"/>
<inp2:m_RenderElement name="inp_label" prefix="u" field="FirstName" title="la_fld_FirstName"/>
<inp2:m_RenderElement name="inp_label" prefix="u" field="LastName" title="la_fld_LastName"/>
<inp2:m_RenderElement name="inp_label" prefix="u" field="Email" title="la_fld_Email"/>
<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/users/users_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/users/users_edit.tpl (revision 14725)
+++ branches/5.2.x/core/admin_templates/users/users_edit.tpl (revision 14726)
@@ -1,116 +1,116 @@
<inp2:adm_SetPopupSize width="720" height="500"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:user_list" prefix="u" title_preset="users_edit" 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('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('u','OnCancelEdit','<inp2:u_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('u', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
) );
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('u', '<inp2:u_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('u', '<inp2:u_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="u_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="u_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="u_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:u_SaveWarning name="grid_save_warning"/>
<inp2:u_ErrorWarning name="form_error_warning"/>
<inp2:m_include template="users/user_blocks"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" prefix="u" fields="PortalUserId,Login,Password" title="la_section_General"/>
+ <inp2:m_RenderElement name="subsection" prefix="u" fields="PortalUserId,Username,Password" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="u" field="PortalUserId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Login" title="la_fld_Username"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Username" title="la_fld_Username"/>
<inp2:m_RenderElement name="password_fields" />
<inp2:m_RenderElement name="subsection" prefix="u" fields="FirstName,LastName,Company,Email,dob,Phone,Fax,Street,Street2,City,State,Zip,Country" title="la_prompt_PersonalInfo"/> <!-- OLD PHRASE, la_section_PersonalInformation -->
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="FirstName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="LastName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Company"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Email"/>
<inp2:m_RenderElement name="inp_edit_date" prefix="u" field="dob" title="la_prompt_birthday"/> <!-- OLD PHRASE, la_fld_BirthDate -->
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Phone"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Fax"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Street" title="la_fld_AddressLine1"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Street2" title="la_fld_AddressLine2"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="City"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="State"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Zip"/>
<inp2:m_RenderElement name="inp_edit_options" prefix="u" field="Country" has_empty="1"/>
<inp2:m_RenderElement name="inp_edit_multioptions" prefix="u" field="DisplayToPublic"/>
<inp2:m_RenderElement name="subsection" prefix="u" fields="Status,CreatedOn,Modified,IPAddress,IPRestrictions" title="la_section_Properties"/>
<inp2:m_RenderElement name="inp_edit_radio" prefix="u" field="Status"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="u" field="CreatedOn"/>
<inp2:m_RenderElement name="inp_edit_date_time" prefix="u" field="Modified"/>
<inp2:m_if check="u_Field" name="IPAddress">
<inp2:m_RenderElement name="inp_label" prefix="u" field="IPAddress"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="u" field="IPRestrictions" allow_html="0" hint_label="la_hint_DomainIPRange" control_options="{max_height: 100}"/>
<inp2:m_if check="m_ModuleEnabled" module="In-Portal">
<!-- custom fields: begin -->
<inp2:m_include t="incs/custom_blocks"/>
<inp2:cf.general_PrintList render_as="cv_row_block" SourcePrefix="u" value_field="Value" per_page="-1" grid="Default" original_title="la_section_OriginalValues" display_original="1"/>
<!-- custom fields: end -->
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script type="text/javascript">
$(document).ready(
function() {
<inp2:m_RenderElement name="password_fields_js" />
}
);
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/users/user_selector.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/users/user_selector.tpl (revision 14725)
+++ branches/5.2.x/core/admin_templates/users/user_selector.tpl (revision 14726)
@@ -1,52 +1,52 @@
<inp2:adm_SetPopupSize width="582" height="504"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="u.group" section="in-portal:user_list" grid="UserSelector" title_preset="group_user_select" pagination="1"/>
<!-- 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"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
function edit()
{
set_hidden_field('remove_specials[u.group]', 1);
submit_event('<inp2:m_recall name="main_prefix"/>', 'OnProcessSelected');
}
</script>
</td>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_login_td" format="" no_special="1" nl2br="" first_chars="" td_style="">
<inp2:Field field="$field" first_chars="$first_chars" nl2br="$nl2br" grid="$grid" no_special="$no_special" format="$format"/>
<script type="text/javascript">
- $user_logins[ <inp2:Field name="$IdField"/> ] = '<inp2:Field name="Login" js_ecape="1"/>';
+ $user_logins[ <inp2:Field name="$IdField"/> ] = '<inp2:Field name="Username" js_escape="1"/>';
</script>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="u.group" IdField="PortalUserId" grid="UserSelector"/>
<script type="text/javascript">
Grids['u.group'].SetDependantToolbarButtons( new Array('select') );
// Grids['u'].DblClick = function() {return false};
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/users/admins_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/users/admins_edit.tpl (revision 14725)
+++ branches/5.2.x/core/admin_templates/users/admins_edit.tpl (revision 14726)
@@ -1,97 +1,97 @@
<inp2:adm_SetPopupSize width="700" height="440"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:admins" prefix="u" title_preset="admins_edit" tab_preset="Admins"/>
<!-- 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('u','<inp2:u_SaveEvent/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('u','OnCancelEdit','<inp2:u_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('u', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
) );
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('u', '<inp2:u_PrevId/>');
}
) );
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('u', '<inp2:u_NextId/>');
}
) );
a_toolbar.Render();
<inp2:m_if check="u_IsSingle" >
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="u_IsLast" >
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="u_IsFirst" >
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
</td>
</tr>
</tbody>
</table>
<inp2:u_SaveWarning name="grid_save_warning"/>
<inp2:u_ErrorWarning name="form_error_warning"/>
<inp2:m_include template="users/user_blocks"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="u" field="UserType"/>
<inp2:m_RenderElement name="inp_edit_hidden" prefix="u" field="PrimaryGroupId"/>
<div id="scroll_container">
<table class="edit-form">
- <inp2:m_RenderElement name="subsection" prefix="u" fields="PortalUserId,Login,Password,FirstName,LastName,Email" title="la_section_General"/>
+ <inp2:m_RenderElement name="subsection" prefix="u" fields="PortalUserId,Username,Password,FirstName,LastName,Email" title="la_section_General"/>
<inp2:m_RenderElement name="inp_id_label" prefix="u" field="PortalUserId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Login" title="la_fld_Username"/>
+ <inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Username" title="la_fld_Username"/>
<inp2:m_RenderElement name="password_fields" />
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="FirstName" title="la_fld_FirstName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="LastName" title="la_fld_LastName"/>
<inp2:m_RenderElement name="inp_edit_box" prefix="u" field="Email" title="la_fld_Email"/>
<inp2:m_RenderElement name="subsection" prefix="u" fields="IPAddress,IPRestrictions" title="la_section_Properties"/>
<inp2:m_if check="u_Field" name="IPAddress">
<inp2:m_RenderElement name="inp_label" prefix="u" field="IPAddress"/>
</inp2:m_if>
<inp2:m_RenderElement name="inp_edit_textarea" prefix="u" field="IPRestrictions" allow_html="0" hint_label="la_hint_DomainIPRange" control_options="{max_height: 100}"/>
<inp2:m_RenderElement name="inp_edit_filler"/>
</table>
</div>
<script type="text/javascript">
$(document).ready(
function() {
<inp2:m_RenderElement name="password_fields_js" />
}
);
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/admin_templates/logs/change_logs/change_log_edit.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/logs/change_logs/change_log_edit.tpl (revision 14725)
+++ branches/5.2.x/core/admin_templates/logs/change_logs/change_log_edit.tpl (revision 14726)
@@ -1,87 +1,87 @@
<inp2:adm_SetPopupSize width="750" height="570"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" section="in-portal:change_logs" prefix="change-log" title_preset="change_log_edit"/>
<!-- 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('change-log','<inp2:change-log_SaveEvent/>');
}
));
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
cancel_edit('change-log','OnCancelEdit','<inp2:change-log_SaveEvent/>','<inp2:m_Phrase label="la_FormCancelConfirmation" escape="1"/>');
}
));
a_toolbar.AddButton( new ToolBarButton('reset_edit', '<inp2:m_phrase label="la_ToolTip_Reset" escape="1"/>', function() {
reset_form('change-log', 'OnReset', '<inp2:m_Phrase label="la_FormResetConfirmation" escape="1"/>');
}
));
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('change-log', '<inp2:change-log_PrevId/>');
}
));
a_toolbar.AddButton( new ToolBarButton('next', '<inp2:m_phrase label="la_ToolTip_Next" escape="1"/>', function() {
go_to_id('change-log', '<inp2:change-log_NextId/>');
}
));
a_toolbar.Render();
<inp2:m_if check="change-log_IsSingle">
a_toolbar.HideButton('prev');
a_toolbar.HideButton('next');
a_toolbar.HideButton('sep1');
<inp2:m_else/>
<inp2:m_if check="change-log_IsLast">
a_toolbar.DisableButton('next');
</inp2:m_if>
<inp2:m_if check="change-log_IsFirst">
a_toolbar.DisableButton('prev');
</inp2:m_if>
</inp2:m_if>
</script>
<script src="js/swfobject.js" type="text/javascript"></script>
<script type="text/javascript" src="js/uploader.js"></script>
</td>
</tr>
</tbody>
</table>
<inp2:change-log_SaveWarning name="grid_save_warning"/>
<inp2:change-log_ErrorWarning name="form_error_warning"/>
<div id="scroll_container">
<table class="edit-form">
<inp2:m_RenderElement name="subsection" title="la_section_Page"/>
<inp2:m_RenderElement name="inp_id_label" prefix="change-log" field="ChangeLogId" title="la_fld_Id"/>
- <inp2:m_RenderElement name="inp_label" prefix="change-log" field="UserLogin" title="la_fld_Login" style="width: 100px"/>
+ <inp2:m_RenderElement name="inp_label" prefix="change-log" field="UserLogin" title="la_fld_Username" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="UserFirstName" title="la_fld_FirstName" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="UserLastName" title="la_fld_LastName" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="SessionLogId" title="la_fld_SessionLogId" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="Action" title="la_fld_Action" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="OccuredOn" title="la_fld_OccuredOn" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="MasterPrefix" title="la_fld_MasterPrefix" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="MasterId" title="la_fld_MasterId" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="Prefix" title="la_fld_Prefix" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="ItemId" title="la_fld_ItemId" style="width: 100px"/>
<inp2:m_RenderElement name="inp_label" prefix="change-log" field="Changes" no_special="1" title="la_fld_Changes" style="width: 100px"/>
<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/user_selector.tpl
===================================================================
--- branches/5.2.x/core/admin_templates/user_selector.tpl (revision 14725)
+++ branches/5.2.x/core/admin_templates/user_selector.tpl (revision 14726)
@@ -1,61 +1,61 @@
<inp2:adm_SetPopupSize width="582" height="504"/>
<inp2:m_include t="incs/header"/>
<inp2:m_RenderElement name="combined_header" prefix="u" section="in-portal:user_list" grid="UserSelector" title_preset="user_select" pagination="1"/>
<!-- 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"/>', edit) );
a_toolbar.AddButton( new ToolBarButton('cancel', '<inp2:m_phrase label="la_ToolTip_Cancel" escape="1"/>', function() {
window_close();
}
) );
a_toolbar.AddButton( new ToolBarSeparator('sep3') );
a_toolbar.AddButton( new ToolBarButton('view', '<inp2:m_phrase label="la_ToolTip_View" escape="1"/>', function() {
show_viewmenu(a_toolbar,'view');
}
) );
a_toolbar.Render();
function edit() {
var $opener = getWindowOpener(window);
if ( $.isFunction($opener.processUserSelector) ) {
$opener.processUserSelector('<inp2:m_Recall name="dst_field"/>', window);
window_close();
}
else {
submit_event('<inp2:m_Recall name="main_prefix"/>', 'OnSelectUser');
}
}
var $user_logins = {};
</script>
</td>
<inp2:m_RenderElement name="search_main_toolbar" prefix="u" grid="UserSelector"/>
</tr>
</tbody>
</table>
<inp2:m_DefineElement name="grid_login_td" format="" nl2br="" no_special="1" first_chars="" td_style="">
<inp2:Field field="$field" first_chars="$first_chars" nl2br="$nl2br" grid="$grid" no_special="$no_special" format="$format"/>
<script type="text/javascript">
- $user_logins[ <inp2:Field name="$IdField"/> ] = '<inp2:Field name="Login" js_escape="1"/>';
+ $user_logins[ <inp2:Field name="$IdField"/> ] = '<inp2:Field name="Username" js_escape="1"/>';
</script>
</inp2:m_DefineElement>
<inp2:m_RenderElement name="grid" PrefixSpecial="u" IdField="PortalUserId" grid="UserSelector"/>
<script type="text/javascript">
Grids['u'].SetDependantToolbarButtons( new Array('select') );
</script>
<inp2:m_include t="incs/footer"/>
\ No newline at end of file
Index: branches/5.2.x/core/install/install_schema.sql
===================================================================
--- branches/5.2.x/core/install/install_schema.sql (revision 14725)
+++ branches/5.2.x/core/install/install_schema.sql (revision 14726)
@@ -1,1232 +1,1232 @@
CREATE TABLE PermissionConfig (
PermissionConfigId int(11) NOT NULL auto_increment,
PermissionName varchar(30) NOT NULL default '',
Description varchar(255) NOT NULL default '',
ModuleId varchar(20) NOT NULL default '0',
IsSystem tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (PermissionConfigId),
KEY PermissionName (PermissionName)
);
CREATE TABLE Permissions (
PermissionId int(11) NOT NULL auto_increment,
Permission varchar(255) NOT NULL default '',
GroupId int(11) default '0',
PermissionValue int(11) NOT NULL default '0',
`Type` tinyint(4) NOT NULL default '0',
CatId int(11) NOT NULL default '0',
PRIMARY KEY (PermissionId),
UNIQUE KEY PermIndex (Permission,GroupId,CatId,`Type`)
);
CREATE TABLE CustomField (
CustomFieldId int(11) NOT NULL auto_increment,
`Type` int(11) NOT NULL default '0',
FieldName varchar(255) NOT NULL default '',
FieldLabel varchar(40) default NULL,
MultiLingual tinyint(3) unsigned NOT NULL default '1',
Heading varchar(60) default NULL,
Prompt varchar(60) default NULL,
ElementType varchar(50) NOT NULL default '',
ValueList text,
DefaultValue varchar(255) NOT NULL default '',
DisplayOrder int(11) NOT NULL default '0',
OnGeneralTab tinyint(4) NOT NULL default '0',
IsSystem tinyint(3) unsigned NOT NULL default '0',
IsRequired tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (CustomFieldId),
KEY `Type` (`Type`),
KEY MultiLingual (MultiLingual),
KEY DisplayOrder (DisplayOrder),
KEY OnGeneralTab (OnGeneralTab),
KEY IsSystem (IsSystem),
KEY DefaultValue (DefaultValue)
);
CREATE TABLE ConfigurationValues (
VariableId int(11) NOT NULL AUTO_INCREMENT,
VariableName varchar(255) NOT NULL DEFAULT '',
VariableValue text,
ModuleOwner varchar(20) DEFAULT 'In-Portal',
Section varchar(255) NOT NULL DEFAULT '',
Heading varchar(255) NOT NULL DEFAULT '',
Prompt varchar(255) NOT NULL DEFAULT '',
ElementType varchar(255) NOT NULL DEFAULT '',
Validation text,
ValueList text,
DisplayOrder double NOT NULL DEFAULT '0',
GroupDisplayOrder double NOT NULL DEFAULT '0',
`Install` int(11) NOT NULL DEFAULT '1',
HintLabel varchar(255) DEFAULT NULL,
PRIMARY KEY (VariableId),
UNIQUE KEY VariableName (VariableName),
KEY DisplayOrder (DisplayOrder),
KEY GroupDisplayOrder (GroupDisplayOrder),
KEY `Install` (`Install`),
KEY HintLabel (HintLabel)
);
CREATE TABLE EmailQueue (
EmailQueueId int(10) unsigned NOT NULL AUTO_INCREMENT,
ToEmail varchar(255) NOT NULL DEFAULT '',
`Subject` varchar(255) NOT NULL DEFAULT '',
MessageHeaders text,
MessageBody longtext,
Queued int(10) unsigned DEFAULT NULL,
SendRetries int(10) unsigned NOT NULL DEFAULT '0',
LastSendRetry int(10) unsigned DEFAULT NULL,
MailingId int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (EmailQueueId),
KEY LastSendRetry (LastSendRetry),
KEY SendRetries (SendRetries),
KEY MailingId (MailingId)
);
CREATE TABLE Events (
EventId int(11) NOT NULL AUTO_INCREMENT,
`Event` varchar(40) NOT NULL DEFAULT '',
ReplacementTags text,
AllowChangingSender tinyint(4) NOT NULL DEFAULT '0',
CustomSender tinyint(4) NOT NULL DEFAULT '0',
SenderName varchar(255) NOT NULL DEFAULT '',
SenderAddressType tinyint(4) NOT NULL DEFAULT '0',
SenderAddress varchar(255) NOT NULL DEFAULT '',
AllowChangingRecipient tinyint(4) NOT NULL DEFAULT '0',
CustomRecipient tinyint(4) NOT NULL DEFAULT '0',
Recipients text,
l1_Subject text,
l2_Subject text,
l3_Subject text,
l4_Subject text,
l5_Subject text,
l1_Body longtext,
l2_Body longtext,
l3_Body longtext,
l4_Body longtext,
l5_Body longtext,
Headers text,
MessageType varchar(4) NOT NULL DEFAULT 'text',
Enabled int(11) NOT NULL DEFAULT '1',
FrontEndOnly tinyint(3) unsigned NOT NULL DEFAULT '0',
Module varchar(40) NOT NULL DEFAULT 'Core',
Description text,
`Type` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (EventId),
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY `Event` (`Event`),
KEY FrontEndOnly (FrontEndOnly),
KEY AllowChangingSender (AllowChangingSender),
KEY CustomSender (CustomSender),
KEY SenderAddressType (SenderAddressType),
KEY AllowChangingRecipient (AllowChangingRecipient),
KEY CustomRecipient (CustomRecipient)
);
CREATE TABLE IdGenerator (
lastid int(11) default NULL
);
CREATE TABLE Language (
LanguageId int(11) NOT NULL AUTO_INCREMENT,
PackName varchar(40) NOT NULL DEFAULT '',
LocalName varchar(40) NOT NULL DEFAULT '',
Enabled int(11) NOT NULL DEFAULT '1',
PrimaryLang int(11) NOT NULL DEFAULT '0',
AdminInterfaceLang tinyint(3) unsigned NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
IconURL varchar(255) DEFAULT NULL,
IconDisabledURL varchar(255) DEFAULT NULL,
DateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
TimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
InputDateFormat varchar(50) NOT NULL DEFAULT 'm/d/Y',
InputTimeFormat varchar(50) NOT NULL DEFAULT 'g:i:s A',
DecimalPoint varchar(10) NOT NULL DEFAULT '.',
ThousandSep varchar(10) NOT NULL DEFAULT '',
`Charset` varchar(20) NOT NULL DEFAULT 'utf-8',
UnitSystem tinyint(4) NOT NULL DEFAULT '1',
FilenameReplacements text,
Locale varchar(10) NOT NULL DEFAULT 'en-US',
UserDocsUrl varchar(255) NOT NULL DEFAULT '',
SynchronizationModes varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (LanguageId),
KEY Enabled (Enabled),
KEY PrimaryLang (PrimaryLang),
KEY AdminInterfaceLang (AdminInterfaceLang),
KEY Priority (Priority)
);
CREATE TABLE Modules (
`Name` varchar(255) NOT NULL DEFAULT '',
Path varchar(255) NOT NULL DEFAULT '',
Var varchar(100) NOT NULL DEFAULT '',
Version varchar(10) NOT NULL DEFAULT '0.0.0',
Loaded tinyint(4) NOT NULL DEFAULT '1',
LoadOrder tinyint(4) NOT NULL DEFAULT '0',
TemplatePath varchar(255) NOT NULL DEFAULT '',
RootCat int(11) NOT NULL DEFAULT '0',
BuildDate int(10) unsigned DEFAULT NULL,
AppliedDBRevisions text,
PRIMARY KEY (`Name`),
KEY Loaded (Loaded),
KEY LoadOrder (LoadOrder)
);
CREATE TABLE PersistantSessionData (
VariableId bigint(20) NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '0',
VariableName varchar(255) NOT NULL DEFAULT '',
VariableValue text,
PRIMARY KEY (VariableId),
KEY UserId (PortalUserId),
KEY VariableName (VariableName)
);
CREATE TABLE Phrase (
PhraseId int(11) NOT NULL AUTO_INCREMENT,
Phrase varchar(255) NOT NULL DEFAULT '',
PhraseKey varchar(255) NOT NULL DEFAULT '',
l1_Translation text,
l2_Translation text,
l3_Translation text,
l4_Translation text,
l5_Translation text,
l1_HintTranslation text,
l2_HintTranslation text,
l3_HintTranslation text,
l4_HintTranslation text,
l5_HintTranslation text,
l1_ColumnTranslation text,
l2_ColumnTranslation text,
l3_ColumnTranslation text,
l4_ColumnTranslation text,
l5_ColumnTranslation text,
PhraseType int(11) NOT NULL DEFAULT '0',
LastChanged int(10) unsigned DEFAULT NULL,
LastChangeIP varchar(15) NOT NULL DEFAULT '',
Module varchar(30) NOT NULL DEFAULT 'In-Portal',
PRIMARY KEY (PhraseId),
KEY Phrase_Index (Phrase),
KEY PhraseKey (PhraseKey),
KEY l1_Translation (l1_Translation(5))
);
CREATE TABLE PhraseCache (
Template varchar(40) NOT NULL DEFAULT '',
PhraseList text,
CacheDate int(11) NOT NULL DEFAULT '0',
ThemeId int(11) NOT NULL DEFAULT '0',
StylesheetId int(10) unsigned NOT NULL DEFAULT '0',
ConfigVariables text,
PRIMARY KEY (Template),
KEY CacheDate (CacheDate),
KEY ThemeId (ThemeId),
KEY StylesheetId (StylesheetId)
);
CREATE TABLE PortalGroup (
GroupId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) NOT NULL DEFAULT '',
Description varchar(255) DEFAULT NULL,
CreatedOn int(10) unsigned DEFAULT NULL,
System tinyint(4) NOT NULL DEFAULT '0',
Personal tinyint(4) NOT NULL DEFAULT '0',
Enabled tinyint(4) NOT NULL DEFAULT '1',
FrontRegistration tinyint(3) unsigned NOT NULL DEFAULT '0',
IPRestrictions text,
PRIMARY KEY (GroupId),
UNIQUE KEY `Name` (`Name`),
KEY Personal (Personal),
KEY Enabled (Enabled),
KEY CreatedOn (CreatedOn)
);
CREATE TABLE PortalUser (
PortalUserId int(11) NOT NULL AUTO_INCREMENT,
- Login varchar(255) NOT NULL,
+ Username varchar(255) NOT NULL,
`Password` varchar(255) DEFAULT 'd41d8cd98f00b204e9800998ecf8427e',
FirstName varchar(255) NOT NULL DEFAULT '',
LastName varchar(255) NOT NULL DEFAULT '',
Company varchar(255) NOT NULL DEFAULT '',
Email varchar(255) NOT NULL DEFAULT '',
CreatedOn int(11) DEFAULT NULL,
Phone varchar(255) NOT NULL DEFAULT '',
Fax varchar(255) NOT NULL DEFAULT '',
Street varchar(255) NOT NULL DEFAULT '',
Street2 varchar(255) NOT NULL DEFAULT '',
City varchar(255) NOT NULL DEFAULT '',
State varchar(20) NOT NULL DEFAULT '',
Zip varchar(20) NOT NULL DEFAULT '',
Country varchar(20) NOT NULL DEFAULT '',
ResourceId int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
Modified int(11) DEFAULT NULL,
dob int(11) DEFAULT NULL,
tz int(11) DEFAULT NULL,
IPAddress varchar(15) NOT NULL,
IsBanned tinyint(1) NOT NULL DEFAULT '0',
PwResetConfirm varchar(255) NOT NULL,
PwRequestTime int(11) unsigned DEFAULT NULL,
AdminLanguage int(11) DEFAULT NULL,
DisplayToPublic text,
UserType tinyint(4) NOT NULL,
PrimaryGroupId int(11) DEFAULT NULL,
OldStyleLogin tinyint(4) NOT NULL,
IPRestrictions text,
PRIMARY KEY (PortalUserId),
UNIQUE KEY ResourceId (ResourceId),
KEY CreatedOn (CreatedOn),
KEY `Status` (`Status`),
KEY Modified (Modified),
KEY dob (dob),
KEY IsBanned (IsBanned),
KEY AdminLanguage (AdminLanguage),
KEY UserType (UserType),
- KEY Login (Login)
+ KEY Username (Username)
);
CREATE TABLE PortalUserCustomData (
CustomDataId int(11) NOT NULL auto_increment,
ResourceId int(10) unsigned NOT NULL default '0',
KEY ResourceId (ResourceId),
PRIMARY KEY (CustomDataId)
);
CREATE TABLE SessionData (
SessionKey varchar(50) NOT NULL DEFAULT '',
VariableName varchar(255) NOT NULL DEFAULT '',
VariableValue longtext,
PRIMARY KEY (SessionKey,VariableName),
KEY SessionKey (SessionKey),
KEY VariableName (VariableName)
);
CREATE TABLE Theme (
ThemeId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(40) NOT NULL DEFAULT '',
Enabled int(11) NOT NULL DEFAULT '1',
Description varchar(255) DEFAULT NULL,
PrimaryTheme int(11) NOT NULL DEFAULT '0',
CacheTimeout int(11) NOT NULL DEFAULT '0',
StylesheetId int(10) unsigned NOT NULL DEFAULT '0',
LanguagePackInstalled tinyint(3) unsigned NOT NULL DEFAULT '0',
TemplateAliases text,
PRIMARY KEY (ThemeId),
KEY Enabled (Enabled),
KEY StylesheetId (StylesheetId),
KEY PrimaryTheme (PrimaryTheme),
KEY LanguagePackInstalled (LanguagePackInstalled)
);
CREATE TABLE ThemeFiles (
FileId int(11) NOT NULL AUTO_INCREMENT,
ThemeId int(11) NOT NULL DEFAULT '0',
FileName varchar(255) NOT NULL DEFAULT '',
FilePath varchar(255) NOT NULL DEFAULT '',
TemplateAlias varchar(255) NOT NULL DEFAULT '',
Description varchar(255) DEFAULT NULL,
FileType int(11) NOT NULL DEFAULT '0',
FileFound tinyint(3) unsigned NOT NULL DEFAULT '0',
FileMetaInfo text,
PRIMARY KEY (FileId),
KEY theme (ThemeId),
KEY FileName (FileName),
KEY FilePath (FilePath),
KEY FileFound (FileFound),
KEY TemplateAlias (TemplateAlias)
);
CREATE TABLE UserGroup (
PortalUserId int(11) NOT NULL DEFAULT '0',
GroupId int(11) NOT NULL DEFAULT '0',
MembershipExpires int(10) unsigned DEFAULT NULL,
ExpirationReminderSent tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (PortalUserId,GroupId),
KEY GroupId (GroupId),
KEY MembershipExpires (MembershipExpires),
KEY ExpirationReminderSent (ExpirationReminderSent)
);
CREATE TABLE UserSession (
SessionKey int(10) unsigned NOT NULL DEFAULT '0',
LastAccessed int(10) unsigned NOT NULL DEFAULT '0',
PortalUserId int(11) NOT NULL DEFAULT '-2',
`Language` int(11) NOT NULL DEFAULT '1',
Theme int(11) NOT NULL DEFAULT '1',
GroupId int(11) NOT NULL DEFAULT '0',
IpAddress varchar(20) NOT NULL DEFAULT '0.0.0.0',
`Status` int(11) NOT NULL DEFAULT '1',
GroupList varchar(255) DEFAULT NULL,
tz int(11) DEFAULT NULL,
BrowserSignature varchar(32) NOT NULL DEFAULT '',
PRIMARY KEY (SessionKey),
KEY UserId (PortalUserId),
KEY LastAccessed (LastAccessed),
KEY BrowserSignature (BrowserSignature)
);
CREATE TABLE EmailLog (
EmailLogId int(11) NOT NULL AUTO_INCREMENT,
fromuser varchar(200) DEFAULT NULL,
addressto varchar(255) DEFAULT NULL,
`subject` varchar(255) DEFAULT NULL,
`timestamp` bigint(20) DEFAULT '0',
`event` varchar(100) DEFAULT NULL,
EventParams text,
PRIMARY KEY (EmailLogId),
KEY `timestamp` (`timestamp`)
);
CREATE TABLE Cache (
VarName varchar(255) NOT NULL default '',
Data longtext,
Cached int(11) default NULL,
LifeTime int(11) NOT NULL default '-1',
PRIMARY KEY (VarName),
KEY Cached (Cached)
);
CREATE TABLE CountryStates (
CountryStateId int(11) NOT NULL AUTO_INCREMENT,
`Type` int(11) NOT NULL DEFAULT '1',
StateCountryId int(11) DEFAULT NULL,
l1_Name varchar(255) NOT NULL,
l2_Name varchar(255) NOT NULL,
l3_Name varchar(255) NOT NULL,
l4_Name varchar(255) NOT NULL,
l5_Name varchar(255) NOT NULL,
IsoCode char(3) NOT NULL DEFAULT '',
ShortIsoCode char(2) DEFAULT NULL,
PRIMARY KEY (CountryStateId),
KEY `Type` (`Type`),
KEY StateCountryId (StateCountryId),
KEY l1_Name (l1_Name(5))
);
CREATE TABLE Category (
CategoryId int(11) NOT NULL AUTO_INCREMENT,
`Type` int(11) NOT NULL DEFAULT '1',
SymLinkCategoryId int(10) unsigned DEFAULT NULL,
ParentId int(11) NOT NULL DEFAULT '0',
`Name` varchar(255) NOT NULL DEFAULT '',
l1_Name varchar(255) NOT NULL DEFAULT '',
l2_Name varchar(255) NOT NULL DEFAULT '',
l3_Name varchar(255) NOT NULL DEFAULT '',
l4_Name varchar(255) NOT NULL DEFAULT '',
l5_Name varchar(255) NOT NULL DEFAULT '',
Filename varchar(255) NOT NULL DEFAULT '',
AutomaticFilename tinyint(3) unsigned NOT NULL DEFAULT '1',
Description text,
l1_Description text,
l2_Description text,
l3_Description text,
l4_Description text,
l5_Description text,
CreatedOn int(11) DEFAULT NULL,
EditorsPick tinyint(4) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
Priority int(11) NOT NULL DEFAULT '0',
MetaKeywords text,
CachedDescendantCatsQty int(11) NOT NULL DEFAULT '0',
CachedNavbar text,
l1_CachedNavbar text,
l2_CachedNavbar text,
l3_CachedNavbar text,
l4_CachedNavbar text,
l5_CachedNavbar text,
CreatedById int(11) DEFAULT NULL,
ResourceId int(11) DEFAULT NULL,
ParentPath text,
TreeLeft bigint(20) NOT NULL DEFAULT '0',
TreeRight bigint(20) NOT NULL DEFAULT '0',
NamedParentPath text,
MetaDescription text,
HotItem int(11) NOT NULL DEFAULT '2',
NewItem int(11) NOT NULL DEFAULT '2',
PopItem int(11) NOT NULL DEFAULT '2',
Modified int(11) DEFAULT NULL,
ModifiedById int(11) DEFAULT NULL,
CachedTemplate varchar(255) NOT NULL DEFAULT '',
Template varchar(255) NOT NULL DEFAULT '#inherit#',
UseExternalUrl tinyint(3) unsigned NOT NULL DEFAULT '0',
ExternalUrl varchar(255) NOT NULL DEFAULT '',
UseMenuIconUrl tinyint(3) unsigned NOT NULL DEFAULT '0',
MenuIconUrl varchar(255) NOT NULL DEFAULT '',
l1_Title varchar(255) DEFAULT '',
l2_Title varchar(255) DEFAULT '',
l3_Title varchar(255) DEFAULT '',
l4_Title varchar(255) DEFAULT '',
l5_Title varchar(255) DEFAULT '',
l1_MenuTitle varchar(255) NOT NULL DEFAULT '',
l2_MenuTitle varchar(255) NOT NULL DEFAULT '',
l3_MenuTitle varchar(255) NOT NULL DEFAULT '',
l4_MenuTitle varchar(255) NOT NULL DEFAULT '',
l5_MenuTitle varchar(255) NOT NULL DEFAULT '',
MetaTitle text,
IndexTools text,
IsMenu tinyint(4) NOT NULL DEFAULT '1',
Protected tinyint(4) NOT NULL DEFAULT '0',
FormId int(11) DEFAULT NULL,
FormSubmittedTemplate varchar(255) DEFAULT NULL,
FriendlyURL varchar(255) NOT NULL DEFAULT '',
ThemeId int(10) unsigned NOT NULL DEFAULT '0',
EnablePageCache tinyint(4) NOT NULL DEFAULT '0',
OverridePageCacheKey tinyint(4) NOT NULL DEFAULT '0',
PageCacheKey varchar(255) NOT NULL DEFAULT '',
PageExpiration int(11) DEFAULT NULL,
DirectLinkEnabled tinyint(4) NOT NULL DEFAULT '1',
DirectLinkAuthKey varchar(20) NOT NULL,
PRIMARY KEY (CategoryId),
UNIQUE KEY ResourceId (ResourceId),
KEY ParentId (ParentId),
KEY Modified (Modified),
KEY Priority (Priority),
KEY sorting (`Name`,Priority),
KEY Filename (Filename(5)),
KEY l1_Name (l1_Name(5)),
KEY l2_Name (l2_Name(5)),
KEY l3_Name (l3_Name(5)),
KEY l4_Name (l4_Name(5)),
KEY l5_Name (l5_Name(5)),
KEY l1_Description (l1_Description(5)),
KEY l2_Description (l2_Description(5)),
KEY l3_Description (l3_Description(5)),
KEY l4_Description (l4_Description(5)),
KEY l5_Description (l5_Description(5)),
KEY TreeLeft (TreeLeft),
KEY TreeRight (TreeRight),
KEY SymLinkCategoryId (SymLinkCategoryId),
KEY `Status` (`Status`),
KEY CreatedOn (CreatedOn),
KEY EditorsPick (EditorsPick),
KEY ThemeId (ThemeId),
KEY EnablePageCache (EnablePageCache),
KEY OverridePageCacheKey (OverridePageCacheKey),
KEY PageExpiration (PageExpiration),
KEY Protected (Protected)
);
CREATE TABLE CategoryCustomData (
CustomDataId int(11) NOT NULL auto_increment,
ResourceId int(10) unsigned NOT NULL default '0',
KEY ResourceId (ResourceId),
PRIMARY KEY (CustomDataId)
);
CREATE TABLE CategoryItems (
CategoryId int(11) NOT NULL default '0',
ItemResourceId int(11) NOT NULL default '0',
PrimaryCat tinyint(4) NOT NULL default '0',
ItemPrefix varchar(50) NOT NULL default '',
Filename varchar(255) NOT NULL default '',
UNIQUE KEY CategoryId (CategoryId,ItemResourceId),
KEY PrimaryCat (PrimaryCat),
KEY ItemPrefix (ItemPrefix),
KEY ItemResourceId (ItemResourceId),
KEY Filename (Filename)
);
CREATE TABLE PermCache (
PermCacheId int(11) NOT NULL auto_increment,
CategoryId int(11) NOT NULL default '0',
PermId int(11) NOT NULL default '0',
ACL varchar(255) NOT NULL default '',
PRIMARY KEY (PermCacheId),
KEY CategoryId (CategoryId),
KEY PermId (PermId),
KEY ACL (ACL)
);
CREATE TABLE PopupSizes (
PopupId int(10) unsigned NOT NULL auto_increment,
TemplateName varchar(255) NOT NULL default '',
PopupWidth int(11) NOT NULL default '0',
PopupHeight int(11) NOT NULL default '0',
PRIMARY KEY (PopupId),
KEY TemplateName (TemplateName)
);
CREATE TABLE Counters (
CounterId int(10) unsigned NOT NULL auto_increment,
Name varchar(100) NOT NULL default '',
CountQuery text,
CountValue text,
LastCounted int(10) unsigned default NULL,
LifeTime int(10) unsigned NOT NULL default '3600',
IsClone tinyint(3) unsigned NOT NULL default '0',
TablesAffected text,
PRIMARY KEY (CounterId),
UNIQUE KEY Name (Name),
KEY IsClone (IsClone),
KEY LifeTime (LifeTime),
KEY LastCounted (LastCounted)
);
CREATE TABLE Skins (
SkinId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) DEFAULT NULL,
CSS text,
Logo varchar(255) DEFAULT NULL,
LogoBottom varchar(255) NOT NULL DEFAULT '',
LogoLogin varchar(255) NOT NULL DEFAULT '',
`Options` text,
LastCompiled int(11) NOT NULL DEFAULT '0',
IsPrimary int(1) NOT NULL DEFAULT '0',
DisplaySiteNameInHeader tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (SkinId),
KEY IsPrimary (IsPrimary),
KEY LastCompiled (LastCompiled)
);
CREATE TABLE ChangeLogs (
ChangeLogId bigint(20) NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '0',
SessionLogId int(11) NOT NULL DEFAULT '0',
`Action` tinyint(4) NOT NULL DEFAULT '0',
OccuredOn int(11) DEFAULT NULL,
Prefix varchar(255) NOT NULL DEFAULT '',
ItemId bigint(20) NOT NULL DEFAULT '0',
Changes text,
MasterPrefix varchar(255) NOT NULL DEFAULT '',
MasterId bigint(20) NOT NULL DEFAULT '0',
PRIMARY KEY (ChangeLogId),
KEY PortalUserId (PortalUserId),
KEY SessionLogId (SessionLogId),
KEY `Action` (`Action`),
KEY OccuredOn (OccuredOn),
KEY Prefix (Prefix),
KEY MasterPrefix (MasterPrefix)
);
CREATE TABLE SessionLogs (
SessionLogId bigint(20) NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '0',
SessionId int(10) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
SessionStart int(11) DEFAULT NULL,
SessionEnd int(11) DEFAULT NULL,
IP varchar(15) NOT NULL DEFAULT '',
AffectedItems int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (SessionLogId),
KEY SessionId (SessionId),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
CREATE TABLE StatisticsCapture (
StatisticsId int(10) unsigned NOT NULL auto_increment,
TemplateName varchar(255) NOT NULL default '',
Hits int(10) unsigned NOT NULL default '0',
LastHit int(11) NOT NULL default '0',
ScriptTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
PRIMARY KEY (StatisticsId),
KEY TemplateName (TemplateName),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY ScriptTimeMin (ScriptTimeMin),
KEY ScriptTimeAvg (ScriptTimeAvg),
KEY ScriptTimeMax (ScriptTimeMax),
KEY SqlTimeMin (SqlTimeMin),
KEY SqlTimeAvg (SqlTimeAvg),
KEY SqlTimeMax (SqlTimeMax),
KEY SqlCountMin (SqlCountMin),
KEY SqlCountAvg (SqlCountAvg),
KEY SqlCountMax (SqlCountMax)
);
CREATE TABLE SlowSqlCapture (
CaptureId int(10) unsigned NOT NULL auto_increment,
TemplateNames text,
Hits int(10) unsigned NOT NULL default '0',
LastHit int(11) NOT NULL default '0',
SqlQuery text,
TimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
TimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
TimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
QueryCrc int(11) NOT NULL default '0',
PRIMARY KEY (CaptureId),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY TimeMin (TimeMin),
KEY TimeAvg (TimeAvg),
KEY TimeMax (TimeMax),
KEY QueryCrc (QueryCrc)
);
CREATE TABLE Agents (
AgentId int(11) NOT NULL auto_increment,
AgentName varchar(255) NOT NULL default '',
AgentType tinyint(3) unsigned NOT NULL default '1',
Status tinyint(3) unsigned NOT NULL default '1',
Event varchar(255) NOT NULL default '',
RunInterval int(10) unsigned NOT NULL default '0',
RunMode tinyint(3) unsigned NOT NULL default '2',
LastRunOn int(10) unsigned default NULL,
LastRunStatus tinyint(3) unsigned NOT NULL default '1',
NextRunOn int(11) default NULL,
RunTime int(10) unsigned NOT NULL default '0',
Timeout int(10) UNSIGNED NULL,
LastTimeoutOn int(10) unsigned default NULL,
SiteDomainLimitation varchar(255) NOT NULL,
PRIMARY KEY (AgentId),
KEY Status (Status),
KEY RunInterval (RunInterval),
KEY RunMode (RunMode),
KEY AgentType (AgentType),
KEY LastRunOn (LastRunOn),
KEY LastRunStatus (LastRunStatus),
KEY RunTime (RunTime),
KEY NextRunOn (NextRunOn),
KEY Timeout (Timeout),
KEY SiteDomainLimitation (SiteDomainLimitation)
);
CREATE TABLE SpellingDictionary (
SpellingDictionaryId int(11) NOT NULL auto_increment,
MisspelledWord varchar(255) NOT NULL default '',
SuggestedCorrection varchar(255) NOT NULL default '',
PRIMARY KEY (SpellingDictionaryId),
KEY MisspelledWord (MisspelledWord),
KEY SuggestedCorrection (SuggestedCorrection)
);
CREATE TABLE Thesaurus (
ThesaurusId int(11) NOT NULL auto_increment,
SearchTerm varchar(255) NOT NULL default '',
ThesaurusTerm varchar(255) NOT NULL default '',
ThesaurusType tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (ThesaurusId),
KEY ThesaurusType (ThesaurusType),
KEY SearchTerm (SearchTerm)
);
CREATE TABLE LocalesList (
LocaleId int(11) NOT NULL auto_increment,
LocaleIdentifier varchar(6) NOT NULL default '',
LocaleName varchar(255) NOT NULL default '',
Locale varchar(20) NOT NULL default '',
ScriptTag varchar(255) NOT NULL default '',
ANSICodePage varchar(10) NOT NULL default '',
PRIMARY KEY (LocaleId)
);
CREATE TABLE BanRules (
RuleId int(11) NOT NULL auto_increment,
RuleType tinyint(4) NOT NULL default '0',
ItemField varchar(255) default NULL,
ItemVerb tinyint(4) NOT NULL default '0',
ItemValue varchar(255) NOT NULL default '',
ItemType int(11) NOT NULL default '0',
Priority int(11) NOT NULL default '0',
Status tinyint(4) NOT NULL default '1',
ErrorTag varchar(255) default NULL,
PRIMARY KEY (RuleId),
KEY Status (Status),
KEY Priority (Priority),
KEY ItemType (ItemType)
);
CREATE TABLE CountCache (
ListType int(11) NOT NULL default '0',
ItemType int(11) NOT NULL default '-1',
Value int(11) NOT NULL default '0',
CountCacheId int(11) NOT NULL auto_increment,
LastUpdate int(11) NOT NULL default '0',
ExtraId varchar(50) default NULL,
TodayOnly tinyint(4) NOT NULL default '0',
PRIMARY KEY (CountCacheId)
);
CREATE TABLE Favorites (
FavoriteId int(11) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
ResourceId int(11) NOT NULL default '0',
ItemTypeId int(11) NOT NULL default '0',
Modified int(11) NOT NULL default '0',
PRIMARY KEY (FavoriteId),
UNIQUE KEY main (PortalUserId,ResourceId),
KEY Modified (Modified),
KEY ItemTypeId (ItemTypeId)
);
CREATE TABLE Images (
ImageId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Url varchar(255) NOT NULL default '',
Name varchar(255) NOT NULL default '',
AltName VARCHAR(255) NOT NULL DEFAULT '',
ImageIndex int(11) NOT NULL default '0',
LocalImage tinyint(4) NOT NULL default '1',
LocalPath varchar(240) NOT NULL default '',
Enabled int(11) NOT NULL default '1',
DefaultImg int(11) NOT NULL default '0',
ThumbUrl varchar(255) default NULL,
Priority int(11) NOT NULL default '0',
ThumbPath varchar(255) default NULL,
LocalThumb tinyint(4) NOT NULL default '1',
SameImages tinyint(4) NOT NULL default '1',
PRIMARY KEY (ImageId),
KEY ResourceId (ResourceId),
KEY Enabled (Enabled),
KEY Priority (Priority)
);
CREATE TABLE ItemRating (
RatingId int(11) NOT NULL auto_increment,
IPAddress varchar(255) NOT NULL default '',
CreatedOn INT UNSIGNED NULL DEFAULT NULL,
RatingValue int(11) NOT NULL default '0',
ItemId int(11) NOT NULL default '0',
PRIMARY KEY (RatingId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY RatingValue (RatingValue)
);
CREATE TABLE ItemReview (
ReviewId int(11) NOT NULL AUTO_INCREMENT,
CreatedOn int(10) unsigned DEFAULT NULL,
ReviewText longtext,
Rating tinyint(3) unsigned NOT NULL DEFAULT '0',
IPAddress varchar(255) NOT NULL DEFAULT '',
ItemId int(11) NOT NULL DEFAULT '0',
CreatedById int(11) DEFAULT NULL,
ItemType tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '2',
TextFormat int(11) NOT NULL DEFAULT '0',
Module varchar(255) NOT NULL DEFAULT '',
HelpfulCount int(11) NOT NULL,
NotHelpfulCount int(11) NOT NULL,
PRIMARY KEY (ReviewId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY ItemType (ItemType),
KEY Priority (Priority),
KEY `Status` (`Status`)
);
CREATE TABLE ItemTypes (
ItemType int(11) NOT NULL default '0',
Module varchar(50) NOT NULL default '',
Prefix varchar(20) NOT NULL default '',
SourceTable varchar(100) NOT NULL default '',
TitleField varchar(50) default NULL,
CreatorField varchar(255) NOT NULL default '',
PopField varchar(255) default NULL,
RateField varchar(255) default NULL,
LangVar varchar(255) NOT NULL default '',
PrimaryItem int(11) NOT NULL default '0',
EditUrl varchar(255) NOT NULL default '',
ClassName varchar(40) NOT NULL default '',
ItemName varchar(50) NOT NULL default '',
PRIMARY KEY (ItemType),
KEY Module (Module)
);
CREATE TABLE ItemFiles (
FileId int(11) NOT NULL AUTO_INCREMENT,
ResourceId int(11) unsigned NOT NULL DEFAULT '0',
FileName varchar(255) NOT NULL DEFAULT '',
FilePath varchar(255) NOT NULL DEFAULT '',
Size int(11) NOT NULL DEFAULT '0',
`Status` tinyint(4) NOT NULL DEFAULT '1',
CreatedOn int(11) unsigned DEFAULT NULL,
CreatedById int(11) DEFAULT NULL,
MimeType varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FileId),
KEY ResourceId (ResourceId),
KEY CreatedOn (CreatedOn),
KEY `Status` (`Status`)
);
CREATE TABLE Relationship (
RelationshipId int(11) NOT NULL auto_increment,
SourceId int(11) default NULL,
TargetId int(11) default NULL,
SourceType tinyint(4) NOT NULL default '0',
TargetType tinyint(4) NOT NULL default '0',
Type int(11) NOT NULL default '0',
Enabled int(11) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelationshipId),
KEY RelSource (SourceId),
KEY RelTarget (TargetId),
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY Priority (Priority),
KEY SourceType (SourceType),
KEY TargetType (TargetType)
);
CREATE TABLE SearchConfig (
TableName varchar(40) NOT NULL default '',
FieldName varchar(40) NOT NULL default '',
SimpleSearch tinyint(4) NOT NULL default '1',
AdvancedSearch tinyint(4) NOT NULL default '1',
Description varchar(255) default NULL,
DisplayName varchar(80) default NULL,
ModuleName VARCHAR(20) NOT NULL DEFAULT 'In-Portal',
ConfigHeader varchar(255) default NULL,
DisplayOrder int(11) NOT NULL default '0',
SearchConfigId int(11) NOT NULL auto_increment,
Priority int(11) NOT NULL default '0',
FieldType varchar(20) NOT NULL default 'text',
ForeignField TEXT,
JoinClause TEXT,
IsWhere text,
IsNotWhere text,
ContainsWhere text,
NotContainsWhere text,
CustomFieldId int(11) default NULL,
PRIMARY KEY (SearchConfigId),
KEY SimpleSearch (SimpleSearch),
KEY AdvancedSearch (AdvancedSearch),
KEY DisplayOrder (DisplayOrder),
KEY Priority (Priority),
KEY CustomFieldId (CustomFieldId)
);
CREATE TABLE SearchLog (
SearchLogId int(11) NOT NULL auto_increment,
Keyword varchar(255) NOT NULL default '',
Indices bigint(20) NOT NULL default '0',
SearchType int(11) NOT NULL default '0',
PRIMARY KEY (SearchLogId),
KEY Keyword (Keyword),
KEY SearchType (SearchType)
);
CREATE TABLE SpamControl (
ItemResourceId int(11) NOT NULL default '0',
IPaddress varchar(20) NOT NULL default '',
Expire INT UNSIGNED NULL DEFAULT NULL,
PortalUserId int(11) NOT NULL default '0',
DataType varchar(20) default NULL,
KEY PortalUserId (PortalUserId),
KEY Expire (Expire),
KEY DataType (DataType),
KEY ItemResourceId (ItemResourceId)
);
CREATE TABLE StatItem (
StatItemId int(11) NOT NULL auto_increment,
Module varchar(20) NOT NULL default '',
ValueSQL varchar(255) default NULL,
ResetSQL varchar(255) default NULL,
ListLabel varchar(255) NOT NULL default '',
Priority int(11) NOT NULL default '0',
AdminSummary int(11) NOT NULL default '0',
PRIMARY KEY (StatItemId),
KEY AdminSummary (AdminSummary),
KEY Priority (Priority)
);
CREATE TABLE ImportScripts (
ImportId int(11) NOT NULL AUTO_INCREMENT,
`Name` varchar(255) NOT NULL DEFAULT '',
Description text,
Prefix varchar(10) NOT NULL DEFAULT '',
Module varchar(50) NOT NULL DEFAULT '',
ExtraFields varchar(255) NOT NULL DEFAULT '',
`Type` varchar(10) NOT NULL DEFAULT '',
`Status` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (ImportId),
KEY Module (Module),
KEY `Status` (`Status`)
);
CREATE TABLE Visits (
VisitId int(11) NOT NULL AUTO_INCREMENT,
VisitDate int(10) unsigned DEFAULT NULL,
Referer varchar(255) NOT NULL DEFAULT '',
IPAddress varchar(15) NOT NULL DEFAULT '',
AffiliateId int(10) unsigned NOT NULL DEFAULT '0',
PortalUserId int(11) NOT NULL DEFAULT '-2',
PRIMARY KEY (VisitId),
KEY PortalUserId (PortalUserId),
KEY AffiliateId (AffiliateId),
KEY VisitDate (VisitDate)
);
CREATE TABLE ImportCache (
CacheId int(11) NOT NULL AUTO_INCREMENT,
CacheName varchar(255) NOT NULL DEFAULT '',
VarName int(11) NOT NULL DEFAULT '0',
VarValue text,
PRIMARY KEY (CacheId),
KEY CacheName (CacheName),
KEY VarName (VarName)
);
CREATE TABLE RelatedSearches (
RelatedSearchId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Keyword varchar(255) NOT NULL default '',
ItemType tinyint(4) NOT NULL default '0',
Enabled tinyint(4) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelatedSearchId),
KEY Enabled (Enabled),
KEY ItemType (ItemType),
KEY ResourceId (ResourceId)
);
CREATE TABLE StopWords (
StopWordId int(11) NOT NULL auto_increment,
StopWord varchar(255) NOT NULL default '',
PRIMARY KEY (StopWordId),
KEY StopWord (StopWord)
);
CREATE TABLE MailingLists (
MailingId int(10) unsigned NOT NULL AUTO_INCREMENT,
PortalUserId int(11) NOT NULL DEFAULT '-1',
`To` longtext,
ToParsed longtext,
Attachments text,
`Subject` varchar(255) NOT NULL DEFAULT '',
MessageText longtext,
MessageHtml longtext,
`Status` tinyint(3) unsigned NOT NULL DEFAULT '1',
EmailsQueued int(10) unsigned NOT NULL DEFAULT '0',
EmailsSent int(10) unsigned NOT NULL DEFAULT '0',
EmailsTotal int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (MailingId),
KEY EmailsTotal (EmailsTotal),
KEY EmailsSent (EmailsSent),
KEY EmailsQueued (EmailsQueued),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
CREATE TABLE PageContent (
PageContentId int(11) NOT NULL AUTO_INCREMENT,
ContentNum int(11) NOT NULL DEFAULT '0',
PageId int(11) NOT NULL DEFAULT '0',
l1_Content text,
l2_Content text,
l3_Content text,
l4_Content text,
l5_Content text,
PRIMARY KEY (PageContentId),
KEY ContentNum (ContentNum,PageId)
);
CREATE TABLE FormFields (
FormFieldId int(11) NOT NULL AUTO_INCREMENT,
FormId int(11) NOT NULL DEFAULT '0',
`Type` int(11) NOT NULL DEFAULT '0',
FieldName varchar(255) NOT NULL DEFAULT '',
FieldLabel varchar(255) DEFAULT NULL,
Heading varchar(255) DEFAULT NULL,
Prompt varchar(255) DEFAULT NULL,
ElementType varchar(50) NOT NULL DEFAULT '',
ValueList varchar(255) DEFAULT NULL,
Priority int(11) NOT NULL DEFAULT '0',
IsSystem tinyint(3) unsigned NOT NULL DEFAULT '0',
Required tinyint(1) NOT NULL DEFAULT '0',
DisplayInGrid tinyint(1) NOT NULL DEFAULT '1',
DefaultValue text,
Validation tinyint(4) NOT NULL DEFAULT '0',
UploadExtensions varchar(255) NOT NULL DEFAULT '',
UploadMaxSize int(11) DEFAULT NULL,
Visibility tinyint(4) NOT NULL DEFAULT '1',
EmailCommunicationRole tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (FormFieldId),
KEY `Type` (`Type`),
KEY FormId (FormId),
KEY Priority (Priority),
KEY IsSystem (IsSystem),
KEY DisplayInGrid (DisplayInGrid),
KEY Visibility (Visibility),
KEY EmailCommunicationRole (EmailCommunicationRole)
);
CREATE TABLE FormSubmissions (
FormSubmissionId int(11) NOT NULL AUTO_INCREMENT,
FormId int(11) NOT NULL DEFAULT '0',
SubmissionTime int(11) DEFAULT NULL,
IPAddress varchar(15) NOT NULL DEFAULT '',
ReferrerURL text NULL,
LogStatus tinyint(3) unsigned NOT NULL DEFAULT '2',
LastUpdatedOn int(10) unsigned DEFAULT NULL,
Notes text,
MessageId varchar(255) DEFAULT NULL,
PRIMARY KEY (FormSubmissionId),
KEY FormId (FormId),
KEY SubmissionTime (SubmissionTime),
KEY LogStatus (LogStatus),
KEY LastUpdatedOn (LastUpdatedOn),
KEY MessageId (MessageId)
);
CREATE TABLE SubmissionLog (
SubmissionLogId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL,
FromEmail varchar(255) NOT NULL DEFAULT '',
ToEmail varchar(255) NOT NULL DEFAULT '',
Cc text,
Bcc text,
`Subject` varchar(255) NOT NULL DEFAULT '',
Message text,
Attachment text,
ReplyStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentOn int(10) unsigned DEFAULT NULL,
RepliedOn int(10) unsigned DEFAULT NULL,
VerifyCode varchar(32) NOT NULL DEFAULT '',
DraftId int(10) unsigned NOT NULL DEFAULT '0',
MessageId varchar(255) NOT NULL DEFAULT '',
BounceInfo text,
BounceDate int(11) DEFAULT NULL,
PRIMARY KEY (SubmissionLogId),
KEY FormSubmissionId (FormSubmissionId),
KEY ReplyStatus (ReplyStatus),
KEY SentStatus (SentStatus),
KEY SentOn (SentOn),
KEY RepliedOn (RepliedOn),
KEY VerifyCode (VerifyCode),
KEY DraftId (DraftId),
KEY BounceDate (BounceDate),
KEY MessageId (MessageId)
);
CREATE TABLE Drafts (
DraftId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL DEFAULT '0',
CreatedOn int(10) unsigned DEFAULT NULL,
CreatedById int(11) DEFAULT NULL,
Message text,
PRIMARY KEY (DraftId),
KEY FormSubmissionId (FormSubmissionId),
KEY CreatedOn (CreatedOn),
KEY CreatedById (CreatedById)
);
CREATE TABLE Forms (
FormId int(11) NOT NULL AUTO_INCREMENT,
Title varchar(255) NOT NULL DEFAULT '',
Description text,
RequireLogin tinyint(4) NOT NULL DEFAULT '0',
UseSecurityImage tinyint(4) NOT NULL DEFAULT '0',
SubmitNotifyEmail varchar(255) NOT NULL DEFAULT '',
EnableEmailCommunication tinyint(4) NOT NULL DEFAULT '0',
ProcessUnmatchedEmails tinyint(4) NOT NULL DEFAULT '0',
ReplyFromName varchar(255) NOT NULL DEFAULT '',
ReplyFromEmail varchar(255) NOT NULL DEFAULT '',
ReplyCc varchar(255) NOT NULL DEFAULT '',
ReplyBcc varchar(255) NOT NULL DEFAULT '',
ReplyMessageSignature text,
ReplyServer varchar(255) NOT NULL DEFAULT '',
ReplyPort int(11) NOT NULL DEFAULT '110',
ReplyUsername varchar(255) NOT NULL DEFAULT '',
ReplyPassword varchar(255) NOT NULL DEFAULT '',
BounceEmail varchar(255) NOT NULL DEFAULT '',
BounceServer varchar(255) NOT NULL DEFAULT '',
BouncePort int(11) NOT NULL DEFAULT '110',
BounceUsername varchar(255) NOT NULL DEFAULT '',
BouncePassword varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (FormId),
KEY UseSecurityImage (UseSecurityImage),
KEY RequireLogin (RequireLogin),
KEY EnableEmailCommunication (EnableEmailCommunication),
KEY ProcessUnmatchedEmails (ProcessUnmatchedEmails)
);
CREATE TABLE Semaphores (
SemaphoreId int(11) NOT NULL AUTO_INCREMENT,
SessionKey int(10) unsigned NOT NULL DEFAULT '0',
`Timestamp` int(10) unsigned NOT NULL DEFAULT '0',
MainPrefix varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (SemaphoreId),
KEY SessionKey (SessionKey),
KEY `Timestamp` (`Timestamp`),
KEY MainPrefix (MainPrefix)
);
CREATE TABLE CachedUrls (
UrlId int(11) NOT NULL AUTO_INCREMENT,
Url varchar(255) NOT NULL DEFAULT '',
DomainId int(11) NOT NULL DEFAULT '0',
`Hash` int(11) NOT NULL DEFAULT '0',
Prefixes varchar(255) NOT NULL DEFAULT '',
ParsedVars text NOT NULL,
Cached int(10) unsigned DEFAULT NULL,
LifeTime int(11) NOT NULL DEFAULT '-1',
PRIMARY KEY (UrlId),
KEY Url (Url),
KEY `Hash` (`Hash`),
KEY Prefixes (Prefixes),
KEY Cached (Cached),
KEY LifeTime (LifeTime),
KEY DomainId (DomainId)
);
CREATE TABLE SiteDomains (
DomainId int(11) NOT NULL AUTO_INCREMENT,
DomainName varchar(255) NOT NULL DEFAULT '',
DomainNameUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
SSLUrl varchar(255) NOT NULL DEFAULT '',
SSLUrlUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
AdminEmail varchar(255) NOT NULL DEFAULT '',
Country varchar(3) NOT NULL DEFAULT '',
PrimaryLanguageId int(11) NOT NULL DEFAULT '0',
Languages varchar(255) NOT NULL DEFAULT '',
PrimaryThemeId int(11) NOT NULL DEFAULT '0',
Themes varchar(255) NOT NULL DEFAULT '',
DomainIPRange text,
ExternalUrl varchar(255) NOT NULL DEFAULT '',
RedirectOnIPMatch tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (DomainId),
KEY DomainName (DomainName),
KEY DomainNameUsesRegExp (DomainNameUsesRegExp),
KEY SSLUrl (SSLUrl),
KEY SSLUrlUsesRegExp (SSLUrlUsesRegExp),
KEY AdminEmail (AdminEmail),
KEY Country (Country),
KEY PrimaryLanguageId (PrimaryLanguageId),
KEY Languages (Languages),
KEY PrimaryThemeId (PrimaryThemeId),
KEY Themes (Themes),
KEY ExternalUrl (ExternalUrl),
KEY RedirectOnIPMatch (RedirectOnIPMatch),
KEY Priority (Priority)
);
CREATE TABLE CurlLog (
LogId int(11) NOT NULL AUTO_INCREMENT,
Message varchar(255) NOT NULL,
PageUrl varchar(255) NOT NULL,
RequestUrl varchar(255) NOT NULL,
PortalUserId int(11) NOT NULL,
SessionKey int(11) NOT NULL,
IsAdmin tinyint(4) NOT NULL,
PageData text,
RequestData text,
ResponseData text,
RequestDate int(11) DEFAULT NULL,
ResponseDate int(11) DEFAULT NULL,
ResponseHttpCode int(11) NOT NULL,
CurlError varchar(255) NOT NULL,
PRIMARY KEY (LogId),
KEY Message (Message),
KEY PageUrl (PageUrl),
KEY RequestUrl (RequestUrl),
KEY PortalUserId (PortalUserId),
KEY SessionKey (SessionKey),
KEY IsAdmin (IsAdmin),
KEY RequestDate (RequestDate),
KEY ResponseDate (ResponseDate),
KEY ResponseHttpCode (ResponseHttpCode),
KEY CurlError (CurlError)
);
\ No newline at end of file
Index: branches/5.2.x/core/install/step_templates/download_license.tpl
===================================================================
--- branches/5.2.x/core/install/step_templates/download_license.tpl (revision 14725)
+++ branches/5.2.x/core/install/step_templates/download_license.tpl (revision 14726)
@@ -1,46 +1,46 @@
<tr class="table-color2">
- <td class="text"><strong>Login / E-mail:</strong></td>
+ <td class="text"><strong>Username / E-mail:</strong></td>
<td class="txt">
<input type="text" class="text" name="login" value="<?php echo $this->GetVar('login'); ?>">
</td>
</tr>
<tr class="table-color2">
<td class="text"><strong>Password:</strong></td>
<td class="text">
<input type="password" class="text" name="password" value="">
<a href="http://www.intechnic.com/myaccount/index.php?t=users/reveal_password&">Forgot password</a>
</td>
</tr>
<?php
$license_selection = $this->GetVar('license_selection');
if ($license_selection) {
$license_id = $this->GetVar('licenses');
$license_selection = $license_selection_patched = base64_decode($license_selection);
if ($license_id) {
// keep previosly selected license
$license_selection_patched = str_replace('<option value="' . $license_id . '">', '<option value="' . $license_id . '" selected>', $license_selection);
}
?>
<tr class="table-color2">
<td colspan="2">&nbsp;</td>
</tr>
<tr class="table-color2">
<td class="text"><strong>Domain:</strong></td>
<td class="text">
<?php echo $_SERVER['HTTP_HOST']; ?>
</td>
</tr>
<tr class="table-color2">
<td class="text"><strong>Available licenses:</strong></td>
<td class="text"><?php echo $license_selection_patched;?></td>
</tr>
<input type="hidden" name="license_selection" value="<?php echo base64_encode($license_selection); ?>"/>
<?php
}
?>
\ No newline at end of file
Index: branches/5.2.x/core/install/install_data.sql
===================================================================
--- branches/5.2.x/core/install/install_data.sql (revision 14725)
+++ branches/5.2.x/core/install/install_data.sql (revision 14726)
@@ -1,985 +1,985 @@
# Section "in-portal:configure_categories":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.01, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_opt_Title||Description=la_opt_Description||CreatedOn=la_opt_CreatedOn||EditorsPick=la_opt_EditorsPick||<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_Ascending||desc=la_common_Descending', 10.02, 2, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category', '20', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage_prompt', 'text', '', '', 10.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Perpage_Category_Short', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_perpage__short_prompt', 'text', '', '', 10.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_DaysNew', '8', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_daysnew_prompt', 'text', '', '', 10.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_ShowPick', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_category_showpick_prompt', 'checkbox', '', '', 10.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxImportCategoryLevels', '10', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_prompt_max_import_category_levels', 'text', '', '', 10.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowDeleteRootCats', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_AllowDeleteRootCats', 'checkbox', NULL, NULL, 10.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Catalog_PreselectModuleTab', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_CatalogPreselectModuleTab', 'checkbox', NULL, NULL, 10.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RecycleBinFolder', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_RecycleBinFolder', 'text', NULL, NULL, 10.10, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL, NULL, 10.11, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FilenameSpecialCharReplacement', '-', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_||-=+-', 10.12, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.13, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Search_MinKeyword_Length', '3', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.14, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ExcludeTemplateSectionsFromSearch', '0', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_ExcludeTemplateSectionsFromSearch', 'checkbox', '', '', 10.15, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_MetaKey', '', 'In-Portal', 'in-portal:configure_categories', 'la_Text_MetaInfo', 'la_category_metakey', 'textarea', '', '', 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Category_MetaDesc', '', 'In-Portal', 'in-portal:configure_categories', 'la_Text_MetaInfo', 'la_category_metadesc', 'textarea', '', '', 20.02, 0, 1, NULL);
# Section "in-portal:configure_general":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Site_Name', 'In-Portal CMS', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsWebsite', 'la_config_website_name', 'text', '', '', 10.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday||1=la_monday', 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Config_Site_Time', '', 'In-Portal', 'in-portal:configure_general', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', NULL, 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_AdminMailFrom', 'portal@user.domain.name', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsMailling', 'la_prompt_AdminMailFrom', 'text', NULL, 'size="40"', 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionTimeout', '3600', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsSession', 'la_prompt_session_timeout', 'text', 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}', '', 40.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple||advanced=+advanced||custom=+custom', 50.01, 0, 1, NULL);
# Section "in-portal:configure_advanced":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'PageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', '', '', '', NULL, NULL, 0, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_use_modrewrite', 'checkbox', '', '', 10.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.011, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.012, 0, 0, 'la_hint_ForceModRewriteUrlEnding');
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.013, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'cms_DefaultDesign', '#default_design#', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultDesignTemplate', 'text', NULL, NULL, 10.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ErrorTemplate', 'error_notfound', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_error_template', 'text', '', '', 10.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'NoPermissionTemplate', 'no_permission', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_nopermission_template', 'text', '', '', 10.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePageHitCounter', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UsePageHitCounter', 'checkbox', '', '', 10.05, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.06, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_CheckStopWords', 'checkbox', '', '', 10.07, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'cms_DefaultTrackingCode', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_DefaultTrackingCode', 'textarea', NULL, 'COLS=40 ROWS=5', 10.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_management', 'select', NULL, '0=lu_opt_QueryString||1=lu_opt_Cookies||2=lu_opt_AutoDetect', 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_prompt_session_cookie_name', 'text', '', '', 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieDomains', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionCookieDomains', 'textarea', '', 'rows="5" cols="40"', 20.021, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'KeepSessionOnBrowserClose', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_KeepSessionOnBrowserClose', 'checkbox', '', '', 20.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionBrowserSignatureCheck', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionBrowserSignatureCheck', 'checkbox', NULL, NULL, 20.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionIPAddressCheck', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionIPAddressCheck', 'checkbox', NULL, NULL, 20.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseJSRedirect', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_use_js_redirect', 'checkbox', '', '', 20.06, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SSL_URL', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSSL', 'la_config_ssl_url', 'text', '', '', 30.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdminSSL_URL', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSSL', 'la_config_AdminSSL_URL', 'text', '', '', 30.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Require_SSL', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSSL', 'la_config_require_ssl', 'checkbox', '', '', 30.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Require_AdminSSL', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSSL', 'la_config_RequireSSLAdmin', 'checkbox', '', '', 30.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Force_HTTP_When_SSL_Not_Required', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSSL', 'la_config_force_http', 'checkbox', '', '', 30.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseModRewriteWithSSL', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSSL', 'la_config_use_modrewrite_with_ssl', 'checkbox', '', '', 30.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RootPass', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_prompt_root_pass', 'password', NULL, NULL, 40.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowAdminConsoleInterfaceChange', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_AllowAdminConsoleInterfaceChange', 'checkbox', NULL, NULL, 40.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseToolbarLabels', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseToolbarLabels', 'checkbox', NULL, NULL, 40.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseSmallHeader', 'checkbox', '', '', 40.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseColumnFreezer', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseColumnFreezer', 'checkbox', '', '', 40.05, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UsePopups', '2', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UsePopups', 'select', '', '0=la_opt_SameWindow||1=la_opt_PopupWindow||2=la_opt_ModalWindow', 40.06, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'StickyGridSelection', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_StickyGridSelection', 'radio', '', '1=la_Yes||0=la_No', 40.07, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseDoubleSorting', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseDoubleSorting', 'radio', '', '1=la_Yes||0=la_No', 40.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MenuFrameWidth', '200', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_prompt_MenuFrameWidth', 'text', NULL, NULL, 40.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ResizableFrames', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_ResizableFrames', 'checkbox', '', '', 40.10, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_AutoRefreshIntervals', 'text', '', '', 40.11, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DebugOnlyFormConfigurator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_DebugOnlyFormConfigurator', 'checkbox', '', '', 40.12, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RememberLastAdminTemplate', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 40.13, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseHTTPAuth', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_UseHTTPAuth', 'checkbox', '', '', 40.14, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthUsername', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthUsername', 'text', '', '', 40.15, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthPassword', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthPassword', 'password', NULL, NULL, 40.16, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'HTTPAuthBypassIPs', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_HTTPAuthBypassIPs', 'text', '', '', 40.17, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Server', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_mailserver', 'text', NULL, NULL, 50.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Port', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_mailport', 'text', NULL, NULL, 50.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Authenticate', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_mailauthenticate', 'checkbox', NULL, NULL, 50.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_User', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_user', 'text', NULL, NULL, 50.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_Pass', NULL, 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtp_pass', 'text', NULL, NULL, 50.05, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Smtp_DefaultHeaders', 'X-Mailer: In-Portal', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_prompt_smtpheaders', 'textarea', NULL, 'COLS=40 ROWS=5', 50.06, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailFunctionHeaderSeparator', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux||2=la_Windows', 50.07, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListQueuePerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListQueuePerStep', 'text', NULL, NULL, 50.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MailingListSendPerStep', '10', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsMailling', 'la_config_MailingListSendPerStep', 'text', NULL, NULL, 50.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseOutputCompression', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_UseOutputCompression', 'checkbox', '', '', 60.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'OutputCompressionLevel', '7', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_OutputCompressionLevel', 'text', '', '', 60.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseTemplateCompression', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_UseTemplateCompression', 'checkbox', '', '', 60.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'TrimRequiredFields', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_TrimRequiredFields', 'checkbox', '', '', 60.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseCronForRegularEvent', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_UseCronForRegularEvent', 'checkbox', NULL, NULL, 60.05, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseChangeLog', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_UseChangeLog', 'checkbox', '', '', 60.06, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Backup_Path', '/home/alex/web/in-portal.rc/system/backupdata', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_config_backup_path', 'text', '', '', 60.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SystemTagCache', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_syscache_enable', 'checkbox', NULL, NULL, 60.08, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SocketBlockingMode', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSystem', 'la_prompt_socket_blocking_mode', 'checkbox', NULL, NULL, 60.09, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportDelimiter', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_opt_Tab||1=la_opt_Comma||2=la_opt_Semicolon||3=la_opt_Space||4=la_opt_Colon', 70.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes||1=la_Quotes', 70.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux||1=la_Windows', 70.03, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCSVExport', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode||1=la_Regular', 70.04, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None||Memcache=+Memcached||Apc=+Alternative PHP Cache||XCache=+XCache', 80.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MemcacheServers', 'localhost:11211', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsCaching', 'la_config_MemcacheServers', 'text', NULL, '', 80.02, 0, 0, 'la_hint_MemcacheServers');
# Section "in-portal:configure_users":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_allow_new', 'radio', '', '1=la_opt_UserInstantRegistration||2=la_opt_UserNotAllowedRegistration||3=la_opt_UserUponApprovalRegistration||4=la_opt_UserEmailActivation', 10.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AdvancedUserManagement', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_AdvancedUserManagement', 'checkbox', NULL, NULL, 10.011, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Email_As_Login', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_use_emails_as_login', 'checkbox', NULL, NULL, 10.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'RegistrationCaptcha', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_registration_captcha', 'checkbox', NULL, NULL, 10.025, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Min_UserName', '3', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_username', 'text', '', 'style="width: 50px;"', 10.03, 1, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxUserName', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_username', 'text', '', 'style="width: 50px;"', 10.03, 2, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Min_Password', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_password', 'text', '', '', 10.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_allow_reset', 'text', NULL, NULL, 10.05, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UserEmailActivationTimeout', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_UserEmailActivationTimeout', 'text', NULL, NULL, 10.051, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Password_Auto', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_password_auto', 'checkbox', '', '', 10.06, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_MembershipExpirationReminder', '10', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_MembershipExpirationReminder', 'text', NULL, '', 10.07, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_new_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.08, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_assign_all_to', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.09, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_guest_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.1, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_subscriber_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.11, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_AdminGroup', '11', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_admin_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.12, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_DefaultRegistrationCountry', 'select', NULL, '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>', 10.13, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'AllowSelectGroupOnFront', '0', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_AllowSelectGroupOnFront', 'checkbox', NULL, NULL, 10.14, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'DefaultSettingsUserId', '-1', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_prompt_DefaultUserId', 'text', NULL, NULL, 10.15, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Votes_Deny', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_Text_Restrictions', 'la_users_votes_deny', 'text', '', '', 20.01, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_Review_Deny', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_Text_Restrictions', 'la_users_review_deny', 'text', '', '', 20.02, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'u_MaxImageCount', '5', 'In-Portal:Users', 'in-portal:configure_users', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 30.01, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'u_ThumbnailImageWidth', '120', 'In-Portal:Users', 'in-portal:configure_users', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 30.02, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'u_ThumbnailImageHeight', '120', 'In-Portal:Users', 'in-portal:configure_users', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 30.03, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'u_FullImageWidth', '450', 'In-Portal:Users', 'in-portal:configure_users', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 30.04, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'u_FullImageHeight', '450', 'In-Portal:Users', 'in-portal:configure_users', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 30.05, 0, 0, NULL);
# Section "in-portal:configuration_search":
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Increase_category', '30', 'In-Portal', 'in-portal:configuration_search', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Keyword_category', '90', 'In-Portal', 'in-portal:configuration_search', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Pop_category', '5', 'In-Portal', 'in-portal:configuration_search', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SearchRel_Rating_category', '5', 'In-Portal', 'in-portal:configuration_search', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'CategoriesRebuildSerial', '0', 'In-Portal', '', '', '', '', NULL, NULL, 0, 0, 0, NULL);
INSERT INTO ItemTypes VALUES (1, 'In-Portal', 'c', 'Category', 'Name', 'CreatedById', NULL, NULL, 'la_ItemTab_Categories', 1, 'admin/category/addcategory.php', 'clsCategory', 'Category');
-INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Login', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User');
+INSERT INTO ItemTypes VALUES (6, 'In-Portal', 'u', 'PortalUser', 'Username', 'PortalUserId', NULL, NULL, '', 0, '', 'clsPortalUser', 'User');
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 0, 'Core', 'Add User', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD', NULL, 1, 1, 'Core', 'Add User', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 0, 'Core', 'Approve User', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.APPROVE', NULL, 1, 1, 'Core', 'Approve User', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 0, 'Core', 'Validate User', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.VALIDATE', NULL, 1, 1, 'Core', 'Validate User', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 0, 'Core', 'Deny User', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.DENY', NULL, 1, 1, 'Core', 'Deny User', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending User', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending User', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, 'Core', 'Add Category', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, 'Core', 'Add Pending Category', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 1, 'Core', 'Add Pending Category', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.ADD', NULL, 1, 1, 'Core', 'Add Category', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, 'Core', 'Approve Category', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, 'Core', 'Deny Category', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, 'Core', 'User subscribed', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 1, 'Core', 'User subscribed', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, 'Core', 'User unsubscribed', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 1, 'Core', 'User unsubscribed', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 0, 'Core', 'Suggest to a friend', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.SUGGEST', NULL, 1, 1, 'Core', 'Suggest to a friend', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.PSWDC', NULL, 1, 0, 'Core', 'Password Confirmation', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'Core', 'Membership expired', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'Core', 'Membership expiration notice', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, 'Core', 'Common Footer Template', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMITTED', NULL, 1, 0, 'Core', 'This e-mail is sent to a user after filling in the Contact Us form', 0, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, 'Core', 'Admin Reply to User Form Submission', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, 'Core', 'User Replied to It\'s Form Submission', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, 'Core', 'Form Submission Admin Reply Delivery Failure', 1, 1, 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.NEW.PASSWORD', NULL, 1, 0, 'Core', 'Sends new password to an existing user', 0, 1, 0);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'USER.ADD.BYADMIN', NULL, 1, 0, 'Core', 'Sends password to a new user', 0, 1, 0);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ROOT.RESET.PASSWORD', NULL, 1, 0, 'Core', 'Root Reset Password', 1, 1, 0);
INSERT INTO IdGenerator VALUES ('100');
INSERT INTO PortalGroup VALUES(15, 'Everyone', 'Everyone', 0, 1, 0, 1, 0, NULL);
INSERT INTO PortalGroup VALUES(13, 'Member', '', 1054738682, 0, 0, 1, 1, NULL);
INSERT INTO PortalGroup VALUES(12, 'Subscribers', '', 1054738670, 0, 0, 1, 0, NULL);
INSERT INTO PortalGroup VALUES(14, 'Guest', 'Guest User', 0, 1, 0, 1, 0, NULL);
INSERT INTO PortalGroup VALUES(11, 'admin', NULL, 1054738405, 0, 0, 1, 0, NULL);
INSERT INTO CountryStates (CountryStateId, Type, StateCountryId, IsoCode, ShortIsoCode) VALUES
(1, 1, NULL, 'AFG', 'AF'),
(2, 1, NULL, 'ALB', 'AL'),
(3, 1, NULL, 'DZA', 'DZ'),
(4, 1, NULL, 'ASM', 'AS'),
(5, 1, NULL, 'AND', 'AD'),
(6, 1, NULL, 'AGO', 'AO'),
(7, 1, NULL, 'AIA', 'AI'),
(8, 1, NULL, 'ATA', 'AQ'),
(9, 1, NULL, 'ATG', 'AG'),
(10, 1, NULL, 'ARG', 'AR'),
(11, 1, NULL, 'ARM', 'AM'),
(12, 1, NULL, 'ABW', 'AW'),
(13, 1, NULL, 'AUS', 'AU'),
(14, 1, NULL, 'AUT', 'AT'),
(15, 1, NULL, 'AZE', 'AZ'),
(16, 1, NULL, 'BHS', 'BS'),
(17, 1, NULL, 'BHR', 'BH'),
(18, 1, NULL, 'BGD', 'BD'),
(19, 1, NULL, 'BRB', 'BB'),
(20, 1, NULL, 'BLR', 'BY'),
(21, 1, NULL, 'BEL', 'BE'),
(22, 1, NULL, 'BLZ', 'BZ'),
(23, 1, NULL, 'BEN', 'BJ'),
(24, 1, NULL, 'BMU', 'BM'),
(25, 1, NULL, 'BTN', 'BT'),
(26, 1, NULL, 'BOL', 'BO'),
(27, 1, NULL, 'BIH', 'BA'),
(28, 1, NULL, 'BWA', 'BW'),
(29, 1, NULL, 'BVT', 'BV'),
(30, 1, NULL, 'BRA', 'BR'),
(31, 1, NULL, 'IOT', 'IO'),
(32, 1, NULL, 'BRN', 'BN'),
(33, 1, NULL, 'BGR', 'BG'),
(34, 1, NULL, 'BFA', 'BF'),
(35, 1, NULL, 'BDI', 'BI'),
(36, 1, NULL, 'KHM', 'KH'),
(37, 1, NULL, 'CMR', 'CM'),
(38, 1, NULL, 'CAN', 'CA'),
(39, 1, NULL, 'CPV', 'CV'),
(40, 1, NULL, 'CYM', 'KY'),
(41, 1, NULL, 'CAF', 'CF'),
(42, 1, NULL, 'TCD', 'TD'),
(43, 1, NULL, 'CHL', 'CL'),
(44, 1, NULL, 'CHN', 'CN'),
(45, 1, NULL, 'CXR', 'CX'),
(46, 1, NULL, 'CCK', 'CC'),
(47, 1, NULL, 'COL', 'CO'),
(48, 1, NULL, 'COM', 'KM'),
(49, 1, NULL, 'COD', 'CD'),
(50, 1, NULL, 'COG', 'CG'),
(51, 1, NULL, 'COK', 'CK'),
(52, 1, NULL, 'CRI', 'CR'),
(53, 1, NULL, 'CIV', 'CI'),
(54, 1, NULL, 'HRV', 'HR'),
(55, 1, NULL, 'CUB', 'CU'),
(56, 1, NULL, 'CYP', 'CY'),
(57, 1, NULL, 'CZE', 'CZ'),
(58, 1, NULL, 'DNK', 'DK'),
(59, 1, NULL, 'DJI', 'DJ'),
(60, 1, NULL, 'DMA', 'DM'),
(61, 1, NULL, 'DOM', 'DO'),
(62, 1, NULL, 'TLS', 'TL'),
(63, 1, NULL, 'ECU', 'EC'),
(64, 1, NULL, 'EGY', 'EG'),
(65, 1, NULL, 'SLV', 'SV'),
(66, 1, NULL, 'GNQ', 'GQ'),
(67, 1, NULL, 'ERI', 'ER'),
(68, 1, NULL, 'EST', 'EE'),
(69, 1, NULL, 'ETH', 'ET'),
(70, 1, NULL, 'FLK', 'FK'),
(71, 1, NULL, 'FRO', 'FO'),
(72, 1, NULL, 'FJI', 'FJ'),
(73, 1, NULL, 'FIN', 'FI'),
(74, 1, NULL, 'FRA', 'FR'),
(75, 1, NULL, 'FXX', 'FX'),
(76, 1, NULL, 'GUF', 'GF'),
(77, 1, NULL, 'PYF', 'PF'),
(78, 1, NULL, 'ATF', 'TF'),
(79, 1, NULL, 'GAB', 'GA'),
(80, 1, NULL, 'GMB', 'GM'),
(81, 1, NULL, 'GEO', 'GE'),
(82, 1, NULL, 'DEU', 'DE'),
(83, 1, NULL, 'GHA', 'GH'),
(84, 1, NULL, 'GIB', 'GI'),
(85, 1, NULL, 'GRC', 'GR'),
(86, 1, NULL, 'GRL', 'GL'),
(87, 1, NULL, 'GRD', 'GD'),
(88, 1, NULL, 'GLP', 'GP'),
(89, 1, NULL, 'GUM', 'GU'),
(90, 1, NULL, 'GTM', 'GT'),
(91, 1, NULL, 'GIN', 'GN'),
(92, 1, NULL, 'GNB', 'GW'),
(93, 1, NULL, 'GUY', 'GY'),
(94, 1, NULL, 'HTI', 'HT'),
(95, 1, NULL, 'HMD', 'HM'),
(96, 1, NULL, 'HND', 'HN'),
(97, 1, NULL, 'HKG', 'HK'),
(98, 1, NULL, 'HUN', 'HU'),
(99, 1, NULL, 'ISL', 'IS'),
(100, 1, NULL, 'IND', 'IN'),
(101, 1, NULL, 'IDN', 'ID'),
(102, 1, NULL, 'IRN', 'IR'),
(103, 1, NULL, 'IRQ', 'IQ'),
(104, 1, NULL, 'IRL', 'IE'),
(105, 1, NULL, 'ISR', 'IL'),
(106, 1, NULL, 'ITA', 'IT'),
(107, 1, NULL, 'JAM', 'JM'),
(108, 1, NULL, 'JPN', 'JP'),
(109, 1, NULL, 'JOR', 'JO'),
(110, 1, NULL, 'KAZ', 'KZ'),
(111, 1, NULL, 'KEN', 'KE'),
(112, 1, NULL, 'KIR', 'KI'),
(113, 1, NULL, 'PRK', 'KP'),
(114, 1, NULL, 'KOR', 'KR'),
(115, 1, NULL, 'KWT', 'KW'),
(116, 1, NULL, 'KGZ', 'KG'),
(117, 1, NULL, 'LAO', 'LA'),
(118, 1, NULL, 'LVA', 'LV'),
(119, 1, NULL, 'LBN', 'LB'),
(120, 1, NULL, 'LSO', 'LS'),
(121, 1, NULL, 'LBR', 'LR'),
(122, 1, NULL, 'LBY', 'LY'),
(123, 1, NULL, 'LIE', 'LI'),
(124, 1, NULL, 'LTU', 'LT'),
(125, 1, NULL, 'LUX', 'LU'),
(126, 1, NULL, 'MAC', 'MO'),
(127, 1, NULL, 'MKD', 'MK'),
(128, 1, NULL, 'MDG', 'MG'),
(129, 1, NULL, 'MWI', 'MW'),
(130, 1, NULL, 'MYS', 'MY'),
(131, 1, NULL, 'MDV', 'MV'),
(132, 1, NULL, 'MLI', 'ML'),
(133, 1, NULL, 'MLT', 'MT'),
(134, 1, NULL, 'MHL', 'MH'),
(135, 1, NULL, 'MTQ', 'MQ'),
(136, 1, NULL, 'MRT', 'MR'),
(137, 1, NULL, 'MUS', 'MU'),
(138, 1, NULL, 'MYT', 'YT'),
(139, 1, NULL, 'MEX', 'MX'),
(140, 1, NULL, 'FSM', 'FM'),
(141, 1, NULL, 'MDA', 'MD'),
(142, 1, NULL, 'MCO', 'MC'),
(143, 1, NULL, 'MNG', 'MN'),
(144, 1, NULL, 'MSR', 'MS'),
(145, 1, NULL, 'MAR', 'MA'),
(146, 1, NULL, 'MOZ', 'MZ'),
(147, 1, NULL, 'MMR', 'MM'),
(148, 1, NULL, 'NAM', 'NA'),
(149, 1, NULL, 'NRU', 'NR'),
(150, 1, NULL, 'NPL', 'NP'),
(151, 1, NULL, 'NLD', 'NL'),
(152, 1, NULL, 'ANT', 'AN'),
(153, 1, NULL, 'NCL', 'NC'),
(154, 1, NULL, 'NZL', 'NZ'),
(155, 1, NULL, 'NIC', 'NI'),
(156, 1, NULL, 'NER', 'NE'),
(157, 1, NULL, 'NGA', 'NG'),
(158, 1, NULL, 'NIU', 'NU'),
(159, 1, NULL, 'NFK', 'NF'),
(160, 1, NULL, 'MNP', 'MP'),
(161, 1, NULL, 'NOR', 'NO'),
(162, 1, NULL, 'OMN', 'OM'),
(163, 1, NULL, 'PAK', 'PK'),
(164, 1, NULL, 'PLW', 'PW'),
(165, 1, NULL, 'PSE', 'PS'),
(166, 1, NULL, 'PAN', 'PA'),
(167, 1, NULL, 'PNG', 'PG'),
(168, 1, NULL, 'PRY', 'PY'),
(169, 1, NULL, 'PER', 'PE'),
(170, 1, NULL, 'PHL', 'PH'),
(171, 1, NULL, 'PCN', 'PN'),
(172, 1, NULL, 'POL', 'PL'),
(173, 1, NULL, 'PRT', 'PT'),
(174, 1, NULL, 'PRI', 'PR'),
(175, 1, NULL, 'QAT', 'QA'),
(176, 1, NULL, 'REU', 'RE'),
(177, 1, NULL, 'ROU', 'RO'),
(178, 1, NULL, 'RUS', 'RU'),
(179, 1, NULL, 'RWA', 'RW'),
(180, 1, NULL, 'KNA', 'KN'),
(181, 1, NULL, 'LCA', 'LC'),
(182, 1, NULL, 'VCT', 'VC'),
(183, 1, NULL, 'WSM', 'WS'),
(184, 1, NULL, 'SMR', 'SM'),
(185, 1, NULL, 'STP', 'ST'),
(186, 1, NULL, 'SAU', 'SA'),
(187, 1, NULL, 'SEN', 'SN'),
(188, 1, NULL, 'SYC', 'SC'),
(189, 1, NULL, 'SLE', 'SL'),
(190, 1, NULL, 'SGP', 'SG'),
(191, 1, NULL, 'SVK', 'SK'),
(192, 1, NULL, 'SVN', 'SI'),
(193, 1, NULL, 'SLB', 'SB'),
(194, 1, NULL, 'SOM', 'SO'),
(195, 1, NULL, 'ZAF', 'ZA'),
(196, 1, NULL, 'SGS', 'GS'),
(197, 1, NULL, 'ESP', 'ES'),
(198, 1, NULL, 'LKA', 'LK'),
(199, 1, NULL, 'SHN', 'SH'),
(200, 1, NULL, 'SPM', 'PM'),
(201, 1, NULL, 'SDN', 'SD'),
(202, 1, NULL, 'SUR', 'SR'),
(203, 1, NULL, 'SJM', 'SJ'),
(204, 1, NULL, 'SWZ', 'SZ'),
(205, 1, NULL, 'SWE', 'SE'),
(206, 1, NULL, 'CHE', 'CH'),
(207, 1, NULL, 'SYR', 'SY'),
(208, 1, NULL, 'TWN', 'TW'),
(209, 1, NULL, 'TJK', 'TJ'),
(210, 1, NULL, 'TZA', 'TZ'),
(211, 1, NULL, 'THA', 'TH'),
(212, 1, NULL, 'TGO', 'TG'),
(213, 1, NULL, 'TKL', 'TK'),
(214, 1, NULL, 'TON', 'TO'),
(215, 1, NULL, 'TTO', 'TT'),
(216, 1, NULL, 'TUN', 'TN'),
(217, 1, NULL, 'TUR', 'TR'),
(218, 1, NULL, 'TKM', 'TM'),
(219, 1, NULL, 'TCA', 'TC'),
(220, 1, NULL, 'TUV', 'TV'),
(221, 1, NULL, 'UGA', 'UG'),
(222, 1, NULL, 'UKR', 'UA'),
(223, 1, NULL, 'ARE', 'AE'),
(224, 1, NULL, 'GBR', 'GB'),
(225, 1, NULL, 'USA', 'US'),
(226, 1, NULL, 'UMI', 'UM'),
(227, 1, NULL, 'URY', 'UY'),
(228, 1, NULL, 'UZB', 'UZ'),
(229, 1, NULL, 'VUT', 'VU'),
(230, 1, NULL, 'VAT', 'VA'),
(231, 1, NULL, 'VEN', 'VE'),
(232, 1, NULL, 'VNM', 'VN'),
(233, 1, NULL, 'VGB', 'VG'),
(234, 1, NULL, 'VIR', 'VI'),
(235, 1, NULL, 'WLF', 'WF'),
(236, 1, NULL, 'ESH', 'EH'),
(237, 1, NULL, 'YEM', 'YE'),
(238, 1, NULL, 'YUG', 'YU'),
(239, 1, NULL, 'ZMB', 'ZM'),
(240, 1, NULL, 'ZWE', 'ZW'),
(370, 2, 38, 'YT', NULL),
(369, 2, 38, 'SK', NULL),
(368, 2, 38, 'QC', NULL),
(367, 2, 38, 'PE', NULL),
(366, 2, 38, 'ON', NULL),
(365, 2, 38, 'NU', NULL),
(364, 2, 38, 'NS', NULL),
(363, 2, 38, 'NT', NULL),
(362, 2, 38, 'NL', NULL),
(361, 2, 38, 'NB', NULL),
(360, 2, 38, 'MB', NULL),
(359, 2, 38, 'BC', NULL),
(358, 2, 38, 'AB', NULL),
(357, 2, 225, 'DC', NULL),
(356, 2, 225, 'WY', NULL),
(355, 2, 225, 'WI', NULL),
(354, 2, 225, 'WV', NULL),
(353, 2, 225, 'WA', NULL),
(352, 2, 225, 'VA', NULL),
(351, 2, 225, 'VT', NULL),
(350, 2, 225, 'UT', NULL),
(349, 2, 225, 'TX', NULL),
(348, 2, 225, 'TN', NULL),
(347, 2, 225, 'SD', NULL),
(346, 2, 225, 'SC', NULL),
(345, 2, 225, 'RI', NULL),
(344, 2, 225, 'PR', NULL),
(343, 2, 225, 'PA', NULL),
(342, 2, 225, 'OR', NULL),
(341, 2, 225, 'OK', NULL),
(340, 2, 225, 'OH', NULL),
(339, 2, 225, 'ND', NULL),
(338, 2, 225, 'NC', NULL),
(337, 2, 225, 'NY', NULL),
(336, 2, 225, 'NM', NULL),
(335, 2, 225, 'NJ', NULL),
(334, 2, 225, 'NH', NULL),
(333, 2, 225, 'NV', NULL),
(332, 2, 225, 'NE', NULL),
(331, 2, 225, 'MT', NULL),
(330, 2, 225, 'MO', NULL),
(329, 2, 225, 'MS', NULL),
(328, 2, 225, 'MN', NULL),
(327, 2, 225, 'MI', NULL),
(326, 2, 225, 'MA', NULL),
(325, 2, 225, 'MD', NULL),
(324, 2, 225, 'ME', NULL),
(323, 2, 225, 'LA', NULL),
(322, 2, 225, 'KY', NULL),
(321, 2, 225, 'KS', NULL),
(320, 2, 225, 'IA', NULL),
(319, 2, 225, 'IN', NULL),
(318, 2, 225, 'IL', NULL),
(317, 2, 225, 'ID', NULL),
(316, 2, 225, 'HI', NULL),
(315, 2, 225, 'GA', NULL),
(314, 2, 225, 'FL', NULL),
(313, 2, 225, 'DE', NULL),
(312, 2, 225, 'CT', NULL),
(311, 2, 225, 'CO', NULL),
(310, 2, 225, 'CA', NULL),
(309, 2, 225, 'AR', NULL),
(308, 2, 225, 'AZ', NULL),
(307, 2, 225, 'AK', NULL),
(306, 2, 225, 'AL', NULL);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.VIEW', 'la_PermName_Category.View_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD', 'la_PermName_Category.Add_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.DELETE', 'la_PermName_Category.Delete_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', 'la_PermName_Category.AddPending_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.MODIFY', 'la_PermName_Category.Modify_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'ADMIN', 'la_PermName_Admin_desc', 'Admin', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'LOGIN', 'la_PermName_Login_desc', 'Front', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.ITEM', 'la_PermName_Debug.Item_desc', 'Admin', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.LIST', 'la_PermName_Debug.List_desc', 'Admin', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'DEBUG.INFO', 'la_PermName_Debug.Info_desc', 'Admin', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'PROFILE.MODIFY', 'la_PermName_Profile.Modify_desc', 'Admin', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'SHOWLANG', 'la_PermName_ShowLang_desc', 'Admin', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'FAVORITES', 'la_PermName_favorites_desc', 'In-Portal', 1);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'SYSTEM_ACCESS.READONLY', 'la_PermName_SystemAccess.ReadOnly_desc', 'Admin', 1);
INSERT INTO PermCache VALUES (DEFAULT, 0, 1, '11,12,13,14,15');
INSERT INTO Permissions VALUES (DEFAULT, 'LOGIN', 13, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'LOGIN', 12, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'LOGIN', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'ADMIN', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:root.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:system.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:website_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:admins.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:admins.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:admins.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:admins.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:phrases.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:phrases.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:phrases.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:phrases.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configemail.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configemail.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configemail.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configemail.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.VIEW', 15, 1, 0, 1);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.ADD', 11, 1, 0, 1);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.ADD.PENDING', 13, 1, 0, 1);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.DELETE', 11, 1, 0, 1);
INSERT INTO Permissions VALUES(DEFAULT, 'CATEGORY.MODIFY', 11, 1, 0, 1);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:agents.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:agents.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:agents.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:agents.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:browse.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:advanced_view.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:reviews.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_categories.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_search.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configuration_custom.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:users.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.advanced:ban', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_list.advanced:send_email', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:send_email', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_groups.advanced:manage_permissions', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_users.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_custom.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_banlist.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:reports.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:log_summary.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:searchlog.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:searchlog.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sessionlog.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sessionlog.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:emaillog.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:emaillog.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:visits.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:visits.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_general.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:modules.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.advanced:approve', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mod_status.advanced:decline', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:addmodule.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:tag_library.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_themes.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_styles.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:set_primary', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:import', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_lang.advanced:export', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:tools.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:backup.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:restore.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:export.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:main_import.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sql_query.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:sql_query.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:server_info.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:help.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:browse_site.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:forms.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:forms.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:forms.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:forms.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:submissions.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:email_queue.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:email_queue.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:session_logs.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:session_logs.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:change_logs.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:change_logs.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:change_logs.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:thesaurus.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:thesaurus.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:thesaurus.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:thesaurus.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:skins.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.delete', 11, 1, 1, 0);
INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\nbody, td {\r\n /* fix for Firefox, when font-size was not inherited in table cells */\r\n font-size: 9pt;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000 !important;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-top-width: 1px;\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\ntable.head-table {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/right_background.png'') top right @@HeadBgColor@@ no-repeat;\r\n}\r\n\r\n.head-table tr td, .head-table tr td a {\r\n color: @@HeadColor@@\r\n}\r\n\r\ndiv#extra_toolbar td.button-active {\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_button_background.gif'') bottom left repeat-x;\r\n height: 22px;\r\n}\r\n\r\ndiv#extra_toolbar td.button-active a {\r\n color: black;\r\n text-decoration: none;\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background: url(''@@base_url@@/core/admin_templates/img/top_frame/toolbar_background.gif'') repeat-x top left;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n font-weight: bold;\r\n color: #0080C8;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: #FFFFFF;\r\n /*background-color: @@HeadBarBgColor@@;*/\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(''@@base_url@@/core/admin_templates/img/button_back_disabled.gif'') #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n margin-left: 3px !important;\r\n white-space: nowrap;\r\n}\r\n\r\n.tab-active {\r\n background-color: #4487D9;\r\n}\r\n\r\n.tab a {\r\n color: #4487D9;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #FFFFFF;\r\n font-weight: bold;\r\n}\r\n\r\na.scroll-left, a.scroll-right {\r\n cursor: pointer;\r\n display: block;\r\n float: left;\r\n height: 18px;\r\n margin: 0px 1px;\r\n width: 18px;\r\n}\r\n\r\na.scroll-left {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/left.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.scroll-right {\r\n background: transparent url(''@@base_url@@/core/admin_templates/img/tabs/right.png'') no-repeat scroll 0 0;\r\n}\r\n\r\na.disabled {\r\n visibility: hidden !important;\r\n}\r\n\r\na.scroll-left:hover, a.scroll-right:hover {\r\n background-position: 0 -18px;\r\n}\r\n\r\ntd.scroll-right-container {\r\n width: 20px;\r\n}\r\n\r\ntd.scroll-right-container.disabled, td.scroll-right-container.disabled * {\r\n width: 0px;\r\n margin: 0px;\r\n}\r\n\r\ntd.scroll-right-container.disabled br {\r\n display: none;\r\n}\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n.layout-only-table td {\r\n border: none !important;\r\n}\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n overflow: hidden;\r\n border-right: 1px solid #c9c9c9;\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td, table tr.grid-data-row[_row_highlighted] td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td, table tr.grid-data-row[_row_selected] td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td, .grid-data-row-even[_row_selected] td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n border-right: 1px solid #777;\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-1 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter, input.filter-active, select.filter-active {\r\n margin-bottom: 0px;\r\n border: 1px solid #aaa;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.filter, div.filter-active {\r\n background-color: white;\r\n border: 1px solid #AAAAAA;\r\n color: black;\r\n font-weight: normal;\r\n padding: 3px;\r\n}\r\n\r\ndiv.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\ndiv.multioptions_filter {\r\n position: absolute;\r\n z-index: 100;\r\n color: black;\r\n background-color: white;\r\n border: 1px solid black;\r\n padding: 3px 5px;\r\n display: none;\r\n vertical-align: middle;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-0 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\ntr.grid-header-row-0 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-0 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: 1px solid #C9C9C9;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-1 td.grid-header-col-1 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px !important;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n vertical-align: middle;\r\n}\r\n\r\n/* remove top-border from first sub-section element */\r\ntable.edit-form .subsectiontitle:first-child, table.bordered .subsectiontitle:first-child {\r\n border-top-width: 0;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n /*padding: 3px 5px 3px 5px;*/\r\n padding: 1px 5px;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(''@@base_url@@/core/admin_templates/img/bgr_input_name_line.gif'') no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 160px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_mid.gif'') repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(''@@base_url@@/core/admin_templates/img/bgr_input_line.gif'') no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n.error {\r\n color: red;\r\n}\r\n.error-cell {\r\n color: red;\r\n}\r\n\r\n.field-required {\r\n color: red;\r\n}\r\n\r\n.warning-table {\r\n background-color: #F0F1EB;\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n border-top-width: 0px;\r\n}\r\n\r\n.form-notice, .form-warning {\r\n font-size: 11px;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.form-notice {\r\n color: green;\r\n}\r\n\r\n.priority {\r\n color: red;\r\n padding-left: 1px;\r\n padding-right: 1px;\r\n font-size: 11px;\r\n}\r\n\r\n.small-statistics {\r\n font-size: 11px;\r\n color: #707070;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n/* Uploader */\r\n.uploader-queue div.file {\r\n font-size: 11px;\r\n border: 1px solid #7F99C5;\r\n padding: 3px;\r\n background-color: #DEE7F6;\r\n margin-bottom: 2px;\r\n}\r\n\r\n.uploader-queue .left {\r\n float: left;\r\n vertical-align: top;\r\n}\r\n\r\n.uploader-queue .file-label {\r\n margin-left: 5px;\r\n}\r\n\r\n.uploader-queue .preview .delete-checkbox {\r\n margin-top: -3px;\r\n}\r\n\r\n.uploader-queue .progress-container {\r\n margin: 2px 5px 0px 5px;\r\n}\r\n\r\n.uploader-queue .progress-empty {\r\n width: 150px;\r\n height: 9px;\r\n border: 1px solid black;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_left.gif'') repeat-x;\r\n}\r\n\r\n.uploader-queue .progress-full {\r\n height: 9px;\r\n background: url(''@@base_url@@/core/admin_templates/img/progress_done.gif'');\r\n}\r\n\r\n.uploader-queue .thumbnail {\r\n /*margin-bottom: 2px;*/\r\n border: 1px solid black;\r\n background-color: grey;\r\n}\r\n\r\n/* To be sorted */\r\nspan#category_path, span#category_path a {\r\n color: #FFFFFF;\r\n}\r\n\r\nspan#category_path a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left side of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px;\r\n}\r\n\r\n.tree tr td a:hover, .tree tr td a.debug-only-item:hover {\r\n color: @@TreeHoverColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a, .tree tr.highlighted td a.debug-only-item {\r\n color: @@TreeHighColor@@;\r\n background-color: @@TreeHighBgColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: @@TreeHighHoverColor@@;\r\n}\r\n\r\n.tree tr td a.debug-only-item {\r\n color: grey;\r\n}\r\n\r\n/* Ajax Dropdown */\r\n.suggest-box {\r\n border: 1px solid #999;\r\n background-color: #fff;\r\n}\r\n\r\n.suggest-item, .suggest-item-over {\r\n padding: 1px 2px 0px 2px;\r\n font-family: arial,verdana;\r\n font-size: 12px;\r\n}\r\n\r\n.suggest-item-over {\r\n background-color: #3366CC;\r\n color: #fff;\r\n}\r\n\r\n/* Dashboard Summary Boxes */\r\n.summary-box {\r\n border: 1px solid black;\r\n margin-bottom: 4px;\r\n}\r\n\r\n.summary-box .title {\r\n color: white;\r\n font-weight: bold;\r\n padding: 6px 5px;\r\n vertical-align: middle;\r\n background-color: #4A92CE;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n.summary-box .content {\r\n padding: 4px;\r\n background-color: #F6F6F6;\r\n}\r\n\r\n.summary-box .group {\r\n border-bottom: 1px solid black;\r\n margin-bottom: 10px;\r\n padding: 0 0 10px 10px;\r\n}\r\n\r\n.summary-box .group.last {\r\n border-width: 0px;\r\n margin-bottom: 0;\r\n padding-bottom: 5px;\r\n}\r\n\r\n.summary-box h4 {\r\n margin: 0;\r\n padding: 0 0 3px 0;\r\n font-size: 11px;\r\n font-weight: bold;\r\n}\r\n\r\n.summary-box .hint {\r\n font-size: 10px;\r\n color: grey;\r\n margin-bottom: 3px;\r\n}\r\n\r\n.summary-box .hint .cache-key {\r\n margin-bottom: 7px;\r\n margin-left: 3px;\r\n}\r\n\r\n.summary-box ul {\r\n margin-top: 5px;\r\n margin-bottom: 3px;\r\n padding-left: 30px;\r\n}\r\n\r\n.summary-box li {\r\n padding-bottom: 4px;\r\n}', 'in-portal_logo_img.jpg', 'in-portal_logo_img2.jpg', 'in-portal_logo_login.gif', 'a:22:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#007BF4";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#FFFFFF";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#000000";}s:14:"TreeHoverColor";a:1:{s:5:"Value";s:7:"#009FF0";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:18:"TreeHighHoverColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#DCECF6";}}', 1319019189, 1, 1);
INSERT INTO LocalesList VALUES
(1, '0x0436', 'Afrikaans (South Africa)', 'af-ZA', 'Latn', '1252'),
(2, '0x041c', 'Albanian (Albania)', 'sq-AL', 'Latn', '1252'),
(3, '0x0484', 'Alsatian (France)', 'gsw-FR', '', ''),
(4, '0x045e', 'Amharic (Ethiopia)', 'am-ET', '', 'UTF-8'),
(5, '0x1401', 'Arabic (Algeria)', 'ar-DZ', 'Arab', '1256'),
(6, '0x3c01', 'Arabic (Bahrain)', 'ar-BH', 'Arab', '1256'),
(7, '0x0c01', 'Arabic (Egypt)', 'ar-EG', 'Arab', '1256'),
(8, '0x0801', 'Arabic (Iraq)', 'ar-IQ', 'Arab', '1256'),
(9, '0x2c01', 'Arabic (Jordan)', 'ar-JO', 'Arab', '1256'),
(10, '0x3401', 'Arabic (Kuwait)', 'ar-KW', 'Arab', '1256'),
(11, '0x3001', 'Arabic (Lebanon)', 'ar-LB', 'Arab', '1256'),
(12, '0x1001', 'Arabic (Libya)', 'ar-LY', 'Arab', '1256'),
(13, '0x1801', 'Arabic (Morocco)', 'ar-MA', 'Arab', '1256'),
(14, '0x2001', 'Arabic (Oman)', 'ar-OM', 'Arab', '1256'),
(15, '0x4001', 'Arabic (Qatar)', 'ar-QA', 'Arab', '1256'),
(16, '0x0401', 'Arabic (Saudi Arabia)', 'ar-SA', 'Arab', '1256'),
(17, '0x2801', 'Arabic (Syria)', 'ar-SY', 'Arab', '1256'),
(18, '0x1c01', 'Arabic (Tunisia)', 'ar-TN', 'Arab', '1256'),
(19, '0x3801', 'Arabic (U.A.E.)', 'ar-AE', 'Arab', '1256'),
(20, '0x2401', 'Arabic (Yemen)', 'ar-YE', 'Arab', '1256'),
(21, '0x042b', 'Armenian (Armenia)', 'hy-AM', 'Armn', 'UTF-8'),
(22, '0x044d', 'Assamese (India)', 'as-IN', '', 'UTF-8'),
(23, '0x082c', 'Azeri (Azerbaijan, Cyrillic)', 'az-Cyrl-AZ', 'Cyrl', '1251'),
(24, '0x042c', 'Azeri (Azerbaijan, Latin)', 'az-Latn-AZ', 'Latn', '1254'),
(25, '0x046d', 'Bashkir (Russia)', 'ba-RU', '', ''),
(26, '0x042d', 'Basque (Basque)', 'eu-ES', 'Latn', '1252'),
(27, '0x0423', 'Belarusian (Belarus)', 'be-BY', 'Cyrl', '1251'),
(28, '0x0445', 'Bengali (India)', 'bn-IN', 'Beng', 'UTF-8'),
(29, '0x201a', 'Bosnian (Bosnia and Herzegovina, Cyrillic)', 'bs-Cyrl-BA', 'Cyrl', '1251'),
(30, '0x141a', 'Bosnian (Bosnia and Herzegovina, Latin)', 'bs-Latn-BA', 'Latn', '1250'),
(31, '0x047e', 'Breton (France)', 'br-FR', 'Latn', '1252'),
(32, '0x0402', 'Bulgarian (Bulgaria)', 'bg-BG', 'Cyrl', '1251'),
(33, '0x0403', 'Catalan (Catalan)', 'ca-ES', 'Latn', '1252'),
(34, '0x0c04', 'Chinese (Hong Kong SAR, PRC)', 'zh-HK', 'Hant', '950'),
(35, '0x1404', 'Chinese (Macao SAR)', 'zh-MO', 'Hant', '950'),
(36, '0x0804', 'Chinese (PRC)', 'zh-CN', 'Hans', '936'),
(37, '0x1004', 'Chinese (Singapore)', 'zh-SG', 'Hans', '936'),
(38, '0x0404', 'Chinese (Taiwan)', 'zh-TW', 'Hant', '950'),
(39, '0x101a', 'Croatian (Bosnia and Herzegovina, Latin)', 'hr-BA', 'Latn', '1250'),
(40, '0x041a', 'Croatian (Croatia)', 'hr-HR', 'Latn', '1250'),
(41, '0x0405', 'Czech (Czech Republic)', 'cs-CZ', 'Latn', '1250'),
(42, '0x0406', 'Danish (Denmark)', 'da-DK', 'Latn', '1252'),
(43, '0x048c', 'Dari (Afghanistan)', 'prs-AF', 'Arab', '1256'),
(44, '0x0465', 'Divehi (Maldives)', 'dv-MV', 'Thaa', 'UTF-8'),
(45, '0x0813', 'Dutch (Belgium)', 'nl-BE', 'Latn', '1252'),
(46, '0x0413', 'Dutch (Netherlands)', 'nl-NL', 'Latn', '1252'),
(47, '0x0c09', 'English (Australia)', 'en-AU', 'Latn', '1252'),
(48, '0x2809', 'English (Belize)', 'en-BZ', 'Latn', '1252'),
(49, '0x1009', 'English (Canada)', 'en-CA', 'Latn', '1252'),
(50, '0x2409', 'English (Caribbean)', 'en-029', 'Latn', '1252'),
(51, '0x4009', 'English (India)', 'en-IN', 'Latn', '1252'),
(52, '0x1809', 'English (Ireland)', 'en-IE', 'Latn', '1252'),
(53, '0x2009', 'English (Jamaica)', 'en-JM', 'Latn', '1252'),
(54, '0x4409', 'English (Malaysia)', 'en-MY', 'Latn', '1252'),
(55, '0x1409', 'English (New Zealand)', 'en-NZ', 'Latn', '1252'),
(56, '0x3409', 'English (Philippines)', 'en-PH', 'Latn', '1252'),
(57, '0x4809', 'English (Singapore)', 'en-SG', 'Latn', '1252'),
(58, '0x1c09', 'English (South Africa)', 'en-ZA', 'Latn', '1252'),
(59, '0x2c09', 'English (Trinidad and Tobago)', 'en-TT', 'Latn', '1252'),
(60, '0x0809', 'English (United Kingdom)', 'en-GB', 'Latn', '1252'),
(61, '0x0409', 'English (United States)', 'en-US', 'Latn', '1252'),
(62, '0x3009', 'English (Zimbabwe)', 'en-ZW', 'Latn', '1252'),
(63, '0x0425', 'Estonian (Estonia)', 'et-EE', 'Latn', '1257'),
(64, '0x0438', 'Faroese (Faroe Islands)', 'fo-FO', 'Latn', '1252'),
(65, '0x0464', 'Filipino (Philippines)', 'fil-PH', 'Latn', '1252'),
(66, '0x040b', 'Finnish (Finland)', 'fi-FI', 'Latn', '1252'),
(67, '0x080c', 'French (Belgium)', 'fr-BE', 'Latn', '1252'),
(68, '0x0c0c', 'French (Canada)', 'fr-CA', 'Latn', '1252'),
(69, '0x040c', 'French (France)', 'fr-FR', 'Latn', '1252'),
(70, '0x140c', 'French (Luxembourg)', 'fr-LU', 'Latn', '1252'),
(71, '0x180c', 'French (Monaco)', 'fr-MC', 'Latn', '1252'),
(72, '0x100c', 'French (Switzerland)', 'fr-CH', 'Latn', '1252'),
(73, '0x0462', 'Frisian (Netherlands)', 'fy-NL', 'Latn', '1252'),
(74, '0x0456', 'Galician (Spain)', 'gl-ES', 'Latn', '1252'),
(75, '0x0437', 'Georgian (Georgia)', 'ka-GE', 'Geor', 'UTF-8'),
(76, '0x0c07', 'German (Austria)', 'de-AT', 'Latn', '1252'),
(77, '0x0407', 'German (Germany)', 'de-DE', 'Latn', '1252'),
(78, '0x1407', 'German (Liechtenstein)', 'de-LI', 'Latn', '1252'),
(79, '0x1007', 'German (Luxembourg)', 'de-LU', 'Latn', '1252'),
(80, '0x0807', 'German (Switzerland)', 'de-CH', 'Latn', '1252'),
(81, '0x0408', 'Greek (Greece)', 'el-GR', 'Grek', '1253'),
(82, '0x046f', 'Greenlandic (Greenland)', 'kl-GL', 'Latn', '1252'),
(83, '0x0447', 'Gujarati (India)', 'gu-IN', 'Gujr', 'UTF-8'),
(84, '0x0468', 'Hausa (Nigeria, Latin)', 'ha-Latn-NG', 'Latn', '1252'),
(85, '0x040d', 'Hebrew (Israel)', 'he-IL', 'Hebr', '1255'),
(86, '0x0439', 'Hindi (India)', 'hi-IN', 'Deva', 'UTF-8'),
(87, '0x040e', 'Hungarian (Hungary)', 'hu-HU', 'Latn', '1250'),
(88, '0x040f', 'Icelandic (Iceland)', 'is-IS', 'Latn', '1252'),
(89, '0x0470', 'Igbo (Nigeria)', 'ig-NG', '', ''),
(90, '0x0421', 'Indonesian (Indonesia)', 'id-ID', 'Latn', '1252'),
(91, '0x085d', 'Inuktitut (Canada, Latin)', 'iu-Latn-CA', 'Latn', '1252'),
(92, '0x045d', 'Inuktitut (Canada, Syllabics)', 'iu-Cans-CA', 'Cans', 'UTF-8'),
(93, '0x083c', 'Irish (Ireland)', 'ga-IE', 'Latn', '1252'),
(94, '0x0410', 'Italian (Italy)', 'it-IT', 'Latn', '1252'),
(95, '0x0810', 'Italian (Switzerland)', 'it-CH', 'Latn', '1252'),
(96, '0x0411', 'Japanese (Japan)', 'ja-JP', 'Hani;Hira;Kana', '932'),
(97, '0x044b', 'Kannada (India)', 'kn-IN', 'Knda', 'UTF-8'),
(98, '0x043f', 'Kazakh (Kazakhstan)', 'kk-KZ', 'Cyrl', '1251'),
(99, '0x0453', 'Khmer (Cambodia)', 'kh-KH', 'Khmr', 'UTF-8'),
(100, '0x0486', 'K''iche (Guatemala)', 'qut-GT', 'Latn', '1252'),
(101, '0x0487', 'Kinyarwanda (Rwanda)', 'rw-RW', 'Latn', '1252'),
(102, '0x0457', 'Konkani (India)', 'kok-IN', 'Deva', 'UTF-8'),
(103, '0x0812', 'Windows 95, Windows NT 4.0 only: Korean (Johab)', '', '', ''),
(104, '0x0412', 'Korean (Korea)', 'ko-KR', 'Hang;Hani', '949'),
(105, '0x0440', 'Kyrgyz (Kyrgyzstan)', 'ky-KG', 'Cyrl', '1251'),
(106, '0x0454', 'Lao (Lao PDR)', 'lo-LA', 'Laoo', 'UTF-8'),
(107, '0x0426', 'Latvian (Latvia)', 'lv-LV', 'Latn', '1257'),
(108, '0x0427', 'Lithuanian (Lithuania)', 'lt-LT', 'Latn', '1257'),
(109, '0x082e', 'Lower Sorbian (Germany)', 'dsb-DE', 'Latn', '1252'),
(110, '0x046e', 'Luxembourgish (Luxembourg)', 'lb-LU', 'Latn', '1252'),
(111, '0x042f', 'Macedonian (Macedonia, FYROM)', 'mk-MK', 'Cyrl', '1251'),
(112, '0x083e', 'Malay (Brunei Darussalam)', 'ms-BN', 'Latn', '1252'),
(113, '0x043e', 'Malay (Malaysia)', 'ms-MY', 'Latn', '1252'),
(114, '0x044c', 'Malayalam (India)', 'ml-IN', 'Mlym', 'UTF-8'),
(115, '0x043a', 'Maltese (Malta)', 'mt-MT', 'Latn', '1252'),
(116, '0x0481', 'Maori (New Zealand)', 'mi-NZ', 'Latn', '1252'),
(117, '0x047a', 'Mapudungun (Chile)', 'arn-CL', 'Latn', '1252'),
(118, '0x044e', 'Marathi (India)', 'mr-IN', 'Deva', 'UTF-8'),
(119, '0x047c', 'Mohawk (Canada)', 'moh-CA', 'Latn', '1252'),
(120, '0x0450', 'Mongolian (Mongolia)', 'mn-Cyrl-MN', 'Cyrl', '1251'),
(121, '0x0850', 'Mongolian (PRC)', 'mn-Mong-CN', 'Mong', 'UTF-8'),
(122, '0x0850', 'Nepali (India)', 'ne-IN', '__', 'UTF-8'),
(123, '0x0461', 'Nepali (Nepal)', 'ne-NP', 'Deva', 'UTF-8'),
(124, '0x0414', 'Norwegian (Bokmål, Norway)', 'nb-NO', 'Latn', '1252'),
(125, '0x0814', 'Norwegian (Nynorsk, Norway)', 'nn-NO', 'Latn', '1252'),
(126, '0x0482', 'Occitan (France)', 'oc-FR', 'Latn', '1252'),
(127, '0x0448', 'Oriya (India)', 'or-IN', 'Orya', 'UTF-8'),
(128, '0x0463', 'Pashto (Afghanistan)', 'ps-AF', '', ''),
(129, '0x0429', 'Persian (Iran)', 'fa-IR', 'Arab', '1256'),
(130, '0x0415', 'Polish (Poland)', 'pl-PL', 'Latn', '1250'),
(131, '0x0416', 'Portuguese (Brazil)', 'pt-BR', 'Latn', '1252'),
(132, '0x0816', 'Portuguese (Portugal)', 'pt-PT', 'Latn', '1252'),
(133, '0x0446', 'Punjabi (India)', 'pa-IN', 'Guru', 'UTF-8'),
(134, '0x046b', 'Quechua (Bolivia)', 'quz-BO', 'Latn', '1252'),
(135, '0x086b', 'Quechua (Ecuador)', 'quz-EC', 'Latn', '1252'),
(136, '0x0c6b', 'Quechua (Peru)', 'quz-PE', 'Latn', '1252'),
(137, '0x0418', 'Romanian (Romania)', 'ro-RO', 'Latn', '1250'),
(138, '0x0417', 'Romansh (Switzerland)', 'rm-CH', 'Latn', '1252'),
(139, '0x0419', 'Russian (Russia)', 'ru-RU', 'Cyrl', '1251'),
(140, '0x243b', 'Sami (Inari, Finland)', 'smn-FI', 'Latn', '1252'),
(141, '0x103b', 'Sami (Lule, Norway)', 'smj-NO', 'Latn', '1252'),
(142, '0x143b', 'Sami (Lule, Sweden)', 'smj-SE', 'Latn', '1252'),
(143, '0x0c3b', 'Sami (Northern, Finland)', 'se-FI', 'Latn', '1252'),
(144, '0x043b', 'Sami (Northern, Norway)', 'se-NO', 'Latn', '1252'),
(145, '0x083b', 'Sami (Northern, Sweden)', 'se-SE', 'Latn', '1252'),
(146, '0x203b', 'Sami (Skolt, Finland)', 'sms-FI', 'Latn', '1252'),
(147, '0x183b', 'Sami (Southern, Norway)', 'sma-NO', 'Latn', '1252'),
(148, '0x1c3b', 'Sami (Southern, Sweden)', 'sma-SE', 'Latn', '1252'),
(149, '0x044f', 'Sanskrit (India)', 'sa-IN', 'Deva', 'UTF-8'),
(150, '0x1c1a', 'Serbian (Bosnia and Herzegovina, Cyrillic)', 'sr-Cyrl-BA', 'Cyrl', '1251'),
(151, '0x181a', 'Serbian (Bosnia and Herzegovina, Latin)', 'sr-Latn-BA', 'Latn', '1250'),
(152, '0x0c1a', 'Serbian (Serbia, Cyrillic)', 'sr-Cyrl-CS', 'Cyrl', '1251'),
(153, '0x081a', 'Serbian (Serbia, Latin)', 'sr-Latn-CS', 'Latn', '1250'),
(154, '0x046c', 'Sesotho sa Leboa/Northern Sotho (South Africa)', 'ns-ZA', 'Latn', '1252'),
(155, '0x0432', 'Setswana/Tswana (South Africa)', 'tn-ZA', 'Latn', '1252'),
(156, '0x045b', 'Sinhala (Sri Lanka)', 'si-LK', 'Sinh', 'UTF-8'),
(157, '0x041b', 'Slovak (Slovakia)', 'sk-SK', 'Latn', '1250'),
(158, '0x0424', 'Slovenian (Slovenia)', 'sl-SI', 'Latn', '1250'),
(159, '0x2c0a', 'Spanish (Argentina)', 'es-AR', 'Latn', '1252'),
(160, '0x400a', 'Spanish (Bolivia)', 'es-BO', 'Latn', '1252'),
(161, '0x340a', 'Spanish (Chile)', 'es-CL', 'Latn', '1252'),
(162, '0x240a', 'Spanish (Colombia)', 'es-CO', 'Latn', '1252'),
(163, '0x140a', 'Spanish (Costa Rica)', 'es-CR', 'Latn', '1252'),
(164, '0x1c0a', 'Spanish (Dominican Republic)', 'es-DO', 'Latn', '1252'),
(165, '0x300a', 'Spanish (Ecuador)', 'es-EC', 'Latn', '1252'),
(166, '0x440a', 'Spanish (El Salvador)', 'es-SV', 'Latn', '1252'),
(167, '0x100a', 'Spanish (Guatemala)', 'es-GT', 'Latn', '1252'),
(168, '0x480a', 'Spanish (Honduras)', 'es-HN', 'Latn', '1252'),
(169, '0x080a', 'Spanish (Mexico)', 'es-MX', 'Latn', '1252'),
(170, '0x4c0a', 'Spanish (Nicaragua)', 'es-NI', 'Latn', '1252'),
(171, '0x180a', 'Spanish (Panama)', 'es-PA', 'Latn', '1252'),
(172, '0x3c0a', 'Spanish (Paraguay)', 'es-PY', 'Latn', '1252'),
(173, '0x280a', 'Spanish (Peru)', 'es-PE', 'Latn', '1252'),
(174, '0x500a', 'Spanish (Puerto Rico)', 'es-PR', 'Latn', '1252'),
(175, '0x0c0a', 'Spanish (Spain)', 'es-ES', 'Latn', '1252'),
(176, '0x040a', 'Spanish (Spain, Traditional Sort)', 'es-ES_tradnl', 'Latn', '1252'),
(177, '0x540a', 'Spanish (United States)', 'es-US', '', ''),
(178, '0x380a', 'Spanish (Uruguay)', 'es-UY', 'Latn', '1252'),
(179, '0x200a', 'Spanish (Venezuela)', 'es-VE', 'Latn', '1252'),
(180, '0x0441', 'Swahili (Kenya)', 'sw-KE', 'Latn', '1252'),
(181, '0x081d', 'Swedish (Finland)', 'sv-FI', 'Latn', '1252'),
(182, '0x041d', 'Swedish (Sweden)', 'sv-SE', 'Latn', '1252'),
(183, '0x045a', 'Syriac (Syria)', 'syr-SY', 'Syrc', 'UTF-8'),
(184, '0x0428', 'Tajik (Tajikistan)', 'tg-Cyrl-TJ', 'Cyrl', '1251'),
(185, '0x085f', 'Tamazight (Algeria, Latin)', 'tzm-Latn-DZ', 'Latn', '1252'),
(186, '0x0449', 'Tamil (India)', 'ta-IN', 'Taml', 'UTF-8'),
(187, '0x0444', 'Tatar (Russia)', 'tt-RU', 'Cyrl', '1251'),
(188, '0x044a', 'Telugu (India)', 'te-IN', 'Telu', 'UTF-8'),
(189, '0x041e', 'Thai (Thailand)', 'th-TH', 'Thai', '874'),
(190, '0x0851', 'Tibetan (Bhutan)', 'bo-BT', 'Tibt', 'UTF-8'),
(191, '0x0451', 'Tibetan (PRC)', 'bo-CN', 'Tibt', 'UTF-8'),
(192, '0x041f', 'Turkish (Turkey)', 'tr-TR', 'Latn', '1254'),
(193, '0x0442', 'Turkmen (Turkmenistan)', 'tk-TM', 'Cyrl', '1251'),
(194, '0x0480', 'Uighur (PRC)', 'ug-CN', 'Arab', '1256'),
(195, '0x0422', 'Ukrainian (Ukraine)', 'uk-UA', 'Cyrl', '1251'),
(196, '0x042e', 'Upper Sorbian (Germany)', 'wen-DE', 'Latn', '1252'),
(197, '0x0820', 'Urdu (India)', 'tr-IN', '', ''),
(198, '0x0420', 'Urdu (Pakistan)', 'ur-PK', 'Arab', '1256'),
(199, '0x0843', 'Uzbek (Uzbekistan, Cyrillic)', 'uz-Cyrl-UZ', 'Cyrl', '1251'),
(200, '0x0443', 'Uzbek (Uzbekistan, Latin)', 'uz-Latn-UZ', 'Latn', '1254'),
(201, '0x042a', 'Vietnamese (Vietnam)', 'vi-VN', 'Latn', '1258'),
(202, '0x0452', 'Welsh (United Kingdom)', 'cy-GB', 'Latn', '1252'),
(203, '0x0488', 'Wolof (Senegal)', 'wo-SN', 'Latn', '1252'),
(204, '0x0434', 'Xhosa/isiXhosa (South Africa)', 'xh-ZA', 'Latn', '1252'),
(205, '0x0485', 'Yakut (Russia)', 'sah-RU', 'Cyrl', '1251'),
(206, '0x0478', 'Yi (PRC)', 'ii-CN', 'Yiii', 'UTF-8'),
(207, '0x046a', 'Yoruba (Nigeria)', 'yo-NG', '', ''),
(208, '0x0435', 'Zulu/isiZulu (South Africa)', 'zu-ZA', 'Latn', '1252');
INSERT INTO SearchConfig VALUES ('Category', 'NewItem', 0, 1, 'lu_fielddesc_category_newitem', 'lu_field_newitem', 'In-Portal', 'la_text_category', 18, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'PopItem', 0, 1, 'lu_fielddesc_category_popitem', 'lu_field_popitem', 'In-Portal', 'la_text_category', 19, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'HotItem', 0, 1, 'lu_fielddesc_category_hotitem', 'lu_field_hotitem', 'In-Portal', 'la_text_category', 17, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'MetaDescription', 0, 1, 'lu_fielddesc_category_metadescription', 'lu_field_metadescription', 'In-Portal', 'la_text_category', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'ParentPath', 0, 1, 'lu_fielddesc_category_parentpath', 'lu_field_parentpath', 'In-Portal', 'la_text_category', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'ResourceId', 0, 1, 'lu_fielddesc_category_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_category', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'CreatedById', 0, 1, 'lu_fielddesc_category_createdbyid', 'lu_field_createdbyid', 'In-Portal', 'la_text_category', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'CachedNavbar', 0, 1, 'lu_fielddesc_category_cachednavbar', 'lu_field_cachednavbar', 'In-Portal', 'la_text_category', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'CachedDescendantCatsQty', 0, 1, 'lu_fielddesc_category_cacheddescendantcatsqty', 'lu_field_cacheddescendantcatsqty', 'In-Portal', 'la_text_category', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'MetaKeywords', 0, 1, 'lu_fielddesc_category_metakeywords', 'lu_field_metakeywords', 'In-Portal', 'la_text_category', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'Priority', 0, 1, 'lu_fielddesc_category_priority', 'lu_field_priority', 'In-Portal', 'la_text_category', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'Status', 0, 1, 'lu_fielddesc_category_status', 'lu_field_status', 'In-Portal', 'la_text_category', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'EditorsPick', 0, 1, 'lu_fielddesc_category_editorspick', 'lu_field_editorspick', 'In-Portal', 'la_text_category', 6, DEFAULT, 0, 'boolean', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'CreatedOn', 0, 1, 'lu_fielddesc_category_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_category', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'Description', 1, 1, 'lu_fielddesc_category_description', 'lu_field_description', 'In-Portal', 'la_text_category', 4, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'Name', 1, 1, 'lu_fielddesc_category_name', 'lu_field_name', 'In-Portal', 'la_text_category', 3, DEFAULT, 2, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'ParentId', 0, 1, 'lu_fielddesc_category_parentid', 'lu_field_parentid', 'In-Portal', 'la_text_category', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'CategoryId', 0, 1, 'lu_fielddesc_category_categoryid', 'lu_field_categoryid', 'In-Portal', 'la_text_category', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'Modified', 0, 1, 'lu_fielddesc_category_modified', 'lu_field_modified', 'In-Portal', 'la_text_category', 20, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('Category', 'ModifiedById', 0, 1, 'lu_fielddesc_category_modifiedbyid', 'lu_field_modifiedbyid', 'In-Portal', 'la_text_category', 21, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'PortalUserId', -1, 0, 'lu_fielddesc_user_portaluserid', 'lu_field_portaluserid', 'In-Portal', 'la_text_user', 0, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
-INSERT INTO SearchConfig VALUES ('PortalUser', 'Login', -1, 0, 'lu_fielddesc_user_login', 'lu_field_login', 'In-Portal', 'la_text_user', 1, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
+INSERT INTO SearchConfig VALUES ('PortalUser', 'Username', -1, 0, 'lu_fielddesc_user_login', 'lu_field_login', 'In-Portal', 'la_text_user', 1, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Password', -1, 0, 'lu_fielddesc_user_password', 'lu_field_password', 'In-Portal', 'la_text_user', 2, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'tz', -1, 0, 'lu_fielddesc_user_tz', 'lu_field_tz', 'In-Portal', 'la_text_user', 17, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'dob', -1, 0, 'lu_fielddesc_user_dob', 'lu_field_dob', 'In-Portal', 'la_text_user', 16, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Modified', -1, 0, 'lu_fielddesc_user_modified', 'lu_field_modified', 'In-Portal', 'la_text_user', 15, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Status', -1, 0, 'lu_fielddesc_user_status', 'lu_field_status', 'In-Portal', 'la_text_user', 14, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'ResourceId', -1, 0, 'lu_fielddesc_user_resourceid', 'lu_field_resourceid', 'In-Portal', 'la_text_user', 13, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Country', -1, 0, 'lu_fielddesc_user_country', 'lu_field_country', 'In-Portal', 'la_text_user', 12, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Zip', -1, 0, 'lu_fielddesc_user_zip', 'lu_field_zip', 'In-Portal', 'la_text_user', 11, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'State', -1, 0, 'lu_fielddesc_user_state', 'lu_field_state', 'In-Portal', 'la_text_user', 10, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'City', -1, 0, 'lu_fielddesc_user_city', 'lu_field_city', 'In-Portal', 'la_text_user', 9, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Street', -1, 0, 'lu_fielddesc_user_street', 'lu_field_street', 'In-Portal', 'la_text_user', 8, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Phone', -1, 0, 'lu_fielddesc_user_phone', 'lu_field_phone', 'In-Portal', 'la_text_user', 7, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'CreatedOn', -1, 0, 'lu_fielddesc_user_createdon', 'lu_field_createdon', 'In-Portal', 'la_text_user', 6, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'Email', -1, 0, 'lu_fielddesc_user_email', 'lu_field_email', 'In-Portal', 'la_text_user', 5, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'LastName', -1, 0, 'lu_fielddesc_user_lastname', 'lu_field_lastname', 'In-Portal', 'la_text_user', 4, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO SearchConfig VALUES ('PortalUser', 'FirstName', -1, 0, 'lu_fielddesc_user_firstname', 'lu_field_firstname', 'In-Portal', 'la_text_user', 3, DEFAULT, 0, 'text', NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>Category WHERE Status=1 ', NULL, 'la_prompt_ActiveCategories', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>PortalUser WHERE Status=1 ', NULL, 'la_prompt_ActiveUsers', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT count(*) FROM <%prefix%>UserSession', NULL, 'la_prompt_CurrentSessions', '0', '1');
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) as CategoryCount FROM <%prefix%>Category', NULL, 'la_prompt_TotalCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveCategories FROM <%prefix%>Category WHERE Status = 1', NULL, 'la_prompt_ActiveCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingCategories FROM <%prefix%>Category WHERE Status = 2', NULL, 'la_prompt_PendingCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledCategories FROM <%prefix%>Category WHERE Status = 0', NULL, 'la_prompt_DisabledCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NewCategories FROM <%prefix%>Category WHERE (NewItem = 1) OR ( (UNIX_TIMESTAMP() - CreatedOn) <= <%m:config name="Category_DaysNew"%>*86400 AND (NewItem = 2) )', NULL, 'la_prompt_NewCategories', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) FROM <%prefix%>Category WHERE EditorsPick = 1', NULL, 'la_prompt_CategoryEditorsPick', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>Category', NULL, 'la_prompt_NewestCategoryDate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(Modified)" type="date"%> FROM <%prefix%>Category', NULL, 'la_prompt_LastCategoryUpdate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUsers FROM <%prefix%>PortalUser', NULL, 'la_prompt_TopicsUsers', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ActiveUsers FROM <%prefix%>PortalUser WHERE Status = 1', NULL, 'la_prompt_UsersActive', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS PendingUsers FROM <%prefix%>PortalUser WHERE Status = 2', NULL, 'la_prompt_UsersPending', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS DisabledUsers FROM <%prefix%>PortalUser WHERE Status = 0', NULL, 'la_prompt_UsersDisabled', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT <%m:post_format field="MAX(CreatedOn)" type="date"%> FROM <%prefix%>PortalUser', NULL, 'la_prompt_NewestUserDate', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( Country ) ) FROM <%prefix%>PortalUser WHERE LENGTH(Country) > 0', NULL, 'la_prompt_UsersUniqueCountries', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT( DISTINCT LOWER( State ) ) FROM <%prefix%>PortalUser WHERE LENGTH(State) > 0', NULL, 'la_prompt_UsersUniqueStates', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS TotalUserGroups FROM <%prefix%>PortalGroup', NULL, 'la_prompt_TotalUserGroups', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS BannedUsers FROM <%prefix%>PortalUser WHERE IsBanned = 1', NULL, 'la_prompt_BannedUsers', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS NonExipedSessions FROM <%prefix%>UserSession WHERE Status = 1', NULL, 'la_prompt_NonExpiredSessions', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS ThemeCount FROM <%prefix%>Theme', NULL, 'la_prompt_ThemeCount', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', 'SELECT COUNT(*) AS RegionsCount FROM <%prefix%>Language', NULL, 'la_prompt_RegionsCount', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLES" action="COUNT" field="*"%>', NULL, 'la_prompt_TablesCount', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLE+STATUS" action="SUM" field="Rows"%>', NULL, 'la_prompt_RecordsCount', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:custom_action sql="empty" action="SysFileSize"%>', NULL, 'la_prompt_SystemFileSize', 0, 2);
INSERT INTO StatItem VALUES (DEFAULT, 'In-Portal', '<%m:sql_action sql="SHOW+TABLE+STATUS" action="SUM" format_as="file" field="Data_length"%>', NULL, 'la_prompt_DataSize', 0, 2);
INSERT INTO Counters VALUES (DEFAULT, 'members_count', 'SELECT COUNT(*) FROM <%PREFIX%>PortalUser WHERE Status = 1', NULL , NULL , '3600', '0', '|PortalUser|');
INSERT INTO Counters VALUES (DEFAULT, 'members_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId > 0', NULL , NULL , '3600', '0', '|UserSession|');
INSERT INTO Counters VALUES (DEFAULT, 'guests_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession WHERE PortalUserId <= 0', NULL , NULL , '3600', '0', '|UserSession|');
INSERT INTO Counters VALUES (DEFAULT, 'users_online', 'SELECT COUNT(*) FROM <%PREFIX%>UserSession', NULL , NULL , '3600', '0', '|UserSession|');
INSERT INTO StopWords VALUES (90, '~'),(152, 'on'),(157, 'see'),(156, 'put'),(128, 'and'),(154, 'or'),(155, 'other'),(153, 'one'),(126, 'as'),(127, 'at'),(125, 'are'),(91, '!'),(92, '@'),(93, '#'),(94, '$'),(95, '%'),(96, '^'),(97, '&'),(98, '*'),(99, '('),(100, ')'),(101, '-'),(102, '_'),(103, '='),(104, '+'),(105, '['),(106, '{'),(107, ']'),(108, '}'),(109, '\\'),(110, '|'),(111, ';'),(112, ':'),(113, ''''),(114, '"'),(115, '<'),(116, '.'),(117, '>'),(118, '/'),(119, '?'),(120, 'ah'),(121, 'all'),(122, 'also'),(123, 'am'),(124, 'an'),(151, 'of'),(150, 'note'),(149, 'not'),(148, 'no'),(147, 'may'),(146, 'its'),(145, 'it'),(144, 'is'),(143, 'into'),(142, 'in'),(141, 'had'),(140, 'has'),(139, 'have'),(138, 'from'),(137, 'form'),(136, 'for'),(135, 'end'),(134, 'each'),(133, 'can'),(132, 'by'),(130, 'be'),(131, 'but'),(129, 'any'),(158, 'that'),(159, 'the'),(160, 'their'),(161, 'there'),(162, 'these'),(163, 'they'),(164, 'this'),(165, 'through'),(166, 'thus'),(167, 'to'),(168, 'two'),(169, 'too'),(170, 'up'),(171, 'where'),(172, 'which'),(173, 'with'),(174, 'were'),(175, 'was'),(176, 'you'),(177, 'yet');
#INSERT INTO PageContent VALUES (DEFAULT, 1, 1, '<span style="font-weight: bold;">In-portal</span> is a revolutionary Web Site management system that allows you to automate and facilitate management of large portal and community web sites. Regardless of whether you are running a directory site or a content news portal, a community site or an online mall, In-portal will enhance your web site management experience with innovative.</span><br><br>We are proud to present our newly developed <b>"default"</b> theme that introduces a fresh look as well totally new approach in the template system.</span><br>', NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0);
INSERT INTO Modules VALUES ('Core', 'core/', 'adm', DEFAULT, 1, 1, '', 0, NULL, NULL);
INSERT INTO Modules VALUES ('In-Portal', 'core/', 'm', DEFAULT, 1, 0, '', 0, NULL, NULL);
\ No newline at end of file
Index: branches/5.2.x/core/install/upgrades.sql
===================================================================
--- branches/5.2.x/core/install/upgrades.sql (revision 14725)
+++ branches/5.2.x/core/install/upgrades.sql (revision 14726)
@@ -1,2195 +1,2223 @@
# ===== v 4.0.1 =====
ALTER TABLE EmailLog ADD EventParams TEXT NOT NULL;
INSERT INTO ConfigurationAdmin VALUES ('MailFunctionHeaderSeparator', 'la_Text_smtp_server', 'la_config_MailFunctionHeaderSeparator', 'radio', NULL, '1=la_Linux,2=la_Windows', 30.08, 0, 0);
INSERT INTO ConfigurationValues VALUES (0, 'MailFunctionHeaderSeparator', 1, 'In-Portal', 'in-portal:configure_general');
ALTER TABLE PersistantSessionData DROP PRIMARY KEY ;
ALTER TABLE PersistantSessionData ADD INDEX ( `PortalUserId` ) ;
# ===== v 4.1.0 =====
ALTER TABLE EmailMessage ADD ReplacementTags TEXT AFTER Template;
ALTER TABLE Phrase
CHANGE Translation Translation TEXT NOT NULL,
CHANGE Module Module VARCHAR(30) NOT NULL DEFAULT 'In-Portal';
ALTER TABLE Category
CHANGE Description Description TEXT,
CHANGE l1_Description l1_Description TEXT,
CHANGE l2_Description l2_Description TEXT,
CHANGE l3_Description l3_Description TEXT,
CHANGE l4_Description l4_Description TEXT,
CHANGE l5_Description l5_Description TEXT,
CHANGE CachedNavbar CachedNavbar text,
CHANGE l1_CachedNavbar l1_CachedNavbar text,
CHANGE l2_CachedNavbar l2_CachedNavbar text,
CHANGE l3_CachedNavbar l3_CachedNavbar text,
CHANGE l4_CachedNavbar l4_CachedNavbar text,
CHANGE l5_CachedNavbar l5_CachedNavbar text,
CHANGE ParentPath ParentPath TEXT NULL DEFAULT NULL,
CHANGE NamedParentPath NamedParentPath TEXT NULL DEFAULT NULL;
ALTER TABLE ConfigurationAdmin CHANGE ValueList ValueList TEXT;
ALTER TABLE EmailQueue
CHANGE `Subject` `Subject` TEXT,
CHANGE toaddr toaddr TEXT,
CHANGE fromaddr fromaddr TEXT;
ALTER TABLE Category DROP Pop;
ALTER TABLE PortalUser
CHANGE CreatedOn CreatedOn INT DEFAULT NULL,
CHANGE dob dob INT(11) NULL DEFAULT NULL,
CHANGE PassResetTime PassResetTime INT(11) UNSIGNED NULL DEFAULT NULL,
CHANGE PwRequestTime PwRequestTime INT(11) UNSIGNED NULL DEFAULT NULL,
CHANGE `Password` `Password` VARCHAR(255) NULL DEFAULT 'd41d8cd98f00b204e9800998ecf8427e';
ALTER TABLE Modules
CHANGE BuildDate BuildDate INT UNSIGNED NULL DEFAULT NULL,
CHANGE Version Version VARCHAR(10) NOT NULL DEFAULT '0.0.0',
CHANGE `Var` `Var` VARCHAR(100) NOT NULL DEFAULT '';
ALTER TABLE Language
CHANGE Enabled Enabled INT(11) NOT NULL DEFAULT '1',
CHANGE InputDateFormat InputDateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y',
CHANGE InputTimeFormat InputTimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A',
CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '',
CHANGE ThousandSep ThousandSep VARCHAR(10) NOT NULL DEFAULT '';
ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NOT NULL DEFAULT '-1';
ALTER TABLE StdDestinations CHANGE DestAbbr2 DestAbbr2 CHAR(2) NULL DEFAULT NULL;
ALTER TABLE PermCache DROP DACL;
ALTER TABLE PortalGroup CHANGE CreatedOn CreatedOn INT UNSIGNED NULL DEFAULT NULL;
ALTER TABLE UserSession
CHANGE SessionKey SessionKey INT UNSIGNED NULL DEFAULT NULL ,
CHANGE CurrentTempKey CurrentTempKey INT UNSIGNED NULL DEFAULT NULL ,
CHANGE PrevTempKey PrevTempKey INT UNSIGNED NULL DEFAULT NULL ,
CHANGE LastAccessed LastAccessed INT UNSIGNED NOT NULL DEFAULT '0',
CHANGE PortalUserId PortalUserId INT(11) NOT NULL DEFAULT '-2',
CHANGE Language Language INT(11) NOT NULL DEFAULT '1',
CHANGE Theme Theme INT(11) NOT NULL DEFAULT '1';
CREATE TABLE Counters (
CounterId int(10) unsigned NOT NULL auto_increment,
Name varchar(100) NOT NULL default '',
CountQuery text,
CountValue text,
LastCounted int(10) unsigned default NULL,
LifeTime int(10) unsigned NOT NULL default '3600',
IsClone tinyint(3) unsigned NOT NULL default '0',
TablesAffected text,
PRIMARY KEY (CounterId),
UNIQUE KEY Name (Name)
);
CREATE TABLE Skins (
`SkinId` int(11) NOT NULL auto_increment,
`Name` varchar(255) default NULL,
`CSS` text,
`Logo` varchar(255) default NULL,
`Options` text,
`LastCompiled` int(11) NOT NULL default '0',
`IsPrimary` int(1) NOT NULL default '0',
PRIMARY KEY (`SkinId`)
);
INSERT INTO Skins VALUES (DEFAULT, 'Default', '/* General elements */\r\n\r\nhtml {\r\n height: 100%;\r\n}\r\n\r\nbody {\r\n font-family: verdana,arial,helvetica,sans-serif;\r\n font-size: 9pt;\r\n color: #000000;\r\n overflow-x: auto; overflow-y: auto;\r\n margin: 0px 0px 0px 0px;\r\n text-decoration: none;\r\n}\r\n\r\na {\r\n color: #006699;\r\n text-decoration: none;\r\n}\r\n\r\na:hover {\r\n color: #009ff0;\r\n text-decoration: none;\r\n}\r\n\r\nform {\r\n display: inline;\r\n}\r\n\r\nimg { border: 0px; }\r\n\r\nbody.height-100 {\r\n height: 100%;\r\n}\r\n\r\nbody.regular-body {\r\n margin: 0px 10px 5px 10px;\r\n color: #000000;\r\n background-color: @@SectionBgColor@@;\r\n}\r\n\r\nbody.edit-popup {\r\n margin: 0px 0px 0px 0px;\r\n}\r\n\r\ntable.collapsed {\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered, table.bordered, .bordered-no-bottom {\r\n border: 1px solid #000000;\r\n border-collapse: collapse;\r\n}\r\n\r\n.bordered-no-bottom {\r\n border-bottom: none;\r\n}\r\n\r\n.login-table td {\r\n padding: 1px;\r\n}\r\n\r\n.disabled {\r\n background-color: #ebebeb;\r\n}\r\n\r\n/* Head frame */\r\n.head-table tr td {\r\n background-color: @@HeadBgColor@@;\r\n color: @@HeadColor@@\r\n}\r\n\r\ntd.kx-block-header, .head-table tr td.kx-block-header{\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n padding-left: 7px;\r\n padding-right: 7px;\r\n}\r\n\r\na.kx-header-link {\r\n text-decoration: underline;\r\n color: #FFFFFF;\r\n}\r\n\r\na.kx-header-link:hover {\r\n color: #FFCB05;\r\n text-decoration: none;\r\n}\r\n\r\n.kx-secondary-foreground {\r\n color: @@HeadBarColor@@;\r\n background-color: @@HeadBarBgColor@@;\r\n}\r\n\r\n.kx-login-button {\r\n background-color: #2D79D6;\r\n color: #FFFFFF;\r\n}\r\n\r\n/* General form button (yellow) */\r\n.button {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #000000;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Disabled (grayed-out) form button */\r\n.button-disabled {\r\n font-size: 12px;\r\n font-weight: normal;\r\n color: #676767;\r\n background: url(@@base_url@@/proj-base/admin_templates/img/button_back_disabled.gif) #f9eeae repeat-x;\r\n text-decoration: none;\r\n}\r\n\r\n/* Tabs bar */\r\n\r\n.tab, .tab-active {\r\n background-color: #F0F1EB;\r\n padding: 3px 7px 2px 7px;\r\n border-top: 1px solid black;\r\n border-left: 1px solid black;\r\n border-right: 1px solid black;\r\n}\r\n\r\n.tab-active {\r\n background-color: #2D79D6;\r\n border-bottom: 1px solid #2D79D6;\r\n}\r\n\r\n.tab a {\r\n color: #00659C;\r\n font-weight: bold;\r\n}\r\n\r\n.tab-active a {\r\n color: #fff;\r\n font-weight: bold;\r\n}\r\n\r\n\r\n/* Toolbar */\r\n\r\n.toolbar {\r\n font-size: 8pt;\r\n border: 1px solid #000000;\r\n border-width: 0px 1px 1px 1px;\r\n background-color: @@ToolbarBgColor@@;\r\n border-collapse: collapse;\r\n}\r\n\r\n.toolbar td {\r\n height: 100%;\r\n}\r\n\r\n.toolbar-button, .toolbar-button-disabled, .toolbar-button-over {\r\n float: left;\r\n text-align: center;\r\n font-size: 8pt;\r\n padding: 5px 5px 5px 5px;\r\n vertical-align: middle;\r\n color: #006F99;\r\n}\r\n\r\n.toolbar-button-over {\r\n color: #000;\r\n}\r\n\r\n.toolbar-button-disabled {\r\n color: #444;\r\n}\r\n\r\n/* Scrollable Grids */\r\n\r\n\r\n/* Main Grid class */\r\n.grid-scrollable {\r\n padding: 0px;\r\n border: 1px solid black !important;\r\n border-top: none !important;\r\n}\r\n\r\n/* Div generated by js, which contains all the scrollable grid elements, affects the style of scrollable area without data (if there are too few rows) */\r\n.grid-container {\r\n background-color: #fff;\r\n}\r\n\r\n.grid-container table {\r\n border-collapse: collapse;\r\n}\r\n\r\n/* Inner div generated in each data-cell */\r\n.grid-cell-div {\r\n overflow: hidden;\r\n height: auto;\r\n}\r\n\r\n/* Main row definition */\r\n.grid-data-row td, .grid-data-row-selected td, .grid-data-row-even-selected td, .grid-data-row-mouseover td, .table-color1, .table-color2 {\r\n font-weight: normal;\r\n color: @@OddColor@@;\r\n background-color: @@OddBgColor@@;\r\n padding: 3px 5px 3px 5px;\r\n height: 30px;\r\n overflow: hidden;\r\n /* border-right: 1px solid black; */\r\n}\r\n.grid-data-row-even td, .table-color2 {\r\n background-color: @@EvenBgColor@@;\r\n color: @@EvenColor@@;\r\n}\r\n.grid-data-row td a, .grid-data-row-selected td a, .grid-data-row-mouseover td a {\r\n text-decoration: underline;\r\n}\r\n\r\n/* mouse-over rows */\r\n.grid-data-row-mouseover td {\r\n background: #FFFDF4;\r\n}\r\n\r\n/* Selected row, applies to both checkbox and data areas */\r\n.grid-data-row-selected td {\r\n background: #FEF2D6;\r\n}\r\n\r\n.grid-data-row-even-selected td {\r\n background: #FFF7E0;\r\n}\r\n\r\n/* General header cell definition */\r\n.grid-header-row td {\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n text-decoration: none;\r\n padding: 3px 5px 3px 5px;\r\n color: @@ColumnTitlesColor@@;\r\n border-right: none;\r\n text-align: left;\r\n vertical-align: middle !important;\r\n white-space: nowrap;\r\n /* border-right: 1px solid black; */\r\n}\r\n\r\n/* Filters row */\r\ntr.grid-header-row-0 td {\r\n background-color: @@FiltersBgColor@@;\r\n border-bottom: 1px solid black;\r\n}\r\n\r\n/* Grid Filters */\r\ntable.range-filter {\r\n width: 100%;\r\n}\r\n\r\n.range-filter td {\r\n padding: 0px 0px 2px 2px !important;\r\n border: none !important;\r\n font-size: 8pt !important;\r\n font-weight: normal !important;\r\n text-align: left;\r\n color: #000000 !important;\r\n}\r\n\r\ninput.filter, select.filter {\r\n margin-bottom: 0px;\r\n width: 85%;\r\n}\r\n\r\ninput.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\nselect.filter-active {\r\n background-color: #FFFF00;\r\n}\r\n\r\n/* Column titles row */\r\ntr.grid-header-row-1 td {\r\n height: 25px;\r\n font-weight: bold;\r\n background-color: @@ColumnTitlesBgColor@@;\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a {\r\n color: @@ColumnTitlesColor@@;\r\n}\r\n\r\ntr.grid-header-row-1 td a:hover {\r\n color: #FFCC00;\r\n}\r\n\r\n\r\n.grid-footer-row td {\r\n background-color: #D7D7D7;\r\n font-weight: bold;\r\n border-right: none;\r\n padding: 3px 5px 3px 5px;\r\n}\r\n\r\ntd.grid-header-last-cell, td.grid-data-last-cell, td.grid-footer-last-cell {\r\n border-right: none !important;\r\n}\r\n\r\ntd.grid-data-col-0, td.grid-data-col-0 div {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 {\r\n text-align: center;\r\n vertical-align: middle !important;\r\n}\r\n\r\ntr.grid-header-row-0 td.grid-header-col-0 div {\r\n display: table-cell;\r\n vertical-align: middle;\r\n}\r\n\r\n.grid-status-bar {\r\n border: 1px solid black;\r\n border-top: none;\r\n padding: 0px;\r\n width: 100%;\r\n border-collapse: collapse;\r\n height: 30px;\r\n}\r\n\r\n.grid-status-bar td {\r\n background-color: @@TitleBarBgColor@@;\r\n color: @@TitleBarColor@@;\r\n font-size: 11pt;\r\n font-weight: normal;\r\n padding: 2px 8px 2px 8px;\r\n}\r\n\r\n/* /Scrollable Grids */\r\n\r\n\r\n/* Forms */\r\ntable.edit-form {\r\n border: none;\r\n border-top-width: 0px;\r\n border-collapse: collapse;\r\n width: 100%;\r\n}\r\n\r\n.edit-form-odd, .edit-form-even {\r\n padding: 0px;\r\n}\r\n\r\n.subsectiontitle {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #4A92CE;\r\n color: #fff;\r\n height: 25px;\r\n border-top: 1px solid black;\r\n}\r\n\r\n.label-cell {\r\n background: #DEE7F6 url(@@base_url@@/proj-base/admin_templates/img/bgr_input_name_line.gif) no-repeat right bottom;\r\n font: 12px arial, sans-serif;\r\n padding: 4px 20px;\r\n width: 150px;\r\n}\r\n\r\n.control-mid {\r\n width: 13px;\r\n border-left: 1px solid #7A95C2;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_mid.gif) repeat-x left bottom;\r\n}\r\n\r\n.control-cell {\r\n font: 11px arial, sans-serif;\r\n padding: 4px 10px 5px 5px;\r\n background: #fff url(@@base_url@@/proj-base/admin_templates/img/bgr_input_line.gif) no-repeat left bottom;\r\n width: auto;\r\n vertical-align: middle;\r\n}\r\n\r\n.label-cell-filler {\r\n background: #DEE7F6 none;\r\n}\r\n.control-mid-filler {\r\n background: #fff none;\r\n border-left: 1px solid #7A95C2;\r\n}\r\n.control-cell-filler {\r\n background: #fff none;\r\n}\r\n\r\n\r\n.error-cell {\r\n background-color: #fff;\r\n color: red;\r\n}\r\n\r\n.form-warning {\r\n color: red;\r\n}\r\n\r\n.req-note {\r\n font-style: italic;\r\n color: #333;\r\n}\r\n\r\n#scroll_container table.tableborder {\r\n border-collapse: separate\r\n}\r\n\r\n\r\n/* Uploader */\r\n\r\n.uploader-main {\r\n position: absolute;\r\n display: none;\r\n z-index: 10;\r\n border: 1px solid #777;\r\n padding: 10px;\r\n width: 350px;\r\n height: 120px;\r\n overflow: hidden;\r\n background-color: #fff;\r\n}\r\n\r\n.uploader-percent {\r\n width: 100%;\r\n padding-top: 3px;\r\n text-align: center;\r\n position: relative;\r\n z-index: 20;\r\n float: left;\r\n font-weight: bold;\r\n}\r\n\r\n.uploader-left {\r\n width: 100%;\r\n border: 1px solid black;\r\n height: 20px;\r\n background: #fff url(@@base_url@@/core/admin_templates/img/progress_left.gif);\r\n}\r\n\r\n.uploader-done {\r\n width: 0%;\r\n background-color: green;\r\n height: 20px;\r\n background: #4A92CE url(@@base_url@@/core/admin_templates/img/progress_done.gif);\r\n}\r\n\r\n\r\n/* To be sorted */\r\n\r\n\r\n/* Section title, right to the big icon */\r\n.admintitle {\r\n font-size: 16pt;\r\n font-weight: bold;\r\n color: @@SectionColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Left sid of bluebar */\r\n.header_left_bg {\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n padding-left: 5px;\r\n}\r\n\r\n/* Right side of bluebar */\r\n.tablenav, tablenav a {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n\r\n text-decoration: none;\r\n background-color: @@TitleBarBgColor@@;\r\n background-image: none;\r\n}\r\n\r\n/* Section title in the bluebar * -- why ''link''? :S */\r\n.tablenav_link {\r\n font-size: 11pt;\r\n font-weight: bold;\r\n color: @@TitleBarColor@@;\r\n text-decoration: none;\r\n}\r\n\r\n/* Active page in top and bottom bluebars pagination */\r\n.current_page {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n background-color: #fff;\r\n color: #2D79D6;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Other pages and arrows in pagination on blue */\r\n.nav_url {\r\n font-size: 10pt;\r\n font-weight: bold;\r\n color: #fff;\r\n padding: 3px 2px 3px 3px;\r\n}\r\n\r\n/* Tree */\r\n.tree-body {\r\n background-color: @@TreeBgColor@@;\r\n height: 100%\r\n}\r\n\r\n.tree_head.td, .tree_head, .tree_head:hover {\r\n font-weight: bold;\r\n font-size: 10px;\r\n color: #FFFFFF;\r\n font-family: Verdana, Arial;\r\n text-decoration: none;\r\n}\r\n\r\n.tree {\r\n padding: 0px;\r\n border: none;\r\n border-collapse: collapse;\r\n}\r\n\r\n.tree tr td {\r\n padding: 0px;\r\n margin: 0px;\r\n font-family: helvetica, arial, verdana,;\r\n font-size: 11px;\r\n white-space: nowrap;\r\n}\r\n\r\n.tree tr td a {\r\n font-size: 11px;\r\n color: @@TreeColor@@;\r\n font-family: Helvetica, Arial, Verdana;\r\n text-decoration: none;\r\n padding: 2px 0px 2px 2px;\r\n}\r\n\r\n.tree tr.highlighted td a {\r\n background-color: @@TreeHighBgColor@@;\r\n color: @@TreeHighColor@@;\r\n}\r\n\r\n.tree tr.highlighted td a:hover {\r\n color: #fff;\r\n}\r\n\r\n.tree tr td a:hover {\r\n color: #000000;\r\n}', 'just_logo.gif', 'a:20:{s:11:"HeadBgColor";a:2:{s:11:"Description";s:27:"Head frame background color";s:5:"Value";s:7:"#1961B8";}s:9:"HeadColor";a:2:{s:11:"Description";s:21:"Head frame text color";s:5:"Value";s:7:"#CCFF00";}s:14:"SectionBgColor";a:2:{s:11:"Description";s:28:"Section bar background color";s:5:"Value";s:7:"#FFFFFF";}s:12:"SectionColor";a:2:{s:11:"Description";s:22:"Section bar text color";s:5:"Value";s:7:"#2D79D6";}s:12:"HeadBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:14:"HeadBarBgColor";a:1:{s:5:"Value";s:7:"#1961B8";}s:13:"TitleBarColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TitleBarBgColor";a:1:{s:5:"Value";s:7:"#2D79D6";}s:14:"ToolbarBgColor";a:1:{s:5:"Value";s:7:"#F0F1EB";}s:14:"FiltersBgColor";a:1:{s:5:"Value";s:7:"#D7D7D7";}s:17:"ColumnTitlesColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:19:"ColumnTitlesBgColor";a:1:{s:5:"Value";s:7:"#999999";}s:8:"OddColor";a:1:{s:5:"Value";s:7:"#000000";}s:10:"OddBgColor";a:1:{s:5:"Value";s:7:"#F6F6F6";}s:9:"EvenColor";a:1:{s:5:"Value";s:7:"#000000";}s:11:"EvenBgColor";a:1:{s:5:"Value";s:7:"#EBEBEB";}s:9:"TreeColor";a:1:{s:5:"Value";s:7:"#006F99";}s:11:"TreeBgColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:13:"TreeHighColor";a:1:{s:5:"Value";s:7:"#FFFFFF";}s:15:"TreeHighBgColor";a:1:{s:5:"Value";s:7:"#4A92CE";}}', 1178706881, 1);
INSERT INTO Permissions VALUES (0, 'in-portal:skins.view', 11, 1, 1, 0), (0, 'in-portal:skins.add', 11, 1, 1, 0), (0, 'in-portal:skins.edit', 11, 1, 1, 0), (0, 'in-portal:skins.delete', 11, 1, 1, 0);
# ===== v 4.1.1 =====
DROP TABLE EmailQueue;
CREATE TABLE EmailQueue (
EmailQueueId int(10) unsigned NOT NULL auto_increment,
ToEmail varchar(255) NOT NULL default '',
`Subject` varchar(255) NOT NULL default '',
MessageHeaders text,
MessageBody longtext,
Queued int(10) unsigned NOT NULL default '0',
SendRetries int(10) unsigned NOT NULL default '0',
LastSendRetry int(10) unsigned NOT NULL default '0',
PRIMARY KEY (EmailQueueId),
KEY LastSendRetry (LastSendRetry),
KEY SendRetries (SendRetries)
);
ALTER TABLE Events ADD ReplacementTags TEXT AFTER Event;
# ===== v 4.2.0 =====
ALTER TABLE CustomField ADD MultiLingual TINYINT UNSIGNED NOT NULL DEFAULT '1' AFTER FieldLabel;
ALTER TABLE Category
ADD TreeLeft BIGINT NOT NULL AFTER ParentPath,
ADD TreeRight BIGINT NOT NULL AFTER TreeLeft;
ALTER TABLE Category ADD INDEX (TreeLeft);
ALTER TABLE Category ADD INDEX (TreeRight);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CategoriesRebuildSerial', '0', 'In-Portal', '');
UPDATE ConfigurationAdmin SET `element_type` = 'textarea' WHERE `VariableName` IN ('Category_MetaKey', 'Category_MetaDesc');
ALTER TABLE PortalUser
CHANGE FirstName FirstName VARCHAR(255) NOT NULL DEFAULT '',
CHANGE LastName LastName VARCHAR(255) NOT NULL DEFAULT '';
# ===== v 4.2.1 =====
INSERT INTO ConfigurationAdmin VALUES ('UseSmallHeader', 'la_Text_Website', 'la_config_UseSmallHeader', 'checkbox', '', '', 10.21, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('User_Default_Registration_Country', 'la_Text_General', 'la_config_DefaultRegistrationCountry', 'select', NULL , '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE DestParentId IS NULL Order BY OptionName</SQL>', 10.111, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users');
ALTER TABLE Category ADD SymLinkCategoryId INT UNSIGNED NULL DEFAULT NULL AFTER `Type`, ADD INDEX (SymLinkCategoryId);
ALTER TABLE ConfigurationValues CHANGE VariableValue VariableValue TEXT NULL DEFAULT NULL;
ALTER TABLE Language
ADD AdminInterfaceLang TINYINT UNSIGNED NOT NULL AFTER PrimaryLang,
ADD Priority INT NOT NULL AFTER AdminInterfaceLang;
UPDATE Language SET AdminInterfaceLang = 1 WHERE PrimaryLang = 1;
DELETE FROM PersistantSessionData WHERE VariableName = 'lang_columns_.';
ALTER TABLE SessionData CHANGE VariableValue VariableValue longtext NOT NULL;
INSERT INTO ConfigurationAdmin VALUES ('CSVExportDelimiter', 'la_Text_CSV_Export', 'la_config_CSVExportDelimiter', 'select', NULL, '0=la_Tab,1=la_Comma,2=la_Semicolon,3=la_Space,4=la_Colon', 40.1, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('CSVExportEnclosure', 'la_Text_CSV_Export', 'la_config_CSVExportEnclosure', 'radio', NULL, '0=la_Doublequotes,1=la_Quotes', 40.2, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('CSVExportSeparator', 'la_Text_CSV_Export', 'la_config_CSVExportSeparator', 'radio', NULL, '0=la_Linux,1=la_Windows', 40.3, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('CSVExportEncoding', 'la_Text_CSV_Export', 'la_config_CSVExportEncoding', 'radio', NULL, '0=la_Unicode,1=la_Regular', 40.4, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportDelimiter', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportEnclosure', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportSeparator', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CSVExportEncoding', '0', 'In-Portal', 'in-portal:configure_general');
# ===== v 4.2.2 =====
INSERT INTO ConfigurationAdmin VALUES ('UseColumnFreezer', 'la_Text_Website', 'la_config_UseColumnFreezer', 'checkbox', '', '', 10.22, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseColumnFreezer', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('TrimRequiredFields', 'la_Text_Website', 'la_config_TrimRequiredFields', 'checkbox', '', '', 10.23, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'TrimRequiredFields', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('MenuFrameWidth', 'la_title_General', 'la_prompt_MenuFrameWidth', 'text', NULL, NULL, '11', '0', '0');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MenuFrameWidth', 200, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('DefaultSettingsUserId', 'la_title_General', 'la_prompt_DefaultUserId', 'text', NULL, NULL, '12', '0', '0');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'DefaultSettingsUserId', -1, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('KeepSessionOnBrowserClose', 'la_title_General', 'la_prompt_KeepSessionOnBrowserClose', 'checkbox', NULL, NULL, '13', '0', '0');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'KeepSessionOnBrowserClose', 0, 'In-Portal', 'in-portal:configure_general');
ALTER TABLE PersistantSessionData ADD VariableId BIGINT NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST;
# ===== v 4.3.0 =====
INSERT INTO ConfigurationAdmin VALUES ('u_MaxImageCount', 'la_section_ImageSettings', 'la_config_MaxImageCount', 'text', '', '', 30.01, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_ThumbnailImageWidth', 'la_section_ImageSettings', 'la_config_ThumbnailImageWidth', 'text', '', '', 30.02, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_ThumbnailImageHeight', 'la_section_ImageSettings', 'la_config_ThumbnailImageHeight', 'text', '', '', 30.03, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_FullImageWidth', 'la_section_ImageSettings', 'la_config_FullImageWidth', 'text', '', '', 30.04, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('u_FullImageHeight', 'la_section_ImageSettings', 'la_config_FullImageHeight', 'text', '', '', 30.05, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_MaxImageCount', 5, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_ThumbnailImageWidth', 120, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_ThumbnailImageHeight', 120, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_FullImageWidth', 450, 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'u_FullImageHeight', 450, 'In-Portal:Users', 'in-portal:configure_users');
CREATE TABLE ChangeLogs (
ChangeLogId bigint(20) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
SessionLogId int(11) NOT NULL default '0',
`Action` tinyint(4) NOT NULL default '0',
OccuredOn int(11) NOT NULL default '0',
Prefix varchar(255) NOT NULL default '',
ItemId bigint(20) NOT NULL default '0',
Changes text NOT NULL,
MasterPrefix varchar(255) NOT NULL default '',
MasterId bigint(20) NOT NULL default '0',
PRIMARY KEY (ChangeLogId),
KEY PortalUserId (PortalUserId),
KEY SessionLogId (SessionLogId),
KEY `Action` (`Action`),
KEY OccuredOn (OccuredOn),
KEY Prefix (Prefix),
KEY MasterPrefix (MasterPrefix)
);
CREATE TABLE SessionLogs (
SessionLogId bigint(20) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
SessionId int(10) NOT NULL default '0',
`Status` tinyint(4) NOT NULL default '1',
SessionStart int(11) NOT NULL default '0',
SessionEnd int(11) default NULL,
IP varchar(15) NOT NULL default '',
AffectedItems int(11) NOT NULL default '0',
PRIMARY KEY (SessionLogId),
KEY SessionId (SessionId),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
ALTER TABLE CustomField ADD INDEX (MultiLingual), ADD INDEX (DisplayOrder), ADD INDEX (OnGeneralTab), ADD INDEX (IsSystem);
ALTER TABLE ConfigurationAdmin ADD INDEX (DisplayOrder), ADD INDEX (GroupDisplayOrder), ADD INDEX (Install);
ALTER TABLE EmailSubscribers ADD INDEX (EmailMessageId), ADD INDEX (PortalUserId);
ALTER TABLE Events ADD INDEX (`Type`), ADD INDEX (Enabled);
ALTER TABLE Language ADD INDEX (Enabled), ADD INDEX (PrimaryLang), ADD INDEX (AdminInterfaceLang), ADD INDEX (Priority);
ALTER TABLE Modules ADD INDEX (Loaded), ADD INDEX (LoadOrder);
ALTER TABLE PhraseCache ADD INDEX (CacheDate), ADD INDEX (ThemeId), ADD INDEX (StylesheetId);
ALTER TABLE PortalGroup ADD INDEX (CreatedOn);
ALTER TABLE PortalUser ADD INDEX (Status), ADD INDEX (Modified), ADD INDEX (dob), ADD INDEX (IsBanned);
ALTER TABLE Theme ADD INDEX (Enabled), ADD INDEX (StylesheetId), ADD INDEX (PrimaryTheme);
ALTER TABLE UserGroup ADD INDEX (MembershipExpires), ADD INDEX (ExpirationReminderSent);
ALTER TABLE EmailLog ADD INDEX (`timestamp`);
ALTER TABLE StdDestinations ADD INDEX (DestType), ADD INDEX (DestParentId);
ALTER TABLE Category ADD INDEX (Status), ADD INDEX (CreatedOn), ADD INDEX (EditorsPick);
ALTER TABLE Stylesheets ADD INDEX (Enabled), ADD INDEX (LastCompiled);
ALTER TABLE Counters ADD INDEX (IsClone), ADD INDEX (LifeTime), ADD INDEX (LastCounted);
ALTER TABLE Skins ADD INDEX (IsPrimary), ADD INDEX (LastCompiled);
INSERT INTO ConfigurationAdmin VALUES ('UseChangeLog', 'la_Text_Website', 'la_config_UseChangeLog', 'checkbox', '', '', 10.25, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseChangeLog', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('AutoRefreshIntervals', 'la_Text_Website', 'la_config_AutoRefreshIntervals', 'text', '', '', 10.26, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_general');
DELETE FROM Cache WHERE SUBSTRING(VarName, 1, 7) = 'mod_rw_';
ALTER TABLE Category CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '2';
# ===== v 4.3.1 =====
INSERT INTO ConfigurationAdmin VALUES ('RememberLastAdminTemplate', 'la_Text_General', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RememberLastAdminTemplate', '', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationAdmin VALUES ('AllowSelectGroupOnFront', 'la_Text_General', 'la_config_AllowSelectGroupOnFront', 'checkbox', NULL, NULL, 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AllowSelectGroupOnFront', '0', 'In-Portal:Users', 'in-portal:configure_users');
CREATE TABLE StatisticsCapture (
StatisticsId int(10) unsigned NOT NULL auto_increment,
TemplateName varchar(255) NOT NULL default '',
Hits int(10) unsigned NOT NULL default '0',
LastHit int(11) NOT NULL default '0',
ScriptTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
ScriptTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlTimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
SqlCountMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
PRIMARY KEY (StatisticsId),
KEY TemplateName (TemplateName),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY ScriptTimeMin (ScriptTimeMin),
KEY ScriptTimeAvg (ScriptTimeAvg),
KEY ScriptTimeMax (ScriptTimeMax),
KEY SqlTimeMin (SqlTimeMin),
KEY SqlTimeAvg (SqlTimeAvg),
KEY SqlTimeMax (SqlTimeMax),
KEY SqlCountMin (SqlCountMin),
KEY SqlCountAvg (SqlCountAvg),
KEY SqlCountMax (SqlCountMax)
);
CREATE TABLE SlowSqlCapture (
CaptureId int(10) unsigned NOT NULL auto_increment,
TemplateNames text,
Hits int(10) unsigned NOT NULL default '0',
LastHit int(11) NOT NULL default '0',
SqlQuery text,
TimeMin decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
TimeAvg decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
TimeMax decimal(40,20) unsigned NOT NULL default '0.00000000000000000000',
QueryCrc int(11) NOT NULL default '0',
PRIMARY KEY (CaptureId),
KEY Hits (Hits),
KEY LastHit (LastHit),
KEY TimeMin (TimeMin),
KEY TimeAvg (TimeAvg),
KEY TimeMax (TimeMax),
KEY QueryCrc (QueryCrc)
);
ALTER TABLE PortalGroup ADD FrontRegistration TINYINT UNSIGNED NOT NULL;
UPDATE PortalGroup SET FrontRegistration = 1 WHERE GroupId = 13;
INSERT INTO ConfigurationAdmin VALUES ('ForceImageMagickResize', 'la_Text_Website', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.28, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('AdminSSL_URL', 'la_Text_Website', 'la_config_AdminSSL_URL', 'text', '', '', 10.091, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AdminSSL_URL', '', 'In-Portal', 'in-portal:configure_general');
# ===== v 4.3.9 =====
ALTER TABLE CustomField
CHANGE ValueList ValueList TEXT NULL DEFAULT NULL,
ADD DefaultValue VARCHAR(255) NOT NULL AFTER ValueList,
ADD INDEX (DefaultValue);
UPDATE CustomField SET ValueList = REPLACE(ValueList, ',', '||');
CREATE TABLE Agents (
AgentId int(11) NOT NULL auto_increment,
AgentName varchar(255) NOT NULL default '',
AgentType tinyint(3) unsigned NOT NULL default '1',
Status tinyint(3) unsigned NOT NULL default '1',
Event varchar(255) NOT NULL default '',
RunInterval int(10) unsigned NOT NULL default '0',
RunMode tinyint(3) unsigned NOT NULL default '2',
LastRunOn int(10) unsigned default NULL,
LastRunStatus tinyint(3) unsigned NOT NULL default '1',
NextRunOn int(11) default NULL,
RunTime int(10) unsigned NOT NULL default '0',
PRIMARY KEY (AgentId),
KEY Status (Status),
KEY RunInterval (RunInterval),
KEY RunMode (RunMode),
KEY AgentType (AgentType),
KEY LastRunOn (LastRunOn),
KEY LastRunStatus (LastRunStatus),
KEY RunTime (RunTime),
KEY NextRunOn (NextRunOn)
);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES(DEFAULT, 'in-portal:agents.view', 11, 1, 1, 0);
INSERT INTO ConfigurationAdmin VALUES ('FilenameSpecialCharReplacement', 'la_Text_General', 'la_config_FilenameSpecialCharReplacement', 'select', NULL, '_=+_,-=+-', 10.16, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'FilenameSpecialCharReplacement', '_', 'In-Portal', 'in-portal:configure_categories');
CREATE TABLE SpellingDictionary (
SpellingDictionaryId int(11) NOT NULL auto_increment,
MisspelledWord varchar(255) NOT NULL default '',
SuggestedCorrection varchar(255) NOT NULL default '',
PRIMARY KEY (SpellingDictionaryId),
KEY MisspelledWord (MisspelledWord),
KEY SuggestedCorrection (SuggestedCorrection)
);
INSERT INTO ConfigurationValues VALUES(NULL, 'YahooApplicationId', '', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationAdmin VALUES('YahooApplicationId', 'la_Text_General', 'la_config_YahooApplicationId', 'text', NULL, NULL, 10.15, 0, 0);
CREATE TABLE Thesaurus (
ThesaurusId int(11) NOT NULL auto_increment,
SearchTerm varchar(255) NOT NULL default '',
ThesaurusTerm varchar(255) NOT NULL default '',
ThesaurusType tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (ThesaurusId),
KEY ThesaurusType (ThesaurusType),
KEY SearchTerm (SearchTerm)
);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:ban_rulelist.add', 11, 1, 1, 0);
ALTER TABLE Language ADD FilenameReplacements TEXT NULL AFTER UnitSystem;
ALTER TABLE Language ADD Locale varchar(10) NOT NULL default 'en-US' AFTER FilenameReplacements;
CREATE TABLE LocalesList (
LocaleId int(11) NOT NULL auto_increment,
LocaleIdentifier varchar(6) NOT NULL default '',
LocaleName varchar(255) NOT NULL default '',
Locale varchar(20) NOT NULL default '',
ScriptTag varchar(255) NOT NULL default '',
ANSICodePage varchar(10) NOT NULL default '',
PRIMARY KEY (LocaleId)
);
INSERT INTO LocalesList VALUES
(1, '0x0436', 'Afrikaans (South Africa)', 'af-ZA', 'Latn', '1252'),
(2, '0x041c', 'Albanian (Albania)', 'sq-AL', 'Latn', '1252'),
(3, '0x0484', 'Alsatian (France)', 'gsw-FR', '', ''),
(4, '0x045e', 'Amharic (Ethiopia)', 'am-ET', '', 'UTF-8'),
(5, '0x1401', 'Arabic (Algeria)', 'ar-DZ', 'Arab', '1256'),
(6, '0x3c01', 'Arabic (Bahrain)', 'ar-BH', 'Arab', '1256'),
(7, '0x0c01', 'Arabic (Egypt)', 'ar-EG', 'Arab', '1256'),
(8, '0x0801', 'Arabic (Iraq)', 'ar-IQ', 'Arab', '1256'),
(9, '0x2c01', 'Arabic (Jordan)', 'ar-JO', 'Arab', '1256'),
(10, '0x3401', 'Arabic (Kuwait)', 'ar-KW', 'Arab', '1256'),
(11, '0x3001', 'Arabic (Lebanon)', 'ar-LB', 'Arab', '1256'),
(12, '0x1001', 'Arabic (Libya)', 'ar-LY', 'Arab', '1256'),
(13, '0x1801', 'Arabic (Morocco)', 'ar-MA', 'Arab', '1256'),
(14, '0x2001', 'Arabic (Oman)', 'ar-OM', 'Arab', '1256'),
(15, '0x4001', 'Arabic (Qatar)', 'ar-QA', 'Arab', '1256'),
(16, '0x0401', 'Arabic (Saudi Arabia)', 'ar-SA', 'Arab', '1256'),
(17, '0x2801', 'Arabic (Syria)', 'ar-SY', 'Arab', '1256'),
(18, '0x1c01', 'Arabic (Tunisia)', 'ar-TN', 'Arab', '1256'),
(19, '0x3801', 'Arabic (U.A.E.)', 'ar-AE', 'Arab', '1256'),
(20, '0x2401', 'Arabic (Yemen)', 'ar-YE', 'Arab', '1256'),
(21, '0x042b', 'Armenian (Armenia)', 'hy-AM', 'Armn', 'UTF-8'),
(22, '0x044d', 'Assamese (India)', 'as-IN', '', 'UTF-8'),
(23, '0x082c', 'Azeri (Azerbaijan, Cyrillic)', 'az-Cyrl-AZ', 'Cyrl', '1251'),
(24, '0x042c', 'Azeri (Azerbaijan, Latin)', 'az-Latn-AZ', 'Latn', '1254'),
(25, '0x046d', 'Bashkir (Russia)', 'ba-RU', '', ''),
(26, '0x042d', 'Basque (Basque)', 'eu-ES', 'Latn', '1252'),
(27, '0x0423', 'Belarusian (Belarus)', 'be-BY', 'Cyrl', '1251'),
(28, '0x0445', 'Bengali (India)', 'bn-IN', 'Beng', 'UTF-8'),
(29, '0x201a', 'Bosnian (Bosnia and Herzegovina, Cyrillic)', 'bs-Cyrl-BA', 'Cyrl', '1251'),
(30, '0x141a', 'Bosnian (Bosnia and Herzegovina, Latin)', 'bs-Latn-BA', 'Latn', '1250'),
(31, '0x047e', 'Breton (France)', 'br-FR', 'Latn', '1252'),
(32, '0x0402', 'Bulgarian (Bulgaria)', 'bg-BG', 'Cyrl', '1251'),
(33, '0x0403', 'Catalan (Catalan)', 'ca-ES', 'Latn', '1252'),
(34, '0x0c04', 'Chinese (Hong Kong SAR, PRC)', 'zh-HK', 'Hant', '950'),
(35, '0x1404', 'Chinese (Macao SAR)', 'zh-MO', 'Hant', '950'),
(36, '0x0804', 'Chinese (PRC)', 'zh-CN', 'Hans', '936'),
(37, '0x1004', 'Chinese (Singapore)', 'zh-SG', 'Hans', '936'),
(38, '0x0404', 'Chinese (Taiwan)', 'zh-TW', 'Hant', '950'),
(39, '0x101a', 'Croatian (Bosnia and Herzegovina, Latin)', 'hr-BA', 'Latn', '1250'),
(40, '0x041a', 'Croatian (Croatia)', 'hr-HR', 'Latn', '1250'),
(41, '0x0405', 'Czech (Czech Republic)', 'cs-CZ', 'Latn', '1250'),
(42, '0x0406', 'Danish (Denmark)', 'da-DK', 'Latn', '1252'),
(43, '0x048c', 'Dari (Afghanistan)', 'prs-AF', 'Arab', '1256'),
(44, '0x0465', 'Divehi (Maldives)', 'dv-MV', 'Thaa', 'UTF-8'),
(45, '0x0813', 'Dutch (Belgium)', 'nl-BE', 'Latn', '1252'),
(46, '0x0413', 'Dutch (Netherlands)', 'nl-NL', 'Latn', '1252'),
(47, '0x0c09', 'English (Australia)', 'en-AU', 'Latn', '1252'),
(48, '0x2809', 'English (Belize)', 'en-BZ', 'Latn', '1252'),
(49, '0x1009', 'English (Canada)', 'en-CA', 'Latn', '1252'),
(50, '0x2409', 'English (Caribbean)', 'en-029', 'Latn', '1252'),
(51, '0x4009', 'English (India)', 'en-IN', 'Latn', '1252'),
(52, '0x1809', 'English (Ireland)', 'en-IE', 'Latn', '1252'),
(53, '0x2009', 'English (Jamaica)', 'en-JM', 'Latn', '1252'),
(54, '0x4409', 'English (Malaysia)', 'en-MY', 'Latn', '1252'),
(55, '0x1409', 'English (New Zealand)', 'en-NZ', 'Latn', '1252'),
(56, '0x3409', 'English (Philippines)', 'en-PH', 'Latn', '1252'),
(57, '0x4809', 'English (Singapore)', 'en-SG', 'Latn', '1252'),
(58, '0x1c09', 'English (South Africa)', 'en-ZA', 'Latn', '1252'),
(59, '0x2c09', 'English (Trinidad and Tobago)', 'en-TT', 'Latn', '1252'),
(60, '0x0809', 'English (United Kingdom)', 'en-GB', 'Latn', '1252'),
(61, '0x0409', 'English (United States)', 'en-US', 'Latn', '1252'),
(62, '0x3009', 'English (Zimbabwe)', 'en-ZW', 'Latn', '1252'),
(63, '0x0425', 'Estonian (Estonia)', 'et-EE', 'Latn', '1257'),
(64, '0x0438', 'Faroese (Faroe Islands)', 'fo-FO', 'Latn', '1252'),
(65, '0x0464', 'Filipino (Philippines)', 'fil-PH', 'Latn', '1252'),
(66, '0x040b', 'Finnish (Finland)', 'fi-FI', 'Latn', '1252'),
(67, '0x080c', 'French (Belgium)', 'fr-BE', 'Latn', '1252'),
(68, '0x0c0c', 'French (Canada)', 'fr-CA', 'Latn', '1252'),
(69, '0x040c', 'French (France)', 'fr-FR', 'Latn', '1252'),
(70, '0x140c', 'French (Luxembourg)', 'fr-LU', 'Latn', '1252'),
(71, '0x180c', 'French (Monaco)', 'fr-MC', 'Latn', '1252'),
(72, '0x100c', 'French (Switzerland)', 'fr-CH', 'Latn', '1252'),
(73, '0x0462', 'Frisian (Netherlands)', 'fy-NL', 'Latn', '1252'),
(74, '0x0456', 'Galician (Spain)', 'gl-ES', 'Latn', '1252'),
(75, '0x0437', 'Georgian (Georgia)', 'ka-GE', 'Geor', 'UTF-8'),
(76, '0x0c07', 'German (Austria)', 'de-AT', 'Latn', '1252'),
(77, '0x0407', 'German (Germany)', 'de-DE', 'Latn', '1252'),
(78, '0x1407', 'German (Liechtenstein)', 'de-LI', 'Latn', '1252'),
(79, '0x1007', 'German (Luxembourg)', 'de-LU', 'Latn', '1252'),
(80, '0x0807', 'German (Switzerland)', 'de-CH', 'Latn', '1252'),
(81, '0x0408', 'Greek (Greece)', 'el-GR', 'Grek', '1253'),
(82, '0x046f', 'Greenlandic (Greenland)', 'kl-GL', 'Latn', '1252'),
(83, '0x0447', 'Gujarati (India)', 'gu-IN', 'Gujr', 'UTF-8'),
(84, '0x0468', 'Hausa (Nigeria, Latin)', 'ha-Latn-NG', 'Latn', '1252'),
(85, '0x040d', 'Hebrew (Israel)', 'he-IL', 'Hebr', '1255'),
(86, '0x0439', 'Hindi (India)', 'hi-IN', 'Deva', 'UTF-8'),
(87, '0x040e', 'Hungarian (Hungary)', 'hu-HU', 'Latn', '1250'),
(88, '0x040f', 'Icelandic (Iceland)', 'is-IS', 'Latn', '1252'),
(89, '0x0470', 'Igbo (Nigeria)', 'ig-NG', '', ''),
(90, '0x0421', 'Indonesian (Indonesia)', 'id-ID', 'Latn', '1252'),
(91, '0x085d', 'Inuktitut (Canada, Latin)', 'iu-Latn-CA', 'Latn', '1252'),
(92, '0x045d', 'Inuktitut (Canada, Syllabics)', 'iu-Cans-CA', 'Cans', 'UTF-8'),
(93, '0x083c', 'Irish (Ireland)', 'ga-IE', 'Latn', '1252'),
(94, '0x0410', 'Italian (Italy)', 'it-IT', 'Latn', '1252'),
(95, '0x0810', 'Italian (Switzerland)', 'it-CH', 'Latn', '1252'),
(96, '0x0411', 'Japanese (Japan)', 'ja-JP', 'Hani;Hira;Kana', '932'),
(97, '0x044b', 'Kannada (India)', 'kn-IN', 'Knda', 'UTF-8'),
(98, '0x043f', 'Kazakh (Kazakhstan)', 'kk-KZ', 'Cyrl', '1251'),
(99, '0x0453', 'Khmer (Cambodia)', 'kh-KH', 'Khmr', 'UTF-8'),
(100, '0x0486', 'K''iche (Guatemala)', 'qut-GT', 'Latn', '1252'),
(101, '0x0487', 'Kinyarwanda (Rwanda)', 'rw-RW', 'Latn', '1252'),
(102, '0x0457', 'Konkani (India)', 'kok-IN', 'Deva', 'UTF-8'),
(103, '0x0812', 'Windows 95, Windows NT 4.0 only: Korean (Johab)', '', '', ''),
(104, '0x0412', 'Korean (Korea)', 'ko-KR', 'Hang;Hani', '949'),
(105, '0x0440', 'Kyrgyz (Kyrgyzstan)', 'ky-KG', 'Cyrl', '1251'),
(106, '0x0454', 'Lao (Lao PDR)', 'lo-LA', 'Laoo', 'UTF-8'),
(107, '0x0426', 'Latvian (Latvia)', 'lv-LV', 'Latn', '1257'),
(108, '0x0427', 'Lithuanian (Lithuania)', 'lt-LT', 'Latn', '1257'),
(109, '0x082e', 'Lower Sorbian (Germany)', 'dsb-DE', 'Latn', '1252'),
(110, '0x046e', 'Luxembourgish (Luxembourg)', 'lb-LU', 'Latn', '1252'),
(111, '0x042f', 'Macedonian (Macedonia, FYROM)', 'mk-MK', 'Cyrl', '1251'),
(112, '0x083e', 'Malay (Brunei Darussalam)', 'ms-BN', 'Latn', '1252'),
(113, '0x043e', 'Malay (Malaysia)', 'ms-MY', 'Latn', '1252'),
(114, '0x044c', 'Malayalam (India)', 'ml-IN', 'Mlym', 'UTF-8'),
(115, '0x043a', 'Maltese (Malta)', 'mt-MT', 'Latn', '1252'),
(116, '0x0481', 'Maori (New Zealand)', 'mi-NZ', 'Latn', '1252'),
(117, '0x047a', 'Mapudungun (Chile)', 'arn-CL', 'Latn', '1252'),
(118, '0x044e', 'Marathi (India)', 'mr-IN', 'Deva', 'UTF-8'),
(119, '0x047c', 'Mohawk (Canada)', 'moh-CA', 'Latn', '1252'),
(120, '0x0450', 'Mongolian (Mongolia)', 'mn-Cyrl-MN', 'Cyrl', '1251'),
(121, '0x0850', 'Mongolian (PRC)', 'mn-Mong-CN', 'Mong', 'UTF-8'),
(122, '0x0850', 'Nepali (India)', 'ne-IN', '__', 'UTF-8'),
(123, '0x0461', 'Nepali (Nepal)', 'ne-NP', 'Deva', 'UTF-8'),
(124, '0x0414', 'Norwegian (Bokmål, Norway)', 'nb-NO', 'Latn', '1252'),
(125, '0x0814', 'Norwegian (Nynorsk, Norway)', 'nn-NO', 'Latn', '1252'),
(126, '0x0482', 'Occitan (France)', 'oc-FR', 'Latn', '1252'),
(127, '0x0448', 'Oriya (India)', 'or-IN', 'Orya', 'UTF-8'),
(128, '0x0463', 'Pashto (Afghanistan)', 'ps-AF', '', ''),
(129, '0x0429', 'Persian (Iran)', 'fa-IR', 'Arab', '1256'),
(130, '0x0415', 'Polish (Poland)', 'pl-PL', 'Latn', '1250'),
(131, '0x0416', 'Portuguese (Brazil)', 'pt-BR', 'Latn', '1252'),
(132, '0x0816', 'Portuguese (Portugal)', 'pt-PT', 'Latn', '1252'),
(133, '0x0446', 'Punjabi (India)', 'pa-IN', 'Guru', 'UTF-8'),
(134, '0x046b', 'Quechua (Bolivia)', 'quz-BO', 'Latn', '1252'),
(135, '0x086b', 'Quechua (Ecuador)', 'quz-EC', 'Latn', '1252'),
(136, '0x0c6b', 'Quechua (Peru)', 'quz-PE', 'Latn', '1252'),
(137, '0x0418', 'Romanian (Romania)', 'ro-RO', 'Latn', '1250'),
(138, '0x0417', 'Romansh (Switzerland)', 'rm-CH', 'Latn', '1252'),
(139, '0x0419', 'Russian (Russia)', 'ru-RU', 'Cyrl', '1251'),
(140, '0x243b', 'Sami (Inari, Finland)', 'smn-FI', 'Latn', '1252'),
(141, '0x103b', 'Sami (Lule, Norway)', 'smj-NO', 'Latn', '1252'),
(142, '0x143b', 'Sami (Lule, Sweden)', 'smj-SE', 'Latn', '1252'),
(143, '0x0c3b', 'Sami (Northern, Finland)', 'se-FI', 'Latn', '1252'),
(144, '0x043b', 'Sami (Northern, Norway)', 'se-NO', 'Latn', '1252'),
(145, '0x083b', 'Sami (Northern, Sweden)', 'se-SE', 'Latn', '1252'),
(146, '0x203b', 'Sami (Skolt, Finland)', 'sms-FI', 'Latn', '1252'),
(147, '0x183b', 'Sami (Southern, Norway)', 'sma-NO', 'Latn', '1252'),
(148, '0x1c3b', 'Sami (Southern, Sweden)', 'sma-SE', 'Latn', '1252'),
(149, '0x044f', 'Sanskrit (India)', 'sa-IN', 'Deva', 'UTF-8'),
(150, '0x1c1a', 'Serbian (Bosnia and Herzegovina, Cyrillic)', 'sr-Cyrl-BA', 'Cyrl', '1251'),
(151, '0x181a', 'Serbian (Bosnia and Herzegovina, Latin)', 'sr-Latn-BA', 'Latn', '1250'),
(152, '0x0c1a', 'Serbian (Serbia, Cyrillic)', 'sr-Cyrl-CS', 'Cyrl', '1251'),
(153, '0x081a', 'Serbian (Serbia, Latin)', 'sr-Latn-CS', 'Latn', '1250'),
(154, '0x046c', 'Sesotho sa Leboa/Northern Sotho (South Africa)', 'ns-ZA', 'Latn', '1252'),
(155, '0x0432', 'Setswana/Tswana (South Africa)', 'tn-ZA', 'Latn', '1252'),
(156, '0x045b', 'Sinhala (Sri Lanka)', 'si-LK', 'Sinh', 'UTF-8'),
(157, '0x041b', 'Slovak (Slovakia)', 'sk-SK', 'Latn', '1250'),
(158, '0x0424', 'Slovenian (Slovenia)', 'sl-SI', 'Latn', '1250'),
(159, '0x2c0a', 'Spanish (Argentina)', 'es-AR', 'Latn', '1252'),
(160, '0x400a', 'Spanish (Bolivia)', 'es-BO', 'Latn', '1252'),
(161, '0x340a', 'Spanish (Chile)', 'es-CL', 'Latn', '1252'),
(162, '0x240a', 'Spanish (Colombia)', 'es-CO', 'Latn', '1252'),
(163, '0x140a', 'Spanish (Costa Rica)', 'es-CR', 'Latn', '1252'),
(164, '0x1c0a', 'Spanish (Dominican Republic)', 'es-DO', 'Latn', '1252'),
(165, '0x300a', 'Spanish (Ecuador)', 'es-EC', 'Latn', '1252'),
(166, '0x440a', 'Spanish (El Salvador)', 'es-SV', 'Latn', '1252'),
(167, '0x100a', 'Spanish (Guatemala)', 'es-GT', 'Latn', '1252'),
(168, '0x480a', 'Spanish (Honduras)', 'es-HN', 'Latn', '1252'),
(169, '0x080a', 'Spanish (Mexico)', 'es-MX', 'Latn', '1252'),
(170, '0x4c0a', 'Spanish (Nicaragua)', 'es-NI', 'Latn', '1252'),
(171, '0x180a', 'Spanish (Panama)', 'es-PA', 'Latn', '1252'),
(172, '0x3c0a', 'Spanish (Paraguay)', 'es-PY', 'Latn', '1252'),
(173, '0x280a', 'Spanish (Peru)', 'es-PE', 'Latn', '1252'),
(174, '0x500a', 'Spanish (Puerto Rico)', 'es-PR', 'Latn', '1252'),
(175, '0x0c0a', 'Spanish (Spain)', 'es-ES', 'Latn', '1252'),
(176, '0x040a', 'Spanish (Spain, Traditional Sort)', 'es-ES_tradnl', 'Latn', '1252'),
(177, '0x540a', 'Spanish (United States)', 'es-US', '', ''),
(178, '0x380a', 'Spanish (Uruguay)', 'es-UY', 'Latn', '1252'),
(179, '0x200a', 'Spanish (Venezuela)', 'es-VE', 'Latn', '1252'),
(180, '0x0441', 'Swahili (Kenya)', 'sw-KE', 'Latn', '1252'),
(181, '0x081d', 'Swedish (Finland)', 'sv-FI', 'Latn', '1252'),
(182, '0x041d', 'Swedish (Sweden)', 'sv-SE', 'Latn', '1252'),
(183, '0x045a', 'Syriac (Syria)', 'syr-SY', 'Syrc', 'UTF-8'),
(184, '0x0428', 'Tajik (Tajikistan)', 'tg-Cyrl-TJ', 'Cyrl', '1251'),
(185, '0x085f', 'Tamazight (Algeria, Latin)', 'tzm-Latn-DZ', 'Latn', '1252'),
(186, '0x0449', 'Tamil (India)', 'ta-IN', 'Taml', 'UTF-8'),
(187, '0x0444', 'Tatar (Russia)', 'tt-RU', 'Cyrl', '1251'),
(188, '0x044a', 'Telugu (India)', 'te-IN', 'Telu', 'UTF-8'),
(189, '0x041e', 'Thai (Thailand)', 'th-TH', 'Thai', '874'),
(190, '0x0851', 'Tibetan (Bhutan)', 'bo-BT', 'Tibt', 'UTF-8'),
(191, '0x0451', 'Tibetan (PRC)', 'bo-CN', 'Tibt', 'UTF-8'),
(192, '0x041f', 'Turkish (Turkey)', 'tr-TR', 'Latn', '1254'),
(193, '0x0442', 'Turkmen (Turkmenistan)', 'tk-TM', 'Cyrl', '1251'),
(194, '0x0480', 'Uighur (PRC)', 'ug-CN', 'Arab', '1256'),
(195, '0x0422', 'Ukrainian (Ukraine)', 'uk-UA', 'Cyrl', '1251'),
(196, '0x042e', 'Upper Sorbian (Germany)', 'wen-DE', 'Latn', '1252'),
(197, '0x0820', 'Urdu (India)', 'tr-IN', '', ''),
(198, '0x0420', 'Urdu (Pakistan)', 'ur-PK', 'Arab', '1256'),
(199, '0x0843', 'Uzbek (Uzbekistan, Cyrillic)', 'uz-Cyrl-UZ', 'Cyrl', '1251'),
(200, '0x0443', 'Uzbek (Uzbekistan, Latin)', 'uz-Latn-UZ', 'Latn', '1254'),
(201, '0x042a', 'Vietnamese (Vietnam)', 'vi-VN', 'Latn', '1258'),
(202, '0x0452', 'Welsh (United Kingdom)', 'cy-GB', 'Latn', '1252'),
(203, '0x0488', 'Wolof (Senegal)', 'wo-SN', 'Latn', '1252'),
(204, '0x0434', 'Xhosa/isiXhosa (South Africa)', 'xh-ZA', 'Latn', '1252'),
(205, '0x0485', 'Yakut (Russia)', 'sah-RU', 'Cyrl', '1251'),
(206, '0x0478', 'Yi (PRC)', 'ii-CN', 'Yiii', 'UTF-8'),
(207, '0x046a', 'Yoruba (Nigeria)', 'yo-NG', '', ''),
(208, '0x0435', 'Zulu/isiZulu (South Africa)', 'zu-ZA', 'Latn', '1252');
UPDATE Phrase SET Module = 'Core' WHERE Module IN ('Proj-Base', 'In-Portal');
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_fld_Phone', 'la_fld_City', 'la_fld_State', 'la_fld_Zip');
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_col_Image', 'la_col_Username', 'la_fld_AddressLine1', 'la_fld_AddressLine2', 'la_fld_Comments', 'la_fld_Country', 'la_fld_Email', 'la_fld_Language', 'la_fld_Login', 'la_fld_MessageText', 'la_fld_MetaDescription', 'la_fld_MetaKeywords', 'la_fld_Password', 'la_fld_Username', 'la_fld_Type');
UPDATE Phrase SET Phrase = 'la_Add' WHERE Phrase = 'LA_ADD';
UPDATE Phrase SET Phrase = 'la_col_MembershipExpires' WHERE Phrase = 'la_col_membershipexpires';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Clone' WHERE Phrase = 'la_shorttooltip_clone';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Edit' WHERE Phrase = 'LA_SHORTTOOLTIP_EDIT';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Export' WHERE Phrase = 'LA_SHORTTOOLTIP_EXPORT';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_GoUp' WHERE Phrase = 'LA_SHORTTOOLTIP_GOUP';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Import' WHERE Phrase = 'LA_SHORTTOOLTIP_IMPORT';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_MoveUp' WHERE Phrase = 'la_shorttooltip_moveup';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_MoveDown' WHERE Phrase = 'la_shorttooltip_movedown';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_RescanThemes' WHERE Phrase = 'la_shorttooltip_rescanthemes';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_SetPrimary' WHERE Phrase = 'LA_SHORTTOOLTIP_SETPRIMARY';
UPDATE Phrase SET Phrase = 'la_ShortToolTip_Rebuild' WHERE Phrase = 'LA_SHORTTOOLTIP_REBUILD';
UPDATE Phrase SET Phrase = 'la_Tab_Service' WHERE Phrase = 'la_tab_service';
UPDATE Phrase SET Phrase = 'la_tab_Files' WHERE Phrase = 'la_tab_files';
UPDATE Phrase SET Phrase = 'la_ToolTipShort_Edit_Current_Category' WHERE Phrase = 'LA_TOOLTIPSHORT_EDIT_CURRENT_CATEGORY';
UPDATE Phrase SET Phrase = 'la_ToolTip_Add' WHERE Phrase = 'LA_TOOLTIP_ADD';
UPDATE Phrase SET Phrase = 'la_ToolTip_Add_Product' WHERE Phrase = 'LA_TOOLTIP_ADD_PRODUCT';
UPDATE Phrase SET Phrase = 'la_ToolTip_NewSearchConfig' WHERE Phrase = 'LA_TOOLTIP_NEWSEARCHCONFIG';
UPDATE Phrase SET Phrase = 'la_ToolTip_Prev' WHERE Phrase = 'la_tooltip_prev';
UPDATE Phrase SET Phrase = 'la_Invalid_Password' WHERE Phrase = 'la_invalid_password';
UPDATE Events SET Module = REPLACE(Module, 'In-Portal', 'Core');
DROP TABLE ImportScripts;
CREATE TABLE BanRules (
RuleId int(11) NOT NULL auto_increment,
RuleType tinyint(4) NOT NULL default '0',
ItemField varchar(255) default NULL,
ItemVerb tinyint(4) NOT NULL default '0',
ItemValue varchar(255) NOT NULL default '',
ItemType int(11) NOT NULL default '0',
Priority int(11) NOT NULL default '0',
Status tinyint(4) NOT NULL default '1',
ErrorTag varchar(255) default NULL,
PRIMARY KEY (RuleId),
KEY Status (Status),
KEY Priority (Priority),
KEY ItemType (ItemType)
);
CREATE TABLE CountCache (
ListType int(11) NOT NULL default '0',
ItemType int(11) NOT NULL default '-1',
Value int(11) NOT NULL default '0',
CountCacheId int(11) NOT NULL auto_increment,
LastUpdate int(11) NOT NULL default '0',
ExtraId varchar(50) default NULL,
TodayOnly tinyint(4) NOT NULL default '0',
PRIMARY KEY (CountCacheId)
);
CREATE TABLE Favorites (
FavoriteId int(11) NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '0',
ResourceId int(11) NOT NULL default '0',
ItemTypeId int(11) NOT NULL default '0',
Modified int(11) NOT NULL default '0',
PRIMARY KEY (FavoriteId),
UNIQUE KEY main (PortalUserId,ResourceId),
KEY Modified (Modified),
KEY ItemTypeId (ItemTypeId)
);
CREATE TABLE Images (
ImageId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Url varchar(255) NOT NULL default '',
Name varchar(255) NOT NULL default '',
AltName VARCHAR(255) NOT NULL DEFAULT '',
ImageIndex int(11) NOT NULL default '0',
LocalImage tinyint(4) NOT NULL default '1',
LocalPath varchar(240) NOT NULL default '',
Enabled int(11) NOT NULL default '1',
DefaultImg int(11) NOT NULL default '0',
ThumbUrl varchar(255) default NULL,
Priority int(11) NOT NULL default '0',
ThumbPath varchar(255) default NULL,
LocalThumb tinyint(4) NOT NULL default '1',
SameImages tinyint(4) NOT NULL default '1',
PRIMARY KEY (ImageId),
KEY ResourceId (ResourceId),
KEY Enabled (Enabled),
KEY Priority (Priority)
);
CREATE TABLE ItemRating (
RatingId int(11) NOT NULL auto_increment,
IPAddress varchar(255) NOT NULL default '',
CreatedOn INT UNSIGNED NULL DEFAULT NULL,
RatingValue int(11) NOT NULL default '0',
ItemId int(11) NOT NULL default '0',
PRIMARY KEY (RatingId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY RatingValue (RatingValue)
);
CREATE TABLE ItemReview (
ReviewId int(11) NOT NULL auto_increment,
CreatedOn INT UNSIGNED NULL DEFAULT NULL,
ReviewText longtext NOT NULL,
Rating tinyint(3) unsigned default NULL,
IPAddress varchar(255) NOT NULL default '',
ItemId int(11) NOT NULL default '0',
CreatedById int(11) NOT NULL default '-1',
ItemType tinyint(4) NOT NULL default '0',
Priority int(11) NOT NULL default '0',
Status tinyint(4) NOT NULL default '2',
TextFormat int(11) NOT NULL default '0',
Module varchar(255) NOT NULL default '',
PRIMARY KEY (ReviewId),
KEY CreatedOn (CreatedOn),
KEY ItemId (ItemId),
KEY ItemType (ItemType),
KEY Priority (Priority),
KEY Status (Status)
);
CREATE TABLE ItemTypes (
ItemType int(11) NOT NULL default '0',
Module varchar(50) NOT NULL default '',
Prefix varchar(20) NOT NULL default '',
SourceTable varchar(100) NOT NULL default '',
TitleField varchar(50) default NULL,
CreatorField varchar(255) NOT NULL default '',
PopField varchar(255) default NULL,
RateField varchar(255) default NULL,
LangVar varchar(255) NOT NULL default '',
PrimaryItem int(11) NOT NULL default '0',
EditUrl varchar(255) NOT NULL default '',
ClassName varchar(40) NOT NULL default '',
ItemName varchar(50) NOT NULL default '',
PRIMARY KEY (ItemType),
KEY Module (Module)
);
CREATE TABLE ItemFiles (
FileId int(11) NOT NULL auto_increment,
ResourceId int(11) unsigned NOT NULL default '0',
FileName varchar(255) NOT NULL default '',
FilePath varchar(255) NOT NULL default '',
Size int(11) NOT NULL default '0',
`Status` tinyint(4) NOT NULL default '1',
CreatedOn int(11) unsigned NOT NULL default '0',
CreatedById int(11) NOT NULL default '-1',
MimeType varchar(255) NOT NULL default '',
PRIMARY KEY (FileId),
KEY ResourceId (ResourceId),
KEY CreatedOn (CreatedOn),
KEY Status (Status)
);
CREATE TABLE Relationship (
RelationshipId int(11) NOT NULL auto_increment,
SourceId int(11) default NULL,
TargetId int(11) default NULL,
SourceType tinyint(4) NOT NULL default '0',
TargetType tinyint(4) NOT NULL default '0',
Type int(11) NOT NULL default '0',
Enabled int(11) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelationshipId),
KEY RelSource (SourceId),
KEY RelTarget (TargetId),
KEY `Type` (`Type`),
KEY Enabled (Enabled),
KEY Priority (Priority),
KEY SourceType (SourceType),
KEY TargetType (TargetType)
);
CREATE TABLE SearchConfig (
TableName varchar(40) NOT NULL default '',
FieldName varchar(40) NOT NULL default '',
SimpleSearch tinyint(4) NOT NULL default '1',
AdvancedSearch tinyint(4) NOT NULL default '1',
Description varchar(255) default NULL,
DisplayName varchar(80) default NULL,
ModuleName VARCHAR(20) NOT NULL DEFAULT 'In-Portal',
ConfigHeader varchar(255) default NULL,
DisplayOrder int(11) NOT NULL default '0',
SearchConfigId int(11) NOT NULL auto_increment,
Priority int(11) NOT NULL default '0',
FieldType varchar(20) NOT NULL default 'text',
ForeignField TEXT,
JoinClause TEXT,
IsWhere text,
IsNotWhere text,
ContainsWhere text,
NotContainsWhere text,
CustomFieldId int(11) default NULL,
PRIMARY KEY (SearchConfigId),
KEY SimpleSearch (SimpleSearch),
KEY AdvancedSearch (AdvancedSearch),
KEY DisplayOrder (DisplayOrder),
KEY Priority (Priority),
KEY CustomFieldId (CustomFieldId)
);
CREATE TABLE SearchLog (
SearchLogId int(11) NOT NULL auto_increment,
Keyword varchar(255) NOT NULL default '',
Indices bigint(20) NOT NULL default '0',
SearchType int(11) NOT NULL default '0',
PRIMARY KEY (SearchLogId),
KEY SearchType (SearchType)
);
CREATE TABLE IgnoreKeywords (
keyword varchar(20) NOT NULL default '',
PRIMARY KEY (keyword)
);
CREATE TABLE SpamControl (
ItemResourceId int(11) NOT NULL default '0',
IPaddress varchar(20) NOT NULL default '',
Expire INT UNSIGNED NULL DEFAULT NULL,
PortalUserId int(11) NOT NULL default '0',
DataType varchar(20) default NULL,
KEY PortalUserId (PortalUserId),
KEY Expire (Expire),
KEY ItemResourceId (ItemResourceId)
);
CREATE TABLE StatItem (
StatItemId int(11) NOT NULL auto_increment,
Module varchar(20) NOT NULL default '',
ValueSQL varchar(255) default NULL,
ResetSQL varchar(255) default NULL,
ListLabel varchar(255) NOT NULL default '',
Priority int(11) NOT NULL default '0',
AdminSummary int(11) NOT NULL default '0',
PRIMARY KEY (StatItemId),
KEY AdminSummary (AdminSummary),
KEY Priority (Priority)
);
CREATE TABLE SuggestMail (
email varchar(255) NOT NULL default '',
sent INT UNSIGNED NULL DEFAULT NULL,
PRIMARY KEY (email),
KEY sent (sent)
);
CREATE TABLE SysCache (
SysCacheId int(11) NOT NULL auto_increment,
Name varchar(255) NOT NULL default '',
Value mediumtext,
Expire INT UNSIGNED NULL DEFAULT NULL,
Module varchar(20) default NULL,
Context varchar(255) default NULL,
GroupList varchar(255) NOT NULL default '',
PRIMARY KEY (SysCacheId),
KEY Name (Name)
);
CREATE TABLE TagLibrary (
TagId int(11) NOT NULL auto_increment,
name varchar(255) NOT NULL default '',
description text,
example text,
scope varchar(20) NOT NULL default 'global',
PRIMARY KEY (TagId)
);
CREATE TABLE TagAttributes (
AttrId int(11) NOT NULL auto_increment,
TagId int(11) NOT NULL default '0',
Name varchar(255) NOT NULL default '',
AttrType varchar(20) default NULL,
DefValue varchar(255) default NULL,
Description TEXT,
Required int(11) NOT NULL default '0',
PRIMARY KEY (AttrId),
KEY TagId (TagId)
);
CREATE TABLE ImportScripts (
ImportId INT(11) NOT NULL auto_increment,
Name VARCHAR(255) NOT NULL DEFAULT '',
Description TEXT NOT NULL,
Prefix VARCHAR(10) NOT NULL DEFAULT '',
Module VARCHAR(50) NOT NULL DEFAULT '',
ExtraFields VARCHAR(255) NOT NULL DEFAULT '',
Type VARCHAR(10) NOT NULL DEFAULT '',
Status TINYINT NOT NULL,
PRIMARY KEY (ImportId),
KEY Module (Module),
KEY Status (Status)
);
CREATE TABLE StylesheetSelectors (
SelectorId int(11) NOT NULL auto_increment,
StylesheetId int(11) NOT NULL default '0',
Name varchar(255) NOT NULL default '',
SelectorName varchar(255) NOT NULL default '',
SelectorData text NOT NULL,
Description text NOT NULL,
Type tinyint(4) NOT NULL default '0',
AdvancedCSS text NOT NULL,
ParentId int(11) NOT NULL default '0',
PRIMARY KEY (SelectorId),
KEY StylesheetId (StylesheetId),
KEY ParentId (ParentId),
KEY `Type` (`Type`)
);
CREATE TABLE Visits (
VisitId int(11) NOT NULL auto_increment,
VisitDate int(10) unsigned NOT NULL default '0',
Referer varchar(255) NOT NULL default '',
IPAddress varchar(15) NOT NULL default '',
AffiliateId int(10) unsigned NOT NULL default '0',
PortalUserId int(11) NOT NULL default '-2',
PRIMARY KEY (VisitId),
KEY PortalUserId (PortalUserId),
KEY AffiliateId (AffiliateId),
KEY VisitDate (VisitDate)
);
CREATE TABLE ImportCache (
CacheId int(11) NOT NULL auto_increment,
CacheName varchar(255) NOT NULL default '',
VarName int(11) NOT NULL default '0',
VarValue text NOT NULL,
PRIMARY KEY (CacheId),
KEY CacheName (CacheName),
KEY VarName (VarName)
);
CREATE TABLE RelatedSearches (
RelatedSearchId int(11) NOT NULL auto_increment,
ResourceId int(11) NOT NULL default '0',
Keyword varchar(255) NOT NULL default '',
ItemType tinyint(4) NOT NULL default '0',
Enabled tinyint(4) NOT NULL default '1',
Priority int(11) NOT NULL default '0',
PRIMARY KEY (RelatedSearchId),
KEY Enabled (Enabled),
KEY ItemType (ItemType),
KEY ResourceId (ResourceId)
);
UPDATE Modules SET Path = 'core/', Version='4.3.9' WHERE Name = 'In-Portal';
UPDATE Skins SET Logo = 'just_logo.gif' WHERE Logo = 'just_logo_1.gif';
UPDATE ConfigurationAdmin SET prompt = 'la_config_PathToWebsite' WHERE VariableName = 'Site_Path';
# ===== v 5.0.0 =====
CREATE TABLE StopWords (
StopWordId int(11) NOT NULL auto_increment,
StopWord varchar(255) NOT NULL default '',
PRIMARY KEY (StopWordId),
KEY StopWord (StopWord)
);
INSERT INTO StopWords VALUES (90, '~'),(152, 'on'),(157, 'see'),(156, 'put'),(128, 'and'),(154, 'or'),(155, 'other'),(153, 'one'),(126, 'as'),(127, 'at'),(125, 'are'),(91, '!'),(92, '@'),(93, '#'),(94, '$'),(95, '%'),(96, '^'),(97, '&'),(98, '*'),(99, '('),(100, ')'),(101, '-'),(102, '_'),(103, '='),(104, '+'),(105, '['),(106, '{'),(107, ']'),(108, '}'),(109, '\\'),(110, '|'),(111, ';'),(112, ':'),(113, ''''),(114, '"'),(115, '<'),(116, '.'),(117, '>'),(118, '/'),(119, '?'),(120, 'ah'),(121, 'all'),(122, 'also'),(123, 'am'),(124, 'an'),(151, 'of'),(150, 'note'),(149, 'not'),(148, 'no'),(147, 'may'),(146, 'its'),(145, 'it'),(144, 'is'),(143, 'into'),(142, 'in'),(141, 'had'),(140, 'has'),(139, 'have'),(138, 'from'),(137, 'form'),(136, 'for'),(135, 'end'),(134, 'each'),(133, 'can'),(132, 'by'),(130, 'be'),(131, 'but'),(129, 'any'),(158, 'that'),(159, 'the'),(160, 'their'),(161, 'there'),(162, 'these'),(163, 'they'),(164, 'this'),(165, 'through'),(166, 'thus'),(167, 'to'),(168, 'two'),(169, 'too'),(170, 'up'),(171, 'where'),(172, 'which'),(173, 'with'),(174, 'were'),(175, 'was'),(176, 'you'),(177, 'yet');
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:stop_words.delete', 11, 1, 1, 0);
INSERT INTO ConfigurationAdmin VALUES ('CheckStopWords', 'la_Text_Website', 'la_config_CheckStopWords', 'checkbox', '', '', 10.29, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CheckStopWords', '0', 'In-Portal', 'in-portal:configure_general');
ALTER TABLE SpamControl ADD INDEX (DataType);
CREATE TABLE MailingLists (
MailingId int(10) unsigned NOT NULL auto_increment,
PortalUserId int(11) NOT NULL default '-1',
`To` longtext,
ToParsed longtext,
Attachments text,
`Subject` varchar(255) NOT NULL,
MessageText longtext,
MessageHtml longtext,
`Status` tinyint(3) unsigned NOT NULL default '1',
EmailsQueued int(10) unsigned NOT NULL,
EmailsSent int(10) unsigned NOT NULL,
EmailsTotal int(10) unsigned NOT NULL,
PRIMARY KEY (MailingId),
KEY EmailsTotal (EmailsTotal),
KEY EmailsSent (EmailsSent),
KEY EmailsQueued (EmailsQueued),
KEY `Status` (`Status`),
KEY PortalUserId (PortalUserId)
);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:mailing_lists.delete', 11, 1, 1, 0);
ALTER TABLE EmailQueue
ADD MailingId INT UNSIGNED NOT NULL,
ADD INDEX (MailingId);
INSERT INTO ConfigurationAdmin VALUES ('MailingListQueuePerStep', 'la_Text_smtp_server', 'la_config_MailingListQueuePerStep', 'text', NULL, NULL, 30.09, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MailingListQueuePerStep', 10, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('MailingListSendPerStep', 'la_Text_smtp_server', 'la_config_MailingListSendPerStep', 'text', NULL, NULL, 30.10, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MailingListSendPerStep', 10, 'In-Portal', 'in-portal:configure_general');
ALTER TABLE Events ADD INDEX (Event);
ALTER TABLE SearchLog ADD INDEX (Keyword);
ALTER TABLE Skins
ADD LogoBottom VARCHAR(255) NOT NULL AFTER Logo,
ADD LogoLogin VARCHAR(255) NOT NULL AFTER LogoBottom;
UPDATE Skins
SET Logo = 'in-portal_logo_img.jpg', LogoBottom = 'in-portal_logo_img2.jpg', LogoLogin = 'in-portal_logo_login.gif'
WHERE Logo = 'just_logo_1.gif' OR Logo = 'just_logo.gif';
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SiteNameSubTitle', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('SiteNameSubTitle', 'la_Text_Website', 'la_config_SiteNameSubTitle', 'text', '', '', 10.021, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('ResizableFrames', 'la_Text_Website', 'la_config_ResizableFrames', 'checkbox', '', '', 10.30, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ResizableFrames', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('QuickCategoryPermissionRebuild', 'la_Text_General', 'la_config_QuickCategoryPermissionRebuild', 'checkbox', NULL , NULL , 10.12, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'QuickCategoryPermissionRebuild', '1', 'In-Portal', 'in-portal:configure_categories');
ALTER TABLE Language ADD UserDocsUrl VARCHAR(255) NOT NULL;
UPDATE Category SET Template = CategoryTemplate WHERE CategoryTemplate <> '';
ALTER TABLE Category
ADD ThemeId INT UNSIGNED NOT NULL,
ADD INDEX (ThemeId),
ADD COLUMN UseExternalUrl tinyint(3) unsigned NOT NULL default '0' AFTER Template,
ADD COLUMN ExternalUrl varchar(255) NOT NULL default '' AFTER UseExternalUrl,
ADD COLUMN UseMenuIconUrl tinyint(3) unsigned NOT NULL default '0' AFTER ExternalUrl,
ADD COLUMN MenuIconUrl varchar(255) NOT NULL default '' AFTER UseMenuIconUrl,
CHANGE MetaKeywords MetaKeywords TEXT,
CHANGE MetaDescription MetaDescription TEXT,
CHANGE CachedCategoryTemplate CachedTemplate VARCHAR(255) NOT NULL,
DROP CategoryTemplate;
UPDATE Category SET l1_MenuTitle = l1_Name WHERE l1_MenuTitle = '' OR l1_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l2_MenuTitle = l2_Name WHERE l2_MenuTitle = '' OR l2_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l3_MenuTitle = l3_Name WHERE l3_MenuTitle = '' OR l3_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l4_MenuTitle = l4_Name WHERE l4_MenuTitle = '' OR l4_MenuTitle LIKE '_Auto: %';
UPDATE Category SET l5_MenuTitle = l5_Name WHERE l5_MenuTitle = '' OR l5_MenuTitle LIKE '_Auto: %';
UPDATE Category SET Template = '/platform/designs/general' WHERE Template = '/in-edit/designs/general';
UPDATE Category SET CachedTemplate = '/platform/designs/general' WHERE CachedTemplate = '/in-edit/designs/general';
UPDATE Category SET CachedTemplate = Template WHERE Template <> '';
CREATE TABLE PageContent (
PageContentId int(11) NOT NULL auto_increment,
ContentNum int(11) NOT NULL default '0',
PageId int(11) NOT NULL default '0',
l1_Content text,
l2_Content text,
l3_Content text,
l4_Content text,
l5_Content text,
l1_Translated tinyint(4) NOT NULL default '0',
l2_Translated tinyint(4) NOT NULL default '0',
l3_Translated tinyint(4) NOT NULL default '0',
l4_Translated tinyint(4) NOT NULL default '0',
l5_Translated tinyint(4) NOT NULL default '0',
PRIMARY KEY (PageContentId),
KEY ContentNum (ContentNum,PageId)
);
CREATE TABLE FormFields (
FormFieldId int(11) NOT NULL auto_increment,
FormId int(11) NOT NULL default '0',
Type int(11) NOT NULL default '0',
FieldName varchar(255) NOT NULL default '',
FieldLabel varchar(255) default NULL,
Heading varchar(255) default NULL,
Prompt varchar(255) default NULL,
ElementType varchar(50) NOT NULL default '',
ValueList varchar(255) default NULL,
Priority int(11) NOT NULL default '0',
IsSystem tinyint(3) unsigned NOT NULL default '0',
Required tinyint(1) NOT NULL default '0',
DisplayInGrid tinyint(1) NOT NULL default '1',
DefaultValue text NOT NULL,
Validation TINYINT NOT NULL DEFAULT '0',
PRIMARY KEY (FormFieldId),
KEY `Type` (`Type`),
KEY FormId (FormId),
KEY Priority (Priority),
KEY IsSystem (IsSystem),
KEY DisplayInGrid (DisplayInGrid)
);
CREATE TABLE FormSubmissions (
FormSubmissionId int(11) NOT NULL auto_increment,
FormId int(11) NOT NULL default '0',
SubmissionTime int(11) NOT NULL default '0',
PRIMARY KEY (FormSubmissionId),
KEY FormId (FormId),
KEY SubmissionTime (SubmissionTime)
);
CREATE TABLE Forms (
FormId int(11) NOT NULL auto_increment,
Title VARCHAR(255) NOT NULL DEFAULT '',
Description text,
PRIMARY KEY (FormId)
);
UPDATE Events SET Module = 'Core:Category', Description = 'la_event_FormSubmitted' WHERE Event = 'FORM.SUBMITTED';
DELETE FROM PersistantSessionData WHERE VariableName LIKE '%img%';
UPDATE Modules SET TemplatePath = Path WHERE TemplatePath <> '';
UPDATE ConfigurationValues SET VariableValue = '/platform/designs/general' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_categories' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'cms_DefaultDesign';
UPDATE Phrase SET Phrase = 'la_Regular' WHERE Phrase = 'la_regular';
UPDATE Phrase SET Module = 'Core' WHERE Phrase IN ('la_Hide', 'la_Show', 'la_fld_Requied', 'la_col_Modified', 'la_col_Referer', 'la_Regular');
UPDATE Phrase SET Phrase = 'la_title_Editing_E-mail' WHERE Phrase = 'la_title_editing_e-mail';
ALTER TABLE Phrase ADD UNIQUE (LanguageId, Phrase);
ALTER TABLE CustomField ADD IsRequired tinyint(3) unsigned NOT NULL default '0';
DELETE FROM Permissions
WHERE
(Permission LIKE 'proj-cms:structure%') OR
(Permission LIKE 'proj-cms:submissions%') OR
(Permission LIKE 'proj-base:users%') OR
(Permission LIKE 'proj-base:system_variables%') OR
(Permission LIKE 'proj-base:email_settings%') OR
(Permission LIKE 'proj-base:other_settings%') OR
(Permission LIKE 'proj-base:sysconfig%');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-cms:browse', 'in-portal:browse_site');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-cms:', 'in-portal:');
UPDATE Permissions SET Permission = REPLACE(Permission, 'proj-base:', 'in-portal:');
ALTER TABLE CategoryItems ADD INDEX (ItemResourceId);
ALTER TABLE CategoryItems DROP INDEX Filename;
ALTER TABLE CategoryItems ADD INDEX Filename(Filename);
DROP TABLE Pages;
DELETE FROM PermissionConfig WHERE PermissionName LIKE 'PAGE.%';
DELETE FROM Permissions WHERE Permission LIKE 'PAGE.%';
DELETE FROM SearchConfig WHERE TableName = 'Pages';
DELETE FROM ConfigurationAdmin WHERE VariableName LIKE '%_pages';
DELETE FROM ConfigurationValues WHERE VariableName LIKE '%_pages';
DELETE FROM ConfigurationAdmin WHERE VariableName LIKE 'PerPage_Pages%';
DELETE FROM ConfigurationValues WHERE VariableName LIKE 'PerPage_Pages%';
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:website_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:user_setting_folder.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:configure_advanced.edit', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.delete', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.edit', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.add', 11, 1, 1, 0);
#INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:spelling_dictionary.view', 11, 1, 1, 0);
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_general'
WHERE ModuleOwner = 'Proj-Base' AND Section IN ('proj-base:system_variables', 'proj-base:email_settings');
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced'
WHERE ModuleOwner = 'Proj-Base' AND Section IN ('proj-base:other_settings', 'proj-base:sysconfig');
UPDATE ConfigurationAdmin SET heading = 'la_Text_General' WHERE VariableName IN ('AdvancedUserManagement', 'RememberLastAdminTemplate', 'DefaultSettingsUserId');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.011 WHERE VariableName = 'AdvancedUserManagement';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'DefaultSettingsUserId';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.13 WHERE VariableName = 'FilenameSpecialCharReplacement';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'YahooApplicationId';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsMailling', prompt = 'la_prompt_AdminMailFrom', ValueList = 'size="40"', DisplayOrder = 30.07 WHERE VariableName = 'Smtp_AdminMailFrom';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsWebsite' WHERE VariableName IN ('Site_Path','SiteNameSubTitle','UseModRewrite','Config_Server_Time','Config_Site_Time','ErrorTemplate','NoPermissionTemplate','UsePageHitCounter','ForceImageMagickResize','CheckStopWords','Site_Name');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSession' WHERE VariableName IN ('CookieSessions','SessionCookieName','SessionTimeout','KeepSessionOnBrowserClose','SessionReferrerCheck','UseJSRedirect');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSSL' WHERE VariableName IN ('SSL_URL','AdminSSL_URL','Require_SSL','Require_AdminSSL','Force_HTTP_When_SSL_Not_Required','UseModRewriteWithSSL');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsAdmin' WHERE VariableName IN ('UseToolbarLabels','UseSmallHeader','UseColumnFreezer','UsePopups','UseDoubleSorting','MenuFrameWidth','ResizableFrames','AutoRefreshIntervals');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsMailling' WHERE VariableName IN ('Smtp_Server','Smtp_Port','Smtp_Authenticate','Smtp_User','Smtp_Pass','Smtp_DefaultHeaders','MailFunctionHeaderSeparator','MailingListQueuePerStep','MailingListSendPerStep');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsSystem' WHERE VariableName IN ('UseOutputCompression','OutputCompressionLevel','TrimRequiredFields','UseCronForRegularEvent','UseChangeLog','Backup_Path','SystemTagCache','SocketBlockingMode');
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsCSVExport' WHERE VariableName IN ('CSVExportDelimiter','CSVExportEnclosure','CSVExportSeparator','CSVExportEncoding');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.01 WHERE VariableName = 'Site_Path';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.02 WHERE VariableName = 'SiteNameSubTitle';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.03 WHERE VariableName = 'UseModRewrite';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.04 WHERE VariableName = 'Config_Server_Time';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.05 WHERE VariableName = 'Config_Site_Time';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.06 WHERE VariableName = 'ErrorTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.07 WHERE VariableName = 'NoPermissionTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.08 WHERE VariableName = 'UsePageHitCounter';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.09 WHERE VariableName = 'ForceImageMagickResize';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.10 WHERE VariableName = 'CheckStopWords';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.01 WHERE VariableName = 'CookieSessions';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.02 WHERE VariableName = 'SessionCookieName';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.03 WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.04 WHERE VariableName = 'KeepSessionOnBrowserClose';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.05 WHERE VariableName = 'SessionReferrerCheck';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.06 WHERE VariableName = 'UseJSRedirect';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.01 WHERE VariableName = 'SSL_URL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.02 WHERE VariableName = 'AdminSSL_URL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.03 WHERE VariableName = 'Require_SSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.04 WHERE VariableName = 'Require_AdminSSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.05 WHERE VariableName = 'Force_HTTP_When_SSL_Not_Required';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.06 WHERE VariableName = 'UseModRewriteWithSSL';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.01 WHERE VariableName = 'UseToolbarLabels';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.02 WHERE VariableName = 'UseSmallHeader';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.03 WHERE VariableName = 'UseColumnFreezer';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.04 WHERE VariableName = 'UsePopups';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.05 WHERE VariableName = 'UseDoubleSorting';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.06 WHERE VariableName = 'MenuFrameWidth';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.07 WHERE VariableName = 'ResizableFrames';
UPDATE ConfigurationAdmin SET DisplayOrder = 40.08 WHERE VariableName = 'AutoRefreshIntervals';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.01 WHERE VariableName = 'Smtp_Server';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.02 WHERE VariableName = 'Smtp_Port';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.03 WHERE VariableName = 'Smtp_Authenticate';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.04 WHERE VariableName = 'Smtp_User';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.05 WHERE VariableName = 'Smtp_Pass';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.06 WHERE VariableName = 'Smtp_DefaultHeaders';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.07 WHERE VariableName = 'MailFunctionHeaderSeparator';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.08 WHERE VariableName = 'MailingListQueuePerStep';
UPDATE ConfigurationAdmin SET DisplayOrder = 50.09 WHERE VariableName = 'MailingListSendPerStep';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.01 WHERE VariableName = 'UseOutputCompression';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.02 WHERE VariableName = 'OutputCompressionLevel';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.03 WHERE VariableName = 'TrimRequiredFields';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.04 WHERE VariableName = 'UseCronForRegularEvent';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.05 WHERE VariableName = 'UseChangeLog';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.06 WHERE VariableName = 'Backup_Path';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.07 WHERE VariableName = 'SystemTagCache';
UPDATE ConfigurationAdmin SET DisplayOrder = 60.08 WHERE VariableName = 'SocketBlockingMode';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.01 WHERE VariableName = 'CSVExportDelimiter';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.02 WHERE VariableName = 'CSVExportEnclosure';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.03 WHERE VariableName = 'CSVExportSeparator';
UPDATE ConfigurationAdmin SET DisplayOrder = 70.04 WHERE VariableName = 'CSVExportEncoding';
UPDATE Phrase SET Phrase = 'la_section_SettingsWebsite' WHERE Phrase = 'la_Text_Website';
UPDATE Phrase SET Phrase = 'la_section_SettingsMailling' WHERE Phrase = 'la_Text_smtp_server';
UPDATE Phrase SET Phrase = 'la_section_SettingsCSVExport' WHERE Phrase = 'la_Text_CSV_Export';
DELETE FROM Phrase WHERE Phrase IN (
'la_Text_BackupPath', 'la_config_AllowManualFilenames', 'la_fld_cat_MenuLink', 'la_fld_UseCategoryTitle',
'la_In-Edit', 'la_ItemTab_Pages', 'la_Text_Pages', 'la_title_Pages', 'la_title_Page_Categories', 'lu_Pages',
'lu_page_HtmlTitle', 'lu_page_OnPageTitle', 'la_tab_AllPages', 'la_title_AllPages', 'la_title_ContentManagement',
'la_title_ContentManagment', 'lu_ViewSubPages', 'la_CMS_FormSubmitted'
);
DELETE FROM Phrase WHERE (Phrase LIKE 'la_Description_In-Edit%') OR (Phrase LIKE 'la_Pages_PerPage%') OR (Phrase LIKE 'lu_PermName_Page.%');
UPDATE ConfigurationValues
SET VariableValue = 1, ModuleOwner = 'In-Portal:Users', Section = 'in-portal:configure_users'
WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal:Users', Section = 'in-portal:configure_users'
WHERE VariableName IN ('AdvancedUserManagement', 'DefaultSettingsUserId');
INSERT INTO ConfigurationAdmin VALUES ('Search_MinKeyword_Length', 'la_Text_General', 'la_config_Search_MinKeyword_Length', 'text', NULL, NULL, 10.19, 0, 0);
UPDATE ConfigurationValues SET Section = 'in-portal:configure_categories' WHERE VariableName = 'Search_MinKeyword_Length';
UPDATE ConfigurationAdmin
SET ValueList = '=+,<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>'
WHERE VariableName = 'User_Default_Registration_Country';
UPDATE ConfigurationValues
SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced'
WHERE VariableName IN (
'Site_Path', 'SiteNameSubTitle', 'CookieSessions', 'SessionCookieName', 'SessionTimeout', 'SessionReferrerCheck',
'SystemTagCache', 'SocketBlockingMode', 'SSL_URL', 'AdminSSL_URL', 'Require_SSL', 'Force_HTTP_When_SSL_Not_Required',
'UseModRewrite', 'UseModRewriteWithSSL', 'UseJSRedirect', 'UseCronForRegularEvent', 'ErrorTemplate',
'NoPermissionTemplate', 'UseOutputCompression', 'OutputCompressionLevel', 'UseToolbarLabels', 'UseSmallHeader',
'UseColumnFreezer', 'TrimRequiredFields', 'UsePageHitCounter', 'UseChangeLog', 'AutoRefreshIntervals',
'KeepSessionOnBrowserClose', 'ForceImageMagickResize', 'CheckStopWords', 'ResizableFrames', 'Config_Server_Time',
'Config_Site_Time', 'Smtp_Server', 'Smtp_Port', 'Smtp_Authenticate', 'Smtp_User', 'Smtp_Pass', 'Smtp_DefaultHeaders',
'MailFunctionHeaderSeparator', 'MailingListQueuePerStep', 'MailingListSendPerStep', 'Backup_Path',
'CSVExportDelimiter', 'CSVExportEnclosure', 'CSVExportSeparator', 'CSVExportEncoding'
);
DELETE FROM ConfigurationValues WHERE VariableName IN (
'Columns_Category', 'Perpage_Archive', 'debug', 'Perpage_User', 'Perpage_LangEmail', 'Default_FromAddr',
'email_replyto', 'email_footer', 'Default_Theme', 'Default_Language', 'User_SortField', 'User_SortOrder',
'Suggest_MinInterval', 'SubCat_ListCount', 'Timeout_Rating', 'Perpage_Relations', 'Group_SortField',
'Group_SortOrder', 'Default_FromName', 'Relation_LV_Sortfield', 'ampm_time', 'Perpage_Template',
'Perpage_Phrase', 'Perpage_Sessionlist', 'Perpage_Items', 'GuestSessions', 'Perpage_Email',
'LinksValidation_LV_Sortfield', 'CustomConfig_LV_Sortfield', 'Event_LV_SortField', 'Theme_LV_SortField',
'Template_LV_SortField', 'Lang_LV_SortField', 'Phrase_LV_SortField', 'LangEmail_LV_SortField',
'CustomData_LV_SortField', 'Summary_SortField', 'Session_SortField', 'SearchLog_SortField', 'Perpage_StatItem',
'Perpage_Groups', 'Perpage_Event', 'Perpage_BanRules', 'Perpage_SearchLog', 'Perpage_LV_lang',
'Perpage_LV_Themes', 'Perpage_LV_Catlist', 'Perpage_Reviews', 'Perpage_Modules', 'Perpage_Grouplist',
'Perpage_Images', 'EmailsL_SortField', 'Perpage_EmailsL', 'Perpage_CustomData', 'Perpage_Review',
'SearchRel_DefaultIncrease', 'SearchRel_DefaultKeyword', 'SearchRel_DefaultPop', 'SearchRel_DefaultRating',
'Category_Highlight_OpenTag', 'Category_Highlight_CloseTag', 'DomainSelect', 'MetaKeywords', 'MetaDescription',
'Config_Name', 'Config_Company', 'Config_Reg_Number', 'Config_Website_Name', 'Config_Web_Address',
'Smtp_SendHTML', 'ProjCMSAllowManualFilenames'
);
DELETE FROM ConfigurationAdmin WHERE VariableName IN ('Domain_Detect', 'Server_Name', 'ProjCMSAllowManualFilenames');
DROP TABLE SuggestMail;
ALTER TABLE ThemeFiles ADD FileMetaInfo TEXT NULL;
UPDATE SearchConfig
SET SimpleSearch = 0
WHERE FieldType NOT IN ('text', 'range') AND SimpleSearch = 1;
DELETE FROM PersistantSessionData WHERE VariableName IN ('c_columns_.', 'c.showall_columns_.', 'emailevents_columns_.', 'emailmessages_columns_.');
INSERT INTO ConfigurationAdmin VALUES ('DebugOnlyFormConfigurator', 'la_section_SettingsAdmin', 'la_config_DebugOnlyFormConfigurator', 'checkbox', '', '', 40.09, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'DebugOnlyFormConfigurator', '0', 'In-Portal', 'in-portal:configure_advanced');
CREATE TABLE Semaphores (
SemaphoreId int(11) NOT NULL auto_increment,
SessionKey int(10) unsigned NOT NULL,
Timestamp int(10) unsigned NOT NULL,
MainPrefix varchar(255) NOT NULL,
PRIMARY KEY (SemaphoreId),
KEY SessionKey (SessionKey),
KEY Timestamp (Timestamp),
KEY MainPrefix (MainPrefix)
);
ALTER TABLE Language ADD IconDisabledURL VARCHAR(255) NULL DEFAULT NULL AFTER IconURL;
UPDATE Phrase
SET Translation = REPLACE(Translation, 'category', 'section')
WHERE (Phrase IN (
'la_confirm_maintenance', 'la_error_move_subcategory', 'la_error_RootCategoriesDelete',
'la_error_unknown_category', 'la_fld_IsBaseCategory', 'la_nextcategory', 'la_prevcategory',
'la_prompt_max_import_category_levels', 'la_prompt_root_name', 'la_SeparatedCategoryPath',
'la_title_category_select'
) OR Phrase LIKE 'la_Description_%') AND (PhraseType = 1);
UPDATE Phrase SET Translation = REPLACE(Translation, 'Category', 'Section') WHERE PhraseType = 1;
UPDATE Phrase
SET Translation = REPLACE(Translation, 'categories', 'sections')
WHERE (Phrase IN (
'la_category_perpage_prompt', 'la_category_showpick_prompt', 'la_category_sortfield_prompt',
'la_Description_in-portal:advanced_view', 'la_Description_in-portal:browse', 'la_Description_in-portal:site',
'la_error_copy_subcategory', 'la_Msg_PropagateCategoryStatus', 'la_Text_DataType_1'
)) AND (PhraseType = 1);
UPDATE Phrase SET Translation = REPLACE(Translation, 'Categories', 'Sections') WHERE PhraseType = 1;
UPDATE Phrase
SET Translation = REPLACE(Translation, 'Page', 'Section')
WHERE (Phrase IN ('la_col_PageTitle', 'la_col_System', 'la_fld_IsIndex', 'la_fld_PageTitle', 'la_section_Page')) AND (PhraseType = 1);
DELETE FROM Phrase WHERE Phrase IN ('la_title_Adding_Page', 'la_title_Editing_Page', 'la_title_New_Page', 'la_fld_PageId');
INSERT INTO ConfigurationAdmin VALUES ('UseModalWindows', 'la_section_SettingsAdmin', 'la_config_UseModalWindows', 'checkbox', '', '', 40.10, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseModalWindows', '1', 'In-Portal', 'in-portal:configure_advanced');
UPDATE Language SET UserDocsUrl = 'http://docs.in-portal.org/eng/index.php';
DELETE FROM Modules WHERE Name = 'Proj-Base';
DELETE FROM Phrase WHERE Phrase IN ('la_fld_ImageId', 'la_fld_RelationshipId', 'la_fld_ReviewId', 'la_prompt_CensorhipId', 'my_account_title', 'Next Theme', 'Previous Theme', 'test 1', 'la_article_reviewed', 'la_configerror_review', 'la_link_reviewed', 'la_Prompt_ReviewedBy', 'la_prompt_ReviewId', 'la_prompt_ReviewText', 'la_reviewer', 'la_review_added', 'la_review_alreadyreviewed', 'la_review_error', 'la_tab_Editing_Review', 'la_tab_Review', 'la_ToolTip_New_Review', 'la_topic_reviewed', 'lu_add_review', 'lu_article_reviews', 'lu_ferror_review_duplicate', 'lu_link_addreview_confirm_pending_text', 'lu_link_reviews', 'lu_link_review_confirm', 'lu_link_review_confirm_pending', 'lu_link_addreview_confirm_text', 'lu_news_addreview_confirm_text', 'lu_news_addreview_confirm__pending_text', 'lu_news_review_confirm', 'lu_news_review_confirm_pending', 'lu_prompt_review', 'lu_reviews_updated', 'lu_review_access_denied', 'lu_review_article', 'lu_review_link', 'lu_review_news', 'lu_review_this_article', 'lu_fld_Review', 'lu_product_reviews', 'lu_ReviewProduct', ' lu_resetpw_confirm_text', 'lu_resetpw_confirm_text');
UPDATE Modules SET Version = '5.0.0', Loaded = 1 WHERE Name = 'In-Portal';
# ===== v 5.0.1 =====
UPDATE ConfigurationAdmin
SET ValueList = '1=la_opt_UserInstantRegistration,2=la_opt_UserNotAllowedRegistration,3=la_opt_UserUponApprovalRegistration,4=la_opt_UserEmailActivation'
WHERE VariableName = 'User_Allow_New';
UPDATE ConfigurationValues SET VariableValue = '1' WHERE VariableName = 'ResizableFrames';
UPDATE Phrase
SET Translation = REPLACE(Translation, 'Page', 'Section')
WHERE (Phrase IN ('la_col_PageTitle', 'la_col_System', 'la_fld_IsIndex', 'la_fld_PageTitle', 'la_section_Page')) AND (PhraseType = 1);
DELETE FROM Phrase WHERE Phrase IN ('la_Tab', 'la_Colon', 'la_Semicolon', 'la_Space', 'la_Colon', 'la_User_Instant', 'la_User_Not_Allowed', 'la_User_Upon_Approval', 'lu_title_PrivacyPolicy');
UPDATE ConfigurationAdmin SET ValueList = '0=la_opt_Tab,1=la_opt_Comma,2=la_opt_Semicolon,3=la_opt_Space,4=la_opt_Colon'
WHERE VariableName = 'CSVExportDelimiter';
UPDATE ConfigurationAdmin SET ValueList = '0=lu_opt_QueryString,1=lu_opt_Cookies,2=lu_opt_AutoDetect'
WHERE VariableName = 'CookieSessions';
UPDATE ConfigurationAdmin SET ValueList = 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>'
WHERE VariableName = 'Category_Sortfield';
UPDATE ConfigurationAdmin SET ValueList = 'Name=la_opt_Title,Description=la_opt_Description,CreatedOn=la_opt_CreatedOn,EditorsPick=la_opt_EditorsPick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>'
WHERE VariableName = 'Category_Sortfield2';
UPDATE Category SET Template = '#inherit#' WHERE COALESCE(Template, '') = '';
ALTER TABLE Category CHANGE Template Template VARCHAR(255) NOT NULL DEFAULT '#inherit#';
UPDATE Phrase SET Phrase = 'la_config_DefaultDesignTemplate' WHERE Phrase = 'la_prompt_DefaultDesignTemplate';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsWebsite', prompt = 'la_config_DefaultDesignTemplate', DisplayOrder = 10.06 WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationValues SET Section = 'in-portal:configure_advanced' WHERE VariableName = 'cms_DefaultDesign';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName IN ('ErrorTemplate', 'NoPermissionTemplate');
UPDATE ConfigurationAdmin SET DisplayOrder = 10.15 WHERE VariableName = 'Search_MinKeyword_Length';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.01 WHERE VariableName = 'Site_Name';
UPDATE ConfigurationAdmin SET DisplayOrder = 20.01 WHERE VariableName = 'FirstDayOfWeek';
UPDATE ConfigurationAdmin SET DisplayOrder = 30.01 WHERE VariableName = 'Smtp_AdminMailFrom';
UPDATE ConfigurationAdmin SET heading = 'la_Text_Date_Time_Settings', DisplayOrder = DisplayOrder + 9.98 WHERE VariableName IN ('Config_Server_Time', 'Config_Site_Time');
UPDATE ConfigurationValues SET Section = 'in-portal:configure_general' WHERE VariableName IN ('Config_Server_Time', 'Config_Site_Time');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.02 WHERE VariableName IN ('cms_DefaultDesign', 'ErrorTemplate', 'NoPermissionTemplate', 'UsePageHitCounter', 'ForceImageMagickResize', 'CheckStopWords');
UPDATE ConfigurationAdmin SET DisplayOrder = 40.01 WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationValues SET Section = 'in-portal:configure_general' WHERE VariableName = 'SessionTimeout';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.01 WHERE VariableName IN ('KeepSessionOnBrowserClose', 'SessionReferrerCheck', 'UseJSRedirect');
ALTER TABLE Events
ADD FrontEndOnly TINYINT UNSIGNED NOT NULL DEFAULT '0' AFTER Enabled,
ADD INDEX (FrontEndOnly);
UPDATE Events SET FrontEndOnly = 1 WHERE Enabled = 2;
UPDATE Events SET Enabled = 1 WHERE Enabled = 2;
ALTER TABLE Events CHANGE FromUserId FromUserId INT(11) NULL DEFAULT NULL;
UPDATE Events SET FromUserId = NULL WHERE FromUserId = 0;
DELETE FROM ConfigurationAdmin WHERE VariableName = 'SiteNameSubTitle';
DELETE FROM ConfigurationValues WHERE VariableName = 'SiteNameSubTitle';
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder - 0.01 WHERE VariableName IN ('UseModRewrite', 'cms_DefaultDesign', 'ErrorTemplate' 'NoPermissionTemplate', 'UsePageHitCounter', 'ForceImageMagickResize', 'CheckStopWords');
ALTER TABLE ConfigurationAdmin CHANGE validation Validation TEXT NULL DEFAULT NULL;
UPDATE ConfigurationAdmin SET Validation = 'a:3:{s:4:"type";s:3:"int";s:13:"min_value_inc";i:1;s:8:"required";i:1;}' WHERE VariableName = 'SessionTimeout';
INSERT INTO ConfigurationAdmin VALUES ('AdminConsoleInterface', 'la_section_SettingsAdmin', 'la_config_AdminConsoleInterface', 'select', '', 'simple=+simple,advanced=+advanced,custom=+custom', 50.01, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AdminConsoleInterface', 'simple', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationAdmin VALUES ('AllowAdminConsoleInterfaceChange', 'la_section_SettingsAdmin', 'la_config_AllowAdminConsoleInterfaceChange', 'checkbox', NULL , NULL , 40.01, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AllowAdminConsoleInterfaceChange', '1', 'In-Portal', 'in-portal:configure_advanced');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName IN ('UseToolbarLabels', 'UseSmallHeader', 'UseColumnFreezer', 'UsePopups', 'UseDoubleSorting', 'MenuFrameWidth', 'ResizableFrames', 'AutoRefreshIntervals', 'DebugOnlyFormConfigurator', 'UseModalWindows');
INSERT INTO ConfigurationAdmin VALUES ('UseTemplateCompression', 'la_section_SettingsSystem', 'la_config_UseTemplateCompression', 'checkbox', '', '', 60.03, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseTemplateCompression', '0', 'In-Portal', 'in-portal:configure_advanced');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName IN ('TrimRequiredFields', 'UseCronForRegularEvent', 'UseChangeLog', 'Backup_Path', 'SystemTagCache', 'SocketBlockingMode');
DELETE FROM ConfigurationAdmin WHERE VariableName = 'UseModalWindows';
DELETE FROM ConfigurationValues WHERE VariableName = 'UseModalWindows';
DELETE FROM Phrase WHERE Phrase = 'la_config_UseModalWindows';
UPDATE ConfigurationAdmin SET element_type = 'select', ValueList = '0=la_opt_SameWindow,1=la_opt_PopupWindow,2=la_opt_ModalWindow' WHERE VariableName = 'UsePopups';
UPDATE Phrase SET Translation = 'Editing Window Style' WHERE Phrase = 'la_config_UsePopups';
INSERT INTO ConfigurationAdmin VALUES ('UseVisitorTracking', 'la_section_SettingsWebsite', 'la_config_UseVisitorTracking', 'checkbox', '', '', 10.09, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseVisitorTracking', '0', 'In-Portal', 'in-portal:configure_advanced');
DELETE FROM ConfigurationAdmin WHERE VariableName = 'SessionReferrerCheck';
DELETE FROM ConfigurationValues WHERE VariableName = 'SessionReferrerCheck';
DELETE FROM Phrase WHERE Phrase = 'la_promt_ReferrerCheck';
INSERT INTO ConfigurationAdmin VALUES ('SessionBrowserSignatureCheck', 'la_section_SettingsSession', 'la_config_SessionBrowserSignatureCheck', 'checkbox', NULL, NULL, 20.04, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SessionBrowserSignatureCheck', '0', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('SessionIPAddressCheck', 'la_section_SettingsSession', 'la_config_SessionIPAddressCheck', 'checkbox', NULL, NULL, 20.05, 0, 1);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SessionIPAddressCheck', '0', 'In-Portal', 'in-portal:configure_advanced');
UPDATE ConfigurationAdmin SET DisplayOrder = DisplayOrder + 0.01 WHERE VariableName = 'UseJSRedirect';
ALTER TABLE UserSession
DROP CurrentTempKey,
DROP PrevTempKey,
ADD BrowserSignature VARCHAR(32) NOT NULL,
ADD INDEX (BrowserSignature);
UPDATE ConfigurationAdmin
SET DisplayOrder = DisplayOrder + 0.01
WHERE heading = 'la_section_SettingsAdmin' AND DisplayOrder > 40 AND DisplayOrder < 50;
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsAdmin', DisplayOrder = 40.01 WHERE VariableName = 'RootPass';
UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced' WHERE VariableName = 'RootPass';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.12 WHERE VariableName = 'User_Default_Registration_Country';
UPDATE ConfigurationAdmin SET heading = 'la_section_SettingsAdmin', DisplayOrder = 40.12 WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationValues SET ModuleOwner = 'In-Portal', Section = 'in-portal:configure_advanced' WHERE VariableName = 'RememberLastAdminTemplate';
UPDATE ConfigurationAdmin SET DisplayOrder = 10.14 WHERE VariableName = 'DefaultSettingsUserId';
INSERT INTO ConfigurationAdmin VALUES ('UseHTTPAuth', 'la_section_SettingsAdmin', 'la_config_UseHTTPAuth', 'checkbox', '', '', 40.13, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseHTTPAuth', '0', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('HTTPAuthUsername', 'la_section_SettingsAdmin', 'la_config_HTTPAuthUsername', 'text', '', '', 40.14, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'HTTPAuthUsername', '', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('HTTPAuthPassword', 'la_section_SettingsAdmin', 'la_config_HTTPAuthPassword', 'password', NULL, NULL, 40.15, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'HTTPAuthPassword', '', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO ConfigurationAdmin VALUES ('HTTPAuthBypassIPs', 'la_section_SettingsAdmin', 'la_config_HTTPAuthBypassIPs', 'text', '', '', 40.15, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'HTTPAuthBypassIPs', '', 'In-Portal', 'in-portal:configure_advanced');
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.edit', 11, 1, 1, 0);
UPDATE Phrase SET Phrase = 'la_col_Rating' WHERE Phrase = 'la_col_rating';
UPDATE Phrase SET Phrase = 'la_text_Review' WHERE Phrase = 'la_text_review';
UPDATE Phrase SET Phrase = 'la_title_Reviews' WHERE Phrase = 'la_title_reviews';
UPDATE Phrase SET Phrase = 'la_ToolTip_cancel' WHERE Phrase = 'la_tooltip_cancel';
ALTER TABLE Phrase
ADD PhraseKey VARCHAR(255) NOT NULL AFTER Phrase,
ADD INDEX (PhraseKey);
UPDATE Phrase SET PhraseKey = UPPER(Phrase);
UPDATE Modules SET Loaded = 1 WHERE `Name` = 'In-Portal';
# ===== v 5.0.2-B1 =====
ALTER TABLE PortalGroup DROP ResourceId;
ALTER TABLE Category
DROP l1_Translated,
DROP l2_Translated,
DROP l3_Translated,
DROP l4_Translated,
DROP l5_Translated;
ALTER TABLE PageContent
DROP l1_Translated,
DROP l2_Translated,
DROP l3_Translated,
DROP l4_Translated,
DROP l5_Translated;
ALTER TABLE Category
CHANGE CachedTemplate CachedTemplate varchar(255) NOT NULL DEFAULT '',
CHANGE ThemeId ThemeId int(10) unsigned NOT NULL DEFAULT '0';
ALTER TABLE UserSession CHANGE BrowserSignature BrowserSignature varchar(32) NOT NULL DEFAULT '';
ALTER TABLE ChangeLogs
CHANGE Changes Changes text NULL,
CHANGE OccuredOn OccuredOn INT(11) NULL DEFAULT NULL;
ALTER TABLE EmailLog CHANGE EventParams EventParams text NULL;
ALTER TABLE FormFields CHANGE DefaultValue DefaultValue text NULL;
ALTER TABLE ImportCache CHANGE VarValue VarValue text NULL;
ALTER TABLE ImportScripts CHANGE Description Description text NULL;
ALTER TABLE PersistantSessionData CHANGE VariableValue VariableValue text NULL;
ALTER TABLE Phrase
CHANGE `Translation` `Translation` text NULL,
CHANGE PhraseKey PhraseKey VARCHAR(255) NOT NULL DEFAULT '',
CHANGE LastChanged LastChanged INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE PhraseCache CHANGE PhraseList PhraseList text NULL;
ALTER TABLE Stylesheets
CHANGE AdvancedCSS AdvancedCSS text NULL,
CHANGE LastCompiled LastCompiled INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE StylesheetSelectors
CHANGE SelectorData SelectorData text NULL,
CHANGE Description Description text NULL,
CHANGE AdvancedCSS AdvancedCSS text NULL;
ALTER TABLE Category
CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '1',
CHANGE CreatedOn CreatedOn INT(11) NULL DEFAULT NULL,
CHANGE Modified Modified INT(11) NULL DEFAULT NULL;
ALTER TABLE Language CHANGE UserDocsUrl UserDocsUrl VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE MailingLists
CHANGE Subject Subject VARCHAR(255) NOT NULL DEFAULT '',
CHANGE EmailsQueued EmailsQueued INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE EmailsSent EmailsSent INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE EmailsTotal EmailsTotal INT(10) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE EmailQueue
CHANGE MailingId MailingId INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE Queued Queued INT(10) UNSIGNED NULL DEFAULT NULL,
CHANGE LastSendRetry LastSendRetry INT(10) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE ImportScripts CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '1';
ALTER TABLE Semaphores
CHANGE SessionKey SessionKey INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE `Timestamp` `Timestamp` INT(10) UNSIGNED NOT NULL DEFAULT '0',
CHANGE MainPrefix MainPrefix VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE Skins
CHANGE LogoBottom LogoBottom VARCHAR(255) NOT NULL DEFAULT '',
CHANGE LogoLogin LogoLogin VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE ItemReview CHANGE ReviewText ReviewText LONGTEXT NULL;
ALTER TABLE SessionData CHANGE VariableValue VariableValue LONGTEXT NULL;
ALTER TABLE PortalUser
CHANGE `Status` `Status` TINYINT(4) NOT NULL DEFAULT '1',
CHANGE Modified Modified INT(11) NULL DEFAULT NULL;
ALTER TABLE ItemFiles CHANGE CreatedOn CreatedOn INT(11) UNSIGNED NULL DEFAULT NULL;
ALTER TABLE FormSubmissions CHANGE SubmissionTime SubmissionTime INT(11) NULL DEFAULT NULL;
ALTER TABLE SessionLogs CHANGE SessionStart SessionStart INT(11) NULL DEFAULT NULL;
ALTER TABLE Visits CHANGE VisitDate VisitDate INT(10) UNSIGNED NULL DEFAULT NULL;
# ===== v 5.0.2-B2 =====
ALTER TABLE Theme
ADD LanguagePackInstalled TINYINT UNSIGNED NOT NULL DEFAULT '0',
ADD TemplateAliases TEXT,
ADD INDEX (LanguagePackInstalled);
ALTER TABLE ThemeFiles
ADD TemplateAlias VARCHAR(255) NOT NULL DEFAULT '' AFTER FilePath,
ADD INDEX (TemplateAlias);
UPDATE Phrase SET PhraseType = 1 WHERE Phrase IN ('la_ToolTip_MoveUp', 'la_ToolTip_MoveDown', 'la_invalid_state', 'la_Pending', 'la_text_sess_expired', 'la_ToolTip_Export');
DELETE FROM Phrase WHERE Phrase IN ('la_ToolTip_Move_Up', 'la_ToolTip_Move_Down');
UPDATE Phrase SET Phrase = 'lu_btn_SendPassword' WHERE Phrase = 'LU_BTN_SENDPASSWORD';
ALTER TABLE Category DROP IsIndex;
DELETE FROM Phrase WHERE Phrase IN ('la_CategoryIndex', 'la_Container', 'la_fld_IsIndex', 'lu_text_Redirecting', 'lu_title_Redirecting', 'lu_zip_code');
ALTER TABLE PortalUser
ADD AdminLanguage INT(11) NULL DEFAULT NULL,
ADD INDEX (AdminLanguage);
# ===== v 5.0.2-RC1 =====
# ===== v 5.0.2 =====
# ===== v 5.0.3-B1 =====
ALTER TABLE PermCache ADD INDEX (ACL);
INSERT INTO ConfigurationAdmin VALUES ('cms_DefaultTrackingCode', 'la_section_SettingsWebsite', 'la_config_DefaultTrackingCode', 'textarea', NULL, 'COLS=40 ROWS=5', 10.10, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'cms_DefaultTrackingCode', '', 'In-Portal', 'in-portal:configure_advanced');
UPDATE Phrase
SET Module = 'Core'
WHERE Phrase IN ('la_fld_Image', 'la_fld_Qty');
# ===== v 5.0.3-B2 =====
UPDATE CustomField SET ValueList = REPLACE(ValueList, '=+||', '') WHERE ElementType = 'radio';
# ===== v 5.0.3-RC1 =====
# ===== v 5.0.3 =====
# ===== v 5.0.4-B1 =====
# ===== v 5.0.4-B2 =====
# ===== v 5.0.4 =====
# ===== v 5.1.0-B1 =====
DROP TABLE EmailMessage;
DELETE FROM PersistantSessionData WHERE VariableName = 'emailevents_columns_.';
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId)
SELECT 'in-portal:configemail.add' AS Permission, GroupId, PermissionValue, Type, CatId
FROM <%TABLE_PREFIX%>Permissions
WHERE Permission = 'in-portal:configemail.edit';
INSERT INTO Permissions (Permission, GroupId, PermissionValue, Type, CatId)
SELECT 'in-portal:configemail.delete' AS Permission, GroupId, PermissionValue, Type, CatId
FROM <%TABLE_PREFIX%>Permissions
WHERE Permission = 'in-portal:configemail.edit';
ALTER TABLE Events ADD l1_Description text;
UPDATE Events e
SET e.l1_Description = (
SELECT p.l<%PRIMARY_LANGUAGE%>_Translation
FROM <%TABLE_PREFIX%>Phrase p
WHERE p.Phrase = e.Description
);
UPDATE Events SET Description = l1_Description;
ALTER TABLE Events
DROP l1_Description,
CHANGE Description Description TEXT NULL;
DELETE FROM Phrase WHERE Phrase LIKE 'la_event_%';
DELETE FROM PersistantSessionData WHERE VariableName = 'phrases_columns_.';
UPDATE Category SET FormId = NULL WHERE FormId = 0;
INSERT INTO ConfigurationAdmin VALUES ('MemcacheServers', 'la_section_SettingsCaching', 'la_config_MemcacheServers', 'text', '', '', 80.02, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MemcacheServers', 'localhost:11211', 'In-Portal', 'in-portal:configure_advanced');
ALTER TABLE Category
ADD EnablePageCache TINYINT NOT NULL DEFAULT '0',
ADD OverridePageCacheKey TINYINT NOT NULL DEFAULT '0',
ADD PageCacheKey VARCHAR(255) NOT NULL DEFAULT '',
ADD PageExpiration INT NULL DEFAULT NULL ,
ADD INDEX (EnablePageCache),
ADD INDEX (OverridePageCacheKey),
ADD INDEX (PageExpiration);
DELETE FROM Cache WHERE VarName LIKE 'mod_rw_%';
CREATE TABLE CachedUrls (
UrlId int(11) NOT NULL AUTO_INCREMENT,
Url varchar(255) NOT NULL DEFAULT '',
DomainId int(11) NOT NULL DEFAULT '0',
`Hash` int(11) NOT NULL DEFAULT '0',
Prefixes varchar(255) NOT NULL DEFAULT '',
ParsedVars text NOT NULL,
Cached int(10) unsigned DEFAULT NULL,
LifeTime int(11) NOT NULL DEFAULT '-1',
PRIMARY KEY (UrlId),
KEY Url (Url),
KEY `Hash` (`Hash`),
KEY Prefixes (Prefixes),
KEY Cached (Cached),
KEY LifeTime (LifeTime),
KEY DomainId (DomainId)
);
INSERT INTO ConfigurationAdmin VALUES ('CacheHandler', 'la_section_SettingsCaching', 'la_config_CacheHandler', 'select', NULL, 'Fake=la_None||Memcache=+Memcached||Apc=+Alternative PHP Cache||XCache=+XCache', 80.01, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CacheHandler', 'Fake', 'In-Portal', 'in-portal:configure_advanced');
ALTER TABLE ConfigurationValues
ADD Heading varchar(255) NOT NULL DEFAULT '',
ADD Prompt varchar(255) NOT NULL DEFAULT '',
ADD ElementType varchar(255) NOT NULL DEFAULT '',
ADD Validation text,
ADD ValueList text,
ADD DisplayOrder double NOT NULL DEFAULT '0',
ADD GroupDisplayOrder double NOT NULL DEFAULT '0',
ADD Install int(11) NOT NULL DEFAULT '1',
ADD INDEX (DisplayOrder),
ADD INDEX (GroupDisplayOrder),
ADD INDEX (Install);
UPDATE ConfigurationValues cv
SET
cv.Heading = (SELECT ca1.heading FROM <%TABLE_PREFIX%>ConfigurationAdmin ca1 WHERE ca1.VariableName = cv.VariableName),
cv.Prompt = (SELECT ca2.prompt FROM <%TABLE_PREFIX%>ConfigurationAdmin ca2 WHERE ca2.VariableName = cv.VariableName),
cv.ElementType = (SELECT ca3.element_type FROM <%TABLE_PREFIX%>ConfigurationAdmin ca3 WHERE ca3.VariableName = cv.VariableName),
cv.Validation = (SELECT ca4.Validation FROM <%TABLE_PREFIX%>ConfigurationAdmin ca4 WHERE ca4.VariableName = cv.VariableName),
cv.ValueList = (SELECT ca5.ValueList FROM <%TABLE_PREFIX%>ConfigurationAdmin ca5 WHERE ca5.VariableName = cv.VariableName),
cv.DisplayOrder = (SELECT ca6.DisplayOrder FROM <%TABLE_PREFIX%>ConfigurationAdmin ca6 WHERE ca6.VariableName = cv.VariableName),
cv.GroupDisplayOrder = (SELECT ca7.GroupDisplayOrder FROM <%TABLE_PREFIX%>ConfigurationAdmin ca7 WHERE ca7.VariableName = cv.VariableName),
cv.`Install` = (SELECT ca8.`Install` FROM <%TABLE_PREFIX%>ConfigurationAdmin ca8 WHERE ca8.VariableName = cv.VariableName);
DROP TABLE ConfigurationAdmin;
UPDATE ConfigurationValues
SET ValueList = '=+||<SQL+>SELECT l%3$s_Name AS OptionName, CountryStateId AS OptionValue FROM <PREFIX>CountryStates WHERE Type = 1 ORDER BY OptionName</SQL>'
WHERE ValueList = '=+||<SQL>SELECT DestName AS OptionName, DestId AS OptionValue FROM <PREFIX>StdDestinations WHERE COALESCE(DestParentId, 0) = 0 ORDER BY OptionName</SQL>';
ALTER TABLE Forms
ADD RequireLogin TINYINT NOT NULL DEFAULT '0',
ADD INDEX (RequireLogin),
ADD UseSecurityImage TINYINT NOT NULL DEFAULT '0',
ADD INDEX (UseSecurityImage),
ADD EnableEmailCommunication TINYINT NOT NULL DEFAULT '0',
ADD INDEX (EnableEmailCommunication),
ADD ReplyFromName VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyFromEmail VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyCc VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyBcc VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyMessageSignature TEXT,
ADD ReplyServer VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyPort INT(10) NOT NULL DEFAULT '110',
ADD ReplyUsername VARCHAR(255) NOT NULL DEFAULT '',
ADD ReplyPassword VARCHAR(255) NOT NULL DEFAULT '',
ADD BounceEmail VARCHAR(255) NOT NULL DEFAULT '',
ADD BounceServer VARCHAR(255) NOT NULL DEFAULT '',
ADD BouncePort INT(10) NOT NULL DEFAULT '110',
ADD BounceUsername VARCHAR(255) NOT NULL DEFAULT '',
ADD BouncePassword VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE FormFields
ADD Visibility TINYINT NOT NULL DEFAULT '1',
ADD INDEX (Visibility),
ADD EmailCommunicationRole TINYINT NOT NULL DEFAULT '0',
ADD INDEX (EmailCommunicationRole);
ALTER TABLE FormSubmissions
ADD IPAddress VARCHAR(15) NOT NULL DEFAULT '' AFTER SubmissionTime,
ADD ReferrerURL VARCHAR(255) NOT NULL DEFAULT '' AFTER IPAddress,
ADD LogStatus TINYINT UNSIGNED NOT NULL DEFAULT '2' AFTER ReferrerURL,
ADD LastUpdatedOn INT UNSIGNED NULL AFTER LogStatus,
ADD Notes TEXT NULL AFTER LastUpdatedOn,
ADD INDEX (LogStatus),
ADD INDEX (LastUpdatedOn);
CREATE TABLE SubmissionLog (
SubmissionLogId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL,
FromEmail varchar(255) NOT NULL DEFAULT '',
ToEmail varchar(255) NOT NULL DEFAULT '',
Cc text,
Bcc text,
`Subject` varchar(255) NOT NULL DEFAULT '',
Message text,
Attachment text,
ReplyStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentStatus tinyint(3) unsigned NOT NULL DEFAULT '0',
SentOn int(10) unsigned DEFAULT NULL,
RepliedOn int(10) unsigned DEFAULT NULL,
VerifyCode varchar(32) NOT NULL DEFAULT '',
DraftId int(10) unsigned NOT NULL DEFAULT '0',
MessageId varchar(255) NOT NULL DEFAULT '',
BounceInfo text,
BounceDate int(11) DEFAULT NULL,
PRIMARY KEY (SubmissionLogId),
KEY FormSubmissionId (FormSubmissionId),
KEY ReplyStatus (ReplyStatus),
KEY SentStatus (SentStatus),
KEY SentOn (SentOn),
KEY RepliedOn (RepliedOn),
KEY VerifyCode (VerifyCode),
KEY DraftId (DraftId),
KEY BounceDate (BounceDate),
KEY MessageId (MessageId)
);
CREATE TABLE Drafts (
DraftId int(11) NOT NULL AUTO_INCREMENT,
FormSubmissionId int(10) unsigned NOT NULL DEFAULT '0',
CreatedOn int(10) unsigned DEFAULT NULL,
CreatedById int(11) NOT NULL,
Message text,
PRIMARY KEY (DraftId),
KEY FormSubmissionId (FormSubmissionId),
KEY CreatedOn (CreatedOn),
KEY CreatedById (CreatedById)
);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.TO.USER', NULL, 1, 0, NULL, 'Core:Category', 'Admin Reply to User Form Submission', 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER', NULL, 1, 0, NULL, 'Core:Category', 'User Replied to It\'s Form Submission', 1);
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, FromUserId, Module, Description, Type) VALUES(DEFAULT, 'FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED', NULL, 1, 0, NULL, 'Core:Category', 'Form Submission Admin Reply Delivery Failure', 1);
ALTER TABLE ConfigurationValues
ADD HintLabel VARCHAR(255) NULL DEFAULT NULL,
ADD INDEX (HintLabel);
UPDATE ConfigurationValues SET HintLabel = 'la_hint_MemcacheServers' WHERE VariableName = 'MemcacheServers';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ModRewriteUrlEnding', '.html', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ModRewriteUrlEnding', 'select', '', '=+||/=+/||.html=+.html', 10.021, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ForceModRewriteUrlEnding', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_ForceModRewriteUrlEnding', 'checkbox', '', NULL, 10.022, 0, 0, 'la_hint_ForceModRewriteUrlEnding');
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Enable SEO-friendly URLs mode (MOD-REWRITE)'
WHERE Phrase = 'la_config_use_modrewrite' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Use MOD REWRITE';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'UseContentLanguageNegotiation', '0', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_UseContentLanguageNegotiation', 'checkbox', '', '', 10.023, 0, 0, NULL);
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'SessionCookieDomains', '', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsSession', 'la_config_SessionCookieDomains', 'textarea', '', 'rows="5" cols="40"', 20.021, 0, 0, NULL);
CREATE TABLE SiteDomains (
DomainId int(11) NOT NULL AUTO_INCREMENT,
DomainName varchar(255) NOT NULL DEFAULT '',
DomainNameUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
SSLUrl varchar(255) NOT NULL DEFAULT '',
SSLUrlUsesRegExp tinyint(4) NOT NULL DEFAULT '0',
AdminEmail varchar(255) NOT NULL DEFAULT '',
Country varchar(3) NOT NULL DEFAULT '',
PrimaryLanguageId int(11) NOT NULL DEFAULT '0',
Languages varchar(255) NOT NULL DEFAULT '',
PrimaryThemeId int(11) NOT NULL DEFAULT '0',
Themes varchar(255) NOT NULL DEFAULT '',
DomainIPRange text,
ExternalUrl varchar(255) NOT NULL DEFAULT '',
RedirectOnIPMatch tinyint(4) NOT NULL DEFAULT '0',
Priority int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (DomainId),
KEY DomainName (DomainName),
KEY DomainNameUsesRegExp (DomainNameUsesRegExp),
KEY SSLUrl (SSLUrl),
KEY SSLUrlUsesRegExp (SSLUrlUsesRegExp),
KEY AdminEmail (AdminEmail),
KEY Country (Country),
KEY PrimaryLanguageId (PrimaryLanguageId),
KEY Languages (Languages),
KEY PrimaryThemeId (PrimaryThemeId),
KEY Themes (Themes),
KEY ExternalUrl (ExternalUrl),
KEY RedirectOnIPMatch (RedirectOnIPMatch),
KEY Priority (Priority)
);
DELETE FROM Phrase WHERE Phrase = 'la_config_time_server';
DELETE FROM ConfigurationValues WHERE VariableName = 'Config_Server_Time';
UPDATE ConfigurationValues SET ValueList = NULL, DisplayOrder = 20.02 WHERE VariableName = 'Config_Site_Time';
UPDATE ConfigurationValues SET VariableValue = '' WHERE VariableName = 'Config_Site_Time' AND VariableValue = 14;
UPDATE Events SET AllowChangingSender = 1, AllowChangingRecipient = 1;
UPDATE Events SET Module = 'Core' WHERE Module LIKE 'Core:%';
DELETE FROM Permissions WHERE Permission LIKE 'in-portal:configuration_email%';
DELETE FROM Permissions WHERE Permission LIKE 'in-portal:user_email%';
DELETE FROM Phrase WHERE Phrase IN ('la_fld_FromToUser', 'la_col_FromToUser');
# ===== v 5.1.0-B2 =====
# ===== v 5.1.0-RC1 =====
UPDATE Phrase SET Module = 'Core' WHERE Phrase = 'la_fld_Group';
UPDATE PermissionConfig
SET
Description = REPLACE(Description, 'lu_PermName_', 'la_PermName_'),
ErrorMessage = REPLACE(ErrorMessage, 'lu_PermName_', 'la_PermName_');
UPDATE Phrase
SET
Phrase = REPLACE(Phrase, 'lu_PermName_', 'la_PermName_'),
PhraseKey = REPLACE(PhraseKey, 'LU_PERMNAME_', 'LA_PERMNAME_'),
PhraseType = 1
WHERE PhraseKey LIKE 'LU_PERMNAME_%';
UPDATE Phrase
SET
Phrase = 'la_no_permissions',
PhraseKey = 'LA_NO_PERMISSIONS',
PhraseType = 1
WHERE PhraseKey = 'LU_NO_PERMISSIONS';
UPDATE Phrase
SET PhraseType = 0
WHERE PhraseKey IN (
'LU_FERROR_FORGOTPW_NODATA', 'LU_FERROR_UNKNOWN_USERNAME', 'LU_FERROR_UNKNOWN_EMAIL'
);
DELETE FROM ConfigurationValues WHERE VariableName = 'Root_Name';
DELETE FROM Phrase WHERE PhraseKey = 'LA_PROMPT_ROOT_NAME';
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder - 0.01
WHERE ModuleOwner = 'In-Portal' AND `Section` = 'in-portal:configure_categories' AND DisplayOrder > 10.07;
# ===== v 5.1.0 =====
UPDATE Events SET Headers = NULL WHERE Headers = '';
UPDATE Events
SET MessageType = 'text'
WHERE Event = 'FORM.SUBMISSION.REPLY.TO.USER';
ALTER TABLE Forms
ADD ProcessUnmatchedEmails TINYINT NOT NULL DEFAULT '0' AFTER EnableEmailCommunication,
ADD INDEX (ProcessUnmatchedEmails);
ALTER TABLE FormSubmissions
ADD MessageId VARCHAR(255) NULL DEFAULT NULL AFTER Notes,
ADD INDEX (MessageId);
# ===== v 5.1.1-B1 =====
ALTER TABLE PortalUser ADD DisplayToPublic TEXT NULL;
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Comments'
WHERE PhraseKey = 'LA_FLD_COMMENTS';
ALTER TABLE Category
CHANGE `Type` `Type` INT(11) NOT NULL DEFAULT '1',
CHANGE `IsSystem` `Protected` TINYINT( 4 ) NOT NULL DEFAULT '0',
ADD INDEX ( `Protected` );
UPDATE Category SET `Type` = IF(`Protected` = 1, 2, 1);
UPDATE Category SET `Protected` = 1 WHERE ThemeId > 0;
ALTER TABLE Category CHANGE CachedDescendantCatsQty CachedDescendantCatsQty INT(11) NOT NULL DEFAULT '0';
ALTER TABLE Events CHANGE `Module` `Module` VARCHAR(40) NOT NULL DEFAULT 'Core';
ALTER TABLE Language
CHANGE DateFormat DateFormat VARCHAR(50) NOT NULL DEFAULT 'm/d/Y',
CHANGE TimeFormat TimeFormat VARCHAR(50) NOT NULL DEFAULT 'g:i:s A',
CHANGE DecimalPoint DecimalPoint VARCHAR(10) NOT NULL DEFAULT '.',
CHANGE Charset Charset VARCHAR(20) NOT NULL DEFAULT 'utf-8';
ALTER TABLE ItemReview CHANGE Rating Rating TINYINT(3) UNSIGNED NOT NULL DEFAULT '0';
UPDATE PortalUser SET tz = NULL;
ALTER TABLE Category
CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL,
CHANGE ModifiedById ModifiedById INT(11) NULL DEFAULT NULL;
UPDATE Category SET CreatedById = NULL WHERE CreatedById = 0;
UPDATE Category SET ModifiedById = NULL WHERE ModifiedById = 0;
ALTER TABLE ItemFiles CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
ALTER TABLE Drafts CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
UPDATE Drafts SET CreatedById = NULL WHERE CreatedById = 0;
ALTER TABLE ItemReview CHANGE CreatedById CreatedById INT(11) NULL DEFAULT NULL;
# ===== v 5.1.1-B2 =====
UPDATE Phrase SET `Module` = 'Core' WHERE PhraseKey = 'LU_SECTION_FILES';
# ===== v 5.1.1-RC1 =====
ALTER TABLE PortalUser
CHANGE Phone Phone VARCHAR(255) NOT NULL DEFAULT '',
CHANGE City City VARCHAR(255) NOT NULL DEFAULT '',
CHANGE Street Street VARCHAR(255) NOT NULL DEFAULT '',
CHANGE Zip Zip VARCHAR(20) NOT NULL DEFAULT '',
CHANGE ip ip VARCHAR(20) NOT NULL DEFAULT '';
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Use Cron to run Agents'
WHERE PhraseKey = 'LA_USECRONFORREGULAREVENT' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Use Cron for Running Regular Events';
# ===== v 5.1.1 =====
# ===== v 5.1.2-B1 =====
DROP TABLE EmailSubscribers;
DROP TABLE IgnoreKeywords;
DROP TABLE IgnoreKeywords;
ALTER TABLE PermissionConfig DROP ErrorMessage;
# ===== v 5.1.2-B2 =====
# ===== v 5.1.2-RC1 =====
DROP TABLE Stylesheets;
DROP TABLE StylesheetSelectors;
DROP TABLE SysCache;
DROP TABLE TagAttributes;
DROP TABLE TagLibrary;
DELETE FROM Phrase WHERE PhraseKey IN (
'LA_FLD_STYLESHEETID', 'LA_PROMPT_STYLESHEET', 'LA_TAB_STYLESHEETS', 'LA_TITLE_ADDING_STYLESHEET',
'LA_TITLE_EDITING_STYLESHEET', 'LA_TITLE_NEW_STYLESHEET', 'LA_TITLE_STYLESHEETS', 'LA_TOOLTIP_NEWSTYLESHEET',
'LA_COL_SELECTORNAME', 'LA_COL_BASEDON', 'LA_FLD_SELECTORBASE', 'LA_FLD_SELECTORDATA', 'LA_FLD_SELECTORID',
'LA_FLD_SELECTORNAME'
);
# ===== v 5.1.2 =====
# ===== v 5.1.3-B1 =====
ALTER TABLE FormSubmissions CHANGE ReferrerURL ReferrerURL TEXT NULL;
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UserEmailActivationTimeout', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_config_UserEmailActivationTimeout', 'text', NULL, NULL, 10.051, 0, 0, NULL);
# ===== v 5.1.3-B2 =====
ALTER TABLE Modules ADD AppliedDBRevisions TEXT NULL;
# ===== v 5.1.3-RC1 =====
# ===== v 5.1.3-RC2 =====
UPDATE Events
SET l<%PRIMARY_LANGUAGE%>_Subject = 'New User Registration (<inp2:u_Field name="Login"/><inp2:m_if check="m_GetConfig" name="User_Allow_New" equals_to="4"> - Activation Email</inp2:m_if>)'
WHERE Event = 'USER.ADD.PENDING' AND `Type` = 0 AND l<%PRIMARY_LANGUAGE%>_Subject LIKE '%<inp2:m_if check="m_GetConfig" name="User_Allow_New" equals_to="4"> - Activation Email</inp2:m_if>)%';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'MaxUserName', '', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_text_min_username', 'text', '', 'style="width: 50px;"', 10.03, 2, 0, NULL);
UPDATE ConfigurationValues
SET GroupDisplayOrder = 1, ValueList = 'style="width: 50px;"'
WHERE VariableName = 'Min_UserName';
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'User name length (min - max)'
WHERE PhraseKey = 'LA_TEXT_MIN_USERNAME' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Minimum user name length';
# ===== v 5.1.3 =====
UPDATE PortalUser
SET Modified = NULL;
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:site_domains.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.delete', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:country_states.view', 11, 1, 1, 0);
# ===== v 5.2.0-B1 =====
ALTER TABLE PortalUser
ADD UserType TINYINT NOT NULL,
ADD PrimaryGroupId INT NULL,
ADD INDEX (UserType);
UPDATE PortalUser u
SET u.PrimaryGroupId = (SELECT ug.GroupId FROM <%TABLE_PREFIX%>UserGroup ug WHERE ug.PortalUserId = u.PortalUserId AND ug.PrimaryGroup = 1);
UPDATE PortalUser u SET u.UserType = IF(u.PrimaryGroupId = 11, 1, 0);
ALTER TABLE UserGroup DROP PrimaryGroup;
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE `ModuleOwner` = 'In-Portal:Users' AND `Section` = 'in-portal:configure_users' AND DisplayOrder BETWEEN 10.12 AND 20.00;
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'User_AdminGroup', '11', 'In-Portal:Users', 'in-portal:configure_users', 'la_title_General', 'la_users_admin_group', 'select', NULL, '0=lu_none||<SQL+>SELECT GroupId as OptionValue, Name as OptionName FROM <PREFIX>PortalGroup WHERE Enabled=1 AND Personal=0</SQL>', 10.12, 0, 1, NULL);
ALTER TABLE PortalUser
DROP INDEX Login,
ADD INDEX Login (Login);
ALTER TABLE PortalUser CHANGE Login Login VARCHAR(255) NOT NULL;
ALTER TABLE PortalUser ADD OldStyleLogin TINYINT NOT NULL;
UPDATE PortalUser
SET OldStyleLogin = 1
WHERE (Login <> '') AND (Login NOT REGEXP '^[A-Z0-9_\\-\\.]+$');
DELETE FROM Events WHERE Event = 'USER.PSWD';
UPDATE Phrase
SET l<%PRIMARY_LANGUAGE%>_Translation = 'Your password has been reset.'
WHERE PhraseKey = 'LU_TEXT_FORGOTPASSHASBEENRESET' AND l<%PRIMARY_LANGUAGE%>_Translation = 'Your password has been reset. The new password has been sent to your e-mail address. You may now login with the new password.';
ALTER TABLE PortalUser
DROP MinPwResetDelay,
DROP PassResetTime,
CHANGE PwResetConfirm PwResetConfirm VARCHAR(255) NOT NULL;
UPDATE PortalUser SET PwRequestTime = NULL WHERE PwRequestTime = 0;
ALTER TABLE Category
ADD DirectLinkEnabled TINYINT NOT NULL DEFAULT '1',
ADD DirectLinkAuthKey VARCHAR(20) NOT NULL;
UPDATE Category
SET DirectLinkAuthKey = SUBSTRING( MD5( CONCAT(CategoryId, ':', ParentId, ':', l<%PRIMARY_LANGUAGE%>_Name, ':b38') ), 1, 20)
WHERE DirectLinkAuthKey = '';
INSERT INTO ConfigurationValues VALUES(DEFAULT, 'ExcludeTemplateSectionsFromSearch', '0', 'In-Portal', 'in-portal:configure_categories', 'la_title_General', 'la_config_ExcludeTemplateSectionsFromSearch', 'checkbox', '', '', 10.15, 0, 0, NULL);
ALTER TABLE Agents
ADD SiteDomainLimitation VARCHAR(255) NOT NULL,
ADD INDEX (SiteDomainLimitation);
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE VariableName = 'HTTPAuthBypassIPs';
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE ModuleOwner = 'In-Portal' AND `Section` = 'in-portal:configure_advanced' AND Heading = 'la_section_SettingsAdmin' AND DisplayOrder > 40.06;
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'StickyGridSelection', '1', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsAdmin', 'la_config_StickyGridSelection', 'radio', '', '1=la_Yes||0=la_No', 40.07, 0, 0, NULL);
ALTER TABLE Forms
ADD SubmitNotifyEmail VARCHAR(255) NOT NULL DEFAULT '' AFTER UseSecurityImage;
ALTER TABLE FormFields
ADD UploadExtensions VARCHAR(255) NOT NULL DEFAULT '' AFTER Validation,
ADD UploadMaxSize INT NULL AFTER UploadExtensions;
ALTER TABLE Language ADD SynchronizationModes VARCHAR(255) NOT NULL DEFAULT '';
ALTER TABLE PortalUser
CHANGE ip IPAddress VARCHAR(15) NOT NULL,
ADD IPRestrictions TEXT NULL;
ALTER TABLE PortalGroup ADD IPRestrictions TEXT NULL;
INSERT INTO Events (EventId, Event, ReplacementTags, Enabled, FrontEndOnly, Module, Description, Type, AllowChangingSender, AllowChangingRecipient) VALUES(DEFAULT, 'ROOT.RESET.PASSWORD', NULL, 1, 0, 'Core', 'Root Reset Password', 1, 1, 0);
ALTER TABLE Skins ADD DisplaySiteNameInHeader TINYINT(1) NOT NULL DEFAULT '1';
DELETE FROM PersistantSessionData WHERE VariableName LIKE 'formsubs_Sort%' AND VariableValue = 'FormFieldId';
ALTER TABLE ItemReview
ADD HelpfulCount INT NOT NULL ,
ADD NotHelpfulCount INT NOT NULL;
ALTER TABLE PermissionConfig ADD IsSystem TINYINT(1) NOT NULL DEFAULT '0';
UPDATE PermissionConfig SET IsSystem = 1;
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.view', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.add', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.edit', 11, 1, 1, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:permission_types.delete', 11, 1, 1, 0);
ALTER TABLE Agents
ADD Timeout INT(10) UNSIGNED NULL AFTER RunTime,
ADD LastTimeoutOn int(10) unsigned default NULL AFTER Timeout,
ADD INDEX (Timeout);
CREATE TABLE CurlLog (
LogId int(11) NOT NULL AUTO_INCREMENT,
Message varchar(255) NOT NULL,
PageUrl varchar(255) NOT NULL,
RequestUrl varchar(255) NOT NULL,
PortalUserId int(11) NOT NULL,
SessionKey int(11) NOT NULL,
IsAdmin tinyint(4) NOT NULL,
PageData text,
RequestData text,
ResponseData text,
RequestDate int(11) DEFAULT NULL,
ResponseDate int(11) DEFAULT NULL,
ResponseHttpCode int(11) NOT NULL,
CurlError varchar(255) NOT NULL,
PRIMARY KEY (LogId),
KEY Message (Message),
KEY PageUrl (PageUrl),
KEY RequestUrl (RequestUrl),
KEY PortalUserId (PortalUserId),
KEY SessionKey (SessionKey),
KEY IsAdmin (IsAdmin),
KEY RequestDate (RequestDate),
KEY ResponseDate (ResponseDate),
KEY ResponseHttpCode (ResponseHttpCode),
KEY CurlError (CurlError)
);
DELETE FROM ConfigurationValues WHERE VariableName = 'Site_Path';
UPDATE ConfigurationValues
SET DisplayOrder = DisplayOrder + 0.01
WHERE `Section` = 'in-portal:configure_advanced' AND Heading = 'la_section_SettingsWebsite';
+
+
+UPDATE ItemTypes
+SET TitleField = 'Username'
+WHERE SourceTable = 'PortalUser' AND TitleField = 'Login';
+
+UPDATE SearchConfig
+SET FieldName = 'Username'
+WHERE TableName = 'PortalUser' AND FieldName = 'Login';
+
+ALTER TABLE PortalUser DROP INDEX Login;
+ALTER TABLE PortalUser CHANGE Login Username VARCHAR(255) NOT NULL;
+ALTER TABLE PortalUser ADD INDEX Username (Username);
+
+UPDATE Events
+SET
+ l<%PRIMARY_LANGUAGE%>_Subject = REPLACE(l<%PRIMARY_LANGUAGE%>_Subject, 'name="Login"', 'name="Username"'),
+ l<%PRIMARY_LANGUAGE%>_Body = REPLACE(l<%PRIMARY_LANGUAGE%>_Body, 'name="Login"', 'name="Username"');
+
+DELETE FROM PersistantSessionData
+WHERE (VariableName LIKE 'u%]columns_.') OR (VariableName LIKE 'u%_sort%');
+
+DELETE FROM Phrase
+WHERE Phrase = 'LU_FLD_LOGIN';
+
+UPDATE BanRules
+SET ItemField = 'Username'
+WHERE ItemField = 'Login';
\ No newline at end of file
Index: branches/5.2.x/core/install/english.lang
===================================================================
--- branches/5.2.x/core/install/english.lang (revision 14725)
+++ branches/5.2.x/core/install/english.lang (revision 14726)
@@ -1,1874 +1,1874 @@
<LANGUAGES Version="4">
<LANGUAGE Encoding="base64" PackName="English" LocalName="English" DateFormat="m/d/Y" TimeFormat="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">
<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_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_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_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_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_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_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_ItemPrefix" Module="Core" Type="1">SXRlbSBQcmVmaXg=</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_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_AllowAdminConsoleInterfaceChange" Module="Core" Type="1">QWxsb3cgQWRtaW4gdG8gY2hhbmdlIEFkbWluIENvbnNvbGUgSW50ZXJmYWNl</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_CacheHandler" Module="Core" Type="1">Q2FjaGluZyBFbmdpbmU=</PHRASE>
<PHRASE Label="la_config_CatalogPreselectModuleTab" Module="Core" Type="1">U3dpdGNoIENhdGFsb2cgdGFicyBiYXNlZCBvbiBNb2R1bGU=</PHRASE>
<PHRASE Label="la_config_CheckStopWords" Module="Core" Type="1">Q2hlY2sgU3RvcCBXb3Jkcw==</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_DefaultDesignTemplate" Module="Core" Type="1">RGVmYXVsdCBEZXNpZ24gVGVtcGxhdGU=</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_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">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_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_MaxImageCount" Module="Core" Type="1">TWF4aW11bSBudW1iZXIgb2YgaW1hZ2Vz</PHRASE>
<PHRASE Label="la_config_MemcacheServers" Module="Core" Type="1">TWVtY2FjaGUgU2VydmVycw==</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_PerpageReviews" Module="Core" Type="1">Q29tbWVudHMgcGVyIHBhZ2U=</PHRASE>
<PHRASE Label="la_config_QuickCategoryPermissionRebuild" Module="Core" Type="1">UXVpY2sgU2VjdGlvbiBQZXJtaXNzaW9uIFJlYnVpbGQ=</PHRASE>
<PHRASE Label="la_config_RecycleBinFolder" Module="Core" Type="1">IlJlY3ljbGUgQmluIiBTZWN0aW9uSWQ=</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_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_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_DraftAvailableFrom" Module="Core" Type="1">RHJhZnQgQXZhaWxhYmxl</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_FileTooLarge" Module="Core" Type="1">RmlsZSBpcyB0b28gbGFyZ2U=</PHRASE>
<PHRASE Label="la_error_GroupNotFound" Module="Core" Type="1">Z3JvdXAgbm90IGZvdW5k</PHRASE>
<PHRASE Label="la_error_InvalidFileFormat" Module="Core" Type="1">SW52YWxpZCBGaWxlIEZvcm1hdA==</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_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">QWRkcmVzcyBMaW5lIDE=</PHRASE>
<PHRASE Label="la_fld_AddressLine2" Module="Core" Type="1">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_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_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_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">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">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">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_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_CSS" Module="Core" Type="1">Q1NTIFRlbXBsYXRl</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">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_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_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_ExportEmailEvents" Module="Core" Type="1">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">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_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">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_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_FrontRegistration" Module="Core" Type="1" Column="QWxsb3cgUmVnaXN0cmF0aW9u">QWxsb3cgUmVnaXN0cmF0aW9uIG9uIEZyb250LWVuZA==</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_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_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_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_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_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_OccuredOn" Module="Core" Type="1" Column="T2NjdXJlZCBPbg==">T2NjdXJlZCBPbg==</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_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">VGl0bGUgKE9uIFBhZ2Up</PHRASE>
<PHRASE Label="la_fld_PageExpiration" Module="Core" Type="1">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_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_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_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_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_ReviewText" Module="Core" Type="1" Column="Q29tbWVudA==">Q29tbWVudA==</PHRASE>
<PHRASE Label="la_fld_RuleType" Module="Core" Type="1" Column="UnVsZSBUeXBl">UnVsZSBUeXBl</PHRASE>
<PHRASE Label="la_fld_RunInterval" Module="Core" Type="1" Column="UnVuIEludGVydmFs">UnVuIEludGVydmFs</PHRASE>
<PHRASE Label="la_fld_RunMode" Module="Core" Type="1" Column="UnVuIE1vZGU=">UnVuIE1vZGU=</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_SearchTerm" Module="Core" Type="1" Column="U2VhcmNoIFRlcm0=">U2VhcmNoIFRlcm0=</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_ShortIsoCode" Module="Core" Type="1" Column="U2hvcnQgSVNPIENvZGU=">U2hvcnQgSVNPIENvZGU=</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" 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">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_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_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_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_TextAlign" Module="Core" Type="1">VGV4dCBBbGlnbg==</PHRASE>
<PHRASE Label="la_fld_TextDecoration" Module="Core" Type="1">VGV4dCBEZWNvcmF0aW9u</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_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_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">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_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_DomainIPRange" Module="Core" Type="1">U2luZ2xlIElQLCBJUCByYW5nZSwgU3VibmV0IG9yIGhvc3RuYW1lIHJlY29yZCBwZXIgbGluZSAoZm9ybWF0czogMS4yLjMuNCBvciAxLjIuMy4zMi0xLjIuMy41NCBvciAxLjIuMy4zMi8yNyBvciAxLjIuMy4zMi8yNTUuMjU1LjI1NS4yMjQgb3Igd3d3LmluLXBvcnRhbC5jb20p</PHRASE>
<PHRASE Label="la_hint_ExportEmailEvents" Module="Core" Type="1">U2luZ2xlIEVtYWlsIEV2ZW50IHBlciBsaW5lIChmb3JtYXRzOiBVU0VSLkFERCwgT1JERVIuU1VCTUlUKQ==</PHRASE>
<PHRASE Label="la_hint_ExportPhrases" Module="Core" Type="1">U2luZ2xlIFBocmFzZSBMYWJlbCBwZXIgbGluZSAoZm9ybWF0czogbGFfU2FtcGxlTGFiZWwsIGx1X0Zyb250RW5kTGFiZWwp</PHRASE>
<PHRASE Label="la_hint_ForceModRewriteUrlEnding" Module="Core" Type="1">VXNlciB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVkaXJlY3RlZCB0byB0aGUgc2VsZWN0ZWQgVXJsIEVuZGluZyBpbiBjYXNlIHdoZW4gY3VycmVudCBwYWdlIHVybCBoYXMgYSBkaWZmZXJlbnQgZW5kaW5n</PHRASE>
<PHRASE Label="la_hint_ImageFiles" Module="Core" Type="1">SW1hZ2UgRmlsZXM=</PHRASE>
<PHRASE Label="la_hint_MemcacheServers" Module="Core" Type="1">TXVsdGlwbGUgTWVtY2FjaGVkIHNlcnZlcnMgY2FuIGJlIGxpc3RlZCBzZXBhcmF0ZWQgYnkgc2VtaS1jb2xvbiAoOykuIEZvciBleGFtcGxlLCAxOTIuMTY4LjEuMToxMTIxOzE5Mi4xNjguMS4yOjExMjE7MTkyLjE2OC4xLjM6MTEyMQ==</PHRASE>
<PHRASE Label="la_hint_PageExpiration" Module="Core" Type="1">SG93IHNvb24gKGluIHNlY29uZHMpIHRoZSBzZWN0aW9uIGNhY2hlIHNob3VsZCBhdXRvLWV4cGlyZSBhZnRlciBpdCdzIGNyZWF0aW9uLiBCeSBkZWZhdWx0IHN5c3RlbSB0ZW5kcyB0byByZWJ1aWxkIHRoZSBjYWNoZSBvbmx5IHdoZW4gaXQncyBwcm9wZXJ0aWVzIG9yIGVsZW1lbnRzIGhhdmUgY2hhbmdlZC4=</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_SSLUrl" Module="Core" Type="1">aHR0cHM6Ly93d3cuZG9tYWluLmNvbS9wYXRo</PHRASE>
<PHRASE Label="la_hint_SystemToolsCacheKeys" Module="Core" Type="1">Q2FjaGUgS2V5KHMp</PHRASE>
<PHRASE Label="la_hint_SystemToolsClearTemplatesCache" Module="Core" Type="1">PHVsPg0KICA8bGk+RGVsZXRlcyBhbGwgY29tcGlsZWQgdGVtcGxhdGVzIGZyb20gQWRtaW4gQ29uc29sZSBhbmQgRnJvbnQtZW5kIHRoZW1lcy48L2xpPg0KICA8bGk+UmVjb21tZW5kZWQgZm9yIHRoZSBtYWludGVuYW5jZSBwdXJwb3Nlcywgc2luY2UgZG9lcyBub3QgcHJvdmlkZSBhbnkgYWR2YW50YWdlcyBleGNlcHQgZm9yIHRlbXBvcmFyeSBsb3dlcmluZyB1c2FnZSBvZiB0aGUgZGlzayBzcGFjZS4gQWxsIHRlbXBsYXRlcyB3aWxsIGJlIGF1dG9tYXRpY2FsbHkgcmVjb21waWxlZCBhdCB0aGUgdGltZSBvZiB2aXNpdC48L2xpPg0KPC91bD4=</PHRASE>
<PHRASE Label="la_hint_SystemToolsDatabaseCache" Module="Core" Type="1">ZGF0YWJhc2UgY2FjaGU=</PHRASE>
<PHRASE Label="la_hint_SystemToolsDeploy" Module="Core" Type="1">PHVsPg0KPGxpPlRoaXMgZGVwbG95IHNjcmlwdCB3aWxsIGFwcGx5IGFsbCBEYXRhYmFzZSBDaGFuZ2VzIHN0b3JlZCBpbiA8Yj48dT5bbW9kdWxlXS9wcm9qZWN0X3VwZ3JhZGVzLnNxbDwvdT48L2I+IHRvIHRoZSBjdXJyZW50IHdlYnNpdGUgYW5kIHNhdmUgYXBwbGllZCBSZXZpc2lvbnMgaW4gQXBwbGllZERCUmV2aXNpb25zLjwvbGk+DQo8bGk+VGhpcyBkZXBsb3kgc2NyaXB0IHdpbGwgY3JlYXRlIGFsbCBuZXcgbGFuZ3VhZ2UgcGhyYXNlcyBieSByZS1pbXBvcnRpbmcgPGI+PHU+Y3VzdG9tL2luc3RhbGwvZW5nbGlzaC5sYW5nPC91PjwvYj4gZmlsZS48L2xpPg0KPGxpPlRoaXMgZGVwbG95IHNjcmlwdCB3aWxsIHJlc2V0IGFsbCBjYWNoZXMgYXQgb25jZTwvbGk+DQo8L3VsPg==</PHRASE>
<PHRASE Label="la_hint_SystemToolsKeyName" Module="Core" Type="1">PHVsPg0KICA8bGk+TmFtZSBvZiB0aGUgS2V5IHVzZWQgdG8gZ2V0IG9yIHNldCB0aGUgZGF0YSAodmFsdWUpIGluIHRoZSBtZW1vcnkgY2FjaGUgKDxzdHJvbmc+PGk+a0FwcGxpY2F0aW9uOjpzZXRDYWNoZTwvaT48L3N0cm9uZz4gYW5kIDxzdHJvbmc+PGk+a0FwcGxpY2F0aW9uOjpnZXRDYWNoZTwvaT48L3N0cm9uZz4gbWV0aG9kcykuPC9saT4NCjwvdWw+</PHRASE>
<PHRASE Label="la_hint_SystemToolsKeyValue" Module="Core" Type="1">Q3VycmVudCB2YWx1ZSBvciBhIG5ldyB2YWx1ZSAoZm9yIHNldHRpbmcpIG9mIHRoZSBrZXkgbmFtZSBzcGVjaWZpZWQgYWJvdmUu</PHRASE>
<PHRASE Label="la_hint_SystemToolsLocateUnitConfigFile" Module="Core" Type="1">PHVsPg0KICA8bGk+U2hvd3MgdGhlIGxvY2F0aW9uIG9mIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGUsIGFzc29jaWF0ZWQgd2l0aCB0aGUgZ2l2ZW4gPHN0cm9uZz48aT5Vbml0IENvbmZpZyBQcmVmaXg8L2k+PC9zdHJvbmc+IChpZS4gImFkbSIsICJ1IiwgImxhbmciIGFuZCBvdGhlcnMpLjwvbGk+DQo8L3VsPg==</PHRASE>
<PHRASE Label="la_hint_SystemToolsMemoryCache" Module="Core" Type="1">bWVtb3J5IGNhY2hl</PHRASE>
<PHRASE Label="la_hint_SystemToolsRebuildMultilingualFields" Module="Core" Type="1">PHVsPg0KICA8bGk+U2NhbnMgYW5kIGFkZHMgbWlzc2luZyBkYXRhYmFzZSB0YWJsZSBjb2x1bW5zIChmb3JtYXQgPHN0cm9uZz48aT4ibCZsdDtOJmd0O19GaWVsZE5hbWUiPC9pPjwvc3Ryb25nPiwgd2hlcmUgTiBpcyBhIExhbmd1YWdlSWQpIHRvIHN0b3JlIHRoZSBkYXRhIGZvciB0cmFuc2xhdGFibGUgZmllbGRzLiBUaGlzIGFjdGlvbiBpcyBwZXJmb3JtZWQgYXV0b21hdGljYWxseSB3aGVuZXZlciBhIG5ldyBMYW5ndWFnZSBpcyBjcmVhdGVkIHZpYSBBZG1pbiBDb25zb2xlLjwvbGk+DQogIDxsaT5Vc2UgdGhpcyAiUmVidWlsZCIgb3B0aW9uIG9ubHkgZm9yIHN5bmNocm9uaXphdGlvbiBvZiBkYXRhYmFzZSB0YWJsZSBjb2x1bW5zIHdpdGggbmV3bHkgYWRkZWQgbXVsdGlsaW5ndWFsIGZpZWxkcyAoa011bHRpTGFuZ3VhZ2UgZm9ybWF0dGVyKSBkZWZpbmVkIHRocm91Z2ggPHN0cm9uZz48aT5Vbml0IENvbmZpZzwvaT48L3N0cm9uZz4gZmlsZXMuPC9saT4NCjwvdWw+</PHRASE>
<PHRASE Label="la_hint_SystemToolsRecompileTemplates" Module="Core" Type="1">PHVsPg0KICA8bGk+Q29tcGxldGVseSByZWNvbXBpbGVzIHRoZSB0ZW1wbGF0ZXMgZm9yIGFsbCBlbmFibGVkIEZyb250LWVuZCB0aGVtZXMgYXMgd2VsbCBhcyBBZG1pbiBDb25zb2xlIHRlbXBsYXRlcyBmb3IgYWxsIGxvYWRlZCBtb2R1bGVzLjwvbGk+DQogIDxsaT5BZGRpdGlvbmFsbHksIGNoZWNrcyBmb3IgdGhlIHN5bnRheCBvZiBhbGwgPHN0cm9uZz48aT4mbHQ7aW5wMjouLi4vJmd0OzwvaT48L3N0cm9uZz4gdGFncyBhY3Jvc3MgdGhlIEluLVBvcnRhbCBpbnN0YWxsYXRpb24uPC9saT4NCiAgPGxpPlRoaXMgYWN0aW9uIGlzIG5ldmVyIHBlcmZvcm1lZCBhdXRvbWF0aWNhbGx5LiBIb3dldmVyLCBhbGwgbmV3bHkgbW9kaWZpZWQgdGVtcGxhdGVzIHdpbGwgYmUgYXV0b21hdGljYWxseSByZWNvbXBpbGVkIGJ5IHRoZSBzeXN0ZW0gYXQgdGhlIHRpbWUgb2YgdmlzaXQuPC9saT4NCjwvdWw+</PHRASE>
<PHRASE Label="la_hint_SystemToolsRefreshThemeFiles" Module="Core" Type="1">PHVsPg0KICA8bGk+U2NhbnMgZm9yIG5ld2x5IGFkZGVkIEZyb250LWVuZCBUaGVtZSB0ZW1wbGF0ZXMgYWNyb3NzIGFsbCA8c3Ryb25nPjxpPmVuYWJsZWQ8L2k+PC9zdHJvbmc+IHRoZW1lcy4gVGhpcyBhY3Rpb24gaXMgcGVyZm9ybWVkIGF1dG9tYXRpY2FsbHkgd2hlbiBhIG5ldyB0aGVtZSBpcyBhZGRlZCBvciBleGlzdGluZyB0aGVtZSBpcyBlbmFibGVkLjwvbGk+DQogIDxsaT5BZGRpdGlvbmFsbHksIGRlbGV0ZXMgYWxsIGNvbXByZXNzZWQgYW5kIGNhY2hlZCBKYXZhc2NyaXB0L0NTUyBmaWxlcyAoLmpzIC5jc3MpIGxvYWRlZCB1c2luZyA8c3Ryb25nPjxpPiZsdDtpbnAyOm1fQ29tcHJlc3MgLi4uLyZndDs8L2k+PC9zdHJvbmc+IHRhZy48L2xpPg0KICA8bGk+VGhpcyBmdW5jdGlvbiBpcyBhbHNvIGF2YWlsYWJsZSBhcyBhICJSZWZyZXNoIiBidXR0b24gaW4gdGhlIFRoZW1lcyBzZWN0aW9uIHRvb2xiYXIgaW4gQWRtaW4gQ29uc29sZS48L2xpPg0KICA8bGk+VGhpcyBvcHRpb24gc2hvdWxkIGJlIHVzZWQgaW4gY2FzZSB3aGVuICI0MDQgTm90IEZvdW5kIiBwYWdlIGlzIHNob3duIGluc3RlYWQgb2YgZXhwZWN0ZWQgbmV3bHkgYWRkZWQgcGFnZSBvciB0ZW1wbGF0ZS48L2xpPg0KPC91bD4=</PHRASE>
<PHRASE Label="la_hint_SystemToolsResetAdminConsoleSections" Module="Core" Type="1">PHVsPg0KICA8bGk+UmVzZXRzIHRoZSBjYWNoZSBvZiBBZG1pbiBDb25zb2xlIHNlY3Rpb25zIChsZWZ0IG1lbnUpLiBUaGUgZGVmaW5pdGlvbnMgb2Ygc2VjdGlvbnMgYXJlIHJlYWQgYW5kIGNvbGxlY3RlZCBmcm9tIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIHRoYXQgYWxyZWFkeSBiZWVuIHNjYW5uZWQgYW5kIGNhY2hlZCBieSB0aGUgc3lzdGVtLjwvbGk+DQogIDxsaT5Vc2UgdGhpcyByZXNldCBvcHRpb24gaWYgYSBuZXdseSBhZGRlZCBzZWN0aW9uIGRvZXNuJ3QgYXBwZWFyIGluIHRoZSBsZWZ0IEFkbWluIENvbnNvbGUgbWVudS48L2xpPg0KPC91bD4=</PHRASE>
<PHRASE Label="la_hint_SystemToolsResetAllKeys" Module="Core" Type="1">PHVsPg0KICA8bGk+UmVzZXRzIDxzdHJvbmc+PGk+QWxsIERhdGE8L2k+PC9zdHJvbmc+IHN0b3JlZCBpbiB0aGUgTWVtb3J5IENhY2hlLCBpbmNsdWRpbmcgYnV0IG5vdCBsaW1pdGVkIHRvIFN5c3RlbSBEYXRhIGFuZCBEYXRhYmFzZSBJdGVtcy48L2xpPg0KICA8bGk+VXNlIHdpdGggY2F1dGlvbiBkdWUgdG8gcG9zc2liaWxpdHkgb2YgbG9uZyBleGVjdXRpb24gdGltZS48L2xpPg0KPC91bD4=</PHRASE>
<PHRASE Label="la_hint_SystemToolsResetConfigsAndParsedData" Module="Core" Type="1">PHVsPg0KICA8bGk+U2NhbnMgPHN0cm9uZz48aT4iY29yZSI8L2k+PC9zdHJvbmc+IGFuZCA8c3Ryb25nPjxpPiJtb2R1bGVzIjwvaT48L3N0cm9uZz4gZm9sZGVycyB0byBjYWNoZSB0aGUgbG9jYXRpb24gb2YgYWxsIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzLiBUaGUgZXhlY3V0aW9uIHRpbWUgZGVwZW5kcyBvbiB0aGUgbnVtYmVyIG9mIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIGZvdW5kLjwvbGk+DQogIDxsaT5SZXNldHMgdmFyaW91cyBjYWNoZWQgc3lzdGVtIGRhdGEgc3VjaCBhcyBkZWZpbmVkIFBIUCBDbGFzc2VzIChtYXBwaW5nIGJldHdlZW4gdGhlIGNsYXNzIG5hbWUgYW5kIHBoeXNpY2FsIGZpbGVuYW1lIGFuZCBsb2NhdGlvbiBvZiB0aGUgY2xhc3MpLCBIb29rcywgQWdlbnRzLCBDYWNoZWQgQ29uZmlndXJhdGlvbiBWYXJpYWJsZXMsIFJlcGxhY2VtZW50IFRlbXBsYXRlcywgUmV3cml0ZSBMaXN0ZW5lcnMgYW5kIExvYWRlZCBNb2R1bGVzLiBEYXRhIGlzIHJlYWQgYW5kIGNvbGxlY3RlZCBmcm9tIDxzdHJvbmc+PGk+VW5pdCBDb25maWc8L2k+PC9zdHJvbmc+IGZpbGVzIHRoYXQgYWxyZWFkeSBiZWVuIHNjYW5uZWQgYW5kIGNhY2hlZCBieSB0aGUgc3lzdGVtLjwvbGk+DQogIDxsaT5EZWxldGVzIGNvbXBpbGVkIHNraW5zIGZvciBBZG1pbiBDb25zb2xlIChjc3MgZmlsZXMpLjwvbGk+DQo8L3VsPg==</PHRASE>
<PHRASE Label="la_hint_SystemToolsResetModRewriteCache" Module="Core" Type="1">PHVsPg0KICA8bGk+RGVsZXRlcyB0aGUgbWFwcGluZyBiZXR3ZWVuIHRoZSBGcm9udC1lbmQgVVJMcyBhbmQgYWN0dWFsIFRoZW1lIFRlbXBsYXRlcy4gVGhpcyBtYXBwaW5nIGlzIHVwZGF0ZWQgYXV0b21hdGljYWxseSwgd2hlbiB0aGUgd2Vic2l0ZSBTdHJ1Y3R1cmUgb3IgU2VjdGlvbnMgYXJlIGNoYW5nZWQuPC9saT4NCiAgPGxpPlVzZSB0aGlzIG9wdGlvbiBvbmx5IGluIGNhc2UgaWYgTW9kUmV3cml0ZSBtb2RlIGlzIGVuYWJsZWQgYW5kIGRpc3BsYXllZCBwYWdlIGRpZmZlcnMgZnJvbSB0aGUgcGFnZSB0aGF0IGl0IHNob3VsZCBiZSwgd2hlbiBnaXZlbiBVUkwgaXMgdmlzaXRlZC48L2xpPg0KPC91bD4=</PHRASE>
<PHRASE Label="la_hint_SystemToolsResetParsedCachedData" Module="Core" Type="1">PHVsPg0KICA8bGk+UmVzZXRzIHZhcmlvdXMgY2FjaGVkIHN5c3RlbSBkYXRhIHN1Y2ggYXMgZGVmaW5lZCBQSFAgQ2xhc3NlcyAobWFwcGluZyBiZXR3ZWVuIHRoZSBjbGFzcyBuYW1lIGFuZCBwaHlzaWNhbCBmaWxlbmFtZSBhbmQgbG9jYXRpb24gb2YgdGhlIGNsYXNzKSwgSG9va3MsIEFnZW50cywgQ2FjaGVkIENvbmZpZ3VyYXRpb24gVmFyaWFibGVzLCBSZXBsYWNlbWVudCBUZW1wbGF0ZXMsIFJld3JpdGUgTGlzdGVuZXJzIGFuZCBMb2FkZWQgTW9kdWxlcy4gRGF0YSBpcyByZWFkIGFuZCBjb2xsZWN0ZWQgZnJvbSA8c3Ryb25nPjxpPlVuaXQgQ29uZmlnPC9pPjwvc3Ryb25nPiBmaWxlcyB0aGF0IGFscmVhZHkgYmVlbiBzY2FubmVkIGFuZCBjYWNoZWQgYnkgdGhlIHN5c3RlbS48L2xpPg0KPC91bD4=</PHRASE>
<PHRASE Label="la_hint_SystemToolsResetSMSMenuCache" Module="Core" Type="1">PHVsPg0KICA8bGk+RGVsZXRlcyB0aGUgY2FjaGVkIHZlcnNpb24gb2YgRnJvbnQtZW5kIG1lbnUgKGRpc3BsYXllZCB2aWEgPHN0cm9uZz48aT4mbHQ7aW5wMjpzdF9DYWNoZWRNZW51IC4uLi8mZ3Q7PC9pPjwvc3Ryb25nPiB0YWcpLiBUaGlzIGNhY2hlIGlzIHVwZGF0ZWQgYXV0b21hdGljYWxseSwgd2hlbiB0aGUgd2Vic2l0ZSBzdHJ1Y3R1cmUgb3Igc2VjdGlvbnMgYXJlIGNoYW5nZWQuPC9saT4NCiAgPGxpPlVzZSB0aGlzIG9wdGlvbiBvbmx5IGluIGNhc2UgaWYgZGlzcGxheWVkIG1lbnUgb24gdGhlIEZyb250LWVuZCBkb2Vzbid0IG1hdGNoIHRoZSBtZW51IGRlZmluZWQgaW4gQWRtaW4gQ29uc29sZS48L2xpPg0KPC91bD4=</PHRASE>
<PHRASE Label="la_hint_SystemToolsShowDatabaseTableStructure" Module="Core" Type="1">PHVsPg0KICA8bGk+U2hvd3MgdGhlIHN0cnVjdHVyZSBvZiB0aGUgZGF0YWJhc2UgdGFibGUgbG9hZGluZyBpdCBieSB0aGUgVGFibGUgTmFtZSAodGFibGUgcHJlZml4IGlzIG9wdGlvbmFsKSBvciA8c3Ryb25nPjxpPlVuaXQgQ29uZmlnIFByZWZpeDwvaT48L3N0cm9uZz4gYXNzb2NpYXRlZCB3aXRoIHRoaXMgdGFibGUuPC9saT4NCjwvdWw+</PHRASE>
<PHRASE Label="la_hint_SystemToolsSynchronizeDBRevisions" Module="Core" Type="1">PHVsPg0KPGxpPkFzIGEgcmVzdWx0LCBzY3JpcHQgd2lsbCBWYWxpZGF0ZSBjdXJyZW50IDxiPjx1PnByb2plY3RfdXBncmFkZXMuc3FsPC91PjwvYj4gZmlsZSBhbmQgb3V0bGluZSBhbnkgZXJyb3JzIG9yIGluY29uc2lzdGVuY2llcywgYW5kIGF1dG8tcG9wdWxhdGUgYWxsIG1pc3NpbmcgREIgUmV2aXNpb25zIGZyb20gdGhlIGZpbGUgaW50byBBcHBsaWVkREJSZXZpc2lvbnMuPC9saT4NCjxsaT48YiBzdHlsZT0iY29sb3I6cmVkIj5OT1RFOjwvYj4gRGV2ZWxvcGVycyBzaG91bGQgT05MWSBydW4gdGhpcyBiZWZvcmUgdGhleSBwZXJmb3JtIFJlcG9zaXRvcnkgVXBkYXRlcyBvbiB0aGVpIHdvcmtpbmcgY29weSE8L2xpPg0KPC91bD4=</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_importlang_phrasewarning" Module="Core" Type="2">RW5hYmxpbmcgdGhpcyBvcHRpb24gd2lsbCB1bmRvIGFueSBjaGFuZ2VzIHlvdSBoYXZlIG1hZGUgdG8gZXhpc3RpbmcgcGhyYXNlcw==</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_Description" Module="Core" Type="1">TGluayBEZXNjcmlwdGlvbg==</PHRASE>
<PHRASE Label="la_link_editorspick_prompt" Module="Core" Type="1">RGlzcGxheSBlZGl0b3IgUElDS3MgYWJvdmUgcmVndWxhciBsaW5rcw==</PHRASE>
<PHRASE Label="la_Link_Hits" Module="Core" Type="1">SGl0cw==</PHRASE>
<PHRASE Label="la_Link_Name" Module="Core" Type="1">TGluayBOYW1l</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_Link_URL" Module="Core" Type="1">VVJM</PHRASE>
<PHRASE Label="la_link_urlstatus_prompt" Module="Core" Type="1">RGlzcGxheSBsaW5rIFVSTCBpbiBzdGF0dXMgYmFy</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_of" Module="Core" Type="1">b2Y=</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_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_Country" Module="Core" Type="1">Q291bnRyeQ==</PHRASE>
<PHRASE Label="la_opt_CreatedOn" Module="Core" Type="1">Q3JlYXRlZCBPbg==</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_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_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_ExternalUrl" Module="Core" Type="1">RXh0ZXJuYWwgVXJs</PHRASE>
<PHRASE Label="la_opt_Failed" Module="Core" Type="1">RmFpbGVk</PHRASE>
<PHRASE Label="la_opt_FirstName" Module="Core" Type="1">Rmlyc3QgTmFtZQ==</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_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_LastName" Module="Core" Type="1">TGFzdCBOYW1l</PHRASE>
<PHRASE Label="la_opt_LoggedOut" Module="Core" Type="1">TG9nZ2VkIE91dA==</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_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_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_PopupWindow" Module="Core" Type="1">UG9wdXAgV2luZG93</PHRASE>
<PHRASE Label="la_opt_Processed" Module="Core" Type="1">UHJvY2Vzc2Vk</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_sec" Module="Core" Type="1">c2Vjb25kKHMp</PHRASE>
<PHRASE Label="la_opt_Semicolon" Module="Core" Type="1">U2VtaS1jb2xvbg==</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_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_Title" Module="Core" Type="1">VGl0bGU=</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_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_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="2">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="2">QWxsb3cgRHVwbGljYXRlIFJhdGluZyBWb3Rlcw==</PHRASE>
<PHRASE Label="la_prompt_DupReviews" Module="Core" Type="2">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_FromUsername" Module="Core" Type="1">RnJvbQ==</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="2">T3ZlcndyaXRlIEV4aXN0aW5nIFBocmFzZXM=</PHRASE>
<PHRASE Label="la_prompt_Password" Module="Core" Type="1">UGFzc3dvcmQ=</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_rootcategory_name" Module="Core" Type="1">SG9tZQ==</PHRASE>
<PHRASE Label="la_SampleText" Module="Core" Type="1">U2FtcGxlIFRleHQ=</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_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_SettingsAdmin" Module="Core" Type="1">QWRtaW4gQ29uc29sZSBTZXR0aW5ncw==</PHRASE>
<PHRASE Label="la_section_SettingsCaching" Module="Core" Type="1">Q2FjaGluZyBTZXR0aW5ncw==</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_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_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="2">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_Invalid" Module="Core" Type="2">SW52YWxpZA==</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_Login" Module="Core" Type="1">VXNlcm5hbWU=</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_Not_Validated" Module="Core" Type="2">Tm90IFZhbGlkYXRlZA==</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_Restrictions" Module="Core" Type="1">UmVzdHJpY3Rpb25z</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_Valid" Module="Core" Type="1">VmFsaWQ=</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_AddingAgent" Module="Core" Type="1">QWRkaW5nIEFnZW50</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_AddingMailingList" Module="Core" Type="1">QWRkaW5nIE1haWxpbmcgTGlzdA==</PHRASE>
<PHRASE Label="la_title_AddingPermissionType" Module="Core" Type="1">QWRkaW5nIFBlcm1pc3Npb24gVHlwZQ==</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_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_Agents" Module="Core" Type="1">QWdlbnRz</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_EditingAgent" Module="Core" Type="1">RWRpdGluZyBBZ2VudA==</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_EditingCountryState" Module="Core" Type="1">RWRpdGluZyBDb3VudHJ5L1N0YXRl</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_EditingMembership" Module="Core" Type="1">RWRpdGluZyBNZW1iZXJzaGlw</PHRASE>
<PHRASE Label="la_title_EditingPermissionType" Module="Core" Type="1">RWRpdGluZyBQZXJtaXNzaW9uIFR5cGU=</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_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_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_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_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</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_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_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_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_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_SystemTools" Module="Core" Type="1">U3lzdGVtIFRvb2xz</PHRASE>
<PHRASE Label="la_title_SystemToolsClearTemplatesCache" Module="Core" Type="1">Q2xlYXIgVGVtcGxhdGVzIENhY2hl</PHRASE>
<PHRASE Label="la_title_SystemToolsCommonlyUsedKeys" Module="Core" Type="1">Q29tbW9ubHkgVXNlZCBLZXlz</PHRASE>
<PHRASE Label="la_title_SystemToolsDeploy" Module="Core" Type="1">RGVwbG95IENoYW5nZXM=</PHRASE>
<PHRASE Label="la_title_SystemToolsKeyName" Module="Core" Type="1">S2V5IE5hbWU=</PHRASE>
<PHRASE Label="la_title_SystemToolsKeyValue" Module="Core" Type="1">S2V5IFZhbHVl</PHRASE>
<PHRASE Label="la_title_SystemToolsLocateUnitConfigFile" Module="Core" Type="1">TG9jYXRlIFVuaXQgQ29uZmlnIEZpbGU=</PHRASE>
<PHRASE Label="la_title_SystemToolsRebuildMultilingualFields" Module="Core" Type="1">UmVidWlsZCBNdWx0aWxpbmd1YWwgRmllbGRz</PHRASE>
<PHRASE Label="la_title_SystemToolsRecompileTemplates" Module="Core" Type="1">UmVjb21waWxlIFRlbXBsYXRlcw==</PHRASE>
<PHRASE Label="la_title_SystemToolsRefreshThemeFiles" Module="Core" Type="1">UmVmcmVzaCBUaGVtZSBGaWxlcw==</PHRASE>
<PHRASE Label="la_title_SystemToolsResetAdminConsoleSections" Module="Core" Type="1">UmVzZXQgQWRtaW4gQ29uc29sZSBTZWN0aW9ucw==</PHRASE>
<PHRASE Label="la_title_SystemToolsResetAllKeys" Module="Core" Type="1">UmVzZXQgQWxsIEtleXM=</PHRASE>
<PHRASE Label="la_title_SystemToolsResetConfigsAndParsedData" Module="Core" Type="1">UmVzZXQgQ29uZmlncyBGaWxlcyBDYWNoZSBhbmQgUGFyc2VkIFN5c3RlbSBEYXRh</PHRASE>
<PHRASE Label="la_title_SystemToolsResetModRewriteCache" Module="Core" Type="1">UmVzZXQgTW9kUmV3cml0ZSBDYWNoZQ==</PHRASE>
<PHRASE Label="la_title_SystemToolsResetParsedCachedData" Module="Core" Type="1">UmVzZXQgUGFyc2VkIGFuZCBDYWNoZWQgU3lzdGVtIERhdGE=</PHRASE>
<PHRASE Label="la_title_SystemToolsResetSMSMenuCache" Module="Core" Type="1">UmVzZXQgU01TIE1lbnUgQ2FjaGU=</PHRASE>
<PHRASE Label="la_title_SystemToolsShowDatabaseTableStructure" Module="Core" Type="1">U2hvdyBEYXRhYmFzZSBUYWJsZSBTdHJ1Y3R1cmU=</PHRASE>
<PHRASE Label="la_title_SystemToolsSynchronizeDBRevisions" Module="Core" Type="1">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_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_Visits" Module="Core" Type="1">VmlzaXRz</PHRASE>
<PHRASE Label="la_title_Website" Module="Core" Type="1">V2Vic2l0ZQ==</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_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_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_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_NewAgent" Module="Core" Type="1">TmV3IEFnZW50</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_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_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_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_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_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">VXNlIENyb24gdG8gcnVuIEFnZW50cw==</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_review_deny" Module="Core" Type="1">TnVtYmVyIG9mIGRheXMgdG8gZGVueSBtdWx0aXBsZSBDb21tZW50cyBmcm9tIHRoZSBzYW1lIHVzZXI=</PHRASE>
<PHRASE Label="la_users_subscriber_group" Module="Core" Type="2">QXNzaWduIG1haWxpbmcgbGlzdCBzdWJzY3JpYmVycyB0byBncm91cA==</PHRASE>
<PHRASE Label="la_users_votes_deny" Module="Core" Type="1">TnVtYmVyIG9mIGRheXMgdG8gZGVueSBtdWx0aXBsZSB2b3RlcyBmcm9tIHRoZSBzYW1lIHVzZXI=</PHRASE>
<PHRASE Label="la_use_emails_as_login" Module="Core" Type="1">VXNlIEVtYWlscyBBcyBMb2dpbg==</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="lu_field_CachedDescendantCatsQty" Module="Core" Type="1">U3ViLXNlY3Rpb25zIFF1YW50aXR5</PHRASE>
<PHRASE Label="lu_field_CachedNavBar" Module="Core" Type="1">TmF2aWdhdGlvbiBCYXI=</PHRASE>
<PHRASE Label="lu_field_cachedrating" Module="Core" Type="2">UmF0aW5n</PHRASE>
<PHRASE Label="lu_field_cachedreviewsqty" Module="Core" Type="2">TnVtYmVyIG9mIFJldmlld3M=</PHRASE>
<PHRASE Label="lu_field_cachedvotesqty" Module="Core" Type="2">TnVtYmVyIG9mIFJhdGluZyBWb3Rlcw==</PHRASE>
<PHRASE Label="lu_field_CategoryId" Module="Core" Type="1">U2VjdGlvbiBJRA==</PHRASE>
<PHRASE Label="lu_field_createdbyid" Module="Core" Type="2">Q3JlYXRlZCBCeSBVc2VyIElE</PHRASE>
<PHRASE Label="lu_field_createdon" Module="Core" Type="2">RGF0ZSBDcmVhdGVk</PHRASE>
<PHRASE Label="lu_field_description" Module="Core" Type="2">RGVzY3JpcHRpb24=</PHRASE>
<PHRASE Label="lu_field_EditorsPick" Module="Core" Type="1">RWRpdG9ycyBQaWNr</PHRASE>
<PHRASE Label="lu_field_hits" Module="Core" Type="2">SGl0cw==</PHRASE>
<PHRASE Label="lu_field_hotitem" Module="Core" Type="2">SXRlbSBJcyBIb3Q=</PHRASE>
<PHRASE Label="lu_field_linkid" Module="Core" Type="2">TGluayBJRA==</PHRASE>
<PHRASE Label="lu_field_MetaDescription" Module="Core" Type="1">TWV0YSBEZXNjcmlwdGlvbg==</PHRASE>
<PHRASE Label="lu_field_MetaKeywords" Module="Core" Type="1">TWV0YSBLZXl3b3Jkcw==</PHRASE>
<PHRASE Label="lu_field_modified" Module="Core" Type="2">TGFzdCBNb2RpZmllZCBEYXRl</PHRASE>
<PHRASE Label="lu_field_modifiedbyid" Module="Core" Type="2">TW9kaWZpZWQgQnkgVXNlciBJRA==</PHRASE>
<PHRASE Label="lu_field_name" Module="Core" Type="2">TmFtZQ==</PHRASE>
<PHRASE Label="lu_field_newitem" Module="Core" Type="2">SXRlbSBJcyBOZXc=</PHRASE>
<PHRASE Label="lu_field_notifyowneronchanges" Module="Core" Type="2">Tm90aWZ5IE93bmVyIG9mIENoYW5nZXM=</PHRASE>
<PHRASE Label="lu_field_orgid" Module="Core" Type="2">T3JpZ2luYWwgSXRlbSBJRA==</PHRASE>
<PHRASE Label="lu_field_ownerid" Module="Core" Type="2">T3duZXIgVXNlciBJRA==</PHRASE>
<PHRASE Label="lu_field_ParentId" Module="Core" Type="1">UGFyZW50IElE</PHRASE>
<PHRASE Label="lu_field_ParentPath" Module="Core" Type="1">UGFyZW50IFBhdGg=</PHRASE>
<PHRASE Label="lu_field_popitem" Module="Core" Type="2">SXRlbSBJcyBQb3B1bGFy</PHRASE>
<PHRASE Label="lu_field_priority" Module="Core" Type="2">UHJpb3JpdHk=</PHRASE>
<PHRASE Label="lu_field_qtysold" Module="Core" Type="1">UXR5IFNvbGQ=</PHRASE>
<PHRASE Label="lu_field_resourceid" Module="Core" Type="2">UmVzb3VyY2UgSUQ=</PHRASE>
<PHRASE Label="lu_field_status" Module="Core" Type="2">U3RhdHVz</PHRASE>
<PHRASE Label="lu_field_topseller" Module="Core" Type="1">SXRlbSBJcyBhIFRvcCBTZWxsZXI=</PHRASE>
<PHRASE Label="lu_field_url" Module="Core" Type="2">VVJM</PHRASE>
<PHRASE Label="lu_invalid_password" Module="Core" Type="1">SW5jb3JyZWN0IFVzZXJuYW1lIG9yIFBhc3N3b3Jk</PHRASE>
<PHRASE Label="lu_of" Module="Core" Type="2">b2Y=</PHRASE>
<PHRASE Label="lu_opt_AutoDetect" Module="Core" Type="1">QXV0by1EZXRlY3Q=</PHRASE>
<PHRASE Label="lu_opt_Cookies" Module="Core" Type="1">Q29va2llcw==</PHRASE>
<PHRASE Label="lu_opt_QueryString" Module="Core" Type="1">UXVlcnkgU3RyaW5nIChTSUQp</PHRASE>
</PHRASES>
<EVENTS>
<EVENT MessageType="html" Event="CATEGORY.ADD" Type="0">U3ViamVjdDogTmV3IENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIC0gQWRkZWQKCllvdXIgc3VnZ2VzdGVkIGNhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGhhcyBiZWVuIGFkZGVkLg==</EVENT>
<EVENT MessageType="html" Event="CATEGORY.ADD" Type="1">U3ViamVjdDogTmV3IENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIFN1Ym1pdHRlZCBieSBVc2VycwoKQSBjYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBhZGRlZC4=</EVENT>
<EVENT MessageType="html" Event="CATEGORY.ADD.PENDING" Type="0">U3ViamVjdDogU3VnZ2VzdGVkIENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGlzIFBlbmRpbmcKClRoZSBjYXRlZ29yeSB5b3Ugc3VnZ2VzdGVkICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGlzIHBlbmRpbmcgZm9yIGFkbWluaXN0cmF0aXZlIGFwcHJvdmFsLg0KDQpUaGFuayB5b3Uh</EVENT>
<EVENT MessageType="html" Event="CATEGORY.ADD.PENDING" Type="1">U3ViamVjdDogU3VnZ2VzdGVkIENhdGVnb3J5ICI8aW5wMjpjX0ZpZWxkIG5hbWU9Ik5hbWUiLz4iIGlzIFBlbmRpbmcKCkEgY2F0ZWdvcnkgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaGFzIGJlZW4gYWRkZWQsIHBlbmRpbmcgeW91ciBjb25maXJtYXRpb24uICBQbGVhc2UgcmV2aWV3IHRoZSBjYXRlZ29yeSBhbmQgYXBwcm92ZSBvciBkZW55IGl0Lg==</EVENT>
<EVENT MessageType="html" Event="CATEGORY.APPROVE" Type="0">U3ViamVjdDogQSBjYXRlZ29yeSBoYXMgYmVlbiBhcHByb3ZlZAoKWW91ciBzdWdnZXN0ZWQgY2F0ZWdvcnkgIjxpbnAyOmNfRmllbGQgbmFtZT0iTmFtZSIvPiIgaGFzIGJlZW4gYXBwcm92ZWQu</EVENT>
<EVENT MessageType="html" Event="CATEGORY.DENY" Type="0">U3ViamVjdDogWW91ciBDYXRlZ29yeSAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBEZW5pZWQKCllvdXIgY2F0ZWdvcnkgc3VnZ2VzdGlvbiAiPGlucDI6Y19GaWVsZCBuYW1lPSJOYW1lIi8+IiBoYXMgYmVlbiBkZW5pZWQu</EVENT>
<EVENT MessageType="html" Event="COMMON.FOOTER" Type="1">U3ViamVjdDogQ29tbW9uIEZvb3RlciBUZW1wbGF0ZQoKPGJyLz48YnIvPg0KDQpTaW5jZXJlbHksPGJyLz48YnIvPg0KDQpXZWJzaXRlIGFkbWluaXN0cmF0aW9uLg==</EVENT>
<EVENT MessageType="html" Event="FORM.SUBMISSION.REPLY.FROM.USER" Type="1">U3ViamVjdDogTmV3IEVtYWlsIFJFUExZIFJlY2VpdmVkIGluICJGZWVkYmFjayBNYW5hZ2VyIiAoPGlucDI6Zm9ybXN1YnMuLWl0ZW1fRmllbGQgbmFtZT0iRm9ybVN1Ym1pc3Npb25JZCIvPikKCk5ldyBFbWFpbCBSRVBMWSBSZWNlaXZlZCBpbiAmcXVvdDtGZWVkYmFjayBNYW5hZ2VyJnF1b3Q7LjxiciAvPg0KPGJyIC8+DQpPcmlnaW5hbCBGZWVkYmFja0lkOiA8aW5wMjpmb3Jtc3Vicy4taXRlbV9GaWVsZCBuYW1lPSJGb3JtU3VibWlzc2lvbklkIi8+IDxiciAvPg0KT3JpZ2luYWwgU3ViamVjdDogPGlucDI6Zm9ybXN1YnMuLWl0ZW1fRm9ybUZpZWxkIHJvbGU9InN1YmplY3QiLz4gPGJyIC8+DQo8YnIgLz4NClBsZWFzZSBwcm9jZWVkIHRvIHRoZSBBZG1pbiBDb25zb2xlIGluIG9yZGVyIHRvIHJldmlldyBhbmQgcmVwbHkgdG8gdGhlIHVzZXIu</EVENT>
<EVENT MessageType="html" Event="FORM.SUBMISSION.REPLY.FROM.USER.BOUNCED" Type="1">U3ViamVjdDogTmV3IEVtYWlsIC0gRGVsaXZlcnkgRmFpbHVyZSBSZWNlaXZlZCBpbiAiRmVlZGJhY2sgTWFuYWdlciIgKDxpbnAyOmZvcm1zdWJzLi1pdGVtX0ZpZWxkIG5hbWU9IkZvcm1TdWJtaXNzaW9uSWQiLz4pCgpOZXcgRW1haWwgRGVsaXZlcnkgRmFpbHVyZSBSZWNlaXZlZCBpbiAmcXVvdDtGZWVkYmFjayBNYW5hZ2VyJnF1b3Q7LjxiciAvPg0KPGJyIC8+DQpPcmlnaW5hbCBGZWVkYmFja0lkOiA8aW5wMjpmb3Jtc3Vicy4taXRlbV9GaWVsZCBuYW1lPSJGb3JtU3VibWlzc2lvbklkIi8+IDxiciAvPg0KT3JpZ2luYWwgU3ViamVjdDogPGlucDI6Zm9ybXN1YnMuLWl0ZW1fRm9ybUZpZWxkIHJvbGU9InN1YmplY3QiLz4gPGJyIC8+DQo8YnIgLz4NClBsZWFzZSBwcm9jZWVkIHRvIHRoZSBBZG1pbiBDb25zb2xlIGluIG9yZGVyIHRvIHJldmlldyBhbmQgcmVwbHkgdG8gdGhlIHVzZXIu</EVENT>
<EVENT MessageType="text" Event="FORM.SUBMISSION.REPLY.TO.USER" Type="1">U3ViamVjdDogPGlucDI6bV9QYXJhbSBuYW1lPSJzdWJqZWN0Ii8+ICN2ZXJpZnk8aW5wMjpzdWJtaXNzaW9uLWxvZ19GaWVsZCBuYW1lPSJWZXJpZnlDb2RlIi8+Cgo8aW5wMjptX1BhcmFtIG5hbWU9Im1lc3NhZ2UiLz4=</EVENT>
<EVENT MessageType="html" Event="FORM.SUBMITTED" Type="0">U3ViamVjdDogVGhhbmsgWW91IGZvciBDb250YWN0aW5nIFVzIQoKPHA+VGhhbmsgeW91IGZvciBjb250YWN0aW5nIHVzLiBXZSdsbCBiZSBpbiB0b3VjaCB3aXRoIHlvdSBzaG9ydGx5ITwvcD4=</EVENT>
<EVENT MessageType="html" Event="FORM.SUBMITTED" Type="1">U3ViamVjdDogTmV3IGZvcm0gc3VibWlzc2lvbgoKPHA+Rm9ybSBoYXMgYmVlbiBzdWJtaXR0ZWQuIFBsZWFzZSBwcm9jZWVkIHRvIHRoZSBBZG1pbiBDb25zb2xlIHRvIHJldmlldyB0aGUgc3VibWlzc2lvbiE8L3A+</EVENT>
+ <EVENT MessageType="html" Event="ROOT.RESET.PASSWORD" Type="1">U3ViamVjdDogUm9vdCBSZXNldCBQYXNzd29yZAoKWW91ciBuZXcgcGFzc3dvcmQgaXM6IDxpbnAyOm1fUGFyYW0gbmFtZT0icGFzc3dvcmQiLz4=</EVENT>
<EVENT MessageType="html" Event="USER.ADD" Type="0">U3ViamVjdDogSW4tcG9ydGFsIHJlZ2lzdHJhdGlvbgoKRGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIgLz4gPGlucDI6dV9GaWVsZCBuYW1lPSJMYXN0TmFtZSIgLz4sDQoNClRoYW5rIHlvdSBmb3IgcmVnaXN0ZXJpbmcgb24gPGlucDI6bV9CYXNlVXJsLz4uIFlvdXIgcmVnaXN0cmF0aW9uIGlzIG5vdyBhY3RpdmUu</EVENT>
- <EVENT MessageType="html" Event="USER.ADD" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+KQoKQSBuZXcgdXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgaGFzIGJlZW4gYWRkZWQu</EVENT>
- <EVENT MessageType="text" Event="USER.ADD.BYADMIN" Type="0">U3ViamVjdDogTmV3IHVzZXIgaGFzIGJlZW4gY3JlYXRlZAoKRGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgdXNlciBoYXMgYmVlbiBjcmVhdGVkIGFuZCBhc3NpZ25lZCB0byB5b3UNCg0KTm93IHlvdSBjYW4gbG9naW4gdXNpbmcgdGhlIGZvbGxvd2luZyBjcmVkZW50aWFsczoNCg0KPGlucDI6bV9pZiBjaGVjaz0idV9GaWVsZCIgbmFtZT0iTG9naW4iPlVzZXJuYW1lOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+PGlucDI6bV9lbHNlLz5FLW1haWw6IDxpbnAyOnVfRmllbGQgbmFtZT0iRW1haWwiLz48L2lucDI6bV9pZj4gDQpQYXNzd29yZDogPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiANCg==</EVENT>
- <EVENT MessageType="html" Event="USER.ADD.PENDING" Type="0">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+PGlucDI6bV9pZiBjaGVjaz0ibV9HZXRDb25maWciIG5hbWU9IlVzZXJfQWxsb3dfTmV3IiBlcXVhbHNfdG89IjQiPiAtIEFjdGl2YXRpb24gRW1haWw8L2lucDI6bV9pZj4pCgpEZWFyIDxpbnAyOnVfRmllbGQgbmFtZT0iRmlyc3ROYW1lIiAvPiA8aW5wMjp1X0ZpZWxkIG5hbWU9Ikxhc3ROYW1lIiAvPiw8YnIgLz4NCjxiciAvPg0KPGlucDI6bV9pZiBjaGVjaz0ibV9HZXRDb25maWciIG5hbWU9IlVzZXJfQWxsb3dfTmV3IiBlcXVhbHNfdG89IjQiPiBUaGFuayB5b3UgZm9yIHJlZ2lzdGVyaW5nIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZS4gVG8gYWN0aXZhdGUgeW91ciByZWdpc3RyYXRpb24gcGxlYXNlIGZvbGxvdyBsaW5rIGJlbG93LiA8aW5wMjp1X0FjdGl2YXRpb25MaW5rIHRlbXBsYXRlPSJwbGF0Zm9ybS9sb2dpbi9hY3RpdmF0ZV9jb25maXJtIi8+IDxpbnAyOm1fZWxzZS8+IFRoYW5rIHlvdSBmb3IgcmVnaXN0ZXJpbmcgb24gPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPiB3ZWJzaXRlLiBZb3VyIHJlZ2lzdHJhdGlvbiB3aWxsIGJlIGFjdGl2ZSBhZnRlciBhcHByb3ZhbC4gPC9pbnAyOm1faWY+</EVENT>
- <EVENT MessageType="html" Event="USER.ADD.PENDING" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0ZXJlZAoKQSBuZXcgdXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgaGFzIHJlZ2lzdGVyZWQgYW5kIGlzIHBlbmRpbmcgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwu</EVENT>
- <EVENT MessageType="html" Event="USER.APPROVE" Type="0">U3ViamVjdDogWW91ciBBY2NvdW50IGlzIEFjdGl2ZQoKV2VsY29tZSB0byA8aW5wMjptX0Jhc2VVcmwvPiENCg0KWW91ciB1c2VyIHJlZ2lzdHJhdGlvbiBoYXMgYmVlbiBhcHByb3ZlZC4gWW91ciB1c2VyIG5hbWUgaXM6ICI8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+Ii4=</EVENT>
- <EVENT MessageType="html" Event="USER.APPROVE" Type="1">U3ViamVjdDogTmV3IFVzZXIgQWNjb3VudCAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgd2FzIEFwcHJvdmVkCgpVc2VyICI8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+IiBoYXMgYmVlbiBhcHByb3ZlZC4=</EVENT>
+ <EVENT MessageType="html" Event="USER.ADD" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KQoKQSBuZXcgdXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gYWRkZWQu</EVENT>
+ <EVENT MessageType="text" Event="USER.ADD.BYADMIN" Type="0">U3ViamVjdDogTmV3IHVzZXIgaGFzIGJlZW4gY3JlYXRlZAoKRGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgdXNlciBoYXMgYmVlbiBjcmVhdGVkIGFuZCBhc3NpZ25lZCB0byB5b3UNCg0KTm93IHlvdSBjYW4gbG9naW4gdXNpbmcgdGhlIGZvbGxvd2luZyBjcmVkZW50aWFsczoNCg0KPGlucDI6bV9pZiBjaGVjaz0idV9GaWVsZCIgbmFtZT0iVXNlcm5hbWUiPlVzZXJuYW1lOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+PGlucDI6bV9lbHNlLz5FLW1haWw6IDxpbnAyOnVfRmllbGQgbmFtZT0iRW1haWwiLz48L2lucDI6bV9pZj4gDQpQYXNzd29yZDogPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiANCg==</EVENT>
+ <EVENT MessageType="html" Event="USER.ADD.PENDING" Type="0">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uICg8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+PGlucDI6bV9pZiBjaGVjaz0ibV9HZXRDb25maWciIG5hbWU9IlVzZXJfQWxsb3dfTmV3IiBlcXVhbHNfdG89IjQiPiAtIEFjdGl2YXRpb24gRW1haWw8L2lucDI6bV9pZj4pCgpEZWFyIDxpbnAyOnVfRmllbGQgbmFtZT0iRmlyc3ROYW1lIiAvPiA8aW5wMjp1X0ZpZWxkIG5hbWU9Ikxhc3ROYW1lIiAvPiw8YnIgLz4NCjxiciAvPg0KPGlucDI6bV9pZiBjaGVjaz0ibV9HZXRDb25maWciIG5hbWU9IlVzZXJfQWxsb3dfTmV3IiBlcXVhbHNfdG89IjQiPiBUaGFuayB5b3UgZm9yIHJlZ2lzdGVyaW5nIG9uIDxpbnAyOm1fTGluayB0ZW1wbGF0ZT0iaW5kZXgiLz4gd2Vic2l0ZS4gVG8gYWN0aXZhdGUgeW91ciByZWdpc3RyYXRpb24gcGxlYXNlIGZvbGxvdyBsaW5rIGJlbG93LiA8aW5wMjp1X0FjdGl2YXRpb25MaW5rIHRlbXBsYXRlPSJwbGF0Zm9ybS9sb2dpbi9hY3RpdmF0ZV9jb25maXJtIi8+IDxpbnAyOm1fZWxzZS8+IFRoYW5rIHlvdSBmb3IgcmVnaXN0ZXJpbmcgb24gPGlucDI6bV9MaW5rIHRlbXBsYXRlPSJpbmRleCIvPiB3ZWJzaXRlLiBZb3VyIHJlZ2lzdHJhdGlvbiB3aWxsIGJlIGFjdGl2ZSBhZnRlciBhcHByb3ZhbC4gPC9pbnAyOm1faWY+</EVENT>
+ <EVENT MessageType="html" Event="USER.ADD.PENDING" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0ZXJlZAoKQSBuZXcgdXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIHJlZ2lzdGVyZWQgYW5kIGlzIHBlbmRpbmcgYWRtaW5pc3RyYXRpdmUgYXBwcm92YWwu</EVENT>
+ <EVENT MessageType="html" Event="USER.APPROVE" Type="0">U3ViamVjdDogWW91ciBBY2NvdW50IGlzIEFjdGl2ZQoKV2VsY29tZSB0byA8aW5wMjptX0Jhc2VVcmwvPiENCg0KWW91ciB1c2VyIHJlZ2lzdHJhdGlvbiBoYXMgYmVlbiBhcHByb3ZlZC4gWW91ciB1c2VyIG5hbWUgaXM6ICI8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+Ii4=</EVENT>
+ <EVENT MessageType="html" Event="USER.APPROVE" Type="1">U3ViamVjdDogTmV3IFVzZXIgQWNjb3VudCAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgd2FzIEFwcHJvdmVkCgpVc2VyICI8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+IiBoYXMgYmVlbiBhcHByb3ZlZC4=</EVENT>
<EVENT MessageType="html" Event="USER.DENY" Type="0">U3ViamVjdDogWW91ciBSZWdpc3RyYXRpb24gaGFzIGJlZW4gRGVuaWVkCgpZb3VyIHJlZ2lzdHJhdGlvbiBvbiA8YSBocmVmPSI8aW5wMjptX0Jhc2VVcmwvPiI+PGlucDI6bV9CYXNlVXJsLz48L2E+IHdlYnNpdGUgaGFzIGJlZW4gZGVuaWVkLg==</EVENT>
- <EVENT MessageType="html" Event="USER.DENY" Type="1">U3ViamVjdDogVXNlciBSZWdpc3RyYXRpb24gZm9yICAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgaGFzIGJlZW4gRGVuaWVkCgpVc2VyICI8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+IiBoYXMgYmVlbiBkZW5pZWQu</EVENT>
+ <EVENT MessageType="html" Event="USER.DENY" Type="1">U3ViamVjdDogVXNlciBSZWdpc3RyYXRpb24gZm9yICAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gRGVuaWVkCgpVc2VyICI8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+IiBoYXMgYmVlbiBkZW5pZWQu</EVENT>
<EVENT MessageType="html" Event="USER.MEMBERSHIP.EXPIRATION.NOTICE" Type="0">U3ViamVjdDogTWVtYmVyc2hpcCBFeHBpcmF0aW9uIE5vdGljZQoKWW91ciBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fQmFzZVVybC8+IHdlYnNpdGUgd2lsbCBzb29uIGV4cGlyZS4=</EVENT>
- <EVENT MessageType="html" Event="USER.MEMBERSHIP.EXPIRATION.NOTICE" Type="1">U3ViamVjdDogTWVtYmVyc2hpcCBFeHBpcmF0aW9uIE5vdGljZSBmb3IgIjxpbnAyOnVfRmllbGQgbmFtZT0iTG9naW4iLz4iIFNlbnQKClVzZXIgPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiBtZW1iZXJzaGlwIHdpbGwgZXhwaXJlIHNvb24u</EVENT>
+ <EVENT MessageType="html" Event="USER.MEMBERSHIP.EXPIRATION.NOTICE" Type="1">U3ViamVjdDogTWVtYmVyc2hpcCBFeHBpcmF0aW9uIE5vdGljZSBmb3IgIjxpbnAyOnVfRmllbGQgbmFtZT0iVXNlcm5hbWUiLz4iIFNlbnQKClVzZXIgPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiBtZW1iZXJzaGlwIHdpbGwgZXhwaXJlIHNvb24u</EVENT>
<EVENT MessageType="html" Event="USER.MEMBERSHIP.EXPIRED" Type="0">U3ViamVjdDogWW91ciBNZW1iZXJzaGlwIEV4cGlyZWQKCllvdXIgbWVtYmVyc2hpcCBvbiA8aW5wMjptX0Jhc2VVcmwvPiB3ZWJzaXRlIGhhcyBleHBpcmVkLg==</EVENT>
- <EVENT MessageType="html" Event="USER.MEMBERSHIP.EXPIRED" Type="1">U3ViamVjdDogVXNlcidzIE1lbWJlcnNoaXAgRXhwaXJlZCAgKCA8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+KQoKVXNlcidzICg8aW5wMjp1X0ZpZWxkIG5hbWU9IkxvZ2luIi8+KSBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fQmFzZVVybC8+IHdlYnNpdGUgaGFzIGV4cGlyZWQu</EVENT>
- <EVENT MessageType="text" Event="USER.NEW.PASSWORD" Type="0">U3ViamVjdDogTmV3IHBhc3N3b3JkIGdlbmVyYXRlZAoKRGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgcGFzc3dvcmQgaGFzIGJlZW4gZ2VuZXJhdGVkIGZvciB5b3VyIHVzZXIuDQoNCk5vdyB5b3UgY2FuIGxvZ2luIHVzaW5nIHRoZSBmb2xsb3dpbmcgY3JlZGVudGlhbHM6DQoNCjxpbnAyOm1faWYgY2hlY2s9InVfRmllbGQiIG5hbWU9IkxvZ2luIj5Vc2VybmFtZTogPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPjxpbnAyOm1fZWxzZS8+RS1tYWlsOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IkVtYWlsIi8+PC9pbnAyOm1faWY+IA0KUGFzc3dvcmQ6IDxpbnAyOnVfRmllbGQgbmFtZT0iUGFzc3dvcmRfcGxhaW4iLz4g</EVENT>
+ <EVENT MessageType="html" Event="USER.MEMBERSHIP.EXPIRED" Type="1">U3ViamVjdDogVXNlcidzIE1lbWJlcnNoaXAgRXhwaXJlZCAgKCA8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KQoKVXNlcidzICg8aW5wMjp1X0ZpZWxkIG5hbWU9IlVzZXJuYW1lIi8+KSBtZW1iZXJzaGlwIG9uIDxpbnAyOm1fQmFzZVVybC8+IHdlYnNpdGUgaGFzIGV4cGlyZWQu</EVENT>
+ <EVENT MessageType="text" Event="USER.NEW.PASSWORD" Type="0">U3ViamVjdDogTmV3IHBhc3N3b3JkIGdlbmVyYXRlZAoKRGVhciA8aW5wMjp1X0ZpZWxkIG5hbWU9IkZpcnN0TmFtZSIvPiwNCg0KQSBuZXcgcGFzc3dvcmQgaGFzIGJlZW4gZ2VuZXJhdGVkIGZvciB5b3VyIHVzZXIuDQoNCk5vdyB5b3UgY2FuIGxvZ2luIHVzaW5nIHRoZSBmb2xsb3dpbmcgY3JlZGVudGlhbHM6DQoNCjxpbnAyOm1faWYgY2hlY2s9InVfRmllbGQiIG5hbWU9IlVzZXJuYW1lIj5Vc2VybmFtZTogPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPjxpbnAyOm1fZWxzZS8+RS1tYWlsOiA8aW5wMjp1X0ZpZWxkIG5hbWU9IkVtYWlsIi8+PC9pbnAyOm1faWY+IA0KUGFzc3dvcmQ6IDxpbnAyOnVfRmllbGQgbmFtZT0iUGFzc3dvcmRfcGxhaW4iLz4g</EVENT>
<EVENT MessageType="html" Event="USER.PSWDC" Type="0">U3ViamVjdDogUmVzZXQgUGFzc3dvcmQgQ29uZmlybWF0aW9uCgpIZWxsbyw8YnIvPjxici8+DQoNCkl0IHNlZW1zIHRoYXQgeW91IGhhdmUgcmVxdWVzdGVkIGEgcGFzc3dvcmQgcmVzZXQgZm9yIHlvdXIgSW4tcG9ydGFsIGFjY291bnQuIElmIHlvdSB3b3VsZCBsaWtlIHRvIHByb2NlZWQgYW5kIGNoYW5nZSB0aGUgcGFzc3dvcmQsIHBsZWFzZSBjbGljayBvbiB0aGUgbGluayBiZWxvdzo8YnIvPjxici8+DQoNCjxhIGhyZWY9IjxpbnAyOnVfQ29uZmlybVBhc3N3b3JkTGluayBub19hbXA9IjEiLz4iPjxpbnAyOnVfQ29uZmlybVBhc3N3b3JkTGluayBub19hbXA9IjEiLz48L2E+PGJyLz48YnIvPg0KDQpZb3Ugd2lsbCByZWNlaXZlIGEgc2Vjb25kIGVtYWlsIHdpdGggeW91ciBuZXcgcGFzc3dvcmQgc2hvcnRseS48YnIvPjxici8+DQoNCklmIHlvdSBiZWxpZXZlIHlvdSBoYXZlIHJlY2VpdmVkIHRoaXMgZW1haWwgaW4gZXJyb3IsIHBsZWFzZSBpZ25vcmUgdGhpcyBlbWFpbC4gWW91ciBwYXNzd29yZCB3aWxsIG5vdCBiZSBjaGFuZ2VkIHVubGVzcyB5b3UgaGF2ZSBjbGlja2VkIG9uIHRoZSBhYm92ZSBsaW5rLg0K</EVENT>
<EVENT MessageType="html" Event="USER.SUBSCRIBE" Type="0">U3ViamVjdDogU3Vic2NyaWJlZCB0byBhIE1haWxpbmcgTGlzdCBvbiA8aW5wMjptX0Jhc2VVcmwvPgoKWW91IGhhdmUgc3Vic2NyaWJlZCB0byBhIG1haWxpbmcgbGlzdCBvbiA8aW5wMjptX0Jhc2VVcmwvPiB3ZWJzaXRlLg==</EVENT>
<EVENT MessageType="html" Event="USER.SUBSCRIBE" Type="1">U3ViamVjdDogTmV3IFVzZXIgaGFzIFN1YnNjcmliZWQgdG8gYSBNYWxsaW5nIExpc3QKCk5ldyB1c2VyIDxpbnAyOnVfRmllbGQgbmFtZT0iRW1haWwiLz4gaGFzIHN1YnNjcmliZWQgdG8gYSBtYWlsaW5nIGxpc3Qgb24gPGEgaHJlZj0iPGlucDI6bV9CYXNlVXJsLz4iPjxpbnAyOm1fQmFzZVVybC8+PC9hPiB3ZWJzaXRlLg==</EVENT>
<EVENT MessageType="html" Event="USER.SUGGEST" Type="0">U3ViamVjdDogQ2hlY2sgb3V0IHRoaXMgV2Vic2l0ZQoKSGVsbG8sPC9icj48L2JyPg0KDQpUaGlzIG1lc3NhZ2UgaGFzIGJlZW4gc2VudCB0byB5b3UgZnJvbSBvbmUgb2YgeW91ciBmcmllbmRzLjwvYnI+PC9icj4NCkNoZWNrIG91dCB0aGlzIHNpdGU6IDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVybC8+Ij48aW5wMjptX0Jhc2VVcmwvPjwvYT4h</EVENT>
<EVENT MessageType="html" Event="USER.SUGGEST" Type="1">U3ViamVjdDogV2Vic2l0ZSBTdWdnZXN0ZWQgdG8gYSBGcmllbmQKCkEgdmlzaXRvciBzdWdnZXN0ZWQgPGEgaHJlZj0iPGlucDI6bV9CYXNlVXJsLz4iPjxpbnAyOm1fQmFzZVVybC8+PC9hPiB3ZWJzaXRlIHRvIGEgZnJpZW5kLg==</EVENT>
<EVENT MessageType="html" Event="USER.UNSUBSCRIBE" Type="0">U3ViamVjdDogWW91IGhhdmUgYmVlbiB1bnN1YnNjcmliZWQKCllvdSBoYXZlIHN1Y2Nlc3NmdWxseSB1bnN1YnNjcmliZWQgZnJvbSB0aGUgbWFpbGluZyBsaXN0IG9uIDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVybCAvPiI+PGlucDI6bV9CYXNlVXJsIC8+PC9hPiB3ZWJzaXRlLg==</EVENT>
<EVENT MessageType="html" Event="USER.UNSUBSCRIBE" Type="1">U3ViamVjdDogVXNlciBVbnN1YnNyaWJlZCBmcm9tIE1haWxpbmcgTGlzdAoKQSB1c2VyICI8aW5wMjp1X0ZpZWxkIG5hbWU9IkVtYWlsIi8+IiBoYXMgdW5zdWJzY3JpYmVkIGZyb20gdGhlIG1haWxpbmcgbGlzdCBvbiA8YSBocmVmPSI8aW5wMjptX0Jhc2VVcmwvPiI+PGlucDI6bV9CYXNlVXJsLz48L2E+Lg==</EVENT>
- <EVENT MessageType="html" Event="USER.VALIDATE" Type="0">U3ViamVjdDogVXNlciBSZWdpc3RyYXRpb24gaXMgVmFsaWRhdGVkCgpXZWxjb21lIHRvIEluLXBvcnRhbCE8YnIvPjxici8+DQoNCllvdXIgdXNlciByZWdpc3RyYXRpb24gaGFzIGJlZW4gYXBwcm92ZWQuIFlvdSBjYW4gbG9naW4gbm93IDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVybC8+Ij48aW5wMjptX0Jhc2VVcmwvPjwvYT4gdXNpbmcgdGhlIGZvbGxvd2luZyBpbmZvcm1hdGlvbjo8YnIvPjxici8+DQoNCj09PT09PT09PT09PT09PT09PTxici8+DQpVc2VybmFtZTogIjxpbnAyOnVfRmllbGQgbmFtZT0iTG9naW4iLz4iPGJyLz4NClBhc3N3b3JkOiAiPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiI8YnIvPg0KPT09PT09PT09PT09PT09PT09PGJyLz48YnIvPg0K</EVENT>
- <EVENT MessageType="html" Event="USER.VALIDATE" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uIGlzIFZhbGlkYXRlZAoKVXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJMb2dpbiIvPiIgaGFzIGJlZW4gdmFsaWRhdGVkLg==</EVENT>
- <EVENT MessageType="html" Event="ROOT.RESET.PASSWORD" Type="1">U3ViamVjdDogUm9vdCBSZXNldCBQYXNzd29yZAoKWW91ciBuZXcgcGFzc3dvcmQgaXM6IDxpbnAyOm1fUGFyYW0gbmFtZT0icGFzc3dvcmQiLz4=</EVENT>
+ <EVENT MessageType="html" Event="USER.VALIDATE" Type="0">U3ViamVjdDogVXNlciBSZWdpc3RyYXRpb24gaXMgVmFsaWRhdGVkCgpXZWxjb21lIHRvIEluLXBvcnRhbCE8YnIvPjxici8+DQoNCllvdXIgdXNlciByZWdpc3RyYXRpb24gaGFzIGJlZW4gYXBwcm92ZWQuIFlvdSBjYW4gbG9naW4gbm93IDxhIGhyZWY9IjxpbnAyOm1fQmFzZVVybC8+Ij48aW5wMjptX0Jhc2VVcmwvPjwvYT4gdXNpbmcgdGhlIGZvbGxvd2luZyBpbmZvcm1hdGlvbjo8YnIvPjxici8+DQoNCj09PT09PT09PT09PT09PT09PTxici8+DQpVc2VybmFtZTogIjxpbnAyOnVfRmllbGQgbmFtZT0iVXNlcm5hbWUiLz4iPGJyLz4NClBhc3N3b3JkOiAiPGlucDI6dV9GaWVsZCBuYW1lPSJQYXNzd29yZF9wbGFpbiIvPiI8YnIvPg0KPT09PT09PT09PT09PT09PT09PGJyLz48YnIvPg0K</EVENT>
+ <EVENT MessageType="html" Event="USER.VALIDATE" Type="1">U3ViamVjdDogTmV3IFVzZXIgUmVnaXN0cmF0aW9uIGlzIFZhbGlkYXRlZAoKVXNlciAiPGlucDI6dV9GaWVsZCBuYW1lPSJVc2VybmFtZSIvPiIgaGFzIGJlZW4gdmFsaWRhdGVkLg==</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
Index: branches/5.2.x/tools/run_event.php
===================================================================
--- branches/5.2.x/tools/run_event.php (revision 14725)
+++ branches/5.2.x/tools/run_event.php (revision 14726)
@@ -1,49 +1,43 @@
<?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.
*/
die('Restrictred use!');
-$start = getmicrotime();
+$start = microtime(true);
define('CRON', 1);
define('ADMIN', 1);
define('FULL_PATH', realpath(dirname(__FILE__) . '/..'));
define('DBG_SKIP_REPORTING', 1);
$_SERVER['HTTP_USER_AGENT'] = 'gecko';
// in command line, then 2nd argument is password
$password = isset($argv) && isset($argv[2]) ? $argv[2] : '';
if ($password != 'b674006f3edb1d9cd4d838c150b0567d') {
die('Bad key' . PHP_EOL);
}
include_once(FULL_PATH . '/core/kernel/startup.php');
$application =& kApplication::Instance();
$application->Init();
$application->StoreVar('user_id', USER_ROOT, true);
$application->HandleEvent($ev, $argv[1]); // event name in form "prefix[.special]:event_name"
$application->Done();
-$end = getmicrotime();
-
-function getmicrotime()
-{
- list($usec, $sec) = explode(" ", microtime());
- return ((float)$usec + (float)$sec);
-}
+$end = microtime(true);
\ No newline at end of file

Event Timeline