Zeile 350 | Zeile 350 |
---|
$id = (int) my_substr($query_string, 11); $query = $db->simple_select("themestylesheets", "name", "sid={$id}"); $real_name = $db->fetch_field($query, "name");
|
$id = (int) my_substr($query_string, 11); $query = $db->simple_select("themestylesheets", "name", "sid={$id}"); $real_name = $db->fetch_field($query, "name");
|
$theme_stylesheets[$real_name] = "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$stylesheet_url}\" />\n";
| $theme_stylesheets[$real_name] = $id;
|
} else {
| } else {
|
Zeile 363 | Zeile 363 |
---|
} } unset($actions);
|
} } unset($actions);
|
| $css_php_script_stylesheets = array();
|
if(!empty($theme_stylesheets) && is_array($theme['disporder']))
|
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];
| if(is_int($theme_stylesheets[$style_name])) { $css_php_script_stylesheets[] = $theme_stylesheets[$style_name]; } else { $stylesheets .= $theme_stylesheets[$style_name]; }
|
} }
|
} }
|
| }
if(!empty($css_php_script_stylesheets)) { $sheet = $mybb->settings['bburl'] . '/css.php?' . http_build_query(array( 'stylesheet' => $css_php_script_stylesheets ));
$stylesheets .= "<link type=\"text/css\" rel=\"stylesheet\" href=\"{$sheet}\" />\n";
|
}
// Are we linking to a remote theme server?
| }
// Are we linking to a remote theme server?
|
Zeile 454 | Zeile 472 |
---|
$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_inline_item,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_mixer_embed,video_vimeo_embed,video_yahoo_embed,video_youtube_embed,debug_summary";
|
$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_inline_item,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_mixer_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,php_warnings"; $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_welcomeblock_guest_login_modal,header_welcomeblock_guest_login_modal_lockout"; $templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie";
| $templatelist .= ",smilieinsert_row,smilieinsert_row_empty,smilieinsert,smilieinsert_getmore,smilieinsert_smilie,global_board_offline_modal,footer_showteamlink,footer_themeselector,task_image,usercp_themeselector_option,php_warnings"; $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,global_modqueue,global_modqueue_notice"; $templatelist .= ",header_welcomeblock_member_buddy,header_welcomeblock_member_pms,header_welcomeblock_member_search,header_welcomeblock_guest,header_welcomeblock_guest_login_modal,header_welcomeblock_guest_login_modal_lockout"; $templatelist .= ",header_menu_calendar,header_menu_memberlist,global_dst_detection,header_quicksearch,smilie,modal,modal_button";
|
$templates->cache($db->escape_string($templatelist));
// Set the current date and time now
| $templates->cache($db->escape_string($templatelist));
// Set the current date and time now
|
Zeile 510 | Zeile 528 |
---|
// 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);
|
// 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 = '';
| $buddylink = $searchlink = $pmslink = '';
if(!empty($mybb->user['buddylist'])) { eval('$buddylink = "' . $templates->get('header_welcomeblock_member_buddy') . '";'); }
|
if($mybb->usergroup['cansearch'] == 1) { eval('$searchlink = "'.$templates->get('header_welcomeblock_member_search').'";'); }
// Tell the user their PM usage
|
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']));
| 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']));
|
Zeile 530 | Zeile 553 |
---|
} // Otherwise, we have a guest else
|
} // Otherwise, we have a guest else
|
{
| {
|
switch($mybb->settings['username_method']) { case 0:
| switch($mybb->settings['username_method']) { case 0:
|
Zeile 548 | Zeile 571 |
---|
}
if($mybb->cookies['lockoutexpiry'])
|
}
if($mybb->cookies['lockoutexpiry'])
|
{
| {
|
$secsleft = (int)($mybb->cookies['lockoutexpiry'] - TIME_NOW); $hoursleft = floor($secsleft / 3600); $minsleft = floor(($secsleft / 60) % 60); $secsleft = floor($secsleft % 60);
|
$secsleft = (int)($mybb->cookies['lockoutexpiry'] - TIME_NOW); $hoursleft = floor($secsleft / 3600); $minsleft = floor(($secsleft / 60) % 60); $secsleft = floor($secsleft % 60);
|
|
|
$lang->failed_login_wait = $lang->sprintf($lang->failed_login_wait, $hoursleft, $minsleft, $secsleft);
eval('$loginform = "'.$templates->get('header_welcomeblock_guest_login_modal_lockout').'";');
|
$lang->failed_login_wait = $lang->sprintf($lang->failed_login_wait, $hoursleft, $minsleft, $secsleft);
eval('$loginform = "'.$templates->get('header_welcomeblock_guest_login_modal_lockout').'";');
|
}
| }
|
else { eval('$loginform = "'.$templates->get('header_welcomeblock_guest_login_modal').'";');
| else { eval('$loginform = "'.$templates->get('header_welcomeblock_guest_login_modal').'";');
|
Zeile 575 | Zeile 598 |
---|
}
if($mybb->settings['enablememberlist'] == 1 && $mybb->usergroup['canviewmemberlist'] == 1)
|
}
if($mybb->settings['enablememberlist'] == 1 && $mybb->usergroup['canviewmemberlist'] == 1)
|
{
| {
|
eval('$menu_memberlist = "'.$templates->get('header_menu_memberlist').'";');
|
eval('$menu_memberlist = "'.$templates->get('header_menu_memberlist').'";');
|
}
| }
|
if($mybb->settings['enablecalendar'] == 1 && $mybb->usergroup['canviewcalendar'] == 1) { eval('$menu_calendar = "'.$templates->get('header_menu_calendar').'";');
|
if($mybb->settings['enablecalendar'] == 1 && $mybb->usergroup['canviewcalendar'] == 1) { eval('$menu_calendar = "'.$templates->get('header_menu_calendar').'";');
|
}
| }
|
if($mybb->settings['portal'] == 1) { eval('$menu_portal = "'.$templates->get('header_menu_portal').'";');
| if($mybb->settings['portal'] == 1) { eval('$menu_portal = "'.$templates->get('header_menu_portal').'";');
|
Zeile 599 | Zeile 622 |
---|
$gids = "'0'"; foreach($groupleader as $user)
|
$gids = "'0'"; foreach($groupleader as $user)
|
{
| {
|
if($user['canmanagerequests'] != 1)
|
if($user['canmanagerequests'] != 1)
|
{
| {
|
continue; }
|
continue; }
|
|
|
$user['gid'] = (int)$user['gid'];
if(!empty($groupscache[$user['gid']]['joinable']) && $groupscache[$user['gid']]['joinable'] == 1)
|
$user['gid'] = (int)$user['gid'];
if(!empty($groupscache[$user['gid']]['joinable']) && $groupscache[$user['gid']]['joinable'] == 1)
|
{
| {
|
$showjoinnotice = true; $gids .= ",'{$user['gid']}'"; }
| $showjoinnotice = true; $gids .= ",'{$user['gid']}'"; }
|
Zeile 636 | Zeile 659 |
---|
} }
|
} }
|
$unreadreports = '';
| $modnotice = ''; $moderation_queue = array();
|
// 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))) {
| // 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))) {
|
Zeile 652 | Zeile 677 |
---|
if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php")) { $can_access_moderationqueue = false;
|
if(!file_exists(MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php")) { $can_access_moderationqueue = false;
|
}
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
| }
require_once MYBB_ROOT.$mybb->config['admin_dir']."/inc/functions.php";
|
// Verify if we have permissions to access forum-moderation_queue require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/forum/module_meta.php"; if(function_exists("forum_admin_permissions"))
| // Verify if we have permissions to access forum-moderation_queue require_once MYBB_ROOT.$mybb->config['admin_dir']."/modules/forum/module_meta.php"; if(function_exists("forum_admin_permissions"))
|
Zeile 667 | Zeile 692 |
---|
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; }
|
Zeile 686 | Zeile 711 |
---|
{ // 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'])
|
{
| {
|
$unread = (int)$reported['unread']; } else
| $unread = (int)$reported['unread']; } else
|
Zeile 700 | Zeile 725 |
---|
{ ++$unread; }
|
{ ++$unread; }
|
} }
| } }
|
if($unread > 0) {
| if($unread > 0) {
|
Zeile 713 | Zeile 738 |
---|
{ $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('$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)) { $unapproved_posts = $unapproved_threads = 0; $query = $db->simple_select("posts", "replyto", "visible = 0"); while($unapproved = $db->fetch_array($query)) { if($unapproved["replyto"] == 0){ $unapproved_threads++; } else { $unapproved_posts++; } }
$query = $db->simple_select("attachments", "COUNT(aid) AS unapprovedattachments", "visible=0"); $unapproved_attachments = $db->fetch_field($query, "unapprovedattachments");
$modqueue_types = array('threads', 'posts', 'attachments');
foreach($modqueue_types as $modqueue_type) { if(!empty(${'unapproved_'.$modqueue_type})) { if(${'unapproved_'.$modqueue_type} == 1) { $modqueue_message = $lang->{'unapproved_'.substr($modqueue_type, 0, -1)}; } else { $modqueue_message = $lang->sprintf($lang->{'unapproved_'.$modqueue_type}, my_number_format(${'unapproved_'.$modqueue_type})); }
eval('$moderation_queue[] = "'.$templates->get('global_modqueue', 1, 0).'";'); } } }
if(!empty($moderation_queue)) { $moderation_queue_last = array_pop($moderation_queue); if(empty($moderation_queue)) { $moderation_queue = $moderation_queue_last; } else { $moderation_queue = implode($lang->comma, $moderation_queue).' '.$lang->and.' '.$moderation_queue_last; } $moderation_queue = $lang->sprintf($lang->mod_notice, $moderation_queue);
eval('$modnotice = "'.$templates->get('global_modqueue_notice').'";');
|
}
// Got a character set?
| }
// Got a character set?
|
Zeile 863 | Zeile 941 |
---|
{ $awaitingusers = ''; }
|
{ $awaitingusers = ''; }
|
| }
$jsTemplates = array(); foreach (array('modal', 'modal_button') as $template) { eval('$jsTemplates["'.$template.'"] = "'.$templates->get($template, 1, 0).'";'); $jsTemplates[$template] = str_replace(array("\n","\r"), array("\\\n", ""), addslashes($jsTemplates[$template]));
|
}
// Set up some of the default templates
| }
// Set up some of the default templates
|
Zeile 941 | Zeile 1025 |
---|
$theme_redirect_url = get_current_location(true, 'theme'); eval('$theme_select = "'.$templates->get('footer_themeselect').'";'); }
|
$theme_redirect_url = get_current_location(true, 'theme'); eval('$theme_select = "'.$templates->get('footer_themeselect').'";'); }
|
| }
$showteamlink = ''; if($mybb->settings['enableshowteam'] != 0) { eval('$showteamlink = "'.$templates->get('footer_showteamlink').'";');
|
}
// If we use the contact form, show 'Contact Us' link when appropriate
| }
// If we use the contact form, show 'Contact Us' link when appropriate
|