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 317 | Zeile 317 |
---|
unset($mybb->input['additionalgroups'][$key]); } }
|
unset($mybb->input['additionalgroups'][$key]); } }
|
$additionalgroups = implode(",", $mybb->input['additionalgroups']);
| $additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));
|
} else {
| } else {
|
Zeile 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 454 | Zeile 454 |
---|
unset($mybb->input['additionalgroups'][$key]); } }
|
unset($mybb->input['additionalgroups'][$key]); } }
|
$additionalgroups = implode(",", $mybb->input['additionalgroups']);
| $additionalgroups = implode(",", array_map('intval', $mybb->input['additionalgroups']));
|
} else {
| } else {
|
Zeile 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'], "birthday" => array(
| "skype" => $mybb->input['skype'], "google" => $mybb->input['google'], "birthday" => array(
|
Zeile 646 | Zeile 644 |
---|
}
// 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 692 |
---|
{ 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 842 |
---|
}
// 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 930 | Zeile 928 |
---|
$page->extra_header .= <<<EOF
|
$page->extra_header .= <<<EOF
|
<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/sceditor/editor_plugins/undo.js?ver=1805"></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/sceditor/plugins/undo.js?ver=1805"></script>
|
EOF; $page->output_header($lang->edit_user);
| EOF; $page->output_header($lang->edit_user);
|
Zeile 955 | Zeile 953 |
---|
// 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 976 |
---|
$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']); if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars']))
| $avatar_dimensions = preg_split('/[|x]/', $user['avatardimensions']); if($user['avatardimensions']) { require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = preg_split('/[|x]/', $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, 120, 120); } else { $scaled_dimensions = array( "width" => 120, "height" => 120 ); } if($user['avatar'] && (my_strpos($user['avatar'], '://') === false || $mybb->settings['allowremoteavatars']))
|
{
|
{
|
if($user['avatardimensions'])
| if(!my_validate_url($user['avatar']))
|
{
|
{
|
require_once MYBB_ROOT."inc/functions_image.php"; list($width, $height) = explode("|", $user['avatardimensions']); $scaled_dimensions = scale_image($width, $height, 120, 120); } else { $scaled_dimensions = array( "width" => 120, "height" => 120 ); } if(!my_validate_url($user['avatar'])) { $user['avatar'] = "../{$user['avatar']}\n";
| $avatar = format_avatar($user['avatar'], $user['avatardimensions']); $user['avatar'] = $avatar['image'];
|
} } else { if(my_validate_url($mybb->settings['useravatar']))
|
} } else { 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['avatar'] = str_replace('{theme}', 'images', $mybb->settings['useravatar']); } else { $user['avatar'] = "../".str_replace('{theme}', 'images', $mybb->settings['useravatar']); }
|
$scaled_dimensions = array( "width" => 120, "height" => 120 );
| |
} $avatar_top = ceil((126-$scaled_dimensions['height'])/2);
|
} $avatar_top = ceil((126-$scaled_dimensions['height'])/2);
|
if($user['lastactive'])
| $last_seen = max(array($user['lastactive'], $user['lastvisit'])); if(!empty($last_seen))
|
{
|
{
|
$last_active = my_date('relative', $user['lastactive']);
| $last_active = my_date('relative', $last_seen);
|
} else {
| } else {
|
Zeile 1090 | Zeile 1086 |
---|
if($user['birthday']) { $age = get_age($user['birthday']);
|
if($user['birthday']) { $age = get_age($user['birthday']);
|
}
| }
|
$postnum = my_number_format($user['postnum']);
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1));
| $postnum = my_number_format($user['postnum']);
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1));
|
Zeile 1123 | Zeile 1119 |
---|
// PROFILE // echo "<div id=\"tab_profile\">\n";
|
// PROFILE // echo "<div id=\"tab_profile\">\n";
|
|
|
$form_container = new FormContainer($lang->required_profile_info.": ".htmlspecialchars_uni($user['username'])); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');
| $form_container = new FormContainer($lang->required_profile_info.": ".htmlspecialchars_uni($user['username'])); $form_container->output_row($lang->username." <em>*</em>", "", $form->generate_text_box('username', $mybb->input['username'], array('id' => 'username')), 'username'); $form_container->output_row($lang->new_password, $lang->new_password_desc, $form->generate_password_box('new_password', $mybb->input['new_password'], array('id' => 'new_password', 'autocomplete' => 'off')), 'new_password');
|
Zeile 1142 | Zeile 1138 |
---|
if(!is_array($mybb->input['additionalgroups'])) { $mybb->input['additionalgroups'] = explode(',', $mybb->input['additionalgroups']);
|
if(!is_array($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->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');
|
Zeile 1163 | Zeile 1159 |
---|
$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->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 1224 |
---|
// // 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']));
| echo "<div id=\"tab_settings\">\n"; $form_container = new FormContainer($lang->account_settings.': '.htmlspecialchars_uni($user['username']));
|
Zeile 1254 | Zeile 1246 |
---|
$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); foreach($date_formats as $key => $format)
|
$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); foreach($date_formats as $key => $format)
|
{
| {
|
$date_format_options[$key] = my_date($format, TIME_NOW, "", 0);
|
$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 = array($lang->use_default); foreach($time_formats as $key => $format) {
|
Zeile 1276 | Zeile 1273 |
---|
"<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')) );
|
| // 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>");
| $form_container->output_row($lang->date_and_time_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $date_options)."</div>");
|
Zeile 1310 | Zeile 1312 |
---|
"<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 1336 | Zeile 1343 |
---|
"<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')) );
|
$form_container->output_row($lang->thread_view_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $thread_options)."</div>");
| // 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());
| $languages = array_merge(array('' => $lang->use_default), $lang->get_languages());
|
Zeile 1347 | Zeile 1359 |
---|
"<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();
| $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();
|
Zeile 1400 | Zeile 1417 |
---|
{ // Permanent $lang->suspend_expire_info = $lang->suspend_sig_perm;
|
{ // Permanent $lang->suspend_expire_info = $lang->suspend_sig_perm;
|
} else
| } else
|
{ // There's a limit to the suspension! $remaining = $user['suspendsigtime']-TIME_NOW;
| { // There's a limit to the suspension! $remaining = $user['suspendsigtime']-TIME_NOW;
|
Zeile 1515 | Zeile 1532 |
---|
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 1764 | Zeile 1781 |
---|
$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 1861 |
---|
$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 1937 |
---|
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 we're not a super admin and we're merging a source super admin or a destination super admin then dissallow this action
|
Zeile 1937 | Zeile 1951 |
---|
{ 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 1980 | Zeile 1994 |
---|
// 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" => $destination_user['uid']), "referrer='{$source_user['uid']}' AND uid!='{$destination_user['uid']}'"); // If destination user has no referrer but source does and source user was not referred by destination user // or destination user was referred by the source user if(($destination_user['referrer'] == 0 && $source_user['referrer'] > 0 && $source_user['referrer'] != $destination_user['uid']) || $destination_user['referrer'] == $source_user['uid']) { $db->update_query("users", array("referrer" => $source_user['referrer']), "uid='{$destination_user['uid']}'"); } $query = $db->simple_select("users", "COUNT(uid) as total_referrals", "referrer='{$destination_user['uid']}' AND uid!='{$source_user['uid']}'"); $new_referrals = $db->fetch_field($query, "total_referrals"); $db->update_query("users", array("referrals" => (int)$new_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 2167 |
---|
$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 2495 |
---|
$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 2507 | Zeile 2533 |
---|
{ $updated_group = array( "usergroup" => $ban['oldgroup'],
|
{ $updated_group = array( "usergroup" => $ban['oldgroup'],
|
"additionalgroups" => $ban['oldadditionalgroups'],
| "additionalgroups" => $db->escape_string($ban['oldadditionalgroups']),
|
"displaygroup" => $ban['olddisplaygroup'] ); $db->update_query("users", $updated_group, "uid = '".$ban['uid']."'"); $db->delete_query("banned", "uid = '".$ban['uid']."'"); }
|
"displaygroup" => $ban['olddisplaygroup'] ); $db->update_query("users", $updated_group, "uid = '".$ban['uid']."'"); $db->delete_query("banned", "uid = '".$ban['uid']."'"); }
|
$cache->update_banned();
| |
$cache->update_moderators();
$mybb->input['action'] = "inline_lift";
| $cache->update_moderators();
$mybb->input['action'] = "inline_lift";
|
Zeile 2586 | Zeile 2611 |
---|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => $user['usergroup'],
|
'uid' => $user['uid'], 'gid' => $mybb->get_input('usergroup', MyBB::INPUT_INT), 'oldgroup' => $user['usergroup'],
|
'oldadditionalgroups' => $user['additionalgroups'],
| 'oldadditionalgroups' => $db->escape_string($user['additionalgroups']),
|
'olddisplaygroup' => $user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
| 'olddisplaygroup' => $user['displaygroup'], 'admin' => (int)$mybb->user['uid'], 'dateline' => TIME_NOW,
|
Zeile 2608 | Zeile 2633 |
---|
$db->delete_query("forumsubscriptions", "uid = '{$user['uid']}'"); $db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'");
|
$db->delete_query("forumsubscriptions", "uid = '{$user['uid']}'"); $db->delete_query("threadsubscriptions", "uid = '{$user['uid']}'");
|
$cache->update_banned();
| |
++$banned_count; } $mybb->input['action'] = "inline_banned";
| ++$banned_count; } $mybb->input['action'] = "inline_banned";
|
Zeile 2952 | Zeile 2976 |
---|
// 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 2986 |
---|
}
$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 3053 | Zeile 3078 |
---|
if(isset($mybb->input['vid'])) { $query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', MyBB::INPUT_INT)."'");
|
if(isset($mybb->input['vid'])) { $query = $db->simple_select("adminviews", "*", "vid='".$mybb->get_input('vid', MyBB::INPUT_INT)."'");
|
$admin_view = $db->fetch_array($query);
| $admin_view = $db->fetch_array($query);
|
// View does not exist or this view is private and does not belong to the current user if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid'])) {
| // View does not exist or this view is private and does not belong to the current user if(!$admin_view['vid'] || ($admin_view['visibility'] == 1 && $admin_view['uid'] != $mybb->user['uid'])) {
|
Zeile 3237 | Zeile 3262 |
---|
// 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", "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 3478 | Zeile 3503 |
---|
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 3551 | Zeile 3582 |
---|
$user['view']['additionalgroups'] = "<small>{$groups_list}</small>"; $user['view']['email'] = "<a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"; $user['view']['regdate'] = my_date('relative', $user['regdate']);
|
$user['view']['additionalgroups'] = "<small>{$groups_list}</small>"; $user['view']['email'] = "<a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"; $user['view']['regdate'] = my_date('relative', $user['regdate']);
|
$user['view']['lastactive'] = my_date('relative', $user['lastactive']);
| $last_seen = max(array($user['lastactive'], $user['lastvisit'])); if(!empty($last_seen)) { $user['view']['lastactive'] = my_date('relative', $last_seen); } else { $user['view']['lastactive'] = $lang->never; }
|
// Build popup menu $popup = new PopupMenu("user_{$user['uid']}", $lang->options);
| // Build popup menu $popup = new PopupMenu("user_{$user['uid']}", $lang->options);
|
Zeile 3564 | Zeile 3603 |
---|
// Yes, so do we want to edit the ban or pardon his crime? $popup->add_item($lang->edit_ban, "index.php?module=user-banning&uid={$user['uid']}#username"); $popup->add_item($lang->lift_ban, "index.php?module=user-banning&action=lift&uid={$user['uid']}&my_post_key={$mybb->post_code}");
|
// Yes, so do we want to edit the ban or pardon his crime? $popup->add_item($lang->edit_ban, "index.php?module=user-banning&uid={$user['uid']}#username"); $popup->add_item($lang->lift_ban, "index.php?module=user-banning&action=lift&uid={$user['uid']}&my_post_key={$mybb->post_code}");
|
}
| }
|
else { // Not banned... but soon maybe!
| else { // Not banned... but soon maybe!
|
Zeile 3576 | Zeile 3615 |
---|
if($user['coppauser']) { $popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
if($user['coppauser']) { $popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
}
| }
|
else { $popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
else { $popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
}
| }
|
}
$popup->add_item($lang->delete_user, "index.php?module=user-users&action=delete&uid={$user['uid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->user_deletion_confirmation}')");
| }
$popup->add_item($lang->delete_user, "index.php?module=user-users&action=delete&uid={$user['uid']}&my_post_key={$mybb->post_code}", "return AdminCP.deleteConfirmation(this, '{$lang->user_deletion_confirmation}')");
|
Zeile 3593 | Zeile 3632 |
---|
if($usergroups[$user['usergroup']]['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) { $user['view']['reputation'] = get_reputation($user['reputation']);
|
if($usergroups[$user['usergroup']]['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) { $user['view']['reputation'] = get_reputation($user['reputation']);
|
}
| }
|
else { $reputation = "-";
|
else { $reputation = "-";
|
}
| }
|
if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) { if($mybb->settings['maxwarningpoints'] < 1)
|
if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) { if($mybb->settings['maxwarningpoints'] < 1)
|
{
| {
|
$mybb->settings['maxwarningpoints'] = 10; }
| $mybb->settings['maxwarningpoints'] = 10; }
|
Zeile 3613 | Zeile 3652 |
---|
} $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']));
| // Convert IP's to readable $user['regip'] = my_inet_ntop($db->unescape_binary($user['regip']));
|
Zeile 3725 | Zeile 3752 |
---|
} $built_view .= "<script type=\"text/javascript\"> var form = $(\"#search_form\");
|
} $built_view .= "<script type=\"text/javascript\"> var form = $(\"#search_form\");
|
form.submit(function() {
| form.on('submit', function() {
|
var search = $('#search_keywords'); if(search.val() == '' || search.val() == '".addcslashes($lang->search_for_user, "'")."') {
|
var search = $('#search_keywords'); if(search.val() == '' || search.val() == '".addcslashes($lang->search_for_user, "'")."') {
|
search.focus();
| search.trigger('focus');
|
return false; } });
var search = $(\"#search_keywords\");
|
return false; } });
var search = $(\"#search_keywords\");
|
search.focus(function()
| search.on('focus', function()
|
{ var searched_focus = $(this); if(searched_focus.val() == '".addcslashes($lang->search_for_user, "'")."')
| { var searched_focus = $(this); if(searched_focus.val() == '".addcslashes($lang->search_for_user, "'")."')
|
Zeile 3743 | Zeile 3770 |
---|
searched_focus.removeClass(\"search_default\"); searched_focus.val(\"\"); }
|
searched_focus.removeClass(\"search_default\"); searched_focus.val(\"\"); }
|
});
search.blur(function()
| }).on('blur', function()
|
{ var searched_blur = $(this); if(searched_blur.val() == \"\")
| { var searched_blur = $(this); if(searched_blur.val() == \"\")
|
Zeile 3767 | Zeile 3792 |
---|
// TODO Select2
$built_view .= $search->end();
|
// TODO Select2
$built_view .= $search->end();
|
if(isset($pagination)) { $built_view .= $pagination; } if($view['view_type'] != "card") { $checkbox = '';
| if(isset($pagination)) { $built_view .= $pagination; } if($view['view_type'] != "card") { $checkbox = '';
|
} else { $checkbox = "<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this)\" /> ";
|
} else { $checkbox = "<input type=\"checkbox\" name=\"allbox\" onclick=\"inlineModeration.checkAll(this)\" /> ";
|
}
| }
|
$built_view .= $table->construct_html("{$switch_view}<div>{$checkbox}{$lang->users}{$view_title}</div>", 1, "", $view['table_id']); if(isset($pagination)) { $built_view .= $pagination;
|
$built_view .= $table->construct_html("{$switch_view}<div>{$checkbox}{$lang->users}{$view_title}</div>", 1, "", $view['table_id']); if(isset($pagination)) { $built_view .= $pagination;
|
}
| }
|
$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=1821"></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 3835 | Zeile 3860 |
---|
// Loop through fields user wants to show foreach($view['fields'] as $field)
|
// Loop through fields user wants to show foreach($view['fields'] as $field)
|
{
| {
|
if(!$user_view_fields[$field]) { continue;
|
if(!$user_view_fields[$field]) { continue;
|
}
$view_field = $user_view_fields[$field];
| }
$view_field = $user_view_fields[$field];
|
// Special conditions for avatar if($field == "avatar") { $avatar = $user['view']['avatar'];
|
// Special conditions for avatar if($field == "avatar") { $avatar = $user['view']['avatar'];
|
}
| }
|
else if($field == "controls") { $controls = $user['view']['controls'];
| else if($field == "controls") { $controls = $user['view']['controls'];
|
Zeile 3871 | Zeile 3896 |
---|
$user_details[] = "<strong>{$view_field['title']}:</strong> {$value}"; }
|
$user_details[] = "<strong>{$view_field['title']}:</strong> {$value}"; }
|
|
|
} // Floated to the left or right? if($i == 1) { $float = "left";
|
} // Floated to the left or right? if($i == 1) { $float = "left";
|
}
| }
|
else
|
else
|
{
| {
|
$float = "right";
|
$float = "right";
|
}
| }
|
// And build the final card
|
// And build the final card
|
| $uname = ""; if(in_array('username', $view['fields'])) { $uname = $user['view']['username']; }
|
$card = "<fieldset id=\"uid_{$user['uid']}\" style=\"width: 47%; float: {$float};\">\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');\" /> {$user['view']['username']}</legend>\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) { $card .= "<div class=\"user_avatar\">{$avatar}</div>\n";
| if($avatar) { $card .= "<div class=\"user_avatar\">{$avatar}</div>\n";
|
Zeile 3943 | Zeile 3973 |
---|
$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_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();
|
}
/** * @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 3983 | Zeile 3984 |
---|
*/ function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false) {
|
*/ function output_custom_profile_fields($fields, $values, &$form_container, &$form, $search=false) {
|
global $lang;
| global $lang, $mybb;
|
if(!is_array($fields))
|
if(!is_array($fields))
|
{
| {
|
return; } foreach($fields as $profile_field)
| return; } foreach($fields as $profile_field)
|
Zeile 4000 | Zeile 4001 |
---|
switch($type) { case "multiselect":
|
switch($type) { case "multiselect":
|
| $selected_options = array();
|
if(!is_array($values[$field_name]))
|
if(!is_array($values[$field_name]))
|
{
| {
|
$user_options = explode("\n", $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); }
$select_options = explode("\n", $options);
|
foreach($user_options as $val) { $selected_options[$val] = htmlspecialchars_uni($val); }
$select_options = explode("\n", $options);
|
$options = array(); if($search == true)
| $options = array(); if($search == true)
|
{ $select_options[''] = $lang->na; }
| { $select_options[''] = $lang->na; }
|
Zeile 4074 | Zeile 4076 |
---|
} 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]);
|
$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] = $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 4167 | Zeile 4172 |
---|
$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->signature_contains, "", $form->generate_text_box('conditions[signature]', $input['conditions']['signature'], array('id' => 'signature'))." {$lang->or} ".$form->generate_check_box('conditions[signature_blank]', 1, $lang->is_not_blank, array('id' => 'signature_blank', 'checked' => $input['conditions']['signature_blank'])), 'signature');
| $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->signature_contains, "", $form->generate_text_box('conditions[signature]', $input['conditions']['signature'], array('id' => 'signature'))." {$lang->or} ".$form->generate_check_box('conditions[signature_blank]', 1, $lang->is_not_blank, array('id' => 'signature_blank', 'checked' => $input['conditions']['signature_blank'])), 'signature');
|
Zeile 4185 | Zeile 4188 |
---|
$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->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->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);
|
Zeile 4272 | Zeile 4275 |
---|
else { $source_ratings[] = $rating;
|
else { $source_ratings[] = $rating;
|
}
| }
|
}
// If there are duplicates, mark them for deletion foreach($source_ratings as $rating)
|
}
// If there are duplicates, mark them for deletion foreach($source_ratings as $rating)
|
{
| {
|
if(in_array($rating['tid'], $dest_threads)) { $delete_list[] = $rating['rid'];
| if(in_array($rating['tid'], $dest_threads)) { $delete_list[] = $rating['rid'];
|
Zeile 4287 | Zeile 4290 |
---|
// Attribute all of the source user's ratings to the destination user $db->update_query("threadratings", array("uid" => $destination_uid), "uid='{$source_uid}'");
|
// Attribute all of the source user's ratings to the destination user $db->update_query("threadratings", array("uid" => $destination_uid), "uid='{$source_uid}'");
|
|
|
// Remove ratings previously given to recently acquired threads $query = $db->query(" SELECT tr.rid, tr.rating, t.tid
| // Remove ratings previously given to recently acquired threads $query = $db->query(" SELECT tr.rid, tr.rating, t.tid
|
Zeile 4313 | Zeile 4316 |
---|
{ 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); }
|
} } }
| } } }
|