Ejemplo n.º 1
0
global $form_action;
/**
 * @var instance of User class
 */
global $current_User;
if ($display_mode != 'js') {
    // ------------------- PREV/NEXT USER LINKS -------------------
    user_prevnext_links(array('block_start' => '<table class="prevnext_user"><tr>', 'prev_start' => '<td width="33%">', 'prev_end' => '</td>', 'prev_no_user' => '<td width="33%">&nbsp;</td>', 'back_start' => '<td width="33%" class="back_users_list">', 'back_end' => '</td>', 'next_start' => '<td width="33%" class="right">', 'next_end' => '</td>', 'next_no_user' => '<td width="33%">&nbsp;</td>', 'block_end' => '</tr></table>', 'user_tab' => 'report'));
    // ------------- END OF PREV/NEXT USER LINKS -------------------
}
$Form = new Form($form_action, 'user_checkchanges');
$form_title = '';
$form_class = 'fform';
$Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n";
if ($display_mode != 'js') {
    if (!$user_profile_only) {
        echo_user_actions($Form, $edited_User, $action);
    }
    $form_title = get_usertab_header($edited_User, '', T_('Report User'));
}
$Form->begin_form($form_class, $form_title);
$Form->hidden_ctrl();
$Form->hidden('user_tab', $user_tab);
$Form->begin_fieldset(T_('Report User'), array('class' => 'fieldset clear'));
user_report_form(array('Form' => $Form, 'user_ID' => $edited_User->ID, 'crumb_name' => 'user', 'cancel_url' => $admin_url . '?ctrl=user&amp;user_tab=' . $user_tab . '&amp;action=remove_report&amp;user_ID=' . $edited_User->ID . '&amp;' . url_crumb('user')));
if ($display_mode == 'js') {
    // Display a close link for popup window
    echo '<div class="center" style="margin-top:32px">' . action_icon(T_('Close this window'), 'close', '', ' ' . T_('Close this window'), 3, 4, array('id' => 'close_button', 'class' => 'small')) . '</div>';
}
$Form->end_fieldset();
$Form->end_form();
Ejemplo n.º 2
0
$form_title = '';
$form_class = 'fform user_report_form';
$Form->title_fmt = '<span style="float:right">$global_icons$</span><div>$title$</div>' . "\n";
if ($display_mode != 'js') {
    if (!$user_profile_only) {
        echo_user_actions($Form, $edited_User, $action);
    }
    $form_text_title = T_('Report User');
    // used for js confirmation message on leave the changed form
    $form_title = get_usertab_header($edited_User, '', $form_text_title);
}
$Form->begin_form($form_class, $form_title, array('title' => isset($form_text_title) ? $form_text_title : $form_title));
$Form->hidden_ctrl();
if (is_admin_page()) {
    // Params for backoffice
    $Form->hidden('user_tab', $user_tab);
    $Form->hidden('is_backoffice', 1);
} else {
    // Params for frontoffice
    global $Blog;
    $Form->hidden('blog', $Blog->ID);
}
$close_icon = '';
if ($display_mode == 'js') {
    // Display a close link for popup window
    $close_icon = action_icon(T_('Close this window'), 'close', '', '', 0, 0, array('id' => 'close_button', 'class' => 'floatright'));
}
$Form->begin_fieldset(T_('Report User') . $close_icon, array('class' => 'fieldset clear'));
user_report_form(array('Form' => $Form, 'user_ID' => $edited_User->ID, 'crumb_name' => 'user', 'cancel_url' => get_secure_htsrv_url() . 'profile_update.php?' . (is_admin_page() ? 'is_backoffice=1&amp;' : '') . 'action=remove_report&amp;' . 'user_ID=' . $edited_User->ID . '&amp;' . (empty($Blog) || is_admin_page() ? '' : 'blog=' . $Blog->ID . '&amp;') . url_crumb('user')));
$Form->end_fieldset();
$Form->end_form();
Ejemplo n.º 3
0
    if (!empty($contacts_groups)) {
        // Display contacts groups for current User
        $ProfileForm->custom_content('<p><strong>' . T_('You can organize your contacts into groups. You can decide in which groups to put this user here:') . '</strong></p>');
        $ProfileForm->info(sprintf(T_('%s is'), $User->login), $contacts_groups);
        // Form to create a new group
        $ProfileForm->hidden('group_ID', 'new');
        $ProfileForm->text_input('group_ID_combo', param('group_ID_combo', 'string', ''), 18, T_('Create a new group'), '', array('field_suffix' => $button_add_group, 'maxlength' => 50));
    } else {
        if ($User->ID != $current_User->ID) {
            // Form to add this user into the group
            $ProfileForm->combo_box('group_ID', param('group_ID_combo', 'string', ''), get_contacts_groups_options(param('group', 'string', '-1'), false), T_('Add this user to a group'), array('new_field_size' => '8', 'field_suffix' => $button_add_group));
        }
    }
}
// Display Report User part
user_report_form(array('Form' => $ProfileForm, 'user_ID' => $User->ID, 'crumb_name' => 'messaging_contacts', 'cancel_url' => url_add_param($Blog->get('url'), 'disp=contacts&amp;user_ID=' . $User->ID . '&amp;action=remove_report&amp;' . url_crumb('messaging_contacts'))));
$ProfileForm->end_fieldset();
// Load the user fields:
$User->userfields_load();
// fp> TODO: have some clean iteration support
$group_ID = 0;
foreach ($User->userfields as $userfield) {
    if ($group_ID != $userfield->ufgp_ID) {
        // Start new group
        if ($group_ID > 0) {
            // End previous group
            $ProfileForm->end_fieldset();
        }
        $ProfileForm->begin_fieldset(T_($userfield->ufgp_name));
    }
    if ($userfield->ufdf_type == 'text') {