Languagified the admin index

git-svn-id: file:///svn/phpbb/trunk@757 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Paul S. Owen 2001-07-28 14:54:42 +00:00
parent 6697141b5f
commit 5c5f38ba40
3 changed files with 112 additions and 63 deletions

View file

@ -44,7 +44,7 @@ if( !$userdata['session_logged_in'] )
}
else if( $userdata['user_level'] != ADMIN )
{
message_die(GENERAL_MESSAGE, "You are not authorised to administer this board");
message_die(GENERAL_MESSAGE, $lang['Not_admin']);
}
//
@ -89,6 +89,8 @@ if( $HTTP_GET_VARS['pane'] == 'left' )
$row_color = "#" . ( ( !($row_count%2) ) ? $theme['td_color1'] : $theme['td_color2']);
$row_class = ( !($row_count%2) ) ? $theme['td_class1'] : $theme['td_class2'];
$action = preg_replace("'_'", " ", $action);
$template->assign_block_vars("catrow.actionrow", array(
"ROW_COLOR" => $row_color,
"ROW_CLASS" => $row_class,
@ -112,19 +114,42 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' )
"body" => "admin/admin_index_body.tpl")
);
$template->assign_vars(array(
"L_WELCOME" => $lang['Welcome_phpBB'],
"L_ADMIN_INTRO" => $lang['Admin_intro'],
"L_FORUM_STATS" => $lang['Forum_stats'],
"L_WHO_IS_ONLINE" => $lang['Who_is_Online'],
"L_LOCATION" => $lang['Location'],
"L_LAST_UPDATE" => $lang['Last_updated'],
"L_IP_ADDRESS" => $lang['IP_Address'],
"L_STATISTIC" => $lang['Statistic'],
"L_VALUE" => $lang['Value'],
"L_NUMBER_POSTS" => $lang['Number_posts'],
"L_POSTS_PER_DAY" => $lang['Posts_per_day'],
"L_NUMBER_TOPICS" => $lang['Number_topics'],
"L_TOPICS_PER_DAY" => $lang['Topics_per_day'],
"L_NUMBER_USERS" => $lang['Number_users'],
"L_USERS_PER_DAY" => $lang['Users_per_day'],
"L_BOARD_STARTED" => $lang['Board_started'],
"L_AVATAR_DIR_SIZE" => $lang['Avatar_dir_size'],
"L_DB_SIZE" => $lang['Database_size'])
);
//
// Get forum statistics
//
$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['default_timezone']);
$boarddays = (time() - $board_config['board_startdate']) / (24*60*60);
$posts_per_day = sprintf("%.2f", $total_posts / $boarddays);
$topics_per_day = sprintf("%.2f", $total_topics / $boarddays);
$users_per_day = sprintf("%.2f", $total_users / $boarddays);
$start_date = create_date($board_config['default_dateformat'], $board_config['board_startdate'], $board_config['default_timezone']);
$boarddays = (time() - $board_config['board_startdate']) / (24*60*60);
$avatar_dir_size = 0;
if ($avatar_dir = opendir($phpbb_root_path . $board_config['avatar_path']))
@ -190,7 +215,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' )
$dbsize = 0;
for($i = 0; $i < count($tabledata_ary); $i++)
{
if($tabledata_ary[$i]['Type'] != "MRG_MyISAM")
if($tabledata_ary[$i]['Type'] != "MRG_MyISAM" && strstr($tabledata_ary[$i]['Name'], $table_prefix) )
{
$dbsize += $tabledata_ary[$i]['Data_length'] + $tabledata_ary[$i]['Index_length'];
}
@ -211,7 +236,7 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' )
}
else
{
$dbsize = "N/A";
$dbsize = $lang['Not_available'];
}
$template->assign_vars(array(
@ -354,17 +379,12 @@ elseif( $HTTP_GET_VARS['pane'] == 'right' )
"LOGGED_ON" => $logged_on,
"LASTUPDATE" => create_date($board_config['default_dateformat'], $onlinerow[$i]['session_time'], $board_config['default_timezone']),
"LOCATION" => $location,
"IPADDRESS" => $ip_address,
"IP_ADDRESS" => $ip_address,
"U_USER_PROFILE" => append_sid("admin_user.$phpEx?" . POST_USERS_URL . "=" . $onlinerow[$i]['user_id']),
"U_FORUM_LOCATION" => append_sid($location_url))
);
}
}
$template->assign_vars(array("L_USERNAME" => $lang['Username'],
"L_LOCATION" => $lang['Location'],
"L_LAST_UPDATE" => $lang['Last_updated'],
"L_IPADDRESS" => $lang['IP_Address'])
);
$template->pparse("body");
@ -385,6 +405,9 @@ else
"S_FRAME_MAIN" => "index.$phpEx?pane=right")
);
header ("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT");
header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
$template->pparse("body");
exit;

