Zeile 1 | Zeile 1 |
---|
<?php /** * MyBB 1.4
|
<?php /** * MyBB 1.4
|
* Copyright � 2008 MyBB Group, All Rights Reserved
| * Copyright � 2008 MyBB Group, All Rights Reserved
|
* * 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: usercp.php 4314 2009-01-31 00:43:26Z Tikitiki $
| * $Id: usercp.php 5379 2011-02-21 11:06:42Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 73 | Zeile 73 |
---|
} else if($mybb->settings['siglength'] > 0) {
|
} else if($mybb->settings['siglength'] > 0) {
|
if($mybb->settings['sigcountmycode'] == 1)
| if($mybb->settings['sigcountmycode'] == 0)
|
{ $parsed_sig = $parser->text_parse_message($mybb->input['signature']); }
| { $parsed_sig = $parser->text_parse_message($mybb->input['signature']); }
|
Zeile 173 | Zeile 173 |
---|
$awaydate = TIME_NOW; if($mybb->input['awayday']) {
|
$awaydate = TIME_NOW; if($mybb->input['awayday']) {
|
| // If the user has indicated that they will return on a specific day, but not month or year, assume it is current month and year
|
if(!$mybb->input['awaymonth']) { $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
if(!$mybb->input['awaymonth']) { $mybb->input['awaymonth'] = my_date('n', $awaydate); }
|
| |
if(!$mybb->input['awayyear']) { $mybb->input['awayyear'] = my_date('Y', $awaydate);
|
if(!$mybb->input['awayyear']) { $mybb->input['awayyear'] = my_date('Y', $awaydate);
|
}
| } $return_month = intval(substr($mybb->input['awaymonth'], 0, 2)); $return_day = intval(substr($mybb->input['awayday'], 0, 2)); $return_year = min(intval($mybb->input['awayyear']), 9999);
|
|
|
$returntimestamp = gmmktime(0, 0, 0, $mybb->input['awaymonth'], $mybb->input['awayday'], $mybb->input['awayyear']);
| // Check if return date is after the away date. $returntimestamp = gmmktime(0, 0, 0, $return_month, $return_day, $return_year);
|
$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));
|
$awaytimestamp = gmmktime(0, 0, 0, my_date('n', $awaydate), my_date('j', $awaydate), my_date('Y', $awaydate));
|
if ($returntimestamp < $awaytimestamp && $mybb->input['awayyear'] < my_date("Y"))
| if($return_year < my_date('Y', $awaydate) || ($returntimestamp < $awaytimestamp && $return_year == my_date('Y', $awaydate)))
|
{ error($lang->error_usercp_return_date_past); }
|
{ error($lang->error_usercp_return_date_past); }
|
$returndate = intval($mybb->input['awayday'])."-".intval($mybb->input['awaymonth'])."-".intval($mybb->input['awayyear']);
| $returndate = "{$return_day}-{$return_month}-{$return_year}";
|
} else {
| } else {
|
Zeile 216 | Zeile 222 |
---|
"day" => $mybb->input['bday1'], "month" => $mybb->input['bday2'], "year" => $mybb->input['bday3']
|
"day" => $mybb->input['bday1'], "month" => $mybb->input['bday2'], "year" => $mybb->input['bday3']
|
);
| );
|
// Set up user handler. require_once "inc/datahandlers/user.php";
| // Set up user handler. require_once "inc/datahandlers/user.php";
|
Zeile 287 | Zeile 293 |
---|
if($bday[0] == $i) { $bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
if($bday[0] == $i) { $bdaydaysel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n";
|
} else
| } else
|
{ $bdaydaysel .= "<option value=\"$i\">$i</option>\n"; }
|
{ $bdaydaysel .= "<option value=\"$i\">$i</option>\n"; }
|
} $bdaymonthsel[$bday[1]] = "selected";
| } $bdaymonthsel[$bday[1]] = 'selected="selected"';
|
$bdayprivacysel = ''; if($user['birthdayprivacy'] == 'all' || !$user['birthdayprivacy']) {
| $bdayprivacysel = ''; if($user['birthdayprivacy'] == 'all' || !$user['birthdayprivacy']) {
|
Zeile 303 | Zeile 309 |
---|
$bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>"; } else if($user['birthdayprivacy'] == 'none')
|
$bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>"; } else if($user['birthdayprivacy'] == 'none')
|
{
| {
|
$bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n"; $bdayprivacysel .= "<option value=\"none\" selected=\"selected\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>";
|
$bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n"; $bdayprivacysel .= "<option value=\"none\" selected=\"selected\">{$lang->birthdayprivacynone}</option>\n"; $bdayprivacysel .= "<option value=\"age\">{$lang->birthdayprivacyage}</option>";
|
}
| }
|
else if($user['birthdayprivacy'] == 'age') { $bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n";
| else if($user['birthdayprivacy'] == 'age') { $bdayprivacysel .= "<option value=\"all\">{$lang->birthdayprivacyall}</option>\n";
|
Zeile 316 | Zeile 322 |
---|
}
if($user['website'] == "" || $user['website'] == "http://")
|
}
if($user['website'] == "" || $user['website'] == "http://")
|
{
| {
|
$user['website'] = "http://"; } else
| $user['website'] = "http://"; } else
|
Zeile 325 | Zeile 331 |
---|
}
if($user['icq'] != "0")
|
}
if($user['icq'] != "0")
|
{
| {
|
$user['icq'] = intval($user['icq']); } if($user['icq'] == 0)
| $user['icq'] = intval($user['icq']); } if($user['icq'] == 0)
|
Zeile 425 | Zeile 431 |
---|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
} } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
| } } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
|
$sel = ""; if($val == $seloptions[$val])
|
$sel = ""; if($val == $seloptions[$val])
|
{ $sel = " selected=\"selected\"";
| { $sel = " selected=\"selected\"";
|
} $select .= "<option value=\"$val\"$sel>$val</option>\n";
|
} $select .= "<option value=\"$val\"$sel>$val</option>\n";
|
} if(!$profilefield['length'])
| } if(!$profilefield['length'])
|
{ $profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
{ $profilefield['length'] = 3; } $code = "<select name=\"profile_fields[$field][]\" size=\"{$profilefield['length']}\" multiple=\"multiple\">$select</select>";
|
}
| }
|
} elseif($type == "select") {
| } elseif($type == "select") {
|
Zeile 470 | Zeile 476 |
---|
$profilefield['length'] = 1; } $code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";
|
$profilefield['length'] = 1; } $code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>";
|
}
| }
|
} elseif($type == "radio") {
| } elseif($type == "radio") {
|
Zeile 578 | Zeile 584 |
---|
{ $newtitle = htmlspecialchars_uni($user['usertitle']); $user['usertitle'] = $mybb->user['usertitle'];
|
{ $newtitle = htmlspecialchars_uni($user['usertitle']); $user['usertitle'] = $mybb->user['usertitle'];
|
} }
| } }
|
eval("\$customtitle = \"".$templates->get("usercp_profile_customtitle")."\";"); } else
| eval("\$customtitle = \"".$templates->get("usercp_profile_customtitle")."\";"); } else
|
Zeile 649 | Zeile 655 |
---|
$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();
// If the cookie settings are different, re-set the cookie
| $userhandler->update_user();
// If the cookie settings are different, re-set the cookie
|
Zeile 670 | Zeile 676 |
---|
my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], -1, true); } }
|
my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], -1, true); } }
|
|
|
$plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
| $plugins->run_hooks("usercp_do_options_end");
redirect("usercp.php", $lang->redirect_optionsupdated);
|
Zeile 688 | Zeile 694 |
---|
else { $user = $mybb->user;
|
else { $user = $mybb->user;
|
}
| }
|
$languages = $lang->get_languages(); $langoptions = ''; foreach($languages as $lname => $language)
|
$languages = $lang->get_languages(); $langoptions = ''; foreach($languages as $lname => $language)
|
{
| {
|
$sel = ""; if($user['language'] == $lname) {
| $sel = ""; if($user['language'] == $lname) {
|
Zeile 705 | Zeile 711 |
---|
if($user['allownotices'] == 1) { $allownoticescheck = "checked=\"checked\"";
|
if($user['allownotices'] == 1) { $allownoticescheck = "checked=\"checked\"";
|
}
| }
|
else { $allownoticescheck = "";
|
else { $allownoticescheck = "";
|
}
| }
|
if($user['invisible'] == 1) { $invisiblecheck = "checked=\"checked\"";
|
if($user['invisible'] == 1) { $invisiblecheck = "checked=\"checked\"";
|
}
| }
|
else { $invisiblecheck = "";
|
else { $invisiblecheck = "";
|
}
| }
|
if($user['hideemail'] == 1) { $hideemailcheck = "checked=\"checked\"";
|
if($user['hideemail'] == 1) { $hideemailcheck = "checked=\"checked\"";
|
} else
| } else
|
{ $hideemailcheck = ""; }
| { $hideemailcheck = ""; }
|
Zeile 736 | Zeile 742 |
---|
else if($user['subscriptionmethod'] == 2) { $instant_email_subscribe_selected = "selected=\"selected\"";
|
else if($user['subscriptionmethod'] == 2) { $instant_email_subscribe_selected = "selected=\"selected\"";
|
} else {
| } else {
|
$no_subscribe_selected = "selected=\"selected\""; }
if($user['showsigs'] == 1) { $showsigscheck = "checked=\"checked\"";;
|
$no_subscribe_selected = "selected=\"selected\""; }
if($user['showsigs'] == 1) { $showsigscheck = "checked=\"checked\"";;
|
} else {
| } else {
|
$showsigscheck = ""; }
| $showsigscheck = ""; }
|
Zeile 756 | Zeile 762 |
---|
$showavatarscheck = "checked=\"checked\""; } else
|
$showavatarscheck = "checked=\"checked\""; } else
|
{
| {
|
$showavatarscheck = ""; }
if($user['showquickreply'] == 1)
|
$showavatarscheck = ""; }
if($user['showquickreply'] == 1)
|
{
| {
|
$showquickreplycheck = "checked=\"checked\"";
|
$showquickreplycheck = "checked=\"checked\"";
|
} else {
| } else {
|
$showquickreplycheck = ""; }
if($user['remember'] == 1) { $remembercheck = "checked=\"checked\"";
|
$showquickreplycheck = ""; }
if($user['remember'] == 1) { $remembercheck = "checked=\"checked\"";
|
} else
| } else
|
{ $remembercheck = "";
|
{ $remembercheck = "";
|
}
| }
|
if($user['receivepms'] == 1) { $receivepmscheck = "checked=\"checked\"";
|
if($user['receivepms'] == 1) { $receivepmscheck = "checked=\"checked\"";
|
}
| }
|
else { $receivepmscheck = "";
|
else { $receivepmscheck = "";
|
}
| }
|
if($user['pmnotice'] == 1 || $user['pmnotice'] == 2) {
| if($user['pmnotice'] == 1 || $user['pmnotice'] == 2) {
|
Zeile 794 | Zeile 800 |
---|
else { $pmnoticecheck = "";
|
else { $pmnoticecheck = "";
|
}
if($user['dstcorrection'] == 2) {
| }
if($user['dstcorrection'] == 2) {
|
$dst_auto_selected = "selected=\"selected\""; } else if($user['dstcorrection'] == 1)
| $dst_auto_selected = "selected=\"selected\""; } else if($user['dstcorrection'] == 1)
|
Zeile 935 | Zeile 941 |
---|
$plugins->run_hooks("usercp_do_email_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->input['password']) == false)
|
$plugins->run_hooks("usercp_do_email_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->input['password']) == false)
|
{ $errors[] = $lang->error_invalidpassword; } else { // Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
| { $errors[] = $lang->error_invalidpassword; } else { // Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
|
$user = array( "uid" => $mybb->user['uid'],
| $user = array( "uid" => $mybb->user['uid'],
|
Zeile 1015 | Zeile 1021 |
---|
$plugins->run_hooks("usercp_email_end"); output_page($changemail); }
|
$plugins->run_hooks("usercp_email_end"); output_page($changemail); }
|
|
|
if($mybb->input['action'] == "do_password" && $mybb->request_method == "post") { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
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");
| $errors = array();
$plugins->run_hooks("usercp_do_password_start");
|
Zeile 1033 | Zeile 1039 |
---|
// Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
|
// Set up user handler. require_once "inc/datahandlers/user.php"; $userhandler = new UserDataHandler("update");
|
|
|
$user = array( "uid" => $mybb->user['uid'], "password" => $mybb->input['password'],
| $user = array( "uid" => $mybb->user['uid'], "password" => $mybb->input['password'],
|
Zeile 1052 | Zeile 1058 |
---|
my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']); $plugins->run_hooks("usercp_do_password_end"); redirect("usercp.php", $lang->redirect_passwordupdated);
|
my_setcookie("mybbuser", $mybb->user['uid']."_".$userhandler->data['loginkey']); $plugins->run_hooks("usercp_do_password_end"); redirect("usercp.php", $lang->redirect_passwordupdated);
|
}
| }
|
} if(count($errors) > 0) {
| } if(count($errors) > 0) {
|
Zeile 1502 | Zeile 1508 |
---|
} $readforums[$forum['fid']] = $forum['lastread']; }
|
} $readforums[$forum['fid']] = $forum['lastread']; }
|
| require_once MYBB_ROOT."inc/functions_forumlist.php";
|
$fpermissions = forum_permissions(); $query = $db->query("
|
$fpermissions = forum_permissions(); $query = $db->query("
|
SELECT fs.*, f.*, t.subject AS lastpostsubject
| SELECT fs.*, f.*, t.subject AS lastpostsubject, fr.dateline AS lastread
|
FROM ".TABLE_PREFIX."forumsubscriptions fs LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid = fs.fid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = f.lastposttid)
|
FROM ".TABLE_PREFIX."forumsubscriptions fs LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid = fs.fid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = f.lastposttid)
|
| LEFT JOIN ".TABLE_PREFIX."forumsread fr ON (fr.fid=f.fid AND fr.uid='{$mybb->user['uid']}')
|
WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."' ORDER BY f.name ASC ");
| WHERE f.type='f' AND fs.uid='".$mybb->user['uid']."' ORDER BY f.name ASC ");
|
Zeile 1519 | Zeile 1528 |
---|
$forumpermissions = $fpermissions[$forum['fid']]; if($forumpermissions['canview'] != 0) {
|
$forumpermissions = $fpermissions[$forum['fid']]; if($forumpermissions['canview'] != 0) {
|
if(($forum['lastpost'] > $mybb->user['lastvisit'] || $readforums[$forum['fid']] > $mybb->user['lastvisit']) && $forum['lastpost'] != 0) { $folder = "on"; } else { $folder = "off"; }
| $lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost'])); $folder = $lightbulb['folder'];
|
if($forum['lastpost'] == 0 || $forum['lastposter'] == "") { $lastpost = "<div align=\"center\">$lang->never</div>";
| if($forum['lastpost'] == 0 || $forum['lastposter'] == "") { $lastpost = "<div align=\"center\">$lang->never</div>";
|
Zeile 1574 | Zeile 1577 |
---|
{ $update_signature = array( "includesig" => 1
|
{ $update_signature = array( "includesig" => 1
|
); $db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'"); }
| ); $db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'"); }
|
elseif($mybb->input['updateposts'] == "disable") { $update_signature = array(
| elseif($mybb->input['updateposts'] == "disable") { $update_signature = array(
|
Zeile 1593 | Zeile 1596 |
---|
redirect("usercp.php?action=editsig", $lang->redirect_sigupdated);
}
|
redirect("usercp.php?action=editsig", $lang->redirect_sigupdated);
}
|
|
|
if($mybb->input['action'] == "editsig") { $plugins->run_hooks("usercp_editsig_start");
| if($mybb->input['action'] == "editsig") { $plugins->run_hooks("usercp_editsig_start");
|
Zeile 1642 | Zeile 1645 |
---|
else { $sigmycode = $lang->off;
|
else { $sigmycode = $lang->off;
|
}
| }
|
if($mybb->settings['sightml'] == 1) { $sightml = $lang->on;
| if($mybb->settings['sightml'] == 1) { $sightml = $lang->on;
|
Zeile 1656 | Zeile 1659 |
---|
$sigimgcode = $lang->on; } else
|
$sigimgcode = $lang->on; } else
|
{
| {
|
$sigimgcode = $lang->off; } $sig = htmlspecialchars_uni($sig); $lang->edit_sig_note2 = $lang->sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);
if($mybb->settings['bbcodeinserter'] != 0 || $mybb->user['showcodebuttons'] != 0)
|
$sigimgcode = $lang->off; } $sig = htmlspecialchars_uni($sig); $lang->edit_sig_note2 = $lang->sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);
if($mybb->settings['bbcodeinserter'] != 0 || $mybb->user['showcodebuttons'] != 0)
|
{
| {
|
$codebuttons = build_mycode_inserter("signature"); }
| $codebuttons = build_mycode_inserter("signature"); }
|
Zeile 1698 | Zeile 1701 |
---|
{ $avatar_error = $lang->error_noavatar; }
|
{ $avatar_error = $lang->error_noavatar; }
|
| $mybb->input['gallery'] = str_replace(array("./", ".."), "", $mybb->input['gallery']); $mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);
|
if(empty($avatar_error)) { if($mybb->input['gallery'] == "default")
| if(empty($avatar_error)) { if($mybb->input['gallery'] == "default")
|
Zeile 1762 | Zeile 1768 |
---|
} else {
|
} else {
|
$tmp_name = $mybb->settings['avataruploadpath']."/remote_".md5(uniqid(rand(), true));
| $tmp_name = $mybb->settings['avataruploadpath']."/remote_".md5(random_str());
|
$fp = @fopen($tmp_name, "wb"); if(!$fp) {
| $fp = @fopen($tmp_name, "wb"); if(!$fp) {
|
Zeile 2224 | Zeile 2230 |
---|
// Fetch out buddies $buddy_count = 0; if($mybb->user['buddylist'])
|
// Fetch out buddies $buddy_count = 0; if($mybb->user['buddylist'])
|
{
| {
|
$type = "buddy"; $query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array("order_by" => "username")); while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
$type = "buddy"; $query = $db->simple_select("users", "*", "uid IN ({$mybb->user['buddylist']})", array("order_by" => "username")); while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $user['lastvisit'] != $user['lastactive'])
| if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
|
{ $status = "online"; }
| { $status = "online"; }
|
Zeile 2258 | Zeile 2264 |
---|
while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
while($user = $db->fetch_array($query)) { $profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']);
|
if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->user['usergroup'] == 4) && $user['lastvisit'] != $user['lastactive'])
| if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive'])
|
{ $status = "online"; }
| { $status = "online"; }
|
Zeile 2299 | Zeile 2305 |
---|
}
if($mybb->input['action'] == "drafts")
|
}
if($mybb->input['action'] == "drafts")
|
{
| {
|
$plugins->run_hooks("usercp_drafts_start"); // Show a listing of all of the current 'draft' posts or threads the user has. $drafts = '';
| $plugins->run_hooks("usercp_drafts_start"); // Show a listing of all of the current 'draft' posts or threads the user has. $drafts = '';
|
Zeile 2443 | Zeile 2449 |
---|
$plugins->run_hooks("usercp_usergroups_leave_group"); redirect("usercp.php?action=usergroups", $lang->left_group); exit;
|
$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']) {
|
Zeile 2517 | Zeile 2523 |
---|
// List of groups this user is a leader of $groupsledlist = '';
|
// List of groups this user is a leader of $groupsledlist = '';
|
| |
switch($db->type) {
| switch($db->type) {
|
Zeile 2529 | Zeile 2534 |
---|
FROM ".TABLE_PREFIX."groupleaders l LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid) LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))
|
FROM ".TABLE_PREFIX."groupleaders l LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid) LEFT JOIN ".TABLE_PREFIX."users u ON(((','|| u.additionalgroups|| ',' LIKE '%,'|| g.gid|| ',%') OR u.usergroup = g.gid))
|
LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid)
| LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)
|
WHERE l.uid='".$mybb->user['uid']."' GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers ");
| WHERE l.uid='".$mybb->user['uid']."' GROUP BY g.gid, g.title, g.type, l.canmanagerequests, l.canmanagemembers ");
|
Zeile 2540 | Zeile 2545 |
---|
FROM ".TABLE_PREFIX."groupleaders l LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid) LEFT JOIN ".TABLE_PREFIX."users u ON(((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid))
|
FROM ".TABLE_PREFIX."groupleaders l LEFT JOIN ".TABLE_PREFIX."usergroups g ON(g.gid=l.gid) LEFT JOIN ".TABLE_PREFIX."users u ON(((CONCAT(',', u.additionalgroups, ',') LIKE CONCAT('%,', g.gid, ',%')) OR u.usergroup = g.gid))
|
LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid)
| LEFT JOIN ".TABLE_PREFIX."joinrequests j ON(j.gid=g.gid AND j.uid != 0)
|
WHERE l.uid='".$mybb->user['uid']."' GROUP BY l.gid ");
| WHERE l.uid='".$mybb->user['uid']."' GROUP BY l.gid ");
|
Zeile 2605 | Zeile 2610 |
---|
} else {
|
} else {
|
$leavelink = "<div style=\"text-align: center;\"><a href=\"usercp.php?action=usergroups&leavegroup=".$usergroup['gid']."&my_post_key={$mybb->post_code}\">".$lang->usergroup_leave."</a></div>";
| $leavelink = "<div style=\"text-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']) {
|