Beispiel #1
0
    $jp_cfg->SetValue('USE_GZIP', $eventData['usegzip'] == 'on' ? '1' : '0');
    $jp_cfg->SetValue('CACHE_POST', $eventData['cachepost'] == 'on' ? '1' : '0');
    $gStatus = $gLocale->GetStr('prefs_set.status');
}
$gAction_disp->AddEvent('erasecache', 'action_erasecache');
function action_erasecache($eventData)
{
    global $gEnv, $gStatus, $gLocale;
    cache_erase();
    $gStatus = $gLocale->GetStr('cache_erased.status');
}
$gAction_disp->Dispatch();
// Main dispatcher
//
$gMain_disp = new HuiDispatcher('main');
$gMain_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $gEnv, $gLocale, $gPage_content;
    $jp_cfg = new ConfigFile(CONFIG_PATH . 'jpcache.cfg', true);
    $xml_def = '<vertgroup><name>prefs</name><children>
  <form><name>prefs</name><args><method>post</method><action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'default', ''), array('action', 'setprefs', '')))) . '</action></args><children>
    <grid><name>prefs</name><children>
      <label row="0" col="0"><name>cachetime</name><args><label type="encoded">' . urlencode($gLocale->GetStr('cachetime.label')) . '</label></args></label>
      <string row="0" col="1"><name>cachetime</name><args><disp>action</disp><size>5</size><value>' . $jp_cfg->Value('CACHE_TIME') . '</value></args></string>
      <label row="1" col="0"><name>cacheon</name><args><label type="encoded">' . urlencode($gLocale->GetStr('cacheon.label')) . '</label></args></label>
      <checkbox row="1" col="1"><name>cacheon</name><args><disp>action</disp><checked>' . ($jp_cfg->Value('CACHE_ON') == '1' ? 'true' : 'false') . '</checked></args></checkbox>
      <label row="2" col="0"><name>usegzip</name><args><label type="encoded">' . urlencode($gLocale->GetStr('usegzip.label')) . '</label></args></label>
      <checkbox row="2" col="1"><name>usegzip</name><args><disp>action</disp><checked>' . ($jp_cfg->Value('USE_GZIP') == '1' ? 'true' : 'false') . '</checked></args></checkbox>
      <label row="3" col="0"><name>cachepost</name><args><label type="encoded">' . urlencode($gLocale->GetStr('cachepost.label')) . '</label></args></label>
      <checkbox row="3" col="1"><name>cachepost</name><args><disp>action</disp><checked>' . ($jp_cfg->Value('CACHE_POST') == '1' ? 'true' : 'false') . '</checked></args></checkbox>
Beispiel #2
0
    global $gLocale, $gPage_status;
    $amp_security = new SecurityLayer();
    foreach ($eventData['sessions'] as $id => $session) {
        $amp_security->LogoutSession($session);
    }
    $gPage_status = $gLocale->GetStr('sessions_logged_out.status');
}
$gAction_disp->Dispatch();
// ----- Main dispatcher -----
//
$gMain_disp = new HuiDispatcher('main');
function default_tab_builder($tab)
{
    return build_events_call_string('', array(array('main', 'default', array('tab' => $tab))));
}
$gMain_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $gEnv, $gXml_def, $gLocale, $gPage_title;
    //$tabs[0]['label'] = $gLocale->GetStr( 'currentactivities.tab' );
    $tabs[0]['label'] = $gLocale->GetStr('accesslog.tab');
    $tabs[1]['label'] = $gLocale->GetStr('loggedusers.tab');
    $tabs[2]['label'] = $gLocale->GetStr('securitycheck.tab');
    $amp_security = new SecurityLayer();
    $security_check = $amp_security->SecurityCheck();
    $logged_users = $amp_security->GetLoggedSessions();
    $root_sessions = $users_sessions = array();
    foreach ($logged_users['root'] as $root_session) {
        $root_sessions[$root_session] = $root_session;
    }
    foreach ($logged_users['sites'] as $user => $sessions) {
Beispiel #3
0
if ($gEnv['site']['id'] == $gEnv['user']['id']) {
    $pass_disp->AddEvent('setmotd', 'pass_setmotd');
    function pass_setmotd($eventData)
    {
        global $gEnv, $amp_locale, $hui_mainstatus;
        OpenLibrary('sites.library');
        $site = new Site($gEnv['root']['db'], $gEnv['site']['id'], $gEnv['site']['db']);
        $site->SetMotd($eventData['motd']);
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('motd_set.status');
    }
}
$pass_disp->Dispatch();
// Main dispatcher
//
$main_disp = new HuiDispatcher('main');
$main_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $env, $amp_locale, $hui_mainframe, $hui_titlebar;
    $prof_query =& $env['db']->Execute('SELECT * ' . 'FROM groups ' . 'ORDER BY groupname');
    $profiles = array();
    while (!$prof_query->eof) {
        $prof_data = $prof_query->Fields();
        $profiles[$prof_data['id']] = $prof_data['groupname'];
        $prof_query->MoveNext();
    }
    if (count($profiles)) {
        $headers[0]['label'] = $amp_locale->GetStr('profilename_header');
        $row = 0;
        $hui_profiles_table = new HuiTable('profilestable', array('headers' => $headers));
        while (list($id, $profile_name) = each($profiles)) {
Beispiel #4
0
        $acc = new XmlRpcAccount($env['ampdb'], $eventData['accountid']);
        $result = $acc->Update($eventData['name'], $eventData['host'], $eventData['port'], $eventData['cgi'], $eventData['username'], $eventData['password'], $eventData['proxy'], $eventData['proxyport']);
    }
    if ($result) {
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('accountupdated_status');
    }
}
$pass_disp->Dispatch();
// Main dispatcher
//
$main_disp = new HuiDispatcher('main');
function remoteprofiles_list_action_builder($pageNumber)
{
    return build_events_call_string('', array(array('main', 'default', array('remoteprofilespage' => $pageNumber))));
}
$main_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $env, $amp_locale, $hui_mainframe, $hui_titlebar, $hui_mainstatus;
    $prof_query =& $env['ampdb']->Execute('SELECT id,profilename ' . 'FROM xmlrpcprofiles ' . 'ORDER BY profilename');
    $profiles = array();
    while (!$prof_query->eof) {
        $prof_data = $prof_query->Fields();
        $profiles[$prof_data['id']] = $prof_data['profilename'];
        $prof_query->MoveNext();
    }
    if (count($profiles)) {
        $headers[0]['label'] = $amp_locale->GetStr('profilename_header');
        $row = 0;
        $hui_profiles_table = new HuiTable('profilestable', array('headers' => $headers, 'rowsperpage' => '10', 'pagesactionfunction' => 'remoteprofiles_list_action_builder', 'pagenumber' => $eventData['remoteprofilespage']));
        while (list($id, $profile_name) = each($profiles)) {
Beispiel #5
0
                $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('passwordchanged_status');
            } else {
                $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('wrongoldpassword_status');
            }
        } else {
            $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('newpasswordisempty_status');
        }
    } else {
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('newpasswordnomatch_status');
    }
}
$pass_disp->Dispatch();
// Main dispatcher
//
$main_disp = new HuiDispatcher('main');
$main_disp->AddEvent('default', 'main_default');
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', ''));
Beispiel #6
0
<?php

