示例#1
0
function main_page($redrawFrames = FALSE)
{
    Carthag::import('com.solarix.ampoliros.hui.Hui');
    global $gEnv;
    if (!$redrawFrames and is_object($gEnv['root']['db']) and !defined('AMPOLIROS_SETUP_PHASE')) {
        import('com.solarix.ampoliros.module.ModuleConfig');
        $mod_cfg = new ModuleConfig($gEnv['root']['db'], 'ampoliros');
        $amp_logo_disabled = $mod_cfg->GetKey('ampoliros-biglogo-disabled');
    } else {
        $amp_logo_disabled = 0;
    }
    $hui = new Hui($gEnv['root']['db'], true);
    $hui->LoadWidget('page');
    $hui->LoadWidget('vertgroup');
    $hui->LoadWidget('button');
    $page_params['title'] = 'Ampoliros';
    $page_params['border'] = 'false';
    if ($redrawFrames) {
        $page_params['javascript'] = "parent.frames.sum.location.reload()\nparent.frames.header.location.reload()";
    }
    $hui_page = new HuiPage('page', $page_params);
    $hui_vertgroup = new HuiVertGroup('vertgroup', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '100%'));
    $hui_buttons_group = new HuiVertGroup('buttons_group', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '0%'));
    if ($amp_logo_disabled != '1') {
        if ($gEnv['core']['edition'] == AMP_EDITION_ASP) {
            $edition = '_asp';
        } else {
            $edition = '_enterprise';
        }
        if (isset($hui_page->mThemeHandler->mStyle['bigdot' . $edition])) {
            $bigdot_image = $hui_page->mThemeHandler->mStyle['bigdot' . $edition];
        } else {
            $bigdot_image = $hui_page->mThemeHandler->mStyle['bigdot'];
        }
        $hui_button = new HuiButton('button', array('action' => 'http://www.ampoliros.com', 'target' => '_top', 'image' => $bigdot_image, 'highlight' => 'false'));
        $hui_buttons_group->AddChild($hui_button);
    }
    if (!$redrawFrames and is_object($gEnv['root']['db']) and !defined('AMPOLIROS_SETUP_PHASE')) {
        // OEM personalization
        //
        $oem_biglogo_filename = $mod_cfg->GetKey('oem-biglogo-filename');
        $oem_url = $mod_cfg->GetKey('oem-url');
        if ($mod_cfg->GetKey('oem-biglogo-disabled') != '1') {
            if (strlen($oem_biglogo_filename) and file_exists(CGI_PATH . $oem_biglogo_filename)) {
                $oem_button = new HuiButton('oembutton', array('action' => strlen($oem_url) ? $oem_url : 'http://www.ampoliros.com', 'target' => '_top', 'image' => CGI_URL . $oem_biglogo_filename, 'highlight' => 'false'));
                $hui_buttons_group->AddChild($oem_button);
            }
        }
    }
    $hui_vertgroup->AddChild($hui_buttons_group);
    $hui_page->AddChild($hui_vertgroup);
    $hui->AddChild($hui_page);
    $hui->Render();
}
示例#2
0
function sum_page()
{
    global $gEnv;
    $amp_locale = new Locale('amp_root_menu', AMP_LANG);
    import('com.solarix.ampoliros.module.ModuleConfig');
    $mod_cfg = new ModuleConfig($gEnv['root']['db'], 'ampoliros');
    $hui = new Hui($gEnv['root']['db'], TRUE);
    $hui->LoadWidget('table');
    $hui->LoadWidget('page');
    $hui->LoadWidget('vertgroup');
    $hui->LoadWidget('vertframe');
    $hui->LoadWidget('treemenu');
    $hui_page = new HuiPage('page', array('title' => 'Ampoliros' . (strlen(AMP_HOST) ? ' - ' . AMP_HOST . (strlen(AMP_DOMAIN) ? '.' . AMP_DOMAIN : '') : ''), 'border' => 'false'));
    $hui_page->mArgs['background'] = $hui_page->mThemeHandler->mStyle['menuback'];
    $hui_mainvertgroup = new HuiVertGroup('mainvertgroup');
    $el[1]['groupname'] = 'Ampoliros';
    $cont = 1;
    $query =& $gEnv['root']['db']->Execute('SELECT id FROM sites');
    if ($query->NumRows()) {
        $el[1]['groupelements'][$cont]['name'] = $amp_locale->GetStr('siteadmin');
        $el[1]['groupelements'][$cont]['image'] = $hui_page->mThemeHandler->mStyle['siteaccess'];
        $el[1]['groupelements'][$cont]['action'] = 'admin/';
        $el[1]['groupelements'][$cont]['themesized'] = 'true';
        $cont++;
    }
    $el[1]['groupelements'][$cont]['name'] = $amp_locale->GetStr('rootadmin');
    $el[1]['groupelements'][$cont]['image'] = $hui_page->mThemeHandler->mStyle['rootaccess'];
    $el[1]['groupelements'][$cont]['action'] = 'root/';
    $el[1]['groupelements'][$cont]['themesized'] = 'true';
    if ($mod_cfg->GetKey('ampoliros-link-disabled') != '1') {
        $el[1]['groupelements'][++$cont]['name'] = $amp_locale->GetStr('amphome');
        $el[1]['groupelements'][$cont]['image'] = $hui_page->mThemeHandler->mStyle['ampminilogo'];
        $el[1]['groupelements'][$cont]['action'] = 'http://www.ampoliros.com/';
        $el[1]['groupelements'][$cont]['target'] = 'op';
        $el[1]['groupelements'][$cont]['themesized'] = 'true';
    }
    if ($mod_cfg->GetKey('solarix-link-disabled') != '1') {
        $el[1]['groupelements'][++$cont]['name'] = $amp_locale->GetStr('solarixhome');
        $el[1]['groupelements'][$cont]['image'] = $hui_page->mThemeHandler->mStyle['solarixminilogo'];
        $el[1]['groupelements'][$cont]['action'] = 'http://www.solarix.biz/';
        $el[1]['groupelements'][$cont]['target'] = 'op';
        $el[1]['groupelements'][$cont]['themesized'] = 'true';
    }
    if ($mod_cfg->GetKey('oem-link-disabled') != '1') {
        $oem_link_filename = $mod_cfg->GetKey('oem-link-filename');
        if (strlen($oem_link_filename) and file_exists(CGI_PATH . $oem_link_filename)) {
            $el[1]['groupelements'][++$cont]['name'] = $mod_cfg->GetKey('oem-name');
            $el[1]['groupelements'][$cont]['image'] = CGI_URL . $oem_link_filename;
            $el[1]['groupelements'][$cont]['action'] = $mod_cfg->GetKey('oem-url');
            $el[1]['groupelements'][$cont]['target'] = 'parent';
            $el[1]['groupelements'][$cont]['themesized'] = 'false';
        }
    }
    $hui_vertframe = new HuiVertFrame('vertframe');
    $hui_vertframe->AddChild(new HuiTreeMenu('treemenu', array('elements' => $el, 'width' => '120', 'target' => 'parent', 'allgroupsactive' => 'true')));
    $hui_mainvertgroup->AddChild($hui_vertframe);
    $hui_page->AddChild($hui_mainvertgroup);
    $hui->AddChild($hui_page);
    $hui->Render();
}
示例#3
0
文件: yaps.php 项目: alexpagnoni/yaps
function main_default($eventData)
{
    global $env, $gYaps_locale, $gTitle, $gPage_content;
    $mod_settings = new ModuleConfig($env['ampdb'], 'yaps');
    $gs_exec = $mod_settings->GetKey('gs_exec');
    if (!strlen($gs_exec)) {
        $gs_exec = '/usr/bin/gs';
    }
    $xml_def = '<vertgroup><name>prefs</name><children>
  <form><name>settings</name><args><action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'default', ''), array('action', 'setsettings', '')))) . '</action></args><children>
    <grid><name>settingsgrid</name><children>
      <label row="0" col="0"><name>gsexec</name><args><label>' . $gYaps_locale->GetStr('gsexec_label') . '</label></args></label>
      <string row="0" col="1"><name>gsexec</name><args><disp>action</disp><value type="encoded">' . urlencode($gs_exec) . '</value><size>20</size></args></string>
    </children></grid>
    <submit><name>submit</name><args><caption>' . $gYaps_locale->GetStr('savesettings_submit') . '</caption></args></submit>
  </children></form>
