Beispiel #1
0
$hui_newprofilebutton = new HuiButton('newprofilebutton', array('label' => $amp_locale->GetStr('newprofile_button'), 'themeimage' => 'filenew', 'horiz' => 'true', 'action' => $newprofile_action->GetEventsCallString()));
$hui_profilestoolbar->AddChild($hui_newprofilebutton);
// Users bar
//
$hui_userstoolbar = new HuiToolBar('userstoolbar');
$users_action = new HuiEventsCall();
$users_action->AddEvent(new HuiEvent('main', 'users', ''));
$hui_usersbutton = new HuiButton('usersbutton', array('label' => $amp_locale->GetStr('users_button'), 'themeimage' => 'view_detailed', 'horiz' => 'true', 'action' => $users_action->GetEventsCallString()));
$hui_userstoolbar->AddChild($hui_usersbutton);
$newuser_action = new HuiEventsCall();
$newuser_action->AddEvent(new HuiEvent('main', 'newuser', ''));
$hui_newuserbutton = new HuiButton('newuserbutton', array('label' => $amp_locale->GetStr('newuser_button'), 'themeimage' => 'filenew', 'horiz' => 'true', 'action' => $newuser_action->GetEventsCallString()));
$hui_userstoolbar->AddChild($hui_newuserbutton);
// Help tool bar
//
$hui_helptoolbar = new HuiToolBar('helpbar');
$main_disp = new HuiDispatcher('main');
$event_name = $main_disp->GetEventName();
if (strcmp($event_name, 'help')) {
    $help_action = new HuiEventsCall();
    $help_action->AddEvent(new HuiEvent('main', 'help', array('node' => $event_name)));
    $hui_helpbutton = new HuiButton('helpbutton', array('label' => $amp_locale->GetStr('help_button'), 'themeimage' => 'help', 'horiz' => 'true', 'action' => $help_action->GetEventsCallString()));
    $hui_helptoolbar->AddChild($hui_helpbutton);
}
// Toolbar frame
//
$hui_toolbarframe = new HuiHorizGroup('toolbarframe');
$hui_toolbarframe->AddChild($hui_profilestoolbar);
$hui_toolbarframe->AddChild($hui_userstoolbar);
if ($gEnv['site']['id'] == $gEnv['user']['id']) {
    $motd_tb = new HuiToolBar('motdtb');
Beispiel #2
0
function main_showphplog($eventData)
{
    global $env, $hui_mainframe, $amp_locale, $hui_mainstatus, $hui_titlebar, $hui_mainvertgroup;
    $hui_vgroup = new HuiVertGroup('vgroup');
    $log_content = '';
    if (file_exists(PHP_LOG)) {
        $log_toolbar = new HuiToolBar('logbar');
        $cleanlog_action = new HuiEventsCall();
        $cleanlog_action->AddEvent(new HuiEvent('main', 'showphplog', ''));
        $cleanlog_action->AddEvent(new HuiEvent('pass', 'cleanphplog', ''));
        $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);
        if (file_exists(PHP_LOG)) {
            $log_content = file_get_contents(PHP_LOG);
        }
    }
    $hui_vgroup->AddChild(new HuiText('phplog', array('disp' => 'pass', 'readonly' => 'true', 'value' => htmlentities($log_content), 'rows' => '20', 'cols' => '120')), 0, 1);
    $hui_mainframe->AddChild($hui_vgroup);
    $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('phplog_title');
}
Beispiel #3
0
function main_showsitedblog($eventData)
{
    global $env, $dbtypes, $hui_mainframe, $amp_locale, $hui_mainstatus, $hui_titlebar, $hui_mainvertgroup;
    $query =& $env['ampdb']->execute('SELECT * ' . 'FROM sites ' . 'WHERE id=' . $eventData['siteid']);
    if ($query->NumRows()) {
        $site_data = $query->Fields();
        $hui_vgroup = new HuiVertGroup('vgroup');
        $db_log_content = '';
        if (file_exists($site_data['sitedblog'])) {
            $log_toolbar = new HuiToolBar('logbar');
            $cleanlog_action = new HuiEventsCall();
            $cleanlog_action->AddEvent(new HuiEvent('main', 'showsitedblog', array('siteid' => $eventData['siteid'])));
            $cleanlog_action->AddEvent(new HuiEvent('pass', 'cleansitedblog', array('siteid' => $eventData['siteid'])));
            $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);
            $db_log_content = file_get_contents($site_data['sitedblog']);
        }
        $hui_vgroup->AddChild(new HuiText('sitedblog', array('disp' => 'pass', 'readonly' => 'true', 'value' => htmlentities($db_log_content), 'rows' => '20', 'cols' => '120')), 0, 1);
        $hui_mainframe->AddChild($hui_vgroup);
    }
    $hui_titlebar->mTitle .= ' - ' . $site_data['siteid'] . ' (' . $site_data['sitename'] . ') - ' . $amp_locale->GetStr('showsitedblog_title');
}
Beispiel #4
0
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');
}