.
, , , .

- 5
:

index.php
language//lang_main.php
templates//index_body.tpl

#
#----- [] ------------------------------------------
#

index.php

#
#----- [] ------------------------------------------
#

$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');

#
#----- [ ] ------------------------------------
#

$total_topics = get_db_stat('topiccount');
$start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['board_timezone']);
$boarddays = ( time() - $board_config['board_startdate'] ) / 86400;
$posts_per_day = sprintf("%.2f", $total_posts / $boarddays);
$topics_per_day = sprintf("%.2f", $total_topics / $boarddays);
$users_per_day = sprintf("%.2f", $total_users / $boarddays);

#
#----- [] ------------------------------------------
#

$template->assign_vars(array(
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),

#
#----- [ ] ------------------------------------
#

'TOTAL_TOPICS' => $total_topics,
'BOARD_STARTED' => $start_date,
'POSTS_PER_DAY' => $posts_per_day,
'TOPICS_PER_DAY' => $topics_per_day,
'USERS_PER_DAY' => $users_per_day,

#
#----- [] ------------------------------------------
#

'L_FORUM' => $lang['Forum'],

#
#----- [ ] ------------------------------------
#

'L_POSTS_PER_DAY' => $lang['Posts_per_day'],
'L_TOTAL_TOPICS' => $lang['Total_topics'],
'L_TOPICS_PER_DAY' => $lang['Topics_per_day'],
'L_USERS_PER_DAY' => $lang['Users_per_day'],
'L_BOARD_STARTED' => $lang['Board_started'],

#
#----- [] ------------------------------------------
#

language//lang_main.php

#
#----- [] ------------------------------------------
#

?>

#
#----- [ ] ------------------------------------
#

$lang['Posts_per_day'] = 'Posts per day';
$lang['Total_topics'] = 'Total topics';
$lang['Topics_per_day'] = 'Topics per day';
$lang['Users_per_day'] = 'Users per day';
$lang['Board_started'] = 'Board started';

: ( )

$lang['Posts_per_day'] = ' ';
$lang['Total_topics'] = ' ';
$lang['Topics_per_day'] = ' ';
$lang['Users_per_day'] = ' ';
$lang['Board_started'] = ' ;


#
#----- [] ------------------------------------------
#

templates//index_body.tpl

#
#----- [] ------------------------------------------
#

<tr>
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS}<br />{TOTAL_USERS}<br />{NEWEST_USER}</span>
</td>
</tr>

#
#----- [ ] ---------------------------------
#

<tr>
<td class="row1" align="center" valign="middle" rowspan="2"><img src="templates/subSilver/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<td class="row1" align="left" width="100%"><span class="gensmall">{TOTAL_POSTS} :: {L_POSTS_PER_DAY} <b>{POSTS_PER_DAY}</b> :: {L_TOTAL_TOPICS} <b>{TOTAL_TOPICS}</b> :: {L_TOPICS_PER_DAY} <b>{TOPICS_PER_DAY}</b><br />{TOTAL_USERS} :: {L_USERS_PER_DAY} <b>{USERS_PER_DAY}</b><br />{NEWEST_USER}<br />{L_BOARD_STARTED} {BOARD_STARTED}</span></td>
</tr>

#
#----- [ ] --------------------------
#

phpbb3, :)

/ /