Zeile 3 | Zeile 3 |
---|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* MyBB 1.2 * Copyright � 2006 MyBB Group, All Rights Reserved *
|
* Website: http://www.mybboard.com * License: http://www.mybboard.com/eula.html
| * Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html
|
*
|
*
|
* $Id: users.php 2630 2007-01-11 10:51:24Z chris $
| * $Id: users.php 3636 2008-02-07 01:36:05Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 405 | Zeile 405 |
---|
$emailmessage = sprintf($lang->email_activateaccount, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); my_mail($email, $emailsubject, $emailmessage); }
|
$emailmessage = sprintf($lang->email_activateaccount, $username, $mybb->settings['bbname'], $mybb->settings['bburl'], $uid, $activationcode); my_mail($email, $emailsubject, $emailmessage); }
|
$cache->updatestats();
| |
cpredirect("users.php?".SID."&lastuid={$user_info['uid']}", $lang->user_added); }
| cpredirect("users.php?".SID."&lastuid={$user_info['uid']}", $lang->user_added); }
|
Zeile 509 | Zeile 508 |
---|
{ $user_info = $userhandler->update_user(); }
|
{ $user_info = $userhandler->update_user(); }
|
$cache->updatestats();
| |
cpredirect("users.php?".SID."&lastuid={$mybb->input['uid']}", $lang->profile_updated); }
| cpredirect("users.php?".SID."&lastuid={$mybb->input['uid']}", $lang->profile_updated); }
|
Zeile 534 | Zeile 532 |
---|
$db->query("DELETE FROM ".TABLE_PREFIX."forumsubscriptions WHERE uid='".intval($mybb->input['uid'])."'"); $db->query("DELETE FROM ".TABLE_PREFIX."favorites WHERE uid='".intval($mybb->input['uid'])."'"); $db->query("DELETE FROM ".TABLE_PREFIX."sessions WHERE uid='".intval($mybb->input['uid'])."'");
|
$db->query("DELETE FROM ".TABLE_PREFIX."forumsubscriptions WHERE uid='".intval($mybb->input['uid'])."'"); $db->query("DELETE FROM ".TABLE_PREFIX."favorites WHERE uid='".intval($mybb->input['uid'])."'"); $db->query("DELETE FROM ".TABLE_PREFIX."sessions WHERE uid='".intval($mybb->input['uid'])."'");
|
| $db->query("DELETE FROM ".TABLE_PREFIX."banned WHERE uid='".intval($mybb->input['uid'])."'");
|
// Update forum stats
|
// Update forum stats
|
$cache->updatestats();
| update_stats(array('numusers' => '-1'));
|
cpredirect("users.php?".SID, $lang->user_deleted);
|
cpredirect("users.php?".SID, $lang->user_deleted);
|
}
| }
|
else
|
else
|
{
| {
|
header("Location: users.php?".SID."&123"); } }
| header("Location: users.php?".SID."&123"); } }
|
Zeile 552 | Zeile 550 |
---|
$search = $mybb->input['search'];
if($search['username'])
|
$search = $mybb->input['search'];
if($search['username'])
|
{
| {
|
$conditions .= " AND username LIKE '%".$db->escape_string($search['username'])."%'"; } if(is_array($search['usergroups']))
| $conditions .= " AND username LIKE '%".$db->escape_string($search['username'])."%'"; } if(is_array($search['usergroups']))
|
Zeile 570 | Zeile 568 |
---|
$conditions .= " AND email LIKE '%".$db->escape_string($search['email'])."%'"; } if($search['website'])
|
$conditions .= " AND email LIKE '%".$db->escape_string($search['email'])."%'"; } if($search['website'])
|
{
| {
|
$conditions .= " AND website LIKE '%".$db->escape_string($search['website'])."%'"; } if($search['icq'])
| $conditions .= " AND website LIKE '%".$db->escape_string($search['website'])."%'"; } if($search['icq'])
|
Zeile 582 | Zeile 580 |
---|
$conditions .= " AND aim LIKE '%".$db->escape_string($search['aim'])."%'"; } if($search['yahoo'])
|
$conditions .= " AND aim LIKE '%".$db->escape_string($search['aim'])."%'"; } if($search['yahoo'])
|
{
| {
|
$conditions .= " AND yahoo LIKE '%".$db->escape_string($search['yahoo'])."%'"; } if($search['msn']) { $conditions .= " AND msn LIKE '%".$db->escape_string($search['msn'])."%'";
|
$conditions .= " AND yahoo LIKE '%".$db->escape_string($search['yahoo'])."%'"; } if($search['msn']) { $conditions .= " AND msn LIKE '%".$db->escape_string($search['msn'])."%'";
|
}
| }
|
if($search['signature']) { $conditions .= " AND signature LIKE '%".$db->escape_string($search['signature'])."%'";
| if($search['signature']) { $conditions .= " AND signature LIKE '%".$db->escape_string($search['signature'])."%'";
|
Zeile 600 | Zeile 598 |
---|
if($search['postsgreater']) { $conditions .= " AND postnum>".intval($search['postsgreater']);
|
if($search['postsgreater']) { $conditions .= " AND postnum>".intval($search['postsgreater']);
|
}
| }
|
if($search['postsless']) { $conditions .= " AND postnum<".intval($search['postsless']); } if($search['overridenotice'] != 'yes')
|
if($search['postsless']) { $conditions .= " AND postnum<".intval($search['postsless']); } if($search['overridenotice'] != 'yes')
|
{
| {
|
$conditions .= " AND allownotices!='no'"; }
| $conditions .= " AND allownotices!='no'"; }
|
Zeile 627 | Zeile 625 |
---|
$searchop['page']++;
$plugins->run_hooks("admin_users_do_email");
|
$searchop['page']++;
$plugins->run_hooks("admin_users_do_email");
|
| if(!trim($mybb->input['searchop']['subject'])) { cperror($lang->error_missing_subject); } if(!trim($mybb->input['searchop']['message'])) { cperror($lang->error_missing_subject); }
|
$query = $db->query("SELECT COUNT(*) AS results FROM ".TABLE_PREFIX."users WHERE $conditions ORDER BY uid"); $num = $db->fetch_array($query);
| $query = $db->query("SELECT COUNT(*) AS results FROM ".TABLE_PREFIX."users WHERE $conditions ORDER BY uid"); $num = $db->fetch_array($query);
|
Zeile 676 | Zeile 683 |
---|
// Update private message count (total, new and unread) for recipient update_pm_count($user['uid'], 7, $user['lastactive']);
|
// Update private message count (total, new and unread) for recipient update_pm_count($user['uid'], 7, $user['lastactive']);
|
|
|
if($user['pmnotify'] == "yes") {
|
if($user['pmnotify'] == "yes") {
|
| $updated_user = array( "pmnotify" => "new" ); $db->update_query(TABLE_PREFIX."users", $updated_user, "uid='{$user['uid']}'");
|
if($user['language'] != "" && $lang->language_exists($user['language'])) { $uselang = $user['language'];
| if($user['language'] != "" && $lang->language_exists($user['language'])) { $uselang = $user['language'];
|
Zeile 694 | Zeile 706 |
---|
if($uselang == $mybb->settings['bblanguage']) {
|
if($uselang == $mybb->settings['bblanguage']) {
|
| $lang->set_path(MYBB_ROOT."inc/languages"); $lang->set_language($uselang); $lang->load("messages");
|
$emailsubject = $lang->emailsubject_newpm; $emailmessage = $lang->email_newpm; } else { $userlang = new MyLanguage;
|
$emailsubject = $lang->emailsubject_newpm; $emailmessage = $lang->email_newpm; } else { $userlang = new MyLanguage;
|
$userlang->set_path("./inc/languages");
| $userlang->set_path(MYBB_ROOT."inc/languages");
|
$userlang->set_language($uselang); $userlang->load("messages"); $emailsubject = $userlang->emailsubject_newpm;
| $userlang->set_language($uselang); $userlang->load("messages"); $emailsubject = $userlang->emailsubject_newpm;
|
Zeile 778 | Zeile 793 |
---|
cperror($lang->error_invalid_destination); } $plugins->run_hooks("admin_users_do_do_merge");
|
cperror($lang->error_invalid_destination); } $plugins->run_hooks("admin_users_do_do_merge");
|
| $db->query("UPDATE ".TABLE_PREFIX."adminoptions SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."adminlog SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."announcements SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."events SET author='".$destuser['uid']."' WHERE author='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."favorites SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."adminlog SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."announcements SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."events SET author='".$destuser['uid']."' WHERE author='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."favorites SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."forums SET lastposter='".$destuser['username']."' WHERE lastposter='".$sourceuser['username']."'");
| $db->query("UPDATE ".TABLE_PREFIX."forums SET lastposter='".$db->escape_string($destuser['username'])."' WHERE lastposter='".$db->escape_string($sourceuser['username'])."'");
|
$db->query("UPDATE ".TABLE_PREFIX."forumsubscriptions SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."moderatorlog SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."moderators SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."pollvotes SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."forumsubscriptions SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."moderatorlog SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."moderators SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."pollvotes SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."posts SET uid='".$destuser['uid']."', username='".$destuser['username']."' WHERE uid='".$sourceuser['uid']."'");
| $db->query("UPDATE ".TABLE_PREFIX."posts SET uid='".$destuser['uid']."', username='".$db->escape_string($destuser['username'])."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."posts SET edituid='".$destuser['uid']."' WHERE edituid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."privatemessages SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."privatemessages SET toid='".$destuser['uid']."' WHERE toid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."privatemessages SET fromid='".$destuser['uid']."' WHERE fromid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."reputation SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."threadratings SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."posts SET edituid='".$destuser['uid']."' WHERE edituid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."privatemessages SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."privatemessages SET toid='".$destuser['uid']."' WHERE toid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."privatemessages SET fromid='".$destuser['uid']."' WHERE fromid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."reputation SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."threadratings SET uid='".$destuser['uid']."' WHERE uid='".$sourceuser['uid']."'");
|
$db->query("UPDATE ".TABLE_PREFIX."threads SET uid='".$destuser['uid']."', username='".$destuser['username']."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."threads SET lastposter='".$destuser['username']."', username='".$destuser['username']."' WHERE lastposter='".$sourceuser['username']."'");
| $db->query("UPDATE ".TABLE_PREFIX."threads SET uid='".$destuser['uid']."', username='".$db->escape_string($destuser['username'])."' WHERE uid='".$sourceuser['uid']."'"); $db->query("UPDATE ".TABLE_PREFIX."threads SET lastposter='".$db->escape_string($destuser['username'])."', username='".$db->escape_string($destuser['username'])."' WHERE lastposter='".$db->escape_string($sourceuser['username'])."'");
|
$db->query("DELETE FROM ".TABLE_PREFIX."users WHERE uid='".$sourceuser['uid']."'"); $db->query("DELETE FROM ".TABLE_PREFIX."banned WHERE uid='".$sourceuser['uid']."'"); $query = $db->query("SELECT COUNT(*) AS postnum FROM ".TABLE_PREFIX."posts WHERE uid='".$destuser['uid']."'"); $num = $db->fetch_array($query); $db->query("UPDATE ".TABLE_PREFIX."users SET postnum='".$num['postnum']."' WHERE uid='".$destuser['uid']."'");
|
$db->query("DELETE FROM ".TABLE_PREFIX."users WHERE uid='".$sourceuser['uid']."'"); $db->query("DELETE FROM ".TABLE_PREFIX."banned WHERE uid='".$sourceuser['uid']."'"); $query = $db->query("SELECT COUNT(*) AS postnum FROM ".TABLE_PREFIX."posts WHERE uid='".$destuser['uid']."'"); $num = $db->fetch_array($query); $db->query("UPDATE ".TABLE_PREFIX."users SET postnum='".$num['postnum']."' WHERE uid='".$destuser['uid']."'");
|
| update_stats(array('numusers' => '-1'));
|
$lang->users_merged = sprintf($lang->users_merged, $sourceuser['username'], $sourceuser['username'], $destuser['username']); cpmessage($lang->users_merged); }
| $lang->users_merged = sprintf($lang->users_merged, $sourceuser['username'], $sourceuser['username'], $destuser['username']); cpmessage($lang->users_merged); }
|
Zeile 873 | Zeile 890 |
---|
makelabelcode($lang->birthday, $birthday_dropdown); make_profile_field_input(); tablesubheader($lang->account_prefs);
|
makelabelcode($lang->birthday, $birthday_dropdown); make_profile_field_input(); tablesubheader($lang->account_prefs);
|
| makeyesnocode($lang->enable_dst, "enabledst", 'no');
|
makeyesnocode($lang->invisible_mode, "invisible", 'no'); makeyesnocode($lang->admin_emails, "allownotices", 'yes'); makeyesnocode($lang->hide_email, "hideemail", 'no');
| makeyesnocode($lang->invisible_mode, "invisible", 'no'); makeyesnocode($lang->admin_emails, "allownotices", 'yes'); makeyesnocode($lang->hide_email, "hideemail", 'no');
|
Zeile 951 | Zeile 969 |
---|
makelabelcode($lang->birthday, $birthday_dropdown); make_profile_field_input(0, $user['uid']); tablesubheader($lang->account_prefs);
|
makelabelcode($lang->birthday, $birthday_dropdown); make_profile_field_input(0, $user['uid']); tablesubheader($lang->account_prefs);
|
| makeyesnocode($lang->enable_dst, "enabledst", $user['dst']);
|
makeyesnocode($lang->invisible_mode, "invisible", $user['invisible']); makeyesnocode($lang->admin_emails, "allownotices", $user['allownotices']); makeyesnocode($lang->hide_email, "hideemail", $user['hideemail']); makeyesnocode($lang->email_notify, "emailnotify", $user['emailnotify']); makeyesnocode($lang->enable_pms, "receivepms", $user['receivepms']); makeyesnocode($lang->pm_popup, "pmpopup", $user['pmpopup']);
|
makeyesnocode($lang->invisible_mode, "invisible", $user['invisible']); makeyesnocode($lang->admin_emails, "allownotices", $user['allownotices']); makeyesnocode($lang->hide_email, "hideemail", $user['hideemail']); makeyesnocode($lang->email_notify, "emailnotify", $user['emailnotify']); makeyesnocode($lang->enable_pms, "receivepms", $user['receivepms']); makeyesnocode($lang->pm_popup, "pmpopup", $user['pmpopup']);
|
makeyesnocode($lang->pm_notify, "emailpmnotify", $user['emailpmnotify']);
| makeyesnocode($lang->pm_notify, "emailpmnotify", $user['pmnotify']);
|
makeinputcode($lang->time_offset, "timezoneoffset", $user['timezone']); if(!$user['style']) {
| makeinputcode($lang->time_offset, "timezoneoffset", $user['timezone']); if(!$user['style']) {
|
Zeile 1162 | Zeile 1181 |
---|
{ $membday = mktime(0, 0, 0, $membday[1], $membday[0], 0); $membday = gmdate("F j", $membday);
|
{ $membday = mktime(0, 0, 0, $membday[1], $membday[0], 0); $membday = gmdate("F j", $membday);
|
$membdayage = '';
| $membdayage = $lang->not_specified;
|
} } else
| } } else
|
Zeile 1830 | Zeile 1849 |
---|
"usergroup" => intval($mybb->input['usergroup']) ); $db->update_query(TABLE_PREFIX."users", $groupupdate, "uid='".$user['uid']."'");
|
"usergroup" => intval($mybb->input['usergroup']) ); $db->update_query(TABLE_PREFIX."users", $groupupdate, "uid='".$user['uid']."'");
|
| $db->delete_query(TABLE_PREFIX."forumsubscriptions", "uid = '{$user['uid']}'");
|
if($bancheck['uid']) { $banneduser = array(
| if($bancheck['uid']) { $banneduser = array(
|