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(); }
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(); }
function main_chprofile($eventData) { global $env, $hui_mainframe, $amp_locale, $hui_mainstatus, $hui_titlebar; $user_query =& $env['ampdb']->execute('SELECT * ' . 'FROM users ' . 'WHERE id=' . $eventData['userid'] . ' '); $user_data = $user_query->Fields(); $prof_query =& $env['db']->Execute('SELECT * ' . 'FROM groups ' . 'ORDER BY groupname'); $profiles = array(); $profiles[0] = $amp_locale->GetStr('noprofileid_label'); while (!$prof_query->eof) { $prof_data = $prof_query->Fields(); $profiles[$prof_data['id']] = $prof_data['groupname']; $prof_query->MoveNext(); } $hui_vgroup = new HuiVertGroup('vgroup'); $hui_user_grid = new HuiGrid('chprofilegrid', array('rows' => '2', 'cols' => '2')); // User fields // $hui_user_grid->AddChild(new HuiLabel('profilelabel', array('label' => $amp_locale->GetStr('changeprofile_label') . ' (*)')), 0, 0); $hui_user_grid->AddChild(new HuiComboBox('profileid', array('disp' => 'pass', 'elements' => $profiles, 'default' => $user_data['groupid'])), 0, 1); $hui_vgroup->AddChild($hui_user_grid); $hui_vgroup->AddChild(new HuiSubmit('submit1', array('caption' => $amp_locale->GetStr('chprofile_submit')))); $hui_vgroup->AddChild(new HuiHorizBar('horizbar1')); $hui_vgroup->AddChild(new HuiLabel('reqfieldslabel', array('label' => $amp_locale->GetStr('requiredfields_label')))); $form_events_call = new HuiEventsCall(); $form_events_call->AddEvent(new HuiEvent('pass', 'chprofile', array('uid' => $eventData['userid']))); $form_events_call->AddEvent(new HuiEvent('main', 'users', '')); $hui_form = new HuiForm('chprofileform', array('action' => $form_events_call->GetEventsCallString())); $hui_form->AddChild($hui_vgroup); $hui_mainframe->AddChild($hui_form); $hui_titlebar->mTitle .= ' - ' . $user_data['username'] . ' - ' . $amp_locale->GetStr('chprofile_title'); }
* 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: header.php,v 1.13 2004-07-08 15:04:24 alex Exp $ require './auth.php'; import('com.solarix.ampoliros.hui.Hui'); $hui = new Hui($env['db']); $hui->LoadWidget('button'); $hui->LoadWidget('horizframe'); $hui->LoadWidget('horizgroup'); $hui->LoadWidget('label'); $hui->LoadWidget('link'); $hui->LoadWidget('page'); $hui->LoadWidget('vertframe'); $hui->LoadWidget('vertgroup'); $hui_page = new HuiPage('page', array('title' => 'Ampoliros' . (strlen(AMP_NAME) ? ' - ' . AMP_NAME . (strlen(AMP_DOMAIN) ? '.' . AMP_DOMAIN : '') : ''), 'border' => 'false')); $hui_page->mArgs['background'] = $hui_page->mThemeHandler->mStyle['menuback']; $hui_mainvertgroup = new HuiVertGroup('mainvertgroup', array('align' => 'center')); $hui_mainvertgroup->AddChild(new HuiButton('amplogo', array('action' => AMP_URL, 'target' => '_top', 'image' => $hui_page->mThemeHandler->mStyle['middot'], 'highlight' => 'false', 'highlight' => 'false'))); $label_text = strlen(AMP_NAME) ? AMP_NAME . (strlen(AMP_DOMAIN) ? '.' . AMP_DOMAIN : '') : ''; if (strlen($label_text)) { $hui_mainvertgroup->AddChild(new HuiLabel('label', array('label' => $label_text))); } $hui_page->AddChild($hui_mainvertgroup); $hui->AddChild($hui_page); $hui->Render();
function main_default($eventData) { global $hui_mainframe, $amp_locale, $hui_titlebar; $hui_grid = new HuiGrid('grid', array('rows' => '3', 'cols' => '2')); $hui_grid->AddChild(new HuiLabel('oldpasswordlabel', array('label' => $amp_locale->GetStr('amppasswordold_label'))), 0, 0); $hui_grid->AddChild(new HuiString('oldpassword', array('disp' => 'pass', 'password' => 'true')), 0, 1); $hui_grid->AddChild(new HuiLabel('newpasswordalabel', array('label' => $amp_locale->GetStr('amppassworda_label'))), 1, 0); $hui_grid->AddChild(new HuiString('newpassworda', array('disp' => 'pass', 'password' => 'true')), 1, 1); $hui_grid->AddChild(new HuiLabel('newpasswordblabel', array('label' => $amp_locale->GetStr('amppasswordb_label'))), 2, 0); $hui_grid->AddChild(new HuiString('newpasswordb', array('disp' => 'pass', 'password' => 'true')), 2, 1); $hui_vgroup = new HuiVertGroup('vertgroup', array('align' => 'center')); $hui_vgroup->AddChild($hui_grid); $hui_vgroup->AddChild(new HuiSubmit('submit', array('caption' => $amp_locale->GetStr('amppasschange_submit')))); $form_events_call = new HuiEventsCall(); $form_events_call->AddEvent(new HuiEvent('main', 'default', '')); $form_events_call->AddEvent(new HuiEvent('pass', 'edit', '')); $hui_form = new HuiForm('form', array('action' => $form_events_call->GetEventsCallString())); $hui_form->AddChild($hui_vgroup); $hui_mainframe->AddChild($hui_form); }
function main_showmethods($eventData) { global $env, $gEnv, $hui_mainframe, $amp_locale, $hui_mainstatus, $hui_titlebar; $acc_query =& $env['ampdb']->execute('SELECT name ' . 'FROM xmlrpcaccounts ' . 'WHERE id=' . $eventData['accountid']); $acc_data = $acc_query->Fields(); $hui_vgroup = new HuiVertGroup('vgroup'); $xmlrpc_account = new XmlRpcAccount($gEnv['root']['db'], $eventData['accountid']); $xmlrpc_client = new XmlRpc_Client($xmlrpc_account->mCgi, $xmlrpc_account->mHost, $xmlrpc_account->mPort); $xmlrpc_client->SetProxy($xmlrpc_account->mProxy, $xmlrpc_account->mProxyPort); $xmlrpc_client->SetCredentials($xmlrpc_account->mUsername, $xmlrpc_account->mPassword); $xmlrpc_message = new XmlRpcMsg('system.listMethods'); $xmlrpc_resp = $xmlrpc_client->Send($xmlrpc_message); if ($xmlrpc_resp) { if (!$xmlrpc_resp->FaultCode()) { $xv = $xmlrpc_resp->Value(); if (is_object($xv)) { $methods = xmlrpc_decode($xv); //$methods_val = $xv->ScalarVal(); if (is_array($methods)) { $headers[0]['label'] = $amp_locale->GetStr('method.header'); $methods_table = new HuiTable('methods', array('elements' => $elements, 'headers' => $headers, 'rowsperpage' => '20', 'pagesactionfunction' => 'methods_list_action_builder', 'pagenumber' => $eventData['methodspage'])); $row = 0; while (list($key, $val) = each($methods)) { $methods_table->AddChild(new HuiLabel('method', array('label' => $val)), $row, 0); $row++; } $hui_vgroup->AddChild($methods_table); } } } else { echo 'error in response from server'; } } else { echo 'invalid response form server'; } //$hui_vgroup $hui_mainframe->AddChild($hui_vgroup); $hui_titlebar->mTitle .= ' - ' . $acc_data['name'] . ' - ' . $amp_locale->GetStr('showmethods_title'); }
$hui->LoadWidget('statusbar'); $hui->LoadWidget('string'); $hui->LoadWidget('submit'); $hui->LoadWidget('tab'); $hui->LoadWidget('table'); $hui->LoadWidget('text'); $hui->LoadWidget('titlebar'); $hui->LoadWidget('toolbar'); $hui->LoadWidget('treemenu'); $hui->LoadWidget('vertframe'); $hui->LoadWidget('vertgroup'); $hui->LoadWidget('xml'); $hui_comments = ''; $compressed_ob = ''; $hui_page = new HuiPage('page', array('title' => $amp_locale->GetStr('interface_pagetitle'))); $hui_mainvertgroup = new HuiVertGroup('mainvertgroup'); $hui_titlebar = new HuiTitleBar('titlebar', array('title' => $amp_locale->GetStr('interface_title'), 'icon' => 'kcontrol')); $hui_mainvertgroup->AddChild($hui_titlebar); // Main tool bar // $hui_maintoolbar = new HuiToolBar('maintoolbar'); $default_action = new HuiEventsCall(); $default_action->AddEvent(new HuiEvent('main', 'default', '')); $hui_defaultbutton = new HuiButton('defaultbutton', array('label' => $amp_locale->GetStr('default_button'), 'themeimage' => 'thumbnail', 'horiz' => 'true', 'action' => $default_action->GetEventsCallString())); $hui_maintoolbar->AddChild($hui_defaultbutton); // Help tool bar // $hui_helptoolbar = new HuiToolBar('helpbar'); $main_disp = new HuiDispatcher('main'); $event_name = $main_disp->GetEventName(); if (strcmp($event_name, 'help')) {
function main_sitemodules($eventData) { global $env, $hui_mainframe, $amp_locale, $hui_mainstatus, $hui_titlebar; $site_query =& $env['ampdb']->execute('SELECT * FROM sites WHERE id=' . $eventData['siteid']); $site_data = $site_query->Fields(); $modules_query =& $env['ampdb']->Execute('SELECT * FROM modules WHERE onlyextension <> ' . $env['ampdb']->Format_Text($env['ampdb']->fmttrue) . ' ORDER BY modid'); if ($modules_query) { if ($modules_query->NumRows()) { $headers[0]['label'] = $amp_locale->GetStr('status_header'); $headers[1]['label'] = $amp_locale->GetStr('moduleid_header'); $headers[2]['label'] = $amp_locale->GetStr('modactivationdate_header'); $headers[4]['label'] = $amp_locale->GetStr('moddeps_header'); $row = 0; $hui_sitemodules_table = new HuiTable('sitemodulestable', array('headers' => $headers)); OpenLibrary('modulesbase.library'); while (!$modules_query->eof) { $modules_data = $modules_query->Fields(); if ($modules_data['modid'] != 'ampoliros') { $act_query =& $env['ampdb']->Execute('SELECT * FROM activemodules WHERE siteid = ' . $eventData['siteid'] . ' AND moduleid = ' . $modules_data['id']); $hui_en_group[$row] = new HuiVertGroup('enable'); $hui_sitemodules_toolbar[$row] = new HuiToolBar('sitemodulestoolbar' . $row); $mod_dep = new ModuleDep($env['ampdb']); if ($act_query->NumRows()) { // Module is enabled // $act_data = $act_query->Fields(); $hui_sitemodules_table->AddChild(new HuiImage('status' . $row, array('imageurl' => $hui_mainframe->mThemeHandler->mStyle['greenball'])), $row, 0); $hui_sitemodules_table->AddChild(new HuiLabel('modid' . $row, array('label' => $modules_data['modid'], 'compact' => 'true')), $row, 1); $hui_sitemodules_table->AddChild(new HuiLabel('actdate' . $row, array('label' => $act_data['activationdate'], 'compact' => 'true')), $row, 2); $site_depending_modules = $mod_dep->CheckSiteDependingModules($modules_data['modid'], $site_data['siteid']); $module = new Module($env['ampdb'], $modules_data['id']); $sub_modules = $module->GetSubModules(); if (!$site_depending_modules) { // No modules depends on this one // $disable_action[$row] = new HuiEventsCall(); $disable_action[$row]->AddEvent(new HuiEvent('main', 'sitemodules', array('siteid' => $eventData['siteid']))); $disable_action[$row]->AddEvent(new HuiEvent('pass', 'deactivatemodule', array('siteid' => $eventData['siteid'], 'modid' => $modules_data['id']))); $hui_disable_button[$row] = new HuiButton('disablebutton' . $row, array('label' => $amp_locale->GetStr('deactivatemodule_label'), 'compact' => 'true', 'horiz' => 'true', 'themeimage' => 'stop', 'themeimagetype' => 'mini', 'action' => $disable_action[$row]->GetEventsCallString())); $hui_sitemodules_toolbar[$row]->AddChild($hui_disable_button[$row]); $hui_en_group[$row]->AddChild($hui_sitemodules_toolbar[$row]); } else { // At least one module depends on this one // $mod_dep_list_str = ''; while (list(, $dep) = each($site_depending_modules)) { $mod_dep_list_str .= $dep . '<br>'; } $hui_sitemodules_table->AddChild(new HuiLabel('moddeps' . $row, array('label' => $mod_dep_list_str)), $row, 4); } if (count($sub_modules)) { $toolbar = array(); while (list(, $name) = each($sub_modules)) { $enabled = $module->CheckIfSubModuleEnabled($name, $eventData['siteid']); $toolbar['main']['enable'] = array('label' => sprintf($amp_locale->GetStr(($enabled ? 'disable' : 'enable') . '_submodule.button'), ucfirst($name)), 'themeimage' => $enabled ? 'stop' : 'reload', 'compact' => 'true', 'themeimagetype' => 'mini', 'horiz' => 'true', 'action' => build_events_call_string('', array(array('main', 'sitemodules', array('siteid' => $eventData['siteid'])), array('pass', $enabled ? 'disablesubmodule' : 'enablesubmodule', array('moduleid' => $modules_data['id'], 'siteid' => $eventData['siteid'], 'submodule' => $name))))); $hui_en_group[$row]->AddChild(new HuiAmpToolBar('main', array('frame' => 'false', 'toolbars' => $toolbar))); } } $hui_sitemodules_table->AddChild($hui_en_group[$row], $row, 3); } else { // Module is not enabled // $hui_sitemodules_table->AddChild(new HuiImage('status' . $row, array('imageurl' => $hui_mainframe->mThemeHandler->mStyle['redball'])), $row, 0); $hui_sitemodules_table->AddChild(new HuiLabel('modid' . $row, array('label' => $modules_data['modid'])), $row, 1); $site_module_deps = $mod_dep->CheckSiteModuleDeps($modules_data['modid'], $site_data['siteid'], DEPTYPE_DEP); if (!is_array($site_module_deps)) { // All module dependecies are met // $enable_action[$row] = new HuiEventsCall(); $enable_action[$row]->AddEvent(new HuiEvent('main', 'sitemodules', array('siteid' => $eventData['siteid']))); $enable_action[$row]->AddEvent(new HuiEvent('pass', 'activatemodule', array('siteid' => $eventData['siteid'], 'modid' => $modules_data['id']))); $hui_enable_button[$row] = new HuiButton('enablebutton' . $row, array('label' => $amp_locale->GetStr('activatemodule_label'), 'compact' => 'true', 'horiz' => 'true', 'themeimage' => 'reload', 'themeimagetype' => 'mini', 'action' => $enable_action[$row]->GetEventsCallString())); $hui_sitemodules_toolbar[$row]->AddChild($hui_enable_button[$row]); } else { // At least one module dependency is not met // $mod_dep_list_str = ''; while (list(, $dep) = each($site_module_deps)) { $mod_dep_list_str .= $dep . '<br>'; } $hui_sitemodules_table->AddChild(new HuiLabel('moddeps' . $row, array('label' => $mod_dep_list_str)), $row, 4); } $hui_sitemodules_table->AddChild($hui_sitemodules_toolbar[$row], $row, 3); } $row++; } $modules_query->MoveNext(); } $xml_def = '<toolbar> <children> <button> <args> <themeimage>reload</themeimage> <label type="encoded">' . urlencode($amp_locale->GetStr('enable_all_modules.button')) . '</label> <horiz>true</horiz> <action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'sitemodules', array('siteid' => $eventData['siteid'])), array('pass', 'activateallmodules', array('siteid' => $eventData['siteid']))))) . '</action> </args> </button> <button> <args> <themeimage>stop</themeimage> <label type="encoded">' . urlencode($amp_locale->GetStr('disable_all_modules.button')) . '</label> <horiz>true</horiz> <needconfirm>true</needconfirm> <confirmmessage type="encoded">' . urlencode($amp_locale->GetStr('disable_all_modules.confirm')) . '</confirmmessage> <action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'sitemodules', array('siteid' => $eventData['siteid'])), array('pass', 'deactivateallmodules', array('siteid' => $eventData['siteid']))))) . '</action> </args> </button> </children> </toolbar>'; $hui_mainvgroup = new HuiVertGroup(); $hui_mainvgroup->AddChild($hui_sitemodules_table); $hui_mainvgroup->AddChild(new HuiHorizBar()); $hui_mainvgroup->AddChild(new HuiXml('', array(definition => $xml_def))); $hui_mainframe->AddChild($hui_mainvgroup); } } $hui_titlebar->mTitle .= ' - ' . $site_data['siteid'] . ' (' . $site_data['sitename'] . ') - ' . $amp_locale->GetStr('sitemodules_title'); }
function main_edit($eventData) { global $hui_mainframe, $amp_locale, $hui_titlebar; $hui_grid = new HuiGrid('grid', array('rows' => '3', 'cols' => '2')); $hui_grid->AddChild(new HuiLabel('namelabel', array('label' => $amp_locale->GetStr('namedesc'))), 0, 0); $hui_grid->AddChild(new HuiString('name', array('value' => AMP_NAME, 'disp' => 'pass')), 0, 1); $hui_grid->AddChild(new HuiLabel('domainlabel', array('label' => $amp_locale->GetStr('domaindesc'))), 1, 0); $hui_grid->AddChild(new HuiString('domain', array('value' => AMP_DOMAIN, 'disp' => 'pass')), 1, 1); $hui_grid->AddChild(new HuiLabel('dnslabel', array('label' => $amp_locale->GetStr('dnsdesc'))), 2, 0); $hui_grid->AddChild(new HuiString('dns', array('value' => AMP_DNS, 'disp' => 'pass')), 2, 1); $hui_vgroup = new HuiVertGroup('vertgroup', array('align' => 'center')); $hui_vgroup->AddChild($hui_grid); $hui_vgroup->AddChild(new HuiSubmit('submit', array('caption' => $amp_locale->GetStr('submit')))); $form_events_call = new HuiEventsCall(); $form_events_call->AddEvent(new HuiEvent('main', 'default', '')); $form_events_call->AddEvent(new HuiEvent('pass', 'edit', '')); $hui_form = new HuiForm('form', array('action' => $form_events_call->GetEventsCallString())); $hui_form->AddChild($hui_vgroup); $hui_mainframe->AddChild($hui_form); $hui_titlebar->mTitle .= ' - Edit'; //$hui_mainframe->AddChild( new HuiLabel( 'mainlabel', array( 'label' => 'Main page' ) ) ); }
function main_edit($eventData) { global $env, $hui_mainframe, $amp_locale, $hui_titlebar; $site_sets = new SiteSettings($env['db']); $hui_grid = new HuiGrid('grid', array('rows' => '11', 'cols' => '2')); $hui_grid->AddChild(new HuiLabel('sitecompletenamelabel', array('label' => $amp_locale->GetStr('sitecompletename_label'))), 0, 0); $hui_grid->AddChild(new HuiString('sitecompletename', array('value' => $site_sets->GetKey('sitecompletename'), 'disp' => 'pass')), 0, 1); $hui_grid->AddChild(new HuiLabel('siteaddressalabel', array('label' => $amp_locale->GetStr('siteaddressa_label'))), 1, 0); $hui_grid->AddChild(new HuiString('siteaddressa', array('value' => $site_sets->GetKey('siteaddressa'), 'disp' => 'pass')), 1, 1); $hui_grid->AddChild(new HuiLabel('siteaddressblabel', array('label' => $amp_locale->GetStr('siteaddressb_label'))), 2, 0); $hui_grid->AddChild(new HuiString('siteaddressb', array('value' => $site_sets->GetKey('siteaddressb'), 'disp' => 'pass')), 2, 1); $hui_grid->AddChild(new HuiLabel('sitetownlabel', array('label' => $amp_locale->GetStr('sitetown_label'))), 3, 0); $hui_grid->AddChild(new HuiString('sitetown', array('value' => $site_sets->GetKey('sitetown'), 'disp' => 'pass')), 3, 1); $hui_grid->AddChild(new HuiLabel('sitestatelabel', array('label' => $amp_locale->GetStr('sitestate_label'))), 4, 0); $hui_grid->AddChild(new HuiString('sitestate', array('value' => $site_sets->GetKey('sitestate'), 'disp' => 'pass')), 4, 1); $hui_grid->AddChild(new HuiLabel('siteziplabel', array('label' => $amp_locale->GetStr('sitezip_label'))), 5, 0); $hui_grid->AddChild(new HuiString('sitezip', array('value' => $site_sets->GetKey('sitezip'), 'disp' => 'pass')), 5, 1); $hui_grid->AddChild(new HuiLabel('sitecountrylabel', array('label' => $amp_locale->GetStr('sitecountry_label'))), 6, 0); $hui_grid->AddChild(new HuiString('sitecountry', array('value' => $site_sets->GetKey('sitecountry'), 'disp' => 'pass')), 6, 1); $hui_grid->AddChild(new HuiLabel('sitefiscalcodelabel', array('label' => $amp_locale->GetStr('sitefiscalcode_label'))), 7, 0); $hui_grid->AddChild(new HuiString('sitefiscalcode', array('value' => $site_sets->GetKey('sitefiscalcode'), 'disp' => 'pass')), 7, 1); $hui_grid->AddChild(new HuiLabel('siteemaillabel', array('label' => $amp_locale->GetStr('siteemail_label'))), 8, 0); $hui_grid->AddChild(new HuiString('siteemail', array('value' => $site_sets->GetKey('siteemail'), 'disp' => 'pass')), 8, 1); $hui_grid->AddChild(new HuiLabel('sitephonelabel', array('label' => $amp_locale->GetStr('sitephone_label'))), 9, 0); $hui_grid->AddChild(new HuiString('sitephone', array('value' => $site_sets->GetKey('sitephone'), 'disp' => 'pass')), 9, 1); $hui_grid->AddChild(new HuiLabel('sitefaxlabel', array('label' => $amp_locale->GetStr('sitefax_label'))), 10, 0); $hui_grid->AddChild(new HuiString('sitefax', array('value' => $site_sets->GetKey('sitefax'), 'disp' => 'pass')), 10, 1); /* $tmpmod = new moduledep( $env[ampdb] ); if ( $tmpmod->isenabled( 'magellan', $env[sitedata][siteid] ) ) { $data = $sets->getkey( 'sitelogo' ); $query = &$env[db]->Execute( 'select * from medias order by medianame' ); $mvalues[] = 'none'; $mcaptions[] = $adloc->GetStr( 'nomedia' ); while ( !$query->eof ) { $mdata = $query->fields(); $mvalues[] = $mdata[id]; if ( $mdata[id] == $data ) $selected = $mdata[id]; $mcaptions[] = $mdata['medianame']; $query->MoveNext(); } $row++; $table[0][$row] = new htmltext( $adloc->GetStr( 'logodesc' ) ); $table[1][$row] = new htmlformselect( '', 'sitelogo', $selected, $mvalues, $mcaptions ); $row++; $table[0][$row] = new htmltext( $adloc->GetStr( 'logonote' ) ); $table[0][$row]->colspan = 2; } $hui_grid->AddChild( new HuiLabel( 'sitelogolabel', array( 'label' => $amp_locale->GetStr( 'sitelogo_label' ) ) ), 11, 0 ); $hui_grid->AddChild( new HuiString( 'sitelogo', array( 'value' => $site_sets->GetKey( 'sitelogo' ), 'disp' => 'pass' ) ), 11, 1 ); */ $hui_vgroup = new HuiVertGroup('vertgroup', array('align' => 'center')); $hui_vgroup->AddChild($hui_grid); $hui_vgroup->AddChild(new HuiSubmit('submit', array('caption' => $amp_locale->GetStr('editdata_submit')))); $form_events_call = new HuiEventsCall(); $form_events_call->AddEvent(new HuiEvent('main', 'default', '')); $form_events_call->AddEvent(new HuiEvent('pass', 'edit', '')); $hui_form = new HuiForm('form', array('action' => $form_events_call->GetEventsCallString())); $hui_form->AddChild($hui_vgroup); $hui_mainframe->AddChild($hui_form); $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('edit_title'); }
function main_language($eventData) { global $env, $hui_mainframe, $hui_titlebar, $amp_locale, $pass_disp, $hui_mainstatus; $loc_country = new LocaleCountry($env[$env['currentuser'] . '-country']); $country_language = $loc_country->Language(); $language_locale = new Locale('amp_misc_locale', $env[$env['currentuser'] . '-language']); $selected_language = $pass_disp->GetEventData(); $selected_language = $selected_language['language']; $hui_vgroup = new HuiVertGroup('vgroup'); $language_query =& $env['ampdb']->Execute('SELECT * ' . 'FROM languages'); while (!$language_query->eof) { $languages[$language_query->Fields('langshort')] = $language_locale->GetStr($language_query->Fields('langname')); $language_query->MoveNext(); } $hui_locale_grid = new HuiGrid('localegrid', array('rows' => '1', 'cols' => '3')); $hui_locale_grid->AddChild(new HuiLabel('languagelabel', array('label' => $amp_locale->GetStr('language_label'))), 0, 0); $hui_locale_grid->AddChild(new HuiComboBox('language', array('disp' => 'pass', 'elements' => $languages, 'default' => $selected_language ? $selected_language : $env[$env['currentuser'] . '-language'])), 0, 1); $hui_locale_grid->AddChild(new HuiSubmit('submit1', array('caption' => $amp_locale->GetStr('language_submit'))), 0, 2); $hui_vgroup->AddChild($hui_locale_grid); $hui_vgroup->AddChild(new HuiHorizBar('horizbar1')); $hui_vgroup->AddChild(new HuiLabel('deflanglabel', array('label' => sprintf($amp_locale->GetStr('countrylanguage_label'), $languages[$country_language])))); $form_events_call = new HuiEventsCall(); $form_events_call->AddEvent(new HuiEvent('pass', 'setlanguage', '')); $form_events_call->AddEvent(new HuiEvent('main', 'language', '')); $hui_form = new HuiForm('languageform', array('action' => $form_events_call->GetEventsCallString())); $hui_form->AddChild($hui_vgroup); $hui_mainframe->AddChild($hui_form); $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('language_title'); }
function main_changes($eventData) { global $env, $hui_mainframe, $amp_locale, $hui_mainstatus, $hui_titlebar; $hui_vgroup = new HuiVertGroup('vgroup'); $changes_content = ''; if (file_exists(PRIVATE_TREE . 'CHANGES')) { $changes_content = file_get_contents(PRIVATE_TREE . 'CHANGES'); } $hui_vgroup->AddChild(new HuiText('changelog', array('disp' => 'pass', 'readonly' => 'true', 'value' => htmlentities($changes_content), 'rows' => '20', 'cols' => '80')), 0, 1); $hui_mainframe->AddChild($hui_vgroup); $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('changes_title'); }
function main_modulelog($eventData) { global $env, $hui_mainframe, $amp_locale, $hui_mainstatus, $hui_titlebar, $hui_mainvertgroup; $query = $env['ampdb']->execute('SELECT modid ' . 'FROM modules ' . 'WHERE id=' . $eventData['modid']); $module_data = $query->Fields(); $hui_vgroup = new HuiVertGroup('vgroup'); $mod_log_content = ''; if (file_exists(MODULE_PATH . $module_data['modid'] . '/module.log')) { $log_toolbar = new HuiToolBar('logbar'); $cleanlog_action = new HuiEventsCall(); $cleanlog_action->AddEvent(new HuiEvent('main', 'default', '')); $cleanlog_action->AddEvent(new HuiEvent('pass', 'cleanmodlog', array('modid' => $module_data['modid']))); $cleanlog_button = new HuiButton('cleanlogbutton', array('label' => $amp_locale->GetStr('cleanlog_button'), 'themeimage' => 'editdelete', 'action' => $cleanlog_action->GetEventsCallString())); $log_toolbar->AddChild($cleanlog_button); $log_frame = new HuiHorizFrame('logframe'); $log_frame->AddChild($log_toolbar); $hui_mainvertgroup->AddChild($log_frame); $mod_log_content = file_get_contentes(MODULE_PATH . $module_data['modid'] . '/module.log'); } $hui_vgroup->AddChild(new HuiText('modlog', array('disp' => 'pass', 'readonly' => 'true', 'value' => htmlentities($mod_log_content), 'rows' => '20', 'cols' => '120')), 0, 1); $hui_mainframe->AddChild($hui_vgroup); $hui_titlebar->mTitle .= ' - ' . $module_data['modid'] . ' - ' . $amp_locale->GetStr('modlog.title'); }
header('Pragma: no-cache'); $amp_menu_locale = new Locale('amp_root_menu', $gEnv['root']['locale']['language']); $hui = new Hui($env['ampdb']); $hui->LoadWidget('empty'); $hui->LoadWidget('grid'); $hui->LoadWidget('horizframe'); $hui->LoadWidget('horizgroup'); $hui->LoadWidget('label'); $hui->LoadWidget('page'); $hui->LoadWidget('sessionkey'); $hui->LoadWidget('treemenu'); $hui->LoadWidget('vertframe'); $hui->LoadWidget('vertgroup'); $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'); $groups_query = $env['ampdb']->execute('SELECT * ' . 'FROM rootgroups ' . 'ORDER BY name'); $num_groups = $groups_query->numrows(); if ($num_groups > 0) { $cont_a = 0; unset($el); while (!$groups_query->eof) { $group_data = $groups_query->Fields(); $el[$group_data['id']]['groupname'] = $group_data['name']; if (strlen($group_data['catalog'])) { $tmp_locale = new Locale($group_data['catalog'], $gEnv['root']['locale']['language']); $el[$group_data['id']]['groupname'] = $tmp_locale->GetStr($group_data['name']); } $pagesquery =& $env['db']->execute('SELECT * ' . 'FROM rootpages ' . 'WHERE groupid=' . $group_data['id'] . ' ' . 'ORDER BY name'); if ($pagesquery) { $pagesnum = $pagesquery->numrows();
import('com.solarix.ampoliros.hui.Hui'); import('com.solarix.ampoliros.module.Module'); $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); }
function DoAuth($wrong = false, $reason = '') { global $gEnv; $amp_locale = new Locale('amp_misc_auth', AMP_LANG); $amp = Ampoliros::instance('Ampoliros'); $amp->startRoot(); $hui = new Hui($gEnv['root']['db']); $hui->LoadWidget('button'); $hui->LoadWidget('formarg'); $hui->LoadWidget('form'); $hui->LoadWidget('grid'); $hui->LoadWidget('horizbar'); $hui->LoadWidget('horizframe'); $hui->LoadWidget('horizgroup'); $hui->LoadWidget('image'); $hui->LoadWidget('label'); $hui->LoadWidget('link'); $hui->LoadWidget('page'); $hui->LoadWidget('sessionkey'); $hui->LoadWidget('statusbar'); $hui->LoadWidget('string'); $hui->LoadWidget('submit'); $hui->LoadWidget('titlebar'); $hui->LoadWidget('vertframe'); $hui->LoadWidget('vertgroup'); $hui_page = new HuiPage('loginpage', array('title' => $amp_locale->GetStr('amplogin'), 'border' => 'false')); $hui_topgroup = new HuiVertGroup('topgroup', array('align' => 'center', 'groupalign' => 'center', 'groupvalign' => 'middle', 'height' => '100%')); $hui_maingroup = new HuiVertGroup('maingroup', array('align' => 'center')); $hui_titlebar = new HuiTitleBar('titlebar', array('title' => $amp_locale->GetStr('amplogin'), 'closewidget' => 'false', 'newwindowwidget' => 'false')); $hui_mainbframe = new HuiVertFrame('vframe', array('align' => 'center')); $hui_mainframe = new HuiHorizGroup('horizframe'); $hui_mainstatus = new HuiStatusBar('mainstatusbar'); // Main frame // $hui_grid = new HuiGrid('grid', array('rows' => '2', 'cols' => '2')); $hui_grid->AddChild(new HuiLabel('usernamelabel', array('label' => $amp_locale->GetStr('username'))), 0, 0); $hui_grid->AddChild(new HuiString('username', array('disp' => 'login')), 0, 1); $hui_grid->AddChild(new HuiLabel('passwordlabel', array('label' => $amp_locale->GetStr('password'))), 1, 0); $hui_grid->AddChild(new HuiString('password', array('disp' => 'login', 'password' => 'true')), 1, 1); $hui_vgroup = new HuiVertGroup('vertgroup', array('align' => 'center')); //$hui_vgroup->AddChild( new HuiLabel( 'titlelabel', array( 'label' => $amp_locale->GetStr( 'amprootlogin' ) ) ) ); $hui_vgroup->AddChild($hui_grid); $hui_vgroup->AddChild(new HuiSubmit('submit', array('caption' => $amp_locale->GetStr('enter')))); $form_events_call = new HuiEventsCall(); $form_events_call->AddEvent(new HuiEvent('login', 'login', '')); $form_events_call->AddEvent(new HuiEvent('main', 'default', '')); $hui_form = new HuiForm('form', array('action' => $form_events_call->GetEventsCallString())); $hui_hgroup = new HuiHorizGroup('horizgroup', array('align' => 'middle')); // $hui_hgroup -> AddChild(new HuiButton('amplogo', array('image' => $hui_page -> mThemeHandler -> mStyle['middot'], 'action' => AMP_URL, 'highlight' => false))); $hui_hgroup->AddChild(new HuiButton('password', array('themeimage' => 'password', 'themeimagetype' => 'big', 'action' => AMP_URL, 'highlight' => false))); $hui_hgroup->AddChild($hui_vgroup); $hui_form->AddChild($hui_hgroup); $hui_mainframe->AddChild($hui_form); // Wrong account check // if ($wrong) { if ($gEnv['core']['config']->Value('ALERT_ON_WRONG_LOCAL_USER_LOGIN') == '1') { Carthag::import('com.solarix.ampoliros.security.SecurityLayer'); global $login_disp; $event_data = $login_disp->GetEventData(); $amp_security = new SecurityLayer(); $amp_security->SendAlert('Wrong user local login for user ' . $event_data['username'] . ' from remote address ' . $_SERVER['REMOTE_ADDR']); $amp_security->LogFailedAccess($event_data['username'], false, $_SERVER['REMOTE_ADDR']); unset($amp_security); } $sleep_time = $gEnv['core']['config']->Value('WRONG_LOGIN_DELAY'); if (!strlen($sleep_time)) { $sleep_time = 1; } $max_attempts = $gEnv['core']['config']->Value('MAX_WRONG_LOGINS'); if (!strlen($max_attempts)) { $max_attempts = 3; } sleep($sleep_time); if (isset($_SESSION['site_login_attempts'])) { $_SESSION['site_login_attempts']++; if ($_SESSION['site_login_attempts'] >= $max_attempts) { AmpDie($amp_locale->GetStr('wrongpwd')); } } else { $_SESSION['site_login_attempts'] = 1; } if ($reason) { $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr($reason); } else { $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('wrongpwd'); } } else { $_SESSION['site_login_attempts'] = 0; } // Page render // $hui_maingroup->AddChild($hui_titlebar); //$hui_maingroup->AddChild( new HuiButton( 'amplogo', array( 'image' => CGI_URL.'ampbigdot.gif', 'action' => AMP_URL ) ) ); $hui_mainbframe->AddChild($hui_mainframe); $hui_mainbframe->AddChild(new HuiHorizBar('hb')); $hui_mainbframe->AddChild(new HuiLink('copyright', array('label' => $amp_locale->GetStr('auth_copyright.label'), 'link' => 'http://www.solarix.it/', 'target' => '_blank'))); $hui_maingroup->AddChild($hui_mainbframe); $hui_maingroup->AddChild($hui_mainstatus); $hui_topgroup->AddChild($hui_maingroup); $hui_page->AddChild($hui_topgroup); $hui->AddChild($hui_page); $hui->Render(); $carthag = Carthag::instance(); $carthag->halt(); }
* 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: header.php,v 1.13 2004-07-08 15:04:25 alex Exp $ require './auth.php'; import('com.solarix.ampoliros.hui.Hui'); $hui = new Hui($env['ampdb']); $hui->LoadWidget('button'); $hui->LoadWidget('image'); $hui->LoadWidget('label'); $hui->LoadWidget('link'); $hui->LoadWidget('page'); $hui->LoadWidget('vertgroup'); $hui_page = new HuiPage('page', array('title' => 'Ampoliros - ' . $env['sitedata']['sitename'], 'border' => 'false')); $hui_page->mArgs['background'] = $hui_page->mThemeHandler->mStyle['menuback']; $hui_mainvertgroup = new HuiVertGroup('mainvertgroup', array('align' => 'center')); $hui_mainvertgroup->AddChild(new HuiButton('amplogo', array('action' => AMP_URL, 'target' => '_top', 'image' => $hui_page->mThemeHandler->mStyle['middot'], 'highlight' => 'false'))); $hui_mainvertgroup->AddChild(new HuiLabel('label', array('label' => $env['sitedata']['sitename'], 'nowrap' => 'true', 'align' => 'center'))); if (strlen($env['currentusercname'])) { $hui_mainvertgroup->AddChild(new HuiLabel('labelname', array('label' => $env['currentusercname']))); } $hui_page->AddChild($hui_mainvertgroup); $hui->AddChild($hui_page); $hui->Render();
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'); }