Zeile 206 | Zeile 206 |
---|
{ $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);
| $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);
|
Zeile 218 | Zeile 218 |
---|
{ error($lang->error_usercp_return_date_past); }
|
{ error($lang->error_usercp_return_date_past); }
|
|
|
$returndate = "{$return_day}-{$return_month}-{$return_year}"; } else
| $returndate = "{$return_day}-{$return_month}-{$return_year}"; } else
|
Zeile 254 | Zeile 254 |
---|
$user = array( "uid" => $mybb->user['uid'],
|
$user = array( "uid" => $mybb->user['uid'],
|
| "postnum" => $mybb->user['postnum'],
|
"website" => $mybb->input['website'], "icq" => intval($mybb->input['icq']), "aim" => $mybb->input['aim'],
| "website" => $mybb->input['website'], "icq" => intval($mybb->input['icq']), "aim" => $mybb->input['aim'],
|
Zeile 281 | Zeile 282 |
---|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
if(!$userhandler->validate_user()) { $errors = $userhandler->get_friendly_errors();
|
|
|
// Set allowed value otherwise select options disappear if(in_array($lang->userdata_invalid_birthday_privacy, $errors)) { $mybb->input['birthdayprivacy'] = 'none'; }
|
// Set allowed value otherwise select options disappear if(in_array($lang->userdata_invalid_birthday_privacy, $errors)) { $mybb->input['birthdayprivacy'] = 'none'; }
|
|
|
$errors = inline_error($errors); $mybb->input['action'] = "profile"; }
| $errors = inline_error($errors); $mybb->input['action'] = "profile"; }
|
Zeile 408 | Zeile 409 |
---|
$awaycheck[0] = "checked=\"checked\""; } $returndate = explode("-", $mybb->user['returndate']);
|
$awaycheck[0] = "checked=\"checked\""; } $returndate = explode("-", $mybb->user['returndate']);
|
}
| }
|
$returndatesel = ''; for($i = 1; $i <= 31; ++$i) { if($returndate[0] == $i)
|
$returndatesel = ''; for($i = 1; $i <= 31; ++$i) { if($returndate[0] == $i)
|
{
| {
|
$returndatesel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else { $returndatesel .= "<option value=\"$i\">$i</option>\n";
|
$returndatesel .= "<option value=\"$i\" selected=\"selected\">$i</option>\n"; } else { $returndatesel .= "<option value=\"$i\">$i</option>\n";
|
}
| }
|
} $returndatemonthsel[$returndate[1]] = "selected";
| } $returndatemonthsel[$returndate[1]] = "selected";
|
Zeile 433 | Zeile 434 |
---|
while($profilefield = $db->fetch_array($query)) { // Does this field have a minimum post count?
|
while($profilefield = $db->fetch_array($query)) { // Does this field have a minimum post count?
|
if($profilefield['postnum'] && $profilefield['postnum'] > $user['postnum'])
| if($profilefield['postnum'] && $profilefield['postnum'] > $mybb->user['postnum'])
|
{ continue; }
| { continue; }
|
Zeile 449 | Zeile 450 |
---|
if($errors) { $userfield = $mybb->input['profile_fields'][$field];
|
if($errors) { $userfield = $mybb->input['profile_fields'][$field];
|
}
| }
|
else
|
else
|
{
| {
|
$userfield = $user[$field]; } if($type == "multiselect")
|
$userfield = $user[$field]; } if($type == "multiselect")
|
{ if($errors) { $useropts = $userfield; } else {
| { if($errors) { $useropts = $userfield; } else {
|
$useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val)
|
$useropts = explode("\n", $userfield); } if(is_array($useropts)) { foreach($useropts as $key => $val)
|
{
| {
|
$val = htmlspecialchars_uni($val); $seloptions[$val] = $val;
|
$val = htmlspecialchars_uni($val); $seloptions[$val] = $val;
|
} } $expoptions = explode("\n", $options); if(is_array($expoptions))
| } } $expoptions = explode("\n", $options); if(is_array($expoptions))
|
{ foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
|
{ foreach($expoptions as $key => $val) { $val = trim($val); $val = str_replace("\n", "\\n", $val);
|
$sel = "";
| $sel = "";
|
if($val == $seloptions[$val]) { $sel = " selected=\"selected\""; } $select .= "<option value=\"$val\"$sel>$val</option>\n";
|
if($val == $seloptions[$val]) { $sel = " selected=\"selected\""; } $select .= "<option value=\"$val\"$sel>$val</option>\n";
|
}
| }
|
if(!$profilefield['length']) { $profilefield['length'] = 3;
| if(!$profilefield['length']) { $profilefield['length'] = 3;
|
Zeile 509 | Zeile 510 |
---|
$sel = " selected=\"selected\""; } $select .= "<option value=\"$val\"$sel>$val</option>";
|
$sel = " selected=\"selected\""; } $select .= "<option value=\"$val\"$sel>$val</option>";
|
} if(!$profilefield['length']) {
| } if(!$profilefield['length']) {
|
$profilefield['length'] = 1; } $code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>"; } } elseif($type == "radio")
|
$profilefield['length'] = 1; } $code = "<select name=\"profile_fields[$field]\" size=\"{$profilefield['length']}\">$select</select>"; } } elseif($type == "radio")
|
{ $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $checked = "";
| { $expoptions = explode("\n", $options); if(is_array($expoptions)) { foreach($expoptions as $key => $val) { $checked = "";
|
if($val == $userfield) { $checked = " checked=\"checked\""; } $code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
|
if($val == $userfield) { $checked = " checked=\"checked\""; } $code .= "<input type=\"radio\" class=\"radio\" name=\"profile_fields[$field]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
|
} }
| } }
|
} elseif($type == "checkbox") {
| } elseif($type == "checkbox") {
|
Zeile 561 | Zeile 562 |
---|
$checked = " checked=\"checked\""; } $code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
|
$checked = " checked=\"checked\""; } $code .= "<input type=\"checkbox\" class=\"checkbox\" name=\"profile_fields[$field][]\" value=\"$val\"$checked /> <span class=\"smalltext\">$val</span><br />";
|
} } }
| } } }
|
elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield); $code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
|
elseif($type == "textarea") { $value = htmlspecialchars_uni($userfield); $code = "<textarea name=\"profile_fields[$field]\" rows=\"6\" cols=\"30\" style=\"width: 95%\">$value</textarea>";
|
} else
| } else
|
{ $value = htmlspecialchars_uni($userfield); $maxlength = "";
| { $value = htmlspecialchars_uni($userfield); $maxlength = "";
|
Zeile 600 | Zeile 601 |
---|
{ eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";"); }
|
{ eval("\$customfields = \"".$templates->get("usercp_profile_profilefields")."\";"); }
|
|
|
if($mybb->usergroup['cancustomtitle'] == 1) { if($mybb->usergroup['usertitle'] == "")
| if($mybb->usergroup['cancustomtitle'] == 1) { if($mybb->usergroup['usertitle'] == "")
|
Zeile 613 | Zeile 614 |
---|
if($title['posts'] <= $mybb->user['postnum']) { $defaulttitle = $title['title'];
|
if($title['posts'] <= $mybb->user['postnum']) { $defaulttitle = $title['title'];
|
break; } } } else { $defaulttitle = $mybb->usergroup['usertitle']; }
| break; } } } else { $defaulttitle = $mybb->usergroup['usertitle']; }
|
if(trim($user['usertitle']) == '') { $lang->current_custom_usertitle = '';
| if(trim($user['usertitle']) == '') { $lang->current_custom_usertitle = '';
|
Zeile 640 | Zeile 641 |
---|
{ $customtitle = ""; }
|
{ $customtitle = ""; }
|
|
|
$plugins->run_hooks("usercp_profile_end");
|
$plugins->run_hooks("usercp_profile_end");
|
|
|
eval("\$editprofile = \"".$templates->get("usercp_profile")."\";"); output_page($editprofile); }
| eval("\$editprofile = \"".$templates->get("usercp_profile")."\";"); output_page($editprofile); }
|
Zeile 665 | Zeile 666 |
---|
"timeformat" => intval($mybb->input['timeformat']), "timezone" => $db->escape_string($mybb->input['timezoneoffset']), "language" => $mybb->input['language']
|
"timeformat" => intval($mybb->input['timeformat']), "timezone" => $db->escape_string($mybb->input['timezoneoffset']), "language" => $mybb->input['language']
|
);
| );
|
$user['options'] = array( "allownotices" => $mybb->input['allownotices'], "hideemail" => $mybb->input['hideemail'],
| $user['options'] = array( "allownotices" => $mybb->input['allownotices'], "hideemail" => $mybb->input['hideemail'],
|
Zeile 751 | Zeile 752 |
---|
}
if($user['invisible'] == 1)
|
}
if($user['invisible'] == 1)
|
{
| {
|
$invisiblecheck = "checked=\"checked\""; } else
| $invisiblecheck = "checked=\"checked\""; } else
|
Zeile 817 | Zeile 818 |
---|
{ $receivepmscheck = ""; }
|
{ $receivepmscheck = ""; }
|
|
|
if($user['receivefrombuddy'] == 1) { $receivefrombuddycheck = "checked=\"checked\"";
|
if($user['receivefrombuddy'] == 1) { $receivefrombuddycheck = "checked=\"checked\"";
|
} else
| } else
|
{ $receivefrombuddycheck = "";
|
{ $receivefrombuddycheck = "";
|
}
| }
|
if($user['pmnotice'] == 1 || $user['pmnotice'] == 2) { $pmnoticecheck = " checked=\"checked\"";
|
if($user['pmnotice'] == 1 || $user['pmnotice'] == 2) { $pmnoticecheck = " checked=\"checked\"";
|
}
| }
|
else { $pmnoticecheck = ""; }
if($user['dstcorrection'] == 2)
|
else { $pmnoticecheck = ""; }
if($user['dstcorrection'] == 2)
|
{
| {
|
$dst_auto_selected = "selected=\"selected\""; } else if($user['dstcorrection'] == 1) { $dst_enabled_selected = "selected=\"selected\"";
|
$dst_auto_selected = "selected=\"selected\""; } else if($user['dstcorrection'] == 1) { $dst_enabled_selected = "selected=\"selected\"";
|
}
| }
|
else { $dst_disabled_selected = "selected=\"selected\"";
|
else { $dst_disabled_selected = "selected=\"selected\"";
|
}
| }
|
if($user['showcodebuttons'] == 1) { $showcodebuttonscheck = "checked=\"checked\"";
|
if($user['showcodebuttons'] == 1) { $showcodebuttonscheck = "checked=\"checked\"";
|
} else
| } else
|
{ $showcodebuttonscheck = ""; }
| { $showcodebuttonscheck = ""; }
|
Zeile 876 | Zeile 877 |
---|
$pmnotifycheck = ''; }
|
$pmnotifycheck = ''; }
|
|
|
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) {
| if($user['classicpostbit'] != 0) {
|
Zeile 889 | Zeile 890 |
---|
else { $classicpostbitcheck = '';
|
else { $classicpostbitcheck = '';
|
}
| }
|
$date_format_options = "<option value=\"0\">{$lang->use_default}</option>"; foreach($date_formats as $key => $format) {
| $date_format_options = "<option value=\"0\">{$lang->use_default}</option>"; foreach($date_formats as $key => $format) {
|
Zeile 902 | Zeile 903 |
---|
else { $date_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";
|
else { $date_format_options .= "<option value=\"$key\">".my_date($format, TIME_NOW, "", 0)."</option>";
|
}
| }
|
}
$time_format_options = "<option value=\"0\">{$lang->use_default}</option>"; foreach($time_formats as $key => $format)
|
}
$time_format_options = "<option value=\"0\">{$lang->use_default}</option>"; foreach($time_formats as $key => $format)
|
{
| {
|
if($user['timeformat'] == $key) { $time_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";
| if($user['timeformat'] == $key) { $time_format_options .= "<option value=\"$key\" selected=\"selected\">".my_date($format, TIME_NOW, "", 0)."</option>";
|
Zeile 919 | Zeile 920 |
---|
}
$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
|
}
$tzselect = build_timezone_select("timezoneoffset", $mybb->user['timezone'], true);
|
|
|
if($mybb->settings['allowbuddyonly'] == 1) { eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");
|
if($mybb->settings['allowbuddyonly'] == 1) { eval("\$pms_from_buddys = \"".$templates->get("usercp_options_pms_from_buddys")."\";");
|
}
| }
|
$threadview[$user['threadmode']] = 'selected="selected"'; $daysprunesel[$user['daysprune']] = 'selected="selected"'; $stylelist = build_theme_select("style", $user['style']);
| $threadview[$user['threadmode']] = 'selected="selected"'; $daysprunesel[$user['daysprune']] = 'selected="selected"'; $stylelist = build_theme_select("style", $user['style']);
|
Zeile 935 | Zeile 936 |
---|
if(is_array($explodedtpp)) { foreach($explodedtpp as $key => $val)
|
if(is_array($explodedtpp)) { foreach($explodedtpp as $key => $val)
|
{
| {
|
$val = trim($val); $selected = ""; if($user['tpp'] == $val)
|
$val = trim($val); $selected = ""; if($user['tpp'] == $val)
|
{ $selected = "selected=\"selected\"";
| { $selected = "selected=\"selected\"";
|
} $tppoptions .= "<option value=\"$val\" $selected>".$lang->sprintf($lang->tpp_option, $val)."</option>\n"; }
| } $tppoptions .= "<option value=\"$val\" $selected>".$lang->sprintf($lang->tpp_option, $val)."</option>\n"; }
|
Zeile 966 | Zeile 967 |
---|
} eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";"); }
|
} eval("\$pppselect = \"".$templates->get("usercp_options_pppselect")."\";"); }
|
|
|
$plugins->run_hooks("usercp_options_end");
|
$plugins->run_hooks("usercp_options_end");
|
|
|
eval("\$editprofile = \"".$templates->get("usercp_options")."\";"); output_page($editprofile); }
| eval("\$editprofile = \"".$templates->get("usercp_options")."\";"); output_page($editprofile); }
|
Zeile 1058 | Zeile 1059 |
---|
}
$plugins->run_hooks("usercp_email");
|
}
$plugins->run_hooks("usercp_email");
|
|
|
eval("\$changemail = \"".$templates->get("usercp_email")."\";"); output_page($changemail); }
| eval("\$changemail = \"".$templates->get("usercp_email")."\";"); output_page($changemail); }
|
Zeile 1069 | Zeile 1070 |
---|
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) {
| $plugins->run_hooks("usercp_do_password_start"); if(validate_password_from_uid($mybb->user['uid'], $mybb->input['oldpassword']) == false) {
|
Zeile 1105 | Zeile 1106 |
---|
{ $mybb->input['action'] = "password"; $errors = inline_error($errors);
|
{ $mybb->input['action'] = "password"; $errors = inline_error($errors);
|
} }
| } }
|
if($mybb->input['action'] == "password") { $plugins->run_hooks("usercp_password");
|
if($mybb->input['action'] == "password") { $plugins->run_hooks("usercp_password");
|
|
|
eval("\$editpassword = \"".$templates->get("usercp_password")."\";"); output_page($editpassword); }
|
eval("\$editpassword = \"".$templates->get("usercp_password")."\";"); output_page($editpassword); }
|
|
|
if($mybb->input['action'] == "do_changename" && $mybb->request_method == "post") { // Verify incoming POST request
| if($mybb->input['action'] == "do_changename" && $mybb->request_method == "post") { // Verify incoming POST request
|
Zeile 1145 | Zeile 1146 |
---|
$userhandler->set_data($user);
if(!$userhandler->validate_user())
|
$userhandler->set_data($user);
if(!$userhandler->validate_user())
|
{
| {
|
$errors = $userhandler->get_friendly_errors(); } else
| $errors = $userhandler->get_friendly_errors(); } else
|
Zeile 1157 | Zeile 1158 |
---|
} } if(count($errors) > 0)
|
} } if(count($errors) > 0)
|
{
| {
|
$errors = inline_error($errors); $mybb->input['action'] = "changename"; } }
if($mybb->input['action'] == "changename")
|
$errors = inline_error($errors); $mybb->input['action'] = "changename"; } }
if($mybb->input['action'] == "changename")
|
{
| {
|
$plugins->run_hooks("usercp_changename_start"); if($mybb->usergroup['canchangename'] != 1) { error_no_permission(); }
|
$plugins->run_hooks("usercp_changename_start"); if($mybb->usergroup['canchangename'] != 1) { error_no_permission(); }
|
|
|
$plugins->run_hooks("usercp_changename_end");
|
$plugins->run_hooks("usercp_changename_end");
|
|
|
eval("\$changename = \"".$templates->get("usercp_changename")."\";"); output_page($changename); }
| eval("\$changename = \"".$templates->get("usercp_changename")."\";"); output_page($changename); }
|
Zeile 1202 | Zeile 1203 |
---|
else { if($mybb->input['do'] == "no_notification")
|
else { if($mybb->input['do'] == "no_notification")
|
{
| {
|
$new_notification = 0; } else if($mybb->input['do'] == "instant_notification") { $new_notification = 1;
|
$new_notification = 0; } else if($mybb->input['do'] == "instant_notification") { $new_notification = 1;
|
}
| }
|
// Update $update_array = array("notification" => $new_notification); $db->update_query("threadsubscriptions", $update_array, "tid IN ($tids) AND uid='{$mybb->user['uid']}'");
|
// Update $update_array = array("notification" => $new_notification); $db->update_query("threadsubscriptions", $update_array, "tid IN ($tids) AND uid='{$mybb->user['uid']}'");
|
}
| }
|
// Done, redirect redirect("usercp.php?action=subscriptions", $lang->redirect_subscriptions_updated); }
|
// Done, redirect redirect("usercp.php?action=subscriptions", $lang->redirect_subscriptions_updated); }
|
|
|
if($mybb->input['action'] == "subscriptions") { $plugins->run_hooks("usercp_subscriptions_start");
| if($mybb->input['action'] == "subscriptions") { $plugins->run_hooks("usercp_subscriptions_start");
|
Zeile 1228 | Zeile 1229 |
---|
if(is_moderator() == true) { $visible = '';
|
if(is_moderator() == true) { $visible = '';
|
}
| }
|
// Do Multi Pages $query = $db->query("
| // Do Multi Pages $query = $db->query("
|
Zeile 1238 | Zeile 1239 |
---|
WHERE ts.uid = '".$mybb->user['uid']."' {$visible} "); $threadcount = $db->fetch_field($query, "threads");
|
WHERE ts.uid = '".$mybb->user['uid']."' {$visible} "); $threadcount = $db->fetch_field($query, "threads");
|
if(!$mybb->settings['threadsperpage'])
| if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
|
{ $mybb->settings['threadsperpage'] = 20; }
| { $mybb->settings['threadsperpage'] = 20; }
|
Zeile 1248 | Zeile 1249 |
---|
$page = intval($mybb->input['page']); if($page > 0) {
|
$page = intval($mybb->input['page']); if($page > 0) {
|
$start = ($page-1) *$perpage;
| $start = ($page-1) * $perpage; $pages = $threadcount / $perpage; $pages = ceil($pages); if($page > $pages || $page <= 0) { $start = 0; $page = 1; }
|
} else {
| } else {
|
Zeile 1307 | Zeile 1315 |
---|
$threadcount = 0; } }
|
$threadcount = 0; } }
|
|
|
if(is_array($subscriptions)) { $tids = implode(",", array_keys($subscriptions));
|
if(is_array($subscriptions)) { $tids = implode(",", array_keys($subscriptions));
|
|
|
if($mybb->user['uid'] == 0) { // Build a forum cache.
| if($mybb->user['uid'] == 0) { // Build a forum cache.
|
Zeile 1321 | Zeile 1329 |
---|
WHERE active != 0 ORDER BY pid, disporder ");
|
WHERE active != 0 ORDER BY pid, disporder ");
|
|
|
$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); } else
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); } else
|
Zeile 1367 | Zeile 1375 |
---|
$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline']; } }
|
$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline']; } }
|
$icon_cache = $cache->read("posticons");
| $icon_cache = $cache->read("posticons");
|
// Now we can build our subscription list foreach($subscriptions as $thread) { $bgcolor = alt_trow();
|
// Now we can build our subscription list foreach($subscriptions as $thread) { $bgcolor = alt_trow();
|
|
|
$folder = ''; $prefix = '';
|
$folder = ''; $prefix = '';
|
|
|
// If this thread has a prefix, insert a space between prefix and subject if($thread['prefix'] != 0) { $thread['threadprefix'] .= ' '; }
|
// If this thread has a prefix, insert a space between prefix and subject if($thread['prefix'] != 0) { $thread['threadprefix'] .= ' '; }
|
|
|
// Sanitize $thread['subject'] = $parser->parse_badwords($thread['subject']); $thread['subject'] = htmlspecialchars_uni($thread['subject']);
| // Sanitize $thread['subject'] = $parser->parse_badwords($thread['subject']); $thread['subject'] = htmlspecialchars_uni($thread['subject']);
|
Zeile 1421 | Zeile 1429 |
---|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $forum_read = $readforums[$thread['fid']];
|
if($mybb->settings['threadreadcut'] > 0 && $mybb->user['uid']) { $forum_read = $readforums[$thread['fid']];
|
|
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff;
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; 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['lastread'])
|
if($thread['lastpost'] > $cutoff) { if($thread['lastread'])
|
{
| {
|
$lastread = $thread['lastread']; } else
| $lastread = $thread['lastread']; } else
|
Zeile 1460 | Zeile 1468 |
---|
else { $lastread = $forum_read;
|
else { $lastread = $forum_read;
|
}
| }
|
}
if($lastread && $lastread < $thread['lastpost'])
| }
if($lastread && $lastread < $thread['lastpost'])
|
Zeile 1488 | Zeile 1496 |
---|
{ $folder .= "lock"; $folder_label .= $lang->icon_lock;
|
{ $folder .= "lock"; $folder_label .= $lang->icon_lock;
|
}
$folder .= "folder";
| }
$folder .= "folder";
|
if($thread['visible'] == 0) { $bgcolor = "trow_shaded"; }
|
if($thread['visible'] == 0) { $bgcolor = "trow_shaded"; }
|
|
|
// Build last post info $lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
| // Build last post info $lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']);
|
Zeile 1507 | Zeile 1515 |
---|
if($lastposteruid == 0) { $lastposterlink = $lastposter;
|
if($lastposteruid == 0) { $lastposterlink = $lastposter;
|
}
| }
|
else { $lastposterlink = build_profile_link($lastposter, $lastposteruid);
| else { $lastposterlink = build_profile_link($lastposter, $lastposteruid);
|
Zeile 1536 | Zeile 1544 |
---|
{ eval("\$threads = \"".$templates->get("usercp_subscriptions_none")."\";"); }
|
{ eval("\$threads = \"".$templates->get("usercp_subscriptions_none")."\";"); }
|
|
|
$plugins->run_hooks("usercp_subscriptions_end");
|
$plugins->run_hooks("usercp_subscriptions_end");
|
|
|
eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";"); output_page($subscriptions); }
| eval("\$subscriptions = \"".$templates->get("usercp_subscriptions")."\";"); output_page($subscriptions); }
|
Zeile 1546 | Zeile 1554 |
---|
if($mybb->input['action'] == "forumsubscriptions") { $plugins->run_hooks("usercp_forumsubscriptions_start");
|
if($mybb->input['action'] == "forumsubscriptions") { $plugins->run_hooks("usercp_forumsubscriptions_start");
|
|
|
if($mybb->user['uid'] == 0) { // Build a forum cache.
| if($mybb->user['uid'] == 0) { // Build a forum cache.
|
Zeile 1556 | Zeile 1564 |
---|
WHERE active != 0 ORDER BY pid, disporder ");
|
WHERE active != 0 ORDER BY pid, disporder ");
|
|
|
$forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); } else
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); } else
|
Zeile 1603 | Zeile 1611 |
---|
$forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
$forumpermissions = $fpermissions[$forum['fid']];
if($forumpermissions['canview'] == 0 || $forumpermissions['canviewthreads'] == 0)
|
{
| {
|
continue; }
|
continue; }
|
|
|
$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost'])); $folder = $lightbulb['folder'];
|
$lightbulb = get_forum_lightbulb(array('open' => $forum['open'], 'lastread' => $forum['lastread']), array('lastpost' => $forum['lastpost'])); $folder = $lightbulb['folder'];
|
|
|
if($forumpermissions['canonlyviewownthreads'] != 0) { $posts = '-'; $threads = '-';
|
if($forumpermissions['canonlyviewownthreads'] != 0) { $posts = '-'; $threads = '-';
|
} else {
| } else {
|
$posts = my_number_format($forum['posts']); $threads = my_number_format($forum['threads']); }
if($forum['lastpost'] == 0 || $forum['lastposter'] == "")
|
$posts = my_number_format($forum['posts']); $threads = my_number_format($forum['threads']); }
if($forum['lastpost'] == 0 || $forum['lastposter'] == "")
|
{
| {
|
$lastpost = "<div align=\"center\">{$lang->never}</div>"; } // Hide last post elseif($forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid'])
|
$lastpost = "<div align=\"center\">{$lang->never}</div>"; } // Hide last post elseif($forumpermissions['canonlyviewownthreads'] != 0 && $forum['lastposteruid'] != $mybb->user['uid'])
|
{
| {
|
$lastpost = "<div align=\"center\">{$lang->na}</div>"; } else
| $lastpost = "<div align=\"center\">{$lang->na}</div>"; } else
|
Zeile 1650 | Zeile 1658 |
---|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = "";
|
if($mybb->settings['showdescriptions'] == 0) { $forum['description'] = "";
|
}
| }
|
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
|
eval("\$forums .= \"".$templates->get("usercp_forumsubscriptions_forum")."\";");
|
}
| }
|
if(!$forums) { eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
| if(!$forums) { eval("\$forums = \"".$templates->get("usercp_forumsubscriptions_none")."\";");
|
Zeile 1667 | Zeile 1675 |
---|
}
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")
|
}
if($mybb->input['action'] == "do_editsig" && $mybb->request_method == "post")
|
{
| {
|
// Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
Zeile 1758 | Zeile 1766 |
---|
if($mybb->user['suspendsignature'] && $mybb->user['suspendsigtime'] > TIME_NOW) { $plugins->run_hooks("usercp_editsig_end");
|
if($mybb->user['suspendsignature'] && $mybb->user['suspendsigtime'] > TIME_NOW) { $plugins->run_hooks("usercp_editsig_end");
|
|
|
// User either doesn't have permission, or has their signature suspended eval("\$editsig = \"".$templates->get("usercp_editsig_suspended")."\";"); }
| // User either doesn't have permission, or has their signature suspended eval("\$editsig = \"".$templates->get("usercp_editsig_suspended")."\";"); }
|
Zeile 1805 | Zeile 1813 |
---|
{ $codebuttons = build_mycode_inserter("signature"); }
|
{ $codebuttons = build_mycode_inserter("signature"); }
|
|
|
$plugins->run_hooks("usercp_editsig_end");
|
$plugins->run_hooks("usercp_editsig_end");
|
|
|
eval("\$editsig = \"".$templates->get("usercp_editsig")."\";"); }
|
eval("\$editsig = \"".$templates->get("usercp_editsig")."\";"); }
|
|
|
output_page($editsig); }
| output_page($editsig); }
|
Zeile 1823 | Zeile 1831 |
---|
require_once MYBB_ROOT."inc/functions_upload.php";
$avatar_error = "";
|
require_once MYBB_ROOT."inc/functions_upload.php";
$avatar_error = "";
|
|
|
if($mybb->input['remove']) // remove avatar { $updated_avatar = array(
| if($mybb->input['remove']) // remove avatar { $updated_avatar = array(
|
Zeile 1840 | Zeile 1848 |
---|
{ $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']);
| $mybb->input['gallery'] = str_replace(array("./", ".."), "", $mybb->input['gallery']); $mybb->input['avatar'] = str_replace(array("./", ".."), "", $mybb->input['avatar']);
|
Zeile 2052 | Zeile 2060 |
---|
{ eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";"); }
|
{ eval("\$avatarlist = \"".$templates->get("usercp_avatar_gallery_noavatars")."\";"); }
|
|
|
$plugins->run_hooks("usercp_avatar_end");
|
$plugins->run_hooks("usercp_avatar_end");
|
|
|
eval("\$gallery = \"".$templates->get("usercp_avatar_gallery")."\";"); output_page($gallery); }
| eval("\$gallery = \"".$templates->get("usercp_avatar_gallery")."\";"); output_page($gallery); }
|
Zeile 2084 | Zeile 2092 |
---|
} eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";"); $colspan = 1;
|
} eval("\$currentavatar = \"".$templates->get("usercp_avatar_current")."\";"); $colspan = 1;
|
}
| }
|
else { $colspan = 2; } if($mybb->settings['maxavatardims'] != "")
|
else { $colspan = 2; } if($mybb->settings['maxavatardims'] != "")
|
{
| {
|
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims'])); $lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
|
list($maxwidth, $maxheight) = explode("x", my_strtolower($mybb->settings['maxavatardims'])); $lang->avatar_note .= "<br />".$lang->sprintf($lang->avatar_note_dimensions, $maxwidth, $maxheight);
|
}
| }
|
if($mybb->settings['avatarsize']) { $maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
| if($mybb->settings['avatarsize']) { $maxsize = get_friendly_size($mybb->settings['avatarsize']*1024);
|
Zeile 2102 | Zeile 2110 |
---|
if($mybb->settings['avatarresizing'] == "auto") { $auto_resize = "<br /><span class=\"smalltext\">{$lang->avatar_auto_resize_note}</span>\n";
|
if($mybb->settings['avatarresizing'] == "auto") { $auto_resize = "<br /><span class=\"smalltext\">{$lang->avatar_auto_resize_note}</span>\n";
|
}
| }
|
else if($mybb->settings['avatarresizing'] == "user") { $auto_resize = "<br /><span class=\"smalltext\"><input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->avatar_auto_resize_option}</label></span>"; }
|
else if($mybb->settings['avatarresizing'] == "user") { $auto_resize = "<br /><span class=\"smalltext\"><input type=\"checkbox\" name=\"auto_resize\" value=\"1\" checked=\"checked\" id=\"auto_resize\" /> <label for=\"auto_resize\">{$lang->avatar_auto_resize_option}</label></span>"; }
|
|
|
$plugins->run_hooks("usercp_avatar_end");
|
$plugins->run_hooks("usercp_avatar_end");
|
|
|
eval("\$avatar = \"".$templates->get("usercp_avatar")."\";"); output_page($avatar); }
| eval("\$avatar = \"".$templates->get("usercp_avatar")."\";"); output_page($avatar); }
|
Zeile 2150 | Zeile 2158 |
---|
$selected_list = explode(",", $mybb->user['ignorelist']); } }
|
$selected_list = explode(",", $mybb->user['ignorelist']); } }
|
|
|
$error_message = ""; $message = "";
|
$error_message = ""; $message = "";
|
|
|
// Adding one or more users to this list if($mybb->input['add_username']) {
| // Adding one or more users to this list if($mybb->input['add_username']) {
|
Zeile 2166 | Zeile 2174 |
---|
foreach($users as $key => $username) { if(empty($username))
|
foreach($users as $key => $username) { if(empty($username))
|
{ unset($users[$key]); continue;
| { unset($users[$key]); continue;
|
}
if(my_strtoupper($mybb->user['username']) == my_strtoupper($username))
| }
if(my_strtoupper($mybb->user['username']) == my_strtoupper($username))
|
Zeile 2178 | Zeile 2186 |
---|
continue; } $users[$key] = $db->escape_string($username);
|
continue; } $users[$key] = $db->escape_string($username);
|
}
| }
|
// Fetch out new users if(count($users) > 0)
| // Fetch out new users if(count($users) > 0)
|
Zeile 2211 | Zeile 2219 |
---|
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; }
|
|
|
$existing_users[] = $user['uid'];
|
$existing_users[] = $user['uid'];
|
} }
| } }
|
if($found_users < count($users))
|
if($found_users < count($users))
|
{
| {
|
if($error_message) { $error_message .= "<br />";
|
if($error_message) { $error_message .= "<br />";
|
}
| }
|
$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(($adding_self != true || ($adding_self == true && count($users) > 0)) && ($error_message == "" || count($users) > 1))
|
{ if($mybb->input['manage'] == "ignored")
| { if($mybb->input['manage'] == "ignored")
|
{ $message = $lang->users_added_to_ignore_list;
|
{ $message = $lang->users_added_to_ignore_list;
|
}
| }
|
else { $message = $lang->users_added_to_buddy_list;
| else { $message = $lang->users_added_to_buddy_list;
|
Zeile 2239 | Zeile 2247 |
---|
}
if($adding_self == true)
|
}
if($adding_self == true)
|
{ if($mybb->input['manage'] == "ignored")
| { if($mybb->input['manage'] == "ignored")
|
{ $error_message = $lang->cant_add_self_to_ignore_list; }
| { $error_message = $lang->cant_add_self_to_ignore_list; }
|
Zeile 2299 | Zeile 2307 |
---|
{ $user['ignorelist'] = $db->escape_string($new_list); $mybb->user['ignorelist'] = $user['ignorelist'];
|
{ $user['ignorelist'] = $db->escape_string($new_list); $mybb->user['ignorelist'] = $user['ignorelist'];
|
} else
| } else
|
{ $user['buddylist'] = $db->escape_string($new_list); $mybb->user['buddylist'] = $user['buddylist'];
| { $user['buddylist'] = $db->escape_string($new_list); $mybb->user['buddylist'] = $user['buddylist'];
|
Zeile 2403 | Zeile 2411 |
---|
// Fetch out ignore list users $ignore_count = 0;
|
// Fetch out ignore list users $ignore_count = 0;
|
if($mybb->user['ignorelist'])
| if($mybb->user['ignorelist'])
|
{ $type = "ignored"; $query = $db->simple_select("users", "*", "uid IN ({$mybb->user['ignorelist']})", array("order_by" => "username")); while($user = $db->fetch_array($query))
|
{ $type = "ignored"; $query = $db->simple_select("users", "*", "uid IN ({$mybb->user['ignorelist']})", array("order_by" => "username")); while($user = $db->fetch_array($query))
|
{
| {
|
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']); if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive']) { $status = "online";
|
$profile_link = build_profile_link(format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['uid']); if($user['lastactive'] > $timecut && ($user['invisible'] == 0 || $mybb->usergroup['canviewwolinvis'] == 1) && $user['lastvisit'] != $user['lastactive']) { $status = "online";
|
}
| }
|
else { $status = "offline";
| else { $status = "offline";
|
Zeile 2427 | Zeile 2435 |
---|
if(!$ignore_list) { $ignore_list = "<li>{$lang->ignore_list_empty}</li>";
|
if(!$ignore_list) { $ignore_list = "<li>{$lang->ignore_list_empty}</li>";
|
}
| }
|
// If an AJAX request from buddy management, echo out whatever the new list is. if($mybb->request_method == "post" && $mybb->input['ajax'] == 1) { if($mybb->input['manage'] == "ignored")
|
// If an AJAX request from buddy management, echo out whatever the new list is. if($mybb->request_method == "post" && $mybb->input['ajax'] == 1) { if($mybb->input['manage'] == "ignored")
|
{
| {
|
echo $ignore_list; echo "<script type=\"text/javascript\"> $('ignored_count').innerHTML = '{$ignore_count}'; {$message_js}</script>"; }
| echo $ignore_list; echo "<script type=\"text/javascript\"> $('ignored_count').innerHTML = '{$ignore_count}'; {$message_js}</script>"; }
|
Zeile 2444 | Zeile 2452 |
---|
} exit; }
|
} exit; }
|
|
|
$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 2496 | Zeile 2504 |
---|
eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";"); $disable_delete_drafts = ''; }
|
eval("\$draftsubmit = \"".$templates->get("usercp_drafts_submit")."\";"); $disable_delete_drafts = ''; }
|
|
|
$query = $db->simple_select("posts", "COUNT(*) AS draftcount", "visible='-2' AND uid='".$mybb->user['uid']."'"); $count = $db->fetch_array($query); $draftcount = "(".my_number_format($count['draftcount']).")";
|
$query = $db->simple_select("posts", "COUNT(*) AS draftcount", "visible='-2' AND uid='".$mybb->user['uid']."'"); $count = $db->fetch_array($query); $draftcount = "(".my_number_format($count['draftcount']).")";
|
|
|
$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 2559 | Zeile 2567 |
---|
// Changing our display group if($mybb->input['displaygroup'])
|
// Changing our display group if($mybb->input['displaygroup'])
|
{ // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
| { // Verify incoming POST request verify_post_check($mybb->input['my_post_key']);
|
if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false) {
| if(my_strpos($ingroups, ",".$mybb->input['displaygroup'].",") === false) {
|
Zeile 2634 | Zeile 2642 |
---|
} if($mybb->input['do'] == "joingroup" && $usergroup['type'] == 4) {
|
} if($mybb->input['do'] == "joingroup" && $usergroup['type'] == 4) {
|
$reason = $db->escape_string($reason);
| $reason = $db->escape_string($mybb->input['reason']);
|
$now = TIME_NOW; $joinrequest = array( "uid" => $mybb->user['uid'], "gid" => intval($mybb->input['joingroup']),
|
$now = TIME_NOW; $joinrequest = array( "uid" => $mybb->user['uid'], "gid" => intval($mybb->input['joingroup']),
|
"reason" => $db->escape_string($mybb->input['reason']),
| "reason" => $reason,
|
"dateline" => TIME_NOW );
| "dateline" => TIME_NOW );
|
Zeile 2685 | Zeile 2693 |
---|
case "pgsql": case "sqlite": $query = $db->query("
|
case "pgsql": case "sqlite": $query = $db->query("
|
SELECT g.title, g.gid, g.type, COUNT(u.uid) AS users, COUNT(j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers
| SELECT g.title, g.gid, g.type, COUNT(DISTINCT u.uid) AS users, COUNT(DISTINCT j.rid) AS joinrequests, l.canmanagerequests, l.canmanagemembers
|
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 AND j.uid != 0)
| 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 2717 | Zeile 2725 |
---|
if($usergroup['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1) { $moderaterequestslink = " [<a href=\"managegroup.php?action=joinrequests&gid={$usergroup['gid']}\">{$lang->view_requests}</a>]";
|
if($usergroup['joinrequests'] > 0 && $usergroup['canmanagerequests'] == 1) { $moderaterequestslink = " [<a href=\"managegroup.php?action=joinrequests&gid={$usergroup['gid']}\">{$lang->view_requests}</a>]";
|
}
| }
|
$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")."\";");
|
Zeile 2774 | Zeile 2782 |
---|
else { $description = '';
|
else { $description = '';
|
} if(!$usergroup['usertitle']) { // fetch title here
| |
} $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
| } $trow = alt_trow(); if($usergroup['candisplaygroup'] == 1 && $usergroup['gid'] == $mybb->user['displaygroup'])
|
Zeile 2833 | Zeile 2837 |
---|
else { $conditions = $lang->usergroup_joins_anyone;
|
else { $conditions = $lang->usergroup_joins_anyone;
|
}
| }
|
if($appliedjoin[$usergroup['gid']]) {
| if($appliedjoin[$usergroup['gid']]) {
|
Zeile 2858 | Zeile 2862 |
---|
$comma = $lang->comma; } $usergroupleaders = $lang->usergroup_leaders." ".$usergroupleaders;
|
$comma = $lang->comma; } $usergroupleaders = $lang->usergroup_leaders." ".$usergroupleaders;
|
}
| }
|
if(my_strpos($usergroupleaders, $mybb->user['username']) === false) { // User is already a leader of the group, so don't show as a "Join Group"
| if(my_strpos($usergroupleaders, $mybb->user['username']) === false) { // User is already a leader of the group, so don't show as a "Join Group"
|
Zeile 2869 | Zeile 2873 |
---|
if($joinablegrouplist) { eval("\$joinablegroups = \"".$templates->get("usercp_usergroups_joinable")."\";");
|
if($joinablegrouplist) { eval("\$joinablegroups = \"".$templates->get("usercp_usergroups_joinable")."\";");
|
}
| }
|
$plugins->run_hooks("usercp_usergroups_end");
|
$plugins->run_hooks("usercp_usergroups_end");
|
|
|
eval("\$groupmemberships = \"".$templates->get("usercp_usergroups")."\";"); output_page($groupmemberships); }
| eval("\$groupmemberships = \"".$templates->get("usercp_usergroups")."\";"); output_page($groupmemberships); }
|
Zeile 2884 | Zeile 2888 |
---|
$attachments = '';
// Pagination
|
$attachments = '';
// Pagination
|
if(!$mybb->settings['threadsperpage'])
| if(!$mybb->settings['threadsperpage'] || (int)$mybb->settings['threadsperpage'] < 1)
|
{ $mybb->settings['threadsperpage'] = 20; }
| { $mybb->settings['threadsperpage'] = 20; }
|
Zeile 2972 | Zeile 2976 |
---|
eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";"); $usagenote = ''; }
|
eval("\$attachments = \"".$templates->get("usercp_attachments_none")."\";"); $usagenote = ''; }
|
|
|
$plugins->run_hooks("usercp_attachments_end");
|
$plugins->run_hooks("usercp_attachments_end");
|
|
|
eval("\$manageattachments = \"".$templates->get("usercp_attachments")."\";"); output_page($manageattachments); }
| eval("\$manageattachments = \"".$templates->get("usercp_attachments")."\";"); output_page($manageattachments); }
|
Zeile 3026 | Zeile 3030 |
---|
{ $daysreg = 1; }
|
{ $daysreg = 1; }
|
|
|
$perday = $mybb->user['postnum'] / $daysreg; $perday = round($perday, 2); if($perday > $mybb->user['postnum'])
| $perday = $mybb->user['postnum'] / $daysreg; $perday = round($perday, 2); if($perday > $mybb->user['postnum'])
|
Zeile 3169 | Zeile 3173 |
---|
// Format post numbers $mybb->user['posts'] = my_number_format($mybb->user['postnum']);
|
// Format post numbers $mybb->user['posts'] = my_number_format($mybb->user['postnum']);
|
|
|
// Build referral link if($mybb->settings['usereferrals'] == 1) {
| // Build referral link if($mybb->settings['usereferrals'] == 1) {
|
Zeile 3182 | Zeile 3186 |
---|
$mybb->user['notepad'] = htmlspecialchars_uni($mybb->user['notepad']); eval("\$user_notepad = \"".$templates->get("usercp_notepad")."\";"); $plugins->run_hooks("usercp_notepad_end");
|
$mybb->user['notepad'] = htmlspecialchars_uni($mybb->user['notepad']); eval("\$user_notepad = \"".$templates->get("usercp_notepad")."\";"); $plugins->run_hooks("usercp_notepad_end");
|
|
|
// Thread Subscriptions with New Posts $latest_subscribed = ''; $query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1));
| // Thread Subscriptions with New Posts $latest_subscribed = ''; $query = $db->simple_select("threadsubscriptions", "sid", "uid = '".$mybb->user['uid']."'", array("limit" => 1));
|
Zeile 3203 | Zeile 3207 |
---|
ORDER BY t.lastpost DESC LIMIT 0, 10 ");
|
ORDER BY t.lastpost DESC LIMIT 0, 10 ");
|
|
|
$fpermissions = forum_permissions(); while($subscription = $db->fetch_array($query)) {
| $fpermissions = forum_permissions(); while($subscription = $db->fetch_array($query)) {
|
Zeile 3213 | Zeile 3217 |
---|
$subscriptions[$subscription['tid']] = $subscription; } }
|
$subscriptions[$subscription['tid']] = $subscription; } }
|
|
|
if(is_array($subscriptions)) { $tids = implode(",", array_keys($subscriptions));
// Checking read if($mybb->settings['threadreadcut'] > 0)
|
if(is_array($subscriptions)) { $tids = implode(",", array_keys($subscriptions));
// Checking read if($mybb->settings['threadreadcut'] > 0)
|
{
| {
|
$query = $db->simple_select("threadsread", "*", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})"); while($readthread = $db->fetch_array($query)) {
| $query = $db->simple_select("threadsread", "*", "uid='{$mybb->user['uid']}' AND tid IN ({$tids})"); while($readthread = $db->fetch_array($query)) {
|
Zeile 3229 | Zeile 3233 |
---|
unset($subscriptions[$readthread['tid']]); // If it's already been read, then don't display the thread } else
|
unset($subscriptions[$readthread['tid']]); // If it's already been read, then don't display the thread } else
|
{
| {
|
$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline']; } } }
|
$subscriptions[$readthread['tid']]['lastread'] = $readthread['dateline']; } } }
|
|
|
if($subscriptions) { if($mybb->settings['dotfolders'] != 0)
| if($subscriptions) { if($mybb->settings['dotfolders'] != 0)
|
Zeile 3247 | Zeile 3251 |
---|
}
$icon_cache = $cache->read("posticons");
|
}
$icon_cache = $cache->read("posticons");
|
|
|
foreach($subscriptions as $thread) { $folder = ''; $folder_label = ''; $gotounread = '';
|
foreach($subscriptions as $thread) { $folder = ''; $folder_label = ''; $gotounread = '';
|
|
|
if($thread['tid']) { $bgcolor = alt_trow();
| if($thread['tid']) { $bgcolor = alt_trow();
|
Zeile 3267 | Zeile 3271 |
---|
{ $query = $db->simple_select('threadprefixes', 'prefix, displaystyle', "pid='{$thread['prefix']}'"); $threadprefix = $db->fetch_array($query);
|
{ $query = $db->simple_select('threadprefixes', 'prefix, displaystyle', "pid='{$thread['prefix']}'"); $threadprefix = $db->fetch_array($query);
|
|
|
$thread['displayprefix'] = $threadprefix['displaystyle'].' ';
|
$thread['displayprefix'] = $threadprefix['displaystyle'].' ';
|
} else {
| } else {
|
$thread['displayprefix'] = ''; }
// Icons if($thread['icon'] > 0 && $icon_cache[$thread['icon']])
|
$thread['displayprefix'] = ''; }
// Icons if($thread['icon'] > 0 && $icon_cache[$thread['icon']])
|
{
| {
|
$icon = $icon_cache[$thread['icon']]; $icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />";
|
$icon = $icon_cache[$thread['icon']]; $icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />";
|
} else {
| } else {
|
$icon = " "; }
|
$icon = " "; }
|
|
|
if($thread['doticon']) { $folder = "dot_"; $folder_label .= $lang->icon_dot; }
|
if($thread['doticon']) { $folder = "dot_"; $folder_label .= $lang->icon_dot; }
|
|
|
// Check to see which icon we display if($thread['lastread'] && $thread['lastread'] < $thread['lastpost'])
|
// Check to see which icon we display if($thread['lastread'] && $thread['lastread'] < $thread['lastpost'])
|
{
| {
|
$folder .= "new"; $folder_label .= $lang->icon_new; $new_class = "subject_new"; $thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost"); eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
|
$folder .= "new"; $folder_label .= $lang->icon_new; $new_class = "subject_new"; $thread['newpostlink'] = get_thread_link($thread['tid'], 0, "newpost"); eval("\$gotounread = \"".$templates->get("forumdisplay_thread_gotounread")."\";");
|
}
| }
|
else { $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
else { $folder_label .= $lang->icon_no_new; $new_class = "subject_old";
|
}
| }
|
$folder .= "folder";
if($thread['visible'] == 0) { $bgcolor = "trow_shaded"; }
|
$folder .= "folder";
if($thread['visible'] == 0) { $bgcolor = "trow_shaded"; }
|
|
|
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']); $lastposter = $thread['lastposter']; $lastposteruid = $thread['lastposteruid'];
|
$lastpostdate = my_date($mybb->settings['dateformat'], $thread['lastpost']); $lastposttime = my_date($mybb->settings['timeformat'], $thread['lastpost']); $lastposter = $thread['lastposter']; $lastposteruid = $thread['lastposteruid'];
|
|
|
if($lastposteruid == 0) { $lastposterlink = $lastposter;
| if($lastposteruid == 0) { $lastposterlink = $lastposter;
|
Zeile 3327 | Zeile 3331 |
---|
{ $lastposterlink = build_profile_link($lastposter, $lastposteruid); }
|
{ $lastposterlink = build_profile_link($lastposter, $lastposteruid); }
|
|
|
$thread['replies'] = my_number_format($thread['replies']); $thread['views'] = my_number_format($thread['views']); $thread['author'] = build_profile_link($thread['username'], $thread['uid']);
|
$thread['replies'] = my_number_format($thread['replies']); $thread['views'] = my_number_format($thread['views']); $thread['author'] = build_profile_link($thread['username'], $thread['uid']);
|
|
|
eval("\$latest_subscribed_threads .= \"".$templates->get("usercp_latest_subscribed_threads")."\";"); } }
| eval("\$latest_subscribed_threads .= \"".$templates->get("usercp_latest_subscribed_threads")."\";"); } }
|
Zeile 3339 | Zeile 3343 |
---|
} } }
|
} } }
|
|
|
// User's Latest Threads
// Get unviewable forums
| // User's Latest Threads
// Get unviewable forums
|
Zeile 3419 | Zeile 3423 |
---|
$threadcache[$post['tid']]['doticon'] = 1; } }
|
$threadcache[$post['tid']]['doticon'] = 1; } }
|
|
|
$icon_cache = $cache->read("posticons");
|
$icon_cache = $cache->read("posticons");
|
|
|
// Run the threads... $latest_threads_threads = ''; foreach($threadcache as $thread)
| // Run the threads... $latest_threads_threads = ''; foreach($threadcache as $thread)
|
Zeile 3436 | Zeile 3440 |
---|
$isnew = 0; $donenew = 0; $lastread = 0;
|
$isnew = 0; $donenew = 0; $lastread = 0;
|
|
|
// If this thread has a prefix... if($thread['prefix'] != 0) {
| // If this thread has a prefix... if($thread['prefix'] != 0) {
|
Zeile 3444 | Zeile 3448 |
---|
$threadprefix = $db->fetch_array($query);
$thread['displayprefix'] = $threadprefix['displaystyle'].' ';
|
$threadprefix = $db->fetch_array($query);
$thread['displayprefix'] = $threadprefix['displaystyle'].' ';
|
}
| }
|
else { $thread['displayprefix'] = '';
|
else { $thread['displayprefix'] = '';
|
}
| }
|
$thread['subject'] = $parser->parse_badwords($thread['subject']); $thread['subject'] = htmlspecialchars_uni($thread['subject']); $thread['threadlink'] = get_thread_link($thread['tid']); $thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])
|
$thread['subject'] = $parser->parse_badwords($thread['subject']); $thread['subject'] = htmlspecialchars_uni($thread['subject']); $thread['threadlink'] = get_thread_link($thread['tid']); $thread['lastpostlink'] = get_thread_link($thread['tid'], 0, "lastpost");
if($thread['icon'] > 0 && $icon_cache[$thread['icon']])
|
{
| {
|
$icon = $icon_cache[$thread['icon']]; $icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />"; }
| $icon = $icon_cache[$thread['icon']]; $icon = "<img src=\"{$icon['path']}\" alt=\"{$icon['name']}\" />"; }
|
Zeile 3464 | Zeile 3468 |
---|
{ $icon = " "; }
|
{ $icon = " "; }
|
|
|
if($mybb->settings['threadreadcut'] > 0) { $forum_read = $readforums[$thread['fid']];
|
if($mybb->settings['threadreadcut'] > 0) { $forum_read = $readforums[$thread['fid']];
|
|
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff; } }
|
$read_cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24; if($forum_read == 0 || $forum_read < $read_cutoff) { $forum_read = $read_cutoff; } }
|
|
|
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)
|
if($mybb->settings['threadreadcut'] > 0 && $thread['lastpost'] > $forum_read)
|
{
| {
|
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
|
$cutoff = TIME_NOW-$mybb->settings['threadreadcut']*60*60*24;
|
}
| }
|
$cutoff = 0; if($thread['lastpost'] > $cutoff) {
| $cutoff = 0; if($thread['lastpost'] > $cutoff) {
|
Zeile 3489 | Zeile 3493 |
---|
$lastread = $thread['lastread']; } }
|
$lastread = $thread['lastread']; } }
|
|
|
if(!$lastread) { $readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);
| if(!$lastread) { $readcookie = $threadread = my_get_array_cookie("threadread", $thread['tid']);
|
Zeile 3569 | Zeile 3573 |
---|
eval("\$latest_threads = \"".$templates->get("usercp_latest_threads")."\";"); }
|
eval("\$latest_threads = \"".$templates->get("usercp_latest_threads")."\";"); }
|
|
|
$plugins->run_hooks("usercp_end");
eval("\$usercp = \"".$templates->get("usercp")."\";");
| $plugins->run_hooks("usercp_end");
eval("\$usercp = \"".$templates->get("usercp")."\";");
|