View file

@ -401,7 +401,7 @@ $lang['Current_Image'] = "Current Image";
$lang['Notify_on_privmsg'] = "Notify on Private Message";
$lang['Hide_user'] = "Hide your online status";
$lang['Profile_updated'] = "Your profile has been updated<br><br>" . $lang['Click_index'];
$lang['Profile_updated'] = "Your profile has been updated<br /><br />" . $lang['Click_index'];
$lang['Password_mismatch'] = "The passwords you entered did not match";
$lang['Invalid_username'] = "The username you requested has been taken or disallowed";
@ -455,7 +455,7 @@ Thank you for registering.
"; // END
$lang['COPPA'] = "Your account has been created but has to be approved, please check your email for details.";
$lang['Welcome_COPPA'] = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to: <br>" . $lang['Mailing_address'] . "<br>Or fax it to: <br>" . $lang['Fax_info'] . "<br> Once this information has been received your account will be activated by the administrator and you will receive an email notification.";
$lang['Welcome_COPPA'] = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to: <br />" . $lang['Mailing_address'] . "<br />Or fax it to: <br />" . $lang['Fax_info'] . "<br /> Once this information has been received your account will be activated by the administrator and you will receive an email notification.";
//
// Memberslist
@ -556,8 +556,8 @@ $lang['Viewing_FAQ'] = "Viewing FAQ";
$lang['Information'] = "Information";
$lang['Critical_Information'] = "Critical Information";
$lang['You_been_banned'] = "You have been banned from this forum<br>Please contact the webmaster or board administrator for more information";
$lang['No_topics_post_one'] = "There are no posts in this forum<br>Click on the <b>Post New Topic</b> link on this page to post one";
$lang['You_been_banned'] = "You have been banned from this forum<br />Please contact the webmaster or board administrator for more information";
$lang['No_topics_post_one'] = "There are no posts in this forum<br />Click on the <b>Post New Topic</b> link on this page to post one";
$lang['Board_disable'] = "Sorry but this board is currently unavailable, please try again later";
$lang['General_Error'] = "General Error";
@ -565,7 +565,7 @@ $lang['Critical_Error'] = "Critical Error";
$lang['An_error_occured'] = "An Error Occured";
$lang['A_critical_error'] = "A Critical Error Occured";
$lang['Error_login'] = "Login Failed<br>You have specified an incorrect/inactive username or invalid password, please go back and try again";
$lang['Error_login'] = "Login Failed<br />You have specified an incorrect/inactive username or invalid password, please go back and try again";
$lang['Not_Moderator'] = "You are not a moderator of this forum";
$lang['Not_Authorised'] = "Not Authorised";
@ -633,6 +633,32 @@ $lang[10] = "EST (Australia)";
$lang[11] = "GMT + 11" . " " . $lang['Hours'];
$lang[12] = "GMT + 12" . " " . $lang['Hours'];
//
// Main Admin section/s
//
// Index
$lang['Not_admin'] = "You are not authorised to administer this board";
$lang['Welcome_phpBB'] = "Welcome to phpBB";
$lang['Admin_intro'] = "Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the <u>Admin Index</u> link in the left pane. To return to the index of your board, click the phpBB logo also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience, each screen will have instructions on how to use the tools.";
$lang['Forum_stats'] = "Forum Statistics";
$lang['Statistic'] = "Statistic";
$lang['Value'] = "Value";
$lang['Number_posts'] = "Number of posts";
$lang['Posts_per_day'] = "Posts per day";
$lang['Number_topics'] = "Number of topics";
$lang['Topics_per_day'] = "Topics per day";
$lang['Number_users'] = "Number of users";
$lang['Users_per_day'] = "Users per day";
$lang['Board_started'] = "Board started";
$lang['Avatar_dir_size'] = "Avatar directory size";
$lang['Database_size'] = "Database size";
$lang['Not_available'] = "Not available";
//
// End
// -------------------------------------------------
@ -643,21 +669,21 @@ $lang[12] = "GMT + 12" . " " . $lang['Hours'];
// Register
$l_mailingaddress =
"
James Atkinson<br>
c/o 100World.com Inc.<br>
512-1529 West 6th Ave.<br>
Vancouver BC, V6J 1R1<br>
Canada<br>
James Atkinson<br />
c/o 100World.com Inc.<br />
512-1529 West 6th Ave.<br />
Vancouver BC, V6J 1R1<br />
Canada<br />
";
$l_faxinfo = "
Mark Fax with:
ATTN: James Atkinson<br>
RE: Forum Registration<br>
<br>
Fax Number: +1-604-742-1770<br>
ATTN: James Atkinson<br />
RE: Forum Registration<br />
<br />
Fax Number: +1-604-742-1770<br />
";
$l_coppa = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to: <br>$l_mailingaddress<br>Or fax it to: <br>$l_faxinfo<br> Once this information has been recived your account will be activated by the administrator and you will recive and email notification.";
$l_coppa = "Your account has been created, however in complance with the COPPA act you must print out this page and have you parent or guardian mail it to: <br />$l_mailingaddress<br />Or fax it to: <br />$l_faxinfo<br /> Once this information has been recived your account will be activated by the administrator and you will recive and email notification.";
$l_welcomesubj = "Welcome to ".$board_config['sitename']." Forums";
$l_welcomemail = "
$l_welcomesubj,

