Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: users.php 5483 2011-07-06 00:57:17Z huji $
| * $Id: users.php 5646 2011-10-31 10:32:20Z PirataNervo $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 159 | Zeile 159 |
---|
// We've selected a new avatar for this user! if($mybb->input['avatar']) {
|
// We've selected a new avatar for this user! if($mybb->input['avatar']) {
|
| if(!verify_post_check($mybb->input['my_post_key'])) { echo $lang->invalid_post_verify_key2; exit; }
|
$mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']); if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))
| $mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']); if(file_exists("../".$mybb->settings['avatardir']."/".$mybb->input['avatar']))
|
Zeile 181 | Zeile 187 |
---|
// Now a tad of javascript to submit the parent window form echo "<script type=\"text/javascript\">window.parent.submitUserForm();</script>"; exit;
|
// Now a tad of javascript to submit the parent window form echo "<script type=\"text/javascript\">window.parent.submitUserForm();</script>"; exit;
|
}
| }
|
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"; echo "<head profile=\"http://gmpg.org/xfn/1\">\n";
| echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n"; echo "<html xmlns=\"http://www.w3.org/1999/xhtml\">\n"; echo "<head profile=\"http://gmpg.org/xfn/1\">\n";
|
Zeile 204 | Zeile 210 |
---|
if(!is_dir($mybb->settings['avatardir']) && is_dir(MYBB_ROOT."/images/avatars/")) { $mybb->settings['avatardir'] = "../images/avatars/";
|
if(!is_dir($mybb->settings['avatardir']) && is_dir(MYBB_ROOT."/images/avatars/")) { $mybb->settings['avatardir'] = "../images/avatars/";
|
}
| }
|
// Within a gallery if(!empty($gallery)) {
| // Within a gallery if(!empty($gallery)) {
|
Zeile 223 | Zeile 229 |
---|
$gallery_name = ucwords($gallery_name);
if($gallery_path[$key+1])
|
$gallery_name = ucwords($gallery_name);
if($gallery_path[$key+1])
|
{
| {
|
$breadcrumb .= " » <a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&gallery={$breadcrumb_url}\">{$gallery_name}</a>"; } else { $breadcrumb .= " » {$gallery_name}";
|
$breadcrumb .= " » <a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&gallery={$breadcrumb_url}\">{$gallery_name}</a>"; } else { $breadcrumb .= " » {$gallery_name}";
|
}
| }
|
} } else
| } } else
|
Zeile 238 | Zeile 244 |
---|
} } else
|
} } else
|
{
| {
|
$path = ""; $real_path = $mybb->settings['avatardir']; }
| $path = ""; $real_path = $mybb->settings['avatardir']; }
|
Zeile 252 | Zeile 258 |
---|
foreach($files as $file) { if($file == "." || $file == ".." || $file == ".svn")
|
foreach($files as $file) { if($file == "." || $file == ".." || $file == ".svn")
|
{
| {
|
continue; }
| continue; }
|
Zeile 294 | Zeile 300 |
---|
"width" => $dimensions[0], "height" => $dimensions[1] );
|
"width" => $dimensions[0], "height" => $dimensions[1] );
|
} } }
require_once MYBB_ROOT."inc/functions_image.php";
| } } }
require_once MYBB_ROOT."inc/functions_image.php";
|
// Now we're done, we can simply show our gallery page echo "<div id=\"gallery_breadcrumb\">{$breadcrumb}</div>\n"; echo "<div id=\"gallery\">\n";
| // Now we're done, we can simply show our gallery page echo "<div id=\"gallery_breadcrumb\">{$breadcrumb}</div>\n"; echo "<div id=\"gallery\">\n";
|
Zeile 322 | Zeile 328 |
---|
$top = ceil((80-$scaled_dimensions['height'])/2); $left = ceil((80-$scaled_dimensions['width'])/2); echo "<li><a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&gallery={$gallery['path']}\"><span class=\"image\"><img src=\"{$gallery['thumb']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\"></span><span class=\"title\">{$gallery['friendly_name']}</span></a></li>\n";
|
$top = ceil((80-$scaled_dimensions['height'])/2); $left = ceil((80-$scaled_dimensions['width'])/2); echo "<li><a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&gallery={$gallery['path']}\"><span class=\"image\"><img src=\"{$gallery['thumb']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\"></span><span class=\"title\">{$gallery['friendly_name']}</span></a></li>\n";
|
} }
| } }
|
echo "</ul>\n"; // Build the list of any actual avatars we have echo "<ul id=\"avatars\">\n";
| echo "</ul>\n"; // Build the list of any actual avatars we have echo "<ul id=\"avatars\">\n";
|
Zeile 334 | Zeile 340 |
---|
$scaled_dimensions = scale_image($avatar['width'], $avatar['height'], 80, 80); $top = ceil((80-$scaled_dimensions['height'])/2); $left = ceil((80-$scaled_dimensions['width'])/2);
|
$scaled_dimensions = scale_image($avatar['width'], $avatar['height'], 80, 80); $top = ceil((80-$scaled_dimensions['height'])/2); $left = ceil((80-$scaled_dimensions['width'])/2);
|
echo "<li><a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&avatar={$avatar['path']}\"><span class=\"image\"><img src=\"{$mybb->settings['avatardir']}/{$avatar['path']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\" /></span><span class=\"title\">{$avatar['friendly_name']}</span></a></li>\n";
| echo "<li><a href=\"index.php?module=user-users&action=avatar_gallery&uid={$user['uid']}&avatar={$avatar['path']}&my_post_key={$mybb->post_code}\"><span class=\"image\"><img src=\"{$mybb->settings['avatardir']}/{$avatar['path']}\" alt=\"\" style=\"margin-top: {$top}px;\" height=\"{$scaled_dimensions['height']}\" width=\"{$scaled_dimensions['width']}\" /></span><span class=\"title\">{$avatar['friendly_name']}</span></a></li>\n";
|
}
|
}
|
}
| }
|
echo "</ul>\n"; echo "</div>"; echo "</body>";
| echo "</ul>\n"; echo "</div>"; echo "</body>";
|
Zeile 347 | Zeile 353 |
---|
if($mybb->input['action'] == "activate_user") { $plugins->run_hooks("admin_user_users_coppa_activate");
|
if($mybb->input['action'] == "activate_user") { $plugins->run_hooks("admin_user_users_coppa_activate");
|
| if(!verify_post_check($mybb->input['my_post_key'])) { flash_message($lang->invalid_post_verify_key2, 'error'); admin_redirect("index.php?module=user-users"); }
|
$query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query);
| $query = $db->simple_select("users", "*", "uid='".intval($mybb->input['uid'])."'"); $user = $db->fetch_array($query);
|
Zeile 1054 | Zeile 1066 |
---|
else { $age = '';
|
else { $age = '';
|
}
| }
|
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1)); $table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}"); $table->construct_row(); $table->construct_cell("<strong>{$lang->registration_date}:</strong> {$reg_date}"); $table->construct_cell("<strong>{$lang->local_time}:</strong> {$local_time}");
|
$table->construct_cell("<div style=\"width: 126px; height: 126px;\" class=\"user_avatar\"><img src=\"".htmlspecialchars_uni($user['avatar'])."\" style=\"margin-top: {$avatar_top}px\" width=\"{$scaled_dimensions['width']}\" height=\"{$scaled_dimensions['height']}\" alt=\"\" /></div>", array('rowspan' => 6, 'width' => 1)); $table->construct_cell("<strong>{$lang->email_address}:</strong> <a href=\"mailto:".htmlspecialchars_uni($user['email'])."\">".htmlspecialchars_uni($user['email'])."</a>"); $table->construct_cell("<strong>{$lang->last_active}:</strong> {$last_active}"); $table->construct_row(); $table->construct_cell("<strong>{$lang->registration_date}:</strong> {$reg_date}"); $table->construct_cell("<strong>{$lang->local_time}:</strong> {$local_time}");
|
$table->construct_row();
| $table->construct_row();
|
$table->construct_cell("<strong>{$lang->posts}:</strong> {$user['postnum']}"); $table->construct_cell("<strong>{$lang->age}:</strong> {$age}"); $table->construct_row();
| $table->construct_cell("<strong>{$lang->posts}:</strong> {$user['postnum']}"); $table->construct_cell("<strong>{$lang->age}:</strong> {$age}"); $table->construct_row();
|
Zeile 1083 | Zeile 1095 |
---|
// PROFILE // echo "<div id=\"tab_profile\">\n";
|
// PROFILE // echo "<div id=\"tab_profile\">\n";
|
|
|
$form_container = new FormContainer($lang->required_profile_info.": {$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.": {$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 1110 | Zeile 1122 |
---|
// Output custom profile fields - required output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
|
// Output custom profile fields - required output_custom_profile_fields($profile_fields['required'], $mybb->input['profile_fields'], $form_container, $form);
|
$form_container->end();
| $form_container->end();
|
$form_container = new FormContainer($lang->optional_profile_info.": {$user['username']}"); $form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');
| $form_container = new FormContainer($lang->optional_profile_info.": {$user['username']}"); $form_container->output_row($lang->custom_user_title, $lang->custom_user_title_desc, $form->generate_text_box('usertitle', $mybb->input['usertitle'], array('id' => 'usertitle')), 'usertitle');
|
Zeile 1167 | Zeile 1179 |
---|
foreach($time_formats as $key => $format) { $time_format_options[$key] = my_date($format, TIME_NOW, "", 0);
|
foreach($time_formats as $key => $format) { $time_format_options[$key] = my_date($format, TIME_NOW, "", 0);
|
}
| }
|
$date_options = array( "<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->input['dateformat'], array('id' => 'dateformat')),
| $date_options = array( "<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->input['dateformat'], array('id' => 'dateformat')),
|
Zeile 1180 | Zeile 1192 |
---|
$tpp_options = array($lang->use_default); if($mybb->settings['usertppoptions'])
|
$tpp_options = array($lang->use_default); if($mybb->settings['usertppoptions'])
|
{
| {
|
$explodedtpp = explode(",", $mybb->settings['usertppoptions']); if(is_array($explodedtpp)) {
| $explodedtpp = explode(",", $mybb->settings['usertppoptions']); if(is_array($explodedtpp)) {
|
Zeile 1221 | Zeile 1233 |
---|
{ if($ppp <= 0) continue; $ppp_options[$ppp] = $ppp;
|
{ if($ppp <= 0) continue; $ppp_options[$ppp] = $ppp;
|
} } }
| } } }
|
$thread_options = array( $form->generate_check_box("showsigs", 1, $lang->display_users_sigs, array("checked" => $mybb->input['showsigs'])),
| $thread_options = array( $form->generate_check_box("showsigs", 1, $lang->display_users_sigs, array("checked" => $mybb->input['showsigs'])),
|
Zeile 1246 | Zeile 1258 |
---|
$form_container->end(); echo "</div>\n";
|
$form_container->end(); echo "</div>\n";
|
//
| //
|
// SIGNATURE EDITOR // $signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'width: 95%'));
| // SIGNATURE EDITOR // $signature_editor = $form->generate_text_area("signature", $mybb->input['signature'], array('id' => 'signature', 'rows' => 15, 'cols' => '70', 'style' => 'width: 95%'));
|
Zeile 1261 | Zeile 1273 |
---|
{ $sig_mycode = $lang->on; $signature_editor .= build_mycode_inserter("signature");
|
{ $sig_mycode = $lang->on; $signature_editor .= build_mycode_inserter("signature");
|
}
| }
|
$sig_html = $lang->off; if($mybb->settings['sightml'] == 1) {
| $sig_html = $lang->off; if($mybb->settings['sightml'] == 1) {
|
Zeile 1275 | Zeile 1287 |
---|
echo "<div id=\"tab_signature\">\n"; $form_container = new FormContainer("{$lang->signature}: {$user['username']}"); $form_container->output_row($lang->signature, $lang->sprintf($lang->signature_desc, $sig_mycode, $sig_smilies, $sig_imgcode, $sig_html), $signature_editor, 'signature');
|
echo "<div id=\"tab_signature\">\n"; $form_container = new FormContainer("{$lang->signature}: {$user['username']}"); $form_container->output_row($lang->signature, $lang->sprintf($lang->signature_desc, $sig_mycode, $sig_smilies, $sig_imgcode, $sig_html), $signature_editor, 'signature');
|
$periods = array( "hours" => $lang->expire_hours, "days" => $lang->expire_days, "weeks" => $lang->expire_weeks,
| $periods = array( "hours" => $lang->expire_hours, "days" => $lang->expire_days, "weeks" => $lang->expire_weeks,
|
"months" => $lang->expire_months, "never" => $lang->expire_permanent );
| "months" => $lang->expire_months, "never" => $lang->expire_permanent );
|
Zeile 1390 | Zeile 1402 |
---|
if($errors) { $avatar_url = $mybb->input['avatar_url'];
|
if($errors) { $avatar_url = $mybb->input['avatar_url'];
|
}
| }
|
if($mybb->settings['maxavatardims'] != "") { list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
| if($mybb->settings['maxavatardims'] != "") { list($max_width, $max_height) = explode("x", my_strtolower($mybb->settings['maxavatardims']));
|
Zeile 1502 | Zeile 1514 |
---|
echo "</div>\n";
$buttons[] = $form->generate_submit_button($lang->save_user);
|
echo "</div>\n";
$buttons[] = $form->generate_submit_button($lang->save_user);
|
$form->output_submit_wrapper($buttons);
| $form->output_submit_wrapper($buttons);
|
$form->end();
echo '<script type="text/javascript">
| $form->end();
echo '<script type="text/javascript">
|
Zeile 1671 | Zeile 1683 |
---|
$admin_view['conditions'] = unserialize($admin_view['conditions']); $admin_view['conditions']['referrer'] = $mybb->input['uid'];
|
$admin_view['conditions'] = unserialize($admin_view['conditions']); $admin_view['conditions']['referrer'] = $mybb->input['uid'];
|
|
|
echo build_users_view($admin_view); $page->output_footer();
| echo build_users_view($admin_view); $page->output_footer();
|
Zeile 1820 | Zeile 1832 |
---|
$db->update_query("pollvotes", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("posts", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("privatemessages", $uid_update, "uid='{$source_user['uid']}'");
|
$db->update_query("pollvotes", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("posts", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("privatemessages", $uid_update, "uid='{$source_user['uid']}'");
|
| $db->update_query("reportedposts", $uid_update, "uid='{$source_user['uid']}'");
|
$db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'"); $db->delete_query("sessions", "uid='{$source_user['uid']}'");
| $db->update_query("threadratings", $uid_update, "uid='{$source_user['uid']}'"); $db->update_query("threads", $uid_update, "uid='{$source_user['uid']}'"); $db->delete_query("sessions", "uid='{$source_user['uid']}'");
|
Zeile 1895 | Zeile 1908 |
---|
$db->update_query("threads", $last_poster, "lastposteruid='{$source_user['uid']}'"); $edit_uid = array( "edituid" => $destination_user['uid']
|
$db->update_query("threads", $last_poster, "lastposteruid='{$source_user['uid']}'"); $edit_uid = array( "edituid" => $destination_user['uid']
|
);
| );
|
$db->update_query("posts", $edit_uid, "edituid='{$source_user['uid']}'");
$from_uid = array(
| $db->update_query("posts", $edit_uid, "edituid='{$source_user['uid']}'");
$from_uid = array(
|
Zeile 1915 | Zeile 1928 |
---|
$fids = array(); $query = $db->simple_select("forums", "fid", "usepostcounts=0"); while($fid = $db->fetch_field($query, "fid"))
|
$fids = array(); $query = $db->simple_select("forums", "fid", "usepostcounts=0"); while($fid = $db->fetch_field($query, "fid"))
|
{
| {
|
$fids[] = $fid; } $fids_not_in = ''; if(!empty($fids))
|
$fids[] = $fid; } $fids_not_in = ''; if(!empty($fids))
|
{
| {
|
$fids_not_in = "AND fid NOT IN(".implode(',', $fids).")"; }
| $fids_not_in = "AND fid NOT IN(".implode(',', $fids).")"; }
|
Zeile 1942 | Zeile 1955 |
---|
update_stats(array('numusers' => '-1')); $plugins->run_hooks("admin_user_users_merge_commit");
|
update_stats(array('numusers' => '-1')); $plugins->run_hooks("admin_user_users_merge_commit");
|
|
|
// Log admin action log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
// Redirect! flash_message("<strong>{$source_user['username']}</strong> {$lang->success_merged} {$destination_user['username']}", "success"); admin_redirect("index.php?module=user-users");
|
// Log admin action log_admin_action($source_user['uid'], $source_user['username'], $destination_user['uid'], $destination_user['username']);
// Redirect! flash_message("<strong>{$source_user['username']}</strong> {$lang->success_merged} {$destination_user['username']}", "success"); admin_redirect("index.php?module=user-users");
|
exit; }
| exit; }
|
}
$page->add_breadcrumb_item($lang->merge_users);
| }
$page->add_breadcrumb_item($lang->merge_users);
|
Zeile 2062 | Zeile 2075 |
---|
if($mybb->input['profile_fields']) { $admin_view['custom_profile_fields'] = $mybb->input['profile_fields'];
|
if($mybb->input['profile_fields']) { $admin_view['custom_profile_fields'] = $mybb->input['profile_fields'];
|
}
| }
|
$results = build_users_view($admin_view);
| $results = build_users_view($admin_view);
|
Zeile 2104 | Zeile 2117 |
---|
{ $mybb->input['displayas'] = "card"; }
|
{ $mybb->input['displayas'] = "card"; }
|
|
|
$form = new Form("index.php?module=user-users&action=search", "post");
user_search_conditions($mybb->input, $form);
| $form = new Form("index.php?module=user-users&action=search", "post");
user_search_conditions($mybb->input, $form);
|
Zeile 2118 | Zeile 2131 |
---|
$form_container->output_row($lang->results_per_page, "", $form->generate_text_box('perpage', $mybb->input['perpage'], array('id' => 'perpage')), 'perpage'); $form_container->output_row($lang->display_results_as, "", $form->generate_radio_button('displayas', 'table', $lang->table, array('checked' => ($mybb->input['displayas'] != "card" ? true : false)))."<br />".$form->generate_radio_button('displayas', 'card', $lang->business_card, array('checked' => ($mybb->input['displayas'] == "card" ? true : false)))); $form_container->end();
|
$form_container->output_row($lang->results_per_page, "", $form->generate_text_box('perpage', $mybb->input['perpage'], array('id' => 'perpage')), 'perpage'); $form_container->output_row($lang->display_results_as, "", $form->generate_radio_button('displayas', 'table', $lang->table, array('checked' => ($mybb->input['displayas'] != "card" ? true : false)))."<br />".$form->generate_radio_button('displayas', 'card', $lang->business_card, array('checked' => ($mybb->input['displayas'] == "card" ? true : false)))); $form_container->end();
|
|
|
$buttons[] = $form->generate_submit_button($lang->find_users); $form->output_submit_wrapper($buttons); $form->end();
| $buttons[] = $form->generate_submit_button($lang->find_users); $form->output_submit_wrapper($buttons); $form->end();
|
Zeile 2388 | Zeile 2401 |
---|
echo $form->generate_hidden_field('inline_action', 'multiban'); echo $form->generate_hidden_field('processed', '1');
|
echo $form->generate_hidden_field('inline_action', 'multiban'); echo $form->generate_hidden_field('processed', '1');
|
$form_container = new FormContainer('<div class="float_right"><a href="index.php?module=user-users&action=inline_edit&inline_action=multilift&my_post_key={$mybb->post_code}">'.$lang->lift_bans.'</a></div>'.$lang->mass_ban);
| $form_container = new FormContainer('<div class="float_right"><a href="index.php?module=user-users&action=inline_edit&inline_action=multilift&my_post_key='.$mybb->post_code.'">'.$lang->lift_bans.'</a></div>'.$lang->mass_ban);
|
$form_container->output_row($lang->ban_reason, "", $form->generate_text_box('reason', $mybb->input['reason'], array('id' => 'reason')), 'reason'); $ban_times = fetch_ban_times(); foreach($ban_times as $time => $period)
| $form_container->output_row($lang->ban_reason, "", $form->generate_text_box('reason', $mybb->input['reason'], array('id' => 'reason')), 'reason'); $ban_times = fetch_ban_times(); foreach($ban_times as $time => $period)
|
Zeile 2399 | Zeile 2412 |
---|
$period = "{$period} ({$friendly_time})"; } $length_list[$time] = $period;
|
$period = "{$period} ({$friendly_time})"; } $length_list[$time] = $period;
|
}
| }
|
$form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime'); $form_container->end();
| $form_container->output_row($lang->ban_time, "", $form->generate_select_box('bantime', $length_list, $mybb->input['bantime'], array('id' => 'bantime')), 'bantime'); $form_container->end();
|
Zeile 2997 | Zeile 3010 |
---|
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle"); foreach($user_like_fields as $search_field) {
|
$user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle"); foreach($user_like_fields as $search_field) {
|
if($view['conditions'][$search_field]) {
| if($view['conditions'][$search_field] && !$view['conditions'][$search_field.'_blank']) {
|
$search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'";
|
$search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'";
|
}
| } else if(isset($view['conditions'][$search_field.'_blank'])) { $search_sql .= " AND u.{$search_field} != ''"; }
|
}
// EXACT matching fields
| }
// EXACT matching fields
|
Zeile 3032 | Zeile 3049 |
---|
$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) { if(intval($view['conditions'][$search_field])) { $threshold = TIME_NOW - (intval($view['conditions'][$search_field]) * 24 * 60 * 60);
$search_sql .= " AND u.{$search_field} >= '{$threshold}'"; } }
|
// IP searching $ip_fields = array("regip", "lastip"); foreach($ip_fields as $search_field)
| // IP searching $ip_fields = array("regip", "lastip"); foreach($ip_fields as $search_field)
|
Zeile 3053 | Zeile 3082 |
---|
if(!is_array($ip_range)) { $ip_sql = "long{$search_field}='{$ip_range}'";
|
if(!is_array($ip_range)) { $ip_sql = "long{$search_field}='{$ip_range}'";
|
}
| }
|
else { $ip_sql = "long{$search_field} > '{$ip_range[0]}' AND long{$search_field} < '{$ip_range[1]}'";
| else { $ip_sql = "long{$search_field} > '{$ip_range[0]}' AND long{$search_field} < '{$ip_range[1]}'";
|
Zeile 3071 | Zeile 3100 |
---|
{ $view['conditions']['postip'] = str_replace("*", "%", $view['conditions']['postip']); $ip_sql = "ipaddress LIKE '".$db->escape_string($view['conditions']['postip'])."'";
|
{ $view['conditions']['postip'] = str_replace("*", "%", $view['conditions']['postip']); $ip_sql = "ipaddress LIKE '".$db->escape_string($view['conditions']['postip'])."'";
|
}
| }
|
else { $ip_range = fetch_longipv4_range($view['conditions']['postip']);
| else { $ip_range = fetch_longipv4_range($view['conditions']['postip']);
|
Zeile 3113 | Zeile 3142 |
---|
{ continue; }
|
{ continue; }
|
$userfield_sql .= ' AND '.$db->escape_string($column)."='".$db->escape_string($value)."'";
| if(strpos($column, '_blank') !== false) { $column = str_replace('_blank', '', $column); $userfield_sql .= ' AND '.$db->escape_string($column)." != ''"; } else { $userfield_sql .= ' AND '.$db->escape_string($column)."='".$db->escape_string($value)."'"; }
|
} } else if(!empty($input))
| } } else if(!empty($input))
|
Zeile 3123 | Zeile 3160 |
---|
{ continue; }
|
{ continue; }
|
$userfield_sql .= ' AND '.$db->escape_string($column)." LIKE '%".$db->escape_string($input)."%'"; }
| if(strpos($column, '_blank') !== false) { $column = str_replace('_blank', '', $column); $userfield_sql .= ' AND '.$db->escape_string($column)." != ''"; } else { $userfield_sql .= ' AND '.$db->escape_string($column)." LIKE '%".$db->escape_string($input)."%'"; } }
|
}
|
}
|
|
|
if($userfield_sql != '1=1')
|
if($userfield_sql != '1=1')
|
{
| {
|
$userfield_uids = array(0); $query = $db->simple_select("userfields", "ufid", $userfield_sql); while($userfield = $db->fetch_array($query))
| $userfield_uids = array(0); $query = $db->simple_select("userfields", "ufid", $userfield_sql); while($userfield = $db->fetch_array($query))
|
Zeile 3138 | Zeile 3183 |
---|
} $search_sql .= " AND u.uid IN(".implode(',', $userfield_uids).")"; unset($userfield_uids);
|
} $search_sql .= " AND u.uid IN(".implode(',', $userfield_uids).")"; unset($userfield_uids);
|
}
| }
|
}
// Usergroup based searching
| }
// Usergroup based searching
|
Zeile 3150 | Zeile 3195 |
---|
}
foreach($view['conditions']['usergroup'] as $usergroup)
|
}
foreach($view['conditions']['usergroup'] as $usergroup)
|
{
| {
|
switch($db->type) { case "pgsql":
| switch($db->type) { case "pgsql":
|
Zeile 3278 | Zeile 3323 |
---|
{ if($user['coppauser']) {
|
{ if($user['coppauser']) {
|
$popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}{$from_bit}");
| $popup->add_item($lang->approve_coppa_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
} else {
|
} else {
|
$popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}{$from_bit}");
| $popup->add_item($lang->approve_user, "index.php?module=user-users&action=activate_user&uid={$user['uid']}&my_post_key={$mybb->post_code}{$from_bit}");
|
} }
| } }
|
Zeile 3300 | Zeile 3345 |
---|
else { $reputation = "-";
|
else { $reputation = "-";
|
}
| }
|
if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) { $warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
| if($mybb->settings['enablewarningsystem'] != 0 && $usergroups[$user['usergroup']]['canreceivewarnings'] != 0) { $warning_level = round($user['warningpoints']/$mybb->settings['maxwarningpoints']*100);
|
Zeile 3581 | Zeile 3626 |
---|
function build_user_view_table($user, $view, &$table) { global $user_view_fields;
|
function build_user_view_table($user, $view, &$table) { global $user_view_fields;
|
|
|
foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
| foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
|
Zeile 3692 | Zeile 3737 |
---|
{ $val = trim($val); $options[$val] = $val;
|
{ $val = trim($val); $options[$val] = $val;
|
} if(!$profile_field['length']) {
| } if(!$profile_field['length']) {
|
$profile_field['length'] = 1; } if($search == true) { $code = $form->generate_select_box("profile_fields[{$field_name}][{$field_name}]", $options, $values[$field_name], array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
|
$profile_field['length'] = 1; } if($search == true) { $code = $form->generate_select_box("profile_fields[{$field_name}][{$field_name}]", $options, $values[$field_name], array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
|
}
| }
|
else { $code = $form->generate_select_box("profile_fields[{$field_name}]", $options, $values[$field_name], array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
| else { $code = $form->generate_select_box("profile_fields[{$field_name}]", $options, $values[$field_name], array('id' => "profile_field_{$field_name}", 'size' => $profile_field['length']));
|
Zeile 3714 | Zeile 3759 |
---|
} $radio_options += explode("\n", $options); foreach($radio_options as $val)
|
} $radio_options += explode("\n", $options); foreach($radio_options as $val)
|
{
| {
|
$val = trim($val); $code .= $form->generate_radio_button("profile_fields[{$field_name}]", $val, $val, array('id' => "profile_field_{$field_name}", 'checked' => ($val == $values[$field_name] ? true : false)))."<br />"; } break; case "checkbox": if(!is_array($values[$field_name]))
|
$val = trim($val); $code .= $form->generate_radio_button("profile_fields[{$field_name}]", $val, $val, array('id' => "profile_field_{$field_name}", 'checked' => ($val == $values[$field_name] ? true : false)))."<br />"; } break; case "checkbox": if(!is_array($values[$field_name]))
|
{
| {
|
$user_options = explode("\n", $values[$field_name]); } else
| $user_options = explode("\n", $values[$field_name]); } else
|
Zeile 3742 | Zeile 3787 |
---|
{ $val = trim($val); $code .= $form->generate_check_box("profile_fields[{$field_name}][]", $val, $val, array('id' => "profile_field_{$field_name}", 'checked' => ($val == $selected_options[$val] ? true : false)))."<br />";
|
{ $val = trim($val); $code .= $form->generate_check_box("profile_fields[{$field_name}][]", $val, $val, array('id' => "profile_field_{$field_name}", 'checked' => ($val == $selected_options[$val] ? true : false)))."<br />";
|
} break;
| } break;
|
case "textarea":
|
case "textarea":
|
$code = $form->generate_text_area("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'rows' => 6, 'cols' => 50)); break;
| $extra = ''; if($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:
|
default:
|
$code = $form->generate_text_box("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'maxlength' => $profile_field['maxlength'], 'length' => $profile_field['length']));
| $extra = ''; if($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_box("profile_fields[{$field_name}]", $values[$field_name], array('id' => "profile_field_{$field_name}", 'maxlength' => $profile_field['maxlength'], 'length' => $profile_field['length'])).$extra;
|
break; }
|
break; }
|
|
|
$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 = ''; }
|
Zeile 3792 | Zeile 3850 |
---|
$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');
|
$form_container->output_row($lang->is_member_of_groups, $lang->additional_user_groups_desc, $form->generate_select_box('conditions[usergroup][]', $options, $input['conditions']['usergroup'], array('id' => 'usergroups', 'multiple' => true, 'size' => 5)), 'usergroups');
|
$form_container->output_row($lang->website_contains, "", $form->generate_text_box('conditions[website]', $input['conditions']['website'], array('id' => 'website')), 'website'); $form_container->output_row($lang->icq_number_contains, "", $form->generate_text_box('conditions[icq]', $input['conditions']['icq'], array('id' => 'icq')), 'icq'); $form_container->output_row($lang->aim_handle_contains, "", $form->generate_text_box('conditions[aim]', $input['conditions']['aim'], array('id' => 'aim')), 'aim'); $form_container->output_row($lang->yahoo_contains, "", $form->generate_text_box('conditions[yahoo]', $input['conditions']['yahoo'], array('id' => 'yahoo')), 'yahoo'); $form_container->output_row($lang->msn_contains, "", $form->generate_text_box('conditions[msn]', $input['conditions']['msn'], array('id' => 'msn')), 'msn'); $form_container->output_row($lang->signature_contains, "", $form->generate_text_box('conditions[signature]', $input['conditions']['signature'], array('id' => 'signature')), 'signature'); $form_container->output_row($lang->user_title_contains, "", $form->generate_text_box('conditions[usertitle]', $input['conditions']['usertitle'], array('id' => 'usertitle')), 'usertitle');
| $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->msn_contains, "", $form->generate_text_box('conditions[msn]', $input['conditions']['msn'], array('id' => 'msn'))." {$lang->or} ".$form->generate_check_box('conditions[msn_blank]', 1, $lang->is_not_blank, array('id' => 'msn_blank', 'checked' => $input['conditions']['msn_blank'])), 'msn'); $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->user_title_contains, "", $form->generate_text_box('conditions[usertitle]', $input['conditions']['usertitle'], array('id' => 'usertitle'))." {$lang->or} ".$form->generate_check_box('conditions[usertitle_blank]', 1, $lang->is_not_blank, array('id' => 'usertitle_blank', 'checked' => $input['conditions']['usertitle_blank'])), 'usertitle');
|
$greater_options = array( "greater_than" => $lang->greater_than, "is_exactly" => $lang->is_exactly,
| $greater_options = array( "greater_than" => $lang->greater_than, "is_exactly" => $lang->is_exactly,
|
Zeile 3806 | Zeile 3864 |
---|
); $form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['postnum'], array('id' => 'numposts')), 'numposts');
|
); $form_container->output_row($lang->post_count_is, "", $form->generate_select_box('conditions[postnum_dir]', $greater_options, $input['conditions']['postnum_dir'], array('id' => 'numposts_dir'))." ".$form->generate_text_box('conditions[postnum]', $input['conditions']['postnum'], array('id' => 'numposts')), 'numposts');
|
| $form_container->output_row($lang->reg_in_x_days, '', $form->generate_text_box('conditions[regdate]', $input['conditions']['regdate'], array('id' => 'regdate')).' '.$lang->days, 'regdate');
|
$form_container->output_row($lang->reg_ip_matches, $lang->wildcard, $form->generate_text_box('conditions[regip]', $input['conditions']['regip'], array('id' => 'regip')), 'regip'); $form_container->output_row($lang->last_known_ip, $lang->wildcard, $form->generate_text_box('conditions[lastip]', $input['conditions']['lastip'], array('id' => 'lastip')), 'lastip'); $form_container->output_row($lang->posted_with_ip, $lang->wildcard, $form->generate_text_box('conditions[postip]', $input['conditions']['postip'], array('id' => 'postip')), 'postip');
| $form_container->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');
|