Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/about/license *
|
* $Id: users.php 4054 2008-07-31 05:19:05Z Tikitiki $
| * $Id: users.php 4180 2008-09-07 16:44:43Z Tikitiki $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 569 | Zeile 569 |
---|
"displaygroup" => $mybb->input['displaygroup'], "postnum" => $mybb->input['postnum'], "usertitle" => $mybb->input['usertitle'],
|
"displaygroup" => $mybb->input['displaygroup'], "postnum" => $mybb->input['postnum'], "usertitle" => $mybb->input['usertitle'],
|
"timezone" => $mybb->input['timezoneoffset'],
| "timezone" => $mybb->input['timezone'],
|
"language" => $mybb->input['language'], "profile_fields" => $mybb->input['profile_fields'], "profile_fields_editable" => true,
| "language" => $mybb->input['language'], "profile_fields" => $mybb->input['profile_fields'], "profile_fields_editable" => true,
|
Zeile 977 | Zeile 977 |
---|
{ $options[$usergroup['gid']] = $usergroup['title']; $display_group_options[$usergroup['gid']] = $usergroup['title'];
|
{ $options[$usergroup['gid']] = $usergroup['title']; $display_group_options[$usergroup['gid']] = $usergroup['title'];
|
| } 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->primary_user_group." <em>*</em>", "", $form->generate_select_box('usergroup', $options, $mybb->input['usergroup'], array('id' => 'usergroup')), 'usergroup');
|
Zeile 1043 | Zeile 1048 |
---|
$date_options = array( "<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->input['dateformat'], array('id' => 'dateformat')), "<label for=\"dateformat\">{$lang->time_format}:</label><br />".$form->generate_select_box("timeformat", $time_format_options, $mybb->input['timeformat'], array('id' => 'timeformat')),
|
$date_options = array( "<label for=\"dateformat\">{$lang->date_format}:</label><br />".$form->generate_select_box("dateformat", $date_format_options, $mybb->input['dateformat'], array('id' => 'dateformat')), "<label for=\"dateformat\">{$lang->time_format}:</label><br />".$form->generate_select_box("timeformat", $time_format_options, $mybb->input['timeformat'], array('id' => 'timeformat')),
|
"<label for=\"timezone\">{$lang->time_zone}:</label><br />".build_timezone_select("timezone", $mybb->user['timezone']),
| "<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>");
| "<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>");
|
Zeile 1104 | Zeile 1109 |
---|
"<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>");
|
"<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>");
|
| $languages = array_merge(array('0' => $lang->use_default), $lang->get_languages());
|
$other_options = array( $form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])), $form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->input['showcodebuttons'])), "<label for=\"style\">{$lang->theme}:</label><br />".build_theme_select("style", $mybb->input['style'], 0, "", 1),
|
$other_options = array( $form->generate_check_box("showredirect", 1, $lang->show_redirect, array("checked" => $mybb->input['showredirect'])), $form->generate_check_box("showcodebuttons", "1", $lang->show_code_buttons, array("checked" => $mybb->input['showcodebuttons'])), "<label for=\"style\">{$lang->theme}:</label><br />".build_theme_select("style", $mybb->input['style'], 0, "", 1),
|
"<label for=\"language\">{$lang->board_language}:</label><br />".$form->generate_select_box("language", $lang->get_languages(), $mybb->input['language'], array('id' => 'language'))
| "<label for=\"language\">{$lang->board_language}:</label><br />".$form->generate_select_box("language", $languages, $mybb->input['language'], array('id' => 'language'))
|
); $form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $other_options)."</div>");
| ); $form_container->output_row($lang->other_options, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $other_options)."</div>");
|
Zeile 1120 | Zeile 1127 |
---|
// 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%'));
|
$sig_smilies = "off";
| $sig_smilies = $lang->off;
|
if($mybb->settings['sigsmilies'] == 1) {
|
if($mybb->settings['sigsmilies'] == 1) {
|
$sig_smilies = "on";
| $sig_smilies = $lang->on;
|
}
|
}
|
$sig_mycode = "off";
| $sig_mycode = $lang->off;
|
if($mybb->settings['sigmycode'] == 1) {
|
if($mybb->settings['sigmycode'] == 1) {
|
$sig_mycode = "on";
| $sig_mycode = $lang->on;
|
$signature_editor .= build_mycode_inserter("signature"); }
|
$signature_editor .= build_mycode_inserter("signature"); }
|
$sig_html = "off";
| $sig_html = $lang->off;
|
if($mybb->settings['sightml'] == 1) {
|
if($mybb->settings['sightml'] == 1) {
|
$sig_html = "on";
| $sig_html = $lang->on;
|
}
|
}
|
$sig_imcode = "on";
| $sig_imgcode = $lang->off;
|
if($mybb->settings['sigimgcode'] == 1) {
|
if($mybb->settings['sigimgcode'] == 1) {
|
$sig_imgcode = "off";
| $sig_imgcode = $lang->on;
|
} echo "<div id=\"tab_signature\">\n"; $form_container = new FormContainer("{$lang->signature}: {$user['username']}");
| } echo "<div id=\"tab_signature\">\n"; $form_container = new FormContainer("{$lang->signature}: {$user['username']}");
|
Zeile 1155 | Zeile 1162 |
---|
$form_container->end(); echo "</div>\n";
|
$form_container->end(); echo "</div>\n";
|
|
|
// // AVATAR MANAGER //
| // // AVATAR MANAGER //
|
Zeile 1182 | Zeile 1189 |
---|
if($errors) { $avatar_url = $mybb->input['avatar_url'];
|
if($errors) { $avatar_url = $mybb->input['avatar_url'];
|
}
| }
|
if($mybb->settings['maxavatardims'] != "")
|
if($mybb->settings['maxavatardims'] != "")
|
{
| {
|
list($max_width, $max_height) = explode("x", $mybb->settings['maxavatardims']); $max_size = "<br />{$lang->max_dimensions_are} {$max_width}x{$max_height}";
|
list($max_width, $max_height) = explode("x", $mybb->settings['maxavatardims']); $max_size = "<br />{$lang->max_dimensions_are} {$max_width}x{$max_height}";
|
}
| }
|
if($mybb->settings['avatarsize']) { $maximum_size = get_friendly_size($mybb->settings['avatarsize']*1024);
| if($mybb->settings['avatarsize']) { $maximum_size = get_friendly_size($mybb->settings['avatarsize']*1024);
|
Zeile 1197 | Zeile 1204 |
---|
}
if($user['avatar'])
|
}
if($user['avatar'])
|
{
| {
|
$remove_avatar = "<br /><br />".$form->generate_check_box("remove_avatar", 1, "<strong>{$lang->remove_avatar}</strong>"); }
| $remove_avatar = "<br /><br />".$form->generate_check_box("remove_avatar", 1, "<strong>{$lang->remove_avatar}</strong>"); }
|
Zeile 1225 | Zeile 1232 |
---|
echo "<div class=\"title\">.. {$lang->or_select_avatar_gallery}</div>"; echo "<iframe src=\"index.php?module=user/users&action=avatar_gallery&uid={$user['uid']}\" width=\"100%\" height=\"350\" frameborder=\"0\"></iframe>"; echo "</div>";
|
echo "<div class=\"title\">.. {$lang->or_select_avatar_gallery}</div>"; echo "<iframe src=\"index.php?module=user/users&action=avatar_gallery&uid={$user['uid']}\" width=\"100%\" height=\"350\" frameborder=\"0\"></iframe>"; echo "</div>";
|
echo "</div>";
| echo "</div>";
|
$buttons[] = $form->generate_submit_button($lang->save_user); $form->output_submit_wrapper($buttons);
| $buttons[] = $form->generate_submit_button($lang->save_user); $form->output_submit_wrapper($buttons);
|
Zeile 1361 | Zeile 1368 |
---|
else { $popup = new PopupMenu("user_last", $lang->options);
|
else { $popup = new PopupMenu("user_last", $lang->options);
|
$popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&action=search&regip={$user['lastip']}"); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&action=search&postip={$user['lastip']}");
| $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&action=search&results=1&conditions=".urlencode(serialize(array("regip" => $user['lastip'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("postip" => $user['lastip']))));
|
$popup->add_item($lang->ban_ip, "index.php?module=config/banning&filter={$user['lastip']}"); $controls = $popup->fetch(); }
| $popup->add_item($lang->ban_ip, "index.php?module=config/banning&filter={$user['lastip']}"); $controls = $popup->fetch(); }
|
Zeile 1378 | Zeile 1386 |
---|
else { $popup = new PopupMenu("user_reg", $lang->options);
|
else { $popup = new PopupMenu("user_reg", $lang->options);
|
$popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&action=search&regip={$user['regip']}"); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&action=search&postip={$user['regip']}");
| $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("regip" => $user['regip'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("postip" => $user['regip']))));
|
$popup->add_item($lang->ban_ip, "index.php?module=config/banning&filter={$user['regip']}"); $controls = $popup->fetch(); }
| $popup->add_item($lang->ban_ip, "index.php?module=config/banning&filter={$user['regip']}"); $controls = $popup->fetch(); }
|
Zeile 1393 | Zeile 1401 |
---|
if(!$done_ip[$ip['ipaddress']]) { $popup = new PopupMenu("post_{$ip['pid']}", $lang->options);
|
if(!$done_ip[$ip['ipaddress']]) { $popup = new PopupMenu("post_{$ip['pid']}", $lang->options);
|
$popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&action=search&regip={$ip['ipaddress']}"); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&action=search&postip={$ip['ipaddress']}");
| $popup->add_item($lang->show_users_regged_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("regip" => $ip['ipaddress'])))); $popup->add_item($lang->show_users_posted_with_ip, "index.php?module=user/users&results=1&action=search&conditions=".urlencode(serialize(array("postip" => $ip['ipaddress']))));
|
$popup->add_item($lang->ban_ip, "index.php?module=config/banning&filter={$ip['ipaddress']}"); $controls = $popup->fetch();
| $popup->add_item($lang->ban_ip, "index.php?module=config/banning&filter={$ip['ipaddress']}"); $controls = $popup->fetch();
|
Zeile 1563 | Zeile 1571 |
---|
unset($admin_view); } }
|
unset($admin_view); } }
|
|
|
if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']]) { $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']];
| if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']]) { $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']];
|
Zeile 1675 | Zeile 1683 |
---|
$page->output_nav_tabs($sub_tabs, 'browse_users');
|
$page->output_nav_tabs($sub_tabs, 'browse_users');
|
if($mybb->input['search_id'] && $admin_session['user_views'][$mybb->input['search_id']])
| if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
|
{ $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']]; unset($admin_view['extra_sql']);
| { $admin_view = $admin_session['data']['user_views'][$mybb->input['search_id']]; unset($admin_view['extra_sql']);
|
Zeile 1704 | Zeile 1712 |
---|
}
// Fetch a list of all of the views for this user
|
}
// Fetch a list of all of the views for this user
|
$popup = new PopupMenu("views", $lang->views);
| $popup = new PopupMenu("views", $lang->views);
|
$query = $db->simple_select("adminviews", "*", "type='user' AND (visibility=2 OR uid={$mybb->user['uid']})", array("order_by" => "title")); while($view = $db->fetch_array($query)) { $popup->add_item(htmlspecialchars_uni($view['title']), "index.php?module=user/users&vid={$view['vid']}");
|
$query = $db->simple_select("adminviews", "*", "type='user' AND (visibility=2 OR uid={$mybb->user['uid']})", array("order_by" => "title")); while($view = $db->fetch_array($query)) { $popup->add_item(htmlspecialchars_uni($view['title']), "index.php?module=user/users&vid={$view['vid']}");
|
}
| }
|
$popup->add_item("<em>{$lang->manage_views}</em>", "index.php?module=user/users&action=views"); $admin_view['popup'] = $popup->fetch();
|
$popup->add_item("<em>{$lang->manage_views}</em>", "index.php?module=user/users&action=views"); $admin_view['popup'] = $popup->fetch();
|
|
|
if($mybb->input['type']) { $admin_view['view_type'] = $mybb->input['type'];
|
if($mybb->input['type']) { $admin_view['view_type'] = $mybb->input['type'];
|
}
$results = build_users_view($admin_view);
| }
$results = build_users_view($admin_view);
|
if(!$results) { $errors[] = $lang->error_no_users_found;
|
if(!$results) { $errors[] = $lang->error_no_users_found;
|
}
| }
|
// If we have any error messages, show them if($errors) { $page->output_inline_error($errors);
|
// If we have any error messages, show them if($errors) { $page->output_inline_error($errors);
|
}
echo $results;
| }
echo $results;
|
$page->output_footer(); }
| $page->output_footer(); }
|
Zeile 1761 | Zeile 1769 |
---|
if(!is_array($view['conditions'])) { $view['conditions'] = unserialize($view['conditions']);
|
if(!is_array($view['conditions'])) { $view['conditions'] = unserialize($view['conditions']);
|
}
| }
|
if(!is_array($view['fields'])) { $view['fields'] = unserialize($view['fields']);
| if(!is_array($view['fields'])) { $view['fields'] = unserialize($view['fields']);
|
Zeile 1820 | Zeile 1828 |
---|
$field_options['class'] = "align_".$view_field['align']; } $table->construct_header($view_field['title'], $field_options);
|
$field_options['class'] = "align_".$view_field['align']; } $table->construct_header($view_field['title'], $field_options);
|
} }
| } }
|
$search_sql = '1=1';
| $search_sql = '1=1';
|
Zeile 1835 | Zeile 1843 |
---|
if($view['conditions'][$search_field]) { $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'";
|
if($view['conditions'][$search_field]) { $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'";
|
} }
| } }
|
// EXACT matching fields $user_exact_fields = array("referrer"); foreach($user_exact_fields as $search_field)
| // EXACT matching fields $user_exact_fields = array("referrer"); foreach($user_exact_fields as $search_field)
|
Zeile 1853 | Zeile 1861 |
---|
foreach($direction_fields as $search_field) { $direction_field = $search_field."_dir";
|
foreach($direction_fields as $search_field) { $direction_field = $search_field."_dir";
|
if($view['conditions'][$search_field] && $view['conditions'][$direction_field])
| if(($view['conditions'][$search_field] || $view['conditions'][$search_field] === '0') && $view['conditions'][$direction_field])
|
{ switch($view['conditions'][$direction_field]) {
| { switch($view['conditions'][$direction_field]) {
|
Zeile 1867 | Zeile 1875 |
---|
$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])."'";
|
} }
| } }
|
// IP searching $ip_fields = array("regip", "lastip");
| // IP searching $ip_fields = array("regip", "lastip");
|
Zeile 1882 | Zeile 1890 |
---|
if(strpos($view['conditions'][$search_field], ":") !== false) { $ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
|
if(strpos($view['conditions'][$search_field], ":") !== false) { $ip_sql = "{$search_field} LIKE '".$db->escape_string($view['conditions'][$search_field])."'";
|
}
| }
|
else { $ip_range = fetch_longipv4_range($view['conditions'][$search_field]); if(!is_array($ip_range))
|
else { $ip_range = fetch_longipv4_range($view['conditions'][$search_field]); if(!is_array($ip_range))
|
{
| {
|
$ip_sql = "long{$search_field}='{$ip_range}'"; } else
| $ip_sql = "long{$search_field}='{$ip_range}'"; } else
|
Zeile 1896 | Zeile 1904 |
---|
} } $search_sql .= " AND {$ip_sql}";
|
} } $search_sql .= " AND {$ip_sql}";
|
} }
| } }
|
// Usergroup based searching if($view['conditions']['usergroup'])
| // Usergroup based searching if($view['conditions']['usergroup'])
|
Zeile 1926 | Zeile 1934 |
---|
if($view['conditions']['coppa']) { $search_sql .= " AND u.coppauser=1 AND u.usergroup=5";
|
if($view['conditions']['coppa']) { $search_sql .= " AND u.coppauser=1 AND u.usergroup=5";
|
}
| }
|
// Extra SQL? if($view['extra_sql']) {
| // Extra SQL? if($view['extra_sql']) {
|
Zeile 1941 | Zeile 1949 |
---|
WHERE {$search_sql} "); $num_results = $db->fetch_field($query, "num_results");
|
WHERE {$search_sql} "); $num_results = $db->fetch_field($query, "num_results");
|
|
|
// No matching results then return false if(!$num_results) {
| // No matching results then return false if(!$num_results) {
|