Zeile 32 | Zeile 32 |
---|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
require_once "./global.php"; require_once MYBB_ROOT."inc/functions_post.php";
|
| require_once MYBB_ROOT."inc/functions_search.php";
|
require_once MYBB_ROOT."inc/functions_user.php"; require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
| require_once MYBB_ROOT."inc/functions_user.php"; require_once MYBB_ROOT."inc/class_parser.php"; $parser = new postParser;
|
Zeile 50 | Zeile 51 |
---|
usercp_menu();
|
usercp_menu();
|
$server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);
if(my_strpos($server_http_referer, $mybb->settings['bburl'].'/') !== 0)
| $server_http_referer = ''; if(isset($_SERVER['HTTP_REFERER']))
|
{
|
{
|
if(my_strpos($server_http_referer, '/') === 0)
| $server_http_referer = htmlentities($_SERVER['HTTP_REFERER']);
if(my_strpos($server_http_referer, $mybb->settings['bburl'].'/') !== 0)
|
{
|
{
|
$server_http_referer = my_substr($server_http_referer, 1);
| if(my_strpos($server_http_referer, '/') === 0) { $server_http_referer = my_substr($server_http_referer, 1); } $url_segments = explode('/', $server_http_referer); $server_http_referer = $mybb->settings['bburl'].'/'.end($url_segments);
|
}
|
}
|
$url_segments = explode('/', $server_http_referer); $server_http_referer = $mybb->settings['bburl'].'/'.end($url_segments);
| |
}
$plugins->run_hooks("usercp_start");
| }
$plugins->run_hooks("usercp_start");
|
Zeile 78 | Zeile 83 |
---|
if(!$userhandler->verify_signature()) { $error = inline_error($userhandler->get_friendly_errors());
|
if(!$userhandler->verify_signature()) { $error = inline_error($userhandler->get_friendly_errors());
|
}
| }
|
if(isset($error) || !empty($mybb->input['preview'])) { $mybb->input['action'] = "editsig";
| if(isset($error) || !empty($mybb->input['preview'])) { $mybb->input['action'] = "editsig";
|
Zeile 120 | Zeile 125 |
---|
case "editsig": case "do_editsig": add_breadcrumb($lang->nav_editsig);
|
case "editsig": case "do_editsig": add_breadcrumb($lang->nav_editsig);
|
break;
| break;
|
case "avatar": case "do_avatar": add_breadcrumb($lang->nav_avatar);
| case "avatar": case "do_avatar": add_breadcrumb($lang->nav_avatar);
|
Zeile 223 | Zeile 228 |
---|
"away" => $away, "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY) ));
|
"away" => $away, "profile_fields" => $mybb->get_input('profile_fields', MyBB::INPUT_ARRAY) ));
|
foreach(array('icq', 'skype', 'google') as $cfield)
| foreach(array('skype', 'google') as $cfield)
|
{ $csetting = 'allow'.$cfield.'field'; if($mybb->settings[$csetting] == '')
| { $csetting = 'allow'.$cfield.'field'; if($mybb->settings[$csetting] == '')
|
Zeile 236 | Zeile 241 |
---|
continue; }
|
continue; }
|
if($cfield == 'icq') { $user[$cfield] = $mybb->get_input($cfield, 1);
if(my_strlen($user[$cfield]) > 10) { error($lang->contact_field_icqerror); } } else { $user[$cfield] = $mybb->get_input($cfield);
if(my_strlen($user[$cfield]) > 75) { error($lang->contact_field_error); } } }
| $user[$cfield] = $mybb->get_input($cfield);
if(my_strlen($user[$cfield]) > 75) { error($lang->contact_field_error); } }
|
if($mybb->usergroup['canchangewebsite'] == 1) { $user['website'] = $mybb->get_input('website');
| if($mybb->usergroup['canchangewebsite'] == 1) { $user['website'] = $mybb->get_input('website');
|
Zeile 270 | Zeile 263 |
---|
elseif(!empty($mybb->input['reverttitle'])) { $user['usertitle'] = '';
|
elseif(!empty($mybb->input['reverttitle'])) { $user['usertitle'] = '';
|
}
| }
|
} $userhandler->set_data($user);
| } $userhandler->set_data($user);
|
Zeile 280 | Zeile 273 |
---|
$raw_errors = $userhandler->get_errors();
// Set to stored value if invalid
|
$raw_errors = $userhandler->get_errors();
// Set to stored value if invalid
|
if(array_key_exists("invalid_birthday_privacy", $raw_errors))
| if(array_key_exists("invalid_birthday_privacy", $raw_errors) || array_key_exists("conflicted_birthday_privacy", $raw_errors))
|
{ $mybb->input['birthdayprivacy'] = $mybb->user['birthdayprivacy'];
|
{ $mybb->input['birthdayprivacy'] = $mybb->user['birthdayprivacy'];
|
| $bday = explode("-", $mybb->user['birthday']);
if(isset($bday[2])) { $mybb->input['bday3'] = $bday[2]; }
|
}
$errors = inline_error($errors);
| }
$errors = inline_error($errors);
|
Zeile 294 | Zeile 293 |
---|
$plugins->run_hooks("usercp_do_profile_end"); redirect("usercp.php?action=profile", $lang->redirect_profileupdated);
|
$plugins->run_hooks("usercp_do_profile_end"); redirect("usercp.php?action=profile", $lang->redirect_profileupdated);
|
}
| }
|
}
if($mybb->input['action'] == "profile")
| }
if($mybb->input['action'] == "profile")
|
Zeile 314 | Zeile 313 |
---|
if(!isset($bday[1])) { $bday[1] = 0;
|
if(!isset($bday[1])) { $bday[1] = 0;
|
} if(!isset($bday[2])) { $bday[2] = ''; } }
| } } if(!isset($bday[2]) || $bday[2] == 0) { $bday[2] = ''; }
|
$plugins->run_hooks("usercp_profile_start");
$bdaydaysel = '';
| $plugins->run_hooks("usercp_profile_start");
$bdaydaysel = '';
|
Zeile 336 | Zeile 335 |
---|
}
eval("\$bdaydaysel .= \"".$templates->get("usercp_profile_day")."\";");
|
}
eval("\$bdaydaysel .= \"".$templates->get("usercp_profile_day")."\";");
|
}
| }
|
$bdaymonthsel = array(); foreach(range(1, 12) as $month) {
| $bdaymonthsel = array(); foreach(range(1, 12) as $month) {
|
Zeile 366 | Zeile 365 |
---|
else { $user['website'] = htmlspecialchars_uni($user['website']);
|
else { $user['website'] = htmlspecialchars_uni($user['website']);
|
}
if($user['icq'] != "0") { $user['icq'] = (int)$user['icq']; }
if($user['icq'] == 0) { $user['icq'] = '';
| |
}
if($errors)
| }
if($errors)
|
Zeile 388 | Zeile 377 |
---|
$contactfields = ''; $cfieldsshow = false;
|
$contactfields = ''; $cfieldsshow = false;
|
foreach(array('icq', 'skype', 'google') as $cfield)
| foreach(array('skype', 'google') as $cfield)
|
{ $contact_fields[$cfield] = ''; $csetting = 'allow'.$cfield.'field';
| { $contact_fields[$cfield] = ''; $csetting = 'allow'.$cfield.'field';
|
Zeile 407 | Zeile 396 |
---|
$lang_string = 'contact_field_'.$cfield; $lang_string = $lang->{$lang_string}; $cfvalue = htmlspecialchars_uni($user[$cfield]);
|
$lang_string = 'contact_field_'.$cfield; $lang_string = $lang->{$lang_string}; $cfvalue = htmlspecialchars_uni($user[$cfield]);
|
|
|
eval('$contact_fields[$cfield] = "'.$templates->get('usercp_profile_contact_fields_field').'";');
|
eval('$contact_fields[$cfield] = "'.$templates->get('usercp_profile_contact_fields_field').'";');
|
}
| }
|
if($cfieldsshow) { eval('$contactfields = "'.$templates->get('usercp_profile_contact_fields').'";');
|
if($cfieldsshow) { eval('$contactfields = "'.$templates->get('usercp_profile_contact_fields').'";');
|
}
| }
$awaysection = '';
|
if($mybb->settings['allowaway'] != 0) { $awaycheck = array('', '');
| if($mybb->settings['allowaway'] != 0) { $awaycheck = array('', '');
|
Zeile 501 | Zeile 491 |
---|
continue; }
|
continue; }
|
| $userfield = $code = $select = $val = $options = $expoptions = $useropts = ''; $seloptions = array();
|
$profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']); $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
| $profilefield['type'] = htmlspecialchars_uni($profilefield['type']); $profilefield['name'] = htmlspecialchars_uni($profilefield['name']); $profilefield['description'] = htmlspecialchars_uni($profilefield['description']);
|
Zeile 509 | Zeile 501 |
---|
if(isset($thing[1])) { $options = $thing[1];
|
if(isset($thing[1])) { $options = $thing[1];
|
} else {
| } else {
|
$options = array(); } $field = "fid{$profilefield['fid']}";
|
$options = array(); } $field = "fid{$profilefield['fid']}";
|
$select = '';
| |
if($errors)
|
if($errors)
|
{
| {
|
if(!isset($mybb->input['profile_fields'][$field])) { $mybb->input['profile_fields'][$field] = '';
| if(!isset($mybb->input['profile_fields'][$field])) { $mybb->input['profile_fields'][$field] = '';
|
Zeile 533 | Zeile 524 |
---|
if($errors) { $useropts = $userfield;
|
if($errors) { $useropts = $userfield;
|
}
| }
|
else { $useropts = explode("\n", $userfield);
| else { $useropts = explode("\n", $userfield);
|
Zeile 544 | Zeile 535 |
---|
{ $val = htmlspecialchars_uni($val); $seloptions[$val] = $val;
|
{ $val = htmlspecialchars_uni($val); $seloptions[$val] = $val;
|
} } $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $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(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $val = trim($val); $val = str_replace("\n", "\\n", $val);
$sel = ""; if(isset($seloptions[$val]) && $val == $seloptions[$val])
|
{ $sel = " selected=\"selected\""; }
| { $sel = " selected=\"selected\""; }
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length']) { $profilefield['length'] = 3;
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); } if(!$profilefield['length']) { $profilefield['length'] = 3;
|
}
| }
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";"); } } elseif($type == "select")
|
eval("\$code = \"".$templates->get("usercp_profile_profilefields_multiselect")."\";"); } } elseif($type == "select")
|
{ $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val)
| { $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val)
|
{ $val = trim($val); $val = str_replace("\n", "\\n", $val);
| { $val = trim($val); $val = str_replace("\n", "\\n", $val);
|
Zeile 583 | Zeile 574 |
---|
if($val == htmlspecialchars_uni($userfield)) { $sel = " selected=\"selected\"";
|
if($val == htmlspecialchars_uni($userfield)) { $sel = " selected=\"selected\"";
|
}
| }
|
eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
| eval("\$select .= \"".$templates->get("usercp_profile_profilefields_select_option")."\";"); }
|
Zeile 600 | Zeile 591 |
---|
$userfield = htmlspecialchars_uni($userfield); $expoptions = explode("\n", $options); if(is_array($expoptions))
|
$userfield = htmlspecialchars_uni($userfield); $expoptions = explode("\n", $options); if(is_array($expoptions))
|
{
| {
|
foreach($expoptions as $key => $val) { $checked = "";
| foreach($expoptions as $key => $val) { $checked = "";
|
Zeile 617 | Zeile 608 |
---|
{ $userfield = htmlspecialchars_uni($userfield); if($errors)
|
{ $userfield = htmlspecialchars_uni($userfield); if($errors)
|
{ $useropts = $userfield;
| { $useropts = $userfield;
|
} else {
| } else {
|
Zeile 629 | Zeile 620 |
---|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
foreach($useropts as $key => $val) { $seloptions[$val] = $val;
|
} }
| } }
|
$expoptions = explode("\n", $options); if(is_array($expoptions)) {
| $expoptions = explode("\n", $options); if(is_array($expoptions)) {
|
Zeile 650 | Zeile 641 |
---|
{ $value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
|
{ $value = htmlspecialchars_uni($userfield); eval("\$code = \"".$templates->get("usercp_profile_profilefields_textarea")."\";");
|
}
| }
|
else { $value = htmlspecialchars_uni($userfield);
| else { $value = htmlspecialchars_uni($userfield);
|
Zeile 661 | Zeile 652 |
---|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");
|
}
eval("\$code = \"".$templates->get("usercp_profile_profilefields_text")."\";");
|
}
| }
|
if($profilefield['required'] == 1)
|
if($profilefield['required'] == 1)
|
{
| {
|
eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";"); } else
| eval("\$requiredfields .= \"".$templates->get("usercp_profile_customfield")."\";"); } else
|
Zeile 672 | Zeile 663 |
---|
eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";"); } $altbg = alt_trow();
|
eval("\$customfields .= \"".$templates->get("usercp_profile_customfield")."\";"); } $altbg = alt_trow();
|
$code = ""; $select = ""; $val = ""; $options = ""; $expoptions = ""; $useropts = ""; $seloptions = array();
| |
} } if($customfields)
| } } if($customfields)
|
Zeile 687 | Zeile 671 |
---|
}
if($mybb->usergroup['cancustomtitle'] == 1)
|
}
if($mybb->usergroup['cancustomtitle'] == 1)
|
{
| {
|
if($mybb->usergroup['usertitle'] == "") { $defaulttitle = ''; $usertitles = $cache->read('usertitles');
foreach($usertitles as $title)
|
if($mybb->usergroup['usertitle'] == "") { $defaulttitle = ''; $usertitles = $cache->read('usertitles');
foreach($usertitles as $title)
|
{
| {
|
if($title['posts'] <= $mybb->user['postnum']) { $defaulttitle = htmlspecialchars_uni($title['title']); break; }
|
if($title['posts'] <= $mybb->user['postnum']) { $defaulttitle = htmlspecialchars_uni($title['title']); break; }
|
} } else
| } } else
|
{ $defaulttitle = htmlspecialchars_uni($mybb->usergroup['usertitle']); }
| { $defaulttitle = htmlspecialchars_uni($mybb->usergroup['usertitle']); }
|
Zeile 718 | Zeile 702 |
---|
{ $newtitle = htmlspecialchars_uni($user['usertitle']); $user['usertitle'] = $mybb->user['usertitle'];
|
{ $newtitle = htmlspecialchars_uni($user['usertitle']); $user['usertitle'] = $mybb->user['usertitle'];
|
} }
| } }
|
$user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
| $user['usertitle'] = htmlspecialchars_uni($user['usertitle']);
|
Zeile 727 | Zeile 711 |
---|
if(!empty($mybb->user['usertitle'])) { eval("\$currentcustom = \"".$templates->get("usercp_profile_customtitle_currentcustom")."\";");
|
if(!empty($mybb->user['usertitle'])) { eval("\$currentcustom = \"".$templates->get("usercp_profile_customtitle_currentcustom")."\";");
|
|
|
if($mybb->user['usertitle'] != $mybb->usergroup['usertitle']) { eval("\$reverttitle = \"".$templates->get("usercp_profile_customtitle_reverttitle")."\";");
| if($mybb->user['usertitle'] != $mybb->usergroup['usertitle']) { eval("\$reverttitle = \"".$templates->get("usercp_profile_customtitle_reverttitle")."\";");
|
Zeile 735 | Zeile 719 |
---|
}
eval("\$customtitle = \"".$templates->get("usercp_profile_customtitle")."\";");
|
}
eval("\$customtitle = \"".$templates->get("usercp_profile_customtitle")."\";");
|
}
| }
|
else { $customtitle = "";
|
else { $customtitle = "";
|
}
| }
|
|
|
| $website = '';
|
if($mybb->usergroup['canchangewebsite'] == 1) { eval("\$website = \"".$templates->get("usercp_profile_website")."\";");
| if($mybb->usergroup['canchangewebsite'] == 1) { eval("\$website = \"".$templates->get("usercp_profile_website")."\";");
|
Zeile 750 | Zeile 735 |
---|
eval("\$editprofile = \"".$templates->get("usercp_profile")."\";"); output_page($editprofile);
|
eval("\$editprofile = \"".$templates->get("usercp_profile")."\";"); output_page($editprofile);
|
}
| }
|
if($mybb->input['action'] == "do_options" && $mybb->request_method == "post") {
| if($mybb->input['action'] == "do_options" && $mybb->request_method == "post") {
|
Zeile 872 | Zeile 857 |
---|
$allownoticescheck = ""; }
|
$allownoticescheck = ""; }
|
if(isset($user['invisible']) && $user['invisible'] == 1)
| $canbeinvisible = '';
// Check usergroup permission before showing invisible check box if($mybb->usergroup['canbeinvisible'] == 1)
|
{
|
{
|
$invisiblecheck = "checked=\"checked\""; } else { $invisiblecheck = "";
| if(isset($user['invisible']) && $user['invisible'] == 1) { $invisiblecheck = "checked=\"checked\""; } else { $invisiblecheck = ""; } eval('$canbeinvisible = "'.$templates->get("usercp_options_invisible")."\";");
|
}
if(isset($user['hideemail']) && $user['hideemail'] == 1)
| }
if(isset($user['hideemail']) && $user['hideemail'] == 1)
|
Zeile 1507 | Zeile 1499 |
---|
$plugins->run_hooks("usercp_subscriptions_start");
// Thread visiblity
|
$plugins->run_hooks("usercp_subscriptions_start");
// Thread visiblity
|
$visible = "AND t.visible != 0"; if(is_moderator() == true)
| $where = array( "s.uid={$mybb->user['uid']}", get_visible_where('t') );
if($unviewable_forums = get_unviewable_forums(true)) { $where[] = "t.fid NOT IN ({$unviewable_forums})"; }
if($inactive_forums = get_inactive_forums())
|
{
|
{
|
$visible = '';
| $where[] = "t.fid NOT IN ({$inactive_forums})";
|
}
|
}
|
| $where = implode(' AND ', $where);
|
// Do Multi Pages $query = $db->query("
|
// Do Multi Pages $query = $db->query("
|
SELECT COUNT(ts.tid) as threads FROM ".TABLE_PREFIX."threadsubscriptions ts LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = ts.tid) WHERE ts.uid = '".$mybb->user['uid']."' AND t.visible >= 0 {$visible}
| SELECT COUNT(s.tid) as threads FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid = s.tid) WHERE {$where}
|
"); $threadcount = $db->fetch_field($query, "threads");
| "); $threadcount = $db->fetch_field($query, "threads");
|
Zeile 1562 | Zeile 1565 |
---|
FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
WHERE s.uid='".$mybb->user['uid']."' and t.visible >= 0 {$visible}
| WHERE {$where}
|
ORDER BY t.lastpost DESC LIMIT $start, $perpage ");
| ORDER BY t.lastpost DESC LIMIT $start, $perpage ");
|
Zeile 1570 | Zeile 1573 |
---|
{ $forumpermissions = $fpermissions[$subscription['fid']];
|
{ $forumpermissions = $fpermissions[$subscription['fid']];
|
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0 || (isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $subscription['uid'] != $mybb->user['uid']))
| if(isset($forumpermissions['canonlyviewownthreads']) && $forumpermissions['canonlyviewownthreads'] != 0 && $subscription['uid'] != $mybb->user['uid'])
|
{ // Hmm, you don't have permission to view this thread - unsubscribe! $del_subscriptions[] = $subscription['sid'];
| { // Hmm, you don't have permission to view this thread - unsubscribe! $del_subscriptions[] = $subscription['sid'];
|
Zeile 1595 | Zeile 1598 |
---|
if($threadcount < 0) { $threadcount = 0;
|
if($threadcount < 0) { $threadcount = 0;
|
}
| }
|
}
if(!empty($subscriptions)) { $tids = implode(",", array_keys($subscriptions)); $readforums = array();
|
}
if(!empty($subscriptions)) { $tids = implode(",", array_keys($subscriptions)); $readforums = array();
|
|
|
// Build a forum cache. $query = $db->query(" SELECT f.fid, fr.dateline AS lastread
| // Build a forum cache. $query = $db->query(" SELECT f.fid, fr.dateline AS lastread
|
Zeile 1622 | Zeile 1625 |
---|
{ $query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})"); while($post = $db->fetch_array($query))
|
{ $query = $db->simple_select("posts", "tid,uid", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})"); while($post = $db->fetch_array($query))
|
{
| {
|
$subscriptions[$post['tid']]['doticon'] = 1; } }
| $subscriptions[$post['tid']]['doticon'] = 1; } }
|
Zeile 1675 | Zeile 1678 |
---|
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
|
eval("\$icon = \"".$templates->get("usercp_subscriptions_thread_icon")."\";"); } else
|
{
| {
|
$icon = " ";
|
$icon = " ";
|
}
| }
|
// Determine the folder $folder = '';
| // Determine the folder $folder = '';
|
Zeile 1696 | Zeile 1699 |
---|
if($mybb->settings['threadreadcut'] > 0) {
|
if($mybb->settings['threadreadcut'] > 0) {
|
$forum_read = $readforums[$thread['fid']];
| |
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
|
if($forum_read == 0 || $forum_read < $read_cutoff)
| if(empty($readforums[$thread['fid']]) || $readforums[$thread['fid']] < $read_cutoff)
|
{ $forum_read = $read_cutoff;
|
{ $forum_read = $read_cutoff;
|
} }
| } else { $forum_read = $readforums[$thread['fid']]; } }
|
$cutoff = 0; if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read) {
| $cutoff = 0; if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read) {
|
Zeile 1713 | Zeile 1718 |
---|
if($thread['lastpost'] > $cutoff) {
|
if($thread['lastpost'] > $cutoff) {
|
if($thread['lastread'])
| if(!empty($thread['lastread']))
|
{ $lastread = $thread['lastread']; }
| { $lastread = $thread['lastread']; }
|
Zeile 1729 | Zeile 1734 |
---|
if($readcookie > $forum_read) { $lastread = $readcookie;
|
if($readcookie > $forum_read) { $lastread = $readcookie;
|
} else {
| } else {
|
$lastread = $forum_read; } }
| $lastread = $forum_read; } }
|
Zeile 1749 | Zeile 1754 |
---|
{ $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
{ $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
}
| }
|
if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews']) {
| if($thread['replies'] >= $mybb->settings['hottopic'] || $thread['views'] >= $mybb->settings['hottopicviews']) {
|
Zeile 1766 | Zeile 1771 |
---|
$folder .= "folder";
if($thread['visible'] == 0)
|
$folder .= "folder";
if($thread['visible'] == 0)
|
{
| {
|
$bgcolor = "trow_shaded"; }
// Build last post info $lastpostdate = my_date('relative', $thread['lastpost']);
|
$bgcolor = "trow_shaded"; }
// Build last post info $lastpostdate = my_date('relative', $thread['lastpost']);
|
| $lastposteruid = $thread['lastposteruid'];
|
if(!$lastposteruid && !$thread['lastposter']) { $lastposter = htmlspecialchars_uni($lang->guest);
|
if(!$lastposteruid && !$thread['lastposter']) { $lastposter = htmlspecialchars_uni($lang->guest);
|
}
| }
|
else { $lastposter = htmlspecialchars_uni($thread['lastposter']); }
|
else { $lastposter = htmlspecialchars_uni($thread['lastposter']); }
|
$lastposteruid = $thread['lastposteruid'];
| |
// Don't link to guest's profiles (they have no profile). if($lastposteruid == 0)
| // Don't link to guest's profiles (they have no profile). if($lastposteruid == 0)
|
Zeile 1800 | Zeile 1805 |
---|
{ case "2": // PM $notification_type = $lang->pm_notification;
|
{ case "2": // PM $notification_type = $lang->pm_notification;
|
break;
| break;
|
case "1": // Email $notification_type = $lang->email_notification; break;
| case "1": // Email $notification_type = $lang->email_notification; break;
|
Zeile 1998 | Zeile 2003 |
---|
}
if($mybb->input['action'] == "addsubscription")
|
}
if($mybb->input['action'] == "addsubscription")
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('type') == "forum") { $forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT));
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
if($mybb->get_input('type') == "forum") { $forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT));
|
if(!$forum) { error($lang->error_invalidforum); } $forumpermissions = forum_permissions($forum['fid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
if(!$forum) { error($lang->error_invalidforum); } $forumpermissions = forum_permissions($forum['fid']); if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
{ error_no_permission(); }
| { error_no_permission(); }
|
// check if the forum requires a password to view. If so, we need to show a form to the user check_forum_password($forum['fid']);
| // check if the forum requires a password to view. If so, we need to show a form to the user check_forum_password($forum['fid']);
|
Zeile 2036 | Zeile 2041 |
---|
{ $thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT)); if(!$thread || $thread['visible'] == -1)
|
{ $thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT)); if(!$thread || $thread['visible'] == -1)
|
{ error($lang->error_invalidthread); }
| { error($lang->error_invalidthread); }
|
// Is the currently logged in user a moderator of this forum? $ismod = is_moderator($thread['fid']);
| // Is the currently logged in user a moderator of this forum? $ismod = is_moderator($thread['fid']);
|
Zeile 2047 | Zeile 2052 |
---|
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true)) { error($lang->error_invalidthread);
|
if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true)) { error($lang->error_invalidthread);
|
}
| }
|
add_breadcrumb($lang->nav_subthreads, "usercp.php?action=subscriptions"); add_breadcrumb($lang->nav_addsubscription);
| add_breadcrumb($lang->nav_subthreads, "usercp.php?action=subscriptions"); add_breadcrumb($lang->nav_addsubscription);
|
Zeile 2072 | Zeile 2077 |
---|
$thread['subject'] = $parser->parse_badwords($thread['subject']); $thread['subject'] = htmlspecialchars_uni($thread['subject']); $lang->subscribe_to_thread = $lang->sprintf($lang->subscribe_to_thread, $thread['subject']);
|
$thread['subject'] = $parser->parse_badwords($thread['subject']); $thread['subject'] = htmlspecialchars_uni($thread['subject']); $lang->subscribe_to_thread = $lang->sprintf($lang->subscribe_to_thread, $thread['subject']);
|
|
|
$notification_none_checked = $notification_email_checked = $notification_pm_checked = ''; if($mybb->user['subscriptionmethod'] == 1 || $mybb->user['subscriptionmethod'] == 0)
|
$notification_none_checked = $notification_email_checked = $notification_pm_checked = ''; if($mybb->user['subscriptionmethod'] == 1 || $mybb->user['subscriptionmethod'] == 0)
|
{
| {
|
$notification_none_checked = "checked=\"checked\""; } elseif($mybb->user['subscriptionmethod'] == 2)
|
$notification_none_checked = "checked=\"checked\""; } elseif($mybb->user['subscriptionmethod'] == 2)
|
{
| {
|
$notification_email_checked = "checked=\"checked\"";
|
$notification_email_checked = "checked=\"checked\"";
|
}
| }
|
elseif($mybb->user['subscriptionmethod'] == 3) { $notification_pm_checked = "checked=\"checked\"";
|
elseif($mybb->user['subscriptionmethod'] == 3) { $notification_pm_checked = "checked=\"checked\"";
|
}
| }
|
// Naming of the hook retained for backward compatibility while dropping usercp2.php $plugins->run_hooks("usercp2_addsubscription_thread");
eval("\$add_subscription = \"".$templates->get("usercp_addsubscription_thread")."\";"); output_page($add_subscription); exit;
|
// Naming of the hook retained for backward compatibility while dropping usercp2.php $plugins->run_hooks("usercp2_addsubscription_thread");
eval("\$add_subscription = \"".$templates->get("usercp_addsubscription_thread")."\";"); output_page($add_subscription); exit;
|
}
| }
|
}
|
}
|
|
|
if($mybb->input['action'] == "removesubscription" && ($mybb->request_method == "post" || verify_post_check($mybb->get_input('my_post_key'), true))) { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
if($mybb->input['action'] == "removesubscription" && ($mybb->request_method == "post" || verify_post_check($mybb->get_input('my_post_key'), true))) { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
|
|
|
if($mybb->get_input('type') == "forum") { $forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT)); if(!$forum) { error($lang->error_invalidforum);
|
if($mybb->get_input('type') == "forum") { $forum = get_forum($mybb->get_input('fid', MyBB::INPUT_INT)); if(!$forum) { error($lang->error_invalidforum);
|
}
| }
|
// check if the forum requires a password to view. If so, we need to show a form to the user check_forum_password($forum['fid']);
|
// check if the forum requires a password to view. If so, we need to show a form to the user check_forum_password($forum['fid']);
|
|
|
// Naming of the hook retained for backward compatibility while dropping usercp2.php $plugins->run_hooks("usercp2_removesubscription_forum");
|
// Naming of the hook retained for backward compatibility while dropping usercp2.php $plugins->run_hooks("usercp2_removesubscription_forum");
|
|
|
remove_subscribed_forum($forum['fid']); if($server_http_referer && $mybb->request_method != 'post')
|
remove_subscribed_forum($forum['fid']); if($server_http_referer && $mybb->request_method != 'post')
|
{
| {
|
$url = $server_http_referer; } else
|
$url = $server_http_referer; } else
|
{
| {
|
$url = "usercp.php?action=forumsubscriptions";
|
$url = "usercp.php?action=forumsubscriptions";
|
}
| }
|
redirect($url, $lang->redirect_forumsubscriptionremoved); } else { $thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));
|
redirect($url, $lang->redirect_forumsubscriptionremoved); } else { $thread = get_thread($mybb->get_input('tid', MyBB::INPUT_INT));
|
if(!$thread) { error($lang->error_invalidthread); }
// Is the currently logged in user a moderator of this forum? $ismod = is_moderator($thread['fid']);
// Make sure we are looking at a real thread here. if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true)) { error($lang->error_invalidthread);
| if(!$thread) { error($lang->error_invalidthread); }
// Is the currently logged in user a moderator of this forum? $ismod = is_moderator($thread['fid']);
// Make sure we are looking at a real thread here. if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true)) { error($lang->error_invalidthread);
|
}
// check if the forum requires a password to view. If so, we need to show a form to the user
| }
// check if the forum requires a password to view. If so, we need to show a form to the user
|
Zeile 2157 | Zeile 2162 |
---|
else { $url = "usercp.php?action=subscriptions";
|
else { $url = "usercp.php?action=subscriptions";
|
}
| }
|
redirect($url, $lang->redirect_subscriptionremoved); } }
| redirect($url, $lang->redirect_subscriptionremoved); } }
|
Zeile 2208 | Zeile 2213 |
---|
// Make sure we are looking at a real thread here. if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
|
// Make sure we are looking at a real thread here. if(($thread['visible'] != 1 && $ismod == false) || ($thread['visible'] > 1 && $ismod == true))
|
{
| {
|
error($lang->error_invalidthread); }
| error($lang->error_invalidthread); }
|
Zeile 2275 | Zeile 2280 |
---|
$url = "usercp.php?action=subscriptions"; } redirect($url, $lang->redirect_subscriptionsremoved);
|
$url = "usercp.php?action=subscriptions"; } redirect($url, $lang->redirect_subscriptionsremoved);
|
} }
| } }
|
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post") {
| if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post") {
|
Zeile 2285 | Zeile 2290 |
---|
// User currently has a suspended signature if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)
|
// User currently has a suspended signature if($mybb->user['suspendsignature'] == 1 && $mybb->user['suspendsigtime'] > TIME_NOW)
|
{
| {
|
error_no_permission(); }
| error_no_permission(); }
|
Zeile 2328 | Zeile 2333 |
---|
$template = "usercp_editsig_current"; } else
|
$template = "usercp_editsig_current"; } else
|
{
| {
|
$sig = $mybb->get_input('signature'); $template = false;
|
$sig = $mybb->get_input('signature'); $template = false;
|
}
| }
|
if(!isset($error)) { $error = '';
|
if(!isset($error)) { $error = '';
|
}
| }
|
if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW)) { // User currently has no signature and they're suspended
| if($mybb->user['suspendsignature'] && ($mybb->user['suspendsigtime'] == 0 || $mybb->user['suspendsigtime'] > 0 && $mybb->user['suspendsigtime'] > TIME_NOW)) { // User currently has no signature and they're suspended
|
Zeile 2345 | Zeile 2350 |
---|
}
if($mybb->usergroup['canusesig'] != 1)
|
}
if($mybb->usergroup['canusesig'] != 1)
|
{
| {
|
// Usergroup has no permission to use this facility error_no_permission();
|
// Usergroup has no permission to use this facility error_no_permission();
|
}
| }
|
elseif($mybb->usergroup['canusesig'] == 1 && $mybb->usergroup['canusesigxposts'] > 0 && $mybb->user['postnum'] < $mybb->usergroup['canusesigxposts']) { // Usergroup can use this facility, but only after x posts error($lang->sprintf($lang->sig_suspended_posts, $mybb->usergroup['canusesigxposts']));
|
elseif($mybb->usergroup['canusesig'] == 1 && $mybb->usergroup['canusesigxposts'] > 0 && $mybb->user['postnum'] < $mybb->usergroup['canusesigxposts']) { // Usergroup can use this facility, but only after x posts error($lang->sprintf($lang->sig_suspended_posts, $mybb->usergroup['canusesigxposts']));
|
}
| }
|
$signature = ''; if($sig && $template) {
| $signature = ''; if($sig && $template) {
|
Zeile 2370 | Zeile 2375 |
---|
if($mybb->user['showimages'] != 1) { $sig_parser['allow_imgcode'] = 0;
|
if($mybb->user['showimages'] != 1) { $sig_parser['allow_imgcode'] = 0;
|
}
| }
|
$sigpreview = $parser->parse_message($sig, $sig_parser); eval("\$signature = \"".$templates->get($template)."\";"); }
| $sigpreview = $parser->parse_message($sig, $sig_parser); eval("\$signature = \"".$templates->get($template)."\";"); }
|
Zeile 2387 | Zeile 2392 |
---|
else { // User is allowed to edit their signature
|
else { // User is allowed to edit their signature
|
| $smilieinserter = '';
|
if($mybb->settings['sigsmilies'] == 1)
|
if($mybb->settings['sigsmilies'] == 1)
|
{
| {
|
$sigsmilies = $lang->on; $smilieinserter = build_clickable_smilies(); }
| $sigsmilies = $lang->on; $smilieinserter = build_clickable_smilies(); }
|
Zeile 2405 | Zeile 2411 |
---|
$sigmycode = $lang->off; } if($mybb->settings['sightml'] == 1)
|
$sigmycode = $lang->off; } if($mybb->settings['sightml'] == 1)
|
{
| {
|
$sightml = $lang->on;
|
$sightml = $lang->on;
|
}
| }
|
else { $sightml = $lang->off; } if($mybb->settings['sigimgcode'] == 1)
|
else { $sightml = $lang->off; } if($mybb->settings['sigimgcode'] == 1)
|
{
| {
|
$sigimgcode = $lang->on;
|
$sigimgcode = $lang->on;
|
}
| } else { $sigimgcode = $lang->off; }
if($mybb->settings['siglength'] == 0) { $siglength = $lang->unlimited; }
|
else {
|
else {
|
$sigimgcode = $lang->off;
| $siglength = $mybb->settings['siglength'];
|
}
|
}
|
$sig = htmlspecialchars_uni($sig); $lang->edit_sig_note2 = $lang->sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $mybb->settings['siglength']);
| $sig = htmlspecialchars_uni($sig); $lang->edit_sig_note2 = $lang->sprintf($lang->edit_sig_note2, $sigsmilies, $sigmycode, $sigimgcode, $sightml, $siglength);
|
if($mybb->settings['sigmycode'] != 0 && $mybb->settings['bbcodeinserter'] != 0 && $mybb->user['showcodebuttons'] != 0) {
| if($mybb->settings['sigmycode'] != 0 && $mybb->settings['bbcodeinserter'] != 0 && $mybb->user['showcodebuttons'] != 0) {
|
Zeile 2463 | Zeile 2479 |
---|
error_no_permission(); } $avatar = upload_avatar();
|
error_no_permission(); } $avatar = upload_avatar();
|
if($avatar['error'])
| if(!empty($avatar['error']))
|
{ $avatar_error = $avatar['error']; }
| { $avatar_error = $avatar['error']; }
|
Zeile 2480 | Zeile 2496 |
---|
); $db->update_query("users", $updated_avatar, "uid='".$mybb->user['uid']."'"); }
|
); $db->update_query("users", $updated_avatar, "uid='".$mybb->user['uid']."'"); }
|
| } elseif(!$mybb->settings['allowremoteavatars'] && !$_FILES['avatarupload']['name']) // missing avatar image { $avatar_error = $lang->error_avatarimagemissing;
|
} elseif($mybb->settings['allowremoteavatars']) // remote avatar {
| } elseif($mybb->settings['allowremoteavatars']) // remote avatar {
|
Zeile 2549 | Zeile 2569 |
---|
if(!$type) { $avatar_error = $lang->error_invalidavatarurl;
|
if(!$type) { $avatar_error = $lang->error_invalidavatarurl;
|
} } }
| } } }
|
if(empty($avatar_error)) {
| if(empty($avatar_error)) {
|
Zeile 2612 | Zeile 2632 |
---|
$avatarmsg = $avatarurl = '';
if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))
|
$avatarmsg = $avatarurl = '';
if($mybb->user['avatartype'] == "upload" || stristr($mybb->user['avatar'], $mybb->settings['avataruploadpath']))
|
{
| {
|
$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>";
|
$avatarmsg = "<br /><strong>".$lang->already_uploaded_avatar."</strong>";
|
}
| }
|
elseif($mybb->user['avatartype'] == "remote" || my_validate_url($mybb->user['avatar'])) { $avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>"; $avatarurl = htmlspecialchars_uni($mybb->user['avatar']);
|
elseif($mybb->user['avatartype'] == "remote" || my_validate_url($mybb->user['avatar'])) { $avatarmsg = "<br /><strong>".$lang->using_remote_avatar."</strong>"; $avatarurl = htmlspecialchars_uni($mybb->user['avatar']);
|
}
| }
|
$useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100'); eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
| $useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100'); eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";");
|
Zeile 2678 | Zeile 2698 |
---|
}
if($mybb->input['action'] == "acceptrequest")
|
}
if($mybb->input['action'] == "acceptrequest")
|
{ // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
// Validate request $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND touid='.(int)$mybb->user['uid']); $request = $db->fetch_array($query); if(empty($request)) { error($lang->invalid_request); }
| { // Verify incoming POST request verify_post_check($mybb->get_input('my_post_key'));
// Validate request $query = $db->simple_select('buddyrequests', '*', 'id='.$mybb->get_input('id', MyBB::INPUT_INT).' AND touid='.(int)$mybb->user['uid']); $request = $db->fetch_array($query); if(empty($request)) { error($lang->invalid_request); }
|
$plugins->run_hooks("usercp_acceptrequest_start");
| $plugins->run_hooks("usercp_acceptrequest_start");
|
Zeile 2823 | Zeile 2843 |
---|
if(empty($request)) { error($lang->invalid_request);
|
if(empty($request)) { error($lang->invalid_request);
|
}
| }
|
$plugins->run_hooks("usercp_cancelrequest_start");
$db->delete_query('buddyrequests', 'id='.(int)$request['id']);
| $plugins->run_hooks("usercp_cancelrequest_start");
$db->delete_query('buddyrequests', 'id='.(int)$request['id']);
|
Zeile 2960 | Zeile 2980 |
---|
}
if(isset($requests[$user['uid']]))
|
}
if(isset($requests[$user['uid']]))
|
{ if($mybb->get_input('manage') != "ignored") {
| { if($mybb->get_input('manage') != "ignored") {
|
$error_message = $lang->users_already_sent_request;
|
$error_message = $lang->users_already_sent_request;
|
}
| }
|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
elseif($mybb->get_input('manage') == "ignored") { $error_message = $lang->users_already_sent_request_alt;
|
}
| }
|
array_pop($users); // To maintain a proper count when we call count($users) continue;
| array_pop($users); // To maintain a proper count when we call count($users) continue;
|
Zeile 2984 | Zeile 3004 |
---|
{ $error_message = $lang->users_already_rec_request_alt; }
|
{ $error_message = $lang->users_already_rec_request_alt; }
|
|
|
array_pop($users); // To maintain a proper count when we call count($users) continue; }
// Do we have auto approval set to On? if($user['buddyrequestsauto'] == 1 && $mybb->get_input('manage') != "ignored")
|
array_pop($users); // To maintain a proper count when we call count($users) continue; }
// Do we have auto approval set to On? if($user['buddyrequestsauto'] == 1 && $mybb->get_input('manage') != "ignored")
|
{ $existing_users[] = $user['uid'];
| { $existing_users[] = $user['uid'];
|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
$pm = array( 'subject' => 'buddyrequest_new_buddy', 'message' => 'buddyrequest_new_buddy_message',
|
'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp' );
| 'touid' => $user['uid'], 'receivepms' => (int)$user['buddyrequestspm'], 'language' => $user['language'], 'language_file' => 'usercp' );
|
send_pm($pm); }
| send_pm($pm); }
|
Zeile 3009 | Zeile 3029 |
---|
{ // Send request $id = $db->insert_query('buddyrequests', array('uid' => (int)$mybb->user['uid'], 'touid' => (int)$user['uid'], 'date' => TIME_NOW));
|
{ // Send request $id = $db->insert_query('buddyrequests', array('uid' => (int)$mybb->user['uid'], 'touid' => (int)$user['uid'], 'date' => TIME_NOW));
|
|
|
$pm = array( 'subject' => 'buddyrequest_received', 'message' => 'buddyrequest_received_message',
| $pm = array( 'subject' => 'buddyrequest_received', 'message' => 'buddyrequest_received_message',
|
Zeile 3026 | Zeile 3046 |
---|
elseif($mybb->get_input('manage') == "ignored") { $existing_users[] = $user['uid'];
|
elseif($mybb->get_input('manage') == "ignored") { $existing_users[] = $user['uid'];
|
} } }
| } } }
|
if($found_users < count($users)) { if($error_message)
| if($found_users < count($users)) { if($error_message)
|
Zeile 3038 | Zeile 3058 |
---|
}
$error_message .= $lang->invalid_user_selected;
|
}
$error_message .= $lang->invalid_user_selected;
|
}
| }
|
if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1)) { if($mybb->get_input('manage') == "ignored") { $message = $lang->users_added_to_ignore_list;
|
if(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1)) { if($mybb->get_input('manage') == "ignored") { $message = $lang->users_added_to_ignore_list;
|
} else
| } else
|
{ $message = $lang->users_added_to_buddy_list; }
| { $message = $lang->users_added_to_buddy_list; }
|
Zeile 3055 | Zeile 3075 |
---|
if($adding_self == true) { if($mybb->get_input('manage') == "ignored")
|
if($adding_self == true) { if($mybb->get_input('manage') == "ignored")
|
{
| {
|
$error_message = $lang->cant_add_self_to_ignore_list;
|
$error_message = $lang->cant_add_self_to_ignore_list;
|
}
| }
|
else { $error_message = $lang->cant_add_self_to_buddy_list;
|
else { $error_message = $lang->cant_add_self_to_buddy_list;
|
} }
| } }
|
if(count($existing_users) == 0) { $message = "";
| if(count($existing_users) == 0) { $message = "";
|
Zeile 3097 | Zeile 3117 |
---|
}
$key = array_search($mybb->get_input('delete', MyBB::INPUT_INT), $user['buddylist']);
|
}
$key = array_search($mybb->get_input('delete', MyBB::INPUT_INT), $user['buddylist']);
|
unset($user['buddylist'][$key]);
| unset($user['buddylist'][$key]);
|
// Now we have the new list, so throw it all back together $new_list = implode(",", $user['buddylist']);
| // Now we have the new list, so throw it all back together $new_list = implode(",", $user['buddylist']);
|
Zeile 3197 | Zeile 3217 |
---|
{ echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"0\");\n"; echo "\$(\"#buddylink\").remove();\n";
|
{ echo "\$(\"#".$mybb->get_input('manage')."_count\").html(\"0\");\n"; echo "\$(\"#buddylink\").remove();\n";
|
|
|
if($mybb->get_input('manage') == "ignored") { echo "\$(\"#ignore_list\").html(\"<li>{$lang->ignore_list_empty}</li>\");\n";
| if($mybb->get_input('manage') == "ignored") { echo "\$(\"#ignore_list\").html(\"<li>{$lang->ignore_list_empty}</li>\");\n";
|
Zeile 3303 | Zeile 3323 |
---|
else { if(isset($sent) && $sent === true)
|
else { if(isset($sent) && $sent === true)
|
{
| {
|
$sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
| $sent_rows = ''; $query = $db->query(" SELECT r.*, u.username
|
Zeile 3326 | Zeile 3346 |
---|
eval("\$sent_requests = \"".$templates->get("usercp_editlists_sent_requests", 1, 0)."\";");
|
eval("\$sent_requests = \"".$templates->get("usercp_editlists_sent_requests", 1, 0)."\";");
|
echo $sentrequests;
| |
echo $sent_requests."<script type=\"text/javascript\">{$message_js}</script>"; } else
| echo $sent_requests."<script type=\"text/javascript\">{$message_js}</script>"; } else
|
Zeile 3336 | Zeile 3355 |
---|
} } exit;
|
} } exit;
|
}
$received_rows = '';
| }
$received_rows = $bgcolor = '';
|
$query = $db->query(" SELECT r.*, u.username FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.uid) WHERE r.touid=".(int)$mybb->user['uid']);
|
$query = $db->query(" SELECT r.*, u.username FROM ".TABLE_PREFIX."buddyrequests r LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid=r.uid) WHERE r.touid=".(int)$mybb->user['uid']);
|
while($request = $db->fetch_array($query)) {
| while($request = $db->fetch_array($query)) {
|
$bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']); $request['date'] = my_date('relative', $request['date']);
| $bgcolor = alt_trow(); $request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['uid']); $request['date'] = my_date('relative', $request['date']);
|
Zeile 3354 | Zeile 3373 |
---|
}
if($received_rows == '')
|
}
if($received_rows == '')
|
{ eval("\$received_rows = \"".$templates->get("usercp_editlists_no_requests")."\";");
| { eval("\$received_rows = \"".$templates->get("usercp_editlists_no_requests")."\";");
|
}
eval("\$received_requests = \"".$templates->get("usercp_editlists_received_requests")."\";");
|
}
eval("\$received_requests = \"".$templates->get("usercp_editlists_received_requests")."\";");
|
$sent_rows = '';
| $sent_rows = $bgcolor = '';
|
$query = $db->query(" SELECT r.*, u.username FROM ".TABLE_PREFIX."buddyrequests r
| $query = $db->query(" SELECT r.*, u.username FROM ".TABLE_PREFIX."buddyrequests r
|
Zeile 3373 | Zeile 3392 |
---|
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']); $request['date'] = my_date('relative', $request['date']); eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";");
|
$request['username'] = build_profile_link(htmlspecialchars_uni($request['username']), (int)$request['touid']); $request['date'] = my_date('relative', $request['date']); eval("\$sent_rows .= \"".$templates->get("usercp_editlists_sent_request")."\";");
|
}
| }
|
if($sent_rows == '') { eval("\$sent_rows = \"".$templates->get("usercp_editlists_no_requests")."\";");
|
if($sent_rows == '') { eval("\$sent_rows = \"".$templates->get("usercp_editlists_no_requests")."\";");
|
}
eval("\$sent_requests = \"".$templates->get("usercp_editlists_sent_requests")."\";");
| }
eval("\$sent_requests = \"".$templates->get("usercp_editlists_sent_requests")."\";");
|
$plugins->run_hooks("usercp_editlists_end");
eval("\$listpage = \"".$templates->get("usercp_editlists")."\";");
| $plugins->run_hooks("usercp_editlists_end");
eval("\$listpage = \"".$templates->get("usercp_editlists")."\";");
|
Zeile 3407 | Zeile 3426 |
---|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid) WHERE p.uid = '{$mybb->user['uid']}' AND p.visible = '-2'
|
LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) LEFT JOIN ".TABLE_PREFIX."forums f ON (f.fid=t.fid) WHERE p.uid = '{$mybb->user['uid']}' AND p.visible = '-2'
|
ORDER BY p.dateline DESC
| ORDER BY p.dateline DESC, p.pid DESC
|
");
while($draft = $db->fetch_array($query))
| ");
while($draft = $db->fetch_array($query))
|
Zeile 3442 | Zeile 3461 |
---|
{ $disable_delete_drafts = 'disabled="disabled"'; eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";");
|
{ $disable_delete_drafts = 'disabled="disabled"'; eval("\$drafts = \"".$templates->get("usercp_drafts_none")."\";");
|
}
$plugins->run_hooks("usercp_drafts_end");
| }
$plugins->run_hooks("usercp_drafts_end");
|
eval("\$draftlist = \"".$templates->get("usercp_drafts")."\";"); output_page($draftlist);
| eval("\$draftlist = \"".$templates->get("usercp_drafts")."\";"); output_page($draftlist);
|
Zeile 3459 | Zeile 3478 |
---|
if(empty($mybb->input['deletedraft'])) { error($lang->no_drafts_selected);
|
if(empty($mybb->input['deletedraft'])) { error($lang->no_drafts_selected);
|
}
$plugins->run_hooks("usercp_do_drafts_start");
| }
$plugins->run_hooks("usercp_do_drafts_start");
|
$pidin = array(); $tidin = array();
| $pidin = array(); $tidin = array();
|
Zeile 3478 | Zeile 3497 |
---|
} } if($tidin)
|
} } if($tidin)
|
{
| {
|
$tidin = implode(",", $tidin); $db->delete_query("threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'"); $tidinp = "OR tid IN ($tidin)";
|
$tidin = implode(",", $tidin); $db->delete_query("threads", "tid IN ($tidin) AND visible='-2' AND uid='".$mybb->user['uid']."'"); $tidinp = "OR tid IN ($tidin)";
|
| } else { $tidinp = '';
|
} if($pidin || $tidinp) { $pidinq = $tidin = ''; if($pidin)
|
} if($pidin || $tidinp) { $pidinq = $tidin = ''; if($pidin)
|
{
| {
|
$pidin = implode(",", $pidin); $pidinq = "pid IN ($pidin)"; }
| $pidin = implode(",", $pidin); $pidinq = "pid IN ($pidin)"; }
|
Zeile 3504 | Zeile 3527 |
---|
if($mybb->input['action'] == "usergroups") { $ingroups = ",".$mybb->user['usergroup'].",".$mybb->user['additionalgroups'].",".$mybb->user['displaygroup'].",";
|
if($mybb->input['action'] == "usergroups") { $ingroups = ",".$mybb->user['usergroup'].",".$mybb->user['additionalgroups'].",".$mybb->user['displaygroup'].",";
|
|
|
$usergroups = $mybb->cache->read('usergroups');
|
$usergroups = $mybb->cache->read('usergroups');
|
|
|
$plugins->run_hooks("usercp_usergroups_start");
// Changing our display group if($mybb->get_input('displaygroup', MyBB::INPUT_INT))
|
$plugins->run_hooks("usercp_usergroups_start");
// Changing our display group if($mybb->get_input('displaygroup', MyBB::INPUT_INT))
|
{ // Verify incoming POST request
| { // Verify incoming POST request
|
verify_post_check($mybb->get_input('my_post_key'));
if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
| verify_post_check($mybb->get_input('my_post_key'));
if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false)
|
Zeile 3529 | Zeile 3552 |
---|
$cache->update_moderators(); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
|
$cache->update_moderators(); $plugins->run_hooks("usercp_usergroups_change_displaygroup"); redirect("usercp.php?action=usergroups", $lang->display_group_changed);
|
exit;
| exit;
|
}
|
}
|
|
|
// Leaving a group if($mybb->get_input('leavegroup', MyBB::INPUT_INT)) { // Verify incoming POST request
|
// Leaving a group if($mybb->get_input('leavegroup', MyBB::INPUT_INT)) { // Verify incoming POST request
|
verify_post_check($mybb->input['my_post_key']);
| verify_post_check($mybb->get_input('my_post_key'));
|
if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
|
if(my_strpos($ingroups, ",".$mybb->get_input('leavegroup', MyBB::INPUT_INT).",") === false)
|
{
| {
|
error($lang->not_member_of_group); } if($mybb->user['usergroup'] == $mybb->get_input('leavegroup', MyBB::INPUT_INT))
| error($lang->not_member_of_group); } if($mybb->user['usergroup'] == $mybb->get_input('leavegroup', MyBB::INPUT_INT))
|
Zeile 3556 | Zeile 3579 |
---|
$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;
|
}
| }
|
$groupleaders = array();
| $groupleaders = array();
|
Zeile 3581 | Zeile 3604 |
---|
$usergroup = $usergroups[$mybb->get_input('joingroup', MyBB::INPUT_INT)];
if($usergroup['type'] == 5)
|
$usergroup = $usergroups[$mybb->get_input('joingroup', MyBB::INPUT_INT)];
if($usergroup['type'] == 5)
|
{
| {
|
error($lang->cannot_join_invite_group); }
| error($lang->cannot_join_invite_group); }
|
Zeile 3597 | Zeile 3620 |
---|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('joingroup', MyBB::INPUT_INT)."'"); $joinrequest = $db->fetch_array($query);
|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('joingroup', MyBB::INPUT_INT)."'"); $joinrequest = $db->fetch_array($query);
|
if($joinrequest['rid']) {
| if($joinrequest) {
|
error($lang->already_sent_join_request); }
|
error($lang->already_sent_join_request); }
|
|
|
if($mybb->get_input('do') == "joingroup" && $usergroup['type'] == 4) { $reasonlength = my_strlen($mybb->get_input('reason'));
|
if($mybb->get_input('do') == "joingroup" && $usergroup['type'] == 4) { $reasonlength = my_strlen($mybb->get_input('reason'));
|
|
|
if($reasonlength > 250) // Reason field is varchar(250) in database { error($lang->sprintf($lang->joinreason_too_long, ($reasonlength - 250)));
| if($reasonlength > 250) // Reason field is varchar(250) in database { error($lang->sprintf($lang->joinreason_too_long, ($reasonlength - 250)));
|
Zeile 3650 | Zeile 3673 |
---|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit;
|
eval("\$joinpage = \"".$templates->get("usercp_usergroups_joingroup")."\";"); output_page($joinpage); exit;
|
} else
| } else
|
{ join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', MyBB::INPUT_INT)); $plugins->run_hooks("usercp_usergroups_join_group");
| { join_usergroup($mybb->user['uid'], $mybb->get_input('joingroup', MyBB::INPUT_INT)); $plugins->run_hooks("usercp_usergroups_join_group");
|
Zeile 3674 | Zeile 3697 |
---|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."' AND invite='1'"); $joinrequest = $db->fetch_array($query);
|
$query = $db->simple_select("joinrequests", "*", "uid='".$mybb->user['uid']."' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."' AND invite='1'"); $joinrequest = $db->fetch_array($query);
|
if($joinrequest['rid'])
| if($joinrequest)
|
{ join_usergroup($mybb->user['uid'], $mybb->get_input('acceptinvite', MyBB::INPUT_INT)); $db->delete_query("joinrequests", "uid='{$mybb->user['uid']}' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."'");
| { join_usergroup($mybb->user['uid'], $mybb->get_input('acceptinvite', MyBB::INPUT_INT)); $db->delete_query("joinrequests", "uid='{$mybb->user['uid']}' AND gid='".$mybb->get_input('acceptinvite', MyBB::INPUT_INT)."'");
|
Zeile 3687 | Zeile 3710 |
---|
} } // Show listing of various group related things
|
} } // Show listing of various group related things
|
|
|
// List of groups this user is a leader of $groupsledlist = '';
| // List of groups this user is a leader of $groupsledlist = '';
|
Zeile 3695 | Zeile 3718 |
---|
{ case "pgsql": case "sqlite":
|
{ case "pgsql": case "sqlite":
|
$query = $db->query(" SELECT g.title, g.gid, g.type, COUNT(DISTINCT u.uid) AS users, COUNT(DISTINCT j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers, l.caninvitemembers
| $query = $db->query(" SELECT g.title, g.gid, g.type, COUNT(DISTINCT u.uid) AS users, COUNT(DISTINCT j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers, l.caninvitemembers
|
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))
|
Zeile 3721 | Zeile 3744 |
---|
{ $memberlistlink = $moderaterequestslink = ''; eval("\$memberlistlink = \"".$templates->get("usercp_usergroups_leader_usergroup_memberlist")."\";");
|
{ $memberlistlink = $moderaterequestslink = ''; eval("\$memberlistlink = \"".$templates->get("usercp_usergroups_leader_usergroup_memberlist")."\";");
|
$usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
| $usergroup['title'] = htmlspecialchars_uni($usergroup['title']);
|
if($usergroup['type'] != 4) { $usergroup['joinrequests'] = '--';
| if($usergroup['type'] != 4) { $usergroup['joinrequests'] = '--';
|
Zeile 3733 | Zeile 3756 |
---|
$groupleader[$usergroup['gid']] = 1; $trow = alt_trow(); eval("\$groupsledlist .= \"".$templates->get("usercp_usergroups_leader_usergroup")."\";");
|
$groupleader[$usergroup['gid']] = 1; $trow = alt_trow(); eval("\$groupsledlist .= \"".$templates->get("usercp_usergroups_leader_usergroup")."\";");
|
}
| }
|
$leadinggroups = ''; if($groupsledlist)
|
$leadinggroups = ''; if($groupsledlist)
|
{
| {
|
eval("\$leadinggroups = \"".$templates->get("usercp_usergroups_leader")."\";"); }
| eval("\$leadinggroups = \"".$templates->get("usercp_usergroups_leader")."\";"); }
|
Zeile 3745 | Zeile 3768 |
---|
$usergroup = $usergroups[$mybb->user['usergroup']]; $usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $usergroup['usertitle'] = htmlspecialchars_uni($usergroup['usertitle']);
|
$usergroup = $usergroups[$mybb->user['usergroup']]; $usergroup['title'] = htmlspecialchars_uni($usergroup['title']); $usergroup['usertitle'] = htmlspecialchars_uni($usergroup['usertitle']);
|
$usergroup['description'] = htmlspecialchars_uni($usergroup['description']);
| if($usergroup['description']) { $usergroup['description'] = htmlspecialchars_uni($usergroup['description']); eval("\$description = \"".$templates->get("usercp_usergroups_memberof_usergroup_description")."\";"); }
|
eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";"); $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
| eval("\$leavelink = \"".$templates->get("usercp_usergroups_memberof_usergroup_leaveprimary")."\";"); $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
|
Zeile 3921 | Zeile 3948 |
---|
if($mybb->settings['enableattachments'] == 0) { error($lang->attachments_disabled);
|
if($mybb->settings['enableattachments'] == 0) { error($lang->attachments_disabled);
|
}
$plugins->run_hooks("usercp_attachments_start");
// Get unviewable forums $f_perm_sql = '';
| }
$plugins->run_hooks("usercp_attachments_start");
// Get unviewable forums $f_perm_sql = '';
|
$unviewable_forums = get_unviewable_forums(true); $inactiveforums = get_inactive_forums(); if($unviewable_forums)
| $unviewable_forums = get_unviewable_forums(true); $inactiveforums = get_inactive_forums(); if($unviewable_forums)
|
Zeile 3944 | Zeile 3971 |
---|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20;
|
if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1) { $mybb->settings['threadsperpage'] = 20;
|
}
| }
|
$perpage = $mybb->settings['threadsperpage']; $page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page > 0) { $start = ($page-1) * $perpage;
|
$perpage = $mybb->settings['threadsperpage']; $page = $mybb->get_input('page', MyBB::INPUT_INT);
if($page > 0) { $start = ($page-1) * $perpage;
|
}
| }
|
else { $start = 0;
| else { $start = 0;
|
Zeile 3961 | Zeile 3988 |
---|
$end = $start + $perpage; $lower = $start+1;
|
$end = $start + $perpage; $lower = $start+1;
|
|
|
$query = $db->query(" SELECT a.*, p.subject, p.dateline, t.tid, t.subject AS threadsubject FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE a.uid='".$mybb->user['uid']."' {$f_perm_sql}
|
$query = $db->query(" SELECT a.*, p.subject, p.dateline, t.tid, t.subject AS threadsubject FROM ".TABLE_PREFIX."attachments a LEFT JOIN ".TABLE_PREFIX."posts p ON (a.pid=p.pid) LEFT JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE a.uid='".$mybb->user['uid']."' {$f_perm_sql}
|
ORDER BY p.dateline DESC LIMIT {$start}, {$perpage}
| ORDER BY p.dateline DESC, p.pid DESC LIMIT {$start}, {$perpage}
|
");
$bandwidth = $totaldownloads = $totalusage = $totalattachments = $processedattachments = 0;
| ");
$bandwidth = $totaldownloads = $totalusage = $totalattachments = $processedattachments = 0;
|
Zeile 3988 | Zeile 4015 |
---|
$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']); $attachdate = my_date('relative', $attachment['dateline']); $altbg = alt_trow();
|
$sizedownloads = $lang->sprintf($lang->attachment_size_downloads, $size, $attachment['downloads']); $attachdate = my_date('relative', $attachment['dateline']); $altbg = alt_trow();
|
|
|
eval("\$attachments .= \"".$templates->get("usercp_attachments_attachment")."\";");
// Add to bandwidth total
| eval("\$attachments .= \"".$templates->get("usercp_attachments_attachment")."\";");
// Add to bandwidth total
|
Zeile 3996 | Zeile 4023 |
---|
$totaldownloads += $attachment['downloads']; $totalusage += $attachment['filesize']; ++$totalattachments;
|
$totaldownloads += $attachment['downloads']; $totalusage += $attachment['filesize']; ++$totalattachments;
|
}
| }
|
else { // This little thing delets attachments without a thread/post
| else { // This little thing delets attachments without a thread/post
|
Zeile 4005 | Zeile 4032 |
---|
++$processedattachments; }
|
++$processedattachments; }
|
| $multipage = '';
|
if($processedattachments >= $perpage || $page > 1)
|
if($processedattachments >= $perpage || $page > 1)
|
{
| {
|
$query = $db->query(" SELECT SUM(a.filesize) AS ausage, COUNT(a.aid) AS acount FROM ".TABLE_PREFIX."attachments a
| $query = $db->query(" SELECT SUM(a.filesize) AS ausage, COUNT(a.aid) AS acount FROM ".TABLE_PREFIX."attachments a
|
Zeile 4036 | Zeile 4064 |
---|
}
$bandwidth = get_friendly_size($bandwidth);
|
}
$bandwidth = get_friendly_size($bandwidth);
|
| eval("\$delete_button = \"".$templates->get("delete_attachments_button")."\";");
|
if(!$attachments) { eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";"); $usagenote = '';
|
if(!$attachments) { eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";"); $usagenote = '';
|
| $delete_button = '';
|
}
$plugins->run_hooks("usercp_attachments_end");
| }
$plugins->run_hooks("usercp_attachments_end");
|
Zeile 4145 | Zeile 4176 |
---|
$useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100'); $avatar_username = htmlspecialchars_uni($mybb->user['username']); eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
|
$useravatar = format_avatar($mybb->user['avatar'], $mybb->user['avatardimensions'], '100x100'); $avatar_username = htmlspecialchars_uni($mybb->user['username']); eval("\$avatar = \"".$templates->get("usercp_currentavatar")."\";");
|
| $mybb->user['email'] = htmlspecialchars_uni($mybb->user['email']);
|
$usergroup = htmlspecialchars_uni($groupscache[$mybb->user['usergroup']]['title']); if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin")
| $usergroup = htmlspecialchars_uni($groupscache[$mybb->user['usergroup']]['title']); if($mybb->user['usergroup'] == 5 && $mybb->settings['regtype'] != "admin")
|
Zeile 4152 | Zeile 4185 |
---|
eval("\$usergroup .= \"".$templates->get("usercp_resendactivation")."\";"); } // Make reputations row
|
eval("\$usergroup .= \"".$templates->get("usercp_resendactivation")."\";"); } // Make reputations row
|
$reputations = '';
| $reputation = '';
|
if($mybb->usergroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) { $reputation_link = get_reputation($mybb->user['reputation']);
| if($mybb->usergroup['usereputationsystem'] == 1 && $mybb->settings['enablereputation'] == 1) { $reputation_link = get_reputation($mybb->user['reputation']);
|
Zeile 4181 | Zeile 4214 |
---|
{ require_once MYBB_ROOT.'inc/datahandlers/warnings.php'; $warningshandler = new WarningsHandler('update');
|
{ require_once MYBB_ROOT.'inc/datahandlers/warnings.php'; $warningshandler = new WarningsHandler('update');
|
|
|
$warningshandler->expire_warnings();
$lang->current_warning_level = $lang->sprintf($lang->current_warning_level, $warning_level, $mybb->user['warningpoints'], $mybb->settings['maxwarningpoints']);
| $warningshandler->expire_warnings();
$lang->current_warning_level = $lang->sprintf($lang->current_warning_level, $warning_level, $mybb->user['warningpoints'], $mybb->settings['maxwarningpoints']);
|
Zeile 4201 | Zeile 4234 |
---|
{ $post_link = ""; if($warning['post_subject'])
|
{ $post_link = ""; if($warning['post_subject'])
|
{
| {
|
$warning['post_subject'] = $parser->parse_badwords($warning['post_subject']); $warning['post_subject'] = htmlspecialchars_uni($warning['post_subject']); $warning['postlink'] = get_post_link($warning['pid']);
| $warning['post_subject'] = $parser->parse_badwords($warning['post_subject']); $warning['post_subject'] = htmlspecialchars_uni($warning['post_subject']); $warning['postlink'] = get_post_link($warning['pid']);
|
Zeile 4261 | Zeile 4294 |
---|
$mybb->user['posts'] = my_number_format($mybb->user['postnum']);
// Build referral link
|
$mybb->user['posts'] = my_number_format($mybb->user['postnum']);
// Build referral link
|
| $referral_info = '';
|
if($mybb->settings['usereferrals'] == 1) { $referral_link = $lang->sprintf($lang->referral_link, $settings['bburl'], $mybb->user['uid']);
| if($mybb->settings['usereferrals'] == 1) { $referral_link = $lang->sprintf($lang->referral_link, $settings['bburl'], $mybb->user['uid']);
|
Zeile 4286 | Zeile 4320 |
---|
$query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1)); if($db->num_rows($query)) {
|
$query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1)); if($db->num_rows($query)) {
|
$visible = "AND t.visible != 0"; if(is_moderator() == true)
| $where = array( "s.uid={$mybb->user['uid']}", "t.lastposteruid!={$mybb->user['uid']}", get_visible_where('t') );
if($unviewable_forums = get_unviewable_forums(true)) { $where[] = "t.fid NOT IN ({$unviewable_forums})"; } if($inactive_forums = get_inactive_forums())
|
{
|
{
|
$visible = '';
| $where[] = "t.fid NOT IN ({$inactive_forums})";
|
}
|
}
|
| $where = implode(' AND ', $where);
|
$query = $db->query(" SELECT s.*, t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
$query = $db->query(" SELECT s.*, t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threadsubscriptions s LEFT JOIN ".TABLE_PREFIX."threads t ON (s.tid=t.tid) LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
WHERE s.uid='".$mybb->user['uid']."' {$visible}
| WHERE {$where}
|
ORDER BY t.lastpost DESC LIMIT 0, 10 ");
|
ORDER BY t.lastpost DESC LIMIT 0, 10 ");
|
| $subscriptions = array();
|
$fpermissions = forum_permissions();
|
$fpermissions = forum_permissions();
|
|
|
while($subscription = $db->fetch_array($query)) { $forumpermissions = $fpermissions[$subscription['fid']];
|
while($subscription = $db->fetch_array($query)) { $forumpermissions = $fpermissions[$subscription['fid']];
|
if($forumpermissions['canview'] != 0 && $forumpermissions['canviewthreads'] != 0 && ($forumpermissions['canonlyviewownthreads'] == 0 || $subscription['uid'] == $mybb->user['uid']))
| if(!isset($forumpermissions['canonlyviewownthreads']) || $forumpermissions['canonlyviewownthreads'] == 0 || $subscription['uid'] == $mybb->user['uid'])
|
{ $subscriptions[$subscription['tid']] = $subscription; } }
|
{ $subscriptions[$subscription['tid']] = $subscription; } }
|
if(is_array($subscriptions))
| if($subscriptions)
|
{ $tids = implode(",", array_keys($subscriptions));
| { $tids = implode(",", array_keys($subscriptions));
|
Zeile 4341 | Zeile 4390 |
---|
while($post = $db->fetch_array($query)) { $subscriptions[$post['tid']]['doticon'] = 1;
|
while($post = $db->fetch_array($query)) { $subscriptions[$post['tid']]['doticon'] = 1;
|
} }
| } }
|
$icon_cache = $cache->read("posticons"); $threadprefixes = build_prefixes();
|
$icon_cache = $cache->read("posticons"); $threadprefixes = build_prefixes();
|
| $latest_subscribed_threads = '';
|
foreach($subscriptions as $thread) {
| foreach($subscriptions as $thread) {
|
Zeile 4354 | Zeile 4404 |
---|
$folder_label = ''; $gotounread = '';
|
$folder_label = ''; $gotounread = '';
|
if($thread['tid'])
| if(!empty($thread['tid']))
|
{ $bgcolor = alt_trow(); $thread['subject'] = $parser->parse_badwords($thread['subject']);
| { $bgcolor = alt_trow(); $thread['subject'] = $parser->parse_badwords($thread['subject']);
|
Zeile 4386 | Zeile 4436 |
---|
$icon = " "; }
|
$icon = " "; }
|
if($thread['doticon'])
| if(!isset($thread['doticon']))
|
{ $folder = "dot_"; $folder_label .= $lang->icon_dot; }
// Check to see which icon we display
|
{ $folder = "dot_"; $folder_label .= $lang->icon_dot; }
// Check to see which icon we display
|
if($thread['lastread'] && $thread['lastread'] < $thread['lastpost'])
| if(!empty($thread['lastread']) && $thread['lastread'] < $thread['lastpost'])
|
{ $folder .= "new"; $folder_label .= $lang->icon_new;
| { $folder .= "new"; $folder_label .= $lang->icon_new;
|
Zeile 4448 | Zeile 4498 |
---|
}
// User's Latest Threads
|
}
// User's Latest Threads
|
| $where = array( "t.uid={$mybb->user['uid']}", get_visible_where('t') );
if($unviewable_forums = get_unviewable_forums(true)) { $where[] = "t.fid NOT IN ({$unviewable_forums})"; }
if($inactive_forums = get_inactive_forums()) { $where[] = "t.fid NOT IN ({$inactive_forums})"; }
$where = implode(' AND ', $where);
|
|
|
// Get unviewable forums $f_perm_sql = ''; $unviewable_forums = get_unviewable_forums(); $inactiveforums = get_inactive_forums(); if($unviewable_forums) { $f_perm_sql = " AND t.fid NOT IN ($unviewable_forums)"; } if($inactiveforums) { $f_perm_sql .= " AND t.fid NOT IN ($inactiveforums)"; }
$visible = " AND t.visible != 0"; if(is_moderator() == true) { $visible = ''; }
| |
$query = $db->query(" SELECT t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
$query = $db->query(" SELECT t.*, t.username AS threadusername, u.username FROM ".TABLE_PREFIX."threads t LEFT JOIN ".TABLE_PREFIX."users u ON (u.uid = t.uid)
|
WHERE t.uid='".$mybb->user['uid']."' AND t.firstpost != 0 AND t.visible >= 0 {$visible}{$f_perm_sql}
| WHERE {$where}
|
ORDER BY t.lastpost DESC LIMIT 0, 5 ");
|
ORDER BY t.lastpost DESC LIMIT 0, 5 ");
|
|
|
// Figure out whether we can view these threads... $threadcache = array(); $fpermissions = forum_permissions(); while($thread = $db->fetch_array($query)) {
|
// Figure out whether we can view these threads... $threadcache = array(); $fpermissions = forum_permissions(); while($thread = $db->fetch_array($query)) {
|
// Moderated, and not moderator? if($thread['visible'] == 0 && is_moderator($thread['fid'], "canviewunapprove") === false) { continue; }
$forumpermissions = $fpermissions[$thread['fid']]; if($forumpermissions['canview'] != 0 || $forumpermissions['canviewthreads'] != 0) { $threadcache[$thread['tid']] = $thread; }
| $threadcache[$thread['tid']] = $thread;
|
}
$latest_threads = '';
| }
$latest_threads = '';
|
Zeile 4542 | Zeile 4579 |
---|
$latest_threads_threads = ''; foreach($threadcache as $thread) {
|
$latest_threads_threads = ''; foreach($threadcache as $thread) {
|
$plugins->run_hooks("usercp_latest_threads_thread"); if($thread['tid'])
| $plugins->run_hooks("usercp_latest_threads_thread"); if(!empty($thread['tid']))
|
{ $bgcolor = alt_trow(); $folder = '';
| { $bgcolor = alt_trow(); $folder = '';
|
Zeile 4604 | Zeile 4641 |
---|
$cutoff = 0; if($thread['lastpost'] > $cutoff) {
|
$cutoff = 0; if($thread['lastpost'] > $cutoff) {
|
if($thread['lastread'])
| if(!empty($thread['lastread']))
|
{ $lastread = $thread['lastread']; }
| { $lastread = $thread['lastread']; }
|
Zeile 4624 | Zeile 4661 |
---|
}
// Folder Icons
|
}
// Folder Icons
|
if($thread['doticon'])
| if(!empty($thread['doticon']))
|
{ $folder = "dot_"; $folder_label .= $lang->icon_dot;
| { $folder = "dot_"; $folder_label .= $lang->icon_dot;
|