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 4272 2008-11-16 23:25:10Z belloman $
| * $Id: users.php 4337 2009-03-30 01:21:51Z Tikitiki $
|
*/
// Disallow direct access to this file for security reasons
| */
// Disallow direct access to this file for security reasons
|
Zeile 1045 | Zeile 1045 |
---|
$form->generate_check_box("remember", 1, $lang->remember_login_details, array("checked" => $mybb->input['remember'])) ); $form_container->output_row($lang->login_cookies_privacy, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $login_options)."</div>");
|
$form->generate_check_box("remember", 1, $lang->remember_login_details, array("checked" => $mybb->input['remember'])) ); $form_container->output_row($lang->login_cookies_privacy, "", "<div class=\"user_settings_bit\">".implode("</div><div class=\"user_settings_bit\">", $login_options)."</div>");
|
| if($mybb->input['pmnotice'] > 1) { $mybb->input['pmnotice'] = 1; }
|
$messaging_options = array( $form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])), $form->generate_check_box("hideemail", 1, $lang->hide_email_from_others, array("checked" => $mybb->input['hideemail'])),
| $messaging_options = array( $form->generate_check_box("allownotices", 1, $lang->recieve_admin_emails, array("checked" => $mybb->input['allownotices'])), $form->generate_check_box("hideemail", 1, $lang->hide_email_from_others, array("checked" => $mybb->input['hideemail'])),
|
Zeile 1305 | Zeile 1310 |
---|
$db->delete_query("banned", "uid='{$user['uid']}'"); $db->delete_query("threadratings", "uid='{$user['uid']}'"); $db->delete_query("users", "uid='{$user['uid']}'");
|
$db->delete_query("banned", "uid='{$user['uid']}'"); $db->delete_query("threadratings", "uid='{$user['uid']}'"); $db->delete_query("users", "uid='{$user['uid']}'");
|
| $db->delete_query("joinrequests", "uid='{$user['uid']}'"); $db->delete_query("warnings", "uid='{$user['uid']}'");
|
// Update forum stats update_stats(array('numusers' => '-1'));
| // Update forum stats update_stats(array('numusers' => '-1'));
|
Zeile 1498 | Zeile 1505 |
---|
$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']}'");
|
| $db->delete_query("reputation", "uid='{$destination_user['uid']}' AND adduid='{$destination_user['uid']}'"); // Calculate new reputation $query = $db->simple_select("reputation", "SUM(reputation) as total_rep", "uid='{$destination_user['uid']}'"); $total_reputation = $db->fetch_field($query, "total_rep"); $db->update_query("users", array('reputation' => $total_reputation), "uid='{$destination_user['uid']}'");
|
// Additional updates for non-uid fields $last_poster = array( "lastposteruid" => $destination_user['uid'],
| // Additional updates for non-uid fields $last_poster = array( "lastposteruid" => $destination_user['uid'],
|
Zeile 1630 | Zeile 1644 |
---|
if($mybb->input['conditions']) { $admin_view['conditions'] = $mybb->input['conditions'];
|
if($mybb->input['conditions']) { $admin_view['conditions'] = $mybb->input['conditions'];
|
}
| }
|
if($mybb->input['sortby']) { $admin_view['sortby'] = $mybb->input['sortby'];
| if($mybb->input['sortby']) { $admin_view['sortby'] = $mybb->input['sortby'];
|
Zeile 1661 | Zeile 1675 |
---|
$page->output_nav_tabs($sub_tabs, 'find_users'); echo $results; $page->output_footer();
|
$page->output_nav_tabs($sub_tabs, 'find_users'); echo $results; $page->output_footer();
|
}
| }
|
else { if($mybb->input['from'] == "home")
|
else { if($mybb->input['from'] == "home")
|
{
| {
|
flash_message($lang->error_no_users_found, 'error'); admin_redirect("index.php"); exit;
|
flash_message($lang->error_no_users_found, 'error'); admin_redirect("index.php"); exit;
|
}
| }
|
else { $errors[] = $lang->error_no_users_found;
|
else { $errors[] = $lang->error_no_users_found;
|
} } }
| } } }
|
$page->add_breadcrumb_item($lang->find_users); $page->output_header($lang->find_users);
| $page->add_breadcrumb_item($lang->find_users); $page->output_header($lang->find_users);
|
Zeile 1720 | Zeile 1734 |
---|
$page->output_header($lang->browse_users); echo "<script type=\"text/javascript\" src=\"jscripts/users.js\"></script>";
|
$page->output_header($lang->browse_users); echo "<script type=\"text/javascript\" src=\"jscripts/users.js\"></script>";
|
|
|
$page->output_nav_tabs($sub_tabs, 'browse_users'); if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
| $page->output_nav_tabs($sub_tabs, 'browse_users'); if($mybb->input['search_id'] && $admin_session['data']['user_views'][$mybb->input['search_id']])
|
Zeile 1749 | Zeile 1763 |
---|
if(!$default_view) { $default_view = "0";
|
if(!$default_view) { $default_view = "0";
|
}
| }
|
$query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc")); $admin_view = $db->fetch_array($query); }
| $query = $db->simple_select("adminviews", "*", "type='user' AND (vid='{$default_view}' OR uid=0)", array("order_by" => "uid", "order_dir" => "desc")); $admin_view = $db->fetch_array($query); }
|
Zeile 1808 | Zeile 1822 |
---|
if($view['title']) { $title_string = "view_title_{$view['vid']}";
|
if($view['title']) { $title_string = "view_title_{$view['vid']}";
|
|
|
if($lang->$title_string) { $view['title'] = $lang->$title_string;
| if($lang->$title_string) { $view['title'] = $lang->$title_string;
|
Zeile 1823 | Zeile 1837 |
---|
$view['url'] = "index.php?module=user/users"; } if(!is_array($view['conditions']))
|
$view['url'] = "index.php?module=user/users"; } if(!is_array($view['conditions']))
|
{
| {
|
$view['conditions'] = unserialize($view['conditions']);
|
$view['conditions'] = unserialize($view['conditions']);
|
}
| }
|
if(!is_array($view['fields']))
|
if(!is_array($view['fields']))
|
{
| {
|
$view['fields'] = unserialize($view['fields']); } if($mybb->input['username'])
| $view['fields'] = unserialize($view['fields']); } if($mybb->input['username'])
|
Zeile 1837 | Zeile 1851 |
---|
if($view['vid']) { $view['url'] .= "&vid={$view['vid']}";
|
if($view['vid']) { $view['url'] .= "&vid={$view['vid']}";
|
}
| }
|
else { // If this is a custom view we need to save everything ready to pass it on from page to page
| else { // If this is a custom view we need to save everything ready to pass it on from page to page
|
Zeile 1866 | Zeile 1880 |
---|
// Build header for table based view if($view['view_type'] != "card")
|
// Build header for table based view if($view['view_type'] != "card")
|
{
| {
|
foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
| foreach($view['fields'] as $field) { if(!$user_view_fields[$field])
|
Zeile 1895 | Zeile 1909 |
---|
// List of valid LIKE search fields $user_like_fields = array("username", "email", "website", "icq", "aim", "yahoo", "msn", "signature", "usertitle"); foreach($user_like_fields as $search_field)
|
// List of valid LIKE search fields $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])
|
{ $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'"; }
| { $search_sql .= " AND u.{$search_field} LIKE '%".$db->escape_string_like($view['conditions'][$search_field])."%'"; }
|
Zeile 1909 | Zeile 1923 |
---|
if($view['conditions'][$search_field]) { $search_sql .= " AND u.{$search_field}='".$db->escape_string($view['conditions'][$search_field])."'";
|
if($view['conditions'][$search_field]) { $search_sql .= " AND u.{$search_field}='".$db->escape_string($view['conditions'][$search_field])."'";
|
} }
| } }
|
// LESS THAN or GREATER THAN $direction_fields = array("postnum");
| // LESS THAN or GREATER THAN $direction_fields = array("postnum");
|
Zeile 1949 | Zeile 1963 |
---|
else { $ip_range = fetch_longipv4_range($view['conditions'][$search_field]);
|
else { $ip_range = fetch_longipv4_range($view['conditions'][$search_field]);
|
$view['conditions'][$search_field] = str_replace("*", "%", $view['conditions'][$search_field]);
| |
if(!is_array($ip_range)) { $ip_sql = "long{$search_field}='{$ip_range}'";
| if(!is_array($ip_range)) { $ip_sql = "long{$search_field}='{$ip_range}'";
|
Zeile 1975 | Zeile 1988 |
---|
else { $ip_range = fetch_longipv4_range($view['conditions']['postip']);
|
else { $ip_range = fetch_longipv4_range($view['conditions']['postip']);
|
$view['conditions']['postip'] = str_replace("*", "%", $view['conditions']['postip']);
| |
if(!is_array($ip_range))
|
if(!is_array($ip_range))
|
{
| {
|
$ip_sql = "longipaddress='{$ip_range}'";
|
$ip_sql = "longipaddress='{$ip_range}'";
|
}
| }
|
else { $ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'"; } }
|
else { $ip_sql = "longipaddress > '{$ip_range[0]}' AND longipaddress < '{$ip_range[1]}'"; } }
|
$search_sql .= " AND EXISTS (SELECT uid FROM ".TABLE_PREFIX."posts WHERE {$ip_sql} AND uid=u.uid)";
| $ip_uids = array(0); $query = $db->simple_select("posts", "uid", $ip_sql); while($uid = $db->fetch_field($query, "uid")) { $ip_uids[] = $uid; } $search_sql .= " AND u.uid IN(".implode(',', $ip_uids).")"; unset($ip_uids);
|
}
// Usergroup based searching
| }
// Usergroup based searching
|