</children></vertgroup>';
    $gPage_content = new HuiXml('page', array('definition' => $xml_def));
    $gTitle = $gYaps_locale->GetStr('yaps_title');
}
示例#4
0
$hui = new Hui($gEnv['root']['db']);
$hui->LoadWidget('button');
$hui->LoadWidget('grid');
$hui->LoadWidget('horizframe');
$hui->LoadWidget('horizgroup');
$hui->LoadWidget('image');
$hui->LoadWidget('label');
$hui->LoadWidget('link');
$hui->LoadWidget('page');
$hui->LoadWidget('vertframe');
$hui->LoadWidget('vertgroup');
$mod_cfg = new ModuleConfig($env['ampdb'], 'ampoliros');
$hui_page = new HuiPage('page', array('title' => 'Ampoliros', 'border' => 'false'));
$hui_vertgroup = new HuiVertGroup('vertgroup', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '100%'));
$hui_buttons_group = new HuiVertGroup('buttons_group', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '0%'));
if ($mod_cfg->GetKey('ampoliros-biglogo-disabled') != '1') {
    if ($gEnv['core']['edition'] == AMP_EDITION_ASP) {
        $edition = '_asp';
    } else {
        $edition = '_enterprise';
    }
    if (isset($hui_page->mThemeHandler->mStyle['bigdot' . $edition])) {
        $bigdot_image = $hui_page->mThemeHandler->mStyle['bigdot' . $edition];
    } else {
        $bigdot_image = $hui_page->mThemeHandler->mStyle['bigdot'];
    }
    $hui_button = new HuiButton('button', array('action' => 'http://www.ampoliros.com', 'target' => '_top', 'image' => $bigdot_image, 'highlight' => 'false'));
    $hui_buttons_group->AddChild($hui_button);
}
// OEM personalization
//
示例#5
0
 public function startSite($siteId, $userId = '')
 {
     $result = false;
     $this->setMode(Ampoliros::MODE_SITE);
     global $env;
     if (isset($GLOBALS['gEnv']['runtime']['site']['init']) and $GLOBALS['gEnv']['runtime']['site']['init'] == true) {
         return;
     }
     // Site id
     //
     $GLOBALS['gEnv']['site']['id'] = $siteId;
     $env['currentsite'] =& $GLOBALS['gEnv']['site']['id'];
     $env['currentsiteid'] =& $env['currentsite'];
     // Site data
     //
     $sitesquery = $GLOBALS['gEnv']['root']['db']->Execute('SELECT * FROM sites WHERE siteid=' . $GLOBALS['gEnv']['root']['db']->Format_Text($siteId));
     if ($sitesquery->NumRows()) {
         $GLOBALS['gEnv']['site']['data'] = $sitesquery->Fields();
         $env['sitedata'] =& $GLOBALS['gEnv']['site']['data'];
         $sitesquery->Free();
         // Check if site is active
         //
         if ($this->getInterface() != Ampoliros::INTERFACE_WEB and $GLOBALS['gEnv']['site']['data']['siteactive'] == $GLOBALS['gEnv']['root']['db']->fmtfalse) {
             $this->abort('Site disabled');
         }
         // Site log
         //
         define('SITE_LOG', SITESTUFF_PATH . $GLOBALS['gEnv']['site']['data']['siteid'] . '/log/site.log');
         $GLOBALS['gEnv']['site']['log'] = SITE_LOG;
         // Current site serial number
         //
         $GLOBALS['gEnv']['site']['serial'] = $GLOBALS['gEnv']['site']['data']['id'];
         $env['currentsiteserial'] = $GLOBALS['gEnv']['site']['serial'];
         // Site database
         //
         $dbargs['dbtype'] = $GLOBALS['gEnv']['site']['data']['sitedbtype'];
         $dbargs['dbname'] = $GLOBALS['gEnv']['site']['data']['sitedbname'];
         $dbargs['dbhost'] = $GLOBALS['gEnv']['site']['data']['sitedbhost'];
         $dbargs['dbport'] = $GLOBALS['gEnv']['site']['data']['sitedbport'];
         $dbargs['dbuser'] = $GLOBALS['gEnv']['site']['data']['sitedbuser'];
         $dbargs['dbpass'] = $GLOBALS['gEnv']['site']['data']['sitedbpassword'];
         $dbargs['dblog'] = $GLOBALS['gEnv']['site']['data']['sitedblog'];
         $GLOBALS['gEnv']['site']['dblog'] =& $GLOBALS['gEnv']['site']['data']['sitedblog'];
         $db_fact = new DBLayerFactory();
         $GLOBALS['gEnv']['site']['db'] = $db_fact->NewDBLayer($dbargs);
         $env['db'] = $GLOBALS['gEnv']['site']['db'];
         if (!$GLOBALS['gEnv']['site']['db']->Connect($dbargs)) {
             if (!defined('MISC_LIBRARY')) {
                 include LIBRARY_PATH . 'misc.library';
             }
             $adloc = new Locale('amp_misc_auth', $GLOBALS['gEnv']['root']['locale']['language']);
             AmpDie($adloc->GetStr('nodb'));
         }
         // Hui theme
         //
         $tmpquery = $GLOBALS['gEnv']['site']['db']->Execute('SELECT val ' . 'FROM sitesettings ' . 'WHERE keyname=' . $GLOBALS['gEnv']['site']['db']->Format_Text('sitetheme'));
         $GLOBALS['gEnv']['site']['theme'] = $tmpquery->Fields('val');
         // Site cgi
         //
         if (strlen($GLOBALS['gEnv']['site']['data']['siteurl'])) {
             $tmp = parse_url($GLOBALS['gEnv']['site']['data']['siteurl']);
             $GLOBALS['gEnv']['site']['cgi'] = $tmp['scheme'] . '://' . $tmp['host'] . CGI_URL;
         } else {
             $GLOBALS['gEnv']['site']['cgi'] = CGI_URL;
         }
         $env['sitecgi'] =& $GLOBALS['gEnv']['site']['cgi'];
         unset($tmp);
         // Site country
         //
         $tmpquery = $GLOBALS['gEnv']['site']['db']->Execute('SELECT val ' . 'FROM sitesettings ' . 'WHERE keyname=' . $GLOBALS['gEnv']['site']['db']->Format_Text('sitecountry'));
         $GLOBALS['gEnv']['site']['locale']['country'] = strlen($tmpquery->Fields('val')) ? $tmpquery->Fields('val') : AMP_COUNTRY;
         $env['sitecountry'] = $GLOBALS['gEnv']['site']['locale']['country'];
         // Site language
         //
         $tmpquery = $GLOBALS['gEnv']['site']['db']->Execute('SELECT val ' . 'FROM sitesettings ' . 'WHERE keyname=' . $GLOBALS['gEnv']['site']['db']->Format_Text('sitelanguage'));
         $GLOBALS['gEnv']['site']['locale']['language'] = strlen($tmpquery->Fields('val')) ? $tmpquery->Fields('val') : AMP_LANG;
         $env['sitelanguage'] = $GLOBALS['gEnv']['site']['locale']['language'];
         // User
         //
         if (!strlen($userId)) {
             $userId = $siteId;
         }
         // User id
         //
         $GLOBALS['gEnv']['user']['id'] = $userId;
         $env['currentuser'] =& $GLOBALS['gEnv']['user']['id'];
         // Hui theme
         //
         $tmpquery = $GLOBALS['gEnv']['site']['db']->Execute('SELECT val ' . 'FROM sitesettings ' . 'WHERE keyname=' . $GLOBALS['gEnv']['site']['db']->Format_Text($GLOBALS['gEnv']['user']['id'] . '-theme'));
         $GLOBALS['gEnv']['user']['theme'] = $tmpquery->Fields('val');
         if (!strlen($GLOBALS['gEnv']['user']['theme'])) {
             if (!strlen($GLOBALS['gEnv']['site']['theme'])) {
                 import('com.solarix.ampoliros.module.ModuleConfig');
                 $mod_cfg = new ModuleConfig($GLOBALS['gEnv']['root']['db'], 'ampoliros');
                 if (strlen($mod_cfg->GetKey('hui-root-theme'))) {
                     $GLOBALS['gEnv']['site']['theme'] = $mod_cfg->GetKey('hui-root-theme');
                     if (!strlen($GLOBALS['gEnv']['site']['theme'])) {
                         $GLOBALS['gEnv']['site']['theme'] = $GLOBALS['gEnv']['hui']['theme']['default'];
                     }
                 } else {
                     $GLOBALS['gEnv']['site']['theme'] = $GLOBALS['gEnv']['hui']['theme']['default'];
                 }
                 unset($mod_cfg);
             }
             $GLOBALS['gEnv']['user']['theme'] = $GLOBALS['gEnv']['site']['theme'];
         }
         $GLOBALS['gEnv']['hui']['theme']['name'] = $GLOBALS['gEnv']['user']['theme'];
         // User country
         //
         $tmpquery = $GLOBALS['gEnv']['site']['db']->Execute('SELECT val FROM sitesettings WHERE keyname=' . $GLOBALS['gEnv']['site']['db']->Format_Text($GLOBALS['gEnv']['user']['id'] . '-country'));
         $GLOBALS['gEnv']['user']['locale']['country'] = $env[$GLOBALS['gEnv']['user']['id'] . '-country'] = strlen($tmpquery->Fields('val')) ? $tmpquery->Fields('val') : $GLOBALS['gEnv']['site']['locale']['country'];
         $env['currentuser-country'] = $GLOBALS['gEnv']['user']['locale']['country'];
         // User language
         //
         $tmpquery = $GLOBALS['gEnv']['site']['db']->Execute('SELECT val FROM sitesettings WHERE keyname=' . $GLOBALS['gEnv']['site']['db']->Format_Text($GLOBALS['gEnv']['user']['id'] . '-language'));
         $GLOBALS['gEnv']['user']['locale']['language'] = $env[$GLOBALS['gEnv']['user']['id'] . '-language'] = strlen($tmpquery->Fields('val')) ? $tmpquery->Fields('val') : $GLOBALS['gEnv']['site']['locale']['language'];
         $env['currentuser-language'] = $GLOBALS['gEnv']['user']['locale']['language'];
         $env['sitelocale'] = $GLOBALS['gEnv']['user']['locale']['language'];
         // Old one
         $tmpquery = $GLOBALS['gEnv']['root']['db']->Execute('SELECT id,fname,lname,email,groupid FROM users WHERE username='******'gEnv']['root']['db']->Format_Text($GLOBALS['gEnv']['user']['id']));
         // User datas
         //
         $GLOBALS['gEnv']['user']['group'] = $tmpquery->Fields('groupid');
         $GLOBALS['gEnv']['user']['serial'] = $tmpquery->Fields('id');
         $GLOBALS['gEnv']['user']['data']['lname'] = $tmpquery->Fields('lname');
         $GLOBALS['gEnv']['user']['data']['fname'] = $tmpquery->Fields('fname');
         $GLOBALS['gEnv']['user']['data']['email'] = $tmpquery->Fields('email');
         $env['currentusercname'] = $tmpquery->Fields('fname') . ' ' . $tmpquery->Fields('lname');
         $env['currentgroupserial'] = $GLOBALS['gEnv']['user']['group'];
         $env['currentuserserial'] = $GLOBALS['gEnv']['user']['serial'];
         $tmpquery->Free();
         $result = true;
     }
     $GLOBALS['gEnv']['runtime']['site']['init'] = true;
     return $result;
 }
