Page MenuHomeIn-Portal Phabricator

in-portal
No OneTemporary

File Metadata

Created
Sat, Feb 1, 5:56 AM

in-portal

Index: branches/RC/admin/install/upgrades/inportal_upgrade_v4.3.1.sql
===================================================================
--- branches/RC/admin/install/upgrades/inportal_upgrade_v4.3.1.sql (revision 10714)
+++ branches/RC/admin/install/upgrades/inportal_upgrade_v4.3.1.sql (revision 10715)
@@ -1,26 +1,29 @@
INSERT INTO ConfigurationAdmin VALUES ('KeepSessionOnBrowserClose', 'la_Text_Website', 'la_config_KeepSessionOnBrowserClose', 'checkbox', '', '', 10.27, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'KeepSessionOnBrowserClose', '1', 'In-Portal', 'in-portal:configure_general');
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');
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');
+
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;
DELETE FROM Cache WHERE VarName = 'sections_parsed';
DELETE FROM Cache WHERE VarName LIKE 'mod_rw_%';
OPTIMIZE TABLE Cache, SessionData, UserSession;
UPDATE Modules SET Version = '4.3.1' WHERE Name = 'Core';
UPDATE Modules SET Version = '4.3.1' WHERE Name = 'In-Portal';
\ No newline at end of file
Property changes on: branches/RC/admin/install/upgrades/inportal_upgrade_v4.3.1.sql
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.1.2.10
\ No newline at end of property
+1.1.2.11
\ No newline at end of property
Index: branches/RC/core/kernel/processors/main_processor.php
===================================================================
--- branches/RC/core/kernel/processors/main_processor.php (revision 10714)
+++ branches/RC/core/kernel/processors/main_processor.php (revision 10715)
@@ -1,1158 +1,1164 @@
<?php
class kMainTagProcessor extends TagProcessor {
function Init($prefix, $special, $event_params = null)
{
parent::Init($prefix, $special, $event_params);
$actions =& $this->Application->recallObject('kActions');
$actions->Set('t', $this->Application->GetVar('t'));
$actions->Set('sid', $this->Application->GetSID());
$actions->Set('m_opener', $this->Application->GetVar('m_opener') );
}
/**
* Used to handle calls where tag name
* match with existing php function name
*
* @param Tag $tag
* @return string
*/
function ProcessTag(&$tag)
{
if ($tag->Tag=='include') $tag->Tag='MyInclude';
return parent::ProcessTag($tag);
}
/**
* Base folder for all template includes
*
* @param Array $params
* @return string
*/
function TemplatesBase($params)
{
if ($this->Application->IsAdmin()) {
$module = isset($params['module']) ? $params['module'] : 'core';
if ($module == 'in-portal') {
$module = 'kernel';
}
$path = preg_replace('/\/(.*?)\/(.*)/', $module.'/\\2', THEMES_PATH); // remove leading slash + substitute module
}
else {
$path = mb_substr(THEMES_PATH, 1);
$module = isset($params['module']) ? $params['module'] : 'core';
if (mb_strtolower($module) == 'in-portal') {
$module_folder = 'platform';
}
else {
$module_folder = $this->Application->findModule('Name', $module, 'TemplatePath');
}
$path .= '/'.trim($module_folder, '/').'/';
}
return $this->Application->BaseURL().$path;
}
/**
* Creates <base href ..> HTML tag for all templates
* affects future css, js files and href params of links
*
* @return string
* @access public
*/
function Base_Ref($params)
{
return '<base href="'.$this->TemplatesBase($params).'/" />';
}
/**
* Returns base url for web-site
*
* @return string
* @access public
*/
function BaseURL()
{
return $this->Application->BaseURL();
}
//for compatability with K3 tags
function Base($params)
{
return $this->TemplatesBase($params).'/';
}
function ProjectBase($params)
{
return $this->Application->BaseURL();
}
/*function Base($params)
{
return $this->Application->BaseURL().$params['add'];
}*/
/**
* Used to create link to any template.
* use "pass" paramter if "t" tag to specify
* prefix & special of object to be represented
* in resulting url
*
* @param Array $params
* @return string
* @access public
*/
function T($params)
{
//by default link to current template
$t = $this->SelectParam($params, 't,template');
unset($params['t']);
unset($params['template']);
$prefix=isset($params['prefix']) ? $params['prefix'] : ''; unset($params['prefix']);
$index_file = isset($params['index_file']) ? $params['index_file'] : null; unset($params['index_file']);
return $this->Application->HREF($t, $prefix, $params, $index_file);
}
function Link($params)
{
if (isset($params['template'])) {
$params['t'] = $params['template'];
unset($params['template']);
}
if (!isset($params['pass']) && !isset($params['no_pass'])) $params['pass'] = 'm';
if (isset($params['no_pass'])) unset($params['no_pass']);
if( $this->Application->GetVar('admin') ) $params['admin'] = 1;
return $this->T($params);
}
function Env($params)
{
$t = $params['template'];
unset($params['template']);
return $this->Application->BuildEnv($t, $params, 'm', null, false);
}
function FormAction($params)
{
$params['pass'] = 'all,m';
$params['pass_category'] = 1;
return $this->Application->HREF('', '', $params);
}
/*// NEEDS TEST
function Config($params)
{
return $this->Application->ConfigOption($params['var']);
}
function Object($params)
{
$name = $params['name'];
$method = $params['method'];
$tmp =& $this->Application->recallObject($name);
if ($tmp != null) {
if (method_exists($tmp, $method))
return $tmp->$method($params);
else
echo "Method $method does not exist in object ".get_class($tmp)." named $name<br>";
}
else
echo "Object $name does not exist in the appliaction<br>";
}*/
/**
* Tag, that always returns true.
* For parser testing purposes
*
* @param Array $params
* @return bool
* @access public
*/
function True($params)
{
return true;
}
/**
* Tag, that always returns false.
* For parser testing purposes
*
* @param Array $params
* @return bool
* @access public
*/
function False($params)
{
return false;
}
/**
* Returns block parameter by name
*
* @param Array $params
* @return stirng
* @access public
*/
function Param($params)
{
//$parser =& $this->Application->recallObject('TemplateParser');
$name = $params['name'];
if (isset($this->Application->LateParsed[$name])) {
$f = $this->Application->PreParsedBlocks['capture_'.$name.$this->Application->LateParsed[$name]];
$this->Application->Parser->SetParam($name, $f(array()));
}
$res = $this->Application->Parser->GetParam($params['name']);
if ($res === false) $res = '';
if (isset($params['plus']))
$res += $params['plus'];
return $res;
}
function DefaultParam($params)
{
foreach ($params as $key => $val) {
if ($this->Application->Parser->GetParam($key) === false) {
$this->Application->Parser->SetParam($key, $val);
}
}
}
/**
* Gets value of specified field from specified prefix_special and set it as parser param
*
* @param Array $params
*/
/*function SetParam($params)
{
// <inp2:m_SetParam param="custom_name" src="cf:FieldName"/>
list($prefix_special, $field_name) = explode(':', $params['src']);
$object =& $this->Application->recallObject($prefix_special);
$name = $this->SelectParam($params, 'param,name,var');
$this->Application->Parser->SetParam($name, $object->GetField($field_name) );
}*/
/**
* Compares block parameter with value specified
*
* @param Array $params
* @return bool
* @access public
*/
function ParamEquals($params)
{
//$parser =& $this->Application->recallObject('TemplateParser');
$name = $this->SelectParam($params, 'name,var,param');
$value = $params['value'];
return ($this->Application->Parser->GetParam($name) == $value);
}
/*function PHP_Self($params)
{
return $HTTP_SERVER_VARS['PHP_SELF'];
}
*/
/**
* Returns session variable value by name
*
* @param Array $params
* @return string
* @access public
*/
function Recall($params)
{
$var_name = $this->SelectParam($params,'name,var,param');
if (isset($params['persistent']) && $params['persistent']) {
$ret = $this->Application->RecallPersistentVar($var_name);
}
else {
$ret = $this->Application->RecallVar($var_name);
}
$ret = ($ret === false && isset($params['no_null'])) ? '' : $ret;
if (getArrayValue($params, 'special') || getArrayValue($params, 'htmlchars')) {
$ret = htmlspecialchars($ret);
}
if (getArrayValue($params, 'urlencode')) {
$ret = urlencode($ret);
}
return $ret;
}
function RemoveVar($params)
{
$this->Application->RemoveVar( $this->SelectParam($params,'name,var,param') );
}
// bad style to store something from template to session !!! (by Alex)
// Used here only to test how session works, nothing more
function Store($params)
{
//echo"Store $params[name]<br>";
$name = $params['name'];
$value = $params['value'];
$this->Application->StoreVar($name,$value);
}
/**
* Sets application variable value(-s)
*
* @param Array $params
* @access public
*/
function Set($params)
{
foreach ($params as $param => $value) {
$this->Application->SetVar($param, $value);
}
}
/**
* Increment application variable
* specified by number specified
*
* @param Array $params
* @access public
*/
function Inc($params)
{
$this->Application->SetVar($params['param'], $this->Application->GetVar($params['param']) + $params['by']);
}
/**
* Retrieves application variable
* value by name
*
* @param Array $params
* @return string
* @access public
*/
function Get($params)
{
$ret = $this->Application->GetVar($this->SelectParam($params, 'name,var,param'), '');
return getArrayValue($params, 'htmlchars') ? htmlspecialchars($ret) : $ret;
}
/**
* Retrieves application constant
* value by name
*
* @param Array $params
* @return string
* @access public
*/
function GetConst($params)
{
return defined($this->SelectParam($params, 'name,const')) ? constant($this->SelectParam($params, 'name,const,param')) : '';
}
/**
* Retrieves configuration variable value by name
*
* @param Array $params
* @return string
* @access public
*/
function GetConfig($params)
{
$config_name = $this->SelectParam($params, 'name,var');
$ret = $this->Application->ConfigValue($config_name);
if( getArrayValue($params, 'escape') ) $ret = addslashes($ret);
return $ret;
}
function ConfigEquals($params)
{
$option = $this->SelectParam($params, 'name,option,var');
return $this->Application->ConfigValue($option) == getArrayValue($params, 'value');
}
/**
* Creates all hidden fields
* needed for kernel_form
*
* @param Array $params
* @return string
* @access public
*/
function DumpSystemInfo($params)
{
$actions =& $this->Application->recallObject('kActions');
$actions->Set('t', $this->Application->GetVar('t') );
$params = $actions->GetParams();
$o='';
foreach ($params AS $name => $val)
{
$o .= "<input type='hidden' name='$name' id='$name' value='$val'>\n";
}
return $o;
}
/**
* Used for search sidebox on front-end only
*
* @param Array $params
* @return string
* @author Alex
*/
function GetFormHiddens($params)
{
$t = $this->SelectParam($params, 'template,t');
unset($params['template']);
$form_fields = Array ();
if ($this->Application->RewriteURLs()) {
$session =& $this->Application->recallObject('Session');
if ($session->NeedQueryString()) {
$form_fields['sid'] = $this->Application->GetSID();
}
}
else {
$form_fields['env'] = $this->Application->BuildEnv($t, $params, 'm', null, false);
}
if ($this->Application->GetVar('admin') == 1) {
$form_fields['admin'] = 1;
}
$ret = '';
$field_tpl = '<input type="hidden" name="%1$s" id="%1$s" value="%2$s"/>'."\n";
foreach ($form_fields as $form_field => $field_value) {
$ret .= sprintf($field_tpl, $form_field, $field_value);
}
return $ret;
}
function Odd_Even($params)
{
$odd = $params['odd'];
$even = $params['even'];
if (!isset($params['var'])) {
$var = 'odd_even';
}
else {
$var = $params['var'];
}
if ($this->Application->GetVar($var) == 'even') {
if (!isset($params['readonly']) || !$params['readonly']) {
$this->Application->SetVar($var, 'odd');
}
return $even;
}
else {
if (!isset($params['readonly']) || !$params['readonly']) {
$this->Application->SetVar($var, 'even');
}
return $odd;
}
}
/**
* Returns phrase translation by name
*
* @param Array $params
* @return string
* @access public
*/
function Phrase($params)
{
// m:phrase name="phrase_name" default="Tr-alala" updated="2004-01-29 12:49"
$phrase_name = $this->SelectParam($params, 'label,name,title');
if (isset($params['source']) && $params['source']) {
$phrase_name = $this->Application->GetVar($phrase_name);
if (array_key_exists('default', $params) && !$phrase_name) {
$phrase_name = $params['default'];
}
}
$translation = $this->Application->Phrase($phrase_name);
if (isset($params['escape']) && $params['escape']) {
$translation = htmlspecialchars($translation, ENT_QUOTES);
$translation = addslashes($translation);
}
return $translation;
}
// for tabs
function is_active($params)
{
$test_templ = $this->SelectParam($params, 'templ,template,t');
if ( !getArrayValue($params,'allow_empty') )
{
$if_true=getArrayValue($params,'true') ? $params['true'] : 1;
$if_false=getArrayValue($params,'false') ? $params['false'] : 0;
}
else
{
$if_true=$params['true'];
$if_false=$params['false'];
}
if ( preg_match("/^".str_replace('/', '\/', $test_templ)."/i", $this->Application->GetVar('t'))) {
return $if_true;
}
else {
return $if_false;
}
}
function IsNotActive($params)
{
return !$this->is_active($params);
}
function IsActive($params)
{
return $this->is_active($params);
}
function is_t_active($params)
{
return $this->is_active($params);
}
function CurrentTemplate($params)
{
return $this->is_active($params);
}
/**
* Checks if session variable
* specified by name value match
* value passed as parameter
*
* @param Array $params
* @return string
* @access public
*/
function RecallEquals($params)
{
$name = $this->SelectParam($params, 'name,var');
$value = $params['value'];
if (isset($params['persistent']) && $params['persistent']) {
return $this->Application->RecallPersistentVar($name) == $value;
}
return ($this->Application->RecallVar($name) == $value);
}
/**
* Checks if application variable
* specified by name value match
* value passed as parameter
*
* @param Array $params
* @return bool
* @access public
*/
function GetEquals($params)
{
$name = $this->SelectParam($params, 'var,name,param');
$value = $params['value'];
if ($this->Application->GetVar($name) == $value) {
return 1;
}
}
/**
* Includes template
* and returns it's
* parsed version
*
* @param Array $params
* @return string
* @access public
*/
function MyInclude($params)
{
if (defined('NPARSER') && NPARSER) {
return $this->Application->Parser->IncludeTemplate($params, isset($params['is_silent']) ? 1 : 0);
}
$BlockParser =& $this->Application->makeClass('TemplateParser');
/* @var $BlockParser TemplateParser */
// $BlockParser->SetParams($params);
$parser =& $this->Application->Parser;
$this->Application->Parser =& $BlockParser;
// this is for the parser to know the master template in case an error occurs,
// ParseTemplate will reset it anyway, but this will allow error handler to display the tempalte
// which tries to include missing template for example
$this->Application->Parser->TemplateName = $parser->TemplateName;
$t = $this->SelectParam($params, 't,template,block,name');
$t = eregi_replace("\.tpl$", '', $t);
if (!$t) {
trigger_error('Template name not specified in <b>&lt;inp2:m_include .../&gt;</b> tag', E_USER_ERROR);
}
if (isset($this->Application->PreParsedBlocks[$t]) ) {
$params['name'] = $t;
$res = $this->Application->ParseBlock($params);
}
else {
$res = $BlockParser->ParseTemplate($t, 1, $params, isset($params['is_silent']) ? 1 : 0 );
}
if (!$BlockParser->DataExists && ((isset($params['data_exists']) && $params['data_exists']) || isset($params['block_no_data']))) {
if ($block_no_data = getArrayValue($params, 'block_no_data')) {
if (isset($this->Application->PreParsedBlocks[$block_no_data]) ) {
// block_no_data is another block name
$res = $this->Application->ParseBlock(Array('name' => $block_no_data));
}
else {
// block_no_data is template name (only looks through real templates)
$res = $BlockParser->ParseTemplate($block_no_data, 1, Array(), getArrayValue($params, 'is_silent'));
}
}
else {
$res = '';
}
}
$this->Application->Parser =& $parser;
$this->Application->Parser->DataExists = $this->Application->Parser->DataExists || $BlockParser->DataExists;
if (isset($params['return_params']) && $params['return_params']) {
$new_params = array_merge($this->Application->Parser->Params, $BlockParser->ParamsStack[0]);
$this->Application->Parser->SetParams($new_params, false);
}
return $res;
}
function ModuleInclude($params)
{
$ret = '';
$block_params = array_merge($params, Array('is_silent' => 2)); // don't make fatal errors in case if template is missing
$current_template = $this->Application->GetVar('t');
$skip_prefixes = isset($params['skip_prefixes']) ? explode(',', $params['skip_prefixes']) : Array();
foreach ($this->Application->ModuleInfo as $module_name => $module_data) {
$module_key = mb_strtolower($module_name);
if ($module_name == 'In-Portal') {
$module_prefix = $this->Application->IsAdmin() ? 'in-portal/' : $module_data['TemplatePath'];
}
else {
$module_prefix = $this->Application->IsAdmin() ? $module_key.'/' : rtrim($module_data['TemplatePath'], '/').'/';
}
$block_params['t'] = $module_prefix.$this->SelectParam($params, $module_key.'_template,'.$module_key.'_t,template,t');
if ($block_params['t'] == $current_template || in_array($module_data['Var'], $skip_prefixes)) continue;
$no_data = $this->SelectParam($params, $module_key.'_block_no_data,block_no_data');
if ($no_data) {
$block_params['block_no_data'] = $module_prefix.'/'.$no_data;
}
$ret .= $this->MyInclude($block_params);
}
return $ret;
}
function ModuleEnabled($params)
{
return $this->Application->isModuleEnabled( $params['module'] );
}
/*function Kernel_Scripts($params)
{
return '<script type="text/javascript" src="'.PROTOCOL.SERVER_NAME.BASE_PATH.'/kernel3/js/grid.js"></script>';
}*/
/*function GetUserPermission($params)
{
// echo"GetUserPermission $params[name]";
if ($this->Application->RecallVar('user_type') == 1)
return 1;
else {
$perm_name = $params[name];
$aPermissions = unserialize($this->Application->RecallVar('user_permissions'));
if ($aPermissions)
return $aPermissions[$perm_name];
}
}*/
/**
* Set's parser block param value
*
* @param Array $params
* @access public
*/
function AddParam($params)
{
$parser =& $this->Application->Parser; // recallObject('TemplateParser');
foreach ($params as $param => $value) {
$this->Application->SetVar($param, $value);
$parser->SetParam($param, $value);
$parser->AddParam('/\$'.$param.'/', $value);
}
}
/*function ParseToVar($params)
{
$var = $params['var'];
$tagdata = $params['tag'];
$parser =& $this->Application->Parser; //recallObject('TemplateParser');
$res = $this->Application->ProcessTag($tagdata);
$parser->SetParam($var, $res);
$parser->AddParam('/\$'.$var.'/', $res);
return '';
}*/
/*function TagNotEmpty($params)
{
$tagdata = $params['tag'];
$res = $this->Application->ProcessTag($tagdata);
return $res != '';
}*/
/*function TagEmpty($params)
{
return !$this->TagNotEmpty($params);
}*/
/**
* Parses block and returns result
*
* @param Array $params
* @return string
* @access public
*/
function ParseBlock($params)
{
$parser =& $this->Application->Parser; // recallObject('TemplateParser');
return $parser->ParseBlock($params);
}
function RenderElement($params)
{
if (isset($params['design']) && $params['design']) {
$block_name = $params['name'];
if ($block_name != '__this__') {
// prepare content
$block_params = $params;
$block_params['template'] = $block_name;
$block_params['return_params'] = 1;
$block_params['strip_nl'] = 2;
$block_content = $this->MyInclude($block_params);
if (isset($params['data_exists']) && $params['data_exists'] && !$block_content) {
return '';
}
// prepare design
$block_params = Array (
'content' => $block_content,
);
}
$block_params['name'] = $params['design'];
return $this->Application->ParseBlock($block_params, 1);
}
return $this->ParseBlock($params);
}
function RenderElements($params)
{
if (!isset($params['elements']) || !$params['elements']) return;
$elements = explode(',', $params['elements']);
if (isset($params['skip']) && $params['skip']) {
$tmp_skip = explode(',', $params['skip']);
foreach ($tmp_skip as $elem) {
$skip[] = trim($elem);
}
}
else {
$skip = array();
}
unset($params['elements']);
$o = '';
foreach ($elements as $an_element)
{
$cur = trim($an_element);
if (in_array($cur,$skip) || !$cur) continue;
$pass_params = $params;
$pass_params['name'] = $cur;
$o .= $this->RenderElement($pass_params);
}
return $o;
}
/**
* Checks if debug mode is on
*
* @param Array $params
* @return bool
* @access public
*/
function IsDebugMode($params)
{
return $this->Application->isDebugMode();
}
function MassParse($params)
{
$qty = $params['qty'];
$block = $params['block'];
$mode = $params['mode'];
$o = '';
if ($mode == 'func') {
$func = create_function('$params', '
$o = \'<tr>\';
$o.= \'<td>a\'.$params[\'param1\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param2\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param3\'].\'</td>\';
$o.= \'<td>a\'.$params[\'param4\'].\'</td>\';
$o.= \'</tr>\';
return $o;
');
for ($i=1; $i<$qty; $i++) {
$block_params['param1'] = rand(1, 10000);
$block_params['param2'] = rand(1, 10000);
$block_params['param3'] = rand(1, 10000);
$block_params['param4'] = rand(1, 10000);
$o .= $func($block_params);
}
return $o;
}
$block_params['name'] = $block;
for ($i=0; $i<$qty; $i++) {
$block_params['param1'] = rand(1, 10000);
$block_params['param2'] = rand(1, 10000);
$block_params['param3'] = rand(1, 10000);
$block_params['param4'] = rand(1, 10000);
$block_params['passed'] = $params['passed'];
$block_params['prefix'] = 'm';
$o.= $this->Application->ParseBlock($block_params, 1);
}
return $o;
}
function LoggedIn($params)
{
return $this->Application->LoggedIn();
}
/**
* Allows to check if permission exists directly in template and perform additional actions if required
*
* @param Array $params
* @return bool
*/
function CheckPermission($params)
{
$perm_helper =& $this->Application->recallObject('PermissionsHelper');
return $perm_helper->TagPermissionCheck($params);
}
/**
* Checks if user is logged in and if not redirects it to template passed
*
* @param Array $params
*/
function RequireLogin($params)
{
$t = $this->Application->GetVar('t');
if ($next_t = getArrayValue($params, 'next_template')) {
$t = $next_t;
}
// check by permissions: begin
if ((isset($params['perm_event']) && $params['perm_event']) ||
(isset($params['perm_prefix']) && $params['perm_prefix']) ||
(isset($params['permissions']) && $params['permissions'])) {
$perm_helper =& $this->Application->recallObject('PermissionsHelper');
/* @var $perm_helper kPermissionsHelper */
$perm_status = $perm_helper->TagPermissionCheck($params);
if (!$perm_status) {
list($redirect_template, $redirect_params) = $perm_helper->getPermissionTemplate($params);
$this->Application->Redirect($redirect_template, $redirect_params);
}
else {
return ;
}
}
// check by permissions: end
// check by configuration value: begin
$condition = getArrayValue($params, 'condition');
if (!$condition) {
$condition = true;
}
else {
if (substr($condition, 0, 1) == '!') {
$condition = !$this->Application->ConfigValue(substr($condition, 1));
}
else {
$condition = $this->Application->ConfigValue($condition);
}
}
// check by configuration value: end
// check by belonging to group: begin
$group = $this->SelectParam($params, 'group');
$group_access = true;
if ($group) {
$conn =& $this->Application->GetADODBConnection();
$group_id = $conn->GetOne('SELECT GroupId FROM '.TABLE_PREFIX.'PortalGroup WHERE Name = '.$conn->qstr($group));
if ($group_id) {
$groups = explode(',', $this->Application->RecallVar('UserGroups'));
$group_access = in_array($group_id, $groups);
}
}
// check by belonging to group: end
if ((!$this->Application->LoggedIn() || !$group_access) && $condition) {
$redirect_params = $this->Application->HttpQuery->getRedirectParams();
$redirect_params['next_template'] = $t;
if (array_key_exists('pass_category', $params)) {
$redirect_params['pass_category'] = $params['pass_category'];
}
if ( $this->Application->LoggedIn() && !$group_access) {
$this->Application->Redirect( $params['no_group_perm_template'], $redirect_params);
}
$redirect_params['lang_mode'] = ''; // if expiration happens while editing language it will be in temp mode
$redirect_params['m_wid'] = ''; // remove wid, otherwise parent window may add wid to its name breaking all the frameset (for <a> targets)
$this->Application->Redirect($params['login_template'], $redirect_params);
}
}
function IsMember($params)
{
$group = getArrayValue($params, 'group');
$conn =& $this->Application->DB;
$group_id = $conn->GetOne('SELECT GroupId FROM '.TABLE_PREFIX.'PortalGroup WHERE Name = '.$conn->qstr($group));
if ($group_id) {
$groups = explode(',', $this->Application->RecallVar('UserGroups'));
$group_access = in_array($group_id, $groups);
}
return $group_access;
}
/**
* Checks if SSL is on and redirects to SSL URL if needed
* If SSL_URL is not defined in config - the tag does not do anything
* If for_logged_in_only="1" exits if user is not logged in.
* If called without params forces https right away. If called with by_config="1" checks the
* Require SSL setting from General Config and if it is ON forces https
*
* @param unknown_type $params
*/
function CheckSSL($params)
{
- $ssl = $this->Application->ConfigValue('SSL_URL');
+ $ssl = $this->Application->IsAdmin() ? $this->Application->ConfigValue('AdminSSL_URL') : false;
+
+ if (!$ssl) {
+ // not in admin or admin ssl url is empty
+ $ssl = $this->Application->ConfigValue('SSL_URL');
+ }
+
if (!$ssl) return; //SSL URL is not set - no way to require SSL
$require = false;
if (isset($params['mode']) && $params['mode'] == 'required') {
$require = true;
if (isset($params['for_logged_in_only']) && $params['for_logged_in_only'] && !$this->Application->LoggedIn()) {
$require = false;
}
if (isset($params['condition'])) {
if (!$this->Application->ConfigValue($params['condition'])) {
$require = false;
}
}
}
$http_query =& $this->Application->recallObject('HTTPQuery');
$pass = $http_query->getRedirectParams();
if ($require) {
if (PROTOCOL == 'https://') {
$this->Application->SetVar('__KEEP_SSL__', 1);
return;
}
$this->Application->Redirect('', array_merge_recursive2($pass, Array('__SSL__' => 1)));
}
else {
if (PROTOCOL == 'https://' && $this->Application->ConfigValue('Force_HTTP_When_SSL_Not_Required')) {
if ($this->Application->GetVar('__KEEP_SSL__')) return;
$pass = array('pass'=>'m', 'm_cat_id'=>0);
$this->Application->Redirect('', array_merge_recursive2($pass, Array('__SSL__' => 0)));
}
}
}
function ConstOn($params)
{
$name = $this->SelectParam($params,'name,const');
return constOn($name);
}
function SetDefaultCategory($params)
{
$category_id = $this->Application->findModule('Name', $params['module'], 'RootCat');
$this->Application->SetVar('m_cat_id', $category_id);
}
function XMLTemplate($params)
{
safeDefine('DBG_SKIP_REPORTING', 1);
if (isset($params['cache']) && $params['cache']) {
$nextyear = intval(date('Y') + 1);
$format = "D, d M Y H:i:s";
$expiration = gmdate($format, mktime() + $params['cache']).' GMT';
$last_modified = mktime();
header ('Cache-Control: public, cache, max-age='.$params['cache']);
header ("Expires: $expiration");
header ('Pragma: public');
// Getting headers sent by the client.
$headers = request_headers();
// Checking if the client is validating his cache and if it is current.
if (isset($headers['If-Modified-Since']) && (strtotime($headers['If-Modified-Since']) > $last_modified-$params['cache'])) {
// Client's cache IS current, so we just respond '304 Not Modified'.
header('Last-Modified: '.date($format, strtotime($headers['If-Modified-Since'])).' GMT', true, 304);
exit();
} else {
// Image not cached or cache outdated, we respond '200 OK' and output the image.
header('Last-Modified: '.gmdate($format, $last_modified).' GMT', true, 200);
}
}
return $this->Application->XMLHeader(getArrayValue($params, 'xml_version'));
}
function Header($params)
{
header($params['data']);
}
function NoDebug($params)
{
if (!$this->Application->GetVar('debug')) {
define('DBG_SKIP_REPORTING', 1);
}
}
function RootCategoryName($params)
{
$root_phrase = $this->Application->ConfigValue('Root_Name');
return $this->Application->Phrase($root_phrase);
}
/**
* Allows to attach file directly from email event template
*
* @param Array $params
*/
function AttachFile($params)
{
$esender =& $application->recallObject('EmailSender'.(isset($params['special']) ? '.'.$params['special'] : ''));
/* @var $esender kEmailSendingHelper */
$path = FULL_PATH.'/'.$params['path'];
if (file_exists($path)) {
$esender->AddAttachment($path);
}
}
function CaptchaImage($params){
$captcha_helper =& $this->Application->recallObject('CaptchaHelper');
/* @var $captcha_helper kCaptchaHelper */
$captcha_helper->GenerateCaptchaImage(
$this->Application->RecallVar($this->Application->GetVar('var')),
$this->Application->GetVar('w'),
$this->Application->GetVar('h'),
true
);
}
function SID($params)
{
return $this->Application->GetSID();
}
function ModuleInfo($params)
{
return $this->Application->findModule($params['key'], $params['value'], $params['return']);
}
function Random($params)
{
return rand(1, 100000000);
}
/**
* Gets previously defined counter result
*
* @param Array $params
* @return int
*/
function GetCounter($params)
{
return $this->Application->getCounter($params['name'], $params);
}
/**
* Increments PageHit counter
*
* @param Array $params
* @return int
*/
function RegisterPageHit($params)
{
if ($this->Application->ConfigValue('UsePageHitCounter')) {
$db =& $this->Application->GetADODBConnection();
// get current counte
$sql = 'SELECT VariableValue
FROM '.TABLE_PREFIX.'ConfigurationValues
WHERE VariableName = "PageHitCounter"';
$page_counter = (int)$db->GetOne($sql);
$sql = 'UPDATE LOW_PRIORITY '.TABLE_PREFIX.'ConfigurationValues
SET VariableValue = '.($page_counter + 1).'
WHERE VariableName = "PageHitCounter"';
$db->Query($sql);
}
}
function Timestamp($params)
{
$format = isset($params['format']) ? $params['format'] : 'd.m.Y H:i:s';
return adodb_date($format);
}
}
Property changes on: branches/RC/core/kernel/processors/main_processor.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.80.2.13
\ No newline at end of property
+1.80.2.14
\ No newline at end of property
Index: branches/RC/core/kernel/application.php
===================================================================
--- branches/RC/core/kernel/application.php (revision 10714)
+++ branches/RC/core/kernel/application.php (revision 10715)
@@ -1,2783 +1,2791 @@
<?php
/**
* Basic class for Kernel3-based Application
*
* This class is a Facade for any other class which needs to deal with Kernel3 framework.<br>
* The class incapsulates the main run-cycle of the script, provide access to all other objects in the framework.<br>
* <br>
* The class is a singleton, which means that there could be only one instance of KernelApplication in the script.<br>
* This could be guranteed by NOT calling the class constuctor directly, but rather calling KernelApplication::Instance() method,
* which returns an instance of the application. The method gurantees that it will return exactly the same instance for any call.<br>
* See singleton pattern by GOF.
* @package kernel4
*/
class kApplication {
/**
* Is true, when Init method was called already, prevents double initialization
*
* @var bool
*/
var $InitDone = false;
/**
* Holds internal TemplateParser object
* @access private
* @var TemplateParser
*/
var $Parser;
/**
* New Parser (Experimental)
*
* @var NParser
*/
var $NParser;
/**
* Holds parser output buffer
* @access private
* @var string
*/
var $HTML;
/**
* Prevents request from beeing proceeded twice in case if application init is called mere then one time
*
* @var bool
* @todo This is not good anyway (by Alex)
*/
var $RequestProcessed = false;
/**
* The main Factory used to create
* almost any class of kernel and
* modules
*
* @access private
* @var kFactory
*/
var $Factory;
/**
* All ConfigurationValues table content (hash) here
*
* @var Array
* @access private
*/
var $ConfigHash = Array();
/**
* Ids of config variables used in current run (for caching)
*
* @var Array
* @access private
*/
var $ConfigCacheIds = array();
/**
* Template names, that will be used instead of regular templates
*
* @var Array
*/
var $ReplacementTemplates = Array ();
/**
* Reference to debugger
*
* @var Debugger
*/
var $Debugger = null;
/**
* Holds all phrases used
* in code and template
*
* @var PhrasesCache
*/
var $Phrases;
/**
* Modules table content, key - module name
*
* @var Array
*/
var $ModuleInfo = Array();
/**
* Holds DBConnection
*
* @var kDBConnection
*/
var $Conn = null;
/**
* Maintains list of user-defined error handlers
*
* @var Array
*/
var $errorHandlers = Array();
// performance needs:
/**
* Holds a refererence to httpquery
*
* @var kHttpQuery
*/
var $HttpQuery = null;
/**
* Holds a reference to UnitConfigReader
*
* @var kUnitConfigReader
*/
var $UnitConfigReader = null;
/**
* Holds a reference to Session
*
* @var Session
*/
var $Session = null;
/**
* Holds a ref to kEventManager
*
* @var kEventManager
*/
var $EventManager = null;
/**
* Ref to itself, needed because everybody used to write $this->Application, even inside kApplication
*
* @var kApplication
*/
var $Application = null;
/**
* Ref for TemplatesChache
*
* @var TemplatesCache
*/
var $TemplatesCache = null;
var $CompilationCache = array(); //used when compiling templates
var $CachedProcessors = array(); //used when running compiled templates
var $LambdaElements = 1; // for autonumbering unnamed RenderElements [any better place for this prop? KT]
/**
* Holds current NParser tag while parsing, can be used in error messages to display template file and line
*
* @var unknown_type
*/
var $CurrentNTag = null;
/**
* Memcache object pointer
*
* @var Memcache
*/
var $Memcached = null;
/**
* Returns kApplication instance anywhere in the script.
*
* This method should be used to get single kApplication object instance anywhere in the
* Kernel-based application. The method is guranteed to return the SAME instance of kApplication.
* Anywhere in the script you could write:
* <code>
* $application =& kApplication::Instance();
* </code>
* or in an object:
* <code>
* $this->Application =& kApplication::Instance();
* </code>
* to get the instance of kApplication. Note that we call the Instance method as STATIC - directly from the class.
* To use descendand of standard kApplication class in your project you would need to define APPLICATION_CLASS constant
* BEFORE calling kApplication::Instance() for the first time. If APPLICATION_CLASS is not defined the method would
* create and return default KernelApplication instance.
* @static
* @access public
* @return kApplication
*/
function &Instance()
{
static $instance = false;
if(!$instance)
{
safeDefine('APPLICATION_CLASS', 'kApplication');
$class = APPLICATION_CLASS;
$instance = new $class();
$instance->Application =& $instance;
}
return $instance;
}
function InitMemcached()
{
$memcached_servers = 'localhost:11211'; // $this->Application->ConfigValue('MemcachedServers');
if ($memcached_servers && class_exists('Memcache')) {
$this->Memcached = new Memcache();
$servers = explode(';', $memcached_servers);
foreach ($servers as $server) {
list ($server, $port) = strpos($server, ':') !== false ? explode(':', $server, 2) : Array ($server, 11211);
$this->Memcached->addServer($server, $port);
}
}
//try to set something to cache, if not working - set $this->Memcached to null
}
function CacheSet($name, $value, $expiration)
{
if (isset($this->Memcached)) {
return $this->Memcached->set($name, $value, 0, $expiration);
}
return false;
}
function CacheGet($name)
{
if (isset($this->Memcached)) {
return $this->Memcached->get($name);
}
return false;
}
/**
* Initializes the Application
*
* @access public
* @see kHTTPQuery
* @see Session
* @see TemplatesCache
* @return bool Was Init actually made now or before
*/
function Init()
{
if($this->InitDone) return false;
$this->InitMemcached();
if (!constOn('SKIP_OUT_COMPRESSION')) {
ob_start(); // collect any output from method (other then tags) into buffer
}
if(defined('DEBUG_MODE') && $this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) {
$this->Debugger->appendMemoryUsage('Application before Init:');
}
if (!$this->isDebugMode() && !constOn('DBG_ZEND_PRESENT')) {
error_reporting(0);
ini_set('display_errors', 0);
}
if (!constOn('DBG_ZEND_PRESENT')) {
$error_handler = set_error_handler( Array(&$this,'handleError') );
if ($error_handler) $this->errorHandlers[] = $error_handler;
}
$this->Conn = new kDBConnection(SQL_TYPE, Array(&$this, 'handleSQLError') );
$this->Conn->debugMode = $this->isDebugMode();
$this->Conn->Connect(SQL_SERVER, SQL_USER, SQL_PASS, SQL_DB);
$this->Factory = new kFactory();
$this->registerDefaultClasses();
$this->Phrases = new PhrasesCache();
$this->EventManager =& $this->Factory->makeClass('EventManager');
$this->Factory->Storage['EventManager'] =& $this->EventManager;
$this->RegisterDefaultBuildEvents();
$this->SetDefaultConstants();
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('Before UnitConfigReader');
}
$this->UnitConfigReader =& $this->recallObject('kUnitConfigReader');
$this->UnitConfigReader->scanModules(MODULES_PATH);
$this->registerModuleConstants();
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('After UnitConfigReader');
}
$rewrite_on = $this->ConfigValue('UseModRewrite');
// admin=1 - when front is browsed using admin session
$admin_on = getArrayValue($_REQUEST, 'admin') || $this->IsAdmin();
define('MOD_REWRITE', $rewrite_on && !$admin_on ? 1 : 0);
$this->HttpQuery =& $this->recallObject('HTTPQuery');
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('Processed HTTPQuery initial');
}
$this->Session =& $this->recallObject('Session');
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('Processed Session');
}
$this->HttpQuery->AfterInit();
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('Processed HTTPQuery AfterInit');
}
$this->LoadCache();
$this->InitConfig();
$this->Phrases->Init('phrases');
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('Loaded cache and phrases');
}
$this->UnitConfigReader->AfterConfigRead();
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->appendTimestamp('Processed AfterConfigRead');
}
/*// Module items are recalled during url parsing & PhrasesCache is needed already there,
// because it's used in their build events. That's why phrases cache initialization is
// called from kHTTPQuery in case when mod_rewrite is used
if (!$this->RewriteURLs()) {
$this->Phrases = new PhrasesCache();
}*/
if(!$this->RecallVar('UserGroups')) {
$session =& $this->recallObject('Session');
$user_groups = trim($session->GetField('GroupList'), ',');
if (!$user_groups) $user_groups = $this->ConfigValue('User_GuestGroup');
$this->StoreVar('UserGroups', $user_groups);
}
if ($this->GetVar('m_cat_id') === false) $this->SetVar('m_cat_id', 0);
if( !$this->RecallVar('curr_iso') ) $this->StoreVar('curr_iso', $this->GetPrimaryCurrency() );
$this->SetVar('visits_id', $this->RecallVar('visit_id') );
$language =& $this->recallObject( 'lang.current', null, Array('live_table' => true) );
if (preg_match('/utf-8/', $language->GetDBField('Charset'))) {
setlocale(LC_ALL, 'en_US.UTF-8');
mb_internal_encoding('UTF-8');
}
$this->ValidateLogin();
if( defined('DEBUG_MODE') && $this->isDebugMode() ) {
$this->Debugger->profileFinish('kernel4_startup');
}
$this->InitDone = true;
$this->HandleEvent( new kEvent('adm:OnStartup') );
return true;
}
/**
* Returns module information. Searches module by requested field
*
* @param string $field
* @param mixed $value
* @param string field value to returns, if not specified, then return all fields
* @param string field to return
* @return Array
*/
function findModule($field, $value, $return_field = null)
{
$found = false;
foreach ($this->ModuleInfo as $module_name => $module_info) {
if (strtolower($module_info[$field]) == strtolower($value)) {
$found = true;
break;
}
}
if ($found) {
return isset($return_field) ? $module_info[$return_field] : $module_info;
}
return false;
}
function refreshModuleInfo()
{
if (defined('IS_INSTALL') && IS_INSTALL && !$this->TableFound('Modules')) {
$this->registerModuleConstants();
return false;
}
$modules_helper =& $this->recallObject('ModulesHelper');
$this->ModuleInfo = $this->Conn->Query('SELECT * FROM '.TABLE_PREFIX.'Modules WHERE Loaded = 1 ORDER BY LoadOrder', 'Name');
$sql = 'SELECT *
FROM '.TABLE_PREFIX.'Modules
WHERE '.$modules_helper->getWhereClause().'
ORDER BY LoadOrder';
$this->ModuleInfo = $this->Conn->Query($sql, 'Name');
$this->registerModuleConstants();
}
/**
* Checks if passed language id if valid and sets it to primary otherwise
*
*/
function VerifyLanguageId()
{
$language_id = $this->GetVar('m_lang');
if (!$language_id) {
$language_id = 'default';
}
$this->SetVar('lang.current_id', $language_id );
$this->SetVar('m_lang', $language_id );
$lang_mode = $this->GetVar('lang_mode');
$this->SetVar('lang_mode', '');
$lang =& $this->recallObject('lang.current');
if ( !$lang->IsLoaded() || (!$this->Application->IsAdmin() && !$lang->GetDBField('Enabled')) ) {
if (!defined('IS_INSTALL')) $this->ApplicationDie('Unknown or disabled language');
}
$this->SetVar('lang_mode',$lang_mode);
}
/**
* Checks if passed theme id if valid and sets it to primary otherwise
*
*/
function VerifyThemeId()
{
if ($this->Application->IsAdmin()) {
safeDefine('THEMES_PATH', '/core/admin_templates');
return;
}
$path = $this->GetFrontThemePath();
if ($path === false) {
$this->ApplicationDie('No Primary Theme Selected or Current Theme is Unknown or Disabled');
}
safeDefine('THEMES_PATH', $path);
/*
$theme_id = $this->GetVar('m_theme');
if (!$theme_id) {
$theme_id = $this->GetDefaultThemeId();
if (!$theme_id) {
if (!defined('IS_INSTALL')) $this->ApplicationDie('No Primary Theme Selected');
}
}
$this->SetVar('m_theme', $theme_id);
$this->SetVar('theme.current_id', $theme_id ); // KOSTJA: this is to fool theme' getPassedId
$theme =& $this->recallObject('theme.current');
if (!$theme->IsLoaded() || !$theme->GetDBField('Enabled')) {
if (!defined('IS_INSTALL')) $this->ApplicationDie('Unknown or disabled theme');
}
safeDefine('THEMES_PATH', '/themes/'.$theme->GetDBField('Name'));
*/
}
function GetFrontThemePath($force=0)
{
static $path=null;
if (!$force && isset($path)) return $path;
$theme_id = $this->GetVar('m_theme');
if (!$theme_id) {
// $theme_id = $this->GetDefaultThemeId(1); //1 to force front-end mode!
$theme_id = 'default';
}
$this->SetVar('m_theme', $theme_id);
$this->SetVar('theme.current_id', $theme_id ); // KOSTJA: this is to fool theme' getPassedId
$theme =& $this->recallObject('theme.current');
if (!$theme->IsLoaded() || !$theme->GetDBField('Enabled')) {
return false;
}
$path = '/themes/'.$theme->GetDBField('Name');
return $path;
}
function GetDefaultLanguageId()
{
static $language_id = 0;
if ($language_id > 0) {
return $language_id;
}
$table = $this->getUnitOption('lang', 'TableName');
$id_field = $this->getUnitOption('lang', 'IDField');
$sql = 'SELECT '.$id_field.'
FROM '.$table.'
WHERE (PrimaryLang = 1) AND (Enabled = 1)';
$language_id = $this->Conn->GetOne($sql);
if (!$language_id && defined('IS_INSTALL') && IS_INSTALL) {
$language_id = 1;
}
return $language_id;
}
function GetDefaultThemeId($force_front=0)
{
static $theme_id = 0;
if($theme_id > 0) return $theme_id;
if (constOn('DBG_FORCE_THEME')) {
$theme_id = DBG_FORCE_THEME;
}
elseif (!$force_front && $this->IsAdmin()) {
$theme_id = 999;
}
else {
$table = $this->getUnitOption('theme','TableName');
$id_field = $this->getUnitOption('theme','IDField');
$sql = 'SELECT '.$id_field.'
FROM '.$table.'
WHERE (PrimaryTheme = 1) AND (Enabled = 1)';
$theme_id = $this->Conn->GetOne($sql);
}
return $theme_id;
}
function GetPrimaryCurrency()
{
if ($this->isModuleEnabled('In-Commerce')) {
$table = $this->getUnitOption('curr', 'TableName');
return $this->Conn->GetOne('SELECT ISO FROM '.$table.' WHERE IsPrimary = 1');
}
else {
return 'USD';
}
}
/**
* Registers default classes such as ItemController, GridController and LoginController
*
* Called automatically while initializing Application
* @access private
* @return void
*/
function RegisterDefaultClasses()
{
$this->registerClass('kTempTablesHandler', KERNEL_PATH.'/utility/temp_handler.php');
$this->registerClass('kEventManager', KERNEL_PATH.'/event_manager.php', 'EventManager');
$this->registerClass('kUnitConfigReader', KERNEL_PATH.'/utility/unit_config_reader.php');
$this->registerClass('kArray', KERNEL_PATH.'/utility/params.php');
$this->registerClass('Params', KERNEL_PATH.'/utility/params.php');
$this->registerClass('kHelper', KERNEL_PATH.'/kbase.php');
$this->registerClass('kCache', KERNEL_PATH.'/utility/cache.php', 'Cache', Array('Params'));
$this->registerClass('kHTTPQuery', KERNEL_PATH.'/utility/http_query.php', 'HTTPQuery', Array('Params') );
$this->registerClass('Session', KERNEL_PATH.'/session/session.php');
$this->registerClass('SessionStorage', KERNEL_PATH.'/session/session.php');
$this->registerClass('Params', KERNEL_PATH.'/utility/params.php', 'kActions');
$this->registerClass('kMultipleFilter', KERNEL_PATH.'/utility/filters.php');
$this->registerClass('kDBList', KERNEL_PATH.'/db/dblist.php');
$this->registerClass('kDBItem', KERNEL_PATH.'/db/dbitem.php');
$this->registerClass('kDBEventHandler', KERNEL_PATH.'/db/db_event_handler.php');
$this->registerClass('kTagProcessor', KERNEL_PATH.'/processors/tag_processor.php');
$this->registerClass('kMainTagProcessor', KERNEL_PATH.'/processors/main_processor.php','m_TagProcessor', 'kTagProcessor');
$this->registerClass('kDBTagProcessor', KERNEL_PATH.'/db/db_tag_processor.php', null, 'kTagProcessor');
$this->registerClass('TemplatesCache', KERNEL_PATH.'/parser/template.php',null, 'kDBTagProcessor');
$this->registerClass('Template', KERNEL_PATH.'/parser/template.php');
$this->registerClass('TemplateParser', KERNEL_PATH.'/parser/template_parser.php',null, 'kDBTagProcessor');
if (defined('NPARSER') && 'NPARSER') {
$this->registerClass('NParser', KERNEL_PATH.'/nparser/nparser.php');
}
$this->registerClass('kEmailSendingHelper', KERNEL_PATH.'/utility/email_send.php', 'EmailSender', Array('kHelper'));
$this->registerClass('kSocket', KERNEL_PATH.'/utility/socket.php', 'Socket');
if (file_exists(MODULES_PATH.'/in-commerce/units/currencies/currency_rates.php')) {
$this->registerClass('kCurrencyRates', MODULES_PATH.'/in-commerce/units/currencies/currency_rates.php');
}
$this->registerClass('FCKeditor', FULL_PATH.'/admin/editor/cmseditor/fckeditor.php'); // need this?
/* Moved from MyApplication */
$this->registerClass('Inp1Parser',KERNEL_PATH.'/../units/general/inp1_parser.php','Inp1Parser');
$this->registerClass('InpSession',KERNEL_PATH.'/../units/general/inp_ses_storage.php','Session');
$this->registerClass('InpSessionStorage',KERNEL_PATH.'/../units/general/inp_ses_storage.php','SessionStorage');
$this->registerClass('kCatDBItem',KERNEL_PATH.'/../units/general/cat_dbitem.php');
$this->registerClass('kCatDBItemExportHelper',KERNEL_PATH.'/../units/general/cat_dbitem_export.php', 'CatItemExportHelper');
$this->registerClass('kCatDBList',KERNEL_PATH.'/../units/general/cat_dblist.php');
$this->registerClass('kCatDBEventHandler',KERNEL_PATH.'/../units/general/cat_event_handler.php');
$this->registerClass('kCatDBTagProcessor',KERNEL_PATH.'/../units/general/cat_tag_processor.php');
// Do not move to config - this helper is used before configs are read
$this->registerClass('kModulesHelper', KERNEL_PATH.'/../units/general/helpers/modules.php', 'ModulesHelper');
/* End moved */
}
function RegisterDefaultBuildEvents()
{
$event_manager =& $this->recallObject('EventManager');
$event_manager->registerBuildEvent('kTempTablesHandler', 'OnTempHandlerBuild');
}
/**
* Returns item's filename that corresponds id passed. If possible, then get it from cache
*
* @param string $prefix
* @param int $id
* @return string
*/
function getFilename($prefix, $id, $category_id=null)
{
$filename = $this->getCache('filenames', $prefix.'_'.$id);
if ($filename === false) {
$table = $this->getUnitOption($prefix, 'TableName');
$id_field = $this->getUnitOption($prefix, 'IDField');
if ($prefix == 'c') {
if(!$id) {
$this->setCache('filenames', $prefix.'_'.$id, '');
return '';
}
// this allows to save 2 sql queries for each category
$sql = 'SELECT NamedParentPath, CachedCategoryTemplate, TreeLeft, TreeRight
FROM '.$table.'
WHERE '.$id_field.' = '.$this->Conn->qstr($id);
$category_data = $this->Conn->GetRow($sql);
$filename = $category_data['NamedParentPath'];
$this->setCache('category_templates', $id, $category_data['CachedCategoryTemplate']);
$this->setCache('category_tree', $id, $category_data['TreeLeft'] . ';' . $category_data['TreeRight']);
// $this->setCache('item_templates', $id, $category_data['CachedItemTemplate']);
}
else {
$resource_id = $this->Conn->GetOne('SELECT ResourceId FROM '.$table.' WHERE '.$id_field.' = '.$this->Conn->qstr($id));
if (is_null($category_id)) $category_id = $this->GetVar('m_cat_id');
$sql = 'SELECT Filename FROM '.TABLE_PREFIX.'CategoryItems WHERE ItemResourceId = '.$resource_id.' AND CategoryId = '.$category_id;
$filename = $this->Conn->GetOne($sql);
/*if (!$filename) {
$sql = 'SELECT Filename FROM '.TABLE_PREFIX.'CategoryItems WHERE ItemResourceId = '.$resource_id.' AND PrimaryCat = 1';
$filename = $this->Conn->GetOne($sql);
}*/
/*$sql = 'SELECT Filename
FROM '.$table.'
WHERE '.$id_field.' = '.$this->Conn->qstr($id);
$filename = $this->Conn->GetOne($sql);*/
}
$this->setCache('filenames', $prefix.'_'.$id, $filename);
}
return $filename;
}
/**
* Adds new value to cache $cache_name and identified by key $key
*
* @param string $cache_name cache name
* @param int $key key name to add to cache
* @param mixed $value value of chached record
*/
function setCache($cache_name, $key, $value, $expiration=3600)
{
$cache =& $this->recallObject('Cache');
/* @var $cache kCache */
return $cache->setCache($cache_name, $key, $value, $expiration);
}
/**
* Returns cached $key value from cache named $cache_name
*
* @param string $cache_name cache name
* @param int $key key name from cache
* @return mixed
*/
function getCache($cache_name, $key)
{
$cache =& $this->recallObject('Cache');
return $cache->getCache($cache_name, $key);
}
/**
* Defines default constants if it's not defined before - in config.php
*
* @access private
*/
function SetDefaultConstants() // it's defined in startup.php - can be removed??
{
safeDefine('SERVER_NAME', $_SERVER['HTTP_HOST']);
}
/**
* Registers each module specific constants if any found
*
*/
function registerModuleConstants()
{
if (file_exists(KERNEL_PATH.'/constants.php')) {
k4_include_once(KERNEL_PATH.'/constants.php');
}
if (!$this->ModuleInfo) return false;
foreach($this->ModuleInfo as $module_name => $module_info)
{
$module_path = '/'.$module_info['Path'];
$contants_file = FULL_PATH.$module_path.'constants.php';
if( file_exists($contants_file) ) k4_include_once($contants_file);
}
return true;
}
function ProcessRequest()
{
$event_manager =& $this->recallObject('EventManager');
/* @var $event_manager kEventManager */
if($this->isDebugMode() && constOn('DBG_SHOW_HTTPQUERY')) {
$this->Debugger->appendHTML('HTTPQuery:');
$this->Debugger->dumpVars($this->HttpQuery->_Params);
}
$event_manager->ProcessRequest();
$event_manager->RunRegularEvents(reBEFORE);
$this->RequestProcessed = true;
}
/**
* Actually runs the parser against current template and stores parsing result
*
* This method gets t variable passed to the script, loads the template given in t variable and
* parses it. The result is store in {@link $this->HTML} property.
* @access public
* @return void
*/
function Run()
{
if($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) {
$this->Debugger->appendMemoryUsage('Application before Run:');
}
if ($this->IsAdmin()) {
// for permission checking in events & templates
$this->LinkVar('module'); // for common configuration templates
$this->LinkVar('section'); // for common configuration templates
if ($this->GetVar('m_opener') == 'p') {
$this->LinkVar('main_prefix'); // window prefix, that opened selector
$this->LinkVar('dst_field'); // field to set value choosed in selector
// $this->LinkVar('return_template'); // template to go, when something was coosen from popup (from finalizePopup)
// $this->LinkVar('return_m'); // main env part to restore after popup will be closed (from finalizePopup)
}
if ($this->GetVar('ajax') == 'yes' && !$this->GetVar('debug_ajax')) {
// hide debug output from ajax requests automatically
define('DBG_SKIP_REPORTING', 1);
}
}
if (!$this->RequestProcessed) $this->ProcessRequest();
$this->InitParser();
$t = $this->GetVar('t');
if ($this->isModuleEnabled('In-Edit')) {
$cms_handler =& $this->recallObject('cms_EventHandler');
if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) {
$t = $cms_handler->GetDesignTemplate();
}
/*else {
$cms_handler->SetCatByTemplate();
}*/
}
if ($this->isModuleEnabled('Proj-CMS')) {
$cms_handler =& $this->recallObject('st_EventHandler');
if (!$this->TemplatesCache->TemplateExists($t) && !$this->IsAdmin()) {
$t = $cms_handler->GetDesignTemplate();
}
}
if($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) {
$this->Debugger->appendMemoryUsage('Application before Parsing:');
}
if (defined('NPARSER') && 'NPARSER') {
$this->HTML = $this->NParser->Run( $t );
}
else {
$this->HTML = $this->Parser->ParseTemplate( $t );
}
if ($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) {
$this->Debugger->appendMemoryUsage('Application after Parsing:');
}
}
function InitParser()
{
if (defined('NPARSER') && 'NPARSER') {
if( !is_object($this->NParser) ) {
$this->NParser =& $this->recallObject('NParser');
$this->TemplatesCache =& $this->recallObject('TemplatesCache');
// can be removed in future
// $this->Parser =& $this->recallObject('TemplateParser');
$this->Parser =& $this->NParser;
}
}
else {
if( !is_object($this->Parser) ) {
$this->Parser =& $this->recallObject('TemplateParser');
$this->TemplatesCache =& $this->recallObject('TemplatesCache');
}
}
}
/**
* Send the parser results to browser
*
* Actually send everything stored in {@link $this->HTML}, to the browser by echoing it.
* @access public
* @return void
*/
function Done()
{
$this->HandleEvent( new kEvent('adm:OnBeforeShutdown') );
if ($this->isDebugMode() && constOn('DBG_PROFILE_MEMORY')) {
$this->Debugger->appendMemoryUsage('Application before Done:');
}
if ($this->GetVar('admin')) {
$reg = '/('.preg_quote(BASE_PATH, '/').'.*\.html)(#.*){0,1}(")/sU';
$this->HTML = preg_replace($reg, "$1?admin=1$2$3", $this->HTML);
}
//eval("?".">".$this->HTML);
if ($this->isDebugMode()) {
$this->EventManager->RunRegularEvents(reAFTER);
$this->Session->SaveData();
if (constOn('DBG_CACHE')) {
$cache =& $this->recallObject('Cache');
$cache->printStatistics();
}
$this->HTML = ob_get_clean() . $this->HTML . $this->Debugger->printReport(true);
}
else {
$this->HTML = ob_get_clean().$this->HTML;
}
if ($this->UseOutputCompression()) {
header('Content-Encoding: gzip');
$compression_level = $this->ConfigValue('OutputCompressionLevel');
if ($compression_level < 0 || $compression_level > 9) $compression_level = 7;
echo gzencode($this->HTML, $compression_level);
}
else {
echo $this->HTML;
}
$this->UpdateCache();
flush();
if (!$this->isDebugMode()) {
$this->EventManager->RunRegularEvents(reAFTER);
$this->Session->SaveData();
}
if (defined('DBG_CAPTURE_STATISTICS') && DBG_CAPTURE_STATISTICS && !$this->IsAdmin()) {
$this->_storeStatistics();
}
}
/**
* Stores script execution statistics to database
*
*/
function _storeStatistics()
{
global $start;
$script_time = getmicrotime() - $start;
$query_statistics = $this->Conn->getQueryStatistics(); // time & count
$sql = 'SELECT *
FROM ' . TABLE_PREFIX . 'StatisticsCapture
WHERE TemplateName = "' . $this->GetVar('t') . '"';
$data = $this->Conn->GetRow($sql);
if ($data) {
$this->_updateAverageStatistics($data, 'ScriptTime', $script_time);
$this->_updateAverageStatistics($data, 'SqlTime', $query_statistics['time']);
$this->_updateAverageStatistics($data, 'SqlCount', $query_statistics['count']);
$data['Hits']++;
$data['LastHit'] = adodb_mktime();
$this->Conn->doUpdate($data, TABLE_PREFIX . 'StatisticsCapture', 'StatisticsId = ' . $data['StatisticsId']);
}
else {
$data['ScriptTimeMin'] = $data['ScriptTimeAvg'] = $data['ScriptTimeMax'] = $script_time;
$data['SqlTimeMin'] = $data['SqlTimeAvg'] = $data['SqlTimeMax'] = $query_statistics['time'];
$data['SqlCountMin'] = $data['SqlCountAvg'] = $data['SqlCountMax'] = $query_statistics['count'];
$data['TemplateName'] = $this->GetVar('t');
$data['Hits'] = 1;
$data['LastHit'] = adodb_mktime();
$this->Conn->doInsert($data, TABLE_PREFIX . 'StatisticsCapture');
}
}
/**
* Calculates average time for statistics
*
* @param Array $data
* @param string $field_prefix
* @param float $current_value
*/
function _updateAverageStatistics(&$data, $field_prefix, $current_value)
{
$data[$field_prefix . 'Avg'] = (($data['Hits'] * $data[$field_prefix . 'Avg']) + $current_value) / ($data['Hits'] + 1);
if ($current_value < $data[$field_prefix . 'Min']) {
$data[$field_prefix . 'Min'] = $current_value;
}
if ($current_value > $data[$field_prefix . 'Max']) {
$data[$field_prefix . 'Max'] = $current_value;
}
}
function logSlowQuery($slow_sql, $time)
{
$query_crc = crc32($slow_sql);
$sql = 'SELECT *
FROM ' . TABLE_PREFIX . 'SlowSqlCapture
WHERE QueryCrc = ' . $query_crc;
$data = $this->Conn->Query($sql, null, true);
if ($data) {
$this->_updateAverageStatistics($data, 'Time', $time);
$template_names = explode(',', $data['TemplateNames']);
array_push($template_names, $this->GetVar('t'));
$data['TemplateNames'] = implode(',', array_unique($template_names));
$data['Hits']++;
$data['LastHit'] = adodb_mktime();
$this->Conn->doUpdate($data, TABLE_PREFIX . 'SlowSqlCapture', 'CaptureId = ' . $data['CaptureId']);
}
else {
$data['TimeMin'] = $data['TimeAvg'] = $data['TimeMax'] = $time;
$data['SqlQuery'] = $slow_sql;
$data['QueryCrc'] = $query_crc;
$data['TemplateNames'] = $this->GetVar('t');
$data['Hits'] = 1;
$data['LastHit'] = adodb_mktime();
$this->Conn->doInsert($data, TABLE_PREFIX . 'SlowSqlCapture');
}
}
/**
* Checks if output compression options is available
*
* @return string
*/
function UseOutputCompression()
{
if (constOn('IS_INSTALL') || constOn('DBG_ZEND_PRESENT') || constOn('SKIP_OUT_COMPRESSION')) return false;
return $this->ConfigValue('UseOutputCompression') && function_exists('gzencode') && strstr($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip');
}
// Facade
/**
* Returns current session id (SID)
* @access public
* @return longint
*/
function GetSID()
{
$session =& $this->recallObject('Session');
return $session->GetID();
}
function DestroySession()
{
$session =& $this->recallObject('Session');
$session->Destroy();
}
/**
* Returns variable passed to the script as GET/POST/COOKIE
*
* @access public
* @param string $name Name of variable to retrieve
* @param int $default default value returned in case if varible not present
* @return mixed
*/
function GetVar($name, $default = false)
{
// $http_query =& $this->recallObject('HTTPQuery');
return isset($this->HttpQuery->_Params[$name]) ? $this->HttpQuery->_Params[$name] : $default;
}
/**
* Returns ALL variables passed to the script as GET/POST/COOKIE
*
* @access public
* @return array
*/
function GetVars()
{
return $this->HttpQuery->GetParams();
}
/**
* Set the variable 'as it was passed to the script through GET/POST/COOKIE'
*
* This could be useful to set the variable when you know that
* other objects would relay on variable passed from GET/POST/COOKIE
* or you could use SetVar() / GetVar() pairs to pass the values between different objects.<br>
*
* This method is formerly known as $this->Session->SetProperty.
* @param string $var Variable name to set
* @param mixed $val Variable value
* @access public
* @return void
*/
function SetVar($var,$val)
{
// $http_query =& $this->recallObject('HTTPQuery');
return $this->HttpQuery->Set($var, $val);
}
/**
* Deletes kHTTPQuery variable
*
* @param string $var
* @todo think about method name
*/
function DeleteVar($var)
{
return $this->HttpQuery->Remove($var);
}
/**
* Deletes Session variable
*
* @param string $var
*/
function RemoveVar($var)
{
return $this->Session->RemoveVar($var);
}
function RemovePersistentVar($var)
{
return $this->Session->RemovePersistentVar($var);
}
/**
* Restores Session variable to it's db version
*
* @param string $var
*/
function RestoreVar($var)
{
return $this->Session->RestoreVar($var);
}
/**
* Returns session variable value
*
* Return value of $var variable stored in Session. An optional default value could be passed as second parameter.
*
* @see SimpleSession
* @access public
* @param string $var Variable name
* @param mixed $default Default value to return if no $var variable found in session
* @return mixed
*/
function RecallVar($var,$default=false)
{
return $this->Session->RecallVar($var,$default);
}
function RecallPersistentVar($var, $default = false)
{
return $this->Session->RecallPersistentVar($var, $default);
}
/**
* Stores variable $val in session under name $var
*
* Use this method to store variable in session. Later this variable could be recalled.
* @see RecallVar
* @access public
* @param string $var Variable name
* @param mixed $val Variable value
*/
function StoreVar($var, $val)
{
$session =& $this->recallObject('Session');
$this->Session->StoreVar($var, $val);
}
function StorePersistentVar($var, $val)
{
$this->Session->StorePersistentVar($var, $val);
}
function StoreVarDefault($var, $val)
{
$session =& $this->recallObject('Session');
$this->Session->StoreVarDefault($var, $val);
}
/**
* Links HTTP Query variable with session variable
*
* If variable $var is passed in HTTP Query it is stored in session for later use. If it's not passed it's recalled from session.
* This method could be used for making sure that GetVar will return query or session value for given
* variable, when query variable should overwrite session (and be stored there for later use).<br>
* This could be used for passing item's ID into popup with multiple tab -
* in popup script you just need to call LinkVar('id', 'current_id') before first use of GetVar('id').
* After that you can be sure that GetVar('id') will return passed id or id passed earlier and stored in session
* @access public
* @param string $var HTTP Query (GPC) variable name
* @param mixed $ses_var Session variable name
* @param mixed $default Default variable value
*/
function LinkVar($var, $ses_var = null, $default = '')
{
if (!isset($ses_var)) $ses_var = $var;
if ($this->GetVar($var) !== false) {
$this->StoreVar($ses_var, $this->GetVar($var));
}
else {
$this->SetVar($var, $this->RecallVar($ses_var, $default));
}
}
/**
* Returns variable from HTTP Query, or from session if not passed in HTTP Query
*
* The same as LinkVar, but also returns the variable value taken from HTTP Query if passed, or from session if not passed.
* Returns the default value if variable does not exist in session and was not passed in HTTP Query
*
* @see LinkVar
* @access public
* @param string $var HTTP Query (GPC) variable name
* @param mixed $ses_var Session variable name
* @param mixed $default Default variable value
* @return mixed
*/
function GetLinkedVar($var, $ses_var = null, $default = '')
{
$this->LinkVar($var, $ses_var, $default);
return $this->GetVar($var);
}
function AddBlock($name, $tpl)
{
$this->cache[$name] = $tpl;
}
/* Seems to be not used anywhere... /Kostja
function SetTemplateBody($title,$body)
{
$templates_cache =& $this->recallObject('TemplatesCache');
$templates_cache->SetTemplateBody($title,$body);
}*/
function ProcessTag($tag_data)
{
$a_tag = new Tag($tag_data,$this->Parser);
return $a_tag->DoProcessTag();
}
function ProcessParsedTag($prefix, $tag, $params)
{
if (defined('NPARSER') && NPARSER) {
$p = $this->Parser->GetProcessor($prefix);
return $p->ProcessParsedTag($tag, $params, $prefix);
}
$a_tag = new Tag('',$this->Parser);
$a_tag->Tag = $tag;
$tmp=$this->Application->processPrefix($prefix);
$a_tag->Processor = $tmp['prefix'];
$a_tag->Special = $tmp['special'];
$a_tag->NamedParams = $params;
return $a_tag->DoProcessTag();
}
/**
* Return ADODB Connection object
*
* Returns ADODB Connection object already connected to the project database, configurable in config.php
* @access public
* @return kDBConnection
*/
function &GetADODBConnection()
{
return $this->Conn;
}
function ParseBlock($params,$pass_params=0,$as_template=false)
{
if (substr($params['name'], 0, 5) == 'html:') return substr($params['name'], 6);
return $this->Parser->ParseBlock($params, $pass_params, $as_template);
}
/**
* Returns index file, that could be passed as parameter to method, as parameter to tag and as constant or not passed at all
*
* @param string $prefix
* @param string $index_file
* @param Array $params
* @return string
*/
function getIndexFile($prefix, $index_file, &$params)
{
if (isset($params['index_file'])) {
$index_file = $params['index_file'];
unset($params['index_file']);
return $index_file;
}
if (isset($index_file)) {
return $index_file;
}
if (defined('INDEX_FILE')) {
return INDEX_FILE;
}
$cut_prefix = trim(BASE_PATH, '/').'/'.trim($prefix, '/');
return trim(preg_replace('/'.preg_quote($cut_prefix, '/').'(.*)/', '\\1', $_SERVER['PHP_SELF']), '/');
}
/**
* Return href for template
*
* @access public
* @param string $t Template path
* @var string $prefix index.php prefix - could be blank, 'admin'
*/
function HREF($t, $prefix='', $params=null, $index_file=null)
{
if(!$t) $t = $this->GetVar('t'); // moved from kMainTagProcessor->T()
if ($this->isModuleEnabled('Proj-CMS')) {
$t = preg_replace('/^Content\//', '', $t);
}
/*if ($this->GetVar('skip_last_template')) {
$params['opener'] = 'p';
$this->SetVar('m_opener', 'p');
}
if ($t == 'incs/close_popup') {
// because this template closes the popup and we don't need popup mark here anymore
$params['m_opener'] = 's';
}*/
if( substr($t, -4) == '.tpl' ) $t = substr($t, 0, strlen($t) - 4 );
if ( $this->IsAdmin() && $prefix == '') $prefix = ADMIN_DIRECTORY;
if ( $this->IsAdmin() && $prefix == '_FRONT_END_') $prefix = '';
$index_file = $this->getIndexFile($prefix, $index_file, $params);
if (isset($params['_auto_prefix_'])) {
unset($params['_auto_prefix_']); // this is parser-related param, do not need to pass it here
}
$ssl = isset($params['__SSL__']) ? $params['__SSL__'] : null;
if ($ssl !== null) {
$session =& $this->recallObject('Session');
$cookie_url = trim($session->CookieDomain.$session->CookiePath, '/.');
if ($ssl) {
- $target_url = $this->ConfigValue('SSL_URL');
+ $target_url = defined('ADMIN') && ADMIN ? $this->ConfigValue('AdminSSL_URL') : false;
+ if (!$target_url) {
+ $target_url = $this->ConfigValue('SSL_URL');
+ }
}
else {
$target_url = 'http://'.DOMAIN.$this->ConfigValue('Site_Path');
}
if (!preg_match('#'.preg_quote($cookie_url).'#', $target_url)) {
$session->SetMode(smGET_ONLY);
}
}
if (isset($params['opener']) && $params['opener'] == 'u') {
$wid = $this->Application->GetVar('m_wid');
$stack_name = rtrim('opener_stack_'.$wid, '_');
$opener_stack = $this->RecallVar($stack_name);
if ($opener_stack && $opener_stack != serialize(Array())) {
$opener_stack = unserialize($opener_stack);
list($index_file, $env) = explode('|', $opener_stack[count($opener_stack) - 1]);
$ret = $this->BaseURL($prefix, $ssl).$index_file.'?'.ENV_VAR_NAME.'='.$env;
if ( getArrayValue($params,'escape') ) $ret = addslashes($ret);
if (isset($params['m_opener']) && $params['m_opener'] == 'u') {
array_pop($opener_stack);
if (!$opener_stack) {
$this->RemoveVar($stack_name);
// remove popups last templates, because popup is closing now
$this->RemoveVar('last_template_'.$wid);
$this->RemoveVar('last_template_popup_'.$wid);
// don't save popups last templates again :)
$this->SetVar('skip_last_template', 1);
}
else {
$this->StoreVar($stack_name, serialize($opener_stack));
}
}
return $ret;
}
else {
//define('DBG_REDIRECT', 1);
$t = $this->GetVar('t');
}
}
$pass = isset($params['pass']) ? $params['pass'] : '';
$pass_events = isset($params['pass_events']) ? $params['pass_events'] : false; // pass events with url
$map_link = '';
if( isset($params['anchor']) )
{
$map_link = '#'.$params['anchor'];
unset($params['anchor']);
}
if ( isset($params['no_amp']) )
{
$params['__URLENCODE__'] = $params['no_amp'];
unset($params['no_amp']);
}
$no_rewrite = false;
if( isset($params['__NO_REWRITE__']) )
{
$no_rewrite = true;
unset($params['__NO_REWRITE__']);
}
$force_rewrite = false;
if( isset($params['__MOD_REWRITE__']) )
{
$force_rewrite = true;
unset($params['__MOD_REWRITE__']);
}
$force_no_sid = false;
if( isset($params['__NO_SID__']) )
{
$force_no_sid = true;
unset($params['__NO_SID__']);
}
// append pass through variables to each link to be build
// $params = array_merge_recursive2($this->getPassThroughVariables($params), $params);
$params = array_merge($this->getPassThroughVariables($params), $params);
if ($force_rewrite || ($this->RewriteURLs($ssl) && !$no_rewrite))
{
$session =& $this->recallObject('Session');
if( $session->NeedQueryString() && !$force_no_sid ) $params['sid'] = $this->GetSID();
$url = $this->BuildEnv_NEW($t, $params, $pass, $pass_events);
$ret = $this->BaseURL($prefix, $ssl).$url.$map_link;
}
else
{
unset($params['pass_category']); // we don't need to pass it when mod_rewrite is off
$env = $this->BuildEnv($t, $params, $pass, $pass_events);
$ret = $this->BaseURL($prefix, $ssl).$index_file.'?'.$env.$map_link;
}
return $ret;
}
/**
* Returns variables with values that should be passed throught with this link + variable list
*
* @param Array $params
* @return Array
*/
function getPassThroughVariables(&$params)
{
static $cached_pass_through = null;
if (isset($params['no_pass_through']) && $params['no_pass_through']) {
unset($params['no_pass_through']);
return Array();
}
// because pass through is not changed during script run, then we can cache it
if (is_null($cached_pass_through)) {
$cached_pass_through = Array();
$pass_through = $this->Application->GetVar('pass_through');
if ($pass_through) {
// names of variables to pass to each link
$cached_pass_through['pass_through'] = $pass_through;
$pass_through = explode(',', $pass_through);
foreach ($pass_through as $pass_through_var) {
$cached_pass_through[$pass_through_var] = $this->Application->GetVar($pass_through_var);
}
}
}
return $cached_pass_through;
}
/**
* Returns sorted array of passed prefixes (to build url from)
*
* @param string $pass
* @return Array
*/
function getPassInfo($pass = 'all')
{
if (!$pass) $pass = 'all';
$pass = trim(
preg_replace(
'/(?<=,|\\A)all(?=,|\\z)/',
trim($this->GetVar('passed'), ','),
trim($pass, ',')
),
',');
if (!$pass) {
return Array();
}
$pass_info = array_unique( explode(',', $pass) ); // array( prefix[.special], prefix[.special] ...
sort($pass_info, SORT_STRING); // to be prefix1,prefix1.special1,prefix1.special2,prefix3.specialX
// ensure that "m" prefix is at the beginning
$main_index = array_search('m', $pass_info);
if ($main_index !== false) {
unset($pass_info[$main_index]);
array_unshift($pass_info, 'm');
}
return $pass_info;
}
function BuildEnv_NEW($t, $params, $pass='all', $pass_events = false)
{
// $session =& $this->recallObject('Session');
$force_admin = getArrayValue($params,'admin') || $this->GetVar('admin');
// if($force_admin) $sid = $this->GetSID();
$ret = '';
$env = '';
$encode = false;
if (isset($params['__URLENCODE__']))
{
$encode = $params['__URLENCODE__'];
unset($params['__URLENCODE__']);
}
if (isset($params['__SSL__'])) {
unset($params['__SSL__']);
}
$m_only = true;
$pass_info = $this->getPassInfo($pass);
if ($pass_info) {
if ($pass_info[0] == 'm') array_shift($pass_info);
$params['t'] = $t;
foreach($pass_info as $pass_index => $pass_element)
{
list($prefix) = explode('.', $pass_element);
$require_rewrite = $this->findModule('Var', $prefix) && $this->getUnitOption($prefix, 'CatalogItem');
if ($require_rewrite) {
// if next prefix is same as current, but with special => exclude current prefix from url
$next_prefix = getArrayValue($pass_info, $pass_index + 1);
if ($next_prefix) {
$next_prefix = substr($next_prefix, 0, strlen($prefix) + 1);
if ($prefix.'.' == $next_prefix) continue;
}
$a = $this->BuildModuleEnv_NEW($pass_element, $params, $pass_events);
if ($a) {
$ret .= '/'.$a;
$m_only = false;
}
}
else
{
$env .= ':'.$this->BuildModuleEnv($pass_element, $params, $pass_events);
}
}
if (!$m_only || preg_match('/c\.[-\d]*/', implode(',', $pass_info))) {
$params['pass_category'] = 1;
}
$ret = $this->BuildModuleEnv_NEW('m', $params, $pass_events).$ret;
$cat_processed = isset($params['category_processed']) && $params['category_processed'];
if ($cat_processed) {
unset($params['category_processed']);
}
if (!$m_only || !$cat_processed || !defined('EXP_DIR_URLS')) {
$ret = trim($ret, '/').'.html';
}
else {
$ret .= '/';
}
// $ret = trim($ret, '/').'/';
if($env) $params[ENV_VAR_NAME] = ltrim($env, ':');
}
unset($params['pass'], $params['opener'], $params['m_event']);
if ($force_admin) $params['admin'] = 1;
if( getArrayValue($params,'escape') )
{
$ret = addslashes($ret);
unset($params['escape']);
}
$ret = str_replace('%2F', '/', urlencode($ret));
$params_str = '';
$join_string = $encode ? '&' : '&amp;';
foreach ($params as $param => $value)
{
$params_str .= $join_string.$param.'='.$value;
}
$ret .= preg_replace('/^'.$join_string.'(.*)/', '?\\1', $params_str);
if ($encode) {
$ret = str_replace('\\', '%5C', $ret);
}
return $ret;
}
function BuildModuleEnv_NEW($prefix_special, &$params, $pass_events = false)
{
$event_params = Array('pass_events' => $pass_events, 'url_params' => $params);
$event = new kEvent($prefix_special.':BuildEnv', $event_params);
$this->HandleEvent($event);
$params = $event->getEventParam('url_params'); // save back unprocessed parameters
$ret = '';
if ($event->getEventParam('env_string')) {
$ret = trim( $event->getEventParam('env_string'), '/');
}
return $ret;
}
/**
* Builds env part that corresponds prefix passed
*
* @param string $prefix_special item's prefix & [special]
* @param Array $params url params
* @param bool $pass_events
*/
function BuildModuleEnv($prefix_special, &$params, $pass_events = false)
{
list($prefix) = explode('.', $prefix_special);
$query_vars = $this->getUnitOption($prefix, 'QueryString');
//if pass events is off and event is not implicity passed
if( !$pass_events && !isset($params[$prefix_special.'_event']) ) {
$params[$prefix_special.'_event'] = ''; // remove event from url if requested
//otherwise it will use value from get_var
}
if(!$query_vars) return '';
$tmp_string = Array(0 => $prefix_special);
foreach($query_vars as $index => $var_name)
{
//if value passed in params use it, otherwise use current from application
$var_name = $prefix_special.'_'.$var_name;
$tmp_string[$index] = isset( $params[$var_name] ) ? $params[$var_name] : $this->GetVar($var_name);
if ( isset($params[$var_name]) ) unset( $params[$var_name] );
}
$escaped = array();
foreach ($tmp_string as $tmp_val) {
$escaped[] = str_replace(Array('-',':'), Array('\-','\:'), $tmp_val);
}
$ret = implode('-', $escaped);
if ($this->getUnitOption($prefix, 'PortalStyleEnv') == true)
{
$ret = preg_replace('/^([a-zA-Z]+)-([0-9]+)-(.*)/','\\1\\2-\\3', $ret);
}
return $ret;
}
function BuildEnv($t, $params, $pass='all', $pass_events = false, $env_var = true)
{
$session =& $this->recallObject('Session');
$ssl = isset($params['__SSL__']) ? $params['__SSL__'] : 0;
$sid = $session->NeedQueryString() && !$this->RewriteURLs($ssl) ? $this->GetSID() : '';
// if (getArrayValue($params,'admin') == 1) $sid = $this->GetSID();
$ret = '';
if ($env_var) {
$ret = ENV_VAR_NAME.'=';
}
$ret .= $sid.(constOn('INPORTAL_ENV') ? '-' : ':');
$encode = false;
if (isset($params['__URLENCODE__'])) {
$encode = $params['__URLENCODE__'];
unset($params['__URLENCODE__']);
}
if (isset($params['__SSL__'])) {
unset($params['__SSL__']);
}
$env_string = '';
$category_id = isset($params['m_cat_id']) ? $params['m_cat_id'] : $this->GetVar('m_cat_id');
$item_id = 0;
$pass_info = $this->getPassInfo($pass);
if ($pass_info) {
if ($pass_info[0] == 'm') array_shift($pass_info);
foreach ($pass_info as $pass_element) {
list($prefix) = explode('.', $pass_element);
$require_rewrite = $this->findModule('Var', $prefix);
if ($require_rewrite) {
$item_id = isset($params[$pass_element.'_id']) ? $params[$pass_element.'_id'] : $this->GetVar($pass_element.'_id');
}
$env_string .= ':'.$this->BuildModuleEnv($pass_element, $params, $pass_events);
}
}
if (strtolower($t) == '__default__') {
// to put category & item templates into cache
$filename = $this->getFilename('c', $category_id);
if ($item_id) {
$mod_rw_helper =& $this->Application->recallObject('ModRewriteHelper');
$t = $mod_rw_helper->GetItemTemplate($category_id, $pass_element); // $pass_element should be the last processed element
// $t = $this->getCache('item_templates', $category_id);
}
elseif ($category_id) {
$t = $this->getCache('category_templates', $category_id);
}
else {
$t = 'index';
}
}
$ret .= $t.':'.$this->BuildModuleEnv('m', $params, $pass_events).$env_string;
unset($params['pass'], $params['opener'], $params['m_event']);
if ($this->GetVar('admin') && !isset($params['admin'])) {
$params['admin'] = 1;
}
if( isset($params['escape']) && $params['escape'] )
{
$ret = addslashes($ret);
unset($params['escape']);
}
$join_string = $encode ? '&' : '&amp;';
$params_str = '';
foreach ($params as $param => $value)
{
$params_str .= $join_string.$param.'='.$value;
}
$ret .= $params_str;
if ($encode) {
$ret = str_replace('\\', '%5C', $ret);
}
return $ret;
}
function BaseURL($prefix='', $ssl=null)
{
if ($ssl === null) {
return PROTOCOL.SERVER_NAME.(defined('PORT')?':'.PORT : '').rtrim(BASE_PATH, '/').$prefix.'/';
}
else {
if ($ssl) {
- return rtrim( $this->ConfigValue('SSL_URL'), '/').$prefix.'/';
+ $base_url = defined('ADMIN') && ADMIN ? $this->ConfigValue('AdminSSL_URL') : false;
+ if (!$base_url) {
+ $base_url = $this->ConfigValue('SSL_URL');
+ }
+
+ return rtrim($base_url, '/').$prefix.'/';
}
else {
return 'http://'.DOMAIN.(defined('PORT')?':'.PORT : '').rtrim( $this->ConfigValue('Site_Path'), '/').$prefix.'/';
}
}
}
function Redirect($t='', $params=null, $prefix='', $index_file=null)
{
$js_redirect = getArrayValue($params, 'js_redirect');
if (preg_match("/external:(.*)/", $t, $rets)) {
$location = $rets[1];
}
else {
if ($t == '' || $t === true) $t = $this->GetVar('t');
// pass prefixes and special from previous url
if( isset($params['js_redirect']) ) unset($params['js_redirect']);
if (!isset($params['pass'])) $params['pass'] = 'all';
if ($this->GetVar('ajax') == 'yes' && $t == $this->GetVar('t')) {
// redirects to the same template as current
$params['ajax'] = 'yes';
}
$params['__URLENCODE__'] = 1;
$location = $this->HREF($t, $prefix, $params, $index_file);
//echo " location : $location <br>";
}
$a_location = $location;
$location = "Location: $location";
if ($this->isDebugMode() && constOn('DBG_REDIRECT')) {
$this->Debugger->appendTrace();
echo "<b>Debug output above!!!</b> Proceed to redirect: <a href=\"$a_location\">$a_location</a><br>";
}
else {
if ($js_redirect) {
$this->SetVar('t', 'redirect');
$this->SetVar('redirect_to_js', addslashes($a_location) );
$this->SetVar('redirect_to', $a_location);
return true;
}
else {
if ($this->GetVar('ajax') == 'yes' && $t != $this->GetVar('t')) {
// redirection to other then current template during ajax request
echo '#redirect#'.$a_location;
}
elseif (headers_sent() != '') {
// some output occured -> redirect using javascript
echo '<script type="text/javascript">window.location.href = \''.$a_location.'\';</script>';
}
else {
// no output before -> redirect using HTTP header
// header('HTTP/1.1 302 Found');
header("$location");
}
}
}
ob_end_flush();
// session expiration is called from session initialization,
// that's why $this->Session may be not defined here
$session =& $this->Application->recallObject('Session');
/* @var $session Session */
$this->HandleEvent( new kEvent('adm:OnBeforeShutdown') );
$session->SaveData();
exit;
}
function Phrase($label)
{
return $this->Phrases->GetPhrase($label);
}
/**
* Replace language tags in exclamation marks found in text
*
* @param string $text
* @param bool $force_escape force escaping, not escaping of resulting string
* @return string
* @access public
*/
function ReplaceLanguageTags($text, $force_escape=null)
{
// !!!!!!!!
// if( !is_object($this->Phrases) ) $this->Debugger->appendTrace();
return $this->Phrases->ReplaceLanguageTags($text,$force_escape);
}
/**
* Checks if user is logged in, and creates
* user object if so. User object can be recalled
* later using "u.current" prefix_special. Also you may
* get user id by getting "u.current_id" variable.
*
* @access private
*/
function ValidateLogin()
{
$session =& $this->recallObject('Session');
$user_id = $session->GetField('PortalUserId');
if (!$user_id && $user_id != -1) $user_id = -2;
$this->SetVar('u.current_id', $user_id);
if (!$this->IsAdmin()) {
// needed for "profile edit", "registration" forms ON FRONT ONLY
$this->SetVar('u_id', $user_id);
}
$this->StoreVar('user_id', $user_id);
if ($this->GetVar('expired') == 1) {
// this parameter is set only from admin
$user =& $this->recallObject('u.current');
$user->SetError('ValidateLogin', 'session_expired', 'la_text_sess_expired');
}
if (($user_id != -2) && constOn('DBG_REQUREST_LOG') ) {
$http_query =& $this->recallObject('HTTPQuery');
$http_query->writeRequestLog(DBG_REQUREST_LOG);
}
if ($user_id != -2) {
// normal users + root
$this->LoadPersistentVars();
}
}
/**
* Loads current user persistent session data
*
*/
function LoadPersistentVars()
{
$this->Session->LoadPersistentVars();
}
function LoadCache() {
$cache_key = $this->GetVar('t').$this->GetVar('m_theme').$this->GetVar('m_lang').$this->IsAdmin();
$query = sprintf("SELECT PhraseList, ConfigVariables FROM %s WHERE Template = %s",
TABLE_PREFIX.'PhraseCache',
$this->Conn->Qstr(md5($cache_key)));
$res = $this->Conn->GetRow($query);
if ($res) {
$this->Caches['PhraseList'] = $res['PhraseList'] ? explode(',', $res['PhraseList']) : array();
$config_ids = $res['ConfigVariables'] ? explode(',', $res['ConfigVariables']) : array();
if (isset($this->Caches['ConfigVariables'])) {
$config_ids = array_diff($config_ids, $this->Caches['ConfigVariables']);
}
}
else {
$config_ids = array();
}
$this->Caches['ConfigVariables'] = $config_ids;
$this->ConfigCacheIds = $config_ids;
}
function UpdateCache()
{
$update = false;
//something changed
$update = $update || $this->Phrases->NeedsCacheUpdate();
$update = $update || (count($this->ConfigCacheIds) && $this->ConfigCacheIds != $this->Caches['ConfigVariables']);
if ($update) {
$cache_key = $this->GetVar('t').$this->GetVar('m_theme').$this->GetVar('m_lang').$this->IsAdmin();
$query = sprintf("REPLACE %s (PhraseList, CacheDate, Template, ConfigVariables)
VALUES (%s, %s, %s, %s)",
TABLE_PREFIX.'PhraseCache',
$this->Conn->Qstr(join(',', $this->Phrases->Ids)),
adodb_mktime(),
$this->Conn->Qstr(md5($cache_key)),
$this->Conn->qstr(implode(',', array_unique($this->ConfigCacheIds))));
$this->Conn->Query($query);
}
}
function InitConfig()
{
if (isset($this->Caches['ConfigVariables']) && count($this->Caches['ConfigVariables']) > 0) {
$this->ConfigHash = array_merge($this->ConfigHash, $this->Conn->GetCol(
'SELECT VariableValue, VariableName FROM '.TABLE_PREFIX.'ConfigurationValues
WHERE VariableId IN ('.implode(',', $this->Caches['ConfigVariables']).')', 'VariableName'));
}
}
/**
* Returns configuration option value by name
*
* @param string $name
* @return string
*/
function ConfigValue($name)
{
$res = isset($this->ConfigHash[$name]) ? $this->ConfigHash[$name] : false;
if ($res !== false) {
return $res;
}
if (defined('IS_INSTALL') && IS_INSTALL && !$this->TableFound('ConfigurationValues')) {
return false;
}
$sql = 'SELECT VariableId, VariableValue
FROM '.TABLE_PREFIX.'ConfigurationValues
WHERE VariableName = '.$this->Conn->qstr($name);
$res = $this->Conn->GetRow($sql);
if ($res !== false) {
$this->ConfigHash[$name] = $res['VariableValue'];
$this->ConfigCacheIds[] = $res['VariableId'];
return $res['VariableValue'];
}
return false;
}
function UpdateConfigCache()
{
if ($this->ConfigCacheIds) {
}
}
/**
* Allows to process any type of event
*
* @param kEvent $event
* @access public
* @author Alex
*/
function HandleEvent(&$event, $params=null, $specificParams=null)
{
if ( isset($params) ) {
$event = new kEvent( $params, $specificParams );
}
if (!isset($this->EventManager)) {
$this->EventManager =& $this->recallObject('EventManager');
}
$this->EventManager->HandleEvent($event);
}
/**
* Registers new class in the factory
*
* @param string $real_class Real name of class as in class declaration
* @param string $file Filename in what $real_class is declared
* @param string $pseudo_class Name under this class object will be accessed using getObject method
* @param Array $dependecies List of classes required for this class functioning
* @access public
* @author Alex
*/
function registerClass($real_class, $file, $pseudo_class = null, $dependecies = Array() )
{
$this->Factory->registerClass($real_class, $file, $pseudo_class, $dependecies);
}
/**
* Add $class_name to required classes list for $depended_class class.
* All required class files are included before $depended_class file is included
*
* @param string $depended_class
* @param string $class_name
* @author Alex
*/
function registerDependency($depended_class, $class_name)
{
$this->Factory->registerDependency($depended_class, $class_name);
}
/**
* Registers Hook from subprefix event to master prefix event
*
* @param string $hookto_prefix
* @param string $hookto_special
* @param string $hookto_event
* @param string $mode
* @param string $do_prefix
* @param string $do_special
* @param string $do_event
* @param string $conditional
* @access public
* @todo take care of a lot parameters passed
* @author Kostja
*/
function registerHook($hookto_prefix, $hookto_special, $hookto_event, $mode, $do_prefix, $do_special, $do_event, $conditional)
{
$event_manager =& $this->recallObject('EventManager');
$event_manager->registerHook($hookto_prefix, $hookto_special, $hookto_event, $mode, $do_prefix, $do_special, $do_event, $conditional);
}
/**
* Allows one TagProcessor tag act as other TagProcessor tag
*
* @param Array $tag_info
* @author Kostja
*/
function registerAggregateTag($tag_info)
{
$aggregator =& $this->recallObject('TagsAggregator', 'kArray');
$aggregator->SetArrayValue($tag_info['AggregateTo'], $tag_info['AggregatedTagName'], Array($tag_info['LocalPrefix'], $tag_info['LocalTagName'], getArrayValue($tag_info, 'LocalSpecial')));
}
/**
* Returns object using params specified,
* creates it if is required
*
* @param string $name
* @param string $pseudo_class
* @param Array $event_params
* @return Object
* @author Alex
*/
function &recallObject($name,$pseudo_class=null,$event_params=Array())
{
$result =& $this->Factory->getObject($name, $pseudo_class, $event_params);
return $result;
}
/**
* Returns object using Variable number of params,
* all params starting with 4th are passed to object consturctor
*
* @param string $name
* @param string $pseudo_class
* @param Array $event_params
* @return Object
* @author Alex
*/
function &recallObjectP($name,$pseudo_class=null,$event_params=Array())
{
$func_args = func_get_args();
$result =& ref_call_user_func_array( Array(&$this->Factory, 'getObjectP'), $func_args );
return $result;
}
/**
* Returns tag processor for prefix specified
*
* @param string $prefix
* @return kDBTagProcessor
*/
function &recallTagProcessor($prefix)
{
$this->InitParser(); // because kDBTagProcesor is in TemplateParser dependencies
$result =& $this->recallObject($prefix.'_TagProcessor');
return $result;
}
/**
* Checks if object with prefix passes was already created in factory
*
* @param string $name object presudo_class, prefix
* @return bool
* @author Kostja
*/
function hasObject($name)
{
return isset($this->Factory->Storage[$name]);
}
/**
* Removes object from storage by given name
*
* @param string $name Object's name in the Storage
* @author Kostja
*/
function removeObject($name)
{
$this->Factory->DestroyObject($name);
}
/**
* Get's real class name for pseudo class,
* includes class file and creates class
* instance
*
* @param string $pseudo_class
* @return Object
* @access public
* @author Alex
*/
function &makeClass($pseudo_class)
{
$func_args = func_get_args();
$result =& ref_call_user_func_array( Array(&$this->Factory, 'makeClass'), $func_args);
return $result;
}
/**
* Checks if application is in debug mode
*
* @param bool $check_debugger check if kApplication debugger is initialized too, not only for defined DEBUG_MODE constant
* @return bool
* @author Alex
* @access public
*/
function isDebugMode($check_debugger = true)
{
$debug_mode = defined('DEBUG_MODE') && DEBUG_MODE;
if ($check_debugger) {
$debug_mode = $debug_mode && is_object($this->Debugger);
}
return $debug_mode;
}
/**
* Checks if it is admin
*
* @return bool
* @author Alex
*/
function IsAdmin()
{
return constOn('ADMIN');
}
/**
* Apply url rewriting used by mod_rewrite or not
*
* @param bool $ssl Force ssl link to be build
* @return bool
*/
function RewriteURLs($ssl = false)
{
// case #1,#4:
// we want to create https link from http mode
// we want to create https link from https mode
// conditions: ($ssl || PROTOCOL == 'https://') && $this->ConfigValue('UseModRewriteWithSSL')
// case #2,#3:
// we want to create http link from https mode
// we want to create http link from http mode
// conditions: !$ssl && (PROTOCOL == 'https://' || PROTOCOL == 'http://')
$allow_rewriting =
(!$ssl && (PROTOCOL == 'https://' || PROTOCOL == 'http://')) // always allow mod_rewrite for http
|| // or allow rewriting for redirect TO httpS or when already in httpS
(($ssl || PROTOCOL == 'https://') && $this->ConfigValue('UseModRewriteWithSSL')); // but only if it's allowed in config!
return constOn('MOD_REWRITE') && $allow_rewriting;
}
/**
* Reads unit (specified by $prefix)
* option specified by $option
*
* @param string $prefix
* @param string $option
* @param mixed $default
* @return string
* @access public
* @author Alex
*/
function getUnitOption($prefix, $option, $default = false)
{
/*if (!isset($this->UnitConfigReader)) {
$this->UnitConfigReader =& $this->recallObject('kUnitConfigReader');
}*/
return $this->UnitConfigReader->getUnitOption($prefix, $option, $default);
}
/**
* Set's new unit option value
*
* @param string $prefix
* @param string $name
* @param string $value
* @author Alex
* @access public
*/
function setUnitOption($prefix, $option, $value)
{
// $unit_config_reader =& $this->recallObject('kUnitConfigReader');
return $this->UnitConfigReader->setUnitOption($prefix,$option,$value);
}
/**
* Read all unit with $prefix options
*
* @param string $prefix
* @return Array
* @access public
* @author Alex
*/
function getUnitOptions($prefix)
{
// $unit_config_reader =& $this->recallObject('kUnitConfigReader');
return $this->UnitConfigReader->getUnitOptions($prefix);
}
/**
* Returns true if config exists and is allowed for reading
*
* @param string $prefix
* @return bool
*/
function prefixRegistred($prefix)
{
/*if (!isset($this->UnitConfigReader)) {
$this->UnitConfigReader =& $this->recallObject('kUnitConfigReader');
}*/
return $this->UnitConfigReader->prefixRegistred($prefix);
}
/**
* Splits any mixing of prefix and
* special into correct ones
*
* @param string $prefix_special
* @return Array
* @access public
* @author Alex
*/
function processPrefix($prefix_special)
{
return $this->Factory->processPrefix($prefix_special);
}
/**
* Set's new event for $prefix_special
* passed
*
* @param string $prefix_special
* @param string $event_name
* @access public
*/
function setEvent($prefix_special,$event_name)
{
$event_manager =& $this->recallObject('EventManager');
$event_manager->setEvent($prefix_special,$event_name);
}
/**
* SQL Error Handler
*
* @param int $code
* @param string $msg
* @param string $sql
* @return bool
* @access private
* @author Alex
*/
function handleSQLError($code, $msg, $sql)
{
if ( isset($this->Debugger) )
{
$errorLevel = constOn('DBG_SQL_FAILURE') && !defined('IS_INSTALL') ? E_USER_ERROR : E_USER_WARNING;
$this->Debugger->appendTrace();
$error_msg = '<span class="debug_error">'.$msg.' ('.$code.')</span><br><a href="javascript:$Debugger.SetClipboard(\''.htmlspecialchars($sql).'\');"><b>SQL</b></a>: '.$this->Debugger->formatSQL($sql);
$long_id = $this->Debugger->mapLongError($error_msg);
trigger_error( mb_substr($msg.' ('.$code.') ['.$sql.']',0,1000).' #'.$long_id, $errorLevel);
return true;
}
else
{
//$errorLevel = constOn('IS_INSTALL') ? E_USER_WARNING : E_USER_ERROR;
$errorLevel = E_USER_WARNING;
trigger_error('<b>SQL Error</b> in sql: '.$sql.', code <b>'.$code.'</b> ('.$msg.')', $errorLevel);
/*echo '<b>xProcessing SQL</b>: '.$sql.'<br>';
echo '<b>Error ('.$code.'):</b> '.$msg.'<br>';*/
return $errorLevel == E_USER_ERROR ? false : true;
}
}
/**
* Default error handler
*
* @param int $errno
* @param string $errstr
* @param string $errfile
* @param int $errline
* @param Array $errcontext
*/
function handleError($errno, $errstr, $errfile = '', $errline = '', $errcontext = '')
{
if( constOn('SILENT_LOG') )
{
$fp = fopen(FULL_PATH.'/silent_log.txt','a');
$time = adodb_date('d/m/Y H:i:s');
fwrite($fp, '['.$time.'] #'.$errno.': '.strip_tags($errstr).' in ['.$errfile.'] on line '.$errline."\n");
fclose($fp);
}
if( !$this->errorHandlers ) {
if ($errno == E_USER_ERROR) {
header('HTTP/1.0 500 Script Fatal Error');
echo ('<div style="background-color: #FEFFBF; margin: auto; padding: 10px; border: 2px solid red; text-align: center">
<strong>Fatal Error: </strong>
'."$errstr in $errfile on line $errline".'
</div>');
exit;
}
return true;
}
$res = false;
$i = 0; // while (not foreach) because it is array of references in some cases
$eh_count = count($this->errorHandlers);
while($i < $eh_count)
{
if( is_array($this->errorHandlers[$i]) )
{
$object =& $this->errorHandlers[$i][0];
$method = $this->errorHandlers[$i][1];
$res = $object->$method($errno, $errstr, $errfile, $errline, $errcontext);
}
else
{
$function = $this->errorHandlers[$i];
$function($errno, $errstr, $errfile, $errline, $errcontext);
}
$i++;
}
return $res;
}
/**
* Returns & blocks next ResourceId available in system
*
* @return int
* @access public
* @author Alex
*/
function NextResourceId()
{
$table_name = TABLE_PREFIX.'IdGenerator';
$this->Conn->Query('LOCK TABLES '.$table_name.' WRITE');
$this->Conn->Query('UPDATE '.$table_name.' SET lastid = lastid + 1');
$id = $this->Conn->GetOne('SELECT lastid FROM '.$table_name);
if($id === false)
{
$this->Conn->Query('INSERT INTO '.$table_name.' (lastid) VALUES (2)');
$id = 2;
}
$this->Conn->Query('UNLOCK TABLES');
return $id - 1;
}
/**
* Returns genealogical main prefix for subtable prefix passes
* OR prefix, that has been found in REQUEST and some how is parent of passed subtable prefix
*
* @param string $current_prefix
* @param string $real_top if set to true will return real topmost prefix, regardless of its id is passed or not
* @return string
* @access public
* @author Kostja / Alex
*/
function GetTopmostPrefix($current_prefix, $real_top = false)
{
// 1. get genealogical tree of $current_prefix
$prefixes = Array ($current_prefix);
while ( $parent_prefix = $this->getUnitOption($current_prefix, 'ParentPrefix') ) {
if (!$this->prefixRegistred($parent_prefix)) {
// stop searching, when parent prefix is not registered
break;
}
$current_prefix = $parent_prefix;
array_unshift($prefixes, $current_prefix);
}
if ($real_top) {
return $current_prefix;
}
// 2. find what if parent is passed
$passed = explode(',', $this->GetVar('all_passed'));
foreach ($prefixes as $a_prefix) {
if (in_array($a_prefix, $passed)) {
return $a_prefix;
}
}
return $current_prefix;
}
/**
* Triggers email event of type Admin
*
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
* @return unknown
*/
function &EmailEventAdmin($email_event_name, $to_user_id = -1, $send_params = false)
{
$event =& $this->EmailEvent($email_event_name, 1, $to_user_id, $send_params);
return $event;
}
/**
* Triggers email event of type User
*
* @param string $email_event_name
* @param int $to_user_id
* @param array $send_params associative array of direct send params, possible keys: to_email, to_name, from_email, from_name, message, message_text
* @return unknown
*/
function &EmailEventUser($email_event_name, $to_user_id = -1, $send_params = false)
{
$event =& $this->EmailEvent($email_event_name, 0, $to_user_id, $send_params);
return $event;
}
/**
* Triggers general email event
*
* @param string $email_event_name
* @param int $email_event_type ( 0 for User, 1 for Admin)
* @param int $to_user_id
* @param array $send_params associative array of direct send params,
* possible keys: to_email, to_name, from_email, from_name, message, message_text
* @return unknown
*/
function &EmailEvent($email_event_name, $email_event_type, $to_user_id = -1, $send_params = false)
{
$params = array(
'EmailEventName' => $email_event_name,
'EmailEventToUserId' => $to_user_id,
'EmailEventType' => $email_event_type,
);
if ($send_params) {
$params['DirectSendParams'] = $send_params;
}
$event_str = isset($send_params['use_special']) ? 'emailevents.'.$send_params['use_special'].':OnEmailEvent' : 'emailevents:OnEmailEvent';
$this->HandleEvent($event, $event_str, $params);
return $event;
}
/**
* Allows to check if user in this session is logged in or not
*
* @return bool
*/
function LoggedIn()
{
// no session during expiration process
return is_null($this->Session) ? false : $this->Session->LoggedIn();
}
/**
* Check current user permissions based on it's group permissions in specified category
*
* @param string $name permission name
* @param int $cat_id category id, current used if not specified
* @param int $type permission type {1 - system, 0 - per category}
* @return int
*/
function CheckPermission($name, $type = 1, $cat_id = null)
{
$perm_helper =& $this->recallObject('PermissionsHelper');
return $perm_helper->CheckPermission($name, $type, $cat_id);
}
/**
* Set's any field of current visit
*
* @param string $field
* @param mixed $value
*/
function setVisitField($field, $value)
{
$visit =& $this->recallObject('visits');
$visit->SetDBField($field, $value);
$visit->Update();
}
/**
* Allows to check if in-portal is installed
*
* @return bool
*/
function isInstalled()
{
return $this->InitDone && (count($this->ModuleInfo) > 0);
}
/**
* Allows to determine if module is installed & enabled
*
* @param string $module_name
* @return bool
*/
function isModuleEnabled($module_name)
{
return $this->findModule('Name', $module_name) !== false;
}
function reportError($class, $method)
{
$this->Debugger->appendTrace();
trigger_error('depricated method <b>'.$class.'->'.$method.'(...)</b>', E_USER_ERROR);
}
/**
* Returns Window ID of passed prefix main prefix (in edit mode)
*
* @param string $prefix
* @return mixed
*/
function GetTopmostWid($prefix)
{
$top_prefix = $this->GetTopmostPrefix($prefix);
$mode = $this->GetVar($top_prefix.'_mode');
return $mode != '' ? substr($mode, 1) : '';
}
/**
* Get temp table name
*
* @param string $table
* @param mixed $wid
* @return string
*/
function GetTempName($table, $wid = '')
{
if (preg_match('/prefix:(.*)/', $wid, $regs)) {
$wid = $this->GetTopmostWid($regs[1]);
}
return TABLE_PREFIX.'ses_'.$this->GetSID().($wid ? '_'.$wid : '').'_edit_'.$table;
}
function GetTempTablePrefix($wid = '')
{
if (preg_match('/prefix:(.*)/', $wid, $regs)) {
$wid = $this->GetTopmostWid($regs[1]);
}
return TABLE_PREFIX.'ses_'.$this->GetSID().($wid ? '_'.$wid : '').'_edit_';
}
function IsTempTable($table)
{
return preg_match('/'.TABLE_PREFIX.'ses_'.$this->GetSID().'(_[\d]+){0,1}_edit_(.*)/',$table);
}
/**
* Return live table name based on temp table name
*
* @param string $temp_table
* @return string
*/
function GetLiveName($temp_table)
{
if( preg_match('/'.TABLE_PREFIX.'ses_'.$this->GetSID().'(_[\d]+){0,1}_edit_(.*)/',$temp_table, $rets) )
{
// cut wid from table end if any
return $rets[2];
}
else
{
return $temp_table;
}
}
function CheckProcessors($processors)
{
foreach ($processors as $a_processor)
{
if (!isset($this->CachedProcessors[$a_processor])) {
$this->CachedProcessors[$a_processor] =& $this->recallObject($a_processor.'_TagProcessor');
}
}
}
function TimeZoneAdjustment($time_zone = null)
{
if ($time_zone == 'GMT') {
return (-1) * adodb_date('Z');
}
$target_zone = isset($time_zone) ? $time_zone : $this->ConfigValue('Config_Site_Time');
return 3600 * ($target_zone - $this->ConfigValue('Config_Server_Time'));
}
function ApplicationDie($message = '')
{
$message = ob_get_clean().$message;
if ($this->isDebugMode()) {
$message .= $this->Debugger->printReport(true);
}
echo $this->UseOutputCompression() ? gzencode($message, DBG_COMPRESSION_LEVEL) : $message;
exit;
}
/* moved from MyApplication */
function getUserGroups($user_id)
{
switch($user_id)
{
case -1:
$user_groups = $this->ConfigValue('User_LoggedInGroup');
break;
case -2:
$user_groups = $this->ConfigValue('User_LoggedInGroup');
$user_groups .= ','.$this->ConfigValue('User_GuestGroup');
break;
default:
$sql = 'SELECT GroupId FROM '.TABLE_PREFIX.'UserGroup WHERE PortalUserId = '.$user_id;
$res = $this->Conn->GetCol($sql);
$user_groups = Array( $this->ConfigValue('User_LoggedInGroup') );
if(is_array($res))
{
$user_groups = array_merge($user_groups, $res);
}
$user_groups = implode(',', $user_groups);
}
return $user_groups;
}
/**
* Allows to detect if page is browsed by spider (293 agents supported)
*
* @return bool
*/
function IsSpider()
{
static $is_spider = null;
if (!isset($is_spider)) {
$user_agent = trim($_SERVER['HTTP_USER_AGENT']);
$robots = file(FULL_PATH.'/core/robots_list.txt');
foreach ($robots as $robot_info) {
$robot_info = explode("\t", $robot_info, 3);
if ($user_agent == trim($robot_info[2])) {
$is_spider = true;
break;
}
}
}
return $is_spider;
}
/**
* Allows to detect table's presense in database
*
* @param string $table_name
* @return bool
*/
function TableFound($table_name)
{
return $this->Conn->TableFound($table_name);
}
/**
* Returns counter value
*
* @param string $name counter name
* @param Array $params counter parameters
* @param string $query_name specify query name directly (don't generate from parmeters)
* @param bool $multiple_results
* @return mixed
*/
function getCounter($name, $params = Array (), $query_name = null, $multiple_results = false)
{
$count_helper =& $this->Application->recallObject('CountHelper');
/* @var $count_helper kCountHelper */
return $count_helper->getCounter($name, $params, $query_name, $multiple_results);
}
/**
* Resets counter, whitch are affected by one of specified tables
*
* @param string $tables comma separated tables list used in counting sqls
*/
function resetCounters($tables)
{
if (constOn('IS_INSTALL')) {
return ;
}
$count_helper =& $this->Application->recallObject('CountHelper');
/* @var $count_helper kCountHelper */
return $count_helper->resetCounters($tables);
}
/**
* Sends XML header + optionally displays xml heading
*
* @param string $xml_version
* @return string
* @author Alex
*/
function XMLHeader($xml_version = false)
{
$lang =& $this->recallObject('lang.current');
header('Content-type: text/xml; charset='.$lang->GetDBField('Charset'));
return $xml_version ? '<?xml version="'.$xml_version.'" encoding="'.$lang->GetDBField('Charset').'"?>' : '';
}
/**
* Returns category tree
*
* @param int $category_id
* @return Array
*/
function getTreeIndex($category_id)
{
$category_template = $this->getFilename('c', $category_id); // to rebuild "category_tree" cache
$tree_index = $this->getCache('category_tree', $category_id);
if ($tree_index) {
$ret = Array ();
list ($ret['TreeLeft'], $ret['TreeRight']) = explode(';', $tree_index);
return $ret;
}
return false;
}
}
?>
\ No newline at end of file
Property changes on: branches/RC/core/kernel/application.php
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.186.2.15
\ No newline at end of property
+1.186.2.16
\ No newline at end of property
Index: branches/RC/core/admin_templates/incs/header.tpl
===================================================================
--- branches/RC/core/admin_templates/incs/header.tpl (revision 10714)
+++ branches/RC/core/admin_templates/incs/header.tpl (revision 10715)
@@ -1,65 +1,67 @@
<inp2:m_DefaultParam body_properties=""/>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<inp2:m_CheckSSL mode="required" condition="Require_AdminSSL" />
+<inp2:m_CheckSSL/>
<html>
<head>
<title><inp2:m_GetConfig var="Site_Name"/> - <inp2:m_Phrase label="la_AdministrativeConsole"/></title>
<meta http-equiv="content-type" content="text/html; charset=<inp2:lang_GetCharset/>">
<meta name="keywords" content="...">
<meta name="description" content="...">
<meta name="robots" content="all">
<meta name="copyright" content="Copyright &#174; 2006 Test, Inc">
<meta name="author" content="Intechnic Inc.">
<inp2:m_base_ref/>
<link rel="icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" rev="stylesheet" href="incs/style.css" type="text/css" />
<script type="text/javascript" src="js/is.js"></script>
<script type="text/javascript" src="js/ajax.js"></script>
<script language="javascript" src="js/application.js"></script>
<script type="text/javascript" src="js/script.js"></script>
<script type="text/javascript" src="js/in-portal.js"></script>
<script type="text/javascript" src="js/toolbar.js"></script>
<script type="text/javascript" src="js/grid.js"></script>
<script type="text/javascript" src="js/forms.js"></script>
<script type="text/javascript" src="js/form_controls.js"></script>
<script type="text/javascript" src="js/calendar.js"></script>
<script language="javascript">
var t = '<inp2:m_get param="t"/>';
var popups = '1';
var multiple_windows = '1';
var main_title = '<inp2:m_GetConfig var="Site_Name" escape="1"/>';
var tpl_changed = 0;
var base_url = '<inp2:m_BaseURL/>';
var $base_path = '<inp2:m_GetConst name="BASE_PATH"/>';
var img_path = '<inp2:m_TemplatesBase module="#MODULE#"/>/img/';
var phrases = {
'la_Delete_Confirm' : '<inp2:m_Phrase label="la_Delete_Confirm" js_escape="1"/>'
}
NumberFormatter.ThousandsSep = '<inp2:lang.current_Field name="ThousandSep" js_escape="1"/>';
NumberFormatter.DecimalSep = '<inp2:lang.current_Field name="DecimalPoint" js_escape="1"/>';
<inp2:m_if check="m_GetEquals" name="m_wid" value="" inverse="inverse">
window.name += '_<inp2:m_get name="m_wid"/>';
</inp2:m_if>
var $use_popups = <inp2:m_if check="adm_UsePopups">true<inp2:m_else/>false</inp2:m_if>;
var $use_toolbarlabels = <inp2:m_if check="adm_UseToolbarLabels">true<inp2:m_else/>false</inp2:m_if>;
</script>
</head>
<inp2:m_include t="incs/blocks"/>
<inp2:m_include t="incs/in-portal"/>
<inp2:m_if check="m_ParamEquals" name="nobody" value="yes" inverse="inverse">
<body <inp2:m_param name="body_properties"/>>
</inp2:m_if>
<inp2:m_if check="m_ParamEquals" name="noform" value="yes" inverse="inverse">
<inp2:m_RenderElement name="kernel_form"/>
</inp2:m_if>
\ No newline at end of file
Property changes on: branches/RC/core/admin_templates/incs/header.tpl
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.5.2.3
\ No newline at end of property
+1.5.2.4
\ No newline at end of property
Index: branches/RC/core/install/upgrades.sql
===================================================================
--- branches/RC/core/install/upgrades.sql (revision 10714)
+++ branches/RC/core/install/upgrades.sql (revision 10715)
@@ -1,307 +1,310 @@
# ===== 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');
\ No newline at end of file
+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');
\ No newline at end of file
Property changes on: branches/RC/core/install/upgrades.sql
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.19.2.38
\ No newline at end of property
+1.19.2.39
\ No newline at end of property
Index: branches/RC/core/install/install_data.sql
===================================================================
--- branches/RC/core/install/install_data.sql (revision 10714)
+++ branches/RC/core/install/install_data.sql (revision 10715)
@@ -1,630 +1,632 @@
INSERT INTO ConfigurationAdmin VALUES ('Site_Name', 'la_Text_Website', 'la_config_website_name', 'text', '', '', 10.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Site_Path', 'la_Text_Website', 'la_config_web_address', 'text', '', '', 10.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Backup_Path', 'la_Text_BackupPath', 'la_config_backup_path', 'text', '', '', 40.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Domain_Detect', 'la_Text_Website', 'la_config_detect_domain', 'text', '', '', 8, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_Sortfield', 'la_Text_General', 'la_category_sortfield_prompt', 'select', '', 'Name=la_Category_Name,Description=la_Category_Description,CreatedOn=la_Category_Date,EditorsPick=la_Category_Pick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.01, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_Sortorder', 'la_Text_General', 'la_category_sortfield_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.01, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_Sortfield2', 'la_Text_General', 'la_category_sortfield2_prompt', 'select', '', 'Name=la_Category_Name,Description=la_Category_Description,CreatedOn=la_Category_Date,EditorsPick=la_Category_Pick,<SQL>SELECT Prompt AS OptionName, CONCAT("cust_", FieldName) AS OptionValue FROM <PREFIX>CustomField WHERE (Type = 1) AND (IsSystem = 0)</SQL>', 10.02, 1, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_Sortorder2', 'la_Text_General', 'la_category_sortfield2_prompt', 'select', '', 'asc=la_common_ascending,desc=la_common_descending', 10.02, 2, 1);
INSERT INTO ConfigurationAdmin VALUES ('Perpage_Category', 'la_Text_General', 'la_category_perpage_prompt', 'text', '', '', 10.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_DaysNew', 'la_Text_General', 'la_category_daysnew_prompt', 'text', '', '', 10.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_ShowPick', 'la_Text_General', 'la_category_showpick_prompt', 'checkbox', '', '', 10.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_MetaKey', 'la_Text_MetaInfo', 'la_category_metakey', 'textarea', '', '', 20.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Category_MetaDesc', 'la_Text_MetaInfo', 'la_category_metadesc', 'textarea', '', '', 20.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('User_NewGroup', 'la_Text_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);
INSERT INTO ConfigurationAdmin VALUES ('User_GuestGroup', 'la_Text_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);
INSERT INTO ConfigurationAdmin VALUES ('RootPass', 'la_Text_General', 'la_prompt_root_pass', 'password', NULL, NULL, 10.12, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('AllowSelectGroupOnFront', 'la_Text_General', 'la_config_AllowSelectGroupOnFront', 'checkbox', NULL, NULL, 10.13, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Users_AllowReset', 'la_Text_General', 'la_prompt_allow_reset', 'text', NULL, NULL, 10.05, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('User_Allow_New', 'la_Text_General', 'la_users_allow_new', 'radio', '', '1=la_User_Instant,2=la_User_Not_Allowed,3=la_User_Upon_Approval', 10.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('User_Password_Auto', 'la_Text_General', 'la_users_password_auto', 'checkbox', '', '', 10.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('User_Votes_Deny', 'la_Text_Restrictions', 'la_users_votes_deny', 'text', '', '', 20.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('User_MembershipExpirationReminder', 'la_Text_General', 'la_MembershipExpirationReminder', 'text', NULL, '', 10.07, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('User_Review_Deny', 'la_Text_Restrictions', 'la_users_review_deny', 'text', '', '', 20.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Server_Name', 'la_Text_Website', 'la_config_server_name', 'text', '', '', 4, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Config_Server_Time', 'la_Text_Date_Time_Settings', 'la_config_time_server', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Config_Site_Time', 'la_Text_Date_Time_Settings', 'la_config_site_zone', 'select', '', '1=la_m12,2=la_m11,3=la_m10,5=la_m9,6=la_m8,7=la_m7,8=la_m6,9=la_m5,10=la_m4,11=la_m3,12=la_m2,13=la_m1,14=la_m0,15=la_p1,16=la_p2,17=la_p3,18=la_p4,19=la_p5,20=la_p6,21=la_p7,22=la_p8,23=la_p9,24=la_p10,25=la_p11,26=la_p12,27=la_p13', 20.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Smtp_Server', 'la_Text_smtp_server', 'la_prompt_mailserver', 'text', NULL, NULL, 30.01, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Smtp_Port', 'la_Text_smtp_server', 'la_prompt_mailport', 'text', NULL, NULL, 30.02, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Smtp_Authenticate', 'la_Text_smtp_server', 'la_prompt_mailauthenticate', 'checkbox', NULL, NULL, 30.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Smtp_User', 'la_Text_smtp_server', 'la_prompt_smtp_user', 'text', NULL, NULL, 30.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Smtp_Pass', 'la_Text_smtp_server', 'la_prompt_smtp_pass', 'text', NULL, NULL, 30.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Smtp_DefaultHeaders', 'la_Text_smtp_server', 'la_prompt_smtpheaders', 'textarea', NULL, 'COLS=40 ROWS=5', 30.06, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Smtp_AdminMailFrom', 'la_Text_smtp_server', 'la_prompt_AdminMailFrom', 'text', NULL, NULL, 30.07, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Perpage_Category_Short', 'la_Text_General', 'la_category_perpage__short_prompt', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('CookieSessions', 'la_Text_Website', 'la_prompt_session_management', 'select', NULL, '0=lu_query_string,1=lu_cookies,2=lu_auto', 10.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Keyword_category', 'la_config_SearchRel_DefaultKeyword', 'la_text_keyword', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Pop_category', 'la_config_DefaultPop', 'la_text_popularity', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Rating_category', 'la_config_DefaultRating', 'la_prompt_Rating', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SearchRel_Increase_category', 'la_config_DefaultIncreaseImportance', 'la_text_increase_importance', 'text', NULL, NULL, 0, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SessionTimeout', 'la_Text_Website', 'la_prompt_session_timeout', 'text', '', '', 10.05, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SystemTagCache', 'la_Text_Website', 'la_prompt_syscache_enable', 'checkbox', NULL, NULL, 10.07, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('User_SubscriberGroup', 'la_Text_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);
INSERT INTO ConfigurationAdmin VALUES ('Root_Name', 'la_Text_General', 'la_prompt_root_name', 'text', '', '', 10.07, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SocketBlockingMode', 'la_Text_Website', 'la_prompt_socket_blocking_mode', 'checkbox', NULL, NULL, 10.08, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Min_UserName', 'la_Text_General', 'la_text_min_username', 'text', '', '', 10.03, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Min_Password', 'la_Text_General', 'la_text_min_password', 'text', '', '', 10.04, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Email_As_Login', 'la_Text_General', 'la_use_emails_as_login', 'checkbox', NULL, NULL, 10.02, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('RegistrationCaptcha', 'la_Text_General', 'la_registration_captcha', 'checkbox', NULL, NULL, 10.025, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('User_LoggedInGroup', 'la_Text_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);
INSERT INTO ConfigurationAdmin VALUES ('FirstDayOfWeek', 'la_Text_Date_Time_Settings', 'la_config_first_day_of_week', 'select', '', '0=la_sunday,1=la_monday', 20.03, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SSL_URL', 'la_Text_Website', 'la_config_ssl_url', 'text', '', '', 10.09, 0, 1);
+INSERT INTO ConfigurationAdmin VALUES ('AdminSSL_URL', 'la_Text_Website', 'la_config_AdminSSL_URL', 'text', '', '', 10.091, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('Require_SSL', 'la_Text_Website', 'la_config_require_ssl', 'checkbox', '', '', 10.1, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('Force_HTTP_When_SSL_Not_Required', 'la_Text_Website', 'la_config_force_http', 'checkbox', '', '', 10.11, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SessionCookieName', 'la_Text_Website', 'la_prompt_session_cookie_name', 'text', '', '', 10.04, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('SessionReferrerCheck', 'la_Text_Website', 'la_promt_ReferrerCheck', 'checkbox', NULL, NULL, 10.06, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('UseModRewrite', 'la_Text_Website', 'la_config_use_modrewrite', 'checkbox', '', '', 10.12, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('UseModRewriteWithSSL', 'la_Text_Website', 'la_config_use_modrewrite_with_ssl', 'checkbox', '', '', 10.13, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('ErrorTemplate', 'la_Text_Website', 'la_config_error_template', 'text', '', '', 10.16, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('UseJSRedirect', 'la_Text_Website', 'la_config_use_js_redirect', 'checkbox', '', '', 10.14, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('MaxImportCategoryLevels', 'la_Text_General', 'la_prompt_max_import_category_levels', 'text', '', '', 10.08, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('UseCronForRegularEvent', 'la_Text_Website', 'la_UseCronForRegularEvent', 'checkbox', NULL, NULL, 10.15, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('NoPermissionTemplate', 'la_Text_Website', 'la_config_nopermission_template', 'text', '', '', 10.17, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('UseOutputCompression', 'la_Text_Website', 'la_config_UseOutputCompression', 'checkbox', '', '', 10.18, 0, 1);
INSERT INTO ConfigurationAdmin VALUES ('OutputCompressionLevel', 'la_Text_Website', 'la_config_OutputCompressionLevel', 'text', '', '', 10.19, 0, 1);
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 ConfigurationAdmin VALUES ('UseToolbarLabels', 'la_Text_Website', 'la_config_UseToolbarLabels', 'checkbox', NULL , NULL , 10.20, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('UseSmallHeader', 'la_Text_Website', 'la_config_UseSmallHeader', 'checkbox', '', '', 10.21, 0, 0);
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 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 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 ConfigurationAdmin VALUES ('UseColumnFreezer', 'la_Text_Website', 'la_config_UseColumnFreezer', 'checkbox', '', '', 10.22, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('TrimRequiredFields', 'la_Text_Website', 'la_config_TrimRequiredFields', 'checkbox', '', '', 10.23, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('UsePageHitCounter', 'la_Text_Website', 'la_config_UsePageHitCounter', 'checkbox', '', '', 10.24, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('UseChangeLog', 'la_Text_Website', 'la_config_UseChangeLog', 'checkbox', '', '', 10.25, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('AutoRefreshIntervals', 'la_Text_Website', 'la_config_AutoRefreshIntervals', 'text', '', '', 10.26, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('KeepSessionOnBrowserClose', 'la_Text_Website', 'la_config_KeepSessionOnBrowserClose', 'checkbox', '', '', 10.27, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('ForceImageMagickResize', 'la_Text_Website', 'la_config_ForceImageMagickResize', 'checkbox', '', '', 10.28, 0, 0);
INSERT INTO ConfigurationAdmin VALUES ('RememberLastAdminTemplate', 'la_Text_General', 'la_config_RememberLastAdminTemplate', 'checkbox', '', '', 10.13, 0, 0);
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Columns_Category', '2', 'In-Portal', 'Categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'DomainSelect','1','In-Portal','in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Site_Path', '/', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Archive', '25', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'debug', '1', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_User', '100', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_LangEmail', '20', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Default_FromAddr', '', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'email_replyto', '', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'email_footer', 'message footer goes here', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Default_Theme', 'default', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Default_Language', 'English', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SessionTimeout', '3600', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_SortOrder', 'asc', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Suggest_MinInterval', '3600', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SubCat_ListCount', '3', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Timeout_Rating', '3600', 'In-Portal', 'System');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_SortField', 'u.CreatedOn', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Relations', '10', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Group_SortField', 'GroupName', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Group_SortOrder', 'asc', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Default_FromName', 'Webmaster', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Category', '20', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Sortfield', 'Name', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Sortorder', 'asc', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MetaKeywords', DEFAULT, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Relation_LV_Sortfield', 'ItemType', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ampm_time', '1', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Template', '10', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Phrase', '40', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Sessionlist', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Sortfield2', 'Description', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Sortorder2', 'asc', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_DaysNew', '8', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_ShowPick', '', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_MetaKey', '', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_MetaDesc', '', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MetaDescription', DEFAULT, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_NewGroup', '13', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Allow_New', '3', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Password_Auto', '0', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Votes_Deny', '5', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Review_Deny', '5', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Config_Name', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Config_Company', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Config_Reg_Number', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Config_Website_Name', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Config_Web_Address', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Config_Server_Time', '14', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Config_Site_Time', '14', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Site_Name', 'In-Portal', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Backup_Path', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Items', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'GuestSessions', '1', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_Server', DEFAULT, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_Port', DEFAULT, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_User', DEFAULT, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_Pass', DEFAULT, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_SendHTML', '1', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_Authenticate', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Email', '10', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_DefaultHeaders', 'X-Priority: 1\r\nX-MSMail-Priority: High\r\nX-Mailer: In-Portal', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Smtp_AdminMailFrom', 'portal@user.domain.name', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Highlight_OpenTag', '<span class="match">', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Category_Highlight_CloseTag', '</span>', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_GuestGroup', '14', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RootPass', '', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AllowSelectGroupOnFront', '0', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Category_Short', '3', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CookieSessions', '2', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Increase_category', '30', 'In-Portal', 'in-portal:configuration_search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Keyword_category', '90', 'In-Portal', 'in-portal:configuration_search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Pop_category', '5', 'In-Portal', 'in-portal:configuration_search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_Rating_category', '5', 'In-Portal', 'in-portal:configuration_search');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_DefaultIncrease', '30', 'In-Portal', 'inportal:configure_searchdefault');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_DefaultKeyword', '80', 'In-Portal', 'SearchRel_DefaultKeyword');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_DefaultPop', '10', 'In-Portal', 'inportal:configuration_searchdefault');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchRel_DefaultRating', '10', 'In-Portal', 'inportal:configure_searchdefault');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SystemTagCache', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Root_Name', 'lu_rootcategory_name', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_SubscriberGroup', '12', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SocketBlockingMode', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Min_UserName', '3', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Min_Password', '5', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'LinksValidation_LV_Sortfield', 'ValidationTime', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CustomConfig_LV_Sortfield', 'FieldName', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Event_LV_SortField', 'Description', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Theme_LV_SortField', 'Name', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Template_LV_SortField', 'FileName', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Lang_LV_SortField', 'PackName', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Phrase_LV_SortField', 'Phrase', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'LangEmail_LV_SortField', 'Description', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CustomData_LV_SortField', 'FieldName', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Summary_SortField', 'Module', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Session_SortField', 'UserName', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SearchLog_SortField', 'Keyword', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_StatItem', '10', 'inportal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Groups', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Event', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_BanRules', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_SearchLog', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_LV_lang', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_LV_Themes', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_LV_Catlist', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Reviews', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Modules', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Grouplist', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Images', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'EmailsL_SortField', 'time_sent', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_EmailsL', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_CustomData', '20', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Perpage_Review', '10', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Search_MinKeyword_Length', '3', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Users_AllowReset', '180', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Email_As_Login', '0', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RegistrationCaptcha', '0', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_LoggedInGroup', '15', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_MembershipExpirationReminder', '10', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'FirstDayOfWeek', '1', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SSL_URL', '', 'In-Portal', 'in-portal:configure_general');
+INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AdminSSL_URL', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Require_SSL', '', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'Force_HTTP_When_SSL_Not_Required', '1', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SessionCookieName', 'sid', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseModRewrite', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseModRewriteWithSSL', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'SessionReferrerCheck', '1', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ErrorTemplate', 'error_notfound', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseJSRedirect', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MaxImportCategoryLevels', '10', 'In-Portal', 'in-portal:configure_categories');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseCronForRegularEvent', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'NoPermissionTemplate', 'no_permission', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseOutputCompression', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'OutputCompressionLevel', '7', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'MailFunctionHeaderSeparator', 1, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'CategoriesRebuildSerial', '0', 'In-Portal', '');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseToolbarLabels', '1', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseSmallHeader', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'User_Default_Registration_Country', '', 'In-Portal:Users', 'in-portal:configure_users');
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');
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');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseColumnFreezer', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'TrimRequiredFields', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UsePageHitCounter', 0, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'PageHitCounter', 0, 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'UseChangeLog', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'AutoRefreshIntervals', '1,5,15,30,60,120,240', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'KeepSessionOnBrowserClose', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'ForceImageMagickResize', '0', 'In-Portal', 'in-portal:configure_general');
INSERT INTO ConfigurationValues VALUES (DEFAULT, 'RememberLastAdminTemplate', '', 'In-Portal:Users', 'in-portal:configure_users');
INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.add', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.ADD', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.add', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.APPROVE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.approve', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.APPROVE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.approve', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.VALIDATE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.validate', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.VALIDATE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.validate', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.DENY', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.deny', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.DENY', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.deny', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.PSWD', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.PSWD', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.forgotpw', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.ADD.PENDING', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.add.pending', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.ADD.PENDING', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.add.pending', 1);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.add', 0);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.add.pending', 0);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD.PENDING', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.add.pending', 1);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.ADD', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.add', 1);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DELETE', NULL, 1, 0, 'In-Portal:Category', 'la_event_category_delete', 0);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DELETE', NULL, 2, 0, 'In-Portal:Category', 'la_event_category_delete', 1);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.MODIFY', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.modify', 0);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.MODIFY', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.modify', 1);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.APPROVE', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.approve', 0);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.APPROVE', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.approve', 1);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DENY', NULL, 1, 0, 'In-Portal:Category', 'la_event_category.deny', 0);
INSERT INTO Events VALUES (DEFAULT, 'CATEGORY.DENY', NULL, 2, 0, 'In-Portal:Category', 'la_event_category.deny', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.SUBSCRIBE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.subscribe', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.SUBSCRIBE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.subscribe', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.UNSUBSCRIBE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 0);
INSERT INTO Events VALUES (DEFAULT, 'USER.UNSUBSCRIBE', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.unsubscribe', 1);
INSERT INTO Events VALUES (DEFAULT, 'USER.SUGGEST', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.suggest', '0');
INSERT INTO Events VALUES (DEFAULT, 'USER.SUGGEST', NULL, 2, 0, 'In-Portal:Users', 'la_event_user.suggest', '1');
INSERT INTO Events VALUES (DEFAULT, 'USER.PSWDC', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.pswd_confirm', '0');
INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expired', '0');
INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRED', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expired', '1');
INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expiration_notice', '0');
INSERT INTO Events VALUES (DEFAULT, 'USER.MEMBERSHIP.EXPIRATION.NOTICE', NULL, 1, 0, 'In-Portal:Users', 'la_event_user.membership_expiration_notice', '1');
INSERT INTO Events VALUES (DEFAULT, 'COMMON.FOOTER', NULL, 1, 0, 'In-Portal', 'la_event_common.footer', 1);
INSERT INTO IdGenerator VALUES ('100');
INSERT INTO PortalGroup VALUES (15, 'Everyone', 'Everyone', 0, 1, 0, 1, 15, 0);
INSERT INTO PortalGroup VALUES (13, 'Member', '', '1054738682', 0, 0, 1, 13, 1);
INSERT INTO PortalGroup VALUES (12, 'Subscribers', '', '1054738670', 0, 0, 1, 12, 0);
INSERT INTO PortalGroup VALUES (14, 'Guest', 'Guest User', '0', 1, 0, 1, 14, 0);
INSERT INTO PortalGroup VALUES (11, 'admin', '', '1054738405', 0, 0, 1, 11, 0);
INSERT INTO StdDestinations VALUES (1, 1, DEFAULT, 'la_country_AFG', 'AFG', 'AF');
INSERT INTO StdDestinations VALUES (2, 1, DEFAULT, 'la_country_ALB', 'ALB', 'AL');
INSERT INTO StdDestinations VALUES (3, 1, DEFAULT, 'la_country_DZA', 'DZA', 'DZ');
INSERT INTO StdDestinations VALUES (4, 1, DEFAULT, 'la_country_ASM', 'ASM', 'AS');
INSERT INTO StdDestinations VALUES (5, 1, DEFAULT, 'la_country_AND', 'AND', 'AD');
INSERT INTO StdDestinations VALUES (6, 1, DEFAULT, 'la_country_AGO', 'AGO', 'AO');
INSERT INTO StdDestinations VALUES (7, 1, DEFAULT, 'la_country_AIA', 'AIA', 'AI');
INSERT INTO StdDestinations VALUES (8, 1, DEFAULT, 'la_country_ATA', 'ATA', 'AQ');
INSERT INTO StdDestinations VALUES (9, 1, DEFAULT, 'la_country_ATG', 'ATG', 'AG');
INSERT INTO StdDestinations VALUES (10, 1, DEFAULT, 'la_country_ARG', 'ARG', 'AR');
INSERT INTO StdDestinations VALUES (11, 1, DEFAULT, 'la_country_ARM', 'ARM', 'AM');
INSERT INTO StdDestinations VALUES (12, 1, DEFAULT, 'la_country_ABW', 'ABW', 'AW');
INSERT INTO StdDestinations VALUES (13, 1, DEFAULT, 'la_country_AUS', 'AUS', 'AU');
INSERT INTO StdDestinations VALUES (14, 1, DEFAULT, 'la_country_AUT', 'AUT', 'AT');
INSERT INTO StdDestinations VALUES (15, 1, DEFAULT, 'la_country_AZE', 'AZE', 'AZ');
INSERT INTO StdDestinations VALUES (16, 1, DEFAULT, 'la_country_BHS', 'BHS', 'BS');
INSERT INTO StdDestinations VALUES (17, 1, DEFAULT, 'la_country_BHR', 'BHR', 'BH');
INSERT INTO StdDestinations VALUES (18, 1, DEFAULT, 'la_country_BGD', 'BGD', 'BD');
INSERT INTO StdDestinations VALUES (19, 1, DEFAULT, 'la_country_BRB', 'BRB', 'BB');
INSERT INTO StdDestinations VALUES (20, 1, DEFAULT, 'la_country_BLR', 'BLR', 'BY');
INSERT INTO StdDestinations VALUES (21, 1, DEFAULT, 'la_country_BEL', 'BEL', 'BE');
INSERT INTO StdDestinations VALUES (22, 1, DEFAULT, 'la_country_BLZ', 'BLZ', 'BZ');
INSERT INTO StdDestinations VALUES (23, 1, DEFAULT, 'la_country_BEN', 'BEN', 'BJ');
INSERT INTO StdDestinations VALUES (24, 1, DEFAULT, 'la_country_BMU', 'BMU', 'BM');
INSERT INTO StdDestinations VALUES (25, 1, DEFAULT, 'la_country_BTN', 'BTN', 'BT');
INSERT INTO StdDestinations VALUES (26, 1, DEFAULT, 'la_country_BOL', 'BOL', 'BO');
INSERT INTO StdDestinations VALUES (27, 1, DEFAULT, 'la_country_BIH', 'BIH', 'BA');
INSERT INTO StdDestinations VALUES (28, 1, DEFAULT, 'la_country_BWA', 'BWA', 'BW');
INSERT INTO StdDestinations VALUES (29, 1, DEFAULT, 'la_country_BVT', 'BVT', 'BV');
INSERT INTO StdDestinations VALUES (30, 1, DEFAULT, 'la_country_BRA', 'BRA', 'BR');
INSERT INTO StdDestinations VALUES (31, 1, DEFAULT, 'la_country_IOT', 'IOT', 'IO');
INSERT INTO StdDestinations VALUES (32, 1, DEFAULT, 'la_country_BRN', 'BRN', 'BN');
INSERT INTO StdDestinations VALUES (33, 1, DEFAULT, 'la_country_BGR', 'BGR', 'BG');
INSERT INTO StdDestinations VALUES (34, 1, DEFAULT, 'la_country_BFA', 'BFA', 'BF');
INSERT INTO StdDestinations VALUES (35, 1, DEFAULT, 'la_country_BDI', 'BDI', 'BI');
INSERT INTO StdDestinations VALUES (36, 1, DEFAULT, 'la_country_KHM', 'KHM', 'KH');
INSERT INTO StdDestinations VALUES (37, 1, DEFAULT, 'la_country_CMR', 'CMR', 'CM');
INSERT INTO StdDestinations VALUES (38, 1, DEFAULT, 'la_country_CAN', 'CAN', 'CA');
INSERT INTO StdDestinations VALUES (39, 1, DEFAULT, 'la_country_CPV', 'CPV', 'CV');
INSERT INTO StdDestinations VALUES (40, 1, DEFAULT, 'la_country_CYM', 'CYM', 'KY');
INSERT INTO StdDestinations VALUES (41, 1, DEFAULT, 'la_country_CAF', 'CAF', 'CF');
INSERT INTO StdDestinations VALUES (42, 1, DEFAULT, 'la_country_TCD', 'TCD', 'TD');
INSERT INTO StdDestinations VALUES (43, 1, DEFAULT, 'la_country_CHL', 'CHL', 'CL');
INSERT INTO StdDestinations VALUES (44, 1, DEFAULT, 'la_country_CHN', 'CHN', 'CN');
INSERT INTO StdDestinations VALUES (45, 1, DEFAULT, 'la_country_CXR', 'CXR', 'CX');
INSERT INTO StdDestinations VALUES (46, 1, DEFAULT, 'la_country_CCK', 'CCK', 'CC');
INSERT INTO StdDestinations VALUES (47, 1, DEFAULT, 'la_country_COL', 'COL', 'CO');
INSERT INTO StdDestinations VALUES (48, 1, DEFAULT, 'la_country_COM', 'COM', 'KM');
INSERT INTO StdDestinations VALUES (49, 1, DEFAULT, 'la_country_COD', 'COD', 'CD');
INSERT INTO StdDestinations VALUES (50, 1, DEFAULT, 'la_country_COG', 'COG', 'CG');
INSERT INTO StdDestinations VALUES (51, 1, DEFAULT, 'la_country_COK', 'COK', 'CK');
INSERT INTO StdDestinations VALUES (52, 1, DEFAULT, 'la_country_CRI', 'CRI', 'CR');
INSERT INTO StdDestinations VALUES (53, 1, DEFAULT, 'la_country_CIV', 'CIV', 'CI');
INSERT INTO StdDestinations VALUES (54, 1, DEFAULT, 'la_country_HRV', 'HRV', 'HR');
INSERT INTO StdDestinations VALUES (55, 1, DEFAULT, 'la_country_CUB', 'CUB', 'CU');
INSERT INTO StdDestinations VALUES (56, 1, DEFAULT, 'la_country_CYP', 'CYP', 'CY');
INSERT INTO StdDestinations VALUES (57, 1, DEFAULT, 'la_country_CZE', 'CZE', 'CZ');
INSERT INTO StdDestinations VALUES (58, 1, DEFAULT, 'la_country_DNK', 'DNK', 'DK');
INSERT INTO StdDestinations VALUES (59, 1, DEFAULT, 'la_country_DJI', 'DJI', 'DJ');
INSERT INTO StdDestinations VALUES (60, 1, DEFAULT, 'la_country_DMA', 'DMA', 'DM');
INSERT INTO StdDestinations VALUES (61, 1, DEFAULT, 'la_country_DOM', 'DOM', 'DO');
INSERT INTO StdDestinations VALUES (62, 1, DEFAULT, 'la_country_TLS', 'TLS', 'TL');
INSERT INTO StdDestinations VALUES (63, 1, DEFAULT, 'la_country_ECU', 'ECU', 'EC');
INSERT INTO StdDestinations VALUES (64, 1, DEFAULT, 'la_country_EGY', 'EGY', 'EG');
INSERT INTO StdDestinations VALUES (65, 1, DEFAULT, 'la_country_SLV', 'SLV', 'SV');
INSERT INTO StdDestinations VALUES (66, 1, DEFAULT, 'la_country_GNQ', 'GNQ', 'GQ');
INSERT INTO StdDestinations VALUES (67, 1, DEFAULT, 'la_country_ERI', 'ERI', 'ER');
INSERT INTO StdDestinations VALUES (68, 1, DEFAULT, 'la_country_EST', 'EST', 'EE');
INSERT INTO StdDestinations VALUES (69, 1, DEFAULT, 'la_country_ETH', 'ETH', 'ET');
INSERT INTO StdDestinations VALUES (70, 1, DEFAULT, 'la_country_FLK', 'FLK', 'FK');
INSERT INTO StdDestinations VALUES (71, 1, DEFAULT, 'la_country_FRO', 'FRO', 'FO');
INSERT INTO StdDestinations VALUES (72, 1, DEFAULT, 'la_country_FJI', 'FJI', 'FJ');
INSERT INTO StdDestinations VALUES (73, 1, DEFAULT, 'la_country_FIN', 'FIN', 'FI');
INSERT INTO StdDestinations VALUES (74, 1, DEFAULT, 'la_country_FRA', 'FRA', 'FR');
INSERT INTO StdDestinations VALUES (75, 1, DEFAULT, 'la_country_FXX', 'FXX', 'FX');
INSERT INTO StdDestinations VALUES (76, 1, DEFAULT, 'la_country_GUF', 'GUF', 'GF');
INSERT INTO StdDestinations VALUES (77, 1, DEFAULT, 'la_country_PYF', 'PYF', 'PF');
INSERT INTO StdDestinations VALUES (78, 1, DEFAULT, 'la_country_ATF', 'ATF', 'TF');
INSERT INTO StdDestinations VALUES (79, 1, DEFAULT, 'la_country_GAB', 'GAB', 'GA');
INSERT INTO StdDestinations VALUES (80, 1, DEFAULT, 'la_country_GMB', 'GMB', 'GM');
INSERT INTO StdDestinations VALUES (81, 1, DEFAULT, 'la_country_GEO', 'GEO', 'GE');
INSERT INTO StdDestinations VALUES (82, 1, DEFAULT, 'la_country_DEU', 'DEU', 'DE');
INSERT INTO StdDestinations VALUES (83, 1, DEFAULT, 'la_country_GHA', 'GHA', 'GH');
INSERT INTO StdDestinations VALUES (84, 1, DEFAULT, 'la_country_GIB', 'GIB', 'GI');
INSERT INTO StdDestinations VALUES (85, 1, DEFAULT, 'la_country_GRC', 'GRC', 'GR');
INSERT INTO StdDestinations VALUES (86, 1, DEFAULT, 'la_country_GRL', 'GRL', 'GL');
INSERT INTO StdDestinations VALUES (87, 1, DEFAULT, 'la_country_GRD', 'GRD', 'GD');
INSERT INTO StdDestinations VALUES (88, 1, DEFAULT, 'la_country_GLP', 'GLP', 'GP');
INSERT INTO StdDestinations VALUES (89, 1, DEFAULT, 'la_country_GUM', 'GUM', 'GU');
INSERT INTO StdDestinations VALUES (90, 1, DEFAULT, 'la_country_GTM', 'GTM', 'GT');
INSERT INTO StdDestinations VALUES (91, 1, DEFAULT, 'la_country_GIN', 'GIN', 'GN');
INSERT INTO StdDestinations VALUES (92, 1, DEFAULT, 'la_country_GNB', 'GNB', 'GW');
INSERT INTO StdDestinations VALUES (93, 1, DEFAULT, 'la_country_GUY', 'GUY', 'GY');
INSERT INTO StdDestinations VALUES (94, 1, DEFAULT, 'la_country_HTI', 'HTI', 'HT');
INSERT INTO StdDestinations VALUES (95, 1, DEFAULT, 'la_country_HMD', 'HMD', 'HM');
INSERT INTO StdDestinations VALUES (96, 1, DEFAULT, 'la_country_HND', 'HND', 'HN');
INSERT INTO StdDestinations VALUES (97, 1, DEFAULT, 'la_country_HKG', 'HKG', 'HK');
INSERT INTO StdDestinations VALUES (98, 1, DEFAULT, 'la_country_HUN', 'HUN', 'HU');
INSERT INTO StdDestinations VALUES (99, 1, DEFAULT, 'la_country_ISL', 'ISL', 'IS');
INSERT INTO StdDestinations VALUES (100, 1, DEFAULT, 'la_country_IND', 'IND', 'IN');
INSERT INTO StdDestinations VALUES (101, 1, DEFAULT, 'la_country_IDN', 'IDN', 'ID');
INSERT INTO StdDestinations VALUES (102, 1, DEFAULT, 'la_country_IRN', 'IRN', 'IR');
INSERT INTO StdDestinations VALUES (103, 1, DEFAULT, 'la_country_IRQ', 'IRQ', 'IQ');
INSERT INTO StdDestinations VALUES (104, 1, DEFAULT, 'la_country_IRL', 'IRL', 'IE');
INSERT INTO StdDestinations VALUES (105, 1, DEFAULT, 'la_country_ISR', 'ISR', 'IL');
INSERT INTO StdDestinations VALUES (106, 1, DEFAULT, 'la_country_ITA', 'ITA', 'IT');
INSERT INTO StdDestinations VALUES (107, 1, DEFAULT, 'la_country_JAM', 'JAM', 'JM');
INSERT INTO StdDestinations VALUES (108, 1, DEFAULT, 'la_country_JPN', 'JPN', 'JP');
INSERT INTO StdDestinations VALUES (109, 1, DEFAULT, 'la_country_JOR', 'JOR', 'JO');
INSERT INTO StdDestinations VALUES (110, 1, DEFAULT, 'la_country_KAZ', 'KAZ', 'KZ');
INSERT INTO StdDestinations VALUES (111, 1, DEFAULT, 'la_country_KEN', 'KEN', 'KE');
INSERT INTO StdDestinations VALUES (112, 1, DEFAULT, 'la_country_KIR', 'KIR', 'KI');
INSERT INTO StdDestinations VALUES (113, 1, DEFAULT, 'la_country_PRK', 'PRK', 'KP');
INSERT INTO StdDestinations VALUES (114, 1, DEFAULT, 'la_country_KOR', 'KOR', 'KR');
INSERT INTO StdDestinations VALUES (115, 1, DEFAULT, 'la_country_KWT', 'KWT', 'KW');
INSERT INTO StdDestinations VALUES (116, 1, DEFAULT, 'la_country_KGZ', 'KGZ', 'KG');
INSERT INTO StdDestinations VALUES (117, 1, DEFAULT, 'la_country_LAO', 'LAO', 'LA');
INSERT INTO StdDestinations VALUES (118, 1, DEFAULT, 'la_country_LVA', 'LVA', 'LV');
INSERT INTO StdDestinations VALUES (119, 1, DEFAULT, 'la_country_LBN', 'LBN', 'LB');
INSERT INTO StdDestinations VALUES (120, 1, DEFAULT, 'la_country_LSO', 'LSO', 'LS');
INSERT INTO StdDestinations VALUES (121, 1, DEFAULT, 'la_country_LBR', 'LBR', 'LR');
INSERT INTO StdDestinations VALUES (122, 1, DEFAULT, 'la_country_LBY', 'LBY', 'LY');
INSERT INTO StdDestinations VALUES (123, 1, DEFAULT, 'la_country_LIE', 'LIE', 'LI');
INSERT INTO StdDestinations VALUES (124, 1, DEFAULT, 'la_country_LTU', 'LTU', 'LT');
INSERT INTO StdDestinations VALUES (125, 1, DEFAULT, 'la_country_LUX', 'LUX', 'LU');
INSERT INTO StdDestinations VALUES (126, 1, DEFAULT, 'la_country_MAC', 'MAC', 'MO');
INSERT INTO StdDestinations VALUES (127, 1, DEFAULT, 'la_country_MKD', 'MKD', 'MK');
INSERT INTO StdDestinations VALUES (128, 1, DEFAULT, 'la_country_MDG', 'MDG', 'MG');
INSERT INTO StdDestinations VALUES (129, 1, DEFAULT, 'la_country_MWI', 'MWI', 'MW');
INSERT INTO StdDestinations VALUES (130, 1, DEFAULT, 'la_country_MYS', 'MYS', 'MY');
INSERT INTO StdDestinations VALUES (131, 1, DEFAULT, 'la_country_MDV', 'MDV', 'MV');
INSERT INTO StdDestinations VALUES (132, 1, DEFAULT, 'la_country_MLI', 'MLI', 'ML');
INSERT INTO StdDestinations VALUES (133, 1, DEFAULT, 'la_country_MLT', 'MLT', 'MT');
INSERT INTO StdDestinations VALUES (134, 1, DEFAULT, 'la_country_MHL', 'MHL', 'MH');
INSERT INTO StdDestinations VALUES (135, 1, DEFAULT, 'la_country_MTQ', 'MTQ', 'MQ');
INSERT INTO StdDestinations VALUES (136, 1, DEFAULT, 'la_country_MRT', 'MRT', 'MR');
INSERT INTO StdDestinations VALUES (137, 1, DEFAULT, 'la_country_MUS', 'MUS', 'MU');
INSERT INTO StdDestinations VALUES (138, 1, DEFAULT, 'la_country_MYT', 'MYT', 'YT');
INSERT INTO StdDestinations VALUES (139, 1, DEFAULT, 'la_country_MEX', 'MEX', 'MX');
INSERT INTO StdDestinations VALUES (140, 1, DEFAULT, 'la_country_FSM', 'FSM', 'FM');
INSERT INTO StdDestinations VALUES (141, 1, DEFAULT, 'la_country_MDA', 'MDA', 'MD');
INSERT INTO StdDestinations VALUES (142, 1, DEFAULT, 'la_country_MCO', 'MCO', 'MC');
INSERT INTO StdDestinations VALUES (143, 1, DEFAULT, 'la_country_MNG', 'MNG', 'MN');
INSERT INTO StdDestinations VALUES (144, 1, DEFAULT, 'la_country_MSR', 'MSR', 'MS');
INSERT INTO StdDestinations VALUES (145, 1, DEFAULT, 'la_country_MAR', 'MAR', 'MA');
INSERT INTO StdDestinations VALUES (146, 1, DEFAULT, 'la_country_MOZ', 'MOZ', 'MZ');
INSERT INTO StdDestinations VALUES (147, 1, DEFAULT, 'la_country_MMR', 'MMR', 'MM');
INSERT INTO StdDestinations VALUES (148, 1, DEFAULT, 'la_country_NAM', 'NAM', 'NA');
INSERT INTO StdDestinations VALUES (149, 1, DEFAULT, 'la_country_NRU', 'NRU', 'NR');
INSERT INTO StdDestinations VALUES (150, 1, DEFAULT, 'la_country_NPL', 'NPL', 'NP');
INSERT INTO StdDestinations VALUES (151, 1, DEFAULT, 'la_country_NLD', 'NLD', 'NL');
INSERT INTO StdDestinations VALUES (152, 1, DEFAULT, 'la_country_ANT', 'ANT', 'AN');
INSERT INTO StdDestinations VALUES (153, 1, DEFAULT, 'la_country_NCL', 'NCL', 'NC');
INSERT INTO StdDestinations VALUES (154, 1, DEFAULT, 'la_country_NZL', 'NZL', 'NZ');
INSERT INTO StdDestinations VALUES (155, 1, DEFAULT, 'la_country_NIC', 'NIC', 'NI');
INSERT INTO StdDestinations VALUES (156, 1, DEFAULT, 'la_country_NER', 'NER', 'NE');
INSERT INTO StdDestinations VALUES (157, 1, DEFAULT, 'la_country_NGA', 'NGA', 'NG');
INSERT INTO StdDestinations VALUES (158, 1, DEFAULT, 'la_country_NIU', 'NIU', 'NU');
INSERT INTO StdDestinations VALUES (159, 1, DEFAULT, 'la_country_NFK', 'NFK', 'NF');
INSERT INTO StdDestinations VALUES (160, 1, DEFAULT, 'la_country_MNP', 'MNP', 'MP');
INSERT INTO StdDestinations VALUES (161, 1, DEFAULT, 'la_country_NOR', 'NOR', 'NO');
INSERT INTO StdDestinations VALUES (162, 1, DEFAULT, 'la_country_OMN', 'OMN', 'OM');
INSERT INTO StdDestinations VALUES (163, 1, DEFAULT, 'la_country_PAK', 'PAK', 'PK');
INSERT INTO StdDestinations VALUES (164, 1, DEFAULT, 'la_country_PLW', 'PLW', 'PW');
INSERT INTO StdDestinations VALUES (165, 1, DEFAULT, 'la_country_PSE', 'PSE', 'PS');
INSERT INTO StdDestinations VALUES (166, 1, DEFAULT, 'la_country_PAN', 'PAN', 'PA');
INSERT INTO StdDestinations VALUES (167, 1, DEFAULT, 'la_country_PNG', 'PNG', 'PG');
INSERT INTO StdDestinations VALUES (168, 1, DEFAULT, 'la_country_PRY', 'PRY', 'PY');
INSERT INTO StdDestinations VALUES (169, 1, DEFAULT, 'la_country_PER', 'PER', 'PE');
INSERT INTO StdDestinations VALUES (170, 1, DEFAULT, 'la_country_PHL', 'PHL', 'PH');
INSERT INTO StdDestinations VALUES (171, 1, DEFAULT, 'la_country_PCN', 'PCN', 'PN');
INSERT INTO StdDestinations VALUES (172, 1, DEFAULT, 'la_country_POL', 'POL', 'PL');
INSERT INTO StdDestinations VALUES (173, 1, DEFAULT, 'la_country_PRT', 'PRT', 'PT');
INSERT INTO StdDestinations VALUES (174, 1, DEFAULT, 'la_country_PRI', 'PRI', 'PR');
INSERT INTO StdDestinations VALUES (175, 1, DEFAULT, 'la_country_QAT', 'QAT', 'QA');
INSERT INTO StdDestinations VALUES (176, 1, DEFAULT, 'la_country_REU', 'REU', 'RE');
INSERT INTO StdDestinations VALUES (177, 1, DEFAULT, 'la_country_ROU', 'ROU', 'RO');
INSERT INTO StdDestinations VALUES (178, 1, DEFAULT, 'la_country_RUS', 'RUS', 'RU');
INSERT INTO StdDestinations VALUES (179, 1, DEFAULT, 'la_country_RWA', 'RWA', 'RW');
INSERT INTO StdDestinations VALUES (180, 1, DEFAULT, 'la_country_KNA', 'KNA', 'KN');
INSERT INTO StdDestinations VALUES (181, 1, DEFAULT, 'la_country_LCA', 'LCA', 'LC');
INSERT INTO StdDestinations VALUES (182, 1, DEFAULT, 'la_country_VCT', 'VCT', 'VC');
INSERT INTO StdDestinations VALUES (183, 1, DEFAULT, 'la_country_WSM', 'WSM', 'WS');
INSERT INTO StdDestinations VALUES (184, 1, DEFAULT, 'la_country_SMR', 'SMR', 'SM');
INSERT INTO StdDestinations VALUES (185, 1, DEFAULT, 'la_country_STP', 'STP', 'ST');
INSERT INTO StdDestinations VALUES (186, 1, DEFAULT, 'la_country_SAU', 'SAU', 'SA');
INSERT INTO StdDestinations VALUES (187, 1, DEFAULT, 'la_country_SEN', 'SEN', 'SN');
INSERT INTO StdDestinations VALUES (188, 1, DEFAULT, 'la_country_SYC', 'SYC', 'SC');
INSERT INTO StdDestinations VALUES (189, 1, DEFAULT, 'la_country_SLE', 'SLE', 'SL');
INSERT INTO StdDestinations VALUES (190, 1, DEFAULT, 'la_country_SGP', 'SGP', 'SG');
INSERT INTO StdDestinations VALUES (191, 1, DEFAULT, 'la_country_SVK', 'SVK', 'SK');
INSERT INTO StdDestinations VALUES (192, 1, DEFAULT, 'la_country_SVN', 'SVN', 'SI');
INSERT INTO StdDestinations VALUES (193, 1, DEFAULT, 'la_country_SLB', 'SLB', 'SB');
INSERT INTO StdDestinations VALUES (194, 1, DEFAULT, 'la_country_SOM', 'SOM', 'SO');
INSERT INTO StdDestinations VALUES (195, 1, DEFAULT, 'la_country_ZAF', 'ZAF', 'ZA');
INSERT INTO StdDestinations VALUES (196, 1, DEFAULT, 'la_country_SGS', 'SGS', 'GS');
INSERT INTO StdDestinations VALUES (197, 1, DEFAULT, 'la_country_ESP', 'ESP', 'ES');
INSERT INTO StdDestinations VALUES (198, 1, DEFAULT, 'la_country_LKA', 'LKA', 'LK');
INSERT INTO StdDestinations VALUES (199, 1, DEFAULT, 'la_country_SHN', 'SHN', 'SH');
INSERT INTO StdDestinations VALUES (200, 1, DEFAULT, 'la_country_SPM', 'SPM', 'PM');
INSERT INTO StdDestinations VALUES (201, 1, DEFAULT, 'la_country_SDN', 'SDN', 'SD');
INSERT INTO StdDestinations VALUES (202, 1, DEFAULT, 'la_country_SUR', 'SUR', 'SR');
INSERT INTO StdDestinations VALUES (203, 1, DEFAULT, 'la_country_SJM', 'SJM', 'SJ');
INSERT INTO StdDestinations VALUES (204, 1, DEFAULT, 'la_country_SWZ', 'SWZ', 'SZ');
INSERT INTO StdDestinations VALUES (205, 1, DEFAULT, 'la_country_SWE', 'SWE', 'SE');
INSERT INTO StdDestinations VALUES (206, 1, DEFAULT, 'la_country_CHE', 'CHE', 'CH');
INSERT INTO StdDestinations VALUES (207, 1, DEFAULT, 'la_country_SYR', 'SYR', 'SY');
INSERT INTO StdDestinations VALUES (208, 1, DEFAULT, 'la_country_TWN', 'TWN', 'TW');
INSERT INTO StdDestinations VALUES (209, 1, DEFAULT, 'la_country_TJK', 'TJK', 'TJ');
INSERT INTO StdDestinations VALUES (210, 1, DEFAULT, 'la_country_TZA', 'TZA', 'TZ');
INSERT INTO StdDestinations VALUES (211, 1, DEFAULT, 'la_country_THA', 'THA', 'TH');
INSERT INTO StdDestinations VALUES (212, 1, DEFAULT, 'la_country_TGO', 'TGO', 'TG');
INSERT INTO StdDestinations VALUES (213, 1, DEFAULT, 'la_country_TKL', 'TKL', 'TK');
INSERT INTO StdDestinations VALUES (214, 1, DEFAULT, 'la_country_TON', 'TON', 'TO');
INSERT INTO StdDestinations VALUES (215, 1, DEFAULT, 'la_country_TTO', 'TTO', 'TT');
INSERT INTO StdDestinations VALUES (216, 1, DEFAULT, 'la_country_TUN', 'TUN', 'TN');
INSERT INTO StdDestinations VALUES (217, 1, DEFAULT, 'la_country_TUR', 'TUR', 'TR');
INSERT INTO StdDestinations VALUES (218, 1, DEFAULT, 'la_country_TKM', 'TKM', 'TM');
INSERT INTO StdDestinations VALUES (219, 1, DEFAULT, 'la_country_TCA', 'TCA', 'TC');
INSERT INTO StdDestinations VALUES (220, 1, DEFAULT, 'la_country_TUV', 'TUV', 'TV');
INSERT INTO StdDestinations VALUES (221, 1, DEFAULT, 'la_country_UGA', 'UGA', 'UG');
INSERT INTO StdDestinations VALUES (222, 1, DEFAULT, 'la_country_UKR', 'UKR', 'UA');
INSERT INTO StdDestinations VALUES (223, 1, DEFAULT, 'la_country_ARE', 'ARE', 'AE');
INSERT INTO StdDestinations VALUES (224, 1, DEFAULT, 'la_country_GBR', 'GBR', 'GB');
INSERT INTO StdDestinations VALUES (225, 1, DEFAULT, 'la_country_USA', 'USA', 'US');
INSERT INTO StdDestinations VALUES (226, 1, DEFAULT, 'la_country_UMI', 'UMI', 'UM');
INSERT INTO StdDestinations VALUES (227, 1, DEFAULT, 'la_country_URY', 'URY', 'UY');
INSERT INTO StdDestinations VALUES (228, 1, DEFAULT, 'la_country_UZB', 'UZB', 'UZ');
INSERT INTO StdDestinations VALUES (229, 1, DEFAULT, 'la_country_VUT', 'VUT', 'VU');
INSERT INTO StdDestinations VALUES (230, 1, DEFAULT, 'la_country_VAT', 'VAT', 'VA');
INSERT INTO StdDestinations VALUES (231, 1, DEFAULT, 'la_country_VEN', 'VEN', 'VE');
INSERT INTO StdDestinations VALUES (232, 1, DEFAULT, 'la_country_VNM', 'VNM', 'VN');
INSERT INTO StdDestinations VALUES (233, 1, DEFAULT, 'la_country_VGB', 'VGB', 'VG');
INSERT INTO StdDestinations VALUES (234, 1, DEFAULT, 'la_country_VIR', 'VIR', 'VI');
INSERT INTO StdDestinations VALUES (235, 1, DEFAULT, 'la_country_WLF', 'WLF', 'WF');
INSERT INTO StdDestinations VALUES (236, 1, DEFAULT, 'la_country_ESH', 'ESH', 'EH');
INSERT INTO StdDestinations VALUES (237, 1, DEFAULT, 'la_country_YEM', 'YEM', 'YE');
INSERT INTO StdDestinations VALUES (238, 1, DEFAULT, 'la_country_YUG', 'YUG', 'YU');
INSERT INTO StdDestinations VALUES (239, 1, DEFAULT, 'la_country_ZMB', 'ZMB', 'ZM');
INSERT INTO StdDestinations VALUES (240, 1, DEFAULT, 'la_country_ZWE', 'ZWE', 'ZW');
INSERT INTO StdDestinations VALUES (370, 2, 38, 'la_state_YT', 'YT', DEFAULT);
INSERT INTO StdDestinations VALUES (369, 2, 38, 'la_state_SK', 'SK', DEFAULT);
INSERT INTO StdDestinations VALUES (368, 2, 38, 'la_state_QC', 'QC', DEFAULT);
INSERT INTO StdDestinations VALUES (367, 2, 38, 'la_state_PE', 'PE', DEFAULT);
INSERT INTO StdDestinations VALUES (366, 2, 38, 'la_state_ON', 'ON', DEFAULT);
INSERT INTO StdDestinations VALUES (365, 2, 38, 'la_state_NU', 'NU', DEFAULT);
INSERT INTO StdDestinations VALUES (364, 2, 38, 'la_state_NS', 'NS', DEFAULT);
INSERT INTO StdDestinations VALUES (363, 2, 38, 'la_state_NT', 'NT', DEFAULT);
INSERT INTO StdDestinations VALUES (362, 2, 38, 'la_state_NL', 'NL', DEFAULT);
INSERT INTO StdDestinations VALUES (361, 2, 38, 'la_state_NB', 'NB', DEFAULT);
INSERT INTO StdDestinations VALUES (360, 2, 38, 'la_state_MB', 'MB', DEFAULT);
INSERT INTO StdDestinations VALUES (359, 2, 38, 'la_state_BC', 'BC', DEFAULT);
INSERT INTO StdDestinations VALUES (358, 2, 38, 'la_state_AB', 'AB', DEFAULT);
INSERT INTO StdDestinations VALUES (357, 2, 225, 'la_state_DC', 'DC', DEFAULT);
INSERT INTO StdDestinations VALUES (356, 2, 225, 'la_state_WY', 'WY', DEFAULT);
INSERT INTO StdDestinations VALUES (355, 2, 225, 'la_state_WI', 'WI', DEFAULT);
INSERT INTO StdDestinations VALUES (354, 2, 225, 'la_state_WV', 'WV', DEFAULT);
INSERT INTO StdDestinations VALUES (353, 2, 225, 'la_state_WA', 'WA', DEFAULT);
INSERT INTO StdDestinations VALUES (352, 2, 225, 'la_state_VA', 'VA', DEFAULT);
INSERT INTO StdDestinations VALUES (351, 2, 225, 'la_state_VT', 'VT', DEFAULT);
INSERT INTO StdDestinations VALUES (350, 2, 225, 'la_state_UT', 'UT', DEFAULT);
INSERT INTO StdDestinations VALUES (349, 2, 225, 'la_state_TX', 'TX', DEFAULT);
INSERT INTO StdDestinations VALUES (348, 2, 225, 'la_state_TN', 'TN', DEFAULT);
INSERT INTO StdDestinations VALUES (347, 2, 225, 'la_state_SD', 'SD', DEFAULT);
INSERT INTO StdDestinations VALUES (346, 2, 225, 'la_state_SC', 'SC', DEFAULT);
INSERT INTO StdDestinations VALUES (345, 2, 225, 'la_state_RI', 'RI', DEFAULT);
INSERT INTO StdDestinations VALUES (344, 2, 225, 'la_state_PR', 'PR', DEFAULT);
INSERT INTO StdDestinations VALUES (343, 2, 225, 'la_state_PA', 'PA', DEFAULT);
INSERT INTO StdDestinations VALUES (342, 2, 225, 'la_state_OR', 'OR', DEFAULT);
INSERT INTO StdDestinations VALUES (341, 2, 225, 'la_state_OK', 'OK', DEFAULT);
INSERT INTO StdDestinations VALUES (340, 2, 225, 'la_state_OH', 'OH', DEFAULT);
INSERT INTO StdDestinations VALUES (339, 2, 225, 'la_state_ND', 'ND', DEFAULT);
INSERT INTO StdDestinations VALUES (338, 2, 225, 'la_state_NC', 'NC', DEFAULT);
INSERT INTO StdDestinations VALUES (337, 2, 225, 'la_state_NY', 'NY', DEFAULT);
INSERT INTO StdDestinations VALUES (336, 2, 225, 'la_state_NM', 'NM', DEFAULT);
INSERT INTO StdDestinations VALUES (335, 2, 225, 'la_state_NJ', 'NJ', DEFAULT);
INSERT INTO StdDestinations VALUES (334, 2, 225, 'la_state_NH', 'NH', DEFAULT);
INSERT INTO StdDestinations VALUES (333, 2, 225, 'la_state_NV', 'NV', DEFAULT);
INSERT INTO StdDestinations VALUES (332, 2, 225, 'la_state_NE', 'NE', DEFAULT);
INSERT INTO StdDestinations VALUES (331, 2, 225, 'la_state_MT', 'MT', DEFAULT);
INSERT INTO StdDestinations VALUES (330, 2, 225, 'la_state_MO', 'MO', DEFAULT);
INSERT INTO StdDestinations VALUES (329, 2, 225, 'la_state_MS', 'MS', DEFAULT);
INSERT INTO StdDestinations VALUES (328, 2, 225, 'la_state_MN', 'MN', DEFAULT);
INSERT INTO StdDestinations VALUES (327, 2, 225, 'la_state_MI', 'MI', DEFAULT);
INSERT INTO StdDestinations VALUES (326, 2, 225, 'la_state_MA', 'MA', DEFAULT);
INSERT INTO StdDestinations VALUES (325, 2, 225, 'la_state_MD', 'MD', DEFAULT);
INSERT INTO StdDestinations VALUES (324, 2, 225, 'la_state_ME', 'ME', DEFAULT);
INSERT INTO StdDestinations VALUES (323, 2, 225, 'la_state_LA', 'LA', DEFAULT);
INSERT INTO StdDestinations VALUES (322, 2, 225, 'la_state_KY', 'KY', DEFAULT);
INSERT INTO StdDestinations VALUES (321, 2, 225, 'la_state_KS', 'KS', DEFAULT);
INSERT INTO StdDestinations VALUES (320, 2, 225, 'la_state_IA', 'IA', DEFAULT);
INSERT INTO StdDestinations VALUES (319, 2, 225, 'la_state_IN', 'IN', DEFAULT);
INSERT INTO StdDestinations VALUES (318, 2, 225, 'la_state_IL', 'IL', DEFAULT);
INSERT INTO StdDestinations VALUES (317, 2, 225, 'la_state_ID', 'ID', DEFAULT);
INSERT INTO StdDestinations VALUES (316, 2, 225, 'la_state_HI', 'HI', DEFAULT);
INSERT INTO StdDestinations VALUES (315, 2, 225, 'la_state_GA', 'GA', DEFAULT);
INSERT INTO StdDestinations VALUES (314, 2, 225, 'la_state_FL', 'FL', DEFAULT);
INSERT INTO StdDestinations VALUES (313, 2, 225, 'la_state_DE', 'DE', DEFAULT);
INSERT INTO StdDestinations VALUES (312, 2, 225, 'la_state_CT', 'CT', DEFAULT);
INSERT INTO StdDestinations VALUES (311, 2, 225, 'la_state_CO', 'CO', DEFAULT);
INSERT INTO StdDestinations VALUES (310, 2, 225, 'la_state_CA', 'CA', DEFAULT);
INSERT INTO StdDestinations VALUES (309, 2, 225, 'la_state_AR', 'AR', DEFAULT);
INSERT INTO StdDestinations VALUES (308, 2, 225, 'la_state_AZ', 'AZ', DEFAULT);
INSERT INTO StdDestinations VALUES (307, 2, 225, 'la_state_AK', 'AK', DEFAULT);
INSERT INTO StdDestinations VALUES (306, 2, 225, 'la_state_AL', 'AL', DEFAULT);
INSERT INTO PermissionConfig VALUES (DEFAULT, 'CATEGORY.VIEW', 'lu_PermName_Category.View_desc', 'lu_PermName_Category.View_error', 'In-Portal');
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', 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: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: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, 'CATEGORY.VIEW', 11, 1, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.ADD', 11, 1, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.DELETE', 11, 1, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'CATEGORY.MODIFY', 11, 1, 0, 0);
INSERT INTO Permissions VALUES (DEFAULT, 'in-portal:service.view', 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 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.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-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, 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\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 vertical-align: middle;\r\n}\r\n\r\n.subsectiontitle td {\r\n vertical-align: middle;\r\n padding: 3px 5px 3px 5px;\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.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.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_1.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";}}', 1206520493, 1);
INSERT INTO Modules VALUES ('Core', 'core/', 'adm', DEFAULT, 1, 1, '', 0, '0');
\ No newline at end of file
Property changes on: branches/RC/core/install/install_data.sql
___________________________________________________________________
Modified: cvs2svn:cvs-rev
## -1 +1 ##
-1.10.2.26
\ No newline at end of property
+1.10.2.27
\ No newline at end of property

Event Timeline