Zeile 54 | Zeile 54 |
---|
$session->init(); $mybb->session = &$session;
|
$session->init(); $mybb->session = &$session;
|
$mybb->user['ismoderator'] = is_moderator('', '', $mybb->user['uid']);
| $mybb->user['ismoderator'] = is_moderator(0, '', $mybb->user['uid']);
|
// Set our POST validation code here $mybb->post_code = generate_post_check();
| // Set our POST validation code here $mybb->post_code = generate_post_check();
|
Zeile 111 | Zeile 111 |
---|
// The user used our new quick theme changer if(isset($mybb->input['theme']) && verify_post_check($mybb->get_input('my_post_key'), true)) {
|
// The user used our new quick theme changer if(isset($mybb->input['theme']) && verify_post_check($mybb->get_input('my_post_key'), true)) {
|
$mybb->user['style'] = $mybb->get_input('theme'); // If user is logged in, update their theme selection with the new one if($mybb->user['uid'])
| // Set up user handler. require_once MYBB_ROOT.'inc/datahandlers/user.php'; $userhandler = new UserDataHandler('update');
$user = array( 'uid' => $mybb->user['uid'], 'style' => $mybb->get_input('theme', MyBB::INPUT_INT), 'usergroup' => $mybb->user['usergroup'], 'additionalgroups' => $mybb->user['additionalgroups'] );
$userhandler->set_data($user);
// validate_user verifies the style if it is set in the data array. if($userhandler->validate_user())
|
{
|
{
|
if(isset($mybb->cookies['mybbtheme']))
| $mybb->user['style'] = $user['style'];
// If user is logged in, update their theme selection with the new one if($mybb->user['uid']) { if(isset($mybb->cookies['mybbtheme'])) { my_unsetcookie('mybbtheme'); }
$userhandler->update_user(); } // Guest = cookie else
|
{
|
{
|
my_unsetcookie('mybbtheme');
| my_setcookie('mybbtheme', $user['style']);
|
}
|
}
|
$db->update_query('users', array('style' => (int)$mybb->user['style']), "uid = '{$mybb->user['uid']}'"); } // Guest = cookie else { my_setcookie('mybbtheme', $mybb->get_input('theme'));
| |
} } // Cookied theme!
| } } // Cookied theme!
|
Zeile 141 | Zeile 159 |
---|
$loadstyle = "tid = '{$mybb->user['style']}'"; $load_from_user = 1;
|
$loadstyle = "tid = '{$mybb->user['style']}'"; $load_from_user = 1;
|
}
| }
|
$valid = array( 'showthread.php',
| $valid = array( 'showthread.php',
|
Zeile 155 | Zeile 173 |
---|
'printthread.php', 'moderation.php' );
|
'printthread.php', 'moderation.php' );
|
|
|
if(in_array($current_page, $valid)) { cache_forums();
|
if(in_array($current_page, $valid)) { cache_forums();
|
|
|
// If we're accessing a post, fetch the forum theme for it and if we're overriding it if(isset($mybb->input['pid']) && THIS_SCRIPT != "polls.php") {
| // If we're accessing a post, fetch the forum theme for it and if we're overriding it if(isset($mybb->input['pid']) && THIS_SCRIPT != "polls.php") {
|
Zeile 171 | Zeile 189 |
---|
$style = $forum_cache[$fid]; $load_from_forum = 1; }
|
$style = $forum_cache[$fid]; $load_from_forum = 1; }
|
} // We have a thread id and a forum id, we can easily fetch the theme for this forum 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) { $style = $forum_cache[$fid]; $load_from_forum = 1; }
| } // We have a thread id and a forum id, we can easily fetch the theme for this forum 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) { $style = $forum_cache[$fid]; $load_from_forum = 1; }
|
} // If we're accessing poll results, fetch the forum theme for it and if we're overriding it else if(isset($mybb->input['pid']) && THIS_SCRIPT == "polls.php")
| } // If we're accessing poll results, fetch the forum theme for it and if we're overriding it else if(isset($mybb->input['pid']) && THIS_SCRIPT == "polls.php")
|
Zeile 195 | Zeile 213 |
---|
$style = $forum_cache[$fid]; $load_from_forum = 1; }
|
$style = $forum_cache[$fid]; $load_from_forum = 1; }
|
}
| }
|
// We have a forum id - simply load the theme from it else if(isset($mybb->input['fid']) && isset($forum_cache[$mybb->input['fid']])) {
| // We have a forum id - simply load the theme from it else if(isset($mybb->input['fid']) && isset($forum_cache[$mybb->input['fid']])) {
|
Zeile 209 | Zeile 227 |
---|
if(isset($style['style']) && $style['style'] > 0) { $style['style'] = (int)$style['style'];
|
if(isset($style['style']) && $style['style'] > 0) { $style['style'] = (int)$style['style'];
|
|
|
// This theme is forced upon the user, overriding their selection if($style['overridestyle'] == 1 || !isset($mybb->user['style'])) { $loadstyle = "tid = '{$style['style']}'"; }
|
// This theme is forced upon the user, overriding their selection if($style['overridestyle'] == 1 || !isset($mybb->user['style'])) { $loadstyle = "tid = '{$style['style']}'"; }
|
}
| }
|
// After all of that no theme? Load the board default if(empty($loadstyle)) { $loadstyle = "def='1'";
|
// After all of that no theme? Load the board default if(empty($loadstyle)) { $loadstyle = "def='1'";
|
}
| }
|
// Fetch the theme to load from the cache
|
// Fetch the theme to load from the cache
|
| if($loadstyle != "def='1'") { $query = $db->simple_select('themes', 'name, tid, properties, stylesheets, allowedgroups', $loadstyle, array('limit' => 1)); $theme = $db->fetch_array($query);
if(isset($theme['tid']) && !$load_from_forum && !is_member($theme['allowedgroups']) && $theme['allowedgroups'] != 'all') { if($load_from_user == 1) { $db->update_query('users', array('style' => 0), "style='{$mybb->user['style']}' AND uid='{$mybb->user['uid']}'"); }
if(isset($mybb->cookies['mybbtheme'])) { my_unsetcookie('mybbtheme'); }
$loadstyle = "def='1'"; } }
|
if($loadstyle == "def='1'") { if(!$cache->read('default_theme')) { $cache->update_default_theme(); }
|
if($loadstyle == "def='1'") { if(!$cache->read('default_theme')) { $cache->update_default_theme(); }
|
$theme = $cache->read('default_theme'); } else { $query = $db->simple_select('themes', 'name, tid, properties, stylesheets', $loadstyle, array('limit' => 1)); $theme = $db->fetch_array($query); }
| $theme = $cache->read('default_theme');
$load_from_forum = $load_from_user = 0; }
|
// No theme was found - we attempt to load the master or any other theme if(!isset($theme['tid']) || isset($theme['tid']) && !$theme['tid'])
| // No theme was found - we attempt to load the master or any other theme if(!isset($theme['tid']) || isset($theme['tid']) && !$theme['tid'])
|
Zeile 250 | Zeile 287 |
---|
else if($load_from_user == 1) { $db->update_query('users', array('style' => 0), "style = '{$mybb->user['style']}'");
|
else if($load_from_user == 1) { $db->update_query('users', array('style' => 0), "style = '{$mybb->user['style']}'");
|
}
| }
|
// Attempt to load the master or any other theme if the master is not available $query = $db->simple_select('themes', 'name, tid, properties, stylesheets', '', array('order_by' => 'tid', 'limit' => 1));
| // Attempt to load the master or any other theme if the master is not available $query = $db->simple_select('themes', 'name, tid, properties, stylesheets', '', array('order_by' => 'tid', 'limit' => 1));
|
Zeile 277 | Zeile 314 |
---|
foreach($stylesheet_actions as $stylesheet_action) { if(!$stylesheet_action)
|
foreach($stylesheet_actions as $stylesheet_action) { if(!$stylesheet_action)
|
{
| {
|
continue; }
| continue; }
|
Zeile 289 | Zeile 326 |
---|
if(!empty($already_loaded[$page_stylesheet])) { continue;
|
if(!empty($already_loaded[$page_stylesheet])) { continue;
|
}
| }
|
if(strpos($page_stylesheet, 'css.php') !== false)
|
if(strpos($page_stylesheet, 'css.php') !== false)
|
{
| {
|
$stylesheet_url = $mybb->settings['bburl'] . '/' . $page_stylesheet;
|
$stylesheet_url = $mybb->settings['bburl'] . '/' . $page_stylesheet;
|
}
| }
|
else
|
else
|
{
| {
|
$stylesheet_url = $mybb->get_asset_url($page_stylesheet); }
if($mybb->settings['minifycss']) { $stylesheet_url = str_replace('.css', '.min.css', $stylesheet_url);
|
$stylesheet_url = $mybb->get_asset_url($page_stylesheet); }
if($mybb->settings['minifycss']) { $stylesheet_url = str_replace('.css', '.min.css', $stylesheet_url);
|
}
| }
|
if(strpos($page_stylesheet, 'css.php') !== false) { // We need some modification to get it working with the displayorder
| if(strpos($page_stylesheet, 'css.php') !== false) { // We need some modification to get it working with the displayorder
|
Zeile 326 | Zeile 363 |
---|
} unset($actions);
|
} unset($actions);
|
if(!empty($theme_stylesheets))
| if(!empty($theme_stylesheets) && is_array($theme['disporder']))
|
{ foreach($theme['disporder'] as $style_name => $order) { if(!empty($theme_stylesheets[$style_name]))
|
{ foreach($theme['disporder'] as $style_name => $order) { if(!empty($theme_stylesheets[$style_name]))
|
{
| {
|
$stylesheets .= $theme_stylesheets[$style_name]; }
|
$stylesheets .= $theme_stylesheets[$style_name]; }
|
}
| }
|
}
// Are we linking to a remote theme server?
|
}
// Are we linking to a remote theme server?
|
if(my_substr($theme['imgdir'], 0, 7) == 'http://' || my_substr($theme['imgdir'], 0, 8) == 'https://')
| if(my_validate_url($theme['imgdir']))
|
{ // If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']))
|
{ // If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']))
|
{ $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else
| { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else
|
{ // Check if a custom language directory exists for this theme if(!empty($mybb->settings['bblanguage']))
|
{ // Check if a custom language directory exists for this theme if(!empty($mybb->settings['bblanguage']))
|
{ $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage']; } // Otherwise, the image language directory is the same as the language directory for the theme else { $theme['imglangdir'] = $theme['imgdir']; } } }
| { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage']; } // Otherwise, the image language directory is the same as the language directory for the theme else { $theme['imglangdir'] = $theme['imgdir']; } } }
|
else { $img_directory = $theme['imgdir'];
|
else { $img_directory = $theme['imgdir'];
|
|
|
if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath'])) { $img_directory = rtrim($mybb->settings['cdnpath'], '/') . '/' . ltrim($theme['imgdir'], '/');
| if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath'])) { $img_directory = rtrim($mybb->settings['cdnpath'], '/') . '/' . ltrim($theme['imgdir'], '/');
|
Zeile 371 | Zeile 408 |
---|
if(!@is_dir($img_directory)) { $theme['imgdir'] = 'images';
|
if(!@is_dir($img_directory)) { $theme['imgdir'] = 'images';
|
}
| }
|
// If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']) && is_dir($img_directory.'/'.$mybb->user['language']))
|
// If a language directory for the current language exists within the theme - we use it if(!empty($mybb->user['language']) && is_dir($img_directory.'/'.$mybb->user['language']))
|
{
| {
|
$theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else
| $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else
|
Zeile 384 | Zeile 421 |
---|
if(is_dir($img_directory.'/'.$mybb->settings['bblanguage'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];
|
if(is_dir($img_directory.'/'.$mybb->settings['bblanguage'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->settings['bblanguage'];
|
}
| }
|
// Otherwise, the image language directory is the same as the language directory for the theme else {
| // Otherwise, the image language directory is the same as the language directory for the theme else {
|
Zeile 410 | Zeile 447 |
---|
else { $templatelist = '';
|
else { $templatelist = '';
|
}
$templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_guest,header_welcomeblock_member_admin,global_pm_alert,global_unreadreports,error,footer_languageselect_option,footer_contactus"; $templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,header_welcomeblock_member_moderator,redirect,header_menu_calendar,nav_dropdown,footer_themeselector,task_image"; $templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline,error_nopermission_loggedin,error_nopermission,debug_summary,header_quicksearch,header_menu_search,header_menu_portal,header_menu_memberlist,usercp_themeselector_option,smilie,global_board_offline_modal"; $templatelist .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_embed,video_metacafe_embed,video_myspacetv_embed,video_veoh_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed"; $templates->cache($db->escape_string($templatelist));
| }
$templatelist .= "headerinclude,header,footer,gobutton,htmldoctype,header_welcomeblock_member,header_welcomeblock_member_user,header_welcomeblock_member_moderator,header_welcomeblock_member_admin,error"; $templatelist .= ",global_pending_joinrequests,global_awaiting_activation,nav,nav_sep,nav_bit,nav_sep_active,nav_bit_active,footer_languageselect,footer_themeselect,global_unreadreports,footer_contactus"; $templatelist .= ",global_boardclosed_warning,global_bannedwarning,error_inline,error_nopermission_loggedin,error_nopermission,global_pm_alert,header_menu_search,header_menu_portal,redirect,footer_languageselect_option"; $templatelist .= ",video_dailymotion_embed,video_facebook_embed,video_liveleak_embed,video_metacafe_embed,video_myspacetv_embed,video_veoh_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed,debug_summary"; $templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smilieinsert_getmore,smilieinsert_smilie,global_board_offline_modal,footer_themeselector,task_image,usercp_themeselector_option"; $templatelist .= ",mycode_code,mycode_email,mycode_img,mycode_php,mycode_quote_post,mycode_size_int,mycode_url,global_no_permission_modal,global_boardclosed_reason,nav_dropdown,global_remote_avatar_notice"; $templatelist .= ",header_welcomeblock_member_pms,header_welcomeblock_member_search,header_welcomeblock_guest,header_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie"; $templates->cache($db->escape_string($templatelist));
|
// Set the current date and time now $datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
| // Set the current date and time now $datenow = my_date($mybb->settings['dateformat'], TIME_NOW, '', false);
|
Zeile 427 | Zeile 467 |
---|
if(isset($mybb->user['lastvisit'])) { $lastvisit = my_date('relative', $mybb->user['lastvisit'], '', 2);
|
if(isset($mybb->user['lastvisit'])) { $lastvisit = my_date('relative', $mybb->user['lastvisit'], '', 2);
|
}
| }
|
// Otherwise, they've never visited before else { $lastvisit = $lang->lastvisit_never;
|
// Otherwise, they've never visited before else { $lastvisit = $lang->lastvisit_never;
|
}
$plugins->run_hooks('global_intermediate');
| }
$plugins->run_hooks('global_intermediate');
|
// If the board is closed and we have a usergroup allowed to view the board when closed, then show board closed warning $bbclosedwarning = ''; if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['canviewboardclosed'] == 1) { eval('$bbclosedwarning = "'.$templates->get('global_boardclosed_warning').'";');
|
// If the board is closed and we have a usergroup allowed to view the board when closed, then show board closed warning $bbclosedwarning = ''; if($mybb->settings['boardclosed'] == 1 && $mybb->usergroup['canviewboardclosed'] == 1) { eval('$bbclosedwarning = "'.$templates->get('global_boardclosed_warning').'";');
|
}
// Prepare the main templates for use $admincplink = $modcplink = '';
| }
// Prepare the main templates for use $admincplink = $modcplink = $usercplink = '';
|
// Load appropriate welcome block for the current logged in user if($mybb->user['uid'] != 0) {
| // Load appropriate welcome block for the current logged in user if($mybb->user['uid'] != 0) {
|
Zeile 454 | Zeile 494 |
---|
{ $admin_dir = $config['admin_dir']; eval('$admincplink = "'.$templates->get('header_welcomeblock_member_admin').'";');
|
{ $admin_dir = $config['admin_dir']; eval('$admincplink = "'.$templates->get('header_welcomeblock_member_admin').'";');
|
}
| }
|
if($mybb->usergroup['canmodcp'] == 1)
|
if($mybb->usergroup['canmodcp'] == 1)
|
{
| {
|
eval('$modcplink = "'.$templates->get('header_welcomeblock_member_moderator').'";'); }
|
eval('$modcplink = "'.$templates->get('header_welcomeblock_member_moderator').'";'); }
|
// Format the welcome back message $lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link($mybb->user['username'], $mybb->user['uid']), $lastvisit);
// Tell the user their PM usage $lang->welcome_pms_usage = $lang->sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));
| if($mybb->usergroup['canusercp'] == 1) { eval('$usercplink = "'.$templates->get('header_welcomeblock_member_user').'";'); }
// Format the welcome back message $lang->welcome_back = $lang->sprintf($lang->welcome_back, build_profile_link(htmlspecialchars_uni($mybb->user['username']), $mybb->user['uid']), $lastvisit);
$searchlink = ''; if($mybb->usergroup['cansearch'] == 1) { eval('$searchlink = "'.$templates->get('header_welcomeblock_member_search').'";'); }
// Tell the user their PM usage $pmslink = ''; if($mybb->settings['enablepms'] != 0 && $mybb->usergroup['canusepms'] == 1) { $lang->welcome_pms_usage = $lang->sprintf($lang->welcome_pms_usage, my_number_format($mybb->user['pms_unread']), my_number_format($mybb->user['pms_total']));
eval('$pmslink = "'.$templates->get('header_welcomeblock_member_pms').'";'); }
|
eval('$welcomeblock = "'.$templates->get('header_welcomeblock_member').'";'); } // Otherwise, we have a guest
| eval('$welcomeblock = "'.$templates->get('header_welcomeblock_member').'";'); } // Otherwise, we have a guest
|
Zeile 552 | Zeile 610 |
---|
$unreadreports = ''; // This user is a moderator, super moderator or administrator
|
$unreadreports = ''; // This user is a moderator, super moderator or administrator
|
if($mybb->usergroup['cancp'] == 1 || ($mybb->user['ismoderator'] && $mybb->usergroup['canmodcp'] == 1 && $mybb->usergroup['canmanagereportedcontent'] == 1))
| if($mybb->settings['reportmethod'] == "db" && ($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;
|
{ // 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($recipient['uid']);
| $is_super_admin = is_super_admin($mybb->user['uid']);
|
if(!$is_super_admin) { // Include admin functions
| if(!$is_super_admin) { // Include admin functions
|
Zeile 589 | Zeile 647 |
---|
{ $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 627 | Zeile 685 |
---|
{ $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('$unreadreports = "'.$templates->get('global_unreadreports').'";'); } }
| eval('$unreadreports = "'.$templates->get('global_unreadreports').'";'); } }
|
Zeile 664 | Zeile 722 |
---|
if(empty($reason)) { $reason = $lang->unknown;
|
if(empty($reason)) { $reason = $lang->unknown;
|
}
| }
|
if(empty($banlift)) { $banlift = $lang->unknown; }
|
if(empty($banlift)) { $banlift = $lang->unknown; }
|
|
|
// Display a nice warning to the user eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";');
|
// Display a nice warning to the user eval('$bannedwarning = "'.$templates->get('global_bannedwarning').'";');
|
}
$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);
| }
$lang->ajax_loading = str_replace("'", "\\'", $lang->ajax_loading);
|
// Check if this user has a new private message. $pm_notice = '';
| // Check if this user has a new private message. $pm_notice = '';
|
Zeile 685 | Zeile 743 |
---|
{ require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser;
|
{ require_once MYBB_ROOT.'inc/class_parser.php'; $parser = new postParser;
|
}
| }
|
$query = $db->query(" SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid
| $query = $db->query(" SELECT pm.subject, pm.pmid, fu.username AS fromusername, fu.uid AS fromuid
|
Zeile 695 | Zeile 753 |
---|
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']; }
|
else { $user_text = build_profile_link($pm['fromusername'], $pm['fromuid']); }
| else { $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)
|
{
| {
|
$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject'])); } else { $privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));
|
$privatemessage_text = $lang->sprintf($lang->newpm_notice_one, $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject'])); } else { $privatemessage_text = $lang->sprintf($lang->newpm_notice_multiple, $mybb->user['pms_unread'], $user_text, $mybb->settings['bburl'], $pm['pmid'], htmlspecialchars_uni($pm['subject']));
|
}
| }
|
eval('$pm_notice = "'.$templates->get('global_pm_alert').'";');
|
eval('$pm_notice = "'.$templates->get('global_pm_alert').'";');
|
| }
$remote_avatar_notice = ''; if(($mybb->user['avatartype'] === 'remote' || $mybb->user['avatartype'] === 'gravatar') && !$mybb->settings['allowremoteavatars']) { eval('$remote_avatar_notice = "'.$templates->get('global_remote_avatar_notice').'";');
|
}
if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1)
| }
if($mybb->settings['awactialert'] == 1 && $mybb->usergroup['cancp'] == 1)
|
Zeile 734 | Zeile 799 |
---|
{ $awaitingusers = (int)$awaitingusers['users']; }
|
{ $awaitingusers = (int)$awaitingusers['users']; }
|
else { $awaitingusers = 0; }
| else { $awaitingusers = 0; }
|
if($awaitingusers < 1)
|
if($awaitingusers < 1)
|
{
| {
|
$awaitingusers = 0;
|
$awaitingusers = 0;
|
}
| }
|
else { $awaitingusers = my_number_format($awaitingusers); }
|
else { $awaitingusers = my_number_format($awaitingusers); }
|
|
|
if($awaitingusers > 0) { if($awaitingusers == 1)
| if($awaitingusers > 0) { if($awaitingusers == 1)
|
Zeile 798 | Zeile 863 |
---|
if($task_cache['nextrun'] <= TIME_NOW) { eval("\$task_image = \"".$templates->get("task_image")."\";");
|
if($task_cache['nextrun'] <= TIME_NOW) { eval("\$task_image = \"".$templates->get("task_image")."\";");
|
| }
// Post code $post_code_string = ''; if($mybb->user['uid']) { $post_code_string = '&my_post_key='.$mybb->post_code;
|
}
// Are we showing the quick language selection box?
| }
// Are we showing the quick language selection box?
|
Zeile 807 | Zeile 879 |
---|
$languages = $lang->get_languages();
if(count($languages) > 1)
|
$languages = $lang->get_languages();
if(count($languages) > 1)
|
{
| {
|
foreach($languages as $key => $language) { $language = htmlspecialchars_uni($language);
// Current language matches if($lang->language == $key)
|
foreach($languages as $key => $language) { $language = htmlspecialchars_uni($language);
// Current language matches if($lang->language == $key)
|
{
| {
|
$selected = " selected=\"selected\""; } else
| $selected = " selected=\"selected\""; } else
|
Zeile 827 | Zeile 899 |
---|
$lang_redirect_url = get_current_location(true, 'language'); eval('$lang_select = "'.$templates->get('footer_languageselect').'";');
|
$lang_redirect_url = get_current_location(true, 'language'); eval('$lang_select = "'.$templates->get('footer_languageselect').'";');
|
} }
| } }
|
// Are we showing the quick theme selection box? $theme_select = $theme_options = ''; if($mybb->settings['showthemeselect'] != 0)
| // Are we showing the quick theme selection box? $theme_select = $theme_options = ''; if($mybb->settings['showthemeselect'] != 0)
|
Zeile 847 | Zeile 919 |
---|
$contact_us = ''; if(($mybb->settings['contactlink'] == "contact.php" && $mybb->settings['contact'] == 1 && ($mybb->settings['contact_guests'] != 1 && $mybb->user['uid'] == 0 || $mybb->user['uid'] > 0)) || $mybb->settings['contactlink'] != "contact.php") {
|
$contact_us = ''; if(($mybb->settings['contactlink'] == "contact.php" && $mybb->settings['contact'] == 1 && ($mybb->settings['contact_guests'] != 1 && $mybb->user['uid'] == 0 || $mybb->user['uid'] > 0)) || $mybb->settings['contactlink'] != "contact.php") {
|
if(my_substr($mybb->settings['contactlink'], 0, 1) != '/' && my_substr($mybb->settings['contactlink'], 0, 7) != 'http://' && my_substr($mybb->settings['contactlink'], 0, 8) != 'https://' && my_substr($mybb->settings['contactlink'], 0, 7) != 'mailto:')
| if(!my_validate_url($mybb->settings['contactlink'], true) && my_substr($mybb->settings['contactlink'], 0, 7) != 'mailto:')
|
{ $mybb->settings['contactlink'] = $mybb->settings['bburl'].'/'.$mybb->settings['contactlink']; }
| { $mybb->settings['contactlink'] = $mybb->settings['bburl'].'/'.$mybb->settings['contactlink']; }
|
Zeile 859 | Zeile 931 |
---|
$auto_dst_detection = ''; if($mybb->user['uid'] > 0 && $mybb->user['dstcorrection'] == 2) {
|
$auto_dst_detection = ''; if($mybb->user['uid'] > 0 && $mybb->user['dstcorrection'] == 2) {
|
$auto_dst_detection = "<script type=\"text/javascript\">if(MyBB) { $([document, window]).bind(\"load\", function() { MyBB.detectDSTChange('".($mybb->user['timezone']+$mybb->user['dst'])."'); }); }</script>\n";
| $timezone = (float)$mybb->user['timezone'] + $mybb->user['dst']; eval('$auto_dst_detection = "'.$templates->get('global_dst_detection').'";');
|
}
|
}
|
|
|
eval('$footer = "'.$templates->get('footer').'";');
// Add our main parts to the navigation
| eval('$footer = "'.$templates->get('footer').'";');
// Add our main parts to the navigation
|
Zeile 903 | Zeile 977 |
---|
$mybb->settings['boardclosed_reason'] = $lang->boardclosed_reason; }
|
$mybb->settings['boardclosed_reason'] = $lang->boardclosed_reason; }
|
$lang->error_boardclosed .= "<blockquote>{$mybb->settings['boardclosed_reason']}</blockquote>";
| eval('$reason = "'.$templates->get('global_boardclosed_reason').'";'); $lang->error_boardclosed .= $reason;
|
|
|
if(!$mybb->get_input('modal'))
| if(!$mybb->get_input('modal'))
|
{ error($lang->error_boardclosed); }
| { error($lang->error_boardclosed); }
|
Zeile 971 | Zeile 1046 |
---|
} }
|
} }
|
| $output = ''; $notallowed = false;
|
if($mybb->usergroup['canview'] != 1) { // Check pages allowable even when not allowed to view board
| if($mybb->usergroup['canview'] != 1) { // Check pages allowable even when not allowed to view board
|
Zeile 981 | Zeile 1058 |
---|
$allowable_actions = explode(',', ALLOWABLE_PAGE); if(!in_array($mybb->get_input('action'), $allowable_actions)) {
|
$allowable_actions = explode(',', ALLOWABLE_PAGE); if(!in_array($mybb->get_input('action'), $allowable_actions)) {
|
error_no_permission();
| $notallowed = true;
|
}
unset($allowable_actions); } else if(ALLOWABLE_PAGE !== 1) {
|
}
unset($allowable_actions); } else if(ALLOWABLE_PAGE !== 1) {
|
error_no_permission(); } }
| $notallowed = true; } }
|
else {
|
else {
|
error_no_permission();
| $notallowed = true; }
if($notallowed == true) { if(!$mybb->get_input('modal')) { error_no_permission(); } else { eval('$output = "'.$templates->get('global_no_permission_modal', 1, 0).'";'); echo($output); exit; }
|
} }
| } }
|