Zeile 254 | Zeile 254 |
---|
my_mail($user['email'], $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']), $message);
// Log admin action
|
my_mail($user['email'], $lang->sprintf($lang->emailsubject_activateaccount, $mybb->settings['bbname']), $message);
// Log admin action
|
log_admin_action($user['uid'], htmlspecialchars_uni($user['username']));
| log_admin_action($user['uid'], $user['username']);
|
if($mybb->input['from'] == "home") {
| if($mybb->input['from'] == "home") {
|
Zeile 359 | Zeile 359 |
---|
$plugins->run_hooks("admin_user_users_add_commit");
// Log admin action
|
$plugins->run_hooks("admin_user_users_add_commit");
// Log admin action
|
log_admin_action($user_info['uid'], htmlspecialchars_uni($user_info['username']));
| log_admin_action($user_info['uid'], $user_info['username']);
|
flash_message($lang->success_user_created, 'success'); admin_redirect("index.php?module=user-users&action=edit&uid={$user_info['uid']}");
| flash_message($lang->success_user_created, 'success'); admin_redirect("index.php?module=user-users&action=edit&uid={$user_info['uid']}");
|
Zeile 512 | Zeile 512 |
---|
"profile_fields_editable" => true, "website" => $mybb->input['website'], "icq" => $mybb->input['icq'],
|
"profile_fields_editable" => true, "website" => $mybb->input['website'], "icq" => $mybb->input['icq'],
|
"aim" => $mybb->input['aim'],
| |
"yahoo" => $mybb->input['yahoo'], "skype" => $mybb->input['skype'], "google" => $mybb->input['google'],
| "yahoo" => $mybb->input['yahoo'], "skype" => $mybb->input['skype'], "google" => $mybb->input['google'],
|
Zeile 646 | Zeile 645 |
---|
}
// Because Gravatars are square, hijack the width
|
}
// Because Gravatars are square, hijack the width
|
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
| list($maxwidth, $maxheight) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));
|
$s = "?s={$maxwidth}"; $maxheight = (int)$maxwidth;
| $s = "?s={$maxwidth}"; $maxheight = (int)$maxwidth;
|
Zeile 694 | Zeile 693 |
---|
{ if($width && $height && $mybb->settings['maxavatardims'] != "") {
|
{ if($width && $height && $mybb->settings['maxavatardims'] != "") {
|
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
| list($maxwidth, $maxheight) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));
|
if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight)) { $lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
| if(($maxwidth && $width > $maxwidth) || ($maxheight && $height > $maxheight)) { $lang->error_avatartoobig = $lang->sprintf($lang->error_avatartoobig, $maxwidth, $maxheight);
|
Zeile 844 | Zeile 843 |
---|
}
// Log admin action
|
}
// Log admin action
|
log_admin_action($user['uid'], htmlspecialchars_uni($mybb->input['username']));
| 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 932 | Zeile 931 |
---|
<link rel="stylesheet" href="../jscripts/sceditor/editor_themes/mybb.css" type="text/css" media="all" /> <script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1805"></script>
|
<link rel="stylesheet" href="../jscripts/sceditor/editor_themes/mybb.css" type="text/css" media="all" /> <script type="text/javascript" src="../jscripts/sceditor/jquery.sceditor.bbcode.min.js?ver=1805"></script>
|
<script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1808"></script>
| <script type="text/javascript" src="../jscripts/bbcodes_sceditor.js?ver=1819"></script>
|
<script type="text/javascript" src="../jscripts/sceditor/editor_plugins/undo.js?ver=1805"></script> EOF; $page->output_header($lang->edit_user);
| <script type="text/javascript" src="../jscripts/sceditor/editor_plugins/undo.js?ver=1805"></script> EOF; $page->output_header($lang->edit_user);
|
Zeile 955 | Zeile 954 |
---|
// Is this user a COPPA user? We show a warning & activate link if($user['coppauser']) {
|
// Is this user a COPPA user? We show a warning & activate link if($user['coppauser']) {
|
echo $lang->sprintf($lang->warning_coppa_user, $user['uid']);
| echo $lang->sprintf($lang->warning_coppa_user, $user['uid'], $mybb->post_code);
|
}
$tabs = array(
| }
$tabs = array(
|
Zeile 978 | Zeile 977 |
---|
$table->construct_header($lang->general_account_stats, array('colspan' => '2', 'class' => 'align_center'));
// Avatar
|
$table->construct_header($lang->general_account_stats, array('colspan' => '2', 'class' => 'align_center'));
// Avatar
|
$avatar_dimensions = explode("|", $user['avatardimensions']);
| $avatar_dimensions = preg_split('/[|x]/', $user['avatardimensions']);
|
if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars'])) { if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php";
|
if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars'])) { if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php";
|
list($width, $height) = explode("|", $user['avatardimensions']);
| list($width, $height) = preg_split('/[|x]/', $user['avatardimensions']);
|
$scaled_dimensions = scale_image($width, $height, 120, 120); } else
| $scaled_dimensions = scale_image($width, $height, 120, 120); } else
|
Zeile 1163 | Zeile 1162 |
---|
$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->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->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->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->yahoo_messanger_handle, "", $form->generate_text_box('yahoo', $mybb->input['yahoo'], array('id' => 'yahoo')), 'yahoo'); $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');
|
Zeile 1230 | Zeile 1228 |
---|
// // ACCOUNT SETTINGS //
|
// // 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.': '.htmlspecialchars_uni($user['username'])); $login_options = array( $form->generate_check_box("invisible", 1, $lang->hide_from_whos_online, array("checked" => $mybb->input['invisible'])),
|
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_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) { $mybb->input['pmnotice'] = 1;
|
$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) { $mybb->input['pmnotice'] = 1;
|
}
| }
|
$messaging_options = array( $form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])),
| $messaging_options = array( $form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])),
|
Zeile 1254 | Zeile 1250 |
---|
$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'])),
|
$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_email_notification, $lang->instant_email_notification), $mybb->input['subscriptionmethod'], array('id' => 'subscriptionmethod')) );
| "<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')) );
// Allow plugins to add messaging options $messaging_options = $plugins->run_hooks('admin_user_users_edit_messaging_options', $messaging_options);
// Output messaging options
|
$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 1276 | Zeile 1277 |
---|
"<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=\"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')) );
|
$form_container->output_row($lang->date_and_time_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $date_options)."</div>");
| // Allow plugins to add date options $date_options = $plugins->run_hooks('admin_user_users_edit_date_options', $date_options);
// Output date options $form_container->output_row($lang->date_and_time_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $date_options)."</div>");
|
$tpp_options = array($lang->use_default); if($mybb->settings['usertppoptions']) { $explodedtpp = explode(",", $mybb->settings['usertppoptions']); if(is_array($explodedtpp))
|
$tpp_options = array($lang->use_default); if($mybb->settings['usertppoptions']) { $explodedtpp = explode(",", $mybb->settings['usertppoptions']); if(is_array($explodedtpp))
|
{
| {
|
foreach($explodedtpp as $tpp) { if($tpp <= 0) continue;
| foreach($explodedtpp as $tpp) { if($tpp <= 0) continue;
|
Zeile 1310 | Zeile 1316 |
---|
"<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->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')) );
|
| // Allow plugins to add forum options $forum_options = $plugins->run_hooks('admin_user_users_edit_forum_options', $forum_options);
// Output forum options
|
$form_container->output_row($lang->forum_display_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $forum_options)."</div>");
$ppp_options = array($lang->use_default);
| $form_container->output_row($lang->forum_display_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $forum_options)."</div>");
$ppp_options = array($lang->use_default);
|
Zeile 1322 | Zeile 1333 |
---|
{ if($ppp <= 0) continue; $ppp_options[$ppp] = $ppp;
|
{ if($ppp <= 0) continue; $ppp_options[$ppp] = $ppp;
|
} } }
| } } }
|
$thread_options = array( $form->generate_check_box("classicpostbit", 1, $lang->show_classic_postbit, array("checked" => $mybb->input['classicpostbit'])),
| $thread_options = array( $form->generate_check_box("classicpostbit", 1, $lang->show_classic_postbit, array("checked" => $mybb->input['classicpostbit'])),
|
Zeile 1336 | Zeile 1347 |
---|
"<label for=\"ppp\">{$lang->posts_per_page}:</label><br />".$form->generate_select_box("ppp", $ppp_options, $mybb->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')) );
|
"<label for=\"ppp\">{$lang->posts_per_page}:</label><br />".$form->generate_select_box("ppp", $ppp_options, $mybb->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);
// 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());
| $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());
|
Zeile 1347 | Zeile 1363 |
---|
"<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')) );
|
"<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')) );
|
| // Allow plugins to add other options $other_options = $plugins->run_hooks('admin_user_users_edit_other_options', $other_options);
// 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->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";
|
//
| //
|
// SIGNATURE EDITOR // $signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'height: 250px; width: 95%')); $sig_smilies = $lang->off; if($mybb->settings['sigsmilies'] == 1)
|
// SIGNATURE EDITOR // $signature_editor = $form->generate_text_area("signature", $mybb->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->on; } $sig_mycode = $lang->off;
| $sig_smilies = $lang->on; } $sig_mycode = $lang->off;
|
Zeile 1370 | Zeile 1391 |
---|
} $sig_html = $lang->off; if($mybb->settings['sightml'] == 1)
|
} $sig_html = $lang->off; if($mybb->settings['sightml'] == 1)
|
{
| {
|
$sig_html = $lang->on; } $sig_imgcode = $lang->off;
| $sig_html = $lang->on; } $sig_imgcode = $lang->off;
|
Zeile 1405 | Zeile 1426 |
---|
{ // 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) { $color = 'red'; } elseif($remaining < 86400) { $color = 'maroon'; } elseif($remaining < 604800)
| $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 = 'green'; }
|
Zeile 1515 | Zeile 1536 |
---|
if($mybb->settings['maxavatardims'] != "") {
|
if($mybb->settings['maxavatardims'] != "") {
|
list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
| list($max_width, $max_height) = preg_split('/[|x]/', my_strtolower($mybb->settings['maxavatardims']));
|
$max_size = "<br />{$lang->max_dimensions_are} {$max_width}x{$max_height}"; }
| $max_size = "<br />{$lang->max_dimensions_are} {$max_width}x{$max_height}"; }
|
Zeile 1602 | Zeile 1623 |
---|
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>'; $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);
| $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>'; $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);
|
Zeile 1739 | Zeile 1760 |
---|
// User clicked no if($mybb->input['no'])
|
// User clicked no if($mybb->input['no'])
|
{ admin_redirect("index.php?module=user-users"); }
| { 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");
if($mybb->request_method == "post")
|
Zeile 1764 | Zeile 1785 |
---|
$plugins->run_hooks("admin_user_users_delete_commit_end");
|
$plugins->run_hooks("admin_user_users_delete_commit_end");
|
log_admin_action($user['uid'], htmlspecialchars_uni($user['username']));
| log_admin_action($user['uid'], $user['username']);
|
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");
|
Zeile 1844 | Zeile 1865 |
---|
$user = $db->fetch_array($query);
// Log admin action
|
$user = $db->fetch_array($query);
// Log admin action
|
log_admin_action($user['uid'], htmlspecialchars_uni($user['username']));
| log_admin_action($user['uid'], $user['username']);
|
$table = new Table;
| $table = new Table;
|
Zeile 1920 | Zeile 1941 |
---|
if($mybb->request_method == "post") {
|
if($mybb->request_method == "post") {
|
$source_user = get_user_by_username($mybb->input['source_username'], array('fields' => '*')); if(!$source_user['uid'])
| foreach(array('source', 'destination') as $target)
|
{
|
{
|
$errors[] = $lang->error_invalid_user_source; }
$destination_user = get_user_by_username($mybb->input['destination_username'], array('fields' => '*')); if(!$destination_user['uid']) { $errors[] = $lang->error_invalid_user_destination;
| ${$target.'_user'} = get_user_by_username($mybb->input[$target.'_username'], array('fields' => '*')); if(!${$target.'_user'}['uid']) { $errors[] = $lang->{'error_invalid_user_'.$target}; }
|
}
// If we're not a super admin and we're merging a source super admin or a destination super admin then dissallow this action if(!is_super_admin($mybb->user['uid']) && (is_super_admin($source_user['uid']) || is_super_admin($destination_user['uid'])))
|
}
// If we're not a super admin and we're merging a source super admin or a destination super admin then dissallow this action if(!is_super_admin($mybb->user['uid']) && (is_super_admin($source_user['uid']) || is_super_admin($destination_user['uid'])))
|
{
| {
|
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");
|
}
if($source_user['uid'] == $destination_user['uid']) {
| }
if($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 1974 | Zeile 1992 |
---|
$db->update_query("warnings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("warnings", array("revokedby" => $destination_user['uid']), "revokedby='{$source_user['uid']}'"); $db->update_query("warnings", array("issuedby" => $destination_user['uid']), "issuedby='{$source_user['uid']}'");
|
$db->update_query("warnings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("warnings", array("revokedby" => $destination_user['uid']), "revokedby='{$source_user['uid']}'"); $db->update_query("warnings", array("issuedby" => $destination_user['uid']), "issuedby='{$source_user['uid']}'");
|
|
|
// Thread ratings merge_thread_ratings($source_user['uid'], $destination_user['uid']);
|
// Thread ratings merge_thread_ratings($source_user['uid'], $destination_user['uid']);
|
|
|
// Banning $db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");
|
// Banning $db->update_query("banned", array('admin' => $destination_user['uid']), "admin = '{$source_user['uid']}'");
|
| // Carry over referrals $db->update_query("users", array("referrer" => ((int)$source_user['referrer'] + (int)$destination_user['referrer'])), "uid='{$destination_user['uid']}'"); $db->update_query("users", array("referrals" => ((int)$source_user['referrals'] + (int)$destination_user['referrals'])), "uid='{$destination_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 2141 | Zeile 2163 |
---|
$cache->update_awaitingactivation();
// Log admin action
|
$cache->update_awaitingactivation();
// Log admin action
|
log_admin_action($source_user['uid'], htmlspecialchars_uni($source_user['username']), $destination_user['uid'], htmlspecialchars_uni($destination_user['username']));
| log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
|
// Redirect! $username = htmlspecialchars_uni($source_user['username']);
| // Redirect! $username = htmlspecialchars_uni($source_user['username']);
|
Zeile 2469 | Zeile 2491 |
---|
$to_update_count = count($to_update); $lang->inline_activated = $lang->sprintf($lang->inline_activated, my_number_format($to_update_count));
|
$to_update_count = count($to_update); $lang->inline_activated = $lang->sprintf($lang->inline_activated, my_number_format($to_update_count));
|
if($to_update_count != count($selected))
| if(is_array($selected) && $to_update_count != count($selected))
|
{ // The update count is different to how many we selected! $not_updated_count = count($selected) - $to_update_count;
| { // The update count is different to how many we selected! $not_updated_count = count($selected) - $to_update_count;
|
Zeile 2952 | Zeile 2974 |
---|
// 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
|
| $users_to_update = array();
|
foreach($selected as $user) { if(!is_super_admin($user))
| foreach($selected as $user) { if(!is_super_admin($user))
|
Zeile 2961 | Zeile 2984 |
---|
}
$to_update_count = count($users_to_update);
|
}
$to_update_count = count($users_to_update);
|
if($to_update_count > 0 && is_array($users_to_update))
| if($to_update_count > 0)
|
{ // Update the users in the database $sql = implode(",", $users_to_update);
| { // Update the users in the database $sql = implode(",", $users_to_update);
|
Zeile 3134 | Zeile 3157 |
---|
global $mybb, $db, $cache, $lang, $user_view_fields, $page;
if($view['view_type'] != 'card')
|
global $mybb, $db, $cache, $lang, $user_view_fields, $page;
if($view['view_type'] != 'card')
|
{
| {
|
$view['view_type'] = 'table'; }
$view_title = ''; if($view['title'])
|
$view['view_type'] = 'table'; }
$view_title = ''; if($view['title'])
|
{
| {
|
$title_string = "view_title_{$view['vid']}";
if($lang->$title_string)
| $title_string = "view_title_{$view['vid']}";
if($lang->$title_string)
|
Zeile 3155 | Zeile 3178 |
---|
if(!isset($view['url'])) { $view['url'] = "index.php?module=user-users";
|
if(!isset($view['url'])) { $view['url'] = "index.php?module=user-users";
|
}
| }
|
if(!is_array($view['conditions'])) { $view['conditions'] = my_unserialize($view['conditions']);
| if(!is_array($view['conditions'])) { $view['conditions'] = my_unserialize($view['conditions']);
|
Zeile 3165 | Zeile 3188 |
---|
$view['fields'] = my_unserialize($view['fields']); } if(!is_array($view['custom_profile_fields']))
|
$view['fields'] = my_unserialize($view['fields']); } if(!is_array($view['custom_profile_fields']))
|
{
| {
|
$view['custom_profile_fields'] = my_unserialize($view['custom_profile_fields']); } if(isset($mybb->input['username']))
| $view['custom_profile_fields'] = my_unserialize($view['custom_profile_fields']); } if(isset($mybb->input['username']))
|
Zeile 3176 | Zeile 3199 |
---|
if($view['vid']) { $view['url'] .= "&vid={$view['vid']}";
|
if($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
| else { // If this is a custom view we need to save everything ready to pass it on from page to page
|
Zeile 3237 | Zeile 3260 |
---|
// Build the search SQL for users
// List of valid LIKE search fields
|
// Build the search SQL for users
// List of valid LIKE search fields
|
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "skype", "google", "signature", "usertitle");
| $user_like_fields = array("username", "email", "website", "icq", "yahoo", "skype", "google", "signature", "usertitle");
|
foreach($user_like_fields as $search_field) { if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])
| foreach($user_like_fields as $search_field) { if(!empty($view['conditions'][$search_field]) && !$view['conditions'][$search_field.'_blank'])
|
Zeile 3263 | Zeile 3286 |
---|
// LESS THAN or GREATER THAN $direction_fields = array("postnum", "threadnum"); foreach($direction_fields as $search_field)
|
// LESS THAN or GREATER THAN $direction_fields = array("postnum", "threadnum"); foreach($direction_fields as $search_field)
|
{
| {
|
$direction_field = $search_field."_dir"; if(isset($view['conditions'][$search_field]) && ($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field]) {
| $direction_field = $search_field."_dir"; if(isset($view['conditions'][$search_field]) && ($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field]) {
|
Zeile 3279 | Zeile 3302 |
---|
$direction = "="; } $search_sql .= " AND u.{$search_field}{$direction}'".$db->escape_string($view['conditions'][$search_field])."'";
|
$direction = "="; } $search_sql .= " AND u.{$search_field}{$direction}'".$db->escape_string($view['conditions'][$search_field])."'";
|
} }
| } }
|
// Registration searching $reg_fields = array("regdate"); foreach($reg_fields as $search_field)
|
// Registration searching $reg_fields = array("regdate"); foreach($reg_fields as $search_field)
|
{
| {
|
if(!empty($view['conditions'][$search_field]) && (int)$view['conditions'][$search_field]) { $threshold = TIME_NOW - ((int)$view['conditions'][$search_field] * 24 * 60 * 60);
| if(!empty($view['conditions'][$search_field]) && (int)$view['conditions'][$search_field]) { $threshold = TIME_NOW - ((int)$view['conditions'][$search_field] * 24 * 60 * 60);
|
Zeile 3306 | Zeile 3329 |
---|
$ip_sql = "{$search_field}=".$db->escape_binary($ip_range); } else
|
$ip_sql = "{$search_field}=".$db->escape_binary($ip_range); } else
|
{
| {
|
$ip_sql = "{$search_field} BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]); } $search_sql .= " AND {$ip_sql}";
|
$ip_sql = "{$search_field} BETWEEN ".$db->escape_binary($ip_range[0])." AND ".$db->escape_binary($ip_range[1]); } $search_sql .= " AND {$ip_sql}";
|
} }
| } }
|
// Post IP searching if(!empty($view['conditions']['postip']))
| // Post IP searching if(!empty($view['conditions']['postip']))
|
Zeile 3348 | Zeile 3371 |
---|
if($value == $column) { $value = $text;
|
if($value == $column) { $value = $text;
|
}
| }
|
if($value == $lang->na) { continue;
| if($value == $lang->na) { continue;
|
Zeile 3371 | Zeile 3394 |
---|
if($input == $lang->na) { continue;
|
if($input == $lang->na) { continue;
|
}
| }
|
if(strpos($column, '_blank') !== false) {
| if(strpos($column, '_blank') !== false) {
|
Zeile 3392 | Zeile 3415 |
---|
while($userfield = $db->fetch_array($query)) { $userfield_uids[] = $userfield['ufid'];
|
while($userfield = $db->fetch_array($query)) { $userfield_uids[] = $userfield['ufid'];
|
}
| }
|
$search_sql .= " AND u.uid IN(".implode(',', $userfield_uids).")"; unset($userfield_uids); }
| $search_sql .= " AND u.uid IN(".implode(',', $userfield_uids).")"; unset($userfield_uids); }
|
Zeile 3409 | Zeile 3432 |
---|
foreach($view['conditions']['usergroup'] as $usergroup) { $usergroup = (int)$usergroup;
|
foreach($view['conditions']['usergroup'] as $usergroup) { $usergroup = (int)$usergroup;
|
|
|
if(!$usergroup) { continue;
|
if(!$usergroup) { continue;
|
}
| }
|
$additional_sql = '';
switch($db->type)
| $additional_sql = '';
switch($db->type)
|
Zeile 3435 | Zeile 3458 |
---|
if(isset($view['conditions']['coppa'])) { $search_sql .= " AND u.coppauser=1 AND u.usergroup=5";
|
if(isset($view['conditions']['coppa'])) { $search_sql .= " AND u.coppauser=1 AND u.usergroup=5";
|
}
| }
|
// Extra SQL? if(isset($view['extra_sql'])) { $search_sql .= $view['extra_sql'];
|
// Extra SQL? if(isset($view['extra_sql'])) { $search_sql .= $view['extra_sql'];
|
}
| }
|
// Lets fetch out how many results we have $query = $db->query("
| // Lets fetch out how many results we have $query = $db->query("
|
Zeile 3462 | Zeile 3485 |
---|
if(!$view['perpage']) { $view['perpage'] = 20;
|
if(!$view['perpage']) { $view['perpage'] = 20;
|
}
| }
|
$view['perpage'] = (int)$view['perpage'];
// Establish which page we're viewing and the starting index for querying if(!isset($mybb->input['page']))
|
$view['perpage'] = (int)$view['perpage'];
// Establish which page we're viewing and the starting index for querying if(!isset($mybb->input['page']))
|
{
| {
|
$mybb->input['page'] = 1; } else
| $mybb->input['page'] = 1; } else
|
Zeile 3478 | Zeile 3501 |
---|
if($mybb->input['page']) { $start = ($mybb->input['page'] - 1) * $view['perpage'];
|
if($mybb->input['page']) { $start = ($mybb->input['page'] - 1) * $view['perpage'];
|
| $pages = ceil($num_results / $view['perpage']); if($mybb->input['page'] > $pages) { $start = 0; $mybb->input['page'] = 1; }
|
} else {
| } else {
|
Zeile 3614 | Zeile 3643 |
---|
$user['view']['warninglevel'] = get_colored_warning_level($warning_level); }
|
$user['view']['warninglevel'] = get_colored_warning_level($warning_level); }
|
if($user['avatar'] && !my_validate_url($user['avatar'])) { $user['avatar'] = "../{$user['avatar']}"; } if($view['view_type'] == "card") { $scaled_avatar = fetch_scaled_avatar($user, 80, 80); } else { $scaled_avatar = fetch_scaled_avatar($user, 34, 34); } if(!$user['avatar'] || (my_strpos($user['avatar'], '://') !== false && !$mybb->settings['allowremoteavatars'])) { if(my_validate_url($mybb->settings['useravatar'])) { $user['avatar'] = str_replace('{theme}', 'images', $mybb->settings['useravatar']); } else { $user['avatar'] = "../".str_replace('{theme}', 'images', $mybb->settings['useravatar']); } } $user['view']['avatar'] = "<img src=\"".htmlspecialchars_uni($user['avatar'])."\" alt=\"\" width=\"{$scaled_avatar['width']}\" height=\"{$scaled_avatar['height']}\" />";
| if($view['view_type'] == "card") { $max_dimensions = '80x80'; } else { $max_dimensions = '34x34'; }
$avatar = format_avatar($user['avatar'], $user['avatardimensions'], $max_dimensions);
$user['view']['avatar'] = "<img src=\"".$avatar['image']."\" alt=\"\" {$avatar['width_height']} />";
|
// Convert IP's to readable $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip'])); $user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));
| // Convert IP's to readable $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip'])); $user['lastip'] = my_inet_ntop($db->unescape_binary($user['lastip']));
|
Zeile 3651 | Zeile 3668 |
---|
{ build_user_view_table($user, $view, $table); }
|
{ build_user_view_table($user, $view, $table); }
|
}
| }
|
// If card view, we need to output the results if($view['view_type'] == "card")
| // If card view, we need to output the results if($view['view_type'] == "card")
|
Zeile 3664 | Zeile 3681 |
---|
if(!isset($view['table_id'])) { $view['table_id'] = "users_list";
|
if(!isset($view['table_id'])) { $view['table_id'] = "users_list";
|
}
| }
|
$switch_view = "<div class=\"float_right\">"; $switch_url = $view['url'];
| $switch_view = "<div class=\"float_right\">"; $switch_url = $view['url'];
|
Zeile 3675 | Zeile 3692 |
---|
if($view['view_type'] != "card") { $switch_view .= "<strong>{$lang->table_view}</strong> | <a href=\"{$switch_url}&type=card\" style=\"font-weight: normal;\">{$lang->card_view}</a>";
|
if($view['view_type'] != "card") { $switch_view .= "<strong>{$lang->table_view}</strong> | <a href=\"{$switch_url}&type=card\" style=\"font-weight: normal;\">{$lang->card_view}</a>";
|
} else {
| } else {
|
$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 3699 | Zeile 3716 |
---|
$search_action = $view['url']; // stop &username= in the query string if($view_upos = strpos($search_action, '&username='))
|
$search_action = $view['url']; // stop &username= in the query string if($view_upos = strpos($search_action, '&username='))
|
{
| {
|
$search_action = substr($search_action, 0, $view_upos); } $search_action = str_replace("&", "&", $search_action);
| $search_action = substr($search_action, 0, $view_upos); } $search_action = str_replace("&", "&", $search_action);
|
Zeile 3767 | Zeile 3784 |
---|
// TODO Select2
$built_view .= $search->end();
|
// TODO Select2
$built_view .= $search->end();
|
if(isset($pagination)) {
| if(isset($pagination)) {
|
$built_view .= $pagination; } if($view['view_type'] != "card")
| $built_view .= $pagination; } if($view['view_type'] != "card")
|
Zeile 3787 | Zeile 3804 |
---|
}
$built_view .= '
|
}
$built_view .= '
|
<script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1800"></script>
| <script type="text/javascript" src="'.$mybb->settings['bburl'].'/jscripts/inline_moderation.js?ver=1818"></script>
|
<form action="index.php?module=user-users" method="post"> <input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /> <input type="hidden" name="action" value="inline_edit" />
| <form action="index.php?module=user-users" method="post"> <input type="hidden" name="my_post_key" value="'.$mybb->post_code.'" /> <input type="hidden" name="action" value="inline_edit" />
|
Zeile 3839 | Zeile 3856 |
---|
if(!$user_view_fields[$field]) { continue;
|
if(!$user_view_fields[$field]) { continue;
|
}
| }
|
$view_field = $user_view_fields[$field];
// Special conditions for avatar if($field == "avatar")
|
$view_field = $user_view_fields[$field];
// Special conditions for avatar if($field == "avatar")
|
{
| {
|
$avatar = $user['view']['avatar']; } else if($field == "controls")
|
$avatar = $user['view']['avatar']; } else if($field == "controls")
|
{
| {
|
$controls = $user['view']['controls']; } // Otherwise, just user data
| $controls = $user['view']['controls']; } // Otherwise, just user data
|
Zeile 3858 | Zeile 3875 |
---|
if(isset($user['view'][$field])) { $value = $user['view'][$field];
|
if(isset($user['view'][$field])) { $value = $user['view'][$field];
|
}
| }
|
else { $value = $user[$field];
|
else { $value = $user[$field];
|
}
| }
|
if($field == "postnum") {
| if($field == "postnum") {
|
Zeile 3875 | Zeile 3892 |
---|
} // Floated to the left or right? if($i == 1)
|
} // Floated to the left or right? if($i == 1)
|
{
| {
|
$float = "left"; } else
|
$float = "left"; } else
|
{
| {
|
$float = "right"; }
| $float = "right"; }
|
Zeile 3887 | Zeile 3904 |
---|
$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');\" /> {$user['view']['username']}</legend>\n"; if($avatar)
|
$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');\" /> {$user['view']['username']}</legend>\n"; if($avatar)
|
{
| {
|
$card .= "<div class=\"user_avatar\">{$avatar}</div>\n"; } if($user_details)
|
$card .= "<div class=\"user_avatar\">{$avatar}</div>\n"; } if($user_details)
|
{
| {
|
$card .= "<div class=\"user_details\">".implode("<br />", $user_details)."</div>\n"; } if($controls)
| $card .= "<div class=\"user_details\">".implode("<br />", $user_details)."</div>\n"; } if($controls)
|
Zeile 3900 | Zeile 3917 |
---|
} $card .= "</fieldset>"; return $card;
|
} $card .= "</fieldset>"; return $card;
|
|
|
}
/**
| }
/**
|
Zeile 3909 | Zeile 3926 |
---|
* @param DefaultTable $table */ function build_user_view_table($user, $view, &$table)
|
* @param DefaultTable $table */ function build_user_view_table($user, $view, &$table)
|
{
| {
|
global $user_view_fields;
foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
|
global $user_view_fields;
foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
|
{
| {
|
continue; } $view_field = $user_view_fields[$field]; $field_options = array(); if($view_field['align'])
|
continue; } $view_field = $user_view_fields[$field]; $field_options = array(); if($view_field['align'])
|
{
| {
|
$field_options['class'] = "align_".$view_field['align'];
|
$field_options['class'] = "align_".$view_field['align'];
|
}
| }
|
if($user['view'][$field]) { $value = $user['view'][$field];
|
if($user['view'][$field]) { $value = $user['view'][$field];
|
}
| }
|
else { $value = $user[$field];
| else { $value = $user[$field];
|
Zeile 3938 | Zeile 3955 |
---|
$value = my_number_format($user[$field]); } $table->construct_cell($value, $field_options);
|
$value = my_number_format($user[$field]); } $table->construct_cell($value, $field_options);
|
}
| }
|
$table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" />");
|
$table->construct_cell("<input type=\"checkbox\" class=\"checkbox\" name=\"inlinemod_{$user['uid']}\" id=\"inlinemod_{$user['uid']}\" value=\"1\" onclick=\"$('#uid_{$user['uid']}').toggleClass('inline_selected');\" />");
|
|
|
$table->construct_row();
|
$table->construct_row();
|
}
/** * @param array $user * @param int $max_width * @param int $max_height * * @return array */ function fetch_scaled_avatar($user, $max_width=80, $max_height=80) { $scaled_dimensions = array( "width" => $max_width, "height" => $max_height, );
global $mybb;
if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars'])) { if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = explode("|", $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, $max_width, $max_height); } }
return array("width" => $scaled_dimensions['width'], "height" => $scaled_dimensions['height']);
| |
}
/**
| }
/**
|
Zeile 3986 | Zeile 3974 |
---|
global $lang;
if(!is_array($fields))
|
global $lang;
if(!is_array($fields))
|
{
| {
|
return; } foreach($fields as $profile_field)
| return; } foreach($fields as $profile_field)
|
Zeile 4000 | Zeile 3988 |
---|
switch($type) { case "multiselect":
|
switch($type) { case "multiselect":
|
| $selected_options = array();
|
if(!is_array($values[$field_name])) { $user_options = explode("\n", $values[$field_name]);
|
if(!is_array($values[$field_name])) { $user_options = explode("\n", $values[$field_name]);
|
}
| }
|
else { $user_options = $values[$field_name];
|
else { $user_options = $values[$field_name];
|
}
$selected_options = array();
| }
|
foreach($user_options as $val) { $selected_options[$val] = htmlspecialchars_uni($val);
|
foreach($user_options as $val) { $selected_options[$val] = htmlspecialchars_uni($val);
|
}
| }
|
$select_options = explode("\n", $options); $options = array(); if($search == true) { $select_options[''] = $lang->na;
|
$select_options = explode("\n", $options); $options = array(); if($search == true) { $select_options[''] = $lang->na;
|
}
| }
|
foreach($select_options as $val) { $val = htmlspecialchars_uni(trim($val)); $options[$val] = $val;
|
foreach($select_options as $val) { $val = htmlspecialchars_uni(trim($val)); $options[$val] = $val;
|
}
| }
|
if(!$profile_field['length']) { $profile_field['length'] = 3; } $code = $form->generate_select_box("profile_fields[{$field_name}][]", $options, $selected_options, array('id' => "profile_field_{$field_name}", 'multiple' => true, 'size' => $profile_field['length']));
|
if(!$profile_field['length']) { $profile_field['length'] = 3; } $code = $form->generate_select_box("profile_fields[{$field_name}][]", $options, $selected_options, array('id' => "profile_field_{$field_name}", 'multiple' => true, 'size' => $profile_field['length']));
|
break;
| break;
|
case "select": $select_options = array(); if($search == true)
| case "select": $select_options = array(); if($search == true)
|
Zeile 4049 | Zeile 4038 |
---|
if(!$profile_field['length']) { $profile_field['length'] = 1;
|
if(!$profile_field['length']) { $profile_field['length'] = 1;
|
}
| }
|
if($search == true)
|
if($search == true)
|
{
| {
|
$code = $form->generate_select_box("profile_fields[{$field_name}][{$field_name}]", $options, htmlspecialchars_uni($values[$field_name]), array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
|
$code = $form->generate_select_box("profile_fields[{$field_name}][{$field_name}]", $options, htmlspecialchars_uni($values[$field_name]), array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
|
} else {
| } else {
|
$code = $form->generate_select_box("profile_fields[{$field_name}]", $options, htmlspecialchars_uni($values[$field_name]), array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length'])); } break;
| $code = $form->generate_select_box("profile_fields[{$field_name}]", $options, htmlspecialchars_uni($values[$field_name]), array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length'])); } break;
|
Zeile 4074 | Zeile 4063 |
---|
} break; case "checkbox":
|
} break; case "checkbox":
|
| $select_options = array();
|
if(!is_array($values[$field_name]))
|
if(!is_array($values[$field_name]))
|
{
| {
|
$user_options = explode("\n", $values[$field_name]); } else
|
$user_options = explode("\n", $values[$field_name]); } else
|
{
| {
|
$user_options = $values[$field_name]; }
|
$user_options = $values[$field_name]; }
|
| $selected_options = array();
|
foreach($user_options as $val) { $selected_options[$val] = $val; }
|
foreach($user_options as $val) { $selected_options[$val] = $val; }
|
$select_options = array();
|
|
if($search == true) { $select_options[''] = $lang->na;
| if($search == true) { $select_options[''] = $lang->na;
|
Zeile 4094 | Zeile 4086 |
---|
$select_options += explode("\n", $options); $code = ''; foreach($select_options as $val)
|
$select_options += explode("\n", $options); $code = ''; foreach($select_options as $val)
|
{
| {
|
$val = trim($val); $code .= $form->generate_check_box("profile_fields[{$field_name}][]", $val, htmlspecialchars_uni($val), array('id' => "profile_field_{$field_name}", 'checked' => ($val == $selected_options[$val] ? true : false)))."<br />"; } break; case "textarea":
|
$val = trim($val); $code .= $form->generate_check_box("profile_fields[{$field_name}][]", $val, htmlspecialchars_uni($val), array('id' => "profile_field_{$field_name}", 'checked' => ($val == $selected_options[$val] ? true : false)))."<br />"; } break; case "textarea":
|
$extra = ''; if(isset($mybb->input['action']) && $mybb->input['action'] == "search") { $extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank'])); }
| $extra = ''; if(isset($mybb->input['action']) && $mybb->input['action'] == "search") { $extra = " {$lang->or} ".$form->generate_check_box("profile_fields[{$field_name}_blank]", 1, $lang->is_not_blank, array('id' => "{$field_name}_blank", 'checked' => $values[$field_name.'_blank'])); }
|
$code = $form->generate_text_area("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'rows' => 6, 'cols' => 50)).$extra; break; default:
| $code = $form->generate_text_area("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'rows' => 6, 'cols' => 50)).$extra; break; default:
|
Zeile 4121 | Zeile 4113 |
---|
$form_container->output_row($profile_field['name'], $profile_field['description'], $code, "", array('id' => "profile_field_{$field_name}")); $code = $user_options = $selected_options = $radio_options = $val = $options = '';
|
$form_container->output_row($profile_field['name'], $profile_field['description'], $code, "", array('id' => "profile_field_{$field_name}")); $code = $user_options = $selected_options = $radio_options = $val = $options = '';
|
} }
/**
| } }
/**
|
* @param array $input * @param DefaultForm $form */
| * @param array $input * @param DefaultForm $form */
|
Zeile 4167 | Zeile 4159 |
---|
$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website'))." {$lang->or} ".$form->generate_check_box('conditions[website_blank]', 1, $lang->is_not_blank, array('id' => 'website_blank', 'checked' => $input['conditions']['website_blank'])), 'website'); $form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq'))." {$lang->or} ".$form->generate_check_box('conditions[icq_blank]', 1, $lang->is_not_blank, array('id' => 'icq_blank', 'checked' => $input['conditions']['icq_blank'])), 'icq');
|
$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website'))." {$lang->or} ".$form->generate_check_box('conditions[website_blank]', 1, $lang->is_not_blank, array('id' => 'website_blank', 'checked' => $input['conditions']['website_blank'])), 'website'); $form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq'))." {$lang->or} ".$form->generate_check_box('conditions[icq_blank]', 1, $lang->is_not_blank, array('id' => 'icq_blank', 'checked' => $input['conditions']['icq_blank'])), 'icq');
|
$form_container->output_row($lang->aim_handle_contains, "", $form->generate_text_box('conditions[aim]', $input['conditions']['aim'], array('id' => 'aim'))." {$lang->or} ".$form->generate_check_box('conditions[aim_blank]', 1, $lang->is_not_blank, array('id' => 'aim_blank', 'checked' => $input['conditions']['aim_blank'])), 'aim');
| |
$form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo'))." {$lang->or} ".$form->generate_check_box('conditions[yahoo_blank]', 1, $lang->is_not_blank, array('id' => 'yahoo_blank', 'checked' => $input['conditions']['yahoo_blank'])), 'yahoo'); $form_container->output_row($lang->skype_contains, "", $form->generate_text_box('conditions[skype]', $input['conditions']['skype'], array('id' => 'skype'))." {$lang->or} ".$form->generate_check_box('conditions[skype_blank]', 1, $lang->is_not_blank, array('id' => 'skype_blank', 'checked' => $input['conditions']['skype_blank'])), 'skype'); $form_container->output_row($lang->google_contains, "", $form->generate_text_box('conditions[google]', $input['conditions']['google'], array('id' => 'google'))." {$lang->or} ".$form->generate_check_box('conditions[google_blank]', 1, $lang->is_not_blank, array('id' => 'google_blank', 'checked' => $input['conditions']['google_blank'])), 'google');
| $form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo'))." {$lang->or} ".$form->generate_check_box('conditions[yahoo_blank]', 1, $lang->is_not_blank, array('id' => 'yahoo_blank', 'checked' => $input['conditions']['yahoo_blank'])), 'yahoo'); $form_container->output_row($lang->skype_contains, "", $form->generate_text_box('conditions[skype]', $input['conditions']['skype'], array('id' => 'skype'))." {$lang->or} ".$form->generate_check_box('conditions[skype_blank]', 1, $lang->is_not_blank, array('id' => 'skype_blank', 'checked' => $input['conditions']['skype_blank'])), 'skype'); $form_container->output_row($lang->google_contains, "", $form->generate_text_box('conditions[google]', $input['conditions']['google'], array('id' => 'google'))." {$lang->or} ".$form->generate_check_box('conditions[google_blank]', 1, $lang->is_not_blank, array('id' => 'google_blank', 'checked' => $input['conditions']['google_blank'])), 'google');
|
Zeile 4313 | Zeile 4304 |
---|
{ foreach($decrement_list as $tid => $ratings) {
|
{ foreach($decrement_list as $tid => $ratings) {
|
$db->update_query('threads', array('numratings' => 'numratings-'.count($ratings), 'totalratings' => 'totalratings-'.array_sum($ratings)), "tid='{$tid}'", 1, true);
| if(is_array($ratings)) { $db->update_query('threads', array('numratings' => 'numratings-'.count($ratings), 'totalratings' => 'totalratings-'.array_sum($ratings)), "tid='{$tid}'", 1, true); }
|
} } }
| } } }
|