diff options
author | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-10-20 19:19:07 +0000 |
---|---|---|
committer | Paul S. Owen <psotfx@users.sourceforge.net> | 2002-10-20 19:19:07 +0000 |
commit | 0e9f0ac4ecc636336603cc6932ce21a550c7087e (patch) | |
tree | fbcfca6602b37f80a51fba1d459f94b3d93ca08f /phpBB/admin | |
parent | 4887cf1e49daa80a0736d753589c9995d7ddbd4b (diff) | |
download | forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.gz forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.bz2 forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.tar.xz forums-0e9f0ac4ecc636336603cc6932ce21a550c7087e.zip |
Mostly changes to turn userdata into user->data, lang into user->lang + bitstring 2nd format + inheritance for permission admin and various other updates/fixes/changes ... note that user->lang & user->theme isn't final
git-svn-id: file:///svn/phpbb/trunk@2958 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/admin')
-rw-r--r-- | phpBB/admin/admin_ban.php | 21 | ||||
-rw-r--r-- | phpBB/admin/admin_board.php | 188 | ||||
-rw-r--r-- | phpBB/admin/admin_database.php | 62 | ||||
-rw-r--r-- | phpBB/admin/admin_disallow.php | 26 | ||||
-rw-r--r-- | phpBB/admin/admin_email.php | 20 | ||||
-rw-r--r-- | phpBB/admin/admin_forums.php | 128 | ||||
-rw-r--r-- | phpBB/admin/admin_groups.php | 72 | ||||
-rw-r--r-- | phpBB/admin/admin_permissions.php | 238 | ||||
-rw-r--r-- | phpBB/admin/admin_prune.php | 40 | ||||
-rw-r--r-- | phpBB/admin/admin_prune_users.php | 42 | ||||
-rw-r--r-- | phpBB/admin/admin_ranks.php | 58 | ||||
-rw-r--r-- | phpBB/admin/admin_search.php | 22 | ||||
-rw-r--r-- | phpBB/admin/admin_smilies.php | 108 | ||||
-rw-r--r-- | phpBB/admin/admin_styles.php | 119 | ||||
-rw-r--r-- | phpBB/admin/admin_users.php | 198 | ||||
-rw-r--r-- | phpBB/admin/admin_viewlogs.php | 34 | ||||
-rw-r--r-- | phpBB/admin/admin_words.php | 42 | ||||
-rw-r--r-- | phpBB/admin/index.php | 102 | ||||
-rw-r--r-- | phpBB/admin/pagestart.php | 34 |
19 files changed, 825 insertions, 729 deletions
diff --git a/phpBB/admin/admin_ban.php b/phpBB/admin/admin_ban.php index b03880c1ce..40232d7098 100644 --- a/phpBB/admin/admin_ban.php +++ b/phpBB/admin/admin_ban.php @@ -528,8 +528,27 @@ switch ( $mode ) <th colspan="2"><?php echo $l_unban_title; ?></th> </tr> <tr> +<?php + + if ( $banned_options != '' ) + { + +?> <td class="row1" width="45%"><?php echo $l_ban_cell; ?>: <br /></td> - <td class="row1"> <?php if ( $banned_options != '' ) { ?><select name="unban[]" multiple="multiple" size="5"><?php echo $banned_options; ?></select><?php } else { echo $l_no_ban_cell; } ?></td> + <td class="row1"> <select name="unban[]" multiple="multiple" size="5"><?php echo $banned_options; ?></select></td> +<?php + + } + else + { + +?> + <td class="row1" colspan="2" align="center"><?php echo $l_no_ban_cell; ?></td> +<?php + + } + +?> </tr> <tr> <td class="cat" colspan="2" align="center"><input type="submit" name="unbansubmit" value="<?php echo $lang['Submit']; ?>" class="mainoption" /></td> diff --git a/phpBB/admin/admin_board.php b/phpBB/admin/admin_board.php index c326b41323..6f26eb934b 100644 --- a/phpBB/admin/admin_board.php +++ b/phpBB/admin/admin_board.php @@ -46,7 +46,7 @@ require('pagestart.' . $phpEx); // Are we authed? if ( !$auth->acl_get('a_general') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // Get mod @@ -84,7 +84,7 @@ while ( $row = $db->sql_fetchrow($result) ) if ( isset($_POST['submit']) ) { add_admin_log('log_' . $mode . '_config'); - message_die(MESSAGE, $lang['Config_updated']); + message_die(MESSAGE, $user->lang['Config_updated']); } // @@ -120,17 +120,17 @@ switch ( $mode ) return; } -page_header($lang[$l_title]); +page_header($user->lang[$l_title]); ?> -<h1><?php echo $lang[$l_title]; ?></h1> +<h1><?php echo $user->lang[$l_title]; ?></h1> -<p><?php echo $lang[$l_title . '_explain']; ?></p> +<p><?php echo $user->lang[$l_title . '_explain']; ?></p> <form action="<?php echo "admin_board.$phpEx$SID&mode=$mode"; ?>" method="post"><table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang[$l_title]; ?></th> + <th colspan="2"><?php echo $user->lang[$l_title]; ?></th> </tr> <?php @@ -146,20 +146,20 @@ switch ( $mode ) ?> <tr> - <td class="row1" width="50%"><?php echo $lang['Cookie_domain']; ?>: </td> + <td class="row1" width="50%"><?php echo $user->lang['Cookie_domain']; ?>: </td> <td class="row2"><input type="text" maxlength="255" name="cookie_domain" value="<?php echo $new['cookie_domain']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Cookie_name']; ?>: </td> + <td class="row1"><?php echo $user->lang['Cookie_name']; ?>: </td> <td class="row2"><input type="text" maxlength="16" name="cookie_name" value="<?php echo $new['cookie_name']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Cookie_path']; ?>: </td> + <td class="row1"><?php echo $user->lang['Cookie_path']; ?>: </td> <td class="row2"><input type="text" maxlength="255" name="cookie_path" value="<?php echo $new['cookie_path']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Cookie_secure']; ?>: <br /><span class="gensmall"><?php echo $lang['Cookie_secure_explain']; ?></span></td> - <td class="row2"><input type="radio" name="cookie_secure" value="0"<?php echo $cookie_secure_no; ?> /><?php echo $lang['Disabled']; ?> <input type="radio" name="cookie_secure" value="1"<?php echo $cookie_secure_yes; ?> /><?php echo $lang['Enabled']; ?></td> + <td class="row1"><?php echo $user->lang['Cookie_secure']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Cookie_secure_explain']; ?></span></td> + <td class="row2"><input type="radio" name="cookie_secure" value="0"<?php echo $cookie_secure_no; ?> /><?php echo $user->lang['Disabled']; ?> <input type="radio" name="cookie_secure" value="1"<?php echo $cookie_secure_yes; ?> /><?php echo $user->lang['Enabled']; ?></td> </tr> <?php @@ -176,31 +176,31 @@ switch ( $mode ) ?> <tr> - <td class="row1" width="50%"><?php echo $lang['Allow_local']; ?>: </td> - <td class="row2"><input type="radio" name="allow_avatar_local" value="1"<?php echo $avatars_local_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_avatar_local" value="0"<?php echo $avatars_local_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1" width="50%"><?php echo $user->lang['Allow_local']; ?>: </td> + <td class="row2"><input type="radio" name="allow_avatar_local" value="1"<?php echo $avatars_local_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_avatar_local" value="0"<?php echo $avatars_local_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_remote']; ?>: <br /><span class="gensmall"><?php echo $lang['Allow_remote_explain']; ?></span></td> - <td class="row2"><input type="radio" name="allow_avatar_remote" value="1"<?php echo $avatars_remote_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_avatar_remote" value="0"<?php echo $avatars_remote_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_remote']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Allow_remote_explain']; ?></span></td> + <td class="row2"><input type="radio" name="allow_avatar_remote" value="1"<?php echo $avatars_remote_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_avatar_remote" value="0"<?php echo $avatars_remote_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_upload']; ?>: </td> - <td class="row2"><input type="radio" name="allow_avatar_upload" value="1"<?php echo $avatars_upload_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_avatar_upload" value="0"<?php echo $avatars_upload_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_upload']; ?>: </td> + <td class="row2"><input type="radio" name="allow_avatar_upload" value="1"<?php echo $avatars_upload_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_avatar_upload" value="0"<?php echo $avatars_upload_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Max_filesize']; ?>: <br /><span class="gensmall"><?php echo $lang['Max_filesize_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Max_filesize']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Max_filesize_explain']; ?></span></td> <td class="row2"><input type="text" size="4" maxlength="10" name="avatar_filesize" value="<?php echo $new['avatar_filesize']; ?>" /> Bytes</td> </tr> <tr> - <td class="row1"><?php echo $lang['Max_avatar_size']; ?>: <br /><span class="gensmall"><?php echo $lang['Max_avatar_size_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Max_avatar_size']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Max_avatar_size_explain']; ?></span></td> <td class="row2"><input type="text" size="3" maxlength="4" name="avatar_max_height" value="<?php echo $new['avatar_max_height']; ?>" /> x <input type="text" size="3" maxlength="4" name="avatar_max_width" value="<?php echo $new['avatar_max_width']; ?>"></td> </tr> <tr> - <td class="row1"><?php echo $lang['Avatar_storage_path']; ?>: <br /><span class="gensmall"><?php echo $lang['Avatar_storage_path_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Avatar_storage_path']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Avatar_storage_path_explain']; ?></span></td> <td class="row2"><input type="text" size="20" maxlength="255" name="avatar_path" value="<?php echo $new['avatar_path']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Avatar_gallery_path']; ?>: <br /><span class="gensmall"><?php echo $lang['Avatar_gallery_path_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Avatar_gallery_path']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Avatar_gallery_path_explain']; ?></span></td> <td class="row2"><input type="text" size="20" maxlength="255" name="avatar_gallery_path" value="<?php echo $new['avatar_gallery_path']; ?>" /></td> </tr> <?php @@ -239,67 +239,67 @@ switch ( $mode ) ?> <tr> - <td class="row1" width="50%"><?php echo $lang['Default_style']; ?></td> + <td class="row1" width="50%"><?php echo $user->lang['Default_style']; ?></td> <td class="row2"><?php echo $style_select; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Override_style']; ?>: <br /><span class="gensmall"><?php echo $lang['Override_style_explain']; ?></span></td> - <td class="row2"><input type="radio" name="override_user_style" value="1" <?php echo $override_user_style_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="override_user_style" value="0" <?php echo $override_user_style_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Override_style']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Override_style_explain']; ?></span></td> + <td class="row2"><input type="radio" name="override_user_style" value="1" <?php echo $override_user_style_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="override_user_style" value="0" <?php echo $override_user_style_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Default_language']; ?>: </td> + <td class="row1"><?php echo $user->lang['Default_language']; ?>: </td> <td class="row2"><?php echo $lang_select; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Date_format']; ?>: <br /><span class="gensmall"><?php echo $lang['Date_format_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Date_format']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Date_format_explain']; ?></span></td> <td class="row2"><input type="text" name="default_dateformat" value="<?php echo $new['default_dateformat']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['System_timezone']; ?>: </td> + <td class="row1"><?php echo $user->lang['System_timezone']; ?>: </td> <td class="row2"><?php echo $timezone_select; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Char_limit']; ?><br />: <span class="gensmall"><?php echo $lang['Char_limit_explain']; ?></span</td> + <td class="row1"><?php echo $user->lang['Char_limit']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Char_limit_explain']; ?></span</td> <td class="row2"><input type="text" size="4" maxlength="4" name="max_post_chars" value="<?php echo $new['max_post_chars']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Smilies_limit']; ?>: <br /><span class="gensmall"><?php echo $lang['Smilies_limit_explain']; ?></span</td> + <td class="row1"><?php echo $user->lang['Smilies_limit']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Smilies_limit_explain']; ?></span</td> <td class="row2"><input type="text" size="4" maxlength="4" name="max_post_smilies" value="<?php echo $new['max_post_smilies']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_topic_notify']; ?>: </td> - <td class="row2"><input type="radio" name="allow_topic_notify" value="1" <?php echo $topic_notify_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_topic_notify" value="0" <?php echo $topic_notify_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_topic_notify']; ?>: </td> + <td class="row2"><input type="radio" name="allow_topic_notify" value="1" <?php echo $topic_notify_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_topic_notify" value="0" <?php echo $topic_notify_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_forum_notify']; ?>: </td> - <td class="row2"><input type="radio" name="allow_forum_notify" value="1" <?php echo $forum_notify_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_forum_notify" value="0" <?php echo $forum_notify_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_forum_notify']; ?>: </td> + <td class="row2"><input type="radio" name="allow_forum_notify" value="1" <?php echo $forum_notify_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_forum_notify" value="0" <?php echo $forum_notify_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_name_change']; ?>: </td> - <td class="row2"><input type="radio" name="allow_namechange" value="1" <?php echo $namechange_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_namechange" value="0" <?php echo $namechange_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_name_change']; ?>: </td> + <td class="row2"><input type="radio" name="allow_namechange" value="1" <?php echo $namechange_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_namechange" value="0" <?php echo $namechange_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_HTML']; ?>: </td> - <td class="row2"><input type="radio" name="allow_html" value="1" <?php echo $html_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_html" value="0" <?php echo $html_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_HTML']; ?>: </td> + <td class="row2"><input type="radio" name="allow_html" value="1" <?php echo $html_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_html" value="0" <?php echo $html_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allowed_tags']; ?>: <br /><span class="gensmall"><?php echo $lang['Allowed_tags_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Allowed_tags']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Allowed_tags_explain']; ?></span></td> <td class="row2"><input type="text" size="30" maxlength="255" name="allow_html_tags" value="<?php echo $new['allow_html_tags']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_BBCode']; ?>: </td> - <td class="row2"><input type="radio" name="allow_bbcode" value="1" <?php echo $bbcode_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_bbcode" value="0" <?php echo $bbcode_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_BBCode']; ?>: </td> + <td class="row2"><input type="radio" name="allow_bbcode" value="1" <?php echo $bbcode_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_bbcode" value="0" <?php echo $bbcode_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_smilies']; ?>: </td> - <td class="row2"><input type="radio" name="allow_smilies" value="1" <?php echo $smile_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_smilies" value="0" <?php echo $smile_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_smilies']; ?>: </td> + <td class="row2"><input type="radio" name="allow_smilies" value="1" <?php echo $smile_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_smilies" value="0" <?php echo $smile_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Allow_sig']; ?>: </td> - <td class="row2"><input type="radio" name="allow_sig" value="1" <?php echo $sig_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="allow_sig" value="0" <?php echo $sig_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Allow_sig']; ?>: </td> + <td class="row2"><input type="radio" name="allow_sig" value="1" <?php echo $sig_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="allow_sig" value="0" <?php echo $sig_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Max_sig_length']; ?>: <br /><span class="gensmall"><?php echo $lang['Max_sig_length_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Max_sig_length']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Max_sig_length_explain']; ?></span></td> <td class="row2"><input type="text" size="5" maxlength="4" name="max_sig_chars" value="<?php echo $new['max_sig_chars']; ?>" /></td> </tr> <?php @@ -327,79 +327,79 @@ switch ( $mode ) ?> <tr> - <td class="row1" width="50%"><?php echo $lang['Site_name']; ?>: </td> + <td class="row1" width="50%"><?php echo $user->lang['Site_name']; ?>: </td> <td class="row2"><input type="text" size="40" maxlength="255" name="sitename" value="<?php echo htmlentities($new['sitename']); ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Site_desc']; ?>: </td> + <td class="row1"><?php echo $user->lang['Site_desc']; ?>: </td> <td class="row2"><input type="text" size="40" maxlength="255" name="site_desc" value="<?php echo htmlentities($new['site_desc']); ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Board_disable']; ?>: <br /><span class="gensmall"><?php echo $lang['Board_disable_explain']; ?></span></td> - <td class="row2"><input type="radio" name="board_disable" value="1" <?php echo $disable_board_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="board_disable" value="0" <?php echo $disable_board_no; ?> /> <?php echo $lang['No']; ?><br /><input type="text" name="board_disable_msg" maxlength="255" size="40" value="<?php echo $new['board_disable_msg']; ?>" /></td> + <td class="row1"><?php echo $user->lang['Board_disable']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Board_disable_explain']; ?></span></td> + <td class="row2"><input type="radio" name="board_disable" value="1" <?php echo $disable_board_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="board_disable" value="0" <?php echo $disable_board_no; ?> /> <?php echo $user->lang['No']; ?><br /><input type="text" name="board_disable_msg" maxlength="255" size="40" value="<?php echo $new['board_disable_msg']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Enable_prune']; ?>: </td> - <td class="row2"><input type="radio" name="prune_enable" value="1" <?php echo $prune_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="prune_enable" value="0" <?php echo $prune_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Enable_prune']; ?>: </td> + <td class="row2"><input type="radio" name="prune_enable" value="1" <?php echo $prune_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="prune_enable" value="0" <?php echo $prune_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Acct_activation']; ?>: <br /><span class="gensmall"><?php echo $lang['Acct_activation_explain']; ?></span></td> - <td class="row2"><input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_NONE; ?>" <?php echo $activation_none; ?> /><?php echo $lang['Acc_None']; ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_SELF; ?>" <?php echo $activation_user; ?> /><?php echo $lang['Acc_User']; ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_ADMIN; ?>" <?php echo $activation_admin; ?> /><?php echo $lang['Acc_Admin']; ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_DISABLE; ?>" <?php echo $activation_disable; ?> /><?php echo $lang['Acc_Disable']; ?></td> + <td class="row1"><?php echo $user->lang['Acct_activation']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Acct_activation_explain']; ?></span></td> + <td class="row2"><input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_NONE; ?>" <?php echo $activation_none; ?> /><?php echo $user->lang['Acc_None']; ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_SELF; ?>" <?php echo $activation_user; ?> /><?php echo $user->lang['Acc_User']; ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_ADMIN; ?>" <?php echo $activation_admin; ?> /><?php echo $user->lang['Acc_Admin']; ?> <input type="radio" name="require_activation" value="<?php echo USER_ACTIVATION_DISABLE; ?>" <?php echo $activation_disable; ?> /><?php echo $user->lang['Acc_Disable']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Enable_COPPA']; ?>: <br /><span class="gensmall"><?php echo $lang['Enable_COPPA_explain']; ?></span></td> - <td class="row2"><input type="radio" name="coppa_enable" value="1" <?php echo $coppa_enable_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="coppa_enable" value="0" <?php echo $coppa_enable_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Enable_COPPA']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Enable_COPPA_explain']; ?></span></td> + <td class="row2"><input type="radio" name="coppa_enable" value="1" <?php echo $coppa_enable_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="coppa_enable" value="0" <?php echo $coppa_enable_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['COPPA_fax']; ?>: </td> + <td class="row1"><?php echo $user->lang['COPPA_fax']; ?>: </td> <td class="row2"><input type="text" size="25" maxlength="100" name="coppa_fax" value="<?php echo $new['coppa_fax']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['COPPA_mail']; ?>: <br /><span class="gensmall"><?php echo $lang['COPPA_mail_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['COPPA_mail']; ?>: <br /><span class="gensmall"><?php echo $user->lang['COPPA_mail_explain']; ?></span></td> <td class="row2"><textarea name="coppa_mail" rows="5" cols="40"><?php echo $new['coppa_mail']; ?></textarea></td> </tr> <tr> - <td class="row1"><?php echo $lang['Private_Messaging']; ?>: </td> - <td class="row2"><input type="radio" name="privmsg_disable" value="0" <?php echo $privmsg_on; ?> /><?php echo $lang['Enabled']; ?> <input type="radio" name="privmsg_disable" value="1" <?php echo $privmsg_off; ?> /><?php echo $lang['Disabled']; ?></td> + <td class="row1"><?php echo $user->lang['Private_Messaging']; ?>: </td> + <td class="row2"><input type="radio" name="privmsg_disable" value="0" <?php echo $privmsg_on; ?> /><?php echo $user->lang['Enabled']; ?> <input type="radio" name="privmsg_disable" value="1" <?php echo $privmsg_off; ?> /><?php echo $user->lang['Disabled']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Boxes_max']; ?>: <br /><span class="gensmall"><?php echo $lang['Boxes_max_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Boxes_max']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Boxes_max_explain']; ?></span></td> <td class="row2"><input type="text" maxlength="4" size="4" name="pm_max_boxes" value="<?php echo $new['pm_max_boxes']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Boxes_limit']; ?>: <br /><span class="gensmall"><?php echo $lang['Boxes_limit_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Boxes_limit']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Boxes_limit_explain']; ?></span></td> <td class="row2"><input type="text" maxlength="4" size="4" name="pm_max_msgs" value="<?php echo $new['pm_max_msgs']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Flood_Interval']; ?>: <br /><span class="gensmall"><?php echo $lang['Flood_Interval_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Flood_Interval']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Flood_Interval_explain']; ?></span></td> <td class="row2"><input type="text" size="3" maxlength="4" name="flood_interval" value="<?php echo $new['flood_interval']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Search_Interval']; ?>: <br /><span class="gensmall"><?php echo $lang['Search_Interval_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Search_Interval']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Search_Interval_explain']; ?></span></td> <td class="row2"><input type="text" size="3" maxlength="4" name="search_interval" value="<?php echo $new['search_interval']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Min_search_chars']; ?>: <br /><span class="gensmall"><?php echo $lang['Min_search_chars_explain']; ?></span</td> + <td class="row1"><?php echo $user->lang['Min_search_chars']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Min_search_chars_explain']; ?></span</td> <td class="row2"><input type="text" size="3" maxlength="3" name="min_search_chars" value="<?php echo $new['min_search_chars']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Max_search_chars']; ?>: <br /><span class="gensmall"><?php echo $lang['Max_search_chars_explain']; ?></span</td> + <td class="row1"><?php echo $user->lang['Max_search_chars']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Max_search_chars_explain']; ?></span</td> <td class="row2"><input type="text" size="3" maxlength="3" name="max_search_chars" value="<?php echo $new['max_search_chars']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Topics_per_page']; ?>: </td> + <td class="row1"><?php echo $user->lang['Topics_per_page']; ?>: </td> <td class="row2"><input type="text" name="topics_per_page" size="3" maxlength="4" value="<?php echo $new['topics_per_page']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Posts_per_page']; ?>: </td> + <td class="row1"><?php echo $user->lang['Posts_per_page']; ?>: </td> <td class="row2"><input type="text" name="posts_per_page" size="3" maxlength="4" value="<?php echo $new['posts_per_page']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Hot_threshold']; ?>: </td> + <td class="row1"><?php echo $user->lang['Hot_threshold']; ?>: </td> <td class="row2"><input type="text" name="hot_threshold" size="3" maxlength="4" value="<?php echo $new['hot_threshold']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Max_poll_options']; ?>: </td> + <td class="row1"><?php echo $user->lang['Max_poll_options']; ?>: </td> <td class="row2"><input type="text" name="max_poll_options" size="4" maxlength="4" value="<?php echo $new['max_poll_options']; ?>" /></td> </tr> <?php @@ -419,35 +419,35 @@ switch ( $mode ) ?> <tr> - <td class="row1"><?php echo $lang['Enable_email']; ?>: <br /><span class="gensmall"><?php echo $lang['Enable_email_explain']; ?></span></td> - <td class="row2"><input type="radio" name="email_enable" value="1" <?php echo $email_yes; ?> /> <?php echo $lang['Enabled']; ?> <input type="radio" name="email_enable" value="0" <?php echo $email_no; ?> /> <?php echo $lang['Disabled']; ?></td> + <td class="row1"><?php echo $user->lang['Enable_email']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Enable_email_explain']; ?></span></td> + <td class="row2"><input type="radio" name="email_enable" value="1" <?php echo $email_yes; ?> /> <?php echo $user->lang['Enabled']; ?> <input type="radio" name="email_enable" value="0" <?php echo $email_no; ?> /> <?php echo $user->lang['Disabled']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Board_email_form']; ?>: <br /><span class="gensmall"><?php echo $lang['Board_email_form_explain']; ?></span></td> - <td class="row2"><input type="radio" name="board_email_form" value="1" <?php echo $board_email_form_yes; ?> /> <?php echo $lang['Enabled']; ?> <input type="radio" name="board_email_form" value="0" <?php echo $board_email_form_no; ?> /> <?php echo $lang['Disabled']; ?></td> + <td class="row1"><?php echo $user->lang['Board_email_form']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Board_email_form_explain']; ?></span></td> + <td class="row2"><input type="radio" name="board_email_form" value="1" <?php echo $board_email_form_yes; ?> /> <?php echo $user->lang['Enabled']; ?> <input type="radio" name="board_email_form" value="0" <?php echo $board_email_form_no; ?> /> <?php echo $user->lang['Disabled']; ?></td> </tr> <tr> - <td class="row1" width="50%"><?php echo $lang['Admin_email']; ?>: </td> + <td class="row1" width="50%"><?php echo $user->lang['Admin_email']; ?>: </td> <td class="row2"><input type="text" size="25" maxlength="100" name="board_email" value="<?php echo $new['board_email']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Email_sig']; ?>: <br /><span class="gensmall"><?php echo $lang['Email_sig_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Email_sig']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Email_sig_explain']; ?></span></td> <td class="row2"><textarea name="board_email_sig" rows="5" cols="30"><?php echo $new['board_email_sig']; ?></textarea></td> </tr> <tr> - <td class="row1"><?php echo $lang['Use_SMTP']; ?>: <br /><span class="gensmall"><?php echo $lang['Use_SMTP_explain']; ?></span></td> - <td class="row2"><input type="radio" name="smtp_delivery" value="1" <?php echo $smtp_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="smtp_delivery" value="0" <?php echo $smtp_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Use_SMTP']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Use_SMTP_explain']; ?></span></td> + <td class="row2"><input type="radio" name="smtp_delivery" value="1" <?php echo $smtp_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="smtp_delivery" value="0" <?php echo $smtp_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['SMTP_server']; ?>: </td> + <td class="row1"><?php echo $user->lang['SMTP_server']; ?>: </td> <td class="row2"><input type="text" name="smtp_host" value="<?php echo $new['smtp_host']; ?>" size="25" maxlength="50" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['SMTP_username']; ?>: <br /><span class="gensmall"><?php echo $lang['SMTP_username_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['SMTP_username']; ?>: <br /><span class="gensmall"><?php echo $user->lang['SMTP_username_explain']; ?></span></td> <td class="row2"><input type="text" name="smtp_username" value="<?php echo $new['smtp_username']; ?>" size="25" maxlength="255" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['SMTP_password']; ?>: <br /><span class="gensmall"><?php echo $lang['SMTP_password_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['SMTP_password']; ?>: <br /><span class="gensmall"><?php echo $user->lang['SMTP_password_explain']; ?></span></td> <td class="row2"><input type="password" name="smtp_password" value="<?php echo $new['smtp_password']; ?>" size="25" maxlength="255" /></td> </tr> <?php @@ -465,43 +465,43 @@ switch ( $mode ) $gzip_no = ( !$new['gzip_compress'] ) ? 'checked="checked"' : ''; ?> <tr> - <td class="row1"><?php echo $lang['Server_name']; ?>: <br /><span class="gensmall"><?php echo $lang['Server_name_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Server_name']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Server_name_explain']; ?></span></td> <td class="row2"><input type="text" maxlength="255" size="40" name="server_name" value="<?php echo $new['server_name']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Server_port']; ?>: <br /><span class="gensmall"><?php echo $lang['Server_port_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Server_port']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Server_port_explain']; ?></span></td> <td class="row2"><input type="text" maxlength="5" size="5" name="server_port" value="<?php echo $new['server_port']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Script_path']; ?>: <br /><span class="gensmall"><?php echo $lang['Script_path_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Script_path']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Script_path_explain']; ?></span></td> <td class="row2"><input type="text" maxlength="255" name="script_path" value="<?php echo $new['script_path']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['IP_valid']; ?>: <br /><span class="gensmall"><?php echo $lang['IP_valid_explain']; ?></span></td> - <td class="row2"><input type="radio" name="ip_check" value="4" <?php echo $ip_all; ?> /> <?php echo $lang['All']; ?> <input type="radio" name="ip_check" value="3" <?php echo $ip_classc; ?> /> <?php echo $lang['Class_C']; ?> <input type="radio" name="ip_check" value="2" <?php echo $ip_classb; ?> /> <?php echo $lang['Class_B']; ?> <input type="radio" name="ip_check" value="0" <?php echo $ip_none; ?> /> <?php echo $lang['None']; ?> </td> + <td class="row1"><?php echo $user->lang['IP_valid']; ?>: <br /><span class="gensmall"><?php echo $user->lang['IP_valid_explain']; ?></span></td> + <td class="row2"><input type="radio" name="ip_check" value="4" <?php echo $ip_all; ?> /> <?php echo $user->lang['All']; ?> <input type="radio" name="ip_check" value="3" <?php echo $ip_classc; ?> /> <?php echo $user->lang['Class_C']; ?> <input type="radio" name="ip_check" value="2" <?php echo $ip_classb; ?> /> <?php echo $user->lang['Class_B']; ?> <input type="radio" name="ip_check" value="0" <?php echo $ip_none; ?> /> <?php echo $user->lang['None']; ?> </td> </tr> <tr> - <td class="row1"><?php echo $lang['Limit_load']; ?>: <br /><span class="gensmall"><?php echo $lang['Limit_load_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Limit_load']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Limit_load_explain']; ?></span></td> <td class="row2"><input type="text" size="4" maxlength="4" name="limit_load" value="<?php echo $new['limit_load']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Session_length']; ?>: </td> + <td class="row1"><?php echo $user->lang['Session_length']; ?>: </td> <td class="row2"><input type="text" maxlength="5" size="5" name="session_length" value="<?php echo $new['session_length']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Limit_sessions']; ?>: <br /><span class="gensmall"><?php echo $lang['Limit_sessions_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Limit_sessions']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Limit_sessions_explain']; ?></span></td> <td class="row2"><input type="text" size="4" maxlength="4" name="active_sessions" value="<?php echo $new['active_sessions']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Enable_gzip']; ?>: </td> - <td class="row2"><input type="radio" name="gzip_compress" value="1" <?php echo $gzip_yes; ?> /> <?php echo $lang['Yes']; ?> <input type="radio" name="gzip_compress" value="0" <?php echo $gzip_no; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Enable_gzip']; ?>: </td> + <td class="row2"><input type="radio" name="gzip_compress" value="1" <?php echo $gzip_yes; ?> /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="gzip_compress" value="0" <?php echo $gzip_no; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Smilies_path']; ?>: <br /><span class="gensmall"><?php echo $lang['Smilies_path_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Smilies_path']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Smilies_path_explain']; ?></span></td> <td class="row2"><input type="text" size="20" maxlength="255" name="smilies_path" value="<?php echo $new['smilies_path']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Icons_path']; ?>: <br /><span class="gensmall"><?php echo $lang['Icons_path_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Icons_path']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Icons_path_explain']; ?></span></td> <td class="row2"><input type="text" size="20" maxlength="255" name="icons_path" value="<?php echo $new['icons_path']; ?>" /></td> </tr> <?php @@ -532,7 +532,7 @@ switch ( $mode ) ?> <tr> - <td class="row1" width="50%"><?php echo $lang['Auth_method']; ?>:</td> + <td class="row1" width="50%"><?php echo $user->lang['Auth_method']; ?>:</td> <td class="row2"><select name="auth_method"><?php echo $auth_select; ?></select></td> </tr> <?php @@ -572,7 +572,7 @@ switch ( $mode ) ?> <tr> - <td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="<?php echo $lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $lang['Reset']; ?>" class="liteoption" /></td> + <td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="<?php echo $user->lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $user->lang['Reset']; ?>" class="liteoption" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_database.php b/phpBB/admin/admin_database.php index 41c7962062..162a7ae653 100644 --- a/phpBB/admin/admin_database.php +++ b/phpBB/admin/admin_database.php @@ -52,7 +52,7 @@ include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // if ( !$auth->acl_get('a_general') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -85,7 +85,7 @@ switch( $mode ) break; } - message_die(MESSAGE, $lang['Backups_not_supported']); + message_die(MESSAGE, $user->lang['Backups_not_supported']); break; } @@ -97,32 +97,32 @@ switch( $mode ) if ( !isset($_POST['backupstart']) && !isset($_GET['backupstart']) ) { - page_header($lang['DB_Backup']); + page_header($user->lang['DB_Backup']); ?> -<h1><?php echo $lang['DB_Backup']; ?></h1> +<h1><?php echo $user->lang['DB_Backup']; ?></h1> -<p><?php echo $lang['Backup_explain']; ?></p> +<p><?php echo $user->lang['Backup_explain']; ?></p> <form method="post" action="<?php echo "admin_database.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang['Backup_options']; ?></th> + <th colspan="2"><?php echo $user->lang['Backup_options']; ?></th> </tr> <tr> - <td class="row1"><?php echo $lang['Backup_type']; ?>: </td> - <td class="row2"><input type="radio" name="type" value="full" checked="checked" /> <?php echo $lang['Full_backup']; ?> <input type="radio" name="type" value="structure" /> <?php echo $lang['Structure_only']; ?> <input type="radio" name="type" value="data" /> <?php echo $lang['Data_only']; ?></td> + <td class="row1"><?php echo $user->lang['Backup_type']; ?>: </td> + <td class="row2"><input type="radio" name="type" value="full" checked="checked" /> <?php echo $user->lang['Full_backup']; ?> <input type="radio" name="type" value="structure" /> <?php echo $user->lang['Structure_only']; ?> <input type="radio" name="type" value="data" /> <?php echo $user->lang['Data_only']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Include_search_index']; ?>: <br /><span class="gensmall"><?php echo $lang['Include_search_index_explain']; ?></span></td> - <td class="row2"><input type="radio" name="search" value="0" /> <?php echo $lang['No']; ?> <input type="radio" name="search" value="1" checked="checked" /> <?php echo $lang['Yes']; ?></td> + <td class="row1"><?php echo $user->lang['Include_search_index']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Include_search_index_explain']; ?></span></td> + <td class="row2"><input type="radio" name="search" value="0" /> <?php echo $user->lang['No']; ?> <input type="radio" name="search" value="1" checked="checked" /> <?php echo $user->lang['Yes']; ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Additional_tables']; ?>: <br /><span class="gensmall"><?php echo $lang['Additional_tables_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Additional_tables']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Additional_tables_explain']; ?></span></td> <td class="row2"><input type="text" name="tables" size="40" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Store_local']; ?>: <br /><span class="gensmall"><?php echo $lang['Store_local_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Store_local']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Store_local_explain']; ?></span></td> <td class="row2"><input type="text" name="store" size="40" /></td> </tr> <?php @@ -132,8 +132,8 @@ switch( $mode ) ?> <tr> - <td class="row1"><?php echo $lang['Compress_file']; ?>: </td> - <td class="row2"><input type="radio" name="compress" value="none" checked="checked" /> <?php echo $lang['None']; ?><?php + <td class="row1"><?php echo $user->lang['Compress_file']; ?>: </td> + <td class="row2"><input type="radio" name="compress" value="none" checked="checked" /> <?php echo $user->lang['None']; ?><?php if ( extension_loaded('zlib') ) { @@ -158,7 +158,7 @@ switch( $mode ) ?> <tr> - <td class="cat" colspan="2" align="center"><input type="submit" name="backupstart" value="<?php echo $lang['Start_backup']; ?>" class="mainoption" /></td> + <td class="cat" colspan="2" align="center"><input type="submit" name="backupstart" value="<?php echo $user->lang['Start_backup']; ?>" class="mainoption" /></td> </tr> </table></form> @@ -170,10 +170,10 @@ switch( $mode ) { $meta = "<meta http-equiv=\"refresh\" content=\"0;url=admin_database.$phpEx?mode=backup&type=$backup_type&tables=" . quotemeta($additional_tables) . "&search=$search&store=" . quotemeta($store_path) . "&compress=$compress&backupstart=1&startdownload=1\">"; - $message = ( empty($store_path) ) ? $lang['Backup_download'] : $lang['Backup_writing']; + $message = ( empty($store_path) ) ? $user->lang['Backup_download'] : $user->lang['Backup_writing']; - page_header($lang['DB_Backup'], $meta); - page_message($lang['DB_Backup'], $message); + page_header($user->lang['DB_Backup'], $meta); + page_message($user->lang['DB_Backup'], $message); page_footer(); } @@ -301,7 +301,7 @@ switch( $mode ) fclose($fp); unset($contents); - message_die(MESSAGE, $lang['Backup_success']); + message_die(MESSAGE, $user->lang['Backup_success']); } exit; @@ -328,19 +328,19 @@ switch( $mode ) if ( $file_tmpname == '' || $filename == '' || !file_exists($file_tmpname) ) { - message_die(MESSAGE, $lang['Restore_Error_no_file']); + message_die(MESSAGE, $user->lang['Restore_Error_no_file']); } $ext = substr($filename, strrpos($filename, '.') + 1); if ( !preg_match('/^(sql|gz|bz2)$/', $ext) ) { - message_die(MESSAGE, $lang['Restore_Error_filename']); + message_die(MESSAGE, $user->lang['Restore_Error_filename']); } if ( ( !extension_loaded('zlib') && $ext == 'gz' ) || ( !extension_loaded('zip') && $ext == 'zip' ) || ( $ext == 'bz2' && !extension_loaded('bz2') ) ) { - message_die(MESSAGE, $lang['Compress_unsupported']); + message_die(MESSAGE, $user->lang['Compress_unsupported']); } $sql_query = ''; @@ -383,27 +383,27 @@ switch( $mode ) add_admin_log('log_db_restore'); - message_die(MESSAGE, $lang['Restore_success']); + message_die(MESSAGE, $user->lang['Restore_success']); } // // Restore page // - page_header($lang['DB_Restore']); + page_header($user->lang['DB_Restore']); ?> -<h1><?php echo $lang['DB_Restore']; ?></h1> +<h1><?php echo $user->lang['DB_Restore']; ?></h1> -<p><?php echo $lang['Restore_explain']; ?></p> +<p><?php echo $user->lang['Restore_explain']; ?></p> <form enctype="multipart/form-data" method="post" action="<?php echo "admin_database.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center"> - <th colspan="2"><?php echo $lang['Select_file']; ?></th> + <th colspan="2"><?php echo $user->lang['Select_file']; ?></th> </tr> <tr> - <td class="row1"><?php echo $lang['Upload_file']; ?>: <br /><span class="gensmall"><?php + <td class="row1"><?php echo $user->lang['Upload_file']; ?>: <br /><span class="gensmall"><?php - echo $lang['Supported_extensions']; + echo $user->lang['Supported_extensions']; $types = ': <u>sql</u>'; if ( extension_loaded('zlib') ) @@ -421,11 +421,11 @@ switch( $mode ) <td class="row2"><input type="file" name="backup_file" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Local_backup_file']; ?>: <br /><span class="gensmall"><?php echo $lang['Local_backup_file_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Local_backup_file']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Local_backup_file_explain']; ?></span></td> <td class="row2"><input type="text" name="local" size="40" /></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><input type="submit" name="restorestart" value="<?php echo $lang['Start_Restore']; ?>" class="mainoption" /></td> + <td class="cat" colspan="2" align="center"><input type="submit" name="restorestart" value="<?php echo $user->lang['Start_Restore']; ?>" class="mainoption" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_disallow.php b/phpBB/admin/admin_disallow.php index dba6f28455..4bd6a88170 100644 --- a/phpBB/admin/admin_disallow.php +++ b/phpBB/admin/admin_disallow.php @@ -59,7 +59,7 @@ if( isset($_POST['add_name']) ) if ( !validate_username($disallowed_user) ) { - $message = $lang['Disallowed_already']; + $message = $user->lang['Disallowed_already']; } else { @@ -67,10 +67,10 @@ if( isset($_POST['add_name']) ) VALUES('" . str_replace("\'", "''", $disallowed_user) . "')"; $result = $db->sql_query( $sql ); - $message = $lang['Disallow_successful']; + $message = $user->lang['Disallow_successful']; } - $message .= '<br /><br />' . sprintf($lang['Click_return_disallowadmin'], '<a href="' . "admin_disallow.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); + $message .= '<br /><br />' . sprintf($user->lang['Click_return_disallowadmin'], '<a href="' . "admin_disallow.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($user->lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); add_admin_log('log_disallow_add', str_replace('%', '*', $disallowed_user)); @@ -84,7 +84,7 @@ else if( isset($_POST['delete_name']) ) WHERE disallow_id = $disallowed_id"; $db->sql_query($sql); - $message .= $lang['Disallowed_deleted'] . '<br /><br />' . sprintf($lang['Click_return_disallowadmin'], '<a href="' . "admin_disallow.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); + $message .= $user->lang['Disallowed_deleted'] . '<br /><br />' . sprintf($user->lang['Click_return_disallowadmin'], '<a href="' . "admin_disallow.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($user->lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); add_admin_log('log_disallow_delete'); @@ -112,28 +112,28 @@ if ( $row = $db->sql_fetchrow($result) ) // // Output page // -page_header($lang['Users']); +page_header($user->lang['Users']); ?> -<h1><?php echo $lang['Disallow_control']; ?></h1> +<h1><?php echo $user->lang['Disallow_control']; ?></h1> -<p><?php echo $lang['Disallow_explain']; ?></p> +<p><?php echo $user->lang['Disallow_explain']; ?></p> <form method="post" action="<?php echo "admin_disallow.$phpEx$SID"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang['Add_disallow_title']; ?></th> + <th colspan="2"><?php echo $user->lang['Add_disallow_title']; ?></th> </tr> <tr> - <td class="row1"><?php echo $lang['Username']; ?><br /><span class="gensmall"><?php echo $lang['Add_disallow_explain']; ?></span></td> - <td class="row2"><input type="text" name="disallowed_user" size="30" /> <input type="submit" name="add_name" value="<?php echo $lang['Add_disallow']; ?>" class="mainoption" /></td> + <td class="row1"><?php echo $user->lang['Username']; ?><br /><span class="gensmall"><?php echo $user->lang['Add_disallow_explain']; ?></span></td> + <td class="row2"><input type="text" name="disallowed_user" size="30" /> <input type="submit" name="add_name" value="<?php echo $user->lang['Add_disallow']; ?>" class="mainoption" /></td> </tr> <tr> - <th colspan="2"><?php echo $lang['Delete_disallow_title']; ?></th> + <th colspan="2"><?php echo $user->lang['Delete_disallow_title']; ?></th> </tr> <tr> - <td class="row1"><?php echo $lang['Username']; ?><br /><span class="gensmall"><?php echo $lang['Delete_disallow_explain']; ?></span></td> - <td class="row2"><?php if ( $disallow_select != '' ) { ?><select name="disallowed_id"><?php echo $disallow_select; ?></select> <input type="submit" name="delete_name" value="<?php echo $lang['Delete']; ?>" class="liteoption" /><?php } else { echo $lang['No_disallowed']; } ?></td> + <td class="row1"><?php echo $user->lang['Username']; ?><br /><span class="gensmall"><?php echo $user->lang['Delete_disallow_explain']; ?></span></td> + <td class="row2"><?php if ( $disallow_select != '' ) { ?><select name="disallowed_id"><?php echo $disallow_select; ?></select> <input type="submit" name="delete_name" value="<?php echo $user->lang['Delete']; ?>" class="liteoption" /><?php } else { echo $user->lang['No_disallowed']; } ?></td> </tr> </table></form> diff --git a/phpBB/admin/admin_email.php b/phpBB/admin/admin_email.php index 775e013ae0..e8790017c5 100644 --- a/phpBB/admin/admin_email.php +++ b/phpBB/admin/admin_email.php @@ -132,7 +132,7 @@ if ( isset($_POST['submit']) ) $emailer->send(); $emailer->reset(); - message_die(MESSAGE, $lang['Email_sent']); + message_die(MESSAGE, $user->lang['Email_sent']); } } @@ -144,7 +144,7 @@ $sql = "SELECT group_id, group_name FROM ".GROUPS_TABLE; $result = $db->sql_query($sql); -$select_list = '<select name = "g"><option value = "-1">' . $lang['All_users'] . '</option>'; +$select_list = '<select name = "g"><option value = "-1">' . $user->lang['All_users'] . '</option>'; if ( $row = $db->sql_fetchrow($result) ) { do @@ -155,32 +155,32 @@ if ( $row = $db->sql_fetchrow($result) ) } $select_list .= '</select>'; -page_header($lang['Mass_Email']); +page_header($user->lang['Mass_Email']); ?> -<h1><?php echo $lang['Mass_Email']; ?></h1> +<h1><?php echo $user->lang['Mass_Email']; ?></h1> -<p><?php echo $lang['Mass_email_explain']; ?></p> +<p><?php echo $user->lang['Mass_email_explain']; ?></p> <form method="post" action="<?php echo "admin_mass_email.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1"> <tr> - <th colspan="2"><?php echo $lang['Compose']; ?></th> + <th colspan="2"><?php echo $user->lang['Compose']; ?></th> </tr> <tr> - <td class="row1" align="right"><b><?php echo $lang['Recipients']; ?></b></td> + <td class="row1" align="right"><b><?php echo $user->lang['Recipients']; ?></b></td> <td class="row2" align="left"><?php echo $select_list; ?></td> </tr> <tr> - <td class="row1" align="right"><b><?php echo $lang['Subject']; ?></b></td> + <td class="row1" align="right"><b><?php echo $user->lang['Subject']; ?></b></td> <td class="row2"><span class="gen"><input type="text" name="subject" size="45" maxlength="100" tabindex="2" class="post" value="<?php echo $subject; ?>" /></span></td> </tr> <tr> - <td class="row1" align="right" valign="top"><span class="gen"><b><?php echo $lang['Message']; ?></b></span> + <td class="row1" align="right" valign="top"><span class="gen"><b><?php echo $user->lang['Message']; ?></b></span> <td class="row2"><textarea class="post" name="message" rows="15" cols="35" wrap="virtual" style="width:450px" tabindex="3"><?php echo $message; ?></textarea></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><input type="submit" value="<?php echo $lang['Email']; ?>" name="submit" class="mainoption" /></td> + <td class="cat" colspan="2" align="center"><input type="submit" value="<?php echo $user->lang['Email']; ?>" name="submit" class="mainoption" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_forums.php b/phpBB/admin/admin_forums.php index 956bc010b6..915a63a56f 100644 --- a/phpBB/admin/admin_forums.php +++ b/phpBB/admin/admin_forums.php @@ -45,7 +45,7 @@ include($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // if (!$auth->acl_get('a_forum')) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -202,7 +202,7 @@ switch ($mode) VALUES ($forum_id, '$forum_name', '$forum_desc', $parent_id, $left_id, $right_id, $forum_status, $forum_style, $post_count_inc, $prune_enable, $prune_days, $prune_freq)"; $db->sql_query($sql); - $message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&parent_id=' . $parent_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="index.' . $phpEx . $SID . '?pane=right' . '">', '</a>'); + $message = $user->lang['Forums_updated'] . "<br /><br />" . sprintf($user->lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&parent_id=' . $parent_id . '">', '</a>') . '<br /><br />' . sprintf($user->lang['Click_return_admin_index'], '<a href="index.' . $phpEx . $SID . '?pane=right' . '">', '</a>'); message_die(MESSAGE, $message); break; @@ -252,7 +252,7 @@ switch ($mode) $db->sql_query_array('UPDATE ' . FORUMS_TABLE . " SET WHERE forum_id = $forum_id", $sql); - $message = $lang['Forums_updated'] . "<br /><br />" . sprintf($lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&parent_id=' . $parent_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="index.' . $phpEx . $SID . '?pane=right' . '">', '</a>'); + $message = $user->lang['Forums_updated'] . "<br /><br />" . sprintf($user->lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&parent_id=' . $parent_id . '">', '</a>') . '<br /><br />' . sprintf($user->lang['Click_return_admin_index'], '<a href="index.' . $phpEx . $SID . '?pane=right' . '">', '</a>'); message_die(MESSAGE, $message); break; @@ -280,7 +280,7 @@ switch ($mode) { if (empty($_POST['posts_to_id'])) { - $message = $lang['No_destination_forum'] . '<br /><br />' . sprintf($lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&mode=delete&f=' . $forum_id. '">', '</a>'); + $message = $user->lang['No_destination_forum'] . '<br /><br />' . sprintf($user->lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&mode=delete&f=' . $forum_id. '">', '</a>'); message_die(ERROR, $message); } @@ -305,7 +305,7 @@ switch ($mode) { if (empty($_POST['subforums_to_id'])) { - $message = $lang['No_destination_forum'] . '<br /><br />' . sprintf($lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&mode=delete&f=' . $forum_id. '">', '</a>'); + $message = $user->lang['No_destination_forum'] . '<br /><br />' . sprintf($user->lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&mode=delete&f=' . $forum_id. '">', '</a>'); message_die(ERROR, $message); } @@ -340,7 +340,7 @@ switch ($mode) $db->sql_query($sql); $return_id = (!empty($_POST['subforums_to_id'])) ? $_POST['subforums_to_id'] : $parent_id; - $message = $lang['Forum_deleted'] . '<br /><br />' . sprintf($lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&parent_id=' . $return_id. '">', '</a>'); + $message = $user->lang['Forum_deleted'] . '<br /><br />' . sprintf($user->lang['Click_return_forumadmin'], '<a href="admin_forums.' . $phpEx . $SID . '&parent_id=' . $return_id. '">', '</a>'); message_die(MESSAGE, $message); break; @@ -371,9 +371,9 @@ switch ($mode) $parents_list = make_forums_list('all', $parent_id, $subforums_id); - $l_title = ($forum_status != ITEM_CATEGORY) ? $lang['Edit_forum'] : $lang['Edit_category']; + $l_title = ($forum_status != ITEM_CATEGORY) ? $user->lang['Edit_forum'] : $user->lang['Edit_category']; $newmode = 'modify'; - $buttonvalue = $lang['Update']; + $buttonvalue = $user->lang['Update']; $prune_enabled = ($prune_enable) ? 'checked="checked" ' : ''; if ($forum_status != ITEM_CATEGORY) @@ -390,9 +390,9 @@ switch ($mode) } $parents_list = make_forums_list('all', $parent_id); - $l_title = $lang['Create_forum']; + $l_title = $user->lang['Create_forum']; $newmode = 'create'; - $buttonvalue = $lang['Create_forum']; + $buttonvalue = $user->lang['Create_forum']; $forum_desc = ''; $forum_style = ''; @@ -414,27 +414,27 @@ switch ($mode) $forum_checked = ($forum_status != ITEM_CATEGORY) ? 'checked="checked" ' : ''; $category_checked = ($forum_status == ITEM_CATEGORY) ? 'checked="checked" ' : ''; - $statuslist = '<option value="' . ITEM_UNLOCKED . '"' . $forumunlocked . '>' . $lang['Unlocked'] . "</option>\n"; - $statuslist .= '<option value="' . ITEM_LOCKED . '"' . $forumlocked . '>' . $lang['Locked'] . "</option>\n"; + $statuslist = '<option value="' . ITEM_UNLOCKED . '"' . $forumunlocked . '>' . $user->lang['Unlocked'] . "</option>\n"; + $statuslist .= '<option value="' . ITEM_LOCKED . '"' . $forumlocked . '>' . $user->lang['Locked'] . "</option>\n"; page_header($l_title); ?> <h1><?php echo $l_title ?></h1> -<p><?php echo $lang['Forum_edit_delete_explain'] ?></p> +<p><?php echo $user->lang['Forum_edit_delete_explain'] ?></p> <form action="<?php echo "admin_forums.$phpEx$SID" ?>" method="post"> <table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> - <th class="thHead" colspan="2"><?php echo $lang['General_settings'] ?></th> + <th class="thHead" colspan="2"><?php echo $user->lang['General_settings'] ?></th> </tr> <tr> - <td class="row1"><?php echo ($forum_status != ITEM_CATEGORY) ? $lang['Forum_name'] : $lang['Category_name'] ?></td> + <td class="row1"><?php echo ($forum_status != ITEM_CATEGORY) ? $user->lang['Forum_name'] : $user->lang['Category_name'] ?></td> <td class="row2"><input type="text" size="25" name="forum_name" value="<?php echo $forum_name ?>" class="post" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Forum_desc'] ?></td> + <td class="row1"><?php echo $user->lang['Forum_desc'] ?></td> <td class="row2"><textarea rows="5" cols="45" wrap="virtual" name="forum_desc" class="post"><?php echo $forum_desc ?></textarea></td> </tr> <?php @@ -443,22 +443,22 @@ switch ($mode) { ?> <tr> - <td class="row1"><?php echo $lang['Forum_type'] ?></td> - <td class="row2"><input type="radio" name="is_category" value="0" <?php echo $forum_checked ?>/><?php echo $lang['Forum'] ?> <input type="radio" name="is_category" value="1" <?php echo $category_checked ?>/><?php echo $lang['Category'] ?></td> + <td class="row1"><?php echo $user->lang['Forum_type'] ?></td> + <td class="row2"><input type="radio" name="is_category" value="0" <?php echo $forum_checked ?>/><?php echo $user->lang['Forum'] ?> <input type="radio" name="is_category" value="1" <?php echo $category_checked ?>/><?php echo $user->lang['Category'] ?></td> </tr> <?php } ?> <tr> - <td class="row1"><?php echo $lang['Parent'] ?></td> + <td class="row1"><?php echo $user->lang['Parent'] ?></td> <td class="row2"><select name="parent_id"> - <option value="0"><?php echo $lang['No_parent'] ?></option> + <option value="0"><?php echo $user->lang['No_parent'] ?></option> <?php echo $parents_list ?></select></td> </tr> <tr> - <td class="row1"><?php echo $lang['Style'] ?></td> - <td class="row2"><select name="forum_style"><option value="0"><?php echo $lang['Default_style'] ?></option><?php echo $styles_list ?></select></td> + <td class="row1"><?php echo $user->lang['Style'] ?></td> + <td class="row2"><select name="forum_style"><option value="0"><?php echo $user->lang['Default_style'] ?></option><?php echo $styles_list ?></select></td> </tr> <?php @@ -466,16 +466,16 @@ switch ($mode) { ?> <tr> - <th class="thHead" colspan="2"><?php echo $lang['Forum_settings'] ?></th> + <th class="thHead" colspan="2"><?php echo $user->lang['Forum_settings'] ?></th> </tr> <tr> - <td class="row1"><?php echo $lang['Forum_status'] ?></td> + <td class="row1"><?php echo $user->lang['Forum_status'] ?></td> <td class="row2"><select name="forum_status"><?php echo $statuslist ?></select></td> </tr> <tr> - <td class="row1"><?php echo $lang['Options'] ?></td> + <td class="row1"><?php echo $user->lang['Options'] ?></td> <td class="row2"> - <input type="checkbox" name="disable_post_count" <?php echo ((!empty($post_count_inc)) ? '' : 'checked="checked" ') ?>/><?php echo $lang['Disable_post_count'] ?> + <input type="checkbox" name="disable_post_count" <?php echo ((!empty($post_count_inc)) ? '' : 'checked="checked" ') ?>/><?php echo $user->lang['Disable_post_count'] ?> <?php if ($mode == 'edit' && $parent_id > 0) { @@ -488,7 +488,7 @@ switch ($mode) { ?> <br /> - <input type="checkbox" name="display_on_index" <?php echo ((!empty($display_on_index)) ? '' : 'checked="checked" ') ?>/><?php echo $lang['Display_on_index'] ?> + <input type="checkbox" name="display_on_index" <?php echo ((!empty($display_on_index)) ? '' : 'checked="checked" ') ?>/><?php echo $user->lang['Display_on_index'] ?> <?php } } @@ -500,29 +500,29 @@ switch ($mode) { ?> <tr> - <td class="row1"><?php echo $lang['Forum_type'] ?></td> - <td class="row2"><input type="checkbox" name="set_category" /><?php echo $lang['Set_as_category'] ?><br /> - <input type="radio" name="action" value="delete" checked="checked" /><?php echo $lang['Delete_all_posts'] ?><br /> - <input type="radio" name="action" value="move" /><?php echo $lang['Move_posts_to'] ?> <select name="to_forum_id"><?php echo $forums_list ?></select> + <td class="row1"><?php echo $user->lang['Forum_type'] ?></td> + <td class="row2"><input type="checkbox" name="set_category" /><?php echo $user->lang['Set_as_category'] ?><br /> + <input type="radio" name="action" value="delete" checked="checked" /><?php echo $user->lang['Delete_all_posts'] ?><br /> + <input type="radio" name="action" value="move" /><?php echo $user->lang['Move_posts_to'] ?> <select name="to_forum_id"><?php echo $forums_list ?></select> </td> </tr> <?php } ?> <tr> - <td class="row1"><?php echo $lang['Forum_pruning'] ?></td> + <td class="row1"><?php echo $user->lang['Forum_pruning'] ?></td> <td class="row2"><table cellspacing="0" cellpadding="1" border="0"> <tr> - <td align="right" valign="middle"><?php echo $lang['Enabled'] ?></td> + <td align="right" valign="middle"><?php echo $user->lang['Enabled'] ?></td> <td align="left" valign="middle"><input type="checkbox" name="prune_enable" value="1" <?php echo $prune_enabled ?>/></td> </tr> <tr> - <td align="right" valign="middle"><?php echo $lang['prune_days'] ?></td> - <td align="left" valign="middle"> <input type="text" name="prune_days" value="<?php echo $prune_days ?>" size="5" class="post" /> <?php echo $lang['Days'] ?></td> + <td align="right" valign="middle"><?php echo $user->lang['prune_days'] ?></td> + <td align="left" valign="middle"> <input type="text" name="prune_days" value="<?php echo $prune_days ?>" size="5" class="post" /> <?php echo $user->lang['Days'] ?></td> </tr> <tr> - <td align="right" valign="middle"><?php echo $lang['prune_freq'] ?></td> - <td align="left" valign="middle"> <input type="text" name="prune_freq" value="<?php echo $prune_freq ?>" size="5" class="post" /> <?php echo $lang['Days'] ?></td> + <td align="right" valign="middle"><?php echo $user->lang['prune_freq'] ?></td> + <td align="left" valign="middle"> <input type="text" name="prune_freq" value="<?php echo $prune_freq ?>" size="5" class="post" /> <?php echo $user->lang['Days'] ?></td> </tr> </table></td> </tr> @@ -542,7 +542,7 @@ switch ($mode) break; case 'delete': - page_header($lang['Forum_delete']); + page_header($user->lang['Forum_delete']); extract(get_forum_info($_GET['f'])); $subforums_id = array(); @@ -556,17 +556,17 @@ switch ($mode) $move_posts_list = make_forums_list('forums', $parent_id, $subforums_id); ?> -<h1><?php echo $lang['Forum_delete'] ?></h1> +<h1><?php echo $user->lang['Forum_delete'] ?></h1> -<p><?php echo $lang['Forum_delete_explain'] ?></p> +<p><?php echo $user->lang['Forum_delete_explain'] ?></p> <form action="admin_forums.<?php echo $phpEx . $SID ?>&mode=remove&f=<?php echo $forum_id ?>" method="post"> <table cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> - <th colspan="2" class="thHead"><?php echo $lang['Forum_delete'] ?></th> + <th colspan="2" class="thHead"><?php echo $user->lang['Forum_delete'] ?></th> </tr> <tr> - <td class="row1"><?php echo ($forum_status == ITEM_CATEGORY) ? $lang['Category_name'] : $lang['Forum_name'] ?></td> + <td class="row1"><?php echo ($forum_status == ITEM_CATEGORY) ? $user->lang['Category_name'] : $user->lang['Forum_name'] ?></td> <td class="row1"><span class="row1"><?php echo $forum_name ?></span></td> </tr> <?php @@ -574,12 +574,12 @@ switch ($mode) { ?> <tr> - <td class="row1"><?php echo $lang['Action'] ?></td> - <td class="row1"><input type="radio" name="action_posts" value="delete" checked="checked" /> <?php echo $lang['Delete_all_posts'] ?></td> + <td class="row1"><?php echo $user->lang['Action'] ?></td> + <td class="row1"><input type="radio" name="action_posts" value="delete" checked="checked" /> <?php echo $user->lang['Delete_all_posts'] ?></td> </tr> <tr> <td class="row1"></td> - <td class="row1"><input type="radio" name="action_posts" value="move" /> <?php echo $lang['Move_posts_to'] ?> <select name="posts_to_id" ?><option value="0"></option><?php echo $move_posts_list ?></select></td> + <td class="row1"><input type="radio" name="action_posts" value="move" /> <?php echo $user->lang['Move_posts_to'] ?> <select name="posts_to_id" ?><option value="0"></option><?php echo $move_posts_list ?></select></td> </tr> <?php } @@ -587,18 +587,18 @@ switch ($mode) { ?> <tr> - <td class="row1"><?php echo $lang['Action'] ?></td> - <td class="row1"><input type="radio" name="action_subforums" value="delete" checked="checked" /> <?php echo $lang['Delete_subforums'] ?></td> + <td class="row1"><?php echo $user->lang['Action'] ?></td> + <td class="row1"><input type="radio" name="action_subforums" value="delete" checked="checked" /> <?php echo $user->lang['Delete_subforums'] ?></td> </tr> <tr> <td class="row1"></td> - <td class="row1"><input type="radio" name="action_subforums" value="move" /> <?php echo $lang['Move_subforums_to'] ?> <select name="subforums_to_id" ?><option value="0"></option><?php echo $forums_list ?></select></td> + <td class="row1"><input type="radio" name="action_subforums" value="move" /> <?php echo $user->lang['Move_subforums_to'] ?> <select name="subforums_to_id" ?><option value="0"></option><?php echo $forums_list ?></select></td> </tr> <?php } ?> <tr> - <td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="<?php echo $lang['Move_and_Delete'] ?>" class="mainoption" /></td> + <td class="cat" colspan="2" align="center"><input type="submit" name="submit" value="<?php echo $user->lang['Move_and_Delete'] ?>" class="mainoption" /></td> </tr> </table> </form> @@ -615,7 +615,7 @@ if (empty($show_index)) page_footer(); } -page_header($lang['Manage']); +page_header($user->lang['Manage']); $parent_id = (!empty($_GET['parent_id'])) ? $_GET['parent_id'] : 0; @@ -648,7 +648,7 @@ else <?php echo $navigation ?><br /> <form method="post" action="<?php echo "admin_forums.$phpEx$SID&mode=add" ?>"><table width="100%" cellpadding="4" cellspacing="1" border="0" class="forumline" align="center"> <tr> - <th class="thHead" colspan="9"><?php echo $lang['Forum_admin'] ?></th> + <th class="thHead" colspan="9"><?php echo $user->lang['Forum_admin'] ?></th> </tr> <?php @@ -690,9 +690,9 @@ while ($row = $db->sql_fetchrow($result)) ?> <tr> <td class="cat" colspan="5"><span class="cattitle"><b><?php echo $forum_title ?></b></span></td> - <td class="cat" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=edit"><?php echo $lang['Edit'] ?></a></span></td> - <td class="cat" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=delete"><?php echo $lang['Delete'] ?></a></span></td> - <td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=move_up&parent_id=<?php echo $parent_id ?>"><?php echo $lang['Move_up'] ?></a> <a href="admin_forums.<?php echo $url ?>&mode=move_down&parent_id=<?php echo $parent_id ?>"><?php echo $lang['Move_down'] ?></a></span></td> + <td class="cat" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=edit"><?php echo $user->lang['Edit'] ?></a></span></td> + <td class="cat" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=delete"><?php echo $user->lang['Delete'] ?></a></span></td> + <td class="cat" align="center" valign="middle" nowrap="nowrap"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=move_up&parent_id=<?php echo $parent_id ?>"><?php echo $user->lang['Move_up'] ?></a> <a href="admin_forums.<?php echo $url ?>&mode=move_down&parent_id=<?php echo $parent_id ?>"><?php echo $user->lang['Move_down'] ?></a></span></td> <td class="cat" align="center" valign="middle"><span class="gen"> </span></td> </tr> @@ -732,17 +732,17 @@ while ($row = $db->sql_fetchrow($result)) <td width="1" class="row3"></td> <td width="40%" class="row2"<?php echo $colspan ?>><span class="gen"><?php echo $forum_title ?></span><br /><span class="gensmall"><?php echo $forum_desc ?></span></td> <?php echo $forum_stats ?> - <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=edit"><?php echo $lang['Edit'] ?></a></span></td> - <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=delete"><?php echo $lang['Delete'] ?></a></span></td> - <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=move_up&parent_id=<?php echo $parent_id ?>"><?php echo $lang['Move_up'] ?></a> <br /> <a href="admin_forums.<?php echo $url ?>&mode=move_down&parent_id=<?php echo $parent_id ?>"><?php echo $lang['Move_down'] ?></a></span></td> - <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=resync&parent_id=<?php echo $parent_id ?>"><?php echo ($sub_row['forum_status'] != ITEM_CATEGORY) ? $lang['Resync'] : ' ' ?></a></span></td> + <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=edit"><?php echo $user->lang['Edit'] ?></a></span></td> + <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=delete"><?php echo $user->lang['Delete'] ?></a></span></td> + <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=move_up&parent_id=<?php echo $parent_id ?>"><?php echo $user->lang['Move_up'] ?></a> <br /> <a href="admin_forums.<?php echo $url ?>&mode=move_down&parent_id=<?php echo $parent_id ?>"><?php echo $user->lang['Move_down'] ?></a></span></td> + <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=resync&parent_id=<?php echo $parent_id ?>"><?php echo ($sub_row['forum_status'] != ITEM_CATEGORY) ? $user->lang['Resync'] : ' ' ?></a></span></td> </tr> <?php } ?> <tr> <td width="1" class="row3"></td> - <td width="100%" colspan="8" class="row2"><input type="text" name="forum_name[<? echo $row['forum_id'] ?>]" /> <input type="submit" class="liteoption" name="parent_id[<? echo $row['forum_id'] ?>]" value="<?php echo $lang['Create_forum'] ?>" /></td> + <td width="100%" colspan="8" class="row2"><input type="text" name="forum_name[<? echo $row['forum_id'] ?>]" /> <input type="submit" class="liteoption" name="parent_id[<? echo $row['forum_id'] ?>]" value="<?php echo $user->lang['Create_forum'] ?>" /></td> </tr> <?php } @@ -752,10 +752,10 @@ while ($row = $db->sql_fetchrow($result)) <tr> <td width="40%" class="row2"<?php echo $colspan ?>><span class="gen"><?php echo $forum_title ?></span><br /><span class="gensmall"><?php echo $forum_desc ?></span></td> <?php echo $forum_stats ?> - <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=edit"><?php echo $lang['Edit'] ?></a></span></td> - <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=delete"><?php echo $lang['Delete'] ?></a></span></td> - <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=move_up&parent_id=<?php echo $parent_id ?>"><?php echo $lang['Move_up'] ?></a> <br /> <a href="admin_forums.<?php echo $url ?>&mode=move_down&parent_id=<?php echo $parent_id ?>"><?php echo $lang['Move_down'] ?></a></span></td> - <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=resync&parent_id=<?php echo $parent_id ?>"><?php echo $lang['Resync'] ?></a></span></td> + <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=edit"><?php echo $user->lang['Edit'] ?></a></span></td> + <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=delete"><?php echo $user->lang['Delete'] ?></a></span></td> + <td class="row2" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=move_up&parent_id=<?php echo $parent_id ?>"><?php echo $user->lang['Move_up'] ?></a> <br /> <a href="admin_forums.<?php echo $url ?>&mode=move_down&parent_id=<?php echo $parent_id ?>"><?php echo $user->lang['Move_down'] ?></a></span></td> + <td class="row1" align="center" valign="middle"><span class="gen"><a href="admin_forums.<?php echo $url ?>&mode=resync&parent_id=<?php echo $parent_id ?>"><?php echo $user->lang['Resync'] ?></a></span></td> </tr> <?php } @@ -763,7 +763,7 @@ while ($row = $db->sql_fetchrow($result)) ?> <tr> - <td width="100%" colspan="9" class="cat"><input type="text" name="forum_name[<? echo $parent_id ?>]" /> <input type="submit" class="liteoption" name="parent_id[<? echo $parent_id ?>]" value="<?php echo $lang['Create_forum'] ?>" /></td> + <td width="100%" colspan="9" class="cat"><input type="text" name="forum_name[<? echo $parent_id ?>]" /> <input type="submit" class="liteoption" name="parent_id[<? echo $parent_id ?>]" value="<?php echo $user->lang['Create_forum'] ?>" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_groups.php b/phpBB/admin/admin_groups.php index 048673d344..893672498b 100644 --- a/phpBB/admin/admin_groups.php +++ b/phpBB/admin/admin_groups.php @@ -47,7 +47,7 @@ require('pagestart.' . $phpEx); // if ( !$auth->acl_get('a_group') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } if( isset($_POST[POST_GROUPS_URL]) || isset($_GET[POST_GROUPS_URL]) ) @@ -96,7 +96,7 @@ if( isset($_POST['edit']) || isset($_POST['new']) ) if( !$db->sql_numrows($result) ) { - message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); + message_die(GENERAL_MESSAGE, $user->lang['Group_not_exist']); } $group_info = $db->sql_fetchrow($result); @@ -151,23 +151,23 @@ if( isset($_POST['edit']) || isset($_POST['new']) ) "GROUP_DESCRIPTION" => $group_info['group_description'], "GROUP_MODERATOR" => $group_moderator, - "L_GROUP_TITLE" => $lang['Group_administration'], - "L_GROUP_EDIT_DELETE" => ( isset($_POST['new']) ) ? $lang['New_group'] : $lang['Edit_group'], - "L_GROUP_NAME" => $lang['group_name'], - "L_GROUP_DESCRIPTION" => $lang['group_description'], - "L_GROUP_MODERATOR" => $lang['group_moderator'], - "L_FIND_USERNAME" => $lang['Find_username'], - "L_GROUP_STATUS" => $lang['group_status'], - "L_GROUP_OPEN" => $lang['group_open'], - "L_GROUP_CLOSED" => $lang['group_closed'], - "L_GROUP_HIDDEN" => $lang['group_hidden'], - "L_GROUP_DELETE" => $lang['group_delete'], - "L_GROUP_DELETE_CHECK" => $lang['group_delete_check'], - "L_SUBMIT" => $lang['Submit'], - "L_RESET" => $lang['Reset'], - "L_DELETE_MODERATOR" => $lang['delete_group_moderator'], - "L_DELETE_MODERATOR_EXPLAIN" => $lang['delete_moderator_explain'], - "L_YES" => $lang['Yes'], + "L_GROUP_TITLE" => $user->lang['Group_administration'], + "L_GROUP_EDIT_DELETE" => ( isset($_POST['new']) ) ? $user->lang['New_group'] : $user->lang['Edit_group'], + "L_GROUP_NAME" => $user->lang['group_name'], + "L_GROUP_DESCRIPTION" => $user->lang['group_description'], + "L_GROUP_MODERATOR" => $user->lang['group_moderator'], + "L_FIND_USERNAME" => $user->lang['Find_username'], + "L_GROUP_STATUS" => $user->lang['group_status'], + "L_GROUP_OPEN" => $user->lang['group_open'], + "L_GROUP_CLOSED" => $user->lang['group_closed'], + "L_GROUP_HIDDEN" => $user->lang['group_hidden'], + "L_GROUP_DELETE" => $user->lang['group_delete'], + "L_GROUP_DELETE_CHECK" => $user->lang['group_delete_check'], + "L_SUBMIT" => $user->lang['Submit'], + "L_RESET" => $user->lang['Reset'], + "L_DELETE_MODERATOR" => $user->lang['delete_group_moderator'], + "L_DELETE_MODERATOR_EXPLAIN" => $user->lang['delete_moderator_explain'], + "L_YES" => $user->lang['Yes'], "U_SEARCH_USER" => append_sid("../search.$phpEx?mode=searchuser"), @@ -212,7 +212,7 @@ else if( isset($_POST['group_update']) ) message_die(GENERAL_ERROR, "Couldn't update auth_access", "", __LINE__, __FILE__, $sql); } - $message = $lang['Deleted_group'] . "<br /><br />" . sprintf($lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");; + $message = $user->lang['Deleted_group'] . "<br /><br />" . sprintf($user->lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($user->lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");; message_die(GENERAL_MESSAGE, $message); } @@ -226,11 +226,11 @@ else if( isset($_POST['group_update']) ) if( $group_name == "" ) { - message_die(GENERAL_MESSAGE, $lang['No_group_name']); + message_die(GENERAL_MESSAGE, $user->lang['No_group_name']); } else if( $group_moderator == "" ) { - message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); + message_die(GENERAL_MESSAGE, $user->lang['No_group_moderator']); } $this_userdata = get_userdata($group_moderator); @@ -238,7 +238,7 @@ else if( isset($_POST['group_update']) ) if( !$group_moderator ) { - message_die(GENERAL_MESSAGE, $lang['No_group_moderator']); + message_die(GENERAL_MESSAGE, $user->lang['No_group_moderator']); } if( $mode == "editgroup" ) @@ -253,7 +253,7 @@ else if( isset($_POST['group_update']) ) } if( !$db->sql_numrows($result) ) { - message_die(GENERAL_MESSAGE, $lang['Group_not_exist']); + message_die(GENERAL_MESSAGE, $user->lang['Group_not_exist']); } $group_info = $db->sql_fetchrow($result); @@ -284,7 +284,7 @@ else if( isset($_POST['group_update']) ) message_die(GENERAL_ERROR, "Couldn't update group", "", __LINE__, __FILE__, $sql); } - $message = $lang['Updated_group'] . "<br /><br />" . sprintf($lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");; + $message = $user->lang['Updated_group'] . "<br /><br />" . sprintf($user->lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($user->lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");; message_die(GENERAL_MESSAGE, $message); } @@ -314,29 +314,29 @@ else if( isset($_POST['group_update']) ) message_die(GENERAL_ERROR, "Couldn't insert new user-group info", "", __LINE__, __FILE__, $sql); } - $message = $lang['Added_new_group'] . "<br /><br />" . sprintf($lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");; + $message = $user->lang['Added_new_group'] . "<br /><br />" . sprintf($user->lang['Click_return_groupsadmin'], "<a href=\"" . append_sid("admin_groups.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($user->lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>");; message_die(GENERAL_MESSAGE, $message); } else { - message_die(GENERAL_MESSAGE, $lang['Group_mode_not_selected']); + message_die(GENERAL_MESSAGE, $user->lang['Group_mode_not_selected']); } } } -page_header($lang['Manage']); +page_header($user->lang['Manage']); ?> -<h1><?php echo $lang['Manage']; ?></h1> +<h1><?php echo $user->lang['Manage']; ?></h1> -<p><?php echo $lang['Group_manage_explain']; ?></p> +<p><?php echo $user->lang['Group_manage_explain']; ?></p> <form method="post" action="<?php echo "admin_groups.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="3"><?php echo $lang['Manage']; ?></th> + <th colspan="3"><?php echo $user->lang['Manage']; ?></th> </tr> <?php @@ -375,13 +375,13 @@ page_header($lang['Manage']); foreach ( $groups as $group_ary ) { $group_id = $group_ary['group_id']; - $group_name = ( !empty($lang[$group_ary['group_name']]) ) ? $lang[$group_ary['group_name']] : $group_ary['group_name']; + $group_name = ( !empty($user->lang[$group_ary['group_name']]) ) ? $user->lang[$group_ary['group_name']] : $group_ary['group_name']; ?> <tr> <td class="cat"><span class="cattitle"><?php echo $group_name;?></span></td> - <td class="cat" align="center"> <input class="liteoption" type="submit" name="edit[<?php echo $group_id; ?>]" value="<?php echo $lang['Edit'];?>" /> </td> - <td class="cat" align="center"> <input class="liteoption" type="submit" name="delete[<?php echo $group_id; ?>]" value="<?php echo $lang['Delete'];?>" /> </td> + <td class="cat" align="center"> <input class="liteoption" type="submit" name="edit[<?php echo $group_id; ?>]" value="<?php echo $user->lang['Edit'];?>" /> </td> + <td class="cat" align="center"> <input class="liteoption" type="submit" name="delete[<?php echo $group_id; ?>]" value="<?php echo $user->lang['Delete'];?>" /> </td> </tr> <?php @@ -394,8 +394,8 @@ page_header($lang['Manage']); ?> <tr> <td class="<?php echo $row_class; ?>"><?php echo $pending_ary['username'];?></td> - <td class="<?php echo $row_class; ?>" align="center"><input class="liteoption" type="submit" name="approve[<?php echo $pending_ary['user_id']; ?>]" value="<?php echo $lang['Approve_selected'];?>" /></td> - <td class="<?php echo $row_class; ?>" align="center"><input class="liteoption" type="submit" name="decline[<?php echo $pending_ary['user_id']; ?>]" value="<?php echo $lang['Deny_selected'];?>" /></td> + <td class="<?php echo $row_class; ?>" align="center"><input class="liteoption" type="submit" name="approve[<?php echo $pending_ary['user_id']; ?>]" value="<?php echo $user->lang['Approve_selected'];?>" /></td> + <td class="<?php echo $row_class; ?>" align="center"><input class="liteoption" type="submit" name="decline[<?php echo $pending_ary['user_id']; ?>]" value="<?php echo $user->lang['Deny_selected'];?>" /></td> </tr> <?php } diff --git a/phpBB/admin/admin_permissions.php b/phpBB/admin/admin_permissions.php index 82b46bd108..d1bbf440e9 100644 --- a/phpBB/admin/admin_permissions.php +++ b/phpBB/admin/admin_permissions.php @@ -36,9 +36,8 @@ if ( !empty($setmodules) ) } define('IN_PHPBB', 1); -// + // Include files -// $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); @@ -47,7 +46,7 @@ require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Do we have forum admin permissions? if ( !$auth->acl_get('a_auth') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // Define some vars @@ -71,77 +70,55 @@ else $mode = ''; } -// // Start program proper -// switch ( $mode ) { case 'forums': - $l_title = $lang['Permissions']; - $l_title_explain = $lang['Permissions_explain']; + $l_title = $user->lang['Permissions']; + $l_title_explain = $user->lang['Permissions_explain']; $l_can = '_can'; break; case 'moderators': - $l_title = $lang['Moderators']; - $l_title_explain = $lang['Moderators_explain']; + $l_title = $user->lang['Moderators']; + $l_title_explain = $user->lang['Moderators_explain']; $l_can = '_can'; break; case 'supermoderators': - $l_title = $lang['Super_Moderators']; - $l_title_explain = $lang['Super_Moderators_explain']; + $l_title = $user->lang['Super_Moderators']; + $l_title_explain = $user->lang['Super_Moderators_explain']; $l_can = '_can'; break; case 'administrators': - $l_title = $lang['Administrators']; - $l_title_explain = $lang['Administrators_explain']; + $l_title = $user->lang['Administrators']; + $l_title_explain = $user->lang['Administrators_explain']; $l_can = '_can_admin'; break; } -// -// Brief explanation of how things work when updating ... -// -// Granting someone any admin permissions grants them permissions -// to all other options, e.g. Moderator and Forums across the board. -// This is done via the acl class -// +// Call update or delete, both can take multiple user/group +// ids. Additionally inheritance is handled (by the auth API) if ( isset($_POST['update']) ) { $auth_admin = new auth_admin(); - switch ( $_POST['type'] ) + // Admin wants subforums to inherit permissions ... so handle this + if ( !empty($_POST['inherit']) ) { - case 'user': - $set = 'acl_set_user'; - break; - - case 'group': - $set = 'acl_set_group'; - break; + array_push($_POST['inherit'], $forum_id); + $forum_id = $_POST['inherit']; } foreach ( $_POST['entries'] as $id ) { - $auth_admin->$set($forum_id, $id, $_POST['option']); + $auth_admin->acl_set($_POST['type'], $forum_id, $id, $_POST['option']); } - message_die(MESSAGE, 'Permissions updated successfully'); + trigger_error('Permissions updated successfully'); } else if ( isset($_POST['delete']) ) { $auth_admin = new auth_admin(); - switch ( $_POST['type'] ) - { - case 'user': - $set = 'acl_delete_user'; - break; - - case 'group': - $set = 'acl_delete_group'; - break; - } - $option_ids = false; if ( !empty($_POST['option']) ) { @@ -164,23 +141,21 @@ else if ( isset($_POST['delete']) ) foreach ( $_POST['entries'] as $id ) { - $auth_admin->$set($forum_id, $id, $option_ids); + $auth_admin->acl_delete($_POST['type'], $forum_id, $id, $option_ids); } - message_die(MESSAGE, 'Permissions updated successfully'); + trigger_error('Permissions updated successfully'); } -// // Get required information, either all forums if // no id was specified or just the requsted if it // was -// if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators' ) { - // +// // Clear some vars, grab some info if relevant ... - // $s_hidden_fields = ''; + if ( !empty($forum_id) ) { $sql = "SELECT forum_name @@ -194,17 +169,13 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators $l_title .= ' : <i>' . $forum_info['forum_name'] . '</i>'; } - // // Generate header - // page_header($l_title); ?> <h1><?php echo $l_title; ?></h1> -<p><?php echo $l_title_explain; ?></p> - <?php switch ( $mode ) @@ -238,7 +209,7 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators $group_list = ''; while ( $row = $db->sql_fetchrow($result) ) { - $group_list .= '<option value="' . $row['group_id'] . '">' . ( ( !empty($lang[$row['group_name']]) ) ? $lang[$row['group_name']] : $row['group_name'] ) . '</option>'; + $group_list .= '<option value="' . $row['group_id'] . '">' . ( ( !empty($user->lang[$row['group_name']]) ) ? $user->lang[$row['group_name']] : $row['group_name'] ) . '</option>'; } $db->sql_freeresult($result); @@ -247,10 +218,12 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators ?> +<p><?php echo $l_title_explain; ?></p> + <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> - <td align="center"><h1><?php echo $lang['Users']; ?></h1></td> - <td align="center"><h1><?php echo $lang['Groups']; ?></h1></td> + <td align="center"><h1><?php echo $user->lang['Users']; ?></h1></td> + <td align="center"><h1><?php echo $user->lang['Groups']; ?></h1></td> </tr> <tr> @@ -275,13 +248,13 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators ?> <tr> - <th><?php echo $lang['Manage_users']; ?></th> + <th><?php echo $user->lang['Manage_users']; ?></th> </tr> <tr> <td class="row1" align="center"><select style="width:280px" name="entries[]" multiple="multiple" size="5"><?php echo $users; ?></select></td> </tr> <tr> - <td class="cat" align="center"><input class="liteoption" type="submit" name="delete" value="<?php echo $lang['Remove_selected']; ?>" /> <input class="liteoption" type="submit" name="advanced" value="<?php echo $lang['Advanced']; ?>" /><input type="hidden" name="type" value="user" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /><input type="hidden" name="option" value="<?php echo $type_sql; ?>" /></td> + <td class="cat" align="center"><input class="liteoption" type="submit" name="delete" value="<?php echo $user->lang['Remove_selected']; ?>" /> <input class="liteoption" type="submit" name="advanced" value="<?php echo $user->lang['Advanced']; ?>" /><input type="hidden" name="type" value="user" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /><input type="hidden" name="option" value="<?php echo $type_sql; ?>" /></td> </tr> </table></form></td> @@ -300,19 +273,19 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators $groups = ''; while ( $row = $db->sql_fetchrow($result) ) { - $groups .= '<option value="' . $row['group_id'] . '">' . ( ( !empty($lang[$row['group_name']]) ) ? $lang[$row['group_name']] : $row['group_name'] ) . '</option>'; + $groups .= '<option value="' . $row['group_id'] . '">' . ( ( !empty($user->lang[$row['group_name']]) ) ? $user->lang[$row['group_name']] : $row['group_name'] ) . '</option>'; } $db->sql_freeresult($result); ?> <tr> - <th><?php echo $lang['Manage_groups']; ?></th> + <th><?php echo $user->lang['Manage_groups']; ?></th> </tr> <tr> <td class="row1" align="center"><select style="width:280px" name="entries[]" multiple="multiple" size="5"><?php echo $groups; ?></select></td> </tr> <tr> - <td class="cat" align="center"><input class="liteoption" type="submit" name="delete" value="<?php echo $lang['Remove_selected']; ?>" /> <input class="liteoption" type="submit" name="advanced" value="<?php echo $lang['Advanced']; ?>" /><input type="hidden" name="type" value="group" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /><input type="hidden" name="option" value="<?php echo $type_sql; ?>" /></td> + <td class="cat" align="center"><input class="liteoption" type="submit" name="delete" value="<?php echo $user->lang['Remove_selected']; ?>" /> <input class="liteoption" type="submit" name="advanced" value="<?php echo $user->lang['Advanced']; ?>" /><input type="hidden" name="type" value="group" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /><input type="hidden" name="option" value="<?php echo $type_sql; ?>" /></td> </tr> </table></form></td> @@ -321,25 +294,25 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators <td><form method="post" action="<?php echo "admin_permissions.$phpEx$SID&mode=$mode"; ?>"><table class="bg" width="90%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th><?php echo $lang['Add_users']; ?></th> + <th><?php echo $user->lang['Add_users']; ?></th> </tr> <tr> <td class="row1" align="center"><textarea cols="40" rows="4" name="entries"></textarea></td> </tr> <tr> - <td class="cat" align="center"> <input type="submit" name="add" value="<?php echo $lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $lang['Reset']; ?>" class="liteoption" /> <input type="submit" name="usersubmit" value="<?php echo $lang['Find_username']; ?>" class="liteoption" onClick="window.open('<?php echo "../search.$phpEx$SID"; ?>&mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" /><input type="hidden" name="type" value="user" /><input type="hidden" name="advanced" value="1" /><input type="hidden" name="new" value="1" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /></td> + <td class="cat" align="center"> <input type="submit" name="add" value="<?php echo $user->lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $user->lang['Reset']; ?>" class="liteoption" /> <input type="submit" name="usersubmit" value="<?php echo $user->lang['Find_username']; ?>" class="liteoption" onclick="window.open('<?php echo "../search.$phpEx$SID"; ?>&mode=searchuser&form=2&field=entries', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" /><input type="hidden" name="type" value="user" /><input type="hidden" name="advanced" value="1" /><input type="hidden" name="new" value="1" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /></td> </tr> </table></form></td> <td><form method="post" action="<?php echo "admin_permissions.$phpEx$SID&mode=$mode"; ?>"><table width="90%" class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th><?php echo $lang['Add_groups']; ?></th> + <th><?php echo $user->lang['Add_groups']; ?></th> </tr> <tr> <td class="row1" align="center"><select name="entries[]" multiple="multiple" size="4"><?php echo $group_list; ?></select></td> </tr> <tr> - <td class="cat" align="center"> <input type="submit" name="add" value="<?php echo $lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $lang['Reset']; ?>" class="liteoption" /><input type="hidden" name="type" value="group" /><input type="hidden" name="advanced" value="1" /><input type="hidden" name="new" value="1" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /></td> + <td class="cat" align="center"> <input type="submit" name="add" value="<?php echo $user->lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $user->lang['Reset']; ?>" class="liteoption" /><input type="hidden" name="type" value="group" /><input type="hidden" name="advanced" value="1" /><input type="hidden" name="new" value="1" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /></td> </tr> </table></form></td> @@ -403,7 +376,7 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators $auth = array(); while ( $row = $db->sql_fetchrow($result) ) { - $ug_test = ( !empty($lang[$row['name']]) ) ? $lang[$row['name']] : $row['name']; + $ug_test = ( !empty($user->lang[$row['name']]) ) ? $user->lang[$row['name']] : $row['name']; $ug .= ( !strstr($ug, $ug_test) ) ? $ug_test . "\n" : ''; $ug_test = '<input type="hidden" name="entries[]" value="' . $row['id'] . '" />'; @@ -415,17 +388,80 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators ?> -<p><?php echo $lang['Permissions_extra_explain']; ?></p> +<script language="Javascript" type="text/javascript"> +<!-- -<p><?php echo $lang['Permissions_extra2_explain']; ?></p> + // NEEDS COMPLETING ... OR SCRAPPING :D + quick_options = new Array(); + quick_options['basic'] = new Array(); + quick_options['basic']['allow'] = '34, 36,'; + quick_options['basic']['deny'] = '35,'; + quick_options['basic']['inherit'] = ''; + quick_options['advanced'] = new Array(); -<form method="post" action="<?php echo "admin_permissions.$phpEx$SID&mode=$mode"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> + function marklist(match, status) + { + for (i = 0; i < document.acl.length; i++) + { + if (document.acl.elements[i].name.indexOf(match) == 0) + document.acl.elements[i].checked = status; + } + } + + function quick_set(option) + { + if (option) + { + var expr = new RegExp(/\d+/); + for (i = 0; i < document.acl.length; i++) + { + var elem = document.acl.elements[i]; + if (elem.name.indexOf('option') == 0) + { + switch (option) + { + case 'all_allow': + if (elem.value == <?php echo ACL_ALLOW; ?>) + elem.checked = true; + break; + case 'all_deny': + if (elem.value == <?php echo ACL_DENY; ?>) + elem.checked = true; + break; + case 'all_inherit': + if (elem.value == <?php echo ACL_INHERIT; ?>) + elem.checked = true; + break; + default: + option_id = elem.name.match(expr)[0]; + if (quick_options[option]['allow'].indexOf(option_id + ',') != -1 && elem.value == <?php echo ACL_ALLOW; ?>) + elem.checked = true; + else if (quick_options[option]['deny'].indexOf(option_id + ',') != -1 && elem.value == <?php echo ACL_DENY; ?>) + elem.checked = true; + else if (quick_options[option]['inherit'].indexOf(option_id + ',') != -1 && elem.value == <?php echo ACL_INHERIT; ?>) + elem.checked = true; + break; + } + } + } + } + } +//--> +</script> + +<p><?php echo $user->lang['ACL_explain']; ?></p> + +<form method="post" name="acl" action="<?php echo "admin_permissions.$phpEx$SID&mode=$mode"; ?>"><table cellspacing="1" cellpadding="0" border="0" align="center"> <tr> - <th> <?php echo $lang[$l_type . $l_can]; ?> </th> - <th> <?php echo $lang['Permit']; ?> </th> - <th> <?php echo $lang['Allow']; ?> </th> - <th> <?php echo $lang['Deny']; ?> </th> - <th> <?php echo $lang['Prevent']; ?> </th> + <td align="right">Quick settings: <select name="set" onchange="quick_set(this.options[this.selectedIndex].value);"><option><?php echo '-- ' . $user->lang['Select'] . ' --'; ?></option><option value="all_allow"><?php echo $user->lang['All_Allow']; ?></option><option value="all_deny"><?php echo $user->lang['All_Deny']; ?></option><option value="all_inherit"><?php echo $user->lang['All_Inherit']; ?></option><option value="basic"><?php echo $user->lang['Basic']; ?></option><option value="advanced"><?php echo $user->lang['Advanced']; ?></option></select></td> + </tr> + <tr> + <td><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> + <tr> + <th> <?php echo $user->lang['Option']; ?> </th> + <th> <?php echo $user->lang['Allow']; ?> </th> + <th> <?php echo $user->lang['Deny']; ?> </th> + <th> <?php echo $user->lang['Inherit']; ?> </th> </tr> <?php @@ -433,34 +469,72 @@ if ( !empty($forum_id) || $mode == 'administrators' || $mode == 'supermoderators { $row_class = ( $row_class == 'row1' ) ? 'row2' : 'row1'; - $l_can_cell = ( !empty($lang['acl_' . $auth_options[$i]['auth_value']]) ) ? $lang['acl_' . $auth_options[$i]['auth_value']] : $auth_options[$i]['auth_value']; + $l_can_cell = ( !empty($user->lang['acl_' . $auth_options[$i]['auth_value']]) ) ? $user->lang['acl_' . $auth_options[$i]['auth_value']] : ucfirst(preg_replace('#.*?_#', '', $auth_options[$i]['auth_value'])); - $permit_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_PERMIT ) ? ' checked="checked"' : ''; $allow_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_ALLOW ) ? ' checked="checked"' : ''; $deny_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_DENY ) ? ' checked="checked"' : ''; - $prevent_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_PREVENT ) ? ' checked="checked"' : ''; + $inherit_type = ( $auth[$auth_options[$i]['auth_value']] == ACL_INHERIT ) ? ' checked="checked"' : ''; ?> <tr> <td class="<?php echo $row_class; ?>"><?php echo $l_can_cell; ?></td> - <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_PERMIT; ?>"<?php echo $permit_type; ?> /></td> <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_ALLOW; ?>"<?php echo $allow_type; ?> /></td> <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_DENY; ?>"<?php echo $deny_type; ?> /></td> - <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_PREVENT; ?>"<?php echo $prevent_type; ?> /></td> + <td class="<?php echo $row_class; ?>" align="center"><input type="radio" name="option[<?php echo $auth_options[$i]['auth_option_id']; ?>]" value="<?php echo ACL_INHERIT; ?>"<?php echo $inherit_type; ?> /></td> </tr> <?php } + if ( $type_sql == 'f' || $type_sql == 'm' ) + { + $children = get_forum_branch($forum_id, 'children', 'descending', false); + + if ( !empty($children) ) + { ?> <tr> - <th colspan="5"><?php echo $lang['Applies_to_' . $l_type]; ?></th> + <th colspan="4"><?php echo $user->lang['Inheritance']; ?></th> </tr> <tr> - <td class="row1" colspan="5" align="center"><textarea cols="40" rows="3"><?php echo trim($ug); ?></textarea></td> + <td class="row1" colspan="4"><table width="100%" cellspacing="1" cellpadding="0" border="0"> + <tr> + <td colspan="4" height="16"><span class="gensmall"><?php echo $user->lang['Inheritance_explain']; ?></span></td> + </tr> +<?php + foreach ( $children as $row ) + { + +?> + <tr> + <td><input type="checkbox" name="inherit[]" value="<?php echo $row['forum_id']; ?>" /> <?php echo $row['forum_name']; ?></td> + </tr> +<?php + + } + +?> + <tr> + <td height="16" align="center"><a class="gensmall" href="javascript:marklist('inherit', true);"><?php echo $user->lang['Mark_all']; ?></a> :: <a href="javascript:marklist('inherit', false);" class="gensmall"><?php echo $user->lang['Unmark_all']; ?></a></td> + </tr> + </table></td> + </tr> +<?php + + } + } + +?> + <tr> + <td class="cat" colspan="4" align="center"><input class="mainoption" type="submit" name="update" value="<?php echo $user->lang['Update']; ?>" /> <input class="liteoption" type="submit" name="cancel" value="<?php echo $user->lang['Cancel']; ?>" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /><input type="hidden" name="type" value="<?php echo $_POST['type']; ?>" /><?php echo $ug_hidden; ?></td> + </tr> + <!-- tr> + <th colspan="4"><?php echo $user->lang['Applies_to_' . $l_type]; ?></th> </tr> <tr> - <td class="cat" colspan="5" align="center"><input class="mainoption" type="submit" name="update" value="<?php echo $lang['Update']; ?>" /> <input class="liteoption" type="submit" name="cancel" value="<?php echo $lang['Cancel']; ?>" /><input type="hidden" name="f" value="<?php echo $forum_id; ?>" /><input type="hidden" name="type" value="<?php echo $_POST['type']; ?>" /><?php echo $ug_hidden; ?></td> + <td class="row1" colspan="4" align="center"><textarea cols="40" rows="3"><?php echo trim($ug); ?></textarea></td> + </tr --> +</table></td> </tr> </table></form> @@ -484,10 +558,10 @@ else <form method="post" action="<?php echo "admin_permissions.$phpEx$SID&mode=$mode"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th align="center"><?php echo $lang['Select_a_Forum']; ?></th> + <th align="center"><?php echo $user->lang['Select_a_Forum']; ?></th> </tr> <tr> - <td class="row1" align="center"> <select name="f"><?php echo $select_list; ?></select> <input type="submit" value="<?php echo $lang['Look_up_Forum']; ?>" class="mainoption" /> </td> + <td class="row1" align="center"> <select name="f"><?php echo $select_list; ?></select> <input type="submit" value="<?php echo $user->lang['Look_up_Forum']; ?>" class="mainoption" /> </td> </tr> </table></form> diff --git a/phpBB/admin/admin_prune.php b/phpBB/admin/admin_prune.php index 0281f1a398..fadcf1e0a5 100644 --- a/phpBB/admin/admin_prune.php +++ b/phpBB/admin/admin_prune.php @@ -44,7 +44,7 @@ require($phpbb_root_path . 'includes/functions_admin.'.$phpEx); // Do we have forum admin permissions? if ( !$auth->acl_get('a_forum') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -107,11 +107,11 @@ if ( isset($_POST['doprune']) ) } $template->assign_vars(array( - 'L_FORUM_PRUNE' => $lang['Forum_Prune'], - 'L_FORUM' => $lang['Forum'], - 'L_TOPICS_PRUNED' => $lang['Topics_pruned'], - 'L_POSTS_PRUNED' => $lang['Posts_pruned'], - 'L_PRUNE_RESULT' => $lang['Prune_success']) + 'L_FORUM_PRUNE' => $user->lang['Forum_Prune'], + 'L_FORUM' => $user->lang['Forum'], + 'L_TOPICS_PRUNED' => $user->lang['Topics_pruned'], + 'L_POSTS_PRUNED' => $user->lang['Posts_pruned'], + 'L_PRUNE_RESULT' => $user->lang['Prune_success']) ); add_admin_log('log_prune', $log_data); @@ -119,7 +119,7 @@ if ( isset($_POST['doprune']) ) } else { - page_header($lang['Prune']); + page_header($user->lang['Prune']); // // If they haven't selected a forum for pruning yet then @@ -130,7 +130,7 @@ else // // Output a selection table if no forum id has been specified. // - $select_list = '<option value="-1">' . $lang['All_Forums'] . '</option>'; + $select_list = '<option value="-1">' . $user->lang['All_Forums'] . '</option>'; $right = 0; $subforum = ''; @@ -153,16 +153,16 @@ else ?> -<h1><?php echo $lang['Prune']; ?></h1> +<h1><?php echo $user->lang['Prune']; ?></h1> -<p><?php echo $lang['Forum_Prune_explain']; ?></p> +<p><?php echo $user->lang['Forum_Prune_explain']; ?></p> <form method="post" action="<?php echo "admin_prune.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th align="center"><?php echo $lang['Select_a_Forum']; ?></th> + <th align="center"><?php echo $user->lang['Select_a_Forum']; ?></th> </tr> <tr> - <td class="row1" align="center"><?php echo $s_hidden_fields; ?> <select name="f"><?php echo $select_list; ?></select> <input type="submit" value="<?php echo $lang['Look_up_Forum']; ?>" class="mainoption" /> </td> + <td class="row1" align="center"><?php echo $s_hidden_fields; ?> <select name="f"><?php echo $select_list; ?></select> <input type="submit" value="<?php echo $user->lang['Look_up_Forum']; ?>" class="mainoption" /> </td> </tr> </table></form> @@ -171,30 +171,30 @@ else } else { - $forum_name = ( $forum_id == -1 ) ? $lang['All_Forums'] : $forum_rows[0]['forum_name']; + $forum_name = ( $forum_id == -1 ) ? $user->lang['All_Forums'] : $forum_rows[0]['forum_name']; - $prune_data = $lang['Prune_topics_not_posted'] . " "; - $prune_data .= '<input type="text" name="prunedays" size="4"> ' . $lang['Days']; + $prune_data = $user->lang['Prune_topics_not_posted'] . " "; + $prune_data .= '<input type="text" name="prunedays" size="4"> ' . $user->lang['Days']; $s_hidden_fields = '<input type="hidden" name="f" value="' . $forum_id . '">'; ?> -<h1><?php echo $lang['Prune']; ?></h1> +<h1><?php echo $user->lang['Prune']; ?></h1> -<p><?php echo $lang['Forum_Prune_explain']; ?></p> +<p><?php echo $user->lang['Forum_Prune_explain']; ?></p> -<h2><?php echo $lang['Forum'] . ': ' . $forum_name; ?></h2> +<h2><?php echo $user->lang['Forum'] . ': ' . $forum_name; ?></h2> <form method="post" action="<?php echo "admin_prune.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th class="th"><?php echo $lang['Forum_Prune']; ?></th> + <th class="th"><?php echo $user->lang['Forum_Prune']; ?></th> </tr> <tr> <td class="row1"><?php echo $prune_data; ?></td> </tr> <tr> - <td class="cat" align="center"><?php echo $s_hidden_fields; ?><input type="submit" name="doprune" value="<?php echo $lang['Do_Prune']; ?>" class="mainoption"></td> + <td class="cat" align="center"><?php echo $s_hidden_fields; ?><input type="submit" name="doprune" value="<?php echo $user->lang['Do_Prune']; ?>" class="mainoption"></td> </tr> </table></form> diff --git a/phpBB/admin/admin_prune_users.php b/phpBB/admin/admin_prune_users.php index 2dfdedfdfe..7bd0e59160 100644 --- a/phpBB/admin/admin_prune_users.php +++ b/phpBB/admin/admin_prune_users.php @@ -69,7 +69,7 @@ if ( isset($_POST['prune']) ) { $values = array('prune', 'deactivate', 'delete', 'users', 'username', 'email', 'joined_select', 'active_select', 'count_select', 'joined', 'active', 'count', 'deleteposts'); - $l_message = '<form method="post" action="admin_prune_users.' . $phpEx . $SID . '">' . $lang['Confirm_prune_users'] . '<br /><br /><input class="liteoption" type="submit" name="confirm" value="' . $lang['Yes'] . '" /> <input class="liteoption" type="submit" name="cancel" value="' . $lang['No'] . '" />'; + $l_message = '<form method="post" action="admin_prune_users.' . $phpEx . $SID . '">' . $user->lang['Confirm_prune_users'] . '<br /><br /><input class="liteoption" type="submit" name="confirm" value="' . $user->lang['Yes'] . '" /> <input class="liteoption" type="submit" name="cancel" value="' . $user->lang['No'] . '" />'; foreach ( $values as $field ) { @@ -78,17 +78,17 @@ if ( isset($_POST['prune']) ) $l_message .= '</form>'; - page_header($lang['Prune_users']); + page_header($user->lang['Prune_users']); ?> -<h1><?php echo $lang['Prune_users']; ?></h1> +<h1><?php echo $user->lang['Prune_users']; ?></h1> -<p><?php echo $lang['Prune_users_explain']; ?></p> +<p><?php echo $user->lang['Prune_users_explain']; ?></p> <?php - page_message($lang['Confirm'], $l_message, false); + page_message($user->lang['Confirm'], $l_message, false); page_footer(); } @@ -194,14 +194,14 @@ if ( isset($_POST['prune']) ) unset($usernames); } - message_die(MESSAGE, $lang['Success_user_prune']); + message_die(MESSAGE, $user->lang['Success_user_prune']); } } // // // -$find_count = array('lt' => $lang['Less_than'], 'eq' => $lang['Equal_to'], 'gt' => $lang['More_than']); +$find_count = array('lt' => $user->lang['Less_than'], 'eq' => $user->lang['Equal_to'], 'gt' => $user->lang['More_than']); $s_find_count = ''; foreach ( $find_count as $key => $value ) { @@ -209,7 +209,7 @@ foreach ( $find_count as $key => $value ) $s_find_count .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>'; } -$find_time = array('lt' => $lang['Before'], 'gt' => $lang['After']); +$find_time = array('lt' => $user->lang['Before'], 'gt' => $user->lang['After']); $s_find_join_time = ''; foreach ( $find_time as $key => $value ) { @@ -224,48 +224,48 @@ foreach ( $find_time as $key => $value ) // // // -page_header($lang['Prune_users']); +page_header($user->lang['Prune_users']); ?> -<h1><?php echo $lang['Prune_users']; ?></h1> +<h1><?php echo $user->lang['Prune_users']; ?></h1> -<p><?php echo $lang['Prune_users_explain']; ?></p> +<p><?php echo $user->lang['Prune_users_explain']; ?></p> <form method="post" name="post" action="<?php echo "admin_prune_users.$phpEx$SID"; ?>"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang['Prune_users']; ?></th> + <th colspan="2"><?php echo $user->lang['Prune_users']; ?></th> </tr> <tr> - <td class="row1"><?php echo $lang['Username']; ?>: </td> + <td class="row1"><?php echo $user->lang['Username']; ?>: </td> <td class="row2"><input class="post" type="text" name="username" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Email']; ?>: </td> + <td class="row1"><?php echo $user->lang['Email']; ?>: </td> <td class="row2"><input class="post" type="text" name="email" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Joined']; ?>: <br /><span class="gensmall"><?php echo $lang['Joined_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Joined']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Joined_explain']; ?></span></td> <td class="row2"><select name="joined_select"><?php echo $s_find_join_time; ?></select> <input class="post" type="text" name="joined" maxlength="10" size="10" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Last_active']; ?>: <br /><span class="gensmall"><?php echo $lang['Last_active_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Last_active']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Last_active_explain']; ?></span></td> <td class="row2"><select name="active_select"><?php echo $s_find_active_time; ?></select> <input class="post" type="text" name="active" maxlength="10" size="10" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Posts']; ?>: </td> + <td class="row1"><?php echo $user->lang['Posts']; ?>: </td> <td class="row2"><select name="count_select"><?php echo $s_find_count; ?></select> <input class="post" type="text" name="count" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Prune_users']; ?>: <br /><span class="gensmall"><?php echo $lang['Select_users_explain']; ?></span></td> + <td class="row1"><?php echo $user->lang['Prune_users']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Select_users_explain']; ?></span></td> <td class="row2"><textarea name="users" cols="40" rows="5"></textarea></td> </tr> <tr> - <td class="row1"><?php echo $lang['Delete_user_posts']; ?>: <br /><span class="gensmall"><?php echo $lang['Delete_user_posts_explain']; ?></span></td> - <td class="row2"><input type="radio" name="deleteposts" value="1" /> <?php echo $lang['Yes']; ?> <input type="radio" name="deleteposts" value="0" checked="checked" /> <?php echo $lang['No']; ?></td> + <td class="row1"><?php echo $user->lang['Delete_user_posts']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Delete_user_posts_explain']; ?></span></td> + <td class="row2"><input type="radio" name="deleteposts" value="1" /> <?php echo $user->lang['Yes']; ?> <input type="radio" name="deleteposts" value="0" checked="checked" /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><input class="liteoption" type="submit" name="delete" value="<?php echo $lang['Prune_users']; ?>" /> <input class="liteoption" type="submit" name="deactivate" value="<?php echo $lang['Deactivate']; ?>" /> <input type="submit" name="usersubmit" value="<?php echo $lang['Find_username']; ?>" class="liteoption" onClick="window.open('<?php echo "../search.$phpEx$SID&mode=searchuser&field=users"; ?>', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" /><input type="hidden" name="prune" value="1" /></td> + <td class="cat" colspan="2" align="center"><input class="liteoption" type="submit" name="delete" value="<?php echo $user->lang['Prune_users']; ?>" /> <input class="liteoption" type="submit" name="deactivate" value="<?php echo $user->lang['Deactivate']; ?>" /> <input type="submit" name="usersubmit" value="<?php echo $user->lang['Find_username']; ?>" class="liteoption" onClick="window.open('<?php echo "../search.$phpEx$SID&mode=searchuser&field=users"; ?>', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" /><input type="hidden" name="prune" value="1" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_ranks.php b/phpBB/admin/admin_ranks.php index eadce13d11..ff3424f9f2 100644 --- a/phpBB/admin/admin_ranks.php +++ b/phpBB/admin/admin_ranks.php @@ -92,7 +92,7 @@ if ( $mode != '' ) { if ( empty($rank_id) ) { - message_die(MESSAGE, $lang['Must_select_rank']); + message_die(MESSAGE, $user->lang['Must_select_rank']); } $sql = "SELECT * FROM " . RANKS_TABLE . " @@ -108,36 +108,36 @@ if ( $mode != '' ) $rank_info['rank_special'] = 0; } - page_header($lang['Ranks']); + page_header($user->lang['Ranks']); ?> -<h1><?php echo $lang['Ranks']; ?></h1> +<h1><?php echo $user->lang['Ranks']; ?></h1> -<p><?php echo $lang['Ranks_explain']; ?></p> +<p><?php echo $user->lang['Ranks_explain']; ?></p> <form method="post" action="<?php echo "admin_ranks.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang['Ranks']; ?></th> + <th colspan="2"><?php echo $user->lang['Ranks']; ?></th> </tr> <tr> - <td class="row1" width="40%"><?php echo $lang['Rank_title']; ?>: </td> + <td class="row1" width="40%"><?php echo $user->lang['Rank_title']; ?>: </td> <td class="row2"><input type="text" name="title" size="35" maxlength="40" value="<?php echo $rank_info['rank_title']; ?>" /></td> </tr> <tr> - <td class="row1" width="40%"><?php echo $lang['Rank_special']; ?>: </td> - <td class="row2"><input type="radio" name="special_rank" value="1"<?php echo ( $rank_info['rank_special'] ) ? ' checked="checked"' : ''; ?> /><?php echo $lang['Yes']; ?> <input type="radio" name="special_rank" value="0"<?php echo ( !$rank_info['rank_special'] ) ? ' checked="checked"' : ''; ?> /> <?php echo $lang['No']; ?></td> + <td class="row1" width="40%"><?php echo $user->lang['Rank_special']; ?>: </td> + <td class="row2"><input type="radio" name="special_rank" value="1"<?php echo ( $rank_info['rank_special'] ) ? ' checked="checked"' : ''; ?> /><?php echo $user->lang['Yes']; ?> <input type="radio" name="special_rank" value="0"<?php echo ( !$rank_info['rank_special'] ) ? ' checked="checked"' : ''; ?> /> <?php echo $user->lang['No']; ?></td> </tr> <tr> - <td class="row1" width="40%"><?php echo $lang['Rank_minimum']; ?>: </td> + <td class="row1" width="40%"><?php echo $user->lang['Rank_minimum']; ?>: </td> <td class="row2"><input type="text" name="min_posts" size="5" maxlength="10" value="<?php echo ( $rank_info['rank_special'] ) ? '' : $rank_info['rank_min']; ?>" /></td> </tr> <tr> - <td class="row1" width="40%"><?php echo $lang['Rank_image']; ?>: <br /><span class="gensmall"><?php echo $lang['Rank_image_explain']; ?></span></td> + <td class="row1" width="40%"><?php echo $user->lang['Rank_image']; ?>: <br /><span class="gensmall"><?php echo $user->lang['Rank_image_explain']; ?></span></td> <td class="row2"><input type="text" name="rank_image" size="40" maxlength="255" value="<?php echo ( $rank_info['rank_image'] != '' ) ? $rank_info['rank_image'] : ''; ?>" /><br /><?php echo ( $rank_info['rank_image'] != '' ) ? '<img src="../' . $rank_info['rank_image'] . '" />' : ''; ?></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input type="submit" name="submit" value="<?php echo $lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $lang['Reset']; ?>" class="liteoption" /></td> + <td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input type="submit" name="submit" value="<?php echo $user->lang['Submit']; ?>" class="mainoption" /> <input type="reset" value="<?php echo $user->lang['Reset']; ?>" class="liteoption" /></td> </tr> </table></form> @@ -160,7 +160,7 @@ if ( $mode != '' ) if ( $rank_title == '' ) { - message_die(MESSAGE, $lang['Must_select_rank']); + message_die(MESSAGE, $user->lang['Must_select_rank']); } if ( $special_rank == 1 ) @@ -185,19 +185,19 @@ if ( $mode != '' ) SET rank_title = '" . str_replace("\'", "''", $rank_title) . "', rank_special = $special_rank, rank_min = $min_posts, rank_image = '" . str_replace("\'", "''", $rank_image) . "' WHERE rank_id = $rank_id"; - $message = $lang['Rank_updated']; + $message = $user->lang['Rank_updated']; } else { $sql = "INSERT INTO " . RANKS_TABLE . " (rank_title, rank_special, rank_min, rank_image) VALUES ('" . str_replace("\'", "''", $rank_title) . "', $special_rank, $min_posts, '" . str_replace("\'", "''", $rank_image) . "')"; - $message = $lang['Rank_added']; + $message = $user->lang['Rank_added']; } $db->sql_query($sql); - $message .= '<br /><br />' . sprintf($lang['Click_return_rankadmin'], '<a href="' . "admin_ranks.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); + $message .= '<br /><br />' . sprintf($user->lang['Click_return_rankadmin'], '<a href="' . "admin_ranks.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($user->lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); message_die(MESSAGE, $message); @@ -228,33 +228,33 @@ if ( $mode != '' ) WHERE user_rank = $rank_id"; $db->sql_query($sql); - $message = $lang['Rank_removed'] . '<br /><br />' . sprintf($lang['Click_return_rankadmin'], '<a href="' . "admin_ranks.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); + $message = $user->lang['Rank_removed'] . '<br /><br />' . sprintf($user->lang['Click_return_rankadmin'], '<a href="' . "admin_ranks.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($user->lang['Click_return_admin_index'], '<a href="' . "index.$phpEx$SID&pane=right" . '">', '</a>'); message_die(MESSAGE, $message); } else { - message_die(MESSAGE, $lang['Must_select_rank']); + message_die(MESSAGE, $user->lang['Must_select_rank']); } } } -page_header($lang['Ranks']); +page_header($user->lang['Ranks']); ?> -<h1><?php echo $lang['Ranks']; ?></h1> +<h1><?php echo $user->lang['Ranks']; ?></h1> -<p><?php echo $lang['Ranks_explain']; ?></p> +<p><?php echo $user->lang['Ranks_explain']; ?></p> <form method="post" action="<?php echo "admin_ranks.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th><?php echo $lang['Rank_title']; ?></th> - <th><?php echo $lang['Rank_minimum']; ?></th> - <th><?php echo $lang['Rank_special']; ?></th> - <th><?php echo $lang['Edit']; ?></th> - <th><?php echo $lang['Delete']; ?></th> + <th><?php echo $user->lang['Rank_title']; ?></th> + <th><?php echo $user->lang['Rank_minimum']; ?></th> + <th><?php echo $user->lang['Rank_special']; ?></th> + <th><?php echo $user->lang['Edit']; ?></th> + <th><?php echo $user->lang['Delete']; ?></th> </tr> <?php @@ -274,9 +274,9 @@ if ( $row = $db->sql_fetchrow($result) ) <tr> <td class="<?php echo $row_class; ?>" align="center"><?php echo $row['rank_title']; ?></td> <td class="<?php echo $row_class; ?>" align="center"><?php echo ( $row['rank_special'] ) ? '-' : $row['rank_min']; ?></td> - <td class="<?php echo $row_class; ?>" align="center"><?php echo ( $row['rank_special'] ) ? $lang['Yes'] : $lang['No']; ?></td> - <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_ranks.$phpEx$SID&mode=edit&id=" . $row['rank_id']; ?>"><?php echo $lang['Edit']; ?></a></td> - <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_ranks.$phpEx$SID&mode=delete&id=" . $row['rank_id']; ?>"><?php echo $lang['Delete']; ?></a></td> + <td class="<?php echo $row_class; ?>" align="center"><?php echo ( $row['rank_special'] ) ? $user->lang['Yes'] : $user->lang['No']; ?></td> + <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_ranks.$phpEx$SID&mode=edit&id=" . $row['rank_id']; ?>"><?php echo $user->lang['Edit']; ?></a></td> + <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_ranks.$phpEx$SID&mode=delete&id=" . $row['rank_id']; ?>"><?php echo $user->lang['Delete']; ?></a></td> </tr> <?php @@ -286,7 +286,7 @@ if ( $row = $db->sql_fetchrow($result) ) ?> <tr> - <td class="cat" colspan="6" align="center"><input type="submit" class="mainoption" name="add" value="<?php echo $lang['Add_new_rank']; ?>" /></td> + <td class="cat" colspan="6" align="center"><input type="submit" class="mainoption" name="add" value="<?php echo $user->lang['Add_new_rank']; ?>" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_search.php b/phpBB/admin/admin_search.php index 452f36a053..5fdc2b8a5e 100644 --- a/phpBB/admin/admin_search.php +++ b/phpBB/admin/admin_search.php @@ -46,7 +46,7 @@ include($phpbb_root_path . 'includes/functions_posting.'.$phpEx); // if ( !$auth->acl_get('a_general') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -295,13 +295,13 @@ if ( isset($_POST['start']) || isset($_GET['batchstart']) ) WHERE config_name = 'board_disable'"; $db->sql_query($sql); - page_header($lang['Search_indexing']); + page_header($user->lang['Search_indexing']); ?> -<h1><?php echo $lang['Search_indexing']; ?></h1> +<h1><?php echo $user->lang['Search_indexing']; ?></h1> -<p><?php echo $lang['Search_indexing_complete']; ?></p> +<p><?php echo $user->lang['Search_indexing_complete']; ?></p> <?php @@ -319,13 +319,13 @@ else if ( isset($_POST['cancel']) ) WHERE config_name = 'board_disable'"; $db->sql_query($sql); - page_header($lang['Search_indexing']); + page_header($user->lang['Search_indexing']); ?> -<h1><?php echo $lang['Search_indexing']; ?></h1> +<h1><?php echo $user->lang['Search_indexing']; ?></h1> -<p><?php echo $lang['Search_indexing_cancel']; ?></p> +<p><?php echo $user->lang['Search_indexing_cancel']; ?></p> <?php @@ -334,17 +334,17 @@ else if ( isset($_POST['cancel']) ) } else { - page_header($lang['Search_indexing']); + page_header($user->lang['Search_indexing']); ?> -<h1><?php echo $lang['Search_indexing']; ?></h1> +<h1><?php echo $user->lang['Search_indexing']; ?></h1> -<p><?php echo $lang['Search_indexing_explain']; ?></p> +<p><?php echo $user->lang['Search_indexing_explain']; ?></p> <form method="post" action="<?php echo "admin_search.$phpEx$SID"; ?>"><table cellspacing="1" cellpadding="4" border="0" align="center" bgcolor="#98AAB1"> <tr> - <td class="cat" height="28" align="center"> <input type="submit" name="start" value="<?php echo $lang['Start']; ?>" class="mainoption" /> <input type="submit" name="cancel" value="<?php echo $lang['Cancel']; ?>" class="mainoption" /> </td> + <td class="cat" height="28" align="center"> <input type="submit" name="start" value="<?php echo $user->lang['Start']; ?>" class="mainoption" /> <input type="submit" name="cancel" value="<?php echo $user->lang['Cancel']; ?>" class="mainoption" /> </td> </tr> </table></form> diff --git a/phpBB/admin/admin_smilies.php b/phpBB/admin/admin_smilies.php index aacbb5dbcc..09f0f3fdde 100644 --- a/phpBB/admin/admin_smilies.php +++ b/phpBB/admin/admin_smilies.php @@ -45,7 +45,7 @@ require('pagestart.' . $phpEx); // if (!$auth->acl_get('a_general')) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -173,13 +173,13 @@ if (isset($_POST['import_pak'])) } } - message_die(MESSAGE, $lang['Smilies_import_success']); + message_die(MESSAGE, $user->lang['Smilies_import_success']); } else { if (!count($smilies_paks)) { - $smilies_paks_select = $lang['No_smilies_pak']; + $smilies_paks_select = $user->lang['No_smilies_pak']; } else { @@ -192,33 +192,33 @@ if (isset($_POST['import_pak'])) $smilies_paks_select .= '</select>'; } - page_header($lang['Import_smilies']); + page_header($user->lang['Import_smilies']); ?> -<h1><?php echo $lang['Import_smilies'] ?></h1> +<h1><?php echo $user->lang['Import_smilies'] ?></h1> -<p><?php echo $lang['Import_smilies_explain'] ?></p> +<p><?php echo $user->lang['Import_smilies_explain'] ?></p> <form method="post" action="admin_smilies.<?php echo $phpEx . $SID ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang['Smilies_import'] ?></th> + <th colspan="2"><?php echo $user->lang['Smilies_import'] ?></th> </tr> <tr> - <td class="row2"><?php echo $lang['Select_package'] ?></td> + <td class="row2"><?php echo $user->lang['Select_package'] ?></td> <td class="row2"><?php echo $smilies_paks_select ?></td> </tr> <tr> - <td class="row1"><?php echo $lang['Delete_existing_smilies'] ?></td> + <td class="row1"><?php echo $user->lang['Delete_existing_smilies'] ?></td> <td class="row1"><input type="checkbox" name="clear_current" /></td> </tr> <tr> - <td class="row2" colspan="2" align="center"><?php echo $lang['Smilies_conflicts'] ?><br /> + <td class="row2" colspan="2" align="center"><?php echo $user->lang['Smilies_conflicts'] ?><br /> <table align="center" border="0"><tr><td> - <input type="radio" name="replace_existing" value="1" checked="checked" /> <?php echo $lang['Replace_existing_smilies'] ?> <br /> - <input type="radio" name="replace_existing" value="0" /> <?php echo $lang['Keep_existing_smilies'] ?> </td></tr></table> + <input type="radio" name="replace_existing" value="1" checked="checked" /> <?php echo $user->lang['Replace_existing_smilies'] ?> <br /> + <input type="radio" name="replace_existing" value="0" /> <?php echo $user->lang['Keep_existing_smilies'] ?> </td></tr></table> </td> </tr> <tr> - <td class="cat" colspan="2" align="center"><input class="mainoption" name="import_pak" type="submit" value="<?php echo $lang['Import_smilies'] ?>" /></td> + <td class="cat" colspan="2" align="center"><input class="mainoption" name="import_pak" type="submit" value="<?php echo $user->lang['Import_smilies'] ?>" /></td> </tr> </table></form> <?php @@ -250,8 +250,8 @@ elseif (isset($_GET['export_pak'])) } elseif (isset($_POST['export_pak'])) { - page_header($lang['Export_smilies']); - message_die(MESSAGE, sprintf($lang['Export_smilies_explain'], '<a href="admin_smilies.' . $phpEx . $SID . '&export_pak=send">', '</a>')); + page_header($user->lang['Export_smilies']); + message_die(MESSAGE, sprintf($user->lang['Export_smilies_explain'], '<a href="admin_smilies.' . $phpEx . $SID . '&export_pak=send">', '</a>')); } elseif (isset($_POST['add'])) { @@ -265,9 +265,9 @@ elseif (isset($_POST['add'])) $filename_list .= '<option value="' . $smile_url . '">' . htmlspecialchars($smile_url) . '</option>'; } - page_header($lang['Add_smile']); + page_header($user->lang['Add_smile']); ?> -<h1><?php echo $lang['Add_smile'] ?></h1> +<h1><?php echo $user->lang['Add_smile'] ?></h1> <script language="javascript" type="text/javascript" defer="defer"> <!-- @@ -288,30 +288,30 @@ function update_smile_dimensions() <form method="post" action="admin_smilies.<?php echo $phpEx . $SID ?>&mode=create"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang['smile_config'] ?></th> + <th colspan="2"><?php echo $user->lang['smile_config'] ?></th> </tr> <tr> - <td class="row2"><?php echo $lang['Smile_code'] ?></td> + <td class="row2"><?php echo $user->lang['Smile_code'] ?></td> <td class="row2"><input type="text" name="smile_code" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Smile_url'] ?></td> + <td class="row1"><?php echo $user->lang['Smile_url'] ?></td> <td class="row1"><select name="smile_url" onChange="update_smile(this.options[selectedIndex].value);"><?php echo $filename_list ?></select> <img name="smile_image" src="<?php echo (!empty($default_image)) ? $phpbb_root_path . $board_config['smilies_path'] . '/' . $default_image : '../images/spacer.gif' ?>" border="0" alt="" onLoad="update_smile_dimensions()" /> </td> </tr> <tr> - <td class="row2"><?php echo $lang['Smile_width'] ?></td> + <td class="row2"><?php echo $user->lang['Smile_width'] ?></td> <td class="row2"><input type="text" size="4" name="smile_width" value="0" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Smile_height'] ?></td> + <td class="row1"><?php echo $user->lang['Smile_height'] ?></td> <td class="row1"><input type="text" size="4" name="smile_height" value="0" /></td> </tr> <tr> - <td class="row2"><?php echo $lang['Smile_emotion'] ?></td> + <td class="row2"><?php echo $user->lang['Smile_emotion'] ?></td> <td class="row2"><input type="text" name="smile_emotion" /></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><input class="mainoption" type="submit" value="<?php echo $lang['Submit'] ?>" /></td> + <td class="cat" colspan="2" align="center"><input class="mainoption" type="submit" value="<?php echo $user->lang['Submit'] ?>" /></td> </tr> </table></form> <?php @@ -323,7 +323,7 @@ switch ($mode) { case 'delete': $db->sql_query('DELETE FROM ' . SMILIES_TABLE . ' WHERE smilies_id = ' . intval($_GET['smile_id'])); - message_die(MESSAGE, $lang['Smile_deleted']); + message_die(MESSAGE, $user->lang['Smile_deleted']); break; case 'edit': @@ -346,10 +346,10 @@ switch ($mode) $selected = ' selected="selected"'; $after = FALSE; } - $order_list = '<option value="' . ($row['smile_order'] + 1) . '"' . $selected . '>' . sprintf($lang['After_smile'], htmlspecialchars($row['code'])) . '</option>' . $order_list; + $order_list = '<option value="' . ($row['smile_order'] + 1) . '"' . $selected . '>' . sprintf($user->lang['After_smile'], htmlspecialchars($row['code'])) . '</option>' . $order_list; } } - $order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $lang['First'] . '</option>' . $order_list; + $order_list = '<option value="1"' . ((!isset($after)) ? ' selected="selected"' : '') . '>' . $user->lang['First'] . '</option>' . $order_list; $filename_list = ''; foreach ($smilies_images as $smile_url) @@ -367,9 +367,9 @@ switch ($mode) $filename_list .= '<option value="' . $smile_url . '"' . htmlspecialchars($smile_url) . $smile_selected . '>' . $smile_url . '</option>'; } - page_header($lang['Edit_smile']); + page_header($user->lang['Edit_smile']); ?> -<h1><?php echo $lang['Edit_smile'] ?></h1> +<h1><?php echo $user->lang['Edit_smile'] ?></h1> <script language="javascript" type="text/javascript" defer="defer"> <!-- @@ -390,38 +390,38 @@ function update_smile_dimensions() <form method="post" action="admin_smilies.<?php echo $phpEx . $SID ?>&mode=modify"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th class="th" colspan="2"><?php echo $lang['Smile_config'] ?></th> + <th class="th" colspan="2"><?php echo $user->lang['Smile_config'] ?></th> </tr> <tr> - <td class="row2"><?php echo $lang['Smile_code'] ?></td> + <td class="row2"><?php echo $user->lang['Smile_code'] ?></td> <td class="row2"><input type="text" name="smile_code" value="<?php echo $smile_data['code'] ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Smile_url'] ?></td> + <td class="row1"><?php echo $user->lang['Smile_url'] ?></td> <td class="row1"><select name="smile_url" onChange="update_smile(this.options[selectedIndex].value);"><?php echo $filename_list ?></select> <img name="smile_image" src="<?php echo $phpbb_root_path . $board_config['smilies_path'] . '/' . $smile_edit_img ?>" border="0" alt="" onLoad="update_smile_dimensions()" /> </td> </tr> <tr> - <td class="row2"><?php echo $lang['Smile_emotion'] ?></td> + <td class="row2"><?php echo $user->lang['Smile_emotion'] ?></td> <td class="row2"><input type="text" name="smile_emotion" value="<?php echo $smile_data['emoticon'] ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Smile_width'] ?></td> + <td class="row1"><?php echo $user->lang['Smile_width'] ?></td> <td class="row1"><input type="text" size="3" name="smile_width" value="<?php echo $smile_data['smile_width'] ?>" /></td> </tr> <tr> - <td class="row2"><?php echo $lang['Smile_height'] ?></td> + <td class="row2"><?php echo $user->lang['Smile_height'] ?></td> <td class="row2"><input type="text" size="3" name="smile_height" value="<?php echo $smile_data['smile_height'] ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Display_on_posting'] ?></td> + <td class="row1"><?php echo $user->lang['Display_on_posting'] ?></td> <td class="row1"><input type="checkbox" name="smile_on_posting" <?php echo ($smile_data['smile_on_posting']) ? ' checked="checked"' : '' ?>/></td> </tr> <tr> - <td class="row2"><?php echo $lang['Smile_order'] ?></td> + <td class="row2"><?php echo $user->lang['Smile_order'] ?></td> <td class="row2"><select name="smile_order"><?php echo $order_list ?></select></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><input type="hidden" name="smile_id" value="<?php echo $smile_data['smilies_id'] ?>" /><input class="mainoption" type="submit" value="<?php echo $lang['Submit'] ?>" /></td> + <td class="cat" colspan="2" align="center"><input type="hidden" name="smile_id" value="<?php echo $smile_data['smilies_id'] ?>" /><input class="mainoption" type="submit" value="<?php echo $user->lang['Submit'] ?>" /></td> </tr> </table></form> <?php @@ -491,12 +491,12 @@ function update_smile_dimensions() if ($mode == 'modify') { $db->sql_query_array('UPDATE ' . SMILIES_TABLE . " SET WHERE smilies_id = $smile_id", $sql); - message_die(MESSAGE, $lang['Smile_edited']); + message_die(MESSAGE, $user->lang['Smile_edited']); } else { $db->sql_query_array('INSERT INTO ' . SMILIES_TABLE, $sql); - message_die(MESSAGE, $lang['Smile_added']); + message_die(MESSAGE, $user->lang['Smile_added']); } break; @@ -533,20 +533,20 @@ function update_smile_dimensions() FROM ' . SMILIES_TABLE . ' ORDER BY smile_on_posting DESC, smile_order ASC'; $result = $db->sql_query($sql); - page_header($lang['Emoticons']); + page_header($user->lang['Emoticons']); ?> -<h1><?php echo $lang['Emoticons']; ?></h1> +<h1><?php echo $user->lang['Emoticons']; ?></h1> -<p><?php echo $lang['Emoticons_explain']; ?></p> +<p><?php echo $user->lang['Emoticons_explain']; ?></p> <form method="post" action="admin_smilies.<?php echo $phpEx . $SID ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th><?php echo $lang['Code']; ?></th> - <th><?php echo $lang['Smile']; ?></th> - <th><?php echo $lang['Emotion']; ?></th> - <th colspan="2"><?php echo $lang['Action']; ?></th> - <th colspan="2"><?php echo $lang['Reorder']; ?></th> + <th><?php echo $user->lang['Code']; ?></th> + <th><?php echo $user->lang['Smile']; ?></th> + <th><?php echo $user->lang['Emotion']; ?></th> + <th colspan="2"><?php echo $user->lang['Action']; ?></th> + <th colspan="2"><?php echo $user->lang['Reorder']; ?></th> </tr> <?php @@ -558,7 +558,7 @@ function update_smile_dimensions() $spacer = TRUE; ?> <tr> - <td class="row3" colspan="7" align="center"><?php echo $lang['Smilies_not_displayed'] ?></td> + <td class="row3" colspan="7" align="center"><?php echo $user->lang['Smilies_not_displayed'] ?></td> </tr> <?php } @@ -568,10 +568,10 @@ function update_smile_dimensions() <td class="<?php echo $row_class; ?>" align="center"><?php echo htmlspecialchars($row['code']); ?></td> <td class="<?php echo $row_class; ?>" align="center"><img src="<?php echo './../' . $board_config['smilies_path'] . '/' . $row['smile_url']; ?>" width="<?php echo $row['smile_width']; ?>" height="<?php echo $row['smile_height']; ?>" alt="<?php echo htmlspecialchars($row['code']); ?>" /></td> <td class="<?php echo $row_class; ?>" align="center"><?php echo $row['emoticon']; ?></td> - <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=edit&smile_id=" . $row['smilies_id']; ?>"><?php echo $lang['Edit']; ?></a></td> - <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=delete&smile_id=" . $row['smilies_id']; ?>"><?php echo $lang['Delete']; ?></a></td> - <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=move_up&smile_order=" . $row['smile_order']; ?>"><?php echo $lang['Up']; ?></a></td> - <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=move_down&smile_order=" . $row['smile_order']; ?>"><?php echo $lang['Down']; ?></a></td> + <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=edit&smile_id=" . $row['smilies_id']; ?>"><?php echo $user->lang['Edit']; ?></a></td> + <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=delete&smile_id=" . $row['smilies_id']; ?>"><?php echo $user->lang['Delete']; ?></a></td> + <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=move_up&smile_order=" . $row['smile_order']; ?>"><?php echo $user->lang['Up']; ?></a></td> + <td class="<?php echo $row_class; ?>" align="center"><a href="<?php echo "admin_smilies.$phpEx$SID&mode=move_down&smile_order=" . $row['smile_order']; ?>"><?php echo $user->lang['Down']; ?></a></td> </tr> <?php @@ -579,7 +579,7 @@ function update_smile_dimensions() ?> <tr> - <td class="cat" colspan="7" align="center"><input type="submit" name="add" value="<?php echo $lang['Add_smile']; ?>" class="mainoption" /> <input class="liteoption" type="submit" name="import_pak" value="<?php echo $lang['Import_smilies']; ?>"> <input class="liteoption" type="submit" name="export_pak" value="<?php echo $lang['Export_smilies']; ?>"></td> + <td class="cat" colspan="7" align="center"><input type="submit" name="add" value="<?php echo $user->lang['Add_smile']; ?>" class="mainoption" /> <input class="liteoption" type="submit" name="import_pak" value="<?php echo $user->lang['Import_smilies']; ?>"> <input class="liteoption" type="submit" name="export_pak" value="<?php echo $user->lang['Export_smilies']; ?>"></td> </tr> </table></form> diff --git a/phpBB/admin/admin_styles.php b/phpBB/admin/admin_styles.php index c7b5a8888c..ebe5459762 100644 --- a/phpBB/admin/admin_styles.php +++ b/phpBB/admin/admin_styles.php @@ -29,7 +29,7 @@ require('pagestart.' . $phpEx); // if ( !$auth->acl_get('a_styles') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } /* @@ -53,17 +53,8 @@ $mode = ( isset($_GET['mode']) ) ? $_GET['mode'] : $_POST['mode']; switch ( $mode ) { case 'editimageset': - $imgroot = ( isset($_POST['imgroot']) ) ? $_POST['imgroot'] : 'subSilver'; + $imgroot = ( isset($_POST['imgroot']) ) ? $_POST['imgroot'] : $board_config['default_style']; - if ( isset($_POST['img_root']) ) - { - $sql = "SELECT * - FROM " . STYLES_IMAGE_TABLE . " - WHERE imageset_path LIKE '" . $_POST['imgroot'] . "'"; - $result = $db->sql_query($sql); - - $images = $db->sql_fetchrow($result); - } if ( isset($_POST['img_addconfig']) ) { } @@ -71,7 +62,7 @@ switch ( $mode ) { } - $imageset = array('imageset_path', 'post_new', 'post_locked', 'post_pm', 'reply_new', 'reply_pm', 'reply_locked', 'icon_profile', 'icon_pm', 'icon_delete', 'icon_ip', 'icon_quote', 'icon_search', 'icon_edit', 'icon_email', 'icon_www', 'icon_icq', 'icon_aim', 'icon_yim', 'icon_msnm', 'icon_no_email', 'icon_no_www', 'icon_no_icq', 'icon_no_aim', 'icon_no_yim', 'icon_no_msnm', 'goto_post', 'goto_post_new', 'goto_post_latest', 'goto_post_newest', 'forum', 'forum_new', 'forum_locked', 'folder', 'folder_new', 'folder_hot', 'folder_hot_new', 'folder_locked', 'folder_locked_new', 'folder_sticky', 'folder_sticky_new', 'folder_announce', 'folder_announce_new', 'topic_watch', 'topic_unwatch', 'poll_left', 'poll_center', 'poll_right', 'rating'); + $imageset = array('imageset_path', 'post_new', 'post_locked', 'post_pm', 'reply_new', 'reply_pm', 'reply_locked', 'icon_profile', 'icon_pm', 'icon_delete', 'icon_ip', 'icon_quote', 'icon_search', 'icon_edit', 'icon_email', 'icon_www', 'icon_icq', 'icon_aim', 'icon_yim', 'icon_msnm', 'icon_no_email', 'icon_no_www', 'icon_no_icq', 'icon_no_aim', 'icon_no_yim', 'icon_no_msnm', 'goto_post', 'goto_post_new', 'goto_post_latest', 'goto_post_newest', 'forum', 'forum_new', 'forum_locked', 'sub_forum', 'sub_forum_new', 'folder', 'folder_new', 'folder_hot', 'folder_hot_new', 'folder_locked', 'folder_locked_new', 'folder_sticky', 'folder_sticky_new', 'folder_announce', 'folder_announce_new', 'topic_watch', 'topic_unwatch', 'poll_left', 'poll_center', 'poll_right', 'rating'); $sql = "SELECT imageset_name, imageset_path FROM " . STYLES_IMAGE_TABLE . " @@ -100,42 +91,64 @@ switch ( $mode ) // // Output page // - page_header($lang['Styles']); + page_header($user->lang['Edit_Imageset']); - echo '<form method="post" action="admin_styles.' . $phpEx . '?mode=editimageset">'; +?> - echo '<h2>Edit Imageset</h2>'; +<form method="post" action="admin_styles.<?php echo $phpEx . $SID; ?>&mode=editimageset"> - echo '<p>Template set: <select name="imgroot">' . $imgroot_options . '</select> <input class="liteoption" type="submit" name="img_root" value="Select" /></p>'; +<h2>Edit Imageset</h2> - echo '<p>Use this panel to edit or remove imagesets from the database.</p>'; +<p>Template set: <select name="imgroot"><?php echo $imgroot_options; ?></select> <input class="liteoption" type="submit" name="img_root" value="Select set" /> <input class="liteoption" type="submit" name="create" value="Create new set" /></p> - echo '<table cellspacing="1" cellpadding="2" border="0" align="center" bgcolor="#98AAB1">'; - echo '<tr>'; - echo '<td class="cat" colspan="6" height="28" align="center"><span class="gen">Available images: <select name="imageset">' . $imgname_options . '</select></span></td>'; - echo '</tr>'; - echo '<tr>'; - echo '<th height="25">Image</th><th>Source</th><th>Width</th><th>Height</th><th>Border</th><th> </th>'; - echo '</tr>'; +<p>Here you can create, edit, delete and download imagesets.</p> - for($i = 0; $i < count($imageset); $i++) - { - $class = ( !($i%2) ) ? 'row1' : 'row2'; - - echo '<tr>'; - echo '<td class="' . $class . '" height="25"><span class="gen">' . ucfirst(str_replace('_', ' ', $imageset[$i])) . '</span></td>'; - echo '<td class="' . $class . '"><input class="text" type="text" name="src[' . $imageset[$i] . ']" value="' . ( ( !empty($images[$imageset[$i]]) ) ? $images[$imageset[$i]] : '' ) . '" size="20" maxsize="30" /></td>'; - echo '<td class="' . $class . '"><input class="text" type="text" name="width[' . $imageset[$i] . ']" size="3" maxsize="3" /></td>'; - echo '<td class="' . $class . '"><input class="text" type="text" name="height[' . $imageset[$i] . ']" size="3" maxsize="3" /></td>'; - echo '<td class="' . $class . '"><input class="text" type="text" name="border[' . $imageset[$i] . ']" size="2" maxsize="2" /></td>'; - echo '<td class="' . $class . '"><input class="liteoption" type="submit" value="Update" onclick="this.form.' . $imageset[$i] . '.value=this.form.imageset.options[this.form.imageset.selectedIndex].value;return false" /> <input class="liteoption" type="submit" value="Clear" onclick="this.form.' . $imageset[$i] . '.value=\'\';return false" /> </td>'; - echo '</tr>'; - } +<?php + + if ( isset($_POST['img_root']) ) + { + $sql = "SELECT * + FROM " . STYLES_IMAGE_TABLE . " + WHERE imageset_path LIKE '" . $_POST['imgroot'] . "'"; + $result = $db->sql_query($sql); + + $images = $db->sql_fetchrow($result); + +?> +<table class="bg" cellspacing="1" cellpadding="2" border="0" align="center"> + <tr> + <th height="25">Image</th><th>Graphic</th><th> </th> + </tr> +<?php + + for($i = 1; $i < count($imageset); $i++) + { + $row_class = ( !($i%2) ) ? 'row1' : 'row2'; + + $img = ( !empty($images[$imageset[$i]]) ) ? '<img src=' . $images[$imageset[$i]] . ' />' : ''; + $img = str_replace('"imagesets/', '"../imagesets/', $img); + $img = str_replace('{LANG}', $user->img_lang, $img); + $img = str_replace('{RATE}', 3, $img); +?> + <tr> + <td class="<?php echo $row_class; ?>" height="25"><span class="gen"><?php echo ucfirst(str_replace('_', ' ', $imageset[$i])); ?></span></td> + <td class="<?php echo $row_class; ?>" align="center"><?php echo $img; ?></td> + <td class="<?php echo $row_class; ?>" align="center"> <input class="liteoption" type="submit" value="Edit" /></td> + </tr> +<?php + + } + +?> + <tr> + <td class="cat" colspan="3" height="28" align="center"> <input class="liteoption" type="submit" name="download" value="Download set" <input class="liteoption" type="submit" name="img_delete" value="Delete set" /> </td> + </tr> +</table></form> + +<?php + + } - echo '<td class="cat" colspan="6" height="28" align="center"><input class="liteoption" type="submit" name="img_update" value="Update set" /> <input class="liteoption" type="submit" name="img_delete" value="Delete set" /> <input class="liteoption" type="reset" value="Undo" /></td>'; - echo '</tr>'; - echo '</table>'; - echo '</form>'; page_footer(); break; @@ -205,17 +218,17 @@ switch ( $mode ) // // // - page_header($lang['Edit_template']); + page_header($user->lang['Edit_template']); ?> -<h2><?php echo $lang['Edit_template']; ?></h2> +<h2><?php echo $user->lang['Edit_template']; ?></h2> -<p><?php echo $lang['Edit_template_explain']; ?></p> +<p><?php echo $user->lang['Edit_template_explain']; ?></p> <form method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=edittemplate"; ?>"> -<p><?php echo $lang['Select_template']; ?>: <select name="tplroot"><?php echo $tplroot_options; ?></select> <input class="liteoption" type="submit" name="tpl_root" value="Select" /></p> +<p><?php echo $user->lang['Select_template']; ?>: <select name="tplroot"><?php echo $tplroot_options; ?></select> <input class="liteoption" type="submit" name="tpl_root" value="Select" /></p> <table class="bg" width="95%" cellspacing="1" cellpadding="0" border="0" align="center"> <tr> @@ -265,11 +278,11 @@ switch ( $mode ) add_admin_log('log_theme_edit', $theme_name); - message_die(MESSAGE, $lang['Success_theme_update']); + message_die(MESSAGE, $user->lang['Success_theme_update']); } } - page_header($lang['Edit_theme']); + page_header($user->lang['Edit_theme']); $sql = "SELECT theme_id, theme_name FROM " . STYLES_CSS_TABLE; @@ -306,24 +319,24 @@ switch ( $mode ) <form method="post" action="<?php echo "admin_styles.$phpEx$SID&mode=$mode"; ?>"> -<h2><?php echo $lang['Edit_theme']; ?></h2> +<h2><?php echo $user->lang['Edit_theme']; ?></h2> -<p><?php echo $lang['Edit_theme_explain']; ?></p> +<p><?php echo $user->lang['Edit_theme_explain']; ?></p> <table class="bg" width="95%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <td class="cat" colspan="2" align="center"><?php echo $lang['Select_theme']; ?>: <select name="themeroot"><?php echo $theme_options; ?></select> <input class="liteoption" type="submit" name="tpl_root" value="<?php echo $lang['Select']; ?>" /></td> + <td class="cat" colspan="2" align="center"><?php echo $user->lang['Select_theme']; ?>: <select name="themeroot"><?php echo $theme_options; ?></select> <input class="liteoption" type="submit" name="tpl_root" value="<?php echo $user->lang['Select']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['CSS_data']; ?>: <br /><span class="gensmall"><?php echo $lang['CSS_data_explain']; ?></td> + <td class="row1"><?php echo $user->lang['CSS_data']; ?>: <br /><span class="gensmall"><?php echo $user->lang['CSS_data_explain']; ?></td> <td class="row2"><textarea class="edit" cols="65" rows="15" name="css_data"><?php echo htmlentities($css_data); ?></textarea></td> </tr> <tr> - <td class="row1"><?php echo $lang['CSS_sheet']; ?>: </td> + <td class="row1"><?php echo $user->lang['CSS_sheet']; ?>: </td> <td class="row2"><input type="text" name="css_external" maxlength="60" size="60" value="<?php echo $css_external; ?>" /></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><input class="liteoption" type="submit" name="update" value="<?php echo $lang['Update']; ?>" /> <input class="liteoption" type="reset" value="<?php echo $lang['Reset']; ?>" /></td> + <td class="cat" colspan="2" align="center"><input class="liteoption" type="submit" name="update" value="<?php echo $user->lang['Update']; ?>" /> <input class="liteoption" type="reset" value="<?php echo $user->lang['Reset']; ?>" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_users.php b/phpBB/admin/admin_users.php index c260b1d7ad..7fb0dae34b 100644 --- a/phpBB/admin/admin_users.php +++ b/phpBB/admin/admin_users.php @@ -78,7 +78,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( $this_userdata = get_userdata($user_id); if( !$this_userdata ) { - message_die(MESSAGE, $lang['No_user_id_specified'] ); + message_die(MESSAGE, $user->lang['No_user_id_specified'] ); } $username = ( !empty($_POST['username']) ) ? trim(strip_tags( $_POST['username'] ) ) : ''; @@ -175,7 +175,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( if( !validate_username($username) ) { $error = TRUE; - $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Invalid_username']; + $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Invalid_username']; } else { @@ -193,7 +193,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( if($password != $password_confirm) { $error = TRUE; - $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch']; + $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Password_mismatch']; } else { @@ -204,12 +204,12 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( else if( $password && !$password_confirm ) { $error = TRUE; - $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch']; + $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Password_mismatch']; } else if( !$password && $password_confirm ) { $error = TRUE; - $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Password_mismatch']; + $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Password_mismatch']; } if( $user_status == 0 ) @@ -239,7 +239,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( if ( strlen($sig_length_check) > $board_config['max_sig_chars'] ) { $error = TRUE; - $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $lang['Signature_too_long']; + $error_msg .= ( ( isset($error_msg) ) ? '<br />' : '' ) . $user->lang['Signature_too_long']; } } @@ -274,7 +274,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( { $error_msg .= "<br />"; } - $error_msg .= $lang['Only_one_avatar']; + $error_msg .= $user->lang['Only_one_avatar']; } if( $user_avatar_loc != "" ) @@ -306,7 +306,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( break; default: $error = true; - $error_msg = (!empty($error_msg)) ? $error_msg . "<br />" . $lang['Avatar_filetype'] : $lang['Avatar_filetype']; + $error_msg = (!empty($error_msg)) ? $error_msg . "<br />" . $user->lang['Avatar_filetype'] : $user->lang['Avatar_filetype']; break; } @@ -333,7 +333,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( } else { - $l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']); + $l_avatar_size = sprintf($user->lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']); $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size; @@ -342,7 +342,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( } else { - $l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024)); + $l_avatar_size = sprintf($user->lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024)); $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size; @@ -351,7 +351,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( else { $error = true; - $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Avatar_filetype'] : $lang['Avatar_filetype']; + $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $user->lang['Avatar_filetype'] : $user->lang['Avatar_filetype']; } } else if( !empty($user_avatar_url) ) @@ -406,7 +406,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( break; default: $error = true; - $error_msg = (!empty($error_msg)) ? $error_msg . "<br />" . $lang['Avatar_filetype'] : $lang['Avatar_filetype']; + $error_msg = (!empty($error_msg)) ? $error_msg . "<br />" . $user->lang['Avatar_filetype'] : $user->lang['Avatar_filetype']; break; } @@ -443,7 +443,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( } else { - $l_avatar_size = sprintf($lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']); + $l_avatar_size = sprintf($user->lang['Avatar_imagesize'], $board_config['avatar_max_width'], $board_config['avatar_max_height']); $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size; @@ -465,7 +465,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( // No data // $error = true; - $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['File_no_data'] : $lang['File_no_data']; + $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $user->lang['File_no_data'] : $user->lang['File_no_data']; } } else @@ -474,18 +474,18 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( // No connection // $error = true; - $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['No_connection_URL'] : $lang['No_connection_URL']; + $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $user->lang['No_connection_URL'] : $user->lang['No_connection_URL']; } } else { $error = true; - $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Incomplete_URL'] : $lang['Incomplete_URL']; + $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $user->lang['Incomplete_URL'] : $user->lang['Incomplete_URL']; } } else if( !empty($user_avatar_name) ) { - $l_avatar_size = sprintf($lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024)); + $l_avatar_size = sprintf($user->lang['Avatar_filesize'], round($board_config['avatar_filesize'] / 1024)); $error = true; $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $l_avatar_size : $l_avatar_size; @@ -505,7 +505,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( else { $error = true; - $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $lang['Wrong_remote_avatar_format'] : $lang['Wrong_remote_avatar_format']; + $error_msg = ( !empty($error_msg) ) ? $error_msg . "<br />" . $user->lang['Wrong_remote_avatar_format'] : $user->lang['Wrong_remote_avatar_format']; } } else if( $user_avatar_local != "" && $avatar_sql == "" && !$error ) @@ -564,7 +564,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( $db->sql_transaction('commit'); - $message = $lang['User_deleted']; + $message = $user->lang['User_deleted']; } else @@ -582,10 +582,10 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( $db->sql_query($sql); } - $message .= $lang['Admin_user_updated']; + $message .= $user->lang['Admin_user_updated']; } - $message .= '<br /><br />' . sprintf($lang['Click_return_useradmin'], '<a href="' . "admin_users.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . "index.$phpE$SID?pane=right" . '">', '</a>'); + $message .= '<br /><br />' . sprintf($user->lang['Click_return_useradmin'], '<a href="' . "admin_users.$phpEx$SID" . '">', '</a>') . '<br /><br />' . sprintf($user->lang['Click_return_admin_index'], '<a href="' . "index.$phpE$SID?pane=right" . '">', '</a>'); message_die(MESSAGE, $message); } @@ -629,7 +629,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( $this_userdata = get_userdata($user_id); if( !$this_userdata ) { - message_die(MESSAGE, $lang['No_user_id_specified'] ); + message_die(MESSAGE, $user->lang['No_user_id_specified'] ); } } else @@ -637,7 +637,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( $this_userdata = get_userdata( $_POST['username'] ); if( !$this_userdata ) { - message_die(MESSAGE, $lang['No_user_id_specified'] ); + message_die(MESSAGE, $user->lang['No_user_id_specified'] ); } } @@ -684,9 +684,9 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( $COPPA = false; - $html_status = ($this_userdata['user_allowhtml'] ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF']; - $bbcode_status = ($this_userdata['user_allowbbcode'] ) ? $lang['BBCode_is_ON'] : $lang['BBCode_is_OFF']; - $smilies_status = ($this_userdata['user_allowsmile'] ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF']; + $html_status = ($this_userdata['user_allowhtml'] ) ? $user->lang['HTML_is_ON'] : $user->lang['HTML_is_OFF']; + $bbcode_status = ($this_userdata['user_allowbbcode'] ) ? $user->lang['BBCode_is_ON'] : $user->lang['BBCode_is_OFF']; + $smilies_status = ($this_userdata['user_allowsmile'] ) ? $user->lang['Smilies_are_ON'] : $user->lang['Smilies_are_OFF']; } if( isset($_POST['avatargallery']) && !$error ) @@ -805,13 +805,13 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( $s_hidden_fields .= '<input type="hidden" name="user_rank" value="' . $user_rank . '" />'; $template->assign_vars(array( - "L_USER_TITLE" => $lang['User_admin'], - "L_USER_EXPLAIN" => $lang['User_admin_explain'], - "L_AVATAR_GALLERY" => $lang['Avatar_gallery'], - "L_SELECT_AVATAR" => $lang['Select_avatar'], - "L_RETURN_PROFILE" => $lang['Return_profile'], - "L_CATEGORY" => $lang['Select_category'], - "L_GO" => $lang['Go'], + "L_USER_TITLE" => $user->lang['User_admin'], + "L_USER_EXPLAIN" => $user->lang['User_admin_explain'], + "L_AVATAR_GALLERY" => $user->lang['Avatar_gallery'], + "L_SELECT_AVATAR" => $user->lang['Select_avatar'], + "L_RETURN_PROFILE" => $user->lang['Return_profile'], + "L_CATEGORY" => $user->lang['Select_category'], + "L_GO" => $user->lang['Go'], "S_OPTIONS_CATEGORIES" => $s_categories, "S_COLSPAN" => $s_colspan, @@ -855,7 +855,7 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( ORDER BY rank_title"; $result = $db->sql_query($sql); - $rank_select_box = '<option value="0">' . $lang['No_assigned_rank'] . '</option>'; + $rank_select_box = '<option value="0">' . $user->lang['No_assigned_rank'] . '</option>'; while( $row = $db->sql_fetchrow($result) ) { $rank = $row['rank_title']; @@ -921,72 +921,72 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( 'USER_ACTIVE_NO' => (!$user_status) ? 'checked="checked"' : '', 'RANK_SELECT_BOX' => $rank_select_box, - 'L_USER_TITLE' => $lang['User_admin'], - 'L_USER_EXPLAIN' => $lang['User_admin_explain'], - 'L_NEW_PASSWORD' => $lang['New_password'], - 'L_PASSWORD_IF_CHANGED' => $lang['password_if_changed'], - 'L_CONFIRM_PASSWORD' => $lang['Confirm_password'], - 'L_PASSWORD_CONFIRM_IF_CHANGED' => $lang['password_confirm_if_changed'], - 'L_SUBMIT' => $lang['Submit'], - 'L_RESET' => $lang['Reset'], - 'L_ICQ_NUMBER' => $lang['ICQ'], - 'L_MESSENGER' => $lang['MSNM'], - 'L_YAHOO' => $lang['YIM'], - 'L_WEBSITE' => $lang['Website'], - 'L_AIM' => $lang['AIM'], - 'L_LOCATION' => $lang['From'], - 'L_OCCUPATION' => $lang['Occupation'], - 'L_BOARD_LANGUAGE' => $lang['Board_lang'], - 'L_BOARD_STYLE' => $lang['Board_style'], - 'L_TIMEZONE' => $lang['Timezone'], - 'L_DATE_FORMAT' => $lang['Date_format'], - 'L_DATE_FORMAT_EXPLAIN' => $lang['Date_format_explain'], - 'L_YES' => $lang['Yes'], - 'L_NO' => $lang['No'], - 'L_INTERESTS' => $lang['Interests'], - 'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'], - 'L_ALWAYS_ALLOW_BBCODE' => $lang['Always_bbcode'], - 'L_ALWAYS_ALLOW_HTML' => $lang['Always_html'], - 'L_HIDE_USER' => $lang['Hide_user'], - 'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'], - - 'L_SPECIAL' => $lang['User_special'], - 'L_SPECIAL_EXPLAIN' => $lang['User_specail_explain'], - 'L_USER_ACTIVE' => $lang['User_status'], - 'L_ALLOW_PM' => $lang['User_allowpm'], - 'L_ALLOW_AVATAR' => $lang['User_allowavatar'], - - 'L_AVATAR_PANEL' => $lang['Avatar_panel'], - 'L_AVATAR_EXPLAIN' => $lang['Admin_avatar_explain'], - 'L_DELETE_AVATAR' => $lang['Delete_Image'], - 'L_CURRENT_IMAGE' => $lang['Current_Image'], - 'L_UPLOAD_AVATAR_FILE' => $lang['Upload_Avatar_file'], - 'L_UPLOAD_AVATAR_URL' => $lang['Upload_Avatar_URL'], - 'L_AVATAR_GALLERY' => $lang['Select_from_gallery'], - 'L_SHOW_GALLERY' => $lang['View_avatar_gallery'], - 'L_LINK_REMOTE_AVATAR' => $lang['Link_remote_Avatar'], - - 'L_SIGNATURE' => $lang['Signature'], - 'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $board_config['max_sig_chars'] ), - 'L_NOTIFY_ON_PRIVMSG' => $lang['Notify_on_privmsg'], - 'L_NOTIFY_ON_REPLY' => $lang['Always_notify'], - 'L_POPUP_ON_PRIVMSG' => $lang['Popup_on_privmsg'], - 'L_PREFERENCES' => $lang['Preferences'], - 'L_PUBLIC_VIEW_EMAIL' => $lang['Public_view_email'], - 'L_ITEMS_REQUIRED' => $lang['Items_required'], - 'L_REGISTRATION_INFO' => $lang['Registration_info'], - 'L_PROFILE_INFO' => $lang['Profile_info'], - 'L_PROFILE_INFO_NOTICE' => $lang['Profile_info_warn'], - 'L_EMAIL_ADDRESS' => $lang['Email_address'], + 'L_USER_TITLE' => $user->lang['User_admin'], + 'L_USER_EXPLAIN' => $user->lang['User_admin_explain'], + 'L_NEW_PASSWORD' => $user->lang['New_password'], + 'L_PASSWORD_IF_CHANGED' => $user->lang['password_if_changed'], + 'L_CONFIRM_PASSWORD' => $user->lang['Confirm_password'], + 'L_PASSWORD_CONFIRM_IF_CHANGED' => $user->lang['password_confirm_if_changed'], + 'L_SUBMIT' => $user->lang['Submit'], + 'L_RESET' => $user->lang['Reset'], + 'L_ICQ_NUMBER' => $user->lang['ICQ'], + 'L_MESSENGER' => $user->lang['MSNM'], + 'L_YAHOO' => $user->lang['YIM'], + 'L_WEBSITE' => $user->lang['Website'], + 'L_AIM' => $user->lang['AIM'], + 'L_LOCATION' => $user->lang['From'], + 'L_OCCUPATION' => $user->lang['Occupation'], + 'L_BOARD_LANGUAGE' => $user->lang['Board_lang'], + 'L_BOARD_STYLE' => $user->lang['Board_style'], + 'L_TIMEZONE' => $user->lang['Timezone'], + 'L_DATE_FORMAT' => $user->lang['Date_format'], + 'L_DATE_FORMAT_EXPLAIN' => $user->lang['Date_format_explain'], + 'L_YES' => $user->lang['Yes'], + 'L_NO' => $user->lang['No'], + 'L_INTERESTS' => $user->lang['Interests'], + 'L_ALWAYS_ALLOW_SMILIES' => $user->lang['Always_smile'], + 'L_ALWAYS_ALLOW_BBCODE' => $user->lang['Always_bbcode'], + 'L_ALWAYS_ALLOW_HTML' => $user->lang['Always_html'], + 'L_HIDE_USER' => $user->lang['Hide_user'], + 'L_ALWAYS_ADD_SIGNATURE' => $user->lang['Always_add_sig'], + + 'L_SPECIAL' => $user->lang['User_special'], + 'L_SPECIAL_EXPLAIN' => $user->lang['User_specail_explain'], + 'L_USER_ACTIVE' => $user->lang['User_status'], + 'L_ALLOW_PM' => $user->lang['User_allowpm'], + 'L_ALLOW_AVATAR' => $user->lang['User_allowavatar'], + + 'L_AVATAR_PANEL' => $user->lang['Avatar_panel'], + 'L_AVATAR_EXPLAIN' => $user->lang['Admin_avatar_explain'], + 'L_DELETE_AVATAR' => $user->lang['Delete_Image'], + 'L_CURRENT_IMAGE' => $user->lang['Current_Image'], + 'L_UPLOAD_AVATAR_FILE' => $user->lang['Upload_Avatar_file'], + 'L_UPLOAD_AVATAR_URL' => $user->lang['Upload_Avatar_URL'], + 'L_AVATAR_GALLERY' => $user->lang['Select_from_gallery'], + 'L_SHOW_GALLERY' => $user->lang['View_avatar_gallery'], + 'L_LINK_REMOTE_AVATAR' => $user->lang['Link_remote_Avatar'], + + 'L_SIGNATURE' => $user->lang['Signature'], + 'L_SIGNATURE_EXPLAIN' => sprintf($user->lang['Signature_explain'], $board_config['max_sig_chars'] ), + 'L_NOTIFY_ON_PRIVMSG' => $user->lang['Notify_on_privmsg'], + 'L_NOTIFY_ON_REPLY' => $user->lang['Always_notify'], + 'L_POPUP_ON_PRIVMSG' => $user->lang['Popup_on_privmsg'], + 'L_PREFERENCES' => $user->lang['Preferences'], + 'L_PUBLIC_VIEW_EMAIL' => $user->lang['Public_view_email'], + 'L_ITEMS_REQUIRED' => $user->lang['Items_required'], + 'L_REGISTRATION_INFO' => $user->lang['Registration_info'], + 'L_PROFILE_INFO' => $user->lang['Profile_info'], + 'L_PROFILE_INFO_NOTICE' => $user->lang['Profile_info_warn'], + 'L_EMAIL_ADDRESS' => $user->lang['Email_address'], 'S_FORM_ENCTYPE' => $form_enctype, 'HTML_STATUS' => $html_status, 'BBCODE_STATUS' => sprintf($bbcode_status, '<a href="../' . "faq.$phpEx$SID&mode=bbcode" . '" target="_phpbbcode">', '</a>'), 'SMILIES_STATUS' => $smilies_status, - 'L_DELETE_USER' => $lang['User_delete'], - 'L_DELETE_USER_EXPLAIN' => $lang['User_delete_explain'], - 'L_SELECT_RANK' => $lang['Rank_title'], + 'L_DELETE_USER' => $user->lang['User_delete'], + 'L_DELETE_USER_EXPLAIN' => $user->lang['User_delete_explain'], + 'L_SELECT_RANK' => $user->lang['Rank_title'], 'S_HIDDEN_FIELDS' => $s_hidden_fields, 'S_PROFILE_ACTION' => "admin_users.$phpEx$SID") @@ -1013,20 +1013,20 @@ if ( $mode == 'edit' || $mode == 'save' && ( isset($_POST['username']) || isset( else { - page_header($lang['Manage']); + page_header($user->lang['Manage']); ?> -<h1><?php echo $lang['User_admin']; ?></h1> +<h1><?php echo $user->lang['User_admin']; ?></h1> -<p><?php echo $lang['User_admin_explain']; ?></p> +<p><?php echo $user->lang['User_admin_explain']; ?></p> <form method="post" name="post" action="<?php echo "admin_users.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th align="center"><?php echo $lang['Select_a_User']; ?></th> + <th align="center"><?php echo $user->lang['Select_a_User']; ?></th> </tr> <tr> - <td class="row1" align="center"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" /><input type="submit" name="submituser" value="<?php echo $lang['Look_up_user']; ?>" class="mainoption" /> <input type="submit" name="usersubmit" value="<?php echo $lang['Find_username']; ?>" class="liteoption" onClick="window.open('<?php echo "../search.$phpEx$SID&mode=searchuser&field=username"; ?>', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" /></td> + <td class="row1" align="center"><input type="text" class="post" name="username" maxlength="50" size="20" /> <input type="hidden" name="mode" value="edit" /><input type="submit" name="submituser" value="<?php echo $user->lang['Look_up_user']; ?>" class="mainoption" /> <input type="submit" name="usersubmit" value="<?php echo $user->lang['Find_username']; ?>" class="liteoption" onClick="window.open('<?php echo "../search.$phpEx$SID&mode=searchuser&field=username"; ?>', '_phpbbsearch', 'HEIGHT=500,resizable=yes,scrollbars=yes,WIDTH=650');return false;" /></td> </tr> </table></form> diff --git a/phpBB/admin/admin_viewlogs.php b/phpBB/admin/admin_viewlogs.php index a44f47dcfb..9b35c45490 100644 --- a/phpBB/admin/admin_viewlogs.php +++ b/phpBB/admin/admin_viewlogs.php @@ -46,7 +46,7 @@ require('pagestart.' . $phpEx); // if ( !$auth->acl_get('a_general') ) { - message_die(MESSAGE, $lang['No_admin']); + message_die(MESSAGE, $user->lang['No_admin']); } // @@ -74,8 +74,8 @@ else // Define some vars depending on which logs we're looking at $log_table_sql = ( $mode == 'admin' ) ? LOG_ADMIN_TABLE : LOG_MOD_TABLE; -$l_title = ( $mode == 'admin' ) ? $lang['Admin_logs'] : $lang['Mod_logs']; -$l_title_explain = ( $mode == 'admin' ) ? $lang['Admin_logs_explain'] : $lang['Mod_logs_explain']; +$l_title = ( $mode == 'admin' ) ? $user->lang['Admin_logs'] : $user->lang['Mod_logs']; +$l_title_explain = ( $mode == 'admin' ) ? $user->lang['Admin_logs_explain'] : $user->lang['Mod_logs_explain']; // // Delete entries if requested and able @@ -126,8 +126,8 @@ else $sort_dir = 'd'; } -$previous_days = array(0 => $lang['All_Entries'], 1 => $lang['1_Day'], 7 => $lang['7_Days'], 14 => $lang['2_Weeks'], 30 => $lang['1_Month'], 90 => $lang['3_Months'], 180 => $lang['6_Months'], 364 => $lang['1_Year']); -$sort_by_text = array('u' => $lang['Sort_Username'], 't' => $lang['Sort_date'], 'i' => $lang['Sort_ip'], 'o' => $lang['Sort_action']); +$previous_days = array(0 => $user->lang['All_Entries'], 1 => $user->lang['1_Day'], 7 => $user->lang['7_Days'], 14 => $user->lang['2_Weeks'], 30 => $user->lang['1_Month'], 90 => $user->lang['3_Months'], 180 => $user->lang['6_Months'], 364 => $user->lang['1_Year']); +$sort_by_text = array('u' => $user->lang['Sort_Username'], 't' => $user->lang['Sort_date'], 'i' => $user->lang['Sort_ip'], 'o' => $user->lang['Sort_action']); $sort_by = array('u' => 'l.user_id', 't' => 'l.log_time', 'i' => 'l.log_ip', 'o' => 'l.log_operation'); $sort_day_options = ''; @@ -144,7 +144,7 @@ foreach ( $sort_by_text as $key => $text ) $sort_key_options .= '<option value="' . $key . '"' . $selected . '>' . $text . '</option>'; } -$sort_order_options = ( $sort_dir == 'a' ) ? '<option value="a" selected="selected">' . $lang['Sort_Ascending'] . '</option><option value="d">' . $lang['Sort_Descending'] . '</option>' : '<option value="a">' . $lang['Sort_Ascending'] . '</option><option value="d" selected="selected">' . $lang['Sort_Descending'] . '</option>'; +$sort_order_options = ( $sort_dir == 'a' ) ? '<option value="a" selected="selected">' . $user->lang['Sort_Ascending'] . '</option><option value="d">' . $user->lang['Sort_Descending'] . '</option>' : '<option value="a">' . $user->lang['Sort_Ascending'] . '</option><option value="d" selected="selected">' . $user->lang['Sort_Descending'] . '</option>'; $sort_sql = $sort_by[$sort_key] . ' ' . ( ( $sort_dir == 'd' ) ? 'DESC' : 'ASC' ); @@ -169,7 +169,7 @@ if ( $mode == 'mod' ) ?> <table width="100%" cellpadding="1" cellspacing="1" border="0"> <tr> - <td align="right"><?php echo $lang['Select_forum']; ?>: <select name="f" onchange="this.form.submit()"><?php echo $forum_box; ?></select> <input class="liteoption" type="submit" value="<?php echo $lang['Go']; ?>" /></td> + <td align="right"><?php echo $user->lang['Select_forum']; ?>: <select name="f" onchange="this.form.submit()"><?php echo $forum_box; ?></select> <input class="liteoption" type="submit" value="<?php echo $user->lang['Go']; ?>" /></td> </tr> </table> <?php @@ -180,14 +180,14 @@ if ( $mode == 'mod' ) <table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> - <td class="cat" colspan="5" height="28" align="center"><span class="gensmall"><?php echo $lang['Display_log']; ?>: <select name="sort_days"><?php echo $sort_day_options; ?></select> <?php echo $lang['Sort_by']; ?> <select name="sort_key"><?php echo $sort_key_options; ?></select> <select name="sort_dir"><?php echo $sort_order_options; ?></select> <input class="liteoption" type="submit" value="<?php echo $lang['Go']; ?>" name="sort" /></span></td> + <td class="cat" colspan="5" height="28" align="center"><span class="gensmall"><?php echo $user->lang['Display_log']; ?>: <select name="sort_days"><?php echo $sort_day_options; ?></select> <?php echo $user->lang['Sort_by']; ?> <select name="sort_key"><?php echo $sort_key_options; ?></select> <select name="sort_dir"><?php echo $sort_order_options; ?></select> <input class="liteoption" type="submit" value="<?php echo $user->lang['Go']; ?>" name="sort" /></span></td> </tr> <tr> - <th width="15%" height="25" nowrap="nowrap"><?php echo $lang['Username']; ?></th> - <th width="15%" nowrap="nowrap"><?php echo $lang['IP']; ?></th> - <th width="20%" nowrap="nowrap"><?php echo $lang['Time']; ?></th> - <th width="45%" nowrap="nowrap"><?php echo $lang['Action']; ?></th> - <th nowrap="nowrap"><?php echo $lang['Mark']; ?></th> + <th width="15%" height="25" nowrap="nowrap"><?php echo $user->lang['Username']; ?></th> + <th width="15%" nowrap="nowrap"><?php echo $user->lang['IP']; ?></th> + <th width="20%" nowrap="nowrap"><?php echo $user->lang['Time']; ?></th> + <th width="45%" nowrap="nowrap"><?php echo $user->lang['Action']; ?></th> + <th nowrap="nowrap"><?php echo $user->lang['Mark']; ?></th> </tr> <?php @@ -208,7 +208,7 @@ if ( $log_count ) <tr> <td class="<?php echo $row_class; ?>" nowrap="nowrap"><?php echo $log_data[$i]['username']; ?></td> <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo $log_data[$i]['ip']; ?></td> - <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo create_date($board_config['default_dateformat'], $log_data[$i]['time'], $board_config['board_timezone']); ?></td> + <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><?php echo $user->format_date($log_data[$i]['time']); ?></td> <td class="<?php echo $row_class; ?>"><?php echo $log_data[$i]['action']; ?></td> <td class="<?php echo $row_class; ?>" align="center" nowrap="nowrap"><input type="checkbox" name="mark[]" value="<?php echo $log_data[$i]['id']; ?>" /></td> </tr> @@ -221,7 +221,7 @@ if ( $log_count ) ?> <tr> - <td class="cat" colspan="5" height="28" align="right"><input class="liteoption" type="submit" name="delmarked" value="<?php echo $lang['Delete_marked']; ?>" /> <input class="liteoption" type="submit" name="delall" value="<?php echo $lang['Delete_all']; ?>" /> </td> + <td class="cat" colspan="5" height="28" align="right"><input class="liteoption" type="submit" name="delmarked" value="<?php echo $user->lang['Delete_marked']; ?>" /> <input class="liteoption" type="submit" name="delall" value="<?php echo $user->lang['Delete_all']; ?>" /> </td> </tr> <?php @@ -231,7 +231,7 @@ else { ?> <tr> - <td class="row1" colspan="5" align="center" nowrap="nowrap"><?php echo $lang['No_entries']; ?></td> + <td class="row1" colspan="5" align="center" nowrap="nowrap"><?php echo $user->lang['No_entries']; ?></td> </tr> <?php @@ -249,7 +249,7 @@ else { -?><b><span class="gensmall"><a href="javascript:marklist(true);" class="gensmall"><?php echo $lang['Mark_all']; ?></a> :: <a href="javascript:marklist(false);" class="gensmall"><?php echo $lang['Unmark_all']; ?></a></span></b> <br /><br /><?php +?><b><span class="gensmall"><a href="javascript:marklist(true);" class="gensmall"><?php echo $user->lang['Mark_all']; ?></a> :: <a href="javascript:marklist(false);" class="gensmall"><?php echo $user->lang['Unmark_all']; ?></a></span></b> <br /><br /><?php } diff --git a/phpBB/admin/admin_words.php b/phpBB/admin/admin_words.php index 08c3723ed0..b2ffc22b54 100644 --- a/phpBB/admin/admin_words.php +++ b/phpBB/admin/admin_words.php @@ -86,7 +86,7 @@ if( $mode != '' ) { if ( !$word_id ) { - message_die(MESSAGE, $lang['No_word_selected']); + message_die(MESSAGE, $user->lang['No_word_selected']); } $sql = "SELECT * @@ -98,28 +98,28 @@ if( $mode != '' ) $s_hidden_fields .= '<input type="hidden" name="id" value="' . $word_id . '" />'; } - page_header($lang['Words_title']); + page_header($user->lang['Words_title']); ?> -<h1><?php echo $lang['Words_title']; ?></h1> +<h1><?php echo $user->lang['Words_title']; ?></h1> -<p><?php echo $lang['Words_explain']; ?></p> +<p><?php echo $user->lang['Words_explain']; ?></p> <form method="post" action="<?php echo "admin_words.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th colspan="2"><?php echo $lang['Edit_word_censor']; ?></th> + <th colspan="2"><?php echo $user->lang['Edit_word_censor']; ?></th> </tr> <tr> - <td class="row1"><?php echo $lang['Word']; ?></td> + <td class="row1"><?php echo $user->lang['Word']; ?></td> <td class="row2"><input type="text" name="word" value="<?php echo $word_info['word']; ?>" /></td> </tr> <tr> - <td class="row1"><?php echo $lang['Replacement']; ?></td> + <td class="row1"><?php echo $user->lang['Replacement']; ?></td> <td class="row2"><input type="text" name="replacement" value="<?php echo $word_info['replacement']; ?>" /></td> </tr> <tr> - <td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input class="mainoption" type="submit" name="save" value="<?php echo $lang['Submit']; ?>" /></td> + <td class="cat" colspan="2" align="center"><?php echo $s_hidden_fields; ?><input class="mainoption" type="submit" name="save" value="<?php echo $user->lang['Submit']; ?>" /></td> </tr> </table></form> @@ -134,7 +134,7 @@ if( $mode != '' ) if ( $word == '' || $replacement == '' ) { - message_die(MESSAGE, $lang['Must_enter_word']); + message_die(MESSAGE, $user->lang['Must_enter_word']); } $sql = ( $word_id ) ? "UPDATE " . WORDS_TABLE . " SET word = '" . str_replace("\'", "''", $word) . "', replacement = '" . str_replace("\'", "''", $replacement) . "' WHERE word_id = $word_id" : "INSERT INTO " . WORDS_TABLE . " (word, replacement) VALUES ('" . str_replace("\'", "''", $word) . "', '" . str_replace("\'", "''", $replacement) . "')"; @@ -143,7 +143,7 @@ if( $mode != '' ) $log_action = ( $word_id ) ? 'log_edit_word' : 'log_add_word'; add_admin_log($log_action, stripslashes($word)); - $message = ( $word_id ) ? $lang['Word_updated'] : $lang['Word_added']; + $message = ( $word_id ) ? $user->lang['Word_updated'] : $user->lang['Word_added']; message_die(MESSAGE, $message); break; @@ -155,7 +155,7 @@ if( $mode != '' ) } else { - message_die(MESSAGE, $lang['Must_specify_word']); + message_die(MESSAGE, $user->lang['Must_specify_word']); } $sql = "DELETE FROM " . WORDS_TABLE . " @@ -164,7 +164,7 @@ if( $mode != '' ) add_admin_log('log_delete_word'); - message_die(MESSAGE, $lang['Word_removed']); + message_die(MESSAGE, $user->lang['Word_removed']); break; } @@ -172,19 +172,19 @@ if( $mode != '' ) else { - page_header($lang['Words_title']); + page_header($user->lang['Words_title']); ?> -<h1><?php echo $lang['Words_title']; ?></h1> +<h1><?php echo $user->lang['Words_title']; ?></h1> -<p><?php echo $lang['Words_explain']; ?></p> +<p><?php echo $user->lang['Words_explain']; ?></p> <form method="post" action="<?php echo "admin_words.$phpEx$SID"; ?>"><table class="bg" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <th><?php echo $lang['Word']; ?></th> - <th><?php echo $lang['Replacement']; ?></th> - <th colspan="2"><?php echo $lang['Action']; ?></th> + <th><?php echo $user->lang['Word']; ?></th> + <th><?php echo $user->lang['Replacement']; ?></th> + <th colspan="2"><?php echo $user->lang['Action']; ?></th> </tr> <?php @@ -204,8 +204,8 @@ else <tr> <td class="<?php echo $row_class; ?>" align="center"><?php echo $row['word']; ?></td> <td class="<?php echo $row_class; ?>" align="center"><?php echo $row['replacement']; ?></td> - <td class="<?php echo $row_class; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=edit&id=" . $row['word_id']; ?>"><?php echo $lang['Edit']; ?></a> </td> - <td class="<?php echo $row_class; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=delete&id=" . $row['word_id']; ?>"><?php echo $lang['Delete']; ?></a> </td> + <td class="<?php echo $row_class; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=edit&id=" . $row['word_id']; ?>"><?php echo $user->lang['Edit']; ?></a> </td> + <td class="<?php echo $row_class; ?>"> <a href="<?php echo "admin_words.$phpEx$SID&mode=delete&id=" . $row['word_id']; ?>"><?php echo $user->lang['Delete']; ?></a> </td> </tr> <?php @@ -215,7 +215,7 @@ else ?> <tr> - <td class="cat" colspan="5" height="28" align="center"><?php echo $s_hidden_fields; ?><input class="mainoption" type="submit" name="add" value="<?php echo $lang['Add_new_word']; ?>" /></td> + <td class="cat" colspan="5" height="28" align="center"><?php echo $s_hidden_fields; ?><input class="mainoption" type="submit" name="add" value="<?php echo $user->lang['Add_new_word']; ?>" /></td> </tr> </table></form> diff --git a/phpBB/admin/index.php b/phpBB/admin/index.php index 2580bccef7..25a8b95ce9 100644 --- a/phpBB/admin/index.php +++ b/phpBB/admin/index.php @@ -21,25 +21,19 @@ define('IN_PHPBB', 1); -// // Define some vars -// $pane = ( isset($_GET['pane']) ) ? $_GET['pane'] : ''; $update = ( $pane == 'right' ) ? true : false; -// // Include files -// $phpbb_root_path = '../'; require($phpbb_root_path . 'extension.inc'); require('pagestart.' . $phpEx); -// // Do we have any admin permissions at all? -// if ( !$auth->acl_get('a_') ) { - message_die(MESSAGE, 'No_admin', '', true); + trigger_error('No_admin'); } // Generate relevant output @@ -52,7 +46,7 @@ if ( isset($_GET['pane']) && $_GET['pane'] == 'top' ) <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td><a href="../index.<?php echo $phpEx . $SID; ?>" target="_top"><img src="images/header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></a></td> - <td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $lang['Admin_title']; ?></span> </td> + <td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $user->lang['Admin_title']; ?></span> </td> </tr> </table> @@ -88,13 +82,13 @@ else if ( isset($_GET['pane']) && $_GET['pane'] == 'left' ) <tr> <td width="100%"><table width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> - <th class="menu" height="25">» <?php echo $lang['Return_to']; ?></th> + <th class="menu" height="25">» <?php echo $user->lang['Return_to']; ?></th> </tr> <tr> - <td class="row1"><a class="genmed" href="index.<?php echo $phpEx . $SID; ?>&pane=right" target="main"><?php echo $lang['Admin_Index']; ?></a></td> + <td class="row1"><a class="genmed" href="index.<?php echo $phpEx . $SID; ?>&pane=right" target="main"><?php echo $user->lang['Admin_Index']; ?></a></td> </tr> <tr> - <td class="row2"><a class="genmed" href="../index.<?php echo $phpEx . $SID; ?>" target="_top"><?php echo $lang['Forum_index']; ?></a></td> + <td class="row2"><a class="genmed" href="../index.<?php echo $phpEx . $SID; ?>" target="_top"><?php echo $user->lang['Forum_index']; ?></a></td> </tr> <?php @@ -103,7 +97,7 @@ else if ( isset($_GET['pane']) && $_GET['pane'] == 'left' ) @ksort($module); foreach ( $module as $cat => $action_ary ) { - $cat = ( !empty($lang[$cat . '_cat']) ) ? $lang[$cat . '_cat'] : preg_replace('/_/', ' ', $cat); + $cat = ( !empty($user->lang[$cat . '_cat']) ) ? $user->lang[$cat . '_cat'] : preg_replace('/_/', ' ', $cat); ?> <tr> @@ -115,7 +109,7 @@ else if ( isset($_GET['pane']) && $_GET['pane'] == 'left' ) foreach ( $action_ary as $action => $file ) { - $action = ( !empty($lang[$action]) ) ? $lang[$action] : preg_replace('/_/', ' ', $action); + $action = ( !empty($user->lang[$action]) ) ? $user->lang[$action] : preg_replace('/_/', ' ', $action); $cell_bg = ( $cell_bg == 'row1' ) ? 'row2' : 'row1'; ?> @@ -225,7 +219,7 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) else { // Couldn't open Avatar dir. - $avatar_dir_size = $lang['Not_available']; + $avatar_dir_size = $user->lang['Not_available']; } if ( $posts_per_day > $total_posts ) @@ -283,12 +277,12 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) } else { - $dbsize = $lang['Not_available']; + $dbsize = $user->lang['Not_available']; } } else { - $dbsize = $lang['Not_available']; + $dbsize = $user->lang['Not_available']; } } else if ( preg_match('/^mssql/', SQL_LAYER) ) @@ -297,11 +291,11 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) FROM sysfiles"; $result = $db->sql_query($sql); - $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $lang['Not_available']; + $dbsize = ( $row = $db->sql_fetchrow($result) ) ? intval($row['dbsize']) : $user->lang['Not_available']; } else { - $dbsize = $lang['Not_available']; + $dbsize = $user->lang['Not_available']; } if ( is_int($dbsize) ) @@ -309,7 +303,7 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) $dbsize = ( $dbsize >= 1048576 ) ? sprintf('%.2f MB', ( $dbsize / 1048576 )) : ( ( $dbsize >= 1024 ) ? sprintf('%.2f KB', ( $dbsize / 1024 )) : sprintf('%.2f Bytes', $dbsize) ); } - page_header($lang['Admin_Index']); + page_header($user->lang['Admin_Index']); ?> @@ -325,64 +319,64 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) //--> </script> -<h1><?php echo $lang['Welcome_phpBB']; ?></h1> +<h1><?php echo $user->lang['Welcome_phpBB']; ?></h1> -<p><?php echo $lang['Admin_intro']; ?></p> +<p><?php echo $user->lang['Admin_intro']; ?></p> -<h1><?php echo $lang['Forum_stats']; ?></h1> +<h1><?php echo $user->lang['Forum_stats']; ?></h1> <table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> - <th width="25%" nowrap="nowrap" height="25"><?php echo $lang['Statistic']; ?></th> - <th width="25%"><?php echo $lang['Value']; ?></th> - <th width="25%" nowrap="nowrap"><?php echo $lang['Statistic']; ?></th> - <th width="25%"><?php echo $lang['Value']; ?></th> + <th width="25%" nowrap="nowrap" height="25"><?php echo $user->lang['Statistic']; ?></th> + <th width="25%"><?php echo $user->lang['Value']; ?></th> + <th width="25%" nowrap="nowrap"><?php echo $user->lang['Statistic']; ?></th> + <th width="25%"><?php echo $user->lang['Value']; ?></th> </tr> <tr> - <td class="row1" nowrap="nowrap"><?php echo $lang['Number_posts']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Number_posts']; ?>:</td> <td class="row2"><b><?php echo $total_posts; ?></b></td> - <td class="row1" nowrap="nowrap"><?php echo $lang['Posts_per_day']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Posts_per_day']; ?>:</td> <td class="row2"><b><?php echo $posts_per_day; ?></b></td> </tr> <tr> - <td class="row1" nowrap="nowrap"><?php echo $lang['Number_topics']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Number_topics']; ?>:</td> <td class="row2"><b><?php echo $total_topics; ?></b></td> - <td class="row1" nowrap="nowrap"><?php echo $lang['Topics_per_day']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Topics_per_day']; ?>:</td> <td class="row2"><b><?php echo $topics_per_day; ?></b></td> </tr> <tr> - <td class="row1" nowrap="nowrap"><?php echo $lang['Number_users']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Number_users']; ?>:</td> <td class="row2"><b><?php echo $total_users; ?></b></td> - <td class="row1" nowrap="nowrap"><?php echo $lang['Users_per_day']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Users_per_day']; ?>:</td> <td class="row2"><b><?php echo $users_per_day; ?></b></td> </tr> <tr> - <td class="row1" nowrap="nowrap"><?php echo $lang['Board_started']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Board_started']; ?>:</td> <td class="row2"><b><?php echo $start_date; ?></b></td> - <td class="row1" nowrap="nowrap"><?php echo $lang['Avatar_dir_size']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Avatar_dir_size']; ?>:</td> <td class="row2"><b><?php echo $avatar_dir_size; ?></b></td> </tr> <tr> - <td class="row1" nowrap="nowrap"><?php echo $lang['Database_size']; ?>:</td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Database_size']; ?>:</td> <td class="row2"><b><?php echo $dbsize; ?></b></td> - <td class="row1" nowrap="nowrap"><?php echo $lang['Gzip_compression']; ?>:</td> - <td class="row2"><b><?php echo ( $board_config['gzip_compress'] ) ? $lang['ON'] : $lang['OFF']; ?></b></td> + <td class="row1" nowrap="nowrap"><?php echo $user->lang['Gzip_compression']; ?>:</td> + <td class="row2"><b><?php echo ( $board_config['gzip_compress'] ) ? $user->lang['ON'] : $user->lang['OFF']; ?></b></td> </tr> <!-- tr> - <td class="row1" colspan="4"><?php echo sprintf($lang['Record_online_users'], $board_config['record_online_users'], $user->format_date($board_config['record_online_date'])); ?></td> + <td class="row1" colspan="4"><?php echo sprintf($user->lang['Record_online_users'], $board_config['record_online_users'], $user->format_date($board_config['record_online_date'])); ?></td> </tr --> </table> -<h1><?php echo $lang['Admin_log']; ?></h1> +<h1><?php echo $user->lang['Admin_log']; ?></h1> -<p><?php echo $lang['Admin_log_index_explain']; ?></p> +<p><?php echo $user->lang['Admin_log_index_explain']; ?></p> <table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> - <th width="15%" height="25" nowrap="nowrap"><?php echo $lang['Username']; ?></th> - <th width="15%"><?php echo $lang['IP']; ?></th> - <th width="20%"><?php echo $lang['Time']; ?></th> - <th width="45%" nowrap="nowrap"><?php echo $lang['Action']; ?></th> + <th width="15%" height="25" nowrap="nowrap"><?php echo $user->lang['Username']; ?></th> + <th width="15%"><?php echo $user->lang['IP']; ?></th> + <th width="20%"><?php echo $user->lang['Time']; ?></th> + <th width="45%" nowrap="nowrap"><?php echo $user->lang['Action']; ?></th> </tr> <?php @@ -406,15 +400,15 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) ?> </table> -<h1><?php echo $lang['Inactive_users']; ?></h1> +<h1><?php echo $user->lang['Inactive_users']; ?></h1> -<p><?php echo $lang['Inactive_users_explain']; ?></p> +<p><?php echo $user->lang['Inactive_users_explain']; ?></p> <form method="post" name="inactive" action="<?php echo "index.$phpEx$SID&pane=right"; ?>"><table class="bg" width="100%" cellpadding="4" cellspacing="1" border="0"> <tr> - <th width="45%" height="25" nowrap="nowrap"><?php echo $lang['Username']; ?></th> - <th width="45%"><?php echo $lang['Joined']; ?></th> - <th width="5%" nowrap="nowrap"><?php echo $lang['Mark']; ?></th> + <th width="45%" height="25" nowrap="nowrap"><?php echo $user->lang['Username']; ?></th> + <th width="45%"><?php echo $user->lang['Joined']; ?></th> + <th width="5%" nowrap="nowrap"><?php echo $user->lang['Mark']; ?></th> </tr> <?php @@ -454,7 +448,7 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) ?> <tr> - <td class="row1" colspan="3" align="center"><?php echo $lang['No_inactive_users']; ?></td> + <td class="row1" colspan="3" align="center"><?php echo $user->lang['No_inactive_users']; ?></td> </tr> <?php @@ -465,7 +459,7 @@ elseif ( isset($_GET['pane']) && $_GET['pane'] == 'right' ) <table width="100%" cellspacing="1" cellpadding="4" border="0" align="center"> <tr> - <td align="right" valign="top" nowrap="nowrap"><b><span class="gensmall"><a href="javascript:marklist(true);" class="gensmall"><?php echo $lang['Mark_all']; ?></a> :: <a href="javascript:marklist(false);" class="gensmall"><?php echo $lang['Unmark_all']; ?></a></span></b></td> + <td align="right" valign="top" nowrap="nowrap"><b><span class="gensmall"><a href="javascript:marklist(true);" class="gensmall"><?php echo $user->lang['Mark_all']; ?></a> :: <a href="javascript:marklist(false);" class="gensmall"><?php echo $user->lang['Unmark_all']; ?></a></span></b></td> </tr> </table></form> @@ -481,12 +475,12 @@ else // header("Expires: " . gmdate("D, d M Y H:i:s", time()) . " GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); - header("Content-type: text/html; charset=" . $lang['ENCODING']); + header("Content-type: text/html; charset=" . $user->lang['ENCODING']); ?> <html> <head> -<title><?php echo $lang['Admin_title']; ?></title> +<title><?php echo $user->lang['Admin_title']; ?></title> </head> <frameset rows="60, *" border="0" framespacing="0" frameborder="NO"> @@ -499,7 +493,7 @@ else <noframes> <body bgcolor="white" text="#000000"> - <p><?php echo $lang['No_frames']; ?></p> + <p><?php echo $user->lang['No_frames']; ?></p> </body> </noframes> </html> diff --git a/phpBB/admin/pagestart.php b/phpBB/admin/pagestart.php index b640029279..f08aaff80a 100644 --- a/phpBB/admin/pagestart.php +++ b/phpBB/admin/pagestart.php @@ -27,24 +27,20 @@ if ( !defined('IN_PHPBB') ) define('IN_ADMIN', true); include($phpbb_root_path . 'common.'.$phpEx); -// // Start session management -// -$userdata = $session->start($update); -$auth->acl($userdata, false, 'a_'); -$user = new user($userdata); -// +$user->start($update); +$user->setup(); +$auth->acl($user->data); // End session management -// // // If session_ids do not match, rewrite the URL correctly then redirect the user // -if ($_REQUEST['sid'] != $userdata['session_id']) +if ($_REQUEST['sid'] != $user->data['session_id']) { $url = preg_replace('/sid=([^&]*)(&?)/i', '', $_SERVER['REQUEST_URI']); $url = preg_replace('/\?$/', '', $url); - $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $userdata['session_id']; + $url .= ((strpos($url, '?')) ? '&' : '?') . 'sid=' . $user->data['session_id']; redirect($url); } @@ -52,7 +48,7 @@ if ($_REQUEST['sid'] != $userdata['session_id']) // Functions function page_header($sub_title, $meta = '', $table_html = true) { - global $board_config, $db, $lang, $phpEx; + global $board_config, $db, $user, $phpEx; define('HEADER_INC', true); @@ -65,13 +61,13 @@ function page_header($sub_title, $meta = '', $table_html = true) } } - header("Content-type: text/html; charset=" . $lang['ENCODING']); + header("Content-type: text/html; charset=" . $user->lang['ENCODING']); ?> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> -<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $lang['ENCODING']; ?>"> +<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $user->lang['ENCODING']; ?>"> <meta http-equiv="Content-Style-Type" content="text/css"> <link rel="stylesheet" href="subSilver.css" type="text/css"> <?php @@ -115,7 +111,7 @@ td.cat { background-image: url('images/cellpic1.gif') } function page_footer($copyright_html = true) { - global $board_config, $db, $lang, $phpEx; + global $board_config, $db, $phpEx; // Close our DB connection. $db->sql_close(); @@ -146,7 +142,7 @@ function page_footer($copyright_html = true) function page_message($title, $message, $show_header = false) { - global $phpEx, $SID, $lang; + global $phpEx, $SID, $user; if ( $show_header ) { @@ -156,7 +152,7 @@ function page_message($title, $message, $show_header = false) <table width="100%" cellspacing="0" cellpadding="0" border="0"> <tr> <td><a href="../index.<?php echo $phpEx . $SID; ?>"><img src="images/header_left.jpg" width="200" height="60" alt="phpBB Logo" title="phpBB Logo" border="0"/></a></td> - <td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $lang['Admin_title']; ?></span> </td> + <td width="100%" background="images/header_bg.jpg" height="60" align="right" nowrap="nowrap"><span class="maintitle"><?php echo $user->lang['Admin_title']; ?></span> </td> </tr> </table> @@ -185,7 +181,7 @@ function page_message($title, $message, $show_header = false) function add_admin_log() { - global $db, $userdata, $user_ip; + global $db, $user; $arguments = func_get_args(); @@ -193,7 +189,7 @@ function add_admin_log() $data = ( !sizeof($arguments) ) ? '' : addslashes(serialize($arguments)); $sql = "INSERT INTO " . LOG_ADMIN_TABLE . " (user_id, log_ip, log_time, log_operation, log_data) - VALUES (" . $userdata['user_id'] . ", '$user_ip', " . time() . ", '$action', '$data')"; + VALUES (" . $user->data['user_id'] . ", '$user->ip', " . time() . ", '$action', '$data')"; $db->sql_query($sql); return; @@ -201,7 +197,7 @@ function add_admin_log() function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id = 0, $limit_days = 0, $sort_by = 'l.log_time DESC') { - global $db, $lang, $phpEx, $SID; + global $db, $user, $phpEx, $SID; $table_sql = ( $mode == 'admin' ) ? LOG_ADMIN_TABLE : LOG_MOD_TABLE; $forum_sql = ( $mode == 'mod' && $forum_id ) ? "AND l.forum_id = $forum_id" : ''; @@ -227,7 +223,7 @@ function view_log($mode, &$log, &$log_count, $limit = 0, $offset = 0, $forum_id $log[$i]['ip'] = $row['log_ip']; $log[$i]['time'] = $row['log_time']; - $log[$i]['action'] = ( !empty($lang[$row['log_operation']]) ) ? $lang[$row['log_operation']] : ucfirst(str_replace('_', ' ', $row['log_operation'])); + $log[$i]['action'] = ( !empty($user->lang[$row['log_operation']]) ) ? $user->lang[$row['log_operation']] : ucfirst(str_replace('_', ' ', $row['log_operation'])); if ( !empty($row['log_data']) ) { |