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 4254 2008-10-29 21:52:31Z Tikitiki $
| * $Id: usercp.php 4864 2010-04-10 09:13:19Z RyanGordon $
|
*/
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'])
|
if(!$mybb->input['awayyear'])
|
{
| {
|
$mybb->input['awayyear'] = my_date('Y', $awaydate);
|
$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 199 | Zeile 205 |
---|
"away" => 1, "date" => $awaydate, "returndate" => $returndate,
|
"away" => 1, "date" => $awaydate, "returndate" => $returndate,
|
"awayreason" => $db->escape_string($mybb->input['awayreason'])
| "awayreason" => $mybb->input['awayreason']
|
); } else
| ); } else
|
Zeile 293 | Zeile 299 |
---|
$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 527 | Zeile 533 |
---|
else { $value = htmlspecialchars_uni($userfield);
|
else { $value = htmlspecialchars_uni($userfield);
|
$code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\" maxlength=\"{$profilefield['maxlength']}\" value=\"$value\" />";
| $maxlength = ""; if($profilefield['maxlength'] > 0) { $maxlength = " maxlength=\"{$profilefield['maxlength']}\""; } $code = "<input type=\"text\" name=\"profile_fields[$field]\" class=\"textbox\" size=\"{$profilefield['length']}\"{$maxlength} value=\"$value\" />";
|
} if($profilefield['required'] == 1) {
| } if($profilefield['required'] == 1) {
|
Zeile 644 | 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();
| { $userhandler->update_user();
|
Zeile 657 | Zeile 668 |
---|
my_unsetcookie("mybbuser"); // Set the new one if($mybb->input['remember'] == 1)
|
my_unsetcookie("mybbuser"); // Set the new one if($mybb->input['remember'] == 1)
|
{
| {
|
my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], null, true); } else
| my_setcookie("mybbuser", $mybb->user['uid']."_".$mybb->user['loginkey'], null, true); } else
|
Zeile 675 | Zeile 686 |
---|
if($mybb->input['action'] == "options") { $plugins->run_hooks("usercp_options_start");
|
if($mybb->input['action'] == "options") { $plugins->run_hooks("usercp_options_start");
|
|
|
if($errors != '') { $user = $mybb->input;
|
if($errors != '') { $user = $mybb->input;
|
}
| }
|
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)
|
Zeile 694 | Zeile 705 |
---|
$sel = " selected=\"selected\""; } $langoptions .= "<option value=\"$lname\"$sel>".htmlspecialchars_uni($language)."</option>\n";
|
$sel = " selected=\"selected\""; } $langoptions .= "<option value=\"$lname\"$sel>".htmlspecialchars_uni($language)."</option>\n";
|
}
| }
|
// Lets work out which options the user has selected and check the boxes if($user['allownotices'] == 1)
| // Lets work out which options the user has selected and check the boxes if($user['allownotices'] == 1)
|
Zeile 704 | Zeile 715 |
---|
else { $allownoticescheck = "";
|
else { $allownoticescheck = "";
|
}
| }
|
if($user['invisible'] == 1) {
| if($user['invisible'] == 1) {
|
Zeile 762 | Zeile 773 |
---|
else { $showquickreplycheck = "";
|
else { $showquickreplycheck = "";
|
}
| }
|
if($user['remember'] == 1) { $remembercheck = "checked=\"checked\"";
| if($user['remember'] == 1) { $remembercheck = "checked=\"checked\"";
|
Zeile 798 | Zeile 809 |
---|
else if($user['dstcorrection'] == 1) { $dst_enabled_selected = "selected=\"selected\"";
|
else if($user['dstcorrection'] == 1) { $dst_enabled_selected = "selected=\"selected\"";
|
} else {
| } else {
|
$dst_disabled_selected = "selected=\"selected\""; }
if($user['showcodebuttons'] == 1)
|
$dst_disabled_selected = "selected=\"selected\""; }
if($user['showcodebuttons'] == 1)
|
{
| {
|
$showcodebuttonscheck = "checked=\"checked\"";
|
$showcodebuttonscheck = "checked=\"checked\"";
|
} else {
| } else {
|
$showcodebuttonscheck = ""; }
if($user['showredirect'] != 0)
|
$showcodebuttonscheck = ""; }
if($user['showredirect'] != 0)
|
{
| {
|
$showredirectcheck = "checked=\"checked\"";
|
$showredirectcheck = "checked=\"checked\"";
|
} else {
| } else {
|
$showredirectcheck = ""; }
if($user['pmnotify'] != 0)
|
$showredirectcheck = ""; }
if($user['pmnotify'] != 0)
|
{
| {
|
$pmnotifycheck = "checked=\"checked\""; } else
|
$pmnotifycheck = "checked=\"checked\""; } else
|
{
| {
|
$pmnotifycheck = ''; }
| $pmnotifycheck = ''; }
|
Zeile 835 | Zeile 846 |
---|
if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear") { $user['threadmode'] = ''; // Leave blank to show default
|
if($user['threadmode'] != "threaded" && $user['threadmode'] != "linear") { $user['threadmode'] = ''; // Leave blank to show default
|
}
| }
|
if($user['classicpostbit'] != 0) { $classicpostbitcheck = "checked=\"checked\"";
| if($user['classicpostbit'] != 0) { $classicpostbitcheck = "checked=\"checked\"";
|
Zeile 870 | Zeile 881 |
---|
else { $time_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";
|
else { $time_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";
|
} }
| } }
|
$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
$threadview[$user['threadmode']] = 'selected="selected"';
| $tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
$threadview[$user['threadmode']] = 'selected="selected"';
|
Zeile 943 | Zeile 954 |
---|
"uid" => $mybb->user['uid'], "email" => $mybb->input['email'], "email2" => $mybb->input['email2']
|
"uid" => $mybb->user['uid'], "email" => $mybb->input['email'], "email2" => $mybb->input['email2']
|
);
$userhandler->set_data($user);
| );
$userhandler->set_data($user);
|
if(!$userhandler->validate_user()) {
| if(!$userhandler->validate_user()) {
|
Zeile 1017 | Zeile 1028 |
---|
verify_post_check($mybb->input['my_post_key']);
$errors = array();
|
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;
|
$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 1040 | Zeile 1051 |
---|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
}
| }
|
else { $userhandler->update_user();
| else { $userhandler->update_user();
|
Zeile 1053 | Zeile 1064 |
---|
{ $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")
|
Zeile 1198 | Zeile 1209 |
---|
} $multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions"); $fpermissions = forum_permissions();
|
} $multipage = multipage($threadcount, $perpage, $page, "usercp.php?action=subscriptions"); $fpermissions = forum_permissions();
|
|
|
// Fetch subscriptions $query = $db->query(" SELECT s.*, t.*, t.username AS threadusername, u.username
| // Fetch subscriptions $query = $db->query(" SELECT s.*, t.*, t.username AS threadusername, u.username
|
Zeile 1270 | Zeile 1281 |
---|
} } $readforums[$forum['fid']] = $forum['lastread'];
|
} } $readforums[$forum['fid']] = $forum['lastread'];
|
}
| }
|
// Check participation by the current user in any of these threads - for 'dot' folder icons if($mybb->settings['dotfolders'] != 0) {
| // Check participation by the current user in any of these threads - for 'dot' folder icons if($mybb->settings['dotfolders'] != 0) {
|
Zeile 1279 | Zeile 1290 |
---|
while($post = $db->fetch_array($query)) { $subscriptions[$post['tid']]['doticon'] = 1;
|
while($post = $db->fetch_array($query)) { $subscriptions[$post['tid']]['doticon'] = 1;
|
} }
| } }
|
// Read threads if($mybb->settings['threadreadcut'] > 0)
| // Read threads if($mybb->settings['threadreadcut'] > 0)
|
Zeile 1292 | Zeile 1303 |
---|
} }
|
} }
|
| $icon_cache = $cache->read("posticons");
|
// Now we can build our subscription list foreach($subscriptions as $thread) {
| // Now we can build our subscription list foreach($subscriptions as $thread) {
|
Zeile 1307 | Zeile 1320 |
---|
// Build our links $thread['threadlink'] = get_thread_link($thread['tid']); $thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
|
// Build our links $thread['threadlink'] = get_thread_link($thread['tid']); $thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
|
|
|
// Fetch the thread icon if we have one if($thread['icon'] > 0 && $icon_cache[$thread['icon']]) {
| // Fetch the thread icon if we have one if($thread['icon'] > 0 && $icon_cache[$thread['icon']]) {
|
Zeile 1315 | Zeile 1328 |
---|
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />"; } else
|
$icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />"; } else
|
{
| {
|
$icon = " "; }
| $icon = " "; }
|
Zeile 1324 | Zeile 1337 |
---|
$folder_label = '';
if($thread['doticon'])
|
$folder_label = '';
if($thread['doticon'])
|
{
| {
|
$folder = "dot_"; $folder_label .= $lang->icon_dot;
|
$folder = "dot_"; $folder_label .= $lang->icon_dot;
|
}
| }
|
$gotounread = ''; $isnew = 0; $donenew = 0;
| $gotounread = ''; $isnew = 0; $donenew = 0;
|
Zeile 1342 | Zeile 1355 |
---|
if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff;
|
if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff;
|
} }
| } }
|
else { $forum_read = $forumsread[$thread['fid']];
|
else { $forum_read = $forumsread[$thread['fid']];
|
}
| }
|
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read) { $cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
|
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read) { $cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
|
}
| }
|
if($thread['lastpost'] > $cutoff) {
| if($thread['lastpost'] > $cutoff) {
|
Zeile 1377 | Zeile 1390 |
---|
$lastread = $readcookie; } else
|
$lastread = $readcookie; } else
|
{
| {
|
$lastread = $forum_read; } }
| $lastread = $forum_read; } }
|
Zeile 1483 | Zeile 1496 |
---|
WHERE f.active != 0 ORDER BY pid, disporder ");
|
WHERE f.active != 0 ORDER BY pid, disporder ");
|
} while($forum = $db->fetch_array($query)) {
| } while($forum = $db->fetch_array($query)) {
|
if($mybb->user['uid'] == 0) { if($forumsread[$forum['fid']])
|
if($mybb->user['uid'] == 0) { if($forumsread[$forum['fid']])
|
{
| {
|
$forum['lastread'] = $forumsread[$forum['fid']]; } } $readforums[$forum['fid']] = $forum['lastread']; }
|
$forum['lastread'] = $forumsread[$forum['fid']]; } } $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 1512 | 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 1564 | Zeile 1574 |
---|
$plugins->run_hooks("usercp_do_editsig_start"); if($mybb->input['updateposts'] == "enable")
|
$plugins->run_hooks("usercp_do_editsig_start"); if($mybb->input['updateposts'] == "enable")
|
{ $update_signature = array(
| { $update_signature = array(
|
"includesig" => 1 ); $db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'");
| "includesig" => 1 ); $db->update_query("posts", $update_signature, "uid='".$mybb->user['uid']."'");
|
Zeile 1601 | Zeile 1611 |
---|
$template = "usercp_editsig_current"; } else if($error)
|
$template = "usercp_editsig_current"; } else if($error)
|
{
| {
|
$sig = $mybb->input['signature']; $template = false; }
| $sig = $mybb->input['signature']; $template = false; }
|
Zeile 1623 | Zeile 1633 |
---|
{ $sigsmilies = $lang->on; $smilieinserter = build_clickable_smilies();
|
{ $sigsmilies = $lang->on; $smilieinserter = build_clickable_smilies();
|
}
| }
|
else { $sigsmilies = $lang->off;
| else { $sigsmilies = $lang->off;
|
Zeile 1637 | Zeile 1647 |
---|
$sigmycode = $lang->off; } if($mybb->settings['sightml'] == 1)
|
$sigmycode = $lang->off; } if($mybb->settings['sightml'] == 1)
|
{
| {
|
$sightml = $lang->on; } else
| $sightml = $lang->on; } else
|
Zeile 1651 | Zeile 1661 |
---|
else { $sigimgcode = $lang->off;
|
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) { $codebuttons = build_mycode_inserter("signature");
|
$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");
|
}
| }
|
eval("\$editsig = \"".$templates->get("usercp_editsig")."\";"); $plugins->run_hooks("usercp_editsig_end"); output_page($editsig); }
|
eval("\$editsig = \"".$templates->get("usercp_editsig")."\";"); $plugins->run_hooks("usercp_editsig_end"); output_page($editsig); }
|
|
|
if($mybb->input['action'] == "do_avatar" && $mybb->request_method == "post") { // Verify incoming POST request
| if($mybb->input['action'] == "do_avatar" && $mybb->request_method == "post") { // Verify incoming POST request
|
Zeile 1691 | 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 1755 | 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 2223 | Zeile 2236 |
---|
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 2251 | 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 2510 | 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 2522 | 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 2533 | 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 2598 | 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']) {
|