Zeile 91 | Zeile 91 |
---|
$lang->load('messages');
// Wipe lockout cookie if enough time has passed
|
$lang->load('messages');
// Wipe lockout cookie if enough time has passed
|
if($mybb->cookies['lockoutexpiry'] && $mybb->cookies['lockoutexpiry'] < TIME_NOW)
| if(isset($mybb->cookies['lockoutexpiry']) && $mybb->cookies['lockoutexpiry'] < TIME_NOW)
|
{ my_unsetcookie('lockoutexpiry'); }
| { my_unsetcookie('lockoutexpiry'); }
|
Zeile 183 | Zeile 183 |
---|
if(isset($mybb->input['pid']) && THIS_SCRIPT != "polls.php") { $query = $db->simple_select("posts", "fid", "pid = '{$mybb->input['pid']}'", array("limit" => 1));
|
if(isset($mybb->input['pid']) && THIS_SCRIPT != "polls.php") { $query = $db->simple_select("posts", "fid", "pid = '{$mybb->input['pid']}'", array("limit" => 1));
|
$fid = $db->fetch_field($query, 'fid');
| |
|
|
if($fid)
| if($db->num_rows($query) > 0 && $fid = $db->fetch_field($query, 'fid'))
|
{ $style = $forum_cache[$fid]; $load_from_forum = 1;
| { $style = $forum_cache[$fid]; $load_from_forum = 1;
|
Zeile 195 | Zeile 194 |
---|
else if(isset($mybb->input['tid'])) { $query = $db->simple_select('threads', 'fid', "tid = '{$mybb->input['tid']}'", array('limit' => 1));
|
else if(isset($mybb->input['tid'])) { $query = $db->simple_select('threads', 'fid', "tid = '{$mybb->input['tid']}'", array('limit' => 1));
|
$fid = $db->fetch_field($query, 'fid');
| |
|
|
if($fid)
| if($db->num_rows($query) > 0 && $fid = $db->fetch_field($query, 'fid'))
|
{ $style = $forum_cache[$fid]; $load_from_forum = 1;
| { $style = $forum_cache[$fid]; $load_from_forum = 1;
|
Zeile 207 | Zeile 205 |
---|
else if(isset($mybb->input['pid']) && THIS_SCRIPT == "polls.php") { $query = $db->query("SELECT t.fid FROM ".TABLE_PREFIX."polls p INNER JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE p.pid = '{$mybb->input['pid']}' LIMIT 1");
|
else if(isset($mybb->input['pid']) && THIS_SCRIPT == "polls.php") { $query = $db->query("SELECT t.fid FROM ".TABLE_PREFIX."polls p INNER JOIN ".TABLE_PREFIX."threads t ON (t.tid=p.tid) WHERE p.pid = '{$mybb->input['pid']}' LIMIT 1");
|
$fid = $db->fetch_field($query, 'fid');
| |
|
|
if($fid)
| if($db->num_rows($query) > 0 && $fid = $db->fetch_field($query, 'fid'))
|
{ $style = $forum_cache[$fid]; $load_from_forum = 1;
| { $style = $forum_cache[$fid]; $load_from_forum = 1;
|
Zeile 336 | Zeile 333 |
---|
else { $stylesheet_url = $mybb->get_asset_url($page_stylesheet);
|
else { $stylesheet_url = $mybb->get_asset_url($page_stylesheet);
|
| if (file_exists(MYBB_ROOT.$page_stylesheet)) { $stylesheet_url .= "?t=".filemtime(MYBB_ROOT.$page_stylesheet); }
|
}
if($mybb->settings['minifycss'])
| }
if($mybb->settings['minifycss'])
|
Zeile 535 | Zeile 536 |
---|
{ eval('$buddylink = "' . $templates->get('header_welcomeblock_member_buddy') . '";'); }
|
{ eval('$buddylink = "' . $templates->get('header_welcomeblock_member_buddy') . '";'); }
|
|
|
if($mybb->usergroup['cansearch'] == 1) { eval('$searchlink = "'.$templates->get('header_welcomeblock_member_search').'";');
| if($mybb->usergroup['cansearch'] == 1) { eval('$searchlink = "'.$templates->get('header_welcomeblock_member_search').'";');
|
Zeile 570 | Zeile 571 |
---|
break; }
|
break; }
|
if($mybb->cookies['lockoutexpiry'])
| if(!empty($mybb->cookies['lockoutexpiry']))
|
{ $secsleft = (int)($mybb->cookies['lockoutexpiry'] - TIME_NOW); $hoursleft = floor($secsleft / 3600);
| { $secsleft = (int)($mybb->cookies['lockoutexpiry'] - TIME_NOW); $hoursleft = floor($secsleft / 3600);
|
Zeile 650 | Zeile 651 |
---|
} else {
|
} else {
|
$total_joinrequests = my_number_format($total_joinrequests); $lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, $total_joinrequests);
| $lang->pending_joinrequests = $lang->sprintf($lang->pending_joinrequests, my_number_format($total_joinrequests));
|
}
eval('$pending_joinrequests = "'.$templates->get('global_pending_joinrequests').'";');
| }
eval('$pending_joinrequests = "'.$templates->get('global_pending_joinrequests').'";');
|
Zeile 661 | Zeile 661 |
---|
$modnotice = ''; $moderation_queue = array();
|
$modnotice = ''; $moderation_queue = array();
|
| $can_access_moderationqueue = false;
|
// This user is a moderator, super moderator or administrator
|
// This user is a moderator, super moderator or administrator
|
if($mybb->settings['reportmethod'] == "db" && ($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1)))
| if($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
|
{ // Only worth checking if we are here because we have ACP permissions and the other condition fails if($mybb->usergroup['cancp'] == 1 && !($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
|
{ // Only worth checking if we are here because we have ACP permissions and the other condition fails if($mybb->usergroup['cancp'] == 1 && !($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
|
{
| {
|
// First we check if the user's a super admin: if yes, we don't care about permissions $can_access_moderationqueue = true; $is_super_admin = is_super_admin($mybb->user['uid']);
| // First we check if the user's a super admin: if yes, we don't care about permissions $can_access_moderationqueue = true; $is_super_admin = is_super_admin($mybb->user['uid']);
|
Zeile 692 | Zeile 693 |
---|
if(array_key_exists('moderation_queue', $permissions['permissions']) && $adminperms['forum']['moderation_queue'] != 1) { $can_access_moderationqueue = false;
|
if(array_key_exists('moderation_queue', $permissions['permissions']) && $adminperms['forum']['moderation_queue'] != 1) { $can_access_moderationqueue = false;
|
} } } }
| } } } }
|
else
|
else
|
{
| {
|
$can_access_moderationqueue = false; }
|
$can_access_moderationqueue = false; }
|
|
|
if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1)) { // Read the reported content cache
| if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1)) { // Read the reported content cache
|
Zeile 708 | Zeile 709 |
---|
// 0 or more reported items currently exist if($reported['unread'] > 0)
|
// 0 or more reported items currently exist if($reported['unread'] > 0)
|
{
| {
|
// We want to avoid one extra query for users that can moderate any forum if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod']) {
| // We want to avoid one extra query for users that can moderate any forum if($mybb->usergroup['cancp'] || $mybb->usergroup['issupermod']) {
|
Zeile 738 | Zeile 739 |
---|
{ $lang->unread_reports = $lang->sprintf($lang->unread_reports, my_number_format($unread)); }
|
{ $lang->unread_reports = $lang->sprintf($lang->unread_reports, my_number_format($unread)); }
|
|
|
eval('$moderation_queue[] = "'.$templates->get('global_unreadreports', 1, 0).'";'); } } } }
|
eval('$moderation_queue[] = "'.$templates->get('global_unreadreports', 1, 0).'";'); } } } }
|
// Get awaiting moderation queue stats if($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagemodqueue'] == 1))
| // Get awaiting moderation queue stats, except if the page is editpost.php, // because that page can make changes - (un)approving attachments, or deleting // unapproved attachments - that would invalidate anything generated here. // Just leave this queue notification blank for editpost.php. if(!(defined('THIS_SCRIPT') && THIS_SCRIPT == 'editpost.php') && ($can_access_moderationqueue || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagemodqueue'] == 1)))
|
{ $unapproved_posts = $unapproved_threads = 0; $query = $db->simple_select("posts", "replyto", "visible = 0");
| { $unapproved_posts = $unapproved_threads = 0; $query = $db->simple_select("posts", "replyto", "visible = 0");
|
Zeile 778 | Zeile 782 |
---|
}
eval('$moderation_queue[] = "'.$templates->get('global_modqueue', 1, 0).'";');
|
}
eval('$moderation_queue[] = "'.$templates->get('global_modqueue', 1, 0).'";');
|
} }
| } }
|
}
if(!empty($moderation_queue))
| }
if(!empty($moderation_queue))
|
Zeile 809 | Zeile 813 |
---|
$bannedwarning = ''; if($mybb->usergroup['isbannedgroup'] == 1) {
|
$bannedwarning = ''; if($mybb->usergroup['isbannedgroup'] == 1) {
|
// Fetch details on their ban $query = $db->simple_select('banned', '*', "uid = '{$mybb->user['uid']}'", array('limit' => 1)); $ban = $db->fetch_array($query);
if($ban['uid']) { // Format their ban lift date and reason appropriately $banlift = $lang->banned_lifted_never; $reason = htmlspecialchars_uni($ban['reason']);
if($ban['lifted'] > 0)
| // Format their ban lift date and reason appropriately if(!empty($mybb->user['banned'])) { if(!empty($mybb->user['banlifted']))
|
{
|
{
|
$banlift = my_date('normal', $ban['lifted']);
| $banlift = my_date('normal', $mybb->user['banlifted']);
|
}
|
}
|
}
if(empty($reason)) { $reason = $lang->unknown; }
if(empty($banlift)) {
| else { $banlift = $lang->banned_lifted_never; } } else {
|
$banlift = $lang->unknown;
|
$banlift = $lang->unknown;
|
| }
if(!empty($mybb->user['banreason'])) { $reason = htmlspecialchars_uni($mybb->user['banreason']); } else { $reason = $lang->unknown;
|
}
// Display a nice warning to the user
| }
// Display a nice warning to the user
|
Zeile 859 | Zeile 863 |
---|
ORDER BY pm.dateline DESC LIMIT 1 ");
|
ORDER BY pm.dateline DESC LIMIT 1 ");
|
|
|
$pm = $db->fetch_array($query); $pm['subject'] = $parser->parse_badwords($pm['subject']);
if($pm['fromuid'] == 0)
|
$pm = $db->fetch_array($query); $pm['subject'] = $parser->parse_badwords($pm['subject']);
if($pm['fromuid'] == 0)
|
{
| {
|
$pm['fromusername'] = $lang->mybb_engine; $user_text = $pm['fromusername']; }
| $pm['fromusername'] = $lang->mybb_engine; $user_text = $pm['fromusername']; }
|
Zeile 872 | Zeile 876 |
---|
{ $pm['fromusername'] = htmlspecialchars_uni($pm['fromusername']); $user_text = build_profile_link($pm['fromusername'], $pm['fromuid']);
|
{ $pm['fromusername'] = htmlspecialchars_uni($pm['fromusername']); $user_text = build_profile_link($pm['fromusername'], $pm['fromuid']);
|
}
| }
|
if($mybb->user['pms_unread'] == 1) {
| if($mybb->user['pms_unread'] == 1) {
|
Zeile 886 | Zeile 890 |
---|
}
$remote_avatar_notice = '';
|
}
$remote_avatar_notice = '';
|
if(($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars']) {
| if(isset($mybb->user['avatartype']) && ($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars']) {
|
eval('$remote_avatar_notice = "'.$templates->get('global_remote_avatar_notice').'";'); }
|
eval('$remote_avatar_notice = "'.$templates->get('global_remote_avatar_notice').'";'); }
|
| $awaitingusers = '';
|
if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1) { $awaitingusers = $cache->read('awaitingactivation');
|
if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1) { $awaitingusers = $cache->read('awaitingactivation');
|
|
|
if(isset($awaitingusers['time']) && $awaitingusers['time'] + 86400 < TIME_NOW) { $cache->update_awaitingactivation(); $awaitingusers = $cache->read('awaitingactivation');
|
if(isset($awaitingusers['time']) && $awaitingusers['time'] + 86400 < TIME_NOW) { $cache->update_awaitingactivation(); $awaitingusers = $cache->read('awaitingactivation');
|
}
| }
|
if(!empty($awaitingusers['users'])) { $awaitingusers = (int)$awaitingusers['users'];
| if(!empty($awaitingusers['users'])) { $awaitingusers = (int)$awaitingusers['users'];
|
Zeile 1018 | Zeile 1023 |
---|
$theme_select = $theme_options = ''; if($mybb->settings['showthemeselect'] != 0) {
|
$theme_select = $theme_options = ''; if($mybb->settings['showthemeselect'] != 0) {
|
$theme_options = build_theme_select("theme", $mybb->user['style'], 0, '', false, true);
| if(isset($mybb->user['style'])) { $selected = $mybb->user['style']; } else { $selected = -1; }
$theme_options = build_theme_select("theme", $selected, 0, '', false, true);
|
if(!empty($theme_options)) {
| if(!empty($theme_options)) {
|
Zeile 1160 | Zeile 1174 |
---|
$query = $db->simple_select('users', 'uid', $condition, array('limit' => 1)); $referrer = $db->fetch_array($query);
|
$query = $db->simple_select('users', 'uid', $condition, array('limit' => 1)); $referrer = $db->fetch_array($query);
|
if($referrer['uid'])
| if(!empty($referrer) && $referrer['uid'])
|
{ my_setcookie('mybb[referrer]', $referrer['uid']); }
| { my_setcookie('mybb[referrer]', $referrer['uid']); }
|
Zeile 1223 | Zeile 1237 |
---|
}
// work out which items the user has collapsed
|
}
// work out which items the user has collapsed
|
$colcookie = '';
| $collapse = $collapsed = $collapsedimg = $collapsedthead = array();
|
if(!empty($mybb->cookies['collapsed']))
|
if(!empty($mybb->cookies['collapsed']))
|
{
| {
|
$colcookie = $mybb->cookies['collapsed'];
|
$colcookie = $mybb->cookies['collapsed'];
|
}
$collapse = $collapsed = $collapsedimg = array();
| |
|
|
if($colcookie) {
| |
// Preserve and don't unset $collapse, will be needed globally throughout many pages $collapse = explode("|", $colcookie); foreach($collapse as $val) {
|
// Preserve and don't unset $collapse, will be needed globally throughout many pages $collapse = explode("|", $colcookie); foreach($collapse as $val) {
|
$ex = $val."_e"; $co = $val."_c"; $collapsed[$co] = "display: show;"; $collapsed[$ex] = "display: none;";
| $collapsed[$val."_e"] = "display: none;";
|
$collapsedimg[$val] = "_collapsed"; $collapsedthead[$val] = " thead_collapsed"; }
| $collapsedimg[$val] = "_collapsed"; $collapsedthead[$val] = " thead_collapsed"; }
|