Exemple #1
0
function main_deleteuser($eventData)
{
    global $env, $hui_mainframe, $amp_locale, $hui_titlebar;
    $user_query =& $env['ampdb']->execute('SELECT * ' . 'FROM users ' . 'WHERE id=' . $eventData['userid']);
    $user_data = $user_query->Fields();
    $hui_vgroup = new HuiVertGroup('removereqvgroup', array('halign' => 'center', 'groupalign' => 'center'));
    $hui_hgroup1 = new HuiHorizGroup('removereqhgroup', array('align' => 'middle', 'width' => '0%'));
    $hui_hgroup1->AddChild(new HuiLabel('removereqlabel', array('label' => sprintf($amp_locale->GetStr('removeuserquestion_label'), $user_data['username']))));
    $hui_vgroup->AddChild($hui_hgroup1);
    $hui_hgroup2 = new HuiHorizGroup('removereqhgroup', array('align' => 'middle', 'groupalign' => 'center'));
    $remove_action = new HuiEventSCall();
    $remove_action->AddEvent(new HuiEvent('main', 'users', ''));
    $remove_action->AddEvent(new HuiEvent('pass', 'removeuser', array('uid' => $eventData['userid'])));
    $remove_button = new HuiButton('removebutton', array('label' => $amp_locale->GetStr('okremoveuser_button'), 'horiz' => 'true', 'themeimage' => 'button_ok', 'action' => $remove_action->GetEventsCallString()));
    $remove_frame = new HuiHorizFrame('removeframe');
    $remove_frame->AddChild($remove_button);
    $hui_hgroup2->AddChild($remove_frame);
    $dontremove_action = new HuiEventsCall();
    $dontremove_action->AddEvent(new HuiEvent('main', 'users', ''));
    $dontremove_button = new HuiButton('dontremovebutton', array('label' => $amp_locale->GetStr('dontremoveuser_button'), 'horiz' => 'true', 'themeimage' => 'stop', 'action' => $dontremove_action->GetEventsCallString()));
    $dontremove_frame = new HuiHorizFrame('dontremoveframe');
    $dontremove_frame->AddChild($dontremove_button);
    $hui_hgroup2->AddChild($dontremove_frame);
    $ok_action = new HuiEventsCall();
    $ok_action->AddEvent(new HuiEvent('main', 'default', ''));
    $hui_ok_form = new HuiForm('okform', array('action'));
    $hui_vgroup->AddChild($hui_hgroup2);
    $hui_mainframe->AddChild($hui_vgroup);
    $hui_titlebar->mTitle .= ' - ' . $user_data['username'] . ' - ' . $amp_locale->GetStr('removeuser_title');
}
Exemple #2
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');
}
Exemple #3
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');
}
Exemple #4
0
 $hui->LoadWidget('image');
 $hui->LoadWidget('label');
 $hui->LoadWidget('page');
 $hui->LoadWidget('statusbar');
 $hui->LoadWidget('string');
 $hui->LoadWidget('submit');
 $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);
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');
}