require 'auth.php';
OpenLibrary('hui.library');
$gHui = new Hui($GLOBALS['gEnv']['root']['db']);
$gHui->LoadWidget('amppage');
$gHui->LoadWidget('xml');
$gXml_def = '';
$gMain_disp = new HuiDispatcher('main');
$gMain_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $gXml_def;
    $example_data = array(array("80", 0.0, 20, 4, 5, 6), array("81", 2.0, 30, 5, 6, 7), array("82", 3.0, 40, 5, 7, 8), array("83", 4.0, 50, 3, 6, 3), array("84", 4.4, 40, 3, 6, 5), array("85", 5.4, 40, 5, 6, 5), array("86", 5.5, 40, 7, 6, 5), array("87", 7, 35, 0.0, 0.0, ""), array("88", 7.4, 40, 14, 16, 25), array("89", 7.6, 40, 6, 6, 5), array("90", 8.199999999999999, 40, 3, 6, 5), array("91", 8.5, 40, 8, 6, 9), array("92", 9.300000000000001, 40, 5, 6, 5), array("93", 9.6, 40, 9, 6, 7), array("94", 9.9, 40, 2, 6, 5), array("95", 10.0, 40, 3, 6, 8), array("96", 10.4, 40, 3, 6, 5), array("97", 10.5, 40, 3, 6, 5), array("98", 10.8, 40, 3, 6, 5), array("99", 11.4, 40, 3, 6, 5), array("00", 12.0, 40, 3, 7, 5), array("01", 13.4, 40, 3, 5, 3), array("02", 14.0, 30, 3, 5, 6));
    $legend = array('Prodotto A', 'Prodotto B', 'Prodotto C', 'Prodotto D', 'Prodotto E');
    $gXml_def = '<vertgroup>
  <children>

    <label>
      <args>
        <label>Grafico</label>
      </args>
    </label>

    <vertframe>
      <children>

        <phplot>
          <args>
            <data type="array">' . huixml_encode($example_data) . '</data>
            <width>600</width>
        $gStatus = sprintf($gLocale->GetStr('version_removed.status'), $mod_name, $eventData['version']);
    } else {
        $gStatus = sprintf($gLocale->GetStr('version_not_removed.status'), $mod_name, $eventData['version']);
    }
}
$gAction_disp->Dispatch();
// Main dispatcher
//
$gMain_disp = new HuiDispatcher('main');
// ----- Repositories -----
//
function repositories_list_action_builder($pageNumber)
{
    return build_events_call_string('', array(array('main', 'default', array('pagenumber' => $pageNumber))));
}
$gMain_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $gEnv, $gLocale, $gXml_def, $gPage_title, $gStatus;
    $reps_query =& $gEnv['root']['db']->Execute('SELECT * ' . 'FROM ampcentralreps ' . 'ORDER BY name');
    if ($reps_query->NumRows()) {
        $headers[0]['label'] = $gLocale->GetStr('repository_name.header');
        $headers[1]['label'] = $gLocale->GetStr('repository_description.header');
        $gXml_def = '<vertgroup><name>vg</name>
		  <children>
		    <table><name>repositories</name>
		      <args>
		        <headers type="array">' . huixml_encode($headers) . '</headers>
		        <rowsperpage>10</rowsperpage>
		        <pagesactionfunction>repositores_list_action_builder</pagesactionfunction>
		        <pagenumber>' . (isset($eventData['pagenumber']) ? $eventData['pagenumber'] : '') . '</pagenumber>
Beispiel #8
0
     //$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();
 }
 if (isset($GLOBALS['gEnv']['runtime']['disp']['hui']['login'])) {
     $login_disp = new HuiDispatcher('login');
     $login_disp->AddEvent('login', 'login_login');
     function login_login($eventData)
     {
         $userquery = $GLOBALS['gEnv']['root']['db']->Execute('SELECT * FROM users WHERE username='******'gEnv']['root']['db']->Format_Text($eventData['username']) . ' AND password='******'gEnv']['root']['db']->Format_Text(md5($eventData['password'])));
         if ($userquery->NumRows()) {
             session_register('AMP_AUTH_USER');
             $_SESSION['AMP_AUTH_USER'] = $eventData['username'];
             import('com.solarix.ampoliros.security.SecurityLayer');
             $amp_security = new SecurityLayer();
             $amp_security->LogAccess($eventData['username'], false, false, $_SERVER['REMOTE_ADDR']);
             unset($amp_security);
         } else {
             DoAuth(true);
         }
         //		unset( $AMPROOT_AUTH_USER );
     }
