Zeile 172 | Zeile 172 |
---|
} }
|
} }
|
$ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));
// gethostbyaddr returns the same ip on failure if($ipaddress_host_name == $mybb->input['ipaddress'])
| if(filter_var($mybb->input['ipaddress'], FILTER_VALIDATE_IP))
|
{
|
{
|
$ipaddress_host_name = $lang->na;
| $ipaddress_host_name = htmlspecialchars_uni(@gethostbyaddr($mybb->input['ipaddress']));
// gethostbyaddr returns the same ip on failure if($ipaddress_host_name == $mybb->input['ipaddress']) { $ipaddress_host_name = $lang->na; }
|
} }
| } }
|
Zeile 207 | Zeile 210 |
---|
if($mybb->input['action'] == "activate_user") {
|
if($mybb->input['action'] == "activate_user") {
|
if(!verify_post_check($mybb->input['my_post_key']))
| if(!verify_post_check($mybb->get_input('my_post_key')))
|
{ flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=user-users");
| { flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=user-users");
|
Zeile 228 | Zeile 231 |
---|
// Update if($user['coppauser'])
|
// Update if($user['coppauser'])
|
{
| {
|
$updated_user = array( "coppauser" => 0 );
| $updated_user = array( "coppauser" => 0 );
|
Zeile 278 | Zeile 281 |
---|
else { flash_message($lang->success_activated, 'success');
|
else { flash_message($lang->success_activated, 'success');
|
} }
| } }
|
if($admin_session['data']['last_users_url']) { $url = $admin_session['data']['last_users_url'];
| if($admin_session['data']['last_users_url']) { $url = $admin_session['data']['last_users_url'];
|
Zeile 290 | Zeile 293 |
---|
{ update_admin_session('from', 'home'); }
|
{ update_admin_session('from', 'home'); }
|
}
| }
|
else { $url = "index.php?module=user-users&action=edit&uid={$user['uid']}"; }
$plugins->run_hooks("admin_user_users_coppa_end");
|
else { $url = "index.php?module=user-users&action=edit&uid={$user['uid']}"; }
$plugins->run_hooks("admin_user_users_coppa_end");
|
|
|
admin_redirect($url); }
|
admin_redirect($url); }
|
|
|
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_user_users_add");
if($mybb->request_method == "post")
|
if($mybb->input['action'] == "add") { $plugins->run_hooks("admin_user_users_add");
if($mybb->request_method == "post")
|
{
| {
|
// Determine the usergroup stuff
|
// Determine the usergroup stuff
|
if(is_array($mybb->input['additionalgroups']))
| if(!empty($mybb->input['additionalgroups']) && is_array($mybb->input['additionalgroups']))
|
{ foreach($mybb->input['additionalgroups'] as $key => $gid) {
| { foreach($mybb->input['additionalgroups'] as $key => $gid) {
|
Zeile 330 | Zeile 333 |
---|
// Set the data for the new user. $new_user = array(
|
// Set the data for the new user. $new_user = array(
|
"uid" => $mybb->input['uid'], "username" => $mybb->input['username'], "password" => $mybb->input['password'], "password2" => $mybb->input['confirm_password'], "email" => $mybb->input['email'], "email2" => $mybb->input['email'], "usergroup" => $mybb->input['usergroup'],
| "uid" => $mybb->get_input('uid'), "username" => $mybb->get_input('username'), "password" => $mybb->get_input('password'), "password2" => $mybb->get_input('confirm_password'), "email" => $mybb->get_input('email'), "email2" => $mybb->get_input('email'), "usergroup" => $mybb->get_input('usergroup'),
|
"additionalgroups" => $additionalgroups,
|
"additionalgroups" => $additionalgroups,
|
"displaygroup" => $mybb->input['displaygroup'], "profile_fields" => $mybb->input['profile_fields'],
| "displaygroup" => $mybb->get_input('displaygroup'), "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY),
|
"profile_fields_editable" => true, );
|
"profile_fields_editable" => true, );
|
|
|
// Set the data of the user in the datahandler. $userhandler->set_data($new_user); $errors = '';
|
// Set the data of the user in the datahandler. $userhandler->set_data($new_user); $errors = '';
|
|
|
// 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 368 | Zeile 371 |
---|
// Fetch custom profile fields - only need required profile fields here $query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));
|
// Fetch custom profile fields - only need required profile fields here $query = $db->simple_select("profilefields", "*", "required=1", array('order_by' => 'disporder'));
|
$profile_fields = array();
| $profile_fields = array( 'required' => array(), 'optional' => array(), );
|
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);
$form = new Form("index.php?module=user-users&action=add", "post");
|
$page->add_breadcrumb_item($lang->create_user); $page->output_header($lang->create_user);
$form = new Form("index.php?module=user-users&action=add", "post");
|
|
|
$page->output_nav_tabs($sub_tabs, 'create_user');
// If we have any error messages, show them
| $page->output_nav_tabs($sub_tabs, 'create_user');
// If we have any error messages, show them
|
Zeile 391 | Zeile 397 |
---|
{ $mybb->input = array_merge($mybb->input, array('usergroup' => 2)); }
|
{ $mybb->input = array_merge($mybb->input, array('usergroup' => 2)); }
|
| $mybb->input['profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
$form_container = new FormContainer($lang->required_profile_info); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_input('username')), array('id' => 'username')), 'username');
|
$form_container = new FormContainer($lang->required_profile_info); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', htmlspecialchars_uni($mybb->get_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');
| $form_container->output_row($lang->password." <em>*</em>", "", $form->generate_password_box('password', $mybb->get_input('password'), array('id' => 'password', 'autocomplete' => 'off')), 'password'); $form_container->output_row($lang->confirm_password." <em>*</em>", "", $form->generate_password_box('confirm_password', $mybb->get_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->get_input('email'), array('id' => 'email')), 'email');
|
$display_group_options[0] = $lang->use_primary_user_group; $options = array();
| $display_group_options[0] = $lang->use_primary_user_group; $options = array();
|
Zeile 407 | Zeile 415 |
---|
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); }
|
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($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');
| $form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->get_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->get_input('additionalgroups', MyBB::INPUT_ARRAY), 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->get_input('displaygroup'), array('id' => 'displaygroup')), 'displaygroup');
|
// Output custom profile fields - required
|
// Output custom profile fields - required
|
output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
| output_custom_profile_fields($profile_fields['required'], $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY), $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 445 | Zeile 453 |
---|
}
// Determine the usergroup stuff
|
}
// Determine the usergroup stuff
|
if(is_array($mybb->input['additionalgroups']))
| if(!empty($mybb->input['additionalgroups']) && is_array($mybb->input['additionalgroups']))
|
{ foreach($mybb->input['additionalgroups'] as $key => $gid) {
| { foreach($mybb->input['additionalgroups'] as $key => $gid) {
|
Zeile 496 | Zeile 504 |
---|
// Set the data for the new user. $updated_user = array(
|
// Set the data for the new user. $updated_user = array(
|
"uid" => $mybb->input['uid'], "username" => $mybb->input['username'], "email" => $mybb->input['email'], "email2" => $mybb->input['email'], "usergroup" => $mybb->input['usergroup'],
| "uid" => $mybb->get_input('uid'), "username" => $mybb->get_input('username'), "email" => $mybb->get_input('email'), "email2" => $mybb->get_input('email'), "usergroup" => $mybb->get_input('usergroup'),
|
"additionalgroups" => $additionalgroups,
|
"additionalgroups" => $additionalgroups,
|
"displaygroup" => $mybb->input['displaygroup'], "postnum" => $mybb->input['postnum'], "threadnum" => $mybb->input['threadnum'], "usertitle" => $mybb->input['usertitle'], "timezone" => $mybb->input['timezone'], "language" => $mybb->input['language'], "profile_fields" => $mybb->input['profile_fields'],
| "displaygroup" => $mybb->get_input('displaygroup'), "postnum" => $mybb->get_input('postnum'), "threadnum" => $mybb->get_input('threadnum'), "usertitle" => $mybb->get_input('usertitle'), "timezone" => $mybb->get_input('timezone'), "language" => $mybb->get_input('language'), "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY),
|
"profile_fields_editable" => true,
|
"profile_fields_editable" => true,
|
"website" => $mybb->input['website'], "icq" => $mybb->input['icq'], "skype" => $mybb->input['skype'], "google" => $mybb->input['google'],
| "website" => $mybb->get_input('website'), "icq" => $mybb->get_input('icq'), "skype" => $mybb->get_input('skype'), "google" => $mybb->get_input('google'),
|
"birthday" => array(
|
"birthday" => array(
|
"day" => $mybb->input['bday1'], "month" => $mybb->input['bday2'], "year" => $mybb->input['bday3']
| "day" => $mybb->get_input('bday1'), "month" => $mybb->get_input('bday2'), "year" => $mybb->get_input('bday3')
|
),
|
),
|
"style" => $mybb->input['style'], "signature" => $mybb->input['signature'],
| "style" => $mybb->get_input('style'), "signature" => $mybb->get_input('signature'),
|
"dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT), "timeformat" => $mybb->get_input('timeformat', MyBB::INPUT_INT),
|
"dateformat" => $mybb->get_input('dateformat', MyBB::INPUT_INT), "timeformat" => $mybb->get_input('timeformat', MyBB::INPUT_INT),
|
"usernotes" => $mybb->input['usernotes'],
| "usernotes" => $mybb->get_input('usernotes'),
|
"away" => array(
|
"away" => array(
|
"away" => $mybb->input['away'],
| "away" => $mybb->get_input('away'),
|
"date" => TIME_NOW, "returndate" => $returndate,
|
"date" => TIME_NOW, "returndate" => $returndate,
|
"awayreason" => $mybb->input['awayreason']
| "awayreason" => $mybb->get_input('awayreason')
|
) );
|
) );
|
if($user['usergroup'] == 5 && $mybb->input['usergroup'] != 5)
| if($user['usergroup'] == 5 && $mybb->get_input('usergroup') != 5)
|
{ if($user['coppauser'] == 1) { $updated_user['coppa_user'] = 0; } }
|
{ if($user['coppauser'] == 1) { $updated_user['coppa_user'] = 0; } }
|
if($mybb->input['new_password'])
| if($mybb->get_input('new_password'))
|
{
|
{
|
$updated_user['password'] = $mybb->input['new_password']; $updated_user['password2'] = $mybb->input['confirm_new_password'];
| $updated_user['password'] = $mybb->get_input('new_password'); $updated_user['password2'] = $mybb->get_input('confirm_new_password');
|
}
$updated_user['options'] = array(
|
}
$updated_user['options'] = array(
|
"allownotices" => $mybb->input['allownotices'], "hideemail" => $mybb->input['hideemail'], "subscriptionmethod" => $mybb->input['subscriptionmethod'], "invisible" => $mybb->input['invisible'], "dstcorrection" => $mybb->input['dstcorrection'], "threadmode" => $mybb->input['threadmode'], "classicpostbit" => $mybb->input['classicpostbit'], "showimages" => $mybb->input['showimages'], "showvideos" => $mybb->input['showvideos'], "showsigs" => $mybb->input['showsigs'], "showavatars" => $mybb->input['showavatars'], "showquickreply" => $mybb->input['showquickreply'], "receivepms" => $mybb->input['receivepms'], "receivefrombuddy" => $mybb->input['receivefrombuddy'], "pmnotice" => $mybb->input['pmnotice'], "daysprune" => $mybb->input['daysprune'], "showcodebuttons" => $mybb->input['showcodebuttons'], "sourceeditor" => $mybb->input['sourceeditor'], "pmnotify" => $mybb->input['pmnotify'], "buddyrequestspm" => $mybb->input['buddyrequestspm'], "buddyrequestsauto" => $mybb->input['buddyrequestsauto'], "showredirect" => $mybb->input['showredirect']
| "allownotices" => $mybb->get_input('allownotices'), "hideemail" => $mybb->get_input('hideemail'), "subscriptionmethod" => $mybb->get_input('subscriptionmethod'), "invisible" => $mybb->get_input('invisible'), "dstcorrection" => $mybb->get_input('dstcorrection'), "threadmode" => $mybb->get_input('threadmode'), "classicpostbit" => $mybb->get_input('classicpostbit'), "showimages" => $mybb->get_input('showimages'), "showvideos" => $mybb->get_input('showvideos'), "showsigs" => $mybb->get_input('showsigs'), "showavatars" => $mybb->get_input('showavatars'), "showquickreply" => $mybb->get_input('showquickreply'), "receivepms" => $mybb->get_input('receivepms'), "receivefrombuddy" => $mybb->get_input('receivefrombuddy'), "pmnotice" => $mybb->get_input('pmnotice'), "daysprune" => $mybb->get_input('daysprune'), "showcodebuttons" => $mybb->get_input('showcodebuttons'), "sourceeditor" => $mybb->get_input('sourceeditor'), "pmnotify" => $mybb->get_input('pmnotify'), "buddyrequestspm" => $mybb->get_input('buddyrequestspm'), "buddyrequestsauto" => $mybb->get_input('buddyrequestsauto'), "showredirect" => $mybb->get_input('showredirect')
|
);
if($mybb->settings['usertppoptions'])
| );
if($mybb->settings['usertppoptions'])
|
Zeile 592 | Zeile 600 |
---|
else { // Are we removing an avatar from this user?
|
else { // Are we removing an avatar from this user?
|
if($mybb->input['remove_avatar'])
| if($mybb->get_input('remove_avatar'))
|
{ $extra_user_updates = array( "avatar" => "",
| { $extra_user_updates = array( "avatar" => "",
|
Zeile 750 | Zeile 758 |
---|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option) {
|
require_once MYBB_ROOT."inc/functions_warnings.php"; foreach($moderator_options as $option) {
|
if(!$mybb->input[$option['action']])
| if(empty($mybb->input[$option['action']]))
|
{ if($user[$option['update_field']] == 1) {
| { if($user[$option['update_field']] == 1) {
|
Zeile 762 | Zeile 770 |
---|
// Skip this option if we haven't selected it continue; }
|
// Skip this option if we haven't selected it continue; }
|
if($mybb->input[$option['action']])
| else
|
{ if((int)$mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1) {
| { if((int)$mybb->input[$option['time']] == 0 && $mybb->input[$option['period']] != "never" && $user[$option['update_field']] != 1) {
|
Zeile 807 | Zeile 814 |
---|
} }
|
} }
|
if($extra_user_updates['moderateposts'] && $extra_user_updates['suspendposting'])
| if(!empty($extra_user_updates['moderateposts']) && !empty($extra_user_updates['suspendposting']))
|
{ $errors[] = $lang->suspendmoderate_error; }
| { $errors[] = $lang->suspendmoderate_error; }
|
Zeile 823 | Zeile 830 |
---|
$plugins->run_hooks("admin_user_users_edit_commit_start");
|
$plugins->run_hooks("admin_user_users_edit_commit_start");
|
$db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'");
| if(!empty($extra_user_updates)) { $db->update_query("users", $extra_user_updates, "uid='{$user['uid']}'"); }
|
// if we're updating the user's signature preferences, do so now if($mybb->input['update_posts'] == 'enable' || $mybb->input['update_posts'] == 'disable')
| // if we're updating the user's signature preferences, do so now if($mybb->input['update_posts'] == 'enable' || $mybb->input['update_posts'] == 'disable')
|
Zeile 843 | Zeile 853 |
---|
// Log admin action log_admin_action($user['uid'], $mybb->input['username']);
|
// Log admin action log_admin_action($user['uid'], $mybb->input['username']);
|
|
|
flash_message($lang->success_user_updated, 'success'); admin_redirect("index.php?module=user-users"); }
| flash_message($lang->success_user_updated, 'success'); admin_redirect("index.php?module=user-users"); }
|
Zeile 862 | Zeile 872 |
---|
'action_time', 'action_period', 'modpost_period', 'moderateposting', 'modpost_time', 'suspost_period', 'suspost_time' );
|
'action_time', 'action_period', 'modpost_period', 'moderateposting', 'modpost_time', 'suspost_period', 'suspost_time' );
|
|
|
foreach($options as $option) { if(!isset($input_user[$option]))
| foreach($options as $option) { if(!isset($input_user[$option]))
|
Zeile 874 | Zeile 884 |
---|
// 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'];
| if($mybb->input['bday1'] || $mybb->input['bday2'] || $mybb->input['bday3']) { $mybb->input['bday'][0] = $mybb->input['bday1'];
|
Zeile 889 | Zeile 899 |
---|
if($user['birthday']) { $mybb->input['bday'] = explode('-', $user['birthday']);
|
if($user['birthday']) { $mybb->input['bday'] = explode('-', $user['birthday']);
|
} }
if($mybb->input['away_day'] || $mybb->input['away_month'] || $mybb->input['away_year']) {
| } }
if($mybb->get_input('away_day') || $mybb->get_input('away_month') || $mybb->get_input('away_year')) {
|
$mybb->input['away_year'] = $mybb->get_input('away_year', MyBB::INPUT_INT); } else
| $mybb->input['away_year'] = $mybb->get_input('away_year', MyBB::INPUT_INT); } else
|
Zeile 911 | Zeile 921 |
---|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
|
$profile_fields = array();
| $profile_fields = array( 'required' => array(), 'optional' => array(), );
|
while($profile_field = $db->fetch_array($query)) { if($profile_field['required'] == 1)
| while($profile_field = $db->fetch_array($query)) { if($profile_field['required'] == 1)
|
Zeile 930 | Zeile 943 |
---|
<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type="text/css" media="all" /> <script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1822"></script>
|
<link rel="stylesheet" href="../jscripts/sceditor/themes/mybb.css" type="text/css" media="all" /> <script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1822"></script>
|
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1824"></script>
| <script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1827"></script>
|
<script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js?ver=1805"></script> EOF; $page->output_header($lang->edit_user);
| <script type="text/javascript" src="../jscripts/sceditor/plugins/undo.js?ver=1805"></script> EOF; $page->output_header($lang->edit_user);
|
Zeile 1043 | Zeile 1056 |
---|
} } $posts_per_day = my_number_format($posts_per_day);
|
} } $posts_per_day = my_number_format($posts_per_day);
|
|
|
$stats = $cache->read("stats"); $posts = $stats['numposts']; if($posts == 0)
| $stats = $cache->read("stats"); $posts = $stats['numposts']; if($posts == 0)
|
Zeile 1135 | Zeile 1148 |
---|
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); }
|
$display_group_options[$usergroup['gid']] = htmlspecialchars_uni($usergroup['title']); }
|
if(!is_array($mybb->input['additionalgroups']))
| if(isset($mybb->input['additionalgroups']) && !is_array($mybb->input['additionalgroups']))
|
{ $mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']); }
|
{ $mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']); }
|
$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'); $form_container->output_row($lang->post_count." <em>*</em>", "", $form->generate_numeric_field('postnum', $mybb->input['postnum'], array('id' => 'postnum', 'min' => 0)), 'postnum'); $form_container->output_row($lang->thread_count." <em>*</em>", "", $form->generate_numeric_field('threadnum', $mybb->input['threadnum'], array('id' => 'threadnum', 'min' => 0)), 'threadnum');
| $form_container->output_row($lang->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->get_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->get_input('additionalgroups', MyBB::INPUT_ARRAY), 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->get_input('displaygroup'), array('id' => 'displaygroup')), 'displaygroup'); $form_container->output_row($lang->post_count." <em>*</em>", "", $form->generate_numeric_field('postnum', $mybb->get_input('postnum'), array('id' => 'postnum', 'min' => 0)), 'postnum'); $form_container->output_row($lang->thread_count." <em>*</em>", "", $form->generate_numeric_field('threadnum', $mybb->get_input('threadnum'), array('id' => 'threadnum', 'min' => 0)), 'threadnum');
|
// Output custom profile fields - required if(!isset($profile_fields['required'])) { $profile_fields['required'] = array(); }
|
// Output custom profile fields - required if(!isset($profile_fields['required'])) { $profile_fields['required'] = array(); }
|
output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
| output_custom_profile_fields($profile_fields['required'], $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY), $form_container, $form);
|
$form_container->end();
$form_container = new FormContainer($lang->optional_profile_info.': '.htmlspecialchars_uni($user['username']));
|
$form_container->end();
$form_container = new FormContainer($lang->optional_profile_info.': '.htmlspecialchars_uni($user['username']));
|
$form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle'); $form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->input['website'], array('id' => 'website')), 'website'); $form_container->output_row($lang->icq_number, "", $form->generate_numeric_field('icq', $mybb->input['icq'], array('id' => 'icq', 'min' => 0)), 'icq'); $form_container->output_row($lang->skype_handle, "", $form->generate_text_box('skype', $mybb->input['skype'], array('id' => 'skype')), 'skype'); $form_container->output_row($lang->google_handle, "", $form->generate_text_box('google', $mybb->input['google'], array('id' => 'google')), 'google');
| $form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->get_input('usertitle'), array('id' => 'usertitle')), 'usertitle'); $form_container->output_row($lang->website, "", $form->generate_text_box('website', $mybb->get_input('website'), array('id' => 'website')), 'website'); $form_container->output_row($lang->icq_number, "", $form->generate_numeric_field('icq', $mybb->get_input('icq'), array('id' => 'icq', 'min' => 0)), 'icq'); $form_container->output_row($lang->skype_handle, "", $form->generate_text_box('skype', $mybb->get_input('skype'), array('id' => 'skype')), 'skype'); $form_container->output_row($lang->google_handle, "", $form->generate_text_box('google', $mybb->get_input('google'), array('id' => 'google')), 'google');
|
// Birthday $birthday_days = array(0 => ''); for($i = 1; $i <= 31; $i++)
|
// Birthday $birthday_days = array(0 => ''); for($i = 1; $i <= 31; $i++)
|
{
| {
|
$birthday_days[$i] = $i; }
| $birthday_days[$i] = $i; }
|
Zeile 1212 | Zeile 1225 |
---|
$return_row = $form->generate_select_box('away_day', $birthday_days, $mybb->input['away_day'], array('id' => 'away_day')); $return_row .= ' '.$form->generate_select_box('away_month', $birthday_months, $mybb->input['away_month'], array('id' => 'away_month')); $return_row .= ' '.$form->generate_numeric_field('away_year', $mybb->input['away_year'], array('id' => 'away_year', 'style' => 'width: 4em;', 'min' => 0));
|
$return_row = $form->generate_select_box('away_day', $birthday_days, $mybb->input['away_day'], array('id' => 'away_day')); $return_row .= ' '.$form->generate_select_box('away_month', $birthday_months, $mybb->input['away_month'], array('id' => 'away_month')); $return_row .= ' '.$form->generate_numeric_field('away_year', $mybb->input['away_year'], array('id' => 'away_year', 'style' => 'width: 4em;', 'min' => 0));
|
|
|
$form_container->output_row($lang->return_date, $lang->return_date_desc, $return_row, 'away_date');
|
$form_container->output_row($lang->return_date, $lang->return_date_desc, $return_row, 'away_date');
|
|
|
$form_container->end(); }
|
$form_container->end(); }
|
|
|
$plugins->run_hooks("admin_user_users_edit_profile");
|
$plugins->run_hooks("admin_user_users_edit_profile");
|
echo "</div>\n";
| echo "</div>\n";
|
// // ACCOUNT SETTINGS //
| // // ACCOUNT SETTINGS //
|
Zeile 1228 | Zeile 1241 |
---|
echo "<div id=\"tab_settings\">\n"; $form_container = new FormContainer($lang->account_settings.': '.htmlspecialchars_uni($user['username'])); $login_options = array(
|
echo "<div id=\"tab_settings\">\n"; $form_container = new FormContainer($lang->account_settings.': '.htmlspecialchars_uni($user['username'])); $login_options = array(
|
$form->generate_check_box("invisible", 1, $lang->hide_from_whos_online, array("checked" => $mybb->input['invisible'])),
| $form->generate_check_box("invisible", 1, $lang->hide_from_whos_online, array("checked" => $mybb->get_input('invisible'))),
|
); $form_container->output_row($lang->login_cookies_privacy, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $login_options)."</div>");
|
); $form_container->output_row($lang->login_cookies_privacy, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $login_options)."</div>");
|
if($mybb->input['pmnotice'] > 1)
| if($mybb->get_input('pmnotice') > 1)
|
{ $mybb->input['pmnotice'] = 1;
|
{ $mybb->input['pmnotice'] = 1;
|
}
| }
|
$messaging_options = array(
|
$messaging_options = array(
|
$form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])), $form->generate_check_box("hideemail", 1, $lang->hide_email_from_others, array("checked" => $mybb->input['hideemail'])), $form->generate_check_box("receivepms", 1, $lang->recieve_pms_from_others, array("checked" => $mybb->input['receivepms'])), $form->generate_check_box("receivefrombuddy", 1, $lang->recieve_pms_from_buddy, array("checked" => $mybb->input['receivefrombuddy'])), $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'])), $form->generate_check_box("buddyrequestspm", 1, $lang->buddy_requests_pm, array("checked" => $mybb->input['buddyrequestspm'])), $form->generate_check_box("buddyrequestsauto", 1, $lang->buddy_requests_auto, array("checked" => $mybb->input['buddyrequestsauto'])), "<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_notification, $lang->instant_email_notification, $lang->instant_pm_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod'))
| $form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->get_input('allownotices'))), $form->generate_check_box("hideemail", 1, $lang->hide_email_from_others, array("checked" => $mybb->get_input('hideemail'))), $form->generate_check_box("receivepms", 1, $lang->recieve_pms_from_others, array("checked" => $mybb->get_input('receivepms'))), $form->generate_check_box("receivefrombuddy", 1, $lang->recieve_pms_from_buddy, array("checked" => $mybb->get_input('receivefrombuddy'))), $form->generate_check_box("pmnotice", 1, $lang->alert_new_pms, array("checked" => $mybb->get_input('pmnotice'))), $form->generate_check_box("pmnotify", 1, $lang->email_notify_new_pms, array("checked" => $mybb->get_input('pmnotify'))), $form->generate_check_box("buddyrequestspm", 1, $lang->buddy_requests_pm, array("checked" => $mybb->get_input('buddyrequestspm'))), $form->generate_check_box("buddyrequestsauto", 1, $lang->buddy_requests_auto, array("checked" => $mybb->get_input('buddyrequestsauto'))), "<label for=\"subscriptionmethod\">{$lang->default_thread_subscription_mode}:</label><br />".$form->generate_select_box("subscriptionmethod", array($lang->do_not_subscribe, $lang->no_notification, $lang->instant_email_notification, $lang->instant_pm_notification), $mybb->get_input('subscriptionmethod'), array('id' => 'subscriptionmethod'))
|
);
// Allow plugins to add messaging options
| );
// Allow plugins to add messaging options
|
Zeile 1259 | Zeile 1272 |
---|
foreach($date_formats as $key => $format) { $date_format_options[$key] = my_date($format, TIME_NOW, "", 0);
|
foreach($date_formats as $key => $format) { $date_format_options[$key] = my_date($format, TIME_NOW, "", 0);
|
}
| }
|
$time_format_options = array($lang->use_default); foreach($time_formats as $key => $format) { $time_format_options[$key] = my_date($format, TIME_NOW, "", 0); }
|
$time_format_options = array($lang->use_default); foreach($time_formats as $key => $format) { $time_format_options[$key] = my_date($format, TIME_NOW, "", 0); }
|
|
|
$date_options = array(
|
$date_options = array(
|
"<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->input['dateformat'], array('id' => 'dateformat')), "<label for=\"dateformat\">{$lang->time_format}:</label><br />".$form->generate_select_box("timeformat", $time_format_options, $mybb->input['timeformat'], array('id' => 'timeformat')), "<label for=\"timezone\">{$lang->time_zone}:</label><br />".build_timezone_select("timezone", $mybb->input['timezone']), "<label for=\"dstcorrection\">{$lang->daylight_savings_time_correction}:</label><br />".$form->generate_select_box("dstcorrection", array(2 => $lang->automatically_detect, 1 => $lang->always_use_dst_correction, 0 => $lang->never_use_dst_correction), $mybb->input['dstcorrection'], array('id' => 'dstcorrection'))
| "<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->get_input('dateformat'), array('id' => 'dateformat')), "<label for=\"dateformat\">{$lang->time_format}:</label><br />".$form->generate_select_box("timeformat", $time_format_options, $mybb->get_input('timeformat'), array('id' => 'timeformat')), "<label for=\"timezone\">{$lang->time_zone}:</label><br />".build_timezone_select("timezone", $mybb->get_input('timezone')), "<label for=\"dstcorrection\">{$lang->daylight_savings_time_correction}:</label><br />".$form->generate_select_box("dstcorrection", array(2 => $lang->automatically_detect, 1 => $lang->always_use_dst_correction, 0 => $lang->never_use_dst_correction), $mybb->get_input('dstcorrection'), array('id' => 'dstcorrection'))
|
);
// Allow plugins to add date options
| );
// Allow plugins to add date options
|
Zeile 1291 | Zeile 1304 |
---|
{ if($tpp <= 0) continue; $tpp_options[$tpp] = $tpp;
|
{ if($tpp <= 0) continue; $tpp_options[$tpp] = $tpp;
|
} }
| } }
|
}
$thread_age_options = array(
| }
$thread_age_options = array(
|
Zeile 1306 | Zeile 1319 |
---|
100 => $lang->show_threads_last_100_days, 365 => $lang->show_threads_last_year, 9999 => $lang->show_all_threads
|
100 => $lang->show_threads_last_100_days, 365 => $lang->show_threads_last_year, 9999 => $lang->show_all_threads
|
);
| );
|
$forum_options = array(
|
$forum_options = array(
|
"<label for=\"tpp\">{$lang->threads_per_page}:</label><br />".$form->generate_select_box("tpp", $tpp_options, $mybb->input['tpp'], array('id' => 'tpp')), "<label for=\"daysprune\">{$lang->default_thread_age_view}:</label><br />".$form->generate_select_box("daysprune", $thread_age_options, $mybb->input['daysprune'], array('id' => 'daysprune'))
| "<label for=\"tpp\">{$lang->threads_per_page}:</label><br />".$form->generate_select_box("tpp", $tpp_options, $mybb->get_input('tpp'), array('id' => 'tpp')), "<label for=\"daysprune\">{$lang->default_thread_age_view}:</label><br />".$form->generate_select_box("daysprune", $thread_age_options, $mybb->get_input('daysprune'), array('id' => 'daysprune'))
|
);
// Allow plugins to add forum options
| );
// Allow plugins to add forum options
|
Zeile 1334 | Zeile 1347 |
---|
}
$thread_options = array(
|
}
$thread_options = array(
|
$form->generate_check_box("classicpostbit", 1, $lang->show_classic_postbit, array("checked" => $mybb->input['classicpostbit'])), $form->generate_check_box("showimages", 1, $lang->display_images, array("checked" => $mybb->input['showimages'])), $form->generate_check_box("showvideos", 1, $lang->display_videos, array("checked" => $mybb->input['showvideos'])), $form->generate_check_box("showsigs", 1, $lang->display_users_sigs, array("checked" => $mybb->input['showsigs'])), $form->generate_check_box("showavatars", 1, $lang->display_users_avatars, array("checked" => $mybb->input['showavatars'])), $form->generate_check_box("showquickreply", 1, $lang->show_quick_reply, array("checked" => $mybb->input['showquickreply'])), "<label for=\"ppp\">{$lang->posts_per_page}:</label><br />".$form->generate_select_box("ppp", $ppp_options, $mybb->input['ppp'], array('id' => 'ppp')),
| $form->generate_check_box("classicpostbit", 1, $lang->show_classic_postbit, array("checked" => $mybb->get_input('classicpostbit'))), $form->generate_check_box("showimages", 1, $lang->display_images, array("checked" => $mybb->get_input('showimages'))), $form->generate_check_box("showvideos", 1, $lang->display_videos, array("checked" => $mybb->get_input('showvideos'))), $form->generate_check_box("showsigs", 1, $lang->display_users_sigs, array("checked" => $mybb->get_input('showsigs'))), $form->generate_check_box("showavatars", 1, $lang->display_users_avatars, array("checked" => $mybb->get_input('showavatars'))), $form->generate_check_box("showquickreply", 1, $lang->show_quick_reply, array("checked" => $mybb->get_input('showquickreply'))), "<label for=\"ppp\">{$lang->posts_per_page}:</label><br />".$form->generate_select_box("ppp", $ppp_options, $mybb->get_input('ppp'), array('id' => 'ppp')),
|
"<label for=\"threadmode\">{$lang->default_thread_view_mode}:</label><br />".$form->generate_select_box("threadmode", array("" => $lang->use_default, "linear" => $lang->linear_mode, "threaded" => $lang->threaded_mode), $mybb->input['threadmode'], array('id' => 'threadmode')) );
// Allow plugins to add thread options $thread_options = $plugins->run_hooks('admin_user_users_edit_thread_options', $thread_options);
|
"<label for=\"threadmode\">{$lang->default_thread_view_mode}:</label><br />".$form->generate_select_box("threadmode", array("" => $lang->use_default, "linear" => $lang->linear_mode, "threaded" => $lang->threaded_mode), $mybb->input['threadmode'], array('id' => 'threadmode')) );
// Allow plugins to add thread options $thread_options = $plugins->run_hooks('admin_user_users_edit_thread_options', $thread_options);
|
|
|
// Output thread options $form_container->output_row($lang->thread_view_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $thread_options)."</div>");
$languages = array_merge(array('' => $lang->use_default), $lang->get_languages());
$other_options = array(
|
// Output thread options $form_container->output_row($lang->thread_view_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $thread_options)."</div>");
$languages = array_merge(array('' => $lang->use_default), $lang->get_languages());
$other_options = array(
|
$form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])), $form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->input['showcodebuttons'])), $form->generate_check_box("sourceeditor", "1", $lang->source_editor, array("checked" => $mybb->input['sourceeditor'])), "<label for=\"style\">{$lang->theme}:</label><br />".build_theme_select("style", $mybb->input['style'], 0, "", true, false, true), "<label for=\"language\">{$lang->board_language}:</label><br />".$form->generate_select_box("language", $languages, $mybb->input['language'], array('id' => 'language'))
| $form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->get_input('showredirect'))), $form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->get_input('showcodebuttons'))), $form->generate_check_box("sourceeditor", "1", $lang->source_editor, array("checked" => $mybb->get_input('sourceeditor'))), "<label for=\"style\">{$lang->theme}:</label><br />".build_theme_select("style", $mybb->get_input('style'), 0, "", true, false, true), "<label for=\"language\">{$lang->board_language}:</label><br />".$form->generate_select_box("language", $languages, $mybb->get_input('language'), array('id' => 'language'))
|
);
// Allow plugins to add other options
| );
// Allow plugins to add other options
|
Zeile 1365 | Zeile 1378 |
---|
// Output other options $form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $other_options)."</div>");
|
// Output other options $form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $other_options)."</div>");
|
|
|
$form_container->end(); $plugins->run_hooks("admin_user_users_edit_settings"); echo "</div>\n";
| $form_container->end(); $plugins->run_hooks("admin_user_users_edit_settings"); echo "</div>\n";
|
Zeile 1373 | Zeile 1386 |
---|
// // SIGNATURE EDITOR //
|
// // SIGNATURE EDITOR //
|
$signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'height: 250px; width: 95%'));
| $signature_editor = $form->generate_text_area("signature", $mybb->get_input('signature'), array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'height: 250px; width: 95%'));
|
$sig_smilies = $lang->off; if($mybb->settings['sigsmilies'] == 1) {
| $sig_smilies = $lang->off; if($mybb->settings['sigsmilies'] == 1) {
|
Zeile 1408 | Zeile 1421 |
---|
);
// Are we already suspending the signature?
|
);
// Are we already suspending the signature?
|
if($mybb->input['suspendsignature'])
| if($mybb->get_input('suspendsignature'))
|
{ $sig_checked = 1;
| { $sig_checked = 1;
|
Zeile 1422 | Zeile 1435 |
---|
{ // There's a limit to the suspension! $remaining = $user['suspendsigtime']-TIME_NOW;
|
{ // There's a limit to the suspension! $remaining = $user['suspendsigtime']-TIME_NOW;
|
$expired = nice_time($remaining, array('seconds' => false));
$color = 'inherit'; if($remaining < 3600) {
| $expired = nice_time($remaining, array('seconds' => false));
$color = 'inherit'; if($remaining < 3600) {
|
$color = 'red';
|
$color = 'red';
|
}
| }
|
elseif($remaining < 86400) { $color = 'maroon'; } elseif($remaining < 604800)
|
elseif($remaining < 86400) { $color = 'maroon'; } elseif($remaining < 604800)
|
{
| {
|
$color = 'green'; }
$lang->suspend_expire_info = $lang->sprintf($lang->suspend_expire_info, $expired, $color); } $user_suspend_info = '
|
$color = 'green'; }
$lang->suspend_expire_info = $lang->sprintf($lang->suspend_expire_info, $expired, $color); } $user_suspend_info = '
|
<tr>
| <tr>
|
<td colspan="2">'.$lang->suspend_expire_info.'<br />'.$lang->suspend_sig_extend.'</td> </tr>'; }
| <td colspan="2">'.$lang->suspend_expire_info.'<br />'.$lang->suspend_sig_extend.'</td> </tr>'; }
|
Zeile 1485 | Zeile 1498 |
---|
<script type="text/javascript"> <!-- if(sig_checked == 0)
|
<script type="text/javascript"> <!-- if(sig_checked == 0)
|
{
| {
|
$("#suspend_action").hide(); } // -->
| $("#suspend_action").hide(); } // -->
|
Zeile 1592 | Zeile 1605 |
---|
// Do we have any existing suspensions here? $existing_info = '';
|
// Do we have any existing suspensions here? $existing_info = '';
|
if($user['moderateposts'] || ($mybb->input['moderateposting'] && !empty($errors)))
| if($user['moderateposts'] || ($mybb->get_input('moderateposting') && !empty($errors)))
|
{ $mybb->input['moderateposting'] = 1; if($user['moderationtime'] != 0) { $remaining = $user['moderationtime']-TIME_NOW; $expired = nice_time($remaining, array('seconds' => false));
|
{ $mybb->input['moderateposting'] = 1; if($user['moderationtime'] != 0) { $remaining = $user['moderationtime']-TIME_NOW; $expired = nice_time($remaining, array('seconds' => false));
|
$color = 'inherit'; if($remaining < 3600) { $color = 'red'; } elseif($remaining < 86400) { $color = 'maroon'; } elseif($remaining < 604800) { $color = 'green'; }
| $color = 'inherit'; if($remaining < 3600) { $color = 'red'; } elseif($remaining < 86400) { $color = 'maroon'; } elseif($remaining < 604800) { $color = 'green'; }
|
$existing_info = $lang->sprintf($lang->moderate_length, $expired, $color);
|
$existing_info = $lang->sprintf($lang->moderate_length, $expired, $color);
|
} else { $existing_info = $lang->moderated_perm; }
| } else { $existing_info = $lang->moderated_perm; }
|
}
|
}
|
$modpost_div = '<div id="modpost">'.$existing_info.''.$lang->moderate_for.' '.$form->generate_numeric_field("modpost_time", $mybb->input['modpost_time'], array('style' => 'width: 3em;', 'min' => 0)).' '.$modpost_options.'</div>';
| $modpost_div = '<div id="modpost">'.$existing_info.''.$lang->moderate_for.' '.$form->generate_numeric_field("modpost_time", $mybb->get_input('modpost_time'), array('style' => 'width: 3em;', 'min' => 0)).' '.$modpost_options.'</div>';
|
$lang->moderate_posts_info = $lang->sprintf($lang->moderate_posts_info, htmlspecialchars_uni($user['username']));
|
$lang->moderate_posts_info = $lang->sprintf($lang->moderate_posts_info, htmlspecialchars_uni($user['username']));
|
$form_container->output_row($form->generate_check_box("moderateposting", 1, $lang->moderate_posts, array("id" => "moderateposting", "onclick" => "toggleBox('modpost');", "checked" => $mybb->input['moderateposting'])), $lang->moderate_posts_info, $modpost_div);
| $form_container->output_row($form->generate_check_box("moderateposting", 1, $lang->moderate_posts, array("id" => "moderateposting", "onclick" => "toggleBox('modpost');", "checked" => $mybb->get_input('moderateposting'))), $lang->moderate_posts_info, $modpost_div);
|
// Suspend posts // Generate check box
|
// Suspend posts // Generate check box
|
$suspost_options = $form->generate_select_box('suspost_period', $periods, $mybb->input['suspost_period'], array('id' => 'suspost_period'));
| $suspost_options = $form->generate_select_box('suspost_period', $periods, $mybb->get_input('suspost_period'), array('id' => 'suspost_period'));
|
// Do we have any existing suspensions here?
|
// Do we have any existing suspensions here?
|
if($user['suspendposting'] || ($mybb->input['suspendposting'] && !empty($errors)))
| if($user['suspendposting'] || ($mybb->get_input('suspendposting') && !empty($errors)))
|
{ $mybb->input['suspendposting'] = 1;
|
{ $mybb->input['suspendposting'] = 1;
|
if($user['suspensiontime'] == 0 || $mybb->input['suspost_period'] == "never")
| if($user['suspensiontime'] == 0 || $mybb->get_input('suspost_period') == "never")
|
{ $existing_info = $lang->suspended_perm; }
| { $existing_info = $lang->suspended_perm; }
|
Zeile 1646 | Zeile 1659 |
---|
$color = 'inherit'; if($remaining < 3600)
|
$color = 'inherit'; if($remaining < 3600)
|
{
| {
|
$color = 'red'; } elseif($remaining < 86400)
| $color = 'red'; } elseif($remaining < 86400)
|
Zeile 1661 | Zeile 1674 |
---|
$existing_info = $lang->sprintf($lang->suspend_length, $suspost_date, $color); } }
|
$existing_info = $lang->sprintf($lang->suspend_length, $suspost_date, $color); } }
|
$suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_numeric_field("suspost_time", $mybb->input['suspost_time'], array('style' => 'width: 3em;', 'min' => 0)).' '.$suspost_options.'</div>';
| $suspost_div = '<div id="suspost">'.$existing_info.''.$lang->suspend_for.' '.$form->generate_numeric_field("suspost_time", $mybb->get_input('suspost_time'), array('style' => 'width: 3em;', 'min' => 0)).' '.$suspost_options.'</div>';
|
$lang->suspend_posts_info = $lang->sprintf($lang->suspend_posts_info, htmlspecialchars_uni($user['username']));
|
$lang->suspend_posts_info = $lang->sprintf($lang->suspend_posts_info, htmlspecialchars_uni($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->output_row($form->generate_check_box("suspendposting", 1, $lang->suspend_posts, array("id" => "suspendposting", "onclick" => "toggleBox('suspost');", "checked" => $mybb->get_input('suspendposting'))), $lang->suspend_posts_info, $suspost_div);
|
$form_container->end(); $plugins->run_hooks("admin_user_users_edit_moderator_options"); echo "</div>\n";
|
$form_container->end(); $plugins->run_hooks("admin_user_users_edit_moderator_options"); echo "</div>\n";
|
|
|
$plugins->run_hooks("admin_user_users_edit_graph");
$buttons[] = $form->generate_submit_button($lang->save_user);
| $plugins->run_hooks("admin_user_users_edit_graph");
$buttons[] = $form->generate_submit_button($lang->save_user);
|
Zeile 1714 | Zeile 1727 |
---|
}
if($("#moderateposting").is(":checked") == false)
|
}
if($("#moderateposting").is(":checked") == false)
|
{
| {
|
$("#modpost").hide();
|
$("#modpost").hide();
|
}
| }
|
else { $("#modpost").show();
|
else { $("#modpost").show();
|
}
| }
|
if($("#suspendposting").is(":checked") == false)
|
if($("#suspendposting").is(":checked") == false)
|
{
| {
|
$("#suspost").hide();
|
$("#suspost").hide();
|
}
| }
|
else { $("#suspost").show();
|
else { $("#suspost").show();
|
}
// --> </script>';
$page->output_footer(); }
| }
// --> </script>';
$page->output_footer(); }
|
if($mybb->input['action'] == "delete") { $user = get_user($mybb->input['uid']);
| if($mybb->input['action'] == "delete") { $user = get_user($mybb->input['uid']);
|
Zeile 1755 | Zeile 1768 |
---|
}
// User clicked no
|
}
// User clicked no
|
if($mybb->input['no'])
| if($mybb->get_input('no'))
|
{ admin_redirect("index.php?module=user-users"); }
$plugins->run_hooks("admin_user_users_delete");
|
{ admin_redirect("index.php?module=user-users"); }
$plugins->run_hooks("admin_user_users_delete");
|
|
|
if($mybb->request_method == "post") { $plugins->run_hooks("admin_user_users_delete_commit");
| if($mybb->request_method == "post") { $plugins->run_hooks("admin_user_users_delete_commit");
|
Zeile 1785 | Zeile 1798 |
---|
flash_message($lang->success_user_deleted, 'success'); admin_redirect("index.php?module=user-users");
|
flash_message($lang->success_user_deleted, 'success'); admin_redirect("index.php?module=user-users");
|
} else {
| } else {
|
$page->output_confirm_action("index.php?module=user-users&action=delete&uid={$user['uid']}", $lang->user_deletion_confirmation); } }
| $page->output_confirm_action("index.php?module=user-users&action=delete&uid={$user['uid']}", $lang->user_deletion_confirmation); } }
|
Zeile 1877 | Zeile 1890 |
---|
{ $user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip'])); $popup = new PopupMenu("user_last", $lang->options);
|
{ $user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip'])); $popup = new PopupMenu("user_last", $lang->options);
|
$popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user-users&action=search&results=1&conditions=".urlencode(my_serialize(array("regip" => $user['lastip'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions=".urlencode(my_serialize(array("postip" => $user['lastip']))));
| $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user-users&action=search&results=1&conditions[regip]=".$user['lastip']); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions[postip]=".$user['lastip']);
|
$popup->add_item($lang->info_on_ip, "index.php?module=user-users&action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('index.php?module=user-users&action=iplookup&ipaddress={$user['lastip']}', null, true); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$user['lastip']}"); $controls = $popup->fetch();
| $popup->add_item($lang->info_on_ip, "index.php?module=user-users&action=iplookup&ipaddress={$user['lastip']}", "MyBB.popupWindow('index.php?module=user-users&action=iplookup&ipaddress={$user['lastip']}', null, true); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$user['lastip']}"); $controls = $popup->fetch();
|
Zeile 1897 | Zeile 1909 |
---|
{ $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip'])); $popup = new PopupMenu("user_reg", $lang->options);
|
{ $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip'])); $popup = new PopupMenu("user_reg", $lang->options);
|
$popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user-users&results=1&action=search&conditions=".urlencode(my_serialize(array("regip" => $user['regip'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions=".urlencode(my_serialize(array("postip" => $user['regip']))));
| $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user-users&results=1&action=search&conditions[regip]=".$user['regip']); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions[postip]=".$user['regip']);
|
$popup->add_item($lang->info_on_ip, "index.php?module=user-users&action=iplookup&ipaddress={$user['regip']}", "MyBB.popupWindow('index.php?module=user-users&action=iplookup&ipaddress={$user['regip']}', null, true); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$user['regip']}"); $controls = $popup->fetch();
| $popup->add_item($lang->info_on_ip, "index.php?module=user-users&action=iplookup&ipaddress={$user['regip']}", "MyBB.popupWindow('index.php?module=user-users&action=iplookup&ipaddress={$user['regip']}', null, true); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$user['regip']}"); $controls = $popup->fetch();
|
Zeile 1915 | Zeile 1927 |
---|
++$counter; $ip['ipaddress'] = my_inet_ntop($db->unescape_binary($ip['ipaddress'])); $popup = new PopupMenu("id_{$counter}", $lang->options);
|
++$counter; $ip['ipaddress'] = my_inet_ntop($db->unescape_binary($ip['ipaddress'])); $popup = new PopupMenu("id_{$counter}", $lang->options);
|
$popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user-users&results=1&action=search&conditions=".urlencode(my_serialize(array("regip" => $ip['ipaddress'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions=".urlencode(my_serialize(array("postip" => $ip['ipaddress']))));
| $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user-users&results=1&action=search&conditions[regip]=".$ip['ipaddress']); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user-users&results=1&action=search&conditions[postip]=".$ip['ipaddress']);
|
$popup->add_item($lang->info_on_ip, "index.php?module=user-users&action=iplookup&ipaddress={$ip['ipaddress']}", "MyBB.popupWindow('index.php?module=user-users&action=iplookup&ipaddress={$ip['ipaddress']}', null, true); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$ip['ipaddress']}"); $controls = $popup->fetch();
| $popup->add_item($lang->info_on_ip, "index.php?module=user-users&action=iplookup&ipaddress={$ip['ipaddress']}", "MyBB.popupWindow('index.php?module=user-users&action=iplookup&ipaddress={$ip['ipaddress']}', null, true); return false;"); $popup->add_item($lang->ban_ip, "index.php?module=config-banning&filter={$ip['ipaddress']}"); $controls = $popup->fetch();
|
Zeile 1940 | Zeile 1952 |
---|
foreach(array('source', 'destination') as $target) { ${$target.'_user'} = get_user_by_username($mybb->input[$target.'_username'], array('fields' => '*'));
|
foreach(array('source', 'destination') as $target) { ${$target.'_user'} = get_user_by_username($mybb->input[$target.'_username'], array('fields' => '*'));
|
if(!${$target.'_user'}['uid'])
| if(empty(${$target.'_user'}['uid']))
|
{ $errors[] = $lang->{'error_invalid_user_'.$target}; }
| { $errors[] = $lang->{'error_invalid_user_'.$target}; }
|
Zeile 1953 | Zeile 1965 |
---|
admin_redirect("index.php?module=user-users"); }
|
admin_redirect("index.php?module=user-users"); }
|
if($source_user['uid'] == $destination_user['uid'] && !empty($source_user['uid']))
| if((!empty($source_user)) && !empty($destination_user) && $source_user['uid'] == $destination_user['uid'] && !empty($source_user['uid']))
|
{ $errors[] = $lang->error_cannot_merge_same_account; }
| { $errors[] = $lang->error_cannot_merge_same_account; }
|
Zeile 1969 | Zeile 1981 |
---|
// Only carry over admin options/permissions if we don't already have them if(!$existing_admin_options)
|
// Only carry over admin options/permissions if we don't already have them if(!$existing_admin_options)
|
{
| {
|
$db->update_query("adminoptions", $uid_update, "uid='{$source_user['uid']}'"); }
| $db->update_query("adminoptions", $uid_update, "uid='{$source_user['uid']}'"); }
|
Zeile 2019 | Zeile 2031 |
---|
);
$to_remove = array();
|
);
$to_remove = array();
|
$query = $db->simple_select("reputation", "*", "adduid = '".$destination_user['uid']."'");
| $query = $db->simple_select("reputation", "*", "adduid = '".$destination_user['uid']."'", $options);
|
while($rep = $db->fetch_array($query)) { if($rep['pid'] == 0 && $mybb->settings['multirep'] == 0 && $last_result['uid'] == $rep['uid'])
| while($rep = $db->fetch_array($query)) { if($rep['pid'] == 0 && $mybb->settings['multirep'] == 0 && $last_result['uid'] == $rep['uid'])
|
Zeile 2192 | Zeile 2204 |
---|
$form = new Form("index.php?module=user-users&action=merge", "post");
$form_container = new FormContainer($lang->merge_users);
|
$form = new Form("index.php?module=user-users&action=merge", "post");
$form_container = new FormContainer($lang->merge_users);
|
$form_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->input['source_username'], array('id' => 'source_username')), 'source_username'); $form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->input['destination_username'], array('id' => 'destination_username')), 'destination_username');
| $form_container->output_row($lang->source_account." <em>*</em>", $lang->source_account_desc, $form->generate_text_box('source_username', $mybb->get_input('source_username'), array('id' => 'source_username')), 'source_username'); $form_container->output_row($lang->destination_account." <em>*</em>", $lang->destination_account_desc, $form->generate_text_box('destination_username', $mybb->get_input('destination_username'), array('id' => 'destination_username')), 'destination_username');
|
$form_container->end();
// Autocompletion for usernames
| $form_container->end();
// Autocompletion for usernames
|
Zeile 2203 | Zeile 2215 |
---|
<script type="text/javascript"> <!-- $("#source_username").select2({
|
<script type="text/javascript"> <!-- $("#source_username").select2({
|
placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 2, multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users", dataType: \'json\', data: function (term, page) { return { query: term // search term }; }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return {results: data}; } }, initSelection: function(element, callback) { var query = $(element).val(); if (query !== "") { $.ajax("../xmlhttp.php?action=get_users&getone=1", { data: { query: query }, dataType: "json" }).done(function(data) { callback(data); });
| placeholder: "'.$lang->search_for_a_user.'", minimumInputLength: 2, multiple: false, ajax: { // instead of writing the function to execute the request we use Select2\'s convenient helper url: "../xmlhttp.php?action=get_users", dataType: \'json\', data: function (term, page) { return { query: term // search term }; }, results: function (data, page) { // parse the results into the format expected by Select2. // since we are using custom formatting functions we do not need to alter remote JSON data return {results: data}; } }, initSelection: function(element, callback) { var query = $(element).val(); if (query !== "") { $.ajax("../xmlhttp.php?action=get_users&getone=1", { data: { query: query }, dataType: "json" }).done(function(data) { callback(data); });
|
} } });
| } } });
|
Zeile 2274 | Zeile 2286 |
---|
{ $plugins->run_hooks("admin_user_users_search");
|
{ $plugins->run_hooks("admin_user_users_search");
|
if($mybb->request_method == "post" || $mybb->input['results'] == 1)
| if($mybb->request_method == "post" || $mybb->get_input('results') == 1)
|
{ // Build view options from incoming search options
|
{ // Build view options from incoming search options
|
if($mybb->input['vid'])
| if($mybb->get_input('vid'))
|
{ $query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', MyBB::INPUT_INT)."'"); $admin_view = $db->fetch_array($query);
| { $query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', MyBB::INPUT_INT)."'"); $admin_view = $db->fetch_array($query);
|
Zeile 2288 | Zeile 2300 |
---|
} }
|
} }
|
if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
| if($mybb->get_input('search_id') && $admin_session['data']['user_views'][$mybb->get_input('search_id')])
|
{
|
{
|
$admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']];
| $admin_view = $admin_session['data']['user_views'][$mybb->get_input('search_id')];
|
unset($admin_view['extra_sql']); }
|
unset($admin_view['extra_sql']); }
|
else { // Don't have a view? Fetch the default if(!$admin_view['vid']) { $default_view = fetch_default_view("user"); if(!$default_view) { $default_view = "0"; } $query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc")); $admin_view = $db->fetch_array($query); } }
// Override specific parts of the view unset($admin_view['vid']);
if($mybb->input['type'])
| // Don't have a view? Fetch the default if(!isset($admin_view) || !$admin_view['vid'])
|
{
|
{
|
$admin_view['view_type'] = $mybb->input['type'];
| $default_view = fetch_default_view("user"); if(!$default_view) { $default_view = "0"; } $query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc")); $admin_view = $db->fetch_array($query);
|
}
|
}
|
if($mybb->input['conditions']) { $admin_view['conditions'] = $mybb->input['conditions']; }
if($mybb->input['sortby'])
| // Override specific parts of the view unset($admin_view['vid']);
if($mybb->get_input('type')) { $admin_view['view_type'] = $mybb->get_input('type'); }
if(!empty($mybb->input['conditions'])) { $admin_view['conditions'] = $mybb->get_input('conditions', MyBB::INPUT_ARRAY); }
if($mybb->get_input('sortby'))
|
{
|
{
|
$admin_view['sortby'] = $mybb->input['sortby'];
| $admin_view['sortby'] = $mybb->get_input('sortby');
|
}
if($mybb->get_input('perpage', MyBB::INPUT_INT)) {
|
}
if($mybb->get_input('perpage', MyBB::INPUT_INT)) {
|
$admin_view['perpage'] = $mybb->input['perpage']; }
if($mybb->input['order']) { $admin_view['sortorder'] = $mybb->input['order']; }
if($mybb->input['displayas']) { $admin_view['view_type'] = $mybb->input['displayas']; }
if($mybb->input['profile_fields']) { $admin_view['custom_profile_fields'] = $mybb->input['profile_fields'];
| $admin_view['perpage'] = $mybb->get_input('perpage'); }
if($mybb->get_input('order')) { $admin_view['sortorder'] = $mybb->get_input('order'); }
if($mybb->get_input('displayas')) { $admin_view['view_type'] = $mybb->get_input('displayas'); }
if(!empty($mybb->input['profile_fields'])) { $admin_view['custom_profile_fields'] = $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY);
|
}
$plugins->run_hooks("admin_user_users_search_commit");
| }
$plugins->run_hooks("admin_user_users_search_commit");
|
Zeile 2360 | Zeile 2370 |
---|
} else {
|
} else {
|
if($mybb->input['from'] == "home")
| if($mybb->get_input('from') == "home")
|
{ flash_message($lang->error_no_users_found, 'error'); admin_redirect("index.php");
| { flash_message($lang->error_no_users_found, 'error'); admin_redirect("index.php");
|
Zeile 2369 | Zeile 2379 |
---|
else { $errors[] = $lang->error_no_users_found;
|
else { $errors[] = $lang->error_no_users_found;
|
} } }
| } } }
|
$page->add_breadcrumb_item($lang->find_users); $page->output_header($lang->find_users);
| $page->add_breadcrumb_item($lang->find_users); $page->output_header($lang->find_users);
|
Zeile 2384 | Zeile 2394 |
---|
$page->output_inline_error($errors); }
|
$page->output_inline_error($errors); }
|
if(!$mybb->input['displayas'])
| if(!$mybb->get_input('displayas'))
|
{ $mybb->input['displayas'] = "card";
|
{ $mybb->input['displayas'] = "card";
|
}
| }
|
$form = new Form("index.php?module=user-users&action=search", "post");
| $form = new Form("index.php?module=user-users&action=search", "post");
|
Zeile 2398 | Zeile 2408 |
---|
"asc" => $lang->ascending, "desc" => $lang->descending );
|
"asc" => $lang->ascending, "desc" => $lang->descending );
|
$form_container->output_row($lang->sort_results_by, "", $form->generate_select_box('sortby', $sort_options, $mybb->input['sortby'], array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $sort_directions, $mybb->input['order'], array('id' => 'order')), 'sortby'); $form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $mybb->input['perpage'], array('id' => 'perpage', 'min' => 1)), 'perpage'); $form_container->output_row($lang->display_results_as, "", $form->generate_radio_button('displayas', 'table', $lang->table, array('checked' => ($mybb->input['displayas'] != "card" ? true : false)))."<br />".$form->generate_radio_button('displayas', 'card', $lang->business_card, array('checked' => ($mybb->input['displayas'] == "card" ? true : false))));
| $form_container->output_row($lang->sort_results_by, "", $form->generate_select_box('sortby', $sort_options, $mybb->get_input('sortby'), array('id' => 'sortby'))." {$lang->in} ".$form->generate_select_box('order', $sort_directions, $mybb->get_input('order'), array('id' => 'order')), 'sortby'); $form_container->output_row($lang->results_per_page, "", $form->generate_numeric_field('perpage', $mybb->get_input('perpage'), array('id' => 'perpage', 'min' => 1)), 'perpage'); $form_container->output_row($lang->display_results_as, "", $form->generate_radio_button('displayas', 'table', $lang->table, array('checked' => ($mybb->get_input('displayas') != "card" ? true : false)))."<br />".$form->generate_radio_button('displayas', 'card', $lang->business_card, array('checked' => ($mybb->get_input('displayas') == "card" ? true : false))));
|
$form_container->end();
$buttons[] = $form->generate_submit_button($lang->find_users);
| $form_container->end();
$buttons[] = $form->generate_submit_button($lang->find_users);
|
Zeile 2414 | Zeile 2424 |
---|
{ $plugins->run_hooks("admin_user_users_inline");
|
{ $plugins->run_hooks("admin_user_users_inline");
|
if($mybb->input['vid'] || $mybb->cookies['acp_view'])
| if(!empty($mybb->input['vid']) || !empty($mybb->cookies['acp_view']))
|
{ // We have a custom view
|
{ // We have a custom view
|
if(!$mybb->cookies['acp_view']) {
| if(empty($mybb->cookies['acp_view'])) {
|
// Set a cookie my_setcookie("acp_view", $mybb->input['vid'], 60); }
|
// Set a cookie my_setcookie("acp_view", $mybb->input['vid'], 60); }
|
elseif($mybb->cookies['acp_view'])
| else
|
{ // We already have a cookie, so let's use it... $mybb->input['vid'] = $mybb->cookies['acp_view']; }
|
{ // We already have a cookie, so let's use it... $mybb->input['vid'] = $mybb->cookies['acp_view']; }
|
$vid_url = "&vid=".$mybb->input['vid'];
| $vid_url = "&vid=".$mybb->get_input('vid'); } else { $vid_url = null;
|
}
// First, collect the user IDs that we're performing the moderation on
|
}
// First, collect the user IDs that we're performing the moderation on
|
$ids = explode("|", $mybb->cookies['inlinemod_useracp']); foreach($ids as $id)
| $selected = array(); if(isset($mybb->cookies['inlinemod_useracp']))
|
{
|
{
|
if($id != '')
| $ids = explode("|", $mybb->cookies['inlinemod_useracp']); foreach($ids as $id)
|
{
|
{
|
$selected[] = (int)$id;
| if($id != '') { $selected[] = (int)$id; }
|
} }
// Verify incoming POST request
|
} }
// Verify incoming POST request
|
if(!verify_post_check($mybb->input['my_post_key']))
| if(!verify_post_check($mybb->get_input('my_post_key')))
|
{ flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=user-user");
| { flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=user-user");
|
Zeile 2454 | Zeile 2472 |
---|
); $page->add_breadcrumb_item($lang->manage_users);
|
); $page->add_breadcrumb_item($lang->manage_users);
|
if(!is_array($selected))
| if(empty($selected))
|
{ // Not selected any users, show error flash_message($lang->error_inline_no_users_selected, 'error');
| { // Not selected any users, show error flash_message($lang->error_inline_no_users_selected, 'error');
|
Zeile 2477 | Zeile 2495 |
---|
} }
|
} }
|
if(is_array($to_update))
| $plugins->run_hooks("admin_user_multiactivate", $to_update);
if(isset($to_update) && is_array($to_update))
|
{ $sql_array = implode(",", $to_update); $db->write_query("UPDATE ".TABLE_PREFIX."users SET usergroup = '2' WHERE uid IN (".$sql_array.")");
|
{ $sql_array = implode(",", $to_update); $db->write_query("UPDATE ".TABLE_PREFIX."users SET usergroup = '2' WHERE uid IN (".$sql_array.")");
|
|
|
$cache->update_awaitingactivation();
// send activation mail
| $cache->update_awaitingactivation();
// send activation mail
|
Zeile 2506 | Zeile 2526 |
---|
$mybb->input['action'] = "inline_activated"; // Force a change to the action so we can add it to the adminlog log_admin_action($to_update_count); // Add to adminlog my_unsetcookie("inlinemod_useracp"); // Unset the cookie, so that the users aren't still selected when we're redirected
|
$mybb->input['action'] = "inline_activated"; // Force a change to the action so we can add it to the adminlog log_admin_action($to_update_count); // Add to adminlog my_unsetcookie("inlinemod_useracp"); // Unset the cookie, so that the users aren't still selected when we're redirected
|
|
|
flash_message($lang->inline_activated, 'success'); admin_redirect("index.php?module=user-users".$vid_url); }
| flash_message($lang->inline_activated, 'success'); admin_redirect("index.php?module=user-users".$vid_url); }
|
Zeile 2514 | Zeile 2534 |
---|
{ // Nothing was updated, show an error flash_message($lang->inline_activated_failed, 'error');
|
{ // Nothing was updated, show an error flash_message($lang->inline_activated_failed, 'error');
|
admin_redirect("index.php?module=user-users".$vid_url);
| admin_redirect("index.php?module=user-users".$vid_url);
|
} break; case 'multilift': // Get the users that are banned, and check that they have been selected
|
} break; case 'multilift': // Get the users that are banned, and check that they have been selected
|
if($mybb->input['no'])
| if($mybb->get_input('no'))
|
{ admin_redirect("index.php?module=user-users".$vid_url); // User clicked on 'No'
|
{ admin_redirect("index.php?module=user-users".$vid_url); // User clicked on 'No'
|
}
| }
|
if($mybb->request_method == "post") {
| if($mybb->request_method == "post") {
|
Zeile 2530 | Zeile 2550 |
---|
$query = $db->simple_select("banned", "*", "uid IN (".$sql_array.")"); $to_be_unbanned = $db->num_rows($query); while($ban = $db->fetch_array($query))
|
$query = $db->simple_select("banned", "*", "uid IN (".$sql_array.")"); $to_be_unbanned = $db->num_rows($query); while($ban = $db->fetch_array($query))
|
{
| {
|
$updated_group = array( "usergroup" => $ban['oldgroup'], "additionalgroups" => $db->escape_string($ban['oldadditionalgroups']),
| $updated_group = array( "usergroup" => $ban['oldgroup'], "additionalgroups" => $db->escape_string($ban['oldadditionalgroups']),
|
Zeile 2545 | Zeile 2565 |
---|
$mybb->input['action'] = "inline_lift"; log_admin_action($to_be_unbanned); my_unsetcookie("inlinemod_useracp");
|
$mybb->input['action'] = "inline_lift"; log_admin_action($to_be_unbanned); my_unsetcookie("inlinemod_useracp");
|
|
|
$lang->success_ban_lifted = $lang->sprintf($lang->success_ban_lifted, my_number_format($to_be_unbanned)); flash_message($lang->success_ban_lifted, 'success'); admin_redirect("index.php?module=user-users".$vid_url);
| $lang->success_ban_lifted = $lang->sprintf($lang->success_ban_lifted, my_number_format($to_be_unbanned)); flash_message($lang->success_ban_lifted, 'success'); admin_redirect("index.php?module=user-users".$vid_url);
|
Zeile 2567 | Zeile 2587 |
---|
while($user = $db->fetch_array($query)) { $bannedcache[] = "u_".$user['uid'];
|
while($user = $db->fetch_array($query)) { $bannedcache[] = "u_".$user['uid'];
|
}
| }
|
// Collect the users $query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, displaygroup", "uid IN (".$sql_array.")");
| // Collect the users $query = $db->simple_select("users", "uid, username, usergroup, additionalgroups, displaygroup", "uid IN (".$sql_array.")");
|
Zeile 2686 | Zeile 2706 |
---|
$page->output_footer(); break; case 'multidelete':
|
$page->output_footer(); break; case 'multidelete':
|
if($mybb->input['no'])
| if($mybb->get_input('no'))
|
{ admin_redirect("index.php?module=user-users".$vid_url); // User clicked on 'No }
| { admin_redirect("index.php?module=user-users".$vid_url); // User clicked on 'No }
|
Zeile 2744 | Zeile 2764 |
---|
// Check the month $months = get_bdays($year); if($day > $months[$month-1])
|
// Check the month $months = get_bdays($year); if($day > $months[$month-1])
|
{ $errors[] = $lang->incorrect_date; }
| { $errors[] = $lang->incorrect_date; }
|
// Check the year if($year != 0 && ($year < (date("Y")-100)) || $year > date("Y")) {
| // Check the year if($year != 0 && ($year < (date("Y")-100)) || $year > date("Y")) {
|
Zeile 2822 | Zeile 2842 |
---|
$prune_array = array_merge_recursive($prune_array, $return_array); } }
|
$prune_array = array_merge_recursive($prune_array, $return_array); } }
|
| $plugins->run_hooks("admin_user_multiprune_threads", $prune_array);
|
// No posts were found for the user, return error if(!is_array($prune_array) || count($prune_array) == 0)
| // No posts were found for the user, return error if(!is_array($prune_array) || count($prune_array) == 0)
|
Zeile 2973 | Zeile 2995 |
---|
"additionalgroups" => $additionalgroups, "displaygroup" => $mybb->get_input('displaygroup', MyBB::INPUT_INT) );
|
"additionalgroups" => $additionalgroups, "displaygroup" => $mybb->get_input('displaygroup', MyBB::INPUT_INT) );
|
| // Create an admin_user_multiusergroup hook array $hook_params = array( "selected" => &$selected, "update_array" => &$update_array );
$hook_params = $plugins->run_hooks("admin_user_multiusergroup", $hook_params);
|
// Do the usergroup update for all those selected // If the a selected user is a super admin, don't update that user
| // Do the usergroup update for all those selected // If the a selected user is a super admin, don't update that user
|
Zeile 3165 | Zeile 3195 |
---|
$view_title = ''; if($view['title'])
|
$view_title = ''; if($view['title'])
|
{ $title_string = "view_title_{$view['vid']}";
if($lang->$title_string)
| { if(isset($view['vid']))
|
{
|
{
|
$view['title'] = $lang->$title_string;
| $title_string = "view_title_{$view['vid']}";
if(isset($lang->$title_string)) { $view['title'] = $lang->$title_string; }
|
}
$view_title .= " (".htmlspecialchars_uni($view['title']).")";
| }
$view_title .= " (".htmlspecialchars_uni($view['title']).")";
|
Zeile 3197 | Zeile 3230 |
---|
{ $view['conditions']['username'] = $mybb->input['username']; $view['url'] .= "&username=".urlencode(htmlspecialchars_uni($mybb->input['username']));
|
{ $view['conditions']['username'] = $mybb->input['username']; $view['url'] .= "&username=".urlencode(htmlspecialchars_uni($mybb->input['username']));
|
} if($view['vid']) {
| } if(!empty($view['vid'])) {
|
$view['url'] .= "&vid={$view['vid']}"; } else { // If this is a custom view we need to save everything ready to pass it on from page to page global $admin_session;
|
$view['url'] .= "&vid={$view['vid']}"; } else { // If this is a custom view we need to save everything ready to pass it on from page to page global $admin_session;
|
if(!$mybb->input['search_id'])
| if(empty($mybb->input['search_id']))
|
{ $search_id = md5(random_str()); $admin_session['data']['user_views'][$search_id] = $view;
| { $search_id = md5(random_str()); $admin_session['data']['user_views'][$search_id] = $view;
|
Zeile 3214 | Zeile 3247 |
---|
$mybb->input['search_id'] = $search_id; } $view['url'] .= "&search_id=".htmlspecialchars_uni($mybb->input['search_id']);
|
$mybb->input['search_id'] = $search_id; } $view['url'] .= "&search_id=".htmlspecialchars_uni($mybb->input['search_id']);
|
}
| }
|
if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != str_replace("&", "&", $view['url'])) { update_admin_session('last_users_url', str_replace("&", "&", $view['url']));
| if(!isset($admin_session['data']['last_users_view']) || $admin_session['data']['last_users_view'] != str_replace("&", "&", $view['url'])) { update_admin_session('last_users_url', str_replace("&", "&", $view['url']));
|
Zeile 3227 | Zeile 3260 |
---|
// Do we not have any views? if(empty($view))
|
// Do we not have any views? if(empty($view))
|
{ return false; }
| { return false; }
|
$table = new Table;
| $table = new Table;
|
Zeile 3265 | Zeile 3298 |
---|
$user_like_fields = array("username", "email", "website", "icq", "skype", "google", "signature", "usertitle"); foreach($user_like_fields as $search_field) {
|
$user_like_fields = array("username", "email", "website", "icq", "skype", "google", "signature", "usertitle"); foreach($user_like_fields as $search_field) {
|
if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])
| if(!empty($view['conditions'][$search_field]) && empty($view['conditions'][$search_field.'_blank']))
|
{ $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'"; }
| { $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'"; }
|
Zeile 3529 | Zeile 3562 |
---|
case "postnum": case "reputation": $view['sortby'] = $db->escape_string($view['sortby']);
|
case "postnum": case "reputation": $view['sortby'] = $db->escape_string($view['sortby']);
|
break;
| break;
|
case "numposts": $view['sortby'] = "postnum"; break;
| case "numposts": $view['sortby'] = "postnum"; break;
|
Zeile 3708 | Zeile 3741 |
---|
$switch_view .= "<a href=\"{$switch_url}&type=table\" style=\"font-weight: normal;\">{$lang->table_view}</a> | <strong>{$lang->card_view}</strong>"; } $switch_view .= "</div>";
|
$switch_view .= "<a href=\"{$switch_url}&type=table\" style=\"font-weight: normal;\">{$lang->table_view}</a> | <strong>{$lang->card_view}</strong>"; } $switch_view .= "</div>";
|
|
|
// Do we need to construct the pagination? if($num_results > $view['perpage']) {
| // Do we need to construct the pagination? if($num_results > $view['perpage']) {
|
Zeile 3716 | Zeile 3749 |
---|
$pagination = draw_admin_pagination($mybb->input['page'], $view['perpage'], $num_results, $view['url']."&type={$view_type}"); $search_class = "float_right"; $search_style = "";
|
$pagination = draw_admin_pagination($mybb->input['page'], $view['perpage'], $num_results, $view['url']."&type={$view_type}"); $search_class = "float_right"; $search_style = "";
|
}
| }
|
else { $search_class = '';
| else { $search_class = '';
|
Zeile 3738 | Zeile 3771 |
---|
{ $default_class = ''; $value = $view['conditions']['username'];
|
{ $default_class = ''; $value = $view['conditions']['username'];
|
}
| }
|
else { $default_class = "search_default";
| else { $default_class = "search_default";
|
Zeile 3746 | Zeile 3779 |
---|
} $built_view .= $search->generate_text_box('username', htmlspecialchars_uni($value), array('id' => 'search_keywords', 'class' => "{$default_class} field150 field_small"))."\n"; $built_view .= "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n";
|
} $built_view .= $search->generate_text_box('username', htmlspecialchars_uni($value), array('id' => 'search_keywords', 'class' => "{$default_class} field150 field_small"))."\n"; $built_view .= "<input type=\"submit\" class=\"search_button\" value=\"{$lang->search}\" />\n";
|
if($view['popup'])
| if(!empty($view['popup']))
|
{ $built_view .= " <div style=\"display: inline\">{$view['popup']}</div>\n"; }
| { $built_view .= " <div style=\"display: inline\">{$view['popup']}</div>\n"; }
|
Zeile 3769 | Zeile 3802 |
---|
{ searched_focus.removeClass(\"search_default\"); searched_focus.val(\"\");
|
{ searched_focus.removeClass(\"search_default\"); searched_focus.val(\"\");
|
}
| }
|
}).on('blur', function() { var searched_blur = $(this);
| }).on('blur', function() { var searched_blur = $(this);
|
Zeile 3887 | Zeile 3920 |
---|
else { $value = $user[$field];
|
else { $value = $user[$field];
|
}
| }
|
if($field == "postnum") { $value = my_number_format($value);
| if($field == "postnum") { $value = my_number_format($value);
|
Zeile 3916 | Zeile 3949 |
---|
} $card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: {$float};\">\n"; $card .= "<legend><input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" /> {$uname}</legend>\n";
|
} $card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: {$float};\">\n"; $card .= "<legend><input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" /> {$uname}</legend>\n";
|
if($avatar)
| if(!empty($avatar))
|
{ $card .= "<div class=\"user_avatar\">{$avatar}</div>\n"; }
|
{ $card .= "<div class=\"user_avatar\">{$avatar}</div>\n"; }
|
if($user_details)
| if(!empty($user_details))
|
{ $card .= "<div class=\"user_details\">".implode("<br />", $user_details)."</div>\n"; }
|
{ $card .= "<div class=\"user_details\">".implode("<br />", $user_details)."</div>\n"; }
|
if($controls)
| if(!empty($controls))
|
{ $card .= "<div class=\"float_right\" style=\"padding: 4px;\">{$controls}</div>\n"; }
| { $card .= "<div class=\"float_right\" style=\"padding: 4px;\">{$controls}</div>\n"; }
|
Zeile 3950 | Zeile 3983 |
---|
} $view_field = $user_view_fields[$field]; $field_options = array();
|
} $view_field = $user_view_fields[$field]; $field_options = array();
|
if($view_field['align'])
| if(($view_field['align']))
|
{ $field_options['class'] = "align_".$view_field['align']; }
|
{ $field_options['class'] = "align_".$view_field['align']; }
|
if($user['view'][$field])
| if(!empty($user['view'][$field]))
|
{ $value = $user['view'][$field]; }
| { $value = $user['view'][$field]; }
|
Zeile 3994 | Zeile 4027 |
---|
{ $profile_field['name'] = htmlspecialchars_uni($profile_field['name']); $profile_field['description'] = htmlspecialchars_uni($profile_field['description']);
|
{ $profile_field['name'] = htmlspecialchars_uni($profile_field['name']); $profile_field['description'] = htmlspecialchars_uni($profile_field['description']);
|
list($type, $options) = explode("\n", $profile_field['type'], 2);
| $type_data = explode("\n", $profile_field['type'], 2); $type = $type_data[0]; $options = !empty($type_data[1]) ? $type_data[1] : null;
|
$type = trim($type); $field_name = "fid{$profile_field['fid']}";
|
$type = trim($type); $field_name = "fid{$profile_field['fid']}";
|
| if(!isset($values[$field_name])) { $values[$field_name] = ''; } if(!isset($values[$field_name.'_blank'])) { $values[$field_name.'_blank'] = ''; }
|
switch($type) {
| switch($type) {
|
Zeile 4073 | Zeile 4119 |
---|
{ $val = trim($val); $code .= $form->generate_radio_button("profile_fields[{$field_name}]", $val, htmlspecialchars_uni($val), array('id' => "profile_field_{$field_name}", 'checked' => ($val == $values[$field_name] ? true : false)))."<br />";
|
{ $val = trim($val); $code .= $form->generate_radio_button("profile_fields[{$field_name}]", $val, htmlspecialchars_uni($val), array('id' => "profile_field_{$field_name}", 'checked' => ($val == $values[$field_name] ? true : false)))."<br />";
|
}
| }
|
break; case "checkbox": $select_options = array();
| break; case "checkbox": $select_options = array();
|
Zeile 4133 | Zeile 4179 |
---|
* @param array $input * @param DefaultForm $form */
|
* @param array $input * @param DefaultForm $form */
|
function user_search_conditions($input=array(), &$form)
| function user_search_conditions($input, &$form)
|
{ global $mybb, $db, $lang;
if(!$input) { $input = $mybb->input;
|
{ global $mybb, $db, $lang;
if(!$input) { $input = $mybb->input;
|
| }
if(empty($input['conditions'])) { $input['conditions'] = array();
|
}
if(!is_array($input['conditions'])) {
|
}
if(!is_array($input['conditions'])) {
|
$input['conditions'] = my_unserialize($input['conditions']);
| $input['conditions'] = (array)my_unserialize($input['conditions']); }
$array = array('username', 'email', 'usergroup', 'website', 'website_blank', 'icq', 'icq_blank', 'skype', 'skype_blank', 'google', 'google_blank', 'signature', 'signature_blank', 'usertitle', 'usertitle_blank', 'postnum_dir', 'postnum', 'threadnum_dir', 'threadnum', 'regdate', 'regip', 'lastip', 'postip'); foreach($array as $condition) { if(!isset($input['conditions'][$condition])) { $input['conditions'][$condition] = ''; } }
if(empty($input['profile_fields'])) { $input['profile_fields'] = array();
|
}
if(!is_array($input['profile_fields']))
|
}
if(!is_array($input['profile_fields']))
|
{ $input['profile_fields'] = my_unserialize($input['profile_fields']); }
| { $input['profile_fields'] = (array)my_unserialize($input['profile_fields']); }
if(empty($input['fields'])) { $input['fields'] = array(); }
|
if(!is_array($input['fields'])) {
|
if(!is_array($input['fields'])) {
|
$input['fields'] = my_unserialize($input['fields']);
| $input['fields'] = (array)my_unserialize($input['fields']);
|
}
$form_container = new FormContainer($lang->find_users_where);
| }
$form_container = new FormContainer($lang->find_users_where);
|
Zeile 4183 | Zeile 4253 |
---|
); $form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['postnum'], array('id' => 'numposts')), 'numposts'); $form_container->output_row($lang->thread_count_is, "", $form->generate_select_box('conditions[threadnum_dir]', $greater_options, $input['conditions']['threadnum_dir'], array('id' => 'numthreads_dir'))." ".$form->generate_text_box('conditions[threadnum]', $input['conditions']['threadnum'], array('id' => 'numthreads')), 'numthreads');
|
); $form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['postnum'], array('id' => 'numposts')), 'numposts'); $form_container->output_row($lang->thread_count_is, "", $form->generate_select_box('conditions[threadnum_dir]', $greater_options, $input['conditions']['threadnum_dir'], array('id' => 'numthreads_dir'))." ".$form->generate_text_box('conditions[threadnum]', $input['conditions']['threadnum'], array('id' => 'numthreads')), 'numthreads');
|
|
|
$form_container->output_row($lang->reg_in_x_days, '', $form->generate_text_box('conditions[regdate]', $input['conditions']['regdate'], array('id' => 'regdate')).' '.$lang->days, 'regdate'); $form_container->output_row($lang->reg_ip_matches, $lang->wildcard, $form->generate_text_box('conditions[regip]', $input['conditions']['regip'], array('id' => 'regip')), 'regip'); $form_container->output_row($lang->last_known_ip, $lang->wildcard, $form->generate_text_box('conditions[lastip]', $input['conditions']['lastip'], array('id' => 'lastip')), 'lastip'); $form_container->output_row($lang->posted_with_ip, $lang->wildcard, $form->generate_text_box('conditions[postip]', $input['conditions']['postip'], array('id' => 'postip')), 'postip');
$form_container->end();
|
$form_container->output_row($lang->reg_in_x_days, '', $form->generate_text_box('conditions[regdate]', $input['conditions']['regdate'], array('id' => 'regdate')).' '.$lang->days, 'regdate'); $form_container->output_row($lang->reg_ip_matches, $lang->wildcard, $form->generate_text_box('conditions[regip]', $input['conditions']['regip'], array('id' => 'regip')), 'regip'); $form_container->output_row($lang->last_known_ip, $lang->wildcard, $form->generate_text_box('conditions[lastip]', $input['conditions']['lastip'], array('id' => 'lastip')), 'lastip'); $form_container->output_row($lang->posted_with_ip, $lang->wildcard, $form->generate_text_box('conditions[postip]', $input['conditions']['postip'], array('id' => 'postip')), 'postip');
$form_container->end();
|
|
|
// Custom profile fields go here $form_container = new FormContainer($lang->custom_profile_fields_match);
|
// Custom profile fields go here $form_container = new FormContainer($lang->custom_profile_fields_match);
|
|
|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
|
// Fetch custom profile fields $query = $db->simple_select("profilefields", "*", "", array('order_by' => 'disporder'));
|
$profile_fields = array();
| $profile_fields = array( 'required' => array(), 'optional' => array(), );
|
while($profile_field = $db->fetch_array($query)) { if($profile_field['required'] == 1)
| while($profile_field = $db->fetch_array($query)) { if($profile_field['required'] == 1)
|