mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
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
This commit is contained in:
parent
4887cf1e49
commit
0e9f0ac4ec
52 changed files with 2146 additions and 2127 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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';
|
||||
<?php
|
||||
|
||||
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>';
|
||||
}
|
||||
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>
|
||||
|
||||
|
|
|
@ -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_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' => $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_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' => $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_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' => $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_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>
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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']) )
|
||||
{
|
||||
|
|
|
@ -28,6 +28,14 @@ error_reporting(E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitia
|
|||
//error_reporting(E_ALL);
|
||||
set_magic_quotes_runtime(0);
|
||||
|
||||
// If magic quotes is off, addslashes
|
||||
if ( !get_magic_quotes_gpc() )
|
||||
{
|
||||
$_GET = slash_input_data($_GET);
|
||||
$_POST = slash_input_data($_POST);
|
||||
$_COOKIE = slash_input_data($_COOKIE);
|
||||
}
|
||||
|
||||
require($phpbb_root_path . 'config.'.$phpEx);
|
||||
|
||||
if ( !defined('PHPBB_INSTALLED') )
|
||||
|
@ -36,12 +44,17 @@ if ( !defined('PHPBB_INSTALLED') )
|
|||
exit;
|
||||
}
|
||||
|
||||
//set_error_handler('message');
|
||||
// Set PHP error handler to ours
|
||||
set_error_handler('msg_handler');
|
||||
|
||||
// Define some constants/variables
|
||||
define('ANONYMOUS', 0);
|
||||
$board_config = array();
|
||||
$theme = array();
|
||||
$lang = array();
|
||||
|
||||
// User related
|
||||
define('ANONYMOUS', 0);
|
||||
|
||||
define('USER_ACTIVATION_NONE', 0);
|
||||
define('USER_ACTIVATION_SELF', 1);
|
||||
define('USER_ACTIVATION_ADMIN', 2);
|
||||
|
@ -53,10 +66,9 @@ define('USER_AVATAR_REMOTE', 2);
|
|||
define('USER_AVATAR_GALLERY', 3);
|
||||
|
||||
// ACL
|
||||
define('ACL_PREVENT', 1);
|
||||
define('ACL_DENY', 2);
|
||||
define('ACL_ALLOW', 4);
|
||||
define('ACL_PERMIT', 8);
|
||||
define('ACL_DENY', 0);
|
||||
define('ACL_ALLOW', 1);
|
||||
define('ACL_INHERIT', 2);
|
||||
|
||||
// Group settings
|
||||
define('GROUP_OPEN', 0);
|
||||
|
@ -123,51 +135,20 @@ define('VOTE_DESC_TABLE', $table_prefix.'vote_desc');
|
|||
define('VOTE_RESULTS_TABLE', $table_prefix.'vote_results');
|
||||
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
|
||||
|
||||
// If magic quotes is off, addslashes
|
||||
if ( !get_magic_quotes_gpc() )
|
||||
{
|
||||
$HTTP_GET_VARS = slash_input_data($HTTP_GET_VARS);
|
||||
$HTTP_POST_VARS = slash_input_data($HTTP_POST_VARS);
|
||||
$HTTP_COOKIE_VARS = slash_input_data($HTTP_COOKIE_VARS);
|
||||
}
|
||||
|
||||
$board_config = array();
|
||||
$userdata = array();
|
||||
$theme = array();
|
||||
$images = array();
|
||||
$lang = array();
|
||||
|
||||
// Include files
|
||||
require($phpbb_root_path . 'includes/template.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/session.'.$phpEx);
|
||||
require($phpbb_root_path . 'includes/functions.'.$phpEx);
|
||||
require($phpbb_root_path . 'db/' . $dbms . '.'.$phpEx);
|
||||
require($phpbb_root_path . 'config_cache.'.$phpEx);
|
||||
|
||||
// Instantiate some basic classes
|
||||
$session = new session();
|
||||
$user = new user();
|
||||
$auth = new auth();
|
||||
$template = new Template();
|
||||
$db = new sql_db($dbhost, $dbuser, $dbpasswd, $dbname, $dbport, false);
|
||||
|
||||
// Obtain users IP
|
||||
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']) || !empty($_ENV['HTTP_X_FORWARDED_FOR']))
|
||||
{
|
||||
$user_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
|
||||
$x_ip = ( !empty($_SERVER['HTTP_X_FORWARDED_FOR']) ) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_ENV['HTTP_X_FORWARDED_FOR'];
|
||||
|
||||
if ( preg_match('/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/', $x_ip, $ip_list) )
|
||||
{
|
||||
$private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/');
|
||||
$user_ip = preg_replace($private_ip, $client_ip, $ip_list[1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$user_ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : ( ( !empty($_ENV['REMOTE_ADDR']) ) ? $_ENV['REMOTE_ADDR'] : $REMOTE_ADDR );
|
||||
}
|
||||
|
||||
// Setup forum wide options, if this fails we output a CRITICAL_ERROR since
|
||||
// basic forum information is not available
|
||||
// Obtain boardwide default config
|
||||
$sql = "SELECT *
|
||||
FROM " . CONFIG_TABLE;
|
||||
$result = $db->sql_query($sql, false);
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
<?php
|
||||
// phpBB 2.x auto-generated config file
|
||||
// Do not change anything in this file!
|
||||
$dbms = "mysql";
|
||||
|
||||
$dbhost = "localhost";
|
||||
$dbname = "phpbb_test";
|
||||
$dbuser = "devhttp";
|
||||
$dbpasswd = "efx2KarizonaD";
|
||||
|
||||
$table_prefix = "phpbb_";
|
||||
|
||||
define('PHPBB_INSTALLED', true);
|
||||
define('DEBUG', 1);
|
||||
?>
|
|
@ -44,7 +44,7 @@ class sql_db
|
|||
$this->persistency = $persistency;
|
||||
$this->user = $sqluser;
|
||||
$this->password = $sqlpassword;
|
||||
$this->server = $sqlserver . ( ( $port ) ? ':' . $port : '' );
|
||||
$this->server = $sqlserver . ( ( $port ) ? ':' . $port : '' );
|
||||
$this->dbname = $database;
|
||||
|
||||
$this->db_connect_id = ( $this->persistency ) ? @mysql_pconnect($this->server, $this->user, $this->password) : @mysql_connect($this->server, $this->user, $this->password);
|
||||
|
@ -117,7 +117,7 @@ class sql_db
|
|||
//
|
||||
// Base query method
|
||||
//
|
||||
function sql_query($query = '', $transaction = false)
|
||||
function sql_query($query = '')
|
||||
{
|
||||
if ($query != '')
|
||||
{
|
||||
|
@ -181,10 +181,10 @@ class sql_db
|
|||
return false;
|
||||
}
|
||||
|
||||
return ( $this->query_result) ? $this->query_result : ( ( $transaction == END_TRANSACTION ) ? true : false );
|
||||
return ( $this->query_result) ? $this->query_result : fals;
|
||||
}
|
||||
|
||||
function sql_query_limit($query = '', $total, $offset = 0, $transaction = false)
|
||||
function sql_query_limit($query = '', $total, $offset = 0)
|
||||
{
|
||||
if ( $query != '' )
|
||||
{
|
||||
|
@ -205,7 +205,7 @@ class sql_db
|
|||
}
|
||||
|
||||
// Idea for this from Ikonboard
|
||||
function sql_query_array($query = '', $assoc_ary = false, $transaction = false)
|
||||
function sql_query_array($query = '', $assoc_ary = false)
|
||||
{
|
||||
if (!is_array($assoc_ary))
|
||||
{
|
||||
|
@ -392,8 +392,8 @@ class sql_db
|
|||
$this_page = ( !empty($_SERVER['PHP_SELF']) ) ? $_SERVER['PHP_SELF'] : $_ENV['PHP_SELF'];
|
||||
$this_page .= '&' . ( ( !empty($_SERVER['QUERY_STRING']) ) ? $_SERVER['QUERY_STRING'] : $_ENV['QUERY_STRING'] );
|
||||
|
||||
$message = '<u>SQL ERROR</u> [ ' . SQL_LAYER . ' ]<br /><br />' . @mysql_error() . '<br /><br /><u>PAGE</u><br /><br />' . $this_page . ( ( $sql != '' ) ? '<br /><br /><u>SQL</u><br /><br />' . $sql : '' ) . '<br />';
|
||||
message_die(ERROR, $message);
|
||||
$message = '<u>SQL ERROR</u> [ ' . SQL_LAYER . ' ]<br /><br />' . @mysql_error() . '<br /><br /><u>CALLING PAGE</u><br /><br />' . $this_page . ( ( $sql != '' ) ? '<br /><br /><u>SQL</u><br /><br />' . $sql : '' ) . '<br />';
|
||||
trigger_error($message, E_USER_ERROR);
|
||||
}
|
||||
|
||||
$result['message'] = @mysql_error();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
// Remove or comment the next line (die(".... ) to enable this script.
|
||||
// Do NOT FORGET to either remove this script or disable it after you have used it.
|
||||
//
|
||||
die("Please read the first lines of this script for instructions on how to enable it");
|
||||
//die("Please read the first lines of this script for instructions on how to enable it");
|
||||
|
||||
$vars = array('lang_main' => 'lang', 'lang_admin' => 'lang', 'lang_faq' => 'faq', 'lang_bbcode' => 'faq');
|
||||
|
||||
|
@ -36,7 +36,7 @@ $dir = opendir($dirname);
|
|||
|
||||
while ( $file = readdir($dir) )
|
||||
{
|
||||
if ( ereg("^lang_", $file) && !is_file($dirname . "/" . $file) && !is_link($dirname . "/" . $file) )
|
||||
if ( $file != 'CVS' && !is_file($dirname . "/" . $file) && !is_link($dirname . "/" . $file) )
|
||||
{
|
||||
foreach($vars as $lang_file => $lang_var)
|
||||
{
|
||||
|
|
|
@ -25,9 +25,9 @@ include($phpbb_root_path . 'extension.inc');
|
|||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
// Load the appropriate faq file
|
||||
|
|
|
@ -111,8 +111,9 @@ function generate_user_info(&$row, $date_format, $group_mod, &$from, &$posts, &$
|
|||
//
|
||||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
//
|
||||
// End session management
|
||||
//
|
||||
|
@ -125,40 +126,39 @@ $server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config
|
|||
|
||||
$server_url = $server_protocol . $server_name . $server_port . $script_name;
|
||||
|
||||
if ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) || isset($HTTP_POST_VARS[POST_GROUPS_URL]) )
|
||||
if ( isset($_GET[POST_GROUPS_URL]) || isset($_POST[POST_GROUPS_URL]) )
|
||||
{
|
||||
$group_id = ( isset($HTTP_GET_VARS[POST_GROUPS_URL]) ) ? intval($HTTP_GET_VARS[POST_GROUPS_URL]) : intval($HTTP_POST_VARS[POST_GROUPS_URL]);
|
||||
$group_id = ( isset($_GET[POST_GROUPS_URL]) ) ? intval($_GET[POST_GROUPS_URL]) : intval($_POST[POST_GROUPS_URL]);
|
||||
}
|
||||
else
|
||||
{
|
||||
$group_id = '';
|
||||
}
|
||||
|
||||
if ( isset($HTTP_POST_VARS['mode']) || isset($HTTP_GET_VARS['mode']) )
|
||||
if ( isset($_POST['mode']) || isset($_GET['mode']) )
|
||||
{
|
||||
$mode = ( isset($HTTP_POST_VARS['mode']) ) ? $HTTP_POST_VARS['mode'] : $HTTP_GET_VARS['mode'];
|
||||
$mode = ( isset($_POST['mode']) ) ? $_POST['mode'] : $_GET['mode'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mode = '';
|
||||
}
|
||||
|
||||
$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : 0;
|
||||
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : 0;
|
||||
$confirm = ( isset($_POST['confirm']) ) ? TRUE : 0;
|
||||
$cancel = ( isset($_POST['cancel']) ) ? TRUE : 0;
|
||||
|
||||
$start = ( isset($HTTP_GET_VARS['start']) ) ? intval($HTTP_GET_VARS['start']) : 0;
|
||||
$start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0;
|
||||
|
||||
//
|
||||
// Default var values
|
||||
//
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
$is_moderator = FALSE;
|
||||
|
||||
if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
|
||||
if ( isset($_POST['groupstatus']) && $group_id )
|
||||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
if ( !$user->data['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
redirect("login.$phpEx$SIDredirect=groupcp.$phpEx&g=$group_id");
|
||||
}
|
||||
|
||||
$sql = "SELECT group_moderator
|
||||
|
@ -171,7 +171,7 @@ if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
|
|||
|
||||
$row = $db->sql_fetchrow($result);
|
||||
|
||||
if ( $row['group_moderator'] != $userdata['user_id'] && $userdata['user_level'] != ADMIN )
|
||||
if ( $row['group_moderator'] != $user->data['user_id'] && $user->data['user_level'] != ADMIN )
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
|
||||
|
@ -183,7 +183,7 @@ if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
|
|||
}
|
||||
|
||||
$sql = "UPDATE " . GROUPS_TABLE . "
|
||||
SET group_type = " . intval($HTTP_POST_VARS['group_type']) . "
|
||||
SET group_type = " . intval($_POST['group_type']) . "
|
||||
WHERE group_id = $group_id";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
|
@ -199,15 +199,15 @@ if ( isset($HTTP_POST_VARS['groupstatus']) && $group_id )
|
|||
message_die(MESSAGE, $message);
|
||||
|
||||
}
|
||||
else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
|
||||
else if ( isset($_POST['joingroup']) && $group_id )
|
||||
{
|
||||
//
|
||||
// First, joining a group
|
||||
// If the user isn't logged in redirect them to login
|
||||
//
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
if ( !$user->data['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
redirect("login.$phpEx$SID&redirect=groupcp.$phpEx&g=$group_id");
|
||||
}
|
||||
|
||||
$sql = "SELECT ug.user_id, g.group_type
|
||||
|
@ -226,7 +226,7 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
|
|||
{
|
||||
do
|
||||
{
|
||||
if ( $userdata['user_id'] == $row['user_id'] )
|
||||
if ( $user->data['user_id'] == $row['user_id'] )
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'META' => '<meta http-equiv="refresh" content="3;url=' . append_sid("index.$phpEx") . '">')
|
||||
|
@ -255,7 +255,7 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
|
|||
}
|
||||
|
||||
$sql = "INSERT INTO " . USER_GROUP_TABLE . " (group_id, user_id, user_pending)
|
||||
VALUES ($group_id, " . $userdata['user_id'] . ", 1)";
|
||||
VALUES ($group_id, " . $user->data['user_id'] . ", 1)";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(ERROR, "Error inserting user group subscription", "", __LINE__, __FILE__, $sql);
|
||||
|
@ -300,7 +300,7 @@ else if ( isset($HTTP_POST_VARS['joingroup']) && $group_id )
|
|||
|
||||
message_die(MESSAGE, $message);
|
||||
}
|
||||
else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending']) && $group_id )
|
||||
else if ( isset($_POST['unsub']) || isset($_POST['unsubpending']) && $group_id )
|
||||
{
|
||||
//
|
||||
// Second, unsubscribing from a group
|
||||
|
@ -308,28 +308,28 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
|
|||
//
|
||||
if ( $cancel )
|
||||
{
|
||||
header($header_location . append_sid("groupcp.$phpEx", true));
|
||||
redirect("groupcp.$phpEx$SID");
|
||||
}
|
||||
elseif ( !$userdata['session_logged_in'] )
|
||||
elseif ( !$user->data['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
redirect("login.$phpEx$SID&redirect=groupcp.$phpEx&g=$group_id");
|
||||
}
|
||||
|
||||
if ( $confirm )
|
||||
{
|
||||
$sql = "DELETE FROM " . USER_GROUP_TABLE . "
|
||||
WHERE user_id = " . $userdata['user_id'] . "
|
||||
WHERE user_id = " . $user->data['user_id'] . "
|
||||
AND group_id = $group_id";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(ERROR, 'Could not delete group memebership data', '', __LINE__, __FILE__, $sql);
|
||||
}
|
||||
|
||||
if ( $userdata['user_level'] != ADMIN && $userdata['user_level'] == MOD )
|
||||
if ( $user->data['user_level'] != ADMIN && $user->data['user_level'] == MOD )
|
||||
{
|
||||
$sql = "SELECT COUNT(auth_mod) AS is_auth_mod
|
||||
FROM " . AUTH_ACCESS_TABLE . " aa, " . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.user_id = " . $userdata['user_id'] . "
|
||||
WHERE ug.user_id = " . $user->data['user_id'] . "
|
||||
AND aa.group_id = ug.group_id
|
||||
AND aa.auth_mod = 1";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
|
@ -341,7 +341,7 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
|
|||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_level = " . USER . "
|
||||
WHERE user_id = " . $userdata['user_id'];
|
||||
WHERE user_id = " . $user->data['user_id'];
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(ERROR, 'Could not update user level', '', __LINE__, __FILE__, $sql);
|
||||
|
@ -359,7 +359,7 @@ else if ( isset($HTTP_POST_VARS['unsub']) || isset($HTTP_POST_VARS['unsubpending
|
|||
}
|
||||
else
|
||||
{
|
||||
$unsub_msg = ( isset($HTTP_POST_VARS['unsub']) ) ? $lang['Confirm_unsub'] : $lang['Confirm_unsub_pending'];
|
||||
$unsub_msg = ( isset($_POST['unsub']) ) ? $lang['Confirm_unsub'] : $lang['Confirm_unsub_pending'];
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" /><input type="hidden" name="unsub" value="1" />';
|
||||
|
||||
|
@ -391,11 +391,11 @@ else if ( $group_id )
|
|||
// Did the group moderator get here through an email?
|
||||
// If so, check to see if they are logged in.
|
||||
//
|
||||
if ( isset($HTTP_GET_VARS['validate']) )
|
||||
if ( isset($_GET['validate']) )
|
||||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
if ( !$user->data['user_id'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
redirect("login.$phpEx$SID&redirect=groupcp.$phpEx&g=$group_id");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -444,7 +444,7 @@ else if ( $group_id )
|
|||
{
|
||||
$group_moderator = $group_info['group_moderator'];
|
||||
|
||||
if ( $group_moderator == $userdata['user_id'] || $userdata['user_level'] == ADMIN )
|
||||
if ( $group_moderator == $user->data['user_id'] || $user->data['user_level'] == ADMIN )
|
||||
{
|
||||
$is_moderator = TRUE;
|
||||
}
|
||||
|
@ -452,11 +452,11 @@ else if ( $group_id )
|
|||
//
|
||||
// Handle Additions, removals, approvals and denials
|
||||
//
|
||||
if ( !empty($HTTP_POST_VARS['add']) || !empty($HTTP_POST_VARS['remove']) || isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) )
|
||||
if ( !empty($_POST['add']) || !empty($_POST['remove']) || isset($_POST['approve']) || isset($_POST['deny']) )
|
||||
{
|
||||
if ( !$userdata['session_logged_in'] )
|
||||
if ( !$user->data['session_logged_in'] )
|
||||
{
|
||||
header($header_location . append_sid("login.$phpEx?redirect=groupcp.$phpEx&" . POST_GROUPS_URL . "=$group_id", true));
|
||||
redirect("login.$phpEx$SIDredirect=groupcp.$phpEx&g=$group_id");
|
||||
}
|
||||
|
||||
if ( !$is_moderator )
|
||||
|
@ -470,9 +470,9 @@ else if ( $group_id )
|
|||
message_die(MESSAGE, $message);
|
||||
}
|
||||
|
||||
if ( isset($HTTP_POST_VARS['add']) )
|
||||
if ( isset($_POST['add']) )
|
||||
{
|
||||
$username = ( isset($HTTP_POST_VARS['username']) ) ? $HTTP_POST_VARS['username'] : "";
|
||||
$username = ( isset($_POST['username']) ) ? $_POST['username'] : "";
|
||||
|
||||
$sql = "SELECT user_id, user_email, user_lang, user_level
|
||||
FROM " . USERS_TABLE . "
|
||||
|
@ -583,10 +583,10 @@ else if ( $group_id )
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( ( ( isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) && isset($HTTP_POST_VARS['pending_members']) ) || ( isset($HTTP_POST_VARS['remove']) && isset($HTTP_POST_VARS['members']) ) )
|
||||
if ( ( ( isset($_POST['approve']) || isset($_POST['deny']) ) && isset($_POST['pending_members']) ) || ( isset($_POST['remove']) && isset($_POST['members']) ) )
|
||||
{
|
||||
|
||||
$members = ( isset($HTTP_POST_VARS['approve']) || isset($HTTP_POST_VARS['deny']) ) ? $HTTP_POST_VARS['pending_members'] : $HTTP_POST_VARS['members'];
|
||||
$members = ( isset($_POST['approve']) || isset($_POST['deny']) ) ? $_POST['pending_members'] : $_POST['members'];
|
||||
|
||||
$sql_in = '';
|
||||
for($i = 0; $i < count($members); $i++)
|
||||
|
@ -594,7 +594,7 @@ else if ( $group_id )
|
|||
$sql_in .= ( ( $sql_in != '' ) ? ', ' : '' ) . $members[$i];
|
||||
}
|
||||
|
||||
if ( isset($HTTP_POST_VARS['approve']) )
|
||||
if ( isset($_POST['approve']) )
|
||||
{
|
||||
if ( $group_info['auth_mod'] )
|
||||
{
|
||||
|
@ -616,7 +616,7 @@ else if ( $group_id )
|
|||
FROM ". USERS_TABLE . "
|
||||
WHERE user_id IN ($sql_in)";
|
||||
}
|
||||
else if ( isset($HTTP_POST_VARS['deny']) || isset($HTTP_POST_VARS['remove']) )
|
||||
else if ( isset($_POST['deny']) || isset($_POST['remove']) )
|
||||
{
|
||||
if ( $group_info['auth_mod'] )
|
||||
{
|
||||
|
@ -678,7 +678,7 @@ else if ( $group_id )
|
|||
//
|
||||
// Email users when they are approved
|
||||
//
|
||||
if ( isset($HTTP_POST_VARS['approve']) )
|
||||
if ( isset($_POST['approve']) )
|
||||
{
|
||||
if ( !($result = $db->sql_query($sql_select)) )
|
||||
{
|
||||
|
@ -711,7 +711,7 @@ else if ( $group_id )
|
|||
$email_headers = 'From: ' . $board_config['board_email'] . "\nReturn-Path: " . $board_config['board_email'] . "\nBcc: " . $email_addresses . "\r\n";
|
||||
|
||||
$emailer->use_template('group_approved');
|
||||
$emailer->email_address($userdata['user_email']);
|
||||
$emailer->email_address($user->data['user_email']);
|
||||
$emailer->set_subject();//$lang['Group_approved']
|
||||
$emailer->extra_headers($email_headers);
|
||||
|
||||
|
@ -807,7 +807,7 @@ else if ( $group_id )
|
|||
{
|
||||
for($i = 0; $i < $members_count; $i++)
|
||||
{
|
||||
if ( $group_members[$i]['user_id'] == $userdata['user_id'] && $userdata['session_logged_in'] )
|
||||
if ( $group_members[$i]['user_id'] == $user->data['user_id'] && $user->data['session_logged_in'] )
|
||||
{
|
||||
$is_group_member = TRUE;
|
||||
}
|
||||
|
@ -819,19 +819,19 @@ else if ( $group_id )
|
|||
{
|
||||
for($i = 0; $i < $modgroup_pending_count; $i++)
|
||||
{
|
||||
if ( $modgroup_pending_list[$i]['user_id'] == $userdata['user_id'] && $userdata['session_logged_in'] )
|
||||
if ( $modgroup_pending_list[$i]['user_id'] == $user->data['user_id'] && $user->data['session_logged_in'] )
|
||||
{
|
||||
$is_group_pending_member = TRUE;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( $userdata['user_level'] == ADMIN )
|
||||
if ( $user->data['user_level'] == ADMIN )
|
||||
{
|
||||
$is_moderator = TRUE;
|
||||
}
|
||||
|
||||
if ( $userdata['user_id'] == $group_info['group_moderator'] )
|
||||
if ( $user->data['user_id'] == $group_info['group_moderator'] )
|
||||
{
|
||||
$is_moderator = TRUE;
|
||||
|
||||
|
@ -847,7 +847,7 @@ else if ( $group_id )
|
|||
|
||||
$s_hidden_fields = '<input type="hidden" name="' . POST_GROUPS_URL . '" value="' . $group_id . '" />';
|
||||
}
|
||||
else if ( $userdata['user_id'] == ANONYMOUS )
|
||||
else if ( $user->data['user_id'] == ANONYMOUS )
|
||||
{
|
||||
$group_details = $lang['Login_to_join'];
|
||||
$s_hidden_fields = '';
|
||||
|
@ -1143,11 +1143,11 @@ else
|
|||
// Select all group that the user is a member of or where the user has
|
||||
// a pending membership.
|
||||
//
|
||||
if ( $userdata['session_logged_in'] )
|
||||
if ( $user->data['session_logged_in'] )
|
||||
{
|
||||
$sql = "SELECT g.group_id, g.group_name, g.group_type, ug.user_pending
|
||||
FROM " . GROUPS_TABLE . " g, " . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.user_id = " . $userdata['user_id'] . "
|
||||
WHERE ug.user_id = " . $user->data['user_id'] . "
|
||||
AND ug.group_id = g.group_id
|
||||
AND g.group_single_user <> " . TRUE . "
|
||||
ORDER BY g.group_name, ug.user_id";
|
||||
|
@ -1198,7 +1198,7 @@ else
|
|||
$s_group_list_opt = '';
|
||||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
if ( $row['group_type'] != GROUP_HIDDEN || $userdata['user_level'] == ADMIN )
|
||||
if ( $row['group_type'] != GROUP_HIDDEN || $user->data['user_level'] == ADMIN )
|
||||
{
|
||||
$s_group_list_opt .='<option value="' . $row['group_id'] . '">' . $row['group_name'] . '</option>';
|
||||
}
|
||||
|
@ -1237,7 +1237,7 @@ else
|
|||
$template->assign_block_vars('switch_groups_remaining', array() );
|
||||
}
|
||||
|
||||
$s_hidden_fields = '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />';
|
||||
$s_hidden_fields = '<input type="hidden" name="sid" value="' . $user->data['session_id'] . '" />';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_GROUP_MEMBERSHIP_DETAILS' => $lang['Group_member_details'],
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
//
|
||||
// Authentication plug-ins is largely down to
|
||||
// Sergey Kanareykin, our thanks to him.
|
||||
// Sergey Kanareykin, our thanks to him.
|
||||
//
|
||||
function login_apache(&$username, &$password)
|
||||
{
|
||||
|
@ -13,7 +13,7 @@ function login_apache(&$username, &$password)
|
|||
|
||||
if ( $php_auth_user && $php_auth_pw )
|
||||
{
|
||||
$sql = "SELECT user_id, username, user_password, user_email, user_active
|
||||
$sql = "SELECT user_id, username, user_password, user_email, user_active
|
||||
FROM " . USERS_TABLE . "
|
||||
WHERE username = '" . str_replace("\'", "''", $username) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
//
|
||||
// Authentication plug-ins is largely down to
|
||||
// Sergey Kanareykin, our thanks to him.
|
||||
// Sergey Kanareykin, our thanks to him.
|
||||
//
|
||||
function login_db(&$username, &$password)
|
||||
{
|
||||
global $db, $board_config;
|
||||
|
||||
$sql = "SELECT user_id, username, user_password, user_email, user_active
|
||||
$sql = "SELECT user_id, username, user_password, user_email, user_active
|
||||
FROM " . USERS_TABLE . "
|
||||
WHERE username = '" . str_replace("\'", "''", $username) . "'";
|
||||
$result = $db->sql_query($sql);
|
||||
|
|
|
@ -47,19 +47,19 @@ function login_ldap(&$username, &$password)
|
|||
//
|
||||
function admin_ldap(&$new)
|
||||
{
|
||||
global $lang;
|
||||
global $user;
|
||||
|
||||
?>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $lang['LDAP_server']; ?>:<br /><span class="gensmall"><?php echo $lang['LDAP_server_explain']; ?></span></td>
|
||||
<td class="row1"><?php echo $user->lang['LDAP_server']; ?>:<br /><span class="gensmall"><?php echo $user->lang['LDAP_server_explain']; ?></span></td>
|
||||
<td class="row2"><input type="text" size="40" name="ldap_server" value="<?php echo $new['ldap_server']; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $lang['LDAP_dn']; ?>:<br /><span class="gensmall"><?php echo $lang['LDAP_dn_explain']; ?></span></td>
|
||||
<td class="row1"><?php echo $user->lang['LDAP_dn']; ?>:<br /><span class="gensmall"><?php echo $user->lang['LDAP_dn_explain']; ?></span></td>
|
||||
<td class="row2"><input type="text" size="40" name="ldap_base_dn" value="<?php echo $new['ldap_base_dn']; ?>" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="row1"><?php echo $lang['LDAP_uid']; ?>:<br /><span class="gensmall"><?php echo $lang['LDAP_uid_explain']; ?></span></td>
|
||||
<td class="row1"><?php echo $user->lang['LDAP_uid']; ?>:<br /><span class="gensmall"><?php echo $user->lang['LDAP_uid_explain']; ?></span></td>
|
||||
<td class="row2"><input type="text" size="40" name="ldap_uid" value="<?php echo $new['ldap_uid']; ?>" /></td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
|
@ -53,57 +53,42 @@ foreach ($forum_rows as $row)
|
|||
switch ($forum_status)
|
||||
{
|
||||
case ITEM_CATEGORY:
|
||||
$folder_image = $theme['sub_forum'];
|
||||
$folder_alt = $lang['Category'];
|
||||
$folder_image = 'sub_forum';
|
||||
$folder_alt = 'Category';
|
||||
break;
|
||||
|
||||
case ITEM_LOCKED:
|
||||
$folder_image = $theme['forum_locked'];
|
||||
$folder_alt = $lang['Forum_locked'];
|
||||
$folder_image = 'forum_locked';
|
||||
$folder_alt = 'Forum_locked';
|
||||
break;
|
||||
|
||||
default:
|
||||
$unread_topics = false;
|
||||
if ($userdata['user_id'] && $forum_last_post_time > $userdata['user_lastvisit'])
|
||||
if ($user->data['user_id'] && $forum_last_post_time > $user->data['user_lastvisit'])
|
||||
{
|
||||
$unread_topics = true;
|
||||
if (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']))
|
||||
{
|
||||
if ($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $forum_last_post_time)
|
||||
{
|
||||
$unread_topics = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($mark_topics[$forum_id]) || isset($mark_forums[$forum_id]))
|
||||
{
|
||||
if ($mark_forums[$forum_id] > $userdata['user_lastvisit'] || !max($mark_topics[$forum_id]))
|
||||
{
|
||||
$unread_topics = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$folder_image = ($unread_topics) ? $theme['forum_new'] : $theme['forum'];
|
||||
$folder_alt = ($unread_topics) ? $lang['New_posts'] : $lang['No_new_posts'];
|
||||
$folder_image = ($unread_topics) ? 'forum_new' : 'forum';
|
||||
$folder_alt = ($unread_topics) ? 'New_posts' : 'No_new_posts';
|
||||
}
|
||||
|
||||
if ($forum_last_post_id)
|
||||
{
|
||||
$last_post = create_date($board_config['default_dateformat'], $forum_last_post_time, $board_config['board_timezone']) . '<br />';
|
||||
$last_post = $user->format_date($forum_last_post_time) . '<br />';
|
||||
|
||||
$last_post .= ($forum_last_poster_id == ANONYMOUS) ? (($forum_last_poster_name != '') ? $forum_last_poster_name . ' ' : $lang['Guest'] . ' ') : '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $forum_last_poster_id . '">' . $username . '</a> ';
|
||||
$last_post .= ($forum_last_poster_id == ANONYMOUS) ? (($forum_last_poster_name != '') ? $forum_last_poster_name . ' ' : $user->lang['Guest'] . ' ') : '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $forum_last_poster_id . '">' . $username . '</a> ';
|
||||
|
||||
$last_post .= '<a href="viewtopic.' . $phpEx . '$SID&f=' . $forum_id . '&p=' . $forum_last_post_id . '#' . $forum_last_post_id . '">' . create_img($theme['goto_post_latest'], $lang['View_latest_post']) . '</a>';
|
||||
$last_post .= '<a href="viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&p=' . $forum_last_post_id . '#' . $forum_last_post_id . '">' . $user->img('goto_post_latest', 'View_latest_post') . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$last_post = $lang['No_Posts'];
|
||||
$last_post = $user->lang['No_Posts'];
|
||||
}
|
||||
|
||||
if (!empty($forum_moderators[$forum_id]))
|
||||
{
|
||||
$l_moderator = (count($forum_moderators[$forum_id]) == 1) ? $lang['Moderator'] . ': ' : $lang['Moderators'] . ': ' ;
|
||||
$l_moderator = (count($forum_moderators[$forum_id]) == 1) ? $user->lang['Moderator'] . ': ' : $user->lang['Moderators'] . ': ' ;
|
||||
$moderators_list = implode(', ', $forum_moderators[$forum_id]);
|
||||
}
|
||||
else
|
||||
|
@ -127,7 +112,7 @@ foreach ($forum_rows as $row)
|
|||
}
|
||||
$subforums_list = implode(', ', $links);
|
||||
|
||||
$l_subforums = (count($subforums[$forum_id]) == 1) ? $lang['Subforum'] . ': ' : $lang['Subforums'] . ': ';
|
||||
$l_subforums = (count($subforums[$forum_id]) == 1) ? $user->lang['Subforum'] . ': ' : $user->lang['Subforums'] . ': ';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -157,7 +142,7 @@ foreach ($forum_rows as $row)
|
|||
$template->assign_block_vars('forumrow', array(
|
||||
$forum_type_switch => TRUE,
|
||||
|
||||
'FORUM_FOLDER_IMG' => create_img($folder_image, $folder_alt),
|
||||
'FORUM_FOLDER_IMG' => $user->img($folder_image, $folder_alt),
|
||||
'FORUM_NAME' => $forum_name,
|
||||
'FORUM_DESC' => $forum_desc,
|
||||
|
||||
|
|
|
@ -103,14 +103,16 @@ function get_forum_branch($forum_id, $type='all', $order='descending', $include_
|
|||
default:
|
||||
$condition = 'f2.left_id BETWEEN f1.left_id AND f1.right_id OR f1.left_id BETWEEN f2.left_id AND f2.right_id';
|
||||
}
|
||||
$sql = 'SELECT f2.*
|
||||
FROM ' . FORUMS_TABLE . ' f1
|
||||
LEFT JOIN ' . FORUMS_TABLE . " f2 ON $condition
|
||||
WHERE f1.forum_id = $forum_id
|
||||
ORDER BY f2.left_id " . (($order == 'descending') ? 'ASC' : 'DESC');
|
||||
|
||||
$rows = array();
|
||||
|
||||
$sql = 'SELECT f2.*
|
||||
FROM ( ' . FORUMS_TABLE . ' f1
|
||||
LEFT JOIN ' . FORUMS_TABLE . " f2 ON $condition )
|
||||
WHERE f1.forum_id = $forum_id
|
||||
ORDER BY f2.left_id " . ( ($order == 'descending') ? 'ASC' : 'DESC' );
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ($row = $db->sql_fetchrow($result))
|
||||
{
|
||||
if (!$include_forum && $row['forum_id'] == $forum_id)
|
||||
|
@ -122,10 +124,8 @@ function get_forum_branch($forum_id, $type='all', $order='descending', $include_
|
|||
return $rows;
|
||||
}
|
||||
|
||||
//
|
||||
// Obtain list of moderators of each forum
|
||||
// First users, then groups ... broken into two queries
|
||||
//
|
||||
function get_moderators(&$forum_moderators, $forum_id = false)
|
||||
{
|
||||
global $SID, $db, $phpEx;
|
||||
|
@ -166,17 +166,17 @@ function get_moderators(&$forum_moderators, $forum_id = false)
|
|||
//
|
||||
function get_forum_rules($mode, &$rules, &$forum_id)
|
||||
{
|
||||
global $SID, $auth, $lang, $phpEx;
|
||||
global $SID, $auth, $user, $phpEx;
|
||||
|
||||
$rules .= ( ( $auth->acl_get('f_post', $forum_id) ) ? $lang['Rules_post_can'] : $lang['Rules_post_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_reply', $forum_id) ) ? $lang['Rules_reply_can'] : $lang['Rules_reply_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_edit', $forum_id) ) ? $lang['Rules_edit_can'] : $lang['Rules_edit_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_delete', $forum_id) || $auth->acl_get('m_delete', $forum_id) ) ? $lang['Rules_delete_can'] : $lang['Rules_delete_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_attach', $forum_id) ) ? $lang['Rules_attach_can'] : $lang['Rules_attach_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_post', $forum_id) ) ? $user->lang['Rules_post_can'] : $user->lang['Rules_post_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_reply', $forum_id) ) ? $user->lang['Rules_reply_can'] : $user->lang['Rules_reply_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_edit', $forum_id) ) ? $user->lang['Rules_edit_can'] : $user->lang['Rules_edit_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_delete', $forum_id) || $auth->acl_get('m_delete', $forum_id) ) ? $user->lang['Rules_delete_can'] : $user->lang['Rules_delete_cannot'] ) . '<br />';
|
||||
$rules .= ( ( $auth->acl_get('f_attach', $forum_id) ) ? $user->lang['Rules_attach_can'] : $user->lang['Rules_attach_cannot'] ) . '<br />';
|
||||
|
||||
if ( $auth->acl_get('a_') || $auth->acl_get('m_', $forum_id) )
|
||||
{
|
||||
$rules .= sprintf($lang['Rules_moderate'], '<a href="modcp.' . $phpEx . $SID . '&f=' . $forum_id . '">', '</a>');
|
||||
$rules .= sprintf($user->lang['Rules_moderate'], '<a href="modcp.' . $phpEx . $SID . '&f=' . $forum_id . '">', '</a>');
|
||||
}
|
||||
|
||||
return;
|
||||
|
@ -184,9 +184,9 @@ function get_forum_rules($mode, &$rules, &$forum_id)
|
|||
|
||||
function make_jumpbox($action, $forum_id = false)
|
||||
{
|
||||
global $auth, $template, $lang, $db, $nav_links, $phpEx;
|
||||
global $auth, $template, $user, $db, $nav_links, $phpEx;
|
||||
|
||||
$boxstring = '<select name="f" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option><option value="-1"> </option>';
|
||||
$boxstring = '<select name="f" onChange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $user->lang['Select_forum'] . '</option><option value="-1"> </option>';
|
||||
|
||||
$sql = 'SELECT forum_id, forum_name, forum_status, left_id, right_id
|
||||
FROM ' . FORUMS_TABLE . '
|
||||
|
@ -249,9 +249,7 @@ function make_jumpbox($action, $forum_id = false)
|
|||
$holding = '';
|
||||
}
|
||||
|
||||
//
|
||||
// TODO: do not add empty categories to nav links
|
||||
//
|
||||
$nav_links['chapter forum'][$row['forum_id']] = array (
|
||||
'url' => ($row['forum_status'] == ITEM_CATEGORY) ? "index.$phpEx$SIDc=" : "viewforum.$phpEx$SID&f=" . $row['forum_id'],
|
||||
'title' => $row['forum_name']
|
||||
|
@ -263,13 +261,13 @@ function make_jumpbox($action, $forum_id = false)
|
|||
|
||||
if (!$right)
|
||||
{
|
||||
$boxstring .= '<option value="-1">' . $lang['No_forums'] . '</option>';
|
||||
$boxstring .= '<option value="-1">' . $user->lang['No_forums'] . '</option>';
|
||||
}
|
||||
$boxstring .= '</select>';
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_GO' => $lang['Go'],
|
||||
'L_JUMP_TO' => $lang['Jump_to'],
|
||||
'L_GO' => $user->lang['Go'],
|
||||
'L_JUMP_TO' => $user->lang['Jump_to'],
|
||||
|
||||
'S_JUMPBOX_SELECT' => $boxstring,
|
||||
'S_JUMPBOX_ACTION' => $action)
|
||||
|
@ -278,16 +276,14 @@ function make_jumpbox($action, $forum_id = false)
|
|||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Pick a language, any language ...
|
||||
//
|
||||
function language_select($default, $select_name = "language", $dirname="language")
|
||||
{
|
||||
global $phpEx;
|
||||
|
||||
$dir = opendir($dirname);
|
||||
|
||||
$lang = array();
|
||||
$user = array();
|
||||
while ( $file = readdir($dir) )
|
||||
{
|
||||
if ( preg_match('#^lang_#', $file) && !is_file($dirname . '/' . $file) && !is_link($dirname . '/' . $file) )
|
||||
|
@ -295,30 +291,28 @@ function language_select($default, $select_name = "language", $dirname="language
|
|||
$filename = trim(str_replace('lang_', '', $file));
|
||||
$displayname = preg_replace('/^(.*?)_(.*)$/', '\\1 [ \\2 ]', $filename);
|
||||
$displayname = preg_replace('/\[(.*?)_(.*)\]/', '[ \\1 - \\2 ]', $displayname);
|
||||
$lang[$displayname] = $filename;
|
||||
$user->lang[$displayname] = $filename;
|
||||
}
|
||||
}
|
||||
|
||||
closedir($dir);
|
||||
|
||||
@asort($lang);
|
||||
@reset($lang);
|
||||
@asort($user);
|
||||
@reset($user);
|
||||
|
||||
$lang_select = '<select name="' . $select_name . '">';
|
||||
foreach ( $lang as $displayname => $filename )
|
||||
$user_select = '<select name="' . $select_name . '">';
|
||||
foreach ( $user as $displayname => $filename )
|
||||
{
|
||||
$selected = ( strtolower($default) == strtolower($filename) ) ? ' selected="selected"' : '';
|
||||
$lang_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
|
||||
$user_select .= '<option value="' . $filename . '"' . $selected . '>' . ucwords($displayname) . '</option>';
|
||||
}
|
||||
$lang_select .= '</select>';
|
||||
$user_select .= '</select>';
|
||||
|
||||
return $lang_select;
|
||||
return $user_select;
|
||||
}
|
||||
|
||||
//
|
||||
// Pick a template/theme combo,
|
||||
//
|
||||
function style_select($default_style, $select_name = "style", $dirname = "templates")
|
||||
function style_select($default_style, $select_name = 'style', $dirname = 'templates')
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
@ -339,15 +333,13 @@ function style_select($default_style, $select_name = "style", $dirname = "templa
|
|||
return $style_select;
|
||||
}
|
||||
|
||||
//
|
||||
// Pick a timezone
|
||||
//
|
||||
function tz_select($default, $select_name = 'timezone')
|
||||
{
|
||||
global $sys_timezone, $lang;
|
||||
global $sys_timezone, $user;
|
||||
|
||||
$tz_select = '<select name="' . $select_name . '">';
|
||||
while( list($offset, $zone) = @each($lang['tz']) )
|
||||
foreach ( $user->lang['tz'] as $offset => $zone )
|
||||
{
|
||||
$selected = ( $offset == $default ) ? ' selected="selected"' : '';
|
||||
$tz_select .= '<option value="' . $offset . '"' . $selected . '>' . $zone . '</option>';
|
||||
|
@ -357,20 +349,16 @@ function tz_select($default, $select_name = 'timezone')
|
|||
return $tz_select;
|
||||
}
|
||||
|
||||
//
|
||||
// Topic and forum watching common code
|
||||
//
|
||||
function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $match_id)
|
||||
{
|
||||
global $template, $db, $lang, $phpEx, $SID, $start;
|
||||
global $template, $db, $user, $phpEx, $SID, $start;
|
||||
|
||||
$table_sql = ( $mode == 'forum' ) ? FORUMS_WATCH_TABLE : TOPICS_WATCH_TABLE;
|
||||
$where_sql = ( $mode == 'forum' ) ? 'forum_id' : 'topic_id';
|
||||
$u_url = ( $mode == 'forum' ) ? 'f' : 't';
|
||||
|
||||
//
|
||||
// Is user watching this thread?
|
||||
//
|
||||
if ( $user_id )
|
||||
{
|
||||
$can_watch = TRUE;
|
||||
|
@ -399,7 +387,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
|
|||
'META' => '<meta http-equiv="refresh" content="3;url=' . "view$mode.$phpEx$SID&" . $u_url . "=$match_id&start=$start" . '">')
|
||||
);
|
||||
|
||||
$message = $lang['No_longer_watching_' . $mode] . '<br /><br />' . sprintf($lang['Click_return_' . $mode], '<a href="' . "view$mode.$phpEx$SID&" . $u_url . "=$match_id&start=$start" . '">', '</a>');
|
||||
$message = $user->lang['No_longer_watching_' . $mode] . '<br /><br />' . sprintf($user->lang['Click_return_' . $mode], '<a href="' . "view$mode.$phpEx$SID&" . $u_url . "=$match_id&start=$start" . '">', '</a>');
|
||||
message_die(MESSAGE, $message);
|
||||
}
|
||||
else
|
||||
|
@ -433,7 +421,7 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
|
|||
'META' => '<meta http-equiv="refresh" content="3;url=' . "view$mode.$phpEx$SID&" . $u_url . "=$match_id&start=$start" . '">')
|
||||
);
|
||||
|
||||
$message = $lang['You_are_watching_' . $mode] . '<br /><br />' . sprintf($lang['Click_return_' . $mode], '<a href="' . "view$mode.$phpEx$SID&" . $u_url . "=$match_id&start=$start" . '">', '</a>');
|
||||
$message = $user->lang['You_are_watching_' . $mode] . '<br /><br />' . sprintf($user->lang['Click_return_' . $mode], '<a href="' . "view$mode.$phpEx$SID&" . $u_url . "=$match_id&start=$start" . '">', '</a>');
|
||||
message_die(MESSAGE, $message);
|
||||
}
|
||||
else
|
||||
|
@ -460,58 +448,16 @@ function watch_topic_forum($mode, &$s_watching, &$s_watching_img, $user_id, $mat
|
|||
|
||||
if ( $can_watch )
|
||||
{
|
||||
if ( $is_watching )
|
||||
{
|
||||
$watch_url = "view$mode." . $phpEx . $SID . '&' . $u_url . "=$match_id&unwatch=$mode&start=$start";
|
||||
$img = ( $mode == 'forum' ) ? $images['Forum_un_watch'] : $images['Topic_un_watch'];
|
||||
|
||||
$s_watching = '<a href="' . $watch_url . '">' . $lang['Stop_watching_' . $mode] . '</a>';
|
||||
$s_watching_img = ( isset($img) ) ? '<a href="' . $watch_url . '"><img src="' . $img . '" alt="' . $lang['Stop_watching_' . $mode] . '" title="' . $lang['Stop_watching_' . $mode] . '" border="0"></a>' : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
$watch_url = "view$mode." . $phpEx . $SID . '&' . $u_url . "=$match_id&watch=$mode&start=$start";
|
||||
$img = ( $mode == 'forum' ) ? $images['Forum_watch'] : $images['Topic_watch'];
|
||||
|
||||
$s_watching = '<a href="' . $watch_url . '">' . $lang['Start_watching_' . $mode] . '</a>';
|
||||
$s_watching_img = ( isset($img) ) ? '<a href="' . $watch_url . '"><img src="' . $img . '" alt="' . $lang['Stop_watching_' . $mode] . '" title="' . $lang['Start_watching_' . $mode] . '" border="0"></a>' : '';
|
||||
}
|
||||
$s_watching = ( $is_watching ) ? '<a href="' . "view$mode." . $phpEx . $SID . '&' . $u_url . "=$match_id&unwatch=$mode&start=$start" . '">' . $user->lang['Stop_watching_' . $mode] . '</a>' : '<a href="' . "view$mode." . $phpEx . $SID . '&' . $u_url . "=$match_id&watch=$mode&start=$start" . '">' . $user->lang['Start_watching_' . $mode] . '</a>';
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
// Create date/time from format and timezone
|
||||
//
|
||||
function create_date($format, $gmepoch, $tz)
|
||||
{
|
||||
global $board_config, $lang;
|
||||
static $translate;
|
||||
|
||||
if ( empty($translate) && $board_config['default_lang'] != 'english' )
|
||||
{
|
||||
foreach ( $lang['datetime'] as $match => $replace )
|
||||
{
|
||||
$translate[$match] = $replace;
|
||||
}
|
||||
}
|
||||
|
||||
return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz));
|
||||
}
|
||||
|
||||
function create_img($img, $alt = '')
|
||||
{
|
||||
return '<img src=' . $img . ' alt="' . $alt . '" title="' . $alt . '" />';
|
||||
}
|
||||
|
||||
//
|
||||
// Pagination routine, generates
|
||||
// page number sequence
|
||||
//
|
||||
// Pagination routine, generates page number sequence
|
||||
function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE)
|
||||
{
|
||||
global $lang;
|
||||
global $user;
|
||||
|
||||
$total_pages = ceil($num_items/$per_page);
|
||||
|
||||
|
@ -522,7 +468,7 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
|
|||
|
||||
$on_page = floor($start_item / $per_page) + 1;
|
||||
|
||||
$page_string = ( $on_page == 1 ) ? '<b>1</b>' : '<a href="' . $base_url . "&start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $lang['Previous'] . '</a> <a href="' . $base_url . '">1</a>';
|
||||
$page_string = ( $on_page == 1 ) ? '<b>1</b>' : '<a href="' . $base_url . "&start=" . ( ( $on_page - 2 ) * $per_page ) . '">' . $user->lang['Previous'] . '</a> <a href="' . $base_url . '">1</a>';
|
||||
|
||||
if ( $total_pages > 5 )
|
||||
{
|
||||
|
@ -556,18 +502,18 @@ function generate_pagination($base_url, $num_items, $per_page, $start_item, $add
|
|||
}
|
||||
}
|
||||
|
||||
$page_string .= ( $on_page == $total_pages ) ? '<b>' . $total_pages . '</b>' : '<a href="' . $base_url . '&start=' . ( ( $total_pages - 1 ) * $per_page ) . '">' . $total_pages . '</a> <a href="' . $base_url . "&start=" . ( $on_page * $per_page ) . '">' . $lang['Next'] . '</a>';
|
||||
$page_string .= ( $on_page == $total_pages ) ? '<b>' . $total_pages . '</b>' : '<a href="' . $base_url . '&start=' . ( ( $total_pages - 1 ) * $per_page ) . '">' . $total_pages . '</a> <a href="' . $base_url . "&start=" . ( $on_page * $per_page ) . '">' . $user->lang['Next'] . '</a>';
|
||||
|
||||
$page_string = $lang['Goto_page'] . ' ' . $page_string;
|
||||
$page_string = $user->lang['Goto_page'] . ' ' . $page_string;
|
||||
|
||||
return $page_string;
|
||||
}
|
||||
|
||||
function on_page($num_items, $per_page, $start)
|
||||
{
|
||||
global $lang;
|
||||
global $user;
|
||||
|
||||
return sprintf($lang['Page_of'], floor( $start / $per_page ) + 1, max(ceil( $num_items / $per_page ), 1) );
|
||||
return sprintf($user->lang['Page_of'], floor( $start / $per_page ) + 1, max(ceil( $num_items / $per_page ), 1) );
|
||||
}
|
||||
|
||||
// Obtain list of naughty words and build preg style replacement arrays for use by the
|
||||
|
@ -581,25 +527,20 @@ function obtain_word_list(&$orig_word, &$replacement_word)
|
|||
FROM " . WORDS_TABLE;
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
|
||||
$replacement_word[] = $row['replacement'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
$orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i';
|
||||
$replacement_word[] = $row['replacement'];
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//
|
||||
// Redirects the user to another page then exits the script nicely
|
||||
//
|
||||
function redirect($location)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if (isset($db))
|
||||
{
|
||||
$db->sql_close();
|
||||
|
@ -610,39 +551,26 @@ function redirect($location)
|
|||
exit;
|
||||
}
|
||||
|
||||
//
|
||||
// This is general replacement for die(), allows templated output in users (or default)
|
||||
// language, etc. $msg_code can be one of these constants:
|
||||
//
|
||||
// -> MESSAGE : Use for any simple text message, eg. results of an operation, authorisation
|
||||
// failures, etc.
|
||||
// -> ERROR : Use for any error, a simple page will be output
|
||||
//
|
||||
// $errno, $errstr, $errfile, $errline
|
||||
function message_die($msg_code, $msg_text = '', $msg_title = '')
|
||||
{
|
||||
global $db, $session, $auth, $template, $board_config, $theme, $lang, $user;
|
||||
global $userdata, $user_ip, $phpEx, $phpbb_root_path, $nav_links, $starttime;
|
||||
global $db, $auth, $template, $board_config, $user, $nav_links;
|
||||
global $phpEx, $phpbb_root_path, $starttime;
|
||||
|
||||
switch ( $msg_code )
|
||||
{
|
||||
case MESSAGE:
|
||||
if ( empty($lang) && !empty($board_config['default_lang']) )
|
||||
{
|
||||
if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) )
|
||||
{
|
||||
$board_config['default_lang'] = 'english';
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
|
||||
}
|
||||
|
||||
$msg_title = ( $msg_title == '' ) ? $lang['Information'] : $msg_title;
|
||||
$msg_text = ( !empty($lang[$msg_text]) ) ? $lang[$msg_text] : $msg_text;
|
||||
$msg_title = ( $msg_title == '' ) ? $user->lang['Information'] : $msg_title;
|
||||
$msg_text = ( !empty($user->lang[$msg_text]) ) ? $user->lang[$msg_text] : $msg_text;
|
||||
|
||||
if ( !defined('HEADER_INC') )
|
||||
{
|
||||
if ( empty($userdata) )
|
||||
if ( empty($user->lang) )
|
||||
{
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="stylesheet" href="admin/subSilver.css" type="text/css"><style type="text/css">th { background-image: url(\'admin/images/cellpic3.gif\') } td.cat { background-image: url(\'admin/images/cellpic1.gif\') }</style><title>' . $msg_title . '</title></html>' . "\n";
|
||||
echo '<body><table width="100%" height="100%" border="0"><tr><td align="center" valign="middle"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0"><tr><th>' . $msg_title . '</th></tr><tr><td class="row1" align="center">' . $msg_text . '</td></tr></table></td></tr></table></body></html>';
|
||||
|
@ -694,8 +622,8 @@ function message_die($msg_code, $msg_text = '', $msg_title = '')
|
|||
// Error and message handler, call with trigger_error if reqd
|
||||
function msg_handler($errno, $msg_text, $errfile, $errline)
|
||||
{
|
||||
global $db, $session, $auth, $template, $board_config, $theme, $lang, $userdata, $user_ip;
|
||||
global $phpEx, $phpbb_root_path, $nav_links, $starttime;
|
||||
global $db, $auth, $template, $board_config, $user, $nav_links;
|
||||
global $phpEx, $phpbb_root_path, $starttime;
|
||||
|
||||
switch ( $errno )
|
||||
{
|
||||
|
@ -705,33 +633,26 @@ function msg_handler($errno, $msg_text, $errfile, $errline)
|
|||
case E_NOTICE:
|
||||
break;
|
||||
|
||||
case E_ERROR:
|
||||
case E_USER_ERROR:
|
||||
$db->sql_close();
|
||||
if ( isset($db) )
|
||||
{
|
||||
$db->sql_close();
|
||||
}
|
||||
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><title>phpBB 2 :: General Error</title></html>' . "\n";
|
||||
echo '<body><h1 style="font-family:Verdana,serif;font-size:18pt;font-weight:bold">phpBB2 :: General Error</h1><hr style="height:2px;border-style:dashed;color:black" /><p style="font-family:Verdana,serif;font-size:10pt">' . $msg_text . '</p><hr style="height:2px;border-style:dashed;color:black" /><p style="font-family:Verdana,serif;font-size:10pt">Contact the site administrator to report this failure</p></body></html>';
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="stylesheet" href="admin/subSilver.css" type="text/css"><style type="text/css">th { background-image: url(\'admin/images/cellpic3.gif\') } td.cat { background-image: url(\'admin/images/cellpic1.gif\') }</style><title>' . $msg_title . '</title></html>' . "\n";
|
||||
echo '<body><table width="100%" height="100%" border="0"><tr><td align="center" valign="middle"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0"><tr><th>' . $msg_title . '</th></tr><tr><td class="row1" align="center">' . $msg_text . '</td></tr></table></td></tr></table></body></html>';
|
||||
exit;
|
||||
break;
|
||||
|
||||
case E_USER_NOTICE:
|
||||
if ( empty($lang) && !empty($board_config['default_lang']) )
|
||||
{
|
||||
if ( !file_exists($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx) )
|
||||
{
|
||||
$board_config['default_lang'] = 'english';
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx);
|
||||
}
|
||||
|
||||
$msg_text = ( !empty($lang[$msg_text]) ) ? $lang[$msg_text] : $msg_text;
|
||||
$msg_text = ( !empty($user->lang[$msg_text]) ) ? $user->lang[$msg_text] : $msg_text;
|
||||
|
||||
if ( !defined('HEADER_INC') )
|
||||
{
|
||||
if ( empty($userdata) )
|
||||
if ( empty($user->data) )
|
||||
{
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="stylesheet" href="admin/subSilver.css" type="text/css"><style type="text/css">th { background-image: url(\'admin/images/cellpic3.gif\') } td.cat { background-image: url(\'admin/images/cellpic1.gif\') }</style><title>' . $lang['Information'] . '</title></html>' . "\n";
|
||||
echo '<body><table width="100%" height="100%" border="0"><tr><td align="center" valign="middle"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0"><tr><th>' . $lang['Information'] . '</th></tr><tr><td class="row1" align="center">' . $msg_text . '</td></tr></table></td></tr></table></body></html>';
|
||||
echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="Content-Style-Type" content="text/css"><link rel="stylesheet" href="admin/subSilver.css" type="text/css"><style type="text/css">th { background-image: url(\'admin/images/cellpic3.gif\') } td.cat { background-image: url(\'admin/images/cellpic1.gif\') }</style><title>' . $user->lang['Information'] . '</title></html>' . "\n";
|
||||
echo '<body><table width="100%" height="100%" border="0"><tr><td align="center" valign="middle"><table class="bg" width="80%" cellspacing="1" cellpadding="4" border="0"><tr><th>' . $user->lang['Information'] . '</th></tr><tr><td class="row1" align="center">' . $msg_text . '</td></tr></table></td></tr></table></body></html>';
|
||||
$db->sql_close();
|
||||
exit;
|
||||
}
|
||||
|
|
|
@ -387,7 +387,6 @@ function split_sql_file($sql, $delimiter)
|
|||
// save memory.
|
||||
$tokens[$j] = '';
|
||||
}
|
||||
|
||||
} // for..
|
||||
} // else
|
||||
}
|
||||
|
@ -399,107 +398,63 @@ function split_sql_file($sql, $delimiter)
|
|||
// Extension of auth class for changing permissions
|
||||
class auth_admin extends auth
|
||||
{
|
||||
function acl_set_user(&$forum_id, &$user_id, &$auth)
|
||||
// Note that the set/delete methods are basically the same
|
||||
// so if possible they should be merged
|
||||
function acl_set($mode, &$forum_id, &$ug_id, &$auth)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$forum_sql = ( $forum_id ) ? "AND a.forum_id IN ($forum_id, 0)" : '';
|
||||
if ( !is_array($forum_id) )
|
||||
{
|
||||
$forum_id = array($forum_id);
|
||||
}
|
||||
// NOTE THIS USED TO BE IN ($forum_id, 0) ...
|
||||
$forum_sql = 'AND a.forum_id IN (' . implode(', ', $forum_id) . ')';
|
||||
|
||||
$sql = "SELECT o.auth_option_id, o.auth_value, a.auth_allow_deny
|
||||
FROM " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o
|
||||
WHERE a.auth_option_id = o.auth_option_id
|
||||
$forum_sql
|
||||
AND a.user_id = $user_id";
|
||||
$sql = ( $mode == 'user' ) ? "SELECT o.auth_option_id, o.auth_value, a.forum_id, a.auth_allow_deny FROM " . ACL_USERS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $forum_sql AND a.user_id = $ug_id" :"SELECT o.auth_option_id, o.auth_value, a.forum_id, a.auth_allow_deny FROM " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o WHERE a.auth_option_id = o.auth_option_id $forum_sql AND a.group_id = $ug_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_auth = array();
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
$cur_auth = array();
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
$user_auth[$user_id][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
$cur_auth[$row['forum_id']][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ( $auth as $auth_option_id => $allow )
|
||||
$table = ( $mode == 'user' ) ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
|
||||
$id_field = $mode . '_id';
|
||||
|
||||
foreach ( $forum_id as $forum)
|
||||
{
|
||||
if ( !empty($user_auth) )
|
||||
foreach ( $auth as $auth_option_id => $allow )
|
||||
{
|
||||
foreach ( $user_auth as $user => $user_auth_ary )
|
||||
if ( !empty($cur_auth[$forum]) )
|
||||
{
|
||||
$sql_ary[] = ( !isset($user_auth_ary[$auth_option_id]) ) ? "INSERT INTO " . ACL_USERS_TABLE . " (user_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($user_id, $forum_id, $auth_option_id, $allow)" : ( ( $user_auth_ary[$auth_option_id] != $allow ) ? "UPDATE " . ACL_USERS_TABLE . " SET auth_allow_deny = $allow WHERE user_id = $user_id AND forum_id = $forum_id AND auth_option_id = $auth_option_id" : '' );
|
||||
$sql_ary[] = ( !isset($cur_auth[$forum][$auth_option_id]) ) ? "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_allow_deny) VALUES ($ug_id, $forum, $auth_option_id, $allow)" : ( ( $cur_auth[$forum][$auth_option_id] != $allow ) ? "UPDATE " . $table . " SET auth_allow_deny = $allow WHERE $id_field = $ug_id AND forum_id = $forum AND auth_option_id = $auth_option_id" : '' );
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_ary[] = "INSERT INTO $table ($id_field, forum_id, auth_option_id, auth_allow_deny) VALUES ($ug_id, $forum, $auth_option_id, $allow)";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_ary[] = "INSERT INTO " . ACL_USERS_TABLE . " (user_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($user_id, $forum_id, $auth_option_id, $allow)";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $sql_ary as $sql )
|
||||
{
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
unset($forum_id);
|
||||
unset($user_auth);
|
||||
unset($sql_ary);
|
||||
|
||||
$this->acl_clear_prefetch();
|
||||
}
|
||||
|
||||
function acl_set_group(&$forum_id, &$group_id, &$auth)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$forum_sql = "AND a.forum_id IN ($forum_id, 0)";
|
||||
|
||||
$sql = "SELECT o.auth_option_id, o.auth_value, a.auth_allow_deny
|
||||
FROM " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " o
|
||||
WHERE a.auth_option_id = o.auth_option_id
|
||||
$forum_sql
|
||||
AND a.group_id = $group_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$group_auth = array();
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
$group_auth[$group_id][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
foreach ( $auth as $auth_option_id => $allow )
|
||||
{
|
||||
if ( !empty($group_auth) )
|
||||
{
|
||||
foreach ( $group_auth as $group => $group_auth_ary )
|
||||
{
|
||||
$sql_ary[] = ( !isset($group_auth_ary[$auth_option_id]) ) ? "INSERT INTO " . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($group_id, $forum_id, $auth_option_id, $allow)" : ( ( $group_auth_ary[$auth_option_id] != $allow ) ? "UPDATE " . ACL_GROUPS_TABLE . " SET auth_allow_deny = $allow WHERE group_id = $group_id AND forum_id = $forum_id and auth_option_id = $auth_option_id" : '' );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql_ary[] = "INSERT INTO " . ACL_GROUPS_TABLE . " (group_id, forum_id, auth_option_id, auth_allow_deny) VALUES ($group_id, $forum_id, $auth_option_id, $allow)";
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( $sql_ary as $sql )
|
||||
{
|
||||
$db->sql_query($sql);
|
||||
if ( $sql != '' )
|
||||
{
|
||||
$result = $db->sql_query($sql);
|
||||
$db->sql_freeresult($result);
|
||||
}
|
||||
}
|
||||
|
||||
unset($group_auth);
|
||||
unset($sql_ary);
|
||||
|
||||
$this->acl_clear_prefetch();
|
||||
}
|
||||
|
||||
function acl_delete_user($forum_id, $user_id, $auth_ids = false)
|
||||
function acl_delete($mode, &$forum_id, &$ug_id, $auth_ids = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
@ -513,31 +468,11 @@ class auth_admin extends auth
|
|||
$auth_sql = " AND auth_option_id IN ($auth_sql)";
|
||||
}
|
||||
|
||||
$sql = "DELETE FROM " . ACL_USERS_TABLE . "
|
||||
WHERE user_id = $user_id
|
||||
AND forum_id = $forum_id
|
||||
$auth_sql";
|
||||
$db->sql_query($sql);
|
||||
$table = ( $mode == 'user' ) ? ACL_USERS_TABLE : ACL_GROUPS_TABLE;
|
||||
$id_field = $mode . '_id';
|
||||
|
||||
$this->acl_clear_prefetch();
|
||||
}
|
||||
|
||||
function acl_delete_group($forum_id, $group_id, $auth_type = false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$auth_sql = '';
|
||||
if ( $auth_ids )
|
||||
{
|
||||
for($i = 0; $i < count($auth_ids); $i++)
|
||||
{
|
||||
$auth_sql .= ( ( $auth_sql != '' ) ? ', ' : '' ) . $auth_ids[$i];
|
||||
}
|
||||
$auth_sql = " AND auth_option_id IN ($auth_sql)";
|
||||
}
|
||||
|
||||
$sql = "DELETE FROM " . ACL_GROUPS_TABLE . "
|
||||
WHERE group_id = $group_id
|
||||
$sql = "DELETE FROM $table
|
||||
WHERE $id_field = $ug_id
|
||||
AND forum_id = $forum_id
|
||||
$auth_sql";
|
||||
$db->sql_query($sql);
|
||||
|
@ -555,6 +490,25 @@ class auth_admin extends auth
|
|||
|
||||
return;
|
||||
}
|
||||
|
||||
function acl_add_option($options)
|
||||
{
|
||||
global $db;
|
||||
|
||||
if ( !is_array($options) )
|
||||
{
|
||||
message_die(ERROR, 'Incorrect parameter for acl_add_option');
|
||||
}
|
||||
|
||||
// If we go with the | GLOBAL | FORUM | setup the array
|
||||
// needs to be a hash setup appropriately. We then need
|
||||
// to insert each new option with an appropriate global
|
||||
// or local id
|
||||
//
|
||||
// If we stay with the current | FORUM | setup the array
|
||||
// need not be a hash. Each entry would simply be inserted
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
|
@ -36,22 +36,19 @@ if ( $board_config['gzip_compress'] )
|
|||
}
|
||||
|
||||
// Generate logged in/logged out status
|
||||
if ( $userdata['user_id'] )
|
||||
if ( $user->data['user_id'] )
|
||||
{
|
||||
$u_login_logout = 'login.'.$phpEx. $SID . '&logout=true';
|
||||
$l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
|
||||
$l_login_logout = $user->lang['Logout'] . ' [ ' . $user->data['username'] . ' ]';
|
||||
}
|
||||
else
|
||||
{
|
||||
$u_login_logout = 'login.'.$phpEx . $SID;
|
||||
$l_login_logout = $lang['Login'];
|
||||
$l_login_logout = $user->lang['Login'];
|
||||
}
|
||||
|
||||
// Last visit date/time
|
||||
$s_last_visit = ( $userdata['user_id'] ) ? $user->format_date($userdata['session_last_visit']) : '';
|
||||
|
||||
// Timezone : $user->dst
|
||||
$s_timezone = ( $userdata['user_dst'] ) ? sprintf($lang['All_times'], $lang[floatval($board_config['board_timezone'])], $lang['tz']['dst']) : sprintf($lang['All_times'], $lang[floatval($board_config['board_timezone'])], '');
|
||||
$s_last_visit = ( $user->data['user_id'] ) ? $user->format_date($user->data['session_last_visit']) : '';
|
||||
|
||||
// Get users online list
|
||||
$userlist_ary = array();
|
||||
|
@ -64,12 +61,17 @@ $online_userlist = '';
|
|||
|
||||
$prev_user_id = 0;
|
||||
$prev_user_ip = '';
|
||||
// && $auth->acl_get('forum', 'read', $_GET['f'])
|
||||
$user_forum_sql = ( empty($_GET['f'])) ? '' : "AND s.session_page LIKE '%f=" . intval($_GET['f']) . "%'";
|
||||
|
||||
$reading_sql = '';
|
||||
if ( !empty($_GET['f']) || !empty($_GET['t']) )
|
||||
{
|
||||
$reading_sql = "AND s.session_page LIKE '%" . ( ( !empty($_GET['t']) ) ? 't=' . intval($_GET['t']) : 'f=' . intval($_GET['f']) ) . "%'";
|
||||
}
|
||||
|
||||
$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_colour, s.session_ip
|
||||
FROM " . USERS_TABLE . " u, " . SESSIONS_TABLE ." s
|
||||
WHERE s.session_time >= ".( time() - 300 ) . "
|
||||
$user_forum_sql
|
||||
$reading_sql
|
||||
AND u.user_id = s.session_user_id
|
||||
ORDER BY u.username ASC, s.session_ip ASC";
|
||||
$result = $db->sql_query($sql, false);
|
||||
|
@ -77,7 +79,7 @@ $result = $db->sql_query($sql, false);
|
|||
while( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
// User is logged in and therefor not a guest
|
||||
if ( $row['user_id'] )
|
||||
if ($row['user_id'] != ANONYMOUS)
|
||||
{
|
||||
// Skip multiple sessions for one user
|
||||
if ( $row['user_id'] != $prev_user_id )
|
||||
|
@ -120,16 +122,16 @@ while( $row = $db->sql_fetchrow($result) )
|
|||
|
||||
if ( empty($online_userlist) )
|
||||
{
|
||||
$online_userlist = $lang['None'];
|
||||
$online_userlist = $user->lang['None'];
|
||||
}
|
||||
|
||||
if ( empty($_GET['f']) )
|
||||
{
|
||||
$online_userlist = $lang['Registered_users'] . ' ' . $online_userlist;
|
||||
$online_userlist = $user->lang['Registered_users'] . ' ' . $online_userlist;
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_online = ( $guests_online == 1 ) ? $lang['Browsing_forum_guest'] : $lang['Browsing_forum_guests'];
|
||||
$l_online = ( $guests_online == 1 ) ? $user->lang['Browsing_forum_guest'] : $user->lang['Browsing_forum_guests'];
|
||||
$online_userlist = sprintf($l_online, $online_userlist, $guests_online);
|
||||
}
|
||||
|
||||
|
@ -153,54 +155,54 @@ if ( $total_online_users > $board_config['record_online_users'])
|
|||
|
||||
if ( $total_online_users == 0 )
|
||||
{
|
||||
$l_t_user_s = $lang['Online_users_zero_total'];
|
||||
$l_t_user_s = $user->lang['Online_users_zero_total'];
|
||||
}
|
||||
else if ( $total_online_users == 1 )
|
||||
{
|
||||
$l_t_user_s = $lang['Online_user_total'];
|
||||
$l_t_user_s = $user->lang['Online_user_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_t_user_s = $lang['Online_users_total'];
|
||||
$l_t_user_s = $user->lang['Online_users_total'];
|
||||
}
|
||||
|
||||
if ( $logged_visible_online == 0 )
|
||||
{
|
||||
$l_r_user_s = $lang['Reg_users_zero_total'];
|
||||
$l_r_user_s = $user->lang['Reg_users_zero_total'];
|
||||
}
|
||||
else if ( $logged_visible_online == 1 )
|
||||
{
|
||||
$l_r_user_s = $lang['Reg_user_total'];
|
||||
$l_r_user_s = $user->lang['Reg_user_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_r_user_s = $lang['Reg_users_total'];
|
||||
$l_r_user_s = $user->lang['Reg_users_total'];
|
||||
}
|
||||
|
||||
if ( $logged_hidden_online == 0 )
|
||||
{
|
||||
$l_h_user_s = $lang['Hidden_users_zero_total'];
|
||||
$l_h_user_s = $user->lang['Hidden_users_zero_total'];
|
||||
}
|
||||
else if ( $logged_hidden_online == 1 )
|
||||
{
|
||||
$l_h_user_s = $lang['Hidden_user_total'];
|
||||
$l_h_user_s = $user->lang['Hidden_user_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_h_user_s = $lang['Hidden_users_total'];
|
||||
$l_h_user_s = $user->lang['Hidden_users_total'];
|
||||
}
|
||||
|
||||
if ( $guests_online == 0 )
|
||||
{
|
||||
$l_g_user_s = $lang['Guest_users_zero_total'];
|
||||
$l_g_user_s = $user->lang['Guest_users_zero_total'];
|
||||
}
|
||||
else if ( $guests_online == 1 )
|
||||
{
|
||||
$l_g_user_s = $lang['Guest_user_total'];
|
||||
$l_g_user_s = $user->lang['Guest_user_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_g_user_s = $lang['Guest_users_total'];
|
||||
$l_g_user_s = $user->lang['Guest_users_total'];
|
||||
}
|
||||
|
||||
$l_online_users = sprintf($l_t_user_s, $total_online_users);
|
||||
|
@ -208,62 +210,52 @@ $l_online_users .= sprintf($l_r_user_s, $logged_visible_online);
|
|||
$l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);
|
||||
$l_online_users .= sprintf($l_g_user_s, $guests_online);
|
||||
|
||||
//
|
||||
// Obtain number of new private messages
|
||||
// if user is logged in
|
||||
//
|
||||
if ( $userdata['user_id'] )
|
||||
// Obtain number of new private messages if user is logged in
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
if ( $userdata['user_new_privmsg'] )
|
||||
if ($user->data['user_new_privmsg'])
|
||||
{
|
||||
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
|
||||
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
|
||||
$l_message_new = ( $user->data['user_new_privmsg'] == 1 ) ? $user->lang['New_pm'] : $user->lang['New_pms'];
|
||||
$l_privmsgs_text = sprintf($l_message_new, $user->data['user_new_privmsg']);
|
||||
|
||||
if ( $userdata['user_last_privmsg'] > $userdata['session_last_visit'] )
|
||||
if ( $user->data['user_last_privmsg'] > $user->data['session_last_visit'] )
|
||||
{
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_last_privmsg = " . $userdata['session_last_visit'] . "
|
||||
WHERE user_id = " . $userdata['user_id'];
|
||||
SET user_last_privmsg = " . $user->data['session_last_visit'] . "
|
||||
WHERE user_id = " . $user->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
$s_privmsg_new = 1;
|
||||
$icon_pm = $images['pm_new_msg'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$s_privmsg_new = 0;
|
||||
$icon_pm = $images['pm_no_new_msg'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_privmsgs_text = $lang['No_new_pm'];
|
||||
|
||||
$l_privmsgs_text = $user->lang['No_new_pm'];
|
||||
$s_privmsg_new = 0;
|
||||
$icon_pm = $images['pm_no_new_msg'];
|
||||
}
|
||||
|
||||
if ( $userdata['user_unread_privmsg'] )
|
||||
if ( $user->data['user_unread_privmsg'] )
|
||||
{
|
||||
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
|
||||
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
|
||||
$l_message_unread = ( $user->data['user_unread_privmsg'] == 1 ) ? $user->lang['Unread_pm'] : $user->lang['Unread_pms'];
|
||||
$l_privmsgs_text_unread = sprintf($l_message_unread, $user->data['user_unread_privmsg']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_privmsgs_text_unread = $lang['No_unread_pm'];
|
||||
$l_privmsgs_text_unread = $user->lang['No_unread_pm'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$icon_pm = $images['pm_no_new_msg'];
|
||||
$l_privmsgs_text = $lang['Login_check_pm'];
|
||||
$l_privmsgs_text = $user->lang['Login_check_pm'];
|
||||
$l_privmsgs_text_unread = '';
|
||||
$s_privmsg_new = 0;
|
||||
}
|
||||
|
||||
//
|
||||
// Generate HTML required for Mozilla Navigation bar
|
||||
//
|
||||
$nav_links_html = '';
|
||||
/*
|
||||
$nav_link_proto = '<link rel="%s" href="%s" title="%s" />' . "\n";
|
||||
|
@ -283,77 +275,78 @@ foreach ( $nav_links as $nav_item => $nav_array )
|
|||
}
|
||||
}
|
||||
*/
|
||||
//
|
||||
|
||||
// The following assigns all _common_ variables that may be used at any point
|
||||
// in a template.
|
||||
//
|
||||
$template->assign_vars(array(
|
||||
'SITENAME' => $board_config['sitename'],
|
||||
'SITE_DESCRIPTION' => $board_config['site_desc'],
|
||||
'PAGE_TITLE' => $page_title,
|
||||
'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit),
|
||||
'CURRENT_TIME' => sprintf($lang['Current_time'], $user->format_date(time())),
|
||||
'TOTAL_USERS_ONLINE' => $l_online_users,
|
||||
'LOGGED_IN_USER_LIST' => $online_userlist,
|
||||
'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], $user->format_date($board_config['record_online_date'])),
|
||||
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
|
||||
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
|
||||
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
|
||||
'SITENAME' => $board_config['sitename'],
|
||||
'SITE_DESCRIPTION' => $board_config['site_desc'],
|
||||
'PAGE_TITLE' => $page_title,
|
||||
'LAST_VISIT_DATE' => sprintf($user->lang['You_last_visit'], $s_last_visit),
|
||||
'CURRENT_TIME' => sprintf($user->lang['Current_time'], $user->format_date(time())),
|
||||
'TOTAL_USERS_ONLINE' => $l_online_users,
|
||||
'LOGGED_IN_USER_LIST' => $online_userlist,
|
||||
'RECORD_USERS' => sprintf($user->lang['Record_online_users'], $board_config['record_online_users'], $user->format_date($board_config['record_online_date'])),
|
||||
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
|
||||
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
|
||||
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
|
||||
|
||||
'PRIVMSG_IMG' => $icon_pm,
|
||||
'L_USERNAME' => $user->lang['Username'],
|
||||
'L_PASSWORD' => $user->lang['Password'],
|
||||
'L_LOGIN_LOGOUT' => $l_login_logout,
|
||||
'L_LOGIN' => $user->lang['Login'],
|
||||
'L_LOG_ME_IN' => $user->lang['Log_me_in'],
|
||||
'L_AUTO_LOGIN' => $user->lang['Log_me_in'],
|
||||
'L_INDEX' => sprintf($user->lang['Forum_Index'], $board_config['sitename']),
|
||||
'L_FAQ' => $user->lang['FAQ'],
|
||||
'L_REGISTER' => $user->lang['Register'],
|
||||
'L_PROFILE' => $user->lang['Profile'],
|
||||
'L_SEARCH' => $user->lang['Search'],
|
||||
'L_PRIVATEMSGS' => $user->lang['Private_Messages'],
|
||||
'L_MEMBERLIST' => $user->lang['Memberlist'],
|
||||
'L_USERGROUPS' => $user->lang['Usergroups'],
|
||||
'L_SEARCH_NEW' => $user->lang['Search_new'],
|
||||
'L_SEARCH_SELF' => $user->lang['Search_your_posts'],
|
||||
'L_WHO_IS_ONLINE' => $user->lang['Who_is_Online'],
|
||||
'L_SEARCH_UNANSWERED' => $user->lang['Search_unanswered'],
|
||||
|
||||
'L_USERNAME' => $lang['Username'],
|
||||
'L_PASSWORD' => $lang['Password'],
|
||||
'L_LOGIN_LOGOUT' => $l_login_logout,
|
||||
'L_LOGIN' => $lang['Login'],
|
||||
'L_LOG_ME_IN' => $lang['Log_me_in'],
|
||||
'L_AUTO_LOGIN' => $lang['Log_me_in'],
|
||||
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
|
||||
'L_REGISTER' => $lang['Register'],
|
||||
'L_PROFILE' => $lang['Profile'],
|
||||
'L_SEARCH' => $lang['Search'],
|
||||
'L_PRIVATEMSGS' => $lang['Private_Messages'],
|
||||
'L_WHO_IS_ONLINE' => $lang['Who_is_Online'],
|
||||
'L_MEMBERLIST' => $lang['Memberlist'],
|
||||
'L_FAQ' => $lang['FAQ'],
|
||||
'L_USERGROUPS' => $lang['Usergroups'],
|
||||
'L_SEARCH_NEW' => $lang['Search_new'],
|
||||
'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'],
|
||||
'L_SEARCH_SELF' => $lang['Search_your_posts'],
|
||||
|
||||
'U_SEARCH_UNANSWERED' => 'search.'.$phpEx.$SID.'&search_id=unanswered',
|
||||
'U_SEARCH_SELF' => 'search.'.$phpEx.$SID.'&search_id=egosearch',
|
||||
'U_SEARCH_NEW' => 'search.'.$phpEx.$SID.'&search_id=newposts',
|
||||
'U_INDEX' => 'index.'.$phpEx.$SID,
|
||||
'U_REGISTER' => 'profile.'.$phpEx.$SID.'&mode=register',
|
||||
'U_PROFILE' => 'profile.'.$phpEx.$SID.'&mode=editprofile',
|
||||
'U_PRIVATEMSGS' => 'privmsg.'.$phpEx.$SID.'&folder=inbox',
|
||||
'U_PRIVATEMSGS_POPUP' => 'privmsg.'.$phpEx.$SID.'&mode=newpm',
|
||||
'U_SEARCH' => 'search.'.$phpEx.$SID,
|
||||
'U_MEMBERLIST' => 'memberlist.'.$phpEx.$SID,
|
||||
'U_MODCP' => 'modcp.'.$phpEx.$SID,
|
||||
'U_FAQ' => 'faq.'.$phpEx.$SID,
|
||||
'U_VIEWONLINE' => 'viewonline.'.$phpEx.$SID,
|
||||
'U_LOGIN_LOGOUT' => $u_login_logout,
|
||||
'U_PRIVATEMSGS' => 'privmsg.'.$phpEx.$SID.'&folder=inbox',
|
||||
'U_MEMBERLIST' => 'memberlist.'.$phpEx.$SID,
|
||||
'U_VIEWONLINE' => 'viewonline.'.$phpEx.$SID,
|
||||
'U_MEMBERSLIST' => 'memberlist.'.$phpEx.$SID,
|
||||
'U_GROUP_CP' => 'groupcp.'.$phpEx.$SID,
|
||||
'U_GROUP_CP' => 'groupcp.'.$phpEx.$SID,
|
||||
'U_LOGIN_LOGOUT'=> $u_login_logout,
|
||||
'U_INDEX' => 'index.'.$phpEx.$SID,
|
||||
'U_SEARCH' => 'search.'.$phpEx.$SID,
|
||||
'U_REGISTER' => 'profile.'.$phpEx.$SID.'&mode=register',
|
||||
'U_PROFILE' => 'profile.'.$phpEx.$SID.'&mode=editprofile',
|
||||
'U_MODCP' => 'modcp.'.$phpEx.$SID,
|
||||
'U_FAQ' => 'faq.'.$phpEx.$SID,
|
||||
'U_SEARCH_SELF' => 'search.'.$phpEx.$SID.'&search_id=egosearch',
|
||||
'U_SEARCH_NEW' => 'search.'.$phpEx.$SID.'&search_id=newposts',
|
||||
'U_PRIVATEMSGS_POPUP' => 'privmsg.'.$phpEx.$SID.'&mode=newpm',
|
||||
'U_SEARCH_UNANSWERED' => 'search.'.$phpEx.$SID.'&search_id=unanswered',
|
||||
|
||||
'S_USER_LOGGED_IN' => ( $userdata['user_id'] ) ? true : false,
|
||||
'S_USER_PM_POPUP' => ( !empty($userdata['user_popup_pm']) ) ? true : false,
|
||||
'S_USER_BROWSER' => $userdata['session_browser'],
|
||||
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
|
||||
'S_CONTENT_ENCODING' => $lang['ENCODING'],
|
||||
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
|
||||
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
|
||||
'S_TIMEZONE' => $s_timezone,
|
||||
'S_LOGIN_ACTION' => 'login.'.$phpEx.$SID,
|
||||
'S_USER_LOGGED_IN' => ( $user->data['user_id'] ) ? true : false,
|
||||
'S_USER_PM_POPUP' => ( !empty($user->data['user_popup_pm']) ) ? true : false,
|
||||
'S_USER_BROWSER' => $user->data['session_browser'],
|
||||
'S_CONTENT_DIRECTION' => $user->lang['DIRECTION'],
|
||||
'S_CONTENT_ENCODING' => $user->lang['ENCODING'],
|
||||
'S_CONTENT_DIR_LEFT' => $user->lang['LEFT'],
|
||||
'S_CONTENT_DIR_RIGHT' => $user->lang['RIGHT'],
|
||||
'S_LOGIN_ACTION' => 'login.'.$phpEx.$SID,
|
||||
'S_TIMEZONE' => ( $user->data['user_dst'] ) ? sprintf($user->lang['All_times'], $user->lang[floatval($board_config['board_timezone'])], $user->lang['tz']['dst']) : sprintf($user->lang['All_times'], $user->lang[floatval($board_config['board_timezone'])], ''),
|
||||
|
||||
'T_STYLESHEET_DATA' => $theme['css_data'],
|
||||
'T_STYLESHEET_LINK' => 'templates/' . $theme['css_external'],
|
||||
'T_STYLESHEET_DATA' => $user->theme['css_data'],
|
||||
'T_STYLESHEET_LINK' => 'templates/' . $user->theme['css_external'],
|
||||
|
||||
'NAV_LINKS' => $nav_links_html)
|
||||
);
|
||||
|
||||
/*if ( $board_config['send_encoding'] )
|
||||
{
|
||||
header ('Content-type: text/html; charset: ' . $user->lang['ENCODING']);
|
||||
}*/
|
||||
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
|
||||
header ('Expires: ' . gmdate('D, d M Y H:i:s', time()) . ' GMT');
|
||||
header ('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT');
|
||||
|
|
|
@ -19,14 +19,10 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
//
|
||||
// Close our DB connection.
|
||||
//
|
||||
$db->sql_close();
|
||||
|
||||
//
|
||||
// Output page creation time
|
||||
//
|
||||
if (defined('DEBUG'))
|
||||
{
|
||||
$mtime = explode(' ', microtime());
|
||||
|
@ -44,15 +40,15 @@ if (defined('DEBUG'))
|
|||
|
||||
if ($auth->acl_get('a_'))
|
||||
{
|
||||
$debug_output .= ' | <a href="' . $_SERVER['REQUEST_URI'] . '&explain=1">Explain</a>';
|
||||
$debug_output .= ' | <a href="' . $_SERVER['REQUEST_URI'] . '&explain=1">Explain</a>';
|
||||
}
|
||||
$debug_output .= ' ]';
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'PHPBB_VERSION' => $board_config['version'],
|
||||
'ADMIN_LINK' => ( $auth->acl_get('a_') ) ? '<a href="' . "admin/index.$phpEx?sid=" . $userdata['session_id'] . '">' . $lang['Admin_panel'] . '</a><br /><br />' : '',
|
||||
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : ''
|
||||
'PHPBB_VERSION' => $board_config['version'],
|
||||
'ADMIN_LINK' => ( $auth->acl_get('a_') ) ? '<a href="' . "admin/index.$phpEx?sid=" . $user->data['session_id'] . '">' . $user->lang['Admin_panel'] . '</a><br /><br />' : '',
|
||||
'DEBUG_OUTPUT' => (defined('DEBUG')) ? $debug_output : ''
|
||||
));
|
||||
|
||||
$template->display('body');
|
||||
|
|
|
@ -19,17 +19,19 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
class session {
|
||||
|
||||
class session
|
||||
{
|
||||
var $session_id = '';
|
||||
var $data = array();
|
||||
var $browser = '';
|
||||
var $user_ip = '';
|
||||
var $page = '';
|
||||
var $load;
|
||||
|
||||
// Called at each page start ... checks for, updates and/or creates a session
|
||||
function start($update = true)
|
||||
{
|
||||
global $SID, $db, $board_config, $user_ip;
|
||||
global $SID, $db, $board_config;
|
||||
|
||||
$current_time = time();
|
||||
$this->browser = ( !empty($_SERVER['HTTP_USER_AGENT']) ) ? $_SERVER['HTTP_USER_AGENT'] : $_ENV['HTTP_USER_AGENT'];
|
||||
|
@ -49,16 +51,28 @@ class session {
|
|||
$SID = '?sid=' . $this->session_id;
|
||||
}
|
||||
|
||||
// Obtain users IP
|
||||
$this->ip = ( !empty($_SERVER['REMOTE_ADDR']) ) ? $_SERVER['REMOTE_ADDR'] : $REMOTE_ADDR;
|
||||
|
||||
if (!empty($_SERVER['HTTP_X_FORWARDED_FOR']))
|
||||
{
|
||||
if ( preg_match('/^([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)/', $_SERVER['HTTP_X_FORWARDED_FOR'], $ip_list) )
|
||||
{
|
||||
$private_ip = array('/^0\./', '/^127\.0\.0\.1/', '/^192\.168\..*/', '/^172\.16\..*/', '/^10\..*/', '/^224\..*/', '/^240\..*/');
|
||||
$this->ip = preg_replace($private_ip, $this->ip, $ip_list[1]);
|
||||
}
|
||||
}
|
||||
|
||||
// Load limit check (if applicable)
|
||||
if ( $board_config['limit_load'] && file_exists('/proc/loadavg') )
|
||||
if ( intval($board_config['limit_load']) && file_exists('/proc/loadavg') )
|
||||
{
|
||||
if ( $load = @file('/proc/loadavg') )
|
||||
{
|
||||
list($this->load) = explode(' ', $load[0]);
|
||||
|
||||
if ( $this->load > $board_config['limit_load'] )
|
||||
if ( $this->load > intval($board_config['limit_load']) )
|
||||
{
|
||||
message_die(MESSAGE, 'Board_unavailable');
|
||||
trigger_error('Board_unavailable');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -72,20 +86,20 @@ class session {
|
|||
AND u.user_id = s.session_user_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$userdata = $db->sql_fetchrow($result);
|
||||
$this->data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Did the session exist in the DB?
|
||||
if ( isset($userdata['user_id']) )
|
||||
if ( isset($this->data['user_id']) )
|
||||
{
|
||||
// Validate IP length according to admin ... has no effect on IPv6
|
||||
$s_ip = implode('.', array_slice(explode('.', $userdata['session_ip']), 0, $board_config['ip_check']));
|
||||
$u_ip = implode('.', array_slice(explode('.', $user_ip), 0, $board_config['ip_check']));
|
||||
$s_ip = implode('.', array_slice(explode('.', $this->data['session_ip']), 0, $board_config['ip_check']));
|
||||
$u_ip = implode('.', array_slice(explode('.', $this->ip), 0, $board_config['ip_check']));
|
||||
|
||||
if ( $u_ip == $s_ip )
|
||||
{
|
||||
// Only update session DB a minute or so after last update or if page changes
|
||||
if ( ( $current_time - $userdata['session_time'] > 60 || $userdata['session_page'] != $user_page ) && $update )
|
||||
if ( ( $current_time - $this->data['session_time'] > 60 || $this->data['session_page'] != $user_page ) && $update )
|
||||
{
|
||||
$sql = "UPDATE " . SESSIONS_TABLE . "
|
||||
SET session_time = $current_time, session_page = '$this->page'
|
||||
|
@ -93,7 +107,7 @@ class session {
|
|||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
return $userdata;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -109,7 +123,7 @@ class session {
|
|||
// Create a new session
|
||||
function create(&$user_id, &$autologin)
|
||||
{
|
||||
global $SID, $db, $board_config, $user_ip;
|
||||
global $SID, $db, $board_config;
|
||||
|
||||
$sessiondata = array();
|
||||
$current_time = time();
|
||||
|
@ -127,7 +141,7 @@ class session {
|
|||
|
||||
if ( intval($row['sessions']) > intval($board_config['active_sessions']) )
|
||||
{
|
||||
message_die(MESSAGE, 'Board_unavailable');
|
||||
trigger_error('Board_unavailable');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -146,14 +160,14 @@ class session {
|
|||
ORDER BY s.session_time DESC";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$userdata = $db->sql_fetchrow($result);
|
||||
$this->data = $db->sql_fetchrow($result);
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Check autologin request, is it valid?
|
||||
if ( $userdata['user_password'] != $autologin || !$userdata['user_active'] || !$user_id )
|
||||
if ( $this->data['user_password'] != $autologin || !$this->data['user_active'] || !$user_id )
|
||||
{
|
||||
$autologin = '';
|
||||
$userdata['user_id'] = $user_id = ANONYMOUS;
|
||||
$this->data['user_id'] = $user_id = ANONYMOUS;
|
||||
}
|
||||
|
||||
$sql = "SELECT ban_ip, ban_userid, ban_email
|
||||
|
@ -162,30 +176,26 @@ class session {
|
|||
OR ban_end = 0";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
if ( ( $row['user_id'] == $this->data['user_id'] ||
|
||||
( $row['ban_ip'] && preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $this->ip) ) ||
|
||||
( $row['ban_email'] && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $this->data['user_email']) ) )
|
||||
&& !$this->data['user_founder'] )
|
||||
{
|
||||
if ( ( $row['user_id'] == $userdata['user_id'] ||
|
||||
( $row['ban_ip'] && preg_match('#^' . str_replace('*', '.*?', $row['ban_ip']) . '$#i', $user_ip) ) ||
|
||||
( $row['ban_email'] && preg_match('#^' . str_replace('*', '.*?', $row['ban_email']) . '$#i', $userdata['user_email']) ) )
|
||||
&& !$userdata['user_founder'] )
|
||||
{
|
||||
message_die(MESSAGE, 'You_been_banned');
|
||||
}
|
||||
trigger_error('You_been_banned');
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// Is there an existing session? If so, grab last visit time from that
|
||||
$userdata['session_last_visit'] = ( $userdata['session_time'] ) ? $userdata['session_time'] : ( ( $userdata['user_lastvisit'] ) ? $userdata['user_lastvisit'] : time() );
|
||||
$this->data['session_last_visit'] = ( $this->data['session_time'] ) ? $this->data['session_time'] : ( ( $this->data['user_lastvisit'] ) ? $this->data['user_lastvisit'] : time() );
|
||||
|
||||
// Create or update the session
|
||||
$db->sql_return_on_error(true);
|
||||
|
||||
$sql = "UPDATE " . SESSIONS_TABLE . "
|
||||
SET session_user_id = $user_id, session_last_visit = " . $userdata['session_last_visit'] . ", session_start = $current_time, session_time = $current_time, session_browser = '$this->browser', session_page = '$this->page'
|
||||
SET session_user_id = $user_id, session_last_visit = " . $this->data['session_last_visit'] . ", session_start = $current_time, session_time = $current_time, session_browser = '$this->browser', session_page = '$this->page'
|
||||
WHERE session_id = '" . $this->session_id . "'";
|
||||
if ( !$db->sql_query($sql) || !$db->sql_affectedrows() )
|
||||
{
|
||||
|
@ -194,12 +204,12 @@ class session {
|
|||
|
||||
$sql = "INSERT INTO " . SESSIONS_TABLE . "
|
||||
(session_id, session_user_id, session_last_visit, session_start, session_time, session_ip, session_browser, session_page)
|
||||
VALUES ('" . $this->session_id . "', $user_id, " . $userdata['session_last_visit'] . ", $current_time, $current_time, '$user_ip', '$this->browser', '$this->page')";
|
||||
VALUES ('" . $this->session_id . "', $user_id, " . $this->data['session_last_visit'] . ", $current_time, $current_time, '$this->ip', '$this->browser', '$this->page')";
|
||||
$db->sql_query($sql);
|
||||
}
|
||||
$db->sql_return_on_error(false);
|
||||
|
||||
$userdata['session_id'] = $this->session_id;
|
||||
$this->data['session_id'] = $this->session_id;
|
||||
|
||||
$sessiondata['autologinid'] = ( $autologin && $user_id ) ? $autologin : '';
|
||||
$sessiondata['userid'] = $user_id;
|
||||
|
@ -208,17 +218,23 @@ class session {
|
|||
$this->set_cookie('sid', $this->session_id, 0);
|
||||
$SID = '?sid=' . $this->session_id;
|
||||
|
||||
// Events ... ?
|
||||
if ( $userdata['user_id'] )
|
||||
if ( $this->data['user_id'] )
|
||||
{
|
||||
// Events ... ?
|
||||
// do_events('days');
|
||||
|
||||
// First page ... ?
|
||||
// if (!empty($this->data['user_firstpage']))
|
||||
// {
|
||||
// redirect($userdata['user_firstpage']);
|
||||
// }
|
||||
}
|
||||
|
||||
return $userdata;
|
||||
return true;
|
||||
}
|
||||
|
||||
// Destroy a session
|
||||
function destroy(&$userdata)
|
||||
function destroy()
|
||||
{
|
||||
global $SID, $db, $board_config;
|
||||
|
||||
|
@ -230,13 +246,13 @@ class session {
|
|||
|
||||
// Delete existing session, update last visit info first!
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_lastvisit = " . intval($userdata['session_time']) . "
|
||||
WHERE user_id = " . $userdata['user_id'];
|
||||
SET user_lastvisit = " . intval($this->data['session_time']) . "
|
||||
WHERE user_id = " . $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
$sql = "DELETE FROM " . SESSIONS_TABLE . "
|
||||
WHERE session_id = '" . $this->session_id . "'
|
||||
AND session_user_id = " . $userdata['user_id'];
|
||||
AND session_user_id = " . $this->data['user_id'];
|
||||
$db->sql_query($sql);
|
||||
|
||||
$this->session_id = '';
|
||||
|
@ -247,14 +263,14 @@ class session {
|
|||
// Garbage collection
|
||||
function gc(&$current_time)
|
||||
{
|
||||
global $db, $board_config, $user_ip;
|
||||
global $db, $board_config;
|
||||
|
||||
// Get expired sessions, only most recent for each user
|
||||
$sql = "SELECT session_user_id, MAX(session_time) AS recent_time
|
||||
FROM " . SESSIONS_TABLE . "
|
||||
WHERE session_time < " . ( $current_time - $board_config['session_length'] ) . "
|
||||
GROUP BY session_user_id
|
||||
LIMIT 10";
|
||||
LIMIT 5";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$del_user_id = '';
|
||||
|
@ -282,9 +298,9 @@ class session {
|
|||
$db->sql_query($sql);
|
||||
}
|
||||
|
||||
if ( $del_sessions < 10 )
|
||||
if ( $del_sessions < 5 )
|
||||
{
|
||||
// Less than 10 sessions, update gc timer ... else we want gc
|
||||
// Less than 5 sessions, update gc timer ... else we want gc
|
||||
// called again to delete other sessions
|
||||
$sql = "UPDATE " . CONFIG_TABLE . "
|
||||
SET config_value = '$current_time'
|
||||
|
@ -306,60 +322,65 @@ class session {
|
|||
|
||||
// Contains (at present) basic user methods such as configuration
|
||||
// creating date/time ... keep this?
|
||||
class user
|
||||
class user extends session
|
||||
{
|
||||
var $lang_name;
|
||||
var $lang_path;
|
||||
var $lang = array();
|
||||
var $theme = array();
|
||||
var $date_format;
|
||||
var $timezone;
|
||||
var $dst;
|
||||
|
||||
function user(&$userdata, $lang_set = false, $style = false)
|
||||
{
|
||||
global $db, $template, $lang, $board_config, $theme, $images;
|
||||
global $phpEx, $phpbb_root_path;
|
||||
var $lang_name;
|
||||
var $lang_path;
|
||||
var $img_lang;
|
||||
|
||||
if ( $userdata['user_id'] )
|
||||
function setup($lang_set = false, $style = false)
|
||||
{
|
||||
global $db, $template, $board_config, $phpEx, $phpbb_root_path;
|
||||
|
||||
if ( $this->data['user_id'] != ANONYMOUS )
|
||||
{
|
||||
$this->lang_name = ( file_exists($phpbb_root_path . 'language/' . $userdata['user_lang']) ) ? $userdata['user_lang'] : $board_config['default_lang'];
|
||||
$this->lang_name = ( file_exists($phpbb_root_path . 'language/' . $this->data['user_lang']) ) ? $this->data['user_lang'] : $board_config['default_lang'];
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
|
||||
|
||||
$this->date_format = $userdata['user_dateformat'];
|
||||
$this->timezone = $userdata['user_timezone'] * 3600;
|
||||
$this->dst = $userdata['user_dst'] * 3600;
|
||||
$this->date_format = $this->data['user_dateformat'];
|
||||
$this->timezone = $this->data['user_timezone'] * 3600;
|
||||
$this->dst = $this->data['user_dst'] * 3600;
|
||||
}
|
||||
else if ( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) )
|
||||
else
|
||||
{
|
||||
$this->lang_name = $board_config['default_lang'];
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $this->lang_name . '/';
|
||||
$this->date_format = $board_config['default_dateformat'];
|
||||
$this->timezone = $board_config['board_timezone'] * 3600;
|
||||
$this->dst = 0;
|
||||
|
||||
$accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
foreach ( $accept_lang_ary as $accept_lang )
|
||||
if ( isset($_SERVER['HTTP_ACCEPT_LANGUAGE']) )
|
||||
{
|
||||
// Set correct format ... guess full xx_YY form
|
||||
$accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
|
||||
if ( file_exists($phpbb_root_path . 'language/' . $accept_lang) )
|
||||
$accept_lang_ary = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||
foreach ( $accept_lang_ary as $accept_lang )
|
||||
{
|
||||
$this->lang_name = $accept_lang;
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $accept_lang . '/';
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No match on xx_YY so try xx
|
||||
$accept_lang = substr($accept_lang, 0, 2);
|
||||
// Set correct format ... guess full xx_YY form
|
||||
$accept_lang = substr($accept_lang, 0, 2) . '_' . strtoupper(substr($accept_lang, 3, 2));
|
||||
if ( file_exists($phpbb_root_path . 'language/' . $accept_lang) )
|
||||
{
|
||||
$this->lang_name = $accept_lang;
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $accept_lang . '/';
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
// No match on xx_YY so try xx
|
||||
$accept_lang = substr($accept_lang, 0, 2);
|
||||
if ( file_exists($phpbb_root_path . 'language/' . $accept_lang) )
|
||||
{
|
||||
$this->lang_name = $accept_lang;
|
||||
$this->lang_path = $phpbb_root_path . 'language/' . $accept_lang . '/';
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->date_format = $board_config['default_dateformat'];
|
||||
$this->timezone = $board_config['board_timezone'] * 3600;
|
||||
$this->dst = 0;
|
||||
}
|
||||
|
||||
include($this->lang_path . 'lang_main.' . $phpEx);
|
||||
|
@ -367,6 +388,7 @@ class user
|
|||
{
|
||||
include($this->lang_path . 'lang_admin.' . $phpEx);
|
||||
}
|
||||
|
||||
/*
|
||||
if ( is_array($lang_set) )
|
||||
{
|
||||
|
@ -375,18 +397,18 @@ class user
|
|||
$lang_set = explode(',', $lang_set);
|
||||
foreach ( $lang_set as $lang_file )
|
||||
{
|
||||
include($this->lang_path . '/' . trim($lang_file) . '.' . $phpEx);
|
||||
include($this->lang_path . '/' . $lang_file . '.' . $phpEx);
|
||||
}
|
||||
unset($lang_set);
|
||||
}
|
||||
else
|
||||
{
|
||||
include($this->lang_path . '/common.' . $phpEx);
|
||||
include($this->lang_path . '/' . trim($lang_set) . '.' . $phpEx);
|
||||
include($this->lang_path . '/' . $lang_set . '.' . $phpEx);
|
||||
}
|
||||
*/
|
||||
// Set up style
|
||||
$style = ( $style ) ? $style : ( ( !$board_config['override_user_style'] && $userdata['user_id'] ) ? $userdata['user_style'] : $board_config['default_style'] );
|
||||
$style = ( $style ) ? $style : ( ( !$board_config['override_user_style'] && $this->data['user_id'] ) ? $this->data['user_style'] : $board_config['default_style'] );
|
||||
|
||||
$sql = "SELECT t.template_path, t.poll_length, t.pm_box_length, c.css_data, c.css_external, i.*
|
||||
FROM " . STYLES_TABLE . " s, " . STYLES_TPL_TABLE . " t, " . STYLES_CSS_TABLE . " c, " . STYLES_IMAGE_TABLE . " i
|
||||
|
@ -396,33 +418,25 @@ class user
|
|||
AND i.imageset_id = s.imageset_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( !($theme = $db->sql_fetchrow($result)) )
|
||||
if ( !($this->theme = $db->sql_fetchrow($result)) )
|
||||
{
|
||||
message_die(ERROR, 'Could not get style data');
|
||||
}
|
||||
|
||||
$template->set_template($theme['template_path']);
|
||||
$template->set_template($this->theme['template_path']);
|
||||
|
||||
$img_lang = ( file_exists('imagesets/' . $theme['imageset_path'] . '/' . $this->lang_name) ) ? $this->lang_name : $board_config['default_lang'];
|
||||
|
||||
$i10n = array('post_new', 'post_locked', 'post_pm', 'reply_new', 'reply_pm', 'reply_locked', 'icon_quote', 'icon_edit', 'icon_search', 'icon_profile', 'icon_pm', 'icon_email', 'icon_www', 'icon_icq', 'icon_aim', 'icon_yim', 'icon_msnm', 'icon_delete', 'icon_ip', 'icon_no_email', 'icon_no_www', 'icon_no_icq', 'icon_no_aim', 'icon_no_yim', 'icon_no_msnm');
|
||||
|
||||
foreach ( $i10n as $icon )
|
||||
{
|
||||
$theme[$icon] = str_replace('{LANG}', $img_lang, $theme[$icon]);
|
||||
}
|
||||
$this->img_lang = ( file_exists($phpbb_root_path . 'imagesets/' . $this->theme['imageset_path'] . '/' . $this->lang_name) ) ? $this->lang_name : $board_config['default_lang'];
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
function format_date($gmepoch, $format = false)
|
||||
{
|
||||
global $lang;
|
||||
static $lang_dates;
|
||||
|
||||
if ( empty($lang_dates) )
|
||||
{
|
||||
foreach ( $lang['datetime'] as $match => $replace )
|
||||
foreach ( $this->lang['datetime'] as $match => $replace )
|
||||
{
|
||||
$lang_dates[$match] = $replace;
|
||||
}
|
||||
|
@ -431,6 +445,18 @@ class user
|
|||
$format = ( !$format ) ? $this->date_format : $format;
|
||||
return strtr(@gmdate($format, $gmepoch + $this->timezone + $this->dst), $lang_dates);
|
||||
}
|
||||
|
||||
function img($img, $alt = '', $tag = false)
|
||||
{
|
||||
static $imgs;
|
||||
|
||||
if (empty($imgs[$img]))
|
||||
{
|
||||
$imgs[$img] = '<img src=' . str_replace('{LANG}', $this->img_lang, $this->theme[$img]) . '" alt="' . $this->lang[$alt] . '" title="' . $this->lang[$alt] . '" />';
|
||||
}
|
||||
|
||||
return $imgs[$img];
|
||||
}
|
||||
}
|
||||
|
||||
// Will be keeping my eye of 'other products' to ensure these things don't
|
||||
|
@ -438,29 +464,36 @@ class user
|
|||
class auth
|
||||
{
|
||||
var $founder = false;
|
||||
var $acl = false;
|
||||
var $options = array();
|
||||
var $acl = array();
|
||||
var $acl_options = array();
|
||||
|
||||
function acl(&$userdata, $forum_id = false, $options = false)
|
||||
function acl(&$userdata, $forum_id = false, $options_in = false, $options_or = false)
|
||||
{
|
||||
global $db;
|
||||
global $db, $acl_options;
|
||||
|
||||
$this->acl_options = &$acl_options;
|
||||
|
||||
if (!$this->founder = $userdata['user_founder'])
|
||||
{
|
||||
// $mtime = explode(' ', microtime());
|
||||
// $starttime = $mtime[1] + $mtime[0];
|
||||
/*
|
||||
$in_sql = "'a_', 'f_list'";
|
||||
$or_sql = '';
|
||||
|
||||
if ( $options )
|
||||
if ( is_array($options_in) )
|
||||
{
|
||||
if ( is_array($options) )
|
||||
foreach ( $options_in as $option )
|
||||
{
|
||||
foreach ( $options as $option )
|
||||
{
|
||||
$in_sql .= ", '$option'";
|
||||
}
|
||||
$in_sql .= ", '$option'";
|
||||
}
|
||||
else
|
||||
}
|
||||
|
||||
if ( is_array($options_or) )
|
||||
{
|
||||
foreach ( $options_or as $option )
|
||||
{
|
||||
$or_sql = " OR auth_value LIKE '$option%'";
|
||||
$or_sql .= " OR auth_value LIKE '$option%'";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -480,6 +513,9 @@ class auth
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
// $mtime = explode(' ', microtime());
|
||||
// echo $mtime[1] + $mtime[0] - $starttime . " :: ";
|
||||
|
||||
// This is preliminary and can no doubt be improved. The 12 in
|
||||
// the chunk_split relates to the current 96bits (12 bytes) per forum
|
||||
if ( !empty($userdata['user_permissions']) )
|
||||
|
@ -503,18 +539,84 @@ class auth
|
|||
$this->acl_cache($userdata);
|
||||
}
|
||||
|
||||
// $mtime = explode(' ', microtime());
|
||||
// echo $mtime[1] + $mtime[0] - $starttime . " :: ";
|
||||
/*
|
||||
$sql = "SELECT auth_value, global_id, local_id
|
||||
FROM " . ACL_OPTIONS_TABLE . "
|
||||
WHERE auth_value IN ($in_sql) $or_sql";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
if ( isset($row['global_id']) )
|
||||
{
|
||||
$this->options['global'][$row['auth_value']] = $row['global_id'];
|
||||
}
|
||||
if ( isset($row['local_id']) )
|
||||
{
|
||||
$this->options['local'][$row['auth_value']] = $row['local_id'];
|
||||
}
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
*/
|
||||
if ( empty($userdata['user_permissions']) )
|
||||
{
|
||||
$this->acl_cache($userdata);
|
||||
}
|
||||
|
||||
// This is preliminary and can no doubt be improved
|
||||
$global_chars = ceil(sizeof($this->acl_options['global']) / 8);
|
||||
$local_chars = ceil(sizeof($this->acl_options['local']) / 8) + 2;
|
||||
$globals = substr($userdata['user_permissions'], 0, $global_chars);
|
||||
$locals = substr($userdata['user_permissions'], $global_chars);
|
||||
|
||||
for($i = 0; $i < $global_chars; $i++)
|
||||
{
|
||||
$this->acl['global'] .= str_pad(decbin(ord(substr($globals, $i, 1))), 8, 0, STR_LEFT_PAD);
|
||||
}
|
||||
|
||||
$forums = explode("\r\n", chunk_split($locals, $local_chars));
|
||||
array_pop($forums);
|
||||
foreach ( $forums as $forum )
|
||||
{
|
||||
$forum_id = bindec(str_pad(decbin(ord(substr($forum, 0, 1))), 8, 0, STR_PAD_LEFT) . str_pad(decbin(ord(substr($forum, 1, 1))), 8, 0, STR_PAD_LEFT));
|
||||
|
||||
for($i = 2; $i < $local_chars; $i++)
|
||||
{
|
||||
$this->acl['local'][$forum_id] .= str_pad(decbin(ord(substr($forum, $i, 1))), 8, 0, STR_PAD_LEFT);
|
||||
}
|
||||
}
|
||||
unset($forums);
|
||||
}
|
||||
|
||||
// $mtime = explode(' ', microtime());
|
||||
// echo $mtime[1] + $mtime[0] - $starttime . " :: ";
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
// Look up an option
|
||||
function acl_get($option, $forum_id = 0)
|
||||
{
|
||||
return ( $this->founder ) ? true : substr($this->acl[$forum_id], $this->options[$option], 1);
|
||||
// return ( $this->founder ) ? true : $this->acl[$forum_id][$option];
|
||||
static $acl_cache;
|
||||
/*
|
||||
if ( !isset($acl_cache[$forum_id][$option]) && !$this->founder )
|
||||
{
|
||||
$acl_cache[$forum_id][$option] = substr($this->acl[$forum_id], $this->options[$option], 1);
|
||||
}
|
||||
*/
|
||||
if ( !isset($acl_cache[$forum_id][$option]) && !$this->founder )
|
||||
{
|
||||
if ( isset($this->acl_options['global'][$option]) )
|
||||
{
|
||||
$acl_cache[$forum_id][$option] = substr($this->acl['global'], $this->acl_options['global'][$option], 1);
|
||||
}
|
||||
if ( isset($this->acl_options['local'][$option]) )
|
||||
{
|
||||
$acl_cache[$forum_id][$option] |= substr($this->acl['local'][$forum_id], $this->acl_options['local'][$option], 1);
|
||||
}
|
||||
}
|
||||
|
||||
return ( $this->founder ) ? true : $acl_cache[$forum_id][$option];
|
||||
}
|
||||
|
||||
// Cache data
|
||||
|
@ -522,28 +624,18 @@ class auth
|
|||
{
|
||||
global $db;
|
||||
|
||||
$sql = "SELECT a.forum_id, a.auth_allow_deny, ao.auth_option_id, ao.auth_value
|
||||
$acl_db = array();
|
||||
|
||||
$sql = "SELECT a.forum_id, a.auth_allow_deny, ao.auth_value
|
||||
FROM " . ACL_GROUPS_TABLE . " a, " . ACL_OPTIONS_TABLE . " ao, " . USER_GROUP_TABLE . " ug
|
||||
WHERE ug.user_id = " . $userdata['user_id'] . "
|
||||
AND a.group_id = ug.group_id
|
||||
AND ao.auth_option_id = a.auth_option_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
switch ( $this->acl[$row['forum_id']][$row['auth_option_id']] )
|
||||
{
|
||||
case ACL_PERMIT:
|
||||
case ACL_DENY:
|
||||
case ACL_PREVENT:
|
||||
break;
|
||||
default:
|
||||
$this->acl[$row['forum_id']][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
}
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
$acl_db[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
|
@ -553,33 +645,30 @@ class auth
|
|||
AND ao.auth_option_id = a.auth_option_id";
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( $row = $db->sql_fetchrow($result) )
|
||||
while ( $row = $db->sql_fetchrow($result) )
|
||||
{
|
||||
do
|
||||
{
|
||||
switch ( $this->acl[$row['forum_id']][$row['auth_option_id']] )
|
||||
{
|
||||
case ACL_PERMIT:
|
||||
case ACL_PREVENT:
|
||||
break;
|
||||
default:
|
||||
$this->acl[$row['forum_id']][$row['auth_option_id']] = $row['auth_allow_deny'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
$acl_db[] = $row;
|
||||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
if ( is_array($this->acl) )
|
||||
if ( is_array($acl_db) )
|
||||
{
|
||||
sort($acl_db);
|
||||
/* foreach ( $acl_db as $row )
|
||||
{
|
||||
if ( $row['auth_allow_deny'] != ACL_INHERIT && $this->acl[$row['forum_id']][$row['auth_value']] !== ACL_DENY )
|
||||
{
|
||||
$this->acl[$row['forum_id']][$row['auth_option_id']] = intval($row['auth_allow_deny']);
|
||||
}
|
||||
}
|
||||
unset($acl_db);
|
||||
|
||||
foreach ( $this->acl as $forum_id => $auth_ary )
|
||||
{
|
||||
$holding = array();
|
||||
for($i = 0; $i < 80; $i++)
|
||||
{
|
||||
$allow = ( isset($this->acl[$forum_id][$i]) ) ? $this->acl[$forum_id][$i] : 0;
|
||||
$holding[] = ( $allow == ACL_ALLOW || $allow == ACL_PERMIT ) ? 1 : 0;
|
||||
$holding[] = ( isset($this->acl[$forum_id][$i]) ) ? $this->acl[$forum_id][$i] : 0;
|
||||
}
|
||||
|
||||
$bitstring = explode("\r\n", chunk_split(str_pad(decbin($forum_id), 16, 0, STR_PAD_LEFT) . implode('', $holding), 8));
|
||||
|
@ -589,8 +678,75 @@ class auth
|
|||
$userdata['user_permissions'] .= chr(bindec($byte));
|
||||
}
|
||||
}
|
||||
unset($holding);*/
|
||||
|
||||
foreach ( $acl_db as $row )
|
||||
{
|
||||
if ( $row['auth_allow_deny'] != ACL_INHERIT && $this->acl[$row['forum_id']][$row['auth_value']] !== ACL_DENY )
|
||||
{
|
||||
$this->acl[$row['forum_id']][$row['auth_value']] = intval($row['auth_allow_deny']);
|
||||
}
|
||||
}
|
||||
unset($acl_db);
|
||||
|
||||
$global_bits = 8 * ceil(sizeof($this->acl_options['global']) / 8);
|
||||
$local_bits = 8 * ceil(sizeof($this->acl_options['local']) / 8 );
|
||||
$local_hold = '';
|
||||
$global_hold = '';
|
||||
|
||||
foreach ( $this->acl as $forum_id => $auth_ary )
|
||||
{
|
||||
$holding = array();
|
||||
|
||||
if ( !$forum_id )
|
||||
{
|
||||
$fill = $global_bits;
|
||||
$ary_key = 'global';
|
||||
$hold_str = 'global_hold';
|
||||
}
|
||||
else
|
||||
{
|
||||
$fill = $local_bits;
|
||||
$ary_key = 'local';
|
||||
$hold_str = 'local_hold';
|
||||
}
|
||||
|
||||
for($i = 0; $i < $fill; $i++)
|
||||
{
|
||||
$holding[$i] = 0;
|
||||
}
|
||||
|
||||
foreach ( $auth_ary as $option => $allow )
|
||||
{
|
||||
if ( $allow )
|
||||
{
|
||||
$holding[$this->acl_options[$ary_key][$option]] = 1;
|
||||
}
|
||||
}
|
||||
|
||||
$forum_id = ( $forum_id ) ? str_pad(decbin($forum_id), 16, 0, STR_PAD_LEFT) : '';
|
||||
$bitstring = explode("\r\n", chunk_split($forum_id . implode('', $holding), 8));
|
||||
array_pop($bitstring);
|
||||
|
||||
foreach ( $bitstring as $byte )
|
||||
{
|
||||
$$hold_str .= chr(bindec($byte));
|
||||
}
|
||||
}
|
||||
unset($holding);
|
||||
|
||||
if ( $global_hold == '' )
|
||||
{
|
||||
for($i = 0; $i < $global_bits; $i++)
|
||||
{
|
||||
$global_hold .= '0';
|
||||
}
|
||||
}
|
||||
|
||||
$userdata['user_permissions'] .= $global_hold . $local_hold;
|
||||
unset($global_hold);
|
||||
unset($local_hold);
|
||||
|
||||
$sql = "UPDATE " . USERS_TABLE . "
|
||||
SET user_permissions = '" . addslashes($userdata['user_permissions']) . "'
|
||||
WHERE user_id = " . $userdata['user_id'];
|
||||
|
@ -625,7 +781,7 @@ class auth
|
|||
}
|
||||
}
|
||||
|
||||
message_die(ERROR, 'Authentication method not found');
|
||||
trigger_error('Authentication method not found', E_USER_ERROR);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,11 +27,11 @@ if ( !defined('IN_PHPBB') )
|
|||
exit;
|
||||
}
|
||||
|
||||
if ( empty($HTTP_GET_VARS['u']) || $HTTP_GET_VARS['u'] == ANONYMOUS )
|
||||
if ( empty($_GET['u']) || $_GET['u'] == ANONYMOUS )
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_user_id_specified']);
|
||||
message_die(MESSAGE, $user->lang['No_user_id_specified']);
|
||||
}
|
||||
$profiledata = get_userdata(intval($HTTP_GET_VARS['u']));
|
||||
$profiledata = get_userdata(intval($_GET['u']));
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM " . RANKS_TABLE . "
|
||||
|
@ -117,8 +117,8 @@ if ( $profiledata['user_viewemail'] || $auth->acl_get('a_') )
|
|||
{
|
||||
$email_uri = ( $board_config['board_email_form'] ) ? "profile.$phpEx$SID&mode=email&u=" . $profiledata['user_id'] : 'mailto:' . $profiledata['user_email'];
|
||||
|
||||
$email_img = '<a href="' . $email_uri . '">' . create_img($theme['icon_email'], $lang['Send_email']) . '</a>';
|
||||
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
|
||||
$email_img = '<a href="' . $email_uri . '">' . $user->img('icon_email', $user->lang['Send_email']) . '</a>';
|
||||
$email = '<a href="' . $email_uri . '">' . $user->lang['Send_email'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -127,21 +127,21 @@ else
|
|||
}
|
||||
|
||||
$temp_url = "profile.$phpEx$SID&mode=viewprofile&u=$user_id";
|
||||
$profile_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_profile'], $lang['Read_profile']) . '</a>';
|
||||
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
|
||||
$profile_img = '<a href="' . $temp_url . '">' . $user->img('icon_profile', $user->lang['Read_profile']) . '</a>';
|
||||
$profile = '<a href="' . $temp_url . '">' . $user->lang['Read_profile'] . '</a>';
|
||||
|
||||
$temp_url = "privmsg.$phpEx$SID&mode=post&u=$user_id";
|
||||
$pm_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_pm'], $lang['Send_private_message']) . '</a>';
|
||||
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
|
||||
$pm_img = '<a href="' . $temp_url . '">' . $user->img('icon_pm', $user->lang['Send_private_message']) . '</a>';
|
||||
$pm = '<a href="' . $temp_url . '">' . $user->lang['Send_private_message'] . '</a>';
|
||||
|
||||
$www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . create_img($theme['icon_www'], $lang['Visit_website']) . '</a>' : '';
|
||||
$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
|
||||
$www_img = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $user->img('icon_www', $user->lang['Visit_website']) . '</a>' : '';
|
||||
$www = ( $profiledata['user_website'] ) ? '<a href="' . $profiledata['user_website'] . '" target="_userwww">' . $user->lang['Visit_website'] . '</a>' : '';
|
||||
|
||||
if ( !empty($profiledata['user_icq']) )
|
||||
{
|
||||
$icq_status_img = '<a href="http://wwp.icq.com/' . $profiledata['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $profiledata['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
|
||||
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . create_img($theme['icon_icq'], $lang['ICQ']) . '</a>';
|
||||
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $lang['ICQ'] . '</a>';
|
||||
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $user->img('icon_icq', $user->lang['ICQ']) . '</a>';
|
||||
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $profiledata['user_icq'] . '">' . $user->lang['ICQ'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -150,36 +150,36 @@ else
|
|||
$icq = '';
|
||||
}
|
||||
|
||||
$aim_img = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . create_img($theme['icon_aim'], $lang['AIM']) . '</a>' : '';
|
||||
$aim = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
|
||||
$aim_img = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . $user->img('icon_aim', $user->lang['AIM']) . '</a>' : '';
|
||||
$aim = ( $profiledata['user_aim'] ) ? '<a href="aim:goim?screenname=' . $profiledata['user_aim'] . '&message=Hello+Are+you+there?">' . $user->lang['AIM'] . '</a>' : '';
|
||||
|
||||
$temp_url = "profile.$phpEx$SID&mode=viewprofile&u=$user_id";
|
||||
$msn_img = ( $profiledata['user_msnm'] ) ? '<a href="' . $temp_url . '">' . create_img($theme['icon_msnm'], $lang['MSNM']) . '</a>' : '';
|
||||
$msn = ( $profiledata['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
|
||||
$msn_img = ( $profiledata['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $user->img('icon_msnm', $user->lang['MSNM']) . '</a>' : '';
|
||||
$msn = ( $profiledata['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $user->lang['MSNM'] . '</a>' : '';
|
||||
|
||||
$yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . create_img($theme['icon_yim'], $lang['YIM']) . '</a>' : '';
|
||||
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
|
||||
$yim_img = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $user->img('icon_yim', $user->lang['YIM']) . '</a>' : '';
|
||||
$yim = ( $profiledata['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $profiledata['user_yim'] . '&.src=pg">' . $user->lang['YIM'] . '</a>' : '';
|
||||
|
||||
$temp_url = "search.$phpEx$SID&search_author=" . urlencode($profiledata['username']) . "&showresults=posts";
|
||||
$search_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_search'], $lang['Search_user_posts']) . '</a>';
|
||||
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
|
||||
$search_img = '<a href="' . $temp_url . '">' . $user->img('icon_search', $user->lang['Search_user_posts']) . '</a>';
|
||||
$search = '<a href="' . $temp_url . '">' . $user->lang['Search_user_posts'] . '</a>';
|
||||
|
||||
//
|
||||
// Generate page
|
||||
//
|
||||
$page_title = $lang['Viewing_profile'];
|
||||
$page_title = $user->lang['Viewing_profile'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'USERNAME' => $profiledata['username'],
|
||||
'JOINED' => $user->format_date($profiledata['user_regdate'], $lang['DATE_FORMAT']),
|
||||
'JOINED' => $user->format_date($profiledata['user_regdate'], $user->lang['DATE_FORMAT']),
|
||||
'POSTER_RANK' => $poster_rank,
|
||||
'RANK_IMAGE' => $rank_image,
|
||||
'POSTS_PER_DAY' => $posts_per_day,
|
||||
'POSTS' => $profiledata['user_posts'],
|
||||
'PERCENTAGE' => $percentage . '%',
|
||||
'POST_DAY_STATS' => sprintf($lang['User_post_day_stats'], $posts_per_day),
|
||||
'POST_PERCENT_STATS' => sprintf($lang['User_post_pct_stats'], $percentage),
|
||||
'POST_DAY_STATS' => sprintf($user->lang['User_post_day_stats'], $posts_per_day),
|
||||
'POST_PERCENT_STATS' => sprintf($user->lang['User_post_pct_stats'], $percentage),
|
||||
|
||||
'SEARCH_IMG' => $search_img,
|
||||
'SEARCH' => $search,
|
||||
|
@ -204,25 +204,25 @@ $template->assign_vars(array(
|
|||
'INTERESTS' => ( $profiledata['user_interests'] ) ? $profiledata['user_interests'] : ' ',
|
||||
'AVATAR_IMG' => $avatar_img,
|
||||
|
||||
'L_VIEWING_PROFILE' => sprintf($lang['Viewing_user_profile'], $profiledata['username']),
|
||||
'L_ABOUT_USER' => sprintf($lang['About_user'], $profiledata['username']),
|
||||
'L_AVATAR' => $lang['Avatar'],
|
||||
'L_POSTER_RANK' => $lang['Poster_rank'],
|
||||
'L_JOINED' => $lang['Joined'],
|
||||
'L_TOTAL_POSTS' => $lang['Total_posts'],
|
||||
'L_SEARCH_USER_POSTS' => sprintf($lang['Search_user_posts'], $profiledata['username']),
|
||||
'L_CONTACT' => $lang['Contact'],
|
||||
'L_EMAIL_ADDRESS' => $lang['Email_address'],
|
||||
'L_EMAIL' => $lang['Email'],
|
||||
'L_PM' => $lang['Private_Message'],
|
||||
'L_ICQ_NUMBER' => $lang['ICQ'],
|
||||
'L_YAHOO' => $lang['YIM'],
|
||||
'L_AIM' => $lang['AIM'],
|
||||
'L_MESSENGER' => $lang['MSNM'],
|
||||
'L_WEBSITE' => $lang['Website'],
|
||||
'L_LOCATION' => $lang['Location'],
|
||||
'L_OCCUPATION' => $lang['Occupation'],
|
||||
'L_INTERESTS' => $lang['Interests'],
|
||||
'L_VIEWING_PROFILE' => sprintf($user->lang['Viewing_user_profile'], $profiledata['username']),
|
||||
'L_ABOUT_USER' => sprintf($user->lang['About_user'], $profiledata['username']),
|
||||
'L_AVATAR' => $user->lang['Avatar'],
|
||||
'L_POSTER_RANK' => $user->lang['Poster_rank'],
|
||||
'L_JOINED' => $user->lang['Joined'],
|
||||
'L_TOTAL_POSTS' => $user->lang['Total_posts'],
|
||||
'L_SEARCH_USER_POSTS' => sprintf($user->lang['Search_user_posts'], $profiledata['username']),
|
||||
'L_CONTACT' => $user->lang['Contact'],
|
||||
'L_EMAIL_ADDRESS' => $user->lang['Email_address'],
|
||||
'L_EMAIL' => $user->lang['Email'],
|
||||
'L_PM' => $user->lang['Private_Message'],
|
||||
'L_ICQ_NUMBER' => $user->lang['ICQ'],
|
||||
'L_YAHOO' => $user->lang['YIM'],
|
||||
'L_AIM' => $user->lang['AIM'],
|
||||
'L_MESSENGER' => $user->lang['MSNM'],
|
||||
'L_WEBSITE' => $user->lang['Website'],
|
||||
'L_LOCATION' => $user->lang['Location'],
|
||||
'L_OCCUPATION' => $user->lang['Occupation'],
|
||||
'L_INTERESTS' => $user->lang['Interests'],
|
||||
|
||||
'U_SEARCH_USER' => "search.$phpEx$SID&search_author=" . urlencode($profiledata['username']),
|
||||
|
||||
|
|
|
@ -37,9 +37,9 @@ else
|
|||
}
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
// Handle marking posts
|
||||
|
@ -54,14 +54,14 @@ if ($mark_read == 'forums')
|
|||
'META' => '<meta http-equiv="refresh" content="3;url=' . "index.$phpEx$SID" . '">')
|
||||
);
|
||||
|
||||
$message = $lang['Forums_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_index'], '<a href="' . "index.$phpEx$SID" . '">', '</a> ');
|
||||
$message = $user->lang['Forums_marked_read'] . '<br /><br />' . sprintf($user->lang['Click_return_index'], '<a href="' . "index.$phpEx$SID" . '">', '</a> ');
|
||||
message_die(MESSAGE, $message);
|
||||
}
|
||||
// End handle marking posts
|
||||
|
||||
// Topic/forum marked read info
|
||||
$mark_topics = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t'])) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t'])) : array();
|
||||
$mark_forums = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f'])) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f'])) : array();
|
||||
$mark_topics = (isset($_COOKIE[$board_config['cookie_name'] . '_t'])) ? unserialize(stripslashes($_COOKIE[$board_config['cookie_name'] . '_t'])) : array();
|
||||
$mark_forums = (isset($_COOKIE[$board_config['cookie_name'] . '_f'])) ? unserialize(stripslashes($_COOKIE[$board_config['cookie_name'] . '_f'])) : array();
|
||||
|
||||
// Set some stats, get posts count from forums data if we... hum... retrieve all forums data
|
||||
$total_users = $board_config['num_users'];
|
||||
|
@ -70,15 +70,15 @@ $newest_uid = $board_config['newest_user_id'];
|
|||
|
||||
if ($total_users == 0)
|
||||
{
|
||||
$l_total_user_s = $lang['Registered_users_zero_total'];
|
||||
$l_total_user_s = $user->lang['Registered_users_zero_total'];
|
||||
}
|
||||
else if ($total_users == 1)
|
||||
{
|
||||
$l_total_user_s = $lang['Registered_user_total'];
|
||||
$l_total_user_s = $user->lang['Registered_user_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_total_user_s = $lang['Registered_users_total'];
|
||||
$l_total_user_s = $user->lang['Registered_users_total'];
|
||||
}
|
||||
|
||||
// Forum moderators ... a static template var could allow us
|
||||
|
@ -117,7 +117,7 @@ else
|
|||
if (!$auth->acl_get('f_list', $cat_id))
|
||||
{
|
||||
// TODO: Deal with hidden categories
|
||||
message_die(ERROR, $lang['Category_not_exist']);
|
||||
message_die(ERROR, $user->lang['Category_not_exist']);
|
||||
}
|
||||
|
||||
// NOTE: make sure that categories post count is set to 0
|
||||
|
@ -147,7 +147,7 @@ else
|
|||
FROM ' . FORUMS_TABLE . ' f
|
||||
LEFT JOIN ' . USERS_TABLE . ' u ON f.forum_last_poster_id = u.user_id
|
||||
WHERE f.left_id BETWEEN ' . $catrow['left_id'] . ' AND ' . $catrow['right_id'] . '
|
||||
OR ' . $catrow['left_id'] . ' BETWEEN f.left_id AND f.right_id
|
||||
OR ' . $catrow['left_id'] . ' BETWEEN f.left_id AND f.right_id
|
||||
ORDER BY f.left_id';
|
||||
}
|
||||
}
|
||||
|
@ -205,44 +205,44 @@ include($phpbb_root_path . 'includes/forums_display.' . $phpEx);
|
|||
|
||||
if ($total_posts == 0)
|
||||
{
|
||||
$l_total_post_s = $lang['Posted_articles_zero_total'];
|
||||
$l_total_post_s = $user->lang['Posted_articles_zero_total'];
|
||||
}
|
||||
else if ($total_posts == 1)
|
||||
{
|
||||
$l_total_post_s = $lang['Posted_article_total'];
|
||||
$l_total_post_s = $user->lang['Posted_article_total'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_total_post_s = $lang['Posted_articles_total'];
|
||||
$l_total_post_s = $user->lang['Posted_articles_total'];
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
|
||||
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
|
||||
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $newest_uid . '">', $newest_user, '</a>'),
|
||||
'NEWEST_USER' => sprintf($user->lang['Newest_user'], '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $newest_uid . '">', $newest_user, '</a>'),
|
||||
|
||||
'FORUM_IMG' => create_img($theme['forum'], $lang['No_new_posts']),
|
||||
'FORUM_NEW_IMG' => create_img($theme['forum_new'], $lang['New_posts']),
|
||||
'FORUM_LOCKED_IMG' => create_img($theme['forum_locked'], $lang['No_new_posts_locked']),
|
||||
'FORUM_IMG' => $user->img('forum', $user->lang['No_new_posts']),
|
||||
'FORUM_NEW_IMG' => $user->img('forum_new', $user->lang['New_posts']),
|
||||
'FORUM_LOCKED_IMG' => $user->img('forum_locked', $user->lang['No_new_posts_locked']),
|
||||
|
||||
'L_FORUM' => $lang['Forum'],
|
||||
'L_TOPICS' => $lang['Topics'],
|
||||
'L_REPLIES' => $lang['Replies'],
|
||||
'L_VIEWS' => $lang['Views'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_LASTPOST' => $lang['Last_Post'],
|
||||
'L_MODERATORS' => $lang['Moderators'],
|
||||
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
|
||||
'L_NEW_POSTS' => $lang['New_posts'],
|
||||
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
|
||||
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
|
||||
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
|
||||
'L_FORUM' => $user->lang['Forum'],
|
||||
'L_TOPICS' => $user->lang['Topics'],
|
||||
'L_REPLIES' => $user->lang['Replies'],
|
||||
'L_VIEWS' => $user->lang['Views'],
|
||||
'L_POSTS' => $user->lang['Posts'],
|
||||
'L_LASTPOST' => $user->lang['Last_Post'],
|
||||
'L_MODERATORS' => $user->lang['Moderators'],
|
||||
'L_NO_NEW_POSTS' => $user->lang['No_new_posts'],
|
||||
'L_NEW_POSTS' => $user->lang['New_posts'],
|
||||
'L_NO_NEW_POSTS_LOCKED' => $user->lang['No_new_posts_locked'],
|
||||
'L_NEW_POSTS_LOCKED' => $user->lang['New_posts_locked'],
|
||||
'L_ONLINE_EXPLAIN' => $user->lang['Online_explain'],
|
||||
|
||||
'L_VIEW_MODERATORS' => $lang['View_moderators'],
|
||||
'L_FORUM_LOCKED' => $lang['Forum_is_locked'],
|
||||
'L_MARK_FORUMS_READ' => $lang['Mark_all_forums'],
|
||||
'L_LEGEND' => $lang['Legend'],
|
||||
'L_NO_FORUMS' => $lang['No_forums'],
|
||||
'L_VIEW_MODERATORS' => $user->lang['View_moderators'],
|
||||
'L_FORUM_LOCKED' => $user->lang['Forum_is_locked'],
|
||||
'L_MARK_FORUMS_READ' => $user->lang['Mark_all_forums'],
|
||||
'L_LEGEND' => $user->lang['Legend'],
|
||||
'L_NO_FORUMS' => $user->lang['No_forums'],
|
||||
|
||||
'U_MARK_READ' => "index.$phpEx$SID&mark=forums")
|
||||
);
|
||||
|
@ -265,7 +265,7 @@ foreach ($nav_forums as $row)
|
|||
}
|
||||
|
||||
// Start output of page
|
||||
$page_title = $lang['Index'];
|
||||
$page_title = $user->lang['Index'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
|
|
|
@ -627,6 +627,7 @@ CREATE TABLE phpbb_users (
|
|||
user_session_time int(11) DEFAULT '0' NOT NULL,
|
||||
user_session_page smallint(5) DEFAULT '0' NOT NULL,
|
||||
user_lastvisit int(11) DEFAULT '0' NOT NULL,
|
||||
user_startpage varchar(100) DEFAULT '',
|
||||
user_colour varchar(6) DEFAULT '' NOT NULL,
|
||||
user_posts mediumint(8) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
user_lang varchar(50),
|
||||
|
@ -634,6 +635,7 @@ CREATE TABLE phpbb_users (
|
|||
user_dst tinyint(1) DEFAULT '0' NOT NULL,
|
||||
user_dateformat varchar(15) DEFAULT 'd M Y H:i' NOT NULL,
|
||||
user_style tinyint(4),
|
||||
user_rank int(11) DEFAULT '0',
|
||||
user_new_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
user_unread_privmsg smallint(5) UNSIGNED DEFAULT '0' NOT NULL,
|
||||
user_last_privmsg int(11) DEFAULT '0' NOT NULL,
|
||||
|
@ -651,12 +653,11 @@ CREATE TABLE phpbb_users (
|
|||
user_allowsmile tinyint(1) DEFAULT '1',
|
||||
user_allowavatar tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_pm tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_email tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_allow_viewonline tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_notify tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_notify_pm tinyint(1) DEFAULT '1' NOT NULL,
|
||||
user_popup_pm tinyint(1) DEFAULT '0' NOT NULL,
|
||||
user_rank int(11) DEFAULT '0',
|
||||
user_avatar char(100),
|
||||
user_avatar_type tinyint(4) DEFAULT '0' NOT NULL,
|
||||
user_avatar_width tinyint(4) UNSIGNED,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$this->lang = array_merge($this->lang, array(
|
||||
'Admin_title' => 'Administration Panel',
|
||||
'No_admin' => 'You are not authorised to administer this board',
|
||||
'No_frames' => 'Sorry, your browser does not support frames',
|
||||
|
@ -166,14 +166,13 @@ $lang = array_merge($lang, array(
|
|||
'Restore_Error_filename' => 'The file you uploaded had an unsupported extension.',
|
||||
'Compress_unsupported' => 'The version of PHP installed on this server does not support the type of compression used for your backup. Please use a compression method listed on the previous page.',
|
||||
'Restore_Error_no_file' => 'No file was uploaded',
|
||||
'Permissions_explain' => 'Here you can alter which users and groups can access which forums. Permissions can be set for individual operations such as; reading, posting, voting, etc via the <i>Advanced</i> form. This page only applies to forum permissions. To assign moderators or define administrators please use the appropriate page (see left hand side menu).',
|
||||
'Permissions_extra_explain' => 'Permissions are based on a; PERMIT, ALLOW, DENY, PREVENT system. By default users and groups are set to DENY access to all operations, to do anything users or groups have to be granted ALLOW access. When conflicts exist, e.g. a user having ALLOW permissions to a function belongs to a group that is set to DENY such a function the user setting takes precidence, i.e. in this case the user would be ALLOWed access to this function. Similarly a user denied access to a function will be denied even if they belong to a group that grants them access. If a user belongs to two groups one of which grants an ALLOW while another is set to DENY the user will be denied access.',
|
||||
'Permissions_extra2_explain' => 'There may be times when you want to deny (or allow) access to a group no matter what their individual user settings are, this is what PERMIT and PREVENT are for. By setting a user (or more likely a group) to one of these will PERMIT (ALLOW) or PREVENT (DENY) access to a function no matter what their user settings are. You may find this useful for things such as "banned" groups, etc. doing away with any need to check for individual user permissions.',
|
||||
'ACL_explain' => 'Permissions are based on an ALLOW / INHERIT / DENY system with all options being denied by default. The precedent is DENY > ALLOW > INHERIT for any combination of user or group settings. The INHERIT setting causes permissions granted elsewhere for the option being used in place of a specific ALLOW / DENY setting here.',
|
||||
'Permissions_explain' => 'Here you can alter which users and groups can access which forums. To assign moderators or define administrators please use the appropriate page (see left hand side menu).',
|
||||
'Moderators' => 'Moderators',
|
||||
'Moderators_explain' => 'Here you can assign users and groups as forum moderators. You can give users or groups individual access to certain moderator functions as you set fit via the <i>Advanced</i> form. Moderators have additional power in a given forum and by default can post and reply even when a forum or topic is locked.',
|
||||
'Moderators_explain' => 'Here you can assign users and groups as forum moderators. To assign users access to forums, to define super moderators or administrators please use the appropriate page (see left hand side menu).',
|
||||
'Super_Moderators' => 'Super Moderators',
|
||||
'Super_Moderators_explain' => 'Here you can assign users and groups as super moderators. Super Moderators are like ordinary moderators accept they have access to every forum on your board. You can give users or groups individual access to certain moderator functions as you set fit via the <i>Advanced</i> form. As with moderators, super moderators have additional power in a given forum and by default can post and reply even when a forum or topic is locked.',
|
||||
'Administrators_explain' => 'Here you can assign administrator rights to users or groups. All users with admin permissions can view the administration panel. However you can limit selected users or groups to only certain sections if you wish by clicking <i>Advanced</i>.',
|
||||
'Super_Moderators_explain' => 'Here you can assign users and groups as super moderators. Super Moderators are like ordinary moderators accept they have access to every forum on your board. To assign users access to forums or define administrators please use the appropriate page (see left hand side menu).',
|
||||
'Administrators_explain' => 'Here you can assign administrator rights to users or groups. All users with admin permissions can view the administration panel.',
|
||||
'Manage_users' => 'Manage Users',
|
||||
'Add_users' => 'Add Users',
|
||||
'Manage_groups' => 'Manage Groups',
|
||||
|
@ -190,12 +189,16 @@ $lang = array_merge($lang, array(
|
|||
'Applies_to_Group' => 'Applies to Group ...',
|
||||
'User_can' => 'User can ... ',
|
||||
'Group_can' => 'Group can ... ',
|
||||
'User_can_admin' => 'User can admin ... ',
|
||||
'Group_can_admin' => 'Group can admin ... ',
|
||||
'Option' => 'Option',
|
||||
'Allow' => 'Allow',
|
||||
'Permit' => 'Permit',
|
||||
'Inherit' => 'Inherit',
|
||||
'Deny' => 'Deny',
|
||||
'Prevent' => 'Prevent',
|
||||
'Basic' => 'Basic',
|
||||
'All_Allow' => 'All Allow',
|
||||
'All_Deny' => 'All Deny',
|
||||
'All_Inherit' => 'All Inherit',
|
||||
'Inheritance' => 'Inheritance',
|
||||
'Inheritance_explain' => 'Select the subforums you want to inherit these permissions',
|
||||
'acl_a_general' => 'General Settings',
|
||||
'acl_a_user' => 'Users',
|
||||
'acl_a_group' => 'Groups',
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
*
|
||||
***************************************************************************/
|
||||
|
||||
$lang = array_merge($lang, array(
|
||||
$this->lang = array_merge($this->lang, array(
|
||||
'ENCODING' => 'iso-8859-15',
|
||||
'DIRECTION' => 'ltr',
|
||||
'LEFT' => 'left',
|
||||
|
@ -72,6 +72,7 @@ $lang = array_merge($lang, array(
|
|||
'Next' => 'Next',
|
||||
'Previous' => 'Previous',
|
||||
'Goto_page' => 'Goto page',
|
||||
'Start_page' => 'Make my start page',
|
||||
'Joined' => 'Joined',
|
||||
'IP_Address' => 'IP Address',
|
||||
'Select_forum' => 'Select a forum',
|
||||
|
|
|
@ -27,9 +27,9 @@ include($phpbb_root_path . 'extension.inc');
|
|||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
// Set page ID for session management
|
||||
$userdata = $session->start();
|
||||
$auth = new auth($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
extract($_GET);
|
||||
|
@ -40,7 +40,7 @@ $redirect = (!empty($redirect)) ? $_SERVER['QUERY_STRING'] : '';
|
|||
// Do the login/logout/form/whatever
|
||||
if ( isset($login) || isset($logout) )
|
||||
{
|
||||
if ( isset($login) && !$userdata['user_id'] )
|
||||
if ( isset($login) && !$user->data['user_id'] )
|
||||
{
|
||||
$autologin = ( !empty($autologin) ) ? true : false;
|
||||
|
||||
|
@ -62,9 +62,9 @@ if ( isset($login) || isset($logout) )
|
|||
message_die(MESSAGE, $message);
|
||||
}
|
||||
}
|
||||
else if ( $userdata['user_id'] )
|
||||
else if ( $user->data['user_id'] )
|
||||
{
|
||||
$session->destroy($userdata);
|
||||
$session->destroy($user->data);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -74,7 +74,7 @@ if ( isset($login) || isset($logout) )
|
|||
redirect($redirect_url);
|
||||
}
|
||||
|
||||
if ( !$userdata['user_id'] )
|
||||
if ( !$user->data['user_id'] )
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'L_ENTER_PASSWORD' => $lang['Enter_password'],
|
||||
|
|
|
@ -25,9 +25,9 @@ include($phpbb_root_path . 'extension.inc');
|
|||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
$start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0;
|
||||
|
@ -71,7 +71,7 @@ else
|
|||
//
|
||||
// Memberlist sorting
|
||||
//
|
||||
$mode_types_text = array($lang['Sort_Joined'], $lang['Sort_Username'], $lang['Sort_Location'], $lang['Sort_Posts'], $lang['Sort_Email'], $lang['Sort_Website'], $lang['Sort_Top_Ten']);
|
||||
$mode_types_text = array($user->lang['Sort_Joined'], $user->lang['Sort_Username'], $user->lang['Sort_Location'], $user->lang['Sort_Posts'], $user->lang['Sort_Email'], $user->lang['Sort_Website'], $user->lang['Sort_Top_Ten']);
|
||||
$mode_types = array('joindate', 'username', 'location', 'posts', 'email', 'website', 'topten');
|
||||
|
||||
$select_sort_mode = '<select name="mode">';
|
||||
|
@ -83,7 +83,7 @@ for($i = 0; $i < count($mode_types_text); $i++)
|
|||
$select_sort_mode .= '</select>';
|
||||
|
||||
$select_sort_order = '<select name="order">';
|
||||
$select_sort_order .= ( $sort_order == '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>';
|
||||
$select_sort_order .= ( $sort_order == '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>';
|
||||
$select_sort_order .= '</select>';
|
||||
|
||||
if ( $mode != 'topten' || $board_config['topics_per_page'] < 10 )
|
||||
|
@ -102,22 +102,22 @@ else
|
|||
//
|
||||
$template->assign_vars(array(
|
||||
'PAGINATION' => $pagination,
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),
|
||||
'PAGE_NUMBER' => sprintf($user->lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_members / $board_config['topics_per_page'] )),
|
||||
|
||||
'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
|
||||
'L_EMAIL' => $lang['Email'],
|
||||
'L_WEBSITE' => $lang['Website'],
|
||||
'L_FROM' => $lang['Location'],
|
||||
'L_ORDER' => $lang['Order'],
|
||||
'L_SORT' => $lang['Sort'],
|
||||
'L_SUBMIT' => $lang['Sort'],
|
||||
'L_AIM' => $lang['AIM'],
|
||||
'L_YIM' => $lang['YIM'],
|
||||
'L_MSNM' => $lang['MSNM'],
|
||||
'L_ICQ' => $lang['ICQ'],
|
||||
'L_JOINED' => $lang['Joined'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_GOTO_PAGE' => $lang['Goto_page'],
|
||||
'L_SELECT_SORT_METHOD' => $user->lang['Select_sort_method'],
|
||||
'L_EMAIL' => $user->lang['Email'],
|
||||
'L_WEBSITE' => $user->lang['Website'],
|
||||
'L_FROM' => $user->lang['Location'],
|
||||
'L_ORDER' => $user->lang['Order'],
|
||||
'L_SORT' => $user->lang['Sort'],
|
||||
'L_SUBMIT' => $user->lang['Sort'],
|
||||
'L_AIM' => $user->lang['AIM'],
|
||||
'L_YIM' => $user->lang['YIM'],
|
||||
'L_MSNM' => $user->lang['MSNM'],
|
||||
'L_ICQ' => $user->lang['ICQ'],
|
||||
'L_JOINED' => $user->lang['Joined'],
|
||||
'L_POSTS' => $user->lang['Posts'],
|
||||
'L_GOTO_PAGE' => $user->lang['Goto_page'],
|
||||
|
||||
'S_MODE_SELECT' => $select_sort_mode,
|
||||
'S_ORDER_SELECT' => $select_sort_order,
|
||||
|
@ -176,7 +176,7 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
$user_id = $row['user_id'];
|
||||
|
||||
$from = ( !empty($row['user_from']) ) ? $row['user_from'] : ' ';
|
||||
$joined = $user->format_date($row['user_regdate'], $lang['DATE_FORMAT']);
|
||||
$joined = $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']);
|
||||
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
|
||||
|
||||
$poster_avatar = '';
|
||||
|
@ -200,8 +200,8 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
{
|
||||
$email_uri = ( $board_config['board_email_form'] ) ? "profile.$phpEx$SID&mode=email&u=" . $user_id : 'mailto:' . $row['user_email'];
|
||||
|
||||
$email_img = '<a href="' . $email_uri . '">' . create_img($theme['icon_email'], $lang['Send_email']) . '</a>';
|
||||
$email = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
|
||||
$email_img = '<a href="' . $email_uri . '">' . $user->img('icon_email', $user->lang['Send_email']) . '</a>';
|
||||
$email = '<a href="' . $email_uri . '">' . $user->lang['Send_email'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -210,21 +210,21 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
}
|
||||
|
||||
$temp_url = "profile.$phpEx$SID&mode=viewprofile&u=$user_id";
|
||||
$profile_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_profile'], $lang['Read_profile']) . '</a>';
|
||||
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
|
||||
$profile_img = '<a href="' . $temp_url . '">' . $user->img('icon_profile', $user->lang['Read_profile']) . '</a>';
|
||||
$profile = '<a href="' . $temp_url . '">' . $user->lang['Read_profile'] . '</a>';
|
||||
|
||||
$temp_url = "privmsg.$phpEx$SID&mode=post&u=$user_id";
|
||||
$pm_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_pm'], $lang['Send_private_message']) . '</a>';
|
||||
$pm = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
|
||||
$pm_img = '<a href="' . $temp_url . '">' . $user->img('icon_pm', $user->lang['Send_private_message']) . '</a>';
|
||||
$pm = '<a href="' . $temp_url . '">' . $user->lang['Send_private_message'] . '</a>';
|
||||
|
||||
$www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . create_img($theme['icon_www'], $lang['Visit_website']) . '</a>' : '';
|
||||
$www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
|
||||
$www_img = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $user->img('icon_www', $user->lang['Visit_website']) . '</a>' : '';
|
||||
$www = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $user->lang['Visit_website'] . '</a>' : '';
|
||||
|
||||
if ( !empty($row['user_icq']) )
|
||||
{
|
||||
$icq_status_img = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
|
||||
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . create_img($theme['icon_icq'], $lang['ICQ']) . '</a>';
|
||||
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
|
||||
$icq_img = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $user->img('icon_icq', $user->lang['ICQ']) . '</a>';
|
||||
$icq = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $user->lang['ICQ'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -233,19 +233,19 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
$icq = '';
|
||||
}
|
||||
|
||||
$aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . create_img($theme['icon_aim'], $lang['AIM']) . '</a>' : '';
|
||||
$aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
|
||||
$aim_img = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $user->img('icon_aim', $user->lang['AIM']) . '</a>' : '';
|
||||
$aim = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $user->lang['AIM'] . '</a>' : '';
|
||||
|
||||
$temp_url = "profile.$phpEx$SID&mode=viewprofile&u=$user_id";
|
||||
$msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . create_img($theme['icon_msnm'], $lang['MSNM']) . '</a>' : '';
|
||||
$msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
|
||||
$msn_img = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $user->img('icon_msnm', $user->lang['MSNM']) . '</a>' : '';
|
||||
$msn = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $user->lang['MSNM'] . '</a>' : '';
|
||||
|
||||
$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . create_img($theme['icon_yim'], $lang['YIM']) . '</a>' : '';
|
||||
$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
|
||||
$yim_img = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $user->img('icon_yim', $user->lang['YIM']) . '</a>' : '';
|
||||
$yim = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $user->lang['YIM'] . '</a>' : '';
|
||||
|
||||
$temp_url = "search.$phpEx$SID&search_author=" . urlencode($username) . "&showresults=posts";
|
||||
$search_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_search'], $lang['Search_user_posts']) . '</a>';
|
||||
$search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
|
||||
$search_img = '<a href="' . $temp_url . '">' . $user->img('icon_search', $user->lang['Search_user_posts']) . '</a>';
|
||||
$search = '<a href="' . $temp_url . '">' . $user->lang['Search_user_posts'] . '</a>';
|
||||
|
||||
$template->assign_block_vars('memberrow', array(
|
||||
'ROW_NUMBER' => $i + ( $start + 1 ),
|
||||
|
@ -284,7 +284,7 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
|
||||
$page_title = $lang['Memberlist'];
|
||||
$page_title = $user->lang['Memberlist'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
|
@ -325,7 +325,7 @@ function username_search()
|
|||
//
|
||||
//
|
||||
//
|
||||
$sort_by_types_text = array($lang['Sort_Username'], $lang['Sort_Email'], $lang['Sort_Post_count'], $lang['Sort_Joined'], $lang['Sort_Last_active']);
|
||||
$sort_by_types_text = array($user->lang['Sort_Username'], $user->lang['Sort_Email'], $user->lang['Sort_Post_count'], $user->lang['Sort_Joined'], $user->lang['Sort_Last_active']);
|
||||
$s_sort_by = '';
|
||||
for($i = 0; $i < count($sort_by_types_text); $i++)
|
||||
{
|
||||
|
@ -333,7 +333,7 @@ function username_search()
|
|||
$s_sort_by .= '<option value="' . $i . '"' . $selected . '>' . $sort_by_types_text[$i] . '</option>';
|
||||
}
|
||||
|
||||
$sort_order_text = array('a' => $lang['Ascending'], 'd' => $lang['Descending']);
|
||||
$sort_order_text = array('a' => $user->lang['Ascending'], 'd' => $user->lang['Descending']);
|
||||
$s_sort_order = '';
|
||||
foreach ( $sort_order_text as $key => $value )
|
||||
{
|
||||
|
@ -341,7 +341,7 @@ function username_search()
|
|||
$s_sort_order .= '<option value="' . $key . '"' . $selected . '>' . $value . '</option>';
|
||||
}
|
||||
|
||||
$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 )
|
||||
{
|
||||
|
@ -349,7 +349,7 @@ function username_search()
|
|||
$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 )
|
||||
{
|
||||
|
@ -395,7 +395,7 @@ function username_search()
|
|||
//
|
||||
//
|
||||
//
|
||||
$page_title = $lang['Search'];
|
||||
$page_title = $user->lang['Search'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
|
@ -414,26 +414,26 @@ function username_search()
|
|||
'COUNT' => $count,
|
||||
|
||||
'PAGINATION' => $pagination,
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_users / $board_config['topics_per_page'] )),
|
||||
'PAGE_NUMBER' => sprintf($user->lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $total_users / $board_config['topics_per_page'] )),
|
||||
|
||||
'L_SEARCH_USERNAME' => $lang['Find_username'],
|
||||
'L_SEARCH_EXPLAIN' => $lang['Find_username_explain'],
|
||||
'L_RESET' => $lang['Reset'],
|
||||
'L_EMAIL' => $lang['Email'],
|
||||
'L_ICQ_NUMBER' => $lang['ICQ'],
|
||||
'L_MESSENGER' => $lang['MSNM'],
|
||||
'L_YAHOO' => $lang['YIM'],
|
||||
'L_AIM' => $lang['AIM'],
|
||||
'L_JOINED' => $lang['Joined'],
|
||||
'L_ACTIVE' => $lang['Last_active'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_SORT_BY' => $lang['Sort_by'],
|
||||
'L_SORT_ASCENDING' => $lang['Sort_Ascending'],
|
||||
'L_SORT_DESCENDING' => $lang['Sort_Descending'],
|
||||
'L_SELECT_MARKED' => $lang['Select_marked'],
|
||||
'L_MARK' => $lang['Mark'],
|
||||
'L_MARK_ALL' => $lang['Mark_all'],
|
||||
'L_UNMARK_ALL' => $lang['Unmark_all'],
|
||||
'L_SEARCH_USERNAME' => $user->lang['Find_username'],
|
||||
'L_SEARCH_EXPLAIN' => $user->lang['Find_username_explain'],
|
||||
'L_RESET' => $user->lang['Reset'],
|
||||
'L_EMAIL' => $user->lang['Email'],
|
||||
'L_ICQ_NUMBER' => $user->lang['ICQ'],
|
||||
'L_MESSENGER' => $user->lang['MSNM'],
|
||||
'L_YAHOO' => $user->lang['YIM'],
|
||||
'L_AIM' => $user->lang['AIM'],
|
||||
'L_JOINED' => $user->lang['Joined'],
|
||||
'L_ACTIVE' => $user->lang['Last_active'],
|
||||
'L_POSTS' => $user->lang['Posts'],
|
||||
'L_SORT_BY' => $user->lang['Sort_by'],
|
||||
'L_SORT_ASCENDING' => $user->lang['Sort_Ascending'],
|
||||
'L_SORT_DESCENDING' => $user->lang['Sort_Descending'],
|
||||
'L_SELECT_MARKED' => $user->lang['Select_marked'],
|
||||
'L_MARK' => $user->lang['Mark'],
|
||||
'L_MARK_ALL' => $user->lang['Mark_all'],
|
||||
'L_UNMARK_ALL' => $user->lang['Unmark_all'],
|
||||
|
||||
'S_FORM_NAME' => $form,
|
||||
'S_FIELD_NAME' => $field,
|
||||
|
@ -462,13 +462,13 @@ function username_search()
|
|||
$username = $row['username'];
|
||||
$user_id = $row['user_id'];
|
||||
|
||||
$joined = $user->format_date($row['user_regdate'], $lang['DATE_FORMAT']);
|
||||
$joined = $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']);
|
||||
$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;
|
||||
$active = ( !$row['user_lastvisit'] ) ? $lang['Never'] : $user->format_date($row['user_lastvisit'], $lang['DATE_FORMAT']);
|
||||
$active = ( !$row['user_lastvisit'] ) ? $user->lang['Never'] : $user->format_date($row['user_lastvisit'], $user->lang['DATE_FORMAT']);
|
||||
|
||||
$temp_url = "profile.$phpEx$SID&mode=viewprofile&u=$user_id";
|
||||
$profile_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_profile'], $lang['Read_profile']) . '</a>';
|
||||
$profile = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
|
||||
$profile_img = '<a href="' . $temp_url . '">' . $user->img('icon_profile', $user->lang['Read_profile']) . '</a>';
|
||||
$profile = '<a href="' . $temp_url . '">' . $user->lang['Read_profile'] . '</a>';
|
||||
|
||||
$template->assign_block_vars('memberrow', array(
|
||||
'ROW_NUMBER' => $i + ( $start + 1 ),
|
||||
|
|
|
@ -76,15 +76,13 @@ if ( isset($_POST['cancel']) )
|
|||
$redirect = "index.$phpEx$SID";
|
||||
}
|
||||
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . $redirect);
|
||||
exit;
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata, $forum_id);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
|
||||
|
|
|
@ -24,49 +24,34 @@ $phpbb_root_path = './';
|
|||
include($phpbb_root_path . 'extension.inc');
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
|
||||
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
||||
|
||||
// Grab all data
|
||||
extract($_GET);
|
||||
extract($_POST);
|
||||
|
||||
// Check and impose var types?
|
||||
$vars = array(
|
||||
'intval' => array(
|
||||
'forum_id' => 'f',
|
||||
'post_id' => 'p',
|
||||
'topic_id' => 't',
|
||||
)
|
||||
// Some vars need their names changing and type imposing
|
||||
$int_vars = array(
|
||||
'f' => 'forum_id',
|
||||
'p' => 'post_id',
|
||||
't' => 'topic_id',
|
||||
);
|
||||
|
||||
foreach ( $vars as $vartype => $varcheck)
|
||||
foreach ( $int_vars as $in_var => $out_var)
|
||||
{
|
||||
foreach ( $varcheck as $varname => $varparse )
|
||||
{
|
||||
$$varname = ( isset($_POST[$varparse]) ) ? $vartype($_POST[$varparse]) : ( ( isset($_GET[$varparse]) ) ? $vartype($_GET[$varparse]) : false );
|
||||
}
|
||||
$$out_var = ( isset($$in_var) ) ? intval($$in_var) : false;
|
||||
}
|
||||
|
||||
$refresh = $preview || $poll_add || $poll_edit || $poll_delete;
|
||||
|
||||
// ------------------------------------------------
|
||||
// NOTE --> No data validation at present! <-- NOTE
|
||||
// ------------------------------------------------
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata, $f, array('f_post', 'f_edit', 'f_delete', 'f_attach', 'f_poll', 'f_img', 'f_flash', 'f_bbcode', 'f_html', 'f_smilies', 'f_vote', 'f_sticky', 'f_announce'));
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
|
||||
// Was cancel pressed? If so then redirect to the appropriate
|
||||
// page, no point in continuing with any further checks
|
||||
// Was cancel pressed? If so then redirect to the appropriate page
|
||||
if ( !empty($cancel) )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
$redirect = ( $p ) ? "viewtopic.$phpEx$SID&p=$p#$p" : ( ( $t ) ? "viewtopic.$phpEx$SID&t=$t" : ( ( $f ) ? "viewforum.$phpEx$SID&f=$f" : "index.$phpEx$SID" ) );
|
||||
header($header_location . $redirect);
|
||||
exit;
|
||||
redirect($redirect);
|
||||
}
|
||||
|
||||
|
||||
|
@ -81,12 +66,12 @@ if ( !empty($cancel) )
|
|||
switch ( $mode )
|
||||
{
|
||||
case 'topicreview':
|
||||
require($phpbb_root_path . 'includes/topic_review.'.$phpEx);
|
||||
topic_review($t, false);
|
||||
// require($phpbb_root_path . 'includes/topic_review.'.$phpEx);
|
||||
// topic_review($t, false);
|
||||
break;
|
||||
|
||||
case 'smilies':
|
||||
generate_smilies('window', PAGE_POSTING);
|
||||
generate_smilies('window');
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -104,7 +89,7 @@ if ( !$board_config['allow_html'] )
|
|||
}
|
||||
else
|
||||
{
|
||||
$html_on = ( $post || $refresh ) ? ( ( !empty($disable_html) ) ? 0 : TRUE ) : ( ( !$userdata['user_id'] ) ? $board_config['allow_html'] : $userdata['user_allowhtml'] );
|
||||
$html_on = ( $post || $refresh ) ? ( ( !empty($disable_html) ) ? 0 : TRUE ) : ( ( !$user->data['user_id'] ) ? $board_config['allow_html'] : $user->data['user_allowhtml'] );
|
||||
}
|
||||
|
||||
if ( !$board_config['allow_bbcode'] )
|
||||
|
@ -113,7 +98,7 @@ if ( !$board_config['allow_bbcode'] )
|
|||
}
|
||||
else
|
||||
{
|
||||
$bbcode_on = ( $post || $refresh ) ? ( ( !empty($disable_bbcode) ) ? 0 : TRUE ) : ( ( !$userdata['user_id'] ) ? $board_config['allow_bbcode'] : $userdata['user_allowbbcode'] );
|
||||
$bbcode_on = ( $post || $refresh ) ? ( ( !empty($disable_bbcode) ) ? 0 : TRUE ) : ( ( !$user->data['user_id'] ) ? $board_config['allow_bbcode'] : $user->data['user_allowbbcode'] );
|
||||
}
|
||||
|
||||
$magic_urls_on = ( $post || $refresh ) ? ( ( !empty($disable_magic_url) ) ? 0 : TRUE ) : TRUE;
|
||||
|
@ -124,10 +109,10 @@ if ( !$board_config['allow_smilies'] )
|
|||
}
|
||||
else
|
||||
{
|
||||
$smilies_on = ( $post || $refresh ) ? ( ( !empty($disable_smilies) ) ? 0 : TRUE ) : ( ( !$userdata['user_id'] ) ? $board_config['allow_smilies'] : $userdata['user_allowsmile'] );
|
||||
$smilies_on = ( $post || $refresh ) ? ( ( !empty($disable_smilies) ) ? 0 : TRUE ) : ( ( !$user->data['user_id'] ) ? $board_config['allow_smilies'] : $user->data['user_allowsmile'] );
|
||||
}
|
||||
|
||||
$attach_sig = ( $post || $refresh ) ? ( ( !empty($attach_sig) ) ? TRUE : 0 ) : ( ( !$userdata['user_id'] ) ? 0 : $userdata['user_attachsig'] );
|
||||
$attach_sig = ( $post || $refresh ) ? ( ( !empty($attach_sig) ) ? TRUE : 0 ) : ( ( !$user->data['user_id'] ) ? 0 : $user->data['user_attachsig'] );
|
||||
|
||||
|
||||
|
||||
|
@ -139,24 +124,24 @@ switch ( $mode )
|
|||
case 'newtopic':
|
||||
if ( empty($f) )
|
||||
{
|
||||
message_die(MESSAGE, $lang['Forum_not_exist']);
|
||||
trigger($user->lang['Forum_not_exist']);
|
||||
}
|
||||
|
||||
$sql = "SELECT *
|
||||
FROM " . FORUMS_TABLE . "
|
||||
WHERE forum_id = $f";
|
||||
WHERE forum_id = $forum_id";
|
||||
break;
|
||||
|
||||
case 'reply':
|
||||
case 'vote':
|
||||
if ( empty( $t) )
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_topic_id']);
|
||||
trigger($user->lang['No_topic_id']);
|
||||
}
|
||||
|
||||
$sql = "SELECT f.*, t.*
|
||||
FROM " . FORUMS_TABLE . " f, " . TOPICS_TABLE . " t
|
||||
WHERE t.topic_id = $t
|
||||
WHERE t.topic_id = $topic_id
|
||||
AND f.forum_id = t.forum_id";
|
||||
break;
|
||||
|
||||
|
@ -166,7 +151,7 @@ switch ( $mode )
|
|||
case 'poll_delete':
|
||||
if ( empty($p) )
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_post_id']);
|
||||
trigger($user->lang['No_post_id']);
|
||||
}
|
||||
|
||||
$select_sql = ( !$submit ) ? ', t.topic_title, p.enable_bbcode, p.enable_html, p.enable_smilies, p.enable_sig, p.post_username, pt.post_subject, pt.post_text, pt.bbcode_uid, u.username, u.user_id, u.user_sig' : ', pt.post_subject, pt.post_text';
|
||||
|
@ -182,20 +167,18 @@ switch ( $mode )
|
|||
break;
|
||||
|
||||
default:
|
||||
message_die(MESSAGE, $lang['No_valid_mode']);
|
||||
message_die(MESSAGE, $user->lang['No_valid_mode']);
|
||||
}
|
||||
|
||||
if ( $result = $db->sql_query($sql) )
|
||||
{
|
||||
$post_info = $db->sql_fetchrow($result);
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
if ( $post_info = $db->sql_fetchrow($result) )
|
||||
{
|
||||
$forum_id = $post_info['forum_id'];
|
||||
$forum_name = $post_info['forum_name'];
|
||||
|
||||
$topic_title = $post_info['topic_title'];
|
||||
$topic_id = $post_info['topic_id'];
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -234,7 +217,8 @@ if ( isset($post) )
|
|||
print_r($message);
|
||||
echo "<br /><hr /><br />\n\n";
|
||||
|
||||
$result = $search->add($p, $message, $post_subject, $post_info['post_text'], $post_info['post_subject']);
|
||||
// Fulltext parser
|
||||
// $result = $search->add($p, $message, $post_subject, $post_info['post_text'], $post_info['post_subject']);
|
||||
}
|
||||
|
||||
exit;
|
||||
|
@ -251,16 +235,14 @@ $message = $post_info['post_text'];
|
|||
// Remove encoded bbcode, urls, etc.
|
||||
$match = array(
|
||||
'#<!\-\- b \-\-><b>(.*?)</b><!\-\- b \-\->#s',
|
||||
'#<!\-\- b \-\-><u>(.*?)</u><!\-\- b \-\->#s',
|
||||
'#\[b:([0-9a-z]+)\](.*?)\[/b:\1\]#s',
|
||||
'#<!\-\- b \-\-><a href="mailto:(.*?)">.*?</a><!\-\- b \-\->#',
|
||||
'#<!\-\- b \-\-><a href="(.*?)" target="_blank">.*?</a><!\-\- b \-\->#',
|
||||
'#<!\-\- u \-\-><u>(.*?)</u><!\-\- u \-\->#s',
|
||||
'#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
|
||||
'#<!\-\- u \-\-><a href="(.*?)" target="_blank">.*?</a><!\-\- u \-\->#',
|
||||
);
|
||||
|
||||
$replace = array(
|
||||
'[b]\1[/b]',
|
||||
'[u]\1[/u]',
|
||||
'[b]\2[/b]',
|
||||
'\1',
|
||||
'\1',
|
||||
);
|
||||
|
@ -282,19 +264,19 @@ if ( $post || $refresh )
|
|||
}
|
||||
else
|
||||
{
|
||||
if ( $mode != 'newtopic' && $userdata['user_id'] )
|
||||
if ( $mode != 'newtopic' && $user->data['user_id'] )
|
||||
{
|
||||
$sql = "SELECT topic_id
|
||||
FROM " . TOPICS_WATCH_TABLE . "
|
||||
WHERE topic_id = $topic_id
|
||||
AND user_id = " . $userdata['user_id'];
|
||||
AND user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $userdata['user_notify'];
|
||||
$notify_user = ( $db->sql_fetchrow($result) ) ? TRUE : $user->data['user_notify'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$notify_user = ( $user_id['user_id'] ) ? $userdata['user_notify'] : 0;
|
||||
$notify_user = ( $user_id['user_id'] ) ? $user->data['user_notify'] : 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -335,7 +317,7 @@ if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] )
|
|||
{
|
||||
$topic_type_toggle .= ' checked="checked"';
|
||||
}
|
||||
$topic_type_toggle .= ' /> ' . $lang['Post_Sticky'] . ' ';
|
||||
$topic_type_toggle .= ' /> ' . $user->lang['Post_Sticky'] . ' ';
|
||||
}
|
||||
|
||||
if ( $auth->acl_get('f_announce', $forum_id) )
|
||||
|
@ -345,21 +327,21 @@ if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] )
|
|||
{
|
||||
$topic_type_toggle .= ' checked="checked"';
|
||||
}
|
||||
$topic_type_toggle .= ' /> ' . $lang['Post_Announcement'] . ' ';
|
||||
$topic_type_toggle .= ' /> ' . $user->lang['Post_Announcement'] . ' ';
|
||||
}
|
||||
|
||||
if ( $topic_type_toggle != '' )
|
||||
{
|
||||
$topic_type_toggle = $lang['Post_topic_as'] . ': <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' checked="checked"' : '' ) . ' /> ' . $lang['Post_Normal'] . ' ' . $topic_type_toggle;
|
||||
$topic_type_toggle = $user->lang['Post_topic_as'] . ': <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' checked="checked"' : '' ) . ' /> ' . $user->lang['Post_Normal'] . ' ' . $topic_type_toggle;
|
||||
}
|
||||
}
|
||||
|
||||
// HTML, BBCode, Smilies, Images and Flash status
|
||||
$html_status = ( $board_config['allow_html'] && $auth->acl_get('f_html', $f) ) ? true : false;
|
||||
$bbcode_status = ( $board_config['allow_bbcode'] && $auth->acl_get('f_bbcode', $f) ) ? true : false;
|
||||
$smilies_status = ( $board_config['allow_smilies'] && $auth->acl_get('f_smilies', $f) ) ? true : false;
|
||||
$img_status = ( $board_config['allow_img'] && $auth->acl_get('f_img', $f) ) ? true : false;
|
||||
$flash_status = ( $board_config['allow_flash'] && $auth->acl_get('f_flash', $f) ) ? true : false;
|
||||
$html_status = ( $board_config['allow_html'] && $auth->acl_get('f_html', $forum_id) ) ? true : false;
|
||||
$bbcode_status = ( $board_config['allow_bbcode'] && $auth->acl_get('f_bbcode', $forum_id) ) ? true : false;
|
||||
$smilies_status = ( $board_config['allow_smilies'] && $auth->acl_get('f_smilies', $forum_id) ) ? true : false;
|
||||
$img_status = ( $board_config['allow_img'] && $auth->acl_get('f_img', $forum_id) ) ? true : false;
|
||||
$flash_status = ( $board_config['allow_flash'] && $auth->acl_get('f_flash', $forum_id) ) ? true : false;
|
||||
|
||||
// Page title/hidden fields
|
||||
$s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
|
||||
|
@ -367,18 +349,18 @@ $s_hidden_fields = '<input type="hidden" name="mode" value="' . $mode . '" />';
|
|||
switch( $mode )
|
||||
{
|
||||
case 'newtopic':
|
||||
$page_title = $lang['Post_a_new_topic'];
|
||||
$s_hidden_fields .= '<input type="hidden" name="f" value="' . $f . '" />';
|
||||
$page_title = $user->lang['Post_a_new_topic'];
|
||||
$s_hidden_fields .= '<input type="hidden" name="f" value="' . $forum_id . '" />';
|
||||
break;
|
||||
|
||||
case 'reply':
|
||||
$page_title = $lang['Post_a_reply'];
|
||||
$s_hidden_fields .= '<input type="hidden" name="t" value="' . $t . '" />';
|
||||
$page_title = $user->lang['Post_a_reply'];
|
||||
$s_hidden_fields .= '<input type="hidden" name="t" value="' . $topic_id . '" />';
|
||||
break;
|
||||
|
||||
case 'editpost':
|
||||
$page_title = $lang['Edit_Post'];
|
||||
$s_hidden_fields .= '<input type="hidden" name="p" value="' . $p . '" />';
|
||||
$page_title = $user->lang['Edit_Post'];
|
||||
$s_hidden_fields .= '<input type="hidden" name="p" value="' . $post_id . '" />';
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -389,55 +371,55 @@ $template->assign_vars(array(
|
|||
'USERNAME' => $username,
|
||||
'SUBJECT' => $subject,
|
||||
'MESSAGE' => $message,
|
||||
'HTML_STATUS' => ( $html_status ) ? $lang['HTML_is_ON'] : $lang['HTML_is_OFF'],
|
||||
'BBCODE_STATUS' => ( $bbcode_status ) ? sprintf($lang['BBCode_is_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" target="_phpbbcode">', '</a>') : sprintf($lang['BBCode_is_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" target="_phpbbcode">', '</a>'),
|
||||
'SMILIES_STATUS' => ( $smilies_status ) ? $lang['Smilies_are_ON'] : $lang['Smilies_are_OFF'],
|
||||
'IMG_STATUS' => ( $img_status ) ? $lang['Images_are_ON'] : $lang['Images_are_OFF'],
|
||||
'FLASH_STATUS' => ( $flash_status ) ? $lang['Flash_is_ON'] : $lang['Flash_is_OFF'],
|
||||
'HTML_STATUS' => ( $html_status ) ? $user->lang['HTML_is_ON'] : $user->lang['HTML_is_OFF'],
|
||||
'BBCODE_STATUS' => ( $bbcode_status ) ? sprintf($user->lang['BBCode_is_ON'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" target="_phpbbcode">', '</a>') : sprintf($user->lang['BBCode_is_OFF'], '<a href="' . "faq.$phpEx$SID&mode=bbcode" . '" target="_phpbbcode">', '</a>'),
|
||||
'SMILIES_STATUS' => ( $smilies_status ) ? $user->lang['Smilies_are_ON'] : $user->lang['Smilies_are_OFF'],
|
||||
'IMG_STATUS' => ( $img_status ) ? $user->lang['Images_are_ON'] : $user->lang['Images_are_OFF'],
|
||||
'FLASH_STATUS' => ( $flash_status ) ? $user->lang['Flash_is_ON'] : $user->lang['Flash_is_OFF'],
|
||||
|
||||
'L_POST_A' => $page_title,
|
||||
'L_POST_SUBJECT' => $lang['Post_subject'],
|
||||
'L_VIEW_MODERATORS' => $lang['View_moderators'],
|
||||
'L_TOPIC_ICON' => $lang['Topic_icon'],
|
||||
'L_SUBJECT' => $lang['Subject'],
|
||||
'L_MESSAGE_BODY' => $lang['Message_body'],
|
||||
'L_OPTIONS' => $lang['Options'],
|
||||
'L_PREVIEW' => $lang['Preview'],
|
||||
'L_SPELLCHECK' => $lang['Spellcheck'],
|
||||
'L_SUBMIT' => $lang['Submit'],
|
||||
'L_SAVE' => $lang['Save'],
|
||||
'L_CANCEL' => $lang['Cancel'],
|
||||
'L_CONFIRM_DELETE' => $lang['Confirm_delete'],
|
||||
'L_DISABLE_HTML' => $lang['Disable_HTML_post'],
|
||||
'L_DISABLE_BBCODE' => $lang['Disable_BBCode_post'],
|
||||
'L_DISABLE_SMILIES' => $lang['Disable_Smilies_post'],
|
||||
'L_DISABLE_MAGIC_URL' => $lang['Disable_magic_url'],
|
||||
'L_ATTACH_SIGNATURE' => $lang['Attach_signature'],
|
||||
'L_NOTIFY_ON_REPLY' => $lang['Notify'],
|
||||
'L_DELETE_POST' => $lang['Delete_post'],
|
||||
'L_NONE' => $lang['None'],
|
||||
'L_EMPTY_MESSAGE' => $lang['Empty_message'],
|
||||
'L_BBCODE_CLOSE_TAGS' => $lang['Close_Tags'],
|
||||
'L_STYLES_TIP' => $lang['Styles_tip'],
|
||||
'L_BBCODE_B_HELP' => $lang['bbcode_b_help'],
|
||||
'L_BBCODE_I_HELP' => $lang['bbcode_i_help'],
|
||||
'L_BBCODE_U_HELP' => $lang['bbcode_u_help'],
|
||||
'L_BBCODE_Q_HELP' => $lang['bbcode_q_help'],
|
||||
'L_BBCODE_C_HELP' => $lang['bbcode_c_help'],
|
||||
'L_BBCODE_L_HELP' => $lang['bbcode_l_help'],
|
||||
'L_BBCODE_O_HELP' => $lang['bbcode_o_help'],
|
||||
'L_BBCODE_P_HELP' => $lang['bbcode_p_help'],
|
||||
'L_BBCODE_W_HELP' => $lang['bbcode_w_help'],
|
||||
'L_BBCODE_A_HELP' => $lang['bbcode_a_help'],
|
||||
'L_BBCODE_S_HELP' => $lang['bbcode_s_help'],
|
||||
'L_BBCODE_F_HELP' => $lang['bbcode_f_help'],
|
||||
'L_FONT_COLOR' => $lang['Font_color'],
|
||||
'L_FONT_SIZE' => $lang['Font_size'],
|
||||
'L_FONT_TINY' => $lang['font_tiny'],
|
||||
'L_FONT_SMALL' => $lang['font_small'],
|
||||
'L_FONT_NORMAL' => $lang['font_normal'],
|
||||
'L_FONT_LARGE' => $lang['font_large'],
|
||||
'L_FONT_HUGE' => $lang['font_huge'],
|
||||
'L_POST_SUBJECT' => $user->lang['Post_subject'],
|
||||
'L_VIEW_MODERATORS' => $user->lang['View_moderators'],
|
||||
'L_TOPIC_ICON' => $user->lang['Topic_icon'],
|
||||
'L_SUBJECT' => $user->lang['Subject'],
|
||||
'L_MESSAGE_BODY' => $user->lang['Message_body'],
|
||||
'L_OPTIONS' => $user->lang['Options'],
|
||||
'L_PREVIEW' => $user->lang['Preview'],
|
||||
'L_SPELLCHECK' => $user->lang['Spellcheck'],
|
||||
'L_SUBMIT' => $user->lang['Submit'],
|
||||
'L_SAVE' => $user->lang['Save'],
|
||||
'L_CANCEL' => $user->lang['Cancel'],
|
||||
'L_CONFIRM_DELETE' => $user->lang['Confirm_delete'],
|
||||
'L_DISABLE_HTML' => $user->lang['Disable_HTML_post'],
|
||||
'L_DISABLE_BBCODE' => $user->lang['Disable_BBCode_post'],
|
||||
'L_DISABLE_SMILIES' => $user->lang['Disable_Smilies_post'],
|
||||
'L_DISABLE_MAGIC_URL' => $user->lang['Disable_magic_url'],
|
||||
'L_ATTACH_SIGNATURE' => $user->lang['Attach_signature'],
|
||||
'L_NOTIFY_ON_REPLY' => $user->lang['Notify'],
|
||||
'L_DELETE_POST' => $user->lang['Delete_post'],
|
||||
'L_NONE' => $user->lang['None'],
|
||||
'L_EMPTY_MESSAGE' => $user->lang['Empty_message'],
|
||||
'L_BBCODE_CLOSE_TAGS' => $user->lang['Close_Tags'],
|
||||
'L_STYLES_TIP' => $user->lang['Styles_tip'],
|
||||
'L_BBCODE_B_HELP' => $user->lang['bbcode_b_help'],
|
||||
'L_BBCODE_I_HELP' => $user->lang['bbcode_i_help'],
|
||||
'L_BBCODE_U_HELP' => $user->lang['bbcode_u_help'],
|
||||
'L_BBCODE_Q_HELP' => $user->lang['bbcode_q_help'],
|
||||
'L_BBCODE_C_HELP' => $user->lang['bbcode_c_help'],
|
||||
'L_BBCODE_L_HELP' => $user->lang['bbcode_l_help'],
|
||||
'L_BBCODE_O_HELP' => $user->lang['bbcode_o_help'],
|
||||
'L_BBCODE_P_HELP' => $user->lang['bbcode_p_help'],
|
||||
'L_BBCODE_W_HELP' => $user->lang['bbcode_w_help'],
|
||||
'L_BBCODE_A_HELP' => $user->lang['bbcode_a_help'],
|
||||
'L_BBCODE_S_HELP' => $user->lang['bbcode_s_help'],
|
||||
'L_BBCODE_F_HELP' => $user->lang['bbcode_f_help'],
|
||||
'L_FONT_COLOR' => $user->lang['Font_color'],
|
||||
'L_FONT_SIZE' => $user->lang['Font_size'],
|
||||
'L_FONT_TINY' => $user->lang['font_tiny'],
|
||||
'L_FONT_SMALL' => $user->lang['font_small'],
|
||||
'L_FONT_NORMAL' => $user->lang['font_normal'],
|
||||
'L_FONT_LARGE' => $user->lang['font_large'],
|
||||
'L_FONT_HUGE' => $user->lang['font_huge'],
|
||||
|
||||
'U_VIEW_FORUM' => "viewforum.$phpEx$SID&f=$forum_id",
|
||||
'U_VIEWTOPIC' => ( $mode != 'newtopic' ) ? "viewtopic.$phpEx$SID&t=$topic_id" : '',
|
||||
|
@ -451,15 +433,15 @@ $template->assign_vars(array(
|
|||
'S_MAGIC_URL_CHECKED' => ( !$magic_urls_on ) ? 'checked="checked"' : '',
|
||||
'S_SIGNATURE_CHECKED' => ( $attach_sig ) ? 'checked="checked"' : '',
|
||||
'S_NOTIFY_CHECKED' => ( $notify_user ) ? 'checked="checked"' : '',
|
||||
'S_DISPLAY_USERNAME' => ( !$userdata['user_id'] || ( $mode == 'editpost' && $post_info['post_username'] ) ) ? true : false,
|
||||
'S_DISPLAY_USERNAME' => ( !$user->data['user_id'] || ( $mode == 'editpost' && $post_info['post_username'] ) ) ? true : false,
|
||||
|
||||
'S_SAVE_ALLOWED' => ( $auth->acl_get('f_save', $f) ) ? true : false,
|
||||
'S_SAVE_ALLOWED' => ( $auth->acl_get('f_save', $forum_id) ) ? true : false,
|
||||
'S_HTML_ALLOWED' => $html_status,
|
||||
'S_BBCODE_ALLOWED' => $bbcode_status,
|
||||
'S_SMILIES_ALLOWED' => $smilies_status,
|
||||
'S_SIG_ALLOWED' => ( $auth->acl_get('f_sigs', $f) ) ? true : false,
|
||||
'S_NOTIFY_ALLOWED' => ( $userdata['user_id'] ) ? true : false,
|
||||
'S_DELETE_ALLOWED' => ( $mode == 'editpost' && ( ( $auth->acl_get('f_delete', $f) && $post_data['last_post'] && ( !$post_data['has_poll'] || $post_data['edit_poll'] ) ) || $auth->acl_is_mod($f) ) ) ? true : false,
|
||||
'S_SIG_ALLOWED' => ( $auth->acl_get('f_sigs', $forum_id) ) ? true : false,
|
||||
'S_NOTIFY_ALLOWED' => ( $user->data['user_id'] ) ? true : false,
|
||||
'S_DELETE_ALLOWED' => ( $mode == 'editpost' && ( ( $auth->acl_get('f_delete', $forum_id) && $post_data['last_post'] && ( !$post_data['has_poll'] || $post_data['edit_poll'] ) ) || $auth->acl_get('m_', $forum_id) ) ) ? true : false,
|
||||
'S_TYPE_TOGGLE' => $topic_type_toggle,
|
||||
|
||||
'S_TOPIC_ID' => $t,
|
||||
|
@ -467,26 +449,24 @@ $template->assign_vars(array(
|
|||
'S_HIDDEN_FIELDS' => $s_hidden_fields)
|
||||
);
|
||||
|
||||
//
|
||||
// Poll entry
|
||||
//
|
||||
if ( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) && $auth->acl_get('f_poll', $f) )
|
||||
if ( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) ) && $auth->acl_get('f_poll', $forum_id) )
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_POLL_BOX' => true,
|
||||
'S_POLL_DELETE' => ( $mode == 'editpost' && $post_data['edit_poll'] ) ? true : false,
|
||||
|
||||
'L_ADD_A_POLL' => $lang['Add_poll'],
|
||||
'L_ADD_POLL_EXPLAIN' => $lang['Add_poll_explain'],
|
||||
'L_POLL_QUESTION' => $lang['Poll_question'],
|
||||
'L_POLL_OPTION' => $lang['Poll_option'],
|
||||
'L_ADD_OPTION' => $lang['Add_option'],
|
||||
'L_UPDATE_OPTION' => $lang['Update'],
|
||||
'L_DELETE_OPTION' => $lang['Delete'],
|
||||
'L_POLL_LENGTH' => $lang['Poll_for'],
|
||||
'L_DAYS' => $lang['Days'],
|
||||
'L_POLL_LENGTH_EXPLAIN' => $lang['Poll_for_explain'],
|
||||
'L_POLL_DELETE' => $lang['Delete_poll'],
|
||||
'L_ADD_A_POLL' => $user->lang['Add_poll'],
|
||||
'L_ADD_POLL_EXPLAIN' => $user->lang['Add_poll_explain'],
|
||||
'L_POLL_QUESTION' => $user->lang['Poll_question'],
|
||||
'L_POLL_OPTION' => $user->lang['Poll_option'],
|
||||
'L_ADD_OPTION' => $user->lang['Add_option'],
|
||||
'L_UPDATE_OPTION' => $user->lang['Update'],
|
||||
'L_DELETE_OPTION' => $user->lang['Delete'],
|
||||
'L_POLL_LENGTH' => $user->lang['Poll_for'],
|
||||
'L_DAYS' => $user->lang['Days'],
|
||||
'L_POLL_LENGTH_EXPLAIN' => $user->lang['Poll_for_explain'],
|
||||
'L_POLL_DELETE' => $user->lang['Delete_poll'],
|
||||
|
||||
'POLL_TITLE' => $poll_title,
|
||||
'POLL_LENGTH' => $poll_length)
|
||||
|
@ -506,16 +486,16 @@ if ( ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post']
|
|||
}
|
||||
|
||||
// Attachment entry
|
||||
if ( $auth->acl_get('f_attach', $f) )
|
||||
if ( $auth->acl_get('f_attach', $forum_id) )
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_SHOW_ATTACH_BOX' => true,
|
||||
'L_ADD_ATTACHMENT' => $lang['Add_attach'],
|
||||
'L_ADD_ATTACHMENT_EXPLAIN' => $lang['Add_attach_explain'],
|
||||
'L_ADD_ATTACHMENT' => $user->lang['Add_attach'],
|
||||
'L_ADD_ATTACHMENT_EXPLAIN' => $user->lang['Add_attach_explain'],
|
||||
|
||||
'L_ADD_FILE' => $lang['Add_file'],
|
||||
'L_FILE_NAME' => $lang['Filename'],
|
||||
'L_FILE_COMMENT' => $lang['File_comment'],)
|
||||
'L_ADD_FILE' => $user->lang['Add_file'],
|
||||
'L_FILE_NAME' => $user->lang['Filename'],
|
||||
'L_FILE_COMMENT' => $user->lang['File_comment'],)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -73,15 +73,13 @@ else
|
|||
//
|
||||
if ( $cancel )
|
||||
{
|
||||
$header_location = ( @preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE')) ) ? 'Refresh: 0; URL=' : 'Location: ';
|
||||
header($header_location . "privmsg.$phpEx$SIDfolder=$folder");
|
||||
exit;
|
||||
redirect("privmsg.$phpEx$SIDfolder=$folder");
|
||||
}
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
//
|
||||
|
|
|
@ -26,9 +26,9 @@ include($phpbb_root_path . 'extension.inc');
|
|||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
// Set default email variables
|
||||
|
@ -76,17 +76,13 @@ if ( isset($_GET['mode']) || isset($_POST['mode']) )
|
|||
}
|
||||
else if ( $mode == 'editprofile' || $mode == 'register' )
|
||||
{
|
||||
if ( !$userdata['user_id'] && $mode == 'editprofile' )
|
||||
if ( !$user->data['user_id'] && $mode == 'editprofile' )
|
||||
{
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . "login.$phpEx$SID&redirect=profile.$phpEx&mode=editprofile");
|
||||
exit;
|
||||
redirect("login.$phpEx$SID&redirect=profile.$phpEx&mode=editprofile");
|
||||
}
|
||||
else if ( $userdata['user_id'] && $mode == 'register' )
|
||||
else if ( $user->data['user_id'] && $mode == 'register' )
|
||||
{
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . "index.$phpEx$SID");
|
||||
exit;
|
||||
redirect("index.$phpEx$SID");
|
||||
}
|
||||
|
||||
include($phpbb_root_path . 'includes/usercp_register.'.$phpEx);
|
||||
|
@ -110,9 +106,7 @@ if ( isset($_GET['mode']) || isset($_POST['mode']) )
|
|||
}
|
||||
else
|
||||
{
|
||||
$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
|
||||
header($header_location . "index.$phpEx$SID");
|
||||
exit;
|
||||
redirect("index.$phpEx$SID");
|
||||
}
|
||||
|
||||
?>
|
213
phpBB/search.php
213
phpBB/search.php
|
@ -27,9 +27,9 @@ include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
|
|||
include($phpbb_root_path . 'includes/functions_posting.'.$phpEx);
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
// Define initial vars
|
||||
|
@ -109,7 +109,7 @@ else
|
|||
|
||||
$start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0;
|
||||
|
||||
$sort_by_types = array($lang['Sort_Time'], $lang['Sort_Post_Subject'], $lang['Sort_Topic_Title'], $lang['Sort_Author'], $lang['Sort_Forum']);
|
||||
$sort_by_types = array($user->lang['Sort_Time'], $user->lang['Sort_Post_Subject'], $user->lang['Sort_Topic_Title'], $user->lang['Sort_Author'], $user->lang['Sort_Forum']);
|
||||
|
||||
//
|
||||
// Begin core code
|
||||
|
@ -127,11 +127,11 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
{
|
||||
if ( $search_id == 'newposts' )
|
||||
{
|
||||
if ( $userdata['user_id'] )
|
||||
if ( $user->data['user_id'] )
|
||||
{
|
||||
$sql = "SELECT post_id
|
||||
FROM " . POSTS_TABLE . "
|
||||
WHERE post_time >= " . $userdata['session_last_visit'];
|
||||
WHERE post_time >= " . $user->data['session_last_visit'];
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -145,11 +145,11 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
else if ( $search_id == 'egosearch' )
|
||||
{
|
||||
if ( $userdata['session_logged_in'] )
|
||||
if ( $user->data['session_logged_in'] )
|
||||
{
|
||||
$sql = "SELECT post_id
|
||||
FROM " . POSTS_TABLE . "
|
||||
WHERE poster_id = " . $userdata['user_id'];;
|
||||
WHERE poster_id = " . $user->data['user_id'];;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -181,7 +181,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
else
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_search_match']);
|
||||
message_die(MESSAGE, $user->lang['No_search_match']);
|
||||
}
|
||||
|
||||
$sql = "SELECT post_id
|
||||
|
@ -319,7 +319,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
{
|
||||
if ( !$auth->acl_get($search_forum, 'forum', 'read') )
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_searchable_forums']);
|
||||
message_die(MESSAGE, $user->lang['No_searchable_forums']);
|
||||
}
|
||||
|
||||
// $auth_sql = "f.forum_id = $search_forum";
|
||||
|
@ -494,7 +494,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
else
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_search_match']);
|
||||
message_die(MESSAGE, $user->lang['No_search_match']);
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -546,11 +546,11 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
|
||||
$sql = "UPDATE " . SEARCH_TABLE . "
|
||||
SET search_id = $search_id, search_array = '$result_array'
|
||||
WHERE session_id = '" . $userdata['session_id'] . "'";
|
||||
WHERE session_id = '" . $user->data['session_id'] . "'";
|
||||
if ( !($result = $db->sql_query($sql)) || !$db->sql_affectedrows() )
|
||||
{
|
||||
$sql = "INSERT INTO " . SEARCH_TABLE . " (search_id, session_id, search_array)
|
||||
VALUES($search_id, '" . $userdata['session_id'] . "', '" . str_replace("\'", "''", $result_array) . "')";
|
||||
VALUES($search_id, '" . $user->data['session_id'] . "', '" . str_replace("\'", "''", $result_array) . "')";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(ERROR, 'Could not insert search results', '', __LINE__, __FILE__, $sql);
|
||||
|
@ -564,7 +564,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
$sql = "SELECT search_array
|
||||
FROM " . SEARCH_TABLE . "
|
||||
WHERE search_id = $search_id
|
||||
AND session_id = '". $userdata['session_id'] . "'";
|
||||
AND session_id = '". $user->data['session_id'] . "'";
|
||||
if ( !($result = $db->sql_query($sql)) )
|
||||
{
|
||||
message_die(ERROR, 'Could not obtain search results', '', __LINE__, __FILE__, $sql);
|
||||
|
@ -655,11 +655,11 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
// Output header
|
||||
//
|
||||
|
||||
$l_search_matches = ( $total_match_count == 1 ) ? sprintf($lang['Found_search_match'], $total_match_count) : sprintf($lang['Found_search_matches'], $total_match_count);
|
||||
$l_search_matches = ( $total_match_count == 1 ) ? sprintf($user->lang['Found_search_match'], $total_match_count) : sprintf($user->lang['Found_search_matches'], $total_match_count);
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_SEARCH_MATCHES' => $l_search_matches,
|
||||
'L_TOPIC' => $lang['Topic'])
|
||||
'L_TOPIC' => $user->lang['Topic'])
|
||||
);
|
||||
|
||||
$highlight_active = '';
|
||||
|
@ -688,8 +688,8 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
|
||||
$highlight_active = urlencode(trim($highlight_active));
|
||||
|
||||
$tracking_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) : array();
|
||||
$tracking_forums = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) ) ? unserialize($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f']) : array();
|
||||
$tracking_topics = ( isset($_COOKIE[$board_config['cookie_name'] . '_t']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . '_t']) : array();
|
||||
$tracking_forums = ( isset($_COOKIE[$board_config['cookie_name'] . '_f']) ) ? unserialize($_COOKIE[$board_config['cookie_name'] . '_f']) : array();
|
||||
|
||||
for($i = 0; $i < count($searchset); $i++)
|
||||
{
|
||||
|
@ -697,7 +697,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
$topic_url = "viewtopic.$phpEx$SID&t=" . $searchset[$i]['topic_id'] . "&highlight=$highlight_active";
|
||||
$post_url = "viewtopic.$phpEx$SID&p=" . $searchset[$i]['post_id'] . "&highlight=$highlight_active" . '#' . $searchset[$i]['post_id'];
|
||||
|
||||
$post_date = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']);
|
||||
$post_date = $user->format_date($searchset[$i]['post_time']);
|
||||
|
||||
$message = $searchset[$i]['post_text'];
|
||||
$topic_title = $searchset[$i]['topic_title'];
|
||||
|
@ -842,10 +842,10 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
|
||||
$poster = ( !$searchset[$i]['user_id'] ) ? '<a href="' . "profile.$phpEx$SID&mode=viewprofile&u=" . $searchset[$i]['user_id'] . '">' : '';
|
||||
$poster .= ( $searchset[$i]['user_id'] ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != "" ) ? $searchset[$i]['post_username'] : $lang['Guest'] );
|
||||
$poster .= ( $searchset[$i]['user_id'] ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != "" ) ? $searchset[$i]['post_username'] : $user->lang['Guest'] );
|
||||
$poster .= ( $searchset[$i]['user_id'] ) ? '</a>' : '';
|
||||
|
||||
if ( $userdata['session_logged_in'] && $searchset[$i]['post_time'] > $userdata['session_last_visit'] )
|
||||
if ( $user->data['session_logged_in'] && $searchset[$i]['post_time'] > $user->data['session_last_visit'] )
|
||||
{
|
||||
if ( !empty($tracking_topics[$topic_id]) && !empty($tracking_forums[$forum_id]) )
|
||||
{
|
||||
|
@ -858,19 +858,19 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
|
||||
if ( $searchset[$i]['post_time'] > $topic_last_read )
|
||||
{
|
||||
$mini_post_img = $images['icon_minipost_new'];
|
||||
$mini_post_alt = $lang['New_post'];
|
||||
$mini_post_img = 'goto_post_newest';
|
||||
$mini_post_alt = $user->lang['New_post'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$mini_post_img = $images['icon_minipost'];
|
||||
$mini_post_alt = $lang['Post'];
|
||||
$mini_post_img = 'goto_post';
|
||||
$mini_post_alt = $user->lang['Post'];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$mini_post_img = $images['icon_minipost'];
|
||||
$mini_post_alt = $lang['Post'];
|
||||
$mini_post_img = 'goto_post';
|
||||
$mini_post_alt = $user->lang['Post'];
|
||||
}
|
||||
|
||||
$template->assign_block_vars("searchresults", array(
|
||||
|
@ -882,9 +882,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
'TOPIC_REPLIES' => $searchset[$i]['topic_replies'],
|
||||
'TOPIC_VIEWS' => $searchset[$i]['topic_views'],
|
||||
'MESSAGE' => $message,
|
||||
'MINI_POST_IMG' => $mini_post_img,
|
||||
|
||||
'L_MINI_POST_ALT' => $mini_post_alt,
|
||||
'MINI_POST_IMG' => $user->img($mini_post_img, $mini_post_alt),
|
||||
|
||||
'U_POST' => $post_url,
|
||||
'U_TOPIC' => $topic_url,
|
||||
|
@ -904,11 +902,11 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
|
||||
if ($topic_type == POST_ANNOUNCE)
|
||||
{
|
||||
$topic_type = $lang['Topic_Announcement'] . ' ';
|
||||
$topic_type = $user->lang['Topic_Announcement'] . ' ';
|
||||
}
|
||||
else if ($topic_type == POST_STICKY)
|
||||
{
|
||||
$topic_type = $lang['Topic_Sticky'] . ' ';
|
||||
$topic_type = $user->lang['Topic_Sticky'] . ' ';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -917,7 +915,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
|
||||
if ( $searchset[$i]['topic_vote'] )
|
||||
{
|
||||
$topic_type .= $lang['Topic_Poll'] . ' ';
|
||||
$topic_type .= $user->lang['Topic_Poll'] . ' ';
|
||||
}
|
||||
|
||||
$views = $searchset[$i]['topic_views'];
|
||||
|
@ -926,7 +924,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
if ( ( $replies + 1 ) > $board_config['posts_per_page'] )
|
||||
{
|
||||
$total_pages = ceil( ( $replies + 1 ) / $board_config['posts_per_page'] );
|
||||
$goto_page = ' [ <img src="' . $images['icon_gotopost'] . '" alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
|
||||
$goto_page = ' [ ' . $user->img('icon_gotopost', $user->lang['Goto_page']) . $user->lang['Goto_page'] . ': ';
|
||||
|
||||
$times = 1;
|
||||
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
|
||||
|
@ -953,48 +951,49 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
|
||||
if ( $searchset[$i]['topic_status'] == TOPIC_MOVED )
|
||||
{
|
||||
$topic_type = $lang['Topic_Moved'] . ' ';
|
||||
$topic_type = $user->lang['Topic_Moved'] . ' ';
|
||||
$topic_id = $searchset[$i]['topic_moved_id'];
|
||||
|
||||
$folder_image = '<img src="' . $images['folder'] . '" alt="' . $lang['No_new_posts'] . '" />';
|
||||
$folder_image = 'folder';
|
||||
$folder_alt = $user->lang['No_new_posts'];
|
||||
$newest_post_img = '';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $searchset[$i]['topic_status'] == TOPIC_LOCKED )
|
||||
{
|
||||
$folder = $images['folder_locked'];
|
||||
$folder_new = $images['folder_locked_new'];
|
||||
$folder = 'folder_locked';
|
||||
$folder_new = 'folder_locked_new';
|
||||
}
|
||||
else if ( $searchset[$i]['topic_type'] == POST_ANNOUNCE )
|
||||
{
|
||||
$folder = $images['folder_announce'];
|
||||
$folder_new = $images['folder_announce_new'];
|
||||
$folder = 'folder_announce';
|
||||
$folder_new = 'folder_announce_new';
|
||||
}
|
||||
else if ( $searchset[$i]['topic_type'] == POST_STICKY )
|
||||
{
|
||||
$folder = $images['folder_sticky'];
|
||||
$folder_new = $images['folder_sticky_new'];
|
||||
$folder = 'folder_sticky';
|
||||
$folder_new = 'folder_sticky_new';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( $replies >= $board_config['hot_threshold'] )
|
||||
{
|
||||
$folder = $images['folder_hot'];
|
||||
$folder_new = $images['folder_hot_new'];
|
||||
$folder = 'folder_hot';
|
||||
$folder_new ='folder_hot_new';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder = $images['folder'];
|
||||
$folder_new = $images['folder_new'];
|
||||
$folder = 'folder';
|
||||
$folder_new = 'folder_new';
|
||||
}
|
||||
}
|
||||
|
||||
if ( $userdata['session_logged_in'] )
|
||||
if ( $user->data['session_logged_in'] )
|
||||
{
|
||||
if ( $searchset[$i]['post_time'] > $userdata['session_last_visit'] )
|
||||
if ( $searchset[$i]['post_time'] > $user->data['session_last_visit'] )
|
||||
{
|
||||
if ( !empty($tracking_topics) || !empty($tracking_forums) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
|
||||
if ( !empty($tracking_topics) || !empty($tracking_forums) || isset($_COOKIE[$board_config['cookie_name'] . '_f_all']) )
|
||||
{
|
||||
|
||||
$unread_topics = true;
|
||||
|
@ -1015,9 +1014,9 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
}
|
||||
|
||||
if ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all']) )
|
||||
if ( isset($_COOKIE[$board_config['cookie_name'] . '_f_all']) )
|
||||
{
|
||||
if ( $HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_f_all'] > $searchset[$i]['post_time'] )
|
||||
if ( $_COOKIE[$board_config['cookie_name'] . '_f_all'] > $searchset[$i]['post_time'] )
|
||||
{
|
||||
$unread_topics = false;
|
||||
}
|
||||
|
@ -1026,13 +1025,13 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
if ( $unread_topics )
|
||||
{
|
||||
$folder_image = $folder_new;
|
||||
$folder_alt = $lang['New_posts'];
|
||||
$folder_alt = $user->lang['New_posts'];
|
||||
|
||||
$newest_post_img = '<a href="' . "viewtopic.$phpEx$SID&t=$topic_id&view=newest" . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
|
||||
$newest_post_img = '<a href="' . "viewtopic.$phpEx$SID&t=$topic_id&view=newest" . '">' . $user->img('icon_newest_reply', $user->lang['View_newest_post']) . '</a> ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $user->lang['Topic_locked'] : $user->lang['No_new_posts'];
|
||||
|
||||
$folder_image = $folder;
|
||||
$folder_alt = $folder_alt;
|
||||
|
@ -1040,54 +1039,54 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
|
||||
}
|
||||
else if ( $searchset[$i]['post_time'] > $userdata['session_last_visit'] )
|
||||
else if ( $searchset[$i]['post_time'] > $user->data['session_last_visit'] )
|
||||
{
|
||||
$folder_image = $folder_new;
|
||||
$folder_alt = $lang['New_posts'];
|
||||
$folder_alt = $user->lang['New_posts'];
|
||||
|
||||
$newest_post_img = '<a href="' . "viewtopic.$phpEx$SID&t=$topic_id&view=newest" . '"><img src="' . $images['icon_newest_reply'] . '" alt="' . $lang['View_newest_post'] . '" title="' . $lang['View_newest_post'] . '" border="0" /></a> ';
|
||||
$newest_post_img = '<a href="' . "viewtopic.$phpEx$SID&t=$topic_id&view=newest" . '">' . $user->img('icon_newest_reply', $user->lang['View_newest_post']) . '</a> ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_image = $folder;
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $user->lang['Topic_locked'] : $user->lang['No_new_posts'];
|
||||
$newest_post_img = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_image = $folder;
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $user->lang['Topic_locked'] : $user->lang['No_new_posts'];
|
||||
$newest_post_img = '';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder_image = $folder;
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'];
|
||||
$folder_alt = ( $searchset[$i]['topic_status'] == TOPIC_LOCKED ) ? $user->lang['Topic_locked'] : $user->lang['No_new_posts'];
|
||||
$newest_post_img = '';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$topic_author = ( $searchset[$i]['user_id'] ) ? '<a href="' . "profile.$phpEx$SID&mode=viewprofile&u=" . $searchset[$i]['user_id'] . '">' : '';
|
||||
$topic_author .= ( $searchset[$i]['user_id'] ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != '' ) ? $searchset[$i]['post_username'] : $lang['Guest'] );
|
||||
$topic_author .= ( $searchset[$i]['user_id'] ) ? $searchset[$i]['username'] : ( ( $searchset[$i]['post_username'] != '' ) ? $searchset[$i]['post_username'] : $user->lang['Guest'] );
|
||||
|
||||
$topic_author .= ( $searchset[$i]['user_id'] ) ? '</a>' : '';
|
||||
|
||||
$first_post_time = create_date($board_config['default_dateformat'], $searchset[$i]['topic_time'], $board_config['board_timezone']);
|
||||
$first_post_time = $user->format_date($searchset[$i]['topic_time']);
|
||||
|
||||
$last_post_time = create_date($board_config['default_dateformat'], $searchset[$i]['post_time'], $board_config['board_timezone']);
|
||||
$last_post_time = $user->format_date($searchset[$i]['post_time']);
|
||||
|
||||
$last_post_author = ( $searchset[$i]['id2'] ) ? ( ($searchset[$i]['post_username2'] != '' ) ? $searchset[$i]['post_username2'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="' . "profile.$phpEx$SID&mode=viewprofile&u=" . $searchset[$i]['id2'] . '">' . $searchset[$i]['user2'] . '</a>';
|
||||
$last_post_author = ( $searchset[$i]['id2'] ) ? ( ($searchset[$i]['post_username2'] != '' ) ? $searchset[$i]['post_username2'] . ' ' : $user->lang['Guest'] . ' ' ) : '<a href="' . "profile.$phpEx$SID&mode=viewprofile&u=" . $searchset[$i]['id2'] . '">' . $searchset[$i]['user2'] . '</a>';
|
||||
|
||||
$last_post_url = '<a href="' . "viewtopic.$phpEx$SID&p=" . $searchset[$i]['topic_last_post_id'] . '#' . $searchset[$i]['topic_last_post_id'] . '"><img src="' . $images['icon_latest_reply'] . '" alt="' . $lang['View_latest_post'] . '" title="' . $lang['View_latest_post'] . '" border="0" /></a>';
|
||||
$last_post_url = '<a href="' . "viewtopic.$phpEx$SID&p=" . $searchset[$i]['topic_last_post_id'] . '#' . $searchset[$i]['topic_last_post_id'] . '">' . $user->img('icon_latest_reply', $user->lang['View_latest_post']) . '</a>';
|
||||
|
||||
$template->assign_block_vars('searchresults', array(
|
||||
'FORUM_NAME' => $searchset[$i]['forum_name'],
|
||||
'FORUM_ID' => $forum_id,
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'FOLDER' => $folder_image,
|
||||
'FOLDER' => $user->img($folder_image, $folder_alt),
|
||||
'NEWEST_POST_IMG' => $newest_post_img,
|
||||
'TOPIC_FOLDER_IMG' => $folder_image,
|
||||
'GOTO_PAGE' => $goto_page,
|
||||
|
@ -1113,23 +1112,23 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
|
||||
$template->assign_vars(array(
|
||||
'PAGINATION' => generate_pagination($base_url, $total_match_count, $per_page, $start),
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page )),
|
||||
'PAGE_NUMBER' => sprintf($user->lang['Page_of'], ( floor( $start / $per_page ) + 1 ), ceil( $total_match_count / $per_page )),
|
||||
|
||||
'L_AUTHOR' => $lang['Author'],
|
||||
'L_MESSAGE' => $lang['Message'],
|
||||
'L_FORUM' => $lang['Forum'],
|
||||
'L_TOPICS' => $lang['Topics'],
|
||||
'L_REPLIES' => $lang['Replies'],
|
||||
'L_VIEWS' => $lang['Views'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_LASTPOST' => $lang['Last_Post'],
|
||||
'L_POSTED' => $lang['Posted'],
|
||||
'L_SUBJECT' => $lang['Subject'],
|
||||
'L_AUTHOR' => $user->lang['Author'],
|
||||
'L_MESSAGE' => $user->lang['Message'],
|
||||
'L_FORUM' => $user->lang['Forum'],
|
||||
'L_TOPICS' => $user->lang['Topics'],
|
||||
'L_REPLIES' => $user->lang['Replies'],
|
||||
'L_VIEWS' => $user->lang['Views'],
|
||||
'L_POSTS' => $user->lang['Posts'],
|
||||
'L_LASTPOST' => $user->lang['Last_Post'],
|
||||
'L_POSTED' => $user->lang['Posted'],
|
||||
'L_SUBJECT' => $user->lang['Subject'],
|
||||
|
||||
'L_GOTO_PAGE' => $lang['Goto_page'])
|
||||
'L_GOTO_PAGE' => $user->lang['Goto_page'])
|
||||
);
|
||||
|
||||
$page_title = $lang['Search'];
|
||||
$page_title = $user->lang['Search'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
|
@ -1141,7 +1140,7 @@ if ( $search_keywords != '' || $search_author != '' || $search_id )
|
|||
}
|
||||
else
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_search_match']);
|
||||
message_die(MESSAGE, $user->lang['No_search_match']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1169,12 +1168,12 @@ while( $row = $db->sql_fetchrow($result) )
|
|||
|
||||
if ( $s_forums != '' )
|
||||
{
|
||||
$s_forums = '<option value="-1">' . $lang['All_available'] . '</option>' . $s_forums;
|
||||
$s_forums = '<option value="-1">' . $user->lang['All_available'] . '</option>' . $s_forums;
|
||||
|
||||
//
|
||||
// Category to search
|
||||
//
|
||||
$s_categories = '<option value="-1">' . $lang['All_available'] . '</option>';
|
||||
$s_categories = '<option value="-1">' . $user->lang['All_available'] . '</option>';
|
||||
while( list($cat_id, $cat_title) = @each($list_cat))
|
||||
{
|
||||
$s_categories .= '<option value="' . $cat_id . '">' . $cat_title . '</option>';
|
||||
|
@ -1182,13 +1181,13 @@ if ( $s_forums != '' )
|
|||
}
|
||||
else
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_searchable_forums']);
|
||||
message_die(MESSAGE, $user->lang['No_searchable_forums']);
|
||||
}
|
||||
|
||||
//
|
||||
// Number of chars returned
|
||||
//
|
||||
$s_characters = '<option value="-1">' . $lang['All_available'] . '</option>';
|
||||
$s_characters = '<option value="-1">' . $user->lang['All_available'] . '</option>';
|
||||
$s_characters .= '<option value="0">0</option>';
|
||||
$s_characters .= '<option value="25">25</option>';
|
||||
$s_characters .= '<option value="50">50</option>';
|
||||
|
@ -1212,7 +1211,7 @@ for($i = 0; $i < count($sort_by_types); $i++)
|
|||
// Search time
|
||||
//
|
||||
$previous_days = array(0, 1, 7, 14, 30, 90, 180, 364);
|
||||
$previous_days_text = array($lang['All_Posts'], $lang['1_Day'], $lang['7_Days'], $lang['2_Weeks'], $lang['1_Month'], $lang['3_Months'], $lang['6_Months'], $lang['1_Year']);
|
||||
$previous_days_text = array($user->lang['All_Posts'], $user->lang['1_Day'], $user->lang['7_Days'], $user->lang['2_Weeks'], $user->lang['1_Month'], $user->lang['3_Months'], $user->lang['6_Months'], $user->lang['1_Year']);
|
||||
|
||||
$s_time = '';
|
||||
for($i = 0; $i < count($previous_days); $i++)
|
||||
|
@ -1222,27 +1221,27 @@ for($i = 0; $i < count($previous_days); $i++)
|
|||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'L_SEARCH_QUERY' => $lang['Search_query'],
|
||||
'L_SEARCH_OPTIONS' => $lang['Search_options'],
|
||||
'L_SEARCH_KEYWORDS' => $lang['Search_keywords'],
|
||||
'L_SEARCH_KEYWORDS_EXPLAIN' => $lang['Search_keywords_explain'],
|
||||
'L_SEARCH_AUTHOR' => $lang['Search_author'],
|
||||
'L_SEARCH_AUTHOR_EXPLAIN' => $lang['Search_author_explain'],
|
||||
'L_SEARCH_ANY_TERMS' => $lang['Search_for_any'],
|
||||
'L_SEARCH_ALL_TERMS' => $lang['Search_for_all'],
|
||||
'L_SEARCH_MESSAGE_ONLY' => $lang['Search_msg_only'],
|
||||
'L_SEARCH_MESSAGE_TITLE' => $lang['Search_title_msg'],
|
||||
'L_CATEGORY' => $lang['Category'],
|
||||
'L_RETURN_FIRST' => $lang['Return_first'],
|
||||
'L_CHARACTERS' => $lang['characters_posts'],
|
||||
'L_SORT_BY' => $lang['Sort_by'],
|
||||
'L_SORT_ASCENDING' => $lang['Sort_Ascending'],
|
||||
'L_SORT_DESCENDING' => $lang['Sort_Descending'],
|
||||
'L_SEARCH_PREVIOUS' => $lang['Search_previous'],
|
||||
'L_DISPLAY_RESULTS' => $lang['Display_results'],
|
||||
'L_FORUM' => $lang['Forum'],
|
||||
'L_TOPICS' => $lang['Topics'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_SEARCH_QUERY' => $user->lang['Search_query'],
|
||||
'L_SEARCH_OPTIONS' => $user->lang['Search_options'],
|
||||
'L_SEARCH_KEYWORDS' => $user->lang['Search_keywords'],
|
||||
'L_SEARCH_KEYWORDS_EXPLAIN' => $user->lang['Search_keywords_explain'],
|
||||
'L_SEARCH_AUTHOR' => $user->lang['Search_author'],
|
||||
'L_SEARCH_AUTHOR_EXPLAIN' => $user->lang['Search_author_explain'],
|
||||
'L_SEARCH_ANY_TERMS' => $user->lang['Search_for_any'],
|
||||
'L_SEARCH_ALL_TERMS' => $user->lang['Search_for_all'],
|
||||
'L_SEARCH_MESSAGE_ONLY' => $user->lang['Search_msg_only'],
|
||||
'L_SEARCH_MESSAGE_TITLE' => $user->lang['Search_title_msg'],
|
||||
'L_CATEGORY' => $user->lang['Category'],
|
||||
'L_RETURN_FIRST' => $user->lang['Return_first'],
|
||||
'L_CHARACTERS' => $user->lang['characters_posts'],
|
||||
'L_SORT_BY' => $user->lang['Sort_by'],
|
||||
'L_SORT_ASCENDING' => $user->lang['Sort_Ascending'],
|
||||
'L_SORT_DESCENDING' => $user->lang['Sort_Descending'],
|
||||
'L_SEARCH_PREVIOUS' => $user->lang['Search_previous'],
|
||||
'L_DISPLAY_RESULTS' => $user->lang['Display_results'],
|
||||
'L_FORUM' => $user->lang['Forum'],
|
||||
'L_TOPICS' => $user->lang['Topics'],
|
||||
'L_POSTS' => $user->lang['Posts'],
|
||||
|
||||
'S_SEARCH_ACTION' => "search.$phpEx$SID&mode=results",
|
||||
'S_CHARACTER_OPTIONS' => $s_characters,
|
||||
|
@ -1256,7 +1255,7 @@ $template->assign_vars(array(
|
|||
//
|
||||
// Output the basic page
|
||||
//
|
||||
$page_title = $lang['Search'];
|
||||
$page_title = $user->lang['Search'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
</tr>
|
||||
<!-- BEGIN searchresults -->
|
||||
<tr>
|
||||
<td class="catHead" colspan="2" height="28"><span class="topictitle"><img src="templates/subSilver/images/folder.gif" align="absmiddle"> {L_TOPIC}: <a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td>
|
||||
<td class="catHead" colspan="2" height="28"><span class="topictitle">{L_TOPIC}: <a href="{searchresults.U_TOPIC}" class="topictitle">{searchresults.TOPIC_TITLE}</a></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="150" align="left" valign="top" class="row1" rowspan="2"><span class="name"><b>{searchresults.POSTER_NAME}</b></span><br />
|
||||
|
@ -27,7 +27,7 @@
|
|||
<span class="postdetails">{L_REPLIES}: <b>{searchresults.TOPIC_REPLIES}</b><br />
|
||||
{L_VIEWS}: <b>{searchresults.TOPIC_VIEWS}</b></span><br />
|
||||
</td>
|
||||
<td width="100%" valign="top" class="row1"><img src="{searchresults.MINI_POST_IMG}" width="12" height="9" alt="{searchresults.L_MINI_POST_ALT}" title="{searchresults.L_MINI_POST_ALT}" border="0" /><span class="postdetails">{L_FORUM}: <b><a href="{searchresults.U_FORUM}" class="postdetails">{searchresults.FORUM_NAME}</a></b> {L_POSTED}: {searchresults.POST_DATE} {L_SUBJECT}: <b><a href="{searchresults.U_POST}">{searchresults.POST_SUBJECT}</a></b></span></td>
|
||||
<td width="100%" valign="top" class="row1">{searchresults.MINI_POST_IMG}<span class="postdetails">{L_FORUM}: <b><a href="{searchresults.U_FORUM}" class="postdetails">{searchresults.FORUM_NAME}</a></b> {L_POSTED}: {searchresults.POST_DATE} {L_SUBJECT}: <b><a href="{searchresults.U_POST}">{searchresults.POST_SUBJECT}</a></b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="top" class="row1"><span class="postbody">{searchresults.MESSAGE}</span></td>
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
<!-- ENDIF -->
|
||||
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2" align="left" valign="bottom"><a class="maintitle" href="{U_VIEW_FORUM}">{FORUM_NAME}</a><br /><span class="gensmall"> [ <a href="{U_VIEW_MODERATORS}">{L_VIEW_MODERATORS}</a> ]<br /><br /><b>{LOGGED_IN_USER_LIST}</b></span></td>
|
||||
<td align="right" valign="bottom" nowrap="nowrap"><span class="gensmall"><b>{PAGINATION}</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="50" align="left" valign="middle"><a href="{U_POST_NEW_TOPIC}"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></a></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
|
||||
<!-- BEGIN navlinks -->
|
||||
|
@ -21,7 +21,7 @@
|
|||
</table>
|
||||
|
||||
<table class="forumline" width="100%" cellspacing="1" cellpadding="4" border="0">
|
||||
<tr>
|
||||
<tr>
|
||||
<th class="thCornerL" colspan="3" height="25" align="center" nowrap="nowrap"> {L_TOPICS} </th>
|
||||
<th class="thTop" width="100" align="center" nowrap="nowrap"> {L_AUTHOR} </th>
|
||||
<th class="thTop" width="50" align="center" nowrap="nowrap"> {L_REPLIES} </th>
|
||||
|
@ -30,7 +30,7 @@
|
|||
<th class="thCornerR" align="center" nowrap="nowrap"> {L_RATING} </th>
|
||||
</tr>
|
||||
<!-- BEGIN topicrow -->
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="row1" width="20" align="center" valign="middle">{topicrow.TOPIC_FOLDER_IMG}</td>
|
||||
<td class="row1" align="center" valign="middle">{topicrow.TOPIC_ICON}</td>
|
||||
<td class="row1" width="100%"><span class="topictitle">{topicrow.NEWEST_POST_IMG}{topicrow.TOPIC_TYPE}<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a></span><span class="gensmall"><br />{topicrow.GOTO_PAGE}</span></td>
|
||||
|
@ -41,17 +41,17 @@
|
|||
<td class="row3Right" align="center" valign="middle"><span class="postdetails">{topicrow.TOPIC_RATING}</span></td>
|
||||
</tr>
|
||||
<!-- BEGINELSE -->
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="row1" colspan="8" height="30" align="center" valign="middle"><span class="gen">{L_NO_TOPICS}</span></td>
|
||||
</tr>
|
||||
<!-- END topicrow -->
|
||||
<tr>
|
||||
<tr>
|
||||
<form method="post" action="{S_FORUM_ACTION}"><td class="catBottom" colspan="8" height="28" align="center" valign="middle"><span class="genmed">{L_DISPLAY_TOPICS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input type="submit" class="liteoption" value="{L_GO}" name="sort" /></span></td></form>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="left" width="50" valign="middle"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a></td>
|
||||
<td class="nav" width="100%" align="left" valign="middle"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a>
|
||||
<!-- BEGIN navlinks -->
|
||||
|
@ -69,7 +69,7 @@
|
|||
</table>
|
||||
|
||||
<table width="100%" cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="right"><!-- INCLUDE jumpbox.html --></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<td width="20" align="center">{FOLDER_ANNOUNCE_IMG}</td>
|
||||
<td class="gensmall">{L_ANNOUNCEMENT}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="20" align="center">{FOLDER_HOT_NEW_IMG}</td>
|
||||
<td class="gensmall">{L_NEW_POSTS_HOT}</td>
|
||||
<td> </td>
|
||||
|
|
|
@ -42,18 +42,18 @@
|
|||
</table>{S_HIDDEN_FIELDS}</form></td>
|
||||
</tr>
|
||||
<!-- ELSEIF S_HAS_POLL_DISPLAY -->
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="row2" colspan="2"><br clear="all" /><table cellspacing="0" cellpadding="4" border="0" align="center">
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><span class="gen"><b>{POLL_QUESTION}</b></span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="center"><table cellspacing="0" cellpadding="2" border="0">
|
||||
<!-- BEGIN poll_option -->
|
||||
<tr>
|
||||
<tr>
|
||||
<td><span class="gen">{poll_option.POLL_OPTION_CAPTION}</span></td>
|
||||
<td><table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr>
|
||||
<tr>
|
||||
<td><img src="templates/subSilver/images/vote_lcap.gif" width="4" alt="" height="12" /></td>
|
||||
<td><img src="{poll_option.POLL_OPTION_IMG}" width="{poll_option.POLL_OPTION_IMG_WIDTH}" height="12" alt="{poll_option.POLL_OPTION_PERCENT}" /></td>
|
||||
<td><img src="templates/subSilver/images/vote_rcap.gif" width="4" alt="" height="12" /></td>
|
||||
|
@ -65,7 +65,7 @@
|
|||
<!-- END poll_option -->
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="4" align="center"><span class="gen"><b>{L_TOTAL_VOTES} : {TOTAL_VOTES}</b></span></td>
|
||||
</tr>
|
||||
</table><br clear="all" /></td>
|
||||
|
@ -87,7 +87,7 @@
|
|||
<td width="100%"><a href="{postrow.U_MINI_POST}">{postrow.MINI_POST_IMG}</a><span class="postdetails">{L_POSTED}: {postrow.POST_DATE}<span class="gen"> </span> {L_POST_SUBJECT}: {postrow.POST_SUBJECT}</span></td>
|
||||
<td valign="top" align="right" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td colspan="2"><hr /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
@ -102,23 +102,23 @@
|
|||
<!-- ENDIF -->
|
||||
<td width="150" align="left" valign="middle"><span class="nav"><a href="#top" class="nav">{L_BACK_TO_TOP}</a></span></td>
|
||||
<td width="100%" height="28" valign="bottom" nowrap="nowrap"><table cellspacing="0" cellpadding="0" border="0" height="18" width="18">
|
||||
<tr>
|
||||
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
|
||||
<tr>
|
||||
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
|
||||
|
||||
if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 )
|
||||
document.write(' {postrow.ICQ_IMG}');
|
||||
else
|
||||
document.write('</td><td> </td><td valign="top" nowrap="nowrap"><div style="position:relative"><div style="position:absolute">{postrow.ICQ_IMG}</div><div style="position:absolute;left:3px;top:-1px">{postrow.ICQ_STATUS_IMG}</div></div>');
|
||||
|
||||
|
||||
//--></script><noscript>{postrow.ICQ_IMG}</noscript></td>
|
||||
</tr>
|
||||
</table></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td>
|
||||
</tr>
|
||||
<!-- END postrow -->
|
||||
<tr align="center">
|
||||
<tr align="center">
|
||||
<td class="catBottom" colspan="2" height="28"><table cellspacing="0" cellpadding="0" border="0">
|
||||
<tr><form method="post" action="{S_TOPIC_ACTION}">
|
||||
<td align="center"><span class="gensmall">{L_DISPLAY_POSTS}: {S_SELECT_SORT_DAYS} {L_SORT_BY} {S_SELECT_SORT_KEY} {S_SELECT_SORT_DIR} <input class="liteoption" type="submit" value="{L_GO}" name="sort" /></span></td>
|
||||
|
@ -128,7 +128,7 @@
|
|||
</table>
|
||||
|
||||
<table width="100%" cellspacing="2" cellpadding="2" border="0" align="center">
|
||||
<tr>
|
||||
<tr>
|
||||
<td align="left" valign="middle" nowrap="nowrap"><span class="nav"><a href="{U_POST_NEW_TOPIC}">{POST_IMG}</a> <a href="{U_POST_REPLY_TOPIC}">{REPLY_IMG}</a></span></td>
|
||||
<td align="left" valign="middle" width="100%"><span class="nav"> <a href="{U_INDEX}" class="nav">{L_INDEX}</a> -> <a href="{U_VIEW_FORUM}" class="nav">{FORUM_NAME}</a></span></td>
|
||||
<td align="right" valign="top" nowrap="nowrap"><span class="gensmall">{S_TIMEZONE}</span><br /><span class="nav">{PAGINATION}</span></td>
|
||||
|
@ -139,7 +139,7 @@
|
|||
</table>
|
||||
|
||||
<table width="100%" cellspacing="2" border="0" align="center">
|
||||
<tr>
|
||||
<tr>
|
||||
<td width="40%" valign="top" nowrap="nowrap" align="left"><span class="gensmall">{S_WATCH_TOPIC}<!-- IF S_SELECT_RATING --><br /><form method="post" action="{S_TOPIC_ACTION}">{L_RATE_TOPIC}: {S_SELECT_RATING} <input class="liteoption" type="submit" value="{L_GO}" name="sort" /></form><!-- ENDIF --></span></td>
|
||||
<td align="right" valign="top" nowrap="nowrap"><!-- INCLUDE jumpbox.html --><span class="gensmall">{S_AUTH_LIST}<!-- IF S_TOPIC_MOD --><form method="post" action="{S_MOD_ACTION}">{L_QUICK_MOD}: {S_TOPIC_MOD} <input class="liteoption" type="submit" value="{L_GO}" /></form><!-- ENDIF --></span></td>
|
||||
</tr>
|
||||
|
|
|
@ -32,9 +32,7 @@ if (preg_match('/^c([0-9]+)$/', $_POST['f'], $m))
|
|||
|
||||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
//
|
||||
// Start initial var setup
|
||||
//
|
||||
if ( isset($_GET['f']) || isset($_POST['f']) )
|
||||
{
|
||||
$forum_id = ( isset($_GET['f']) ) ? intval($_GET['f']) : intval($_POST['f']);
|
||||
|
@ -54,13 +52,10 @@ else
|
|||
}
|
||||
|
||||
$start = ( isset($_GET['start']) ) ? intval($_GET['start']) : 0;
|
||||
//
|
||||
// End initial var setup
|
||||
//
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
// End session management
|
||||
// Start session
|
||||
$user->start();
|
||||
|
||||
// Check if the user has actually sent a forum ID with his/her request
|
||||
// If not give them a nice error page.
|
||||
|
@ -75,20 +70,18 @@ if (!$forum_branch = get_forum_branch($forum_id))
|
|||
}
|
||||
|
||||
// Configure style, language, etc.
|
||||
$user = new user($userdata, false, $forum_branch['forum_style']);
|
||||
$auth->acl($userdata, $forum_id, array('m_', 'f_read', 'f_post', 'f_attach', 'f_reply', 'f_edit', 'f_delete'));
|
||||
//
|
||||
$user->setup(false, $forum_branch['forum_style']);
|
||||
$auth->acl($user->data, $forum_id);
|
||||
|
||||
// Auth check
|
||||
if (!$auth->acl_get('f_read', $forum_id))
|
||||
{
|
||||
if ( !$userdata['user_id'] )
|
||||
if ( !$user->data['user_id'] )
|
||||
{
|
||||
redirect("login.$phpEx$SID&redirect=viewforum.$phpEx&f=$forum_id" . ((isset($start)) ? "&start=$start" : ''));
|
||||
}
|
||||
|
||||
// The user is not authed to read this forum ...
|
||||
message_die(MESSAGE, $lang['Sorry_auth_read']);
|
||||
trigger_error( $user->lang['Sorry_auth_read']);
|
||||
}
|
||||
// End of auth check
|
||||
|
||||
|
@ -161,18 +154,14 @@ foreach ($forum_branch as $row)
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Topic read tracking cookie info
|
||||
//
|
||||
$mark_topics = ( isset($_COOKIE[$board_config['cookie_name'] . '_t']) ) ? unserialize(stripslashes($_COOKIE[$board_config['cookie_name'] . '_t'])) : array();
|
||||
$mark_forums = ( isset($_COOKIE[$board_config['cookie_name'] . '_f']) ) ? unserialize(stripslashes($_COOKIE[$board_config['cookie_name'] . '_f'])) : array();
|
||||
|
||||
//
|
||||
// Handle marking posts
|
||||
//
|
||||
if ( $mark_read == 'topics' )
|
||||
{
|
||||
if ( $userdata['user_id'] )
|
||||
if ( $user->data['user_id'] )
|
||||
{
|
||||
$mark_forums[$forum_id] = time();
|
||||
|
||||
|
@ -183,16 +172,12 @@ if ( $mark_read == 'topics' )
|
|||
);
|
||||
}
|
||||
|
||||
$message = $lang['Topics_marked_read'] . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx$SID&f=$forum_id" . '">', '</a> ');
|
||||
message_die(MESSAGE, $message);
|
||||
$message = $user->lang['Topics_marked_read'] . '<br /><br />' . sprintf($user->lang['Click_return_forum'], '<a href="' . "viewforum.$phpEx$SID&f=$forum_id" . '">', '</a> ');
|
||||
trigger_error($message);
|
||||
}
|
||||
//
|
||||
// End handle marking posts
|
||||
//
|
||||
|
||||
//
|
||||
// Do the forum Prune
|
||||
//
|
||||
if ( $auth->acl_get('m_prune', $forum_id) && $board_config['prune_enable'] )
|
||||
{
|
||||
if ( $forum_data['prune_next'] < time() && $forum_data['prune_enable'] )
|
||||
|
@ -201,16 +186,12 @@ if ( $auth->acl_get('m_prune', $forum_id) && $board_config['prune_enable'] )
|
|||
auto_prune($forum_id);
|
||||
}
|
||||
}
|
||||
//
|
||||
// End of forum prune
|
||||
//
|
||||
|
||||
//
|
||||
// Forum rules, subscription info and word censors
|
||||
//
|
||||
$s_watching_forum = '';
|
||||
$s_watching_forum_img = '';
|
||||
watch_topic_forum('forum', $s_watching_forum, $s_watching_forum_img, $userdata['user_id'], $forum_id);
|
||||
watch_topic_forum('forum', $s_watching_forum, $s_watching_forum_img, $user->data['user_id'], $forum_id);
|
||||
|
||||
$s_forum_rules = '';
|
||||
get_forum_rules('forum', $s_forum_rules, $forum_id);
|
||||
|
@ -219,14 +200,9 @@ $orig_word = array();
|
|||
$replacement_word = array();
|
||||
obtain_word_list($orig_word, $replacement_word);
|
||||
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Topic ordering options
|
||||
//
|
||||
$previous_days = array(0 => $lang['All_Topics'], 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('a' => $lang['Author'], 't' => $lang['Post_time'], 'r' => $lang['Replies'], 's' => $lang['Subject'], 'v' => $lang['Views']);
|
||||
$previous_days = array(0 => $user->lang['All_Topics'], 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('a' => $user->lang['Author'], 't' => $user->lang['Post_time'], 'r' => $user->lang['Replies'], 's' => $user->lang['Subject'], 'v' => $user->lang['Views']);
|
||||
$sort_by = array('a' => 'u.username', 't' => 't.topic_last_post_id', 'r' => 't.topic_replies', 's' => 't.topic_title', 'v' => 't.topic_views');
|
||||
|
||||
if ( isset($_POST['sort']) )
|
||||
|
@ -286,82 +262,80 @@ foreach ( $sort_by_text as $key => $text )
|
|||
$select_sort .= '</select>';
|
||||
|
||||
$select_sort_dir = '<select name="sort_dir">';
|
||||
$select_sort_dir .= ( $sort_dir == 'a' ) ? '<option value="a" selected="selected">' . $lang['Ascending'] . '</option><option value="d">' . $lang['Descending'] . '</option>' : '<option value="a">' . $lang['Ascending'] . '</option><option value="d" selected="selected">' . $lang['Descending'] . '</option>';
|
||||
$select_sort_dir .= ( $sort_dir == 'a' ) ? '<option value="a" selected="selected">' . $user->lang['Ascending'] . '</option><option value="d">' . $user->lang['Descending'] . '</option>' : '<option value="a">' . $user->lang['Ascending'] . '</option><option value="d" selected="selected">' . $user->lang['Descending'] . '</option>';
|
||||
$select_sort_dir .= '</select>';
|
||||
|
||||
$post_alt = ( $forum_data['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['Post_new_topic'];
|
||||
$post_alt = ( $forum_data['forum_status'] == FORUM_LOCKED ) ? 'Forum_locked' : 'Post_new_topic';
|
||||
|
||||
// Basic pagewide vars
|
||||
$template->assign_vars(array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'POST_IMG' => '<img src=' . (( $forum_data['forum_status'] == FORUM_LOCKED ) ? $theme['post_locked'] : $theme['post_new'] ) . ' border="0" alt="' . $post_alt . '" title="' . $post_alt . '" />',
|
||||
'PAGINATION' => generate_pagination("viewforum.$phpEx$SID&f=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )),
|
||||
'FORUM_ID' => $forum_id,
|
||||
'FORUM_NAME' => $forum_data['forum_name'],
|
||||
'POST_IMG' => ( $forum_data['forum_status'] == FORUM_LOCKED ) ? $user->img('post_locked', $post_alt) : $user->img('post_new', $post_alt),
|
||||
'PAGINATION' => generate_pagination("viewforum.$phpEx$SID&f=$forum_id&topicdays=$topic_days", $topics_count, $board_config['topics_per_page'], $start),
|
||||
'PAGE_NUMBER' => sprintf($user->lang['Page_of'], ( floor( $start / $board_config['topics_per_page'] ) + 1 ), ceil( $topics_count / $board_config['topics_per_page'] )),
|
||||
|
||||
'FOLDER_IMG' => create_img($theme['folder'], $lang['No_new_posts']),
|
||||
'FOLDER_NEW_IMG' => create_img($theme['folder_new'], $lang['New_posts']),
|
||||
'FOLDER_HOT_IMG' => create_img($theme['folder_hot'], $lang['No_new_posts_hot']),
|
||||
'FOLDER_HOT_NEW_IMG' => create_img($theme['folder_hot_new'], $lang['New_posts_hot']),
|
||||
'FOLDER_LOCKED_IMG' => create_img($theme['folder_locked'], $lang['No_new_posts_locked']),
|
||||
'FOLDER_LOCKED_NEW_IMG' => create_img($theme['folder_locked_new'], $lang['New_posts_locked']),
|
||||
'FOLDER_STICKY_IMG' => create_img($theme['folder_sticky'], $lang['Post_Sticky']),
|
||||
'FOLDER_STICKY_NEW_IMG' => create_img($theme['folder_sticky_new'], $lang['Post_Sticky']),
|
||||
'FOLDER_ANNOUNCE_IMG' => create_img($theme['folder_announce'], $lang['Post_Announcement']),
|
||||
'FOLDER_ANNOUNCE_NEW_IMG' => create_img($theme['folder_announce_new'], $lang['Post_Announcement']),
|
||||
'FOLDER_IMG' => $user->img('folder', 'No_new_posts'),
|
||||
'FOLDER_NEW_IMG' => $user->img('folder_new', 'New_posts'),
|
||||
'FOLDER_HOT_IMG' => $user->img('folder_hot', 'No_new_posts_hot'),
|
||||
'FOLDER_HOT_NEW_IMG' => $user->img('folder_hot_new', 'New_posts_hot'),
|
||||
'FOLDER_LOCKED_IMG' => $user->img('folder_locked', 'No_new_posts_locked'),
|
||||
'FOLDER_LOCKED_NEW_IMG' => $user->img('folder_locked_new', 'New_posts_locked'),
|
||||
'FOLDER_STICKY_IMG' => $user->img('folder_sticky', 'Post_Sticky'),
|
||||
'FOLDER_STICKY_NEW_IMG' => $user->img('folder_sticky_new', 'Post_Sticky'),
|
||||
'FOLDER_ANNOUNCE_IMG' => $user->img('folder_announce', 'Post_Announcement'),
|
||||
'FOLDER_ANNOUNCE_NEW_IMG' => $user->img('folder_announce_new', 'Post_Announcement'),
|
||||
|
||||
'L_TOPICS' => $lang['Topics'],
|
||||
'L_REPLIES' => $lang['Replies'],
|
||||
'L_VIEWS' => $lang['Views'],
|
||||
'L_POSTS' => $lang['Posts'],
|
||||
'L_LASTPOST' => $lang['Last_Post'],
|
||||
'L_RATING' => $lang['Rating'],
|
||||
'L_VIEW_MODERATORS' => $lang['View_moderators'],
|
||||
'L_DISPLAY_TOPICS' => $lang['Display_topics'],
|
||||
'L_SORT_BY' => $lang['Sort_by'],
|
||||
'L_MARK_TOPICS_READ' => $lang['Mark_all_topics'],
|
||||
'L_NO_NEW_POSTS' => $lang['No_new_posts'],
|
||||
'L_NEW_POSTS' => $lang['New_posts'],
|
||||
'L_NO_NEW_POSTS_LOCKED' => $lang['No_new_posts_locked'],
|
||||
'L_NEW_POSTS_LOCKED' => $lang['New_posts_locked'],
|
||||
'L_NO_NEW_POSTS_HOT' => $lang['No_new_posts_hot'],
|
||||
'L_NEW_POSTS_HOT' => $lang['New_posts_hot'],
|
||||
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
|
||||
'L_STICKY' => $lang['Post_Sticky'],
|
||||
'L_POSTED' => $lang['Posted'],
|
||||
'L_JOINED' => $lang['Joined'],
|
||||
'L_AUTHOR' => $lang['Author'],
|
||||
'L_NO_TOPICS' => ( $forum_data['forum_status'] == FORUM_LOCKED ) ? $lang['Forum_locked'] : $lang['No_topics_post_one'],
|
||||
'L_GOTO_PAGE' => $lang['Goto_page'],
|
||||
'L_TOPICS' => $user->lang['Topics'],
|
||||
'L_REPLIES' => $user->lang['Replies'],
|
||||
'L_VIEWS' => $user->lang['Views'],
|
||||
'L_POSTS' => $user->lang['Posts'],
|
||||
'L_LASTPOST' => $user->lang['Last_Post'],
|
||||
'L_RATING' => $user->lang['Rating'],
|
||||
'L_VIEW_MODERATORS' => $user->lang['View_moderators'],
|
||||
'L_DISPLAY_TOPICS' => $user->lang['Display_topics'],
|
||||
'L_SORT_BY' => $user->lang['Sort_by'],
|
||||
'L_MARK_TOPICS_READ' => $user->lang['Mark_all_topics'],
|
||||
'L_NO_NEW_POSTS' => $user->lang['No_new_posts'],
|
||||
'L_NEW_POSTS' => $user->lang['New_posts'],
|
||||
'L_NO_NEW_POSTS_LOCKED' => $user->lang['No_new_posts_locked'],
|
||||
'L_NEW_POSTS_LOCKED' => $user->lang['New_posts_locked'],
|
||||
'L_NO_NEW_POSTS_HOT' => $user->lang['No_new_posts_hot'],
|
||||
'L_NEW_POSTS_HOT' => $user->lang['New_posts_hot'],
|
||||
'L_ANNOUNCEMENT' => $user->lang['Post_Announcement'],
|
||||
'L_STICKY' => $user->lang['Post_Sticky'],
|
||||
'L_POSTED' => $user->lang['Posted'],
|
||||
'L_JOINED' => $user->lang['Joined'],
|
||||
'L_AUTHOR' => $user->lang['Author'],
|
||||
'L_NO_TOPICS' => ( $forum_data['forum_status'] == FORUM_LOCKED ) ? $user->lang['Forum_locked'] : $user->lang['No_topics_post_one'],
|
||||
'L_GOTO_PAGE' => $user->lang['Goto_page'],
|
||||
|
||||
'S_SELECT_SORT_DIR' => $select_sort_dir,
|
||||
'S_SELECT_SORT_KEY' => $select_sort,
|
||||
'S_SELECT_SORT_DAYS' => $select_sort_days,
|
||||
'S_AUTH_LIST' => $s_forum_rules,
|
||||
'S_WATCH_FORUM' => $s_watching_forum,
|
||||
'S_FORUM_ACTION' => 'viewforum.' . $phpEx . $SID . '&f=' . $forum_id . "&start=$start",
|
||||
'S_SELECT_SORT_DAYS'=> $select_sort_days,
|
||||
'S_AUTH_LIST' => $s_forum_rules,
|
||||
'S_WATCH_FORUM' => $s_watching_forum,
|
||||
'S_FORUM_ACTION' => 'viewforum.' . $phpEx . $SID . '&f=' . $forum_id . "&start=$start",
|
||||
|
||||
'U_POST_NEW_TOPIC' => 'posting.' . $phpEx . $SID . '&mode=newtopic&f=' . $forum_id,
|
||||
'U_VIEW_MODERATORS' => 'memberslist.' . $phpEx . $SID . '&mode=moderators&f=' . $forum_id,
|
||||
'U_MARK_READ' => 'viewforum.' . $phpEx . $SID . '&f=' . $forum_id . '&mark=topics')
|
||||
'U_POST_NEW_TOPIC' => 'posting.' . $phpEx . $SID . '&mode=newtopic&f=' . $forum_id,
|
||||
'U_VIEW_MODERATORS' => 'memberslist.' . $phpEx . $SID . '&mode=moderators&f=' . $forum_id,
|
||||
'U_MARK_READ' => 'viewforum.' . $phpEx . $SID . '&f=' . $forum_id . '&mark=topics')
|
||||
);
|
||||
|
||||
//
|
||||
// Do we have subforums? if so, let's include this harmless file
|
||||
//
|
||||
if ($s_has_subforums)
|
||||
{
|
||||
$template->assign_vars(array(
|
||||
'S_HAS_SUBFORUM' => TRUE,
|
||||
'L_SUBFORUM' => (count($forum_rows) == 1) ? $lang['Subforum'] : $lang['Subforums']
|
||||
'L_SUBFORUM' => (count($forum_rows) == 1) ? $user->lang['Subforum'] : $user->lang['Subforums']
|
||||
));
|
||||
|
||||
$root_id = $forum_id;
|
||||
include($phpbb_root_path . 'includes/forums_display.' . $phpEx);
|
||||
}
|
||||
|
||||
//
|
||||
// Grab all the basic data. If we're not on page 1 we also grab any
|
||||
// announcements that may exist.
|
||||
//
|
||||
$total_topics = 0;
|
||||
$topic_rowset = array();
|
||||
|
||||
|
@ -387,7 +361,7 @@ if ( $start )
|
|||
}
|
||||
|
||||
// topic icon join requires full table scan ... not good ... order by is a killer too
|
||||
$sql = "SELECT t.*, i.icons_url, i.icons_width, i.icons_height, u.username, u.user_id, u2.username as user2, u2.user_id as id2
|
||||
/*$sql = "SELECT t.*, i.icons_url, i.icons_width, i.icons_height, u.username, u.user_id, u2.username as user2, u2.user_id as id2
|
||||
FROM " . TOPICS_TABLE . " t, " . ICONS_TABLE . " i, " . USERS_TABLE . " u, " . USERS_TABLE . " u2
|
||||
WHERE t.forum_id = $forum_id
|
||||
AND i.icons_id = t.topic_icon
|
||||
|
@ -395,6 +369,14 @@ $sql = "SELECT t.*, i.icons_url, i.icons_width, i.icons_height, u.username, u.us
|
|||
AND u2.user_id = t.topic_last_poster_id
|
||||
$limit_topics_time
|
||||
ORDER BY t.topic_type DESC, $sort_order
|
||||
LIMIT $start, " . $board_config['topics_per_page'];*/
|
||||
$sql = "SELECT t.*, u.username, u.user_id, u2.username as user2, u2.user_id as id2
|
||||
FROM " . TOPICS_TABLE . " t, " . USERS_TABLE . " u, " . USERS_TABLE . " u2
|
||||
WHERE t.forum_id = $forum_id
|
||||
AND u.user_id = t.topic_poster
|
||||
AND u2.user_id = t.topic_last_poster_id
|
||||
$limit_topics_time
|
||||
ORDER BY t.topic_type DESC, $sort_order
|
||||
LIMIT $start, " . $board_config['topics_per_page'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
|
@ -405,26 +387,22 @@ while( $row = $db->sql_fetchrow($result) )
|
|||
}
|
||||
$db->sql_freeresult($result);
|
||||
|
||||
//
|
||||
// Okay, lets dump out the page ...
|
||||
//
|
||||
if ( $total_topics )
|
||||
{
|
||||
for($i = 0; $i < $total_topics; $i++)
|
||||
{
|
||||
$topic_id = $topic_rowset[$i]['topic_id'];
|
||||
|
||||
//
|
||||
// Type and folder
|
||||
//
|
||||
$topic_type = '';
|
||||
if ( $topic_rowset[$i]['topic_status'] == TOPIC_MOVED )
|
||||
{
|
||||
$topic_type = $lang['Topic_Moved'] . ' ';
|
||||
$topic_type = $user->lang['Topic_Moved'] . ' ';
|
||||
$topic_id = $topic_rowset[$i]['topic_moved_id'];
|
||||
|
||||
$folder_image = $theme['folder'];
|
||||
$folder_alt = $lang['Topic_Moved'];
|
||||
$folder_image = 'folder';
|
||||
$folder_alt = 'Topic_Moved';
|
||||
$newest_post_img = '';
|
||||
}
|
||||
else
|
||||
|
@ -432,77 +410,55 @@ if ( $total_topics )
|
|||
switch ( $topic_rowset[$i]['topic_type'] )
|
||||
{
|
||||
case POST_ANNOUNCE:
|
||||
$topic_type = $lang['Topic_Announcement'] . ' ';
|
||||
$folder = $theme['folder_announce'];
|
||||
$folder_new = $theme['folder_announce_new'];
|
||||
$topic_type = $user->lang['Topic_Announcement'] . ' ';
|
||||
$folder = 'folder_announce';
|
||||
$folder_new = 'folder_announce_new';
|
||||
break;
|
||||
case POST_STICKY:
|
||||
$topic_type = $lang['Topic_Sticky'] . ' ';
|
||||
$folder = $theme['folder_sticky'];
|
||||
$folder_new = $theme['folder_sticky_new'];
|
||||
$topic_type = $user->lang['Topic_Sticky'] . ' ';
|
||||
$folder = 'folder_sticky';
|
||||
$folder_new = 'folder_sticky_new';
|
||||
break;
|
||||
case TOPIC_LOCKED:
|
||||
$folder = $theme['folder_locked'];
|
||||
$folder_new = $theme['folder_locked_new'];
|
||||
$folder = 'folder_locked';
|
||||
$folder_new = 'folder_locked_new';
|
||||
break;
|
||||
default:
|
||||
if ( $replies >= $board_config['hot_threshold'] )
|
||||
{
|
||||
$folder = $theme['folder_hot'];
|
||||
$folder_new = $theme['folder_hot_new'];
|
||||
$folder = 'folder_hot';
|
||||
$folder_new = 'folder_hot_new';
|
||||
}
|
||||
else
|
||||
{
|
||||
$folder = $theme['folder'];
|
||||
$folder_new = $theme['folder_new'];
|
||||
$folder = 'folder';
|
||||
$folder_new = 'folder_new';
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
$unread_topic = false;
|
||||
if ( $userdata['user_id'] && $topic_rowset[$i]['topic_last_post_time'] > $userdata['user_lastvisit'] )
|
||||
if ( $user->data['user_id'] && $topic_rowset[$i]['topic_last_post_time'] > $user->data['user_lastvisit'] )
|
||||
{
|
||||
$unread_topic = true;
|
||||
if ( isset($_COOKIE[$board_config['cookie_name'] . '_f_all']) )
|
||||
{
|
||||
if ( $_COOKIE[$board_config['cookie_name'] . '_f_all'] > $topic_rowset[$i]['topic_last_post_time'] )
|
||||
{
|
||||
$unread_topic = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( isset($mark_topics[$forum_id]) || isset($mark_forums[$forum_id][$topic_id]) )
|
||||
{
|
||||
if ( $mark_forums[$forum_id] > $topic_rowset[$i]['topic_last_post_time'] || !$mark_topics[$forum_id][$topic_id] )
|
||||
{
|
||||
$unread_topic = false;
|
||||
}
|
||||
}
|
||||
|
||||
if ( !isset($mark_topics[$forum_id][$topic_id]) )
|
||||
{
|
||||
$mark_topics[$forum_id][$topic_id] = $topic_rowset[$i]['topic_last_post_time'];
|
||||
}
|
||||
}
|
||||
|
||||
$newest_post_img = ( $unread_topic ) ? '<a href="viewtopic.' . $phpEx . $SID . '&t=' . $topic_id . '&view=newest">' . create_img($theme['goto_post_newest'], $lang['View_newest_post']) . '</a> ' : '';
|
||||
$newest_post_img = ( $unread_topic ) ? '<a href="viewtopic.' . $phpEx . $SID . '&t=' . $topic_id . '&view=newest">' . $user->img('goto_post_newest', 'View_newest_post') . '</a> ' : '';
|
||||
$folder_img = ( $unread_topic ) ? $folder_new : $folder;
|
||||
$folder_alt = ( $unread_topic ) ? $lang['New_posts'] : ( ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? $lang['Topic_locked'] : $lang['No_new_posts'] );
|
||||
$folder_alt = ( $unread_topic ) ? 'New_posts' : ( ( $topic_rowset[$i]['topic_status'] == TOPIC_LOCKED ) ? 'Topic_locked' : 'No_new_posts' );
|
||||
|
||||
}
|
||||
|
||||
if ( $topic_rowset[$i]['topic_vote'] )
|
||||
{
|
||||
$topic_type .= $lang['Topic_Poll'] . ' ';
|
||||
$topic_type .= $user->lang['Topic_Poll'] . ' ';
|
||||
}
|
||||
|
||||
//
|
||||
// Goto message
|
||||
//
|
||||
if ( ( $replies + 1 ) > $board_config['posts_per_page'] )
|
||||
{
|
||||
$total_pages = ceil( ( $replies + 1 ) / $board_config['posts_per_page'] );
|
||||
$goto_page = ' [ <img src=' . $theme['goto_post'] . ' alt="' . $lang['Goto_page'] . '" title="' . $lang['Goto_page'] . '" />' . $lang['Goto_page'] . ': ';
|
||||
$goto_page = ' [ <img src=' . $theme['goto_post'] . ' alt="' . $user->lang['Goto_page'] . '" title="' . $user->lang['Goto_page'] . '" />' . $user->lang['Goto_page'] . ': ';
|
||||
|
||||
$times = 1;
|
||||
for($j = 0; $j < $replies + 1; $j += $board_config['posts_per_page'])
|
||||
|
@ -527,13 +483,11 @@ if ( $total_topics )
|
|||
$goto_page = '';
|
||||
}
|
||||
|
||||
//
|
||||
// Generate all the URIs ...
|
||||
//
|
||||
$view_topic_url = 'viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&t=' . $topic_id;
|
||||
|
||||
$topic_author = ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $topic_rowset[$i]['user_id'] . '">' : '';
|
||||
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['topic_first_poster_name'] != '' ) ? $topic_rowset[$i]['topic_first_poster_name'] : $lang['Guest'] );
|
||||
$topic_author .= ( $topic_rowset[$i]['user_id'] != ANONYMOUS ) ? $topic_rowset[$i]['username'] : ( ( $topic_rowset[$i]['topic_first_poster_name'] != '' ) ? $topic_rowset[$i]['topic_first_poster_name'] : $user->lang['Guest'] );
|
||||
|
||||
$topic_author .= ( $topic_rowset[$i]['user_id'] ) ? '</a>' : '';
|
||||
|
||||
|
@ -541,51 +495,49 @@ if ( $total_topics )
|
|||
|
||||
$last_post_time = $user->format_date($topic_rowset[$i]['topic_last_post_time']);
|
||||
|
||||
$last_post_author = ( !$topic_rowset[$i]['id2'] ) ? ( ( $topic_rowset[$i]['topic_last_poster_name'] != '' ) ? $topic_rowset[$i]['topic_last_poster_name'] . ' ' : $lang['Guest'] . ' ' ) : '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $topic_rowset[$i]['topic_last_poster_id'] . '">' . $topic_rowset[$i]['user2'] . '</a>';
|
||||
$last_post_author = ( !$topic_rowset[$i]['id2'] ) ? ( ( $topic_rowset[$i]['topic_last_poster_name'] != '' ) ? $topic_rowset[$i]['topic_last_poster_name'] . ' ' : $user->lang['Guest'] . ' ' ) : '<a href="profile.' . $phpEx . $SID . '&mode=viewprofile&u=' . $topic_rowset[$i]['topic_last_poster_id'] . '">' . $topic_rowset[$i]['user2'] . '</a>';
|
||||
|
||||
$last_post_url = '<a href="viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&p=' . $topic_rowset[$i]['topic_last_post_id'] . '#' . $topic_rowset[$i]['topic_last_post_id'] . '">' . create_img($theme['goto_post_latest'], $lang['View_latest_post']) . '</a>';
|
||||
$last_post_url = '<a href="viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&p=' . $topic_rowset[$i]['topic_last_post_id'] . '#' . $topic_rowset[$i]['topic_last_post_id'] . '">' . $user->img('goto_post_latest', 'View_latest_post') . '</a>';
|
||||
|
||||
//
|
||||
// Send vars to template
|
||||
//
|
||||
$template->assign_block_vars('topicrow', array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOPIC_FOLDER_IMG' => create_img($folder_img, $folder_alt),
|
||||
'TOPIC_AUTHOR' => $topic_author,
|
||||
'NEWEST_POST_IMG' => $newest_post_img,
|
||||
'FIRST_POST_TIME' => $first_post_time,
|
||||
'LAST_POST_TIME' => $last_post_time,
|
||||
'LAST_POST_AUTHOR' => $last_post_author,
|
||||
'LAST_POST_IMG' => $last_post_url,
|
||||
'GOTO_PAGE' => $goto_page,
|
||||
'REPLIES' => $topic_rowset[$i]['topic_replies'],
|
||||
'VIEWS' => $topic_rowset[$i]['topic_views'],
|
||||
'TOPIC_TITLE' => ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'],
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
'TOPIC_ICON' => ( !empty($topic_rowset[$i]['icons_url']) ) ? '<img src="' . $board_config['icons_path'] . '/' . $topic_rowset[$i]['icons_url'] . '" width="' . $topic_rowset[$i]['icons_width'] . '" height="' . $topic_rowset[$i]['icons_height'] . '" alt="" title="" />' : '',
|
||||
'TOPIC_RATING' => ( !empty($topic_rowset[$i]['topic_rating']) ) ? '<img src=' . str_replace('{RATE}', $topic_rowset[$i]['topic_rating'], $theme['rating']) . ' alt="' . $topic_rowset[$i]['topic_rating'] . '" title="' . $topic_rowset[$i]['topic_rating'] . '" />' : '',
|
||||
'FORUM_ID' => $forum_id,
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOPIC_FOLDER_IMG' => $user->img($folder_img, $folder_alt),
|
||||
'TOPIC_AUTHOR' => $topic_author,
|
||||
'NEWEST_POST_IMG' => $newest_post_img,
|
||||
'FIRST_POST_TIME' => $first_post_time,
|
||||
'LAST_POST_TIME' => $last_post_time,
|
||||
'LAST_POST_AUTHOR' => $last_post_author,
|
||||
'LAST_POST_IMG' => $last_post_url,
|
||||
'GOTO_PAGE' => $goto_page,
|
||||
'REPLIES' => $topic_rowset[$i]['topic_replies'],
|
||||
'VIEWS' => $topic_rowset[$i]['topic_views'],
|
||||
'TOPIC_TITLE' => ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'],
|
||||
'TOPIC_TYPE' => $topic_type,
|
||||
'TOPIC_ICON' => ( !empty($topic_rowset[$i]['icons_url']) ) ? '<img src="' . $board_config['icons_path'] . '/' . $topic_rowset[$i]['icons_url'] . '" width="' . $topic_rowset[$i]['icons_width'] . '" height="' . $topic_rowset[$i]['icons_height'] . '" alt="" title="" />' : '',
|
||||
'TOPIC_RATING' => ( !empty($topic_rowset[$i]['topic_rating']) ) ? '<img src=' . str_replace('{RATE}', $topic_rowset[$i]['topic_rating'], $theme['rating']) . ' alt="' . $topic_rowset[$i]['topic_rating'] . '" title="' . $topic_rowset[$i]['topic_rating'] . '" />' : '',
|
||||
|
||||
'S_ROW_COUNT' => $i,
|
||||
'S_ROW_COUNT' => $i,
|
||||
|
||||
'U_VIEW_TOPIC' => $view_topic_url)
|
||||
'U_VIEW_TOPIC' => $view_topic_url)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
if ( $userdata['user_id'] )
|
||||
if ($user->data['user_id'] != ANONYMOUS)
|
||||
{
|
||||
setcookie($board_config['cookie_name'] . '_t', serialize($mark_topics), 0, $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
|
||||
}
|
||||
|
||||
//
|
||||
// Dump out the page header and load viewforum template
|
||||
//
|
||||
$page_title = $lang['View_forum'] . ' - ' . $forum_data['forum_name'];
|
||||
$page_title = $user->lang['View_forum'] . ' - ' . $forum_data['forum_name'];
|
||||
|
||||
$nav_links['up'] = array(
|
||||
'url' => 'index.' . $phpEx . $SID,
|
||||
'title' => sprintf($lang['Forum_Index'], $board_config['sitename'])
|
||||
'title' => sprintf($user->lang['Forum_Index'], $board_config['sitename'])
|
||||
);
|
||||
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
|
|
@ -25,9 +25,9 @@ include($phpbb_root_path . 'extension.inc');
|
|||
include($phpbb_root_path . 'common.'.$phpEx);
|
||||
|
||||
// Start session management
|
||||
$userdata = $session->start();
|
||||
$auth->acl($userdata);
|
||||
$user = new user($userdata);
|
||||
$user->start();
|
||||
$user->setup();
|
||||
$auth->acl($user->data);
|
||||
// End session management
|
||||
|
||||
//
|
||||
|
@ -100,7 +100,7 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||
{
|
||||
if ( $row['session_ip'] != $prev_ip )
|
||||
{
|
||||
$username = $lang['Guest'];
|
||||
$username = $user->lang['Guest'];
|
||||
$view_online = true;
|
||||
$guest_users++;
|
||||
|
||||
|
@ -118,7 +118,7 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||
switch ( $on_page[1] )
|
||||
{
|
||||
case 'index':
|
||||
$location = $lang['Forum_index'];
|
||||
$location = $user->lang['Forum_index'];
|
||||
$location_url = "index.$phpEx$SID";
|
||||
break;
|
||||
|
||||
|
@ -134,10 +134,10 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||
switch ( $on_page[1] )
|
||||
{
|
||||
case 'posting':
|
||||
$location = sprintf($lang['Posting_message'], $forum_data[$forum_id]);
|
||||
$location = sprintf($user->lang['Posting_message'], $forum_data[$forum_id]);
|
||||
break;
|
||||
case 'viewtopic':
|
||||
$location = sprintf($lang['Reading_topic'], $forum_data[$forum_id]);
|
||||
$location = sprintf($user->lang['Reading_topic'], $forum_data[$forum_id]);
|
||||
break;
|
||||
case 'viewforum':
|
||||
$location .= $forum_data[$forum_id];
|
||||
|
@ -147,51 +147,51 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||
}
|
||||
else
|
||||
{
|
||||
$location = $lang['Forum_index'];
|
||||
$location = $user->lang['Forum_index'];
|
||||
$location_url = "index.$phpEx$SID";
|
||||
}
|
||||
break;
|
||||
|
||||
case 'search':
|
||||
$location = $lang['Searching_forums'];
|
||||
$location = $user->lang['Searching_forums'];
|
||||
$location_url = "search.$phpEx$SID";
|
||||
break;
|
||||
|
||||
case 'profile':
|
||||
$location = $lang['Viewing_profile'];
|
||||
$location = $user->lang['Viewing_profile'];
|
||||
$location_url = "index.$phpEx$SID";
|
||||
break;
|
||||
|
||||
case 'faq':
|
||||
$location = $lang['Viewing_FAQ'];
|
||||
$location = $user->lang['Viewing_FAQ'];
|
||||
$location_url = "faq.$phpEx$SID";
|
||||
break;
|
||||
|
||||
case 'viewonline':
|
||||
$location = $lang['Viewing_online'];
|
||||
$location = $user->lang['Viewing_online'];
|
||||
$location_url = "viewonline.$phpEx$SID";
|
||||
break;
|
||||
|
||||
case 'memberslist':
|
||||
$location = $lang['Viewing_member_list'];
|
||||
$location = $user->lang['Viewing_member_list'];
|
||||
$location_url = "memberlist.$phpEx$SID";
|
||||
break;
|
||||
|
||||
default:
|
||||
$location = $lang['Forum_index'];
|
||||
$location = $user->lang['Forum_index'];
|
||||
$location_url = "index.$phpEx$SID";
|
||||
break;
|
||||
}
|
||||
|
||||
$template->assign_block_vars($which_row, array(
|
||||
'USERNAME' => $username,
|
||||
'LASTUPDATE' => $user->format_date($row['session_time']),
|
||||
'FORUM_LOCATION' => $location,
|
||||
'USERNAME' => $username,
|
||||
'LASTUPDATE' => $user->format_date($row['session_time']),
|
||||
'FORUM_LOCATION'=> $location,
|
||||
|
||||
'S_ROW_COUNT' => $$which_counter,
|
||||
'S_ROW_COUNT' => $$which_counter,
|
||||
|
||||
'U_USER_PROFILE' => "profile.$phpEx$SID&mode=viewprofile&u=" . $user_id,
|
||||
'U_FORUM_LOCATION' => $location_url)
|
||||
'U_USER_PROFILE' => "profile.$phpEx$SID&mode=viewprofile&u=" . $user_id,
|
||||
'U_FORUM_LOCATION' => $location_url)
|
||||
);
|
||||
|
||||
$$which_counter++;
|
||||
|
@ -200,57 +200,59 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||
|
||||
if( $registered_users == 0 )
|
||||
{
|
||||
$l_r_user_s = $lang['Reg_users_zero_online'];
|
||||
$l_r_user_s = $user->lang['Reg_users_zero_online'];
|
||||
}
|
||||
else if( $registered_users == 1 )
|
||||
{
|
||||
$l_r_user_s = $lang['Reg_user_online'];
|
||||
$l_r_user_s = $user->lang['Reg_user_online'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_r_user_s = $lang['Reg_users_online'];
|
||||
$l_r_user_s = $user->lang['Reg_users_online'];
|
||||
}
|
||||
|
||||
if( $hidden_users == 0 )
|
||||
{
|
||||
$l_h_user_s = $lang['Hidden_users_zero_online'];
|
||||
$l_h_user_s = $user->lang['Hidden_users_zero_online'];
|
||||
}
|
||||
else if( $hidden_users == 1 )
|
||||
{
|
||||
$l_h_user_s = $lang['Hidden_user_online'];
|
||||
$l_h_user_s = $user->lang['Hidden_user_online'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_h_user_s = $lang['Hidden_users_online'];
|
||||
$l_h_user_s = $user->lang['Hidden_users_online'];
|
||||
}
|
||||
|
||||
if( $guest_users == 0 )
|
||||
{
|
||||
$l_g_user_s = $lang['Guest_users_zero_online'];
|
||||
$l_g_user_s = $user->lang['Guest_users_zero_online'];
|
||||
}
|
||||
else if( $guest_users == 1 )
|
||||
{
|
||||
$l_g_user_s = $lang['Guest_user_online'];
|
||||
$l_g_user_s = $user->lang['Guest_user_online'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$l_g_user_s = $lang['Guest_users_online'];
|
||||
$l_g_user_s = $user->lang['Guest_users_online'];
|
||||
}
|
||||
|
||||
$template->assign_vars(array(
|
||||
'TOTAL_REGISTERED_USERS_ONLINE' => sprintf($l_r_user_s, $registered_users) . sprintf($l_h_user_s, $hidden_users),
|
||||
'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_users),
|
||||
'TOTAL_REGISTERED_USERS_ONLINE' => sprintf($l_r_user_s, $registered_users) . sprintf($l_h_user_s, $hidden_users),
|
||||
'TOTAL_GUEST_USERS_ONLINE' => sprintf($l_g_user_s, $guest_users),
|
||||
|
||||
'L_WHOSONLINE' => $lang['Who_is_online'],
|
||||
'L_ONLINE_EXPLAIN' => $lang['Online_explain'],
|
||||
'L_USERNAME' => $lang['Username'],
|
||||
'L_FORUM_LOCATION' => $lang['Forum_Location'],
|
||||
'L_LAST_UPDATE' => $lang['Last_updated'],
|
||||
'L_NO_GUESTS_BROWSING' => $lang['No_users_browsing'],
|
||||
'L_NO_REGISTERED_USERS_BROWSING' => $lang['No_users_browsing'])
|
||||
'META' => '<meta http-equiv="refresh" content="60; url=viewonline.' . $phpEx . $SID . '">',
|
||||
|
||||
'L_WHOSONLINE' => $user->lang['Who_is_online'],
|
||||
'L_ONLINE_EXPLAIN' => $user->lang['Online_explain'],
|
||||
'L_USERNAME' => $user->lang['Username'],
|
||||
'L_FORUM_LOCATION' => $user->lang['Forum_Location'],
|
||||
'L_LAST_UPDATE' => $user->lang['Last_updated'],
|
||||
'L_NO_GUESTS_BROWSING' => $user->lang['No_users_browsing'],
|
||||
'L_NO_REGISTERED_USERS_BROWSING' => $user->lang['No_users_browsing'])
|
||||
);
|
||||
|
||||
$page_title = $lang['Who_is_online'];
|
||||
$page_title = $user->lang['Who_is_online'];
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
$template->set_filenames(array(
|
||||
|
|
|
@ -100,20 +100,16 @@ if (isset($_GET['view']) && empty($post_id))
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Start session management
|
||||
//
|
||||
$userdata = $session->start();
|
||||
//
|
||||
$user->start();
|
||||
// End session management
|
||||
//
|
||||
|
||||
if ( $userdata['user_id'] && isset($_POST['rating']) )
|
||||
if ( $user->data['user_id'] && isset($_POST['rating']) )
|
||||
{
|
||||
$sql = "SELECT rating
|
||||
FROM " . TOPICS_RATINGS_TABLE . "
|
||||
WHERE topic_id = $topic_id
|
||||
AND user_id = " . $userdata['user_id'];
|
||||
AND user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$rating = ( $row = $db->sql_fetchrow($result) ) ? $row['rating'] : '';
|
||||
|
@ -125,7 +121,7 @@ if ( $userdata['user_id'] && isset($_POST['rating']) )
|
|||
{
|
||||
$new_rating = intval($_POST['rating']);
|
||||
|
||||
$sql = ( $rating != '' ) ? "UPDATE " . TOPICS_RATING_TABLE . " SET rating = $new_rating WHERE user_id = " . $userdata['user_id'] . " AND topic_id = $topic_id" : "INSERT INTO " . TOPICS_RATING_TABLE . " (topic_id, user_id, rating) VALUES ($topic_id, " . $userdata['user_id'] . ", $new_rating)";
|
||||
$sql = ( $rating != '' ) ? "UPDATE " . TOPICS_RATING_TABLE . " SET rating = $new_rating WHERE user_id = " . $user->data['user_id'] . " AND topic_id = $topic_id" : "INSERT INTO " . TOPICS_RATING_TABLE . " (topic_id, user_id, rating) VALUES ($topic_id, " . $user->data['user_id'] . ", $new_rating)";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -152,8 +148,8 @@ if ( !(extract($db->sql_fetchrow($result))) )
|
|||
}
|
||||
|
||||
// Configure style, language, etc.
|
||||
$user = new user($userdata, false, $forum_style);
|
||||
$auth->acl($userdata, $forum_id, array('f_read', 'f_post', 'f_reply', 'f_attach'));
|
||||
$user->setup(false, $forum_style);
|
||||
$auth->acl($user->data, $forum_id);
|
||||
// End configure
|
||||
|
||||
//
|
||||
|
@ -161,14 +157,14 @@ $auth->acl($userdata, $forum_id, array('f_read', 'f_post', 'f_reply', 'f_attach'
|
|||
//
|
||||
if ( !$auth->acl_get('f_read', $forum_id) )
|
||||
{
|
||||
if ( $userdata['user_id'] )
|
||||
if ( $user->data['user_id'] )
|
||||
{
|
||||
$redirect = ( isset($post_id) ) ? "p=$post_id" : "t=$topic_id";
|
||||
$redirect .= ( isset($start) ) ? "&start=$start" : '';
|
||||
redirect('login.' . $phpEx . $SID . '&redirect=viewtopic.' . $phpEx . '&' . $redirect);
|
||||
}
|
||||
|
||||
message_die(MESSAGE, $lang['Sorry_auth_read']);
|
||||
message_die(MESSAGE, $user->lang['Sorry_auth_read']);
|
||||
}
|
||||
//
|
||||
// End auth check
|
||||
|
@ -181,13 +177,13 @@ if ( !empty($post_id) )
|
|||
|
||||
$s_watching_topic = '';
|
||||
$s_watching_topic_img = '';
|
||||
watch_topic_forum('topic', $s_watching_topic, $s_watching_topic_img, $userdata['user_id'], $topic_id);
|
||||
watch_topic_forum('topic', $s_watching_topic, $s_watching_topic_img, $user->data['user_id'], $topic_id);
|
||||
|
||||
//
|
||||
// Post ordering options
|
||||
//
|
||||
$previous_days = array(0 => $lang['All_Posts'], 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('a' => $lang['Author'], 't' => $lang['Post_time'], 's' => $lang['Subject']);
|
||||
$previous_days = array(0 => $user->lang['All_Posts'], 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('a' => $user->lang['Author'], 't' => $user->lang['Post_time'], 's' => $user->lang['Subject']);
|
||||
$sort_by = array('a' => 'u.username', 't' => 'p.post_id', 's' => 'pt.post_subject');
|
||||
|
||||
if ( isset($_POST['sort']) )
|
||||
|
@ -245,7 +241,7 @@ foreach ( $sort_by_text as $key => $text )
|
|||
$select_sort .= '</select>';
|
||||
|
||||
$select_sort_dir = '<select name="sort_dir">';
|
||||
$select_sort_dir .= ( $sort_dir == 'a' ) ? '<option value="a" selected="selected">' . $lang['Ascending'] . '</option><option value="d">' . $lang['Descending'] . '</option>' : '<option value="a">' . $lang['Ascending'] . '</option><option value="d" selected="selected">' . $lang['Descending'] . '</option>';
|
||||
$select_sort_dir .= ( $sort_dir == 'a' ) ? '<option value="a" selected="selected">' . $user->lang['Ascending'] . '</option><option value="d">' . $user->lang['Descending'] . '</option>' : '<option value="a">' . $user->lang['Ascending'] . '</option><option value="d" selected="selected">' . $user->lang['Descending'] . '</option>';
|
||||
$select_sort_dir .= '</select>';
|
||||
|
||||
$select_post_days = '<select name="postdays">';
|
||||
|
@ -268,14 +264,14 @@ while ( $row = $db->sql_fetchrow($result) )
|
|||
$db->sql_freeresult($result);
|
||||
|
||||
$rating = '';
|
||||
if ( $userdata['user_id'] )
|
||||
if ( $user->data['user_id'] )
|
||||
{
|
||||
$rating_text = array(-5 => $lang['Very_poor'], -2 => $lang['Quite_poor'], 0 => $lang['Unrated'], 2 => $lang['Quite_good'], 5 => $lang['Very_good']);
|
||||
$rating_text = array(-5 => $user->lang['Very_poor'], -2 => $user->lang['Quite_poor'], 0 => $user->lang['Unrated'], 2 => $user->lang['Quite_good'], 5 => $user->lang['Very_good']);
|
||||
|
||||
$sql = "SELECT rating
|
||||
FROM " . TOPICS_RATINGS_TABLE . "
|
||||
WHERE topic_id = $topic_id
|
||||
AND user_id = " . $userdata['user_id'];
|
||||
AND user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_rating = ( $row = $db->sql_fetchrow($result) ) ? $row['rating'] : 0;
|
||||
|
@ -332,11 +328,11 @@ $s_forum_rules = '';
|
|||
get_forum_rules('topic', $s_forum_rules, $forum_id);
|
||||
|
||||
$topic_mod = '';
|
||||
$topic_mod .= ( $auth->acl_get('m_lock', $forum_id) ) ? ( ( $topic_status == TOPIC_UNLOCKED ) ? '<option value="lock">' . $lang['Lock_topic'] . '</option>' : '<option value="unlock">' . $lang['Unlock_topic'] . '</option>' ) : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_delete', $forum_id) ) ? '<option value="delete">' . $lang['Delete_topic'] . '</option>' : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_move', $forum_id) ) ? '<option value="move">' . $lang['Move_topic'] . '</option>' : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_split', $forum_id) ) ? '<option value="split">' . $lang['Split_topic'] . '</option>' : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_merge', $forum_id) ) ? '<option value="merge">' . $lang['Merge_topic'] . '</option>' : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_lock', $forum_id) ) ? ( ( $topic_status == TOPIC_UNLOCKED ) ? '<option value="lock">' . $user->lang['Lock_topic'] . '</option>' : '<option value="unlock">' . $user->lang['Unlock_topic'] . '</option>' ) : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_delete', $forum_id) ) ? '<option value="delete">' . $user->lang['Delete_topic'] . '</option>' : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_move', $forum_id) ) ? '<option value="move">' . $user->lang['Move_topic'] . '</option>' : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_split', $forum_id) ) ? '<option value="split">' . $user->lang['Split_topic'] . '</option>' : '';
|
||||
$topic_mod .= ( $auth->acl_get('m_merge', $forum_id) ) ? '<option value="merge">' . $user->lang['Merge_topic'] . '</option>' : '';
|
||||
|
||||
//
|
||||
// If we've got a hightlight set pass it on to pagination.
|
||||
|
@ -353,13 +349,13 @@ $view_forum_url = 'viewforum.' . $phpEx . $SID . '&f=' . $forum_id;
|
|||
$view_prev_topic_url = 'viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&t=' . $topic_id . '&view=previous';
|
||||
$view_next_topic_url = 'viewtopic.' . $phpEx . $SID . '&f=' . $forum_id . '&t=' . $topic_id . '&view=next';
|
||||
|
||||
$reply_img = ( $forum_status == FORUM_LOCKED || $topic_status == TOPIC_LOCKED ) ? create_img($theme['reply_locked'], $lang['Topic_locked']) : create_img($theme['reply_new'], $lang['Reply_to_topic']);
|
||||
$post_img = ( $forum_status == FORUM_LOCKED ) ? create_img($theme['post_locked'], $lang['Forum_locked']) : create_img($theme['post_new'], $lang['Post_new_topic']);
|
||||
$reply_img = ( $forum_status == FORUM_LOCKED || $topic_status == TOPIC_LOCKED ) ? $user->img('reply_locked', $user->lang['Topic_locked']) : $user->img('reply_new', $user->lang['Reply_to_topic']);
|
||||
$post_img = ( $forum_status == FORUM_LOCKED ) ? $user->img('post_locked', $user->lang['Forum_locked']) : $user->img('post_new', $user->lang['Post_new_topic']);
|
||||
|
||||
//
|
||||
// Set a cookie for this topic
|
||||
//
|
||||
if ( $userdata['user_id'] )
|
||||
if ( $user->data['user_id'] )
|
||||
{
|
||||
$mark_topics = ( isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t']) ) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_t'])) : array();
|
||||
|
||||
|
@ -376,10 +372,8 @@ $template->set_filenames(array(
|
|||
);
|
||||
make_jumpbox('viewforum.'.$phpEx, $forum_id);
|
||||
|
||||
//
|
||||
// Output page header
|
||||
//
|
||||
$page_title = $lang['View_topic'] .' - ' . $topic_title;
|
||||
$page_title = $user->lang['View_topic'] .' - ' . $topic_title;
|
||||
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
|
||||
|
||||
if ( count($orig_word) )
|
||||
|
@ -387,37 +381,35 @@ if ( count($orig_word) )
|
|||
$topic_title = preg_replace($orig_word, $replacement_word, $topic_title); // Censor topic title
|
||||
}
|
||||
|
||||
//
|
||||
// Send vars to template
|
||||
//
|
||||
$template->assign_vars(array(
|
||||
'FORUM_ID' => $forum_id,
|
||||
'FORUM_NAME' => $forum_name,
|
||||
'TOPIC_ID' => $topic_id,
|
||||
'TOPIC_TITLE' => $topic_title,
|
||||
'PAGINATION' => $pagination,
|
||||
'PAGE_NUMBER' => sprintf($lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $topic_replies / $board_config['posts_per_page'] )),
|
||||
'PAGE_NUMBER' => sprintf($user->lang['Page_of'], ( floor( $start / $board_config['posts_per_page'] ) + 1 ), ceil( $topic_replies / $board_config['posts_per_page'] )),
|
||||
|
||||
'POST_IMG' => $post_img,
|
||||
'REPLY_IMG' => $reply_img,
|
||||
|
||||
'L_AUTHOR' => $lang['Author'],
|
||||
'L_MESSAGE' => $lang['Message'],
|
||||
'L_POSTED' => $lang['Posted'],
|
||||
'L_POST_SUBJECT' => $lang['Post_subject'],
|
||||
'L_VIEW_NEXT_TOPIC' => $lang['View_next_topic'],
|
||||
'L_VIEW_PREVIOUS_TOPIC' => $lang['View_previous_topic'],
|
||||
'L_BACK_TO_TOP' => $lang['Back_to_top'],
|
||||
'L_DISPLAY_POSTS' => $lang['Display_posts'],
|
||||
'L_LOCK_TOPIC' => $lang['Lock_topic'],
|
||||
'L_UNLOCK_TOPIC' => $lang['Unlock_topic'],
|
||||
'L_MOVE_TOPIC' => $lang['Move_topic'],
|
||||
'L_SPLIT_TOPIC' => $lang['Split_topic'],
|
||||
'L_DELETE_TOPIC' => $lang['Delete_topic'],
|
||||
'L_GOTO_PAGE' => $lang['Goto_page'],
|
||||
'L_SORT_BY' => $lang['Sort_by'],
|
||||
'L_RATE_TOPIC' => $lang['Rate_topic'],
|
||||
'L_QUICK_MOD' => $lang['Quick_mod'],
|
||||
'L_AUTHOR' => $user->lang['Author'],
|
||||
'L_MESSAGE' => $user->lang['Message'],
|
||||
'L_POSTED' => $user->lang['Posted'],
|
||||
'L_POST_SUBJECT' => $user->lang['Post_subject'],
|
||||
'L_VIEW_NEXT_TOPIC' => $user->lang['View_next_topic'],
|
||||
'L_VIEW_PREVIOUS_TOPIC' => $user->lang['View_previous_topic'],
|
||||
'L_BACK_TO_TOP' => $user->lang['Back_to_top'],
|
||||
'L_DISPLAY_POSTS' => $user->lang['Display_posts'],
|
||||
'L_LOCK_TOPIC' => $user->lang['Lock_topic'],
|
||||
'L_UNLOCK_TOPIC' => $user->lang['Unlock_topic'],
|
||||
'L_MOVE_TOPIC' => $user->lang['Move_topic'],
|
||||
'L_SPLIT_TOPIC' => $user->lang['Split_topic'],
|
||||
'L_DELETE_TOPIC' => $user->lang['Delete_topic'],
|
||||
'L_GOTO_PAGE' => $user->lang['Goto_page'],
|
||||
'L_SORT_BY' => $user->lang['Sort_by'],
|
||||
'L_RATE_TOPIC' => $user->lang['Rate_topic'],
|
||||
'L_QUICK_MOD' => $user->lang['Quick_mod'],
|
||||
|
||||
'S_TOPIC_LINK' => 't',
|
||||
'S_SELECT_SORT_DIR' => $select_sort_dir,
|
||||
|
@ -443,11 +435,11 @@ $template->assign_vars(array(
|
|||
//
|
||||
$nav_links['prev'] = array(
|
||||
'url' => $view_prev_topic_url,
|
||||
'title' => $lang['View_previous_topic']
|
||||
'title' => $user->lang['View_previous_topic']
|
||||
);
|
||||
$nav_links['next'] = array(
|
||||
'url' => $view_next_topic_url,
|
||||
'title' => $lang['View_next_topic']
|
||||
'title' => $user->lang['View_next_topic']
|
||||
);
|
||||
$nav_links['up'] = array(
|
||||
'url' => $view_forum_url,
|
||||
|
@ -477,7 +469,7 @@ if ( !empty($poll_start) )
|
|||
$sql = "SELECT vote_id
|
||||
FROM " . VOTE_USERS_TABLE . "
|
||||
WHERE vote_id = $vote_id
|
||||
AND vote_user_id = " . $userdata['user_id'];
|
||||
AND vote_user_id = " . $user->data['user_id'];
|
||||
$result = $db->sql_query($sql);
|
||||
|
||||
$user_voted = ( $row = $db->sql_fetchrow($result) ) ? TRUE : 0;
|
||||
|
@ -507,7 +499,7 @@ if ( !empty($poll_start) )
|
|||
$vote_percent = ( $vote_results_sum > 0 ) ? $vote_info[$i]['vote_result'] / $vote_results_sum : 0;
|
||||
$poll_length = round($vote_percent * $board_config['vote_graphic_length']);
|
||||
$vote_percent = sprintf("%.1d%%", ($vote_percent * 100));
|
||||
$vote_graphic_img = create_img($theme['voting_graphic'] . ' width="' . $poll_length . '"', $vote_percent);
|
||||
$vote_graphic_img = $user->img($theme['voting_graphic'] . ' width="' . $poll_length . '"', $vote_percent);
|
||||
|
||||
if ( count($orig_word) )
|
||||
{
|
||||
|
@ -526,7 +518,7 @@ if ( !empty($poll_start) )
|
|||
$template->assign_vars(array(
|
||||
'S_HAS_POLL_DISPLAY' => true,
|
||||
|
||||
'L_TOTAL_VOTES' => $lang['Total_votes'],
|
||||
'L_TOTAL_VOTES' => $user->lang['Total_votes'],
|
||||
'TOTAL_VOTES' => $vote_results_sum)
|
||||
);
|
||||
|
||||
|
@ -549,8 +541,8 @@ if ( !empty($poll_start) )
|
|||
$template->assign_vars(array(
|
||||
'S_HAS_POLL_OPTIONS' => true,
|
||||
|
||||
'L_SUBMIT_VOTE' => $lang['Submit_vote'],
|
||||
'L_VIEW_RESULTS' => $lang['View_results'],
|
||||
'L_SUBMIT_VOTE' => $user->lang['Submit_vote'],
|
||||
'L_VIEW_RESULTS' => $user->lang['View_results'],
|
||||
|
||||
'U_VIEW_RESULTS' => "viewtopic.$phpEx$SID&t=$topic_id&postdays=$post_days&postorder=$post_order&vote=viewresult")
|
||||
);
|
||||
|
@ -600,15 +592,15 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
do
|
||||
{
|
||||
$poster_id = $row['user_id'];
|
||||
$poster = ( !$poster_id ) ? $lang['Guest'] : $row['username'];
|
||||
$poster = ( !$poster_id ) ? $user->lang['Guest'] : $row['username'];
|
||||
|
||||
$poster_posts = ( $row['user_id'] ) ? $lang['Posts'] . ': ' . $row['user_posts'] : '';
|
||||
$poster_posts = ( $row['user_id'] ) ? $user->lang['Posts'] . ': ' . $row['user_posts'] : '';
|
||||
|
||||
$poster_from = ( $row['user_from'] && $row['user_id'] ) ? $lang['Location'] . ': ' . $row['user_from'] : '';
|
||||
$poster_from = ( $row['user_from'] && $row['user_id'] ) ? $user->lang['Location'] . ': ' . $row['user_from'] : '';
|
||||
|
||||
if ( !isset($poster_details[$poster_id]['joined']) )
|
||||
{
|
||||
$poster_details[$poster_id]['joined'] = ( $row['user_id'] ) ? $lang['Joined'] . ': ' . $user->format_date($row['user_regdate'], $lang['DATE_FORMAT']) : '';
|
||||
$poster_details[$poster_id]['joined'] = ( $row['user_id'] ) ? $user->lang['Joined'] . ': ' . $user->format_date($row['user_regdate'], $user->lang['DATE_FORMAT']) : '';
|
||||
}
|
||||
|
||||
if ( !isset($poster_details[$poster_id]['avatar']) )
|
||||
|
@ -669,25 +661,25 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
if ( !$poster_id && $row['post_username'] != '' )
|
||||
{
|
||||
$poster = $row['post_username'];
|
||||
$poster_rank = $lang['Guest'];
|
||||
$poster_rank = $user->lang['Guest'];
|
||||
}
|
||||
|
||||
if ( !isset($poster_details[$poster_id]['profile']) && $poster_id )
|
||||
{
|
||||
$temp_url = "profile.$phpEx$SID&mode=viewprofile&u=$poster_id";
|
||||
$poster_details[$poster_id]['profile_img'] = '<a href="' . $temp_url . '">' . create_img($theme['icon_profile'], $lang['Read_profile']) . '</a>';
|
||||
$poster_details[$poster_id]['profile'] = '<a href="' . $temp_url . '">' . $lang['Read_profile'] . '</a>';
|
||||
$poster_details[$poster_id]['profile_img'] = '<a href="' . $temp_url . '">' . $user->img('icon_profile', $user->lang['Read_profile']) . '</a>';
|
||||
$poster_details[$poster_id]['profile'] = '<a href="' . $temp_url . '">' . $user->lang['Read_profile'] . '</a>';
|
||||
|
||||
$temp_url = "privmsg.$phpEx$SID&mode=post&u=$poster_id";
|
||||
$poster_details[$poster_id]['pm_img'] = '<a href="' . $temp_url . '">' . create_img($theme['icon_pm'], $lang['Send_private_message']) . '</a>';
|
||||
$poster_details[$poster_id]['pm'] = '<a href="' . $temp_url . '">' . $lang['Send_private_message'] . '</a>';
|
||||
$poster_details[$poster_id]['pm_img'] = '<a href="' . $temp_url . '">' . $user->img('icon_pm', $user->lang['Send_private_message']) . '</a>';
|
||||
$poster_details[$poster_id]['pm'] = '<a href="' . $temp_url . '">' . $user->lang['Send_private_message'] . '</a>';
|
||||
|
||||
if ( !empty($row['user_viewemail']) || $auth->acl_get('m_', $forum_id) )
|
||||
{
|
||||
$email_uri = ( $board_config['board_email_form'] ) ? "profile.$phpEx$SID&mode=email&u=" . $poster_id : 'mailto:' . $row['user_email'];
|
||||
|
||||
$poster_details[$poster_id]['email_img'] = '<a href="' . $email_uri . '">' . create_img($theme['icon_email'], $lang['Send_email']) . '</a>';
|
||||
$poster_details[$poster_id]['email'] = '<a href="' . $email_uri . '">' . $lang['Send_email'] . '</a>';
|
||||
$poster_details[$poster_id]['email_img'] = '<a href="' . $email_uri . '">' . $user->img('icon_email', $user->lang['Send_email']) . '</a>';
|
||||
$poster_details[$poster_id]['email'] = '<a href="' . $email_uri . '">' . $user->lang['Send_email'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -695,14 +687,14 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
$poster_details[$poster_id]['email'] = '';
|
||||
}
|
||||
|
||||
$poster_details[$poster_id]['www_img'] = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . create_img($theme['icon_www'], $lang['Visit_website']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['www'] = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $lang['Visit_website'] . '</a>' : '';
|
||||
$poster_details[$poster_id]['www_img'] = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $user->img('icon_www', $user->lang['Visit_website']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['www'] = ( $row['user_website'] ) ? '<a href="' . $row['user_website'] . '" target="_userwww">' . $user->lang['Visit_website'] . '</a>' : '';
|
||||
|
||||
if ( !empty($row['user_icq']) )
|
||||
{
|
||||
$poster_details[$poster_id]['icq_status_img'] = '<a href="http://wwp.icq.com/' . $row['user_icq'] . '#pager"><img src="http://web.icq.com/whitepages/online?icq=' . $row['user_icq'] . '&img=5" width="18" height="18" border="0" /></a>';
|
||||
$poster_details[$poster_id]['icq_img'] = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . create_img($theme['icon_icq'], $lang['ICQ']) . '</a>';
|
||||
$poster_details[$poster_id]['icq'] = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $lang['ICQ'] . '</a>';
|
||||
$poster_details[$poster_id]['icq_img'] = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $user->img('icon_icq', $user->lang['ICQ']) . '</a>';
|
||||
$poster_details[$poster_id]['icq'] = '<a href="http://wwp.icq.com/scripts/search.dll?to=' . $row['user_icq'] . '">' . $user->lang['ICQ'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -711,21 +703,21 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
$poster_details[$poster_id]['icq'] = '';
|
||||
}
|
||||
|
||||
$poster_details[$poster_id]['aim_img'] = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . create_img($theme['icon_aim'], $lang['AIM']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['aim'] = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $lang['AIM'] . '</a>' : '';
|
||||
$poster_details[$poster_id]['aim_img'] = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $user->img('icon_aim', $user->lang['AIM']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['aim'] = ( $row['user_aim'] ) ? '<a href="aim:goim?screenname=' . $row['user_aim'] . '&message=Hello+Are+you+there?">' . $user->lang['AIM'] . '</a>' : '';
|
||||
|
||||
$temp_url = "profile.$phpEx$SID&mode=viewprofile&u=$poster_id";
|
||||
$poster_details[$poster_id]['msn_img'] = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . create_img($theme['icon_msnm'], $lang['MSNM']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['msn'] = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $lang['MSNM'] . '</a>' : '';
|
||||
$poster_details[$poster_id]['msn_img'] = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $user->img('icon_msnm', $user->lang['MSNM']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['msn'] = ( $row['user_msnm'] ) ? '<a href="' . $temp_url . '">' . $user->lang['MSNM'] . '</a>' : '';
|
||||
|
||||
$poster_details[$poster_id]['yim_img'] = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . create_img($theme['icon_yim'], $lang['YIM']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['yim'] = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : '';
|
||||
$poster_details[$poster_id]['yim_img'] = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $user->img('icon_yim', $user->lang['YIM']) . '</a>' : '';
|
||||
$poster_details[$poster_id]['yim'] = ( $row['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $row['user_yim'] . '&.src=pg">' . $user->lang['YIM'] . '</a>' : '';
|
||||
|
||||
if ( $auth->acl_get('f_search', $forum_id) )
|
||||
{
|
||||
$temp_url = 'search.' . $phpEx . $SID . '&search_author=' . urlencode($row['username']) .'"&showresults=posts';
|
||||
$search_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_search'], $lang['Search_user_posts']) . '</a>';
|
||||
$search ='<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>';
|
||||
$search_img = '<a href="' . $temp_url . '">' . $user->img('icon_search', $user->lang['Search_user_posts']) . '</a>';
|
||||
$search ='<a href="' . $temp_url . '">' . $user->lang['Search_user_posts'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -759,14 +751,14 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
// Non-user specific images/text
|
||||
//
|
||||
$temp_url = 'posting.' . $phpEx . $SID . '&mode=quote&p=' . $row['post_id'];
|
||||
$quote_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_quote'], $lang['Reply_with_quote']) . '</a>';
|
||||
$quote = '<a href="' . $temp_url . '">' . $lang['Reply_with_quote'] . '</a>';
|
||||
$quote_img = '<a href="' . $temp_url . '">' . $user->img('icon_quote', $user->lang['Reply_with_quote']) . '</a>';
|
||||
$quote = '<a href="' . $temp_url . '">' . $user->lang['Reply_with_quote'] . '</a>';
|
||||
|
||||
if ( ( $userdata['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) ) || $auth->acl_get('m_edit', $forum_id) || $auth->acl_get('a_') )
|
||||
if ( ( $user->data['user_id'] == $poster_id && $auth->acl_get('f_edit', $forum_id) ) || $auth->acl_get('m_edit', $forum_id) || $auth->acl_get('a_') )
|
||||
{
|
||||
$temp_url = "posting.$phpEx$SID&mode=editpost&p=" . $row['post_id'];
|
||||
$edit_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_edit'], $lang['Edit_delete_post']) . '</a>';
|
||||
$edit = '<a href="' . $temp_url . '">' . $lang['Edit_delete_post'] . '</a>';
|
||||
$edit_img = '<a href="' . $temp_url . '">' . $user->img('icon_edit', $user->lang['Edit_delete_post']) . '</a>';
|
||||
$edit = '<a href="' . $temp_url . '">' . $user->lang['Edit_delete_post'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -777,8 +769,8 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
if ( $auth->acl_get('m_ip', $forum_id) )
|
||||
{
|
||||
$temp_url = "modcp.$phpEx$SID&mode=ip&p=" . $row['post_id'] . "&t=" . $topic_id;
|
||||
$ip_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_ip'], $lang['View_IP']) . '</a>';
|
||||
$ip = '<a href="' . $temp_url . '">' . $lang['View_IP'] . '</a>';
|
||||
$ip_img = '<a href="' . $temp_url . '">' . $user->img('icon_ip', $user->lang['View_IP']) . '</a>';
|
||||
$ip = '<a href="' . $temp_url . '">' . $user->lang['View_IP'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -786,11 +778,11 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
$ip = '';
|
||||
}
|
||||
|
||||
if ( ( $userdata['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $forum_topic_data['topic_last_post_id'] == $row['post_id'] ) || $auth->acl_get('m_delete', $forum_id) )
|
||||
if ( ( $user->data['user_id'] == $poster_id && $auth->acl_get('f_delete', $forum_id) && $forum_topic_data['topic_last_post_id'] == $row['post_id'] ) || $auth->acl_get('m_delete', $forum_id) )
|
||||
{
|
||||
$temp_url = "posting.$phpEx$SID&mode=delete&p=" . $row['post_id'];
|
||||
$delpost_img = '<a href="' . $temp_url . '">' . create_img($theme['icon_delete'], $lang['Delete_post']) . '</a>';
|
||||
$delpost = '<a href="' . $temp_url . '">' . $lang['Delete_post'] . '</a>';
|
||||
$delpost_img = '<a href="' . $temp_url . '">' . $user->img('icon_delete', $user->lang['Delete_post']) . '</a>';
|
||||
$delpost = '<a href="' . $temp_url . '">' . $user->lang['Delete_post'] . '</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -932,7 +924,7 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
//
|
||||
if ( $row['post_edit_count'] )
|
||||
{
|
||||
$l_edit_time_total = ( $row['post_edit_count'] == 1 ) ? $lang['Edited_time_total'] : $lang['Edited_times_total'];
|
||||
$l_edit_time_total = ( $row['post_edit_count'] == 1 ) ? $user->lang['Edited_time_total'] : $user->lang['Edited_times_total'];
|
||||
|
||||
$l_edited_by = '<br /><br />' . sprintf($l_edit_time_total, $poster, $user->format_date($row['post_edit_time']), $row['post_edit_count']);
|
||||
}
|
||||
|
@ -951,7 +943,7 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
|
||||
if ( $user_sig != '' && $user_sig_bbcode_uid != '' && $auth->acl_get('f_sigs', $forum_id) )
|
||||
{
|
||||
if ( !$auth->acl_get('f_html', $forum_id) && $userdata['user_allowhtml'] )
|
||||
if ( !$auth->acl_get('f_html', $forum_id) && $user->data['user_allowhtml'] )
|
||||
{
|
||||
$user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "<\\2>", $user_sig);
|
||||
}
|
||||
|
@ -981,7 +973,7 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
//
|
||||
// Define the little post icon
|
||||
//
|
||||
$mini_post_img = ( $row['post_time'] > $userdata['user_lastvisit'] && $row['post_time'] > $topic_last_read ) ? create_img($theme['goto_post_new'], $lang['New_post']) : create_img($theme['goto_post'], $lang['Post']);
|
||||
$mini_post_img = ( $row['post_time'] > $user->data['user_lastvisit'] && $row['post_time'] > $topic_last_read ) ? $user->img('goto_post_new', $user->lang['New_post']) : $user->img('goto_post', $user->lang['Post']);
|
||||
|
||||
//
|
||||
// Again this will be handled by the templating
|
||||
|
@ -1039,12 +1031,14 @@ if ( $row = $db->sql_fetchrow($result) )
|
|||
'U_MINI_POST' => $mini_post_url,
|
||||
'U_POST_ID' => $row['post_id'])
|
||||
);
|
||||
|
||||
$i++;
|
||||
}
|
||||
while ( $row = $db->sql_fetchrow($result) );
|
||||
}
|
||||
else
|
||||
{
|
||||
message_die(MESSAGE, $lang['No_posts_topic']);
|
||||
message_die(MESSAGE, $user->lang['No_posts_topic']);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Add table
Reference in a new issue