Ejemplo n.º 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');
}
Ejemplo n.º 2
0
                                 $hui_vgroup->AddChild($hui_hgroup1);
                                 $next_action = new HuiEventSCall();
                                 $next_action->AddEvent(new HuiEvent('pass', 'cleanup', ''));
                                 $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);
                             } else {
                                 if (!file_exists(TMP_PATH . '.done')) {
                                     $hui_titlebar->mTitle .= ' - ' . $amp_locale->GetStr('finish_title');
                                     $hui_vgroup = new HuiVertGroup('nextvgroup', array('halign' => 'left', 'groupalign' => 'left'));
                                     $hui_hgroup1 = new HuiHorizGroup('nexthgroup', array('align' => 'middle', 'groupalign' => 'center'));
                                     $hui_hgroup1->AddChild(new HuiLabel('nextlabel', array('label' => $amp_locale->GetStr('finish_label'))));
                                     $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);
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
 }