Zeile 6 | Zeile 6 |
---|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* Website: http://mybb.com * License: http://mybb.com/about/license *
|
* $Id: index.php 5440 2011-04-15 10:18:35Z Tomm $
| * $Id: index.php 5765 2012-03-27 09:52:45Z Tomm $
|
*/
define("IN_MYBB", 1);
| */
define("IN_MYBB", 1);
|
Zeile 38 | Zeile 38 |
---|
//Function call is not fatal if(login_attempt_check(false) !== false) {
|
//Function call is not fatal if(login_attempt_check(false) !== false) {
|
| switch($mybb->settings['username_method']) { case 0: $login_username = $lang->login_username; break; case 1: $login_username = $lang->login_username1; break; case 2: $login_username = $lang->login_username2; break; default: $login_username = $lang->login_username; break; }
|
eval("\$loginform = \"".$templates->get("index_loginform")."\";"); } }
| eval("\$loginform = \"".$templates->get("index_loginform")."\";"); } }
|
Zeile 100 | Zeile 115 |
---|
$user['profilelink'] = build_profile_link($user['username'], $user['uid']); eval("\$onlinemembers .= \"".$templates->get("index_whosonline_memberbit", 1, 0)."\";"); $comma = $lang->comma;
|
$user['profilelink'] = build_profile_link($user['username'], $user['uid']); eval("\$onlinemembers .= \"".$templates->get("index_whosonline_memberbit", 1, 0)."\";"); $comma = $lang->comma;
|
}
| }
|
// This user has been handled. $doneusers[$user['uid']] = $user['time']; }
| // This user has been handled. $doneusers[$user['uid']] = $user['time']; }
|
Zeile 111 | Zeile 126 |
---|
$onlinemembers .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']); $comma = $lang->comma; ++$botcount;
|
$onlinemembers .= $comma.format_name($spiders[$botkey]['name'], $spiders[$botkey]['usergroup']); $comma = $lang->comma; ++$botcount;
|
}
| }
|
else { // The user is a guest.
| else { // The user is a guest.
|
Zeile 122 | Zeile 137 |
---|
{ $forum_viewers[$user['location1']]++; }
|
{ $forum_viewers[$user['location1']]++; }
|
}
| }
|
// Build the who's online bit on the index page. $onlinecount = $membercount + $guestcount + $botcount;
| // Build the who's online bit on the index page. $onlinecount = $membercount + $guestcount + $botcount;
|
Zeile 130 | Zeile 145 |
---|
if($onlinecount != 1) { $onlinebit = $lang->online_online_plural;
|
if($onlinecount != 1) { $onlinebit = $lang->online_online_plural;
|
} else {
| } else {
|
$onlinebit = $lang->online_online_singular; } if($membercount != 1)
| $onlinebit = $lang->online_online_singular; } if($membercount != 1)
|
Zeile 183 | Zeile 198 |
---|
$hiddencount = $bdaycache[$bdaydate]['hiddencount']; $today_bdays = $bdaycache[$bdaydate]['users'];
|
$hiddencount = $bdaycache[$bdaydate]['hiddencount']; $today_bdays = $bdaycache[$bdaydate]['users'];
|
|
|
$comma = ''; if(!empty($today_bdays)) {
|
$comma = ''; if(!empty($today_bdays)) {
|
foreach($today_bdays as $bdayuser)
| if(intval($mybb->settings['showbirthdayspostlimit']) > 0)
|
{
|
{
|
$bday = explode("-", $bdayuser['birthday']); if($year > $bday['2'] && $bday['2'] != '')
| $bdayusers = array(); foreach($today_bdays as $key => $bdayuser_pc) { $bdayusers[$bdayuser_pc['uid']] = $key; }
if(!empty($bdayusers)) { // Find out if our users have enough posts to be seen on our birthday list $bday_sql = implode(",", array_keys($bdayusers)); $query = $db->simple_select("users", "uid, postnum", "uid IN ({$bday_sql})");
while($bdayuser = $db->fetch_array($query)) { if($bdayuser['postnum'] < $mybb->settings['showbirthdayspostlimit']) { unset($today_bdays[$bdayusers[$bdayuser['uid']]]); } } } }
// We still have birthdays - display them in our list! if(!empty($today_bdays)) { foreach($today_bdays as $bdayuser)
|
{
|
{
|
$age = " (".($year - $bday['2']).")";
| if($bdayuser['displaygroup'] == 0) { $bdayuser['displaygroup'] = $bdayuser['usergroup']; }
// If this user's display group can't be seen in the birthday list, skip it if($groupscache[$bdayuser['displaygroup']] && $groupscache[$bdayuser['displaygroup']]['showinbirthdaylist'] != 1) { continue; }
$bday = explode("-", $bdayuser['birthday']); if($year > $bday['2'] && $bday['2'] != '') { $age = " (".($year - $bday['2']).")"; } else { $age = ''; }
$bdayuser['username'] = format_name($bdayuser['username'], $bdayuser['usergroup'], $bdayuser['displaygroup']); $bdayuser['profilelink'] = build_profile_link($bdayuser['username'], $bdayuser['uid']); eval("\$bdays .= \"".$templates->get("index_birthdays_birthday", 1, 0)."\";"); ++$bdaycount; $comma = $lang->comma;
|
}
|
}
|
else { $age = ''; } $bdayuser['username'] = format_name($bdayuser['username'], $bdayuser['usergroup'], $bdayuser['displaygroup']); $bdayuser['profilelink'] = build_profile_link($bdayuser['username'], $bdayuser['uid']); eval("\$bdays .= \"".$templates->get("index_birthdays_birthday", 1, 0)."\";"); ++$bdaycount; $comma = $lang->comma; } }
| } }
|
if($hiddencount > 0) { if($bdaycount > 0)
| if($hiddencount > 0) { if($bdaycount > 0)
|
Zeile 213 | Zeile 268 |
---|
$bdays .= " - "; } $bdays .= "{$hiddencount} {$lang->birthdayhidden}";
|
$bdays .= " - "; } $bdays .= "{$hiddencount} {$lang->birthdayhidden}";
|
}
| }
|
// If there are one or more birthdays, show them. if($bdaycount > 0 || $hiddencount > 0)
|
// If there are one or more birthdays, show them. if($bdaycount > 0 || $hiddencount > 0)
|
{
| {
|
eval("\$birthdays = \"".$templates->get("index_birthdays")."\";"); } }
|
eval("\$birthdays = \"".$templates->get("index_birthdays")."\";"); } }
|
|
|
// Build the forum statistics to show on the index page. if($mybb->settings['showindexstats'] != 0) {
| // Build the forum statistics to show on the index page. if($mybb->settings['showindexstats'] != 0) {
|
Zeile 236 | Zeile 291 |
---|
else { $newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
|
else { $newestmember = build_profile_link($stats['lastusername'], $stats['lastuid']);
|
}
| }
|
// Format the stats language. $lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));
| // Format the stats language. $lang->stats_posts_threads = $lang->sprintf($lang->stats_posts_threads, my_number_format($stats['numposts']), my_number_format($stats['numthreads']));
|
Zeile 263 | Zeile 318 |
---|
}
// Show the board statistics table only if one or more index statistics are enabled.
|
}
// Show the board statistics table only if one or more index statistics are enabled.
|
if($mybb->settings['showwol'] != 0 || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0))
| if(($mybb->settings['showwol'] != 0 && $mybb->usergroup['canviewonline'] != 0) || $mybb->settings['showindexstats'] != 0 || ($mybb->settings['showbirthdays'] != 0 && $bdaycount > 0))
|
{ if(!is_array($stats)) { // Load the stats cache. $stats = $cache->read("stats");
|
{ if(!is_array($stats)) { // Load the stats cache. $stats = $cache->read("stats");
|
}
| }
|
$post_code_string = ''; if($mybb->user['uid']) {
|
$post_code_string = ''; if($mybb->user['uid']) {
|
$post_code_string = "&my_post_key=".$mybb->post_code;
| $post_code_string = "&my_post_key=".$mybb->post_code;
|
}
eval("\$boardstats = \"".$templates->get("index_boardstats")."\";");
|
}
eval("\$boardstats = \"".$templates->get("index_boardstats")."\";");
|
}
| }
|
if($mybb->user['uid'] == 0)
|
if($mybb->user['uid'] == 0)
|
{ // Build a forum cache.
| { // Build a forum cache.
|
$query = $db->query(" SELECT * FROM ".TABLE_PREFIX."forums
| $query = $db->query(" SELECT * FROM ".TABLE_PREFIX."forums
|
Zeile 290 | Zeile 345 |
---|
ORDER BY pid, disporder ");
|
ORDER BY pid, disporder ");
|
$forumsread = unserialize($mybb->cookies['mybb']['forumread']); }
| $forumsread = my_unserialize($mybb->cookies['mybb']['forumread']); }
|
else { // Build a forum cache.
| else { // Build a forum cache.
|
Zeile 303 | Zeile 358 |
---|
ORDER BY pid, disporder "); }
|
ORDER BY pid, disporder "); }
|
|
|
while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
| while($forum = $db->fetch_array($query)) { if($mybb->user['uid'] == 0)
|