Zeile 6 | Zeile 6 |
---|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html *
|
* Website: http://www.mybboard.net * License: http://www.mybboard.net/eula.html *
|
* $Id: usercp.php 3055 2007-05-13 15:01:15Z Tikitiki $
| * $Id: usercp.php 3598 2008-01-20 20:42:43Z Tikitiki $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 157 | Zeile 157 |
---|
if($mybb->input['action'] == "do_profile" && $mybb->request_method == "post") {
|
if($mybb->input['action'] == "do_profile" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_profile_start");
if($mybb->input['away'] == "yes" && $mybb->settings['allowaway'] != "no")
| $plugins->run_hooks("usercp_do_profile_start");
if($mybb->input['away'] == "yes" && $mybb->settings['allowaway'] != "no")
|
Zeile 267 | Zeile 270 |
---|
$bday[0] = $mybb->input['bday1']; $bday[1] = $mybb->input['bday2']; $bday[2] = intval($mybb->input['bday3']);
|
$bday[0] = $mybb->input['bday1']; $bday[1] = $mybb->input['bday2']; $bday[2] = intval($mybb->input['bday3']);
|
}
| }
|
else { $user = $mybb->user; $bday = explode("-", $user['birthday']);
|
else { $user = $mybb->user; $bday = explode("-", $user['birthday']);
|
}
| }
|
$plugins->run_hooks("usercp_profile_start");
$bdaysel = '';
| $plugins->run_hooks("usercp_profile_start");
$bdaysel = '';
|
Zeile 289 | Zeile 292 |
---|
} } $bdaymonthsel[$bday[1]] = "selected";
|
} } $bdaymonthsel[$bday[1]] = "selected";
|
|
|
if($user['website'] == "" || $user['website'] == "http://") { $user['website'] = "http://";
| if($user['website'] == "" || $user['website'] == "http://") { $user['website'] = "http://";
|
Zeile 333 | Zeile 336 |
---|
} else {
|
} else {
|
| $user['awayreason'] = htmlspecialchars_uni($user['awayreason']);
|
if($mybb->user['away'] == "yes") { $awaydate = my_date($mybb->settings['dateformat'], $mybb->user['awaydate']);
| if($mybb->user['away'] == "yes") { $awaydate = my_date($mybb->settings['dateformat'], $mybb->user['awaydate']);
|
Zeile 563 | Zeile 566 |
---|
if($mybb->input['action'] == "do_options" && $mybb->request_method == "post") {
|
if($mybb->input['action'] == "do_options" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_options_start");
// Set up user handler.
| $plugins->run_hooks("usercp_do_options_start");
// Set up user handler.
|
Zeile 615 | Zeile 621 |
---|
$errors = $userhandler->get_friendly_errors(); $errors = inline_error($errors); $mybb->input['action'] = "options";
|
$errors = $userhandler->get_friendly_errors(); $errors = inline_error($errors); $mybb->input['action'] = "options";
|
} else
| } else
|
{ $userhandler->update_user();
| { $userhandler->update_user();
|
Zeile 630 | Zeile 636 |
---|
if($mybb->input['remember'] == "yes") { my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], null, true);
|
if($mybb->input['remember'] == "yes") { my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], null, true);
|
}
| }
|
else { my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], -1, true);
| else { my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], -1, true);
|
Zeile 671 | Zeile 677 |
---|
if($user['allownotices'] == "yes") { $allownoticescheck = "checked=\"checked\"";
|
if($user['allownotices'] == "yes") { $allownoticescheck = "checked=\"checked\"";
|
} else {
| } else {
|
$allownoticescheck = ""; }
| $allownoticescheck = ""; }
|
Zeile 738 | Zeile 744 |
---|
else { $remembercheck = "";
|
else { $remembercheck = "";
|
}
| }
|
if($user['receivepms'] == "yes")
|
if($user['receivepms'] == "yes")
|
{
| {
|
$receivepmscheck = "checked=\"checked\"";
|
$receivepmscheck = "checked=\"checked\"";
|
} else {
| } else {
|
$receivepmscheck = ""; }
if($user['pmpopup'] == "yes") { $pmpopupcheck = "checked=\"checked\"";
|
$receivepmscheck = ""; }
if($user['pmpopup'] == "yes") { $pmpopupcheck = "checked=\"checked\"";
|
} else
| } else
|
{ $pmpopupcheck = ""; }
| { $pmpopupcheck = ""; }
|
Zeile 770 | Zeile 776 |
---|
if($user['showcodebuttons'] == 1) { $showcodebuttonscheck = "checked=\"checked\"";
|
if($user['showcodebuttons'] == 1) { $showcodebuttonscheck = "checked=\"checked\"";
|
} else
| } else
|
{ $showcodebuttonscheck = ""; }
| { $showcodebuttonscheck = ""; }
|
Zeile 883 | Zeile 889 |
---|
if($mybb->input['action'] == "do_email" && $mybb->request_method == "post") {
|
if($mybb->input['action'] == "do_email" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$errors = array();
$plugins->run_hooks("usercp_do_email_start");
| $errors = array();
$plugins->run_hooks("usercp_do_email_start");
|
Zeile 932 | Zeile 941 |
---|
my_mail($mybb->input['email'], $lang->emailsubject_changeemail, $lang->email_changeemail); $plugins->run_hooks("usercp_do_email_verify"); error($lang->redirect_changeemail_activation);
|
my_mail($mybb->input['email'], $lang->emailsubject_changeemail, $lang->email_changeemail); $plugins->run_hooks("usercp_do_email_verify"); error($lang->redirect_changeemail_activation);
|
}
| }
|
else { $userhandler->update_user();
| else { $userhandler->update_user();
|
Zeile 969 | Zeile 978 |
---|
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post") {
|
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$errors = array();
$plugins->run_hooks("usercp_do_password_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false) { $errors[] = $lang->error_invalidpassword;
|
$errors = array();
$plugins->run_hooks("usercp_do_password_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false) { $errors[] = $lang->error_invalidpassword;
|
}
| }
|
else { // Set up user handler.
| else { // Set up user handler.
|
Zeile 1004 | Zeile 1016 |
---|
} if(count($errors) > 0) {
|
} if(count($errors) > 0) {
|
$mybb->input['action'] = "password"; $errors = inline_error($errors);
| $mybb->input['action'] = "password"; $errors = inline_error($errors);
|
}
|
}
|
}
| }
|
if($mybb->input['action'] == "password")
|
if($mybb->input['action'] == "password")
|
{
| {
|
$plugins->run_hooks("usercp_password_start"); eval("\$editpassword = \"".$templates->get("usercp_password")."\";"); $plugins->run_hooks("usercp_password_end");
| $plugins->run_hooks("usercp_password_start"); eval("\$editpassword = \"".$templates->get("usercp_password")."\";"); $plugins->run_hooks("usercp_password_end");
|
Zeile 1019 | Zeile 1031 |
---|
if($mybb->input['action'] == "do_changename" && $mybb->request_method == "post") {
|
if($mybb->input['action'] == "do_changename" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_changename_start"); if($mybb->usergroup['canchangename'] != "yes") {
| $plugins->run_hooks("usercp_do_changename_start"); if($mybb->usergroup['canchangename'] != "yes") {
|
Zeile 1110 | Zeile 1125 |
---|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) WHERE f.type='f' AND f.uid='".$mybb->user['uid']."' ORDER BY t.lastpost DESC
|
LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid) WHERE f.type='f' AND f.uid='".$mybb->user['uid']."' ORDER BY t.lastpost DESC
|
| LIMIT {$start}, {$perpage}
|
"); while($favorite = $db->fetch_array($query)) {
| "); while($favorite = $db->fetch_array($query)) {
|
Zeile 1351 | Zeile 1367 |
---|
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post") {
|
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_editsig_start"); if($mybb->input['updateposts'] == "enable") {
| $plugins->run_hooks("usercp_do_editsig_start"); if($mybb->input['updateposts'] == "enable") {
|
Zeile 1373 | Zeile 1392 |
---|
$db->update_query(TABLE_PREFIX."users", $new_signature, "uid='".$mybb->user['uid']."'"); $plugins->run_hooks("usercp_do_editsig_end"); redirect("usercp.php?action=editsig", $lang->redirect_sigupdated);
|
$db->update_query(TABLE_PREFIX."users", $new_signature, "uid='".$mybb->user['uid']."'"); $plugins->run_hooks("usercp_do_editsig_end"); redirect("usercp.php?action=editsig", $lang->redirect_sigupdated);
|
|
|
}
if($mybb->input['action'] == "editsig")
| }
if($mybb->input['action'] == "editsig")
|
Zeile 1385 | Zeile 1404 |
---|
$template = "usercp_editsig_preview"; } else if(!$error)
|
$template = "usercp_editsig_preview"; } else if(!$error)
|
{
| {
|
$sig = $mybb->user['signature']; $template = "usercp_editsig_current"; }
| $sig = $mybb->user['signature']; $template = "usercp_editsig_current"; }
|
Zeile 1406 | Zeile 1425 |
---|
if($mybb->settings['sigsmilies'] == "yes") { $sigsmilies = $lang->on;
|
if($mybb->settings['sigsmilies'] == "yes") { $sigsmilies = $lang->on;
|
} else
| } else
|
{ $sigsmilies = $lang->off; }
| { $sigsmilies = $lang->off; }
|
Zeile 1430 | Zeile 1449 |
---|
if($mybb->settings['sigimgcode'] == "yes") { $sigimgcode = $lang->on;
|
if($mybb->settings['sigimgcode'] == "yes") { $sigimgcode = $lang->on;
|
}
| }
|
else { $sigimgcode = $lang->off;
| else { $sigimgcode = $lang->off;
|
Zeile 1438 | Zeile 1457 |
---|
$sig = htmlspecialchars_uni($sig); $lang->edit_sig_note2 = sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']); eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");
|
$sig = htmlspecialchars_uni($sig); $lang->edit_sig_note2 = sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']); eval("\$editsig = \"".$templates->get("usercp_editsig")."\";");
|
$plugins->run_hooks("usercp_endsig_end");
| $plugins->run_hooks("usercp_editsig_end");
|
output_page($editsig); }
if($mybb->input['action'] == "do_avatar" && $mybb->request_method == "post")
|
output_page($editsig); }
if($mybb->input['action'] == "do_avatar" && $mybb->request_method == "post")
|
{
| { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_avatar_start"); require_once MYBB_ROOT."inc/functions_upload.php"; if($mybb->input['remove']) // remove avatar
| $plugins->run_hooks("usercp_do_avatar_start"); require_once MYBB_ROOT."inc/functions_upload.php"; if($mybb->input['remove']) // remove avatar
|
Zeile 1484 | Zeile 1506 |
---|
} remove_avatars($mybb->user['uid']); }
|
} remove_avatars($mybb->user['uid']); }
|
}
| }
|
elseif($_FILES['avatarupload']['name']) // upload avatar { if($mybb->usergroup['canuploadavatars'] == "no")
| elseif($_FILES['avatarupload']['name']) // upload avatar { if($mybb->usergroup['canuploadavatars'] == "no")
|
Zeile 1515 | Zeile 1537 |
---|
$mybb->input['avatarurl'] = preg_replace("#script:#i", "", $mybb->input['avatarurl']); $mybb->input['avatarurl'] = htmlspecialchars($mybb->input['avatarurl']); $ext = get_extension($mybb->input['avatarurl']);
|
$mybb->input['avatarurl'] = preg_replace("#script:#i", "", $mybb->input['avatarurl']); $mybb->input['avatarurl'] = htmlspecialchars($mybb->input['avatarurl']); $ext = get_extension($mybb->input['avatarurl']);
|
list($width, $height, $type) = @getimagesize($mybb->input['avatarurl']);
| |
|
|
if(!$type) {
| // Copy the avatar to the local server (work around remote URL access disabled for getimagesize) $file = fetch_remote_file($mybb->input['avatarurl']); if(!$file) {
|
$avatar_error = $lang->error_invalidavatarurl;
|
$avatar_error = $lang->error_invalidavatarurl;
|
| } else { $tmp_name = $mybb->settings['avataruploadpath']."/remote_".md5(uniqid(rand(), true)); $fp = @fopen($tmp_name, "wb"); if(!$fp) { $avatar_error = $lang->error_invalidavatarurl; } else { fwrite($fp, $file); fclose($fp); list($width, $height, $type) = @getimagesize($tmp_name); @unlink($tmp_name); if(!$type) { $avatar_error = $lang->error_invalidavatarurl; } }
|
}
if(empty($avatar_error))
| }
if(empty($avatar_error))
|
Zeile 1599 | Zeile 1642 |
---|
// Get a listing of avatars in this gallery $avatardir = $mybb->settings['avatardir']; if($gallery != "default")
|
// Get a listing of avatars in this gallery $avatardir = $mybb->settings['avatardir']; if($gallery != "default")
|
{
| {
|
$avatardir .= "/$gallery"; } $opendir = opendir($avatardir);
| $avatardir .= "/$gallery"; } $opendir = opendir($avatardir);
|
Zeile 1627 | Zeile 1670 |
---|
if($mybb->user['avatar'] == $avatarpath) { $checked = "checked=\"checked\"";
|
if($mybb->user['avatar'] == $avatarpath) { $checked = "checked=\"checked\"";
|
}
| }
|
if($count == 5) { $avatarlist .= "</tr>\n<tr>\n";
| if($count == 5) { $avatarlist .= "</tr>\n<tr>\n";
|
Zeile 1635 | Zeile 1678 |
---|
} $count++; eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_avatar")."\";");
|
} $count++; eval("\$avatarlist .= \"".$templates->get("usercp_avatar_gallery_avatar")."\";");
|
}
| }
|
if($count != 0) { for($i = $count; $i <= 5; $i++)
| if($count != 0) { for($i = $count; $i <= 5; $i++)
|
Zeile 1656 | Zeile 1699 |
---|
else { if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))
|
else { if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))
|
{
| {
|
$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>"; } elseif($mybb->user['avatartype'] == "gallery" || stristr($mybb->user['avatar'], $mybb->settings['avatardir']))
|
$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>"; } elseif($mybb->user['avatartype'] == "gallery" || stristr($mybb->user['avatar'], $mybb->settings['avatardir']))
|
{
| {
|
$avatarmsg = "<br /><strong>".$lang->using_gallery_avatar."</strong>"; } elseif($mybb->user['avatartype'] == "remote" || strstr(strtolower($mybb->user['avatar']), "http://") !== false) { $avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>"; $avatarurl = htmlspecialchars_uni($mybb->user['avatar']);
|
$avatarmsg = "<br /><strong>".$lang->using_gallery_avatar."</strong>"; } elseif($mybb->user['avatartype'] == "remote" || strstr(strtolower($mybb->user['avatar']), "http://") !== false) { $avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>"; $avatarurl = htmlspecialchars_uni($mybb->user['avatar']);
|
}
| }
|
$urltoavatar = htmlspecialchars_uni($mybb->user['avatar']); if($mybb->user['avatar'])
|
$urltoavatar = htmlspecialchars_uni($mybb->user['avatar']); if($mybb->user['avatar'])
|
{
| {
|
$avatar_dimensions = explode("|", $mybb->user['avatardimensions']); if($avatar_dimensions[0] && $avatar_dimensions[1]) {
| $avatar_dimensions = explode("|", $mybb->user['avatardimensions']); if($avatar_dimensions[0] && $avatar_dimensions[1]) {
|
Zeile 1684 | Zeile 1727 |
---|
$colspan = 2; } if($mybb->settings['maxavatardims'] != "")
|
$colspan = 2; } if($mybb->settings['maxavatardims'] != "")
|
{
| {
|
list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']); $lang->avatar_note .= "<br />".sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight); }
| list($maxwidth, $maxheight) = explode("x", $mybb->settings['maxavatardims']); $lang->avatar_note .= "<br />".sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight); }
|
Zeile 1708 | Zeile 1751 |
---|
} if($mybb->input['action'] == "do_notepad" && $mybb->request_method == "post") {
|
} if($mybb->input['action'] == "do_notepad" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_notepad_start"); $db->update_query(TABLE_PREFIX."users", array('notepad' => $db->escape_string($mybb->input['notepad'])), "uid='".$mybb->user['uid']."'"); $plugins->run_hooks("usercp_do_notepad_end"); redirect("usercp.php", $lang->redirect_notepadupdated);
|
$plugins->run_hooks("usercp_do_notepad_start"); $db->update_query(TABLE_PREFIX."users", array('notepad' => $db->escape_string($mybb->input['notepad'])), "uid='".$mybb->user['uid']."'"); $plugins->run_hooks("usercp_do_notepad_end"); redirect("usercp.php", $lang->redirect_notepadupdated);
|
}
| }
|
if($mybb->input['action'] == "editlists") { $plugins->run_hooks("usercp_editlists_start");
| if($mybb->input['action'] == "editlists") { $plugins->run_hooks("usercp_editlists_start");
|
Zeile 1723 | Zeile 1769 |
---|
if(is_array($buddyarray)) { foreach($buddyarray as $key => $buddyid)
|
if(is_array($buddyarray)) { foreach($buddyarray as $key => $buddyid)
|
{
| {
|
$buddysql .= "$comma'$buddyid'"; $comma = ",";
|
$buddysql .= "$comma'$buddyid'"; $comma = ",";
|
}
| }
|
$query = $db->simple_select(TABLE_PREFIX."users", "username, uid", "uid IN ($buddysql)"); while($buddy = $db->fetch_array($query)) {
| $query = $db->simple_select(TABLE_PREFIX."users", "username, uid", "uid IN ($buddysql)"); while($buddy = $db->fetch_array($query)) {
|
Zeile 1740 | Zeile 1786 |
---|
$ignorelist = ''; $ignorearray = explode(",", $mybb->user['ignorelist']); if(is_array($ignorearray))
|
$ignorelist = ''; $ignorearray = explode(",", $mybb->user['ignorelist']); if(is_array($ignorearray))
|
{
| {
|
foreach($ignorearray as $key => $ignoreid) { $ignoresql .= "$comma2'$ignoreid'";
| foreach($ignorearray as $key => $ignoreid) { $ignoresql .= "$comma2'$ignoreid'";
|
Zeile 1753 | Zeile 1799 |
---|
$username = $ignoreuser['username']; eval("\$ignorelist .= \"".$templates->get("usercp_editlists_user")."\";"); }
|
$username = $ignoreuser['username']; eval("\$ignorelist .= \"".$templates->get("usercp_editlists_user")."\";"); }
|
}
| }
|
$newlist = ''; for($i = 1; $i <= 2; $i++) {
| $newlist = ''; for($i = 1; $i <= 2; $i++) {
|
Zeile 1767 | Zeile 1813 |
---|
} if($mybb->input['action'] == "do_editlists" && $mybb->request_method == "post") {
|
} if($mybb->input['action'] == "do_editlists" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_editlists_start"); $comma = ''; $users = '';
| $plugins->run_hooks("usercp_do_editlists_start"); $comma = ''; $users = '';
|
Zeile 1824 | Zeile 1873 |
---|
$type = "post"; } elseif($draft['threadvisible'] == -2) // We're looking at a draft thread
|
$type = "post"; } elseif($draft['threadvisible'] == -2) // We're looking at a draft thread
|
{
| {
|
$detail = $lang->forum." <a href=\"forumdisplay.php?fid=".$draft['fid']."\">".htmlspecialchars_uni($draft['forumname'])."</a>"; $editurl = "newthread.php?action=editdraft&tid=$draft[tid]"; $id = $draft['tid'];
| $detail = $lang->forum." <a href=\"forumdisplay.php?fid=".$draft['fid']."\">".htmlspecialchars_uni($draft['forumname'])."</a>"; $editurl = "newthread.php?action=editdraft&tid=$draft[tid]"; $id = $draft['tid'];
|
Zeile 1838 | Zeile 1887 |
---|
if(!$drafts) { eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";");
|
if(!$drafts) { eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";");
|
}
| }
|
else { eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";");
| else { eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";");
|
Zeile 1850 | Zeile 1899 |
---|
} if($mybb->input['action'] == "do_drafts" && $mybb->request_method == "post") {
|
} if($mybb->input['action'] == "do_drafts" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_drafts_start"); if(!$mybb->input['deletedraft'])
|
$plugins->run_hooks("usercp_do_drafts_start"); if(!$mybb->input['deletedraft'])
|
{
| {
|
error($lang->no_drafts_selected); } $pidin = array();
| error($lang->no_drafts_selected); } $pidin = array();
|
Zeile 1880 | Zeile 1932 |
---|
{ $pidin = implode(",", $pidin); $pidinq = "pid IN ($pidin)";
|
{ $pidin = implode(",", $pidin); $pidinq = "pid IN ($pidin)";
|
}
| }
|
else { $pidinq = "1=0";
| else { $pidinq = "1=0";
|
Zeile 1898 | Zeile 1950 |
---|
// Changing our display group if($mybb->input['displaygroup']) {
|
// Changing our display group if($mybb->input['displaygroup']) {
|
if(!strstr($ingroups, ",".$mybb->input['displaygroup'].","))
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
|
{ error($lang->not_member_of_group); }
| { error($lang->not_member_of_group); }
|
Zeile 1917 | Zeile 1972 |
---|
// Leaving a group if($mybb->input['leavegroup']) {
|
// Leaving a group if($mybb->input['leavegroup']) {
|
if(!strstr($ingroups, ",".$mybb->input['leavegroup'].","))
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']); if(strpos($ingroups, ",".$mybb->input['leavegroup'].",") === false)
|
{ error($lang->not_member_of_group);
|
{ error($lang->not_member_of_group);
|
}
| }
|
if($mybb->user['usergroup'] == $mybb->input['leavegroup']) { error($lang->cannot_leave_primary_group);
| if($mybb->user['usergroup'] == $mybb->input['leavegroup']) { error($lang->cannot_leave_primary_group);
|
Zeile 1934 | Zeile 1992 |
---|
leave_usergroup($mybb->user['uid'], $mybb->input['leavegroup']); $plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group);
|
leave_usergroup($mybb->user['uid'], $mybb->input['leavegroup']); $plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group);
|
| exit;
|
}
// Joining a group if($mybb->input['joingroup']) {
|
}
// Joining a group if($mybb->input['joingroup']) {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$mybb->input['joingroup'] = intval($mybb->input['joingroup']); $query = $db->simple_select(TABLE_PREFIX."usergroups", "*", "gid='".intval($mybb->input['joingroup'])."'"); $usergroup = $db->fetch_array($query);
| $mybb->input['joingroup'] = intval($mybb->input['joingroup']); $query = $db->simple_select(TABLE_PREFIX."usergroups", "*", "gid='".intval($mybb->input['joingroup'])."'"); $usergroup = $db->fetch_array($query);
|
Zeile 1948 | Zeile 2010 |
---|
error($lang->cannot_join_group); }
|
error($lang->cannot_join_group); }
|
if(strstr($ingroups, ",".intval($mybb->input['joingroup']).",") || $mybb->user['usergroup'] == $mybb->input['joingroup'] || $mybb->user['displaygroup'] == $mybb->input['joingroup'])
| if(strpos($ingroups, ",".intval($mybb->input['joingroup']).",") !== false)
|
{ error($lang->already_member_of_group); }
| { error($lang->already_member_of_group); }
|
Zeile 2068 | Zeile 2130 |
---|
} else {
|
} else {
|
$leavelink = "<div align=\"center\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."\">".$lang->usergroup_leave."</a></div>";
| $leavelink = "<div align=\"center\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."&my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";
|
} if($usergroup['description']) {
| } if($usergroup['description']) {
|
Zeile 2142 | Zeile 2204 |
---|
} else {
|
} else {
|
$joinlink = "<a href=\"usercp.php?action=usergroups&joingroup={$usergroup['gid']}\">{$lang->join_group}</a>";
| $joinlink = "<a href=\"usercp.php?action=usergroups&joingroup={$usergroup['gid']}&my_post_key={$mybb->post_code}\">{$lang->join_group}</a>";
|
} $usergroupleaders = ''; if($groupleaders[$usergroup['gid']])
| } $usergroupleaders = ''; if($groupleaders[$usergroup['gid']])
|
Zeile 2234 | Zeile 2296 |
---|
} if($mybb->input['action'] == "do_attachments" && $mybb->request_method == "post") {
|
} if($mybb->input['action'] == "do_attachments" && $mybb->request_method == "post") {
|
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
$plugins->run_hooks("usercp_do_attachments_start"); require_once MYBB_ROOT."inc/functions_upload.php"; if(!is_array($mybb->input['attachments']))
| $plugins->run_hooks("usercp_do_attachments_start"); require_once MYBB_ROOT."inc/functions_upload.php"; if(!is_array($mybb->input['attachments']))
|