Zeile 361 | Zeile 361 |
---|
} else {
|
} else {
|
$img_directory = $theme['imgdir'];
| $img_directory = $theme['imgdir'];
|
|
|
if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath'])) { $img_directory = rtrim($mybb->settings['cdnpath'], '/') . '/' . ltrim($theme['imgdir'], '/'); }
if(!@is_dir($img_directory)) { $theme['imgdir'] = 'images'; }
| if($mybb->settings['usecdn'] && !empty($mybb->settings['cdnpath'])) { $img_directory = rtrim($mybb->settings['cdnpath'], '/') . '/' . ltrim($theme['imgdir'], '/'); }
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'])) { $theme['imglangdir'] = $theme['imgdir'].'/'.$mybb->user['language']; } else { // Check if a custom language directory exists for this theme 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 { $theme['imglangdir'] = $theme['imgdir']; } }
|
|
|
// 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 { // Check if a custom language directory exists for this theme 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 { $theme['imglangdir'] = $theme['imgdir']; } }
$theme['imgdir'] = $mybb->get_asset_url($theme['imgdir']); $theme['imglangdir'] = $mybb->get_asset_url($theme['imglangdir']);
| $theme['imgdir'] = $mybb->get_asset_url($theme['imgdir']); $theme['imglangdir'] = $mybb->get_asset_url($theme['imglangdir']);
|
}
// Theme logo - is it a relative URL to the forum root? Append bburl if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != '/')
|
}
// Theme logo - is it a relative URL to the forum root? Append bburl if(!preg_match("#^(\.\.?(/|$)|([a-z0-9]+)://)#i", $theme['logo']) && substr($theme['logo'], 0, 1) != '/')
|
{
| {
|
$theme['logo'] = $mybb->get_asset_url($theme['logo']); }
| $theme['logo'] = $mybb->get_asset_url($theme['logo']); }
|
Zeile 406 | Zeile 406 |
---|
if(isset($templatelist)) { $templatelist .= ',';
|
if(isset($templatelist)) { $templatelist .= ',';
|
}
| }
|
else { $templatelist = '';
| else { $templatelist = '';
|
Zeile 451 | Zeile 451 |
---|
{ // User can access the admin cp and we're not hiding admin cp links, fetch it if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
|
{ // User can access the admin cp and we're not hiding admin cp links, fetch it if($mybb->usergroup['cancp'] == 1 && $mybb->config['hide_admin_links'] != 1)
|
{
| {
|
$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').'";'); }
|
Zeile 629 | Zeile 629 |
---|
}
eval('$unreadreports = "'.$templates->get('global_unreadreports').'";');
|
}
eval('$unreadreports = "'.$templates->get('global_unreadreports').'";');
|
} } } }
| } } } }
|
// Got a character set? $charset = 'UTF-8'; if(isset($lang->settings['charset']) && $lang->settings['charset'])
| // Got a character set? $charset = 'UTF-8'; if(isset($lang->settings['charset']) && $lang->settings['charset'])
|
Zeile 724 | Zeile 724 |
---|
{ $awaitingusers = $cache->read('awaitingactivation');
|
{ $awaitingusers = $cache->read('awaitingactivation');
|
if(isset($awaitingusers['time']) && $awaitingusers['time'] < TIME_NOW + 86400)
| if(isset($awaitingusers['time']) && $awaitingusers['time'] + 86400 < TIME_NOW)
|
{ $cache->update_awaitingactivation(); $awaitingusers = $cache->read('awaitingactivation');
| { $cache->update_awaitingactivation(); $awaitingusers = $cache->read('awaitingactivation');
|
Zeile 755 | Zeile 755 |
---|
$awaiting_message = $lang->awaiting_message_single; } else
|
$awaiting_message = $lang->awaiting_message_single; } else
|
{
| {
|
$awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers);
|
$awaiting_message = $lang->sprintf($lang->awaiting_message_plural, $awaitingusers);
|
}
| }
|
if($admincplink) { $awaiting_message .= $lang->sprintf($lang->awaiting_message_link, $mybb->settings['bburl'], $admin_dir); }
|
if($admincplink) { $awaiting_message .= $lang->sprintf($lang->awaiting_message_link, $mybb->settings['bburl'], $admin_dir); }
|
|
|
eval('$awaitingusers = "'.$templates->get('global_awaiting_activation').'";');
|
eval('$awaitingusers = "'.$templates->get('global_awaiting_activation').'";');
|
}
| }
|
else { $awaitingusers = ''; }
|
else { $awaitingusers = ''; }
|
}
| }
|
// Set up some of the default templates eval('$headerinclude = "'.$templates->get('headerinclude').'";'); eval('$gobutton = "'.$templates->get('gobutton').'";');
| // Set up some of the default templates eval('$headerinclude = "'.$templates->get('headerinclude').'";'); eval('$gobutton = "'.$templates->get('gobutton').'";');
|
Zeile 785 | Zeile 785 |
---|
if($mybb->settings['showvernum'] == 1) { $mybbversion = ' '.$mybb->version;
|
if($mybb->settings['showvernum'] == 1) { $mybbversion = ' '.$mybb->version;
|
}
| }
|
// Check to see if we have any tasks to run $task_image = ''; $task_cache = $cache->read('tasks'); if(!$task_cache['nextrun']) { $task_cache['nextrun'] = TIME_NOW;
|
// Check to see if we have any tasks to run $task_image = ''; $task_cache = $cache->read('tasks'); if(!$task_cache['nextrun']) { $task_cache['nextrun'] = TIME_NOW;
|
}
| }
|
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")."\";");
|
Zeile 816 | Zeile 816 |
---|
if($lang->language == $key) { $selected = " selected=\"selected\"";
|
if($lang->language == $key) { $selected = " selected=\"selected\"";
|
}
| }
|
else { $selected = '';
| else { $selected = '';
|
Zeile 824 | Zeile 824 |
---|
eval('$lang_options .= "'.$templates->get('footer_languageselect_option').'";'); }
|
eval('$lang_options .= "'.$templates->get('footer_languageselect_option').'";'); }
|
|
|
$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').'";'); }
|
Zeile 846 | Zeile 846 |
---|
// If we use the contact form, show 'Contact Us' link when appropriate $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 we use the contact form, show 'Contact Us' link when appropriate $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:') { $mybb->settings['contactlink'] = $mybb->settings['bburl'].'/'.$mybb->settings['contactlink']; }
|
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:') { $mybb->settings['contactlink'] = $mybb->settings['bburl'].'/'.$mybb->settings['contactlink']; }
|
|
|
eval('$contact_us = "'.$templates->get('footer_contactus').'";');
|
eval('$contact_us = "'.$templates->get('footer_contactus').'";');
|
}
| }
|
// DST Auto detection enabled? $auto_dst_detection = ''; if($mybb->user['uid'] > 0 && $mybb->user['dstcorrection'] == 2)
| // DST Auto detection enabled? $auto_dst_detection = ''; if($mybb->user['uid'] > 0 && $mybb->user['dstcorrection'] == 2)
|
Zeile 875 | Zeile 875 |
---|
if(is_banned_ip($session->ipaddress, true)) { if($mybb->user['uid'])
|
if(is_banned_ip($session->ipaddress, true)) { if($mybb->user['uid'])
|
{
| {
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip)." OR uid='{$mybb->user['uid']}'");
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip)." OR uid='{$mybb->user['uid']}'");
|
} else {
| } else {
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip));
|
$db->delete_query('sessions', "ip = ".$db->escape_binary($session->packedip));
|
}
| }
|
error($lang->error_banned); }
| error($lang->error_banned); }
|