示例#6
0
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 *   This program is distributed in the hope that it will be useful,
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *   GNU General Public License for more details.
 *
 *   You should have received a copy of the GNU General Public License
 *   along with this program; if not, write to the Free Software
 *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 *
 */
// $Id: auth.php,v 1.11 2004-07-08 15:04:26 alex Exp $
if (!defined('BASE_AUTH_PHP')) {
    define('BASE_AUTH_PHP', true);
    require 'ampoliros.php';
    $amp = Ampoliros::instance('Ampoliros');
    $amp->setInterface(Ampoliros::INTERFACE_WEB);
    $amp->startRoot();
    if (!defined('AMPOLIROS_SETUP_PHASE')) {
        import('com.solarix.ampoliros.module.ModuleConfig');
        $mod_cfg = new ModuleConfig($gEnv['root']['db'], 'ampoliros');
        if (strlen($mod_cfg->GetKey('hui-root-theme'))) {
            $gEnv['hui']['theme']['name'] = $mod_cfg->GetKey('hui-root-theme');
        }
        unset($mod_cfg);
    }
    import('com.solarix.ampoliros.hui.theme.HuiTheme');
}
示例#7
0
function main_default($eventData)
{
    global $env, $hui_mainframe, $hui_titlebar, $amp_locale, $pass_disp, $hui_mainstatus;
    $mod_cfg = new ModuleConfig($env['ampdb'], 'ampoliros');
    // OEM
    //
    $oem_frame = new HuiVertFrame('oemframe');
    $oem_vgroup = new HuiVertGroup('oemvgroup', array('width' => '100%'));
    $oem_vgroup->AddChild(new HuiLabel('oemlabel', array('label' => $amp_locale->GetStr('oemframe_label'), 'bold' => 'true')));
    $oem_grid = new HuiGrid('oemgrid', array('rows' => '4', 'cols' => '2'));
    // OEM name
    //
    $oem_grid->AddChild(new HuiLabel('oemname_label', array('label' => $amp_locale->GetStr('oemname_label'))), 0, 0);
    $oem_grid->AddChild(new HuiString('oemname', array('disp' => 'pass', 'size' => '30', 'value' => $mod_cfg->GetKey('oem-name'))), 0, 1);
    // OEM url
    //
    $oem_grid->AddChild(new HuiLabel('oemurl_label', array('label' => $amp_locale->GetStr('oemurl_label'))), 1, 0);
    $oem_grid->AddChild(new HuiString('oemurl', array('disp' => 'pass', 'size' => '30', 'value' => $mod_cfg->GetKey('oem-url'))), 1, 1);
    // OEM big logo
    //
    $oem_grid->AddChild(new HuiLabel('oembiglogo_label', array('label' => $amp_locale->GetStr('oembiglogo_label'))), 2, 0);
    $oem_grid->AddChild(new HuiFile('oembiglogo', array('disp' => 'pass')), 2, 1);
    // OEM link logo
    //
    $oem_grid->AddChild(new HuiLabel('oemlogo_label', array('label' => $amp_locale->GetStr('oemlogo_label'))), 3, 0);
    $oem_grid->AddChild(new HuiFile('oemlinklogo', array('disp' => 'pass')), 3, 1);
    $oem_vgroup->AddChild($oem_grid);
    $oem_vgroup->AddChild(new HuiSubmit('oemsubmit', array('caption' => $amp_locale->GetStr('oem_submit'))));
    $form_events_call = new HuiEventsCall();
    $form_events_call->AddEvent(new HuiEvent('pass', 'setoem', ''));
    $form_events_call->AddEvent(new HuiEvent('main', 'default', ''));
    $oem_form = new HuiForm('setoemform', array('action' => $form_events_call->GetEventsCallString()));
    $oem_form->AddChild($oem_vgroup);
    // Enabled icons
    //
    $enable_vgroup = new HuiVertGroup('enablevgroup', array('width' => '100%'));
    $enable_vgroup->AddChild(new HuiLabel('enablelabel', array('label' => $amp_locale->GetStr('enabled_icons_label'), 'bold' => 'true')));
    $enable_grid = new HuiGrid('enablegrid', array('rows' => '5', 'cols' => '2'));
    // Ampoliros site link
    //
    $enable_grid->AddChild(new HuiLabel('ampiconlabel', array('label' => $amp_locale->GetStr('amp_link_enabled_label'))), 0, 1);
    $enable_grid->AddChild(new HuiCheckBox('ampicon', array('disp' => 'pass', 'checked' => $mod_cfg->GetKey('ampoliros-link-disabled') ? 'false' : 'true')), 0, 0);
    // Solarix site link
    //
    $enable_grid->AddChild(new HuiLabel('solarixiconlabel', array('label' => $amp_locale->GetStr('solarix_link_enabled_label'))), 1, 1);
    $enable_grid->AddChild(new HuiCheckBox('solarixicon', array('disp' => 'pass', 'checked' => $mod_cfg->GetKey('solarix-link-disabled') ? 'false' : 'true')), 1, 0);
    // OEM link
    //
    $enable_grid->AddChild(new HuiLabel('oemiconlabel', array('label' => $amp_locale->GetStr('oem_link_enabled_label'))), 2, 1);
    $enable_grid->AddChild(new HuiCheckBox('oemicon', array('disp' => 'pass', 'checked' => $mod_cfg->GetKey('oem-link-disabled') ? 'false' : 'true')), 2, 0);
    // Ampoliros big logo
    //
    $enable_grid->AddChild(new HuiLabel('ampbigiconlabel', array('label' => $amp_locale->GetStr('amp_biglogo_enabled_label'))), 3, 1);
    $enable_grid->AddChild(new HuiCheckBox('ampbigicon', array('disp' => 'pass', 'checked' => $mod_cfg->GetKey('ampoliros-biglogo-disabled') ? 'false' : 'true')), 3, 0);
    // OEM logo
    //
    $enable_grid->AddChild(new HuiLabel('oemiconlabel', array('label' => $amp_locale->GetStr('oem_biglogo_enabled_label'))), 4, 1);
    $enable_grid->AddChild(new HuiCheckBox('oembigicon', array('disp' => 'pass', 'checked' => $mod_cfg->GetKey('oem-biglogo-disabled') ? 'false' : 'true')), 4, 0);
    $enable_vgroup->AddChild($enable_grid);
    $enable_vgroup->AddChild(new HuiSubmit('enablesubmit', array('caption' => $amp_locale->GetStr('enable_submit'))));
    $form_events_call = new HuiEventsCall();
    $form_events_call->AddEvent(new HuiEvent('pass', 'setenabledicons', ''));
    $form_events_call->AddEvent(new HuiEvent('main', 'default', ''));
    $enable_form = new HuiForm('setenableform', array('action' => $form_events_call->GetEventsCallString()));
    $enable_form->AddChild($enable_vgroup);
    // Advanced settings
    //
    $advanced_vgroup = new HuiVertGroup('enablevgroup', array('width' => '100%'));
    $advanced_vgroup->AddChild(new HuiLabel('enablelabel', array('label' => $amp_locale->GetStr('advancedsettings_label'), 'bold' => 'true')));
    $advanced_grid = new HuiGrid('enablegrid', array('rows' => '2', 'cols' => '2'));
    // Compressed output buffering
    //
    $advanced_grid->AddChild(new HuiLabel('compressed-ob-label', array('label' => $amp_locale->GetStr('compressed-ob_label'))), 0, 1);
    if (!strlen($compressed_ob)) {
        if (AMP_COMPRESSED_OB) {
            $compressed_ob = 'true';
        } else {
            $compressed_ob = 'false';
        }
    }
    $advanced_grid->AddChild(new HuiCheckBox('compressed-ob', array('disp' => 'pass', 'checked' => $compressed_ob)), 0, 0);
    // HUI code comments
    //
    $advanced_grid->AddChild(new HuiLabel('hui-comments-label', array('label' => $amp_locale->GetStr('hui-comments_label'))), 1, 1);
    if (!strlen($hui_comments)) {
        if (AMP_HUI_COMMENTS) {
            $hui_comments = 'true';
        } else {
            $hui_comments = 'false';
        }
    }
    $advanced_grid->AddChild(new HuiCheckBox('hui-comments', array('disp' => 'pass', 'checked' => $hui_comments)), 1, 0);
    $advanced_vgroup->AddChild($advanced_grid);
    $advanced_vgroup->AddChild(new HuiSubmit('enablesubmit', array('caption' => $amp_locale->GetStr('advanced_submit'))));
    $form_events_call = new HuiEventsCall();
    $form_events_call->AddEvent(new HuiEvent('pass', 'setadvanced', ''));
    $form_events_call->AddEvent(new HuiEvent('main', 'default', ''));
    $advanced_form = new HuiForm('setenableform', array('action' => $form_events_call->GetEventsCallString()));
    $advanced_form->AddChild($advanced_vgroup);
    $tab_headers[0]['label'] = $amp_locale->GetStr('oemframe_label');
    $tab_headers[1]['label'] = $amp_locale->GetStr('enabled_icons_label');
    $tab_headers[2]['label'] = $amp_locale->GetStr('advancedsettings_label');
    $tab = new HuiTab('interface', array('tabactionfunction' => 'interface_tab_action_builder', 'activetab' => isset($eventData['activetab']) ? $eventData['activetab'] : '', 'tabs' => $tab_headers));
    $tab->AddChild($oem_form);
    $tab->AddChild($enable_form);
    $tab->AddChild($advanced_form);
    $hui_mainframe->AddChild($tab);
    $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('default_title');
}