mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-17 07:01:22 +02:00
Added a count of total number of topics to the get_db_stats function
git-svn-id: file:///svn/phpbb/trunk@485 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -45,6 +45,10 @@ function get_db_stat($mode)
|
|||||||
ORDER BY user_id DESC
|
ORDER BY user_id DESC
|
||||||
LIMIT 1";
|
LIMIT 1";
|
||||||
break;
|
break;
|
||||||
|
case 'topiccount':
|
||||||
|
$sql = "SELECT SUM(forum_topics) AS total
|
||||||
|
FROM ".FORUMS_TABLE;
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -215,7 +215,7 @@ $template->assign_vars(array(
|
|||||||
"S_LOGIN_ACTION" => append_sid("login.$phpEx"),
|
"S_LOGIN_ACTION" => append_sid("login.$phpEx"),
|
||||||
"S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"),
|
"S_JUMPBOX_ACTION" => append_sid("viewforum.$phpEx"),
|
||||||
"S_LAST_VISIT_DATE" => $s_last_visit,
|
"S_LAST_VISIT_DATE" => $s_last_visit,
|
||||||
"s_CURRENT_TIME" => create_date($board_config['default_dateformat'], $current_time, $board_config['default_timezone']),
|
"S_CURRENT_TIME" => create_date($board_config['default_dateformat'], time(), $board_config['default_timezone']),
|
||||||
|
|
||||||
"T_HEAD_STYLESHEET" => $theme['head_stylesheet'],
|
"T_HEAD_STYLESHEET" => $theme['head_stylesheet'],
|
||||||
"T_BODY_BACKGROUND" => $theme['body_background'],
|
"T_BODY_BACKGROUND" => $theme['body_background'],
|
||||||
|
@@ -38,6 +38,7 @@ init_userprefs($userdata);
|
|||||||
|
|
||||||
$total_posts = get_db_stat('postcount');
|
$total_posts = get_db_stat('postcount');
|
||||||
$total_users = get_db_stat('usercount');
|
$total_users = get_db_stat('usercount');
|
||||||
|
$total_topics = get_db_stat('topiccount');
|
||||||
$newest_userdata = get_db_stat('newestuser');
|
$newest_userdata = get_db_stat('newestuser');
|
||||||
$newest_user = $newest_userdata["username"];
|
$newest_user = $newest_userdata["username"];
|
||||||
$newest_uid = $newest_userdata["user_id"];
|
$newest_uid = $newest_userdata["user_id"];
|
||||||
@@ -102,6 +103,7 @@ $template->set_filenames(array(
|
|||||||
$template->assign_vars(array(
|
$template->assign_vars(array(
|
||||||
"TOTAL_POSTS" => $total_posts,
|
"TOTAL_POSTS" => $total_posts,
|
||||||
"TOTAL_USERS" => $total_users,
|
"TOTAL_USERS" => $total_users,
|
||||||
|
"TOTAL_TOPICS" => $total_topics,
|
||||||
"NEWEST_USER" => $newest_user,
|
"NEWEST_USER" => $newest_user,
|
||||||
"NEWEST_UID" => $newest_uid,
|
"NEWEST_UID" => $newest_uid,
|
||||||
"USERS_BROWSING" => $users_browsing,
|
"USERS_BROWSING" => $users_browsing,
|
||||||
|
Reference in New Issue
Block a user