mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
Almost done, just gotta figure out how to get the database size
git-svn-id: file:///svn/phpbb/trunk@736 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
298ab8e715
commit
ce582a0037
2 changed files with 26 additions and 4 deletions
|
@ -73,6 +73,24 @@ $posts_per_day = sprintf("%.2f", $total_posts / $boarddays);
|
|||
$topics_per_day = sprintf("%.2f", $total_topics / $boarddays);
|
||||
$users_per_day = sprintf("%.2f", $total_users / $boarddays);
|
||||
|
||||
$avatar_dir_size = 0;
|
||||
|
||||
if ($avatar_dir = opendir($phpbb_root_path . $board_config['avatar_path']))
|
||||
{
|
||||
while($file = readdir($avatar_dir))
|
||||
{
|
||||
if($file != "." && $file != "..")
|
||||
{
|
||||
$avatar_dir_size += filesize($file);
|
||||
}
|
||||
}
|
||||
closedir($openDir);
|
||||
}
|
||||
if($avatar_dir_size > 0)
|
||||
{
|
||||
$avatar_dir_size /= 1024;
|
||||
}
|
||||
|
||||
if($posts_per_day > $total_posts)
|
||||
{
|
||||
$posts_per_day = $total_posts;
|
||||
|
@ -95,7 +113,8 @@ $template->assign_vars(array("NUMBER_OF_POSTS" => $total_posts,
|
|||
"STARTDATE" => $start_date,
|
||||
"POSTS_PER_DAY" => $posts_per_day,
|
||||
"TOPICS_PER_DAY" => $topics_per_day,
|
||||
"USERS_PER_DAY" => $users_per_day));
|
||||
"USERS_PER_DAY" => $users_per_day,
|
||||
"AVATAR_DIR_SIZE" => $avatar_dir_size));
|
||||
//
|
||||
// End forum statistics
|
||||
//
|
||||
|
@ -214,8 +233,11 @@ if($online_count)
|
|||
$count++;
|
||||
|
||||
$ip_address = decode_ip($onlinerow[$i]['session_ip']);
|
||||
$host_name = gethostbyaddr($ip_address);
|
||||
$ip_address = $ip_address . " ($host_name)";
|
||||
//
|
||||
// This resolves the users IP to a host name, but it REALLY slows the page down
|
||||
//
|
||||
// $host_name = gethostbyaddr($ip_address);
|
||||
// $ip_address = $ip_address . " ($host_name)";
|
||||
|
||||
if(empty($username))
|
||||
{
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
Topics per day: <b>{TOPICS_PER_DAY}</b><br />
|
||||
Users per day: <b>{USERS_PER_DAY}</b><br />
|
||||
<br />
|
||||
Avatar directory size: <b>{AVATAR_DIR_SIZE}</b><br />
|
||||
Avatar directory size: <b>{AVATAR_DIR_SIZE} (in kilobytes)</b><br />
|
||||
Database size: <b>{DB_SIZE}</b>
|
||||
</p>
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue