Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: users.php 5646 2011-10-31 10:32:20Z PirataNervo $
| * $Id: users.php 5803 2012-04-20 08:35:26Z Tomm $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 159 | Zeile 159 |
---|
// We've selected a new avatar for this user! if($mybb->input['avatar']) {
|
// We've selected a new avatar for this user! if($mybb->input['avatar']) {
|
| if(!verify_post_check($mybb->input['my_post_key'])) { echo $lang->invalid_post_verify_key2; exit; }
|
$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']); if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))
| $mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']); if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))
|
Zeile 294 | Zeile 300 |
---|
"width" => $dimensions[0], "height" => $dimensions[1] );
|
"width" => $dimensions[0], "height" => $dimensions[1] );
|
}
| }
|
} }
| } }
|
Zeile 334 | Zeile 340 |
---|
$scaled_dimensions = scale_image($avatar['width'], $avatar['height'], 80, 80); $top = ceil((80-$scaled_dimensions['height'])/2); $left = ceil((80-$scaled_dimensions['width'])/2);
|
$scaled_dimensions = scale_image($avatar['width'], $avatar['height'], 80, 80); $top = ceil((80-$scaled_dimensions['height'])/2); $left = ceil((80-$scaled_dimensions['width'])/2);
|
echo "<li><a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&avatar={$avatar['path']}\"><span class=\"image\"><img src=\"{$mybb->settings['avatardir']}/{$avatar['path']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\" /></span><span class=\"title\">{$avatar['friendly_name']}</span></a></li>\n";
| echo "<li><a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&avatar={$avatar['path']}&my_post_key={$mybb->post_code}\"><span class=\"image\"><img src=\"{$mybb->settings['avatardir']}/{$avatar['path']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\" /></span><span class=\"title\">{$avatar['friendly_name']}</span></a></li>\n";
|
} } echo "</ul>\n";
| } } echo "</ul>\n";
|
Zeile 347 | Zeile 353 |
---|
if($mybb->input['action'] == "activate_user") { $plugins->run_hooks("admin_user_users_coppa_activate");
|
if($mybb->input['action'] == "activate_user") { $plugins->run_hooks("admin_user_users_coppa_activate");
|
| if(!verify_post_check($mybb->input['my_post_key'])) { flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=user-users"); }
|
$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query);
| $query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query);
|
Zeile 476 | Zeile 488 |
---|
// Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
|
// Validate the user and get any errors that might have occurred. if(!$userhandler->validate_user())
|
{
| {
|
$errors = $userhandler->get_friendly_errors(); } else { $user_info = $userhandler->insert_user();
|
$errors = $userhandler->get_friendly_errors(); } else { $user_info = $userhandler->insert_user();
|
|
|
$plugins->run_hooks("admin_user_users_add_commit"); // Log admin action
| $plugins->run_hooks("admin_user_users_add_commit"); // Log admin action
|
Zeile 498 | Zeile 510 |
---|
while($profile_field = $db->fetch_array($query)) { $profile_fields['required'][] = $profile_field;
|
while($profile_field = $db->fetch_array($query)) { $profile_fields['required'][] = $profile_field;
|
}
| }
|
$page->add_breadcrumb_item($lang->create_user); $page->output_header($lang->create_user);
| $page->add_breadcrumb_item($lang->create_user); $page->output_header($lang->create_user);
|
Zeile 511 | Zeile 523 |
---|
if($errors) { $page->output_inline_error($errors);
|
if($errors) { $page->output_inline_error($errors);
|
}
| }
|
else { $mybb->input = array( "usergroup" => 2 );
|
else { $mybb->input = array( "usergroup" => 2 );
|
}
| }
|
$form_container = new FormContainer($lang->required_profile_info); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->password." <em>*</em>", "", $form->generate_password_box('password', $mybb->input['password'], array('id' => 'password', 'autocomplete' => 'off')), 'password'); $form_container->output_row($lang->confirm_password." <em>*</em>", "", $form->generate_password_box('confirm_password', $mybb->input['confirm_password'], array('id' => 'confirm_new_password')), 'confirm_new_password');
|
$form_container = new FormContainer($lang->required_profile_info); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->password." <em>*</em>", "", $form->generate_password_box('password', $mybb->input['password'], array('id' => 'password', 'autocomplete' => 'off')), 'password'); $form_container->output_row($lang->confirm_password." <em>*</em>", "", $form->generate_password_box('confirm_password', $mybb->input['confirm_password'], array('id' => 'confirm_new_password')), 'confirm_new_password');
|
$form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');
$display_group_options[0] = $lang->use_primary_user_group; $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) { $options[$usergroup['gid']] = $usergroup['title']; $display_group_options[$usergroup['gid']] = $usergroup['title']; }
$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup'); $form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups'); $form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');
// Output custom profile fields - required output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
| $form_container->output_row($lang->email_address." <em>*</em>", "", $form->generate_text_box('email', $mybb->input['email'], array('id' => 'email')), 'email');
$display_group_options[0] = $lang->use_primary_user_group; $query = $db->simple_select("usergroups", "gid, title", "gid != '1'", array('order_by' => 'title')); while($usergroup = $db->fetch_array($query)) { $options[$usergroup['gid']] = $usergroup['title']; $display_group_options[$usergroup['gid']] = $usergroup['title']; }
$form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup'); $form_container->output_row($lang->additional_user_groups, $lang->additional_user_groups_desc, $form->generate_select_box('additionalgroups[]', $options, $mybb->input['additionalgroups'], array('id' => 'additionalgroups', 'multiple' => true, 'size' => 5)), 'additionalgroups'); $form_container->output_row($lang->display_user_group." <em>*</em>", "", $form->generate_select_box('displaygroup', $display_group_options, $mybb->input['displaygroup'], array('id' => 'displaygroup')), 'displaygroup');
// Output custom profile fields - required output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
|
$form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_user);
| $form_container->end(); $buttons[] = $form->generate_submit_button($lang->save_user);
|
Zeile 568 | Zeile 580 |
---|
{ flash_message($lang->error_no_perms_super_admin, 'error'); admin_redirect("index.php?module=user-users");
|
{ flash_message($lang->error_no_perms_super_admin, 'error'); admin_redirect("index.php?module=user-users");
|
}
| }
|
// Determine the usergroup stuff if(is_array($mybb->input['additionalgroups']))
| // Determine the usergroup stuff if(is_array($mybb->input['additionalgroups']))
|
Zeile 585 | Zeile 597 |
---|
else { $additionalgroups = '';
|
else { $additionalgroups = '';
|
}
| }
|
// Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler('update');
| // Set up user handler. require_once MYBB_ROOT."inc/datahandlers/user.php"; $userhandler = new UserDataHandler('update');
|
Zeile 611 | Zeile 623 |
---|
"aim" => $mybb->input['aim'], "yahoo" => $mybb->input['yahoo'], "msn" => $mybb->input['msn'],
|
"aim" => $mybb->input['aim'], "yahoo" => $mybb->input['yahoo'], "msn" => $mybb->input['msn'],
|
| "birthday" => array( "day" => $mybb->input['bday1'], "month" => $mybb->input['bday2'], "year" => $mybb->input['bday3'] ),
|
"style" => $mybb->input['style'], "signature" => $mybb->input['signature'], "dateformat" => intval($mybb->input['dateformat']),
| "style" => $mybb->input['style'], "signature" => $mybb->input['signature'], "dateformat" => intval($mybb->input['dateformat']),
|
Zeile 894 | Zeile 911 |
---|
// We need to fetch this users profile field values $query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'"); $mybb->input['profile_fields'] = $db->fetch_array($query);
|
// We need to fetch this users profile field values $query = $db->simple_select("userfields", "*", "ufid='{$user['uid']}'"); $mybb->input['profile_fields'] = $db->fetch_array($query);
|
| }
if($mybb->input['bday1'] || $mybb->input['bday2'] || $mybb->input['bday3']) { $mybb->input['bday'][0] = $mybb->input['bday1']; $mybb->input['bday'][1] = $mybb->input['bday2']; $mybb->input['bday'][2] = intval($mybb->input['bday3']); } else { $mybb->input['bday'] = array();
if($user['birthday']) { $mybb->input['bday'] = explode('-', $user['birthday']); }
|
}
// Fetch custom profile fields
| }
// Fetch custom profile fields
|
Zeile 901 | Zeile 934 |
---|
while($profile_field = $db->fetch_array($query)) { if($profile_field['required'] == 1)
|
while($profile_field = $db->fetch_array($query)) { if($profile_field['required'] == 1)
|
{
| {
|
$profile_fields['required'][] = $profile_field;
|
$profile_fields['required'][] = $profile_field;
|
}
| }
|
else { $profile_fields['optional'][] = $profile_field;
| else { $profile_fields['optional'][] = $profile_field;
|
Zeile 916 | Zeile 949 |
---|
$sub_tabs['edit_user'] = array( 'title' => $lang->edit_user, 'description' => $lang->edit_user_desc
|
$sub_tabs['edit_user'] = array( 'title' => $lang->edit_user, 'description' => $lang->edit_user_desc
|
);
| );
|
$form = new Form("index.php?module=user-users&action=edit&uid={$user['uid']}", "post", "", 1); echo "<script type=\"text/javascript\">\n function submitUserForm() { $('tab_overview').up('FORM').submit(); }</script>\n";
$page->output_nav_tabs($sub_tabs, 'edit_user');
|
$form = new Form("index.php?module=user-users&action=edit&uid={$user['uid']}", "post", "", 1); echo "<script type=\"text/javascript\">\n function submitUserForm() { $('tab_overview').up('FORM').submit(); }</script>\n";
$page->output_nav_tabs($sub_tabs, 'edit_user');
|
|
|
// If we have any error messages, show them if($errors) {
| // If we have any error messages, show them if($errors) {
|
Zeile 934 | Zeile 967 |
---|
{ echo $lang->sprintf($lang->warning_coppa_user, $user['uid']); }
|
{ echo $lang->sprintf($lang->warning_coppa_user, $user['uid']); }
|
|
|
$tabs = array( "overview" => $lang->overview, "profile" => $lang->profile,
| $tabs = array( "overview" => $lang->overview, "profile" => $lang->profile,
|
Zeile 964 | Zeile 997 |
---|
$scaled_dimensions = scale_image($width, $height, 120, 120); } else
|
$scaled_dimensions = scale_image($width, $height, 120, 120); } else
|
{
| {
|
$scaled_dimensions = array( "width" => 120, "height" => 120 );
|
$scaled_dimensions = array( "width" => 120, "height" => 120 );
|
}
| }
|
if (!stristr($user['avatar'], 'http://')) { $user['avatar'] = "../{$user['avatar']}\n";
|
if (!stristr($user['avatar'], 'http://')) { $user['avatar'] = "../{$user['avatar']}\n";
|
} } else
| } } else
|
{ $user['avatar'] = "styles/{$page->style}/images/default_avatar.gif"; $scaled_dimensions = array(
| { $user['avatar'] = "styles/{$page->style}/images/default_avatar.gif"; $scaled_dimensions = array(
|
Zeile 998 | Zeile 1031 |
---|
$timezone = $user['timezone']+1; } else
|
$timezone = $user['timezone']+1; } else
|
{
| {
|
$timezone = $user['timezone']; } $local_time = gmdate($mybb->settings['dateformat'], TIME_NOW + ($timezone * 3600)).", ".gmdate($mybb->settings['timeformat'], TIME_NOW + ($timezone * 3600));
| $timezone = $user['timezone']; } $local_time = gmdate($mybb->settings['dateformat'], TIME_NOW + ($timezone * 3600)).", ".gmdate($mybb->settings['timeformat'], TIME_NOW + ($timezone * 3600));
|
Zeile 1010 | Zeile 1043 |
---|
if($posts_per_day > $user['postnum']) { $posts_per_day = $user['postnum'];
|
if($posts_per_day > $user['postnum']) { $posts_per_day = $user['postnum'];
|
} }
| } }
|
$stats = $cache->read("stats"); $posts = $stats['numposts']; if($posts == 0)
|
$stats = $cache->read("stats"); $posts = $stats['numposts']; if($posts == 0)
|
{
| {
|
$percent_posts = "0"; } else
| $percent_posts = "0"; } else
|
Zeile 1029 | Zeile 1062 |
---|
if($user_permissions['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) { $reputation = get_reputation($user['reputation']);
|
if($user_permissions['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) { $reputation = get_reputation($user['reputation']);
|
} else {
| } else {
|
$reputation = "-"; }
if($mybb->settings['enablewarningsystem'] != 0 && $user_permissions['canreceivewarnings'] != 0)
|
$reputation = "-"; }
if($mybb->settings['enablewarningsystem'] != 0 && $user_permissions['canreceivewarnings'] != 0)
|
{
| {
|
$warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100) {
| $warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100); if($warning_level > 100) {
|
Zeile 1045 | Zeile 1078 |
---|
$warning_level = get_colored_warning_level($warning_level); }
|
$warning_level = get_colored_warning_level($warning_level); }
|
| $age = $lang->na;
|
if($user['birthday']) { $age = get_age($user['birthday']);
|
if($user['birthday']) { $age = get_age($user['birthday']);
|
}
else { $age = '';
| |
}
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1)); $table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");
|
}
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1)); $table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}");
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell("<strong>{$lang->registration_date}:</strong> {$reg_date}"); $table->construct_cell("<strong>{$lang->local_time}:</strong> {$local_time}"); $table->construct_row();
| $table->construct_cell("<strong>{$lang->registration_date}:</strong> {$reg_date}"); $table->construct_cell("<strong>{$lang->local_time}:</strong> {$local_time}"); $table->construct_row();
|
Zeile 1120 | Zeile 1148 |
---|
$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim'); $form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo'); $form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');
|
$form_container->output_row($lang->aim_handle, "", $form->generate_text_box('aim', $mybb->input['aim'], array('id' => 'aim')), 'aim'); $form_container->output_row($lang->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo'); $form_container->output_row($lang->msn_messanger_handle, "", $form->generate_text_box('msn', $mybb->input['msn'], array('id' => 'msn')), 'msn');
|
|
|
// Birthday
|
// Birthday
|
| $birthday_days = array(0 => ''); for($i = 1; $i <= 31; $i++) { $birthday_days[$i] = $i; }
$birthday_months = array( 0 => '', 1 => $lang->january, 2 => $lang->february, 3 => $lang->march, 4 => $lang->april, 5 => $lang->may, 6 => $lang->june, 7 => $lang->july, 8 => $lang->august, 9 => $lang->september, 10 => $lang->october, 11 => $lang->november, 12 => $lang->december );
$birthday_row = $form->generate_select_box('bday1', $birthday_days, $mybb->input['bday'][0], array('id' => 'bday_day')); $birthday_row .= ' '.$form->generate_select_box('bday2', $birthday_months, $mybb->input['bday'][1], array('id' => 'bday_month')); $birthday_row .= ' '.$form->generate_text_box('bday3', $mybb->input['bday'][2], array('id' => 'bday_year', 'style' => 'width: 3em;'));
$form_container->output_row($lang->birthday, "", $birthday_row, 'birthday');
|
// Output custom profile fields - optional output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);
|
// Output custom profile fields - optional output_custom_profile_fields($profile_fields['optional'], $mybb->input['profile_fields'], $form_container, $form);
|
|
|
$form_container->end(); echo "</div>\n";
|
$form_container->end(); echo "</div>\n";
|
//
| //
|
// ACCOUNT SETTINGS //
// Plugin hook note - we should add hooks in above each output_row for the below so users can add their own options to each group :>
|
// ACCOUNT SETTINGS //
// Plugin hook note - we should add hooks in above each output_row for the below so users can add their own options to each group :>
|
|
|
echo "<div id=\"tab_settings\">\n"; $form_container = new FormContainer($lang->account_settings.": {$user['username']}"); $login_options = array(
| echo "<div id=\"tab_settings\">\n"; $form_container = new FormContainer($lang->account_settings.": {$user['username']}"); $login_options = array(
|
Zeile 1154 | Zeile 1210 |
---|
$form->generate_check_box("pmnotice", 1, $lang->alert_new_pms, array("checked" => $mybb->input['pmnotice'])), $form->generate_check_box("pmnotify", 1, $lang->email_notify_new_pms, array("checked" => $mybb->input['pmnotify'])), "<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_email_notification, $lang->instant_email_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod'))
|
$form->generate_check_box("pmnotice", 1, $lang->alert_new_pms, array("checked" => $mybb->input['pmnotice'])), $form->generate_check_box("pmnotify", 1, $lang->email_notify_new_pms, array("checked" => $mybb->input['pmnotify'])), "<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_email_notification, $lang->instant_email_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod'))
|
);
| );
|
$form_container->output_row($lang->messaging_and_notification, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $messaging_options)."</div>");
$date_format_options = array($lang->use_default);
| $form_container->output_row($lang->messaging_and_notification, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $messaging_options)."</div>");
$date_format_options = array($lang->use_default);
|
Zeile 1294 | Zeile 1350 |
---|
{ // Permanent $lang->suspend_expire_info = $lang->suspend_sig_perm;
|
{ // Permanent $lang->suspend_expire_info = $lang->suspend_sig_perm;
|
} else
| } else
|
{ // There's a limit to the suspension! $expired = my_date($mybb->settings['dateformat'], $user['suspendsigtime'])." @ ".my_date($mybb->settings['timeformat'], $user['suspendsigtime']);
| { // There's a limit to the suspension! $expired = my_date($mybb->settings['dateformat'], $user['suspendsigtime'])." @ ".my_date($mybb->settings['timeformat'], $user['suspendsigtime']);
|
Zeile 1390 | Zeile 1446 |
---|
if($errors) { $avatar_url = $mybb->input['avatar_url'];
|
if($errors) { $avatar_url = $mybb->input['avatar_url'];
|
}
| }
|
if($mybb->settings['maxavatardims'] != "") {
| if($mybb->settings['maxavatardims'] != "") {
|
Zeile 1447 | Zeile 1503 |
---|
);
echo "<div id=\"tab_modoptions\">\n";
|
);
echo "<div id=\"tab_modoptions\">\n";
|
$form_container = new FormContainer($lang->mod_options);
| $form_container = new FormContainer($lang->mod_options.": {$user['username']}");
|
$form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');
// Mod posts
| $form_container->output_row($lang->user_notes, '', $form->generate_text_area('usernotes', $mybb->input['usernotes'], array('id' => 'usernotes')), 'usernotes');
// Mod posts
|
Zeile 1485 | Zeile 1541 |
---|
if($user['suspensiontime'] == 0 || $mybb->input['suspost_period'] == "never") { $existing_info = $lang->suspended_perm;
|
if($user['suspensiontime'] == 0 || $mybb->input['suspost_period'] == "never") { $existing_info = $lang->suspended_perm;
|
}
| }
|
else { $suspost_date = my_date($mybb->settings['dateformat'], $user['suspensiontime'])." ".my_date($mybb->settings['timeformat'], $user['suspensiontime']); $existing_info = $lang->sprintf($lang->suspend_length, $suspost_date);
|
else { $suspost_date = my_date($mybb->settings['dateformat'], $user['suspensiontime'])." ".my_date($mybb->settings['timeformat'], $user['suspensiontime']); $existing_info = $lang->sprintf($lang->suspend_length, $suspost_date);
|
} }
| } }
|
$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_text_box("suspost_time", $mybb->input['suspost_time'], array('style' => 'width: 2em;')).' '.$suspost_options.'</div>'; $lang->suspend_posts_info = $lang->sprintf($lang->suspend_posts_info, $user['username']); $form_container->output_row($form->generate_check_box("suspendposting", 1, $lang->suspend_posts, array("id" => "suspendposting", "onclick" => "toggleBox('suspost');", "checked" => $mybb->input['suspendposting'])), $lang->suspend_posts_info, $suspost_div);
|
$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_text_box("suspost_time", $mybb->input['suspost_time'], array('style' => 'width: 2em;')).' '.$suspost_options.'</div>'; $lang->suspend_posts_info = $lang->sprintf($lang->suspend_posts_info, $user['username']); $form_container->output_row($form->generate_check_box("suspendposting", 1, $lang->suspend_posts, array("id" => "suspendposting", "onclick" => "toggleBox('suspost');", "checked" => $mybb->input['suspendposting'])), $lang->suspend_posts_info, $suspost_div);
|
|
|
$form_container->end(); echo "</div>\n";
$buttons[] = $form->generate_submit_button($lang->save_user); $form->output_submit_wrapper($buttons);
|
$form_container->end(); echo "</div>\n";
$buttons[] = $form->generate_submit_button($lang->save_user); $form->output_submit_wrapper($buttons);
|
|
|
$form->end();
echo '<script type="text/javascript">
| $form->end();
echo '<script type="text/javascript">
|
Zeile 1521 | Zeile 1577 |
---|
$("modpost").show(); } else if($("moderateposting").checked == false)
|
$("modpost").show(); } else if($("moderateposting").checked == false)
|
{
| {
|
$("modpost").hide(); } }
| $("modpost").hide(); } }
|
Zeile 1533 | Zeile 1589 |
---|
if($("suspendposting").checked == true) { $("suspost").show();
|
if($("suspendposting").checked == true) { $("suspost").show();
|
}
| }
|
else if($("suspendposting").checked == false) { $("suspost").hide(); }
|
else if($("suspendposting").checked == false) { $("suspost").hide(); }
|
} }
| } }
|
if($("moderateposting").checked == false) { $("modpost").hide();
|
if($("moderateposting").checked == false) { $("modpost").hide();
|
} else
| } else
|
{ $("modpost").show(); }
if($("suspendposting").checked == false)
|
{ $("modpost").show(); }
if($("suspendposting").checked == false)
|
{
| {
|
$("suspost").hide(); } else { $("suspost").show();
|
$("suspost").hide(); } else { $("suspost").show();
|
}
| }
|
// --> </script>';
| // --> </script>';
|
Zeile 1580 | Zeile 1636 |
---|
} if(is_super_admin($mybb->input['uid']) && $mybb->user['uid'] != $mybb->input['uid'] && !is_super_admin($mybb->user['uid']))
|
} if(is_super_admin($mybb->input['uid']) && $mybb->user['uid'] != $mybb->input['uid'] && !is_super_admin($mybb->user['uid']))
|
{
| {
|
flash_message($lang->error_no_perms_super_admin, 'error');
|
flash_message($lang->error_no_perms_super_admin, 'error');
|
admin_redirect("index.php?module=user-users"); }
| admin_redirect("index.php?module=user-users"); }
|
// User clicked no if($mybb->input['no']) {
| // User clicked no if($mybb->input['no']) {
|
Zeile 1594 | Zeile 1650 |
---|
if($mybb->request_method == "post") { // Delete the user
|
if($mybb->request_method == "post") { // Delete the user
|
$db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'");
| |
$db->delete_query("userfields", "ufid='{$user['uid']}'"); $db->delete_query("privatemessages", "uid='{$user['uid']}'"); $db->delete_query("events", "uid='{$user['uid']}'");
| $db->delete_query("userfields", "ufid='{$user['uid']}'"); $db->delete_query("privatemessages", "uid='{$user['uid']}'"); $db->delete_query("events", "uid='{$user['uid']}'");
|
Zeile 1607 | Zeile 1662 |
---|
$db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'"); $db->delete_query("reputation", "uid='{$user['uid']}' OR adduid='{$user['uid']}'");
|
$db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'"); $db->delete_query("reputation", "uid='{$user['uid']}' OR adduid='{$user['uid']}'");
|
$db->delete_query("awaitingactivation", "uid='{$uid}'");
| $db->delete_query("awaitingactivation", "uid='{$user['uid']}'"); $db->delete_query("posts", "uid = '{$user['uid']}' AND visible = '-2'"); $db->delete_query("threads", "uid = '{$user['uid']}' AND visible = '-2'");
|
// Update forum stats update_stats(array('numusers' => '-1'));
|
// Update forum stats update_stats(array('numusers' => '-1'));
|
| // Update forums & threads if user is the lastposter $db->update_query("posts", array('uid' => 0), "uid='{$user['uid']}'"); $db->update_query("forums", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'"); $db->update_query("threads", array("lastposteruid" => 0), "lastposteruid = '{$user['uid']}'");
|
// Did this user have an uploaded avatar? if($user['avatartype'] == "upload")
| // Did this user have an uploaded avatar? if($user['avatartype'] == "upload")
|
Zeile 1673 | Zeile 1735 |
---|
$admin_view['conditions']['referrer'] = $mybb->input['uid'];
echo build_users_view($admin_view);
|
$admin_view['conditions']['referrer'] = $mybb->input['uid'];
echo build_users_view($admin_view);
|
$page->output_footer(); }
| $page->output_footer(); }
|
if($mybb->input['action'] == "ipaddresses") {
| if($mybb->input['action'] == "ipaddresses") {
|
Zeile 1699 | Zeile 1761 |
---|
log_admin_action($user['uid'], $user['username']); $table = new Table;
|
log_admin_action($user['uid'], $user['username']); $table = new Table;
|
|
|
$table->construct_header($lang->ip_address); $table->construct_header($lang->controls, array('width' => 200, 'class' => "align_center"));
| $table->construct_header($lang->ip_address); $table->construct_header($lang->controls, array('width' => 200, 'class' => "align_center"));
|
Zeile 1723 | Zeile 1785 |
---|
$table->construct_row();
if(empty($user['regip']))
|
$table->construct_row();
if(empty($user['regip']))
|
{
| {
|
$user['regip'] = $lang->unknown; $controls = ''; }
| $user['regip'] = $lang->unknown; $controls = ''; }
|
Zeile 1833 | Zeile 1895 |
---|
// Update the moderator cache... $cache->update_moderators(); }
|
// Update the moderator cache... $cache->update_moderators(); }
|
| // Forums & Threads $db->update_query("forums", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'"); $db->update_query("threads", array("lastposteruid" => $destination_user['uid']), "lastposteruid = '{$source_user['uid']}'");
// Banning $db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");
|
// Merging Reputation // First, let's change all the details over to our new user...
| // Merging Reputation // First, let's change all the details over to our new user...
|
Zeile 2004 | Zeile 2073 |
---|
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid'])) { unset($admin_view);
|
if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid'])) { unset($admin_view);
|
} }
| } }
|
if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']]) { $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']];
| if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']]) { $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']];
|
Zeile 2036 | Zeile 2105 |
---|
} if($mybb->input['conditions'])
|
} if($mybb->input['conditions'])
|
{
| {
|
$admin_view['conditions'] = $mybb->input['conditions']; }
| $admin_view['conditions'] = $mybb->input['conditions']; }
|
Zeile 2045 | Zeile 2114 |
---|
$admin_view['sortby'] = $mybb->input['sortby']; }
|
$admin_view['sortby'] = $mybb->input['sortby']; }
|
if($mybb->input['perpage'])
| if(intval($mybb->input['perpage']))
|
{ $admin_view['perpage'] = $mybb->input['perpage']; }
| { $admin_view['perpage'] = $mybb->input['perpage']; }
|
Zeile 2053 | Zeile 2122 |
---|
if($mybb->input['order']) { $admin_view['sortorder'] = $mybb->input['order'];
|
if($mybb->input['order']) { $admin_view['sortorder'] = $mybb->input['order'];
|
}
| }
|
if($mybb->input['displayas']) { $admin_view['view_type'] = $mybb->input['displayas'];
| if($mybb->input['displayas']) { $admin_view['view_type'] = $mybb->input['displayas'];
|
Zeile 2574 | Zeile 2643 |
---|
}
// Require the rebuild functions
|
}
// Require the rebuild functions
|
require_once(MYBB_ROOT.'/inc/functions.php'); require_once(MYBB_ROOT.'/inc/functions_rebuild.php');
| require_once MYBB_ROOT.'/inc/functions.php'; require_once MYBB_ROOT.'/inc/functions_rebuild.php';
|
// We've finished deleting user's posts, so let's delete the threads if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)
| // We've finished deleting user's posts, so let's delete the threads if(is_array($prune_array['to_delete']) && count($prune_array['to_delete']) > 0)
|
Zeile 2701 | Zeile 2770 |
---|
unset($mybb->input['additionalgroups'][$key]); } }
|
unset($mybb->input['additionalgroups'][$key]); } }
|
$additionalgroups = implode(",", $mybb->input['additionalgroups']);
| $additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));
|
} else {
| } else {
|
Zeile 2710 | Zeile 2779 |
---|
// Create an update array $update_array = array(
|
// Create an update array $update_array = array(
|
"usergroup" => $mybb->input['usergroup'],
| "usergroup" => intval($mybb->input['usergroup']),
|
"additionalgroups" => $additionalgroups,
|
"additionalgroups" => $additionalgroups,
|
"displaygroup" => $mybb->input['displaygroup']
| "displaygroup" => intval($mybb->input['displaygroup'])
|
);
// Do the usergroup update for all those selected
| );
// Do the usergroup update for all those selected
|
Zeile 3184 | Zeile 3253 |
---|
foreach($view['conditions']['usergroup'] as $usergroup) {
|
foreach($view['conditions']['usergroup'] as $usergroup) {
|
| $usergroup = intval($usergroup); if(!$usergroup) { continue; }
|
switch($db->type) { case "pgsql":
| switch($db->type) { case "pgsql":
|
Zeile 3194 | Zeile 3270 |
---|
$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } }
|
$additional_sql .= "OR CONCAT(',',additionalgroups,',') LIKE '%,{$usergroup},%'"; } }
|
$search_sql .= " AND (u.usergroup IN (".implode(",", $view['conditions']['usergroup']).") {$additional_sql})";
| $search_sql .= " AND (u.usergroup IN (".implode(",", array_map('intval', $view['conditions']['usergroup'])).") {$additional_sql})";
|
}
// COPPA users only?
| }
// COPPA users only?
|
Zeile 3311 | Zeile 3388 |
---|
{ if($user['coppauser']) {
|
{ if($user['coppauser']) {
|
$popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}{$from_bit}");
| $popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
} else {
|
} else {
|
$popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}{$from_bit}");
| $popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
} }
| } }
|