Beispiel #9
0
    $temp_log = new Logger($query->Fields('sitedblog'));
    if ($temp_log->CleanLog()) {
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('logcleaned_status');
    } else {
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('lognotcleaned_status');
    }
}
$pass_disp->Dispatch();
// Main dispatcher
//
$main_disp = new HuiDispatcher('main');
function sites_list_action_builder($pageNumber)
{
    return build_events_call_string('', array(array('main', 'default', array('sitespage' => $pageNumber))));
}
$main_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $env, $hui_mainframe, $amp_locale, $pass_disp, $hui_mainstatus;
    $query =& $env['ampdb']->execute('SELECT * ' . 'FROM sites ' . 'ORDER BY sitename');
    $modules_query =& $env['ampdb']->execute('SELECT id ' . 'FROM modules ' . 'WHERE onlyextension <> ' . $env['ampdb']->Format_Text($env['ampdb']->fmttrue));
    if ($query->NumRows() > 0) {
        $headers[0]['label'] = $amp_locale->GetStr('status_header');
        $headers[1]['label'] = $amp_locale->GetStr('siteid_header');
        $headers[2]['label'] = $amp_locale->GetStr('sitename_header');
        $headers[3]['label'] = $amp_locale->GetStr('sitecreationdate_header');
        $row = 0;
        $hui_sites_table = new HuiTable('sitestable', array('headers' => $headers, 'rowsperpage' => '10', 'pagesactionfunction' => 'sites_list_action_builder', 'pagenumber' => (is_array($eventData) and isset($eventData['sitespage'])) ? $eventData['sitespage'] : ''));
        while (!$query->eof) {
            $data = $query->fields();
            if ($data['siteactive'] == $env['db']->fmttrue) {
Beispiel #10
0
function action_run_maintenance($eventData)
{
    global $gPage_status, $gLocale;
    require 'ampmaintenance.php';
    $gEnv['core']['interface'] = AMP_INTERFACE_WEB;
    $gPage_status = $gLocale->GetStr('maintenance_done.status');
}
$gAction_disp->Dispatch();
// ----- Main dispatcher -----
//
$gMain_disp = new HuiDispatcher('main');
function general_tab_builder($tab)
{
    return build_events_call_string('', array(array('main', 'default', array('tab' => $tab))));
}
$gMain_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $gEnv, $gXml_def, $gLocale, $gPage_title;
    $main = new AmpolirosMaintenanceHandler();
    $main_time = $main->GetLastMaintenanceTime();
    $tasks = $main->GetTasksList();
    $tabs[0]['label'] = $gLocale->GetStr('general_status.tab');
    $tabs[1]['label'] = $gLocale->GetStr('general_report.tab');
    $tabs[2]['label'] = $gLocale->GetStr('general_tasks.tab');
    $country = new LocaleCountry($GLOBALS['gEnv']['root']['locale']['country']);
    $date_array = $country->GetDateArrayFromUnixTimestamp($main_time);
    $row = 0;
    $gXml_def = '<vertgroup>
      <children>
    
Beispiel #11
0
    if ($debug->SubmitBugReport($moddata, $from, $eventData['message'], $notify)) {
        $gPage_status = $gLocale->GetStr('bugreport_sent.status');
    } else {
        $gPage_status = $gLocale->GetStr('bugreport_not_sent.status');
    }
}
$gPass_disp->Dispatch();
$amp = Ampoliros::instance('Ampoliros');
if ($amp->getState() == Ampoliros::STATE_DEBUG or $amp->getState() == Ampoliros::STATE_DEVELOPMENT) {
    $gToolbars_array['main']['semaphores'] = array('label' => $gLocale->GetStr('semaphores.button'), 'themeimage' => 'stop', 'horiz' => 'true', 'action' => build_events_call_string('', array(array('main', 'semaphores', ''))));
}
$gToolbars = array(new HuiAmpToolBar('main', array('toolbars' => $gToolbars_array)));
// Main dispatcher
//
$gMain_disp = new HuiDispatcher('main');
$gMain_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $gEnv, $gLocale, $gPage_content, $gState;
    $amp = Ampoliros::instance('Ampoliros');
    $state = $amp->getState();
    if (strlen($gState)) {
        $state = $gState;
    }
    $xml_def = '<vertgroup><name>state</name><args><width>100%</width></args><children>
          <form><name>state</name><args><action type="encoded">' . urlencode(build_events_call_string('', array(array('main', 'default', ''), array('pass', 'setadvanced', '')))) . '</action></args><children>
            <vertgroup><name>state</name><args><width>100%</width></args><children>
              <label><name>state</name><args><label type="encoded">' . urlencode('<strong>' . $gLocale->GetStr('state.label') . '</strong>') . '</label></args></label>
              <radio><name>ampstate</name><args><disp>pass</disp><value>' . Ampoliros::STATE_PRODUCTION . '</value>' . ($state == AMP_STATE_PRODUCTION ? '<checked>true</checked>' : '') . '<label type="encoded">' . urlencode($gLocale->GetStr('production.radio')) . '</label></args></radio>
              <radio><name>ampstate</name><args><disp>pass</disp><value>' . Ampoliros::STATE_DEVELOPMENT . '</value>' . ($state == AMP_STATE_DEVELOPMENT ? '<checked>true</checked>' : '') . '<label type="encoded">' . urlencode($gLocale->GetStr('development.radio')) . '</label></args></radio>
              <radio><name>ampstate</name><args><disp>pass</disp><value>' . Ampoliros::STATE_DEBUG . '</value>' . ($state == AMP_STATE_DEBUG ? '<checked>true</checked>' : '') . '<label type="encoded">' . urlencode($gLocale->GetStr('debug.radio')) . '</label></args></radio>
    $remote_ac = new AmpCentralRemoteServer($gEnv['root']['db'], $eventData['id']);
    if ($remote_ac->RetrieveModule($eventData['repid'], $eventData['moduleid'], isset($eventData['version']) ? $eventData['version'] : '')) {
        $gStatus = $gLocale->GetStr('module_installed.status');
    } else {
        $gStatus = $gLocale->GetStr('module_not_installed.status');
    }
}
$gAction_disp->Dispatch();
// Main dispatcher
//
$gMain_disp = new HuiDispatcher('main');
function reps_tab_action_builder($tab)
{
    return build_events_call_string('', array(array('main', 'default', array('activetab' => $tab))));
}
$gMain_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $gEnv, $gLocale, $gXml_def, $gPage_title, $gStatus, $gToolbars;
    $reps_query =& $gEnv['root']['db']->Execute('SELECT ampcentralremotereps.id AS id,ampcentralremotereps.accountid AS accountid, xmlrpcaccounts.name AS name ' . 'FROM ampcentralremotereps,xmlrpcaccounts ' . 'WHERE ampcentralremotereps.accountid=xmlrpcaccounts.id ' . 'ORDER BY name');
    if ($reps_query->NumRows()) {
        $tabs = array();
        while (!$reps_query->eof) {
            $tabs[]['label'] = $reps_query->Fields('name');
            $reps_query->MoveNext();
        }
        $headers[0]['label'] = $gLocale->GetStr('repository_name.header');
        $gXml_def = '<vertgroup><name>reps</name>
  <children>
    <tab><name>repositories</name>
      <args>
Beispiel #13
0
 $hui->LoadWidget('table');
 $hui->LoadWidget('text');
 $hui->LoadWidget('titlebar');
 $hui->LoadWidget('vertframe');
 $hui->LoadWidget('vertgroup');
 $hui_page = new HuiPage('page', array('title' => $amp_locale->GetStr('ampsetup_title'), 'javascript' => "parent.frames.sum.location.reload()\nparent.frames.header.location.reload()"));
 $hui_mainvertgroup = new HuiVertGroup('mainvertgroup');
 $hui_titlebar = new HuiTitleBar('titlebar', array('title' => $amp_locale->GetStr('ampsetup_title'), 'closewidget' => 'false', 'newwindowwidget' => 'false'));
 $hui_mainvertgroup->AddChild($hui_titlebar);
 $hui_mainframe1 = new HuiHorizFrame('mainframe');
 $hui_mainframe = new HuiVertGroup('mainvertgroup2');
 $hui_mainstatus = new HuiStatusBar('mainstatusbar');
 // Pass dispatcher
 //
 $pass_disp = new HuiDispatcher('pass');
 $pass_disp->AddEvent('checksystem', 'pass_checksystem');
 function pass_checksystem($eventData)
 {
     global $hui_mainstatus, $amp_locale, $log;
     setup_checksystem($eventData, $log);
 }
 $pass_disp->AddEvent('installfiles', 'pass_installfiles');
 function pass_installfiles($eventData)
 {
     setup_installfiles($eventData, $log);
     global $hui_mainstatus, $amp_locale, $log;
 }
 $pass_disp->AddEvent('setedition', 'pass_setedition');
 function pass_setedition($eventData)
 {
     global $hui_mainstatus, $amp_locale, $log;
Beispiel #14
0
function pass_setcountry($eventData)
{
    global $hui_mainstatus, $amp_locale, $env, $hui_page;
    $site_sets = new SiteSettings($env['db']);
    $site_sets->EditKey($env['currentuser'] . '-country', $eventData['country']);
    if ($env['currentuser'] == $env['currentsite']) {
        $site_sets->EditKey('sitecountry', $eventData['country']);
    }
    $hui_page->mArgs['javascript'] = 'parent.frames.sum.location.reload()';
    $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('countryset_status');
}
$pass_disp->Dispatch();
// Main dispatcher
//
$main_disp = new HuiDispatcher('main');
$main_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $env, $hui_mainframe, $hui_titlebar, $amp_locale, $pass_disp, $hui_mainstatus;
    $country_locale = new Locale('amp_misc_locale', $env[$env['currentuser'] . '-country']);
    $selected_country = $pass_disp->GetEventData();
    $selected_country = $selected_country['country'];
    $hui_vgroup = new HuiVertGroup('vgroup');
    $country_query =& $env['ampdb']->Execute('SELECT * ' . 'FROM countries');
    while (!$country_query->eof) {
        $countries[$country_query->Fields('countryname')] = $country_locale->GetStr($country_query->Fields('countryname'));
        $country_query->MoveNext();
    }
    $hui_locale_grid = new HuiGrid('localegrid', array('rows' => '1', 'cols' => '3'));
    $hui_locale_grid->AddChild(new HuiLabel('countrylabel', array('label' => $amp_locale->GetStr('country_label'))), 0, 0);
    $hui_locale_grid->AddChild(new HuiComboBox('country', array('disp' => 'pass', 'elements' => $countries, 'default' => $selected_country ? $selected_country : $env[$env['currentuser'] . '-country'])), 0, 1);
Beispiel #15
0
$pass_disp->AddEvent('cleanphplog', 'pass_cleanphplog');
function pass_cleanphplog($eventData)
{
    global $env, $hui_mainstatus, $amp_locale;
    $temp_log = new Logger(PHP_LOG);
    if ($temp_log->CleanLog()) {
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('logcleaned_status');
    } else {
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('lognotcleaned_status');
    }
}
$pass_disp->Dispatch();
// Main dispatcher
//
$main_disp = new HuiDispatcher('main');
$main_disp->AddEvent('sysinfo', 'main_sysinfo');
function main_sysinfo($eventData)
{
    global $env, $hui_mainframe, $amp_locale, $pass_disp, $hui_mainstatus;
    /*$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[3]['label'] = $amp_locale->GetStr( 'moddeps_header' );*/
    $hui_info_table = new HuiTable('sysinfotable', '');
    // Required features
    // /ampcgi/ alias
    //
    $row = 0;
    if (@fopen(((isset($_SERVER['HTTPS']) and $_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://') . AMP_HOST . CGI_URL . 'clear.gif', 'r')) {
        $ball = $hui_mainframe->mThemeHandler->mStyle['greenball'];
        $check_result = $amp_locale->GetStr('ampcgi_available_label');
Beispiel #16
0
        $hui_mainstatus->mArgs['status'] = $amp_locale->GetStr('lognotcleaned_status');
    }
}
$pass_disp->Dispatch();
// Main dispatcher
//
$main_disp = new HuiDispatcher('main');
function modules_list_action_builder($pageNumber)
{
    return build_events_call_string('', array(array('main', 'default', array('modulespage' => $pageNumber))));
}
function modules_tab_action_builder($tab)
{
    return build_events_call_string('', array(array('main', 'default', array('activetab' => $tab))));
}
$main_disp->AddEvent('default', 'main_default');
function main_default($eventData)
{
    global $env, $gEnv, $hui_mainframe, $amp_locale, $hui_mainstatus;
    $modules_query =& $env['ampdb']->Execute('SELECT * ' . 'FROM modules ' . 'ORDER BY category,modid');
    if ($modules_query->NumRows() > 0) {
        $headers[0]['label'] = $amp_locale->GetStr('modid_header');
        $headers[1]['label'] = $amp_locale->GetStr('modauthor_header');
        $headers[2]['label'] = $amp_locale->GetStr('modversion_header');
        $headers[3]['label'] = $amp_locale->GetStr('moddate_header');
        $row = 0;
        $current_category = '';
        while (!$modules_query->eof) {
            $tmp_data = $modules_query->Fields();
            if ($tmp_data['category'] == '') {
                $tmp_data['category'] = 'various';