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'); }
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'); }
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'); }
$hui_vgroup->AddChild($hui_hgroup1); $next_action = new HuiEventSCall(); $next_action->AddEvent(new HuiEvent('pass', 'finish', '')); $next_button = new HuiButton('nextbutton', array('label' => $amp_locale->GetStr('next_button'), 'horiz' => 'true', 'image' => CGI_URL . 'hui-forward.gif', 'action' => $next_action->GetEventsCallString())); $hui_vgroup->AddChild(new HuiHorizBar('hr')); $hui_vgroup->AddChild($next_button); setup_check_log($hui_vgroup); $hui_mainframe->AddChild($hui_vgroup); } } } } } } } } } } } } } // Page render // $hui_mainframe1->AddChild($hui_mainframe); $hui_mainvertgroup->AddChild($hui_mainframe1); $hui_mainvertgroup->AddChild($hui_mainstatus); $hui_page->AddChild($hui_mainvertgroup); $hui->AddChild($hui_page); $hui->Render(); } }
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'); }