View file

@ -1,47 +1,48 @@
<br clear="all">
<h1>Welcome to phpBB</h1>
<br clear="all" />
<p>Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the <u>Admin Index</u> link in the left pane. To return to the index of your board, click the <u>Board Index</u> link also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience, each screen will have instructions on how to use the tools.</p>
<h1>{L_WELCOME}</h1>
<h2>Forum Statistics</h2>
<p>{L_ADMIN_INTRO}</p>
<h2>{L_FORUM_STATS}</h2>
<table border="0" cellpadding="1" cellspacing="0" width="98%" align="center">
<tr>
<td class="tablebg">
<table width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th width="25%" nowrap>Statistic</th>
<th width="25%">Value</th>
<th width="25%" nowrap>Statistic</th>
<th width="25%">Value</th>
<th width="25%" nowrap>{L_STATISTIC}</th>
<th width="25%">{L_VALUE}</th>
<th width="25%" nowrap>{L_STATISTIC}</th>
<th width="25%">{L_VALUE}</th>
</tr>
<tr>
<td class="row1" nowrap>Current number of posts:</td>
<td class="row1" nowrap>{L_NUMBER_POSTS}:</td>
<td class="row2"><b>{NUMBER_OF_POSTS}</b></td>
<td class="row1" nowrap>Posts per day:</td>
<td class="row1" nowrap>{L_POSTS_PER_DAY}:</td>
<td class="row2"><b>{POSTS_PER_DAY}</b></td>
</tr>
<tr>
<td class="row1" nowrap>Current number of topics:</td>
<td class="row1" nowrap>{L_NUMBER_TOPICS}:</td>
<td class="row2"><b>{NUMBER_OF_TOPICS}</b></td>
<td class="row1" nowrap>Topics per day:</td>
<td class="row1" nowrap>{L_TOPICS_PER_DAY}:</td>
<td class="row2"><b>{TOPICS_PER_DAY}</b></td>
</tr>
<tr>
<td class="row1" nowrap>Current number of users:</td>
<td class="row1" nowrap>{L_NUMBER_USERS}:</td>
<td class="row2"><b>{NUMBER_OF_USERS}</b></td>
<td class="row1" nowrap>Users per day:</td>
<td class="row1" nowrap>{L_USERS_PER_DAY}:</td>
<td class="row2"><b>{USERS_PER_DAY}</b></td>
</tr>
<tr>
<td class="row1" nowrap>Board started on:</td>
<td class="row1" nowrap>{L_BOARD_STARTED}:</td>
<td class="row2"><b>{START_DATE}</b></td>
<td class="row1" nowrap>Avatar directory size:</td>
<td class="row1" nowrap>{L_AVATAR_DIR_SIZE}:</td>
<td class="row2"><b>{AVATAR_DIR_SIZE}</b></td>
</tr>
<tr>
<td class="row1" nowrap>Database size:</td>
<td class="row1" nowrap>{L_DB_SIZE}:</td>
<td class="row2"><b>{DB_SIZE}</b></td>
<td class="row1" nowrap>&nbsp;</td>
<td class="row2">&nbsp;</td>
@ -51,28 +52,27 @@
</tr>
</table>
<h2>Users Online</h2>
<h2>{L_WHO_IS_ONLINE}</h2>
<table border="0" cellpadding="1" cellspacing="0" width="98%" align="center">
<tr>
<td class="tablebg">
<table width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th width="25%">&nbsp;{L_USERNAME}&nbsp;</th>
<th width="25%">&nbsp;{L_LAST_UPDATE}&nbsp;</th>
<th width="25%">&nbsp;{L_LOCATION}&nbsp;</th>
<th width="25%">&nbsp;{L_IPADDRESS}&nbsp;</th>
</tr>
<!-- BEGIN userrow -->
<tr bgcolor="{userrow.ROW_COLOR}">
<td width="25%">&nbsp;<span class="gen"><a href="{userrow.U_USER_PROFILE}">{userrow.USERNAME}</a></span>&nbsp;</td>
<td width="25%" align="center">&nbsp;<span class="gen">{userrow.LASTUPDATE}</span>&nbsp;</td>
<td width="25%">&nbsp;<span class="gen"><a href="{userrow.U_FORUM_LOCATION}">{userrow.LOCATION}</a></span>&nbsp;</td>
<td width="25%">&nbsp;<span class="gen">{userrow.IPADDRESS}</span>&nbsp;</td>
</tr>
<!-- END userrow -->
</table>
</td>
<td class="tablebg"><table width="100%" cellpadding="4" cellspacing="1" border="0">
<tr>
<th width="25%">&nbsp;{L_USERNAME}&nbsp;</th>
<th width="25%">&nbsp;{L_LAST_UPDATE}&nbsp;</th>
<th width="25%">&nbsp;{L_LOCATION}&nbsp;</th>
<th width="25%">&nbsp;{L_IP_ADDRESS}&nbsp;</th>
</tr>
<!-- BEGIN userrow -->
<tr bgcolor="{userrow.ROW_COLOR}">
<td width="25%">&nbsp;<span class="gen"><a href="{userrow.U_USER_PROFILE}">{userrow.USERNAME}</a></span>&nbsp;</td>
<td width="25%" align="center">&nbsp;<span class="gen">{userrow.LASTUPDATE}</span>&nbsp;</td>
<td width="25%">&nbsp;<span class="gen"><a href="{userrow.U_FORUM_LOCATION}">{userrow.LOCATION}</a></span>&nbsp;</td>
<td width="25%">&nbsp;<span class="gen">{userrow.IP_ADDRESS}</span>&nbsp;</td>
</tr>
<!-- END userrow -->
</table></td>
</tr>
</table>
<br clear="all">
<br clear="all" />