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 2427 2006-11-23 17:28:27Z Tikitiki $
| * $Id: users.php 3317 2007-09-15 11:04:47Z CraKteR $
|
*/
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 623 | Zeile 621 |
---|
else { $searchop['start'] = ($searchop['page']-1) * $searchop['perpage'];
|
else { $searchop['start'] = ($searchop['page']-1) * $searchop['perpage'];
|
}
| }
|
$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( "pmnotice" => "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 967 | Zeile 986 |
---|
maketextareacode($lang->signature, "signature", $user['signature'], 6, 50); if(!$user['regip']) { $user['regip'] = " "; } makelabelcode($lang->reg_ip, $user['regip']);
|
maketextareacode($lang->signature, "signature", $user['signature'], 6, 50); if(!$user['regip']) { $user['regip'] = " "; } makelabelcode($lang->reg_ip, $user['regip']);
|
endtable();
| endtable();
|
endform($lang->update_user, $lang->reset_button); } if($mybb->input['action'] == "delete")
| endform($lang->update_user, $lang->reset_button); } if($mybb->input['action'] == "delete")
|
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 1396 | Zeile 1415 |
---|
$uids .= $u['uid'] . ','; } $conditions .= " AND '$uids' LIKE CONCAT('%,',uid,',%')";
|
$uids .= $u['uid'] . ','; } $conditions .= " AND '$uids' LIKE CONCAT('%,',uid,',%')";
|
}
| }
|
if(is_array($search['profilefields'])) { foreach($search['profilefields'] as $fid => $value)
| if(is_array($search['profilefields'])) { foreach($search['profilefields'] as $fid => $value)
|
Zeile 1432 | Zeile 1451 |
---|
if(!$searchop['perpage']) { $searchop['perpage'] = '30';
|
if(!$searchop['perpage']) { $searchop['perpage'] = '30';
|
}
| }
|
if(!$searchop['page']) { $searchop['page'] = '1';
| if(!$searchop['page']) { $searchop['page'] = '1';
|
Zeile 1467 | Zeile 1486 |
---|
while($usergroup = $db->fetch_array($query2)) { $usergroups[$usergroup['gid']] = $usergroup;
|
while($usergroup = $db->fetch_array($query2)) { $usergroups[$usergroup['gid']] = $usergroup;
|
}
| }
|
$lang->results_found = sprintf($lang->results_found, $numusers); cpheader(); starttable();
| $lang->results_found = sprintf($lang->results_found, $numusers); cpheader(); starttable();
|
Zeile 1538 | Zeile 1557 |
---|
echo "<td class=\"subheader\" align=\"center\">$lang->birthday</td>\n"; } if($searchdisp['regip'] == 'yes')
|
echo "<td class=\"subheader\" align=\"center\">$lang->birthday</td>\n"; } if($searchdisp['regip'] == 'yes')
|
{
| {
|
echo "<td class=\"subheader\" align=\"center\">$lang->reg_ip</td>\n"; } if($searchdisp['ops'] == 'yes')
| echo "<td class=\"subheader\" align=\"center\">$lang->reg_ip</td>\n"; } if($searchdisp['ops'] == 'yes')
|
Zeile 1556 | Zeile 1575 |
---|
while($user = $db->fetch_array($query)) { foreach($user as $name => $value)
|
while($user = $db->fetch_array($query)) { foreach($user as $name => $value)
|
{
| {
|
$user[$name] = htmlspecialchars_uni($value); } if($user['usergroup'] == 5)
| $user[$name] = htmlspecialchars_uni($value); } if($user['usergroup'] == 5)
|
Zeile 1568 | Zeile 1587 |
---|
if($searchdisp['uid'] == 'yes') { echo "<td class=\"$bgcolor\">$user[uid]</td>\n";
|
if($searchdisp['uid'] == 'yes') { echo "<td class=\"$bgcolor\">$user[uid]</td>\n";
|
}
| }
|
if($searchdisp['username'] == 'yes') { echo "<td class=\"$bgcolor\">$user[username]</td>\n"; } if($searchdisp['usergroup'] == 'yes')
|
if($searchdisp['username'] == 'yes') { echo "<td class=\"$bgcolor\">$user[username]</td>\n"; } if($searchdisp['usergroup'] == 'yes')
|
{
| {
|
echo "<td class=\"$bgcolor\" align=\"center\">"; if(isset($usergroups[$user['usergroup']]))
|
echo "<td class=\"$bgcolor\" align=\"center\">"; if(isset($usergroups[$user['usergroup']]))
|
{
| {
|
$group = $usergroups[$user['usergroup']]; echo "<b>".$group['title']."</b>"; }
| $group = $usergroups[$user['usergroup']]; echo "<b>".$group['title']."</b>"; }
|
Zeile 1592 | Zeile 1611 |
---|
echo "<br />".$ugroup['title']; } }
|
echo "<br />".$ugroup['title']; } }
|
}
| }
|
echo "</td>\n"; } if($searchdisp['email'] == 'yes')
| echo "</td>\n"; } if($searchdisp['email'] == 'yes')
|
Zeile 1627 | Zeile 1646 |
---|
if($searchdisp['usertitle'] == 'yes') { echo "<td class=\"$bgcolor\">$user[usertitle]</td>\n";
|
if($searchdisp['usertitle'] == 'yes') { echo "<td class=\"$bgcolor\">$user[usertitle]</td>\n";
|
}
| }
|
if($searchdisp['regdate'] == 'yes') { $date = gmdate("d-m-Y", $user['regdate']);
| if($searchdisp['regdate'] == 'yes') { $date = gmdate("d-m-Y", $user['regdate']);
|
Zeile 1676 | Zeile 1695 |
---|
{ foreach($search as $key => $val) {
|
{ foreach($search as $key => $val) {
|
if($key != 'additionalgroups' && $key != "profilefields")
| if($key != 'usergroups' && $key != 'additionalgroups' && $key != "profilefields")
|
{ $hiddens .= "<input type=\"hidden\" name=\"search[$key]\" value=\"$val\" />"; } } }
|
{ $hiddens .= "<input type=\"hidden\" name=\"search[$key]\" value=\"$val\" />"; } } }
|
| if(is_array($search['usergroups'])) { foreach($search['usergroups'] as $key => $val) { $hiddens .= "<input type=\"hidden\" name=\"search[usergroups][]\" value=\"$val\" />"; } } else if($search['usergroups']) { $hiddens .= "<input type=\"hidden\" name=\"search[usergroups]\" value=\"$val\" />"; }
|
if(is_array($search['additionalgroups'])) { foreach($search['additionalgroups'] as $key => $val)
| if(is_array($search['additionalgroups'])) { foreach($search['additionalgroups'] as $key => $val)
|